diff --git a/.bazelrc b/.bazelrc index cda867ff953d5..e059fc3dab361 100644 --- a/.bazelrc +++ b/.bazelrc @@ -18,14 +18,16 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" +build --features=external_include_paths +build --cxxopt=-Wno-private-header + +# The project requires C++ >= 17. +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 +# Protobuf and gRPC require C++17 to compile the "host" # targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -47,9 +49,6 @@ build --experimental_ui_max_stdouterr_bytes=-1 # in a random order to help expose undesirable interdependencies. test --test_env=GTEST_SHUFFLE --test_env=GTEST_RANDOM_SEED -# By default, build the library with OpenTelemetry -build --//:enable_opentelemetry - # Don't show warnings when building external dependencies. This still shows # warnings when using these dependencies (say in headers). build --output_filter='^//((?!(external):).)*$' @@ -70,6 +69,8 @@ build:sanitizer --strip=never build:sanitizer --copt=-Og build:sanitizer --copt=-g build:sanitizer --copt=-fno-omit-frame-pointer +#build:sanitizer --features=external_include_paths + # --config asan: Address Sanitizer build:asan --config=sanitizer @@ -102,6 +103,8 @@ build:ubsan --copt=-DCURL_STRICTER build:ubsan --linkopt=-fsanitize=undefined build:ubsan --linkopt=-fsanitize-link-c++-runtime build:ubsan --action_env=UBSAN_OPTIONS=halt_on_error=1:print_stacktrace=1 +#build:ubsan --features=external_include_paths + # --config xsan: Runs misc. sanitizers that aren't covered elsewhere. build:xsan --config=sanitizer @@ -128,3 +131,4 @@ build:msan --linkopt=-L/usr/lib/x86_64-unknown-linux-gnu # --config otel2: Open Telemetery ABI version 2 build:otel2 --cxxopt=-DOPENTELEMETRY_ABI_VERSION_NO=2 +build:otel2 --@opentelemetry-cpp//api:abi_version_no=2 diff --git a/.bazelversion b/.bazelversion index e8be68404bcb3..e7fdef7e2e635 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -7.6.1 +8.4.2 diff --git a/.clang-tidy b/.clang-tidy index 9dd40ccb9bb1f..2a8ade0ec8e20 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -85,6 +85,7 @@ Checks: > performance-*, portability-*, readability-*, + -bugprone-exception-escape, -google-readability-braces-around-statements, -google-readability-namespace-comments, -google-runtime-references, diff --git a/.github/workflows/macos-cmake.yml b/.github/workflows/macos-cmake.yml index a0507155c37dd..265a4b4de208b 100644 --- a/.github/workflows/macos-cmake.yml +++ b/.github/workflows/macos-cmake.yml @@ -70,7 +70,7 @@ jobs: - uses: actions/setup-python@v5 id: py311 with: - python-version: '3.11' + python-version: '3.13' - uses: google-github-actions/setup-gcloud@v2 env: CLOUDSDK_PYTHON: ${{ steps.py311.outputs.python-path }} @@ -84,8 +84,6 @@ jobs: spanner ) core2_features=( - pubsub - pubsublite storage storage_grpc ) diff --git a/.github/workflows/windows-cmake.yml b/.github/workflows/windows-cmake.yml index e55ae79990330..32347844027dc 100644 --- a/.github/workflows/windows-cmake.yml +++ b/.github/workflows/windows-cmake.yml @@ -41,7 +41,7 @@ jobs: msvc: [ msvc-2022 ] build_type: [ Release ] arch: [ x64 ] - shard: [ Core1 ] + shard: [ Core1, Core2, Core3, Core4, Core5, Compute, AIPlatform, Shard1, Shard2, Shard3, Shard4, Shard5 ] exclude: # Also skip shards (Compute and Other) that contain only generated code. - exclude-from-full-trick: ${{ ! inputs.full-matrix }} @@ -76,7 +76,7 @@ jobs: - uses: actions/setup-python@v5 id: py311 with: - python-version: '3.11' + python-version: '3.13' - uses: google-github-actions/setup-gcloud@v2 env: CLOUDSDK_PYTHON: ${{ steps.py311.outputs.python-path }} @@ -103,6 +103,7 @@ jobs: dataproc discoveryengine monitoring + opentelemetry retail sql dialogflow_cx @@ -209,6 +210,8 @@ jobs: universe_domain ) shard5_features=( + asset + channel video datacatalog iam @@ -269,10 +272,6 @@ jobs: skipped_features+=("${shard3_features[@]}") skipped_features+=("${shard4_features[@]}") skipped_features+=("${shard5_features[@]}") - # We use vcpkg in this build, which ships with Protobuf v21.x. - # Both `asset` and `channel` require Protobuf >= 23.x to compile on - # Windows. - skipped_features+=(asset channel) skipped="$(printf ",-%s" "${skipped_features[@]}")" echo "features=__ga_libraries__,__experimental_libraries__,${skipped:1}" >> "${GITHUB_OUTPUT}" fi diff --git a/.typos.toml b/.typos.toml index aba8127ea5c2a..cd164de6b395a 100644 --- a/.typos.toml +++ b/.typos.toml @@ -62,6 +62,9 @@ extend-exclude = [ "external/googleapis.patch", # Mispelled test names in Bigtable conformance tests "google/cloud/bigtable/ci/run_conformance_tests_proxy_bazel.sh", + # ports files don't need to be checked + "google/cloud/ports_def.inc", + "google/cloud/ports_undef.inc", ] [default] diff --git a/BUILD.bazel b/BUILD.bazel index c7142d44ec3ff..69b20b3e9e1d8 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -254,8 +254,3 @@ cc_library( "//google/cloud:google_cloud_cpp_universe_domain", ], ) - -bool_flag( - name = "enable_opentelemetry", - build_setting_default = False, -) diff --git a/CHANGELOG.md b/CHANGELOG.md index 592b9c52eca6b..b98652a42f98f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,2247 +1,28 @@ # Changelog **NOTE**: [Future Breaking Changes](/doc/deprecated.md) lists anticipated -breaking changes in the upcoming 3.x release. This release is scheduled for -2024-12 or 2025-01. +breaking changes in the upcoming 4.x release. This release is scheduled for +2027-12 or 2028-01. -## v2.48.0 - TBD +## v3.1.0 - 2026-02 -## v2.47.0 - 2026-02 +### Default Retry Policy Changes -### New Libraries +All libraries except Bigtable, PubSub, Spanner, and Storage have had their +default maximum retry policy duration reduced from 30 minutes to 10 minutes. -We are happy to announce the following GA libraries. Unless specifically noted, -the APIs in these libraries are stable, and are ready for production use. - -- [Cloud API Registry](google/cloud/apiregistry/README.md) -- [Audit Manager](/google/cloud/auditmanager/README.md) -- [GKE Recommender](/google/cloud/gkerecommender/README.md) - -### [Spanner](/google/cloud/spanner/README.md) - -- feat(spanner): define IsolationLevel enum for Spanner transactions ([#15853](https://github.com/googleapis/google-cloud-cpp/pull/15853)) - -### [Storage](/google/cloud/storage/README.md) - -- feat(storage): take async client out of experimental ([#15573](https://github.com/googleapis/google-cloud-cpp/pull/15573)) -- fix(storage): add extra validation for type in object_metadata_parser ([#15864](https://github.com/googleapis/google-cloud-cpp/pull/15864)) -- feat(storage): Update the write handle while performing appendable object upload ([#15889](https://github.com/googleapis/google-cloud-cpp/pull/15889)) -- feat(storage): add flag for enable and disable multi stream feature. ([#15893](https://github.com/googleapis/google-cloud-cpp/pull/15893)) -- fix(storage): gRPC misuse causing crashes due to concurrent writes from Flush() and Write() ([#15802](https://github.com/googleapis/google-cloud-cpp/pull/15802)) - -### [Google APIs interface definitions](https://github.com/googleapis/googleapis) - -- This release is based on definitions as of [2026-01-30T21:16:31-08:00](https://github.com/googleapis/googleapis/tree/c0fcb35628690e9eb15dcefae41c651c67cd050b) - -## v2.46.0 - 2026-01 - -### [Spanner](/google/cloud/spanner/README.md) - -- feat(spanner): enable UUID data type ([#15867](https://github.com/googleapis/google-cloud-cpp/pull/15867)) - -### [Storage](/google/cloud/storage/README.md) - -- feat(storage): Add full object checksum validation at finalization for json path ([#15815](https://github.com/googleapis/google-cloud-cpp/pull/15815)) -- feat(storage): add support for bucket encryption enforcement config ([#15844](https://github.com/googleapis/google-cloud-cpp/pull/15844)) - -### [Google APIs interface definitions](https://github.com/googleapis/googleapis) - -- This release is based on definitions as of [2026-01-09T11:37:16-08:00](https://github.com/googleapis/googleapis/tree/6145b5ffe99d290c3d840136f310490d732acb04) - -## v2.45.0 - 2025-12-17 - -### New Libraries - -We are happy to announce the following GA libraries. Unless specifically noted, -the APIs in these libraries are stable, and are ready for production use. - -- [Cloud Maintenance API](/google/cloud/maintenance/README.md) - -### [Pubsub](google/cloud/pubsub/README.md) - -- fix(pubsub): impersonate sa credentials CompletionQueue lifetime ([#15833](https://github.com/googleapis/google-cloud-cpp/pull/15833)) - -### [Storage](google/cloud/storage/README.md) - -- fix(storage): append object spec should only be set in the first request ([#15831](https://github.com/googleapis/google-cloud-cpp/pull/15831)) - -### [Google APIs interface definitions](https://github.com/googleapis/googleapis) - -- This release is based on definitions as of [2025-12-11T12:53:16-08:00](https://github.com/googleapis/googleapis/tree/05f65958eb7f2a8bc59db87ad40487f0fb093097) - -## v2.44.0 - 2025-12 - -### [BigQueryControl](google/cloud/bigquerycontrol/README.md) -- !fix(bigquerycontrol): PatchRoutine RPC has been removed. - -### [Bigtable](/google/cloud/bigtable/README.md) - -- Support for ([GoogleSQL](https://docs.cloud.google.com/bigtable/docs/googlesql-overview)) has been added to the Bigtable library. Please see the new ([bigtable::Client](https://docs.cloud.google.com/cpp/docs/reference/bigtable/latest/classgoogle_1_1cloud_1_1bigtable_1_1Client)) class for more details. - -### [Spanner](/google/cloud/spanner/README.md) - -- fix(spanner): Do not compare iterators from different containers ([#15665](https://github.com/googleapis/google-cloud-cpp/pull/15665)) - -### [Storage](/google/cloud/storage/README.md) - -- fix(storage): always use latest write handle for fast resume in gRPC BidiWriteObject ([#15795](https://github.com/googleapis/google-cloud-cpp/pull/15795)) -- feat(storage): add support for partial list bucket ([#15763](https://github.com/googleapis/google-cloud-cpp/pull/15763)) -- fix(storage): Add start appendable condition for bypassing full object checksum ([#15786](https://github.com/googleapis/google-cloud-cpp/pull/15786)) -- feat(storage): add GrpcMetricsExcludedLabelsOption for gRPC metrics label filtering ([#15735](https://github.com/googleapis/google-cloud-cpp/pull/15735)) -- fix(storage): enable fast resume for rapid object write streams by including write handle ([#15762](https://github.com/googleapis/google-cloud-cpp/pull/15762)) -- feat(storage): add configurable metrics export timeout for GCS gRPC Client ([#15629](https://github.com/googleapis/google-cloud-cpp/pull/15629)) - -### [Common Libraries](/google/cloud/README.md) - -- feat(credentials): add support for creating ComputeEngine credentials explicitly ([#15789](https://github.com/googleapis/google-cloud-cpp/pull/15789)) -- feat: Support scopes field in impersonated json ([#15675](https://github.com/googleapis/google-cloud-cpp/pull/15675)) - -### [Google APIs interface definitions](https://github.com/googleapis/googleapis) - -- This release is based on definitions as of [2025-11-27T07:02:42Z](https://github.com/googleapis/googleapis/tree/8cd3749f4b98f2eeeef511c16431979aeb3a6502) - -## v2.43.0 - 2025-10 - -### [Storage](/google/cloud/storage/README.md) - -- fix(storage): fixing flushing and finalization in buffered upload of async client ([#15572](https://github.com/googleapis/google-cloud-cpp/pull/15572)) -- feat(storage): Add samples related to AppendableObject and OpenObject ([#15563](https://github.com/googleapis/google-cloud-cpp/pull/15563)) -- feat(storage): Expose Flush() in AsyncWriter ([#15555](https://github.com/googleapis/google-cloud-cpp/pull/15555)) -- fix(storage): Fix Resume() to use append_object_spec instead of write_object_spec for resumed appendable uploads ([#15558](https://github.com/googleapis/google-cloud-cpp/pull/15558)) -- fix(storage): Increase AsyncWriter default MinLwmValue to avoid frequent flushes ([#15552](https://github.com/googleapis/google-cloud-cpp/pull/15552)) - -### [Google APIs interface definitions](https://github.com/googleapis/googleapis) - -- This release is based on definitions as of [2025-10-03T13:49:30-07:00](https://github.com/googleapis/googleapis/tree/2193a2bfcecb92b92aad7a4d81baa428cafd7dfd) - -## v2.42.0 - 2025-09 - -### New Libraries - -We are happy to announce the following GA libraries. Unless specifically noted, -the APIs in these libraries are stable, and are ready for production use. - -- [Cloud Security Compliance](/google/cloud/cloudsecuritycompliance/README.md) -- [Config Delivery API](/google/cloud/configdelivery/README.md) - -### Updated Libraries - -- [Network Connectivity](/google/cloud/networkconnectivity/README.md) - added support for DataTransferService ([#15464](https://github.com/googleapis/google-cloud-cpp/pull/15464)) - - -### [Spanner](/google/cloud/spanner/README.md) - -- perf(spanner): Use arenas to speed up queries that fetch many rows ([#15441](https://github.com/googleapis/google-cloud-cpp/pull/15441)) - -### [Storage](/google/cloud/storage/README.md) - -- feat(storage): Remove unnecessary code which was causing race condition ([#15551](https://github.com/googleapis/google-cloud-cpp/pull/15551)) -- feat(storage): Update the appendable object function to store the Object metadata ([#15422](https://github.com/googleapis/google-cloud-cpp/pull/15422)) -- feat(storage): Add generation in append_object_spec in resume operation ([#15395](https://github.com/googleapis/google-cloud-cpp/pull/15395)) - -### [Common Libraries](/google/cloud/README.md) - -- perf: Change StreamingReadRpc::Read interface to take ResponseType ([#15319](https://github.com/googleapis/google-cloud-cpp/pull/15319)) - -### [Google APIs interface definitions](https://github.com/googleapis/googleapis) - -- This release is based on definitions as of [2025-09-05T15:58:06-07:00](https://github.com/googleapis/googleapis/tree/46403a9acec0719c130b33eb38b2ee62a45f9f6c) - -## v2.41.0 - 2025-08-14 - -### [Bigtable](/google/cloud/bigtable/README.md) - -- The `Bigtable::DataConnection` class has been instrumented to collect [Client Side Metrics](https://cloud.google.com/bigtable/docs/client-side-metrics), -free of charge. These metrics will be collected by -default if both the [OpenTelemetry](https://github.com/open-telemetry/opentelemetry-cpp) -and [Google Cloud Monitoring](google/cloud/monitoring/README.md) dependencies are -available. Users can opt-out by setting the `bigtable::EnableMetricsOption` to `false`. - -- The following metrics are available in Bigtable: - - AttemptLatency - - OperationLatency - - RetryCount - - FirstResponseLatency - - ServerLatency - - ApplicationBlockingLatency - - ConnectivityErrorCount - -### [Spanner](/google/cloud/spanner/README.md) - -- [Multiplexed session](https://cloud.google.com/spanner/docs/sessions#multiplexed_sessions) -support is now available. To enable Multiplexed sessions, add the -`spanner::EnableMultiplexedSessionOption` to `Options` when calling -`spanner::MakeConnection`. This enables Multiplexed sessions on all operations -read-only, read-write, and partitioned. - -### [Google APIs interface definitions](https://github.com/googleapis/googleapis) - -- This release is based on definitions as of [2025-07-30T06:44:36-07:00](https://github.com/googleapis/googleapis/tree/f6801ce4e1df0541abb8d1e996cb36363c41fb8d) - -## v2.40.0 - 2025-08 - -### New Libraries - -We are happy to announce the following GA libraries. Unless specifically noted, -the APIs in these libraries are stable, and are ready for production use. - -- [License Manager API](/google/cloud/licensemanager/README.md) - -### Updated Libraries - -- [BigQuery](/google/cloud/bigquery/README.md) - added support for datapolicies/v2 -- [ManagedKafka](/google/cloud/managedkafka/README.md) - add schemaregistry to the library - -### [Bigtable](/google/cloud/bigtable/README.md) - -- We have begun instrumenting the `Bigtable::DataConnection` class to collect -several [Client Side Metrics](https://cloud.google.com/bigtable/docs/client-side-metrics), -free of charge. These metrics will be collected by -default if both the [OpenTelemetry](https://github.com/open-telemetry/opentelemetry-cpp) -and [Google Cloud Monitoring](google/cloud/monitoring/README.md) dependencies are -available. Users can opt-out by setting the `bigtable::EnableMetricsOption` to `false`. - -- The following metrics are available in Bigtable: - - AttemptLatency - - OperationLatency - - RetryCount - - FirstResponseLatency - -### [Spanner](/google/cloud/spanner/README.md) - -- feat(spanner): add support for order_by enum ([#15240](https://github.com/googleapis/google-cloud-cpp/pull/15240)) -- feat(spanner): add support for lock_hint enum ([#15249](https://github.com/googleapis/google-cloud-cpp/pull/15249)) - -### [Storage](/google/cloud/storage/README.md) - -- feat(storage): Create OTel tracing decorator for `storage:: ParallelUploadFile()` ([#15289](https://github.com/googleapis/google-cloud-cpp/pull/15289)) -- fix(storage): Fix the bucket name not found error ([#15274](https://github.com/googleapis/google-cloud-cpp/pull/15274)) -- feat(storage): Create OTel tracing decorator for `Client::UploadFile()` ([#15245](https://github.com/googleapis/google-cloud-cpp/pull/15245)) - -### [Google APIs interface definitions](https://github.com/googleapis/googleapis) - -- This release is based on definitions as of [2025-07-30T06:44:36-07:00](https://github.com/googleapis/googleapis/tree/f6801ce4e1df0541abb8d1e996cb36363c41fb8d) - -## v2.39.0 - 2025-07 - -### [Storage](/google/cloud/storage/README.md) - -- feat(storage): Link traces between Open and ReadRange traces. ([#15236](https://github.com/googleapis/google-cloud-cpp/pull/15236)) -- feat(storage): Add check for writeHandle before transforming write_object_spec to append_object_spec ([#15224])(https://github.com/googleapis/google-cloud-cpp/pull/15224)) - -### [Google APIs interface definitions](https://github.com/googleapis/googleapis) - -- This release is based on definitions as of [2025-07-03T11:36:10-07:00](https://github.com/googleapis/googleapis/tree/f9d6fe4a6ad9ed89dfc315f284124d2104377940) - -## v2.38.0 - 2025-06 - -### New Libraries - -We are happy to announce the following GA libraries. Unless specifically noted, -the APIs in these libraries are stable, and are ready for production use. - -- [Dataform API](/google/cloud/dataform/README.md) -- [Google Cloud Managed Lustre API](/google/cloud/lustre/README.md) -- [Memorystore API](/google/cloud/memorystore/README.md) -- [Oracle Database@Google Cloud API](/google/cloud/oracledatabase/README.md) - -### [Pub/Sub](/google/cloud/pubsub/README.md) - -- feat(pubsub): add MakeConnection overloads to support regional and locational endpoints ([#15190](https://github.com/googleapis/google-cloud-cpp/pull/15190)) - -### [Storage](/google/cloud/storage/README.md) - -- samples(storage): add the bucket soft delete related tags ([#15154](https://github.com/googleapis/google-cloud-cpp/pull/15154)) -- samples(storage): add samples for soft delete objects ([#15133](https://github.com/googleapis/google-cloud-cpp/pull/15133)) - -### [Common Libraries](/google/cloud/README.md) - -- feat(resourcemanager): add Connection factory function for regional endpoints ([#15189](https://github.com/googleapis/google-cloud-cpp/pull/15189)) -- samples(storagecontrol): add samples for anywhere cache ([#15134](https://github.com/googleapis/google-cloud-cpp/pull/15134)) -- fix: Bypass proxy for GCE metadata server requests - -### [Google APIs interface definitions](https://github.com/googleapis/googleapis) - -- This release is based on definitions as of [2025-06-04T16:36:46-07:00](https://github.com/googleapis/googleapis/tree/de157ca34fa487ce248eb9130293d630b501e4ad) - -## v2.37.0 - 2025-05 - -**BREAKING CHANGES** - -Client library `resourcesettings` is being removed because the service has been turned down. - -### New Libraries - -We are happy to announce the following GA libraries. Unless specifically noted, -the APIs in these libraries are stable, and are ready for production use. - -- [Financial Services API](/google/cloud/financialservices/README.md) -- [Storage Batch Operations API](/google/cloud/storagebatchoperations/README.md) -- [Device Streaming API](/google/cloud/devicestreaming/README.md) -- [Chronicle API](/google/cloud/chronicle/README.md) - -### Updated Libraries - -- [iam](/google/cloud/iam/README.md) - add v3 version of the library - -### [Spanner](/google/cloud/spanner/README.md) - -- feat(spanner): add spanner::Value support for TypeCode::INTERVAL ([#15094](https://github.com/googleapis/google-cloud-cpp/pull/15094)) -- feat(spanner): add ISO8601 duration support to spanner::Interval ([#15077](https://github.com/googleapis/google-cloud-cpp/pull/15077)) -- fix(spanner): update session bookkeeping for session NotFound ([#15009](https://github.com/googleapis/google-cloud-cpp/pull/15009)) - -### [Storage](/google/cloud/storage/README.md) - -- feat(storage): Make absl::cord constructor public in write_payload.h ([#15113](https://github.com/googleapis/google-cloud-cpp/pull/15113)) -- feat(storage): Add bidiread and bidi appendable write to the async client. ([#15078](https://github.com/googleapis/google-cloud-cpp/pull/15078)) -- fix: fix bug with customheadersoption ([#15053](https://github.com/googleapis/google-cloud-cpp/pull/15053)) - -### [Common Libraries](/google/cloud/README.md) - -- feat: add option to allow setting CURLOPT_INTERFACE ([#15044](https://github.com/googleapis/google-cloud-cpp/pull/15044)) - -### [Google APIs interface definitions](https://github.com/googleapis/googleapis) - -- This release is based on definitions as of [2025-05-02T13:03:05-07:00](https://github.com/googleapis/googleapis/tree/079e5305050859d0e3a8c0768611283ee4863c07) - -## v2.36.0 - 2025-03 - -### New Libraries - -We are happy to announce the following GA libraries. Unless specifically noted, -the APIs in these libraries are stable, and are ready for production use. - -- [Parameter Manager API](/google/cloud/parametermanager/README.md) - -### [Google APIs interface definitions](https://github.com/googleapis/googleapis) - -- This release is based on definitions as of [2025-02-27T08:14:18-08:00](https://github.com/googleapis/googleapis/tree/b151ec2ae29c2c955c56784c0ce388b2d8c4a84c) - -## v2.35.0 - 2025-02 - -### [Pub/Sub](/google/cloud/pubsub/README.md) - -- docs(pubsub): Add Pub/Sub ingestion from Kafka samples ([#14954](https://github.com/googleapis/google-cloud-cpp/pull/14954)) - -### [Common Libraries](/google/cloud/README.md) - -- doc: update documentation to point to security best practice ([#14942](https://github.com/googleapis/google-cloud-cpp/pull/14942)) - -### [Google APIs interface definitions](https://github.com/googleapis/googleapis) - -- This release is based on definitions as of [2025-01-28T16:10:24-08:00](https://github.com/googleapis/googleapis/tree/280725e991516d4a0f136268faf5aa6d32d21b54) - -## v2.34.0 - 2025-01 - -### [OpenTelemetry](/google/cloud/opentelemetry/README.md) - -- fix(otel): Exporter creating Monitored Resource with task_id for Cloud Run ([#14923](https://github.com/googleapis/google-cloud-cpp/pull/14923)) -- feat(otel): copy service labels into GCM Metric ([#14930](https://github.com/googleapis/google-cloud-cpp/pull/14930)) - -### [Storage](/google/cloud/storage/README.md) - -- feat(storage): add MoveObject functionality to JSON and gRPC ([#14936](https://github.com/googleapis/google-cloud-cpp/pull/14936)) - -## v2.33.0 - 2024-12 - -### [BigQuery Control](/google/cloud/bigquerycontrol/README.md) - - - Has been promoted from an `experimental` library to GA. - -### [Storage](/google/cloud/storage/README.md) - -- docs(storage): Update build instructions for gcs+grpc ([#14833](https://github.com/googleapis/google-cloud-cpp/pull/14833)) - -### [GKE Connect Gateway](/google/cloud/gkeconnect/README.md) - -- fix(gkeconnect): service only supports REST endpoint ([#14897](https://github.com/googleapis/google-cloud-cpp/pull/14897)) - -### [Google APIs interface definitions](https://github.com/googleapis/googleapis) - -- This release is based on definitions as of [2024-12-13T14:53:44-08:00](https://github.com/googleapis/googleapis/tree/f4eff5440fd07389f820d22d2a55690c6390dc6d) - -## v2.32.0 - 2024-12 - -### [Spanner](/google/cloud/spanner/README.md) - -- feat(spanner): add samples for MR CMEK ([#14674](https://github.com/googleapis/google-cloud-cpp/pull/14674)) - -### [Common Libraries](/google/cloud/README.md) - -- feat(rest): support generateIdToken in impersonation url ([#14853](https://github.com/googleapis/google-cloud-cpp/pull/14853)) -- feat(rest): support impersonated ADC ([#14815](https://github.com/googleapis/google-cloud-cpp/pull/14815)) - -### [Google APIs interface definitions](https://github.com/googleapis/googleapis) - -- This release is based on definitions as of [2024-11-28T13:52:13-08:00](https://github.com/googleapis/googleapis/tree/d675ec222c431e3346ba8aaf0027392fe8b3d90c) - -## v2.31.0 - 2024-11 - -### New Libraries - -We are happy to announce the following GA libraries. Unless specifically noted, -the APIs in these libraries are stable, and are ready for production use. - -- [ParallelStore API](/google/cloud/parallelstore/README.md) - -### [Pub/Sub](/google/cloud/pubsub/README.md) - -- docs(pubsub): Fix region tags for Pub/Sub ingestion from GCS samples ([#14773](https://github.com/googleapis/google-cloud-cpp/pull/14773)) - -### [Storage](/google/cloud/storage/README.md) - -- docs(storage): better suggestion for deprecated API ([#14786](https://github.com/googleapis/google-cloud-cpp/pull/14786)) - -### [Common Libraries](/google/cloud/README.md) - -- feat(oauth2): add support for external account workforce identity ([#14800](https://github.com/googleapis/google-cloud-cpp/pull/14800)) -- feat: API key authentication ([#14779](https://github.com/googleapis/google-cloud-cpp/pull/14779)) -- feat(mixin): generate mixins for libraries ([#14766](https://github.com/googleapis/google-cloud-cpp/pull/14766)) - -### [Google APIs interface definitions](https://github.com/googleapis/googleapis) - -- This release is based on definitions as of [2024-10-31T11:22:40-07:00](https://github.com/googleapis/googleapis/tree/b7c5b60ee76c4591e32c874978c6cd8231087ed6) - -## v2.30.0 - 2024-10 - -### Updated Libraries - -- [AI Platform API](/google/cloud/aiplatform/README.md) - new - `EvaluationServiceClient` -- [Compute Engine](/google/cloud/compute/README.md) - - `FutureReservationsClient` has been removed as the service is not GA. -- [Dialogflow ES API](/google/cloud/dialogflow_es/README.md) - new - `EncryptionSpecServiceClient` and `GeneratorsClient` - -### [AI Platform API](/google/cloud/aiplatform/README.md) - -- doc(aiplatform): add Vertex AI samples ([#14703](https://github.com/googleapis/google-cloud-cpp/pull/14703)) - -### [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)) - -### [OpenTelemetry](/google/cloud/opentelemetry/README.md) - -- feat(otel): release GCM exporter ([#14693](https://github.com/googleapis/google-cloud-cpp/pull/14693)) - -### [Pub/Sub](/google/cloud/pubsub/README.md) - -- feat(mixin): add manual changes for pubsub and generate mixin code ([#14756](https://github.com/googleapis/google-cloud-cpp/pull/14756)) -- docs(pubsub): Add ingestion from GCS topic creation sample ([#14749](https://github.com/googleapis/google-cloud-cpp/pull/14749)) - -### [Spanner](/google/cloud/spanner/README.md) - -- docs(spanner): Add samples for backup schedule feature APIs ([#14720](https://github.com/googleapis/google-cloud-cpp/pull/14720)) -- docs(spanner): create a few code snippets as examples for using Spanner Graph using cpp ([#14660](https://github.com/googleapis/google-cloud-cpp/pull/14660)) - -### [Storage](/google/cloud/storage/README.md) - -- The gRPC plugin is now GA. The [Using the gRPC plugin][storage-grpc] - guide describes this feature in more detail. When using GCS from Google - Compute Engine (GCE) this plugin can enable higher total throughput. -- feat(storage): Add ability to restore soft deleted objects ([#14710](https://github.com/googleapis/google-cloud-cpp/pull/14710)) - -### [Common Libraries](/google/cloud/README.md) - -- fix(rest): promote buffer curl reads from to member variable ([#14732](https://github.com/googleapis/google-cloud-cpp/pull/14732)) -- fix: respect `GOOGLE_CLOUD_QUOTA_PROJECT` ([#14684](https://github.com/googleapis/google-cloud-cpp/pull/14684)) - -### [Google APIs interface definitions](https://github.com/googleapis/googleapis) - -- This release is based on definitions as of [2024-09-24T10:34:24-07:00](https://github.com/googleapis/googleapis/tree/69e9dff10df4fa1e338712d38dc26b46791a6e94) - -## v2.29.0 - 2024-09 - -### New Libraries - -We are happy to announce the following GA libraries. Unless specifically noted, -the APIs in these libraries are stable, and are ready for production use. - -- [GKE Connect API](/google/cloud/gkeconnect/README.md) - -### [Bigtable](/google/cloud/bigtable/README.md) - -- fix(bigtable): sanitize RowRange proto input ([#14651](https://github.com/googleapis/google-cloud-cpp/pull/14651)) - -### [Compute](/google/cloud/compute/README.md) - -- feat(compute): add missing services instant_snapshots and region_instant_snapshots ([#14647](https://github.com/googleapis/google-cloud-cpp/pull/14647)) - -### [Spanner](/google/cloud/spanner/README.md) - -- feat(spanner): support instance edition ([#14678](https://github.com/googleapis/google-cloud-cpp/pull/14678)) - -### [Common Libraries](/google/cloud/README.md) - -- fix: do not persist the keys loaded from PKCS#12 on Windows ([#14645](https://github.com/googleapis/google-cloud-cpp/pull/14645)) -- fix: no need to link gmock_main in mocks ([#14640](https://github.com/googleapis/google-cloud-cpp/pull/14640)) -- fix: quickstarts build with bazel ([#14633](https://github.com/googleapis/google-cloud-cpp/pull/14633)) - -### [Google APIs interface definitions](https://github.com/googleapis/googleapis) - -- This release is based on definitions as of [2024-08-30T10:45:43-07:00](https://github.com/googleapis/googleapis/tree/6a474b31c53cc1797710206824a17b364a835d2d) - -## v2.28.0 - 2024-08 - -### [OpenTelemetry](/google/cloud/opentelemetry/README.md) - -- fix(otel): avoid infinite trace export loop ([#14612](https://github.com/googleapis/google-cloud-cpp/pull/14612)) - -### [Storage](/google/cloud/storage/README.md) - -- fix(rest): prevent libcurl callback from reading bad address ([#14615](https://github.com/googleapis/google-cloud-cpp/pull/14615)) - -### [Common Libraries](/google/cloud/README.md) - -- docs: update mock LRO tips ([#14609](https://github.com/googleapis/google-cloud-cpp/pull/14609)) - -## v2.27.0 - 2024-08 - -- We now link our mocking libraries against GoogleTest in CMake. - - The mocking libraries require GoogleTest. Not linking GoogleTest was a bug. - This bug surfaced in versions of CMake >= 3.30. - - Note that the mocking libraries are built by default. If you want to opt-out - of building or installing the mocking libraries, you can supply - `-DGOOGLE_CLOUD_CPP_WITH_MOCKS=OFF` to your CMake configure command. - - If your build fails because GoogleTest is not found, supply - `-DGOOGLE_CLOUD_CPP_WITH_MOCKS=OFF` as mentioned above. - -- We have stopped testing on CentOS 7, Debian 10 (Buster), and RockyLinux 8 as - these distros are EOL or in some form of "security only" support period. - Note that we used CentOS 7 as a proxy for testing RedHat Enterprise Linux 7. - - -### BREAKING TESTING CHANGES - -If you don't mock Long Running Operations (LRO) in your tests, then these -changes will not affect you. - -With the promotion from Experimental to GA of the new methods to support -starting Long Running Operations (LRO) synchronously and awaiting their -completion separately, the use of `ExperimentalTag` is no longer required. The -overload set for LRO methods has changed and may require matchers to -disambiguate invocations of `EXPECT_CALL` -(https://google.github.io/googletest/gmock_cook_book.html#SelectOverload). - -### New Libraries - -We are happy to announce the following GA libraries. Unless specifically noted, -the APIs in these libraries are stable, and are ready for production use. - -- [Developer Connect API](/google/cloud/developerconnect/README.md) -- [Privileged Access Manager API](/google/cloud/privilegedaccessmanager/README.md) - -The following experimental libraries are now available: - -- [Cloud BigQuery Control API](/google/cloud/bigquerycontrol/README.md) - -This library provides support for the Dataset, Job, Model, Project, Routine, -RowAccessPolicy, and Table REST resources. - -### [OpenTelemetry](/google/cloud/opentelemetry/README.md) - -- fix(otel): avoid crashes in tracing wrappers for streams ([#14477](https://github.com/googleapis/google-cloud-cpp/pull/14477)) - -#### Bazel - -The `--io_opentelemetry_cpp//api:with_abseil` flag was marked as deprecated in -OpenTelemetry v1.16.0. It may be removed in future versions. - -In previous versions of `opentelemetry-cpp`, this flag was required for -compatibility with Abseil. It is no longer necessary, as `opentelemetry-cpp` is -compiled with Abseil by default. - -We have stopped using the flag to validate Bazel build configurations with -OpenTelemetry tracing enabled. - -If you are building `google-cloud-cpp` with `opentelemetry-cpp` < v1.16.0, you -will need to supply the flag for compatibility with Abseil. The following can be -added to your `.bazelrc` file. - -```bash -build --@io_opentelemetry_cpp//api:with_abseil -``` - -### [Spanner](/google/cloud/spanner/README.md) - -- feat(spanner): add samples for instance partitions ([#14574](https://github.com/googleapis/google-cloud-cpp/pull/14574)) - -### [Storage](/google/cloud/storage/README.md) - -- fix(storage): reset backoff after partial write ([#14473](https://github.com/googleapis/google-cloud-cpp/pull/14473)) -- feat(storage): single span for `ReadObject()` ([#14435](https://github.com/googleapis/google-cloud-cpp/pull/14435)) -- fix(storage): only backoff before resume attempts ([#14427](https://github.com/googleapis/google-cloud-cpp/pull/14427)) - -### [Common Libraries](/google/cloud/README.md) - -- Promoted to GA, functions to start a LRO (longrunning operation) in one - function call, and then await the LRO to complete on a separate function. -- feat(generator): include request in async streaming RPC logs ([#14565](https://github.com/googleapis/google-cloud-cpp/pull/14565)) -- fix(common): censor Bearer tokens over HTTP/2 ([#14564](https://github.com/googleapis/google-cloud-cpp/pull/14564)) -- fix(common): `json_fwd.h` is not always available ([#14439](https://github.com/googleapis/google-cloud-cpp/pull/14439)) -- fix: workaround missing SHA256 macros in MinGW-w64 ([#14437](https://github.com/googleapis/google-cloud-cpp/pull/14437)) - -## v2.26.0 - 2024-07 - -### BREAKING TESTING CHANGES - -If you don't mock Long Running Operations (LRO) in your tests, then these -changes will not affect you. - -With the addition of new methods to support starting Long Running Operations -(LRO) synchronously and awaiting their completion separately, the overload set -for the preexisting LRO methods have been expanded. Uses of `EXPECT_CALL` that -do not have matchers for the arguments will be ambiguous. To quickly remedy this -change instances of `EXPECT_CALL(*mock, Method)` to -`EXPECT_CALL(*mock, Method(::testing::_))`. - -### New Libraries - -We are happy to announce the following GA libraries. Unless specifically noted, -the APIs in these libraries are stable, and are ready for production use. - -- [Managed Kafka API](/google/cloud/managedkafka/README.md) - -### Updated Libraries - -- [Discovery Engine](/google/cloud/discoveryengine/README.md): - - `ControlServiceClient` added - - `GroundedGenerationServiceClient` added - - `ProjectServiceClient` added - - `RankServiceClient` added - -### [Bigtable](/google/cloud/bigtable/README.md) - -- docs(bigtable): include admin options ([#14358](https://github.com/googleapis/google-cloud-cpp/pull/14358)) - -### [Pub/Sub](/google/cloud/pubsub/README.md) - -- docs(pubsub): include admin options ([#14359](https://github.com/googleapis/google-cloud-cpp/pull/14359)) - -### [Spanner](/google/cloud/spanner/README.md) - -- docs(spanner): include admin options ([#14360](https://github.com/googleapis/google-cloud-cpp/pull/14360)) - -### [Storage](/google/cloud/storage/README.md) - -- feat(storage): support object retention ([#14351](https://github.com/googleapis/google-cloud-cpp/pull/14351)) -- feat(storage): buckets with object retention ([#14350](https://github.com/googleapis/google-cloud-cpp/pull/14350)) - -### [StorageControl](/google/cloud/storagecontrol/README.md) - -- samples(storagecontrol): add storagecontrol managed folder samples ([#14356](https://github.com/googleapis/google-cloud-cpp/pull/14356)) -- samples(storagecontrol): add storagecontrol folder samples ([#14332](https://github.com/googleapis/google-cloud-cpp/pull/14332)) - -### [Common Libraries](/google/cloud/README.md) - -- New (experimental) functions to start a LRO (longrunning operation) in one - function call, and then awaiting for the LRO to complete on a separate - function. -- fix(otel): async read stream tracing ([#14393](https://github.com/googleapis/google-cloud-cpp/pull/14393)) -- fix(otel): async write stream tracing ([#14394](https://github.com/googleapis/google-cloud-cpp/pull/14394)) -- feat(otel): capture error message in traces (again) ([#14389](https://github.com/googleapis/google-cloud-cpp/pull/14389)) -- doc: document Start and Await methods and mocks ([#14375](https://github.com/googleapis/google-cloud-cpp/pull/14375)) -- fix(otel): async read write stream tracing ([#14379](https://github.com/googleapis/google-cloud-cpp/pull/14379)) - -### [Google APIs interface definitions](https://github.com/googleapis/googleapis) - -- This release is based on definitions as of [2024-06-24T13:34:42-07:00](https://github.com/googleapis/googleapis/tree/622e10a1e8b2b6908e0ac7448d347a0c1b4130de) - -## v2.25.0 - 2024-06 - -### New Libraries - -We are happy to announce the following GA libraries. Unless specifically noted, -the APIs in these libraries are stable, and are ready for production use. - -- [Public Certificate Authority API](/google/cloud/publicca/README.md) - -### Updated Libraries - -- [KMS](/google/cloud/kms/README.md) - new `AutokeyClient` and - `AutokeyAdminClient` - -### [Pub/Sub](/google/cloud/pubsub/README.md) - -- docs(pubsub): add optimistic subscribe example ([#14272](https://github.com/googleapis/google-cloud-cpp/pull/14272)) - -### [Spanner](/google/cloud/spanner/README.md) - -- feat(spanner): add Interval justification ([#14123](https://github.com/googleapis/google-cloud-cpp/pull/14123)) -- fix(spanner): correct use of Interval offset in Timestamp addition ([#14121](https://github.com/googleapis/google-cloud-cpp/pull/14121)) -- feat(spanner): add Interval/Timestamp/time-zone operations ([#14120](https://github.com/googleapis/google-cloud-cpp/pull/14120)) - -### [Security Center](/google/cloud/securitycenter/README.md) - -- feat(securitycenter): re-enable on windows ([#14282](https://github.com/googleapis/google-cloud-cpp/pull/14282)) - -### [Storage](/google/cloud/storage/README.md) - -- feat(storage): Respect custom endpoint for SignedUrl ([#14179](https://github.com/googleapis/google-cloud-cpp/pull/14179)) - -### [Common Libraries](/google/cloud/README.md) - -- fix(bazel): do not reference repo name ([#14287](https://github.com/googleapis/google-cloud-cpp/pull/14287)) -- fix(common): support libc++ >= 18.1 ([#14151](https://github.com/googleapis/google-cloud-cpp/pull/14151)) -- fix(common): out of range access in handle cleanup ([#14134](https://github.com/googleapis/google-cloud-cpp/pull/14134)) - -### [Google APIs interface definitions](https://github.com/googleapis/googleapis) - -- This release is based on definitions as of [2024-05-22T18:51:58-07:00](https://github.com/googleapis/googleapis/tree/30717c0b0c9966906880703208a4c820411565c4) - -## v2.24.0 - 2024-05 - -### No longer testing with MSVC 2019 - -We have stopped testing with MSVC 2019. Microsoft stopped mainstream support for -MSVC 2019 in -[2024-04](https://learn.microsoft.com/en-us/lifecycle/products/visual-studio-2019). -We continue to test with MSVC 2022. We recommend that you update to this -version. Note that, in accordance with Google's -[Foundational C++ support policy][oss-cxx-support], other Google libraries -have stopped (or shortly will stop) testing with MSVC 2019 too. - -### Updated Libraries - -- [AI Platform API](/google/cloud/aiplatform/README.md) - new - `FeatureRegistryServiceClient` and `GenAiTuningServiceClient` -- [Cloud Dataplex API](/google/cloud/dataplex/README.md) - new - `DataScanServiceClient` and `DataTaxonomyServiceClient` -- [Cloud SQL Admin API](/google/cloud/sql/README.md) - several new clients: - - `SqlAvailableDatabaseVersionsServiceClient` - - `SqlEventsServiceClient` - - `SqlIamPoliciesServiceClient` - - `SqlInstanceNamesServiceClient` - - `SqlRegionsServiceClient` -- [Content Warehouse](/google/cloud/contentwarehouse/README.md) - new - `PipelineServiceClient` -- [Dataproc](/google/cloud/dataproc/README.md) - new `SessionControllerClient` - and `SessionTemplateControllerClient` -- [Dialogflow CX API](/google/cloud/dialogflow_cx/README.md) - new - `GeneratorsClient` -- [Discovery Engine](/google/cloud/discoveryengine/README.md) - several new - clients: - - `DataStoreServiceClient` - - `EngineServiceClient` - - `RecommendationServiceClient` - - `SiteSearchEngineServiceClient` -- [Network Connectivity API](/google/cloud/networkconnectivity/README.md) - new - `PolicyBasedRoutingServiceClient` -- [Retail](/google/cloud/retail/README.md) - new `AnalyticsServiceClient` - -### [Datastore](/google/cloud/datastore/README.md) - -- feat(datastore): emulator environment variable ([#14100](https://github.com/googleapis/google-cloud-cpp/pull/14100)) - -### [Pub/Sub](/google/cloud/pubsub/README.md) - -- fix(pubsub): correctly trace modacks in the unary pull ([#14049](https://github.com/googleapis/google-cloud-cpp/pull/14049)) - -### [Spanner](/google/cloud/spanner/README.md) - -- fix(spanner): avoid absl types in public Interval API ([#14095](https://github.com/googleapis/google-cloud-cpp/pull/14095)) -- feat(spanner): add a representation for the Spanner INTERVAL ([#14059](https://github.com/googleapis/google-cloud-cpp/pull/14059)) -- fix(spanner): delete idle sessions upon SessionPool destruction ([#14012](https://github.com/googleapis/google-cloud-cpp/pull/14012)) - -### [Storage](/google/cloud/storage/README.md) - -- fix(storage): missing include ([#14052](https://github.com/googleapis/google-cloud-cpp/pull/14052)) - -### [Storage Control](/google/cloud/storagecontrol/README.md) - -- docs(storagecontrol): use `GetStorageLayout()` for quickstart ([#14044](https://github.com/googleapis/google-cloud-cpp/pull/14044)) -- docs(storagecontrol): update service title ([#14042](https://github.com/googleapis/google-cloud-cpp/pull/14042)) - -### [Google APIs interface definitions](https://github.com/googleapis/googleapis) - -- This release is based on definitions as of [2024-04-30T21:03:48Z](https://github.com/googleapis/googleapis/tree/5a0ae652df1ef39b7849bf2bd6ba417376ce3204) - -## v2.23.0 - 2024-04 - -### New Libraries - -We are happy to announce the following GA libraries. Unless specifically noted, -the APIs in these libraries are stable, and are ready for production use. - -- [App Hub API](/google/cloud/apphub/README.md) -- [Backup and DR Service API](/google/cloud/backupdr/README.md) -- [Sovereign Controls by Partners](/google/cloud/cloudcontrolspartner/README.md) -- [Cloud Storage Control API](/google/cloud/storagecontrol/README.md) is now GA. - -### Updated Libraries - -- [AI Platform API](/google/cloud/aiplatform/README.md) - new - `NotebookServiceClient` and `PersistentResourceServiceClient` -- [Cloud Dataplex API](/google/cloud/dataplex/README.md) - new - `CatalogServiceClient` -- [Network Services API](/google/cloud/networkservices/README.md) - new - `DepServiceClient` -- [SecurityCenter](/google/cloud/securitycenter/README.md) - add v2 version of the library - -### [Bigtable](/google/cloud/bigtable/README.md) - -- fix(bigtable): respect GOOGLE_CLOUD_CPP_OPENTELEMETRY_TRACING ([#13748](https://github.com/googleapis/google-cloud-cpp/pull/13748)) - -### [Pub/Sub](/google/cloud/pubsub/README.md) - -- docs(pubsub): add kinesis sample ([#13593](https://github.com/googleapis/google-cloud-cpp/pull/13593)) - -### [Spanner](/google/cloud/spanner/README.md) - -- feat(spanner): add ExcludeTransactionFromChangeStreamsOption ([#13898](https://github.com/googleapis/google-cloud-cpp/pull/13898)) -- feat(spanner): add spanner::Value support for TypeCode::FLOAT32 ([#13862](https://github.com/googleapis/google-cloud-cpp/pull/13862)) -- feat(spanner): add samples for proto columns ([#13759](https://github.com/googleapis/google-cloud-cpp/pull/13759)) -- feat(spanner): add integration tests for proto columns ([#13756](https://github.com/googleapis/google-cloud-cpp/pull/13756)) -- feat(spanner): add spanner::Value support for ProtoEnum/ProtoMessage ([#13747](https://github.com/googleapis/google-cloud-cpp/pull/13747)) -- feat(spanner): add representations for the Spanner PROTO/ENUM types ([#13743](https://github.com/googleapis/google-cloud-cpp/pull/13743)) -- feat(spanner): add sample for instance-admin managed autoscaler ([#13740](https://github.com/googleapis/google-cloud-cpp/pull/13740)) - -### [Speech](/google/cloud/speech/README.md) - -- fix(speech): enable location specific connections ([#13757](https://github.com/googleapis/google-cloud-cpp/pull/13757)) - -### [Storage](/google/cloud/storage/README.md) - -- fix(storage): preserve full Status in default creds ([#13897](https://github.com/googleapis/google-cloud-cpp/pull/13897)) -- fix(storage): respect `GOOGLE_CLOUD_CPP_OPENTELEMETRY_TRACING` ([#13766](https://github.com/googleapis/google-cloud-cpp/pull/13766)) -- feat(storage): support HNS-enabled buckets ([#13753](https://github.com/googleapis/google-cloud-cpp/pull/13753)) -- feat(storage): support soft delete timestamps ([#13728](https://github.com/googleapis/google-cloud-cpp/pull/13728)) - -### [Common Libraries](/google/cloud/README.md) - -- feat(common): introduce `FieldMaskOption` ([#13936](https://github.com/googleapis/google-cloud-cpp/pull/13936)) -- docs(common): link to system parameters page ([#13937](https://github.com/googleapis/google-cloud-cpp/pull/13937)) -- feat(common): `QuotaUserOption` for gRPC-based libs ([#13933](https://github.com/googleapis/google-cloud-cpp/pull/13933)) -- fix(common): `clang-cl` needs a `const_cast<>` ([#13891](https://github.com/googleapis/google-cloud-cpp/pull/13891)) -- fix(compute): shorten paths for Bazel+MSVC ([#13836](https://github.com/googleapis/google-cloud-cpp/pull/13836)) -- feat(common): support injecting custom headers ([#13829](https://github.com/googleapis/google-cloud-cpp/pull/13829)) - -## v2.22.0 - 2024-03 - -### New Libraries - -We are happy to announce the following GA libraries. Unless specifically noted, -the APIs in these libraries are stable, and are ready for production use. - -- [Security Center Management API](/google/cloud/securitycentermanagement/README.md) - -### [Bigtable](/google/cloud/bigtable/README.md) - -- feat: promote `EnableServerRetriesOption` ([#13698](https://github.com/googleapis/google-cloud-cpp/pull/13698)) -- feat(bigtable): install mocks library ([#13551](https://github.com/googleapis/google-cloud-cpp/pull/13551)) - -### [Pub/Sub](/google/cloud/pubsub/README.md) - -- docs(pubsub): add doxygen comment to deprecate handwritten apis ([#13585](https://github.com/googleapis/google-cloud-cpp/pull/13585)) - -### [Spanner](/google/cloud/spanner/README.md) - -- feat(spanner): add support for max commit delay ([#13562](https://github.com/googleapis/google-cloud-cpp/pull/13562)) -- feat: install mocks for `spanner`, `sql`, `pubsublite` ([#13548](https://github.com/googleapis/google-cloud-cpp/pull/13548)) - -### [Storage](/google/cloud/storage/README.md) - -- docs(GCS+gRPC): add contact info ([#13688](https://github.com/googleapis/google-cloud-cpp/pull/13688)) -- feat(storage): support listing folders as prefixes ([#13683](https://github.com/googleapis/google-cloud-cpp/pull/13683)) -- feat(storage): support soft-deleted objects ([#13644](https://github.com/googleapis/google-cloud-cpp/pull/13644)) -- feat(storage): support Bucket soft-delete metadata ([#13623](https://github.com/googleapis/google-cloud-cpp/pull/13623)) - -### [Common Libraries](/google/cloud/README.md) - -- feat: cmake option to skip building mock libraries ([#13673](https://github.com/googleapis/google-cloud-cpp/pull/13673)) -- feat(generator): support `request_id`-like fields ([#13615](https://github.com/googleapis/google-cloud-cpp/pull/13615)) -- docs(common): advertise OAuth2 library ([#13614](https://github.com/googleapis/google-cloud-cpp/pull/13614)) - -## v2.21.0 - 2024-02 - -### New Libraries - -We are happy to announce the following GA libraries. Unless specifically noted, -the APIs in these libraries are stable, and are ready for production use. - -- [Personalized Service Health](/google/cloud/servicehealth/README.md) - -### [Bigtable](/google/cloud/bigtable/README.md) - -- feat(bigtable): support bigtable routing cookies ([#13502](https://github.com/googleapis/google-cloud-cpp/pull/13502)) -- feat(bigtable): logging for bulk apply throttling ([#13488](https://github.com/googleapis/google-cloud-cpp/pull/13488)) - -### [Pub/Sub](/google/cloud/pubsub/README.md) - -- fix(pubsub): install admin mocks ([#13537](https://github.com/googleapis/google-cloud-cpp/pull/13537)) -- feat(pubsub): add lease management for unary pull ([#13428](https://github.com/googleapis/google-cloud-cpp/pull/13428)) - -### [Storage](/google/cloud/storage/README.md) - -- feat(storage): support `UniverseDomainOption` ([#13471](https://github.com/googleapis/google-cloud-cpp/pull/13471)) -- docs(GCS+gRPC): better comments for `AsyncConnection` ([#13424](https://github.com/googleapis/google-cloud-cpp/pull/13424)) - -### [Common Libraries](/google/cloud/README.md) - -- feat: support UniverseDomainOption in gRPC IAM stub ([#13466](https://github.com/googleapis/google-cloud-cpp/pull/13466)) -- feat: simplify Bazel initialization ([#13411](https://github.com/googleapis/google-cloud-cpp/pull/13411)) - -## v2.20.0 - 2024-01 - -### New Libraries - -We are happy to announce the following GA libraries. Unless specifically noted, -the APIs in these libraries are stable, and are ready for production use. - -- [Cloud Quotas](/google/cloud/cloudquotas/README.md) - -### [AI Platform/Vertex AI](/google/cloud/aiplatform/README.md) - -- feat(aiplatform): add new service proto file ([#13325](https://github.com/googleapis/google-cloud-cpp/pull/13325)) - -### [Bigtable](/google/cloud/bigtable/README.md) - -- fix(bigtable): use FQDN ([#13305](https://github.com/googleapis/google-cloud-cpp/pull/13305)) - -### [OpenTelemetry](/google/cloud/opentelemetry/README.md) - -- feat(otel): capture gRPC response metadata in traces ([#13278](https://github.com/googleapis/google-cloud-cpp/pull/13278)) - -### [Pub/Sub](/google/cloud/pubsub/README.md) - -- fix(pubsub): get future value before returning ([#13241](https://github.com/googleapis/google-cloud-cpp/pull/13241)) -- fix(pubsub): pass by reference explicitly ([#13220](https://github.com/googleapis/google-cloud-cpp/pull/13220)) - -### [Common Libraries](/google/cloud/README.md) - -- fix(common): returnable argument to `.then()` ([#13316](https://github.com/googleapis/google-cloud-cpp/pull/13316)) -- feat(common): read-write streaming RPCs metadata ([#13228](https://github.com/googleapis/google-cloud-cpp/pull/13228)) -- fix: respect logging format env var in `compute`, `sql` ([#13368](https://github.com/googleapis/google-cloud-cpp/pull/13368)) - -## v2.19.0 - 2023-12 - -### New Libraries - -We are happy to announce the following GA libraries. Unless specifically noted, -the APIs in these libraries are stable, and are ready for production use. - -- [Distributed Cloud Edge Network API](/google/cloud/edgenetwork/README.md) -- [Cloud SQL Admin API](/google/cloud/sql/README.md) -- [Telecom Network Automation API](google/cloud/telcoautomation/README.md) - -### [Bigtable](/google/cloud/bigtable/README.md) - -- feat(bigtable): throttling for AsyncBulkApply ([#13203](https://github.com/googleapis/google-cloud-cpp/pull/13203)) -- fix(bigtable): async context propagation for tracing ([#13156](https://github.com/googleapis/google-cloud-cpp/pull/13156)) -- feat(bigtable): support BulkApply throttling ([#13124](https://github.com/googleapis/google-cloud-cpp/pull/13124)) - -### [OpenTelemetry](/google/cloud/opentelemetry/README.md) - -- feat(otel): add Makefile ([#13177](https://github.com/googleapis/google-cloud-cpp/pull/13177)) -- fix(otel): detach context when single-threaded ([#13154](https://github.com/googleapis/google-cloud-cpp/pull/13154)) -- fix(otel): reconnect async traces (e.g. LROs) ([#13147](https://github.com/googleapis/google-cloud-cpp/pull/13147)) - -### [Spanner](/google/cloud/spanner/README.md) - -- feat: add PG.OID type ([#13127](https://github.com/googleapis/google-cloud-cpp/pull/13127)) -- feat(spanner): control replicas/regions used in non-transactional reads ([#13031](https://github.com/googleapis/google-cloud-cpp/pull/13031)) - -### [Vertex AI](/google/cloud/aiplatform/README.md) - -- feat(aiplatform): generate new services ([#13150](https://github.com/googleapis/google-cloud-cpp/pull/13150)) - -### [Common Libraries](/google/cloud/README.md) - -- fix(common): use FQDN for the metadata service ([#13139](https://github.com/googleapis/google-cloud-cpp/pull/13139)) -- feat(common): add GrpcCompressionAlgorithmOption ([#13108](https://github.com/googleapis/google-cloud-cpp/pull/13108)) -- doc: fix cliffhanger ([#13033](https://github.com/googleapis/google-cloud-cpp/pull/13033)) - -## v2.18.0 - 2023-11 - -### New Libraries - -We are happy to announce the following GA libraries. Unless specifically noted, -the APIs in these libraries are stable, and are ready for production use. - -- [Secure Source Manager](/google/cloud/securesourcemanager/README.md) - -### [Compute Engine](/google/cloud/compute/README.md) - -- fix(compute): `RegionSecurityPoliciesClient::PatchSecurityPolicy` added - `update_mask` field. - -### [Memorystore for Redis](/google/cloud/redis/README.md) - -New `CloudRedisClusterClient`. - -### [OpenTelemetry](/google/cloud/opentelemetry/README.md) - -- doc(otel): add packaging instructions - ([#13005](https://github.com/googleapis/google-cloud-cpp/pull/13005)) -- fix(otel): end async client spans properly - ([#12919](https://github.com/googleapis/google-cloud-cpp/pull/12919)) -- fix(otel): support abseil \<= 20210324 - ([#12993](https://github.com/googleapis/google-cloud-cpp/pull/12993)) -- - -### [Spanner](/google/cloud/spanner/README.md) - -- feat(spanner): single-RPC, batched commit of mutation groups - ([#12930](https://github.com/googleapis/google-cloud-cpp/pull/12930)) - -### [Common Libraries](/google/cloud/README.md) - -- feat(common): mock for `AsyncStreamingReadWriteRpc` - ([#12950](https://github.com/googleapis/google-cloud-cpp/pull/12950)) -- fix(common): missed using `CARootsFilePathOption` - ([#12997](https://github.com/googleapis/google-cloud-cpp/pull/12997)) -- fix(generator): do not override default sleeper in streaming-read RPCs - ([#12920](https://github.com/googleapis/google-cloud-cpp/pull/12920)) - -### Other Changes - -- fix(oauth2): only enable via `GOOGLE_CLOUD_CPP_ENABLE` - ([#12911](https://github.com/googleapis/google-cloud-cpp/pull/12911)) When - compiling with CMake, the `oauth2` used to be automatically enabled if - `GOOGLE_CLOUD_CPP_REST` was manually enabled or enabled by a separate library. - That made it impossible to shard a build with separate builds for `oauth2`, - `storage` and `compute`. - -## v2.17.0 - 2023-10 - -### [Compute Engine](/google/cloud/compute/README.md) - -- fix(compute): build with Bazel and MSVC - ([#12877](https://github.com/googleapis/google-cloud-cpp/pull/12877)) -- fix(compute): usable in external Bazel projects - ([#12864](https://github.com/googleapis/google-cloud-cpp/pull/12864)) -- fix(compute): add missing bazelrc file - ([#12856](https://github.com/googleapis/google-cloud-cpp/pull/12856)) - -### [Storage](/google/cloud/storage/README.md) - -- feat(storage): another Bucket CRUD field - ([#12842](https://github.com/googleapis/google-cloud-cpp/pull/12842)) -- fix(storage): fix tellg() values - ([#12844](https://github.com/googleapis/google-cloud-cpp/pull/12844)) -- fix(storage): check ReadObject options at runtime - ([#12841](https://github.com/googleapis/google-cloud-cpp/pull/12841)) -- feat(storage): `MatchGlob` for `ListObjects()` - ([#12840](https://github.com/googleapis/google-cloud-cpp/pull/12840)) -- doc(storage): describe default project search - ([#12833](https://github.com/googleapis/google-cloud-cpp/pull/12833)) - -### [Common Libraries](/google/cloud/README.md) - -- fix(oauth2): do not require `id_token` in creds - ([#12867](https://github.com/googleapis/google-cloud-cpp/pull/12867)) - -### Other Changes - -**We have stopped testing with GCC 7.5.0 on openSUSE/Leap:** this distro uses -GCC 7.5.0 by default. This specific version of GCC crashes when compiling some -of the files generated by Protobuf 24.x. In other distros we test with GCC 7.3, -without problems. And we also test with newer versions of GCC without problems. -The exact files that cause the compiler to crash seem to change with minor -changes in Protobuf or the input `.proto` files, making it difficult to maintain -some kind of exclusion list. - -We have stopped testing with GCC 7.5.0 on openSUSE/Leap, and recommend you use -GCC >= 8 to compile `google-cloud-cpp`. If you must compile with GCC 7.5.0, -consider only enabling the libraries you will need. - -## v2.16.0 - 2023-10 - -### New Libraries - -We are happy to announce the following GA libraries. Unless specifically noted, -the APIs in these libraries are stable, and are ready for production use. - -- [Compute Engine](/google/cloud/compute/README.md) -- [Infrastructure Manager](/google/cloud/config/README.md) -- [NetApp](/google/cloud/netapp/README.md) - -### [Discovery Engine](/google/cloud/discoveryengine/README.md) - -New `*Client` for conversational search. - -### [OAuth2](/google/cloud/oauth2/README.md) - -- feat(oauth2): add quickstart, README, etc. - ([#12754](https://github.com/googleapis/google-cloud-cpp/pull/12754)) - -### [OpenTelemetry](/google/cloud/opentelemetry/README.md) - -We instrumented the Google Cloud C++ libraries for [distributed tracing] using -[OpenTelemetry]. All client libraries are instrumented in some capacity. - -Features to enable the collection and export of these traces are now GA. See the -[quickstart][otel-quickstart] within the library to learn more about these -tools. - -### [Policy Troubleshooter](/google/cloud/policytroubleshooter/README.md) - -Remove `PoliciesClient`. This client was placed in the wrong library. The -correct location is google/cloud/iam/v2. - -### [Storage](/google/cloud/storage/README.md) - -- fix(storage): trace auth when default credentials are assumed - ([#12672](https://github.com/googleapis/google-cloud-cpp/pull/12672)) -- docs(storage): more on InsertObject vs. WriteObject - ([#12577](https://github.com/googleapis/google-cloud-cpp/pull/12577)) - -### [Common Libraries](/google/cloud/README.md) - -- feat(common): new `*Option` to configure HTTP proxy - ([#12766](https://github.com/googleapis/google-cloud-cpp/pull/12766)) -- fix: export headers with top-level Bazel targets - ([#12762](https://github.com/googleapis/google-cloud-cpp/pull/12762)) -- fix: gRPC auth logging enabled by "auth" - ([#12702](https://github.com/googleapis/google-cloud-cpp/pull/12702)) -- fix: add implicit routing in GAPICs - ([#12544](https://github.com/googleapis/google-cloud-cpp/pull/12544)) - -### Known issues - -Compiling gRPC with Bazel and Clang >= 16 requires `--features=-layering_check` -in your Bazel command-line. For more details, see [grpc#34482]. - -## v2.15.0 - 2023-09 - -### New Libraries - -We are happy to announce the following GA libraries. Unless specifically noted, -the APIs in these libraries are stable, and are ready for production use. - -- [Datastore](/google/cloud/datastore/README.md) -- [Discovery Engine API](/google/cloud/discoveryengine/README.md) -- [Policy Simulator](/google/cloud/policysimulator/README.md) -- [Policy Troubleshooter](/google/cloud/policytroubleshooter/README.md) - -### Cloud IoT - -The Cloud IoT Core service has been [shutdown][cloud-iot-shutdown]. We removed -the corresponding C++ client library as it is no longer usable. - -### [BeyondCorp API](google/cloud/beyondcorp/README.md) - -Parts of the BeyondCorp API are restricted to only existing customers and will -be decommissioned. No C++ customers are affected, so we are removing the -unusable components from the C++ libraries. More information in the BeyondCorp -[announcement](https://cloud.google.com/beyondcorp-enterprise/docs/release-notes#March_31_2023). - -### [Natural Language AI](/google/cloud/language/README.md) - -We expanded the library to include the `v2` version of the API. - -### [Notebooks](/google/cloud/notebooks/README.md) - -We expanded the library to include the `v2` version of the API. - -### [Pub/Sub](/google/cloud/pubsub/README.md) - -- fix(pubsub): url encode routing params on publish - ([#12454](https://github.com/googleapis/google-cloud-cpp/pull/12454)) -- feat(pubsub): increase backoff from 1.3 to 4.0 - ([#12306](https://github.com/googleapis/google-cloud-cpp/pull/12306)) - -### [Spanner](/google/cloud/spanner/README.md) - -- feat(spanner): enable leader aware routing by default - ([#12319](https://github.com/googleapis/google-cloud-cpp/pull/12319)) - -### [Storage](/google/cloud/storage/README.md) - -- fix(storage): tracing should decorate retries - ([#12314](https://github.com/googleapis/google-cloud-cpp/pull/12314)) - -### [Common Libraries](/google/cloud/README.md) - -- fix: URL encode explicit routing values - ([#12493](https://github.com/googleapis/google-cloud-cpp/pull/12493)) - ([#12447](https://github.com/googleapis/google-cloud-cpp/pull/12447)) -- feat(common): add `Options::set<>() &&` overload - ([#12424](https://github.com/googleapis/google-cloud-cpp/pull/12424)) -- fix(common): gRPC alarms require more locking - ([#12406](https://github.com/googleapis/google-cloud-cpp/pull/12406)) -- feat(common): retry loops preserve original message - ([#12368](https://github.com/googleapis/google-cloud-cpp/pull/12368)) -- feat(otel): control tracing with environment variable - ([#11897](https://github.com/googleapis/google-cloud-cpp/pull/11897)) -- docs(otel): troubleshoot exporter doc - ([#12345](https://github.com/googleapis/google-cloud-cpp/pull/12345)) -- docs(otel): build quickstart with vcpkg - ([#12324](https://github.com/googleapis/google-cloud-cpp/pull/12324)) -- feat(common): retry loops signal via error info - ([#12313](https://github.com/googleapis/google-cloud-cpp/pull/12313)) -- fix(common): handle expired policies in `*RetryLoop` - ([#12301](https://github.com/googleapis/google-cloud-cpp/pull/12301)) - -### Other Changes - -**Bazel Testing**: from v2.15.0 we will only test with Bazel >= 6.0.0. We do not -consider this a breaking change, as Bazel 5.x has been in maintenance mode for -more than 6 months. - -**CMake Proto Libraries**: We only compile service-specific protos if the -corresponding client library is enabled, via `-DGOOGLE_CLOUD_CPP_ENABLE=...`. - -This change reduces build times for customers who use CMake but who are not -using **all** of the client libraries listed below. - -We considered it [a bug][#8022] that customers building with CMake were forced -to compile large proto libraries that they did not need. It was certainly -[confusing][#10174]. - -Any change in behavior, including fixing bugs, can be considered "breaking". By -policy we don't consider bug fixes to be breaking changes. We applied that -policy in this case. - -The impacted libraries are: - -- `bigquery` -- `bigtable` -- `dialogflow_es` -- `iam` -- `logging` -- `pubsub` -- `speech` -- `storage` -- `texttospeech` -- `trace` - -If you are dependent on any of these proto libraries **and** you are not -compiling the corresponding client library, you will need to update your build -scripts. - -For example, if you depend on `google_cloud_cpp_speech_protos` (e.g., if you -have been using this library to make calls to Cloud Speech using raw gRPC), add -`-DGOOGLE_CLOUD_CPP_ENABLE=...,speech,...` to your CMake configure command. If -you build with `vcpkg`, include `speech` in your install command. - -Note that `google_cloud_cpp_storage_protos` are associated with the -`experimental-storage_grpc` feature, not the `storage` feature. - -## v2.14.0 - 2023-08 - -### New Libraries - -We are happy to announce the following GA libraries. Unless specifically noted, -the APIs in these libraries are stable, and are ready for production use. - -- [Commerce](/google/cloud/commerce/README.md) - -### [Bigtable](/google/cloud/bigtable/README.md) - -- docs(bigtable): document `DataRetryPolicy` - ([#12040](https://github.com/googleapis/google-cloud-cpp/pull/12040)) -- feat(bigtable): reverse scans - ([#12022](https://github.com/googleapis/google-cloud-cpp/pull/12022)) - -### [Channel Services](/google/cloud/channel/README.md) - -The library has been expanded to include the Reporting API. - -### [Cloud Build](/google/cloud/cloudbuild/README.md) - -- feat(cloudbuild): promote 2nd gen (repositories) API to GA - ([#12236](https://github.com/googleapis/google-cloud-cpp/pull/12236)) - -### [Cloud Functions](/google/cloud/functions/README.md) - -The library has been expanded to include the [2nd gen][functions-v2] API. - -### [Cloud Monitoring](/google/cloud/monitoring/README.md) - -The library has been expanded to include the [Snooze][monitoring-snooze] API. - -### [Cloud Run](/google/cloud/run/README.md) - -The library has been expanded to include the [Job Executions][cloud-run-jobs] -API. - -### [Compute Engine OS Config](/google/cloud/osconfig/README.md) - -The library has been expanded to include the Zonal OS Config API. - -### [Data Catalog](/google/cloud/datcatalog/README.md) - -- feat(datacatalog): promote `datalineage` to GA - ([#12271](https://github.com/googleapis/google-cloud-cpp/pull/12271)) - -### [Dataproc](/google/cloud/dataproc/README.md) - -The library has been expanded to include the [Node Groups][dataproc-node-groups] -API. - -### [Logging](/google/cloud/logging/README.md) - -The library has been expanded to include the -[Log-based Metrics][logging-metrics] API and the [Log Router][logging-config] -API. - -### [Pub/Sub](/google/cloud/pubsub/README.md) - -- docs(pubsub): add cloud storage subscription sample - ([#12088](https://github.com/googleapis/google-cloud-cpp/pull/12088)) -- docs(pubsub): add unwrapped subscription sample - ([#12090](https://github.com/googleapis/google-cloud-cpp/pull/12090)) -- docs(pubsub): add a subscriber quickstart - ([#12053](https://github.com/googleapis/google-cloud-cpp/pull/12053)) -- docs(pubsub): document `RetryPolicy` interface - ([#12030](https://github.com/googleapis/google-cloud-cpp/pull/12030)) - -### [Retail](/google/cloud/retail/README.md) - -The library has been expanded to include new services. - -### [Resource Manager](/google/cloud/resourcemanager/README.md) - -The library has been expanded to include the [Tags][resource-manager-tags] API. - -### [Spanner](/google/cloud/spanner/README.md) - -- feat(spanner): samples for bit-reversed sequence - ([#12280](https://github.com/googleapis/google-cloud-cpp/pull/12280)) -- doc(spanner): mark obsolete Spanner options classes as deprecated - ([#12256](https://github.com/googleapis/google-cloud-cpp/pull/12256)) -- doc(spanner): Improve documentation for ActionOnExhaustion - ([#12238](https://github.com/googleapis/google-cloud-cpp/pull/12238)) -- doc(spanner): add documentation/sample for TransactionRerunPolicy - ([#12140](https://github.com/googleapis/google-cloud-cpp/pull/12140)) -- feat(spanner): tests and samples for foreign-key delete cascade - ([#12122](https://github.com/googleapis/google-cloud-cpp/pull/12122)) -- docs(spanner): document `RetryPolicy` interface - ([#12037](https://github.com/googleapis/google-cloud-cpp/pull/12037)) - -### [Speech](/google/cloud/speech/README.md) - -The library has been expanded to include the -[Model Adaptation][speech-model-adaptation] API. - -### [Storage](/google/cloud/storage/README.md) - -- docs(storage): document `RetryPolicy` interface - ([#12031](https://github.com/googleapis/google-cloud-cpp/pull/12031)) - -### [Common Libraries](/google/cloud/README.md) - -- fix(common): add missing library on Windows - ([#12103](https://github.com/googleapis/google-cloud-cpp/pull/12103)) -- fix(common): avoid run-time conflicts on Windows - ([#12105](https://github.com/googleapis/google-cloud-cpp/pull/12105)) -- feat(oauth2): new library to create oauth2 tokens - ([#12064](https://github.com/googleapis/google-cloud-cpp/pull/12064)) -- feat: support split packages - ([#12049](https://github.com/googleapis/google-cloud-cpp/pull/12049)) - -## v2.13.0 - 2023-07 - -### New Libraries - -We are happy to announce the following GA libraries. Unless specifically noted, -the APIs in these libraries are stable, and are ready for production use. - -- [Cloud Data Fusion](/google/cloud/datafusion/README.md) -- [Dataproc Metastore](/google/cloud/metastore/README.md) -- [Migration Center](google/cloud/migrationcenter/README.md) -- [Rapid Migration Assessment](/google/cloud/rapidmigrationassessment/README.md) -- [Secure Web Proxy](/google/cloud/networksecurity/README.md) - -### [Batch](/google/cloud/batch/README.md) - -- docs: an example to extract Cloud Batch logs - ([#11935](https://github.com/googleapis/google-cloud-cpp/pull/11935)) -- docs(batch): introduce basic snippets - ([#11915](https://github.com/googleapis/google-cloud-cpp/pull/11915)) - -### [Spanner](/google/cloud/spanner/README.md) - -- doc(spanner): add an example for CommitAtLeastOnce() - ([#11905](https://github.com/googleapis/google-cloud-cpp/pull/11905)) -- feat(spanner): implement at-least-once Commit - ([#11899](https://github.com/googleapis/google-cloud-cpp/pull/11899)) - -### [Common Libraries](/google/cloud/README.md) - -- feat(generator): separate page for retry policy overrides - ([#11950](https://github.com/googleapis/google-cloud-cpp/pull/11950)) -- fix(common): pagination must support empty pages - ([#11937](https://github.com/googleapis/google-cloud-cpp/pull/11937)) -- feat(generator): create retry policy samples - ([#11930](https://github.com/googleapis/google-cloud-cpp/pull/11930)) -- fix(common): use 64-bit API on Windows to get file sizes - ([#11906](https://github.com/googleapis/google-cloud-cpp/pull/11906)) - -## v2.12.0 - 2023-06 - -### New Libraries - -We are happy to announce the following GA libraries. Unless specifically noted, -the APIs in these libraries are stable, and are ready for production use. - -- [Content Warehouse](/google/cloud/contentwarehouse/README.md) -- [Cloud Domains](/google/cloud/domains/README.md) -- [Essential Contacts](/google/cloud/essentialcontacts/README.md) -- [reCAPTCHA Enterprise](/google/cloud/recaptchaenterprise/README.md) -- [Timeseries Insights](/google/cloud/timeseriesinsights/README.md) -- [Traffic Director](/google/cloud/networkservices/README.md) -- [Vertex AI](/google/cloud/aiplatform/README.md) - -### Cloud Debugger - -The Cloud Debugger service (aka Stackdriver Debugger API) has been -[shutdown][cloud-debugger-deprecated]. The corresponding client library has been -removed. - -### [BigQuery](/google/cloud/bigquery/README.md) - -This library has been expanded to include the BigLake API -([#11882](https://github.com/googleapis/google-cloud-cpp/pull/11882)) - -### [Pub/Sub](/google/cloud/pubsub/README.md) - -- doc(pubsub): add new samples for schemas - ([#11872](https://github.com/googleapis/google-cloud-cpp/pull/11872)) - ([#11848](https://github.com/googleapis/google-cloud-cpp/pull/11848)) - ([#11840](https://github.com/googleapis/google-cloud-cpp/pull/11840)) - -### [Common Libraries](/google/cloud/README.md) - -- docs: use c.g.com/cpp mocking guide - ([#11869](https://github.com/googleapis/google-cloud-cpp/pull/11869)) -- docs: link reference docs at c.g.c/cpp/docs/reference - ([#11799](https://github.com/googleapis/google-cloud-cpp/pull/11799)) -- fix(generator): correct URL for reference docs - ([#11765](https://github.com/googleapis/google-cloud-cpp/pull/11765)) - -## v2.11.0 - 2023-06 - -### New Libraries - -We are happy to announce the following GA libraries. Unless specifically noted, -the APIs in these libraries are stable, and are ready for production use. - -- [Cloud Support API](/google/cloud/support/README.md) - -### [Bigtable](/google/cloud/bigtable/README.md) - -- docs(bigtable): async Table APIs are stable - ([#11711](https://github.com/googleapis/google-cloud-cpp/pull/11711)) -- doc(bigtable): deprecate DataClient in doxygen - ([#11550](https://github.com/googleapis/google-cloud-cpp/pull/11550)) - -### [Cloud Asset](/google/cloud/asset/README.md) - -The library has been re-enabled on Windows. See -[#11714](https://github.com/googleapis/google-cloud-cpp/issues/11714) for -details. - -### [Spanner](/google/cloud/spanner/README.md) - -- docs(spanner): some documentation tweaks - ([#11641](https://github.com/googleapis/google-cloud-cpp/pull/11641)) -- feat(spanner): tests and samples for drop-database protection - ([#11637](https://github.com/googleapis/google-cloud-cpp/pull/11637)) -- feat(spanner): make `ResultSourceInterface` public - ([#11636](https://github.com/googleapis/google-cloud-cpp/pull/11636)) - -### [Storage](/google/cloud/storage/README.md) - -- fix(storage): consistent project id overrides - ([#11754](https://github.com/googleapis/google-cloud-cpp/pull/11754)) -- feat(storage): better error messages in signed URLs - ([#11741](https://github.com/googleapis/google-cloud-cpp/pull/11741)) -- feat(storage): offer mock client without decorators - ([#11697](https://github.com/googleapis/google-cloud-cpp/pull/11697)) -- feat(storage): lazy allocation for upload buffer - ([#11633](https://github.com/googleapis/google-cloud-cpp/pull/11633)) - -### [Storage Transfer Service](/google/cloud/storagetransfer/README.md) - -The library has been re-enabled on macOS. See -[#8785](https://github.com/googleapis/google-cloud-cpp/issues/8785) for details. - -### [Common Libraries](/google/cloud/README.md) - -- feat: use full jitter exp backoff policy in the generator - ([#11748](https://github.com/googleapis/google-cloud-cpp/pull/11748)) -- feat: add new constructor for exponential backoff policy - ([#11650](https://github.com/googleapis/google-cloud-cpp/pull/11650)) -- feat: avoid development dependencies with Bazel - ([#11724](https://github.com/googleapis/google-cloud-cpp/pull/11724)) -- docs(common): better exception descriptions - ([#11705](https://github.com/googleapis/google-cloud-cpp/pull/11705)) -- fix(rest): support rewinds in libcurl - ([#11703](https://github.com/googleapis/google-cloud-cpp/pull/11703), - [#11709](https://github.com/googleapis/google-cloud-cpp/pull/11709)) -- fix: workaround curl_multi_poll returning an error on EINTR - ([#11649](https://github.com/googleapis/google-cloud-cpp/pull/11649)) -- docs(common): improve `StatusOr<>` documentation - ([#11631](https://github.com/googleapis/google-cloud-cpp/pull/11631)) -- fix: Correct exponential backoff ranges - ([#11529](https://github.com/googleapis/google-cloud-cpp/pull/11529)) -- fix: patch releases do not change the ABI - ([#11499](https://github.com/googleapis/google-cloud-cpp/pull/11499)) -- fix(rest): missing user-agent separator - ([#11473](https://github.com/googleapis/google-cloud-cpp/pull/11473)) - -## v2.10.0 - 2023-05 - -### New Libraries - -We are happy to announce the following GA libraries. Unless specifically noted, -the APIs in these libraries are stable, and are ready for production use. - -- [ConfidentialComputing API](/google/cloud/confidentialcomputing/README.md) -- [Storage Insights API](/google/cloud/storageinsights/README.md) -- [Workstations API](/google/cloud/workstations/README.md) - -The following experimental libraries are now available: - -- [Cloud SQL Admin API](/google/cloud/sql/README.md) - -### [Bigquery](/google/cloud/bigquery/README.md) - -- Removed bigquery/v2/model\*. There are no plans to implement gRPC endpoints - for this service. Therefore the generated code will never be usable and never - has been. - -### [Service Control](/google/cloud/servicecontrol/README.md) - -The library has been expanded to include the v2 service. - -### [Spanner](/google/cloud/spanner/README.md) - -- fix(spanner): propagate Options through SessionPool callbacks - ([#11344](https://github.com/googleapis/google-cloud-cpp/pull/11344)) - -### [Storage](/google/cloud/storage/README.md) - -- fix(storage): cache legacy credentials - ([#11271](https://github.com/googleapis/google-cloud-cpp/pull/11271)) -- fix(storage): support per-request options - ([#11445](https://github.com/googleapis/google-cloud-cpp/pull/11445)) -- fix(storage): cache all credential types - ([#11447](https://github.com/googleapis/google-cloud-cpp/pull/11447)) - -### [Common Libraries](/google/cloud/README.md) - -- doc: declutter main.dox pages - ([#11405](https://github.com/googleapis/google-cloud-cpp/pull/11405)) -- doc(common): documentation improvements - ([#11376](https://github.com/googleapis/google-cloud-cpp/pull/11376)) - -### Other Changes - -**Bazel Testing**: after v2.10.0 we will only test with Bazel >= 5.4.0. We do -not consider this a breaking change, as Bazel 4.x has been in maintenance mode -for several months. - -## v2.9.0 - 2023-04 - -### [Cloud Build](/google/cloud/cloudbuild/README.md) - -The library has been expanded to include the Cloud Build repositories (2nd gen) -API. Note that the client is tagged as experimental, because the service is -still in [preview][product-launch-stages]. - -### [Cloud Trace](/google/cloud/trace/README.md) - -The library has been expanded to include the v1 service. - -### [IAM](/google/cloud/iam/README.md) - -- fix(iam): override idempotency on idempotent POST methods - ([#11045](https://github.com/googleapis/google-cloud-cpp/pull/11045)) - -### [Spanner](/google/cloud/spanner/README.md) - -- feat(spanner): add the final pieces for the RouteToLeaderOption - ([#11112](https://github.com/googleapis/google-cloud-cpp/pull/11112)) -- feat(spanner): support "data boost" on partitioned queries and reads - ([#10998](https://github.com/googleapis/google-cloud-cpp/pull/10998)) - -### [Storage](/google/cloud/storage/README.md) - -- feat(storage): reduce copies in `InsertObject()` - ([#11014](https://github.com/googleapis/google-cloud-cpp/pull/11014)) - -### [Common Libraries](/google/cloud/README.md) - -- feat: consume less entropy for PRNG - ([#11102](https://github.com/googleapis/google-cloud-cpp/pull/11102)) -- feat(mocks): provide access to call options in client tests - ([#11050](https://github.com/googleapis/google-cloud-cpp/pull/11050)) - -### Testing - -We have stopped testing with MSVC 2017. Microsoft stopped mainstream support for -MSVC 2017 in -[2022-04](https://learn.microsoft.com/en-us/lifecycle/products/visual-studio-2017). -We continue to test with MSVC 2022 and MSVC 2019. We recommend that you update -to one of these versions to use more recent versions of the `google-cloud-cpp` -libraries. Note that, in accordance with Google's -[Foundational C++ support policy][oss-cxx-support], the other Google libraries -have stopped (or shortly will stop) testing with MSVC 2017. - -## v2.8.0 - 2023-03 - -### New Libraries - -We are happy to announce the following GA libraries. Unless specifically noted, -the APIs in these libraries are stable, and are ready for production use. - -- [Advisory Notifications](/google/cloud/advisorynotifications/README.md) -- [Alloy DB](/google/cloud/alloydb/README.md) -- [API Keys](/google/cloud/apikeys/README.md) - -### [Bigtable](/google/cloud/bigtable/README.md) - -- fix(bigtable): retries for CheckConsistency / AsyncWaitForConsistency - ([#10955](https://github.com/googleapis/google-cloud-cpp/pull/10955)) -- docs(bigtable): clean up CreateTable sample - ([#10844](https://github.com/googleapis/google-cloud-cpp/pull/10844)) - -### [Data Catalog](/google/cloud/datacatalog/README.md) - -- feat(datacatalog): generate lineage library - ([#10977](https://github.com/googleapis/google-cloud-cpp/pull/10977)) - -### [KMS](/google/cloud/kms/README.md) - -The library has been expanded to include the KMS Inventory API. - -### [Pub/Sub](/google/cloud/pubsub/README.md) - -- fix(pubsub): no warnings on `ack()/nack()` success - ([#10920](https://github.com/googleapis/google-cloud-cpp/pull/10920)) -- fix(pubsub): fewer default threads for 32-bit builds - ([#10793](https://github.com/googleapis/google-cloud-cpp/pull/10793)) - -### [TPU](/google/cloud/tpu/README.md) - -The library has been expanded to include the TPU v2 API. - -### [Common Libraries](/google/cloud/README.md) - -We have introduced versioned clients for many services. The version is that of -the GCP service. While this naming convention is more verbose, it allows us to -support clients for multiple versions of a GCP service from within the same -library (e.g. `speech_v1::SpeechClient` and `speech_v2::SpeechClient`). See -[#10170] for more details. - -- fix: retries for GetIamPolicy, TestIamPermissions - ([#10957](https://github.com/googleapis/google-cloud-cpp/pull/10957)) -- doc: improve description for "terminate" group - ([#10950](https://github.com/googleapis/google-cloud-cpp/pull/10950)) -- fix(common): fewer spurious warnings in the log - ([#10811](https://github.com/googleapis/google-cloud-cpp/pull/10811)) - -## v2.7.0 - 2023-02 - -### New Libraries - -We are happy to announce the following GA libraries. Unless specifically noted, -the APIs in these libraries are stable, and are ready for production use. - -- [Anthos Multi-Cloud API](/google/cloud/gkemulticloud/README.md) - -### [Pub/Sub](/google/cloud/pubsub/README.md) - -- Replaced the wrappers for [google.pubsub.v1.SchemaServiceClient] with - automatically generated code. Our telemetry indicates that there are no C++ - applications using this code, and therefore we do not consider this a breaking - change. - -### [Common Libraries](/google/cloud/README.md) - -- fix reference links in documentation - ([#10687](https://github.com/googleapis/google-cloud-cpp/pull/10687), - [#10684](https://github.com/googleapis/google-cloud-cpp/pull/10687)) -- fix: interface proto libraries work with older CMake - ([#10636](https://github.com/googleapis/google-cloud-cpp/pull/10636)) -- fix(common): missing Abseil deps in pkgconfig - ([#10616](https://github.com/googleapis/google-cloud-cpp/pull/10616)) -- doc: declutter generated README files - ([#10562](https://github.com/googleapis/google-cloud-cpp/pull/10562)) -- doc(common): in-depth guide for `StatusOr` - ([#10555](https://github.com/googleapis/google-cloud-cpp/pull/10555)) -- doc: remove boilerplate from landing page snippet - ([#10537](https://github.com/googleapis/google-cloud-cpp/pull/10537)) -- doc(common): use real Doxygen groups - ([#10504](https://github.com/googleapis/google-cloud-cpp/pull/10504)) -- fix(generator): correct doxygen comments - ([#10500](https://github.com/googleapis/google-cloud-cpp/pull/10500)) - -## v2.6.0 - 2023-01 - -### [BigQuery](/google/cloud/bigquery/README.md) - -The library has been expanded to include the following services: - -- [BigQuery Data Policy API](https://cloud.google.com/bigquery/docs/column-data-masking-intro) - -### [IAM](/google/cloud/iam/README.md) - -The library has been expanded to include the IAM v2 API. This API includes -support for [IAM Deny](https://cloud.google.com/iam/docs/deny-overview) -policies. - -### [Pub/Sub](/google/cloud/pubsub/README.md) - -- fix: add missing includes - ([#10421](https://github.com/googleapis/google-cloud-cpp/pull/10421)) - -### [Speech](/google/cloud/speech/README.md) - -- fix: remove duplicate protos - ([#10486](https://github.com/googleapis/google-cloud-cpp/pull/10486)) - -### [Storage](/google/cloud/storage/README.md) - -- fix(storage): better error code for CreateBucket() and 409 errors - ([#10480](https://github.com/googleapis/google-cloud-cpp/pull/10480) -- fix: add missing includes - ([#10421](https://github.com/googleapis/google-cloud-cpp/pull/10421)) -- fix(storage): scopes should disable self-signed JWTs - ([#10369](https://github.com/googleapis/google-cloud-cpp/pull/10369)) -- doc(storage): document all `oauth2` names as deprecated - ([#10352](https://github.com/googleapis/google-cloud-cpp/pull/10352)) - -### [Text-to-Speech](/google/cloud/texttospeech/README.md) - -- fix: remove duplicate protos - ([#10486](https://github.com/googleapis/google-cloud-cpp/pull/10486)) - -### [Trace](/google/cloud/trace/README.md) - -- fix: remove duplicate protos - ([#10486](https://github.com/googleapis/google-cloud-cpp/pull/10486)) - -### [Common Libraries](/google/cloud/README.md) - -- fix: add missing includes - ([#10421](https://github.com/googleapis/google-cloud-cpp/pull/10421)) -- feat(common): support external accounts - ([#10465](https://github.com/googleapis/google-cloud-cpp/pull/10465)) - ([#10430](https://github.com/googleapis/google-cloud-cpp/pull/10430)) - ([#10357](https://github.com/googleapis/google-cloud-cpp/pull/10357)) -- feat(common): options for `Make*Credentials()` - ([#10417](https://github.com/googleapis/google-cloud-cpp/pull/10417)) -- feat: support logging for unified Rest credentials - ([#10412](https://github.com/googleapis/google-cloud-cpp/pull/10412)) - -## v2.5.0 - 2022-12 - -**NOTE** - -- feat!: We have dropped the experimental marker from bidirectional streaming - APIs ([#10340](https://github.com/googleapis/google-cloud-cpp/pull/10340)). - The APIs in question are: - - `bigquery::BigQueryWriteClient::AsyncAppendRows()` - - `dialogflow_cx::SessionsClient::AsyncStreamingDetectIntent()` - - `dialogflow_es::ParticipantsClient::AsyncStreamingAnalyzeContent()` - - `dialogflow_es::SessionsClient::AsyncStreamingDetectIntent()` - - `logging::LoggingServiceV2Client::AsyncTailLogEntries()` - - `speech::SpeechClient::AsyncStreamingRecognize()` - -If you use any of these APIs, you must drop the `ExperimentalTag` in your code, -accordingly. - -### New Libraries - -We are happy to announce the following GA library. Unless specifically noted, -the APIs in these libraries are stable, and are ready for production use. - -- [Connectors API](/google/cloud/connectors/README.md) -- [VMware Engine API](/google/cloud/vmwareengine/README.md) - -### [Bigtable](/google/cloud/bigtable/README.md) - -- samples(bigtable): build admin samples with cmake - ([#10246](https://github.com/googleapis/google-cloud-cpp/pull/10246)) -- doc(bigtable): create page for configuration options - ([#10197](https://github.com/googleapis/google-cloud-cpp/pull/10197)) - -### [Logging](/google/cloud/logging/README.md) - -- feat(logging): generate `AsyncWriteLogEntries()` - ([#10194](https://github.com/googleapis/google-cloud-cpp/pull/10194)) - -### [Pub/Sub](/google/cloud/pubsub/README.md) - -- feat(pubsub): add option to override subscription - ([#10327](https://github.com/googleapis/google-cloud-cpp/pull/10327)) -- feat(pubsub): blocking pulls - ([#10317](https://github.com/googleapis/google-cloud-cpp/pull/10317)) -- doc(pubsub): create page for configuration options - ([#10198](https://github.com/googleapis/google-cloud-cpp/pull/10198)) - -### [Spanner](/google/cloud/spanner/README.md) - -- doc(spanner): deprecate old MakeConnection() overloads - ([#10284](https://github.com/googleapis/google-cloud-cpp/pull/10284)) -- fix(spanner): tweak the tag name of a FGAC sample - ([#10266](https://github.com/googleapis/google-cloud-cpp/pull/10266)) -- samples(spanner): build admin samples with cmake - ([#10247](https://github.com/googleapis/google-cloud-cpp/pull/10247)) -- feat(spanner): tests and samples for DML RETURNING - ([#10233](https://github.com/googleapis/google-cloud-cpp/pull/10233)) -- doc(spanner): create page for configuration options - ([#10199](https://github.com/googleapis/google-cloud-cpp/pull/10199)) - -### [Speech](/google/cloud/speech/README.md) - -- feat(speech): generate speech v2 - ([#10228](https://github.com/googleapis/google-cloud-cpp/pull/10228)) - -### [Storage](/google/cloud/storage/README.md) - -- doc(storage): create page for configuration options - ([#10200](https://github.com/googleapis/google-cloud-cpp/pull/10200)) - -### [Common Libraries](/google/cloud/README.md) - -- doc: another pass on authentication components - ([#10300](https://github.com/googleapis/google-cloud-cpp/pull/10300)) -- fix(common): create default gRPC credentials only if needed - ([#10280](https://github.com/googleapis/google-cloud-cpp/pull/10280)) -- doc: group client functions - ([#10268](https://github.com/googleapis/google-cloud-cpp/pull/10268)) -- doc: use qualified client name in samples - ([#10241](https://github.com/googleapis/google-cloud-cpp/pull/10241)) -- fix(common): avoid globals for easier DLLs - ([#10212](https://github.com/googleapis/google-cloud-cpp/pull/10212)) -- feat: support a pre-release component of the version string - ([#10181](https://github.com/googleapis/google-cloud-cpp/pull/10181)) -- doc(common): add Doxygen group for common options - ([#10192](https://github.com/googleapis/google-cloud-cpp/pull/10192)) -- doc(common): add overview section - ([#10193](https://github.com/googleapis/google-cloud-cpp/pull/10193)) -- doc: better guidance for authentication samples - ([#10184](https://github.com/googleapis/google-cloud-cpp/pull/10184)) - -## v2.4.0 - 2022-11 - -### New Libraries - -We are happy to announce the following GA libraries. Unless specifically noted, -the APIs in these libraries are stable, and are ready for production use. - -- [Certificate Manager API](/google/cloud/certificatemanager/README.md) -- [Cloud Deploy API](/google/cloud/deploy/README.md) -- [Datastream API](/google/cloud/datastream/README.md) - -In addition, these existing libraries are now GA: - -- [Cloud Batch](/google/cloud/batch/README.md) - -### [BigQuery](/google/cloud/bigquery/README.md) - -- doc: add endpoint override snippets to generated libs - ([#10129](https://github.com/googleapis/google-cloud-cpp/pull/10129)) -- feat(bigquery): add migration service - ([#10034](https://github.com/googleapis/google-cloud-cpp/pull/10034)) - -### [Bigtable](/google/cloud/bigtable/README.md) - -- doc(bigtable): add `*Client` samples - ([#10149](https://github.com/googleapis/google-cloud-cpp/pull/10149)) -- feat(bigtable): support `GOOGLE_CLOUD_ENABLE_DIRECT_PATH` - ([#9978](https://github.com/googleapis/google-cloud-cpp/pull/9978)) - -### [IAM](/google/cloud/iam/README.md) - -- doc: add endpoint override snippets to generated libs - ([#10129](https://github.com/googleapis/google-cloud-cpp/pull/10129)) - -### [Pub/Sub](/google/cloud/pubsub/README.md) - -- doc(pubsub): samples for endpoint and auth - ([#10136](https://github.com/googleapis/google-cloud-cpp/pull/10136)) -- feat(pubsub): install pubsub_mocks pkg - ([#10008](https://github.com/googleapis/google-cloud-cpp/pull/10008)) -- feat(pubsub): implement blocking publisher - ([#10055](https://github.com/googleapis/google-cloud-cpp/pull/10055)) -- feat(pubsub): implement per-call options for `Subscriber` - ([#10043](https://github.com/googleapis/google-cloud-cpp/pull/10043)) -- fix(pubsub): limit `ModifyAckDeadlineRequest` size - ([#10032](https://github.com/googleapis/google-cloud-cpp/pull/10032)) -- fix(pubsub): faster shutdowns for `Publisher` - ([#9991](https://github.com/googleapis/google-cloud-cpp/pull/9991)) - -### [Spanner](/google/cloud/spanner/README.md) - -- doc(spanner): add `*Client` samples - ([#10145](https://github.com/googleapis/google-cloud-cpp/pull/10145)) -- feat(spanner): add support for RowStream::RowsModified() - ([#10102](https://github.com/googleapis/google-cloud-cpp/pull/10102)) -- feat(spanner): support for the PG.JSONB data type - ([#10098](https://github.com/googleapis/google-cloud-cpp/pull/10098)) - -### [Storage](/google/cloud/storage/README.md) - -- doc(storage): common initialization examples - ([#10107](https://github.com/googleapis/google-cloud-cpp/pull/10107)) -- fix(rest): too many debug headers - ([#10054](https://github.com/googleapis/google-cloud-cpp/pull/10054)) -- fix(rest): return complete payloads for errors - ([#10051](https://github.com/googleapis/google-cloud-cpp/pull/10051)) -- feat(storage): support `Autoclass` feature - ([#10003](https://github.com/googleapis/google-cloud-cpp/pull/10003)) -- feat(storage): faster `InsertObject()` uploads - ([#9997](https://github.com/googleapis/google-cloud-cpp/pull/9997)) -- fix(storage): respect MIME message boundary size limits - ([#9965](https://github.com/googleapis/google-cloud-cpp/pull/9965)) - -### [Common Libraries](/google/cloud/README.md) - -- feat(generator): generate authentication example - ([#10138](https://github.com/googleapis/google-cloud-cpp/pull/10138)) -- doc: workaround Doxygen formatting quirk - ([#10137](https://github.com/googleapis/google-cloud-cpp/pull/10137)) -- doc: add endpoint override snippets to generated libs - ([#10129](https://github.com/googleapis/google-cloud-cpp/pull/10129)) -- feat(generator): generate simple samples for `*Client` - ([#10118](https://github.com/googleapis/google-cloud-cpp/pull/10118)) -- feat: add mock library w/ StreamRange - ([#9998](https://github.com/googleapis/google-cloud-cpp/pull/9998)) -- doc(common): make authentication docs easier to find - ([#10110](https://github.com/googleapis/google-cloud-cpp/pull/10110)) -- fix: configure context in async retries - ([#10100](https://github.com/googleapis/google-cloud-cpp/pull/10100)) -- doc: document when GrpcNumChannelsOption applies - ([#10000](https://github.com/googleapis/google-cloud-cpp/pull/10000)) -- feat(generator): make idempotency policy non-abstract - ([#9981](https://github.com/googleapis/google-cloud-cpp/pull/9981)) -- fix(common): preserve `ErrorInfo` on retry errors - ([#9971](https://github.com/googleapis/google-cloud-cpp/pull/9971)) - -## v2.3.0 - 2022-10 - -### New Libraries - -We are happy to announce the following GA libraries. Unless specifically noted, -the APIs in these libraries are stable, and are ready for production use. - -- [Distributed Cloud Edge Container API](/google/cloud/edgecontainer/README.md) -- [Network Connectivity API](/google/cloud/networkconnectivity/README.md) - -### [BigQuery](/google/cloud/bigquery/README.md) - -The library has been expanded to include [Analytics Hub][bq-analytics-hub], an -API that facilitates data sharing within and across organizations. -([#9882](https://github.com/googleapis/google-cloud-cpp/pull/9882)) - -### [Spanner](/google/cloud/spanner/README.md) - -- fix(spanner): remove session from pool upon "not found" refresh failure - ([#9954](https://github.com/googleapis/google-cloud-cpp/pull/9954)) -- feat(spanner): add support for Customer Managed Multi-Region (CMMR) read-only - replicas at instance creation time - ([#9872](https://github.com/googleapis/google-cloud-cpp/pull/9872)) - -### [Storage](/google/cloud/storage/README.md) - -- feat(storage): easier mocks for `HmacKeyMetadata` - ([#9949](https://github.com/googleapis/google-cloud-cpp/pull/9949)) -- feat(storage): easier mocks for `*AccessControl` - ([#9910](https://github.com/googleapis/google-cloud-cpp/pull/9910)) -- feat(storage): easier mocks with `ObjectMetadata` - ([#9899](https://github.com/googleapis/google-cloud-cpp/pull/9899)) -- fix(storage): decay type before testing supported-options membership - ([#9893](https://github.com/googleapis/google-cloud-cpp/pull/9893)) -- feat(storage): easier mocks with `BucketMetadata` - ([#9886](https://github.com/googleapis/google-cloud-cpp/pull/9886)) -- fix(storage): error message for resumable uploads - ([#9855](https://github.com/googleapis/google-cloud-cpp/pull/9855)) -- feat(storage): release `*StallMinimumThroughputOption` - ([#9813](https://github.com/googleapis/google-cloud-cpp/pull/9813)) -- fix(storage): no workaround needed with libc++ and MSVC - ([#9768](https://github.com/googleapis/google-cloud-cpp/pull/9768)) - -### [Common Libraries](/google/cloud/README.md) - -- fix(common): better defaults for curl initialization - ([#9798](https://github.com/googleapis/google-cloud-cpp/pull/9798)) - -## v2.2.0 - 2022-09 - -### New Libraries - -We are introducing new client libraries for GCP services. While we do not -anticipate any API changes to these libraries before declaring them GA, we are -releasing them early in case they elicit some feedback that requires changes. - -- [API Keys](/google/cloud/apikeys/README.md) - -We are happy to announce the following GA libraries. Unless specifically noted, -the APIs in these libraries are stable, and are ready for production use. - -
- Expand to see the full list of new GA libraries... -
- -- [Bare Metal Solution](/google/cloud/baremetalsolution/README.md) -- [Beyond Corp](/google/cloud/beyondcorp/README.md) -- [Optimization AI](/google/cloud/optimization/README.md) -- [Cloud Run](/google/cloud/run/README.md) -- [Video Services](/google/cloud/video/README.md) - -
- -### [Bigtable](/google/cloud/bigtable/README.md) - -- fix(bigtable): `DataConnection` refreshes channels - ([#9718](https://github.com/googleapis/google-cloud-cpp/pull/9718)) -- fix(bigtable): Use retry policy on all streams with failing mutations - ([#9706](https://github.com/googleapis/google-cloud-cpp/pull/9706)) -- feat(bigtable): per-operation Options - ([#9627](https://github.com/googleapis/google-cloud-cpp/pull/9627)) - ([#9623](https://github.com/googleapis/google-cloud-cpp/pull/9623)) - -### [Dataproc](/google/cloud/dataproc/README.md) - -- feat(dataproc): mark the dataproc services as location dependent - ([#9722](https://github.com/googleapis/google-cloud-cpp/pull/9722)) - -### [Spanner](/google/cloud/spanner/README.md) - -- feat(spanner): fine-grained access control - ([#9669](https://github.com/googleapis/google-cloud-cpp/pull/9669)) -- feat(spanner): equality for copyable classes - ([#9648](https://github.com/googleapis/google-cloud-cpp/pull/9648)) - -### [Storage](/google/cloud/storage/README.md) - -- We have a new implementation for HTTP requests. This new implementation - provides comparable download performance, and improves some uploads. See - [#9659] for details. We have rigorously tested this new implementation. In the - unlikely event that this new implementation breaks your application, we have - included an environment variable to revert to the legacy implementation. Set - `GOOGLE_CLOUD_CPP_STORAGE_USE_LEGACY_HTTP` to any value to use the legacy - implementation. We are planning to remove the legacy code and the - `GOOGLE_CLOUD_CPP_STORAGE_USE_LEGACY_HTTP` environment variable by 2022-12. -- feat(storage): improve error messages on stalled uploads - ([#9744](https://github.com/googleapis/google-cloud-cpp/pull/9744)) -- feat(storage): equality for Native IAM types - ([#9649](https://github.com/googleapis/google-cloud-cpp/pull/9649)) -- feat(storage): SA credentials default to self-signed JWTs - ([#9629](https://github.com/googleapis/google-cloud-cpp/pull/9629)) - -### [Common Libraries](/google/cloud/README.md) - -- feat: group GUAC `Options` in an `OptionsList` - ([#9643](https://github.com/googleapis/google-cloud-cpp/pull/9643)) -- fix(rest): cache credentials - ([#9620](https://github.com/googleapis/google-cloud-cpp/pull/9620)) -- doc: add table of contents to landing page - ([#9671](https://github.com/googleapis/google-cloud-cpp/pull/9671)) - -## v2.1.0 - 2022-08 - -### New Libraries - -We are introducing new client libraries for GCP services. While we do not -anticipate any API changes to these libraries before declaring them GA, we are -releasing them early in case they elicit some feedback that requires changes. - -- [Batch](/google/cloud/batch/README.md) - ([#9474](https://github.com/googleapis/google-cloud-cpp/pull/9474)) -- [Beyond Corp](/google/cloud/beyondcorp/README.md) - ([#9555](https://github.com/googleapis/google-cloud-cpp/pull/9555)) -- [Cloud Run](/google/cloud/run/README.md) - ([#9460](https://github.com/googleapis/google-cloud-cpp/pull/9460)) - -### [Assured Workloads](/google/cloud/assuredworkloads/README.md) - -- fix(assuredworkloads): reenable on windows - ([#9467](https://github.com/googleapis/google-cloud-cpp/pull/9467)) - -### [Bigtable](/google/cloud/bigtable/README.md) - -- fix(bigtable): the mocks library is no longer header-only - ([#9568](https://github.com/googleapis/google-cloud-cpp/pull/9568)) - -### [Cloud Asset](/google/cloud/asset/README.md) - -- fix(asset): reenable on macOS - ([#9468](https://github.com/googleapis/google-cloud-cpp/pull/9468)) - -### [Pub/Sub](/google/cloud/pubsub/README.md) - -- fix(pubsub): missing subscription name in lease extensions - ([#9523](https://github.com/googleapis/google-cloud-cpp/pull/9523)) -- feat(pubsub): exactly-once delivery - ([#9436](https://github.com/googleapis/google-cloud-cpp/pull/9436)) - -### [Spanner](/google/cloud/spanner/README.md) - -- fix(spanner): avoid evaluation-order issue in function arguments - ([#9452](https://github.com/googleapis/google-cloud-cpp/pull/9452)) - -### [Stackdriver Debugger](/google/cloud/debugger/README.md) - -- doc(debugger): announce deprecation - ([#9552](https://github.com/googleapis/google-cloud-cpp/pull/9552)) - -### [Storage](/google/cloud/storage/README.md) - -- feat(storage): experimental options to tune stall timeouts - ([#9593](https://github.com/googleapis/google-cloud-cpp/pull/9593)) -- feat(storage): add debugging headers to `ObjectWriteStream` - ([#9580](https://github.com/googleapis/google-cloud-cpp/pull/9580)) -- fix(storage): no char for `std::uniform_int_distribution` - ([#9509](https://github.com/googleapis/google-cloud-cpp/pull/9509)) -- feat(storage): support Bucket custom placement config - ([#9481](https://github.com/googleapis/google-cloud-cpp/pull/9481)) - -### [Common Libraries](/google/cloud/README.md) - -- feat(common): make the RPC log even more readable - ([#9561](https://github.com/googleapis/google-cloud-cpp/pull/9561)) -- feat: improve error messages for access token errors - ([#9485](https://github.com/googleapis/google-cloud-cpp/pull/9485)) -- feat(common): make the RPC log even more readable - ([#9477](https://github.com/googleapis/google-cloud-cpp/pull/9477)) - -## v2.0.0 - 2022-07 +## v3.0.0 - 2026-02 **BREAKING CHANGES** -As previously announced, `google-cloud-cpp` now requires C++ >= 14. This is -motivated by similar changes in our dependencies, and because C++ 14 has been +As previously announced, `google-cloud-cpp` now requires C++ >= 17. This is +motivated by similar changes in our dependencies, and because C++ 17 has been the default C++ version in all the compilers we support for several years. We think this change is large enough that deserves a major version bump to -signal the new requirements. - -If you are already using C++ >= 14 you need to make no changes. If you are using -C++11: please consider updating as soon as possible. To ease your transition to -C++ >= 14 we will, if requested, backport critical fixes to v1.42.0 until -2023-07-01. After 2023-07-01 we will drop all support to v1.42.0 and earlier -versions. - -**Debian 9 (Stretch) is EOL** - -Debian 9 (Stretch) reached EOL on 2022-06-30. Therefore, we have stopped testing -or supporting this distribution. This was the last distribution we supported -that required GCC \< 7.3, and/or CMake \< 3.10. Starting with this release we -require CMake >= 3.10, and only test with GCC >= 7.3. - -**OTHER CHANGES** - -### [Bigtable](/google/cloud/bigtable/README.md) - -We introduced a [new constructor][modern-table-ctor] for `Table` which accepts a -`DataConnection` instead of a `DataClient`. The `DataConnection` is a new -interface that more closely matches the client surface of `Table`. Read more -about `*Connection` classes in our -[Architecture Design][architecture-connection] document. - -#### What are the benefits of `DataConnection`? - -The new API greatly simplifies mocking. Every `Table::Foo(..)` call has an -associated `DataConnection::Foo(...)` call. This allows you to set expectations -on the exact values returned by the client call. See -[Mocking the Cloud Bigtable C++ Client][howto-mock-data-api] for a complete -example on how to mock the behavior of `Table` with -`bigtable_mocks::MockDataConnection`. - -The new `DataConnection` API offers more consistency across our libraries. It -also enables the use of some common library features, such as our -[`UnifiedCredentialsOption`][guac-dox]. Also, any new features will be added to -the `DataConnection` API first. - -#### Do I need to update my code? - -No. If the benefits are not appealing enough, you do not need to update your -code. All code that currently uses `DataClient` will continue to function as -before. This includes uses of `testing::MockDataClient`. - -However, if you are using `testing::MockDataClient` to mock the behavior of -`Table` in your tests: - -1. Be aware that we have announced our intention to remove classes derived from - `DataClient` on or around 2023-05. Your tests will break then. -1. Please consider using `bigtable_mocks::MockDataConnection`. It will greatly - simplify your tests. - -#### How do I update existing `DataClient` code? - -See [Migrating from `DataClient` to `DataConnection`][cbt-dataclient-migration]. - -- doc(bigtable): how to mock the Data API - ([#9415](https://github.com/googleapis/google-cloud-cpp/pull/9415)) -- feat(bigtable): modern `Table` constructor - ([#9403](https://github.com/googleapis/google-cloud-cpp/pull/9403)) -- feat(generator): support explicit routing headers - ([#9368](https://github.com/googleapis/google-cloud-cpp/pull/9368)) -- fix(bigtable)!: pass app profile id to connection as options - ([#9388](https://github.com/googleapis/google-cloud-cpp/pull/9388)) -- feat(bigtable): add `AppProfileIdOption` - ([#9382](https://github.com/googleapis/google-cloud-cpp/pull/9382)) -- feat(bigtable): table resource name as a class - ([#9377](https://github.com/googleapis/google-cloud-cpp/pull/9377)) -- feat(bigtable): instance name as a class - ([#9374](https://github.com/googleapis/google-cloud-cpp/pull/9374)) -- feat(bigtable): introduce `MockDataConnection` and `MakeTestRowReader` - ([#9335](https://github.com/googleapis/google-cloud-cpp/pull/9335)) -- feat(bigtable): introduce `DataConnection` - ([#9323](https://github.com/googleapis/google-cloud-cpp/pull/9323)) -- feat(bigtable): modern Data API policy options - ([#9320](https://github.com/googleapis/google-cloud-cpp/pull/9320)) - -### [Pub/Sub](/google/cloud/pubsub/README.md) - -- doc(pubsub): improve documentation for `*AckHandler` - ([#9404](https://github.com/googleapis/google-cloud-cpp/pull/9404)) -- feat(pubsub): update subscription builders - ([#9326](https://github.com/googleapis/google-cloud-cpp/pull/9326)) - -### [Common Libraries](/google/cloud/README.md) - -- fix(generator): handle explicit routing params for nested fields - ([#9408](https://github.com/googleapis/google-cloud-cpp/pull/9408)) -- feat(common): truncation support for plain strings in the RPC log - ([#9351](https://github.com/googleapis/google-cloud-cpp/pull/9351)) - -### New Libraries - -We are introducing a new client library. While we do not anticipate any API -changes to this library before declaring it GA, we are releasing it early in -case it elicits some feedback that requires changes. - -- [Video Services](/google/cloud/video/README.md) +signal the new requirements. Additionally, we have decommissioned previously +deprecated API features and have also made some previously optional dependencies +required. -[#10170]: https://github.com/googleapis/google-cloud-cpp/issues/10170 -[#10174]: https://github.com/googleapis/google-cloud-cpp/discussions/10174 -[#8022]: https://github.com/googleapis/google-cloud-cpp/issues/8022 -[#9659]: https://github.com/googleapis/google-cloud-cpp/issues/9659 -[architecture-connection]: /ARCHITECTURE.md#the-connection-classes -[bq-analytics-hub]: https://cloud.google.com/bigquery/docs/analytics-hub-introduction -[cbt-dataclient-migration]: https://cloud.google.com/cpp/docs/reference/bigtable/latest/migrating-from-dataclient -[cloud-debugger-deprecated]: https://cloud.google.com/debugger/docs/deprecations -[cloud-iot-shutdown]: https://cloud.google.com/iot/docs/release-notes#August_16_2022 -[cloud-run-jobs]: https://cloud.google.com/run/docs/managing/job-executions -[dataproc-node-groups]: https://cloud.google.com/dataproc/docs/guides/node-groups/dataproc-driver-node-groups -[distributed tracing]: https://opentelemetry.io/docs/concepts/observability-primer/#distributed-traces -[functions-v2]: https://cloud.google.com/functions/docs/concepts/version-comparison -[google.pubsub.v1.schemaserviceclient]: https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#google.pubsub.v1.SchemaService -[grpc#34482]: https://github.com/grpc/grpc/issues/34482 -[guac-dox]: https://cloud.google.com/cpp/docs/reference/common/latest/group__guac -[howto-mock-data-api]: https://cloud.google.com/cpp/docs/reference/bigtable/latest/bigtable-mocking -[logging-config]: https://cloud.google.com/logging/docs/routing/overview -[logging-metrics]: https://cloud.google.com/logging/docs/logs-based-metrics -[modern-table-ctor]: https://github.com/googleapis/google-cloud-cpp/blob/62740c8e9180056db77d4dd3e80a6fa7ae71295a/google/cloud/bigtable/table.h#L182-L214 -[monitoring-snooze]: https://cloud.google.com/monitoring/alerts/snooze -[opentelemetry]: https://opentelemetry.io/ -[oss-cxx-support]: https://opensource.google/documentation/policies/cplusplus-support -[otel-quickstart]: https://github.com/googleapis/google-cloud-cpp/blob/main/google/cloud/opentelemetry/quickstart -[product-launch-stages]: https://cloud.google.com/products/#product-launch-stages -[resource-manager-tags]: https://cloud.google.com/resource-manager/docs/tags/tags-overview -[speech-model-adaptation]: https://cloud.google.com/speech-to-text/docs/adaptation-model -[storage-grpc]: https://cloud.google.com/cpp/docs/reference/storage/latest/storage-grpc +**NOTE**: Please refer to the [V3 Migration Guide](/doc/v3-migration-guide.md) +for details on updating existing applications using v1.x.y or v2.x.y. diff --git a/CMakeLists.txt b/CMakeLists.txt index 0686e9d93d664..67ef46f187833 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,16 +14,16 @@ # limitations under the License. # ~~~ -cmake_minimum_required(VERSION 3.13...3.24) +cmake_minimum_required(VERSION 3.22...3.31) # Define the project name and where to report bugs. set(PACKAGE_BUGREPORT "https://github.com/googleapis/google-cloud-cpp/issues") project( google-cloud-cpp - VERSION 2.48.0 + VERSION 3.1.0 LANGUAGES CXX) -set(PROJECT_VERSION_PRE_RELEASE "rc") +set(PROJECT_VERSION_PRE_RELEASE "") if (NOT "${PROJECT_VERSION_PRE_RELEASE}" STREQUAL "") set(PROJECT_VERSION "${PROJECT_VERSION}-${PROJECT_VERSION_PRE_RELEASE}") @@ -54,20 +54,12 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") " We will consider patches for older versions.") endif () elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0) + if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14.0.0) message( WARNING - "The `google-cloud-cpp` library is tested with Clang >= 6.0." + "The `google-cloud-cpp` library is tested with Clang >= 14.0.0." " We will consider patches for older versions.") endif () -elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") - if (CMAKE_VERSION VERSION_LESS 3.15) - message( - FATAL_ERROR - "MSVC builds require CMake >= 3.15." - " Previous versions of CMake lack a standard mechanism to" - " select the runtime C++ library.") - endif () endif () list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) @@ -97,6 +89,10 @@ if (APPLE " cmake -DGOOGLE_CLOUD_CPP_ENABLE_MACOS_OPENSSL_CHECK=OFF ...") endif () +if (WIN32) + add_definitions(-DNOMINMAX) +endif () + # If ccache is installed use it for the build. option(GOOGLE_CLOUD_CPP_ENABLE_CCACHE "Automatically use ccache if available" OFF) diff --git a/MODULE.bazel b/MODULE.bazel index 75833d3397a17..bd7460ee00bd9 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -16,35 +16,35 @@ module( name = "google_cloud_cpp", - version = "2.48.0-rc", # Updated by CMake - compatibility_level = 2, # Updated by CMake + version = "3.1.0", # Updated by CMake + compatibility_level = 3, # Updated by CMake ) bazel_dep(name = "platforms", version = "1.0.0") bazel_dep(name = "bazel_skylib", version = "1.8.2") -bazel_dep(name = "rules_cc", version = "0.1.4") -bazel_dep(name = "abseil-cpp", version = "20240722.1", repo_name = "com_google_absl") -bazel_dep(name = "protobuf", version = "29.4", repo_name = "com_google_protobuf") -bazel_dep(name = "boringssl", version = "0.0.0-20230215-5c22014") -bazel_dep(name = "grpc", version = "1.69.0", repo_name = "com_github_grpc_grpc") -bazel_dep(name = "nlohmann_json", version = "3.11.3", repo_name = "com_github_nlohmann_json") -bazel_dep(name = "curl", version = "8.8.0.bcr.3", repo_name = "com_github_curl_curl") -bazel_dep(name = "crc32c", version = "1.1.0", repo_name = "com_github_google_crc32c") -bazel_dep(name = "opentelemetry-cpp", version = "1.19.0", repo_name = "io_opentelemetry_cpp") +bazel_dep(name = "rules_cc", version = "0.2.14") +bazel_dep(name = "abseil-cpp", version = "20250814.1") + +# For backwards compatibility with WORKSPACE. +# The name "com_google_protobuf" is internally used by @bazel_tools, +# a native repository we cannot override. +# See https://github.com/googleapis/google-cloud-cpp/issues/15393 +bazel_dep(name = "protobuf", version = "33.1", repo_name = "com_google_protobuf") +bazel_dep(name = "boringssl", version = "0.20251124.0") +bazel_dep(name = "nlohmann_json", version = "3.12.0.bcr.1") +bazel_dep(name = "curl", version = "8.8.0.bcr.3") +bazel_dep(name = "opentelemetry-cpp", version = "1.24.0") bazel_dep(name = "rules_proto", version = "7.1.0") bazel_dep(name = "rules_python", version = "1.6.3") +bazel_dep(name = "rules_apple", version = "4.3.2") +bazel_dep(name = "googletest", version = "1.17.0.bcr.2") -bazel_dep(name = "googletest", version = "1.15.2", dev_dependency = True, repo_name = "com_google_googletest") -bazel_dep(name = "google_benchmark", version = "1.9.2", dev_dependency = True, repo_name = "com_google_benchmark") +bazel_dep(name = "google_benchmark", version = "1.9.4", dev_dependency = True, repo_name = "com_google_benchmark") bazel_dep(name = "yaml-cpp", version = "0.8.0", dev_dependency = True, repo_name = "com_github_jbeder_yaml_cpp") bazel_dep(name = "pugixml", version = "1.15", dev_dependency = True, repo_name = "com_github_zeux_pugixml") -# Our `curl.BUILD` file uses these. -bazel_dep(name = "zlib", version = "1.3.1.bcr.7") -bazel_dep(name = "c-ares", version = "1.19.1.bcr.1", repo_name = "com_github_cares_cares") - # Pin this to fix a break in bazel/deps-cache.py -bazel_dep(name = "protoc-gen-validate", version = "1.2.1.bcr.1", dev_dependency = True, repo_name = "com_envoyproxy_protoc_gen_validate") +bazel_dep(name = "protoc-gen-validate", version = "1.2.1.bcr.2", dev_dependency = True, repo_name = "com_envoyproxy_protoc_gen_validate") python = use_extension("@rules_python//python/extensions:python.bzl", "python") python.toolchain( @@ -52,21 +52,7 @@ python.toolchain( python_version = "3.11", ) -bazel_dep(name = "googleapis", version = "0.0.0", repo_name = "com_google_googleapis") -archive_override( - module_name = "googleapis", - integrity = "sha256-aMghCWZ8iStllThbKtd8E0J1L5mGZOttBVUJ7K3cMVA=", - patch_strip = 1, - patches = ["//bazel:googleapis.modules.patch"], - strip_prefix = "googleapis-c0fcb35628690e9eb15dcefae41c651c67cd050b", - urls = [ - "https://github.com/googleapis/googleapis/archive/c0fcb35628690e9eb15dcefae41c651c67cd050b.tar.gz", - ], -) - -switched_rules = use_extension("@com_google_googleapis//:extensions.bzl", "switched_rules") -switched_rules.use_languages( - cc = True, - grpc = True, -) -use_repo(switched_rules, "com_google_googleapis_imports") +bazel_dep(name = "grpc", version = "1.76.0.bcr.1") +bazel_dep(name = "googleapis", version = "0.0.0-20260130-c0fcb356") +bazel_dep(name = "googleapis-cc", version = "1.0.0") +bazel_dep(name = "googleapis-grpc-cc", version = "1.0.0") diff --git a/README.md b/README.md index 015c9d3bbca35..8cd44876c6272 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,9 @@ This repository contains idiomatic C++ client libraries for the following [Google Cloud Platform](https://cloud.google.com/) services. +> Please refer to the [V3 Migration Guide](/doc/v3-migration-guide.md) for +> details on updating existing applications using v1.x.y or v2.x.y. + > Please check the [CHANGELOG] for important announcements and upcoming changes. ## Quickstart @@ -583,8 +586,8 @@ run the examples included with the libraries. ### Building with Bazel -This library requires Bazel >= 6.0. From the top-level directory, run the usual -commands. +This library requires Bazel >= 7.0. We recommend using Bazel modules instead of +WORKSPACE files. From the top-level directory, run the usual commands. ```shell bazel build //... @@ -592,7 +595,7 @@ bazel build //... ### Building with CMake -This library requires CMake >= 3.10. If you are planning to install the +This library requires CMake >= 3.22. If you are planning to install the libraries please consult the [packaging guide](/doc/packaging.md), these instructions will **NOT** produce artifacts that you can put in `/usr/local`, or share with your colleagues. @@ -613,11 +616,11 @@ The binary artifacts, such as examples, will be placed in `cmake-out/`. - This project follows Google's [Foundational C++ Support Policy][support-policy], which is summarized in the [Foundational C++ Support Matrix][support-matrix]. - - Language Version (>= C++14). + - Language Version (>= C++17). - Operating Systems: Windows, macOS, and Linux. - - Build Systems: Bazel (>= 6.0), CMake (>= 3.10). - - Compilers: GCC (>= 7.5), Clang (>= 6.0), MSVC (>= 2022), Apple Clang (>= - 12). + - Build Systems: Bazel (>= 7.0), CMake (>= 3.22). + - Compilers: GCC (>= 7.5), Clang (>= 14.0.0), MSVC (>= 2022), Apple Clang (>= + 17). - This project uses dependencies described in [doc/packaging.md](https://github.com/googleapis/google-cloud-cpp/blob/main/doc/packaging.md). - This project works with or without exceptions enabled. diff --git a/bazel/gapic.bzl b/bazel/gapic.bzl index ef02cb7d259d6..e78adf9ce5cc7 100644 --- a/bazel/gapic.bzl +++ b/bazel/gapic.bzl @@ -38,23 +38,23 @@ def cc_gapic_library(name, service_dirs = [], googleapis_deps = [], additional_d native.filegroup( name = "srcs", - srcs = native.glob(sources_glob), + srcs = native.glob(sources_glob, allow_empty = True), ) native.filegroup( name = "hdrs", - srcs = native.glob(include = code_glob, exclude = sources_glob), + srcs = native.glob(include = code_glob, exclude = sources_glob, allow_empty = True), ) native.filegroup( name = "public_hdrs", - srcs = native.glob([d + "*.h" for d in service_dirs]), + srcs = native.glob([d + "*.h" for d in service_dirs], allow_empty = True), visibility = ["//:__pkg__"], ) native.filegroup( name = "mocks", - srcs = native.glob([d + "mocks/*.h" for d in service_dirs]), + srcs = native.glob([d + "mocks/*.h" for d in service_dirs], allow_empty = True), visibility = ["//:__pkg__"], ) @@ -72,7 +72,7 @@ def cc_gapic_library(name, service_dirs = [], googleapis_deps = [], additional_d visibility = ["//:__pkg__"], deps = [ ":google_cloud_cpp_" + name, - "@com_google_googletest//:gtest", + "@googletest//:gtest", ], ) @@ -85,4 +85,4 @@ def cc_gapic_library(name, service_dirs = [], googleapis_deps = [], additional_d "//:universe_domain", "//google/cloud/testing_util:google_cloud_cpp_testing_private", ], - ) for sample in native.glob([d + "samples/*_samples.cc" for d in service_dirs])] + ) for sample in native.glob([d + "samples/*_samples.cc" for d in service_dirs], allow_empty = True)] diff --git a/bazel/googleapis.modules.patch b/bazel/googleapis.modules.patch deleted file mode 100644 index 51f110379f4a5..0000000000000 --- a/bazel/googleapis.modules.patch +++ /dev/null @@ -1,137 +0,0 @@ -diff --git a/BUILD.bazel b/BUILD.bazel -index 026553f5c7..f3c6b6925c 100644 ---- a/BUILD.bazel -+++ b/BUILD.bazel -@@ -1,11 +1,13 @@ -+package(default_visibility = ["//visibility:public"]) -+ -+licenses(["notice"]) # Apache 2.0 -+ - genrule( -- name = "build_gen", -- srcs = glob( -- ["run_build_gen.sh"], -- allow_empty = True, -- ), -- outs = ["build_gen.sh"], -- cmd = """ -+ name = "build_gen", -+ outs = ["build_gen.sh"], -+ executable = True, -+ srcs = glob(["run_build_gen.sh"], allow_empty=True), -+ cmd = """ - if test -z \"$(SRCS)\"; then - cat < $@ - #!/bin/sh -@@ -17,5 +19,17 @@ EOD - cp $(SRCS) $@ - fi - """, -- executable = True, - ) -+ -+# This build file overlays on top of the BUILD files for the googleapis repo, -+# and it adds a target that lets us include their header files using -+# angle-brackets, thus treating their headers as system includes. This allows -+# us to dial-up the warnings in our own code, without seeing compiler warnings -+# from their headers, which we do not own. -+cc_library( -+ name = "googleapis_system_includes", -+ includes = [ -+ ".", -+ ], -+) -+ -diff --git a/MODULE.bazel b/MODULE.bazel -new file mode 100644 -index 000000000..169133e43 ---- /dev/null -+++ b/MODULE.bazel -@@ -0,0 +1,14 @@ -+module( -+ name = "googleapis", -+ version = "0.0.0-20240326-1c8d509c5", -+ repo_name = "com_google_googleapis", -+) -+ -+bazel_dep(name = "grpc", version = "1.63.1.bcr.1", repo_name = "com_github_grpc_grpc") -+bazel_dep(name = "protobuf", version = "21.7", repo_name = "com_google_protobuf") -+bazel_dep(name = "rules_proto", version = "5.3.0-21.7") -+ -+switched_rules = use_extension("//:extensions.bzl", "switched_rules") -+ -+switched_rules.use_languages() -+use_repo(switched_rules, "com_google_googleapis_imports") -diff --git a/WORKSPACE.bzlmod b/WORKSPACE.bzlmod -new file mode 100644 -index 000000000..8cf3fe396 ---- /dev/null -+++ b/WORKSPACE.bzlmod -@@ -0,0 +1,2 @@ -+workspace(name = "com_google_googleapis") -+ -diff --git a/extensions.bzl b/extensions.bzl -new file mode 100644 -index 000000000..9aa161841 ---- /dev/null -+++ b/extensions.bzl -@@ -0,0 +1,59 @@ -+load(":repository_rules.bzl", "switched_rules_by_language") -+ -+_use_languages_tag = tag_class( -+ attrs = { -+ "cc": attr.bool(default = False), -+ "csharp": attr.bool(default = False), -+ "gapic": attr.bool(default = False), -+ "go": attr.bool(default = False), -+ "go_test": attr.bool(default = False), -+ "grpc": attr.bool(default = False), -+ "java": attr.bool(default = False), -+ "nodejs": attr.bool(default = False), -+ "php": attr.bool(default = False), -+ "python": attr.bool(default = False), -+ "ruby": attr.bool(default = False), -+ }, -+) -+ -+def _switched_rules_impl(ctx): -+ attrs = {} -+ for module in ctx.modules: -+ if not module.is_root: -+ continue -+ -+ is_tag_set = False -+ set_tag_name = "" -+ -+ for t in module.tags.use_languages: -+ if is_tag_set: -+ fail("Multiple use_language tags are set in the root module: '{}' and '{}'. Only one is allowed.".format(set_tag_name, module.name)) -+ -+ is_tag_set = True -+ set_tag_name = module.name -+ -+ attrs = { -+ "cc": t.cc, -+ "csharp": t.csharp, -+ "gapic": t.gapic, -+ "go": t.go, -+ "go_test": t.go_test, -+ "grpc": t.grpc, -+ "java": t.java, -+ "nodejs": t.nodejs, -+ "php": t.php, -+ "python": t.python, -+ "ruby": t.ruby, -+ } -+ -+ switched_rules_by_language( -+ name = "com_google_googleapis_imports", -+ **attrs -+ ) -+ -+switched_rules = module_extension( -+ implementation = _switched_rules_impl, -+ tag_classes = { -+ "use_languages": _use_languages_tag, -+ }, -+) diff --git a/bazel/googleapis.workspace.patch b/bazel/googleapis.workspace.patch new file mode 100644 index 0000000000000..d86dce95b3251 --- /dev/null +++ b/bazel/googleapis.workspace.patch @@ -0,0 +1,13 @@ +diff --git a/BUILD.bazel b/BUILD.bazel +index 95e4c12e5..83838d3f0 100644 +--- a/BUILD.bazel ++++ b/BUILD.bazel +@@ -2,7 +2,7 @@ genrule( + name = "build_gen", + outs = ["build_gen.sh"], + executable = True, +- srcs = glob(["run_build_gen.sh"]), ++ srcs = glob(["run_build_gen.sh"], allow_empty=True), + cmd = """ + if test -z \"$(SRCS)\"; then + cat < $@ diff --git a/bazel/remove_upb_c_rules.patch b/bazel/remove_upb_c_rules.patch new file mode 100644 index 0000000000000..43b077224c29d --- /dev/null +++ b/bazel/remove_upb_c_rules.patch @@ -0,0 +1,124 @@ +diff --git google/api/expr/v1alpha1/BUILD.bazel google/api/expr/v1alpha1/BUILD.bazel +index 9bed46809..197e5249c 100644 +--- google/api/expr/v1alpha1/BUILD.bazel ++++ google/api/expr/v1alpha1/BUILD.bazel +@@ -233,32 +233,32 @@ cc_proto_library( + ############################################################################## + # upb + ############################################################################## +-load( +- "@com_google_googleapis_imports//:imports.bzl", +- "upb_c_proto_library", +-) +- +-upb_c_proto_library( +- name = "checked_upb_proto", +- deps = [":checked_proto"], +-) +- +-upb_c_proto_library( +- name = "eval_upb_proto", +- deps = [":eval_proto"], +-) +- +-upb_c_proto_library( +- name = "explain_upb_proto", +- deps = [":explain_proto"], +-) +- +-upb_c_proto_library( +- name = "syntax_upb_proto", +- deps = [":syntax_proto"], +-) +- +-upb_c_proto_library( +- name = "value_upb_proto", +- deps = [":value_proto"], +-) ++#load( ++ #"@com_google_googleapis_imports//:imports.bzl", ++ #"upb_c_proto_library", ++#) ++# ++#upb_c_proto_library( ++ #name = "checked_upb_proto", ++ #deps = [":checked_proto"], ++#) ++# ++#upb_c_proto_library( ++ #name = "eval_upb_proto", ++ #deps = [":eval_proto"], ++#) ++# ++#upb_c_proto_library( ++ #name = "explain_upb_proto", ++ #deps = [":explain_proto"], ++#) ++# ++#upb_c_proto_library( ++ #name = "syntax_upb_proto", ++ #deps = [":syntax_proto"], ++#) ++# ++#upb_c_proto_library( ++ #name = "value_upb_proto", ++ #deps = [":value_proto"], ++#) +diff --git google/rpc/BUILD.bazel google/rpc/BUILD.bazel +index 31fd6457d..c38f00c46 100644 +--- google/rpc/BUILD.bazel ++++ google/rpc/BUILD.bazel +@@ -11,7 +11,7 @@ load( + "php_proto_library", + "py_gapic_assembly_pkg", + "py_proto_library", +- "upb_c_proto_library", ++ #"upb_c_proto_library", + ) + load("@rules_proto//proto:defs.bzl", "proto_library") + +@@ -104,15 +104,15 @@ cc_proto_library( + deps = [":status_proto"], + ) + +-upb_c_proto_library( +- name = "code_upb_proto", +- deps = [":code_proto"], +-) ++#upb_c_proto_library( ++ #name = "code_upb_proto", ++ #deps = [":code_proto"], ++#) + +-upb_c_proto_library( +- name = "status_upb_proto", +- deps = [":status_proto"], +-) ++#upb_c_proto_library( ++ #name = "status_upb_proto", ++ #deps = [":status_proto"], ++#) + + py_proto_library( + name = "code_py_proto", +diff --git repository_rules.bzl repository_rules.bzl +index 2f87ad682..2ab3bd054 100644 +--- repository_rules.bzl ++++ repository_rules.bzl +@@ -224,11 +224,11 @@ def switched_rules_by_language( + # + # upb + # +- rules["upb_c_proto_library"] = _switch( +- upb, +- "@com_google_protobuf//bazel:upb_c_proto_library.bzl", +- "upb_c_proto_library", +- ) ++ #rules["upb_c_proto_library"] = _switch( ++ # upb, ++ # "@com_google_protobuf//bazel:upb_c_proto_library.bzl", ++ # "upb_c_proto_library", ++ #) + + # + # PHP diff --git a/bazel/workspace0.bzl b/bazel/workspace0.bzl index 1fa5c263576a7..b5ee52b37e66b 100644 --- a/bazel/workspace0.bzl +++ b/bazel/workspace0.bzl @@ -77,6 +77,16 @@ def gl_cpp_workspace0(name = None): strip_prefix = "rules_cc-0.1.4", ) + maybe( + http_archive, + name = "com_envoyproxy_protoc_gen_validate", + urls = [ + "https://github.com/bufbuild/protoc-gen-validate/archive/v1.2.1.tar.gz", + ], + strip_prefix = "protoc-gen-validate-1.2.1", + integrity = "sha256-5HGDUnVN8Tk7h5K2MTOKqFYvOQ6BYHg+NlRUvBHZYyg=", + ) + # protobuf requires this maybe( http_archive, @@ -101,19 +111,19 @@ def gl_cpp_workspace0(name = None): # Load Abseil maybe( http_archive, - name = "com_google_absl", + name = "abseil-cpp", urls = [ - "https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz", + "https://github.com/abseil/abseil-cpp/archive/20250512.1.tar.gz", ], - sha256 = "b396401fd29e2e679cace77867481d388c807671dc2acc602a0259eeb79b7811", - strip_prefix = "abseil-cpp-20250127.1", + sha256 = "9b7a064305e9fd94d124ffa6cc358592eb42b5da588fb4e07d09254aa40086db", + strip_prefix = "abseil-cpp-20250512.1", ) # Load a version of googletest that we know works. This is needed to create # //:.*mocks targets, which are public. maybe( http_archive, - name = "com_google_googletest", + name = "googletest", urls = [ "https://github.com/google/googletest/archive/v1.16.0.tar.gz", ], @@ -124,7 +134,7 @@ def gl_cpp_workspace0(name = None): # Load the googleapis dependency. maybe( http_archive, - name = "com_google_googleapis", + name = "googleapis", urls = [ "https://github.com/googleapis/googleapis/archive/c0fcb35628690e9eb15dcefae41c651c67cd050b.tar.gz", ], @@ -132,24 +142,39 @@ def gl_cpp_workspace0(name = None): strip_prefix = "googleapis-c0fcb35628690e9eb15dcefae41c651c67cd050b", build_file = Label("//bazel:googleapis.BUILD"), # Scaffolding for patching googleapis after download. For example: - # patches = ["googleapis.patch"] - # NOTE: This should only be used while developing with a new - # protobuf message. No changes to `patches` should ever be - # committed to the main branch. + patches = [ + + # NOTE: This should only be used while developing with a new + # protobuf message. No changes to `patches` should ever be + # committed to the main branch. + #"googleapis.patch", + + # Mirrors the patch from the current bazel module + "//bazel:remove_upb_c_rules.patch", + ], patch_tool = "patch", - patch_args = ["-p1"], - patches = [], + + # Use the following args when developing with a new proto message + # patch_args = ["-p1", "-l", "-n"], + repo_mapping = { + "@com_github_grpc_grpc": "@grpc", + }, ) # Load protobuf. + # The name "com_google_protobuf" is internally used by @bazel_tools, + # a native repository we cannot override. + # We will revert this to @protobuf once @bazel_tools is deprecated + # and libraries have strayed away from it. + # See https://github.com/googleapis/google-cloud-cpp/issues/15393 maybe( http_archive, name = "com_google_protobuf", urls = [ - "https://github.com/protocolbuffers/protobuf/archive/v29.4.tar.gz", + "https://github.com/protocolbuffers/protobuf/archive/v31.1.tar.gz", ], - sha256 = "6bd9dcc91b17ef25c26adf86db71c67ec02431dc92e9589eaf82e22889230496", - strip_prefix = "protobuf-29.4", + sha256 = "c3a0a9ece8932e31c3b736e2db18b1c42e7070cd9b881388b26d01aa71e24ca2", + strip_prefix = "protobuf-31.1", ) # Load BoringSSL. This could be automatically loaded by gRPC. But as of @@ -167,45 +192,65 @@ def gl_cpp_workspace0(name = None): strip_prefix = "boringssl-82a53d8c902f940eb1310f76a0b96c40c67f632f", ) + # This is a transitive dependency of grpc + maybe( + http_archive, + name = "io_bazel_rules_go", + sha256 = "d93ef02f1e72c82d8bb3d5169519b36167b33cf68c252525e3b9d3d5dd143de7", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.49.0/rules_go-v0.49.0.zip", + "https://github.com/bazelbuild/rules_go/releases/download/v0.49.0/rules_go-v0.49.0.zip", + ], + patch_args = ["-p1"], + ) + # Load gRPC and its dependencies, using a similar pattern to this function. maybe( http_archive, - name = "com_github_grpc_grpc", + name = "grpc", urls = [ - "https://github.com/grpc/grpc/archive/v1.69.0.tar.gz", + "https://github.com/grpc/grpc/archive/v1.74.1.tar.gz", ], - sha256 = "cd256d91781911d46a57506978b3979bfee45d5086a1b6668a3ae19c5e77f8dc", - strip_prefix = "grpc-1.69.0", + repo_mapping = { + "@com_google_absl": "@abseil-cpp", + "@com_github_grpc_grpc": "@grpc", + }, + sha256 = "7bf97c11cf3808d650a3a025bbf9c5f922c844a590826285067765dfd055d228", + strip_prefix = "grpc-1.74.1", + ) + + native.bind( + name = "protocol_compiler", + actual = "@com_google_protobuf//:protoc", ) # We use the cc_proto_library() rule from @com_google_protobuf, which # assumes that grpc_cpp_plugin and grpc_lib are in the //external: module native.bind( name = "grpc_cpp_plugin", - actual = "@com_github_grpc_grpc//src/compiler:grpc_cpp_plugin", + actual = "@grpc//src/compiler:grpc_cpp_plugin", ) native.bind( name = "grpc_lib", - actual = "@com_github_grpc_grpc//:grpc++", + actual = "@grpc//:grpc++", ) # We need libcurl for the Google Cloud Storage client. - maybe( - http_archive, + http_archive( name = "com_github_curl_curl", urls = [ - "https://curl.haxx.se/download/curl-7.69.1.tar.gz", + "https://curl.haxx.se/download/curl-7.74.0.tar.gz", ], - sha256 = "01ae0c123dee45b01bbaef94c0bc00ed2aec89cb2ee0fd598e0d302a6b5e0a98", - strip_prefix = "curl-7.69.1", + sha256 = "e56b3921eeb7a2951959c02db0912b5fcd5fdba5aca071da819e1accf338bbd7", + strip_prefix = "curl-7.74.0", build_file = Label("//bazel:curl.BUILD"), ) # We need the nlohmann_json library maybe( http_archive, - name = "com_github_nlohmann_json", + name = "nlohmann_json", urls = [ "https://github.com/nlohmann/json/archive/v3.11.3.tar.gz", ], @@ -213,25 +258,9 @@ def gl_cpp_workspace0(name = None): strip_prefix = "json-3.11.3", ) - # Load google/crc32c, a library to efficiently compute CRC32C checksums. - maybe( - http_archive, - name = "com_github_google_crc32c", - urls = [ - "https://github.com/google/crc32c/archive/1.1.2.tar.gz", - ], - sha256 = "ac07840513072b7fcebda6e821068aa04889018f24e10e46181068fb214d7e56", - strip_prefix = "crc32c-1.1.2", - build_file = Label("//bazel:crc32c.BUILD"), - patch_tool = "patch", - patch_args = ["-p1"], - patches = [Label("//bazel:configure_template.bzl.patch")], - ) - # Open Telemetry - maybe( - http_archive, - name = "io_opentelemetry_cpp", + http_archive( + name = "opentelemetry-cpp", urls = [ "https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20.0.tar.gz", ], diff --git a/bazel/workspace2.bzl b/bazel/workspace2.bzl index a155449661177..97c90aab0f01a 100644 --- a/bazel/workspace2.bzl +++ b/bazel/workspace2.bzl @@ -15,11 +15,11 @@ """Load dependencies needed for google-cloud-cpp development / Phase 2.""" load("@build_bazel_apple_support//lib:repositories.bzl", "apple_support_dependencies") -load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps") load( - "@com_google_googleapis//:repository_rules.bzl", + "@googleapis//:repository_rules.bzl", "switched_rules_by_language", ) +load("@grpc//bazel:grpc_deps.bzl", "grpc_deps") load("@rules_cc//cc:repositories.bzl", "rules_cc_dependencies") def gl_cpp_workspace2(name = None): @@ -38,9 +38,9 @@ def gl_cpp_workspace2(name = None): rules_cc_dependencies() - # Configure @com_google_googleapis to only compile C++ and gRPC libraries. + # Configure @googleapis to only compile C++ and gRPC libraries. switched_rules_by_language( - name = "com_google_googleapis_imports", + name = "googleapis_imports", cc = True, grpc = True, ) diff --git a/bazel/workspace3.bzl b/bazel/workspace3.bzl index 33d2454a4d9b6..38b1fd970d698 100644 --- a/bazel/workspace3.bzl +++ b/bazel/workspace3.bzl @@ -14,10 +14,10 @@ """Load dependencies needed for google-cloud-cpp development / Phase 3.""" -load("@com_github_grpc_grpc//bazel:grpc_extra_deps.bzl", "grpc_extra_deps") -load("@com_google_googletest//:googletest_deps.bzl", "googletest_deps") load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") -load("@io_opentelemetry_cpp//bazel:repository.bzl", "opentelemetry_cpp_deps") +load("@googletest//:googletest_deps.bzl", "googletest_deps") +load("@grpc//bazel:grpc_extra_deps.bzl", "grpc_extra_deps") +load("@opentelemetry-cpp//bazel:repository.bzl", "opentelemetry_cpp_deps") def gl_cpp_workspace3(name = None): """Loads dependencies needed to use the google-cloud-cpp libraries. diff --git a/ci/abi-dumps/google_cloud_cpp_accessapproval.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_accessapproval.expected.abi.dump.gz index d038198f11433..e76757eed7b55 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_accessapproval.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_accessapproval.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_accesscontextmanager.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_accesscontextmanager.expected.abi.dump.gz index 28f924c557e30..0ab9a2c52759e 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_accesscontextmanager.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_accesscontextmanager.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_advisorynotifications.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_advisorynotifications.expected.abi.dump.gz index f3352f2a811d0..46a9323de617f 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_advisorynotifications.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_advisorynotifications.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_aiplatform.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_aiplatform.expected.abi.dump.gz index 21cb766f084a9..1c0d220b5e77f 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_aiplatform.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_aiplatform.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_alloydb.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_alloydb.expected.abi.dump.gz index 0bcaf3e305d73..c6d1ae3c28883 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_alloydb.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_alloydb.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_apigateway.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_apigateway.expected.abi.dump.gz index 7a24a3426bc22..b569f77f91fee 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_apigateway.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_apigateway.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_apigeeconnect.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_apigeeconnect.expected.abi.dump.gz index 20266e44a3535..eff9d6b10333d 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_apigeeconnect.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_apigeeconnect.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_apikeys.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_apikeys.expected.abi.dump.gz index 122cdb94ccc4f..0d616ebf5c288 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_apikeys.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_apikeys.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_apiregistry.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_apiregistry.expected.abi.dump.gz index 1b507a7a53d1d..1a635233e3f01 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_apiregistry.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_apiregistry.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_appengine.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_appengine.expected.abi.dump.gz index 8fb46425fbc00..5d9158bfb900c 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_appengine.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_appengine.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_apphub.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_apphub.expected.abi.dump.gz index fa5d3dce1b7e8..1bab8f5a2419d 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_apphub.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_apphub.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_artifactregistry.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_artifactregistry.expected.abi.dump.gz index 3066116108329..b6fa259abc1e5 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_artifactregistry.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_artifactregistry.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_asset.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_asset.expected.abi.dump.gz index dcd8b19894d71..10b8b0680436f 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_asset.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_asset.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_assuredworkloads.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_assuredworkloads.expected.abi.dump.gz index 3f2483f8004f2..3aaf7b5b5dbf7 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_assuredworkloads.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_assuredworkloads.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_auditmanager.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_auditmanager.expected.abi.dump.gz index 9d697db4ff8c0..0aa3799dacf21 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_auditmanager.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_auditmanager.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_automl.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_automl.expected.abi.dump.gz index c2dee2500faa3..f3654eba0aadb 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_automl.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_automl.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_backupdr.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_backupdr.expected.abi.dump.gz index 1fa06f694f794..28cdfb3e419e8 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_backupdr.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_backupdr.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_baremetalsolution.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_baremetalsolution.expected.abi.dump.gz index 13211cabf3257..68b89389858b5 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_baremetalsolution.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_baremetalsolution.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_batch.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_batch.expected.abi.dump.gz index d961c44a55453..a01064efa577d 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_batch.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_batch.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_beyondcorp.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_beyondcorp.expected.abi.dump.gz index 3fe88bae57ab0..783d797fce91d 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_beyondcorp.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_beyondcorp.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_bigquery.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_bigquery.expected.abi.dump.gz index 5c95ed6b1d9dd..2352ee161ad34 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_bigquery.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_bigquery.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_bigquerycontrol.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_bigquerycontrol.expected.abi.dump.gz index 6f17e9e4c0d87..848b99cb11775 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_bigquerycontrol.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_bigquerycontrol.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_bigtable.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_bigtable.expected.abi.dump.gz index 207fd9e287e29..fa292dba5d473 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_bigtable.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_bigtable.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_billing.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_billing.expected.abi.dump.gz index 9a2d56efd610a..45ed271aedaed 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_billing.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_billing.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_binaryauthorization.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_binaryauthorization.expected.abi.dump.gz index 3c60da4156607..844eb9b047fa6 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_binaryauthorization.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_binaryauthorization.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_certificatemanager.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_certificatemanager.expected.abi.dump.gz index 1de98a533dd6c..734e99df17625 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_certificatemanager.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_certificatemanager.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_channel.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_channel.expected.abi.dump.gz index 73106d9cc3d25..9bc5ec00ccd83 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_channel.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_channel.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_chronicle.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_chronicle.expected.abi.dump.gz index 6f52815ef3851..8bb979aa1aec9 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_chronicle.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_chronicle.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_cloudbuild.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_cloudbuild.expected.abi.dump.gz index 6d03eacd34256..b39c1e40569be 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_cloudbuild.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_cloudbuild.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_cloudcontrolspartner.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_cloudcontrolspartner.expected.abi.dump.gz index 44b39ca2999b3..6ebba250a12c1 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_cloudcontrolspartner.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_cloudcontrolspartner.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_cloudquotas.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_cloudquotas.expected.abi.dump.gz index 88673aec381a8..77b69dac3828e 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_cloudquotas.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_cloudquotas.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_cloudsecuritycompliance.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_cloudsecuritycompliance.expected.abi.dump.gz index 408182e1f883a..0e3c5068d9e9b 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_cloudsecuritycompliance.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_cloudsecuritycompliance.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_commerce.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_commerce.expected.abi.dump.gz index 5403fa91987a8..1d3052a4b0868 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_commerce.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_commerce.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_common.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_common.expected.abi.dump.gz index 69087580ec96c..b9252437b29ce 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_common.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_common.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_composer.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_composer.expected.abi.dump.gz index f09bcd581775e..7fcea3590a6d7 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_composer.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_composer.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_accelerator_types.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_accelerator_types.expected.abi.dump.gz index fde5ac9ac7a8f..6bc16debe186a 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_accelerator_types.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_accelerator_types.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_addresses.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_addresses.expected.abi.dump.gz index 3a51f3d4ed574..b7e4317fb9745 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_addresses.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_addresses.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_autoscalers.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_autoscalers.expected.abi.dump.gz index 508b064874c9c..94415db6d5e22 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_autoscalers.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_autoscalers.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_backend_buckets.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_backend_buckets.expected.abi.dump.gz index 3e4cda70e1478..2dd7b616f9a07 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_backend_buckets.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_backend_buckets.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_backend_services.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_backend_services.expected.abi.dump.gz index 113207a944c4a..99bcd00b712da 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_backend_services.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_backend_services.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_disk_types.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_disk_types.expected.abi.dump.gz index 6d5e577f1728b..a136ef43a7f89 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_disk_types.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_disk_types.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_disks.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_disks.expected.abi.dump.gz index 19789060a9750..3b0919fcc8eb2 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_disks.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_disks.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_external_vpn_gateways.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_external_vpn_gateways.expected.abi.dump.gz index fbbd1db180260..03df850bdce7d 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_external_vpn_gateways.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_external_vpn_gateways.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_firewall_policies.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_firewall_policies.expected.abi.dump.gz index 05fb44c0db4a5..96f19e59657ec 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_firewall_policies.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_firewall_policies.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_firewalls.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_firewalls.expected.abi.dump.gz index 96d9c6809ee2a..be96debd1ef9e 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_firewalls.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_firewalls.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_forwarding_rules.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_forwarding_rules.expected.abi.dump.gz index b304e6fbb129b..0d365029b5b31 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_forwarding_rules.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_forwarding_rules.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_global_addresses.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_global_addresses.expected.abi.dump.gz index f660ed0147925..c18231d849db7 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_global_addresses.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_global_addresses.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_global_forwarding_rules.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_global_forwarding_rules.expected.abi.dump.gz index 599ec51b85df0..5dfca078125d1 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_global_forwarding_rules.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_global_forwarding_rules.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_global_network_endpoint_groups.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_global_network_endpoint_groups.expected.abi.dump.gz index e9b2dd47146d4..0357e82644762 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_global_network_endpoint_groups.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_global_network_endpoint_groups.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_global_operations.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_global_operations.expected.abi.dump.gz index fa97ebc89de18..8b3ff79d7949c 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_global_operations.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_global_operations.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_global_organization_operations.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_global_organization_operations.expected.abi.dump.gz index 741dfd2ab24c2..9847ec50a2d24 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_global_organization_operations.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_global_organization_operations.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_global_public_delegated_prefixes.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_global_public_delegated_prefixes.expected.abi.dump.gz index 6876d7ff12ce0..3bb926552eb8e 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_global_public_delegated_prefixes.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_global_public_delegated_prefixes.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_health_checks.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_health_checks.expected.abi.dump.gz index 98842bcd447b3..bc6493e54f959 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_health_checks.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_health_checks.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_http_health_checks.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_http_health_checks.expected.abi.dump.gz index 13fef270ed090..23faac441a37e 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_http_health_checks.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_http_health_checks.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_https_health_checks.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_https_health_checks.expected.abi.dump.gz index 343a6ac019a5b..13098a2bdfd3a 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_https_health_checks.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_https_health_checks.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_image_family_views.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_image_family_views.expected.abi.dump.gz index 7061e9224f0be..8586238704b8e 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_image_family_views.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_image_family_views.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_images.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_images.expected.abi.dump.gz index 8dbc1c117d394..afd5741fd1797 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_images.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_images.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_instance_group_managers.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_instance_group_managers.expected.abi.dump.gz index 6d30fcd5a72de..5abebb567be59 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_instance_group_managers.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_instance_group_managers.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_instance_groups.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_instance_groups.expected.abi.dump.gz index a52923f352853..01eec3f4a4c4d 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_instance_groups.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_instance_groups.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_instance_templates.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_instance_templates.expected.abi.dump.gz index 05be9bcb450c4..5157a9e9935c3 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_instance_templates.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_instance_templates.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_instances.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_instances.expected.abi.dump.gz index 1513cb741de9d..d3e4f5d0fabe3 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_instances.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_instances.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_interconnect_attachments.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_interconnect_attachments.expected.abi.dump.gz index 8845783a835a9..8168a3575257f 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_interconnect_attachments.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_interconnect_attachments.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_interconnect_locations.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_interconnect_locations.expected.abi.dump.gz index 0e490de8ee1aa..8fdcc866d57d1 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_interconnect_locations.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_interconnect_locations.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_interconnects.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_interconnects.expected.abi.dump.gz index 96b6d6c1c4eb7..cacc299114227 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_interconnects.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_interconnects.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_license_codes.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_license_codes.expected.abi.dump.gz index 17a19e60c772d..6e264cfa86bd7 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_license_codes.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_license_codes.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_licenses.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_licenses.expected.abi.dump.gz index 71268f911f3b2..5e49d0d15e580 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_licenses.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_licenses.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_machine_images.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_machine_images.expected.abi.dump.gz index b154708cef270..0889c50fd3829 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_machine_images.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_machine_images.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_machine_types.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_machine_types.expected.abi.dump.gz index 55a139f764cf1..1b43665f2e003 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_machine_types.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_machine_types.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_network_attachments.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_network_attachments.expected.abi.dump.gz index 6d06980538c26..b4b9a0e2c1415 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_network_attachments.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_network_attachments.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_network_edge_security_services.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_network_edge_security_services.expected.abi.dump.gz index 8bed768c879a1..0c14876c0c451 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_network_edge_security_services.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_network_edge_security_services.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_network_endpoint_groups.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_network_endpoint_groups.expected.abi.dump.gz index 79f74e40a9799..16ba831109887 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_network_endpoint_groups.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_network_endpoint_groups.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_network_firewall_policies.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_network_firewall_policies.expected.abi.dump.gz index 374970f648be6..410c4ec5d7f5f 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_network_firewall_policies.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_network_firewall_policies.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_network_profiles.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_network_profiles.expected.abi.dump.gz deleted file mode 100644 index fda6ae395b354..0000000000000 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_network_profiles.expected.abi.dump.gz and /dev/null differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_networks.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_networks.expected.abi.dump.gz index bda4acaaac02c..a721dcefaf379 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_networks.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_networks.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_node_groups.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_node_groups.expected.abi.dump.gz index 2034ffb175072..29178de03f4ae 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_node_groups.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_node_groups.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_node_templates.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_node_templates.expected.abi.dump.gz index fbd38dcf138a5..c9a2488530a1e 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_node_templates.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_node_templates.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_node_types.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_node_types.expected.abi.dump.gz index e6f279400fac4..ac2581dbb3eaf 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_node_types.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_node_types.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_packet_mirrorings.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_packet_mirrorings.expected.abi.dump.gz index e8687573b89d9..eae3e0d235120 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_packet_mirrorings.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_packet_mirrorings.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_projects.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_projects.expected.abi.dump.gz index ccb88247cc788..8f71f604201e9 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_projects.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_projects.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_public_advertised_prefixes.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_public_advertised_prefixes.expected.abi.dump.gz index cec2272af7a23..4bb3d95201cf7 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_public_advertised_prefixes.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_public_advertised_prefixes.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_public_delegated_prefixes.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_public_delegated_prefixes.expected.abi.dump.gz index 24dffe9c66cd0..6ca686abc762e 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_public_delegated_prefixes.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_public_delegated_prefixes.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_region_autoscalers.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_region_autoscalers.expected.abi.dump.gz index 03fb9aa48415a..1a502a47956e6 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_region_autoscalers.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_region_autoscalers.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_region_backend_services.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_region_backend_services.expected.abi.dump.gz index ef0109baf9908..01499b0559409 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_region_backend_services.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_region_backend_services.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_region_commitments.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_region_commitments.expected.abi.dump.gz index a99e47ca527fe..da7afde79fdd2 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_region_commitments.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_region_commitments.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_region_disk_types.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_region_disk_types.expected.abi.dump.gz index 24cbd6f4495b4..9c577852ae94e 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_region_disk_types.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_region_disk_types.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_region_disks.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_region_disks.expected.abi.dump.gz index f61bbc242806b..6a86b3caf7db4 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_region_disks.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_region_disks.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_region_health_check_services.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_region_health_check_services.expected.abi.dump.gz index 0605f88f7c5ac..21e7181d8bbbb 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_region_health_check_services.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_region_health_check_services.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_region_health_checks.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_region_health_checks.expected.abi.dump.gz index 282515fdcf13f..9b7a36cb6b453 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_region_health_checks.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_region_health_checks.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_region_instance_group_managers.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_region_instance_group_managers.expected.abi.dump.gz index 457731614fff8..2ea9193c4d6ba 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_region_instance_group_managers.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_region_instance_group_managers.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_region_instance_groups.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_region_instance_groups.expected.abi.dump.gz index 4c8e2a26682a9..689f4f118d28a 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_region_instance_groups.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_region_instance_groups.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_region_instance_templates.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_region_instance_templates.expected.abi.dump.gz index a61120190f3cb..4ca4e46ae4bf9 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_region_instance_templates.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_region_instance_templates.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_region_instances.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_region_instances.expected.abi.dump.gz index d08b1e165541d..2ca31a13fa8a8 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_region_instances.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_region_instances.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_region_network_endpoint_groups.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_region_network_endpoint_groups.expected.abi.dump.gz index c75e34e441c6e..b7f45750572f3 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_region_network_endpoint_groups.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_region_network_endpoint_groups.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_region_network_firewall_policies.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_region_network_firewall_policies.expected.abi.dump.gz index c0f36efc3311f..5e0f5977a5ce5 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_region_network_firewall_policies.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_region_network_firewall_policies.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_region_notification_endpoints.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_region_notification_endpoints.expected.abi.dump.gz index ce4eb11c132e3..471090d8bb6ce 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_region_notification_endpoints.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_region_notification_endpoints.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_region_operations.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_region_operations.expected.abi.dump.gz index c7ccb7f2641ad..686f9ca3afb67 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_region_operations.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_region_operations.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_region_security_policies.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_region_security_policies.expected.abi.dump.gz index 0ffccb06371be..7f4cee6037a5a 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_region_security_policies.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_region_security_policies.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_region_ssl_certificates.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_region_ssl_certificates.expected.abi.dump.gz index 8481085b2a1f7..c1b6f3a43d27c 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_region_ssl_certificates.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_region_ssl_certificates.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_reservation_sub_blocks.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_reservation_sub_blocks.expected.abi.dump.gz deleted file mode 100644 index f4592ac4b773c..0000000000000 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_reservation_sub_blocks.expected.abi.dump.gz and /dev/null differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_ssl_policies.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_ssl_policies.expected.abi.dump.gz index 3a752d66f4663..cd1beba3a39ed 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_ssl_policies.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_ssl_policies.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_subnetworks.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_subnetworks.expected.abi.dump.gz index 809b88ff52843..2517b6334ec45 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_subnetworks.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_subnetworks.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_target_grpc_proxies.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_target_grpc_proxies.expected.abi.dump.gz index 07849f4004e59..e588f4b98d43e 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_target_grpc_proxies.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_target_grpc_proxies.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_target_http_proxies.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_target_http_proxies.expected.abi.dump.gz index 1a903c20279cd..7f72d76b064d7 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_target_http_proxies.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_target_http_proxies.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_target_https_proxies.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_target_https_proxies.expected.abi.dump.gz index 1e4de97ee3dec..6d92db5da50f6 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_target_https_proxies.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_target_https_proxies.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_target_instances.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_target_instances.expected.abi.dump.gz index 173520e23b0b2..43d37461342ed 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_target_instances.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_target_instances.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_target_pools.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_target_pools.expected.abi.dump.gz index a91b0b74541d2..a2791bf952c7b 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_target_pools.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_target_pools.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_target_ssl_proxies.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_target_ssl_proxies.expected.abi.dump.gz index 234a635f3a788..80e66a2226821 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_target_ssl_proxies.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_target_ssl_proxies.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_target_tcp_proxies.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_target_tcp_proxies.expected.abi.dump.gz index d2a3a195b5f12..4c2cf966a1dcc 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_target_tcp_proxies.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_target_tcp_proxies.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_target_vpn_gateways.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_target_vpn_gateways.expected.abi.dump.gz index cd83dc0d94cb8..019b2ace9f8fa 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_target_vpn_gateways.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_target_vpn_gateways.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_url_maps.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_url_maps.expected.abi.dump.gz index 4b901b636c1c8..201b75b7e2769 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_url_maps.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_url_maps.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_vpn_gateways.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_vpn_gateways.expected.abi.dump.gz index 97bfce89483d9..60867795e24a1 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_vpn_gateways.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_vpn_gateways.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_vpn_tunnels.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_vpn_tunnels.expected.abi.dump.gz index d337685b1e531..3f7fe097435c6 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_vpn_tunnels.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_vpn_tunnels.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_zone_operations.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_zone_operations.expected.abi.dump.gz index eab5745dc822a..c5edd27d239c8 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_zone_operations.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_zone_operations.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_compute_zones.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_compute_zones.expected.abi.dump.gz index f180c3ca9e03f..1d5319c5206c7 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_compute_zones.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_compute_zones.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_confidentialcomputing.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_confidentialcomputing.expected.abi.dump.gz index 98bc787095414..71bd5d378ecd3 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_confidentialcomputing.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_confidentialcomputing.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_config.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_config.expected.abi.dump.gz index c2bac6a07cdb9..40c921838adc6 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_config.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_config.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_configdelivery.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_configdelivery.expected.abi.dump.gz index bc0a3645ef47d..5e6a56cb62c75 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_configdelivery.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_configdelivery.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_connectors.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_connectors.expected.abi.dump.gz index 559ce3d0333fe..b9a09142c28f6 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_connectors.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_connectors.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_contactcenterinsights.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_contactcenterinsights.expected.abi.dump.gz index 1e571ed26745c..bb7ca4e8dde82 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_contactcenterinsights.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_contactcenterinsights.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_container.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_container.expected.abi.dump.gz index b013610d208ab..9b9da186418bf 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_container.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_container.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_containeranalysis.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_containeranalysis.expected.abi.dump.gz index df2607125e013..433e579b7ccf5 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_containeranalysis.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_containeranalysis.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_contentwarehouse.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_contentwarehouse.expected.abi.dump.gz index 3a1fc44d02ccf..197db1f637626 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_contentwarehouse.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_contentwarehouse.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_datacatalog.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_datacatalog.expected.abi.dump.gz index 8a46cb580c04c..65089175fc6c7 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_datacatalog.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_datacatalog.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_dataform.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_dataform.expected.abi.dump.gz index cbde7180b085e..d646ed15594ac 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_dataform.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_dataform.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_datafusion.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_datafusion.expected.abi.dump.gz index 299ff6b03d9cd..35111c32f55fa 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_datafusion.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_datafusion.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_datamigration.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_datamigration.expected.abi.dump.gz index f81399e365787..60de039a30349 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_datamigration.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_datamigration.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_dataplex.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_dataplex.expected.abi.dump.gz index b058ab5fde7ff..984e785ebc327 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_dataplex.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_dataplex.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_dataproc.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_dataproc.expected.abi.dump.gz index 249a6b97a37d0..e6b398a501de2 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_dataproc.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_dataproc.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_datastore.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_datastore.expected.abi.dump.gz index cc80cd13bc88a..622e682d1a8a8 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_datastore.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_datastore.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_datastream.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_datastream.expected.abi.dump.gz index a9ed93de7be17..e91dc4f5ccdcf 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_datastream.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_datastream.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_deploy.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_deploy.expected.abi.dump.gz index 5e77b8d29799d..a1e0b5d6f2b91 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_deploy.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_deploy.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_developerconnect.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_developerconnect.expected.abi.dump.gz index 4316b2291f4df..02f1582f7186f 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_developerconnect.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_developerconnect.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_devicestreaming.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_devicestreaming.expected.abi.dump.gz index 7528f17a6f796..530357b281a15 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_devicestreaming.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_devicestreaming.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_dialogflow_cx.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_dialogflow_cx.expected.abi.dump.gz index a3bb3e9eb8d87..83fd8c693faee 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_dialogflow_cx.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_dialogflow_cx.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_dialogflow_es.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_dialogflow_es.expected.abi.dump.gz index 98b42b12eddaa..9169d96d57526 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_dialogflow_es.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_dialogflow_es.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_discoveryengine.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_discoveryengine.expected.abi.dump.gz index 496d470008035..9f35571518f22 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_discoveryengine.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_discoveryengine.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_dlp.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_dlp.expected.abi.dump.gz index 95428f30b2a67..8bd69848af139 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_dlp.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_dlp.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_documentai.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_documentai.expected.abi.dump.gz index fb576c30a50a4..08cd109eb3a7e 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_documentai.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_documentai.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_domains.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_domains.expected.abi.dump.gz index 9542aec3496d5..441767d458477 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_domains.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_domains.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_edgecontainer.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_edgecontainer.expected.abi.dump.gz index 28f41d6fadc80..1755cbae5e38c 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_edgecontainer.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_edgecontainer.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_edgenetwork.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_edgenetwork.expected.abi.dump.gz index 643d28ddc49bc..fbe1b7c769d1d 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_edgenetwork.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_edgenetwork.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_essentialcontacts.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_essentialcontacts.expected.abi.dump.gz index 8bdcb54307bac..4ae93bc710d95 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_essentialcontacts.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_essentialcontacts.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_eventarc.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_eventarc.expected.abi.dump.gz index 63681b7bd9981..600e4a2684213 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_eventarc.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_eventarc.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_filestore.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_filestore.expected.abi.dump.gz index 379d95c5828cb..09a520195e1e2 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_filestore.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_filestore.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_financialservices.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_financialservices.expected.abi.dump.gz index 42f212ad4fbaa..d0389a5486f3a 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_financialservices.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_financialservices.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_functions.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_functions.expected.abi.dump.gz index dfef0fcc4cf76..66261411618bc 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_functions.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_functions.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_gkebackup.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_gkebackup.expected.abi.dump.gz index b9a8dba43d34d..e513d78d1daa7 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_gkebackup.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_gkebackup.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_gkeconnect.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_gkeconnect.expected.abi.dump.gz index 79355c214c7a2..ad11a58e340ea 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_gkeconnect.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_gkeconnect.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_gkehub.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_gkehub.expected.abi.dump.gz index cabd481282b90..72288c8d00557 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_gkehub.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_gkehub.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_gkemulticloud.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_gkemulticloud.expected.abi.dump.gz index 5e35a6d1d9177..091d18d24dfef 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_gkemulticloud.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_gkemulticloud.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_gkerecommender.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_gkerecommender.expected.abi.dump.gz index 56f297493a673..f890a2f630772 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_gkerecommender.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_gkerecommender.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_grpc_utils.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_grpc_utils.expected.abi.dump.gz index a475dad022a70..6400678d71a7f 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_grpc_utils.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_grpc_utils.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_iam.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_iam.expected.abi.dump.gz index 097f749921813..1a78e15c2e27a 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_iam.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_iam.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_iap.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_iap.expected.abi.dump.gz index c0459a3b02d65..0897657413941 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_iap.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_iap.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_ids.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_ids.expected.abi.dump.gz index 2e0e664e08c09..7234455c70fa2 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_ids.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_ids.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_kms.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_kms.expected.abi.dump.gz index e5bf1854b0d2c..cf90a24b8ae84 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_kms.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_kms.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_language.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_language.expected.abi.dump.gz index 9bebbe4072010..8c176248f45eb 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_language.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_language.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_licensemanager.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_licensemanager.expected.abi.dump.gz index 09a3ea5f8b652..057a7ebf27d28 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_licensemanager.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_licensemanager.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_logging.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_logging.expected.abi.dump.gz index 29ab49d7da1c7..0de1ee0914eea 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_logging.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_logging.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_lustre.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_lustre.expected.abi.dump.gz index d69fc7870e03c..003b6e288cfae 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_lustre.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_lustre.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_maintenance.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_maintenance.expected.abi.dump.gz index a4c2e8fe470a1..50fbfe58ae787 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_maintenance.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_maintenance.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_managedidentities.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_managedidentities.expected.abi.dump.gz index d7459142fc6a6..4f3d6361caa5c 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_managedidentities.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_managedidentities.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_managedkafka.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_managedkafka.expected.abi.dump.gz index bf2826ca8d069..de332778471ba 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_managedkafka.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_managedkafka.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_memcache.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_memcache.expected.abi.dump.gz index 171a3946f732e..a23211c87c12a 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_memcache.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_memcache.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_memorystore.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_memorystore.expected.abi.dump.gz index c8c4f6b7b4016..3ff260eae9a76 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_memorystore.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_memorystore.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_metastore.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_metastore.expected.abi.dump.gz index 4dd8c5f453010..d63a216668675 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_metastore.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_metastore.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_migrationcenter.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_migrationcenter.expected.abi.dump.gz index ae34fedb58cfc..5d9cb44bb358c 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_migrationcenter.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_migrationcenter.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_monitoring.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_monitoring.expected.abi.dump.gz index 6729ab843322e..b81cc7bb574d4 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_monitoring.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_monitoring.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_netapp.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_netapp.expected.abi.dump.gz index 7cbe4c9c81cf2..cd265b7b17578 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_netapp.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_netapp.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_networkconnectivity.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_networkconnectivity.expected.abi.dump.gz index cf47008da19c6..9ebbb9a045988 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_networkconnectivity.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_networkconnectivity.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_networkmanagement.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_networkmanagement.expected.abi.dump.gz index d4cabbd31e38b..862d9c7450097 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_networkmanagement.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_networkmanagement.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_networksecurity.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_networksecurity.expected.abi.dump.gz index 18de2cc6edfd8..ea9ecfc302b6e 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_networksecurity.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_networksecurity.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_networkservices.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_networkservices.expected.abi.dump.gz index 87455bb98e072..256878fad1f6b 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_networkservices.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_networkservices.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_notebooks.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_notebooks.expected.abi.dump.gz index bdd5330f98e83..f6fd216a16683 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_notebooks.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_notebooks.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_oauth2.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_oauth2.expected.abi.dump.gz index 6667332f2789b..068d48ce48c02 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_oauth2.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_oauth2.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_opentelemetry.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_opentelemetry.expected.abi.dump.gz index 2fa62cc5ca73d..92ce630fc11c4 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_opentelemetry.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_opentelemetry.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_optimization.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_optimization.expected.abi.dump.gz index c0596557b1f67..bcf8d568dd2c4 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_optimization.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_optimization.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_oracledatabase.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_oracledatabase.expected.abi.dump.gz index a312ab865140e..f100afdbe36fa 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_oracledatabase.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_oracledatabase.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_orgpolicy.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_orgpolicy.expected.abi.dump.gz index 877bef7439e43..08fbb59ed2e58 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_orgpolicy.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_orgpolicy.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_osconfig.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_osconfig.expected.abi.dump.gz index f1123d215b79d..8748b594eda30 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_osconfig.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_osconfig.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_oslogin.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_oslogin.expected.abi.dump.gz index 4596deeece1aa..22dee81c56f6c 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_oslogin.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_oslogin.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_parallelstore.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_parallelstore.expected.abi.dump.gz index fec9ff51362eb..96609fedb4b14 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_parallelstore.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_parallelstore.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_parametermanager.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_parametermanager.expected.abi.dump.gz index b2aa38b427c9f..b7a8425ddcd62 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_parametermanager.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_parametermanager.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_policysimulator.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_policysimulator.expected.abi.dump.gz index 2d1c51b9e0a1a..9055315c58dda 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_policysimulator.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_policysimulator.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_policytroubleshooter.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_policytroubleshooter.expected.abi.dump.gz index 366e088c3f472..b23ed52b22293 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_policytroubleshooter.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_policytroubleshooter.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_privateca.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_privateca.expected.abi.dump.gz index 5c5e4a9940033..dd91c74d5227a 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_privateca.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_privateca.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_privilegedaccessmanager.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_privilegedaccessmanager.expected.abi.dump.gz index 6e12c8936969f..860d358e1ff38 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_privilegedaccessmanager.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_privilegedaccessmanager.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_profiler.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_profiler.expected.abi.dump.gz index fdcdd23b51f31..69d6754149608 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_profiler.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_profiler.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_publicca.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_publicca.expected.abi.dump.gz index 5bcfe98ba3dc7..4d45b48ef3b77 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_publicca.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_publicca.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_pubsub.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_pubsub.expected.abi.dump.gz index 7d61c0fc4f3b1..aabe2cf7fd996 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_pubsub.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_pubsub.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_rapidmigrationassessment.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_rapidmigrationassessment.expected.abi.dump.gz index 81c13c76123dc..1c5c784d68e0f 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_rapidmigrationassessment.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_rapidmigrationassessment.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_recaptchaenterprise.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_recaptchaenterprise.expected.abi.dump.gz index 6cf38f6b80bc0..bd520080905e2 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_recaptchaenterprise.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_recaptchaenterprise.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_recommender.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_recommender.expected.abi.dump.gz index 5359e82d6d34e..aab472480b96a 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_recommender.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_recommender.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_redis.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_redis.expected.abi.dump.gz index 6d88170e70a93..14d9636c68db4 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_redis.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_redis.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_resourcemanager.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_resourcemanager.expected.abi.dump.gz index ee321d1ef8a5b..467d3c0d190b6 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_resourcemanager.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_resourcemanager.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_retail.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_retail.expected.abi.dump.gz index d835eff4ff607..093eb4aeaa332 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_retail.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_retail.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_run.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_run.expected.abi.dump.gz index 11eda7c24be55..b6bb3d2225d49 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_run.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_run.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_scheduler.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_scheduler.expected.abi.dump.gz index 646c5e20436ed..7ca58509f5205 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_scheduler.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_scheduler.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_secretmanager.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_secretmanager.expected.abi.dump.gz index cb12c19dc3ec7..ba2c0360c1496 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_secretmanager.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_secretmanager.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_securesourcemanager.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_securesourcemanager.expected.abi.dump.gz index 8de4e0167ceb4..a12a7494d7947 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_securesourcemanager.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_securesourcemanager.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_securitycenter.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_securitycenter.expected.abi.dump.gz index 784e252fbabf2..41716636e21c0 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_securitycenter.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_securitycenter.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_securitycentermanagement.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_securitycentermanagement.expected.abi.dump.gz index 63fe4a772b54b..9f384580477b9 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_securitycentermanagement.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_securitycentermanagement.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_servicecontrol.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_servicecontrol.expected.abi.dump.gz index 7e3a9627548e5..a4f20814f30e3 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_servicecontrol.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_servicecontrol.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_servicedirectory.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_servicedirectory.expected.abi.dump.gz index b904334d803d7..ec5f5f4df907a 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_servicedirectory.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_servicedirectory.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_servicehealth.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_servicehealth.expected.abi.dump.gz index 1e7fd9275173a..5abe656199aa1 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_servicehealth.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_servicehealth.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_servicemanagement.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_servicemanagement.expected.abi.dump.gz index 762654ba921dc..aff8f654de016 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_servicemanagement.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_servicemanagement.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_serviceusage.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_serviceusage.expected.abi.dump.gz index c293209777a84..e694536e4ab3b 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_serviceusage.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_serviceusage.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_shell.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_shell.expected.abi.dump.gz index ed885f9681a19..76ec16d84ca78 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_shell.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_shell.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_spanner.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_spanner.expected.abi.dump.gz index bc43bbbef585c..322e5cc831067 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_spanner.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_spanner.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_speech.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_speech.expected.abi.dump.gz index 5b2a70a3d1117..b6a704e4def07 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_speech.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_speech.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_sql.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_sql.expected.abi.dump.gz index 338028c56915e..5c0f2417a0aaa 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_sql.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_sql.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_storage.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_storage.expected.abi.dump.gz index 42e655e347d53..f0b45b35f38c1 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_storage.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_storage.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_storage_grpc.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_storage_grpc.expected.abi.dump.gz index c150925d5f061..0d658152c038a 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_storage_grpc.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_storage_grpc.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_storagebatchoperations.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_storagebatchoperations.expected.abi.dump.gz index d04f580e1d875..b45f5348adb2e 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_storagebatchoperations.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_storagebatchoperations.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_storagecontrol.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_storagecontrol.expected.abi.dump.gz index ff3a0b7d61655..256df64f18d11 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_storagecontrol.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_storagecontrol.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_storageinsights.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_storageinsights.expected.abi.dump.gz index 87ec0dde7c49a..2ae319b980599 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_storageinsights.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_storageinsights.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_storagetransfer.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_storagetransfer.expected.abi.dump.gz index 8caa0a3cbb821..c3e8fcd1515c2 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_storagetransfer.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_storagetransfer.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_support.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_support.expected.abi.dump.gz index bda67726c93d0..1f2ed48ddb1cb 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_support.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_support.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_talent.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_talent.expected.abi.dump.gz index fdf65d207ac45..4b64cf56e9f3b 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_talent.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_talent.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_tasks.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_tasks.expected.abi.dump.gz index 946f242596fdb..102968bbd4119 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_tasks.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_tasks.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_telcoautomation.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_telcoautomation.expected.abi.dump.gz index 4017c129011b6..af224b03451cf 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_telcoautomation.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_telcoautomation.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_texttospeech.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_texttospeech.expected.abi.dump.gz index 35e728eea0a36..c4583a0f94e8c 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_texttospeech.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_texttospeech.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_timeseriesinsights.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_timeseriesinsights.expected.abi.dump.gz index 9130a612a85de..13a3f93d9908f 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_timeseriesinsights.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_timeseriesinsights.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_tpu.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_tpu.expected.abi.dump.gz index 93ac5c024d85a..00a613a81cc1b 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_tpu.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_tpu.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_trace.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_trace.expected.abi.dump.gz index 16f43536c80e6..3d60b462bcc3d 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_trace.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_trace.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_translate.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_translate.expected.abi.dump.gz index 20e7ca9ee6dbf..db6ee2efbc636 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_translate.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_translate.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_universe_domain.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_universe_domain.expected.abi.dump.gz index 2d375a5154fc2..dbce1c25d91fc 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_universe_domain.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_universe_domain.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_video.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_video.expected.abi.dump.gz index 4306dd438a69e..94e0b8b55d9d4 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_video.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_video.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_videointelligence.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_videointelligence.expected.abi.dump.gz index 48b6f0222cb7b..3c1783a603cb1 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_videointelligence.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_videointelligence.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_vision.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_vision.expected.abi.dump.gz index 02fe15ad3443c..fb547ed40a8fa 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_vision.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_vision.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_vmmigration.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_vmmigration.expected.abi.dump.gz index 0c6813ad715c8..9166276cad2c3 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_vmmigration.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_vmmigration.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_vmwareengine.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_vmwareengine.expected.abi.dump.gz index 771b3a05f6b2f..1774d6efe158a 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_vmwareengine.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_vmwareengine.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_vpcaccess.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_vpcaccess.expected.abi.dump.gz index 15096d7d94d8b..a7eb6e4914200 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_vpcaccess.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_vpcaccess.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_webrisk.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_webrisk.expected.abi.dump.gz index 5b6e04524deed..b16ec48b2c047 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_webrisk.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_webrisk.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_websecurityscanner.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_websecurityscanner.expected.abi.dump.gz index 615c3b0debb7b..46097097b1140 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_websecurityscanner.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_websecurityscanner.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_workflows.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_workflows.expected.abi.dump.gz index b35852793b5f1..dcb3a2d9de161 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_workflows.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_workflows.expected.abi.dump.gz differ diff --git a/ci/abi-dumps/google_cloud_cpp_workstations.expected.abi.dump.gz b/ci/abi-dumps/google_cloud_cpp_workstations.expected.abi.dump.gz index c87605db1a6e1..2aa68b73c102c 100644 Binary files a/ci/abi-dumps/google_cloud_cpp_workstations.expected.abi.dump.gz and b/ci/abi-dumps/google_cloud_cpp_workstations.expected.abi.dump.gz differ diff --git a/ci/bzlmod_tests/consumer-test/BUILD.bazel b/ci/bzlmod_tests/consumer-test/BUILD.bazel new file mode 100644 index 0000000000000..f2d6d030954e2 --- /dev/null +++ b/ci/bzlmod_tests/consumer-test/BUILD.bazel @@ -0,0 +1,9 @@ +load("@rules_cc//cc:defs.bzl", "cc_test") + +cc_test( + name = "main_test", + srcs = ["main.cc"], + deps = [ + "@google_cloud_cpp//google/cloud/storage:storage_client_testing", + ], +) diff --git a/ci/bzlmod_tests/consumer-test/MODULE.bazel b/ci/bzlmod_tests/consumer-test/MODULE.bazel new file mode 100644 index 0000000000000..3ebfa7a79f844 --- /dev/null +++ b/ci/bzlmod_tests/consumer-test/MODULE.bazel @@ -0,0 +1,5 @@ +module(name = "bzlmod-consumer-test") + +bazel_dep(name = "google_cloud_cpp", version = "3.0.0-rc1") +bazel_dep(name = "googletest", version = "1.15.2") +bazel_dep(name = "rules_cc", version = "0.1.1") diff --git a/ci/bzlmod_tests/consumer-test/main.cc b/ci/bzlmod_tests/consumer-test/main.cc new file mode 100644 index 0000000000000..8a6e907ba3c95 --- /dev/null +++ b/ci/bzlmod_tests/consumer-test/main.cc @@ -0,0 +1,16 @@ +#include "google/cloud/storage/client.h" +#include "google/cloud/storage/testing/mock_client.h" +#include +#include + +TEST(BzlmodTest, CanCreateMockClient) { + // Create a mock client. + auto mock = std::make_shared(); + + // Use the mock to construct a Client object. This verifies that the + // necessary symbols are linked correctly. + google::cloud::storage::Client client(mock); + + // A simple assertion to make it a valid test. + ASSERT_TRUE(true); +} diff --git a/ci/cloudbuild/builds/bazel-oldest.sh b/ci/cloudbuild/builds/bazel-oldest.sh index 907dd70fd13b7..c1697dde77971 100755 --- a/ci/cloudbuild/builds/bazel-oldest.sh +++ b/ci/cloudbuild/builds/bazel-oldest.sh @@ -16,21 +16,22 @@ set -euo pipefail -export USE_BAZEL_VERSION=6.4.0 +export USE_BAZEL_VERSION=7.7.1 source "$(dirname "$0")/../../lib/init.sh" source module ci/cloudbuild/builds/lib/bazel.sh source module ci/cloudbuild/builds/lib/cloudcxxrc.sh +source module ci/lib/io.sh export CC=clang export CXX=clang++ mapfile -t args < <(bazel::common_args) args+=( - # For now, we continue to test Bazel 6.x without bzlmod. Once the minimum - # supported version of Bazel is 7.x we can decide how to test without bzlmod. + # Test without bzlmod as WORKSPACE is still supported in bazel 7 LTS. --noenable_bzlmod + --enable_workspace # Only run the unit tests, no need to waste time running everything. --test_tag_filters=-integration-test ) -bazel test "${args[@]}" -- "${BAZEL_TARGETS[@]}" +io::run bazel test "${args[@]}" -- "${BAZEL_TARGETS[@]}" diff --git a/ci/cloudbuild/builds/bazel-targets.sh b/ci/cloudbuild/builds/bazel-targets.sh index 87a53b7dad7d6..7d93b375dea0c 100755 --- a/ci/cloudbuild/builds/bazel-targets.sh +++ b/ci/cloudbuild/builds/bazel-targets.sh @@ -21,7 +21,6 @@ source module ci/cloudbuild/builds/lib/bazel.sh source module ci/cloudbuild/builds/lib/cloudcxxrc.sh mapfile -t args < <(bazel::common_args) -for repo_root in "ci/verify_current_targets" "ci/verify_deprecated_targets"; do - io::log_h2 "Verifying Bazel targets in repo root: ${repo_root}" - env -C "${repo_root}" bazel test "${args[@]}" ... -done +repo_root="ci/verify_current_targets" +io::log_h2 "Verifying Bazel targets in repo root: ${repo_root}" +env -C "${repo_root}" bazel test "${args[@]}" ... diff --git a/ci/cloudbuild/builds/check-api.sh b/ci/cloudbuild/builds/check-api.sh index ef6a0b21b5ed4..937944db782ec 100755 --- a/ci/cloudbuild/builds/check-api.sh +++ b/ci/cloudbuild/builds/check-api.sh @@ -45,6 +45,7 @@ fi # https://github.com/googleapis/google-cloud-cpp/issues/6313 io::run cmake "${cmake_args[@]}" \ -DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \ + -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_INSTALL_MESSAGE=NEVER \ -DBUILD_SHARED_LIBS=ON \ -DCMAKE_BUILD_TYPE=Debug \ diff --git a/ci/cloudbuild/builds/checkers.sh b/ci/cloudbuild/builds/checkers.sh index 027f8eb959755..1dc119a3e118e 100755 --- a/ci/cloudbuild/builds/checkers.sh +++ b/ci/cloudbuild/builds/checkers.sh @@ -94,19 +94,6 @@ time { xargs -r -P "$(nproc)" -n 50 -0 awk -f "ci/check-include-guards.gawk" } -# TODO(#4501) - this fixup can be removed if #include works -# Apply transformations to fix errors on MSVC+x86. See the bug for a detailed -# explanation as to why this is needed: -# https://github.com/googleapis/google-cloud-cpp/issues/4501 -# This should run before clang-format because it might alter the order of any -# includes. -printf "%-50s" "Running Abseil header fixes:" >&2 -time { - expressions=("-e" "'s;#include \"absl/strings/str_\(cat\|replace\|join\).h\";#include \"google/cloud/internal/absl_str_\1_quiet.h\";'") - (git grep -zEl '#include "absl/strings/str_(cat|replace|join).h"' -- '*.h' '*.cc' ':!google/cloud/internal/absl_str_*quiet.h' || true) | - xargs -r -P "$(nproc)" -n 50 -0 bash -c "sed_edit ${expressions[*]} \"\$0\" \"\$@\"" -} - # Apply several transformations that cannot be enforced by clang-format: # - Replace any #include for grpc++/* with grpcpp/*. The paths with grpc++ # are obsoleted by the gRPC team, so we should not use them in our code. diff --git a/ci/cloudbuild/builds/clang-7.0.sh b/ci/cloudbuild/builds/clang-14.0.sh similarity index 98% rename from ci/cloudbuild/builds/clang-7.0.sh rename to ci/cloudbuild/builds/clang-14.0.sh index 55fbd3edfcc85..0db406fca54f7 100755 --- a/ci/cloudbuild/builds/clang-7.0.sh +++ b/ci/cloudbuild/builds/clang-14.0.sh @@ -32,6 +32,7 @@ ENABLED_FEATURES="${ENABLED_FEATURES},compute" readonly ENABLED_FEATURES io::run cmake -GNinja -S . -B cmake-out \ + -DCMAKE_CXX_STANDARD=17 \ -DGOOGLE_CLOUD_CPP_ENABLE="${ENABLED_FEATURES}" \ -DGOOGLE_CLOUD_CPP_ENABLE_CCACHE=ON \ -DGOOGLE_CLOUD_CPP_ENABLE_WERROR=ON \ diff --git a/ci/cloudbuild/builds/clang-tidy-compute.sh b/ci/cloudbuild/builds/clang-tidy-compute.sh index 4bda9c60f390a..78c1826f06f2d 100755 --- a/ci/cloudbuild/builds/clang-tidy-compute.sh +++ b/ci/cloudbuild/builds/clang-tidy-compute.sh @@ -35,7 +35,7 @@ readonly ENABLED_FEATURES="compute" io::run cmake "${cmake_args[@]}" \ -DCMAKE_CXX_CLANG_TIDY=/usr/local/bin/clang-tidy-wrapper \ -DGOOGLE_CLOUD_CPP_ENABLE_CLANG_ABI_COMPAT_17=ON \ - -DCMAKE_CXX_STANDARD=14 \ + -DCMAKE_CXX_STANDARD=17 \ -DGOOGLE_CLOUD_CPP_ENABLE="${ENABLED_FEATURES}" \ -DGOOGLE_CLOUD_CPP_INTERNAL_DOCFX=ON io::run cmake --build cmake-out diff --git a/ci/cloudbuild/builds/clang-tidy.sh b/ci/cloudbuild/builds/clang-tidy.sh index 111c919e6d7ee..2c4782120075c 100755 --- a/ci/cloudbuild/builds/clang-tidy.sh +++ b/ci/cloudbuild/builds/clang-tidy.sh @@ -47,7 +47,7 @@ fi io::run cmake "${cmake_args[@]}" \ -DCMAKE_CXX_CLANG_TIDY=/usr/local/bin/clang-tidy-wrapper \ -DGOOGLE_CLOUD_CPP_ENABLE_CLANG_ABI_COMPAT_17=ON \ - -DCMAKE_CXX_STANDARD=14 \ + -DCMAKE_CXX_STANDARD=17 \ -DGOOGLE_CLOUD_CPP_ENABLE_EXAMPLES=ON \ -DGOOGLE_CLOUD_CPP_ENABLE="${ENABLED_FEATURES}" \ -DGOOGLE_CLOUD_CPP_INTERNAL_DOCFX="${enable_docfx}" diff --git a/ci/cloudbuild/builds/cmake-gcs-rest.sh b/ci/cloudbuild/builds/cmake-gcs-rest.sh index 7abceadae6351..1c058e87748f9 100755 --- a/ci/cloudbuild/builds/cmake-gcs-rest.sh +++ b/ci/cloudbuild/builds/cmake-gcs-rest.sh @@ -30,7 +30,7 @@ mapfile -t cmake_args < <(cmake::common_args) read -r ENABLED_FEATURES < <(features::always_build_cmake) readonly ENABLED_FEATURES -io::run cmake "${cmake_args[@]}" -DGOOGLE_CLOUD_CPP_ENABLE="${ENABLED_FEATURES}" +io::run cmake "${cmake_args[@]}" -DGOOGLE_CLOUD_CPP_ENABLE="${ENABLED_FEATURES}" -DCMAKE_CXX_STANDARD=17 io::run cmake --build cmake-out mapfile -t ctest_args < <(ctest::common_args) io::run env -C cmake-out GOOGLE_CLOUD_CPP_STORAGE_HAVE_REST_CLIENT=yes \ diff --git a/ci/cloudbuild/builds/cmake-install.sh b/ci/cloudbuild/builds/cmake-install.sh index ea830d7ad9989..12442e548e90d 100755 --- a/ci/cloudbuild/builds/cmake-install.sh +++ b/ci/cloudbuild/builds/cmake-install.sh @@ -35,6 +35,7 @@ readonly ENABLED_FEATURES # Compiles and installs all libraries and headers. cmake "${cmake_args[@]}" \ -DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \ + -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_INSTALL_MESSAGE=NEVER \ -DGOOGLE_CLOUD_CPP_ENABLE_CLANG_ABI_COMPAT_17=ON \ -DBUILD_TESTING=OFF \ @@ -98,7 +99,6 @@ expected_dirs+=( ./include/google/cloud/gkebackup/logging/v1 ./include/google/cloud/gkehub/v1/configmanagement ./include/google/cloud/gkehub/v1/multiclusteringress - ./include/google/cloud/grpc_utils ./include/google/cloud/internal ./include/google/cloud/internal/win32 ./include/google/cloud/location @@ -132,7 +132,6 @@ expected_dirs+=( ./include/google/cloud/storage/internal/grpc ./include/google/cloud/storage/internal/rest ./include/google/cloud/storage/mocks - ./include/google/cloud/storage/oauth2 ./include/google/cloud/storage/testing # no gRPC services in google/cloud/workflows/type. ./include/google/cloud/workflows/type diff --git a/ci/cloudbuild/builds/cmake-oldest-deps.sh b/ci/cloudbuild/builds/cmake-oldest-deps.sh index 7ffaf56dae058..7da9d9ba52dfe 100755 --- a/ci/cloudbuild/builds/cmake-oldest-deps.sh +++ b/ci/cloudbuild/builds/cmake-oldest-deps.sh @@ -36,6 +36,7 @@ readonly ENABLED_FEATURES io::log_h2 "Configuring" vcpkg_root="$(vcpkg::root_dir)" cmake -GNinja -S . -B cmake-out/build \ + "-DCMAKE_CXX_STANDARD=17" \ "-DCMAKE_TOOLCHAIN_FILE=${vcpkg_root}/scripts/buildsystems/vcpkg.cmake" \ "-DVCPKG_MANIFEST_DIR=ci/etc/oldest-deps" \ "-DVCPKG_FEATURE_FLAGS=versions,manifest" \ @@ -49,4 +50,5 @@ io::log_h2 "Testing" mapfile -t ctest_args < <(ctest::common_args) env -C cmake-out/build ctest "${ctest_args[@]}" -LE "integration-test" -integration::ctest_with_emulators "cmake-out/build" +# TODO(#15947): Passing spanner here skips its test execution. +integration::ctest_with_emulators "cmake-out/build" "spanner" diff --git a/ci/cloudbuild/builds/cmake-single-feature.sh b/ci/cloudbuild/builds/cmake-single-feature.sh index 68ac4a6814723..9e0c9aab07adf 100755 --- a/ci/cloudbuild/builds/cmake-single-feature.sh +++ b/ci/cloudbuild/builds/cmake-single-feature.sh @@ -61,11 +61,13 @@ done for feature in "${features[@]}"; do io::run cmake -S . -B cmake-out/test-only-"${feature}" \ -DGOOGLE_CLOUD_CPP_ENABLE="${feature}" \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_TESTING=OFF io::run check_pkgconfig_relative cmake-out/test-only-"${feature}" io::run cmake -S . -B cmake-out/test-only-"${feature}"-absolute-cmake-install \ -DGOOGLE_CLOUD_CPP_ENABLE="${feature}" \ + -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_INSTALL_INCLUDEDIR=/test-only/include \ -DCMAKE_INSTALL_LIBDIR=/test-only/lib \ -DBUILD_TESTING=OFF diff --git a/ci/cloudbuild/builds/cmake-split-install.sh b/ci/cloudbuild/builds/cmake-split-install.sh index 4c4a10f923e06..99340bcf3dc07 100755 --- a/ci/cloudbuild/builds/cmake-split-install.sh +++ b/ci/cloudbuild/builds/cmake-split-install.sh @@ -42,6 +42,7 @@ io::log_h2 "Building and installing common libraries" # We need a custom build directory mapfile -t core_cmake_args < <(cmake::common_args cmake-out/common-libraries) io::run cmake "${core_cmake_args[@]}" "${install_args[@]}" \ + -DCMAKE_CXX_STANDARD=17 \ -DGOOGLE_CLOUD_CPP_ENABLE="__common__" io::run cmake --build cmake-out/common-libraries io::run cmake --install cmake-out/common-libraries --prefix "${INSTALL_PREFIX}" @@ -50,6 +51,7 @@ io::log_h2 "Building and installing popular libraries" mapfile -t core_cmake_args < <(cmake::common_args cmake-out/popular-libraries) io::run cmake "${core_cmake_args[@]}" "${install_args[@]}" \ -DCMAKE_PREFIX_PATH="${INSTALL_PREFIX}" \ + -DCMAKE_CXX_STANDARD=17 \ -DGOOGLE_CLOUD_CPP_ENABLE="bigtable,pubsub,spanner,storage,storage_grpc,iam,policytroubleshooter" \ -DGOOGLE_CLOUD_CPP_USE_INSTALLED_COMMON=ON io::run cmake --build cmake-out/popular-libraries @@ -60,6 +62,7 @@ io::log_h2 "Building and installing Compute" mapfile -t feature_cmake_args < <(cmake::common_args cmake-out/compute) io::run cmake "${feature_cmake_args[@]}" "${install_args[@]}" \ -DCMAKE_PREFIX_PATH="${INSTALL_PREFIX}" \ + -DCMAKE_CXX_STANDARD=17 \ -DGOOGLE_CLOUD_CPP_USE_INSTALLED_COMMON=ON \ -DGOOGLE_CLOUD_CPP_ENABLE="compute" io::run cmake --build cmake-out/compute @@ -70,6 +73,7 @@ io::log_h2 "Building and installing all features" mapfile -t feature_cmake_args < <(cmake::common_args cmake-out/features) io::run cmake "${feature_cmake_args[@]}" "${install_args[@]}" \ -DCMAKE_PREFIX_PATH="${INSTALL_PREFIX}" \ + -DCMAKE_CXX_STANDARD=17 \ -DGOOGLE_CLOUD_CPP_USE_INSTALLED_COMMON=ON \ -DGOOGLE_CLOUD_CPP_ENABLE="__ga_libraries__,-bigtable,-pubsub,-storage,-storage_grpc,-spanner,-iam,-policytroubleshooter,-compute" io::run cmake --build cmake-out/features diff --git a/ci/cloudbuild/builds/cxx14.sh b/ci/cloudbuild/builds/cxx14.sh deleted file mode 100755 index aa2b7d3136e39..0000000000000 --- a/ci/cloudbuild/builds/cxx14.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -# -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -euo pipefail - -source "$(dirname "$0")/../../lib/init.sh" -source module ci/cloudbuild/builds/lib/cmake.sh -source module ci/cloudbuild/builds/lib/ctest.sh -source module ci/cloudbuild/builds/lib/features.sh -source module ci/cloudbuild/builds/lib/integration.sh -source module ci/lib/io.sh - -export CC=gcc -export CXX=g++ - -mapfile -t cmake_args < <(cmake::common_args) -read -r ENABLED_FEATURES < <(features::always_build_cmake) -# We should test all the GA libraries -ENABLED_FEATURES="${ENABLED_FEATURES},__ga_libraries__" -readonly ENABLED_FEATURES - -io::run cmake "${cmake_args[@]}" \ - -DCMAKE_CXX_STANDARD=14 \ - -DGOOGLE_CLOUD_CPP_ENABLE="${ENABLED_FEATURES}" -io::run cmake --build cmake-out -mapfile -t ctest_args < <(ctest::common_args) -io::run env -C cmake-out ctest "${ctest_args[@]}" -LE "integration-test" - -integration::ctest_with_emulators "cmake-out" diff --git a/ci/cloudbuild/builds/demo-install.sh b/ci/cloudbuild/builds/demo-install.sh index baf0e86030c57..ce889020b2dfb 100755 --- a/ci/cloudbuild/builds/demo-install.sh +++ b/ci/cloudbuild/builds/demo-install.sh @@ -48,6 +48,7 @@ PREFIX="${HOME}/google-cloud-cpp-installed" cmake -S . -B cmake-out \ "${cmake_config_testing_details[@]}" \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DBUILD_TESTING=OFF \ -DGOOGLE_CLOUD_CPP_WITH_MOCKS=OFF \ diff --git a/ci/cloudbuild/builds/development.sh b/ci/cloudbuild/builds/development.sh index 357fb04abb10d..a039434f963a0 100755 --- a/ci/cloudbuild/builds/development.sh +++ b/ci/cloudbuild/builds/development.sh @@ -40,7 +40,7 @@ io::run cmake "${cmake_args[@]}" \ -DCMAKE_CXX_CLANG_TIDY=/usr/local/bin/clang-tidy-wrapper \ -DGOOGLE_CLOUD_CPP_ENABLE_CLANG_ABI_COMPAT_17=ON \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ - -DCMAKE_CXX_STANDARD=14 \ + -DCMAKE_CXX_STANDARD=17 \ -DGOOGLE_CLOUD_CPP_ENABLE="${ENABLED_FEATURES}" io::run cmake --build cmake-out diff --git a/ci/cloudbuild/builds/gcc-oldest.sh b/ci/cloudbuild/builds/gcc-oldest.sh index a781b2295d4a3..fa837b97a6485 100755 --- a/ci/cloudbuild/builds/gcc-oldest.sh +++ b/ci/cloudbuild/builds/gcc-oldest.sh @@ -32,6 +32,8 @@ ENABLED_FEATURES="${ENABLED_FEATURES},compute" readonly ENABLED_FEATURES io::run cmake "${cmake_args[@]}" \ + -DCMAKE_CXX_STANDARD=17 \ + -DCMAKE_CXX_FLAGS="-Wno-error=conversion" \ -DGOOGLE_CLOUD_CPP_ENABLE="${ENABLED_FEATURES}" io::run cmake --build cmake-out mapfile -t ctest_args < <(ctest::common_args) diff --git a/ci/cloudbuild/builds/generate-libraries.sh b/ci/cloudbuild/builds/generate-libraries.sh index f24f299b39581..5a6b503ed77c1 100755 --- a/ci/cloudbuild/builds/generate-libraries.sh +++ b/ci/cloudbuild/builds/generate-libraries.sh @@ -24,6 +24,11 @@ source module ci/lib/io.sh bazel_output_base="$(bazel info output_base)" +# As we support both WORKSPACE and MODULE modes for bazel, we need to determine +# the path to these dependencies dynamically. +read -r protobuf_proto_path < <(find "${bazel_output_base}/external" -name "empty.proto" | sed -nE 's/(.+\/src)\/google\/protobuf\/empty.proto/\1/p') +read -r googleapis_proto_path < <(find "${bazel_output_base}/external" -name "api-index-v1.json" | sed -nE 's/(.+)\/api-index-v1.json/\1/p') + if [ -z "${UPDATED_DISCOVERY_DOCUMENT}" ]; then io::log_h2 "Removing previously generated golden files" git grep -l "Generated by the Codegen C++ plugin" generator/integration_tests/golden | xargs rm @@ -36,8 +41,8 @@ fi io::log_h2 "Running the generator to update the golden files" bazel run --action_env=GOOGLE_CLOUD_CPP_ENABLE_CLOG=yes \ //generator:google-cloud-cpp-codegen -- \ - --protobuf_proto_path="${bazel_output_base}/external/protobuf~/src" \ - --googleapis_proto_path="${bazel_output_base}/external/googleapis~" \ + --protobuf_proto_path="${protobuf_proto_path}" \ + --googleapis_proto_path="${googleapis_proto_path}" \ --golden_proto_path="${PWD}" \ --output_path="${PWD}" \ --update_ci=false \ @@ -49,8 +54,8 @@ if [ -z "${GENERATE_GOLDEN_ONLY}" ]; then io::log_h2 "Running the generator to emit protos from discovery docs" bazel run --action_env=GOOGLE_CLOUD_CPP_ENABLE_CLOG=yes \ //generator:google-cloud-cpp-codegen -- \ - --protobuf_proto_path="${bazel_output_base}"/external/protobuf~/src \ - --googleapis_proto_path="${bazel_output_base}"/external/googleapis~ \ + --protobuf_proto_path="${protobuf_proto_path}" \ + --googleapis_proto_path="${googleapis_proto_path}" \ --discovery_proto_path="${PWD}/protos" \ --output_path="${PROJECT_ROOT}/protos" \ --export_output_path="${PROJECT_ROOT}" \ @@ -81,8 +86,8 @@ if [ -z "${GENERATE_GOLDEN_ONLY}" ]; then io::log_h2 "Running the generator to update the generated libraries" bazel run --action_env=GOOGLE_CLOUD_CPP_ENABLE_CLOG=yes \ //generator:google-cloud-cpp-codegen -- \ - --protobuf_proto_path="${bazel_output_base}"/external/protobuf~/src \ - --googleapis_proto_path="${bazel_output_base}"/external/googleapis~ \ + --protobuf_proto_path="${protobuf_proto_path}" \ + --googleapis_proto_path="${googleapis_proto_path}" \ --discovery_proto_path="${PWD}/protos" \ --output_path="${PROJECT_ROOT}" \ --check_comment_substitutions=true \ diff --git a/ci/cloudbuild/builds/lib/integration.sh b/ci/cloudbuild/builds/lib/integration.sh index 3506c661c860c..b733dc71fca40 100644 --- a/ci/cloudbuild/builds/lib/integration.sh +++ b/ci/cloudbuild/builds/lib/integration.sh @@ -267,10 +267,16 @@ function integration::bazel_with_emulators() { else io::log_h2 "Running generator integration test" bazel_output_base="$(bazel info output_base)" + + # As we support both WORKSPACE and MODULE modes for bazel, we need to determine + # the path to these dependencies dynamically. + read -r protobuf_proto_path < <(find "${bazel_output_base}/external" -name "empty.proto" | sed -nE 's/(.+\/src)\/google\/protobuf\/empty.proto/\1/p') + read -r googleapis_proto_path < <(find "${bazel_output_base}/external" -name "api-index-v1.json" | sed -nE 's/(.+)\/api-index-v1.json/\1/p') + bazel run --action_env=GOOGLE_CLOUD_CPP_ENABLE_CLOG=yes \ //generator:google-cloud-cpp-codegen -- \ - --protobuf_proto_path="${bazel_output_base}/external/protobuf~/src" \ - --googleapis_proto_path="${bazel_output_base}/external/googleapis~" \ + --protobuf_proto_path="${protobuf_proto_path}" \ + --googleapis_proto_path="${googleapis_proto_path}" \ --golden_proto_path="${PWD}" \ --output_path="${PWD}" \ --update_ci=false \ @@ -302,6 +308,8 @@ function integration::ctest_with_emulators() { fi local cmake_out="$1" + local skip_args=("${@:2}") + mapfile -t ctest_args < <(ctest::common_args) # Integration tests are inherently flaky. Make up to three attempts to get the # test passing. @@ -315,9 +323,11 @@ function integration::ctest_with_emulators() { "${PROJECT_ROOT}/google/cloud/storage/ci/${EMULATOR_SCRIPT}" \ "${cmake_out}" "${ctest_args[@]}" -L integration-test-emulator - io::log_h2 "Running Spanner integration tests (with emulator)" - "${PROJECT_ROOT}/google/cloud/spanner/ci/${EMULATOR_SCRIPT}" \ - "${cmake_out}" "${ctest_args[@]}" -L integration-test-emulator + if ! [[ "${skip_args[*]}" =~ "spanner" ]]; then + io::log_h2 "Running Spanner integration tests (with emulator)" + "${PROJECT_ROOT}/google/cloud/spanner/ci/${EMULATOR_SCRIPT}" \ + "${cmake_out}" "${ctest_args[@]}" -L integration-test-emulator + fi io::log_h2 "Running Bigtable integration tests (with emulator)" "google/cloud/bigtable/ci/${EMULATOR_SCRIPT}" \ diff --git a/ci/cloudbuild/builds/lib/quickstart.sh b/ci/cloudbuild/builds/lib/quickstart.sh index 4a148f4d6fc9e..a8f287157e386 100644 --- a/ci/cloudbuild/builds/lib/quickstart.sh +++ b/ci/cloudbuild/builds/lib/quickstart.sh @@ -31,6 +31,19 @@ source module ci/cloudbuild/builds/lib/cmake.sh source module ci/etc/quickstart-config.sh source module ci/lib/io.sh +quickstart_program="" + +function cleanup() { + local exit_status=$? + io::log_h2 "cleanup on EXIT with exit_status=${exit_status}" + if ((exit_status != 0)); then + io::run find . -name 'core' + gdb --exec="${quickstart_program}" --core=./core --eval-command="bt full" + fi +} + +trap 'cleanup' INT TERM EXIT + # Builds the CMake and Makefile quickstart programs but DOES NOT RUN THEM. This # is a useful way to test that the artifacts installed by `google-cloud-cpp` # work for compilation. This function requires a single argument specifying the @@ -58,6 +71,8 @@ function quickstart::build_one_quickstart() { local configure_args=( "-S" "${src_dir}" "-B" "${cmake_bin_dir}" + -DCMAKE_CXX_STANDARD=17 + -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH="${prefix}" ) if command -v /usr/local/bin/sccache >/dev/null 2>&1; then @@ -68,12 +83,12 @@ function quickstart::build_one_quickstart() { cmake "${configure_args[@]}" cmake --build "${cmake_bin_dir}" - echo - io::log "[ Make ]" - local makefile_bin_dir="${PROJECT_ROOT}/cmake-out/quickstart/makefile-${bin_dir_suffix}" - mkdir -p "${makefile_bin_dir}" - PKG_CONFIG_PATH="${prefix}/lib64/pkgconfig:${prefix}/lib/pkgconfig:${PKG_CONFIG_PATH:-}" \ - make -C "${src_dir}" BIN="${makefile_bin_dir}" + # echo + # io::log "[ Make ]" + # local makefile_bin_dir="${PROJECT_ROOT}/cmake-out/quickstart/makefile-${bin_dir_suffix}" + # mkdir -p "${makefile_bin_dir}" + # PKG_CONFIG_PATH="${prefix}/lib64/pkgconfig:${prefix}/lib/pkgconfig:${PKG_CONFIG_PATH:-}" \ + # CXXFLAGS="--std=c++17" make -C "${src_dir}" BIN="${makefile_bin_dir}" } # Runs the CMake and Makefile quickstart programs but DOES NOT COMPILE THEM. @@ -87,6 +102,8 @@ function quickstart::build_one_quickstart() { # quickstart::build_cmake_and_make "/usr/local" # quickstart::run_cmake_and_make "/usr/local" function quickstart::run_cmake_and_make() { + io::run ulimit -c unlimited + io::run ulimit -a local prefix="$1" for lib in $(quickstart::libraries); do io::log_h2 "Running quickstart: ${lib}" @@ -102,13 +119,18 @@ function quickstart::run_gcs_grpc_quickstart() { io::log "[ CMake ]" local cmake_bin_dir="${PROJECT_ROOT}/cmake-out/quickstart/cmake-storage_grpc" - "${cmake_bin_dir}/quickstart_grpc" "${run_args[@]}" - echo - io::log "[ Make ]" - local makefile_bin_dir="${PROJECT_ROOT}/cmake-out/quickstart/makefile-storage_grpc" - LD_LIBRARY_PATH="${prefix}/lib64:${prefix}/lib:${LD_LIBRARY_PATH:-}" \ - "${makefile_bin_dir}/quickstart_grpc" "${run_args[@]}" + if command -v /usr/bin/valgrind >/dev/null 2>&1; then + io::run valgrind --leak-check=full "${cmake_bin_dir}/quickstart_grpc" "${run_args[@]}" + else + io::run env MALLOC_CHECK_=3 "${cmake_bin_dir}/quickstart_grpc" "${run_args[@]}" + fi + + # echo + # io::log "[ Make ]" + # local makefile_bin_dir="${PROJECT_ROOT}/cmake-out/quickstart/makefile-storage_grpc" + # LD_LIBRARY_PATH="${prefix}/lib64:${prefix}/lib:${LD_LIBRARY_PATH:-}" \ + # "${makefile_bin_dir}/quickstart_grpc" "${run_args[@]}" } function quickstart::run_one_quickstart() { @@ -119,10 +141,15 @@ function quickstart::run_one_quickstart() { io::log "[ CMake ]" local cmake_bin_dir="${PROJECT_ROOT}/cmake-out/quickstart/cmake-${bin_dir_suffix}" - io::run "${cmake_bin_dir}/quickstart" "${run_args[@]}" + quickstart_program="${cmake_bin_dir}/quickstart" + if command -v /usr/bin/valgrind >/dev/null 2>&1; then + io::run valgrind --leak-check=full "${cmake_bin_dir}/quickstart" "${run_args[@]}" + else + io::run env MALLOC_CHECK_=3 "${cmake_bin_dir}/quickstart" "${run_args[@]}" + fi - echo - io::log "[ Make ]" - local makefile_bin_dir="${PROJECT_ROOT}/cmake-out/quickstart/makefile-${bin_dir_suffix}" - io::run env LD_LIBRARY_PATH="${prefix}/lib64:${prefix}/lib:${LD_LIBRARY_PATH:-}" "${makefile_bin_dir}/quickstart" "${run_args[@]}" + # echo + # io::log "[ Make ]" + # local makefile_bin_dir="${PROJECT_ROOT}/cmake-out/quickstart/makefile-${bin_dir_suffix}" + # io::run env LD_LIBRARY_PATH="${prefix}/lib64:${prefix}/lib:${LD_LIBRARY_PATH:-}" "${makefile_bin_dir}/quickstart" "${run_args[@]}" } diff --git a/ci/cloudbuild/builds/m32.sh b/ci/cloudbuild/builds/m32.sh index bac62106191d3..6db88dafa98f1 100755 --- a/ci/cloudbuild/builds/m32.sh +++ b/ci/cloudbuild/builds/m32.sh @@ -35,6 +35,7 @@ readonly ENABLED_FEATURES # This is the build to test with -m32, which requires a toolchain file. io::run cmake "${cmake_args[@]}" \ "--toolchain" "${PROJECT_ROOT}/ci/etc/m32-toolchain.cmake" \ + -DCMAKE_CXX_STANDARD=17 \ -DGOOGLE_CLOUD_CPP_ENABLE="${ENABLED_FEATURES}" io::run cmake --build cmake-out mapfile -t ctest_args < <(ctest::common_args) diff --git a/ci/cloudbuild/builds/noex.sh b/ci/cloudbuild/builds/noex.sh index 4cffa4618ddcc..2cab6111b68da 100755 --- a/ci/cloudbuild/builds/noex.sh +++ b/ci/cloudbuild/builds/noex.sh @@ -32,6 +32,7 @@ readonly ENABLED_FEATURES io::run cmake "${cmake_args[@]}" \ -DGOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS=NO \ + -DCMAKE_CXX_STANDARD=17 \ -DGOOGLE_CLOUD_CPP_ENABLE="${ENABLED_FEATURES}" io::run cmake --build cmake-out mapfile -t ctest_args < <(ctest::common_args) diff --git a/ci/cloudbuild/builds/otel-disabled-bazel.sh b/ci/cloudbuild/builds/otel-disabled-bazel.sh deleted file mode 100755 index 63901b1811069..0000000000000 --- a/ci/cloudbuild/builds/otel-disabled-bazel.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -# -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -euo pipefail - -source "$(dirname "$0")/../../lib/init.sh" -source module ci/cloudbuild/builds/lib/bazel.sh -source module ci/cloudbuild/builds/lib/cloudcxxrc.sh - -export CC=clang -export CXX=clang++ - -mapfile -t args < <(bazel::common_args) -args+=("--//:enable_opentelemetry=false") -# Note that we do not ignore `//:opentelemetry`, as the exporters should be -# usable whether google-cloud-cpp is built with OpenTelemetry or not. -ignore=( - # These integration tests use opentelemetry matchers out of convenience. - "-//google/cloud/opentelemetry/integration_tests/..." - # The quickstart demonstrates client tracing instrumentation, and thus it - # depends on google-cloud-cpp being built with OpenTelemetry. - "-//google/cloud/opentelemetry/quickstart/..." -) -bazel test "${args[@]}" --test_tag_filters=-integration-test -- "${BAZEL_TARGETS[@]}" "${ignore[@]}" diff --git a/ci/cloudbuild/builds/publish-docs.sh b/ci/cloudbuild/builds/publish-docs.sh index 5f40ea6504bdb..e1e3d7275a947 100755 --- a/ci/cloudbuild/builds/publish-docs.sh +++ b/ci/cloudbuild/builds/publish-docs.sh @@ -40,6 +40,7 @@ fi doc_args=( "-DCMAKE_BUILD_TYPE=Debug" + "-DCMAKE_CXX_STANDARD=17" "-DGOOGLE_CLOUD_CPP_GENERATE_DOXYGEN=ON" "-DGOOGLE_CLOUD_CPP_INTERNAL_DOCFX=ON" "-DGOOGLE_CLOUD_CPP_ENABLE=${ENABLED_FEATURES}" diff --git a/ci/cloudbuild/builds/quickstart-bazel.sh b/ci/cloudbuild/builds/quickstart-bazel.sh index 3a86351e7a5c1..db9664127769f 100755 --- a/ci/cloudbuild/builds/quickstart-bazel.sh +++ b/ci/cloudbuild/builds/quickstart-bazel.sh @@ -27,6 +27,6 @@ export CXX=g++ mapfile -t args < <(bazel::common_args) for lib in $(quickstart::libraries); do io::log_h2 "Running Bazel quickstart for ${lib}" - env -C "${PROJECT_ROOT}/google/cloud/${lib}/quickstart" \ + io::run env -C "${PROJECT_ROOT}/google/cloud/${lib}/quickstart" \ bazel build "${args[@]}" :quickstart done diff --git a/ci/cloudbuild/builds/quickstart-cmake.sh b/ci/cloudbuild/builds/quickstart-cmake.sh index 8a5baa15a840e..64a4ecc667b7b 100755 --- a/ci/cloudbuild/builds/quickstart-cmake.sh +++ b/ci/cloudbuild/builds/quickstart-cmake.sh @@ -60,6 +60,7 @@ mapfile -t features < <( feature_list="$(printf ";%s" "${features[@]}")" feature_list="${feature_list:1}" io::run cmake -G Ninja \ + -DCMAKE_CXX_STANDARD=17 \ -S "${PROJECT_ROOT}/ci/verify_quickstart" \ -B "${PROJECT_ROOT}/cmake-out/quickstart" \ -DCMAKE_TOOLCHAIN_FILE="${vcpkg_dir}/scripts/buildsystems/vcpkg.cmake" \ diff --git a/ci/cloudbuild/builds/quickstart-production.sh b/ci/cloudbuild/builds/quickstart-production.sh index 73f226bb73a1d..ea63c181e89fd 100755 --- a/ci/cloudbuild/builds/quickstart-production.sh +++ b/ci/cloudbuild/builds/quickstart-production.sh @@ -35,6 +35,7 @@ readonly ENABLED_FEATURES io::run cmake "${cmake_args[@]}" \ -DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \ + -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_INSTALL_MESSAGE=NEVER \ -DBUILD_SHARED_LIBS=ON \ -DGOOGLE_CLOUD_CPP_ENABLE="${ENABLED_FEATURES}" diff --git a/ci/cloudbuild/builds/scan-build.sh b/ci/cloudbuild/builds/scan-build.sh index 7c71cd3891487..2846f0829d34c 100755 --- a/ci/cloudbuild/builds/scan-build.sh +++ b/ci/cloudbuild/builds/scan-build.sh @@ -38,5 +38,6 @@ scan_build=( "${HOME}/scan-build" ) io::run "${scan_build[@]}" cmake "${cmake_args[@]}" \ + -DCMAKE_CXX_STANDARD=17 \ -DGOOGLE_CLOUD_CPP_ENABLE="${ENABLED_FEATURES}" io::run "${scan_build[@]}" cmake --build cmake-out diff --git a/ci/cloudbuild/builds/shared.sh b/ci/cloudbuild/builds/shared.sh index 26ecce68ed514..9bcd6a6243d66 100755 --- a/ci/cloudbuild/builds/shared.sh +++ b/ci/cloudbuild/builds/shared.sh @@ -33,6 +33,7 @@ readonly ENABLED_FEATURES io::run cmake "${cmake_args[@]}" \ -DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}" \ + -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_INSTALL_MESSAGE=NEVER \ -DBUILD_SHARED_LIBS=ON \ -DGOOGLE_CLOUD_CPP_ENABLE="${ENABLED_FEATURES}" diff --git a/ci/cloudbuild/dockerfiles/checkers.Dockerfile b/ci/cloudbuild/dockerfiles/checkers.Dockerfile index 4a10b60b09d1d..c13831ef34fcc 100644 --- a/ci/cloudbuild/dockerfiles/checkers.Dockerfile +++ b/ci/cloudbuild/dockerfiles/checkers.Dockerfile @@ -54,6 +54,6 @@ RUN pip3 install mdformat==0.7.19 \ mdformat-frontmatter==2.0.8 \ mdformat-footnote==0.1.1 -RUN curl -o /usr/bin/bazelisk -sSL "https://github.com/bazelbuild/bazelisk/releases/download/v1.28.1/bazelisk-linux-${ARCH}" && \ +RUN curl -o /usr/bin/bazelisk -sSL "https://github.com/bazelbuild/bazelisk/releases/download/v1.27.0/bazelisk-linux-${ARCH}" && \ chmod +x /usr/bin/bazelisk && \ ln -s /usr/bin/bazelisk /usr/bin/bazel diff --git a/ci/cloudbuild/dockerfiles/demo-alpine-stable.Dockerfile b/ci/cloudbuild/dockerfiles/demo-alpine-stable.Dockerfile index 3b27a85bc7ae8..11b24a631b7a4 100644 --- a/ci/cloudbuild/dockerfiles/demo-alpine-stable.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-alpine-stable.Dockerfile @@ -58,7 +58,7 @@ ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig # ```bash RUN apk update && \ - apk add abseil-cpp-dev crc32c-dev c-ares-dev curl-dev grpc-dev \ + apk add abseil-cpp-dev c-ares-dev curl-dev grpc-dev \ protobuf-dev nlohmann-json openssl-dev re2-dev # ``` @@ -71,14 +71,14 @@ RUN apk update && \ # ```bash WORKDIR /var/tmp/build/opentelemetry-cpp -RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20.0.tar.gz | \ +RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DWITH_EXAMPLES=OFF \ - -DWITH_STL=CXX14 \ - -DWITH_ABSEIL=ON \ + -DWITH_STL=CXX17 \ -DBUILD_TESTING=OFF \ -DOPENTELEMETRY_INSTALL=ON \ -DOPENTELEMETRY_ABI_VERSION_NO=2 \ @@ -88,6 +88,8 @@ RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20 ## [DONE packaging.md] +RUN apk update && apk add gdb + # Speed up the CI builds using sccache. WORKDIR /var/tmp/sccache RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-x86_64-unknown-linux-musl.tar.gz | \ diff --git a/ci/cloudbuild/dockerfiles/demo-debian-bookworm.Dockerfile b/ci/cloudbuild/dockerfiles/demo-debian-bookworm.Dockerfile index 4ed72ae9a418b..8188ad6d3bdfb 100644 --- a/ci/cloudbuild/dockerfiles/demo-debian-bookworm.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-debian-bookworm.Dockerfile @@ -58,26 +58,19 @@ RUN curl -fsSL https://distfiles.ariadne.space/pkgconf/pkgconf-2.2.0.tar.gz | \ ENV PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig # ``` -# #### crc32c - -# The project depends on the Crc32c library, we need to compile this from -# source: - -# ```bash -WORKDIR /var/tmp/build/crc32c -RUN curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \ +# #### abseil +WORKDIR /var/tmp/build/abseil-cpp +RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=yes \ - -DCRC32C_BUILD_TESTS=OFF \ - -DCRC32C_BUILD_BENCHMARKS=OFF \ - -DCRC32C_USE_GLOG=OFF \ - -S . -B cmake-out && \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ + -DABSL_BUILD_TESTING=OFF \ + -DBUILD_SHARED_LIBS=yes \ + -S . -B cmake-out && \ cmake --build cmake-out -- -j ${NCPU:-4} && \ cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ ldconfig -# ``` # #### opentelemetry-cpp @@ -88,14 +81,14 @@ RUN curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \ # ```bash WORKDIR /var/tmp/build/opentelemetry-cpp -RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20.0.tar.gz | \ +RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DWITH_EXAMPLES=OFF \ - -DWITH_STL=CXX14 \ - -DWITH_ABSEIL=ON \ + -DWITH_STL=CXX17 \ -DBUILD_TESTING=OFF \ -DOPENTELEMETRY_INSTALL=ON \ -DOPENTELEMETRY_ABI_VERSION_NO=2 \ @@ -106,6 +99,9 @@ RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20 ## [DONE packaging.md] +RUN apt-get update && \ + apt-get --no-install-recommends install -y gdb + WORKDIR /var/tmp/sccache RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-x86_64-unknown-linux-musl.tar.gz | \ tar -zxf - --strip-components=1 && \ diff --git a/ci/cloudbuild/dockerfiles/demo-debian-bullseye.Dockerfile b/ci/cloudbuild/dockerfiles/demo-debian-bullseye.Dockerfile index 7d847693157ae..87014e33217db 100644 --- a/ci/cloudbuild/dockerfiles/demo-debian-bullseye.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-debian-bullseye.Dockerfile @@ -22,26 +22,27 @@ ARG NCPU=4 # ```bash RUN apt-get update && \ apt-get --no-install-recommends install -y apt-transport-https apt-utils \ - automake build-essential ca-certificates cmake curl git \ + automake build-essential ca-certificates curl git \ gcc g++ libc-ares-dev libc-ares2 libcurl4-openssl-dev \ libssl-dev m4 make ninja-build pkg-config tar wget zlib1g-dev # ``` -# #### Abseil +# #### Install CMake v3.22 +WORKDIR /var/tmp/build/cmake +RUN curl -fsSL https://github.com/Kitware/cmake/archive/v3.22.3.tar.gz | \ + tar -xzf - --strip-components=1 && \ + ./bootstrap && make -j ${NCPU:-4} && make install -# Debian 11 ships with Abseil==20200923.3. Unfortunately, the current gRPC -# version needs Abseil >= 20210324. Enabling `ABSL_PROPAGATE_CXX_STD` -# propagates the version of C++ used to compile Abseil to anything that depends -# on Abseil. +# #### Abseil # ```bash WORKDIR /var/tmp/build/abseil-cpp -RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \ +RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DABSL_BUILD_TESTING=OFF \ - -DABSL_PROPAGATE_CXX_STD=ON \ -DBUILD_SHARED_LIBS=yes \ -S . -B cmake-out && \ cmake --build cmake-out -- -j ${NCPU:-4} && \ @@ -49,27 +50,6 @@ RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | ldconfig # ``` -# #### crc32c - -# The project depends on the Crc32c library, we need to compile this from -# source: - -# ```bash -WORKDIR /var/tmp/build/crc32c -RUN curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=yes \ - -DCRC32C_BUILD_TESTS=OFF \ - -DCRC32C_BUILD_BENCHMARKS=OFF \ - -DCRC32C_USE_GLOG=OFF \ - -S . -B cmake-out && \ - cmake --build cmake-out -- -j ${NCPU:-4} && \ - cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ - ldconfig -# ``` - # #### nlohmann_json library # Debian 11 also ships with nlohmann-json==3.9.1, which is recent enough for our needs: @@ -88,10 +68,11 @@ RUN apt-get update && \ # ```bash WORKDIR /var/tmp/build/protobuf -RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v29.4.tar.gz | \ +RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v33.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -Dprotobuf_BUILD_TESTS=OFF \ -Dprotobuf_ABSL_PROVIDER=package \ @@ -121,14 +102,13 @@ RUN curl -fsSL https://github.com/google/re2/archive/2025-07-22.tar.gz | \ # #### gRPC -# Finally, we build gRPC from source: - # ```bash WORKDIR /var/tmp/build/grpc -RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.69.0.tar.gz | \ +RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DgRPC_INSTALL=ON \ -DgRPC_BUILD_TESTS=OFF \ @@ -152,14 +132,14 @@ RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.69.0.tar.gz | \ # ```bash WORKDIR /var/tmp/build/opentelemetry-cpp -RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20.0.tar.gz | \ +RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DWITH_EXAMPLES=OFF \ - -DWITH_STL=CXX14 \ - -DWITH_ABSEIL=ON \ + -DWITH_STL=CXX17 \ -DBUILD_TESTING=OFF \ -DOPENTELEMETRY_INSTALL=ON \ -DOPENTELEMETRY_ABI_VERSION_NO=2 \ @@ -170,6 +150,9 @@ RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20 ## [DONE packaging.md] +RUN apt-get update && \ + apt-get --no-install-recommends install -y gdb + WORKDIR /var/tmp/sccache RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-x86_64-unknown-linux-musl.tar.gz | \ tar -zxf - --strip-components=1 && \ diff --git a/ci/cloudbuild/dockerfiles/demo-fedora.Dockerfile b/ci/cloudbuild/dockerfiles/demo-fedora.Dockerfile index 9e63de4fad809..30dc5dc562be5 100644 --- a/ci/cloudbuild/dockerfiles/demo-fedora.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-fedora.Dockerfile @@ -31,7 +31,7 @@ RUN dnf makecache && \ # ```bash RUN dnf makecache && \ dnf install -y protobuf-compiler protobuf-devel grpc-cpp grpc-devel \ - json-devel libcurl-devel google-crc32c-devel openssl-devel + json-devel libcurl-devel openssl-devel # ``` # #### Patching pkg-config @@ -54,14 +54,6 @@ RUN curl -fsSL https://distfiles.ariadne.space/pkgconf/pkgconf-2.2.0.tar.gz | \ ldconfig && cd /var/tmp && rm -fr build # ``` -# Older versions of Fedora hard-code RE2 to use C++11. It was fixed starting -# with Fedora:38. If you using Fedora >= 38 or you are not planning to use -# `pkg-config(1)` you can ignore this step. Alternatively, you can install RE2 -# and gRPC from source. -# ``` -# sed -i 's/-std=c\+\+11 //' /usr/lib64/pkgconfig/re2.pc -# ``` - # The following steps will install libraries and tools in `/usr/local`. By # default, pkgconf does not search in these directories. We need to explicitly # set the search path. @@ -79,14 +71,14 @@ ENV PKG_CONFIG_PATH=/usr/local/share/pkgconfig:/usr/lib64/pkgconfig:/usr/local/l # ```bash WORKDIR /var/tmp/build/opentelemetry-cpp -RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20.0.tar.gz | \ +RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DWITH_EXAMPLES=OFF \ - -DWITH_STL=CXX14 \ - -DWITH_ABSEIL=ON \ + -DWITH_STL=CXX17 \ -DBUILD_TESTING=OFF \ -DOPENTELEMETRY_INSTALL=ON \ -DOPENTELEMETRY_ABI_VERSION_NO=2 \ @@ -97,6 +89,8 @@ RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20 ## [DONE packaging.md] +RUN dnf makecache && dnf install -y gdb + WORKDIR /var/tmp/sccache RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-x86_64-unknown-linux-musl.tar.gz | \ tar -zxf - --strip-components=1 && \ diff --git a/ci/cloudbuild/dockerfiles/demo-opensuse-leap.Dockerfile b/ci/cloudbuild/dockerfiles/demo-opensuse-leap.Dockerfile index 5e07d8be4d975..3ec1385febf22 100644 --- a/ci/cloudbuild/dockerfiles/demo-opensuse-leap.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-opensuse-leap.Dockerfile @@ -27,7 +27,7 @@ ARG NCPU=4 # ```bash RUN zypper refresh && \ zypper install --allow-downgrade -y automake cmake curl \ - gcc gcc-c++ gcc8 gcc8-c++ git gzip libtool make patch tar wget + gcc8 gcc8-c++ git gzip libtool make patch tar wget # ``` # Install some of the dependencies for `google-cloud-cpp`. @@ -35,7 +35,7 @@ RUN zypper refresh && \ # ```bash RUN zypper refresh && \ zypper install --allow-downgrade -y abseil-cpp-devel c-ares-devel \ - libcurl-devel libopenssl-devel libcrc32c-devel nlohmann_json-devel \ + libcurl-devel libopenssl-devel nlohmann_json-devel \ grpc-devel libprotobuf-devel # ``` @@ -50,23 +50,25 @@ ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig ENV PATH=/usr/local/bin:${PATH} # ``` +# Use the following environment variables to configure the compiler used by +# CMake. +ENV CC=gcc-8 +ENV CXX=g++-8 + # #### opentelemetry-cpp -# The project has an **optional** dependency on the OpenTelemetry library. -# We recommend installing this library because: -# - the dependency will become required in the google-cloud-cpp v3.x series. -# - it is needed to produce distributed traces of the library. +# The project has a dependency on the OpenTelemetry library. # ```bash WORKDIR /var/tmp/build/opentelemetry-cpp -RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20.0.tar.gz | \ +RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DWITH_EXAMPLES=OFF \ - -DWITH_STL=CXX14 \ - -DWITH_ABSEIL=ON \ + -DWITH_STL=CXX17 \ -DBUILD_TESTING=OFF \ -DOPENTELEMETRY_INSTALL=ON \ -DOPENTELEMETRY_ABI_VERSION_NO=2 \ @@ -75,15 +77,11 @@ RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20 ldconfig # ``` -# Use the following environment variables to configure the compiler used by -# CMake. - -ENV CXX=g++-8 - -ENV CC=gcc-8 - ## [DONE packaging.md] +RUN zypper refresh && \ + zypper install --allow-downgrade -y gdb + WORKDIR /var/tmp/sccache RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-x86_64-unknown-linux-musl.tar.gz | \ tar -zxf - --strip-components=1 && \ diff --git a/ci/cloudbuild/dockerfiles/demo-rockylinux-9.Dockerfile b/ci/cloudbuild/dockerfiles/demo-rockylinux-9.Dockerfile index 6c97967e70375..3d36beceb797b 100644 --- a/ci/cloudbuild/dockerfiles/demo-rockylinux-9.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-rockylinux-9.Dockerfile @@ -68,19 +68,14 @@ ENV PATH=/usr/local/bin:${PATH} # #### Abseil -# Rocky Linux 9 includes a package for Abseil, unfortunately, this package is -# incomplete, as it lacks the CMake support files for it. We need to compile -# Abseiil from source. Enabling `ABSL_PROPAGATE_CXX_STD` propagates the version -# of C++ used to compile Abseil to anything that depends on Abseil. - # ```bash WORKDIR /var/tmp/build/abseil-cpp -RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \ +RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DABSL_BUILD_TESTING=OFF \ - -DABSL_PROPAGATE_CXX_STD=ON \ -DBUILD_SHARED_LIBS=yes \ -S . -B cmake-out && \ cmake --build cmake-out -- -j ${NCPU:-4} && \ @@ -96,10 +91,11 @@ RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | # ```bash WORKDIR /var/tmp/build/protobuf -RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v29.4.tar.gz | \ +RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v33.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -Dprotobuf_BUILD_TESTS=OFF \ -Dprotobuf_ABSL_PROVIDER=package \ @@ -137,7 +133,7 @@ RUN curl -fsSL https://github.com/google/re2/archive/2025-07-22.tar.gz | \ # ```bash WORKDIR /var/tmp/build/grpc -RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.69.0.tar.gz | \ +RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_CXX_STANDARD=17 \ @@ -157,27 +153,6 @@ RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.69.0.tar.gz | \ ldconfig # ``` -# #### crc32c - -# The project depends on the Crc32c library, we need to compile this from -# source: - -# ```bash -WORKDIR /var/tmp/build/crc32c -RUN curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=yes \ - -DCRC32C_BUILD_TESTS=OFF \ - -DCRC32C_BUILD_BENCHMARKS=OFF \ - -DCRC32C_USE_GLOG=OFF \ - -S . -B cmake-out && \ - cmake --build cmake-out -- -j ${NCPU:-4} && \ - cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ - ldconfig -# ``` - # #### nlohmann_json library # The project depends on the nlohmann_json library. We use CMake to @@ -208,14 +183,14 @@ RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.3.tar.gz | \ # ```bash WORKDIR /var/tmp/build/opentelemetry-cpp -RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20.0.tar.gz | \ +RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DWITH_EXAMPLES=OFF \ - -DWITH_STL=CXX14 \ - -DWITH_ABSEIL=ON \ + -DWITH_STL=CXX17 \ -DBUILD_TESTING=OFF \ -DOPENTELEMETRY_INSTALL=ON \ -DOPENTELEMETRY_ABI_VERSION_NO=2 \ @@ -226,6 +201,8 @@ RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20 ## [DONE packaging.md] +RUN dnf makecache && dnf update -y && dnf install -y gdb + WORKDIR /var/tmp/sccache RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-x86_64-unknown-linux-musl.tar.gz | \ tar -zxf - --strip-components=1 && \ diff --git a/ci/cloudbuild/dockerfiles/demo-ubuntu-24.04.Dockerfile b/ci/cloudbuild/dockerfiles/demo-ubuntu-24.04.Dockerfile index 8f14cae6f71fd..c45d0b9797ee0 100644 --- a/ci/cloudbuild/dockerfiles/demo-ubuntu-24.04.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-ubuntu-24.04.Dockerfile @@ -62,27 +62,18 @@ RUN curl -fsSL https://distfiles.ariadne.space/pkgconf/pkgconf-2.2.0.tar.gz | \ RUN ln -s /usr/bin/pkgconf /usr/bin/pkg-config # ``` - -# #### crc32c - -# The project depends on the Crc32c library, we need to compile this from -# source: - -# ```bash -WORKDIR /var/tmp/build/crc32c -RUN curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \ +# #### abseil +WORKDIR /var/tmp/build/abseil-cpp +RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=yes \ - -DCRC32C_BUILD_TESTS=OFF \ - -DCRC32C_BUILD_BENCHMARKS=OFF \ - -DCRC32C_USE_GLOG=OFF \ - -S . -B cmake-out && \ + -DCMAKE_BUILD_TYPE=Release \ + -DABSL_BUILD_TESTING=OFF \ + -DBUILD_SHARED_LIBS=yes \ + -S . -B cmake-out && \ cmake --build cmake-out -- -j ${NCPU:-4} && \ cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ ldconfig -# ``` # #### opentelemetry-cpp @@ -93,14 +84,13 @@ RUN curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \ # ```bash WORKDIR /var/tmp/build/opentelemetry-cpp -RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20.0.tar.gz | \ +RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_SHARED_LIBS=yes \ -DWITH_EXAMPLES=OFF \ - -DWITH_STL=CXX14 \ - -DWITH_ABSEIL=ON \ + -DWITH_STL=CXX17 \ -DBUILD_TESTING=OFF \ -DOPENTELEMETRY_INSTALL=ON \ -DOPENTELEMETRY_ABI_VERSION_NO=2 \ @@ -111,6 +101,9 @@ RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20 ## [DONE packaging.md] +RUN apt-get update && \ + apt-get --no-install-recommends install -y gdb + WORKDIR /var/tmp/sccache RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-x86_64-unknown-linux-musl.tar.gz | \ tar -zxf - --strip-components=1 && \ diff --git a/ci/cloudbuild/dockerfiles/demo-ubuntu-focal.Dockerfile b/ci/cloudbuild/dockerfiles/demo-ubuntu-focal.Dockerfile index f0c9d4934fdba..ddd376947b756 100644 --- a/ci/cloudbuild/dockerfiles/demo-ubuntu-focal.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-ubuntu-focal.Dockerfile @@ -30,18 +30,14 @@ RUN apt-get update && \ # #### Abseil -# We need a recent version of Abseil. Enabling `ABSL_PROPAGATE_CXX_STD` -# propagates the version of C++ used to compile Abseil to anything that depends -# on Abseil. - # ```bash WORKDIR /var/tmp/build/abseil-cpp -RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \ +RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DABSL_BUILD_TESTING=OFF \ - -DABSL_PROPAGATE_CXX_STD=ON \ -DBUILD_SHARED_LIBS=yes \ -S . -B cmake-out && \ cmake --build cmake-out -- -j ${NCPU:-4} && \ @@ -56,10 +52,11 @@ RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | # ```bash WORKDIR /var/tmp/build/protobuf -RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v29.4.tar.gz | \ +RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v33.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -Dprotobuf_BUILD_TESTS=OFF \ -Dprotobuf_ABSL_PROVIDER=package \ @@ -95,10 +92,11 @@ RUN curl -fsSL https://github.com/google/re2/archive/2025-07-22.tar.gz | \ # ```bash WORKDIR /var/tmp/build/grpc -RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.69.0.tar.gz | \ +RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DgRPC_INSTALL=ON \ -DgRPC_BUILD_TESTS=OFF \ @@ -114,27 +112,6 @@ RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.69.0.tar.gz | \ ldconfig # ``` -# #### crc32c - -# The project depends on the Crc32c library, we need to compile this from -# source: - -# ```bash -WORKDIR /var/tmp/build/crc32c -RUN curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=yes \ - -DCRC32C_BUILD_TESTS=OFF \ - -DCRC32C_BUILD_BENCHMARKS=OFF \ - -DCRC32C_USE_GLOG=OFF \ - -S . -B cmake-out && \ - cmake --build cmake-out -- -j ${NCPU:-4} && \ - cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ - ldconfig -# ``` - # #### nlohmann_json library # The project depends on the nlohmann_json library. We use CMake to @@ -165,14 +142,14 @@ RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.3.tar.gz | \ # ```bash WORKDIR /var/tmp/build/opentelemetry-cpp -RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20.0.tar.gz | \ +RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DWITH_EXAMPLES=OFF \ - -DWITH_STL=CXX14 \ - -DWITH_ABSEIL=ON \ + -DWITH_STL=CXX17 \ -DBUILD_TESTING=OFF \ -DOPENTELEMETRY_INSTALL=ON \ -DOPENTELEMETRY_ABI_VERSION_NO=2 \ @@ -183,6 +160,9 @@ RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20 ## [DONE packaging.md] +RUN apt-get update && \ + apt-get --no-install-recommends install -y gdb + WORKDIR /var/tmp/sccache RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-x86_64-unknown-linux-musl.tar.gz | \ tar -zxf - --strip-components=1 && \ diff --git a/ci/cloudbuild/dockerfiles/demo-ubuntu-jammy.Dockerfile b/ci/cloudbuild/dockerfiles/demo-ubuntu-jammy.Dockerfile index 1f5d6c164c893..d69220515d2a2 100644 --- a/ci/cloudbuild/dockerfiles/demo-ubuntu-jammy.Dockerfile +++ b/ci/cloudbuild/dockerfiles/demo-ubuntu-jammy.Dockerfile @@ -30,18 +30,14 @@ RUN apt-get update && \ # #### Abseil -# We need a recent version of Abseil. Enabling `ABSL_PROPAGATE_CXX_STD` -# propagates the version of C++ used to compile Abseil to anything that depends -# on Abseil. - # ```bash WORKDIR /var/tmp/build/abseil-cpp -RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \ +RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DABSL_BUILD_TESTING=OFF \ - -DABSL_PROPAGATE_CXX_STD=ON \ -DBUILD_SHARED_LIBS=yes \ -S . -B cmake-out && \ cmake --build cmake-out -- -j ${NCPU:-4} && \ @@ -56,10 +52,11 @@ RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | # ```bash WORKDIR /var/tmp/build/protobuf -RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v29.4.tar.gz | \ +RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v33.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -Dprotobuf_BUILD_TESTS=OFF \ -Dprotobuf_ABSL_PROVIDER=package \ @@ -76,10 +73,11 @@ RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v29.4.tar.gz # ```bash WORKDIR /var/tmp/build/grpc -RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.69.0.tar.gz | \ +RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DgRPC_INSTALL=ON \ -DgRPC_BUILD_TESTS=OFF \ @@ -95,27 +93,6 @@ RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.69.0.tar.gz | \ ldconfig # ``` -# #### crc32c - -# The project depends on the Crc32c library, we need to compile this from -# source: - -# ```bash -WORKDIR /var/tmp/build/crc32c -RUN curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=yes \ - -DCRC32C_BUILD_TESTS=OFF \ - -DCRC32C_BUILD_BENCHMARKS=OFF \ - -DCRC32C_USE_GLOG=OFF \ - -S . -B cmake-out && \ - cmake --build cmake-out -- -j ${NCPU:-4} && \ - cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ - ldconfig -# ``` - # #### nlohmann_json library # The project depends on the nlohmann_json library. We use CMake to @@ -146,14 +123,14 @@ RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.3.tar.gz | \ # ```bash WORKDIR /var/tmp/build/opentelemetry-cpp -RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20.0.tar.gz | \ +RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DWITH_EXAMPLES=OFF \ - -DWITH_STL=CXX14 \ - -DWITH_ABSEIL=ON \ + -DWITH_STL=CXX17 \ -DBUILD_TESTING=OFF \ -DOPENTELEMETRY_INSTALL=ON \ -DOPENTELEMETRY_ABI_VERSION_NO=2 \ @@ -164,6 +141,9 @@ RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20 ## [DONE packaging.md] +RUN apt-get update && \ + apt-get --no-install-recommends install -y gdb + WORKDIR /var/tmp/sccache RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-x86_64-unknown-linux-musl.tar.gz | \ tar -zxf - --strip-components=1 && \ diff --git a/ci/cloudbuild/dockerfiles/fedora-latest-bazel.Dockerfile b/ci/cloudbuild/dockerfiles/fedora-latest-bazel.Dockerfile index 44904a1aec020..2b406debf8c9a 100644 --- a/ci/cloudbuild/dockerfiles/fedora-latest-bazel.Dockerfile +++ b/ci/cloudbuild/dockerfiles/fedora-latest-bazel.Dockerfile @@ -50,7 +50,7 @@ RUN /var/tmp/ci/install-cloud-sdk.sh ENV CLOUD_SDK_LOCATION=/usr/local/google-cloud-sdk ENV PATH=${CLOUD_SDK_LOCATION}/bin:${PATH} -RUN curl -o /usr/bin/bazelisk -sSL "https://github.com/bazelbuild/bazelisk/releases/download/v1.24.1/bazelisk-linux-${ARCH}" && \ +RUN curl -o /usr/bin/bazelisk -sSL "https://github.com/bazelbuild/bazelisk/releases/download/v1.27.0/bazelisk-linux-${ARCH}" && \ chmod +x /usr/bin/bazelisk && \ ln -s /usr/bin/bazelisk /usr/bin/bazel diff --git a/ci/cloudbuild/dockerfiles/fedora-latest-cmake.Dockerfile b/ci/cloudbuild/dockerfiles/fedora-latest-cmake.Dockerfile index ebb032c5804a5..10ce73a470bf4 100644 --- a/ci/cloudbuild/dockerfiles/fedora-latest-cmake.Dockerfile +++ b/ci/cloudbuild/dockerfiles/fedora-latest-cmake.Dockerfile @@ -42,6 +42,8 @@ RUN dnf makecache && dnf debuginfo-install -y libstdc++ # These are used by the docfx tool. RUN dnf makecache && dnf install -y pugixml-devel yaml-cpp-devel +RUN dnf install -y valgrind + # Sets root's password to the empty string to enable users to get a root shell # inside the container with `su -` and no password. Sudo would not work because # we run these containers as the invoking user's uid, which does not exist in @@ -70,12 +72,11 @@ ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib # We disable the inline namespace because otherwise Abseil LTS updates break our # `check-api` build. WORKDIR /var/tmp/build -RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \ +RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ tar -xzf - --strip-components=1 && \ - sed -i 's/^#define ABSL_OPTION_USE_\(.*\) 2/#define ABSL_OPTION_USE_\1 0/' "absl/base/options.h" && \ - sed -i 's/^#define ABSL_OPTION_USE_INLINE_NAMESPACE 1$/#define ABSL_OPTION_USE_INLINE_NAMESPACE 0/' "absl/base/options.h" && \ cmake \ -DCMAKE_BUILD_TYPE="Release" \ + -DCMAKE_CXX_STANDARD=17 \ -DABSL_BUILD_TESTING=OFF \ -DBUILD_SHARED_LIBS=yes \ -GNinja -S . -B cmake-out && \ @@ -103,19 +104,6 @@ RUN curl -fsSL https://github.com/google/benchmark/archive/v1.9.2.tar.gz | \ cmake --build cmake-out --target install && \ ldconfig && cd /var/tmp && rm -fr build -WORKDIR /var/tmp/build -RUN curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=yes \ - -DCRC32C_BUILD_TESTS=OFF \ - -DCRC32C_BUILD_BENCHMARKS=OFF \ - -DCRC32C_USE_GLOG=OFF \ - -GNinja -S . -B cmake-out && \ - cmake --build cmake-out --target install && \ - ldconfig && cd /var/tmp && rm -fr build - WORKDIR /var/tmp/build RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.3.tar.gz | \ tar -xzf - --strip-components=1 && \ @@ -129,10 +117,11 @@ RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.3.tar.gz | \ ldconfig && cd /var/tmp && rm -fr build WORKDIR /var/tmp/build/protobuf -RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v29.4.tar.gz | \ +RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v33.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -Dprotobuf_BUILD_TESTS=OFF \ -Dprotobuf_ABSL_PROVIDER=package \ @@ -141,16 +130,15 @@ RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v29.4.tar.gz ldconfig && cd /var/tmp && rm -fr build WORKDIR /var/tmp/build/ -RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20.0.tar.gz | \ +RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_CXX_STANDARD=14 \ + -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \ -DBUILD_SHARED_LIBS=ON \ -DWITH_EXAMPLES=OFF \ - -DWITH_STL=CXX14 \ - -DWITH_ABSEIL=ON \ + -DWITH_STL=CXX17 \ -DBUILD_TESTING=OFF \ -DOPENTELEMETRY_INSTALL=ON \ -DOPENTELEMETRY_ABI_VERSION_NO=2 \ @@ -160,10 +148,11 @@ RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20 WORKDIR /var/tmp/build/grpc RUN dnf makecache && dnf install -y c-ares-devel re2-devel -RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.69.0.tar.gz | \ +RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=ON \ -DgRPC_INSTALL=ON \ -DgRPC_BUILD_TESTS=OFF \ diff --git a/ci/cloudbuild/dockerfiles/fedora-latest-cxx14.Dockerfile b/ci/cloudbuild/dockerfiles/fedora-latest-cxx14.Dockerfile deleted file mode 100644 index 74612e722e5c5..0000000000000 --- a/ci/cloudbuild/dockerfiles/fedora-latest-cxx14.Dockerfile +++ /dev/null @@ -1,211 +0,0 @@ -# Copyright 2023 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -FROM fedora:40 -ARG NCPU=4 -ARG ARCH=amd64 - -# Install the basic development tools. -RUN dnf makecache && \ - dnf install -y autoconf automake \ - clang cmake diffutils findutils gcc-c++ git \ - make ninja-build patch python3 \ - python-pip tar unzip wget which zip zlib-devel - -# Install the development packages for libcurl and OpenSSL. Neither are affected -# by the C++ version, so we can use the pre-built binaries. -RUN dnf makecache && \ - dnf install -y libcurl-devel openssl-devel - -# Install the Python modules needed to run the storage emulator -RUN dnf makecache && dnf install -y python3-devel -RUN pip3 install --upgrade pip -RUN pip3 install setuptools wheel - -# The Cloud Pub/Sub emulator needs Java, and so does `bazel coverage` :shrug: -# Bazel needs the '-devel' version with javac. -RUN dnf makecache && dnf install -y java-latest-openjdk-devel - -# Sets root's password to the empty string to enable users to get a root shell -# inside the container with `su -` and no password. Sudo would not work because -# we run these containers as the invoking user's uid, which does not exist in -# the container's /etc/passwd file. -RUN echo 'root:cloudcxx' | chpasswd - -# Fedora's version of `pkg-config` (https://github.com/pkgconf/pkgconf) is slow -# when handling `.pc` files with lots of `Requires:` deps, which happens with -# Abseil, so we use the normal `pkg-config` binary, which seems to not suffer -# from this bottleneck. For more details see -# https://github.com/googleapis/google-cloud-cpp/issues/7052 -WORKDIR /var/tmp/build/pkgconf -RUN curl -fsSL https://distfiles.ariadne.space/pkgconf/pkgconf-2.2.0.tar.gz | \ - tar -xzf - --strip-components=1 && \ - ./configure --prefix=/usr --with-system-libdir=/lib64:/usr/lib64 --with-system-includedir=/usr/include && \ - make -j ${NCPU:-4} && \ - make install && \ - ldconfig && cd /var/tmp && rm -fr build - -# The following steps will install libraries and tools in `/usr/local`. By -# default, pkgconf does not search in these directories. We need to explicitly -# set the search path. -ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib64/pkgconfig - -# Download and install direct dependencies of `google-cloud-cpp`. Including -# development dependencies. In each case, remove the downloaded files and the -# temporary artifacts after a successful build to keep the image smaller (and -# with fewer layers). - -WORKDIR /var/tmp/build -RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_CXX_STANDARD=14 \ - -DCMAKE_BUILD_TYPE=Release \ - -DABSL_BUILD_TESTING=OFF \ - -DABSL_PROPAGATE_CXX_STD=ON \ - -DBUILD_SHARED_LIBS=yes \ - -GNinja -S . -B cmake-out && \ - cmake --build cmake-out && cmake --install cmake-out && \ - ldconfig && \ - cd /var/tmp && rm -fr build - -WORKDIR /var/tmp/build -RUN curl -fsSL https://github.com/google/googletest/archive/v1.16.0.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_CXX_STANDARD=14 \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=yes \ - -GNinja -S . -B cmake-out && \ - cmake --build cmake-out && cmake --install cmake-out && \ - ldconfig && \ - cd /var/tmp && rm -fr build - -WORKDIR /var/tmp/build -RUN curl -fsSL https://github.com/google/benchmark/archive/v1.9.2.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_CXX_STANDARD=14 \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=yes \ - -DBENCHMARK_ENABLE_TESTING=OFF \ - -S . -B cmake-out && \ - cmake --build cmake-out && cmake --install cmake-out && \ - ldconfig && \ - cd /var/tmp && rm -fr build - -WORKDIR /var/tmp/build -RUN curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_CXX_STANDARD=14 \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=yes \ - -DCRC32C_BUILD_TESTS=OFF \ - -DCRC32C_BUILD_BENCHMARKS=OFF \ - -DCRC32C_USE_GLOG=OFF \ - -GNinja -S . -B cmake-out && \ - cmake --build cmake-out && cmake --install cmake-out && \ - ldconfig && \ - cd /var/tmp && rm -fr build - -WORKDIR /var/tmp/build -RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.3.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_CXX_STANDARD=14 \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=yes \ - -DBUILD_TESTING=OFF \ - -DJSON_BuildTests=OFF \ - -GNinja -S . -B cmake-out && \ - cmake --build cmake-out && cmake --install cmake-out && \ - ldconfig && \ - cd /var/tmp && rm -fr build - -WORKDIR /var/tmp/build/protobuf -RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v29.4.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_CXX_STANDARD=14 \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=yes \ - -Dprotobuf_BUILD_TESTS=OFF \ - -Dprotobuf_ABSL_PROVIDER=package \ - -GNinja -S . -B cmake-out && \ - cmake --build cmake-out && cmake --install cmake-out && \ - ldconfig && \ - cd /var/tmp && rm -fr build - -WORKDIR /var/tmp/build/ -RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20.0.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_CXX_STANDARD=14 \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \ - -DBUILD_SHARED_LIBS=ON \ - -DWITH_EXAMPLES=OFF \ - -DWITH_STL=CXX14 \ - -DWITH_ABSEIL=ON \ - -DBUILD_TESTING=OFF \ - -DOPENTELEMETRY_INSTALL=ON \ - -DOPENTELEMETRY_ABI_VERSION_NO=2 \ - -GNinja -S . -B cmake-out && \ - cmake --build cmake-out && cmake --install cmake-out && \ - ldconfig && cd /var/tmp && rm -fr build - -WORKDIR /var/tmp/build/grpc -RUN dnf makecache && dnf install -y c-ares-devel re2-devel -RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.69.0.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_CXX_STANDARD=14 \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=ON \ - -DgRPC_INSTALL=ON \ - -DgRPC_BUILD_TESTS=OFF \ - -DgRPC_ABSL_PROVIDER=package \ - -DgRPC_CARES_PROVIDER=package \ - -DgRPC_PROTOBUF_PROVIDER=package \ - -DgRPC_RE2_PROVIDER=package \ - -DgRPC_SSL_PROVIDER=package \ - -DgRPC_ZLIB_PROVIDER=package \ - -DgRPC_OPENTELEMETRY_PROVIDER=package \ - -DgRPC_BUILD_GRPCPP_OTEL_PLUGIN=ON \ - -GNinja -S . -B cmake-out && \ - cmake --build cmake-out && cmake --install cmake-out && \ - ldconfig && \ - cd /var/tmp && rm -fr build - -WORKDIR /var/tmp/sccache -RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-x86_64-unknown-linux-musl.tar.gz | \ - tar -zxf - --strip-components=1 && \ - mkdir -p /usr/local/bin && \ - mv sccache /usr/local/bin/sccache && \ - chmod +x /usr/local/bin/sccache - -# Install the Cloud SDK and some of the emulators. We use the emulators to run -# integration tests for the client libraries. -COPY . /var/tmp/ci -WORKDIR /var/tmp/downloads -# The Google Cloud CLI requires Python <= 3.10, Fedora defaults to 3.12. -RUN dnf makecache && dnf install -y python3.10 -ENV CLOUDSDK_PYTHON=python3.10 -RUN /var/tmp/ci/install-cloud-sdk.sh -ENV CLOUD_SDK_LOCATION=/usr/local/google-cloud-sdk -ENV PATH=${CLOUD_SDK_LOCATION}/bin:${PATH} - -# Update the ld.conf cache in case any libraries were installed in /usr/local/lib* -RUN ldconfig /usr/local/lib* diff --git a/ci/cloudbuild/dockerfiles/fedora-latest-cxx20.Dockerfile b/ci/cloudbuild/dockerfiles/fedora-latest-cxx20.Dockerfile index 2e4ceda94a7bb..548b7052ea66b 100644 --- a/ci/cloudbuild/dockerfiles/fedora-latest-cxx20.Dockerfile +++ b/ci/cloudbuild/dockerfiles/fedora-latest-cxx20.Dockerfile @@ -39,6 +39,10 @@ RUN pip3 install setuptools wheel # Bazel needs the '-devel' version with javac. RUN dnf makecache && dnf install -y java-latest-openjdk-devel +RUN dnf makecache && dnf install -y glibc glibc-devel + +RUN dnf makecache && dnf install -y clang-tools-extra + # Sets root's password to the empty string to enable users to get a root shell # inside the container with `su -` and no password. Sudo would not work because # we run these containers as the invoking user's uid, which does not exist in @@ -69,13 +73,12 @@ ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib # with fewer layers). WORKDIR /var/tmp/build -RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \ +RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_CXX_STANDARD=20 \ -DCMAKE_BUILD_TYPE=Release \ -DABSL_BUILD_TESTING=OFF \ - -DABSL_PROPAGATE_CXX_STD=ON \ -DBUILD_SHARED_LIBS=yes \ -GNinja -S . -B cmake-out && \ cmake --build cmake-out && cmake --install cmake-out && \ @@ -107,21 +110,6 @@ RUN curl -fsSL https://github.com/google/benchmark/archive/v1.9.2.tar.gz | \ ldconfig && \ cd /var/tmp && rm -fr build -WORKDIR /var/tmp/build -RUN curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_CXX_STANDARD=20 \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=yes \ - -DCRC32C_BUILD_TESTS=OFF \ - -DCRC32C_BUILD_BENCHMARKS=OFF \ - -DCRC32C_USE_GLOG=OFF \ - -GNinja -S . -B cmake-out && \ - cmake --build cmake-out && cmake --install cmake-out && \ - ldconfig && \ - cd /var/tmp && rm -fr build - WORKDIR /var/tmp/build RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.3.tar.gz | \ tar -xzf - --strip-components=1 && \ @@ -137,7 +125,7 @@ RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.3.tar.gz | \ cd /var/tmp && rm -fr build WORKDIR /var/tmp/build/protobuf -RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v29.4.tar.gz | \ +RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v33.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_CXX_STANDARD=20 \ @@ -151,7 +139,7 @@ RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v29.4.tar.gz cd /var/tmp && rm -fr build WORKDIR /var/tmp/build/ -RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20.0.tar.gz | \ +RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_CXX_STANDARD=20 \ @@ -160,7 +148,6 @@ RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20 -DBUILD_SHARED_LIBS=ON \ -DWITH_EXAMPLES=OFF \ -DWITH_STL=CXX20 \ - -DWITH_ABSEIL=ON \ -DBUILD_TESTING=OFF \ -DOPENTELEMETRY_INSTALL=ON \ -DOPENTELEMETRY_ABI_VERSION_NO=2 \ @@ -170,7 +157,7 @@ RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20 WORKDIR /var/tmp/build/grpc RUN dnf makecache && dnf install -y c-ares-devel re2-devel -RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.69.0.tar.gz | \ +RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_CXX_STANDARD=20 \ diff --git a/ci/cloudbuild/dockerfiles/fedora-latest-publish-docs.Dockerfile b/ci/cloudbuild/dockerfiles/fedora-latest-publish-docs.Dockerfile index edfa43967e05c..c9aead6fb3e8a 100644 --- a/ci/cloudbuild/dockerfiles/fedora-latest-publish-docs.Dockerfile +++ b/ci/cloudbuild/dockerfiles/fedora-latest-publish-docs.Dockerfile @@ -27,7 +27,6 @@ RUN dnf makecache && \ dnf install -y \ gmock-devel \ google-benchmark-devel \ - google-crc32c-devel \ grpc-devel \ gtest-devel \ json-devel \ @@ -63,15 +62,15 @@ RUN curl -fsSL https://github.com/doxygen/doxygen/archive/refs/tags/Release_1_11 cmake --build cmake-out --target install WORKDIR /var/tmp/build/ -RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20.0.tar.gz | \ +RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \ -DBUILD_SHARED_LIBS=ON \ -DWITH_EXAMPLES=OFF \ - -DWITH_STL=CXX14 \ - -DWITH_ABSEIL=ON \ + -DWITH_STL=CXX17 \ -DBUILD_TESTING=OFF \ -DOPENTELEMETRY_INSTALL=ON \ -DOPENTELEMETRY_ABI_VERSION_NO=2 \ diff --git a/ci/cloudbuild/dockerfiles/fedora-m32.Dockerfile b/ci/cloudbuild/dockerfiles/fedora-m32.Dockerfile index 22e4e93c9af86..29d7f9efeabe2 100644 --- a/ci/cloudbuild/dockerfiles/fedora-m32.Dockerfile +++ b/ci/cloudbuild/dockerfiles/fedora-m32.Dockerfile @@ -36,7 +36,6 @@ RUN dnf makecache && \ glibc-devel.i686 \ gmock-devel.i686 \ google-benchmark-devel.i686 \ - google-crc32c-devel.i686 \ grpc-devel.i686 \ gtest-devel.i686 \ libcurl-devel.i686 \ @@ -100,7 +99,7 @@ RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.3.tar.gz | \ # compiled with. And we use the compiler flags from ci/etc/m32-toolchain.cmake # to force a 32-bit install. WORKDIR /var/tmp/build/opentelemetry -RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20.0.tar.gz | \ +RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_CXX_STANDARD=17 \ @@ -114,8 +113,7 @@ RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20 -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \ -DBUILD_SHARED_LIBS=ON \ -DWITH_EXAMPLES=OFF \ - -DWITH_STL=CXX14 \ - -DWITH_ABSEIL=ON \ + -DWITH_STL=CXX17 \ -DBUILD_TESTING=OFF \ -DOPENTELEMETRY_INSTALL=ON \ -DOPENTELEMETRY_ABI_VERSION_NO=2 \ diff --git a/ci/cloudbuild/dockerfiles/fedora-msan.Dockerfile b/ci/cloudbuild/dockerfiles/fedora-msan.Dockerfile index 6eef6ad512195..f2cf48537eac6 100644 --- a/ci/cloudbuild/dockerfiles/fedora-msan.Dockerfile +++ b/ci/cloudbuild/dockerfiles/fedora-msan.Dockerfile @@ -81,6 +81,6 @@ RUN /var/tmp/ci/install-cloud-sdk.sh ENV CLOUD_SDK_LOCATION=/usr/local/google-cloud-sdk ENV PATH=${CLOUD_SDK_LOCATION}/bin:${PATH} -RUN curl -o /usr/bin/bazelisk -sSL "https://github.com/bazelbuild/bazelisk/releases/download/v1.24.1/bazelisk-linux-${ARCH}" && \ +RUN curl -o /usr/bin/bazelisk -sSL "https://github.com/bazelbuild/bazelisk/releases/download/v1.27.0/bazelisk-linux-${ARCH}" && \ chmod +x /usr/bin/bazelisk && \ ln -s /usr/bin/bazelisk /usr/bin/bazel diff --git a/ci/cloudbuild/dockerfiles/gcc-oldest.Dockerfile b/ci/cloudbuild/dockerfiles/gcc-oldest.Dockerfile index 547ce3218c655..83f2475107f4a 100644 --- a/ci/cloudbuild/dockerfiles/gcc-oldest.Dockerfile +++ b/ci/cloudbuild/dockerfiles/gcc-oldest.Dockerfile @@ -17,19 +17,41 @@ ARG NCPU=4 RUN zypper refresh && \ zypper install --allow-downgrade -y automake cmake curl gcc gcc-c++ \ - git gzip libtool make ninja patch tar wget - - -RUN zypper refresh && \ - zypper install --allow-downgrade -y abseil-cpp-devel c-ares-devel \ - libcurl-devel libopenssl-devel libcrc32c-devel nlohmann_json-devel \ - re2-devel + git gzip libtool make ninja patch tar wget \ + c-ares-devel libcurl-devel libopenssl-devel libcrc32c-devel RUN (echo "/usr/local/lib" ; echo "/usr/local/lib64") | \ tee /etc/ld.so.conf.d/usrlocal.conf ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig ENV PATH=/usr/local/bin:${PATH} +WORKDIR /var/tmp/build +RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake \ + -DCMAKE_CXX_STANDARD=17 \ + -DCMAKE_BUILD_TYPE=Release \ + -DABSL_BUILD_TESTING=OFF \ + -DBUILD_SHARED_LIBS=yes \ + -GNinja -S . -B cmake-out && \ + cmake --build cmake-out && cmake --install cmake-out && \ + ldconfig && \ + cd /var/tmp && rm -fr build + +WORKDIR /var/tmp/build/re2 +RUN curl -fsSL https://github.com/google/re2/archive/2024-07-02.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ + -DBUILD_SHARED_LIBS=ON \ + -DRE2_BUILD_TESTING=OFF \ + -S . -B cmake-out && \ + cmake --build cmake-out -- -j ${NCPU:-4} && \ + cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ + ldconfig && \ + cd /var/tmp && rm -fr build + + # Install googletest, remove the downloaded files and the temporary artifacts # after a successful build to keep the image smaller (and with fewer layers) WORKDIR /var/tmp/build @@ -37,6 +59,7 @@ RUN curl -fsSL https://github.com/google/googletest/archive/v1.16.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE="Release" \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -GNinja -S . -B cmake-out && \ cmake --build cmake-out && cmake --install cmake-out && \ @@ -55,10 +78,11 @@ RUN curl -fsSL https://github.com/google/benchmark/archive/v1.9.2.tar.gz | \ ldconfig && cd /var/tmp && rm -fr build WORKDIR /var/tmp/build/protobuf -RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v29.4.tar.gz | \ +RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v33.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -Dprotobuf_BUILD_TESTS=OFF \ -Dprotobuf_ABSL_PROVIDER=package \ @@ -70,15 +94,15 @@ RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v29.4.tar.gz # GCC 7.x. See https://github.com/open-telemetry/opentelemetry-cpp/issues/1014 # for more details. WORKDIR /var/tmp/build/opentelemetry-cpp -RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20.0.tar.gz | \ +RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ tar -xzf - --strip-components=1 && \ sed -i 's/Stack &GetStack()/Stack \&GetStack() __attribute__((noinline, noclone))/' "api/include/opentelemetry/context/runtime_context.h" && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DWITH_EXAMPLES=OFF \ - -DWITH_STL=CXX14 \ - -DWITH_ABSEIL=ON \ + -DWITH_STL=CXX17 \ -DBUILD_TESTING=OFF \ -DOPENTELEMETRY_INSTALL=ON \ -DOPENTELEMETRY_ABI_VERSION_NO=2 \ @@ -87,10 +111,11 @@ RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20 ldconfig && cd /var/tmp && rm -fr build WORKDIR /var/tmp/build/grpc -RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.69.0.tar.gz | \ +RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DgRPC_INSTALL=ON \ -DgRPC_BUILD_TESTS=OFF \ @@ -104,6 +129,18 @@ RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.69.0.tar.gz | \ cmake --build cmake-out && cmake --install cmake-out && \ ldconfig && cd /var/tmp && rm -fr build +WORKDIR /var/tmp/build +RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.3.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=yes \ + -DBUILD_TESTING=OFF \ + -DJSON_BuildTests=OFF \ + -GNinja -S . -B cmake-out && \ + cmake --build cmake-out --target install && \ + ldconfig && cd /var/tmp && rm -fr build + WORKDIR /var/tmp/sccache RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-x86_64-unknown-linux-musl.tar.gz | \ tar -zxf - --strip-components=1 && \ diff --git a/ci/cloudbuild/dockerfiles/ubuntu-20.04-install.Dockerfile b/ci/cloudbuild/dockerfiles/ubuntu-20.04-install.Dockerfile index 8b674b17cd2f5..d83c1918e3c02 100644 --- a/ci/cloudbuild/dockerfiles/ubuntu-20.04-install.Dockerfile +++ b/ci/cloudbuild/dockerfiles/ubuntu-20.04-install.Dockerfile @@ -46,6 +46,7 @@ RUN apt-get update && \ apt-utils \ ca-certificates \ apt-transport-https + # Install Python packages used in the integration tests. RUN update-alternatives --install /usr/bin/python python $(which python3) 10 RUN pip3 install setuptools wheel @@ -58,12 +59,12 @@ RUN apt update && apt install -y openjdk-13-jre # image smaller (and with fewer layers) WORKDIR /var/tmp/build/abseil-cpp -RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \ +RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE="Release" \ + -DCMAKE_CXX_STANDARD=17 \ -DABSL_BUILD_TESTING=OFF \ - -DABSL_PROPAGATE_CXX_STD=ON \ -DBUILD_SHARED_LIBS=yes \ -S . -B cmake-out -GNinja && \ cmake --build cmake-out --target install && \ @@ -75,6 +76,7 @@ RUN curl -fsSL https://github.com/google/googletest/archive/v1.16.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE="Release" \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -S . -B cmake-out -GNinja && \ cmake --build cmake-out --target install && \ @@ -93,20 +95,6 @@ RUN curl -fsSL https://github.com/google/benchmark/archive/v1.9.2.tar.gz | \ ldconfig && \ cd /var/tmp && rm -fr build -WORKDIR /var/tmp/build/crc32c -RUN curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_BUILD_TYPE="Release" \ - -DBUILD_SHARED_LIBS=yes \ - -DCRC32C_BUILD_TESTS=OFF \ - -DCRC32C_BUILD_BENCHMARKS=OFF \ - -DCRC32C_USE_GLOG=OFF \ - -S . -B cmake-out -GNinja && \ - cmake --build cmake-out --target install && \ - ldconfig && \ - cd /var/tmp && rm -fr build - WORKDIR /var/tmp/build/nlohmann-json RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.3.tar.gz | \ tar -xzf - --strip-components=1 && \ @@ -120,11 +108,13 @@ RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.3.tar.gz | \ ldconfig && \ cd /var/tmp && rm -fr build + WORKDIR /var/tmp/build/protobuf -RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v29.4.tar.gz | \ +RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v33.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -Dprotobuf_BUILD_TESTS=OFF \ -Dprotobuf_ABSL_PROVIDER=package \ @@ -156,16 +146,15 @@ RUN curl -fsSL https://github.com/google/re2/archive/2025-07-22.tar.gz | \ cd /var/tmp && rm -fr build WORKDIR /var/tmp/build/ -RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20.0.tar.gz | \ +RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ - -DCMAKE_CXX_STANDARD=14 \ + -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \ -DBUILD_SHARED_LIBS=ON \ -DWITH_EXAMPLES=OFF \ - -DWITH_STL=CXX14 \ - -DWITH_ABSEIL=ON \ + -DWITH_STL=CXX17 \ -DBUILD_TESTING=OFF \ -DOPENTELEMETRY_INSTALL=ON \ -DOPENTELEMETRY_ABI_VERSION_NO=2 \ @@ -174,10 +163,11 @@ RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20 ldconfig && cd /var/tmp && rm -fr build WORKDIR /var/tmp/build/grpc -RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.69.0.tar.gz | \ +RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=ON \ -DgRPC_INSTALL=ON \ -DgRPC_BUILD_TESTS=OFF \ diff --git a/ci/cloudbuild/dockerfiles/ubuntu-22.04-install.Dockerfile b/ci/cloudbuild/dockerfiles/ubuntu-22.04-install.Dockerfile new file mode 100644 index 0000000000000..b4fe54f4bbd65 --- /dev/null +++ b/ci/cloudbuild/dockerfiles/ubuntu-22.04-install.Dockerfile @@ -0,0 +1,202 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM ubuntu:22.04 + +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get update && \ + apt-get --no-install-recommends install -y \ + automake \ + build-essential \ + clang \ + cmake \ + curl \ + gawk \ + git \ + gcc \ + g++ \ + libcurl4-openssl-dev \ + libssl-dev \ + libtool \ + lsb-release \ + make \ + ninja-build \ + patch \ + pkg-config \ + python3 \ + python3-dev \ + python3-pip \ + tar \ + unzip \ + zip \ + wget \ + zlib1g-dev \ + apt-utils \ + ca-certificates \ + apt-transport-https + +# Install Python packages used in the integration tests. +RUN update-alternatives --install /usr/bin/python python $(which python3) 10 +RUN pip3 install setuptools wheel +# The Cloud Pub/Sub emulator needs Java :shrug: +RUN apt update && apt install -y openjdk-11-jre + +# Install all the direct (and indirect) dependencies for google-cloud-cpp. +# Use a different directory for each build, and remove the downloaded +# files and any temporary artifacts after a successful build to keep the +# image smaller (and with fewer layers) + +WORKDIR /var/tmp/build/abseil-cpp +RUN curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake \ + -DCMAKE_BUILD_TYPE="Release" \ + -DCMAKE_CXX_STANDARD=17 \ + -DABSL_BUILD_TESTING=OFF \ + -DBUILD_SHARED_LIBS=yes \ + -S . -B cmake-out -GNinja && \ + cmake --build cmake-out --target install && \ + ldconfig && \ + cd /var/tmp && rm -fr build + +WORKDIR /var/tmp/build/googletest +RUN curl -fsSL https://github.com/google/googletest/archive/v1.16.0.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake \ + -DCMAKE_BUILD_TYPE="Release" \ + -DCMAKE_CXX_STANDARD=17 \ + -DBUILD_SHARED_LIBS=yes \ + -S . -B cmake-out -GNinja && \ + cmake --build cmake-out --target install && \ + ldconfig && \ + cd /var/tmp && rm -fr build + +WORKDIR /var/tmp/build/benchmark +RUN curl -fsSL https://github.com/google/benchmark/archive/v1.9.2.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake \ + -DCMAKE_BUILD_TYPE="Release" \ + -DBUILD_SHARED_LIBS=yes \ + -DBENCHMARK_ENABLE_TESTING=OFF \ + -S . -B cmake-out -GNinja && \ + cmake --build cmake-out --target install && \ + ldconfig && \ + cd /var/tmp && rm -fr build + +WORKDIR /var/tmp/build/nlohmann-json +RUN curl -fsSL https://github.com/nlohmann/json/archive/v3.11.3.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake \ + -DCMAKE_BUILD_TYPE="Release" \ + -DBUILD_SHARED_LIBS=yes \ + -DBUILD_TESTING=OFF \ + -DJSON_BuildTests=OFF \ + -S . -B cmake-out -GNinja && \ + cmake --build cmake-out --target install && \ + ldconfig && \ + cd /var/tmp && rm -fr build + + +WORKDIR /var/tmp/build/protobuf +RUN curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v33.1.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ + -DBUILD_SHARED_LIBS=yes \ + -Dprotobuf_BUILD_TESTS=OFF \ + -Dprotobuf_ABSL_PROVIDER=package \ + -S . -B cmake-out -GNinja && \ + cmake --build cmake-out --target install && \ + ldconfig && \ + cd /var/tmp && rm -fr build + +WORKDIR /var/tmp/build/c-ares +RUN curl -fsSL https://github.com/c-ares/c-ares/archive/refs/tags/cares-1_17_1.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=yes \ + -S . -B cmake-out -GNinja && \ + cmake --build cmake-out --target install && \ + ldconfig && \ + cd /var/tmp && rm -fr build + +WORKDIR /var/tmp/build/re2 +RUN curl -fsSL https://github.com/google/re2/archive/2025-07-22.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_SHARED_LIBS=ON \ + -DRE2_BUILD_TESTING=OFF \ + -S . -B cmake-out -GNinja && \ + cmake --build cmake-out --target install && \ + ldconfig && \ + cd /var/tmp && rm -fr build + +WORKDIR /var/tmp/build/ +RUN curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake \ + -DCMAKE_CXX_STANDARD=17 \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \ + -DBUILD_SHARED_LIBS=ON \ + -DWITH_EXAMPLES=OFF \ + -DWITH_STL=CXX17 \ + -DBUILD_TESTING=OFF \ + -DOPENTELEMETRY_INSTALL=ON \ + -DOPENTELEMETRY_ABI_VERSION_NO=2 \ + -S . -B cmake-out -GNinja && \ + cmake --build cmake-out --target install && \ + ldconfig && cd /var/tmp && rm -fr build + +WORKDIR /var/tmp/build/grpc +RUN curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \ + tar -xzf - --strip-components=1 && \ + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ + -DBUILD_SHARED_LIBS=ON \ + -DgRPC_INSTALL=ON \ + -DgRPC_BUILD_TESTS=OFF \ + -DgRPC_ABSL_PROVIDER=package \ + -DgRPC_CARES_PROVIDER=package \ + -DgRPC_PROTOBUF_PROVIDER=package \ + -DgRPC_RE2_PROVIDER=package \ + -DgRPC_SSL_PROVIDER=package \ + -DgRPC_ZLIB_PROVIDER=package \ + -DgRPC_OPENTELEMETRY_PROVIDER=package \ + -DgRPC_BUILD_GRPCPP_OTEL_PLUGIN=ON \ + -S . -B cmake-out -GNinja && \ + cmake --build cmake-out --target install && \ + ldconfig && \ + cd /var/tmp && rm -fr build + +# Install the Cloud SDK and some of the emulators. We use the emulators to run +# integration tests for the client libraries. +COPY . /var/tmp/ci +WORKDIR /var/tmp/downloads +RUN /var/tmp/ci/install-cloud-sdk.sh +ENV CLOUD_SDK_LOCATION=/usr/local/google-cloud-sdk +ENV PATH=${CLOUD_SDK_LOCATION}/bin:${PATH} + +WORKDIR /var/tmp/sccache +RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-x86_64-unknown-linux-musl.tar.gz | \ + tar -zxf - --strip-components=1 && \ + mkdir -p /usr/local/bin && \ + mv sccache /usr/local/bin/sccache && \ + chmod +x /usr/local/bin/sccache + +# Update the ld.conf cache in case any libraries were installed in /usr/local/lib* +RUN ldconfig /usr/local/lib* diff --git a/ci/cloudbuild/dockerfiles/ubuntu-focal.Dockerfile b/ci/cloudbuild/dockerfiles/ubuntu-22.04.Dockerfile similarity index 90% rename from ci/cloudbuild/dockerfiles/ubuntu-focal.Dockerfile rename to ci/cloudbuild/dockerfiles/ubuntu-22.04.Dockerfile index ad6690e64454b..226536688ab2a 100644 --- a/ci/cloudbuild/dockerfiles/ubuntu-focal.Dockerfile +++ b/ci/cloudbuild/dockerfiles/ubuntu-22.04.Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2021 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,9 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM ubuntu:focal -ARG NCPU=4 -ARG ARCH=amd64 +FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && \ @@ -22,19 +20,15 @@ RUN apt-get update && \ automake \ build-essential \ clang \ - clang-9 \ cmake \ - ctags \ curl \ gawk \ git \ gcc \ g++ \ - cmake \ libcurl4-openssl-dev \ libssl-dev \ libtool \ - llvm-9 \ lsb-release \ make \ ninja-build \ @@ -55,7 +49,6 @@ RUN apt-get update && \ # Install Python packages used in the integration tests. RUN update-alternatives --install /usr/bin/python python $(which python3) 10 RUN pip3 install setuptools wheel - # The Cloud Pub/Sub emulator needs Java :shrug: RUN apt update && (apt install -y openjdk-11-jre || apt install -y openjdk-9-jre) @@ -67,6 +60,6 @@ RUN /var/tmp/ci/install-cloud-sdk.sh ENV CLOUD_SDK_LOCATION=/usr/local/google-cloud-sdk ENV PATH=${CLOUD_SDK_LOCATION}/bin:${PATH} -RUN curl -o /usr/bin/bazelisk -sSL "https://github.com/bazelbuild/bazelisk/releases/download/v1.24.1/bazelisk-linux-${ARCH}" && \ +RUN curl -o /usr/bin/bazelisk -sSL "https://github.com/bazelbuild/bazelisk/releases/download/v1.27.0/bazelisk-linux-${ARCH}" && \ chmod +x /usr/bin/bazelisk && \ ln -s /usr/bin/bazelisk /usr/bin/bazel diff --git a/ci/cloudbuild/dockerfiles/ubuntu-24.04.Dockerfile b/ci/cloudbuild/dockerfiles/ubuntu-24.04.Dockerfile index a67a2f89b646e..3bb1f5fe01e2f 100644 --- a/ci/cloudbuild/dockerfiles/ubuntu-24.04.Dockerfile +++ b/ci/cloudbuild/dockerfiles/ubuntu-24.04.Dockerfile @@ -65,6 +65,6 @@ RUN /var/tmp/ci/install-cloud-sdk.sh ENV CLOUD_SDK_LOCATION=/usr/local/google-cloud-sdk ENV PATH=${CLOUD_SDK_LOCATION}/bin:${PATH} -RUN curl -o /usr/bin/bazelisk -sSL "https://github.com/bazelbuild/bazelisk/releases/download/v1.24.1/bazelisk-linux-${ARCH}" && \ +RUN curl -o /usr/bin/bazelisk -sSL "https://github.com/bazelbuild/bazelisk/releases/download/v1.27.0/bazelisk-linux-${ARCH}" && \ chmod +x /usr/bin/bazelisk && \ ln -s /usr/bin/bazelisk /usr/bin/bazel diff --git a/ci/cloudbuild/triggers/asan-ci.yaml b/ci/cloudbuild/triggers/asan-ci.yaml index 4e624d3aebc7a..3ce78b499939f 100644 --- a/ci/cloudbuild/triggers/asan-ci.yaml +++ b/ci/cloudbuild/triggers/asan-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-03-22T00:38:08.167137222Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: a803727d-8633-49ea-b545-bd7f9124bc3d + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: asan-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/a803727d-8633-49ea-b545-bd7f9124bc3d +name: prepare-for-v3-0-0-asan-ci substitutions: _BUILD_NAME: asan _DISTRO: fedora-latest-bazel diff --git a/ci/cloudbuild/triggers/asan-pr.yaml b/ci/cloudbuild/triggers/asan-pr.yaml index e1b22dbb1abe4..8f5c4638ec148 100644 --- a/ci/cloudbuild/triggers/asan-pr.yaml +++ b/ci/cloudbuild/triggers/asan-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-09T18:15:26.533760362Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 45fd50c2-04f1-4674-b533-0db1346c8b7e includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: asan-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/45fd50c2-04f1-4674-b533-0db1346c8b7e +name: prepare-for-v3-0-0-asan-pr substitutions: _BUILD_NAME: asan _DISTRO: fedora-latest-bazel diff --git a/ci/cloudbuild/triggers/bazel-oldest-ci.yaml b/ci/cloudbuild/triggers/bazel-oldest-ci.yaml index 31df3bb45423f..593883bb0620c 100644 --- a/ci/cloudbuild/triggers/bazel-oldest-ci.yaml +++ b/ci/cloudbuild/triggers/bazel-oldest-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2022-02-08T12:44:34.878690706Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: 3a7690ee-a385-4e86-835e-990a64eb71d7 + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: bazel-oldest-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/3a7690ee-a385-4e86-835e-990a64eb71d7 +name: prepare-for-v3-0-0-bazel-oldest-ci substitutions: _BUILD_NAME: bazel-oldest _DISTRO: fedora-latest-bazel diff --git a/ci/cloudbuild/triggers/bazel-oldest-pr.yaml b/ci/cloudbuild/triggers/bazel-oldest-pr.yaml index 4f4b2b36421ed..033fcd346e630 100644 --- a/ci/cloudbuild/triggers/bazel-oldest-pr.yaml +++ b/ci/cloudbuild/triggers/bazel-oldest-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2022-02-08T12:44:28.719440875Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 914bc7a4-afa2-4faf-8a0e-571218e8fd83 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: bazel-oldest-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/914bc7a4-afa2-4faf-8a0e-571218e8fd83 +name: prepare-for-v3-0-0-bazel-oldest-pr substitutions: _BUILD_NAME: bazel-oldest _DISTRO: fedora-latest-bazel diff --git a/ci/cloudbuild/triggers/bazel-otel-abi-2-ci.yaml b/ci/cloudbuild/triggers/bazel-otel-abi-2-ci.yaml index af9768ad913c3..8ca1408f2916e 100644 --- a/ci/cloudbuild/triggers/bazel-otel-abi-2-ci.yaml +++ b/ci/cloudbuild/triggers/bazel-otel-abi-2-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2023-12-13T16:53:04.793743056Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: abfbaa6f-e1a0-4298-af45-78f9dc1a9831 + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: bazel-otel-abi-2-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/abfbaa6f-e1a0-4298-af45-78f9dc1a9831 +name: prepare-for-v3-0-0-bazel-otel-abi-2-ci substitutions: _BUILD_NAME: bazel-otel-abi-2 _DISTRO: fedora-latest-bazel diff --git a/ci/cloudbuild/triggers/bazel-otel-abi-2-pr.yaml b/ci/cloudbuild/triggers/bazel-otel-abi-2-pr.yaml index 338f750994701..5089f3d8f811e 100644 --- a/ci/cloudbuild/triggers/bazel-otel-abi-2-pr.yaml +++ b/ci/cloudbuild/triggers/bazel-otel-abi-2-pr.yaml @@ -17,12 +17,10 @@ github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 18b11d89-0625-40ba-897a-ac10462d1c7b includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: bazel-otel-abi-2-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/18b11d89-0625-40ba-897a-ac10462d1c7b +name: prepare-for-v3-0-0-bazel-otel-abi-2-pr substitutions: _BUILD_NAME: bazel-otel-abi-2 _DISTRO: fedora-latest-bazel diff --git a/ci/cloudbuild/triggers/bazel-targets-ci.yaml b/ci/cloudbuild/triggers/bazel-targets-ci.yaml index 599e2586bb30d..7f2dfdaa2d7c4 100644 --- a/ci/cloudbuild/triggers/bazel-targets-ci.yaml +++ b/ci/cloudbuild/triggers/bazel-targets-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-26T16:37:27.818296611Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: 1f63c286-589b-41cf-aee0-dd0e3cb6861c + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: bazel-targets-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/1f63c286-589b-41cf-aee0-dd0e3cb6861c +name: prepare-for-v3-0-0-bazel-targets-ci substitutions: _BUILD_NAME: bazel-targets _DISTRO: fedora-latest-bazel diff --git a/ci/cloudbuild/triggers/bazel-targets-pr.yaml b/ci/cloudbuild/triggers/bazel-targets-pr.yaml index a50efe76ffb8e..18ddcb7ec76be 100644 --- a/ci/cloudbuild/triggers/bazel-targets-pr.yaml +++ b/ci/cloudbuild/triggers/bazel-targets-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-26T16:37:32.709851004Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 95e11a96-2138-4d65-8598-25308f1cf5f8 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: bazel-targets-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/95e11a96-2138-4d65-8598-25308f1cf5f8 +name: prepare-for-v3-0-0-bazel-targets-pr substitutions: _BUILD_NAME: bazel-targets _DISTRO: fedora-latest-bazel diff --git a/ci/cloudbuild/triggers/check-api-ci.yaml b/ci/cloudbuild/triggers/check-api-ci.yaml index 1c0314e181c66..6ff8614a3ed3c 100644 --- a/ci/cloudbuild/triggers/check-api-ci.yaml +++ b/ci/cloudbuild/triggers/check-api-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-30T13:51:14.389552861Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: 83b375fa-9209-4691-8dcc-a28f7a19dcf2 + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: check-api-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/83b375fa-9209-4691-8dcc-a28f7a19dcf2 +name: prepare-for-v3-0-0-check-api-ci substitutions: _BUILD_NAME: check-api _DISTRO: fedora-latest-cmake diff --git a/ci/cloudbuild/triggers/check-api-pr.yaml b/ci/cloudbuild/triggers/check-api-pr.yaml index e4a68a40daa43..1b790d75d0e4a 100644 --- a/ci/cloudbuild/triggers/check-api-pr.yaml +++ b/ci/cloudbuild/triggers/check-api-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-30T13:51:18.047210322Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 9d4afe6c-48fc-4bc4-8b40-68312b2c0fec includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: check-api-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/9d4afe6c-48fc-4bc4-8b40-68312b2c0fec +name: prepare-for-v3-0-0-check-api-pr substitutions: _BUILD_NAME: check-api _DISTRO: fedora-latest-cmake diff --git a/ci/cloudbuild/triggers/checkers-ci.yaml b/ci/cloudbuild/triggers/checkers-ci.yaml index ad3403e81f633..ad6455b6c1bfa 100644 --- a/ci/cloudbuild/triggers/checkers-ci.yaml +++ b/ci/cloudbuild/triggers/checkers-ci.yaml @@ -12,16 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-03-30T00:38:59.589682412Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: 2d35a7fd-e273-44d4-b592-fc8810327a27 + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: checkers-ci +name: prepare-for-v3-0-0-checkers-ci substitutions: _BUILD_NAME: checkers _DISTRO: checkers diff --git a/ci/cloudbuild/triggers/checkers-pr.yaml b/ci/cloudbuild/triggers/checkers-pr.yaml index 8e1c2a766ee8b..1374b55f8ca37 100644 --- a/ci/cloudbuild/triggers/checkers-pr.yaml +++ b/ci/cloudbuild/triggers/checkers-pr.yaml @@ -12,17 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-09T18:15:32.194276806Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 746bbc75-cdf8-4172-bb08-0c2335479a8b includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: checkers-pr +name: prepare-for-v3-0-0-checkers-pr substitutions: _BUILD_NAME: checkers _DISTRO: checkers diff --git a/ci/cloudbuild/triggers/demo-ubuntu-focal-ci.yaml b/ci/cloudbuild/triggers/clang-14-0-ci.yaml similarity index 77% rename from ci/cloudbuild/triggers/demo-ubuntu-focal-ci.yaml rename to ci/cloudbuild/triggers/clang-14-0-ci.yaml index 9c435a293efba..1d1d25f6b079c 100644 --- a/ci/cloudbuild/triggers/demo-ubuntu-focal-ci.yaml +++ b/ci/cloudbuild/triggers/clang-14-0-ci.yaml @@ -1,4 +1,4 @@ -# Copyright 2021 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,19 +12,17 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-13T23:36:04.667175923Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: 0294a1e2-044b-45d5-8ba0-6806c93b3a72 + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: demo-ubuntu-focal-ci +name: prepare-for-v3-0-0-clang-14-0-ci substitutions: - _BUILD_NAME: demo-install - _DISTRO: demo-ubuntu-focal + _BUILD_NAME: clang-14.0 + _DISTRO: ubuntu-22.04-install _TRIGGER_TYPE: ci tags: - ci diff --git a/ci/cloudbuild/triggers/demo-ubuntu-focal-pr.yaml b/ci/cloudbuild/triggers/clang-14-0-pr.yaml similarity index 79% rename from ci/cloudbuild/triggers/demo-ubuntu-focal-pr.yaml rename to ci/cloudbuild/triggers/clang-14-0-pr.yaml index 639e4e8ac38c5..6138a054b6cd8 100644 --- a/ci/cloudbuild/triggers/demo-ubuntu-focal-pr.yaml +++ b/ci/cloudbuild/triggers/clang-14-0-pr.yaml @@ -1,4 +1,4 @@ -# Copyright 2021 Google LLC +# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,20 +12,18 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-13T23:36:05.750350763Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 22188f98-620b-4a43-b5f7-34f206d70062 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: demo-ubuntu-focal-pr +name: prepare-for-v3-0-0-clang-14-0-pr substitutions: - _BUILD_NAME: demo-install - _DISTRO: demo-ubuntu-focal + _BUILD_NAME: clang-14.0 + _DISTRO: ubuntu-22.04-install _TRIGGER_TYPE: pr tags: - pr diff --git a/ci/cloudbuild/triggers/clang-7-0-ci.yaml b/ci/cloudbuild/triggers/clang-7-0-ci.yaml deleted file mode 100644 index f9e881ba2c41d..0000000000000 --- a/ci/cloudbuild/triggers/clang-7-0-ci.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 2023 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -createTime: '2023-06-02T17:19:48.154215116Z' -filename: ci/cloudbuild/cloudbuild.yaml -github: - name: google-cloud-cpp - owner: googleapis - push: - branch: ^main$ -id: c9060166-f159-46c6-8ac9-4f256759fcb8 -includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: clang-7-0-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/c9060166-f159-46c6-8ac9-4f256759fcb8 -substitutions: - _BUILD_NAME: clang-7.0 - _DISTRO: ubuntu-20.04-install - _TRIGGER_TYPE: ci -tags: -- ci diff --git a/ci/cloudbuild/triggers/clang-7-0-pr.yaml b/ci/cloudbuild/triggers/clang-7-0-pr.yaml deleted file mode 100644 index 57e61a54dfde2..0000000000000 --- a/ci/cloudbuild/triggers/clang-7-0-pr.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 2023 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -createTime: '2023-06-02T17:19:52.984755094Z' -filename: ci/cloudbuild/cloudbuild.yaml -github: - name: google-cloud-cpp - owner: googleapis - pullRequest: - branch: ^main$ - commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 8a4c069a-53c0-49bf-ba31-5f3a3c228a42 -includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: clang-7-0-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/8a4c069a-53c0-49bf-ba31-5f3a3c228a42 -substitutions: - _BUILD_NAME: clang-7.0 - _DISTRO: ubuntu-20.04-install - _TRIGGER_TYPE: pr -tags: -- pr diff --git a/ci/cloudbuild/triggers/clang-cxx20-ci.yaml b/ci/cloudbuild/triggers/clang-cxx20-ci.yaml index f576175518750..2c806e99af69d 100644 --- a/ci/cloudbuild/triggers/clang-cxx20-ci.yaml +++ b/ci/cloudbuild/triggers/clang-cxx20-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2024-02-20T18:40:45.776612692Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: ed6fae7b-7ab3-44b9-b26b-d41de3926e16 + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: clang-cxx20-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/ed6fae7b-7ab3-44b9-b26b-d41de3926e16 +name: prepare-for-v3-0-0-clang-cxx20-ci substitutions: _BUILD_NAME: clang-cxx20 _DISTRO: fedora-latest-cxx20 diff --git a/ci/cloudbuild/triggers/clang-cxx20-pr.yaml b/ci/cloudbuild/triggers/clang-cxx20-pr.yaml index d91fe98fa40da..513e44ab58772 100644 --- a/ci/cloudbuild/triggers/clang-cxx20-pr.yaml +++ b/ci/cloudbuild/triggers/clang-cxx20-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2024-02-20T18:41:20.365076403Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: b5fb032a-c06d-4369-b42d-98524085d402 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: clang-cxx20-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/b5fb032a-c06d-4369-b42d-98524085d402 +name: prepare-for-v3-0-0-clang-cxx20-pr substitutions: _BUILD_NAME: clang-cxx20 _DISTRO: fedora-latest-cxx20 diff --git a/ci/cloudbuild/triggers/clang-tidy-bigquery-ci.yaml b/ci/cloudbuild/triggers/clang-tidy-bigquery-ci.yaml index b954e747a024d..bafe65d6b4b02 100644 --- a/ci/cloudbuild/triggers/clang-tidy-bigquery-ci.yaml +++ b/ci/cloudbuild/triggers/clang-tidy-bigquery-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2023-10-24T17:38:53.406054685Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: 5ad8f0dd-38a8-4a40-aa81-925e0867fef6 + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: clang-tidy-bigquery-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/5ad8f0dd-38a8-4a40-aa81-925e0867fef6 +name: prepare-for-v3-0-0-clang-tidy-bigquery-ci substitutions: _BUILD_NAME: clang-tidy _DISTRO: fedora-latest-cmake diff --git a/ci/cloudbuild/triggers/clang-tidy-bigquery-pr.yaml b/ci/cloudbuild/triggers/clang-tidy-bigquery-pr.yaml index 3172cac412840..ab16f00d6de26 100644 --- a/ci/cloudbuild/triggers/clang-tidy-bigquery-pr.yaml +++ b/ci/cloudbuild/triggers/clang-tidy-bigquery-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2023-10-24T17:38:54.756444054Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 94fbc973-ea4b-49e9-a1ce-db3994993675 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: clang-tidy-bigquery-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/94fbc973-ea4b-49e9-a1ce-db3994993675 +name: prepare-for-v3-0-0-clang-tidy-bigquery-pr substitutions: _BUILD_NAME: clang-tidy _DISTRO: fedora-latest-cmake diff --git a/ci/cloudbuild/triggers/clang-tidy-ci.yaml b/ci/cloudbuild/triggers/clang-tidy-ci.yaml index fc71b6c8eb0dd..963e99a088ec0 100644 --- a/ci/cloudbuild/triggers/clang-tidy-ci.yaml +++ b/ci/cloudbuild/triggers/clang-tidy-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-03-22T00:36:44.386437504Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: 88b3547a-7d8b-4af2-998f-e2ed284ebaaa + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: clang-tidy-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/88b3547a-7d8b-4af2-998f-e2ed284ebaaa +name: prepare-for-v3-0-0-clang-tidy-ci substitutions: _BUILD_NAME: clang-tidy _DISTRO: fedora-latest-cmake diff --git a/ci/cloudbuild/triggers/clang-tidy-compute.yaml b/ci/cloudbuild/triggers/clang-tidy-compute.yaml index 3478a8c656eb3..bc83d9d7ca154 100644 --- a/ci/cloudbuild/triggers/clang-tidy-compute.yaml +++ b/ci/cloudbuild/triggers/clang-tidy-compute.yaml @@ -12,16 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2023-07-10T20:41:19.444876272Z' description: Runs clang-tidy on all compute libraries. gitFileSource: path: ci/cloudbuild/cloudbuild.yaml repoType: GITHUB revision: refs/heads/main uri: https://github.com/googleapis/google-cloud-cpp -id: 6d247368-98d8-4b06-9179-afeedd054f50 -name: clang-tidy-compute -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/6d247368-98d8-4b06-9179-afeedd054f50 +name: prepare-for-v3-0-0-clang-tidy-compute sourceToBuild: ref: refs/heads/main repoType: GITHUB diff --git a/ci/cloudbuild/triggers/clang-tidy-pr.yaml b/ci/cloudbuild/triggers/clang-tidy-pr.yaml index 3df8445b2199f..d879284ef82e4 100644 --- a/ci/cloudbuild/triggers/clang-tidy-pr.yaml +++ b/ci/cloudbuild/triggers/clang-tidy-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-09T18:15:36.012514343Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 8448ca7a-edac-4d56-ae23-928897249570 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: clang-tidy-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/8448ca7a-edac-4d56-ae23-928897249570 +name: prepare-for-v3-0-0-clang-tidy-pr substitutions: _BUILD_NAME: clang-tidy _DISTRO: fedora-latest-cmake diff --git a/ci/cloudbuild/triggers/clang-tidy-pubsub-ci.yaml b/ci/cloudbuild/triggers/clang-tidy-pubsub-ci.yaml index 46ec3f0f85b19..e1915efbc7fac 100644 --- a/ci/cloudbuild/triggers/clang-tidy-pubsub-ci.yaml +++ b/ci/cloudbuild/triggers/clang-tidy-pubsub-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2023-10-24T17:38:56.263489135Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: 7bdca032-6ec4-4b7c-9c0b-d04bd19c2ba3 + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: clang-tidy-pubsub-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/7bdca032-6ec4-4b7c-9c0b-d04bd19c2ba3 +name: prepare-for-v3-0-0-clang-tidy-pubsub-ci substitutions: _BUILD_NAME: clang-tidy _DISTRO: fedora-latest-cmake diff --git a/ci/cloudbuild/triggers/clang-tidy-pubsub-pr.yaml b/ci/cloudbuild/triggers/clang-tidy-pubsub-pr.yaml index 2aa254d3eceb8..00d7f9a164064 100644 --- a/ci/cloudbuild/triggers/clang-tidy-pubsub-pr.yaml +++ b/ci/cloudbuild/triggers/clang-tidy-pubsub-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2023-10-24T17:38:57.870335767Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 47691835-f91f-42a3-92bf-7820c2eb34f2 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: clang-tidy-pubsub-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/47691835-f91f-42a3-92bf-7820c2eb34f2 +name: prepare-for-v3-0-0-clang-tidy-pubsub-pr substitutions: _BUILD_NAME: clang-tidy _DISTRO: fedora-latest-cmake diff --git a/ci/cloudbuild/triggers/clang-tidy-storage-ci.yaml b/ci/cloudbuild/triggers/clang-tidy-storage-ci.yaml index aa39e6a6335df..af98d3c402afc 100644 --- a/ci/cloudbuild/triggers/clang-tidy-storage-ci.yaml +++ b/ci/cloudbuild/triggers/clang-tidy-storage-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2023-10-24T17:38:59.377179872Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: dcb2a46a-01f9-4b02-8c34-79943099e25f + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: clang-tidy-storage-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/dcb2a46a-01f9-4b02-8c34-79943099e25f +name: prepare-for-v3-0-0-clang-tidy-storage-ci substitutions: _BUILD_NAME: clang-tidy _DISTRO: fedora-latest-cmake diff --git a/ci/cloudbuild/triggers/clang-tidy-storage-pr.yaml b/ci/cloudbuild/triggers/clang-tidy-storage-pr.yaml index 25a3b368e72b3..14f2af7859fb8 100644 --- a/ci/cloudbuild/triggers/clang-tidy-storage-pr.yaml +++ b/ci/cloudbuild/triggers/clang-tidy-storage-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2023-10-24T17:39:00.640655067Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 163b45f9-e55c-48fb-948d-c1f4539f1524 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: clang-tidy-storage-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/163b45f9-e55c-48fb-948d-c1f4539f1524 +name: prepare-for-v3-0-0-clang-tidy-storage-pr substitutions: _BUILD_NAME: clang-tidy _DISTRO: fedora-latest-cmake diff --git a/ci/cloudbuild/triggers/clang-tidy-tools-ci.yaml b/ci/cloudbuild/triggers/clang-tidy-tools-ci.yaml index f1945eeb1a984..74929c76c2f01 100644 --- a/ci/cloudbuild/triggers/clang-tidy-tools-ci.yaml +++ b/ci/cloudbuild/triggers/clang-tidy-tools-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2023-10-24T17:39:02.117138961Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: 8be80238-a508-43c4-a1c3-8ce285cbb571 + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: clang-tidy-tools-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/8be80238-a508-43c4-a1c3-8ce285cbb571 +name: prepare-for-v3-0-0-clang-tidy-tools-ci substitutions: _BUILD_NAME: clang-tidy _DISTRO: fedora-latest-cmake diff --git a/ci/cloudbuild/triggers/clang-tidy-tools-pr.yaml b/ci/cloudbuild/triggers/clang-tidy-tools-pr.yaml index b220c26c2034b..86a98cefc0b23 100644 --- a/ci/cloudbuild/triggers/clang-tidy-tools-pr.yaml +++ b/ci/cloudbuild/triggers/clang-tidy-tools-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2023-10-24T17:39:03.693462256Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: cb911c90-e6a6-4440-a1c9-0890cce4565f includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: clang-tidy-tools-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/cb911c90-e6a6-4440-a1c9-0890cce4565f +name: prepare-for-v3-0-0-clang-tidy-tools-pr substitutions: _BUILD_NAME: clang-tidy _DISTRO: fedora-latest-cmake diff --git a/ci/cloudbuild/triggers/cmake-gcs-rest-ci.yaml b/ci/cloudbuild/triggers/cmake-gcs-rest-ci.yaml index 91b7cd684fc96..26b727708ac5c 100644 --- a/ci/cloudbuild/triggers/cmake-gcs-rest-ci.yaml +++ b/ci/cloudbuild/triggers/cmake-gcs-rest-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2022-04-28T21:23:21.953441802Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: 87c8300c-afd2-419e-b878-2e8ceb7a7496 + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: cmake-gcs-rest-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/87c8300c-afd2-419e-b878-2e8ceb7a7496 +name: prepare-for-v3-0-0-cmake-gcs-rest-ci substitutions: _BUILD_NAME: cmake-gcs-rest _DISTRO: fedora-latest-cmake diff --git a/ci/cloudbuild/triggers/cmake-gcs-rest-pr.yaml b/ci/cloudbuild/triggers/cmake-gcs-rest-pr.yaml index f33f31f74bcda..8768d74297c8a 100644 --- a/ci/cloudbuild/triggers/cmake-gcs-rest-pr.yaml +++ b/ci/cloudbuild/triggers/cmake-gcs-rest-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2022-04-28T21:23:32.712697493Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 4bc5ac63-ff83-4063-b5f6-c1d04c0ce706 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: cmake-gcs-rest-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/4bc5ac63-ff83-4063-b5f6-c1d04c0ce706 +name: prepare-for-v3-0-0-cmake-gcs-rest-pr substitutions: _BUILD_NAME: cmake-gcs-rest _DISTRO: fedora-latest-cmake diff --git a/ci/cloudbuild/triggers/cmake-install-ci.yaml b/ci/cloudbuild/triggers/cmake-install-ci.yaml index 1e9ea8a9d495d..ac1c1155fb541 100644 --- a/ci/cloudbuild/triggers/cmake-install-ci.yaml +++ b/ci/cloudbuild/triggers/cmake-install-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-03-24T00:02:59.444857698Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: 49d3dff1-bee0-4a2b-9bd1-a696d54e48c9 + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: cmake-install-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/49d3dff1-bee0-4a2b-9bd1-a696d54e48c9 +name: prepare-for-v3-0-0-cmake-install-ci substitutions: _BUILD_NAME: cmake-install _DISTRO: fedora-latest-cmake diff --git a/ci/cloudbuild/triggers/cmake-install-pr.yaml b/ci/cloudbuild/triggers/cmake-install-pr.yaml index 46529333844cd..d58ea220ad468 100644 --- a/ci/cloudbuild/triggers/cmake-install-pr.yaml +++ b/ci/cloudbuild/triggers/cmake-install-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-09T18:15:41.397491676Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 1e40a006-1073-4d1b-82ca-03528fd3fd51 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: cmake-install-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/1e40a006-1073-4d1b-82ca-03528fd3fd51 +name: prepare-for-v3-0-0-cmake-install-pr substitutions: _BUILD_NAME: cmake-install _DISTRO: fedora-latest-cmake diff --git a/ci/cloudbuild/triggers/cmake-oldest-deps-ci.yaml b/ci/cloudbuild/triggers/cmake-oldest-deps-ci.yaml index a4e015aa1d0c3..8f3b417c0f146 100644 --- a/ci/cloudbuild/triggers/cmake-oldest-deps-ci.yaml +++ b/ci/cloudbuild/triggers/cmake-oldest-deps-ci.yaml @@ -12,19 +12,17 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-28T12:39:57.322470341Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: 64e55546-2701-4234-b348-fe9a4478dd38 + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: cmake-oldest-deps-ci +name: prepare-for-v3-0-0-cmake-oldest-deps-ci substitutions: _BUILD_NAME: cmake-oldest-deps - _DISTRO: ubuntu-focal + _DISTRO: ubuntu-22.04 _TRIGGER_TYPE: ci tags: - ci diff --git a/ci/cloudbuild/triggers/cmake-oldest-deps-pr.yaml b/ci/cloudbuild/triggers/cmake-oldest-deps-pr.yaml index f91205e69e765..2d938e0165a31 100644 --- a/ci/cloudbuild/triggers/cmake-oldest-deps-pr.yaml +++ b/ci/cloudbuild/triggers/cmake-oldest-deps-pr.yaml @@ -12,20 +12,18 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-28T12:39:51.473360103Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 384786a7-5ee5-49e2-8866-369fe55c7d04 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: cmake-oldest-deps-pr +name: prepare-for-v3-0-0-cmake-oldest-deps-pr substitutions: _BUILD_NAME: cmake-oldest-deps - _DISTRO: ubuntu-focal + _DISTRO: ubuntu-22.04 _TRIGGER_TYPE: pr tags: - pr diff --git a/ci/cloudbuild/triggers/cmake-single-feature-ci.yaml b/ci/cloudbuild/triggers/cmake-single-feature-ci.yaml index 5576c038e3231..d42e9f2fe47f0 100644 --- a/ci/cloudbuild/triggers/cmake-single-feature-ci.yaml +++ b/ci/cloudbuild/triggers/cmake-single-feature-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2022-05-06T21:50:55.921332969Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: 09d4a76e-0a9f-4ef1-ab7e-de78684c23cc + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: cmake-single-feature-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/09d4a76e-0a9f-4ef1-ab7e-de78684c23cc +name: prepare-for-v3-0-0-cmake-single-feature-ci substitutions: _BUILD_NAME: cmake-single-feature _DISTRO: fedora-latest-cmake diff --git a/ci/cloudbuild/triggers/cmake-single-feature-pr.yaml b/ci/cloudbuild/triggers/cmake-single-feature-pr.yaml index b51df7d6d4c6b..e0d898c112f84 100644 --- a/ci/cloudbuild/triggers/cmake-single-feature-pr.yaml +++ b/ci/cloudbuild/triggers/cmake-single-feature-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2022-05-06T21:51:02.240926631Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 3e376bfc-ab89-4c29-a640-f7f88f756c8c includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: cmake-single-feature-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/3e376bfc-ab89-4c29-a640-f7f88f756c8c +name: prepare-for-v3-0-0-cmake-single-feature-pr substitutions: _BUILD_NAME: cmake-single-feature _DISTRO: fedora-latest-cmake diff --git a/ci/cloudbuild/triggers/cmake-split-install-ci.yaml b/ci/cloudbuild/triggers/cmake-split-install-ci.yaml index d76869eee2028..d61d6acb02119 100644 --- a/ci/cloudbuild/triggers/cmake-split-install-ci.yaml +++ b/ci/cloudbuild/triggers/cmake-split-install-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2023-07-10T15:26:52.770667141Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: 0b727502-82fe-41a1-a4e2-73f9375718ad + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: cmake-split-install-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/0b727502-82fe-41a1-a4e2-73f9375718ad +name: prepare-for-v3-0-0-cmake-split-install-ci substitutions: _BUILD_NAME: cmake-split-install _DISTRO: fedora-latest-cmake diff --git a/ci/cloudbuild/triggers/cmake-split-install-pr.yaml b/ci/cloudbuild/triggers/cmake-split-install-pr.yaml index 0d0a9193291e6..9e19e6053983c 100644 --- a/ci/cloudbuild/triggers/cmake-split-install-pr.yaml +++ b/ci/cloudbuild/triggers/cmake-split-install-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2023-07-10T15:26:59.182700120Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: a6f49616-83ce-4471-b517-f86c44e09ce5 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: cmake-split-install-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/a6f49616-83ce-4471-b517-f86c44e09ce5 +name: prepare-for-v3-0-0-cmake-split-install-pr substitutions: _BUILD_NAME: cmake-split-install _DISTRO: fedora-latest-cmake diff --git a/ci/cloudbuild/triggers/conformance-ci.yaml b/ci/cloudbuild/triggers/conformance-ci.yaml index c02548500f06f..e1423e131eb2c 100644 --- a/ci/cloudbuild/triggers/conformance-ci.yaml +++ b/ci/cloudbuild/triggers/conformance-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2023-10-30T21:38:59.771402989Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: 9858e9c0-2f5a-45ad-9e5b-3af30eaf30af + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: conformance-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/9858e9c0-2f5a-45ad-9e5b-3af30eaf30af +name: prepare-for-v3-0-0-conformance-ci substitutions: _BUILD_NAME: conformance _DISTRO: fedora-latest-bazel diff --git a/ci/cloudbuild/triggers/conformance-pr.yaml b/ci/cloudbuild/triggers/conformance-pr.yaml index 90c09130c8612..c9fb8a321151c 100644 --- a/ci/cloudbuild/triggers/conformance-pr.yaml +++ b/ci/cloudbuild/triggers/conformance-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2023-10-30T21:35:19.557214462Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 03976e73-5154-457f-813f-4d33bb162e70 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: conformance-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/03976e73-5154-457f-813f-4d33bb162e70 +name: prepare-for-v3-0-0-conformance-pr substitutions: _BUILD_NAME: conformance _DISTRO: fedora-latest-bazel diff --git a/ci/cloudbuild/triggers/coverage-ci.yaml b/ci/cloudbuild/triggers/coverage-ci.yaml index af06ffa89b86c..3e27a5f93c64d 100644 --- a/ci/cloudbuild/triggers/coverage-ci.yaml +++ b/ci/cloudbuild/triggers/coverage-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-16T13:00:27.617873387Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: 5c4f383c-11bc-4eb7-a42f-c8d69172caf2 + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: coverage-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/5c4f383c-11bc-4eb7-a42f-c8d69172caf2 +name: prepare-for-v3-0-0-coverage-ci substitutions: _BUILD_NAME: coverage _DISTRO: fedora-latest-bazel diff --git a/ci/cloudbuild/triggers/coverage-pr.yaml b/ci/cloudbuild/triggers/coverage-pr.yaml index a6f08ff1dde82..a41deec35ff49 100644 --- a/ci/cloudbuild/triggers/coverage-pr.yaml +++ b/ci/cloudbuild/triggers/coverage-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-16T13:00:31.944469840Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 0ada9a21-5379-48e2-9e6d-8c388d6333e5 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: coverage-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/0ada9a21-5379-48e2-9e6d-8c388d6333e5 +name: prepare-for-v3-0-0-coverage-pr substitutions: _BUILD_NAME: coverage _DISTRO: fedora-latest-bazel diff --git a/ci/cloudbuild/triggers/cxx14-ci.yaml b/ci/cloudbuild/triggers/cxx14-ci.yaml deleted file mode 100644 index 1d828f4ffd743..0000000000000 --- a/ci/cloudbuild/triggers/cxx14-ci.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -createTime: '2022-06-23T15:35:45.803275576Z' -filename: ci/cloudbuild/cloudbuild.yaml -github: - name: google-cloud-cpp - owner: googleapis - push: - branch: ^main$ -id: 23c2a0e2-d64f-4ca4-869a-1064e2549624 -includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: cxx14-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/23c2a0e2-d64f-4ca4-869a-1064e2549624 -substitutions: - _BUILD_NAME: cxx14 - _DISTRO: fedora-latest-cxx14 - _TRIGGER_TYPE: ci -tags: -- ci diff --git a/ci/cloudbuild/triggers/cxx14-pr.yaml b/ci/cloudbuild/triggers/cxx14-pr.yaml deleted file mode 100644 index 872298572d48b..0000000000000 --- a/ci/cloudbuild/triggers/cxx14-pr.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -createTime: '2022-06-23T15:35:40.201715614Z' -filename: ci/cloudbuild/cloudbuild.yaml -github: - name: google-cloud-cpp - owner: googleapis - pullRequest: - branch: ^main$ - commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 54861c36-30b4-4c71-81f9-a765a957ef23 -includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: cxx14-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/54861c36-30b4-4c71-81f9-a765a957ef23 -substitutions: - _BUILD_NAME: cxx14 - _DISTRO: fedora-latest-cxx14 - _TRIGGER_TYPE: pr -tags: -- pr diff --git a/ci/cloudbuild/triggers/cxx20-ci.yaml b/ci/cloudbuild/triggers/cxx20-ci.yaml index c91ce65b5d020..7fc05aad6297e 100644 --- a/ci/cloudbuild/triggers/cxx20-ci.yaml +++ b/ci/cloudbuild/triggers/cxx20-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-10-21T13:06:18.672990290Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: 7471e4f8-769d-48dd-8f6f-253bef7051ef + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: cxx20-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/7471e4f8-769d-48dd-8f6f-253bef7051ef +name: prepare-for-v3-0-0-cxx20-ci substitutions: _BUILD_NAME: cxx20 _DISTRO: fedora-latest-cxx20 diff --git a/ci/cloudbuild/triggers/cxx20-pr.yaml b/ci/cloudbuild/triggers/cxx20-pr.yaml index 648d65635062b..b8b148d6fa862 100644 --- a/ci/cloudbuild/triggers/cxx20-pr.yaml +++ b/ci/cloudbuild/triggers/cxx20-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-10-21T13:06:28.013633506Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: f4da53f5-3966-45bd-8821-8a43a0804ecc includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: cxx20-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/f4da53f5-3966-45bd-8821-8a43a0804ecc +name: prepare-for-v3-0-0-cxx20-pr substitutions: _BUILD_NAME: cxx20 _DISTRO: fedora-latest-cxx20 diff --git a/ci/cloudbuild/triggers/demo-alpine-stable-ci.yaml b/ci/cloudbuild/triggers/demo-alpine-stable-ci.yaml index 505824c5934b8..c919b655a2aed 100644 --- a/ci/cloudbuild/triggers/demo-alpine-stable-ci.yaml +++ b/ci/cloudbuild/triggers/demo-alpine-stable-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2022-06-24T18:22:48.436591174Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: d5596043-576e-41b2-b324-72805c5983e1 + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: demo-alpine-stable-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/d5596043-576e-41b2-b324-72805c5983e1 +name: prepare-for-v3-0-0-demo-alpine-stable-ci substitutions: _BUILD_NAME: demo-install _DISTRO: demo-alpine-stable diff --git a/ci/cloudbuild/triggers/demo-alpine-stable-pr.yaml b/ci/cloudbuild/triggers/demo-alpine-stable-pr.yaml index 7e7ae83ac78dd..6d0d2405c097a 100644 --- a/ci/cloudbuild/triggers/demo-alpine-stable-pr.yaml +++ b/ci/cloudbuild/triggers/demo-alpine-stable-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2022-06-24T18:22:53.925960095Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 85f2a500-3643-4ac3-96be-4b824a69762f includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: demo-alpine-stable-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/85f2a500-3643-4ac3-96be-4b824a69762f +name: prepare-for-v3-0-0-demo-alpine-stable-pr substitutions: _BUILD_NAME: demo-install _DISTRO: demo-alpine-stable diff --git a/ci/cloudbuild/triggers/demo-debian-bookworm-ci.yaml b/ci/cloudbuild/triggers/demo-debian-bookworm-ci.yaml index ea8d0346b10aa..a8e95613e1338 100644 --- a/ci/cloudbuild/triggers/demo-debian-bookworm-ci.yaml +++ b/ci/cloudbuild/triggers/demo-debian-bookworm-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2023-09-09T16:23:55.750964253Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: 6e1b6108-8b51-4751-ba8c-59dd82c062dc + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: demo-debian-bookworm-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/6e1b6108-8b51-4751-ba8c-59dd82c062dc +name: prepare-for-v3-0-0-demo-debian-bookworm-ci substitutions: _BUILD_NAME: demo-install _DISTRO: demo-debian-bookworm diff --git a/ci/cloudbuild/triggers/demo-debian-bookworm-pr.yaml b/ci/cloudbuild/triggers/demo-debian-bookworm-pr.yaml index 8ededcc7d56a8..9adf60af4fda8 100644 --- a/ci/cloudbuild/triggers/demo-debian-bookworm-pr.yaml +++ b/ci/cloudbuild/triggers/demo-debian-bookworm-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2023-09-09T16:24:10.043640665Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: f1cbc3fc-d09b-483f-bb4c-0ea3394b334e includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: demo-debian-bookworm-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/f1cbc3fc-d09b-483f-bb4c-0ea3394b334e +name: prepare-for-v3-0-0-demo-debian-bookworm-pr substitutions: _BUILD_NAME: demo-install _DISTRO: demo-debian-bookworm diff --git a/ci/cloudbuild/triggers/demo-debian-bullseye-ci.yaml b/ci/cloudbuild/triggers/demo-debian-bullseye-ci.yaml index 32bc2d971ee0a..520e01b32871e 100644 --- a/ci/cloudbuild/triggers/demo-debian-bullseye-ci.yaml +++ b/ci/cloudbuild/triggers/demo-debian-bullseye-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-08-17T14:42:37.946358416Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: 99ed51ab-3b42-4046-8698-6ea54b39afaa + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: demo-debian-bullseye-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/99ed51ab-3b42-4046-8698-6ea54b39afaa +name: prepare-for-v3-0-0-demo-debian-bullseye-ci substitutions: _BUILD_NAME: demo-install _DISTRO: demo-debian-bullseye diff --git a/ci/cloudbuild/triggers/demo-debian-bullseye-pr.yaml b/ci/cloudbuild/triggers/demo-debian-bullseye-pr.yaml index a18f67684c95b..a608eae79e4d8 100644 --- a/ci/cloudbuild/triggers/demo-debian-bullseye-pr.yaml +++ b/ci/cloudbuild/triggers/demo-debian-bullseye-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-08-17T14:43:32.603712645Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 3cc016a1-2a35-467a-94af-4eab3822cbfd includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: demo-debian-bullseye-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/3cc016a1-2a35-467a-94af-4eab3822cbfd +name: prepare-for-v3-0-0-demo-debian-bullseye-pr substitutions: _BUILD_NAME: demo-install _DISTRO: demo-debian-bullseye diff --git a/ci/cloudbuild/triggers/demo-fedora-ci.yaml b/ci/cloudbuild/triggers/demo-fedora-ci.yaml index a8d5d0048ed6d..5909efa785e60 100644 --- a/ci/cloudbuild/triggers/demo-fedora-ci.yaml +++ b/ci/cloudbuild/triggers/demo-fedora-ci.yaml @@ -12,16 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-13T23:35:58.117686333Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: efe44360-59b3-4784-96f6-ebe03ecdd2f7 + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: demo-fedora-ci +name: prepare-for-v3-0-0-demo-fedora-ci substitutions: _BUILD_NAME: demo-install _DISTRO: demo-fedora diff --git a/ci/cloudbuild/triggers/demo-fedora-pr.yaml b/ci/cloudbuild/triggers/demo-fedora-pr.yaml index f622b52d16894..6c1b8f6acfaf4 100644 --- a/ci/cloudbuild/triggers/demo-fedora-pr.yaml +++ b/ci/cloudbuild/triggers/demo-fedora-pr.yaml @@ -12,17 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-13T23:35:59.268915688Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 182e01a3-0956-47bc-9a8a-023318168962 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: demo-fedora-pr +name: prepare-for-v3-0-0-demo-fedora-pr substitutions: _BUILD_NAME: demo-install _DISTRO: demo-fedora diff --git a/ci/cloudbuild/triggers/demo-opensuse-leap-ci.yaml b/ci/cloudbuild/triggers/demo-opensuse-leap-ci.yaml index ae9bcd864c143..be28f6ff6ffd9 100644 --- a/ci/cloudbuild/triggers/demo-opensuse-leap-ci.yaml +++ b/ci/cloudbuild/triggers/demo-opensuse-leap-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-13T23:36:00.260269718Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: 3b91bcd6-80af-4aa0-9e64-60047f5a65f5 + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: demo-opensuse-leap-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/3b91bcd6-80af-4aa0-9e64-60047f5a65f5 +name: prepare-for-v3-0-0-demo-opensuse-leap-ci substitutions: _BUILD_NAME: demo-install _DISTRO: demo-opensuse-leap diff --git a/ci/cloudbuild/triggers/demo-opensuse-leap-pr.yaml b/ci/cloudbuild/triggers/demo-opensuse-leap-pr.yaml index 8f9130fc2a1b4..f60a16468f3cc 100644 --- a/ci/cloudbuild/triggers/demo-opensuse-leap-pr.yaml +++ b/ci/cloudbuild/triggers/demo-opensuse-leap-pr.yaml @@ -12,17 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-13T23:36:01.288217115Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: f18095de-383b-45bd-835e-06a70adbf296 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: demo-opensuse-leap-pr +name: prepare-for-v3-0-0-demo-opensuse-leap-pr substitutions: _BUILD_NAME: demo-install _DISTRO: demo-opensuse-leap diff --git a/ci/cloudbuild/triggers/demo-rockylinux-9-ci.yaml b/ci/cloudbuild/triggers/demo-rockylinux-9-ci.yaml index 688a3c84594c9..becf504d6ef5e 100644 --- a/ci/cloudbuild/triggers/demo-rockylinux-9-ci.yaml +++ b/ci/cloudbuild/triggers/demo-rockylinux-9-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2022-11-09T20:49:08.012480312Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: de5ea0bf-fef1-433d-aa17-4cb50ab8278b + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: demo-rockylinux-9-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/de5ea0bf-fef1-433d-aa17-4cb50ab8278b +name: prepare-for-v3-0-0-demo-rockylinux-9-ci substitutions: _BUILD_NAME: demo-install _DISTRO: demo-rockylinux-9 diff --git a/ci/cloudbuild/triggers/demo-rockylinux-9-pr.yaml b/ci/cloudbuild/triggers/demo-rockylinux-9-pr.yaml index 80128088e5b7e..ff38c00d9cf20 100644 --- a/ci/cloudbuild/triggers/demo-rockylinux-9-pr.yaml +++ b/ci/cloudbuild/triggers/demo-rockylinux-9-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2022-11-09T20:49:14.519880680Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 55c2722f-ba23-4b27-af94-cee7095098e2 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: demo-rockylinux-9-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/55c2722f-ba23-4b27-af94-cee7095098e2 +name: prepare-for-v3-0-0-demo-rockylinux-9-pr substitutions: _BUILD_NAME: demo-install _DISTRO: demo-rockylinux-9 diff --git a/ci/cloudbuild/triggers/demo-ubuntu-24-04-ci.yaml b/ci/cloudbuild/triggers/demo-ubuntu-24-04-ci.yaml index 76f3eba809deb..f7f7a77804245 100644 --- a/ci/cloudbuild/triggers/demo-ubuntu-24-04-ci.yaml +++ b/ci/cloudbuild/triggers/demo-ubuntu-24-04-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2024-04-29T15:41:19.785339726Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: 93fdf9e2-71b2-44a1-911e-13dca09cbd7c + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: demo-ubuntu-24-04-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/93fdf9e2-71b2-44a1-911e-13dca09cbd7c +name: prepare-for-v3-0-0-demo-ubuntu-24-04-ci substitutions: _BUILD_NAME: demo-install _DISTRO: demo-ubuntu-24.04 diff --git a/ci/cloudbuild/triggers/demo-ubuntu-24-04-pr.yaml b/ci/cloudbuild/triggers/demo-ubuntu-24-04-pr.yaml index a3cc011fc7e9e..8ec5b151c6ab8 100644 --- a/ci/cloudbuild/triggers/demo-ubuntu-24-04-pr.yaml +++ b/ci/cloudbuild/triggers/demo-ubuntu-24-04-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2024-04-29T15:40:53.593998357Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 4e65bb4a-0deb-4e5c-a074-f628fa012f13 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: demo-ubuntu-24-04-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/4e65bb4a-0deb-4e5c-a074-f628fa012f13 +name: prepare-for-v3-0-0-demo-ubuntu-24-04-pr substitutions: _BUILD_NAME: demo-install _DISTRO: demo-ubuntu-24.04 diff --git a/ci/cloudbuild/triggers/demo-ubuntu-jammy-ci.yaml b/ci/cloudbuild/triggers/demo-ubuntu-jammy-ci.yaml index 750bbb568dc53..fd52ed4e7bb07 100644 --- a/ci/cloudbuild/triggers/demo-ubuntu-jammy-ci.yaml +++ b/ci/cloudbuild/triggers/demo-ubuntu-jammy-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2022-05-13T19:36:13.788953133Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: a646ace3-c0a6-4acf-8e42-72c8d2aece0c + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: demo-ubuntu-jammy-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/a646ace3-c0a6-4acf-8e42-72c8d2aece0c +name: prepare-for-v3-0-0-demo-ubuntu-jammy-ci substitutions: _BUILD_NAME: demo-install _DISTRO: demo-ubuntu-jammy diff --git a/ci/cloudbuild/triggers/demo-ubuntu-jammy-pr.yaml b/ci/cloudbuild/triggers/demo-ubuntu-jammy-pr.yaml index 866f7a55a244a..c2d077ef36f19 100644 --- a/ci/cloudbuild/triggers/demo-ubuntu-jammy-pr.yaml +++ b/ci/cloudbuild/triggers/demo-ubuntu-jammy-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2022-05-13T19:36:14.958592625Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: f190d45e-015f-4e09-bc3f-864aebf18316 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: demo-ubuntu-jammy-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/f190d45e-015f-4e09-bc3f-864aebf18316 +name: prepare-for-v3-0-0-demo-ubuntu-jammy-pr substitutions: _BUILD_NAME: demo-install _DISTRO: demo-ubuntu-jammy diff --git a/ci/cloudbuild/triggers/gcc-oldest-ci.yaml b/ci/cloudbuild/triggers/gcc-oldest-ci.yaml index 4a3f90949fe28..859ed360cdd7f 100644 --- a/ci/cloudbuild/triggers/gcc-oldest-ci.yaml +++ b/ci/cloudbuild/triggers/gcc-oldest-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2024-07-02T17:49:31.595592561Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: 71fc938d-2480-4bdb-b274-eb0bf3a3ed1b + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: gcc-oldest-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/71fc938d-2480-4bdb-b274-eb0bf3a3ed1b +name: prepare-for-v3-0-0-gcc-oldest-ci substitutions: _BUILD_NAME: gcc-oldest _DISTRO: gcc-oldest diff --git a/ci/cloudbuild/triggers/gcc-oldest-pr.yaml b/ci/cloudbuild/triggers/gcc-oldest-pr.yaml index 5f2ddeb348c6f..01224b0745024 100644 --- a/ci/cloudbuild/triggers/gcc-oldest-pr.yaml +++ b/ci/cloudbuild/triggers/gcc-oldest-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2024-07-02T17:51:28.002279385Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: d2015e6f-b0c4-46a4-afc6-d1ac99c4abea includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: gcc-oldest-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/d2015e6f-b0c4-46a4-afc6-d1ac99c4abea +name: prepare-for-v3-0-0-gcc-oldest-pr substitutions: _BUILD_NAME: gcc-oldest _DISTRO: gcc-oldest diff --git a/ci/cloudbuild/triggers/generate-libraries-ci.yaml b/ci/cloudbuild/triggers/generate-libraries-ci.yaml index 032b0fe9af591..5b987787e09fc 100644 --- a/ci/cloudbuild/triggers/generate-libraries-ci.yaml +++ b/ci/cloudbuild/triggers/generate-libraries-ci.yaml @@ -12,16 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-23T21:24:08.230967530Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: 11fcbd32-d016-4661-ba98-31c65277739c + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: generate-libraries-ci +name: prepare-for-v3-0-0-generate-libraries-ci substitutions: _BUILD_NAME: generate-libraries _DISTRO: checkers diff --git a/ci/cloudbuild/triggers/generate-libraries-pr.yaml b/ci/cloudbuild/triggers/generate-libraries-pr.yaml index 0fd7ad36c90c4..9b0b0b6e96d56 100644 --- a/ci/cloudbuild/triggers/generate-libraries-pr.yaml +++ b/ci/cloudbuild/triggers/generate-libraries-pr.yaml @@ -12,17 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-23T21:24:15.931797724Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 6dc01f3c-7ccc-422f-8adb-2de0478853b3 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: generate-libraries-pr +name: prepare-for-v3-0-0-generate-libraries-pr substitutions: _BUILD_NAME: generate-libraries _DISTRO: checkers diff --git a/ci/cloudbuild/triggers/grpc-at-head.yaml b/ci/cloudbuild/triggers/grpc-at-head.yaml index 6a7540265f2e4..00f717b84709e 100644 --- a/ci/cloudbuild/triggers/grpc-at-head.yaml +++ b/ci/cloudbuild/triggers/grpc-at-head.yaml @@ -12,16 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2023-03-27T18:47:54.336916197Z' description: Compiles using gRPC at HEAD gitFileSource: path: ci/cloudbuild/cloudbuild.yaml repoType: GITHUB revision: refs/heads/main uri: https://github.com/googleapis/google-cloud-cpp -id: e21f4d09-213f-41ef-9be5-62309adf4287 -name: grpc-at-head -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/e21f4d09-213f-41ef-9be5-62309adf4287 +name: prepare-for-v3-0-0-grpc-at-head sourceToBuild: ref: refs/heads/main repoType: GITHUB diff --git a/ci/cloudbuild/triggers/integration-daily.yaml b/ci/cloudbuild/triggers/integration-daily.yaml index 6bb4b4101b872..32e0830882da5 100644 --- a/ci/cloudbuild/triggers/integration-daily.yaml +++ b/ci/cloudbuild/triggers/integration-daily.yaml @@ -12,16 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-26T23:11:01.303393604Z' description: Runs the slow integration tests gitFileSource: path: ci/cloudbuild/cloudbuild.yaml repoType: GITHUB revision: refs/heads/main uri: https://github.com/googleapis/google-cloud-cpp -id: 03b9bb52-8d28-4095-9ca4-653f8602acf7 -name: integration-daily -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/03b9bb52-8d28-4095-9ca4-653f8602acf7 +name: prepare-for-v3-0-0-integration-daily sourceToBuild: ref: refs/heads/main repoType: GITHUB diff --git a/ci/cloudbuild/triggers/integration-production-ci.yaml b/ci/cloudbuild/triggers/integration-production-ci.yaml index 7c22f06458c91..50af2915e2b37 100644 --- a/ci/cloudbuild/triggers/integration-production-ci.yaml +++ b/ci/cloudbuild/triggers/integration-production-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2022-02-10T22:16:26.551396759Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: ee3bb11b-6d26-4c21-a5fb-aeca37c2deb8 + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: integration-production-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/ee3bb11b-6d26-4c21-a5fb-aeca37c2deb8 +name: prepare-for-v3-0-0-integration-production-ci substitutions: _BUILD_NAME: integration-production _DISTRO: fedora-latest-bazel diff --git a/ci/cloudbuild/triggers/integration-production-pr.yaml b/ci/cloudbuild/triggers/integration-production-pr.yaml index 3ffd9c67bae97..5d1def6f2791a 100644 --- a/ci/cloudbuild/triggers/integration-production-pr.yaml +++ b/ci/cloudbuild/triggers/integration-production-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2022-02-10T22:16:19.911913669Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 60e90544-5856-457c-b293-d9bade69c132 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: integration-production-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/60e90544-5856-457c-b293-d9bade69c132 +name: prepare-for-v3-0-0-integration-production-pr substitutions: _BUILD_NAME: integration-production _DISTRO: fedora-latest-bazel diff --git a/ci/cloudbuild/triggers/libcxx-ci.yaml b/ci/cloudbuild/triggers/libcxx-ci.yaml index 0fc1a57d02c30..3bc3507a6fa91 100644 --- a/ci/cloudbuild/triggers/libcxx-ci.yaml +++ b/ci/cloudbuild/triggers/libcxx-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-14T19:46:44.349528722Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: 431b657a-77ea-4448-8f1f-16af521409e5 + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: libcxx-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/431b657a-77ea-4448-8f1f-16af521409e5 +name: prepare-for-v3-0-0-libcxx-ci substitutions: _BUILD_NAME: libcxx _DISTRO: fedora-latest-bazel diff --git a/ci/cloudbuild/triggers/libcxx-pr.yaml b/ci/cloudbuild/triggers/libcxx-pr.yaml index 12c49e687492c..9afa404c9c26f 100644 --- a/ci/cloudbuild/triggers/libcxx-pr.yaml +++ b/ci/cloudbuild/triggers/libcxx-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-14T19:46:45.308277299Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: bb2d6a6f-9cf9-493a-bcbc-b7c0b60514a6 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: libcxx-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/bb2d6a6f-9cf9-493a-bcbc-b7c0b60514a6 +name: prepare-for-v3-0-0-libcxx-pr substitutions: _BUILD_NAME: libcxx _DISTRO: fedora-latest-bazel diff --git a/ci/cloudbuild/triggers/m32-ci.yaml b/ci/cloudbuild/triggers/m32-ci.yaml index 98c6f632d9945..47b596534c238 100644 --- a/ci/cloudbuild/triggers/m32-ci.yaml +++ b/ci/cloudbuild/triggers/m32-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2023-02-08T12:05:48.696628316Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: b3c7d288-1474-4114-9a12-4d07d25a541e + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: m32-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/b3c7d288-1474-4114-9a12-4d07d25a541e +name: prepare-for-v3-0-0-m32-ci substitutions: _BUILD_NAME: m32 _DISTRO: fedora-m32 diff --git a/ci/cloudbuild/triggers/m32-pr.yaml b/ci/cloudbuild/triggers/m32-pr.yaml index b608731b732bb..37ed8c470cf9a 100644 --- a/ci/cloudbuild/triggers/m32-pr.yaml +++ b/ci/cloudbuild/triggers/m32-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2023-02-08T12:05:52.742100534Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 5eaadd40-1942-4c3f-b3ac-b4feae945a54 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: m32-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/5eaadd40-1942-4c3f-b3ac-b4feae945a54 +name: prepare-for-v3-0-0-m32-pr substitutions: _BUILD_NAME: m32 _DISTRO: fedora-m32 diff --git a/ci/cloudbuild/triggers/msan-ci.yaml b/ci/cloudbuild/triggers/msan-ci.yaml index 30164fa9eba24..890abd81fb15b 100644 --- a/ci/cloudbuild/triggers/msan-ci.yaml +++ b/ci/cloudbuild/triggers/msan-ci.yaml @@ -12,16 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-15T01:54:43.175858386Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: 6a79664d-8602-4312-9c33-810683d8f847 + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: msan-ci +name: prepare-for-v3-0-0-msan-ci substitutions: _BUILD_NAME: msan _DISTRO: fedora-msan diff --git a/ci/cloudbuild/triggers/msan-pr.yaml b/ci/cloudbuild/triggers/msan-pr.yaml index cf775a9ab4704..d8d1e3ae5e0f8 100644 --- a/ci/cloudbuild/triggers/msan-pr.yaml +++ b/ci/cloudbuild/triggers/msan-pr.yaml @@ -12,17 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-15T01:54:38.313691225Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: d9988eca-23ae-4b44-ad1f-ae38b12d5987 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: msan-pr +name: prepare-for-v3-0-0-msan-pr substitutions: _BUILD_NAME: msan _DISTRO: fedora-msan diff --git a/ci/cloudbuild/triggers/noex-ci.yaml b/ci/cloudbuild/triggers/noex-ci.yaml index fb5c1adb8185d..9a2449c08f084 100644 --- a/ci/cloudbuild/triggers/noex-ci.yaml +++ b/ci/cloudbuild/triggers/noex-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-14T14:41:37.760841534Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: ab963829-28af-4d7c-8aa4-e2598f8b8862 + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: noex-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/ab963829-28af-4d7c-8aa4-e2598f8b8862 +name: prepare-for-v3-0-0-noex-ci substitutions: _BUILD_NAME: noex _DISTRO: fedora-latest-cmake diff --git a/ci/cloudbuild/triggers/noex-pr.yaml b/ci/cloudbuild/triggers/noex-pr.yaml index 0870e554ca8aa..f86d589f0505e 100644 --- a/ci/cloudbuild/triggers/noex-pr.yaml +++ b/ci/cloudbuild/triggers/noex-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-14T14:41:33.605980616Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: da93fa8a-46af-4274-b397-ac1cc33c46c5 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: noex-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/da93fa8a-46af-4274-b397-ac1cc33c46c5 +name: prepare-for-v3-0-0-noex-pr substitutions: _BUILD_NAME: noex _DISTRO: fedora-latest-cmake diff --git a/ci/cloudbuild/triggers/otel-disabled-bazel-ci.yaml b/ci/cloudbuild/triggers/otel-disabled-bazel-ci.yaml deleted file mode 100644 index 81d34aa9b4c73..0000000000000 --- a/ci/cloudbuild/triggers/otel-disabled-bazel-ci.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -createTime: '2022-11-29T04:06:34.344761147Z' -filename: ci/cloudbuild/cloudbuild.yaml -github: - name: google-cloud-cpp - owner: googleapis - push: - branch: ^main$ -id: 95ef05ac-0f7d-46b6-ae3c-bf9e3b1bd342 -includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: otel-disabled-bazel-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/95ef05ac-0f7d-46b6-ae3c-bf9e3b1bd342 -substitutions: - _BUILD_NAME: otel-disabled-bazel - _DISTRO: fedora-latest-bazel - _TRIGGER_TYPE: ci -tags: -- ci diff --git a/ci/cloudbuild/triggers/otel-disabled-bazel-pr.yaml b/ci/cloudbuild/triggers/otel-disabled-bazel-pr.yaml deleted file mode 100644 index c23e51ca34edf..0000000000000 --- a/ci/cloudbuild/triggers/otel-disabled-bazel-pr.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -createTime: '2022-11-29T04:06:20.679878755Z' -filename: ci/cloudbuild/cloudbuild.yaml -github: - name: google-cloud-cpp - owner: googleapis - pullRequest: - branch: ^main$ - commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: e645a8df-6b2c-4911-a192-e36e6d8935b6 -includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: otel-disabled-bazel-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/e645a8df-6b2c-4911-a192-e36e6d8935b6 -substitutions: - _BUILD_NAME: otel-disabled-bazel - _DISTRO: fedora-latest-bazel - _TRIGGER_TYPE: pr -tags: -- pr diff --git a/ci/cloudbuild/triggers/protobuf-at-head.yaml b/ci/cloudbuild/triggers/protobuf-at-head.yaml index c2f1d9a6d247d..10b28bf134d86 100644 --- a/ci/cloudbuild/triggers/protobuf-at-head.yaml +++ b/ci/cloudbuild/triggers/protobuf-at-head.yaml @@ -12,16 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2023-06-13T12:46:50.379194817Z' description: Compiles using gRPC at HEAD gitFileSource: path: ci/cloudbuild/cloudbuild.yaml repoType: GITHUB revision: refs/heads/main uri: https://github.com/googleapis/google-cloud-cpp -id: 7dc9cea4-9d0b-4d0f-9947-5b79bfee5c12 -name: protobuf-at-head -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/7dc9cea4-9d0b-4d0f-9947-5b79bfee5c12 +name: prepare-for-v3-0-0-protobuf-at-head sourceToBuild: ref: refs/heads/main repoType: GITHUB diff --git a/ci/cloudbuild/triggers/publish-docs-ci.yaml b/ci/cloudbuild/triggers/publish-docs-ci.yaml index 06c8d2a99eff9..74a9d891855b0 100644 --- a/ci/cloudbuild/triggers/publish-docs-ci.yaml +++ b/ci/cloudbuild/triggers/publish-docs-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-23T19:47:54.365241453Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: ee436bb0-22ab-407d-ab69-2a73aec2566d + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: publish-docs-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/ee436bb0-22ab-407d-ab69-2a73aec2566d +name: prepare-for-v3-0-0-publish-docs-ci substitutions: _BUILD_NAME: publish-docs _DISTRO: fedora-latest-publish-docs diff --git a/ci/cloudbuild/triggers/publish-docs-compute-pr.yaml b/ci/cloudbuild/triggers/publish-docs-compute-pr.yaml index 4f1ddfb1d58cb..7b95a7e57e3c0 100644 --- a/ci/cloudbuild/triggers/publish-docs-compute-pr.yaml +++ b/ci/cloudbuild/triggers/publish-docs-compute-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2023-08-28T23:51:12.027081210Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 30ee0e3e-4eed-4b33-8786-47baae4947c1 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: publish-docs-compute-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/30ee0e3e-4eed-4b33-8786-47baae4947c1 +name: prepare-for-v3-0-0-publish-docs-compute-pr substitutions: _BUILD_NAME: publish-docs _DISTRO: fedora-latest-publish-docs diff --git a/ci/cloudbuild/triggers/publish-docs-pr.yaml b/ci/cloudbuild/triggers/publish-docs-pr.yaml index 91234eb86db42..f0f05af99fcb5 100644 --- a/ci/cloudbuild/triggers/publish-docs-pr.yaml +++ b/ci/cloudbuild/triggers/publish-docs-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-23T21:24:42.026459567Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 7957a267-70de-4e1b-a6b9-99469602a8af includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: publish-docs-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/7957a267-70de-4e1b-a6b9-99469602a8af +name: prepare-for-v3-0-0-publish-docs-pr substitutions: _BUILD_NAME: publish-docs _DISTRO: fedora-latest-publish-docs diff --git a/ci/cloudbuild/triggers/publish-docs-release.yaml b/ci/cloudbuild/triggers/publish-docs-release.yaml index f2f64840f1708..5d9b40c297e89 100644 --- a/ci/cloudbuild/triggers/publish-docs-release.yaml +++ b/ci/cloudbuild/triggers/publish-docs-release.yaml @@ -12,16 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2022-11-02T14:12:26.217489944Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^v2.*.x$ -id: d8deccfb-08d6-4ab7-b8fe-1d59c2d346ea -name: publish-docs-release -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/d8deccfb-08d6-4ab7-b8fe-1d59c2d346ea + branch: prepare-for-v3.0.0 +name: prepare-for-v3-0-0-publish-docs-release substitutions: _BUILD_NAME: publish-docs _DISTRO: fedora-latest-publish-docs diff --git a/ci/cloudbuild/triggers/quickstart-bazel-ci.yaml b/ci/cloudbuild/triggers/quickstart-bazel-ci.yaml index 7f76a05047241..ba9bcbca38a79 100644 --- a/ci/cloudbuild/triggers/quickstart-bazel-ci.yaml +++ b/ci/cloudbuild/triggers/quickstart-bazel-ci.yaml @@ -12,16 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-03-29T23:07:34.524944837Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: 1967685b-bdf1-48e2-abe5-593db92382ef + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: quickstart-bazel-ci +name: prepare-for-v3-0-0-quickstart-bazel-ci substitutions: _BUILD_NAME: quickstart-bazel _DISTRO: ubuntu-24.04 diff --git a/ci/cloudbuild/triggers/quickstart-bazel-pr.yaml b/ci/cloudbuild/triggers/quickstart-bazel-pr.yaml index 35e3d24f2b615..e1a9a078e8b65 100644 --- a/ci/cloudbuild/triggers/quickstart-bazel-pr.yaml +++ b/ci/cloudbuild/triggers/quickstart-bazel-pr.yaml @@ -12,17 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-09T18:15:48.096780282Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 77afa7e6-cfd6-46c4-9b38-a943a61335ca includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: quickstart-bazel-pr +name: prepare-for-v3-0-0-quickstart-bazel-pr substitutions: _BUILD_NAME: quickstart-bazel _DISTRO: ubuntu-24.04 diff --git a/ci/cloudbuild/triggers/quickstart-cmake-ci.yaml b/ci/cloudbuild/triggers/quickstart-cmake-ci.yaml index 76d7afc27e182..4511be26aab4a 100644 --- a/ci/cloudbuild/triggers/quickstart-cmake-ci.yaml +++ b/ci/cloudbuild/triggers/quickstart-cmake-ci.yaml @@ -12,19 +12,17 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-03-29T23:07:43.402748254Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: ff22d673-dc4c-4330-922e-d43be27ef2b4 + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: quickstart-cmake-ci +name: prepare-for-v3-0-0-quickstart-cmake-ci substitutions: _BUILD_NAME: quickstart-cmake - _DISTRO: ubuntu-focal + _DISTRO: ubuntu-22.04 _TRIGGER_TYPE: ci tags: - ci diff --git a/ci/cloudbuild/triggers/quickstart-cmake-pr.yaml b/ci/cloudbuild/triggers/quickstart-cmake-pr.yaml index 66d23059e1546..12ddfe0634431 100644 --- a/ci/cloudbuild/triggers/quickstart-cmake-pr.yaml +++ b/ci/cloudbuild/triggers/quickstart-cmake-pr.yaml @@ -12,20 +12,18 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-09T18:15:49.856898769Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 94aaedf9-cbc3-4b7b-b571-a6281587d358 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: quickstart-cmake-pr +name: prepare-for-v3-0-0-quickstart-cmake-pr substitutions: _BUILD_NAME: quickstart-cmake - _DISTRO: ubuntu-focal + _DISTRO: ubuntu-22.04 _TRIGGER_TYPE: pr tags: - pr diff --git a/ci/cloudbuild/triggers/quickstart-production-ci.yaml b/ci/cloudbuild/triggers/quickstart-production-ci.yaml index d65a6f0ea9fa6..bb93cc4bb59e6 100644 --- a/ci/cloudbuild/triggers/quickstart-production-ci.yaml +++ b/ci/cloudbuild/triggers/quickstart-production-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2022-02-11T02:48:03.262626422Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: f516d42a-ed88-432f-9ee7-5e4ac4d5c676 + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: quickstart-production-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/f516d42a-ed88-432f-9ee7-5e4ac4d5c676 +name: prepare-for-v3-0-0-quickstart-production-ci substitutions: _BUILD_NAME: quickstart-production _DISTRO: fedora-latest-cmake diff --git a/ci/cloudbuild/triggers/quickstart-production-pr.yaml b/ci/cloudbuild/triggers/quickstart-production-pr.yaml index 61c5159c0fd5d..0824ae4c48d46 100644 --- a/ci/cloudbuild/triggers/quickstart-production-pr.yaml +++ b/ci/cloudbuild/triggers/quickstart-production-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2022-02-11T02:48:08.775499777Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: e373a802-f341-4559-bb55-7ec64f1ee825 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: quickstart-production-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/e373a802-f341-4559-bb55-7ec64f1ee825 +name: prepare-for-v3-0-0-quickstart-production-pr substitutions: _BUILD_NAME: quickstart-production _DISTRO: fedora-latest-cmake diff --git a/ci/cloudbuild/triggers/rotate-keys.yaml b/ci/cloudbuild/triggers/rotate-keys.yaml index 6fe036a1ab2ba..41fe411793b27 100644 --- a/ci/cloudbuild/triggers/rotate-keys.yaml +++ b/ci/cloudbuild/triggers/rotate-keys.yaml @@ -12,16 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-23T00:24:28.311789386Z' description: Rotates the SA keys used by the GCS integration test gitFileSource: path: ci/cloudbuild/cloudbuild.yaml repoType: GITHUB revision: refs/heads/main uri: https://github.com/googleapis/google-cloud-cpp -id: 3fca51de-ec4c-453f-9693-5ccec556a379 -name: rotate-keys -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/3fca51de-ec4c-453f-9693-5ccec556a379 +name: prepare-for-v3-0-0-rotate-keys sourceToBuild: ref: refs/heads/main repoType: GITHUB diff --git a/ci/cloudbuild/triggers/shared-ci.yaml b/ci/cloudbuild/triggers/shared-ci.yaml index 008946395d067..d91a092709fbb 100644 --- a/ci/cloudbuild/triggers/shared-ci.yaml +++ b/ci/cloudbuild/triggers/shared-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-16T17:54:50.114636655Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: 876841fe-996a-4b64-a080-62b05313b8ff + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: shared-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/876841fe-996a-4b64-a080-62b05313b8ff +name: prepare-for-v3-0-0-shared-ci substitutions: _BUILD_NAME: shared _DISTRO: fedora-latest-cmake diff --git a/ci/cloudbuild/triggers/shared-pr.yaml b/ci/cloudbuild/triggers/shared-pr.yaml index 403320d3b4727..472f75c268c4c 100644 --- a/ci/cloudbuild/triggers/shared-pr.yaml +++ b/ci/cloudbuild/triggers/shared-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-16T17:54:51.132738909Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 0a6fec60-47ba-4795-979b-4aec54e16d1a includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: shared-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/0a6fec60-47ba-4795-979b-4aec54e16d1a +name: prepare-for-v3-0-0-shared-pr substitutions: _BUILD_NAME: shared _DISTRO: fedora-latest-cmake diff --git a/ci/cloudbuild/triggers/tsan-ci.yaml b/ci/cloudbuild/triggers/tsan-ci.yaml index a58bf045dc09f..f0b8d80ed9d32 100644 --- a/ci/cloudbuild/triggers/tsan-ci.yaml +++ b/ci/cloudbuild/triggers/tsan-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-03-30T01:00:00.841245060Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: de7c77d3-385d-48b6-a6e8-9dda0c171716 + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: tsan-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/de7c77d3-385d-48b6-a6e8-9dda0c171716 +name: prepare-for-v3-0-0-tsan-ci substitutions: _BUILD_NAME: tsan _DISTRO: fedora-latest-bazel diff --git a/ci/cloudbuild/triggers/tsan-pr.yaml b/ci/cloudbuild/triggers/tsan-pr.yaml index 41f3d6d016aa5..771703fccbc80 100644 --- a/ci/cloudbuild/triggers/tsan-pr.yaml +++ b/ci/cloudbuild/triggers/tsan-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-09T18:15:51.542576617Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: ea400a9b-879a-4e13-a4b3-9109825d6e99 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: tsan-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/ea400a9b-879a-4e13-a4b3-9109825d6e99 +name: prepare-for-v3-0-0-tsan-pr substitutions: _BUILD_NAME: tsan _DISTRO: fedora-latest-bazel diff --git a/ci/cloudbuild/triggers/ubsan-ci.yaml b/ci/cloudbuild/triggers/ubsan-ci.yaml index 7cbb2d8d1eeab..e2de1f8c901cb 100644 --- a/ci/cloudbuild/triggers/ubsan-ci.yaml +++ b/ci/cloudbuild/triggers/ubsan-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-03-28T18:40:21.563522491Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: f61a17f2-316f-4ba5-a56a-5abd55e3da83 + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: ubsan-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/f61a17f2-316f-4ba5-a56a-5abd55e3da83 +name: prepare-for-v3-0-0-ubsan-ci substitutions: _BUILD_NAME: ubsan _DISTRO: fedora-latest-bazel diff --git a/ci/cloudbuild/triggers/ubsan-pr.yaml b/ci/cloudbuild/triggers/ubsan-pr.yaml index 61d4e03aa8f6b..f076f0310f502 100644 --- a/ci/cloudbuild/triggers/ubsan-pr.yaml +++ b/ci/cloudbuild/triggers/ubsan-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-09T18:15:53.351255451Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 6e77e431-c822-40c7-a8de-7860b4b0fc69 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: ubsan-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/6e77e431-c822-40c7-a8de-7860b4b0fc69 +name: prepare-for-v3-0-0-ubsan-pr substitutions: _BUILD_NAME: ubsan _DISTRO: fedora-latest-bazel diff --git a/ci/cloudbuild/triggers/universe-domain-ci.yaml b/ci/cloudbuild/triggers/universe-domain-ci.yaml index 860a7bee6332d..aa7d502bb7350 100644 --- a/ci/cloudbuild/triggers/universe-domain-ci.yaml +++ b/ci/cloudbuild/triggers/universe-domain-ci.yaml @@ -17,8 +17,8 @@ github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -name: universe-domain-ci + branch: prepare-for-v3.0.0 +name: prepare-for-v3-0-0-universe-domain-ci substitutions: _BUILD_NAME: universe-domain _DISTRO: fedora-latest-bazel diff --git a/ci/cloudbuild/triggers/universe-domain-pr.yaml b/ci/cloudbuild/triggers/universe-domain-pr.yaml index 61b0926549a7d..37e5eabc531a2 100644 --- a/ci/cloudbuild/triggers/universe-domain-pr.yaml +++ b/ci/cloudbuild/triggers/universe-domain-pr.yaml @@ -17,9 +17,9 @@ github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -name: universe-domain-pr +name: prepare-for-v3-0-0-universe-domain-pr substitutions: _BUILD_NAME: universe-domain _DISTRO: fedora-latest-bazel diff --git a/ci/cloudbuild/triggers/xsan-ci.yaml b/ci/cloudbuild/triggers/xsan-ci.yaml index 17489a5295092..59d3705c862db 100644 --- a/ci/cloudbuild/triggers/xsan-ci.yaml +++ b/ci/cloudbuild/triggers/xsan-ci.yaml @@ -12,17 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-03-23T16:27:32.983843488Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis push: - branch: ^main$ -id: 7af338de-c46d-41ff-a96b-f58e3b720fc5 + branch: prepare-for-v3.0.0 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: xsan-ci -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/7af338de-c46d-41ff-a96b-f58e3b720fc5 +name: prepare-for-v3-0-0-xsan-ci substitutions: _BUILD_NAME: xsan _DISTRO: fedora-latest-bazel diff --git a/ci/cloudbuild/triggers/xsan-pr.yaml b/ci/cloudbuild/triggers/xsan-pr.yaml index 6cd9595b22baa..333063c848d32 100644 --- a/ci/cloudbuild/triggers/xsan-pr.yaml +++ b/ci/cloudbuild/triggers/xsan-pr.yaml @@ -12,18 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -createTime: '2021-04-09T18:15:54.945301389Z' filename: ci/cloudbuild/cloudbuild.yaml github: name: google-cloud-cpp owner: googleapis pullRequest: - branch: ^main$ + branch: prepare-for-v3.0.0 commentControl: COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY -id: 679ab848-3bcc-4e46-b4e5-4cd86d4b1405 includeBuildLogs: INCLUDE_BUILD_LOGS_WITH_STATUS -name: xsan-pr -resourceName: projects/cloud-cpp-testing-resources/locations/global/triggers/679ab848-3bcc-4e46-b4e5-4cd86d4b1405 +name: prepare-for-v3-0-0-xsan-pr substitutions: _BUILD_NAME: xsan _DISTRO: fedora-latest-bazel diff --git a/ci/etc/expected_install_directories b/ci/etc/expected_install_directories index 6610b6dba68df..50319d65c9e6c 100644 --- a/ci/etc/expected_install_directories +++ b/ci/etc/expected_install_directories @@ -21,12 +21,10 @@ ./include/google/bigtable/v2 ./include/google/cloud ./include/google/cloud/accessapproval -./include/google/cloud/accessapproval/mocks ./include/google/cloud/accessapproval/v1 ./include/google/cloud/accessapproval/v1/internal ./include/google/cloud/accessapproval/v1/mocks ./include/google/cloud/accesscontextmanager -./include/google/cloud/accesscontextmanager/mocks ./include/google/cloud/accesscontextmanager/v1 ./include/google/cloud/accesscontextmanager/v1/internal ./include/google/cloud/accesscontextmanager/v1/mocks @@ -43,17 +41,14 @@ ./include/google/cloud/alloydb/v1/internal ./include/google/cloud/alloydb/v1/mocks ./include/google/cloud/apigateway -./include/google/cloud/apigateway/mocks ./include/google/cloud/apigateway/v1 ./include/google/cloud/apigateway/v1/internal ./include/google/cloud/apigateway/v1/mocks ./include/google/cloud/apigeeconnect -./include/google/cloud/apigeeconnect/mocks ./include/google/cloud/apigeeconnect/v1 ./include/google/cloud/apigeeconnect/v1/internal ./include/google/cloud/apigeeconnect/v1/mocks ./include/google/cloud/apikeys -./include/google/cloud/apikeys/mocks ./include/google/cloud/apikeys/v2 ./include/google/cloud/apikeys/v2/internal ./include/google/cloud/apikeys/v2/mocks @@ -62,7 +57,6 @@ ./include/google/cloud/apiregistry/v1/internal ./include/google/cloud/apiregistry/v1/mocks ./include/google/cloud/appengine -./include/google/cloud/appengine/mocks ./include/google/cloud/appengine/v1 ./include/google/cloud/appengine/v1/internal ./include/google/cloud/appengine/v1/mocks @@ -71,17 +65,14 @@ ./include/google/cloud/apphub/v1/internal ./include/google/cloud/apphub/v1/mocks ./include/google/cloud/artifactregistry -./include/google/cloud/artifactregistry/mocks ./include/google/cloud/artifactregistry/v1 ./include/google/cloud/artifactregistry/v1/internal ./include/google/cloud/artifactregistry/v1/mocks ./include/google/cloud/asset -./include/google/cloud/asset/mocks ./include/google/cloud/asset/v1 ./include/google/cloud/asset/v1/internal ./include/google/cloud/asset/v1/mocks ./include/google/cloud/assuredworkloads -./include/google/cloud/assuredworkloads/mocks ./include/google/cloud/assuredworkloads/v1 ./include/google/cloud/assuredworkloads/v1/internal ./include/google/cloud/assuredworkloads/v1/mocks @@ -90,7 +81,6 @@ ./include/google/cloud/auditmanager/v1/internal ./include/google/cloud/auditmanager/v1/mocks ./include/google/cloud/automl -./include/google/cloud/automl/mocks ./include/google/cloud/automl/v1 ./include/google/cloud/automl/v1/internal ./include/google/cloud/automl/v1/mocks @@ -99,12 +89,10 @@ ./include/google/cloud/backupdr/v1/internal ./include/google/cloud/backupdr/v1/mocks ./include/google/cloud/baremetalsolution -./include/google/cloud/baremetalsolution/mocks ./include/google/cloud/baremetalsolution/v2 ./include/google/cloud/baremetalsolution/v2/internal ./include/google/cloud/baremetalsolution/v2/mocks ./include/google/cloud/batch -./include/google/cloud/batch/mocks ./include/google/cloud/batch/v1 ./include/google/cloud/batch/v1/internal ./include/google/cloud/batch/v1/mocks @@ -121,7 +109,6 @@ ./include/google/cloud/beyondcorp/appgateways/v1 ./include/google/cloud/beyondcorp/appgateways/v1/internal ./include/google/cloud/beyondcorp/appgateways/v1/mocks -./include/google/cloud/beyondcorp/mocks ./include/google/cloud/bigquery ./include/google/cloud/bigquery/analyticshub ./include/google/cloud/bigquery/analyticshub/v1 @@ -150,7 +137,6 @@ ./include/google/cloud/bigquery/migration/v2 ./include/google/cloud/bigquery/migration/v2/internal ./include/google/cloud/bigquery/migration/v2/mocks -./include/google/cloud/bigquery/mocks ./include/google/cloud/bigquery/reservation ./include/google/cloud/bigquery/reservation/v1 ./include/google/cloud/bigquery/reservation/v1/internal @@ -174,22 +160,18 @@ ./include/google/cloud/billing/budgets/v1 ./include/google/cloud/billing/budgets/v1/internal ./include/google/cloud/billing/budgets/v1/mocks -./include/google/cloud/billing/mocks ./include/google/cloud/billing/v1 ./include/google/cloud/billing/v1/internal ./include/google/cloud/billing/v1/mocks ./include/google/cloud/binaryauthorization -./include/google/cloud/binaryauthorization/mocks ./include/google/cloud/binaryauthorization/v1 ./include/google/cloud/binaryauthorization/v1/internal ./include/google/cloud/binaryauthorization/v1/mocks ./include/google/cloud/certificatemanager -./include/google/cloud/certificatemanager/mocks ./include/google/cloud/certificatemanager/v1 ./include/google/cloud/certificatemanager/v1/internal ./include/google/cloud/certificatemanager/v1/mocks ./include/google/cloud/channel -./include/google/cloud/channel/mocks ./include/google/cloud/channel/v1 ./include/google/cloud/channel/v1/internal ./include/google/cloud/channel/v1/mocks @@ -198,7 +180,6 @@ ./include/google/cloud/chronicle/v1/internal ./include/google/cloud/chronicle/v1/mocks ./include/google/cloud/cloudbuild -./include/google/cloud/cloudbuild/mocks ./include/google/cloud/cloudbuild/v1 ./include/google/cloud/cloudbuild/v1/internal ./include/google/cloud/cloudbuild/v1/mocks @@ -226,7 +207,6 @@ ./include/google/cloud/commerce/consumer/procurement/v1/internal ./include/google/cloud/commerce/consumer/procurement/v1/mocks ./include/google/cloud/composer -./include/google/cloud/composer/mocks ./include/google/cloud/composer/v1 ./include/google/cloud/composer/v1/internal ./include/google/cloud/composer/v1/mocks @@ -664,22 +644,18 @@ ./include/google/cloud/configdelivery/v1/internal ./include/google/cloud/configdelivery/v1/mocks ./include/google/cloud/connectors -./include/google/cloud/connectors/mocks ./include/google/cloud/connectors/v1 ./include/google/cloud/connectors/v1/internal ./include/google/cloud/connectors/v1/mocks ./include/google/cloud/contactcenterinsights -./include/google/cloud/contactcenterinsights/mocks ./include/google/cloud/contactcenterinsights/v1 ./include/google/cloud/contactcenterinsights/v1/internal ./include/google/cloud/contactcenterinsights/v1/mocks ./include/google/cloud/container -./include/google/cloud/container/mocks ./include/google/cloud/container/v1 ./include/google/cloud/container/v1/internal ./include/google/cloud/container/v1/mocks ./include/google/cloud/containeranalysis -./include/google/cloud/containeranalysis/mocks ./include/google/cloud/containeranalysis/v1 ./include/google/cloud/containeranalysis/v1/internal ./include/google/cloud/containeranalysis/v1/mocks @@ -692,7 +668,6 @@ ./include/google/cloud/datacatalog/lineage/v1 ./include/google/cloud/datacatalog/lineage/v1/internal ./include/google/cloud/datacatalog/lineage/v1/mocks -./include/google/cloud/datacatalog/mocks ./include/google/cloud/datacatalog/v1 ./include/google/cloud/datacatalog/v1/internal ./include/google/cloud/datacatalog/v1/mocks @@ -705,17 +680,14 @@ ./include/google/cloud/datafusion/v1/internal ./include/google/cloud/datafusion/v1/mocks ./include/google/cloud/datamigration -./include/google/cloud/datamigration/mocks ./include/google/cloud/datamigration/v1 ./include/google/cloud/datamigration/v1/internal ./include/google/cloud/datamigration/v1/mocks ./include/google/cloud/dataplex -./include/google/cloud/dataplex/mocks ./include/google/cloud/dataplex/v1 ./include/google/cloud/dataplex/v1/internal ./include/google/cloud/dataplex/v1/mocks ./include/google/cloud/dataproc -./include/google/cloud/dataproc/mocks ./include/google/cloud/dataproc/v1 ./include/google/cloud/dataproc/v1/internal ./include/google/cloud/dataproc/v1/mocks @@ -728,12 +700,10 @@ ./include/google/cloud/datastore/v1/internal ./include/google/cloud/datastore/v1/mocks ./include/google/cloud/datastream -./include/google/cloud/datastream/mocks ./include/google/cloud/datastream/v1 ./include/google/cloud/datastream/v1/internal ./include/google/cloud/datastream/v1/mocks ./include/google/cloud/deploy -./include/google/cloud/deploy/mocks ./include/google/cloud/deploy/v1 ./include/google/cloud/deploy/v1/internal ./include/google/cloud/deploy/v1/mocks @@ -760,12 +730,10 @@ ./include/google/cloud/discoveryengine/v1/internal ./include/google/cloud/discoveryengine/v1/mocks ./include/google/cloud/dlp -./include/google/cloud/dlp/mocks ./include/google/cloud/dlp/v2 ./include/google/cloud/dlp/v2/internal ./include/google/cloud/dlp/v2/mocks ./include/google/cloud/documentai -./include/google/cloud/documentai/mocks ./include/google/cloud/documentai/v1 ./include/google/cloud/documentai/v1/internal ./include/google/cloud/documentai/v1/mocks @@ -774,7 +742,6 @@ ./include/google/cloud/domains/v1/internal ./include/google/cloud/domains/v1/mocks ./include/google/cloud/edgecontainer -./include/google/cloud/edgecontainer/mocks ./include/google/cloud/edgecontainer/v1 ./include/google/cloud/edgecontainer/v1/internal ./include/google/cloud/edgecontainer/v1/mocks @@ -787,7 +754,6 @@ ./include/google/cloud/essentialcontacts/v1/internal ./include/google/cloud/essentialcontacts/v1/mocks ./include/google/cloud/eventarc -./include/google/cloud/eventarc/mocks ./include/google/cloud/eventarc/publishing ./include/google/cloud/eventarc/publishing/v1 ./include/google/cloud/eventarc/publishing/v1/internal @@ -796,7 +762,6 @@ ./include/google/cloud/eventarc/v1/internal ./include/google/cloud/eventarc/v1/mocks ./include/google/cloud/filestore -./include/google/cloud/filestore/mocks ./include/google/cloud/filestore/v1 ./include/google/cloud/filestore/v1/internal ./include/google/cloud/filestore/v1/mocks @@ -805,7 +770,6 @@ ./include/google/cloud/financialservices/v1/internal ./include/google/cloud/financialservices/v1/mocks ./include/google/cloud/functions -./include/google/cloud/functions/mocks ./include/google/cloud/functions/v1 ./include/google/cloud/functions/v1/internal ./include/google/cloud/functions/v1/mocks @@ -822,7 +786,6 @@ ./include/google/cloud/gkeconnect/gateway/v1/internal ./include/google/cloud/gkeconnect/gateway/v1/mocks ./include/google/cloud/gkehub -./include/google/cloud/gkehub/mocks ./include/google/cloud/gkehub/v1 ./include/google/cloud/gkehub/v1/internal ./include/google/cloud/gkehub/v1/mocks @@ -843,7 +806,6 @@ ./include/google/cloud/iam/credentials/v1 ./include/google/cloud/iam/credentials/v1/internal ./include/google/cloud/iam/credentials/v1/mocks -./include/google/cloud/iam/mocks ./include/google/cloud/iam/v1 ./include/google/cloud/iam/v1/internal ./include/google/cloud/iam/v1/mocks @@ -854,12 +816,10 @@ ./include/google/cloud/iam/v3/internal ./include/google/cloud/iam/v3/mocks ./include/google/cloud/iap -./include/google/cloud/iap/mocks ./include/google/cloud/iap/v1 ./include/google/cloud/iap/v1/internal ./include/google/cloud/iap/v1/mocks ./include/google/cloud/ids -./include/google/cloud/ids/mocks ./include/google/cloud/ids/v1 ./include/google/cloud/ids/v1/internal ./include/google/cloud/ids/v1/mocks @@ -868,12 +828,10 @@ ./include/google/cloud/kms/inventory/v1 ./include/google/cloud/kms/inventory/v1/internal ./include/google/cloud/kms/inventory/v1/mocks -./include/google/cloud/kms/mocks ./include/google/cloud/kms/v1 ./include/google/cloud/kms/v1/internal ./include/google/cloud/kms/v1/mocks ./include/google/cloud/language -./include/google/cloud/language/mocks ./include/google/cloud/language/v1 ./include/google/cloud/language/v1/internal ./include/google/cloud/language/v1/mocks @@ -885,7 +843,6 @@ ./include/google/cloud/licensemanager/v1/internal ./include/google/cloud/licensemanager/v1/mocks ./include/google/cloud/logging -./include/google/cloud/logging/mocks ./include/google/cloud/logging/v2 ./include/google/cloud/logging/v2/internal ./include/google/cloud/logging/v2/mocks @@ -899,7 +856,6 @@ ./include/google/cloud/maintenance/api/v1/internal ./include/google/cloud/maintenance/api/v1/mocks ./include/google/cloud/managedidentities -./include/google/cloud/managedidentities/mocks ./include/google/cloud/managedidentities/v1 ./include/google/cloud/managedidentities/v1/internal ./include/google/cloud/managedidentities/v1/mocks @@ -912,7 +868,6 @@ ./include/google/cloud/managedkafka/v1/internal ./include/google/cloud/managedkafka/v1/mocks ./include/google/cloud/memcache -./include/google/cloud/memcache/mocks ./include/google/cloud/memcache/v1 ./include/google/cloud/memcache/v1/internal ./include/google/cloud/memcache/v1/mocks @@ -937,7 +892,6 @@ ./include/google/cloud/monitoring/metricsscope/v1 ./include/google/cloud/monitoring/metricsscope/v1/internal ./include/google/cloud/monitoring/metricsscope/v1/mocks -./include/google/cloud/monitoring/mocks ./include/google/cloud/monitoring/v3 ./include/google/cloud/monitoring/v3/internal ./include/google/cloud/monitoring/v3/mocks @@ -946,12 +900,10 @@ ./include/google/cloud/netapp/v1/internal ./include/google/cloud/netapp/v1/mocks ./include/google/cloud/networkconnectivity -./include/google/cloud/networkconnectivity/mocks ./include/google/cloud/networkconnectivity/v1 ./include/google/cloud/networkconnectivity/v1/internal ./include/google/cloud/networkconnectivity/v1/mocks ./include/google/cloud/networkmanagement -./include/google/cloud/networkmanagement/mocks ./include/google/cloud/networkmanagement/v1 ./include/google/cloud/networkmanagement/v1/internal ./include/google/cloud/networkmanagement/v1/mocks @@ -964,7 +916,6 @@ ./include/google/cloud/networkservices/v1/internal ./include/google/cloud/networkservices/v1/mocks ./include/google/cloud/notebooks -./include/google/cloud/notebooks/mocks ./include/google/cloud/notebooks/v1 ./include/google/cloud/notebooks/v1/internal ./include/google/cloud/notebooks/v1/mocks @@ -972,7 +923,6 @@ ./include/google/cloud/notebooks/v2/internal ./include/google/cloud/notebooks/v2/mocks ./include/google/cloud/optimization -./include/google/cloud/optimization/mocks ./include/google/cloud/optimization/v1 ./include/google/cloud/optimization/v1/internal ./include/google/cloud/optimization/v1/mocks @@ -985,7 +935,6 @@ ./include/google/cloud/orchestration/airflow/service ./include/google/cloud/orchestration/airflow/service/v1 ./include/google/cloud/orgpolicy -./include/google/cloud/orgpolicy/mocks ./include/google/cloud/orgpolicy/v2 ./include/google/cloud/orgpolicy/v2/internal ./include/google/cloud/orgpolicy/v2/mocks @@ -994,12 +943,10 @@ ./include/google/cloud/osconfig/agentendpoint/v1 ./include/google/cloud/osconfig/agentendpoint/v1/internal ./include/google/cloud/osconfig/agentendpoint/v1/mocks -./include/google/cloud/osconfig/mocks ./include/google/cloud/osconfig/v1 ./include/google/cloud/osconfig/v1/internal ./include/google/cloud/osconfig/v1/mocks ./include/google/cloud/oslogin -./include/google/cloud/oslogin/mocks ./include/google/cloud/oslogin/v1 ./include/google/cloud/oslogin/v1/internal ./include/google/cloud/oslogin/v1/mocks @@ -1020,12 +967,10 @@ ./include/google/cloud/policytroubleshooter/iam/v3 ./include/google/cloud/policytroubleshooter/iam/v3/internal ./include/google/cloud/policytroubleshooter/iam/v3/mocks -./include/google/cloud/policytroubleshooter/mocks ./include/google/cloud/policytroubleshooter/v1 ./include/google/cloud/policytroubleshooter/v1/internal ./include/google/cloud/policytroubleshooter/v1/mocks ./include/google/cloud/privateca -./include/google/cloud/privateca/mocks ./include/google/cloud/privateca/v1 ./include/google/cloud/privateca/v1/internal ./include/google/cloud/privateca/v1/mocks @@ -1034,7 +979,6 @@ ./include/google/cloud/privilegedaccessmanager/v1/internal ./include/google/cloud/privilegedaccessmanager/v1/mocks ./include/google/cloud/profiler -./include/google/cloud/profiler/mocks ./include/google/cloud/profiler/v2 ./include/google/cloud/profiler/v2/internal ./include/google/cloud/profiler/v2/mocks @@ -1061,7 +1005,6 @@ ./include/google/cloud/recaptchaenterprise/v1/internal ./include/google/cloud/recaptchaenterprise/v1/mocks ./include/google/cloud/recommender -./include/google/cloud/recommender/mocks ./include/google/cloud/recommender/v1 ./include/google/cloud/recommender/v1/internal ./include/google/cloud/recommender/v1/mocks @@ -1070,32 +1013,26 @@ ./include/google/cloud/redis/cluster/v1 ./include/google/cloud/redis/cluster/v1/internal ./include/google/cloud/redis/cluster/v1/mocks -./include/google/cloud/redis/mocks ./include/google/cloud/redis/v1 ./include/google/cloud/redis/v1/internal ./include/google/cloud/redis/v1/mocks ./include/google/cloud/resourcemanager -./include/google/cloud/resourcemanager/mocks ./include/google/cloud/resourcemanager/v3 ./include/google/cloud/resourcemanager/v3/internal ./include/google/cloud/resourcemanager/v3/mocks ./include/google/cloud/retail -./include/google/cloud/retail/mocks ./include/google/cloud/retail/v2 ./include/google/cloud/retail/v2/internal ./include/google/cloud/retail/v2/mocks ./include/google/cloud/run -./include/google/cloud/run/mocks ./include/google/cloud/run/v2 ./include/google/cloud/run/v2/internal ./include/google/cloud/run/v2/mocks ./include/google/cloud/scheduler -./include/google/cloud/scheduler/mocks ./include/google/cloud/scheduler/v1 ./include/google/cloud/scheduler/v1/internal ./include/google/cloud/scheduler/v1/mocks ./include/google/cloud/secretmanager -./include/google/cloud/secretmanager/mocks ./include/google/cloud/secretmanager/v1 ./include/google/cloud/secretmanager/v1/internal ./include/google/cloud/secretmanager/v1/mocks @@ -1109,7 +1046,6 @@ ./include/google/cloud/security/publicca ./include/google/cloud/security/publicca/v1 ./include/google/cloud/securitycenter -./include/google/cloud/securitycenter/mocks ./include/google/cloud/securitycenter/v1 ./include/google/cloud/securitycenter/v1/internal ./include/google/cloud/securitycenter/v1/mocks @@ -1121,7 +1057,6 @@ ./include/google/cloud/securitycentermanagement/v1/internal ./include/google/cloud/securitycentermanagement/v1/mocks ./include/google/cloud/servicecontrol -./include/google/cloud/servicecontrol/mocks ./include/google/cloud/servicecontrol/v1 ./include/google/cloud/servicecontrol/v1/internal ./include/google/cloud/servicecontrol/v1/mocks @@ -1129,7 +1064,6 @@ ./include/google/cloud/servicecontrol/v2/internal ./include/google/cloud/servicecontrol/v2/mocks ./include/google/cloud/servicedirectory -./include/google/cloud/servicedirectory/mocks ./include/google/cloud/servicedirectory/v1 ./include/google/cloud/servicedirectory/v1/internal ./include/google/cloud/servicedirectory/v1/mocks @@ -1138,17 +1072,14 @@ ./include/google/cloud/servicehealth/v1/internal ./include/google/cloud/servicehealth/v1/mocks ./include/google/cloud/servicemanagement -./include/google/cloud/servicemanagement/mocks ./include/google/cloud/servicemanagement/v1 ./include/google/cloud/servicemanagement/v1/internal ./include/google/cloud/servicemanagement/v1/mocks ./include/google/cloud/serviceusage -./include/google/cloud/serviceusage/mocks ./include/google/cloud/serviceusage/v1 ./include/google/cloud/serviceusage/v1/internal ./include/google/cloud/serviceusage/v1/mocks ./include/google/cloud/shell -./include/google/cloud/shell/mocks ./include/google/cloud/shell/v1 ./include/google/cloud/shell/v1/internal ./include/google/cloud/shell/v1/mocks @@ -1158,7 +1089,6 @@ ./include/google/cloud/spanner/admin/mocks ./include/google/cloud/spanner/internal ./include/google/cloud/speech -./include/google/cloud/speech/mocks ./include/google/cloud/speech/v1 ./include/google/cloud/speech/v1/internal ./include/google/cloud/speech/v1/mocks @@ -1184,7 +1114,6 @@ ./include/google/cloud/storageinsights/v1/internal ./include/google/cloud/storageinsights/v1/mocks ./include/google/cloud/storagetransfer -./include/google/cloud/storagetransfer/mocks ./include/google/cloud/storagetransfer/v1 ./include/google/cloud/storagetransfer/v1/internal ./include/google/cloud/storagetransfer/v1/mocks @@ -1193,12 +1122,10 @@ ./include/google/cloud/support/v2/internal ./include/google/cloud/support/v2/mocks ./include/google/cloud/talent -./include/google/cloud/talent/mocks ./include/google/cloud/talent/v4 ./include/google/cloud/talent/v4/internal ./include/google/cloud/talent/v4/mocks ./include/google/cloud/tasks -./include/google/cloud/tasks/mocks ./include/google/cloud/tasks/v2 ./include/google/cloud/tasks/v2/internal ./include/google/cloud/tasks/v2/mocks @@ -1207,7 +1134,6 @@ ./include/google/cloud/telcoautomation/v1/internal ./include/google/cloud/telcoautomation/v1/mocks ./include/google/cloud/texttospeech -./include/google/cloud/texttospeech/mocks ./include/google/cloud/texttospeech/v1 ./include/google/cloud/texttospeech/v1/internal ./include/google/cloud/texttospeech/v1/mocks @@ -1216,7 +1142,6 @@ ./include/google/cloud/timeseriesinsights/v1/internal ./include/google/cloud/timeseriesinsights/v1/mocks ./include/google/cloud/tpu -./include/google/cloud/tpu/mocks ./include/google/cloud/tpu/v1 ./include/google/cloud/tpu/v1/internal ./include/google/cloud/tpu/v1/mocks @@ -1224,7 +1149,6 @@ ./include/google/cloud/tpu/v2/internal ./include/google/cloud/tpu/v2/mocks ./include/google/cloud/trace -./include/google/cloud/trace/mocks ./include/google/cloud/trace/v1 ./include/google/cloud/trace/v1/internal ./include/google/cloud/trace/v1/mocks @@ -1232,7 +1156,6 @@ ./include/google/cloud/trace/v2/internal ./include/google/cloud/trace/v2/mocks ./include/google/cloud/translate -./include/google/cloud/translate/mocks ./include/google/cloud/translate/v3 ./include/google/cloud/translate/v3/internal ./include/google/cloud/translate/v3/mocks @@ -1241,7 +1164,6 @@ ./include/google/cloud/video/livestream/v1 ./include/google/cloud/video/livestream/v1/internal ./include/google/cloud/video/livestream/v1/mocks -./include/google/cloud/video/mocks ./include/google/cloud/video/stitcher ./include/google/cloud/video/stitcher/v1 ./include/google/cloud/video/stitcher/v1/internal @@ -1251,17 +1173,14 @@ ./include/google/cloud/video/transcoder/v1/internal ./include/google/cloud/video/transcoder/v1/mocks ./include/google/cloud/videointelligence -./include/google/cloud/videointelligence/mocks ./include/google/cloud/videointelligence/v1 ./include/google/cloud/videointelligence/v1/internal ./include/google/cloud/videointelligence/v1/mocks ./include/google/cloud/vision -./include/google/cloud/vision/mocks ./include/google/cloud/vision/v1 ./include/google/cloud/vision/v1/internal ./include/google/cloud/vision/v1/mocks ./include/google/cloud/vmmigration -./include/google/cloud/vmmigration/mocks ./include/google/cloud/vmmigration/v1 ./include/google/cloud/vmmigration/v1/internal ./include/google/cloud/vmmigration/v1/mocks @@ -1270,17 +1189,14 @@ ./include/google/cloud/vmwareengine/v1/internal ./include/google/cloud/vmwareengine/v1/mocks ./include/google/cloud/vpcaccess -./include/google/cloud/vpcaccess/mocks ./include/google/cloud/vpcaccess/v1 ./include/google/cloud/vpcaccess/v1/internal ./include/google/cloud/vpcaccess/v1/mocks ./include/google/cloud/webrisk -./include/google/cloud/webrisk/mocks ./include/google/cloud/webrisk/v1 ./include/google/cloud/webrisk/v1/internal ./include/google/cloud/webrisk/v1/mocks ./include/google/cloud/websecurityscanner -./include/google/cloud/websecurityscanner/mocks ./include/google/cloud/websecurityscanner/v1 ./include/google/cloud/websecurityscanner/v1/internal ./include/google/cloud/websecurityscanner/v1/mocks @@ -1289,7 +1205,6 @@ ./include/google/cloud/workflows/executions/v1 ./include/google/cloud/workflows/executions/v1/internal ./include/google/cloud/workflows/executions/v1/mocks -./include/google/cloud/workflows/mocks ./include/google/cloud/workflows/v1 ./include/google/cloud/workflows/v1/internal ./include/google/cloud/workflows/v1/mocks diff --git a/ci/etc/oldest-deps/overlay-ports/opentelemetry-cpp/fix-target_link.patch b/ci/etc/oldest-deps/overlay-ports/opentelemetry-cpp/fix-target_link.patch new file mode 100644 index 0000000000000..f4709e8b1c28f --- /dev/null +++ b/ci/etc/oldest-deps/overlay-ports/opentelemetry-cpp/fix-target_link.patch @@ -0,0 +1,17 @@ +diff --git a/cmake/opentracing-cpp.cmake b/cmake/opentracing-cpp.cmake +index f014ecd..fd8898a 100644 +--- a/cmake/opentracing-cpp.cmake ++++ b/cmake/opentracing-cpp.cmake +@@ -1,7 +1,11 @@ + # Copyright The OpenTelemetry Authors + # SPDX-License-Identifier: Apache-2.0 + +-find_package(OpenTracing CONFIG QUIET) ++find_package(OpenTracing CONFIG REQUIRED) ++if(NOT TARGET OpenTracing::opentracing AND TARGET OpenTracing::opentracing-static) ++ add_library(OpenTracing::opentracing ALIAS OpenTracing::opentracing-static) ++endif() ++ + set(OpenTracing_PROVIDER "find_package") + + if(NOT OpenTracing_FOUND) diff --git a/ci/etc/oldest-deps/overlay-ports/opentelemetry-cpp/portfile.cmake b/ci/etc/oldest-deps/overlay-ports/opentelemetry-cpp/portfile.cmake new file mode 100644 index 0000000000000..c8bb4f68fce6a --- /dev/null +++ b/ci/etc/oldest-deps/overlay-ports/opentelemetry-cpp/portfile.cmake @@ -0,0 +1,135 @@ +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif () + +vcpkg_from_github( + OUT_SOURCE_PATH + SOURCE_PATH + REPO + open-telemetry/opentelemetry-cpp + REF + "v${VERSION}" + SHA512 + 6dc0357d8b3410852d3f970f72b8bec59dba9d6c533ca600432102e65de161903bd9170d98cef7ff0af5191309577ffd2a69ccd004b840914a910a6a282204e4 + HEAD_REF + main + PATCHES + fix-target_link.patch) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS + FEATURE_OPTIONS + FEATURES + etw + WITH_ETW + zipkin + WITH_ZIPKIN + prometheus + WITH_PROMETHEUS + elasticsearch + WITH_ELASTICSEARCH + otlp-file + WITH_OTLP_FILE + otlp-http + WITH_OTLP_HTTP + otlp-grpc + WITH_OTLP_GRPC + geneva + WITH_GENEVA + user-events + WITH_USER_EVENTS + opentracing + WITH_OPENTRACING + INVERTED_FEATURES + user-events + BUILD_TRACEPOINTS) + +# opentelemetry-proto is a third party submodule and opentelemetry-cpp release +# did not pack it. +if (WITH_OTLP_FILE + OR WITH_OTLP_GRPC + OR WITH_OTLP_HTTP) + set(OTEL_PROTO_VERSION "1.6.0") + vcpkg_download_distfile( + ARCHIVE + URLS + "https://github.com/open-telemetry/opentelemetry-proto/archive/v${OTEL_PROTO_VERSION}.tar.gz" + FILENAME + "opentelemetry-proto-${OTEL_PROTO_VERSION}.tar.gz" + SHA512 + 0e72e0c32d2d699d7a832a4c57a9dbe60e844d4c4e8d7b39eb45e4282cde89fccfeef893eae70b9d018643782090a7228c3ef60863b00747498e80f0cf1db8ae + ) + + vcpkg_extract_source_archive(src ARCHIVE "${ARCHIVE}") + file(REMOVE_RECURSE "${SOURCE_PATH}/third_party/opentelemetry-proto") + file(COPY "${src}/." + DESTINATION "${SOURCE_PATH}/third_party/opentelemetry-proto") + # Create empty .git directory to prevent opentelemetry from cloning it + # during build time + file(MAKE_DIRECTORY "${SOURCE_PATH}/third_party/opentelemetry-proto/.git") + list( + APPEND + FEATURE_OPTIONS + "-DgRPC_CPP_PLUGIN_EXECUTABLE=${CURRENT_HOST_INSTALLED_DIR}/tools/grpc/grpc_cpp_plugin${VCPKG_HOST_EXECUTABLE_SUFFIX}" + ) +endif () +list(APPEND FEATURE_OPTIONS -DCMAKE_CXX_STANDARD=17) +list(APPEND FEATURE_OPTIONS -DWITH_STL=CXX17) + +set(OPENTELEMETRY_CPP_EXTERNAL_COMPONENTS "OFF") + +if (WITH_GENEVA OR WITH_USER_EVENTS) + # Geneva and user events exporters from opentelemetry-cpp-contrib are + # tightly coupled with opentelemetry-cpp repo, so they should be ported as a + # feature under opentelemetry-cpp. + clone_opentelemetry_cpp_contrib(CONTRIB_SOURCE_PATH) + + if (WITH_GENEVA) + set(OPENTELEMETRY_CPP_EXTERNAL_COMPONENTS + "${CONTRIB_SOURCE_PATH}/exporters/geneva") + if (VCPKG_TARGET_IS_WINDOWS) + set(OPENTELEMETRY_CPP_EXTERNAL_COMPONENTS + "${OPENTELEMETRY_CPP_EXTERNAL_COMPONENTS}\;${CONTRIB_SOURCE_PATH}/exporters/geneva-trace" + ) + else () + set(OPENTELEMETRY_CPP_EXTERNAL_COMPONENTS + "${OPENTELEMETRY_CPP_EXTERNAL_COMPONENTS}\;${CONTRIB_SOURCE_PATH}/exporters/fluentd" + ) + endif () + endif () + + if (WITH_USER_EVENTS) + if (WITH_GENEVA) + set(OPENTELEMETRY_CPP_EXTERNAL_COMPONENTS + "${OPENTELEMETRY_CPP_EXTERNAL_COMPONENTS}\;${CONTRIB_SOURCE_PATH}/exporters/user_events" + ) + else () + set(OPENTELEMETRY_CPP_EXTERNAL_COMPONENTS + "${CONTRIB_SOURCE_PATH}/exporters/user_events") + endif () + endif () +endif () + +vcpkg_cmake_configure( + SOURCE_PATH + "${SOURCE_PATH}" + OPTIONS + -DBUILD_TESTING=OFF + -DWITH_EXAMPLES=OFF + -DOPENTELEMETRY_INSTALL=ON + -DWITH_BENCHMARK=OFF + -DOPENTELEMETRY_EXTERNAL_COMPONENT_PATH=${OPENTELEMETRY_CPP_EXTERNAL_COMPONENTS} + ${FEATURE_OPTIONS} + MAYBE_UNUSED_VARIABLES + WITH_GENEVA + WITH_USER_EVENTS + BUILD_TRACEPOINTS + gRPC_CPP_PLUGIN_EXECUTABLE) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}") +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/ci/etc/oldest-deps/overlay-ports/opentelemetry-cpp/vcpkg.json b/ci/etc/oldest-deps/overlay-ports/opentelemetry-cpp/vcpkg.json new file mode 100644 index 0000000000000..0570a7bd2e108 --- /dev/null +++ b/ci/etc/oldest-deps/overlay-ports/opentelemetry-cpp/vcpkg.json @@ -0,0 +1,108 @@ +{ + "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", + "name": "opentelemetry-cpp", + "version-semver": "1.23.0", + "description": [ + "OpenTelemetry is a collection of tools, APIs, and SDKs.", + "You use it to instrument, generate, collect, and export telemetry data (metrics, logs, and traces) for analysis in order to understand your software's performance and behavior." + ], + "homepage": "https://github.com/open-telemetry/opentelemetry-cpp", + "license": "Apache-2.0", + "dependencies": [ + "abseil", + "nlohmann-json", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "elasticsearch": { + "description": "Whether to include the Elasticsearch Client in the SDK", + "dependencies": [ + { + "name": "curl", + "default-features": false + } + ] + }, + "etw": { + "description": "Whether to include the ETW Exporter in the SDK", + "supports": "windows" + }, + "geneva": { + "description": "Whether to include the Geneva Exporter from the opentelemetry-cpp-contrib repository", + "dependencies": [ + { + "name": "opentelemetry-cpp", + "features": [ + "etw" + ], + "platform": "windows" + }, + "opentelemetry-cpp-contrib-version" + ] + }, + "opentracing": { + "description": "Whether to include the Opentracing shim", + "dependencies": [ + "opentracing" + ] + }, + "otlp-file": { + "description": "Whether to include the OpenTelemetry Protocol to File exporter in the SDK", + "supports": "!uwp", + "dependencies": [ + "protobuf" + ] + }, + "otlp-grpc": { + "description": "Whether to include the OTLP gRPC exporter in the SDK", + "dependencies": [ + "grpc", + { + "name": "grpc", + "host": true + } + ] + }, + "otlp-http": { + "description": "Whether to include the OpenTelemetry Protocol over HTTP in the SDK", + "dependencies": [ + "curl", + "protobuf" + ] + }, + "prometheus": { + "description": "Whether to include the Prometheus Client in the SDK", + "dependencies": [ + "prometheus-cpp" + ] + }, + "user-events": { + "description": "Whether to include the User Events Exporter from the opentelemetry-cpp-contrib repository", + "supports": "linux", + "dependencies": [ + "libeventheader-tracepoint", + "libtracepoint", + { + "name": "opentelemetry-cpp", + "features": [ + "otlp-http" + ] + }, + "opentelemetry-cpp-contrib-version" + ] + }, + "zipkin": { + "description": "Whether to include the Zipkin exporter in the SDK", + "dependencies": [ + "curl" + ] + } + } +} diff --git a/ci/etc/oldest-deps/vcpkg.json b/ci/etc/oldest-deps/vcpkg.json index 9545857b07db6..ec1607271c0b1 100644 --- a/ci/etc/oldest-deps/vcpkg.json +++ b/ci/etc/oldest-deps/vcpkg.json @@ -1,6 +1,6 @@ { "name": "google-cloud-cpp", - "version": "2.17.0", + "version": "3.0.0", "description": "C++ Client Libraries for Google Cloud Platform APIs.", "homepage": "https://github.com/googleapis/google-cloud-cpp", "license": "Apache-2.0", @@ -8,8 +8,7 @@ "$TODO": "move `gtest` and `benchmark` to dev-dependencies", "builtin-baseline": "6d9ed568117dd958c543b3ab8d3ed692965cac34", "dependencies": [ - {"name": "abseil", "version>=": "2020-09-23#3"}, - {"name": "crc32c", "version>=": "1.1.1"}, + {"name": "abseil", "version>=": "20250127.1"}, { "name": "curl", "features": [ @@ -18,26 +17,35 @@ }, { "name": "grpc", - "version>=": "1.33.1", + "version>=": "1.71.0", "host": true }, { "name": "protobuf", - "version>=": "3.15.8", + "version>=": "5.29.5", "host": true }, - {"name": "grpc", "version>=": "1.33.1"}, - {"name": "opentelemetry-cpp", "version>=": "1.9.1"}, - {"name": "protobuf", "version>=": "3.15.8"}, + {"name": "grpc", "version>=": "1.71.0"}, + {"name": "opentelemetry-cpp", "version>=": "1.22.0"}, + {"name": "protobuf", "version>=": "5.29.5"}, {"name": "nlohmann-json", "version>=": "3.9.1"}, "benchmark", - {"name": "gtest", "version>=": "1.11.0", "host": true} + {"name": "gtest", "version>=": "1.17.0", "host": true}, + "utf8-range", + "re2" ], "overrides": [ - { "name": "opentelemetry-cpp", "version": "1.9.1"}, - { "name": "protobuf", "version": "3.15.8" }, - { "name": "grpc", "version": "1.36.4" }, + { "name": "abseil", "version": "20250127.1"}, + { "name": "opentelemetry-cpp", "version": "1.22.0"}, + { "name": "protobuf", "version": "5.29.5" }, + { "name": "utf8-range", "version": "5.29.5" }, + { "name": "grpc", "version": "1.71.0" }, { "name": "upb", "version": "2020-12-19" }, - { "name": "gtest", "version": "1.12.0" } - ] + { "name": "benchmark", "version": "1.9.4" }, + { "name": "re2", "version": "2025-08-12" }, + { "name": "gtest", "version": "1.17.0" } + ], + "configuration": { + "overlay-ports" : [ "overlay-ports"] + } } diff --git a/ci/etc/vcpkg-version.txt b/ci/etc/vcpkg-version.txt index 1cf30f24daa2d..922462b2e1e1c 100644 --- a/ci/etc/vcpkg-version.txt +++ b/ci/etc/vcpkg-version.txt @@ -1 +1 @@ -2024.09.30 +3895230f38e498525f2560a281223d12066fa74a diff --git a/ci/generate-markdown/generate-packaging.sh b/ci/generate-markdown/generate-packaging.sh index 634ab67318ae8..17a4ce101abd4 100755 --- a/ci/generate-markdown/generate-packaging.sh +++ b/ci/generate-markdown/generate-packaging.sh @@ -37,7 +37,6 @@ file="doc/packaging.md" "demo-opensuse-leap.Dockerfile,openSUSE (Leap)" "demo-ubuntu-24.04.Dockerfile,Ubuntu (24.04 LTS - Noble Numbat)" "demo-ubuntu-jammy.Dockerfile,Ubuntu (22.04 LTS - Jammy Jellyfish)" - "demo-ubuntu-focal.Dockerfile,Ubuntu (20.04 LTS - Focal Fossa)" "demo-debian-bookworm.Dockerfile,Debian (12 - Bookworm)" "demo-debian-bullseye.Dockerfile,Debian (11 - Bullseye)" "demo-rockylinux-9.Dockerfile,Rocky Linux (9)" diff --git a/ci/gha/builds/lib/bazel.sh b/ci/gha/builds/lib/bazel.sh index e3576265e3981..96b22858d798e 100755 --- a/ci/gha/builds/lib/bazel.sh +++ b/ci/gha/builds/lib/bazel.sh @@ -78,6 +78,7 @@ function bazel::msvc_args() { '--per_file_copt=.*\.upbdefs\.c@-wd4090' # TODO(#14462) - gRPC is not compatible with (at least) MSVC 2019 + bzlmod. '--noenable_bzlmod' + '--enable_workspace' ) printf "%s\n" "${args[@]}" } diff --git a/ci/gha/builds/lib/cmake.sh b/ci/gha/builds/lib/cmake.sh index de923525946e8..df7c047e2d4b4 100755 --- a/ci/gha/builds/lib/cmake.sh +++ b/ci/gha/builds/lib/cmake.sh @@ -44,6 +44,7 @@ function cmake::common_args() { fi local args args=( + -DCMAKE_CXX_STANDARD=17 -DGOOGLE_CLOUD_CPP_ENABLE_CCACHE=OFF -DGOOGLE_CLOUD_CPP_ENABLE_WERROR=ON -GNinja diff --git a/ci/gha/builds/vcpkg-overlays/opentelemetry-cpp/fix-target_link.patch b/ci/gha/builds/vcpkg-overlays/opentelemetry-cpp/fix-target_link.patch new file mode 100644 index 0000000000000..f4709e8b1c28f --- /dev/null +++ b/ci/gha/builds/vcpkg-overlays/opentelemetry-cpp/fix-target_link.patch @@ -0,0 +1,17 @@ +diff --git a/cmake/opentracing-cpp.cmake b/cmake/opentracing-cpp.cmake +index f014ecd..fd8898a 100644 +--- a/cmake/opentracing-cpp.cmake ++++ b/cmake/opentracing-cpp.cmake +@@ -1,7 +1,11 @@ + # Copyright The OpenTelemetry Authors + # SPDX-License-Identifier: Apache-2.0 + +-find_package(OpenTracing CONFIG QUIET) ++find_package(OpenTracing CONFIG REQUIRED) ++if(NOT TARGET OpenTracing::opentracing AND TARGET OpenTracing::opentracing-static) ++ add_library(OpenTracing::opentracing ALIAS OpenTracing::opentracing-static) ++endif() ++ + set(OpenTracing_PROVIDER "find_package") + + if(NOT OpenTracing_FOUND) diff --git a/ci/gha/builds/vcpkg-overlays/opentelemetry-cpp/portfile.cmake b/ci/gha/builds/vcpkg-overlays/opentelemetry-cpp/portfile.cmake index eacf1ea4ada70..c8896c71694e8 100644 --- a/ci/gha/builds/vcpkg-overlays/opentelemetry-cpp/portfile.cmake +++ b/ci/gha/builds/vcpkg-overlays/opentelemetry-cpp/portfile.cmake @@ -10,12 +10,11 @@ vcpkg_from_github( REF "v${VERSION}" SHA512 - c93005c9b24b358a9998141f6c7fd9675778731775dacaad18f0e81117fd00aaabff371c04cf96688a9c86117727181052a141d961d4db28fc457b454351c570 + 6dc0357d8b3410852d3f970f72b8bec59dba9d6c533ca600432102e65de161903bd9170d98cef7ff0af5191309577ffd2a69ccd004b840914a910a6a282204e4 HEAD_REF main PATCHES - # Missing find_dependency for Abseil - add-missing-find-dependency.patch) + fix-target_link.patch) vcpkg_check_features( OUT_FEATURE_OPTIONS @@ -29,6 +28,8 @@ vcpkg_check_features( WITH_PROMETHEUS elasticsearch WITH_ELASTICSEARCH + otlp-file + WITH_OTLP_FILE otlp-http WITH_OTLP_HTTP otlp-grpc @@ -37,14 +38,18 @@ vcpkg_check_features( WITH_GENEVA user-events WITH_USER_EVENTS + opentracing + WITH_OPENTRACING INVERTED_FEATURES user-events BUILD_TRACEPOINTS) # opentelemetry-proto is a third party submodule and opentelemetry-cpp release # did not pack it. -if (WITH_OTLP_GRPC OR WITH_OTLP_HTTP) - set(OTEL_PROTO_VERSION "1.3.1") +if (WITH_OTLP_FILE + OR WITH_OTLP_GRPC + OR WITH_OTLP_HTTP) + set(OTEL_PROTO_VERSION "1.6.0") vcpkg_download_distfile( ARCHIVE URLS @@ -52,7 +57,7 @@ if (WITH_OTLP_GRPC OR WITH_OTLP_HTTP) FILENAME "opentelemetry-proto-${OTEL_PROTO_VERSION}.tar.gz" SHA512 - 8c75e4ff79c4b5b251e0ec8ece92ec901d70ec601644505ffdd137fb728daac91fd9203e1f448500124906737d91d80f10b694977688c655418b94f61c828d06 + 0e72e0c32d2d699d7a832a4c57a9dbe60e844d4c4e8d7b39eb45e4282cde89fccfeef893eae70b9d018643782090a7228c3ef60863b00747498e80f0cf1db8ae ) vcpkg_extract_source_archive(src ARCHIVE "${ARCHIVE}") @@ -62,13 +67,13 @@ if (WITH_OTLP_GRPC OR WITH_OTLP_HTTP) # Create empty .git directory to prevent opentelemetry from cloning it # during build time file(MAKE_DIRECTORY "${SOURCE_PATH}/third_party/opentelemetry-proto/.git") - list(APPEND FEATURE_OPTIONS -DCMAKE_CXX_STANDARD=14) list( APPEND FEATURE_OPTIONS "-DgRPC_CPP_PLUGIN_EXECUTABLE=${CURRENT_HOST_INSTALLED_DIR}/tools/grpc/grpc_cpp_plugin${VCPKG_HOST_EXECUTABLE_SUFFIX}" ) endif () +list(APPEND FEATURE_OPTIONS -DCMAKE_CXX_STANDARD=17 -DWITH_STL=CXX17) set(OPENTELEMETRY_CPP_EXTERNAL_COMPONENTS "OFF") @@ -111,15 +116,14 @@ vcpkg_cmake_configure( -DBUILD_TESTING=OFF -DWITH_EXAMPLES=OFF -DOPENTELEMETRY_INSTALL=ON - -DWITH_STL=CXX14 - -DWITH_ABSEIL=ON -DWITH_BENCHMARK=OFF -DOPENTELEMETRY_EXTERNAL_COMPONENT_PATH=${OPENTELEMETRY_CPP_EXTERNAL_COMPONENTS} ${FEATURE_OPTIONS} MAYBE_UNUSED_VARIABLES WITH_GENEVA WITH_USER_EVENTS - BUILD_TRACEPOINTS) + BUILD_TRACEPOINTS + gRPC_CPP_PLUGIN_EXECUTABLE) vcpkg_cmake_install() vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}") diff --git a/ci/gha/builds/vcpkg-overlays/opentelemetry-cpp/vcpkg.json b/ci/gha/builds/vcpkg-overlays/opentelemetry-cpp/vcpkg.json new file mode 100644 index 0000000000000..0570a7bd2e108 --- /dev/null +++ b/ci/gha/builds/vcpkg-overlays/opentelemetry-cpp/vcpkg.json @@ -0,0 +1,108 @@ +{ + "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", + "name": "opentelemetry-cpp", + "version-semver": "1.23.0", + "description": [ + "OpenTelemetry is a collection of tools, APIs, and SDKs.", + "You use it to instrument, generate, collect, and export telemetry data (metrics, logs, and traces) for analysis in order to understand your software's performance and behavior." + ], + "homepage": "https://github.com/open-telemetry/opentelemetry-cpp", + "license": "Apache-2.0", + "dependencies": [ + "abseil", + "nlohmann-json", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "elasticsearch": { + "description": "Whether to include the Elasticsearch Client in the SDK", + "dependencies": [ + { + "name": "curl", + "default-features": false + } + ] + }, + "etw": { + "description": "Whether to include the ETW Exporter in the SDK", + "supports": "windows" + }, + "geneva": { + "description": "Whether to include the Geneva Exporter from the opentelemetry-cpp-contrib repository", + "dependencies": [ + { + "name": "opentelemetry-cpp", + "features": [ + "etw" + ], + "platform": "windows" + }, + "opentelemetry-cpp-contrib-version" + ] + }, + "opentracing": { + "description": "Whether to include the Opentracing shim", + "dependencies": [ + "opentracing" + ] + }, + "otlp-file": { + "description": "Whether to include the OpenTelemetry Protocol to File exporter in the SDK", + "supports": "!uwp", + "dependencies": [ + "protobuf" + ] + }, + "otlp-grpc": { + "description": "Whether to include the OTLP gRPC exporter in the SDK", + "dependencies": [ + "grpc", + { + "name": "grpc", + "host": true + } + ] + }, + "otlp-http": { + "description": "Whether to include the OpenTelemetry Protocol over HTTP in the SDK", + "dependencies": [ + "curl", + "protobuf" + ] + }, + "prometheus": { + "description": "Whether to include the Prometheus Client in the SDK", + "dependencies": [ + "prometheus-cpp" + ] + }, + "user-events": { + "description": "Whether to include the User Events Exporter from the opentelemetry-cpp-contrib repository", + "supports": "linux", + "dependencies": [ + "libeventheader-tracepoint", + "libtracepoint", + { + "name": "opentelemetry-cpp", + "features": [ + "otlp-http" + ] + }, + "opentelemetry-cpp-contrib-version" + ] + }, + "zipkin": { + "description": "Whether to include the Zipkin exporter in the SDK", + "dependencies": [ + "curl" + ] + } + } +} diff --git a/ci/verify_current_targets/.bazelrc b/ci/verify_current_targets/.bazelrc index 161c057f747d3..08cbd3ab82723 100644 --- a/ci/verify_current_targets/.bazelrc +++ b/ci/verify_current_targets/.bazelrc @@ -15,23 +15,19 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" +# The project requires C++ >= 17. +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 +# Protobuf and gRPC require C++17 to compile the "host" # targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds # the project separately. build --experimental_convenience_symlinks=ignore -# TODO(#11485) - enable bzlmod once it works -common --noenable_bzlmod - # TODO(#13311) - remove once gRPC works with Bazel v7 or when gRPC stops using # `apple_rules`. common:macos --repo_env=BAZEL_NO_APPLE_CPP_TOOLCHAIN=1 diff --git a/ci/verify_current_targets/.bazelversion b/ci/verify_current_targets/.bazelversion index e8be68404bcb3..e7fdef7e2e635 100644 --- a/ci/verify_current_targets/.bazelversion +++ b/ci/verify_current_targets/.bazelversion @@ -1 +1 @@ -7.6.1 +8.4.2 diff --git a/ci/verify_current_targets/CMakeLists.txt b/ci/verify_current_targets/CMakeLists.txt index e10300c2e4c01..32ba9818eef1f 100644 --- a/ci/verify_current_targets/CMakeLists.txt +++ b/ci/verify_current_targets/CMakeLists.txt @@ -79,23 +79,13 @@ endforeach () # Verify backwards compatible proto libraries are installed. See #8022 for more # details. -foreach (library "dialogflow_es" "iam" "monitoring" "speech" "texttospeech" - "trace") +foreach (library "iam") find_package(google_cloud_cpp_${library}) endforeach () set(backwards_compat_proto_libraries # cmake-format: sortable - "cloud_dialogflow_v2_protos" - "cloud_speech_protos" - "cloud_texttospeech_protos" - "devtools_cloudtrace_v2_trace_protos" - "devtools_cloudtrace_v2_tracing_protos" - "iam_v1_iam_policy_protos" - "iam_v1_options_protos" - "iam_v1_policy_protos" - "logging_type_protos" - "logging_type_type_protos") + "iam_v1_iam_policy_protos" "iam_v1_options_protos" "iam_v1_policy_protos") foreach (library ${backwards_compat_proto_libraries}) add_test_case(test_cmake_${library} google-cloud-cpp::common diff --git a/ci/verify_current_targets/MODULE.bazel b/ci/verify_current_targets/MODULE.bazel new file mode 100644 index 0000000000000..1c488000beede --- /dev/null +++ b/ci/verify_current_targets/MODULE.bazel @@ -0,0 +1,7 @@ +module(name = "google-cloud-cpp-verify-current-targets") + +bazel_dep(name = "google_cloud_cpp", version = "0.0.0") +local_path_override( + module_name = "google_cloud_cpp", + path = "../..", +) diff --git a/ci/verify_current_targets/WORKSPACE.bazel b/ci/verify_current_targets/WORKSPACE.bazel deleted file mode 100644 index 46f3b24ccaa76..0000000000000 --- a/ci/verify_current_targets/WORKSPACE.bazel +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -workspace(name = "verify_current_targets") - -local_repository( - name = "google_cloud_cpp", - path = "../../", -) - -load("@google_cloud_cpp//bazel:workspace0.bzl", "gl_cpp_workspace0") - -gl_cpp_workspace0() - -load("@google_cloud_cpp//bazel:workspace1.bzl", "gl_cpp_workspace1") - -gl_cpp_workspace1() - -load("@google_cloud_cpp//bazel:workspace2.bzl", "gl_cpp_workspace2") - -gl_cpp_workspace2() - -load("@google_cloud_cpp//bazel:workspace3.bzl", "gl_cpp_workspace3") - -gl_cpp_workspace3() - -load("@google_cloud_cpp//bazel:workspace4.bzl", "gl_cpp_workspace4") - -gl_cpp_workspace4() - -load("@google_cloud_cpp//bazel:workspace5.bzl", "gl_cpp_workspace5") - -gl_cpp_workspace5() diff --git a/ci/verify_deprecated_targets/.bazelrc b/ci/verify_deprecated_targets/.bazelrc index a63472faf465a..dd078cc0c0d14 100644 --- a/ci/verify_deprecated_targets/.bazelrc +++ b/ci/verify_deprecated_targets/.bazelrc @@ -15,23 +15,19 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" +# The project requires C++ >= 17. +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 +# Protobuf and gRPC require C++17 to compile the "host" # targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds # the project separately. build --experimental_convenience_symlinks=ignore -# TODO(#11485) - enable bzlmod once it works -common --noenable_bzlmod - # TODO(#13311) - remove once gRPC works with Bazel v7 or when gRPC stops using # `apple_rules`. common:macos --repo_env=BAZEL_NO_APPLE_CPP_TOOLCHAIN=1 diff --git a/ci/verify_deprecated_targets/.bazelversion b/ci/verify_deprecated_targets/.bazelversion index e8be68404bcb3..e7fdef7e2e635 100644 --- a/ci/verify_deprecated_targets/.bazelversion +++ b/ci/verify_deprecated_targets/.bazelversion @@ -1 +1 @@ -7.6.1 +8.4.2 diff --git a/ci/verify_deprecated_targets/BUILD.bazel b/ci/verify_deprecated_targets/BUILD.bazel index 65ed0fb8c083c..077a58df1b51f 100644 --- a/ci/verify_deprecated_targets/BUILD.bazel +++ b/ci/verify_deprecated_targets/BUILD.bazel @@ -16,20 +16,12 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 -# TODO(#5726) - DO NOT CHANGE THESE TARGET NAMES These package names are -# expected to remain usable until we have retired them. They are *deprecated* -# (that is, we no longer recommend their use), but *NOT* retired (that is, they -# remain available). This is a test for backwards compatibility. If you need to -# change the test, there is good chance you are breaking something. +# These package names are expected to remain usable until we have retired them. +# They are *deprecated* (that is, we no longer recommend their use), but *NOT* +# decommissioned (that is, they remain available). This is a test for backwards +# compatibility. If you need to change the test, there is good chance you are +# breaking something. DEPRECATED_TARGETS = [ - "google/cloud/grpc_utils:google_cloud_cpp_grpc_utils", - "google/cloud/pubsub:pubsub_client_testing", - "google/cloud/spanner:spanner_client_testing", - "google/cloud/testing_util:google_cloud_cpp_testing", - "google/cloud/testing_util:google_cloud_cpp_testing_grpc", - "google/cloud/testing_util:google_cloud_cpp_testing_rest", - "google/cloud:google_cloud_cpp_common", - "google/cloud:google_cloud_cpp_grpc_utils", ] [cc_test( diff --git a/ci/verify_deprecated_targets/MODULE.bazel b/ci/verify_deprecated_targets/MODULE.bazel new file mode 100644 index 0000000000000..fd929f8987a59 --- /dev/null +++ b/ci/verify_deprecated_targets/MODULE.bazel @@ -0,0 +1,7 @@ +module(name = "google-cloud-cpp-verify-deprecated-targets") + +bazel_dep(name = "google_cloud_cpp", version = "0.0.0") +local_path_override( + module_name = "google_cloud_cpp", + path = "../..", +) diff --git a/ci/verify_deprecated_targets/WORKSPACE.bazel b/ci/verify_deprecated_targets/WORKSPACE.bazel deleted file mode 100644 index 8711eace78c3f..0000000000000 --- a/ci/verify_deprecated_targets/WORKSPACE.bazel +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# A minimal WORKSPACE file showing how to use the Google Cloud Bigtable C++ -# client library in Bazel-based projects. -workspace(name = "verify_deprecated_targets") - -local_repository( - name = "google_cloud_cpp", - path = "../../", -) - -load("@google_cloud_cpp//bazel:workspace0.bzl", "gl_cpp_workspace0") - -gl_cpp_workspace0() - -load("@google_cloud_cpp//bazel:workspace1.bzl", "gl_cpp_workspace1") - -gl_cpp_workspace1() - -load("@google_cloud_cpp//bazel:workspace2.bzl", "gl_cpp_workspace2") - -gl_cpp_workspace2() - -load("@google_cloud_cpp//bazel:workspace3.bzl", "gl_cpp_workspace3") - -gl_cpp_workspace3() - -load("@google_cloud_cpp//bazel:workspace4.bzl", "gl_cpp_workspace4") - -gl_cpp_workspace4() - -load("@google_cloud_cpp//bazel:workspace5.bzl", "gl_cpp_workspace5") - -gl_cpp_workspace5() diff --git a/ci/verify_deprecated_targets/verify_deprecated_targets.cc b/ci/verify_deprecated_targets/verify_deprecated_targets.cc index d887bdf914be4..6dd838fe5a64a 100644 --- a/ci/verify_deprecated_targets/verify_deprecated_targets.cc +++ b/ci/verify_deprecated_targets/verify_deprecated_targets.cc @@ -17,8 +17,5 @@ int main() { std::cout << "Hello: " << google::cloud::version_string() << "\n"; - // Verifies use of the backward-compatibility aliases: v1 and gcpcxxV1. - std::cout << "Hello: " << google::cloud::v1::version_string() << "\n"; - std::cout << "Hello: " << google::cloud::gcpcxxV1::version_string() << "\n"; return 0; } diff --git a/cmake/CompileProtos.cmake b/cmake/CompileProtos.cmake index 4b389c7bf3256..a42f48c7e25cd 100644 --- a/cmake/CompileProtos.cmake +++ b/cmake/CompileProtos.cmake @@ -227,7 +227,7 @@ endfunction () # extracts the list of `.proto` files for each proto library we are interested # in. These files are extracted as Bazel rule names, for example: # -# @com_google_googleapis//google/bigtable/v2:bigtable.proto +# @googleapis//google/bigtable/v2:bigtable.proto # # We use naming conventions to convert these rules files to a path. Using the # same example that becomes: @@ -253,7 +253,7 @@ function (google_cloud_cpp_load_protolist var file) string(REGEX REPLACE "\n" ";" contents "${contents}") set(protos) foreach (line IN LISTS contents) - string(REPLACE "@com_google_googleapis//" "" line "${line}") + string(REPLACE "@googleapis//" "" line "${line}") string(REPLACE ":" "/" line "${line}") if ("${line}" STREQUAL "") continue() @@ -273,7 +273,7 @@ endfunction () # extracts the list of dependencies for each proto library we are interested in. # These dependencies are extracted as Bazel rule names, for example: # -# @com_google_googleapis//google/api:annotations_proto +# @googleapis//google/api:annotations_proto # # We use naming conventions to convert these rules files to a CMake target. # Using the same example that becomes: @@ -311,8 +311,7 @@ function (google_cloud_cpp_load_protodeps var file) endif () string(REPLACE ":" "_" line "${line}") string(REPLACE "_proto" "_protos" line "${line}") - string(REPLACE "@com_google_googleapis//" "google-cloud-cpp::" line - "${line}") + string(REPLACE "@googleapis//" "google-cloud-cpp::" line "${line}") # Avoid duplicate `google`'s in the target name. string(REPLACE "google-cloud-cpp::google/" "google-cloud-cpp::" line "${line}") diff --git a/cmake/GoogleCloudCppFeatures.cmake b/cmake/GoogleCloudCppFeatures.cmake index b445cb0e2034e..b721a2fc645a6 100644 --- a/cmake/GoogleCloudCppFeatures.cmake +++ b/cmake/GoogleCloudCppFeatures.cmake @@ -306,7 +306,8 @@ export_libraries_bzl() # other feature, or even if no features are enabled. # ~~~ macro (google_cloud_cpp_enable_deps) - find_package(opentelemetry-cpp CONFIG) + list(APPEND GOOGLE_CLOUD_CPP_ENABLE monitoring trace opentelemetry + universe_domain) if (__ga_libraries__ IN_LIST GOOGLE_CLOUD_CPP_ENABLE) list(APPEND GOOGLE_CLOUD_CPP_ENABLE ${GOOGLE_CLOUD_CPP_GA_LIBRARIES}) list(APPEND GOOGLE_CLOUD_CPP_ENABLE @@ -345,11 +346,6 @@ macro (google_cloud_cpp_enable_deps) if (asset IN_LIST GOOGLE_CLOUD_CPP_ENABLE) list(INSERT GOOGLE_CLOUD_CPP_ENABLE 0 accesscontextmanager osconfig) endif () - if (bigtable IN_LIST GOOGLE_CLOUD_CPP_ENABLE) - if (opentelemetry-cpp_FOUND) - list(INSERT GOOGLE_CLOUD_CPP_ENABLE 0 opentelemetry) - endif () - endif () if (contentwarehouse IN_LIST GOOGLE_CLOUD_CPP_ENABLE) list(INSERT GOOGLE_CLOUD_CPP_ENABLE 0 documentai) endif () @@ -359,14 +355,9 @@ macro (google_cloud_cpp_enable_deps) if (pubsub IN_LIST GOOGLE_CLOUD_CPP_ENABLE) list(INSERT GOOGLE_CLOUD_CPP_ENABLE 0 iam) endif () - if ((storage_grpc IN_LIST GOOGLE_CLOUD_CPP_ENABLE) - # TODO(#13857) - remove backwards compatibility shims - OR (experimental-storage_grpc IN_LIST GOOGLE_CLOUD_CPP_ENABLE)) + if (storage_grpc IN_LIST GOOGLE_CLOUD_CPP_ENABLE) list(INSERT GOOGLE_CLOUD_CPP_ENABLE 0 storage) endif () - if (opentelemetry IN_LIST GOOGLE_CLOUD_CPP_ENABLE) - list(INSERT GOOGLE_CLOUD_CPP_ENABLE 0 monitoring trace opentelemetry) - endif () endmacro () # Cleanup the "GOOGLE_CLOUD_CPP_ENABLE" variable. Remove duplicates, and set @@ -424,9 +415,7 @@ function (google_cloud_cpp_enable_features) foreach (feature IN LISTS GOOGLE_CLOUD_CPP_ENABLE) if ("${feature}" STREQUAL "generator") add_subdirectory(generator) - elseif (("${feature}" STREQUAL "storage_grpc") - # TODO(#13857) - remove backwards compatibility shims - OR ("${feature}" STREQUAL "experimental-storage_grpc")) + elseif ("${feature}" STREQUAL "storage_grpc") if (NOT ("storage" IN_LIST GOOGLE_CLOUD_CPP_ENABLE)) add_subdirectory(google/cloud/storage) endif () @@ -529,9 +518,7 @@ endfunction () function (google_cloud_cpp_define_dependent_legacy_feature_options) set(GOOGLE_CLOUD_CPP_STORAGE_ENABLE_GRPC_DEFAULT OFF) - if ((storage_grpc IN_LIST GOOGLE_CLOUD_CPP_ENABLE) - # TODO(#13857) - remove backwards compatibility shims - OR (experimental-storage_grpc IN_LIST GOOGLE_CLOUD_CPP_ENABLE)) + if (storage_grpc IN_LIST GOOGLE_CLOUD_CPP_ENABLE) set(GOOGLE_CLOUD_CPP_STORAGE_ENABLE_GRPC_DEFAULT ON) endif () diff --git a/cmake/GoogleCloudCppLibrary.cmake b/cmake/GoogleCloudCppLibrary.cmake index e0d65b53669ae..414d0985c9693 100644 --- a/cmake/GoogleCloudCppLibrary.cmake +++ b/cmake/GoogleCloudCppLibrary.cmake @@ -222,17 +222,6 @@ function (google_cloud_cpp_add_gapic_library library display_name) list(TRANSFORM shared_proto_dep_targets PREPEND "google_cloud_cpp_") list(TRANSFORM shared_proto_dep_targets APPEND "_protos") - # We used to offer the proto library by another name. Maintain backwards - # compatibility by providing an interface library with that name. Also make - # sure we install it as part of google_cloud_cpp_${library}-targets. - unset(backwards_compat_proto_targets) - foreach (old_protos IN LISTS _opt_BACKWARDS_COMPAT_PROTO_TARGETS) - google_cloud_cpp_backwards_compat_protos_library("${old_protos}" - "${library}_protos") - list(APPEND backwards_compat_proto_targets - "google_cloud_cpp_${old_protos}") - endforeach () - file( GLOB source_files RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" diff --git a/cmake/IncludeNlohmannJson.cmake b/cmake/IncludeNlohmannJson.cmake deleted file mode 100644 index db8056ae051b2..0000000000000 --- a/cmake/IncludeNlohmannJson.cmake +++ /dev/null @@ -1,34 +0,0 @@ -# ~~~ -# Copyright 2018 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ~~~ - -function (find_nlohmann_json) - find_package(nlohmann_json CONFIG QUIET) - if (nlohmann_json_FOUND) - return() - endif () - # As a fall back, try finding the header. Since this is a header-only - # library that is all we need. - find_path(GOOGLE_CLOUD_CPP_NLOHMANN_JSON_HEADER "nlohmann/json.hpp" - REQUIRED) - add_library(nlohmann_json::nlohmann_json UNKNOWN IMPORTED) - set_property( - TARGET nlohmann_json::nlohmann_json - APPEND - PROPERTY INTERFACE_INCLUDE_DIRECTORIES - ${GOOGLE_CLOUD_CPP_NLOHMANN_JSON_HEADER}) -endfunction () - -find_nlohmann_json() diff --git a/doc/compile-time-configuration.md b/doc/compile-time-configuration.md index 07ae4f011e4a5..26a26ceea0665 100644 --- a/doc/compile-time-configuration.md +++ b/doc/compile-time-configuration.md @@ -78,13 +78,12 @@ We expect that application developers using Bazel will include ### The C++ Standard -The default Bazel toolchain forces C++11 on Linux and macOS. `google-cloud-cpp` -requires C++14, so you will need to update the C++ standard version. You must -either: +`google-cloud-cpp` requires C++17, so you may need to update the C++ standard +version. You want to either: - Provide your own C++ toolchain configuration for Bazel. Consult the Bazel documentation if you want to attempt this approach. -- Add `--cxxopt=-std=c++14` and `--host_cxxopt=-std=c++14` (or higher) in your +- Add `--cxxopt=-std=c++17` and `--host_cxxopt=-std=c++17` (or higher) in your Bazel command-line. - Add the same options in your Bazel `.bazelrc` file. @@ -92,14 +91,6 @@ The `--host_cxxopt` may be unfamiliar. This is required to support Protobuf and gRPC, which compile code generators for the "host" environment, and generate libraries for the "target" environment. -### Enabling OpenTelemetry - -[OpenTelemetry] is disabled by default. Add `--//:enable_opentelemetry` to your -Bazel command-line parameters to enable OpenTelemetry features, such as -instrumentation to collect distributed traces. - -See the [OpenTelemetry quickstart] for more details. - ### Workarounds gRPC circa 1.58.1 fails to build with Bazel and Clang >= 16 (see [grpc#34482]). @@ -110,4 +101,3 @@ Add the `--features=-layering_check` option to your Bazel command-line or add [github discussion]: https://github.com/googleapis/google-cloud-cpp/discussions [grpc#34482]: https://github.com/grpc/grpc/issues/34482 [opentelemetry]: https://opentelemetry.io/ -[opentelemetry quickstart]: https://github.com/googleapis/google-cloud-cpp/tree/main/google/cloud/opentelemetry/quickstart diff --git a/doc/deprecated.md b/doc/deprecated.md index 04fafb3bd229f..f39a13aa1414e 100644 --- a/doc/deprecated.md +++ b/doc/deprecated.md @@ -1,55 +1,8 @@ # Future Breaking Changes -The next major version of `google-cloud-cpp` (the 3.x series) is expected to +The next major version of `google-cloud-cpp` (the 4.x series) is expected to include the following **breaking changes**. -
-Bigtable: mark bigtable::DataClient as final - -
- -We will mark `bigtable::DataClient` as `final` and remove the following member -functions: - -- `DataClient::Channel()` -- `DataClient::reset()` -- `DataClient::BackgroundThreadsFactory()` - -Application developers should not need to interact with this class directly. -Please use `google::cloud::bigtable::MakeDataClient(...)` with the options from -`google::cloud::GrpcOptionList<>` if you need to configure the gRPC channel or -background threads. More details can be found in [#8800]. - -
- -
-Bigtable: remove bigtable::RowReader constructors - -
- -We will remove `bigtable::RowReader` constructors which accept `DataClient` as -an argument. - -Application developers who read rows by directly constructing a `RowReader` -object should instead construct a `Table` object and call `Table::ReadRows(...)` -on it. - -For status on this, see [#8854]. - -
- -
-BigQuery: remove BigQueryReadReadRowsStreamingUpdater from -google::cloud::bigquery namespace -
- -We will remove `BigQueryReadReadRowsStreamingUpdater` from its declaration in -`google/cloud/bigquery/read_connection.h` and from the `google::cloud::bigquery` -namespace. The function continues to exist but in an internal file and -namespace. For status on this see [#8234]. - -
-
Pubsub: remove legacy admin APIs
@@ -65,70 +18,4 @@ details.
-
-Spanner: remove legacy admin APIs -
- -We will remove the hand-written versions of the Spanner admin APIs. These have -been superseded by versions generated automatically from the service -definitions. The new APIs can be found in the -[`google/cloud/spanner/admin`](https://github.com/googleapis/google-cloud-cpp/tree/main/google/cloud/spanner/admin) -tree and within the `google::cloud::spanner_admin` namespace. Starting with the -v1.32.0 release, and depending on your compiler settings, using the old -classes/functions may elicit a deprecation warning. See [#7356] for more -details. - -
- -
-Spanner: remove spanner::MakeTestRow() -
- -We will remove `spanner::MakeTestRow()`, which has been replaced by -`spanner_mocks::MakeRow()`. Starting with the v1.41.0 release, and depending on -your compiler settings, using `spanner::MakeTestRow()` may elicit a deprecation -warning. See [#9086] for more details. - -
- -
-Storage: remove the `google::cloud::storage::oauth2` namespace -
- -We will remove the `google::cloud::storage::oauth2` namespace, and all the -header files in `google/cloud/storage/oauth2/`. The new credential types in -`google/cloud/credentials.h` are work with gRPC-based services and support more -use-cases. To create access tokens use the supporting classes in -`google/cloud/oauth2/`. - -
- -
-Common Libraries: remove v1 and gcpcxxV1 -backward compatibility aliases -
- -We will remove the inline namespace aliases of `v1` and `gcpcxxV1` that are -declared in `google/cloud/version.h`. These aliases exist because we changed the -format of our inline namespace name to include the major, minor, and patch -numbers for each release, and we didn't want to break users. Our Doxygen -documentation was mistakenly recommending that users include the inline -namespace names in their code, but this was also fixed to now recommend against -doing so. Users should generally omit the name of our versioned inline namespace -name because that will tightly couple their code to a specific release, and will -make upgrading to newer versions more difficult. Instead, users should simply -omit the inline namespace name, for example, instead of -~`google::cloud::v1::Status`~ use `google::cloud::Status`. Please update your -code to avoid naming the `v1` and `gcpcxxV1` inline namespace names. For more -info, see [#7463] and [#5976]. - -
- [#12987]: https://github.com/googleapis/google-cloud-cpp/issues/12987 -[#5976]: https://github.com/googleapis/google-cloud-cpp/issues/5976 -[#7356]: https://github.com/googleapis/google-cloud-cpp/issues/7356 -[#7463]: https://github.com/googleapis/google-cloud-cpp/issues/7463 -[#8234]: https://github.com/googleapis/google-cloud-cpp/issues/8234 -[#8800]: https://github.com/googleapis/google-cloud-cpp/issues/8800 -[#8854]: https://github.com/googleapis/google-cloud-cpp/issues/8854 -[#9086]: https://github.com/googleapis/google-cloud-cpp/issues/9086 diff --git a/doc/packaging.md b/doc/packaging.md index 3b77ef4d6db6b..e305c8009fa3a 100644 --- a/doc/packaging.md +++ b/doc/packaging.md @@ -115,20 +115,13 @@ quickstart guides also cover this use-case. | Library | Minimum version | Description | | --------------------------------- | ----------------: | ---------------------------------------------------------- | -| [Abseil][abseil-gh] | 20200923, Patch 3 | Abseil C++ common library [^1] | -| [gRPC][grpc-gh] | 1.35.x | An RPC library and framework [^2] | -| [libcurl][libcurl-gh] | 7.47.0 | HTTP client library [^3] | -| [crc32c][crc32c-gh] | 1.0.6 | Hardware-accelerated CRC32C implementation [^4] | -| [OpenSSL][openssl-gh] | 1.0.2 | Crypto functions for [^3] | -| [nlohmann/json][nlohmann-json-gh] | 3.4.0 | JSON for Modern C++ [^3] | -| [protobuf][protobuf-gh] | 3.15.8 | Protobuf is needed for any library based on gRPC [^5] [^6] | - -`google-cloud-cpp` also has an **optional** dependency on the following -libraries: - -| Library | Minimum version | Description | -| --------------------------------- | --------------- | ------------------------------ | -| [OpenTelemetry][opentelemetry-gh] | 1.9.1 | An observability framework[^7] | +| [Abseil][abseil-gh] | 20250814, Patch 1 | Abseil C++ common library [^1] | +| [gRPC][grpc-gh] | 1.76.x | An RPC library and framework [^2] | +| [libcurl][libcurl-gh] | 7.74.0 | HTTP client library [^3] | +| [OpenSSL][openssl-gh] | 3.0.17 | Crypto functions for [^3] | +| [nlohmann/json][nlohmann-json-gh] | 3.12.0 | JSON for Modern C++ [^3] | +| [protobuf][protobuf-gh] | 6.33.x | Protobuf is needed for any library based on gRPC [^5] [^6] | +| [OpenTelemetry][opentelemetry-gh] | 1.23.0 | An observability framework[^7] | Note that these libraries may also depend on other libraries. The following instructions include steps to install these indirect dependencies too. @@ -188,7 +181,7 @@ development packages ```bash apk update && \ - apk add abseil-cpp-dev crc32c-dev c-ares-dev curl-dev grpc-dev \ + apk add abseil-cpp-dev c-ares-dev curl-dev grpc-dev \ protobuf-dev nlohmann-json openssl-dev re2-dev ``` @@ -202,14 +195,14 @@ recommend installing this library because: ```bash mkdir -p $HOME/Downloads/opentelemetry-cpp && cd $HOME/Downloads/opentelemetry-cpp -curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20.0.tar.gz | \ +curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DWITH_EXAMPLES=OFF \ - -DWITH_STL=CXX14 \ - -DWITH_ABSEIL=ON \ + -DWITH_STL=CXX17 \ -DBUILD_TESTING=OFF \ -DOPENTELEMETRY_INSTALL=ON \ -DOPENTELEMETRY_ABI_VERSION_NO=2 \ @@ -226,6 +219,7 @@ We can now compile and install `google-cloud-cpp`: PREFIX="${HOME}/google-cloud-cpp-installed" cmake -S . -B cmake-out \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DBUILD_TESTING=OFF \ -DGOOGLE_CLOUD_CPP_WITH_MOCKS=OFF \ @@ -255,7 +249,7 @@ dependencies of `google-cloud-cpp`. ```bash sudo dnf makecache && \ sudo dnf install -y protobuf-compiler protobuf-devel grpc-cpp grpc-devel \ - json-devel libcurl-devel google-crc32c-devel openssl-devel + json-devel libcurl-devel openssl-devel ``` #### Patching pkg-config @@ -278,15 +272,6 @@ sudo make install && \ sudo ldconfig && cd /var/tmp && rm -fr build ``` -Older versions of Fedora hard-code RE2 to use C++11. It was fixed starting with -Fedora:38. If you using Fedora >= 38 or you are not planning to use -`pkg-config(1)` you can ignore this step. Alternatively, you can install RE2 and -gRPC from source. - -``` -sed -i 's/-std=c\+\+11 //' /usr/lib64/pkgconfig/re2.pc -``` - The following steps will install libraries and tools in `/usr/local`. By default, pkgconf does not search in these directories. We need to explicitly set the search path. @@ -305,14 +290,14 @@ recommend installing this library because: ```bash mkdir -p $HOME/Downloads/opentelemetry-cpp && cd $HOME/Downloads/opentelemetry-cpp -curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20.0.tar.gz | \ +curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DWITH_EXAMPLES=OFF \ - -DWITH_STL=CXX14 \ - -DWITH_ABSEIL=ON \ + -DWITH_STL=CXX17 \ -DBUILD_TESTING=OFF \ -DOPENTELEMETRY_INSTALL=ON \ -DOPENTELEMETRY_ABI_VERSION_NO=2 \ @@ -330,6 +315,7 @@ We can now compile and install `google-cloud-cpp`: PREFIX="${HOME}/google-cloud-cpp-installed" cmake -S . -B cmake-out \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DBUILD_TESTING=OFF \ -DGOOGLE_CLOUD_CPP_WITH_MOCKS=OFF \ @@ -355,7 +341,7 @@ use GCC 8 or higher to compile `google-cloud-cpp`. ```bash sudo zypper refresh && \ sudo zypper install --allow-downgrade -y automake cmake curl \ - gcc gcc-c++ gcc8 gcc8-c++ git gzip libtool make patch tar wget + gcc8 gcc8-c++ git gzip libtool make patch tar wget ``` Install some of the dependencies for `google-cloud-cpp`. @@ -363,7 +349,7 @@ Install some of the dependencies for `google-cloud-cpp`. ```bash sudo zypper refresh && \ sudo zypper install --allow-downgrade -y abseil-cpp-devel c-ares-devel \ - libcurl-devel libopenssl-devel libcrc32c-devel nlohmann_json-devel \ + libcurl-devel libopenssl-devel nlohmann_json-devel \ grpc-devel libprotobuf-devel ``` @@ -378,24 +364,23 @@ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig export PATH=/usr/local/bin:${PATH} ``` -#### opentelemetry-cpp +Use the following environment variables to configure the compiler used by CMake. +export CC=gcc-8 export CXX=g++-8 -The project has an **optional** dependency on the OpenTelemetry library. We -recommend installing this library because: +#### opentelemetry-cpp -- the dependency will become required in the google-cloud-cpp v3.x series. -- it is needed to produce distributed traces of the library. +The project has a dependency on the OpenTelemetry library. ```bash mkdir -p $HOME/Downloads/opentelemetry-cpp && cd $HOME/Downloads/opentelemetry-cpp -curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20.0.tar.gz | \ +curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DWITH_EXAMPLES=OFF \ - -DWITH_STL=CXX14 \ - -DWITH_ABSEIL=ON \ + -DWITH_STL=CXX17 \ -DBUILD_TESTING=OFF \ -DOPENTELEMETRY_INSTALL=ON \ -DOPENTELEMETRY_ABI_VERSION_NO=2 \ @@ -404,12 +389,6 @@ sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ sudo ldconfig ``` -Use the following environment variables to configure the compiler used by CMake. - -export CXX=g++-8 - -export CC=gcc-8 - #### Compile and install the main project We can now compile and install `google-cloud-cpp`: @@ -419,6 +398,7 @@ We can now compile and install `google-cloud-cpp`: PREFIX="${HOME}/google-cloud-cpp-installed" cmake -S . -B cmake-out \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DBUILD_TESTING=OFF \ -DGOOGLE_CLOUD_CPP_WITH_MOCKS=OFF \ @@ -479,25 +459,19 @@ sudo ldconfig && cd /var/tmp && rm -fr build ln -s /usr/bin/pkgconf /usr/bin/pkg-config ``` -#### crc32c - -The project depends on the Crc32c library, we need to compile this from source: +#### abseil -```bash -mkdir -p $HOME/Downloads/crc32c && cd $HOME/Downloads/crc32c -curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=yes \ - -DCRC32C_BUILD_TESTS=OFF \ - -DCRC32C_BUILD_BENCHMARKS=OFF \ - -DCRC32C_USE_GLOG=OFF \ - -S . -B cmake-out && \ - cmake --build cmake-out -- -j ${NCPU:-4} && \ +mkdir -p $HOME/Downloads/abseil-cpp && cd $HOME/Downloads/abseil-cpp curl -fsSL +https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ +tar -xzf - --strip-components=1 && \ +cmake \ +-DCMAKE_BUILD_TYPE=Release \ +-DABSL_BUILD_TESTING=OFF \ +-DBUILD_SHARED_LIBS=yes \ +-S . -B cmake-out && \ +cmake --build cmake-out -- -j ${NCPU:-4} && \ sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ sudo ldconfig -``` #### opentelemetry-cpp @@ -509,14 +483,13 @@ recommend installing this library because: ```bash mkdir -p $HOME/Downloads/opentelemetry-cpp && cd $HOME/Downloads/opentelemetry-cpp -curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20.0.tar.gz | \ +curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_SHARED_LIBS=yes \ -DWITH_EXAMPLES=OFF \ - -DWITH_STL=CXX14 \ - -DWITH_ABSEIL=ON \ + -DWITH_STL=CXX17 \ -DBUILD_TESTING=OFF \ -DOPENTELEMETRY_INSTALL=ON \ -DOPENTELEMETRY_ABI_VERSION_NO=2 \ @@ -534,6 +507,7 @@ We can now compile and install `google-cloud-cpp`: PREFIX="${HOME}/google-cloud-cpp-installed" cmake -S . -B cmake-out \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DBUILD_TESTING=OFF \ -DGOOGLE_CLOUD_CPP_WITH_MOCKS=OFF \ @@ -562,185 +536,14 @@ sudo apt-get --no-install-recommends install -y apt-transport-https apt-utils \ #### Abseil -We need a recent version of Abseil. Enabling `ABSL_PROPAGATE_CXX_STD` propagates -the version of C++ used to compile Abseil to anything that depends on Abseil. - -```bash -mkdir -p $HOME/Downloads/abseil-cpp && cd $HOME/Downloads/abseil-cpp -curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DABSL_BUILD_TESTING=OFF \ - -DABSL_PROPAGATE_CXX_STD=ON \ - -DBUILD_SHARED_LIBS=yes \ - -S . -B cmake-out && \ - cmake --build cmake-out -- -j ${NCPU:-4} && \ -sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ -sudo ldconfig -``` - -#### Protobuf - -We need to install a version of Protobuf that is recent enough to support the -Google Cloud Platform proto files: - -```bash -mkdir -p $HOME/Downloads/protobuf && cd $HOME/Downloads/protobuf -curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v29.4.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=yes \ - -Dprotobuf_BUILD_TESTS=OFF \ - -Dprotobuf_ABSL_PROVIDER=package \ - -S . -B cmake-out && \ - cmake --build cmake-out -- -j ${NCPU:-4} && \ -sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ -sudo ldconfig -``` - -#### gRPC - -We also need a version of gRPC that is recent enough to support the Google Cloud -Platform proto files. We install it using: - -```bash -mkdir -p $HOME/Downloads/grpc && cd $HOME/Downloads/grpc -curl -fsSL https://github.com/grpc/grpc/archive/v1.69.0.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=yes \ - -DgRPC_INSTALL=ON \ - -DgRPC_BUILD_TESTS=OFF \ - -DgRPC_ABSL_PROVIDER=package \ - -DgRPC_CARES_PROVIDER=package \ - -DgRPC_PROTOBUF_PROVIDER=package \ - -DgRPC_RE2_PROVIDER=package \ - -DgRPC_SSL_PROVIDER=package \ - -DgRPC_ZLIB_PROVIDER=package \ - -S . -B cmake-out && \ - cmake --build cmake-out -- -j ${NCPU:-4} && \ -sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ -sudo ldconfig -``` - -#### crc32c - -The project depends on the Crc32c library, we need to compile this from source: - -```bash -mkdir -p $HOME/Downloads/crc32c && cd $HOME/Downloads/crc32c -curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=yes \ - -DCRC32C_BUILD_TESTS=OFF \ - -DCRC32C_BUILD_BENCHMARKS=OFF \ - -DCRC32C_USE_GLOG=OFF \ - -S . -B cmake-out && \ - cmake --build cmake-out -- -j ${NCPU:-4} && \ -sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ -sudo ldconfig -``` - -#### nlohmann_json library - -The project depends on the nlohmann_json library. We use CMake to install it as -this installs the necessary CMake configuration files. Note that this is a -header-only library, and often installed manually. This leaves your environment -without support for CMake pkg-config. - -```bash -mkdir -p $HOME/Downloads/json && cd $HOME/Downloads/json -curl -fsSL https://github.com/nlohmann/json/archive/v3.11.3.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=yes \ - -DBUILD_TESTING=OFF \ - -DJSON_BuildTests=OFF \ - -S . -B cmake-out && \ -sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ -sudo ldconfig -``` - -#### opentelemetry-cpp - -The project has an **optional** dependency on the OpenTelemetry library. We -recommend installing this library because: - -- the dependency will become required in the google-cloud-cpp v3.x series. -- it is needed to produce distributed traces of the library. - -```bash -mkdir -p $HOME/Downloads/opentelemetry-cpp && cd $HOME/Downloads/opentelemetry-cpp -curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20.0.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=yes \ - -DWITH_EXAMPLES=OFF \ - -DWITH_STL=CXX14 \ - -DWITH_ABSEIL=ON \ - -DBUILD_TESTING=OFF \ - -DOPENTELEMETRY_INSTALL=ON \ - -DOPENTELEMETRY_ABI_VERSION_NO=2 \ - -S . -B cmake-out && \ -sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ -sudo ldconfig -``` - -#### Compile and install the main project - -We can now compile and install `google-cloud-cpp`: - -```bash -# Pick a location to install the artifacts, e.g., `/usr/local` or `/opt` -PREFIX="${HOME}/google-cloud-cpp-installed" -cmake -S . -B cmake-out \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ - -DBUILD_TESTING=OFF \ - -DGOOGLE_CLOUD_CPP_WITH_MOCKS=OFF \ - -DGOOGLE_CLOUD_CPP_ENABLE_EXAMPLES=OFF \ - -DGOOGLE_CLOUD_CPP_ENABLE=__ga_libraries__,opentelemetry -cmake --build cmake-out -- -j "$(nproc)" -cmake --build cmake-out --target install -``` - - - -
-Ubuntu (20.04 LTS - Focal Fossa) -
- -Install the minimal development tools, libcurl, OpenSSL and libc-ares: - -```bash -export DEBIAN_FRONTEND=noninteractive -sudo apt-get update && \ -sudo apt-get --no-install-recommends install -y apt-transport-https apt-utils \ - automake build-essential cmake ca-certificates curl git \ - gcc g++ libc-ares-dev libc-ares2 libcurl4-openssl-dev \ - libssl-dev m4 make pkg-config tar wget zlib1g-dev -``` - -#### Abseil - -We need a recent version of Abseil. Enabling `ABSL_PROPAGATE_CXX_STD` propagates -the version of C++ used to compile Abseil to anything that depends on Abseil. - ```bash mkdir -p $HOME/Downloads/abseil-cpp && cd $HOME/Downloads/abseil-cpp -curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \ +curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DABSL_BUILD_TESTING=OFF \ - -DABSL_PROPAGATE_CXX_STD=ON \ -DBUILD_SHARED_LIBS=yes \ -S . -B cmake-out && \ cmake --build cmake-out -- -j ${NCPU:-4} && \ @@ -755,10 +558,11 @@ Google Cloud Platform proto files: ```bash mkdir -p $HOME/Downloads/protobuf && cd $HOME/Downloads/protobuf -curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v29.4.tar.gz | \ +curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v33.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -Dprotobuf_BUILD_TESTS=OFF \ -Dprotobuf_ABSL_PROVIDER=package \ @@ -768,25 +572,6 @@ sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ sudo ldconfig ``` -#### RE2 - -The version of RE2 included with this distro hard-codes C++11 in its pkg-config -file. You can skip this build and use the system's package if you are not -planning to use pkg-config. - -```bash -mkdir -p $HOME/Downloads/re2 && cd $HOME/Downloads/re2 -curl -fsSL https://github.com/google/re2/archive/2025-07-22.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=ON \ - -DRE2_BUILD_TESTING=OFF \ - -S . -B cmake-out && \ - cmake --build cmake-out -- -j ${NCPU:-4} && \ -sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ -sudo ldconfig -``` - #### gRPC We also need a version of gRPC that is recent enough to support the Google Cloud @@ -794,10 +579,11 @@ Platform proto files. We install it using: ```bash mkdir -p $HOME/Downloads/grpc && cd $HOME/Downloads/grpc -curl -fsSL https://github.com/grpc/grpc/archive/v1.69.0.tar.gz | \ +curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DgRPC_INSTALL=ON \ -DgRPC_BUILD_TESTS=OFF \ @@ -813,26 +599,6 @@ sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ sudo ldconfig ``` -#### crc32c - -The project depends on the Crc32c library, we need to compile this from source: - -```bash -mkdir -p $HOME/Downloads/crc32c && cd $HOME/Downloads/crc32c -curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=yes \ - -DCRC32C_BUILD_TESTS=OFF \ - -DCRC32C_BUILD_BENCHMARKS=OFF \ - -DCRC32C_USE_GLOG=OFF \ - -S . -B cmake-out && \ - cmake --build cmake-out -- -j ${NCPU:-4} && \ -sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ -sudo ldconfig -``` - #### nlohmann_json library The project depends on the nlohmann_json library. We use CMake to install it as @@ -864,14 +630,14 @@ recommend installing this library because: ```bash mkdir -p $HOME/Downloads/opentelemetry-cpp && cd $HOME/Downloads/opentelemetry-cpp -curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20.0.tar.gz | \ +curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DWITH_EXAMPLES=OFF \ - -DWITH_STL=CXX14 \ - -DWITH_ABSEIL=ON \ + -DWITH_STL=CXX17 \ -DBUILD_TESTING=OFF \ -DOPENTELEMETRY_INSTALL=ON \ -DOPENTELEMETRY_ABI_VERSION_NO=2 \ @@ -889,6 +655,7 @@ We can now compile and install `google-cloud-cpp`: PREFIX="${HOME}/google-cloud-cpp-installed" cmake -S . -B cmake-out \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DBUILD_TESTING=OFF \ -DGOOGLE_CLOUD_CPP_WITH_MOCKS=OFF \ @@ -945,25 +712,20 @@ sudo ldconfig && cd /var/tmp && rm -fr build export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig ``` -#### crc32c +#### abseil -The project depends on the Crc32c library, we need to compile this from source: - -```bash -mkdir -p $HOME/Downloads/crc32c && cd $HOME/Downloads/crc32c -curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=yes \ - -DCRC32C_BUILD_TESTS=OFF \ - -DCRC32C_BUILD_BENCHMARKS=OFF \ - -DCRC32C_USE_GLOG=OFF \ - -S . -B cmake-out && \ - cmake --build cmake-out -- -j ${NCPU:-4} && \ +mkdir -p $HOME/Downloads/abseil-cpp && cd $HOME/Downloads/abseil-cpp curl -fsSL +https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ +tar -xzf - --strip-components=1 && \ +cmake \ +-DCMAKE_BUILD_TYPE=Release \ +-DCMAKE_CXX_STANDARD=17 \ +-DABSL_BUILD_TESTING=OFF \ +-DBUILD_SHARED_LIBS=yes \ +-S . -B cmake-out && \ +cmake --build cmake-out -- -j ${NCPU:-4} && \ sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ sudo ldconfig -``` #### opentelemetry-cpp @@ -975,14 +737,14 @@ recommend installing this library because: ```bash mkdir -p $HOME/Downloads/opentelemetry-cpp && cd $HOME/Downloads/opentelemetry-cpp -curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20.0.tar.gz | \ +curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DWITH_EXAMPLES=OFF \ - -DWITH_STL=CXX14 \ - -DWITH_ABSEIL=ON \ + -DWITH_STL=CXX17 \ -DBUILD_TESTING=OFF \ -DOPENTELEMETRY_INSTALL=ON \ -DOPENTELEMETRY_ABI_VERSION_NO=2 \ @@ -1000,6 +762,7 @@ We can now compile and install `google-cloud-cpp`: PREFIX="${HOME}/google-cloud-cpp-installed" cmake -S . -B cmake-out \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DBUILD_TESTING=OFF \ -DGOOGLE_CLOUD_CPP_WITH_MOCKS=OFF \ @@ -1020,25 +783,28 @@ Install the minimal development tools, libcurl, and OpenSSL: ```bash sudo apt-get update && \ sudo apt-get --no-install-recommends install -y apt-transport-https apt-utils \ - automake build-essential ca-certificates cmake curl git \ + automake build-essential ca-certificates curl git \ gcc g++ libc-ares-dev libc-ares2 libcurl4-openssl-dev \ libssl-dev m4 make ninja-build pkg-config tar wget zlib1g-dev ``` -#### Abseil +#### Install CMake v3.22 -Debian 11 ships with Abseil==20200923.3. Unfortunately, the current gRPC version -needs Abseil >= 20210324. Enabling `ABSL_PROPAGATE_CXX_STD` propagates the -version of C++ used to compile Abseil to anything that depends on Abseil. +mkdir -p $HOME/Downloads/cmake && cd $HOME/Downloads/cmake curl -fsSL +https://github.com/Kitware/cmake/archive/v3.22.3.tar.gz | \ +tar -xzf - --strip-components=1 && \ +./bootstrap && make -j ${NCPU:-4} && sudo make install + +#### Abseil ```bash mkdir -p $HOME/Downloads/abseil-cpp && cd $HOME/Downloads/abseil-cpp -curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \ +curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DABSL_BUILD_TESTING=OFF \ - -DABSL_PROPAGATE_CXX_STD=ON \ -DBUILD_SHARED_LIBS=yes \ -S . -B cmake-out && \ cmake --build cmake-out -- -j ${NCPU:-4} && \ @@ -1046,26 +812,6 @@ sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ sudo ldconfig ``` -#### crc32c - -The project depends on the Crc32c library, we need to compile this from source: - -```bash -mkdir -p $HOME/Downloads/crc32c && cd $HOME/Downloads/crc32c -curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=yes \ - -DCRC32C_BUILD_TESTS=OFF \ - -DCRC32C_BUILD_BENCHMARKS=OFF \ - -DCRC32C_USE_GLOG=OFF \ - -S . -B cmake-out && \ - cmake --build cmake-out -- -j ${NCPU:-4} && \ -sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ -sudo ldconfig -``` - #### nlohmann_json library Debian 11 also ships with nlohmann-json==3.9.1, which is recent enough for our @@ -1085,10 +831,11 @@ to build from source: ```bash mkdir -p $HOME/Downloads/protobuf && cd $HOME/Downloads/protobuf -curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v29.4.tar.gz | \ +curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v33.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -Dprotobuf_BUILD_TESTS=OFF \ -Dprotobuf_ABSL_PROVIDER=package \ @@ -1118,14 +865,13 @@ sudo ldconfig #### gRPC -Finally, we build gRPC from source: - ```bash mkdir -p $HOME/Downloads/grpc && cd $HOME/Downloads/grpc -curl -fsSL https://github.com/grpc/grpc/archive/v1.69.0.tar.gz | \ +curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DgRPC_INSTALL=ON \ -DgRPC_BUILD_TESTS=OFF \ @@ -1150,14 +896,14 @@ recommend installing this library because: ```bash mkdir -p $HOME/Downloads/opentelemetry-cpp && cd $HOME/Downloads/opentelemetry-cpp -curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20.0.tar.gz | \ +curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DWITH_EXAMPLES=OFF \ - -DWITH_STL=CXX14 \ - -DWITH_ABSEIL=ON \ + -DWITH_STL=CXX17 \ -DBUILD_TESTING=OFF \ -DOPENTELEMETRY_INSTALL=ON \ -DOPENTELEMETRY_ABI_VERSION_NO=2 \ @@ -1175,6 +921,7 @@ We can now compile and install `google-cloud-cpp`: PREFIX="${HOME}/google-cloud-cpp-installed" cmake -S . -B cmake-out \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DBUILD_TESTING=OFF \ -DGOOGLE_CLOUD_CPP_WITH_MOCKS=OFF \ @@ -1241,19 +988,14 @@ export PATH=/usr/local/bin:${PATH} #### Abseil -Rocky Linux 9 includes a package for Abseil, unfortunately, this package is -incomplete, as it lacks the CMake support files for it. We need to compile -Abseiil from source. Enabling `ABSL_PROPAGATE_CXX_STD` propagates the version of -C++ used to compile Abseil to anything that depends on Abseil. - ```bash mkdir -p $HOME/Downloads/abseil-cpp && cd $HOME/Downloads/abseil-cpp -curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250127.1.tar.gz | \ +curl -fsSL https://github.com/abseil/abseil-cpp/archive/20250814.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DABSL_BUILD_TESTING=OFF \ - -DABSL_PROPAGATE_CXX_STD=ON \ -DBUILD_SHARED_LIBS=yes \ -S . -B cmake-out && \ cmake --build cmake-out -- -j ${NCPU:-4} && \ @@ -1269,10 +1011,11 @@ install Protobuf (and any downstream packages) from source. ```bash mkdir -p $HOME/Downloads/protobuf && cd $HOME/Downloads/protobuf -curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v29.4.tar.gz | \ +curl -fsSL https://github.com/protocolbuffers/protobuf/archive/v33.1.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -Dprotobuf_BUILD_TESTS=OFF \ -Dprotobuf_ABSL_PROVIDER=package \ @@ -1310,7 +1053,7 @@ install it using: ```bash mkdir -p $HOME/Downloads/grpc && cd $HOME/Downloads/grpc -curl -fsSL https://github.com/grpc/grpc/archive/v1.69.0.tar.gz | \ +curl -fsSL https://github.com/grpc/grpc/archive/v1.76.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_CXX_STANDARD=17 \ @@ -1330,26 +1073,6 @@ sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ sudo ldconfig ``` -#### crc32c - -The project depends on the Crc32c library, we need to compile this from source: - -```bash -mkdir -p $HOME/Downloads/crc32c && cd $HOME/Downloads/crc32c -curl -fsSL https://github.com/google/crc32c/archive/1.1.2.tar.gz | \ - tar -xzf - --strip-components=1 && \ - cmake \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=yes \ - -DCRC32C_BUILD_TESTS=OFF \ - -DCRC32C_BUILD_BENCHMARKS=OFF \ - -DCRC32C_USE_GLOG=OFF \ - -S . -B cmake-out && \ - cmake --build cmake-out -- -j ${NCPU:-4} && \ -sudo cmake --build cmake-out --target install -- -j ${NCPU:-4} && \ -sudo ldconfig -``` - #### nlohmann_json library The project depends on the nlohmann_json library. We use CMake to install it as @@ -1381,14 +1104,14 @@ recommend installing this library because: ```bash mkdir -p $HOME/Downloads/opentelemetry-cpp && cd $HOME/Downloads/opentelemetry-cpp -curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.20.0.tar.gz | \ +curl -fsSL https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.24.0.tar.gz | \ tar -xzf - --strip-components=1 && \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DBUILD_SHARED_LIBS=yes \ -DWITH_EXAMPLES=OFF \ - -DWITH_STL=CXX14 \ - -DWITH_ABSEIL=ON \ + -DWITH_STL=CXX17 \ -DBUILD_TESTING=OFF \ -DOPENTELEMETRY_INSTALL=ON \ -DOPENTELEMETRY_ABI_VERSION_NO=2 \ @@ -1406,6 +1129,7 @@ We can now compile and install `google-cloud-cpp`: PREFIX="${HOME}/google-cloud-cpp-installed" cmake -S . -B cmake-out \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_INSTALL_PREFIX="${PREFIX}" \ -DBUILD_TESTING=OFF \ -DGOOGLE_CLOUD_CPP_WITH_MOCKS=OFF \ @@ -1480,8 +1204,6 @@ cmake --build cmake-out --target install [^3]: Only some libraries (Compute, SQL Admin, and Google Cloud Storage) require this dependency. -[^4]: Only the Google Cloud Storage client library requires this dependency. - [^5]: The Google Cloud Storage client does not require Protobuf. [^6]: On some platforms, some libraries may need a newer version of Protobuf to @@ -1489,11 +1211,10 @@ cmake --build cmake-out --target install the Protobuf-generated code. [^7]: See the [OpenTelemetry quickstart][otel-qs] for detailed instructions on how - to enable and build this optional dependency. + to build this dependency. [abseil-gh]: https://github.com/abseil/abseil-cpp [abseil/abseil-cpp#696]: https://github.com/abseil/abseil-cpp/issues/696 -[crc32c-gh]: https://github.com/google/crc32c [grpc-gh]: https://github.com/grpc/grpc [homebrew formula]: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/abseil.rb [howto-setup-dev-workstation]: /doc/contributor/howto-guide-setup-development-workstation.md diff --git a/doc/v3-migration-guide.md b/doc/v3-migration-guide.md new file mode 100644 index 0000000000000..66f41b055559f --- /dev/null +++ b/doc/v3-migration-guide.md @@ -0,0 +1,1235 @@ +# `google-cloud-cpp` v3 Migration Guide + +This document helps users of previous major versions (v1.x.y, v2.x.y) of the +`google-cloud-cpp` SDK migrate to a release on the v3.x.y series. + +While this repository does not strictly follow semver, it does use the major +version number to indicate large breaking changes. We strive to balance the +frequency in which we introduce breaking changes with improvements to the SDK. +Since our most recent major version increment, about 3 years ago, we have added +new API surfaces that supersede the previous deprecated types and functions. As +part of the v3 release series, we are decommissioning those deprecated API +surfaces. + +## C++17 + +Depending on your build system of choice, you should set the appropriate flag +for your compiler if it does not already default to `--std=c++17` or higher. + +## Dependencies + +### Previously Optional Dependencies that are now Required + +- `libcurl` +- `nlohmann_json` +- `opentelemetry-cpp` + +### Relocated Dependencies + +- `crc32c` google-cloud-cpp now uses the crc32c implementation in Abseil. + +## Build system changes + +### Bazel + +
+google-cloud-cpp module in Bazel Central Registry + +Bazel is moving away from WORKSPACE file support to using modules from the Bazel +Central Registry. Part of the v3.x.y release series includes supporting the new +[google-cloud-cpp](https://registry.bazel.build/modules/google_cloud_cpp) Bazel +module which can be added to your `MODULE.bazel` file as a dependency. + +google-cloud-cpp will support WORKSPACE files until Bazel 8 reaches end of +support (2027/12). However, some dependencies may stop supporting WORKSPACE +files before then which will limit what dependency versions can be used via +WORKSPACE. + +
+ +### CMake + +
+Removed backward compatible proto interface libraries. + +If your application links directly to one of these decommissioned proto +libraries, you should update your CMakeLists.txt with the preferred proto +library name. + +| Library | Decommissioned Proto Library | Preferred Proto Library | +| -------------------------- | ------------------------------------- | -------------------------------------- | +| google/cloud/dialogflow_es | cloud_dialogflow_v2_protos | google-cloud-cpp::dialogflow_es_protos | +| google/cloud/logging | logging_type_protos | google-cloud-cpp::logging_protos | +| google/cloud/logging | logging_type_type_protos | google-cloud-cpp::logging_protos | +| google/cloud/speech | cloud_speech_protos | google-cloud-cpp::speech_protos | +| google/cloud/texttospeech | cloud_texttospeech_protos | google-cloud-cpp::texttospeech_protos | +| google/cloud/trace | devtools_cloudtrace_v2_tracing_protos | google-cloud-cpp::trace_protos | +| google/cloud/trace | devtools_cloudtrace_v2_trace_protos | google-cloud-cpp::trace_protos | + +
+ +## Decommissioned API Surfaces + +### Common + +
+Removed v1 inline namespace alias. + + +Omit the `v1` namespace for unversioned libraries: + +- Bigtable +- PubSub +- Spanner +- Storage + +For example, code that used to look like this: + +**Before:** + +```cpp + +google::cloud::v1::pubsub::Publisher publisher; +``` + +Should be changed to this: + +**After:** + +```cpp +google::cloud::pubsub::Publisher publisher; +``` + +
+ +
+Removed gcpcxxV1 inline namespace alias. + + +Omit the `gcpcxxV1` namespace from versioned libraries. The version is now part +of the service namespace. + +For example, code that used to look like this: + +**Before:** + +```cpp + +google::cloud::bigquery_storage_v1::gcpcxxV1::BigQueryReadClient client; +``` + +Should be changed to this: + +**After:** + +```cpp +google::cloud::bigquery_storage_v1::BigQueryReadClient client; +``` + +
+ +
+Removed google::cloud::grpc_utils namespace and headers. + + +Types that were previously defined in both `google::cloud::grpc_utils` and +`google::cloud` now only exist in `google::cloud`. + +For example, code that used to look like this: + +**Before:** + +```cpp +#include "google/cloud/grpc_utils/completion_queue.h + +google::cloud::grpc_utils::CompletionQueue cq; +``` + +Should be changed to this: + +**After:** + +```cpp +#include "google/cloud/completion_queue.h + +google::cloud::CompletionQueue cq; +``` + +
+ +
+Removed unversioned forwarding headers. + + +We created some early libraries without version and/or service directories. For +backwards compatibility, forwarding headers were left at parent directory that +pointed at the first version of the library: + +- google/cloud/accessapproval +- google/cloud/accesscontextmanager +- google/cloud/apigateway +- google/cloud/apigeeconnect +- google/cloud/apikeys +- google/cloud/appengine +- google/cloud/artifactregistry +- google/cloud/asset +- google/cloud/assuredworkloads +- google/cloud/automl +- google/cloud/baremetalsolution +- google/cloud/batch +- google/cloud/beyondcorp +- google/cloud/bigquery +- google/cloud/billing +- google/cloud/binaryauthorization +- google/cloud/certificatemanager +- google/cloud/channel +- google/cloud/cloudbuild +- google/cloud/composer +- google/cloud/connectors +- google/cloud/contactcenterinsights +- google/cloud/container +- google/cloud/containeranalysis +- google/cloud/datacatalog +- google/cloud/datamigration +- google/cloud/dataplex +- google/cloud/dataproc +- google/cloud/datastream +- google/cloud/deploy +- google/cloud/dlp +- google/cloud/documentai +- google/cloud/edgecontainer +- google/cloud/eventarc +- google/cloud/filestore +- google/cloud/functions +- google/cloud/gkehub +- google/cloud/iam +- google/cloud/iap +- google/cloud/ids +- google/cloud/kms +- google/cloud/language +- google/cloud/logging +- google/cloud/managedidentities +- google/cloud/memcache +- google/cloud/monitoring +- google/cloud/networkconnectivity +- google/cloud/networkmanagement +- google/cloud/notebooks +- google/cloud/optimization +- google/cloud/orgpolicy +- google/cloud/osconfig +- google/cloud/oslogin +- google/cloud/policytroubleshooter +- google/cloud/privateca +- google/cloud/profiler +- google/cloud/recommender +- google/cloud/redis +- google/cloud/resourcemanager +- google/cloud/retail +- google/cloud/run +- google/cloud/scheduler +- google/cloud/secretmanager +- google/cloud/securitycenter +- google/cloud/servicecontrol +- google/cloud/servicedirectory +- google/cloud/servicemanagement +- google/cloud/serviceusage +- google/cloud/shell +- google/cloud/speech +- google/cloud/storagetransfer +- google/cloud/talent +- google/cloud/tasks +- google/cloud/texttospeech +- google/cloud/tpu +- google/cloud/trace +- google/cloud/translate +- google/cloud/video +- google/cloud/videointelligence +- google/cloud/vision +- google/cloud/vmmigration +- google/cloud/vpcaccess +- google/cloud/webrisk +- google/cloud/websecurityscanner +- google/cloud/workflows + +For example, code that used to look like this: + +**Before:** + +```cpp +#include "google/cloud/bigquery/bigquery_read_client.h" +``` + +Should be changed to this: + +**After:** + +```cpp +#include "google/cloud/bigquery/storage/v1/bigquery_read_client.h" +``` + +
+ +### Bigquery + +
+Removed bigquery/retry_traits.h file + +The library no longer exposes the `google/cloud/bigquery/retry_traits.h` header +file. It only contained internal symbols. + +
+ +### Bigtable + +
+Removed bigtable::RowReader constructors + + +We have removed the `bigtable::RowReader` constructors that accept `DataClient` +as an argument. + +Developers that read rows by directly constructing a `RowReader` object should +instead construct a `Table` object and call `Table::ReadRows(...)`. + +For example, code that used to look like this: + +**Before:** + +```cpp +#include "google/cloud/bigtable/data_client.h" +#include "google/cloud/bigtable/row_reader.h" +#include "google/cloud/bigtable/table.h" + +// ... + +auto client = google::cloud::bigtable::MakeDataClient( + "my-project", "my-instance", creds); +auto reader = google::cloud::bigtable::RowReader( + client, "my-table-id", google::cloud::bigtable::RowSet("r1", "r2"), + google::cloud::bigtable::RowReader::NO_ROWS_LIMIT, + google::cloud::bigtable::Filter::PassAllFilter(), + /*...retry and backoff policies...*/); + +for (auto& row : reader) { + if (!row) throw std::move(row).status(); + // ... +} +``` + +Should be changed to this: + +**After:** + +```cpp +#include "google/cloud/bigtable/table.h" + +// ... + +namespace cbt = google::cloud::bigtable; +cbt::Table table(cbt::MakeDataConnection(), + cbt::TableResource("my-project", "my-instance", "my-table-id")); + +for (auto& row : table.ReadRows( + cbt::RowSet("r1", "r2"), + cbt::Filter::PassAllFilter())) { + if (!row) throw std::move(row).status(); + // ... +} +``` + +
+ +
+ Removed bigtable::ClientOptions + +#### `bigtable::ClientOptions` + +We have removed the deprecated `bigtable::ClientOptions` class. Please use +`google::cloud::Options` instead. + +The following table shows the mapping from `bigtable::ClientOptions` methods to +their `google::cloud::Options` equivalents: + +| `bigtable::ClientOptions` method | `google::cloud::Options` equivalent | +| ----------------------------------- | ----------------------------------------------------------------------------------------------- | +| `(constructor)` | `google::cloud::Options{}` | +| `set_data_endpoint` | `google::cloud::EndpointOption` | +| `set_admin_endpoint` | `google::cloud::EndpointOption` | +| `set_connection_pool_name` | `google::cloud::GrpcChannelArgumentsOption` or`google::cloud::GrpcChannelArgumentsNativeOption` | +| `set_connection_pool_size` | `google::cloud::GrpcNumChannelsOption` | +| `SetCredentials` | `google::cloud::GrpcCredentialOption` | +| `set_channel_arguments` | `google::cloud::GrpcChannelArgumentsNativeOption` | +| `SetCompressionAlgorithm` | `google::cloud::GrpcChannelArgumentsNativeOption` | +| `SetGrpclbFallbackTimeout` | `google::cloud::GrpcChannelArgumentsNativeOption` | +| `SetUserAgentPrefix` | `google::cloud::UserAgentProductsOption` or`google::cloud::GrpcChannelArgumentsNativeOption` | +| `SetResourceQuota` | `google::cloud::GrpcChannelArgumentsNativeOption` | +| `SetMaxReceiveMessageSize` | `google::cloud::GrpcChannelArgumentsNativeOption` | +| `SetMaxSendMessageSize` | `google::cloud::GrpcChannelArgumentsNativeOption` | +| `SetLoadBalancingPolicyName` | `google::cloud::GrpcChannelArgumentsNativeOption` | +| `SetServiceConfigJSON` | `google::cloud::GrpcChannelArgumentsNativeOption` | +| `SetSslTargetNameOverride` | `google::cloud::GrpcChannelArgumentsNativeOption` | +| `enable_tracing`, `disable_tracing` | `google::cloud::LoggingComponentsOption` | +| `tracing_options` | `google::cloud::GrpcTracingOptionsOption` | +| `set_max_conn_refresh_period` | `bigtable::MaxConnectionRefreshOption` | +| `set_min_conn_refresh_period` | `bigtable::MinConnectionRefreshOption` | +| `set_background_thread_pool_size` | `google::cloud::GrpcBackgroundThreadPoolSizeOption` | +| `DisableBackgroundThreads` | `google::cloud::GrpcCompletionQueueOption` | + +Example usage of the replacements can be found below. + +**Before:** + +```cpp +auto client = bigtable::Client( + bigtable::ClientOptions().set_connection_pool_size(4)); +``` + +**After:** + +```cpp +auto client = bigtable::Client( + google::cloud::Options{}.set(4)); +``` + +#### `bigtable::CreateDefaultDataClient` + +We have removed the deprecated `bigtable::CreateDefaultDataClient` function. +Please use `bigtable::MakeDataClient` instead. + +**Before:** + +```cpp +auto client = bigtable::CreateDefaultDataClient( + "my-project", "my-instance", + bigtable::ClientOptions().set_connection_pool_size(4)); +``` + +**After:** + +```cpp +auto client = bigtable::MakeDataClient( + "my-project", "my-instance", + google::cloud::Options{}.set(4)); +``` + +#### `bigtable::CreateDefaultAdminClient` + +The deprecated `bigtable::CreateDefaultAdminClient` function has been removed. +Please use `bigtable::MakeAdminClient` instead. + +**Before:** + +```cpp +auto client = bigtable::CreateDefaultAdminClient( + "my-project", bigtable::ClientOptions().set_connection_pool_size(4)); +``` + +**After:** + +```cpp +auto client = bigtable::MakeAdminClient( + "my-project", + google::cloud::Options{}.set(4)); +``` + +#### `bigtable::CreateDefaultInstanceAdminClient` + +The deprecated `bigtable::CreateDefaultInstanceAdminClient` function has been +removed. Please use `bigtable::MakeInstanceAdminClient` instead. + +**Before:** + +```cpp +auto client = bigtable::CreateDefaultInstanceAdminClient( + "my-project", bigtable::ClientOptions().set_connection_pool_size(4)); +``` + +**After:** + +```cpp +auto client = bigtable::MakeInstanceAdminClient( + "my-project", + google::cloud::Options{}.set(4)); +``` + +
+ +
+ +Removed bigtable::AsyncRowReader<>::NO_ROWS_LIMIT + + +AsyncRowReader::NO_ROWS_LIMIT has been removed. Please use +`google::cloud::bigtable::RowReader::NO_ROWS_LIMIT` instead. + +```cpp +// Before +auto limit = google::cloud::bigtable::AsyncRowReader<>::NO_ROWS_LIMIT; + +// After +auto limit = google::cloud::bigtable::RowReader::NO_ROWS_LIMIT; +``` + +
+ +
+Removed Endpoint Options + + +We have removed the `bigtable::DataEndpointOption`, +`bigtable::AdminEndpointOption`, and `bigtable::InstanceAdminEndpointOption` +classes. Applications should use `google::cloud::EndpointOption` instead. + +**Before:** + +```cpp +auto options = google::cloud::Options{}.set("..."); +``` + +**After:** + +```cpp +auto options = google::cloud::Options{}.set("..."); +``` + +
+ +
+Removed bigtable::DataClient and related functions + +We have removed the `bigtable::DataClient` class and its associated factory +functions (e.g., `MakeDataClient`). Applications should now use +`bigtable::DataConnection` and `bigtable::MakeDataConnection()` instead. For +detailed migration steps and examples, please refer to the migration guide: + +[Migrating from DataClient to DataConnection](https://docs.cloud.google.com/cpp/docs/reference/bigtable/latest/migrating-from-dataclient) + +
+ +
+Removed bigtable::MetadataUpdatePolicy + +We have removed the `bigtable::MetadataUpdatePolicy` class. It was only used in +internal legacy files. + +
+ +
+Removed bigtable::AdminClient and bigtable::TableAdmin + +We have replaced the `bigtable::AdminClient` class and `bigtable::TableAdmin` +class with `bigtable_admin::BigtableTableAdminClient`. + +**Before:** + +```cpp + +std::shared_ptr admin_client = + bigtable::MakeAdminClient("project-id"); +auto table_admin = std::make_unique( + admin_client, "instance-id"); + +// Drop a selection of rows by key prefix. +auto result = table_admin.DropRowByPrefix("table-id", "row-key-prefix"); + +// Drop all rows. +result = table_admin.DropAllRows("table-id"); +``` + +**After:** + +```cpp +#include "google/cloud/bigtable/admin/bigtable_table_admin_client.h" + +auto table_admin = bigtable_admin::BigtableTableAdminClient( + bigtable_admin::MakeBigtableAdminConnection()); +auto table_name = bigtable::TableName("project-id", "instance-id", "table-id"); + +// Drop a selection of rows by key prefix. +google::bigtable::admin::v2::DropRowRangeRequest drop_rows_by_prefix; +drop_rows_by_prefix.set_name(table_name); +drop_rows_by_prefix.set_row_key_prefix("row-key-prefix"); +auto result = table_admin.DropRowRange(drop_rows_by_prefix); + +// Drop all rows. +google::bigtable::admin::v2::DropRowRangeRequest drop_all_rows; +drop_all_rows.set_name(table_name); +drop_all_rows.set_delete_all_data_from_table(true); +result = table_admin.DropRowRange(drop_all_rows); +``` + +
+ +
WaitForConsistency is now a free function + +With the removal of the `bigtable::TableAdmin` class, we have moved +`WaitForConsistency` to +`bigtable_admin::BigtableTableAdminClient::WaitForConsistency`. + +**Before:** + +```cpp + +std::shared_ptr admin_client = + bigtable::MakeAdminClient("project-id"); +auto table_admin = std::make_unique( + admin_client, "instance-id"); + +auto token = table_admin.GenerateConsistencyToken("table-id"); +if (!token) throw std::runtime_error(token.status().message()); +auto result = table_admin.WaitForConsistency("table-id", *token); +``` + +**After:** + +```cpp +#include "google/cloud/bigtable/admin/bigtable_table_admin_client.h" + +auto connection = bigtable_admin::MakeBigtableAdminConnection(); +auto table_admin = bigtable_admin::BigtableTableAdminClient(connection); +auto table_name = bigtable::TableName("project-id", "instance-id", "table-id"); + +auto token = table_admin.GenerateConsistencyToken(table_name); +if (!token) throw std::runtime_error(token.status().message()); + +google::bigtable::admin::v2::CheckConsistencyRequest wait_request; +wait_request.set_name(table_name); +wait_request.set_consistency_token(token->consistency_token()); +auto wait_response = table_admin.WaitForConsistency(wait_request).get(); +``` + +
+ +
+Removed bigtable::InstanceAdminClient and bigtable::InstanceAdmin + +We have replaced the `bigtable::InstanceAdminClient` class and +`bigtable::InstanceAdmin` class with +`bigtable_admin::BigtableInstanceAdminClient`. + +**Before:** + +```cpp +auto instance_admin_client = bigtable::MakeInstanceAdminClient("project-id"); +auto instance_admin = + std::make_unique(instance_admin_client); + +auto clusters = instance_admin->ListClusters(); +``` + +**After:** + +```cpp +#include "google/cloud/bigtable/admin/bigtable_instance_admin_client.h" + +auto instance_admin = + std::make_unique( + bigtable_admin::MakeBigtableInstanceAdminConnection()); + +auto clusters = instance_admin->ListClusters( + InstanceName("project-id", "instance-id")); +``` + +
+ +### IAM + +
+ +Removed iam/retry_traits.h file + +The library no longer exposes `google/cloud/iam/retry_traits.h` header file. It +only contained internal symbols. + +
+ +### Pubsub + +
+ Removed pubsub::PublisherOptions + +#### `pubsub::PublisherOptions` + +We have removed the deprecated `pubsub::PublisherOptions`. Please use +`google::cloud::Options` instead. + +The following table shows the mapping from `pubsub::PublisherOptions` methods to +their `google::cloud::Options` equivalents: + +| `pubsub::PublisherOptions` method | `google::cloud::Options` equivalent | +| --------------------------------- | -------------------------------------------------- | +| `(constructor)` | `google::cloud::Options{}` | +| `set_maximum_hold_time` | `google::cloud::pubsub::MaxHoldTimeOption` | +| `set_maximum_batch_message_count` | `google::cloud::pubsub::MaxBatchMessagesOption` | +| `set_maximum_batch_bytes` | `google::cloud::pubsub::MaxBatchBytesOption` | +| `enable_message_ordering` | `google::cloud::pubsub::MessageOrderingOption` | +| `disable_message_ordering` | `google::cloud::pubsub::MessageOrderingOption` | +| `set_maximum_pending_bytes` | `google::cloud::pubsub::MaxPendingBytesOption` | +| `set_maximum_pending_messages` | `google::cloud::pubsub::MaxPendingMessagesOption` | +| `set_full_publisher_ignored` | `google::cloud::pubsub::FullPublisherActionOption` | +| `set_full_publisher_rejects` | `google::cloud::pubsub::FullPublisherActionOption` | +| `set_full_publisher_blocks` | `google::cloud::pubsub::FullPublisherActionOption` | + +Example usage of the replacements can be found below. + +**Before:** + +```cpp +namespace gc = ::google::cloud; +namespace pubsub = ::google::cloud::pubsub; + +auto publisher_options = pubsub::PublisherOptions{} + .enable_message_ordering() + .set_full_publisher_ignored(); + +auto publisher = pubsub::Publisher(pubsub::MakePublisherConnection( + topic, publisher_options); +``` + +**After:** + +```cpp +namespace gc = ::google::cloud; +namespace pubsub = ::google::cloud::pubsub; + +auto options = gc::Options{} + .set(true) + .set( + pubsub::FullPublisherAction::kIgnored); + +auto publisher = pubsub::Publisher(pubsub::MakePublisherConnection( + topic, options)); +``` + +
+ +
+ Removed pubsub::SubscriberOptions + +#### `pubsub::SubscriberOptions` + +We have removed the deprecated `pubsub::SubscriberOptions`. Please use +`google::cloud::Options` instead. + +The following table shows the mapping from `pubsub::SubscriberOptions` methods +to their `google::cloud::Options` equivalents: + +| `pubsub::SubscriberOptions` method | `google::cloud::Options` equivalent | +| ---------------------------------- | ----------------------------------------------------- | +| `(constructor)` | `google::cloud::Options{}` | +| `set_max_deadline_time` | `google::cloud::pubsub::MaxDeadlineTimeOption` | +| `set_max_deadline_extension` | `google::cloud::pubsub::MaxDeadlineExtensionOption` | +| `set_max_outstanding_messages` | `google::cloud::pubsub::MaxOutstandingMessagesOption` | +| `set_max_outstanding_bytes` | `google::cloud::pubsub::MaxOutstandingBytesOption` | +| `set_max_concurrency` | `google::cloud::pubsub::MaxConcurrencyOption` | +| `set_shutdown_polling_period` | `google::cloud::pubsub::ShutdownPollingPeriodOption` | + +Example usage of the replacements can be found below. + +**Before:** + +```cpp +namespace gc = ::google::cloud; +namespace pubsub = ::google::cloud::pubsub; + +auto subscriber_options = pubsub::SubscriberOptions{} + .set_max_deadline_time(std::chrono::seconds(10)) + .set_max_outstanding_messages(42); + +auto subscriber = pubsub::Subscriber(pubsub::MakeSubscriberConnection( + subscription, subscriber_options); +``` + +**After:** + +```cpp +namespace gc = ::google::cloud; +namespace pubsub = ::google::cloud::pubsub; + +auto options = gc::Options{} + .set(std::chrono::seconds(10)) + .set(42); + +auto subscriber = pubsub::Subscriber(pubsub::MakeSubscriberConnection( + subscription, options)); +``` + +
+ +### Spanner + +
+All sessions are now Multiplexed Sessions + +The Spanner library now ignores all SessionPool related options, which are +marked as deprecated and will be removed in the future: + +- `EnableMultiplexedSessionOption` +- `SessionPoolMinSessionsOption` +- `SessionPoolMaxSessionsPerChannelOption` +- `SessionPoolMaxIdleSessionsOption` +- `SessionPoolActionOnExhaustionOption` +- `SessionPoolKeepAliveIntervalOption` + +
+ +
+Removed spanner::MakeTestRow + + +We have removed the `spanner::MakeTestRow` functions. Please use +`spanner_mocks::MakeRow` instead. + +**Before:** + +```cpp +#include "google/cloud/spanner/row.h" + +// ... + +auto row = google::cloud::spanner::MakeTestRow( + {{"c0", google::cloud::spanner::Value(42)}}); +auto row2 = google::cloud::spanner::MakeTestRow(1, "foo", true); +``` + +**After:** + +```cpp +#include "google/cloud/spanner/mocks/row.h" + +// ... + +auto row = google::cloud::spanner_mocks::MakeRow( + {{"c0", google::cloud::spanner::Value(42)}}); +auto row2 = google::cloud::spanner_mocks::MakeRow(1, "foo", true); +``` + +
+ +
+Removed spanner::ClientOptions class + +We have removed the `spanner::ClientOptions` class. Use `google::cloud::Options` +instead to set the following as needed: + +- `spanner::QueryOptimizerVersionOption` +- `spanner::QueryOptimizerStatisticsPackageOption` +- `spanner::RequestPriorityOption` +- `spanner::RequestTagOption` + +**Before:** + +```cpp +#include "google/cloud/spanner/client.h" + +// ... + +namespace spanner = ::google::cloud::spanner; +auto client_options = spanner::ClientOptions().set_query_options( + spanner::QueryOptions().set_optimizer_version("1")); + +auto client = spanner::Client(connection, client_options); +``` + +**After:** + +```cpp +#include "google/cloud/spanner/client.h" +#include "google/cloud/spanner/options.h" + +// ... + +namespace spanner = ::google::cloud::spanner; +auto options = google::cloud::Options{}.set("1"); + +auto client = spanner::Client(connection, options); +``` + +
+ +
+ +Removed admin/retry_traits.h file + +The library no longer exposes `google/cloud/spanner/admin/retry_traits.h` header +file. It only contained internal symbols. + +
+ +
+Removed Admin Clients from spanner namespace + +We have removed the `DatabaseAdminClient` and `InstanceAdminClient` classes (and +their associated connection classes and factory functions) from the +`google::cloud::spanner` namespace. Please use the replacements in +`google::cloud::spanner_admin`. + +**Before:** + +```cpp +#include "google/cloud/spanner/database_admin_client.h" +#include "google/cloud/spanner/instance_admin_client.h" + +namespace spanner = ::google::cloud::spanner; + +void Function(spanner::DatabaseAdminClient db_admin, + spanner::InstanceAdminClient in_admin) { + // ... +} +``` + +**After:** + +```cpp +#include "google/cloud/spanner/admin/database_admin_client.h" +#include "google/cloud/spanner/admin/instance_admin_client.h" + +namespace spanner_admin = ::google::cloud::spanner_admin; + +void Function(spanner_admin::DatabaseAdminClient db_admin, + spanner_admin::InstanceAdminClient in_admin) { + // ... +} +``` + +
+ +### Storage + +
+ClientOptions is removed + +The `ClientOptions` class is no longer available. You should now use +`google::cloud::Options` to configure the `Client`. + +**Before:** + +```cpp +#include "google/cloud/storage/client.h" + +void CreateClient() { + auto credentials = google::cloud::storage::oauth2::GoogleDefaultCredentials().value(); + auto options = google::cloud::storage::ClientOptions(credentials); + options.set_project_id("my-project"); + options.set_upload_buffer_size(1024 * 1024); + + google::cloud::storage::Client client(options); +} +``` + +**After:** + +```cpp +#include "google/cloud/storage/client.h" +#include "google/cloud/storage/options.h" // For option structs + +void CreateClient() { + auto credentials = google::cloud::MakeGoogleDefaultCredentials(); + auto client = google::cloud::storage::Client( + google::cloud::Options{} + .set(credentials) + .set("my-project") + .set(1024 * 1024)); +} +``` + +Use the following table to map `ClientOptions` setters to +`google::cloud::Options`: + +| `ClientOptions` Method | Replacement Option (`.set(value)`) | +| :------------------------------------ | :------------------------------------------------------ | +| `set_credentials(c)` | `google::cloud::storage::Oauth2CredentialsOption` | +| `set_project_id(p)` | `google::cloud::storage::ProjectIdOption` | +| `set_endpoint(url)` | `google::cloud::storage::RestEndpointOption` | +| `set_iam_endpoint(url)` | `google::cloud::storage::IamEndpointOption` | +| `SetDownloadBufferSize` | `google::cloud::storage::DownloadBufferSizeOption` | +| `SetUploadBufferSizee` | `google::cloud::storage::UploadBufferSizeOption` | +| `set_maximum_simple_upload_size(s)` | `google::cloud::storage::MaximumSimpleUploadSizeOption` | +| `set_enable_http_tracing(true)` | `google::cloud::LoggingComponentsOption` | +| `set_enable_raw_client_tracing(true)` | `google::cloud::LoggingComponentsOption` | + +**Example for Tracing:** + +```cpp +// Before +options.set_enable_http_tracing(true); + +// After +auto opts = Options{}.lookup().insert("raw-client"); +``` + +
+ +
+ChannelOptions is removed + +The `ChannelOptions` class is no longer available. You should now use +`google::cloud::Options` to configure the transport channel. + +**Before:** + +```cpp +#include "google/cloud/storage/grpc_plugin.h" + +void CreateClient() { + auto options = google::cloud::storage::ChannelOptions() + .set_ssl_root_path("path/to/roots.pem"); + + auto client = google::cloud::storage::MakeGrpcClient( + google::cloud::storage::ClientOptions(), options); +} +``` + +**After:** + +```cpp +#include "google/cloud/storage/grpc_plugin.h" +#include "google/cloud/grpc_options.h" +#include "google/cloud/common_options.h" + +void CreateClient() { + auto client = google::cloud::storage::MakeGrpcClient( + google::cloud::Options{}.set( + "path/to/roots.pem")); +} +``` + +
+ +
+ChannelOptions Mapping + +Use the following table to map `ChannelOptions` setters to +`google::cloud::Options`: + +| `ChannelOptions` Method | Replacement Option (`.set(value)`) | +| :---------------------- | :------------------------------------- | +| `set_ssl_root_path(p)` | `google::cloud::CARootsFilePathOption` | + +
+ +
+Client Constructor removal + +We have removed the `Client(ClientOptions)` constructor. The default constructor +`Client()` generally uses default options and default credentials. To customize, +use `Client(Options)`. + +**Before:** + +```cpp +#include "google/cloud/storage/client.h" + +void CreateClient() { + auto credentials = google::cloud::storage::oauth2::GoogleDefaultCredentials().value(); + auto options = google::cloud::storage::ClientOptions(credentials); + auto client = google::cloud::storage::Client(options); +} +``` + +**After:** + +```cpp +#include "google/cloud/storage/client.h" +#include "google/cloud/storage/options.h" + +void CreateClient() { + auto credentials = google::cloud::MakeGoogleDefaultCredentials(); + auto client = google::cloud::storage::Client( + google::cloud::Options{}.set(credentials)); +} +``` + +
+ +
+Removed Client(Connection, NoDecorations) constructor + +We have removed the `Client` constructor that accepted a `StorageConnection` and +the `NoDecorations` tag. This was intended only for test code. + +**Before:** + +```cpp +#include "google/cloud/storage/client.h" +#include "google/cloud/storage/testing/mock_storage_connection.h" + +void TestClient() { + auto mock = std::make_shared(); + // ... + auto client = google::cloud::storage::Client( + mock, google::cloud::storage::Client::NoDecorations{}); +} +``` + +**After:** + +```cpp +#include "google/cloud/storage/client.h" +#include "google/cloud/storage/testing/mock_storage_connection.h" + +void TestClient() { + auto mock = std::make_shared(); + // ... + auto client = google::cloud::storage::internal::ClientImplDetails::CreateWithoutDecorations(mock); +} +``` + +
+ +
+Removed Client::raw_client() + +We have removed the `Client::raw_client()` method. This was intended only for +internal use or testing. If you need access to the underlying connection for +testing purposes, use `google::cloud::storage::internal::ClientImplDetails`. + +**Before:** + +```cpp +#include "google/cloud/storage/client.h" + +void UseRawClient(google::cloud::storage::Client client) { + auto connection = client.raw_client(); +} +``` + +**After:** + +```cpp +#include "google/cloud/storage/client.h" + +void UseRawClient(google::cloud::storage::Client client) { + auto connection = + google::cloud::storage::internal::ClientImplDetails::GetConnection(client); +} +``` + +
+ +
+Removed storage_experimental::GrpcPluginOption and storage_experimental::DefaultGrpcClient + +The `storage_experimental::GrpcPluginOption` is no longer necessary. Instead of +calling `storage_experimental::DefaultGrpcClient` now call +`storage::MakeGrpcClient` + +**Before:** + +```cpp +#include "google/cloud/storage/grpc_plugin.h" +namespace gc = ::google::cloud; + +auto options = gc::Options{} + .set("media"); +auto client = gc::storage_experimental::DefaultGrpcClient(options); +``` + +**After:** + +```cpp +#include "google/cloud/storage/grpc_plugin.h" +namespace gc = ::google::cloud; + +auto client = gc::storage::MakeGrpcClient(); +``` + +
+ +
+Removed experimental-storage_grpc targets from CMake and Bazel + +CMake should now link to `google-cloud-cpp::storage_grpc`. + +Bazel should now depend on `@google_cloud_cpp//:storage_grpc` + +
+ +
+Removed deprecated Oauth2CredentialsOption + +You should use the `google::cloud::UnifiedCredentialsOption` and the unified +credentials API documented at +https://docs.cloud.google.com/cpp/docs/reference/common/latest/group__guac +instead. + +**Before:** + +```cpp +#include "google/cloud/options.h" +#include "google/cloud/storage/client.h" +#include "google/cloud/storage/oauth2/google_credentials.h" + +namespace gc = ::google::cloud; +namespace gcs = ::google::cloud::storage; +namespace oauth2 = ::google::cloud::storage::oauth2; + +auto options = gc::Options{} + .set(oauth2::CreateAnonymousCredentials()); +auto client = gcs::Client(options); +``` + +**After:** + +```cpp +#include "google/cloud/options.h" +#include "google/cloud/storage/client.h" +#include "google/cloud/credentials.h" + +namespace gc = ::google::cloud; +namespace gcs = ::google::cloud::storage; + +auto options = gc::Options{} + .set(gc::MakeInsecureCredentials()); +auto client = gcs::Client(options); +``` + +
+ +
+Removed deprecated CreateServiceAccountCredentialsFromFilePath + +You should use the `google::cloud::MakeServiceAccountCredentialsFromFile` +factory function and associated override options `google::cloud::ScopesOption` +and `google::cloud::subjectOption` instead. + +**Before:** + +```cpp +#include "google/cloud/options.h" +#include "google/cloud/storage/client.h" +#include "google/cloud/storage/oauth2/google_credentials.h" + +namespace gc = ::google::cloud; +namespace gcs = ::google::cloud::storage; +namespace oauth2 = ::google::cloud::storage::oauth2; + +std::set scopes = {"scope1", "scope2"}; +auto credentials = CreateServiceAccountCredentialsFromFilePath( + "path-to-file", scopes, "my-subject"); + +auto options = gc::Options{} + .set(credentials); +auto client = gcs::Client(options); +``` + +**After:** + +```cpp +#include "google/cloud/options.h" +#include "google/cloud/storage/client.h" +#include "google/cloud/credentials.h" + +namespace gc = ::google::cloud; +namespace gcs = ::google::cloud::storage; + +auto options = gc::Options{} + .set(std::vector({"scope1", "scope2"})) + .set("my-subject"); + +options = options.set( + gc::MakeServiceAccountCredentialsFromFile("path-to-file", options)); +auto client = gcs::Client(options); +``` + +
diff --git a/docfx/BUILD.bazel b/docfx/BUILD.bazel index 2960304936fca..25de3ea4d760a 100644 --- a/docfx/BUILD.bazel +++ b/docfx/BUILD.bazel @@ -32,8 +32,8 @@ cc_library( }), deps = [ "@com_github_jbeder_yaml_cpp//:yaml-cpp", - "@com_github_nlohmann_json//:json", "@com_github_zeux_pugixml//:pugixml", + "@nlohmann_json//:json", ], ) @@ -50,8 +50,8 @@ cc_library( deps = [ ":docfx", "@com_github_jbeder_yaml_cpp//:yaml-cpp", - "@com_github_nlohmann_json//:json", "@com_github_zeux_pugixml//:pugixml", + "@nlohmann_json//:json", ], ) @@ -63,7 +63,7 @@ cc_library( ":docfx", ":docfx_testing", "@com_github_zeux_pugixml//:pugixml", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) for test in unit_tests] diff --git a/examples/BUILD.bazel b/examples/BUILD.bazel index a131ef5390160..f0881c24cef5a 100644 --- a/examples/BUILD.bazel +++ b/examples/BUILD.bazel @@ -12,11 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -load( - "@com_google_googleapis_imports//:imports.bzl", - "cc_grpc_library", - "cc_proto_library", -) +load("@com_google_protobuf//bazel:cc_proto_library.bzl", "cc_proto_library") +load("@com_google_protobuf//bazel:proto_library.bzl", "proto_library") +load("@grpc//bazel:cc_grpc_library.bzl", "cc_grpc_library") package(default_visibility = ["//visibility:private"]) @@ -95,7 +93,7 @@ cc_test( "//:spanner", "//google/cloud/testing_util:google_cloud_cpp_testing_grpc_private", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_github_curl_curl//:curl", + "@curl", ], ) diff --git a/examples/gcs2cbt.cc b/examples/gcs2cbt.cc index 0b1d5ab889556..4405a2cb8d28b 100644 --- a/examples/gcs2cbt.cc +++ b/examples/gcs2cbt.cc @@ -60,8 +60,9 @@ int main(int argc, char* argv[]) try { // Create a connection to Cloud Bigtable and an object to manipulate the // specific table used in this demo. - cbt::Table table(cbt::MakeDataClient(options.project_id, options.instance_id), - options.table_id); + cbt::Table table(cbt::MakeDataConnection(), + cbt::TableResource(options.project_id, options.instance_id, + options.table_id)); cbt::MutationBatcher batcher(table); // How often do we print a progress marker ('.') in the reader thread. diff --git a/external/googleapis/CMakeLists.txt b/external/googleapis/CMakeLists.txt index 5ad3c812c22be..823f71c4db7c2 100644 --- a/external/googleapis/CMakeLists.txt +++ b/external/googleapis/CMakeLists.txt @@ -387,51 +387,6 @@ foreach (target ${external_googleapis_installed_libraries_list}) external_googleapis_install_pc("${target}") endforeach () -# Create and install the googleapis pkg-config file for backwards compatibility. -set(GOOGLE_CLOUD_CPP_PC_LIBS "") -google_cloud_cpp_set_pkgconfig_paths() -set(GOOGLE_CLOUD_CPP_PC_NAME "The Google APIS C++ Proto Library") -set(GOOGLE_CLOUD_CPP_PC_DESCRIPTION - "Provides C++ APIs to access Google Cloud Platforms.") -# This list is for backwards compatibility purposes only. DO NOT add new -# libraries to it. -string( - JOIN - " " - GOOGLE_CLOUD_CPP_PC_REQUIRES - "google_cloud_cpp_bigtable_protos" - "google_cloud_cpp_cloud_bigquery_protos" - "google_cloud_cpp_iam_protos" - "google_cloud_cpp_pubsub_protos" - "google_cloud_cpp_storage_protos" - "google_cloud_cpp_logging_protos" - "google_cloud_cpp_iam_v1_iam_policy_protos" - "google_cloud_cpp_iam_v1_options_protos" - "google_cloud_cpp_iam_v1_policy_protos" - "google_cloud_cpp_longrunning_operations_protos" - "google_cloud_cpp_api_auth_protos" - "google_cloud_cpp_api_annotations_protos" - "google_cloud_cpp_api_client_protos" - "google_cloud_cpp_api_field_behavior_protos" - "google_cloud_cpp_api_http_protos" - "google_cloud_cpp_rpc_status_protos" - "google_cloud_cpp_rpc_error_details_protos" - "google_cloud_cpp_type_expr_protos" - "grpc++" - "grpc" - "openssl" - "protobuf" - "zlib" - "libcares") -set(GOOGLE_CLOUD_CPP_PC_LIBS "") -google_cloud_cpp_set_pkgconfig_paths() -configure_file("${PROJECT_SOURCE_DIR}/cmake/templates/config.pc.in" - "googleapis.pc" @ONLY) -install( - FILES "${CMAKE_CURRENT_BINARY_DIR}/googleapis.pc" - DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig" - COMPONENT google_cloud_cpp_development) - # Create and install the CMake configuration files. include(CMakePackageConfigHelpers) diff --git a/external/googleapis/protodeps/accessapproval.deps b/external/googleapis/protodeps/accessapproval.deps index 2e749051efbb4..5c7b273c6aea4 100644 --- a/external/googleapis/protodeps/accessapproval.deps +++ b/external/googleapis/protodeps/accessapproval.deps @@ -1,6 +1,7 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/accesscontextmanager.deps b/external/googleapis/protodeps/accesscontextmanager.deps index ceffcfaf47cd4..99121353ed73a 100644 --- a/external/googleapis/protodeps/accesscontextmanager.deps +++ b/external/googleapis/protodeps/accesscontextmanager.deps @@ -1,14 +1,14 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/iam/v1:iam_policy_proto -@com_google_googleapis//google/iam/v1:options_proto -@com_google_googleapis//google/iam/v1:policy_proto -@com_google_googleapis//google/iam/v1:resource_policy_member_proto -@com_google_googleapis//google/identity/accesscontextmanager/type:type_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:expr_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/iam/v1:iam_policy_proto +@googleapis//google/iam/v1:options_proto +@googleapis//google/iam/v1:policy_proto +@googleapis//google/iam/v1:resource_policy_member_proto +@googleapis//google/identity/accesscontextmanager/type:type_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/advisorynotifications.deps b/external/googleapis/protodeps/advisorynotifications.deps index 2e749051efbb4..5c7b273c6aea4 100644 --- a/external/googleapis/protodeps/advisorynotifications.deps +++ b/external/googleapis/protodeps/advisorynotifications.deps @@ -1,6 +1,7 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/aiplatform.deps b/external/googleapis/protodeps/aiplatform.deps index 2f70814a31fbd..1bf735c9d55e1 100644 --- a/external/googleapis/protodeps/aiplatform.deps +++ b/external/googleapis/protodeps/aiplatform.deps @@ -1,13 +1,13 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:httpbody_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:date_proto -@com_google_googleapis//google/type:interval_proto -@com_google_googleapis//google/type:latlng_proto -@com_google_googleapis//google/type:money_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:httpbody_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:date_proto +@googleapis//google/type:interval_proto +@googleapis//google/type:latlng_proto +@googleapis//google/type:money_proto diff --git a/external/googleapis/protodeps/alloydb.deps b/external/googleapis/protodeps/alloydb.deps index 1d05da9c5f015..46b0ff5b368cf 100644 --- a/external/googleapis/protodeps/alloydb.deps +++ b/external/googleapis/protodeps/alloydb.deps @@ -1,12 +1,12 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:date_proto -@com_google_googleapis//google/type:dayofweek_proto -@com_google_googleapis//google/type:timeofday_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:date_proto +@googleapis//google/type:dayofweek_proto +@googleapis//google/type:timeofday_proto diff --git a/external/googleapis/protodeps/apigateway.deps b/external/googleapis/protodeps/apigateway.deps index 6ef8f9ccdeb73..3a69eb58546e0 100644 --- a/external/googleapis/protodeps/apigateway.deps +++ b/external/googleapis/protodeps/apigateway.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/apigeeconnect.deps b/external/googleapis/protodeps/apigeeconnect.deps index da299b760ccb4..5c7b273c6aea4 100644 --- a/external/googleapis/protodeps/apigeeconnect.deps +++ b/external/googleapis/protodeps/apigeeconnect.deps @@ -1,7 +1,7 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/apikeys.deps b/external/googleapis/protodeps/apikeys.deps index 6ef8f9ccdeb73..3a69eb58546e0 100644 --- a/external/googleapis/protodeps/apikeys.deps +++ b/external/googleapis/protodeps/apikeys.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/apiregistry.deps b/external/googleapis/protodeps/apiregistry.deps index 2e749051efbb4..5c7b273c6aea4 100644 --- a/external/googleapis/protodeps/apiregistry.deps +++ b/external/googleapis/protodeps/apiregistry.deps @@ -1,6 +1,7 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/appengine.deps b/external/googleapis/protodeps/appengine.deps index eb1ab5d9b5bf6..156e79c776692 100644 --- a/external/googleapis/protodeps/appengine.deps +++ b/external/googleapis/protodeps/appengine.deps @@ -1,9 +1,9 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/logging/type:type_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/logging/type:type_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/apphub.deps b/external/googleapis/protodeps/apphub.deps index 3797f67d24463..ce4eebcf1a3ab 100644 --- a/external/googleapis/protodeps/apphub.deps +++ b/external/googleapis/protodeps/apphub.deps @@ -1,9 +1,9 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/artifactregistry.deps b/external/googleapis/protodeps/artifactregistry.deps index 9098b1b674ef2..11efb6f9d66da 100644 --- a/external/googleapis/protodeps/artifactregistry.deps +++ b/external/googleapis/protodeps/artifactregistry.deps @@ -1,13 +1,13 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/iam/v1:iam_policy_proto -@com_google_googleapis//google/iam/v1:options_proto -@com_google_googleapis//google/iam/v1:policy_proto -@com_google_googleapis//google/iam/v1:resource_policy_member_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:expr_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/iam/v1:iam_policy_proto +@googleapis//google/iam/v1:options_proto +@googleapis//google/iam/v1:policy_proto +@googleapis//google/iam/v1:resource_policy_member_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/asset.deps b/external/googleapis/protodeps/asset.deps index 089feac7b43ee..f9a583f6c679e 100644 --- a/external/googleapis/protodeps/asset.deps +++ b/external/googleapis/protodeps/asset.deps @@ -1,22 +1,22 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/cloud/orgpolicy/v1:orgpolicy_proto -@com_google_googleapis//google/cloud/osconfig/v1:osconfig_proto -@com_google_googleapis//google/iam/v1:iam_policy_proto -@com_google_googleapis//google/iam/v1:options_proto -@com_google_googleapis//google/iam/v1:policy_proto -@com_google_googleapis//google/iam/v1:resource_policy_member_proto -@com_google_googleapis//google/identity/accesscontextmanager/type:type_proto -@com_google_googleapis//google/identity/accesscontextmanager/v1:accesscontextmanager_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:code_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:date_proto -@com_google_googleapis//google/type:datetime_proto -@com_google_googleapis//google/type:dayofweek_proto -@com_google_googleapis//google/type:expr_proto -@com_google_googleapis//google/type:timeofday_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/cloud/orgpolicy/v1:orgpolicy_proto +@googleapis//google/cloud/osconfig/v1:osconfig_proto +@googleapis//google/iam/v1:iam_policy_proto +@googleapis//google/iam/v1:options_proto +@googleapis//google/iam/v1:policy_proto +@googleapis//google/iam/v1:resource_policy_member_proto +@googleapis//google/identity/accesscontextmanager/type:type_proto +@googleapis//google/identity/accesscontextmanager/v1:accesscontextmanager_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:code_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:date_proto +@googleapis//google/type:datetime_proto +@googleapis//google/type:dayofweek_proto +@googleapis//google/type:expr_proto +@googleapis//google/type:timeofday_proto diff --git a/external/googleapis/protodeps/assuredworkloads.deps b/external/googleapis/protodeps/assuredworkloads.deps index 6ef8f9ccdeb73..3a69eb58546e0 100644 --- a/external/googleapis/protodeps/assuredworkloads.deps +++ b/external/googleapis/protodeps/assuredworkloads.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/auditmanager.deps b/external/googleapis/protodeps/auditmanager.deps index 6ef8f9ccdeb73..3a69eb58546e0 100644 --- a/external/googleapis/protodeps/auditmanager.deps +++ b/external/googleapis/protodeps/auditmanager.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/automl.deps b/external/googleapis/protodeps/automl.deps index 6ef8f9ccdeb73..3a69eb58546e0 100644 --- a/external/googleapis/protodeps/automl.deps +++ b/external/googleapis/protodeps/automl.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/backupdr.deps b/external/googleapis/protodeps/backupdr.deps index c95a0a1cd0211..7fd8412d7bb69 100644 --- a/external/googleapis/protodeps/backupdr.deps +++ b/external/googleapis/protodeps/backupdr.deps @@ -1,11 +1,11 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:dayofweek_proto -@com_google_googleapis//google/type:month_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:dayofweek_proto +@googleapis//google/type:month_proto diff --git a/external/googleapis/protodeps/baremetalsolution.deps b/external/googleapis/protodeps/baremetalsolution.deps index 6ef8f9ccdeb73..3a69eb58546e0 100644 --- a/external/googleapis/protodeps/baremetalsolution.deps +++ b/external/googleapis/protodeps/baremetalsolution.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/batch.deps b/external/googleapis/protodeps/batch.deps index 3797f67d24463..ce4eebcf1a3ab 100644 --- a/external/googleapis/protodeps/batch.deps +++ b/external/googleapis/protodeps/batch.deps @@ -1,9 +1,9 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/beyondcorp.deps b/external/googleapis/protodeps/beyondcorp.deps index 6ef8f9ccdeb73..3a69eb58546e0 100644 --- a/external/googleapis/protodeps/beyondcorp.deps +++ b/external/googleapis/protodeps/beyondcorp.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/bigquery.deps b/external/googleapis/protodeps/bigquery.deps index 9ce491ff2a77d..b22419f223126 100644 --- a/external/googleapis/protodeps/bigquery.deps +++ b/external/googleapis/protodeps/bigquery.deps @@ -1,17 +1,17 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:distribution_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:label_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:metric_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/iam/v1:iam_policy_proto -@com_google_googleapis//google/iam/v1:options_proto -@com_google_googleapis//google/iam/v1:policy_proto -@com_google_googleapis//google/iam/v1:resource_policy_member_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:error_details_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:expr_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:distribution_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:label_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:metric_proto +@googleapis//google/api:resource_proto +@googleapis//google/iam/v1:iam_policy_proto +@googleapis//google/iam/v1:options_proto +@googleapis//google/iam/v1:policy_proto +@googleapis//google/iam/v1:resource_policy_member_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:error_details_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/bigquerycontrol.deps b/external/googleapis/protodeps/bigquerycontrol.deps index bd46b0cedb062..34365612fc71f 100644 --- a/external/googleapis/protodeps/bigquerycontrol.deps +++ b/external/googleapis/protodeps/bigquerycontrol.deps @@ -1,7 +1,7 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/type:expr_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/bigtable.deps b/external/googleapis/protodeps/bigtable.deps index bb9e95d7e0e3b..15001fff1a50c 100644 --- a/external/googleapis/protodeps/bigtable.deps +++ b/external/googleapis/protodeps/bigtable.deps @@ -1,15 +1,15 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/api:routing_proto -@com_google_googleapis//google/iam/v1:iam_policy_proto -@com_google_googleapis//google/iam/v1:options_proto -@com_google_googleapis//google/iam/v1:policy_proto -@com_google_googleapis//google/iam/v1:resource_policy_member_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:date_proto -@com_google_googleapis//google/type:expr_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/api:routing_proto +@googleapis//google/iam/v1:iam_policy_proto +@googleapis//google/iam/v1:options_proto +@googleapis//google/iam/v1:policy_proto +@googleapis//google/iam/v1:resource_policy_member_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:date_proto +@googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/billing.deps b/external/googleapis/protodeps/billing.deps index 0c58b63ac7071..1668a7cb77606 100644 --- a/external/googleapis/protodeps/billing.deps +++ b/external/googleapis/protodeps/billing.deps @@ -1,13 +1,14 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/iam/v1:iam_policy_proto -@com_google_googleapis//google/iam/v1:options_proto -@com_google_googleapis//google/iam/v1:policy_proto -@com_google_googleapis//google/iam/v1:resource_policy_member_proto -@com_google_googleapis//google/type:date_proto -@com_google_googleapis//google/type:expr_proto -@com_google_googleapis//google/type:money_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/iam/v1:iam_policy_proto +@googleapis//google/iam/v1:options_proto +@googleapis//google/iam/v1:policy_proto +@googleapis//google/iam/v1:resource_policy_member_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:date_proto +@googleapis//google/type:expr_proto +@googleapis//google/type:money_proto diff --git a/external/googleapis/protodeps/binaryauthorization.deps b/external/googleapis/protodeps/binaryauthorization.deps index d2c38d51f9ffc..5524f95cdace3 100644 --- a/external/googleapis/protodeps/binaryauthorization.deps +++ b/external/googleapis/protodeps/binaryauthorization.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//grafeas/v1:grafeas_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/rpc:status_proto +@googleapis//grafeas/v1:grafeas_proto diff --git a/external/googleapis/protodeps/certificatemanager.deps b/external/googleapis/protodeps/certificatemanager.deps index 6ef8f9ccdeb73..3a69eb58546e0 100644 --- a/external/googleapis/protodeps/certificatemanager.deps +++ b/external/googleapis/protodeps/certificatemanager.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/channel.deps b/external/googleapis/protodeps/channel.deps index 983107aeb76d1..ccb330e36cc92 100644 --- a/external/googleapis/protodeps/channel.deps +++ b/external/googleapis/protodeps/channel.deps @@ -1,13 +1,13 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:date_proto -@com_google_googleapis//google/type:datetime_proto -@com_google_googleapis//google/type:decimal_proto -@com_google_googleapis//google/type:money_proto -@com_google_googleapis//google/type:postal_address_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:date_proto +@googleapis//google/type:datetime_proto +@googleapis//google/type:decimal_proto +@googleapis//google/type:money_proto +@googleapis//google/type:postal_address_proto diff --git a/external/googleapis/protodeps/chronicle.deps b/external/googleapis/protodeps/chronicle.deps index 2e6ff1caf713a..4bbe4120b3305 100644 --- a/external/googleapis/protodeps/chronicle.deps +++ b/external/googleapis/protodeps/chronicle.deps @@ -1,9 +1,9 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:interval_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:interval_proto diff --git a/external/googleapis/protodeps/cloudbuild.deps b/external/googleapis/protodeps/cloudbuild.deps index 628d37343b4ed..8852d31b2ad18 100644 --- a/external/googleapis/protodeps/cloudbuild.deps +++ b/external/googleapis/protodeps/cloudbuild.deps @@ -1,10 +1,10 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:httpbody_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/api:routing_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:httpbody_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/api:routing_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/cloudcontrolspartner.deps b/external/googleapis/protodeps/cloudcontrolspartner.deps index 22f7f75a595a1..f631e058a96b9 100644 --- a/external/googleapis/protodeps/cloudcontrolspartner.deps +++ b/external/googleapis/protodeps/cloudcontrolspartner.deps @@ -1,7 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/type:interval_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:interval_proto diff --git a/external/googleapis/protodeps/cloudquotas.deps b/external/googleapis/protodeps/cloudquotas.deps index 2e749051efbb4..5c7b273c6aea4 100644 --- a/external/googleapis/protodeps/cloudquotas.deps +++ b/external/googleapis/protodeps/cloudquotas.deps @@ -1,6 +1,7 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/cloudsecuritycompliance.deps b/external/googleapis/protodeps/cloudsecuritycompliance.deps index 2e6ff1caf713a..4bbe4120b3305 100644 --- a/external/googleapis/protodeps/cloudsecuritycompliance.deps +++ b/external/googleapis/protodeps/cloudsecuritycompliance.deps @@ -1,9 +1,9 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:interval_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:interval_proto diff --git a/external/googleapis/protodeps/commerce.deps b/external/googleapis/protodeps/commerce.deps index 6ef8f9ccdeb73..3a69eb58546e0 100644 --- a/external/googleapis/protodeps/commerce.deps +++ b/external/googleapis/protodeps/commerce.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/common.deps b/external/googleapis/protodeps/common.deps index 84fe573712543..bb6f4b96c838a 100644 --- a/external/googleapis/protodeps/common.deps +++ b/external/googleapis/protodeps/common.deps @@ -1 +1,2 @@ -@com_google_googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/composer.deps b/external/googleapis/protodeps/composer.deps index 56ffb0ed0575f..d648e9f3b53c5 100644 --- a/external/googleapis/protodeps/composer.deps +++ b/external/googleapis/protodeps/composer.deps @@ -1,9 +1,9 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:date_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:date_proto diff --git a/external/googleapis/protodeps/compute.deps b/external/googleapis/protodeps/compute.deps index 85cafd76d2c8c..c3119d7f51695 100644 --- a/external/googleapis/protodeps/compute.deps +++ b/external/googleapis/protodeps/compute.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/api:routing_proto -@com_google_googleapis//google/cloud:extended_operations_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/api:routing_proto +@googleapis//google/cloud:extended_operations_proto diff --git a/external/googleapis/protodeps/confidentialcomputing.deps b/external/googleapis/protodeps/confidentialcomputing.deps index da299b760ccb4..5c7b273c6aea4 100644 --- a/external/googleapis/protodeps/confidentialcomputing.deps +++ b/external/googleapis/protodeps/confidentialcomputing.deps @@ -1,7 +1,7 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/config.deps b/external/googleapis/protodeps/config.deps index 3797f67d24463..ce4eebcf1a3ab 100644 --- a/external/googleapis/protodeps/config.deps +++ b/external/googleapis/protodeps/config.deps @@ -1,9 +1,9 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/configdelivery.deps b/external/googleapis/protodeps/configdelivery.deps index 3797f67d24463..ce4eebcf1a3ab 100644 --- a/external/googleapis/protodeps/configdelivery.deps +++ b/external/googleapis/protodeps/configdelivery.deps @@ -1,9 +1,9 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/connectors.deps b/external/googleapis/protodeps/connectors.deps index 6ef8f9ccdeb73..3a69eb58546e0 100644 --- a/external/googleapis/protodeps/connectors.deps +++ b/external/googleapis/protodeps/connectors.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/contactcenterinsights.deps b/external/googleapis/protodeps/contactcenterinsights.deps index 2e6ff1caf713a..4bbe4120b3305 100644 --- a/external/googleapis/protodeps/contactcenterinsights.deps +++ b/external/googleapis/protodeps/contactcenterinsights.deps @@ -1,9 +1,9 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:interval_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:interval_proto diff --git a/external/googleapis/protodeps/container.deps b/external/googleapis/protodeps/container.deps index b4198c064ae3e..bb786c561e94a 100644 --- a/external/googleapis/protodeps/container.deps +++ b/external/googleapis/protodeps/container.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/rpc:code_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/rpc:code_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/containeranalysis.deps b/external/googleapis/protodeps/containeranalysis.deps index 167e562981c0a..a0baf2c377879 100644 --- a/external/googleapis/protodeps/containeranalysis.deps +++ b/external/googleapis/protodeps/containeranalysis.deps @@ -1,13 +1,13 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/iam/v1:iam_policy_proto -@com_google_googleapis//google/iam/v1:options_proto -@com_google_googleapis//google/iam/v1:policy_proto -@com_google_googleapis//google/iam/v1:resource_policy_member_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:expr_proto -@com_google_googleapis//grafeas/v1:grafeas_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/iam/v1:iam_policy_proto +@googleapis//google/iam/v1:options_proto +@googleapis//google/iam/v1:policy_proto +@googleapis//google/iam/v1:resource_policy_member_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:expr_proto +@googleapis//grafeas/v1:grafeas_proto diff --git a/external/googleapis/protodeps/contentwarehouse.deps b/external/googleapis/protodeps/contentwarehouse.deps index f27f32a86d7f7..6d161fdc7e6f9 100644 --- a/external/googleapis/protodeps/contentwarehouse.deps +++ b/external/googleapis/protodeps/contentwarehouse.deps @@ -1,17 +1,17 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/cloud/documentai/v1:documentai_proto -@com_google_googleapis//google/iam/v1:policy_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:color_proto -@com_google_googleapis//google/type:date_proto -@com_google_googleapis//google/type:datetime_proto -@com_google_googleapis//google/type:expr_proto -@com_google_googleapis//google/type:interval_proto -@com_google_googleapis//google/type:money_proto -@com_google_googleapis//google/type:postal_address_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/cloud/documentai/v1:documentai_proto +@googleapis//google/iam/v1:policy_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:color_proto +@googleapis//google/type:date_proto +@googleapis//google/type:datetime_proto +@googleapis//google/type:expr_proto +@googleapis//google/type:interval_proto +@googleapis//google/type:money_proto +@googleapis//google/type:postal_address_proto diff --git a/external/googleapis/protodeps/datacatalog.deps b/external/googleapis/protodeps/datacatalog.deps index 9098b1b674ef2..11efb6f9d66da 100644 --- a/external/googleapis/protodeps/datacatalog.deps +++ b/external/googleapis/protodeps/datacatalog.deps @@ -1,13 +1,13 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/iam/v1:iam_policy_proto -@com_google_googleapis//google/iam/v1:options_proto -@com_google_googleapis//google/iam/v1:policy_proto -@com_google_googleapis//google/iam/v1:resource_policy_member_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:expr_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/iam/v1:iam_policy_proto +@googleapis//google/iam/v1:options_proto +@googleapis//google/iam/v1:policy_proto +@googleapis//google/iam/v1:resource_policy_member_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/dataform.deps b/external/googleapis/protodeps/dataform.deps index db570cc8d9199..f631e058a96b9 100644 --- a/external/googleapis/protodeps/dataform.deps +++ b/external/googleapis/protodeps/dataform.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:interval_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:interval_proto diff --git a/external/googleapis/protodeps/datafusion.deps b/external/googleapis/protodeps/datafusion.deps index 6ef8f9ccdeb73..3a69eb58546e0 100644 --- a/external/googleapis/protodeps/datafusion.deps +++ b/external/googleapis/protodeps/datafusion.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/datamigration.deps b/external/googleapis/protodeps/datamigration.deps index 9098b1b674ef2..11efb6f9d66da 100644 --- a/external/googleapis/protodeps/datamigration.deps +++ b/external/googleapis/protodeps/datamigration.deps @@ -1,13 +1,13 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/iam/v1:iam_policy_proto -@com_google_googleapis//google/iam/v1:options_proto -@com_google_googleapis//google/iam/v1:policy_proto -@com_google_googleapis//google/iam/v1:resource_policy_member_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:expr_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/iam/v1:iam_policy_proto +@googleapis//google/iam/v1:options_proto +@googleapis//google/iam/v1:policy_proto +@googleapis//google/iam/v1:resource_policy_member_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/dataplex.deps b/external/googleapis/protodeps/dataplex.deps index b6736e4dc8dbb..6fe9d79d63f91 100644 --- a/external/googleapis/protodeps/dataplex.deps +++ b/external/googleapis/protodeps/dataplex.deps @@ -1,14 +1,14 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/iam/v1:iam_policy_proto -@com_google_googleapis//google/iam/v1:options_proto -@com_google_googleapis//google/iam/v1:policy_proto -@com_google_googleapis//google/iam/v1:resource_policy_member_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:expr_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/iam/v1:iam_policy_proto +@googleapis//google/iam/v1:options_proto +@googleapis//google/iam/v1:policy_proto +@googleapis//google/iam/v1:resource_policy_member_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/dataproc.deps b/external/googleapis/protodeps/dataproc.deps index 2e6ff1caf713a..4bbe4120b3305 100644 --- a/external/googleapis/protodeps/dataproc.deps +++ b/external/googleapis/protodeps/dataproc.deps @@ -1,9 +1,9 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:interval_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:interval_proto diff --git a/external/googleapis/protodeps/datastore.deps b/external/googleapis/protodeps/datastore.deps index b48ba0d6dc240..0b84223bcdb80 100644 --- a/external/googleapis/protodeps/datastore.deps +++ b/external/googleapis/protodeps/datastore.deps @@ -1,9 +1,9 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:routing_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:latlng_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:routing_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:latlng_proto diff --git a/external/googleapis/protodeps/datastream.deps b/external/googleapis/protodeps/datastream.deps index 6ef8f9ccdeb73..3a69eb58546e0 100644 --- a/external/googleapis/protodeps/datastream.deps +++ b/external/googleapis/protodeps/datastream.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/deploy.deps b/external/googleapis/protodeps/deploy.deps index 690385b1c9fa0..817953a439a11 100644 --- a/external/googleapis/protodeps/deploy.deps +++ b/external/googleapis/protodeps/deploy.deps @@ -1,11 +1,11 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:date_proto -@com_google_googleapis//google/type:dayofweek_proto -@com_google_googleapis//google/type:timeofday_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:date_proto +@googleapis//google/type:dayofweek_proto +@googleapis//google/type:timeofday_proto diff --git a/external/googleapis/protodeps/developerconnect.deps b/external/googleapis/protodeps/developerconnect.deps index 3797f67d24463..ce4eebcf1a3ab 100644 --- a/external/googleapis/protodeps/developerconnect.deps +++ b/external/googleapis/protodeps/developerconnect.deps @@ -1,9 +1,9 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/devicestreaming.deps b/external/googleapis/protodeps/devicestreaming.deps index 2e749051efbb4..5c7b273c6aea4 100644 --- a/external/googleapis/protodeps/devicestreaming.deps +++ b/external/googleapis/protodeps/devicestreaming.deps @@ -1,6 +1,7 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/dialogflow_cx.deps b/external/googleapis/protodeps/dialogflow_cx.deps index 457ff4c5f60b2..ba45406b2df47 100644 --- a/external/googleapis/protodeps/dialogflow_cx.deps +++ b/external/googleapis/protodeps/dialogflow_cx.deps @@ -1,9 +1,9 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:latlng_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:latlng_proto diff --git a/external/googleapis/protodeps/dialogflow_es.deps b/external/googleapis/protodeps/dialogflow_es.deps index 457ff4c5f60b2..ba45406b2df47 100644 --- a/external/googleapis/protodeps/dialogflow_es.deps +++ b/external/googleapis/protodeps/dialogflow_es.deps @@ -1,9 +1,9 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:latlng_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:latlng_proto diff --git a/external/googleapis/protodeps/discoveryengine.deps b/external/googleapis/protodeps/discoveryengine.deps index d2fe5d9ee5836..ba7d47fadd611 100644 --- a/external/googleapis/protodeps/discoveryengine.deps +++ b/external/googleapis/protodeps/discoveryengine.deps @@ -1,10 +1,10 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:httpbody_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:date_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:httpbody_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:date_proto diff --git a/external/googleapis/protodeps/dlp.deps b/external/googleapis/protodeps/dlp.deps index dec5bc18836cc..db48401637fb8 100644 --- a/external/googleapis/protodeps/dlp.deps +++ b/external/googleapis/protodeps/dlp.deps @@ -1,10 +1,10 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:date_proto -@com_google_googleapis//google/type:dayofweek_proto -@com_google_googleapis//google/type:timeofday_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:date_proto +@googleapis//google/type:dayofweek_proto +@googleapis//google/type:timeofday_proto diff --git a/external/googleapis/protodeps/documentai.deps b/external/googleapis/protodeps/documentai.deps index b5eb632423f8e..aec9bc7912381 100644 --- a/external/googleapis/protodeps/documentai.deps +++ b/external/googleapis/protodeps/documentai.deps @@ -1,13 +1,13 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:color_proto -@com_google_googleapis//google/type:date_proto -@com_google_googleapis//google/type:datetime_proto -@com_google_googleapis//google/type:money_proto -@com_google_googleapis//google/type:postal_address_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:color_proto +@googleapis//google/type:date_proto +@googleapis//google/type:datetime_proto +@googleapis//google/type:money_proto +@googleapis//google/type:postal_address_proto diff --git a/external/googleapis/protodeps/domains.deps b/external/googleapis/protodeps/domains.deps index 1a611eac8ecb4..81447f0c47af9 100644 --- a/external/googleapis/protodeps/domains.deps +++ b/external/googleapis/protodeps/domains.deps @@ -1,10 +1,10 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:money_proto -@com_google_googleapis//google/type:postal_address_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:money_proto +@googleapis//google/type:postal_address_proto diff --git a/external/googleapis/protodeps/edgecontainer.deps b/external/googleapis/protodeps/edgecontainer.deps index 6ef8f9ccdeb73..3a69eb58546e0 100644 --- a/external/googleapis/protodeps/edgecontainer.deps +++ b/external/googleapis/protodeps/edgecontainer.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/edgenetwork.deps b/external/googleapis/protodeps/edgenetwork.deps index 6ef8f9ccdeb73..3a69eb58546e0 100644 --- a/external/googleapis/protodeps/edgenetwork.deps +++ b/external/googleapis/protodeps/edgenetwork.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/essentialcontacts.deps b/external/googleapis/protodeps/essentialcontacts.deps index 2e749051efbb4..5c7b273c6aea4 100644 --- a/external/googleapis/protodeps/essentialcontacts.deps +++ b/external/googleapis/protodeps/essentialcontacts.deps @@ -1,6 +1,7 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/eventarc.deps b/external/googleapis/protodeps/eventarc.deps index 0070a78d1da1d..c38fafb3763df 100644 --- a/external/googleapis/protodeps/eventarc.deps +++ b/external/googleapis/protodeps/eventarc.deps @@ -1,10 +1,10 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:code_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:code_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/filestore.deps b/external/googleapis/protodeps/filestore.deps index 566a4dcfa2cbf..fef9d1147e5f4 100644 --- a/external/googleapis/protodeps/filestore.deps +++ b/external/googleapis/protodeps/filestore.deps @@ -1,9 +1,9 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/cloud/common:common_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/cloud/common:common_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/financialservices.deps b/external/googleapis/protodeps/financialservices.deps index 98062774348f3..30285358b93a4 100644 --- a/external/googleapis/protodeps/financialservices.deps +++ b/external/googleapis/protodeps/financialservices.deps @@ -1,10 +1,10 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:datetime_proto -@com_google_googleapis//google/type:interval_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:datetime_proto +@googleapis//google/type:interval_proto diff --git a/external/googleapis/protodeps/functions.deps b/external/googleapis/protodeps/functions.deps index 5c762bd51f554..c0924d5a73d28 100644 --- a/external/googleapis/protodeps/functions.deps +++ b/external/googleapis/protodeps/functions.deps @@ -1,14 +1,14 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/iam/v1:iam_policy_proto -@com_google_googleapis//google/iam/v1:options_proto -@com_google_googleapis//google/iam/v1:policy_proto -@com_google_googleapis//google/iam/v1:resource_policy_member_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:date_proto -@com_google_googleapis//google/type:expr_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/iam/v1:iam_policy_proto +@googleapis//google/iam/v1:options_proto +@googleapis//google/iam/v1:policy_proto +@googleapis//google/iam/v1:resource_policy_member_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:date_proto +@googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/gkebackup.deps b/external/googleapis/protodeps/gkebackup.deps index 1d05da9c5f015..46b0ff5b368cf 100644 --- a/external/googleapis/protodeps/gkebackup.deps +++ b/external/googleapis/protodeps/gkebackup.deps @@ -1,12 +1,12 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:date_proto -@com_google_googleapis//google/type:dayofweek_proto -@com_google_googleapis//google/type:timeofday_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:date_proto +@googleapis//google/type:dayofweek_proto +@googleapis//google/type:timeofday_proto diff --git a/external/googleapis/protodeps/gkeconnect.deps b/external/googleapis/protodeps/gkeconnect.deps index 5d260a00b6f04..191cdfdc78801 100644 --- a/external/googleapis/protodeps/gkeconnect.deps +++ b/external/googleapis/protodeps/gkeconnect.deps @@ -1,5 +1,6 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/gkehub.deps b/external/googleapis/protodeps/gkehub.deps index 6ef8f9ccdeb73..3a69eb58546e0 100644 --- a/external/googleapis/protodeps/gkehub.deps +++ b/external/googleapis/protodeps/gkehub.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/gkemulticloud.deps b/external/googleapis/protodeps/gkemulticloud.deps index 56ffb0ed0575f..d648e9f3b53c5 100644 --- a/external/googleapis/protodeps/gkemulticloud.deps +++ b/external/googleapis/protodeps/gkemulticloud.deps @@ -1,9 +1,9 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:date_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:date_proto diff --git a/external/googleapis/protodeps/gkerecommender.deps b/external/googleapis/protodeps/gkerecommender.deps index 5d260a00b6f04..191cdfdc78801 100644 --- a/external/googleapis/protodeps/gkerecommender.deps +++ b/external/googleapis/protodeps/gkerecommender.deps @@ -1,5 +1,6 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/grafeas.deps b/external/googleapis/protodeps/grafeas.deps index da299b760ccb4..5c7b273c6aea4 100644 --- a/external/googleapis/protodeps/grafeas.deps +++ b/external/googleapis/protodeps/grafeas.deps @@ -1,7 +1,7 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/iam.deps b/external/googleapis/protodeps/iam.deps index e027a4c044e59..ac9f9bb108292 100644 --- a/external/googleapis/protodeps/iam.deps +++ b/external/googleapis/protodeps/iam.deps @@ -1,11 +1,12 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/iam/v1:iam_policy_proto -@com_google_googleapis//google/iam/v1:options_proto -@com_google_googleapis//google/iam/v1:policy_proto -@com_google_googleapis//google/iam/v1:resource_policy_member_proto -@com_google_googleapis//google/type:expr_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/iam/v1:iam_policy_proto +@googleapis//google/iam/v1:options_proto +@googleapis//google/iam/v1:policy_proto +@googleapis//google/iam/v1:resource_policy_member_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/iam_v2.deps b/external/googleapis/protodeps/iam_v2.deps index 7dabe81c47849..6a7f7c082196f 100644 --- a/external/googleapis/protodeps/iam_v2.deps +++ b/external/googleapis/protodeps/iam_v2.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:expr_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/iam_v3.deps b/external/googleapis/protodeps/iam_v3.deps index ea852ac64f42a..5290041a37946 100644 --- a/external/googleapis/protodeps/iam_v3.deps +++ b/external/googleapis/protodeps/iam_v3.deps @@ -1,10 +1,10 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:expr_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/iap.deps b/external/googleapis/protodeps/iap.deps index e027a4c044e59..ac9f9bb108292 100644 --- a/external/googleapis/protodeps/iap.deps +++ b/external/googleapis/protodeps/iap.deps @@ -1,11 +1,12 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/iam/v1:iam_policy_proto -@com_google_googleapis//google/iam/v1:options_proto -@com_google_googleapis//google/iam/v1:policy_proto -@com_google_googleapis//google/iam/v1:resource_policy_member_proto -@com_google_googleapis//google/type:expr_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/iam/v1:iam_policy_proto +@googleapis//google/iam/v1:options_proto +@googleapis//google/iam/v1:policy_proto +@googleapis//google/iam/v1:resource_policy_member_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/ids.deps b/external/googleapis/protodeps/ids.deps index 6ef8f9ccdeb73..3a69eb58546e0 100644 --- a/external/googleapis/protodeps/ids.deps +++ b/external/googleapis/protodeps/ids.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/kms.deps b/external/googleapis/protodeps/kms.deps index a4834da700af3..0ae51f1dfe212 100644 --- a/external/googleapis/protodeps/kms.deps +++ b/external/googleapis/protodeps/kms.deps @@ -1,9 +1,9 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/cloud/kms/v1:kms_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/cloud/kms/v1:kms_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/language.deps b/external/googleapis/protodeps/language.deps index 5d260a00b6f04..191cdfdc78801 100644 --- a/external/googleapis/protodeps/language.deps +++ b/external/googleapis/protodeps/language.deps @@ -1,5 +1,6 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/licensemanager.deps b/external/googleapis/protodeps/licensemanager.deps index 3797f67d24463..ce4eebcf1a3ab 100644 --- a/external/googleapis/protodeps/licensemanager.deps +++ b/external/googleapis/protodeps/licensemanager.deps @@ -1,9 +1,9 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/logging.deps b/external/googleapis/protodeps/logging.deps index c1736c35c9531..d72761ae60779 100644 --- a/external/googleapis/protodeps/logging.deps +++ b/external/googleapis/protodeps/logging.deps @@ -1,13 +1,13 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:distribution_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:label_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:metric_proto -@com_google_googleapis//google/api:monitored_resource_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/logging/type:type_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:distribution_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:label_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:metric_proto +@googleapis//google/api:monitored_resource_proto +@googleapis//google/api:resource_proto +@googleapis//google/logging/type:type_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/logging_type.deps b/external/googleapis/protodeps/logging_type.deps index e69de29bb2d1d..571008e03f6be 100644 --- a/external/googleapis/protodeps/logging_type.deps +++ b/external/googleapis/protodeps/logging_type.deps @@ -0,0 +1 @@ +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/lustre.deps b/external/googleapis/protodeps/lustre.deps index 0070a78d1da1d..c38fafb3763df 100644 --- a/external/googleapis/protodeps/lustre.deps +++ b/external/googleapis/protodeps/lustre.deps @@ -1,10 +1,10 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:code_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:code_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/maintenance.deps b/external/googleapis/protodeps/maintenance.deps index 8790d2ff278d9..215c8fb2926ff 100644 --- a/external/googleapis/protodeps/maintenance.deps +++ b/external/googleapis/protodeps/maintenance.deps @@ -1,7 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/managedidentities.deps b/external/googleapis/protodeps/managedidentities.deps index 6ef8f9ccdeb73..3a69eb58546e0 100644 --- a/external/googleapis/protodeps/managedidentities.deps +++ b/external/googleapis/protodeps/managedidentities.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/managedkafka.deps b/external/googleapis/protodeps/managedkafka.deps index 1f1ff171c6bb8..55352947fc477 100644 --- a/external/googleapis/protodeps/managedkafka.deps +++ b/external/googleapis/protodeps/managedkafka.deps @@ -1,10 +1,10 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:httpbody_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:httpbody_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/memcache.deps b/external/googleapis/protodeps/memcache.deps index 64a55e8f7c5ea..b4a44896f9844 100644 --- a/external/googleapis/protodeps/memcache.deps +++ b/external/googleapis/protodeps/memcache.deps @@ -1,10 +1,10 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:dayofweek_proto -@com_google_googleapis//google/type:timeofday_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:dayofweek_proto +@googleapis//google/type:timeofday_proto diff --git a/external/googleapis/protodeps/memorystore.deps b/external/googleapis/protodeps/memorystore.deps index d820005adbc5a..4760fd1987644 100644 --- a/external/googleapis/protodeps/memorystore.deps +++ b/external/googleapis/protodeps/memorystore.deps @@ -1,11 +1,11 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:dayofweek_proto -@com_google_googleapis//google/type:timeofday_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:dayofweek_proto +@googleapis//google/type:timeofday_proto diff --git a/external/googleapis/protodeps/metastore.deps b/external/googleapis/protodeps/metastore.deps index 1f3a27a42b85d..8b5e38216b242 100644 --- a/external/googleapis/protodeps/metastore.deps +++ b/external/googleapis/protodeps/metastore.deps @@ -1,9 +1,9 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:dayofweek_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:dayofweek_proto diff --git a/external/googleapis/protodeps/migrationcenter.deps b/external/googleapis/protodeps/migrationcenter.deps index b77d5badb5fc8..bf3983f8225f3 100644 --- a/external/googleapis/protodeps/migrationcenter.deps +++ b/external/googleapis/protodeps/migrationcenter.deps @@ -1,10 +1,10 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:date_proto -@com_google_googleapis//google/type:money_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:date_proto +@googleapis//google/type:money_proto diff --git a/external/googleapis/protodeps/monitoring.deps b/external/googleapis/protodeps/monitoring.deps index ff168475aa60d..a108c60062189 100644 --- a/external/googleapis/protodeps/monitoring.deps +++ b/external/googleapis/protodeps/monitoring.deps @@ -1,16 +1,16 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:distribution_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:label_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:metric_proto -@com_google_googleapis//google/api:monitored_resource_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:calendar_period_proto -@com_google_googleapis//google/type:interval_proto -@com_google_googleapis//google/type:timeofday_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:distribution_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:label_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:metric_proto +@googleapis//google/api:monitored_resource_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:calendar_period_proto +@googleapis//google/type:interval_proto +@googleapis//google/type:timeofday_proto diff --git a/external/googleapis/protodeps/netapp.deps b/external/googleapis/protodeps/netapp.deps index 3797f67d24463..ce4eebcf1a3ab 100644 --- a/external/googleapis/protodeps/netapp.deps +++ b/external/googleapis/protodeps/netapp.deps @@ -1,9 +1,9 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/networkconnectivity.deps b/external/googleapis/protodeps/networkconnectivity.deps index 549af4e186636..6055d685d86c1 100644 --- a/external/googleapis/protodeps/networkconnectivity.deps +++ b/external/googleapis/protodeps/networkconnectivity.deps @@ -1,10 +1,10 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:error_details_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:error_details_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/networkmanagement.deps b/external/googleapis/protodeps/networkmanagement.deps index 3797f67d24463..ce4eebcf1a3ab 100644 --- a/external/googleapis/protodeps/networkmanagement.deps +++ b/external/googleapis/protodeps/networkmanagement.deps @@ -1,9 +1,9 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/networksecurity.deps b/external/googleapis/protodeps/networksecurity.deps index 6ef8f9ccdeb73..3a69eb58546e0 100644 --- a/external/googleapis/protodeps/networksecurity.deps +++ b/external/googleapis/protodeps/networksecurity.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/networkservices.deps b/external/googleapis/protodeps/networkservices.deps index 3797f67d24463..ce4eebcf1a3ab 100644 --- a/external/googleapis/protodeps/networkservices.deps +++ b/external/googleapis/protodeps/networkservices.deps @@ -1,9 +1,9 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/notebooks.deps b/external/googleapis/protodeps/notebooks.deps index 6ef8f9ccdeb73..3a69eb58546e0 100644 --- a/external/googleapis/protodeps/notebooks.deps +++ b/external/googleapis/protodeps/notebooks.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/optimization.deps b/external/googleapis/protodeps/optimization.deps index adcc65c0bd05f..01bfe98dfffbd 100644 --- a/external/googleapis/protodeps/optimization.deps +++ b/external/googleapis/protodeps/optimization.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:latlng_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:latlng_proto diff --git a/external/googleapis/protodeps/oracledatabase.deps b/external/googleapis/protodeps/oracledatabase.deps index ec9a1e918f795..8dbc33f98fbe6 100644 --- a/external/googleapis/protodeps/oracledatabase.deps +++ b/external/googleapis/protodeps/oracledatabase.deps @@ -1,13 +1,13 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:datetime_proto -@com_google_googleapis//google/type:dayofweek_proto -@com_google_googleapis//google/type:month_proto -@com_google_googleapis//google/type:timeofday_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:datetime_proto +@googleapis//google/type:dayofweek_proto +@googleapis//google/type:month_proto +@googleapis//google/type:timeofday_proto diff --git a/external/googleapis/protodeps/orgpolicy.deps b/external/googleapis/protodeps/orgpolicy.deps index bd46b0cedb062..95e1c03aafd45 100644 --- a/external/googleapis/protodeps/orgpolicy.deps +++ b/external/googleapis/protodeps/orgpolicy.deps @@ -1,7 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/type:expr_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/osconfig.deps b/external/googleapis/protodeps/osconfig.deps index f8d1159c4429c..73b148e638ab4 100644 --- a/external/googleapis/protodeps/osconfig.deps +++ b/external/googleapis/protodeps/osconfig.deps @@ -1,12 +1,12 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:date_proto -@com_google_googleapis//google/type:datetime_proto -@com_google_googleapis//google/type:dayofweek_proto -@com_google_googleapis//google/type:timeofday_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:date_proto +@googleapis//google/type:datetime_proto +@googleapis//google/type:dayofweek_proto +@googleapis//google/type:timeofday_proto diff --git a/external/googleapis/protodeps/oslogin.deps b/external/googleapis/protodeps/oslogin.deps index 789389795384a..e41a179464293 100644 --- a/external/googleapis/protodeps/oslogin.deps +++ b/external/googleapis/protodeps/oslogin.deps @@ -1,7 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/cloud/oslogin/common:common_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/cloud/oslogin/common:common_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/parallelstore.deps b/external/googleapis/protodeps/parallelstore.deps index 0070a78d1da1d..c38fafb3763df 100644 --- a/external/googleapis/protodeps/parallelstore.deps +++ b/external/googleapis/protodeps/parallelstore.deps @@ -1,10 +1,10 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:code_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:code_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/parametermanager.deps b/external/googleapis/protodeps/parametermanager.deps index 5b0f6e6ecbcd0..58d4140ff41a3 100644 --- a/external/googleapis/protodeps/parametermanager.deps +++ b/external/googleapis/protodeps/parametermanager.deps @@ -1,8 +1,9 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/iam/v1:resource_policy_member_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/iam/v1:resource_policy_member_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/policysimulator.deps b/external/googleapis/protodeps/policysimulator.deps index a2410bf813156..2cc7903fd7e31 100644 --- a/external/googleapis/protodeps/policysimulator.deps +++ b/external/googleapis/protodeps/policysimulator.deps @@ -1,12 +1,12 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/cloud/orgpolicy/v2:orgpolicy_proto -@com_google_googleapis//google/iam/v1:policy_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:date_proto -@com_google_googleapis//google/type:expr_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/cloud/orgpolicy/v2:orgpolicy_proto +@googleapis//google/iam/v1:policy_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:date_proto +@googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/policytroubleshooter.deps b/external/googleapis/protodeps/policytroubleshooter.deps index b814dcc68cf04..6eb8ac6c618ee 100644 --- a/external/googleapis/protodeps/policytroubleshooter.deps +++ b/external/googleapis/protodeps/policytroubleshooter.deps @@ -1,10 +1,10 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/iam/v1:policy_proto -@com_google_googleapis//google/iam/v2:policy_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:expr_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/iam/v1:policy_proto +@googleapis//google/iam/v2:policy_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/privateca.deps b/external/googleapis/protodeps/privateca.deps index ea852ac64f42a..5290041a37946 100644 --- a/external/googleapis/protodeps/privateca.deps +++ b/external/googleapis/protodeps/privateca.deps @@ -1,10 +1,10 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:expr_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/privilegedaccessmanager.deps b/external/googleapis/protodeps/privilegedaccessmanager.deps index 6ef8f9ccdeb73..3a69eb58546e0 100644 --- a/external/googleapis/protodeps/privilegedaccessmanager.deps +++ b/external/googleapis/protodeps/privilegedaccessmanager.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/profiler.deps b/external/googleapis/protodeps/profiler.deps index 2e749051efbb4..5c7b273c6aea4 100644 --- a/external/googleapis/protodeps/profiler.deps +++ b/external/googleapis/protodeps/profiler.deps @@ -1,6 +1,7 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/publicca.deps b/external/googleapis/protodeps/publicca.deps index 2e749051efbb4..5c7b273c6aea4 100644 --- a/external/googleapis/protodeps/publicca.deps +++ b/external/googleapis/protodeps/publicca.deps @@ -1,6 +1,7 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/pubsub.deps b/external/googleapis/protodeps/pubsub.deps index 2e749051efbb4..5c7b273c6aea4 100644 --- a/external/googleapis/protodeps/pubsub.deps +++ b/external/googleapis/protodeps/pubsub.deps @@ -1,6 +1,7 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/pubsublite.deps b/external/googleapis/protodeps/pubsublite.deps index 6ef8f9ccdeb73..3a69eb58546e0 100644 --- a/external/googleapis/protodeps/pubsublite.deps +++ b/external/googleapis/protodeps/pubsublite.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/rapidmigrationassessment.deps b/external/googleapis/protodeps/rapidmigrationassessment.deps index 6ef8f9ccdeb73..3a69eb58546e0 100644 --- a/external/googleapis/protodeps/rapidmigrationassessment.deps +++ b/external/googleapis/protodeps/rapidmigrationassessment.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/recaptchaenterprise.deps b/external/googleapis/protodeps/recaptchaenterprise.deps index c4941d895e95b..215c8fb2926ff 100644 --- a/external/googleapis/protodeps/recaptchaenterprise.deps +++ b/external/googleapis/protodeps/recaptchaenterprise.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/recommender.deps b/external/googleapis/protodeps/recommender.deps index d39c17013f4d3..c2af991168b9b 100644 --- a/external/googleapis/protodeps/recommender.deps +++ b/external/googleapis/protodeps/recommender.deps @@ -1,8 +1,9 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/cloud/recommender/v1:recommender_proto -@com_google_googleapis//google/type:money_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/cloud/recommender/v1:recommender_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:money_proto diff --git a/external/googleapis/protodeps/redis.deps b/external/googleapis/protodeps/redis.deps index d820005adbc5a..4760fd1987644 100644 --- a/external/googleapis/protodeps/redis.deps +++ b/external/googleapis/protodeps/redis.deps @@ -1,11 +1,11 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:dayofweek_proto -@com_google_googleapis//google/type:timeofday_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:dayofweek_proto +@googleapis//google/type:timeofday_proto diff --git a/external/googleapis/protodeps/resourcemanager.deps b/external/googleapis/protodeps/resourcemanager.deps index 9098b1b674ef2..11efb6f9d66da 100644 --- a/external/googleapis/protodeps/resourcemanager.deps +++ b/external/googleapis/protodeps/resourcemanager.deps @@ -1,13 +1,13 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/iam/v1:iam_policy_proto -@com_google_googleapis//google/iam/v1:options_proto -@com_google_googleapis//google/iam/v1:policy_proto -@com_google_googleapis//google/iam/v1:resource_policy_member_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:expr_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/iam/v1:iam_policy_proto +@googleapis//google/iam/v1:options_proto +@googleapis//google/iam/v1:policy_proto +@googleapis//google/iam/v1:resource_policy_member_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/retail.deps b/external/googleapis/protodeps/retail.deps index d2fe5d9ee5836..ba7d47fadd611 100644 --- a/external/googleapis/protodeps/retail.deps +++ b/external/googleapis/protodeps/retail.deps @@ -1,10 +1,10 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:httpbody_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:date_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:httpbody_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:date_proto diff --git a/external/googleapis/protodeps/run.deps b/external/googleapis/protodeps/run.deps index c74f9bbf1f0cc..fa07d4ad68c5b 100644 --- a/external/googleapis/protodeps/run.deps +++ b/external/googleapis/protodeps/run.deps @@ -1,14 +1,14 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/api:routing_proto -@com_google_googleapis//google/iam/v1:iam_policy_proto -@com_google_googleapis//google/iam/v1:options_proto -@com_google_googleapis//google/iam/v1:policy_proto -@com_google_googleapis//google/iam/v1:resource_policy_member_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:expr_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/api:routing_proto +@googleapis//google/iam/v1:iam_policy_proto +@googleapis//google/iam/v1:options_proto +@googleapis//google/iam/v1:policy_proto +@googleapis//google/iam/v1:resource_policy_member_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/scheduler.deps b/external/googleapis/protodeps/scheduler.deps index da299b760ccb4..5c7b273c6aea4 100644 --- a/external/googleapis/protodeps/scheduler.deps +++ b/external/googleapis/protodeps/scheduler.deps @@ -1,7 +1,7 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/secretmanager.deps b/external/googleapis/protodeps/secretmanager.deps index e027a4c044e59..ac9f9bb108292 100644 --- a/external/googleapis/protodeps/secretmanager.deps +++ b/external/googleapis/protodeps/secretmanager.deps @@ -1,11 +1,12 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/iam/v1:iam_policy_proto -@com_google_googleapis//google/iam/v1:options_proto -@com_google_googleapis//google/iam/v1:policy_proto -@com_google_googleapis//google/iam/v1:resource_policy_member_proto -@com_google_googleapis//google/type:expr_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/iam/v1:iam_policy_proto +@googleapis//google/iam/v1:options_proto +@googleapis//google/iam/v1:policy_proto +@googleapis//google/iam/v1:resource_policy_member_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/securesourcemanager.deps b/external/googleapis/protodeps/securesourcemanager.deps index 9098b1b674ef2..11efb6f9d66da 100644 --- a/external/googleapis/protodeps/securesourcemanager.deps +++ b/external/googleapis/protodeps/securesourcemanager.deps @@ -1,13 +1,13 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/iam/v1:iam_policy_proto -@com_google_googleapis//google/iam/v1:options_proto -@com_google_googleapis//google/iam/v1:policy_proto -@com_google_googleapis//google/iam/v1:resource_policy_member_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:expr_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/iam/v1:iam_policy_proto +@googleapis//google/iam/v1:options_proto +@googleapis//google/iam/v1:policy_proto +@googleapis//google/iam/v1:resource_policy_member_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/securitycenter.deps b/external/googleapis/protodeps/securitycenter.deps index c74f9bbf1f0cc..fa07d4ad68c5b 100644 --- a/external/googleapis/protodeps/securitycenter.deps +++ b/external/googleapis/protodeps/securitycenter.deps @@ -1,14 +1,14 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/api:routing_proto -@com_google_googleapis//google/iam/v1:iam_policy_proto -@com_google_googleapis//google/iam/v1:options_proto -@com_google_googleapis//google/iam/v1:policy_proto -@com_google_googleapis//google/iam/v1:resource_policy_member_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:expr_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/api:routing_proto +@googleapis//google/iam/v1:iam_policy_proto +@googleapis//google/iam/v1:options_proto +@googleapis//google/iam/v1:policy_proto +@googleapis//google/iam/v1:resource_policy_member_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/securitycentermanagement.deps b/external/googleapis/protodeps/securitycentermanagement.deps index 5f83d2c4fe211..8597ef29e4c83 100644 --- a/external/googleapis/protodeps/securitycentermanagement.deps +++ b/external/googleapis/protodeps/securitycentermanagement.deps @@ -1,9 +1,9 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/iam/v1:policy_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:expr_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/iam/v1:policy_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/servicecontrol.deps b/external/googleapis/protodeps/servicecontrol.deps index 0910235a94fa3..9f374fa21a603 100644 --- a/external/googleapis/protodeps/servicecontrol.deps +++ b/external/googleapis/protodeps/servicecontrol.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:distribution_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/logging/type:type_proto -@com_google_googleapis//google/rpc/context:attribute_context_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:distribution_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/logging/type:type_proto +@googleapis//google/rpc/context:attribute_context_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/servicedirectory.deps b/external/googleapis/protodeps/servicedirectory.deps index e027a4c044e59..ac9f9bb108292 100644 --- a/external/googleapis/protodeps/servicedirectory.deps +++ b/external/googleapis/protodeps/servicedirectory.deps @@ -1,11 +1,12 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/iam/v1:iam_policy_proto -@com_google_googleapis//google/iam/v1:options_proto -@com_google_googleapis//google/iam/v1:policy_proto -@com_google_googleapis//google/iam/v1:resource_policy_member_proto -@com_google_googleapis//google/type:expr_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/iam/v1:iam_policy_proto +@googleapis//google/iam/v1:options_proto +@googleapis//google/iam/v1:policy_proto +@googleapis//google/iam/v1:resource_policy_member_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/servicehealth.deps b/external/googleapis/protodeps/servicehealth.deps index 2e749051efbb4..5c7b273c6aea4 100644 --- a/external/googleapis/protodeps/servicehealth.deps +++ b/external/googleapis/protodeps/servicehealth.deps @@ -1,6 +1,7 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/servicemanagement.deps b/external/googleapis/protodeps/servicemanagement.deps index d8c1c3c97b2e9..1e73905ffe0dd 100644 --- a/external/googleapis/protodeps/servicemanagement.deps +++ b/external/googleapis/protodeps/servicemanagement.deps @@ -1,29 +1,29 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:auth_proto -@com_google_googleapis//google/api:backend_proto -@com_google_googleapis//google/api:billing_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:config_change_proto -@com_google_googleapis//google/api:context_proto -@com_google_googleapis//google/api:control_proto -@com_google_googleapis//google/api:documentation_proto -@com_google_googleapis//google/api:endpoint_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:label_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:log_proto -@com_google_googleapis//google/api:logging_proto -@com_google_googleapis//google/api:metric_proto -@com_google_googleapis//google/api:monitored_resource_proto -@com_google_googleapis//google/api:monitoring_proto -@com_google_googleapis//google/api:policy_proto -@com_google_googleapis//google/api:quota_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/api:service_proto -@com_google_googleapis//google/api:source_info_proto -@com_google_googleapis//google/api:system_parameter_proto -@com_google_googleapis//google/api:usage_proto -@com_google_googleapis//google/api:visibility_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:auth_proto +@googleapis//google/api:backend_proto +@googleapis//google/api:billing_proto +@googleapis//google/api:client_proto +@googleapis//google/api:config_change_proto +@googleapis//google/api:context_proto +@googleapis//google/api:control_proto +@googleapis//google/api:documentation_proto +@googleapis//google/api:endpoint_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:label_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:log_proto +@googleapis//google/api:logging_proto +@googleapis//google/api:metric_proto +@googleapis//google/api:monitored_resource_proto +@googleapis//google/api:monitoring_proto +@googleapis//google/api:policy_proto +@googleapis//google/api:quota_proto +@googleapis//google/api:resource_proto +@googleapis//google/api:service_proto +@googleapis//google/api:source_info_proto +@googleapis//google/api:system_parameter_proto +@googleapis//google/api:usage_proto +@googleapis//google/api:visibility_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/serviceusage.deps b/external/googleapis/protodeps/serviceusage.deps index 4101bfc533315..63834b543b9e1 100644 --- a/external/googleapis/protodeps/serviceusage.deps +++ b/external/googleapis/protodeps/serviceusage.deps @@ -1,17 +1,17 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:auth_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:documentation_proto -@com_google_googleapis//google/api:endpoint_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:label_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:monitored_resource_proto -@com_google_googleapis//google/api:monitoring_proto -@com_google_googleapis//google/api:quota_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/api:usage_proto -@com_google_googleapis//google/api:visibility_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:auth_proto +@googleapis//google/api:client_proto +@googleapis//google/api:documentation_proto +@googleapis//google/api:endpoint_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:label_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:monitored_resource_proto +@googleapis//google/api:monitoring_proto +@googleapis//google/api:quota_proto +@googleapis//google/api:resource_proto +@googleapis//google/api:usage_proto +@googleapis//google/api:visibility_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/shell.deps b/external/googleapis/protodeps/shell.deps index 6ef8f9ccdeb73..3a69eb58546e0 100644 --- a/external/googleapis/protodeps/shell.deps +++ b/external/googleapis/protodeps/shell.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/spanner.deps b/external/googleapis/protodeps/spanner.deps index 9098b1b674ef2..11efb6f9d66da 100644 --- a/external/googleapis/protodeps/spanner.deps +++ b/external/googleapis/protodeps/spanner.deps @@ -1,13 +1,13 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/iam/v1:iam_policy_proto -@com_google_googleapis//google/iam/v1:options_proto -@com_google_googleapis//google/iam/v1:policy_proto -@com_google_googleapis//google/iam/v1:resource_policy_member_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:expr_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/iam/v1:iam_policy_proto +@googleapis//google/iam/v1:options_proto +@googleapis//google/iam/v1:policy_proto +@googleapis//google/iam/v1:resource_policy_member_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/speech.deps b/external/googleapis/protodeps/speech.deps index 3797f67d24463..ce4eebcf1a3ab 100644 --- a/external/googleapis/protodeps/speech.deps +++ b/external/googleapis/protodeps/speech.deps @@ -1,9 +1,9 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/sql.deps b/external/googleapis/protodeps/sql.deps index 14bec83d18847..d5e6174d740a9 100644 --- a/external/googleapis/protodeps/sql.deps +++ b/external/googleapis/protodeps/sql.deps @@ -1,10 +1,10 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:interval_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:interval_proto diff --git a/external/googleapis/protodeps/storage.deps b/external/googleapis/protodeps/storage.deps index d0ef8487c5bde..c253719c21070 100644 --- a/external/googleapis/protodeps/storage.deps +++ b/external/googleapis/protodeps/storage.deps @@ -1,14 +1,14 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/api:routing_proto -@com_google_googleapis//google/iam/v1:iam_policy_proto -@com_google_googleapis//google/iam/v1:options_proto -@com_google_googleapis//google/iam/v1:policy_proto -@com_google_googleapis//google/iam/v1:resource_policy_member_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:date_proto -@com_google_googleapis//google/type:expr_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/api:routing_proto +@googleapis//google/iam/v1:iam_policy_proto +@googleapis//google/iam/v1:options_proto +@googleapis//google/iam/v1:policy_proto +@googleapis//google/iam/v1:resource_policy_member_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:date_proto +@googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/storagebatchoperations.deps b/external/googleapis/protodeps/storagebatchoperations.deps index 0070a78d1da1d..c38fafb3763df 100644 --- a/external/googleapis/protodeps/storagebatchoperations.deps +++ b/external/googleapis/protodeps/storagebatchoperations.deps @@ -1,10 +1,10 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:code_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:code_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/storagecontrol.deps b/external/googleapis/protodeps/storagecontrol.deps index c592de3ec96f1..82b8f2ed76f34 100644 --- a/external/googleapis/protodeps/storagecontrol.deps +++ b/external/googleapis/protodeps/storagecontrol.deps @@ -1,15 +1,15 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/api:routing_proto -@com_google_googleapis//google/iam/v1:iam_policy_proto -@com_google_googleapis//google/iam/v1:options_proto -@com_google_googleapis//google/iam/v1:policy_proto -@com_google_googleapis//google/iam/v1:resource_policy_member_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:expr_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/api:routing_proto +@googleapis//google/iam/v1:iam_policy_proto +@googleapis//google/iam/v1:options_proto +@googleapis//google/iam/v1:policy_proto +@googleapis//google/iam/v1:resource_policy_member_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/storageinsights.deps b/external/googleapis/protodeps/storageinsights.deps index daade2723f218..f2a3876fd991a 100644 --- a/external/googleapis/protodeps/storageinsights.deps +++ b/external/googleapis/protodeps/storageinsights.deps @@ -1,10 +1,10 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:date_proto -@com_google_googleapis//google/type:datetime_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:date_proto +@googleapis//google/type:datetime_proto diff --git a/external/googleapis/protodeps/storagetransfer.deps b/external/googleapis/protodeps/storagetransfer.deps index d874c482d341b..02c4f744264c2 100644 --- a/external/googleapis/protodeps/storagetransfer.deps +++ b/external/googleapis/protodeps/storagetransfer.deps @@ -1,11 +1,11 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:code_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:date_proto -@com_google_googleapis//google/type:timeofday_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:code_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:date_proto +@googleapis//google/type:timeofday_proto diff --git a/external/googleapis/protodeps/support.deps b/external/googleapis/protodeps/support.deps index 6ef8f9ccdeb73..3a69eb58546e0 100644 --- a/external/googleapis/protodeps/support.deps +++ b/external/googleapis/protodeps/support.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/talent.deps b/external/googleapis/protodeps/talent.deps index 95aee605883ca..81bb11b047629 100644 --- a/external/googleapis/protodeps/talent.deps +++ b/external/googleapis/protodeps/talent.deps @@ -1,12 +1,12 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:latlng_proto -@com_google_googleapis//google/type:money_proto -@com_google_googleapis//google/type:postal_address_proto -@com_google_googleapis//google/type:timeofday_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:latlng_proto +@googleapis//google/type:money_proto +@googleapis//google/type:postal_address_proto +@googleapis//google/type:timeofday_proto diff --git a/external/googleapis/protodeps/tasks.deps b/external/googleapis/protodeps/tasks.deps index 8c879a7869b75..ac9f9bb108292 100644 --- a/external/googleapis/protodeps/tasks.deps +++ b/external/googleapis/protodeps/tasks.deps @@ -1,12 +1,12 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/iam/v1:iam_policy_proto -@com_google_googleapis//google/iam/v1:options_proto -@com_google_googleapis//google/iam/v1:policy_proto -@com_google_googleapis//google/iam/v1:resource_policy_member_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:expr_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/iam/v1:iam_policy_proto +@googleapis//google/iam/v1:options_proto +@googleapis//google/iam/v1:policy_proto +@googleapis//google/iam/v1:resource_policy_member_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/telcoautomation.deps b/external/googleapis/protodeps/telcoautomation.deps index 6ef8f9ccdeb73..3a69eb58546e0 100644 --- a/external/googleapis/protodeps/telcoautomation.deps +++ b/external/googleapis/protodeps/telcoautomation.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/texttospeech.deps b/external/googleapis/protodeps/texttospeech.deps index 6ef8f9ccdeb73..3a69eb58546e0 100644 --- a/external/googleapis/protodeps/texttospeech.deps +++ b/external/googleapis/protodeps/texttospeech.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/timeseriesinsights.deps b/external/googleapis/protodeps/timeseriesinsights.deps index da299b760ccb4..5c7b273c6aea4 100644 --- a/external/googleapis/protodeps/timeseriesinsights.deps +++ b/external/googleapis/protodeps/timeseriesinsights.deps @@ -1,7 +1,7 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/tpu.deps b/external/googleapis/protodeps/tpu.deps index 2e6ff1caf713a..4bbe4120b3305 100644 --- a/external/googleapis/protodeps/tpu.deps +++ b/external/googleapis/protodeps/tpu.deps @@ -1,9 +1,9 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:interval_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:interval_proto diff --git a/external/googleapis/protodeps/trace.deps b/external/googleapis/protodeps/trace.deps index da299b760ccb4..5c7b273c6aea4 100644 --- a/external/googleapis/protodeps/trace.deps +++ b/external/googleapis/protodeps/trace.deps @@ -1,7 +1,7 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/translate.deps b/external/googleapis/protodeps/translate.deps index 998ea7357574a..eb22dfc51db28 100644 --- a/external/googleapis/protodeps/translate.deps +++ b/external/googleapis/protodeps/translate.deps @@ -1,10 +1,10 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/iam/v1:policy_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:expr_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/iam/v1:policy_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:expr_proto diff --git a/external/googleapis/protodeps/video.deps b/external/googleapis/protodeps/video.deps index bd1493be2995f..6f45ca705af53 100644 --- a/external/googleapis/protodeps/video.deps +++ b/external/googleapis/protodeps/video.deps @@ -1,10 +1,10 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:datetime_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:datetime_proto diff --git a/external/googleapis/protodeps/videointelligence.deps b/external/googleapis/protodeps/videointelligence.deps index 9fab3b1b5e5fb..6312d7a490f63 100644 --- a/external/googleapis/protodeps/videointelligence.deps +++ b/external/googleapis/protodeps/videointelligence.deps @@ -1,7 +1,7 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/vision.deps b/external/googleapis/protodeps/vision.deps index 4e2049ed4bd4b..6fd15a7dd96d7 100644 --- a/external/googleapis/protodeps/vision.deps +++ b/external/googleapis/protodeps/vision.deps @@ -1,10 +1,10 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/type:color_proto -@com_google_googleapis//google/type:latlng_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/type:color_proto +@googleapis//google/type:latlng_proto diff --git a/external/googleapis/protodeps/vmmigration.deps b/external/googleapis/protodeps/vmmigration.deps index 549af4e186636..6055d685d86c1 100644 --- a/external/googleapis/protodeps/vmmigration.deps +++ b/external/googleapis/protodeps/vmmigration.deps @@ -1,10 +1,10 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:error_details_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:error_details_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/vmwareengine.deps b/external/googleapis/protodeps/vmwareengine.deps index 3797f67d24463..ce4eebcf1a3ab 100644 --- a/external/googleapis/protodeps/vmwareengine.deps +++ b/external/googleapis/protodeps/vmwareengine.deps @@ -1,9 +1,9 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:field_info_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:field_info_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/vpcaccess.deps b/external/googleapis/protodeps/vpcaccess.deps index 6ef8f9ccdeb73..3a69eb58546e0 100644 --- a/external/googleapis/protodeps/vpcaccess.deps +++ b/external/googleapis/protodeps/vpcaccess.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/webrisk.deps b/external/googleapis/protodeps/webrisk.deps index 6ef8f9ccdeb73..3a69eb58546e0 100644 --- a/external/googleapis/protodeps/webrisk.deps +++ b/external/googleapis/protodeps/webrisk.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/websecurityscanner.deps b/external/googleapis/protodeps/websecurityscanner.deps index 2e749051efbb4..5c7b273c6aea4 100644 --- a/external/googleapis/protodeps/websecurityscanner.deps +++ b/external/googleapis/protodeps/websecurityscanner.deps @@ -1,6 +1,7 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/workflows.deps b/external/googleapis/protodeps/workflows.deps index 6ef8f9ccdeb73..3a69eb58546e0 100644 --- a/external/googleapis/protodeps/workflows.deps +++ b/external/googleapis/protodeps/workflows.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protodeps/workstations.deps b/external/googleapis/protodeps/workstations.deps index 6ef8f9ccdeb73..3a69eb58546e0 100644 --- a/external/googleapis/protodeps/workstations.deps +++ b/external/googleapis/protodeps/workstations.deps @@ -1,8 +1,8 @@ -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:http_proto -@com_google_googleapis//google/api:launch_stage_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:client_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:http_proto +@googleapis//google/api:launch_stage_proto +@googleapis//google/api:resource_proto +@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto diff --git a/external/googleapis/protolists/accessapproval.list b/external/googleapis/protolists/accessapproval.list index 5a99edaabd357..99843cd3e7c0f 100644 --- a/external/googleapis/protolists/accessapproval.list +++ b/external/googleapis/protolists/accessapproval.list @@ -1 +1 @@ -@com_google_googleapis//google/cloud/accessapproval/v1:accessapproval.proto +@googleapis//google/cloud/accessapproval/v1:accessapproval.proto diff --git a/external/googleapis/protolists/accesscontextmanager.list b/external/googleapis/protolists/accesscontextmanager.list index 525ee1e644d80..78eee05ee01ce 100644 --- a/external/googleapis/protolists/accesscontextmanager.list +++ b/external/googleapis/protolists/accesscontextmanager.list @@ -1,6 +1,6 @@ -@com_google_googleapis//google/identity/accesscontextmanager/type:device_resources.proto -@com_google_googleapis//google/identity/accesscontextmanager/v1:access_context_manager.proto -@com_google_googleapis//google/identity/accesscontextmanager/v1:access_level.proto -@com_google_googleapis//google/identity/accesscontextmanager/v1:access_policy.proto -@com_google_googleapis//google/identity/accesscontextmanager/v1:gcp_user_access_binding.proto -@com_google_googleapis//google/identity/accesscontextmanager/v1:service_perimeter.proto +@googleapis//google/identity/accesscontextmanager/type:device_resources.proto +@googleapis//google/identity/accesscontextmanager/v1:access_context_manager.proto +@googleapis//google/identity/accesscontextmanager/v1:access_level.proto +@googleapis//google/identity/accesscontextmanager/v1:access_policy.proto +@googleapis//google/identity/accesscontextmanager/v1:gcp_user_access_binding.proto +@googleapis//google/identity/accesscontextmanager/v1:service_perimeter.proto diff --git a/external/googleapis/protolists/advisorynotifications.list b/external/googleapis/protolists/advisorynotifications.list index 43db20b963bdd..aaea7387f3e11 100644 --- a/external/googleapis/protolists/advisorynotifications.list +++ b/external/googleapis/protolists/advisorynotifications.list @@ -1 +1 @@ -@com_google_googleapis//google/cloud/advisorynotifications/v1:service.proto +@googleapis//google/cloud/advisorynotifications/v1:service.proto diff --git a/external/googleapis/protolists/aiplatform.list b/external/googleapis/protolists/aiplatform.list index 11bb4ba69fa3b..e9320c941d622 100644 --- a/external/googleapis/protolists/aiplatform.list +++ b/external/googleapis/protolists/aiplatform.list @@ -1,159 +1,159 @@ -@com_google_googleapis//google/cloud/aiplatform/logging:prediction.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/predict/instance:image_classification.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/predict/instance:image_object_detection.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/predict/instance:image_segmentation.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/predict/instance:text_classification.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/predict/instance:text_extraction.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/predict/instance:text_sentiment.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/predict/instance:video_action_recognition.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/predict/instance:video_classification.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/predict/instance:video_object_tracking.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/predict/params:image_classification.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/predict/params:image_object_detection.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/predict/params:image_segmentation.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/predict/params:video_action_recognition.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/predict/params:video_classification.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/predict/params:video_object_tracking.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/predict/prediction:classification.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/predict/prediction:image_object_detection.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/predict/prediction:image_segmentation.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/predict/prediction:tabular_classification.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/predict/prediction:tabular_regression.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/predict/prediction:text_extraction.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/predict/prediction:text_sentiment.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/predict/prediction:video_action_recognition.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/predict/prediction:video_classification.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/predict/prediction:video_object_tracking.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/trainingjob/definition:automl_image_classification.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/trainingjob/definition:automl_image_object_detection.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/trainingjob/definition:automl_image_segmentation.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/trainingjob/definition:automl_tables.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/trainingjob/definition:automl_text_classification.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/trainingjob/definition:automl_text_extraction.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/trainingjob/definition:automl_text_sentiment.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/trainingjob/definition:automl_video_action_recognition.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/trainingjob/definition:automl_video_classification.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/trainingjob/definition:automl_video_object_tracking.proto -@com_google_googleapis//google/cloud/aiplatform/v1/schema/trainingjob/definition:export_evaluated_data_items_config.proto -@com_google_googleapis//google/cloud/aiplatform/v1:accelerator_type.proto -@com_google_googleapis//google/cloud/aiplatform/v1:annotation.proto -@com_google_googleapis//google/cloud/aiplatform/v1:annotation_spec.proto -@com_google_googleapis//google/cloud/aiplatform/v1:api_auth.proto -@com_google_googleapis//google/cloud/aiplatform/v1:artifact.proto -@com_google_googleapis//google/cloud/aiplatform/v1:batch_prediction_job.proto -@com_google_googleapis//google/cloud/aiplatform/v1:cached_content.proto -@com_google_googleapis//google/cloud/aiplatform/v1:completion_stats.proto -@com_google_googleapis//google/cloud/aiplatform/v1:content.proto -@com_google_googleapis//google/cloud/aiplatform/v1:context.proto -@com_google_googleapis//google/cloud/aiplatform/v1:custom_job.proto -@com_google_googleapis//google/cloud/aiplatform/v1:data_foundry_service.proto -@com_google_googleapis//google/cloud/aiplatform/v1:data_item.proto -@com_google_googleapis//google/cloud/aiplatform/v1:data_labeling_job.proto -@com_google_googleapis//google/cloud/aiplatform/v1:dataset.proto -@com_google_googleapis//google/cloud/aiplatform/v1:dataset_service.proto -@com_google_googleapis//google/cloud/aiplatform/v1:dataset_version.proto -@com_google_googleapis//google/cloud/aiplatform/v1:deployed_index_ref.proto -@com_google_googleapis//google/cloud/aiplatform/v1:deployed_model_ref.proto -@com_google_googleapis//google/cloud/aiplatform/v1:deployment_resource_pool.proto -@com_google_googleapis//google/cloud/aiplatform/v1:deployment_resource_pool_service.proto -@com_google_googleapis//google/cloud/aiplatform/v1:deployment_stage.proto -@com_google_googleapis//google/cloud/aiplatform/v1:encryption_spec.proto -@com_google_googleapis//google/cloud/aiplatform/v1:endpoint.proto -@com_google_googleapis//google/cloud/aiplatform/v1:endpoint_service.proto -@com_google_googleapis//google/cloud/aiplatform/v1:entity_type.proto -@com_google_googleapis//google/cloud/aiplatform/v1:env_var.proto -@com_google_googleapis//google/cloud/aiplatform/v1:evaluated_annotation.proto -@com_google_googleapis//google/cloud/aiplatform/v1:evaluation_service.proto -@com_google_googleapis//google/cloud/aiplatform/v1:event.proto -@com_google_googleapis//google/cloud/aiplatform/v1:execution.proto -@com_google_googleapis//google/cloud/aiplatform/v1:explanation.proto -@com_google_googleapis//google/cloud/aiplatform/v1:explanation_metadata.proto -@com_google_googleapis//google/cloud/aiplatform/v1:feature.proto -@com_google_googleapis//google/cloud/aiplatform/v1:feature_group.proto -@com_google_googleapis//google/cloud/aiplatform/v1:feature_monitoring_stats.proto -@com_google_googleapis//google/cloud/aiplatform/v1:feature_online_store.proto -@com_google_googleapis//google/cloud/aiplatform/v1:feature_online_store_admin_service.proto -@com_google_googleapis//google/cloud/aiplatform/v1:feature_online_store_service.proto -@com_google_googleapis//google/cloud/aiplatform/v1:feature_registry_service.proto -@com_google_googleapis//google/cloud/aiplatform/v1:feature_selector.proto -@com_google_googleapis//google/cloud/aiplatform/v1:feature_view.proto -@com_google_googleapis//google/cloud/aiplatform/v1:feature_view_sync.proto -@com_google_googleapis//google/cloud/aiplatform/v1:featurestore.proto -@com_google_googleapis//google/cloud/aiplatform/v1:featurestore_monitoring.proto -@com_google_googleapis//google/cloud/aiplatform/v1:featurestore_online_service.proto -@com_google_googleapis//google/cloud/aiplatform/v1:featurestore_service.proto -@com_google_googleapis//google/cloud/aiplatform/v1:gen_ai_cache_service.proto -@com_google_googleapis//google/cloud/aiplatform/v1:genai_tuning_service.proto -@com_google_googleapis//google/cloud/aiplatform/v1:hyperparameter_tuning_job.proto -@com_google_googleapis//google/cloud/aiplatform/v1:index.proto -@com_google_googleapis//google/cloud/aiplatform/v1:index_endpoint.proto -@com_google_googleapis//google/cloud/aiplatform/v1:index_endpoint_service.proto -@com_google_googleapis//google/cloud/aiplatform/v1:index_service.proto -@com_google_googleapis//google/cloud/aiplatform/v1:io.proto -@com_google_googleapis//google/cloud/aiplatform/v1:job_service.proto -@com_google_googleapis//google/cloud/aiplatform/v1:job_state.proto -@com_google_googleapis//google/cloud/aiplatform/v1:lineage_subgraph.proto -@com_google_googleapis//google/cloud/aiplatform/v1:llm_utility_service.proto -@com_google_googleapis//google/cloud/aiplatform/v1:machine_resources.proto -@com_google_googleapis//google/cloud/aiplatform/v1:manual_batch_tuning_parameters.proto -@com_google_googleapis//google/cloud/aiplatform/v1:match_service.proto -@com_google_googleapis//google/cloud/aiplatform/v1:metadata_schema.proto -@com_google_googleapis//google/cloud/aiplatform/v1:metadata_service.proto -@com_google_googleapis//google/cloud/aiplatform/v1:metadata_store.proto -@com_google_googleapis//google/cloud/aiplatform/v1:migratable_resource.proto -@com_google_googleapis//google/cloud/aiplatform/v1:migration_service.proto -@com_google_googleapis//google/cloud/aiplatform/v1:model.proto -@com_google_googleapis//google/cloud/aiplatform/v1:model_deployment_monitoring_job.proto -@com_google_googleapis//google/cloud/aiplatform/v1:model_evaluation.proto -@com_google_googleapis//google/cloud/aiplatform/v1:model_evaluation_slice.proto -@com_google_googleapis//google/cloud/aiplatform/v1:model_garden_service.proto -@com_google_googleapis//google/cloud/aiplatform/v1:model_monitoring.proto -@com_google_googleapis//google/cloud/aiplatform/v1:model_service.proto -@com_google_googleapis//google/cloud/aiplatform/v1:nas_job.proto -@com_google_googleapis//google/cloud/aiplatform/v1:network_spec.proto -@com_google_googleapis//google/cloud/aiplatform/v1:notebook_euc_config.proto -@com_google_googleapis//google/cloud/aiplatform/v1:notebook_execution_job.proto -@com_google_googleapis//google/cloud/aiplatform/v1:notebook_idle_shutdown_config.proto -@com_google_googleapis//google/cloud/aiplatform/v1:notebook_runtime.proto -@com_google_googleapis//google/cloud/aiplatform/v1:notebook_runtime_template_ref.proto -@com_google_googleapis//google/cloud/aiplatform/v1:notebook_service.proto -@com_google_googleapis//google/cloud/aiplatform/v1:notebook_software_config.proto -@com_google_googleapis//google/cloud/aiplatform/v1:openapi.proto -@com_google_googleapis//google/cloud/aiplatform/v1:operation.proto -@com_google_googleapis//google/cloud/aiplatform/v1:persistent_resource.proto -@com_google_googleapis//google/cloud/aiplatform/v1:persistent_resource_service.proto -@com_google_googleapis//google/cloud/aiplatform/v1:pipeline_failure_policy.proto -@com_google_googleapis//google/cloud/aiplatform/v1:pipeline_job.proto -@com_google_googleapis//google/cloud/aiplatform/v1:pipeline_service.proto -@com_google_googleapis//google/cloud/aiplatform/v1:pipeline_state.proto -@com_google_googleapis//google/cloud/aiplatform/v1:prediction_service.proto -@com_google_googleapis//google/cloud/aiplatform/v1:publisher_model.proto -@com_google_googleapis//google/cloud/aiplatform/v1:reasoning_engine.proto -@com_google_googleapis//google/cloud/aiplatform/v1:reasoning_engine_execution_service.proto -@com_google_googleapis//google/cloud/aiplatform/v1:reasoning_engine_service.proto -@com_google_googleapis//google/cloud/aiplatform/v1:reservation_affinity.proto -@com_google_googleapis//google/cloud/aiplatform/v1:saved_query.proto -@com_google_googleapis//google/cloud/aiplatform/v1:schedule.proto -@com_google_googleapis//google/cloud/aiplatform/v1:schedule_service.proto -@com_google_googleapis//google/cloud/aiplatform/v1:service_networking.proto -@com_google_googleapis//google/cloud/aiplatform/v1:specialist_pool.proto -@com_google_googleapis//google/cloud/aiplatform/v1:specialist_pool_service.proto -@com_google_googleapis//google/cloud/aiplatform/v1:study.proto -@com_google_googleapis//google/cloud/aiplatform/v1:tensorboard.proto -@com_google_googleapis//google/cloud/aiplatform/v1:tensorboard_data.proto -@com_google_googleapis//google/cloud/aiplatform/v1:tensorboard_experiment.proto -@com_google_googleapis//google/cloud/aiplatform/v1:tensorboard_run.proto -@com_google_googleapis//google/cloud/aiplatform/v1:tensorboard_service.proto -@com_google_googleapis//google/cloud/aiplatform/v1:tensorboard_time_series.proto -@com_google_googleapis//google/cloud/aiplatform/v1:tool.proto -@com_google_googleapis//google/cloud/aiplatform/v1:training_pipeline.proto -@com_google_googleapis//google/cloud/aiplatform/v1:tuning_job.proto -@com_google_googleapis//google/cloud/aiplatform/v1:types.proto -@com_google_googleapis//google/cloud/aiplatform/v1:unmanaged_container_model.proto -@com_google_googleapis//google/cloud/aiplatform/v1:usage_metadata.proto -@com_google_googleapis//google/cloud/aiplatform/v1:user_action_reference.proto -@com_google_googleapis//google/cloud/aiplatform/v1:value.proto -@com_google_googleapis//google/cloud/aiplatform/v1:vertex_rag_data.proto -@com_google_googleapis//google/cloud/aiplatform/v1:vertex_rag_data_service.proto -@com_google_googleapis//google/cloud/aiplatform/v1:vertex_rag_service.proto -@com_google_googleapis//google/cloud/aiplatform/v1:vizier_service.proto +@googleapis//google/cloud/aiplatform/logging:prediction.proto +@googleapis//google/cloud/aiplatform/v1/schema/predict/instance:image_classification.proto +@googleapis//google/cloud/aiplatform/v1/schema/predict/instance:image_object_detection.proto +@googleapis//google/cloud/aiplatform/v1/schema/predict/instance:image_segmentation.proto +@googleapis//google/cloud/aiplatform/v1/schema/predict/instance:text_classification.proto +@googleapis//google/cloud/aiplatform/v1/schema/predict/instance:text_extraction.proto +@googleapis//google/cloud/aiplatform/v1/schema/predict/instance:text_sentiment.proto +@googleapis//google/cloud/aiplatform/v1/schema/predict/instance:video_action_recognition.proto +@googleapis//google/cloud/aiplatform/v1/schema/predict/instance:video_classification.proto +@googleapis//google/cloud/aiplatform/v1/schema/predict/instance:video_object_tracking.proto +@googleapis//google/cloud/aiplatform/v1/schema/predict/params:image_classification.proto +@googleapis//google/cloud/aiplatform/v1/schema/predict/params:image_object_detection.proto +@googleapis//google/cloud/aiplatform/v1/schema/predict/params:image_segmentation.proto +@googleapis//google/cloud/aiplatform/v1/schema/predict/params:video_action_recognition.proto +@googleapis//google/cloud/aiplatform/v1/schema/predict/params:video_classification.proto +@googleapis//google/cloud/aiplatform/v1/schema/predict/params:video_object_tracking.proto +@googleapis//google/cloud/aiplatform/v1/schema/predict/prediction:classification.proto +@googleapis//google/cloud/aiplatform/v1/schema/predict/prediction:image_object_detection.proto +@googleapis//google/cloud/aiplatform/v1/schema/predict/prediction:image_segmentation.proto +@googleapis//google/cloud/aiplatform/v1/schema/predict/prediction:tabular_classification.proto +@googleapis//google/cloud/aiplatform/v1/schema/predict/prediction:tabular_regression.proto +@googleapis//google/cloud/aiplatform/v1/schema/predict/prediction:text_extraction.proto +@googleapis//google/cloud/aiplatform/v1/schema/predict/prediction:text_sentiment.proto +@googleapis//google/cloud/aiplatform/v1/schema/predict/prediction:video_action_recognition.proto +@googleapis//google/cloud/aiplatform/v1/schema/predict/prediction:video_classification.proto +@googleapis//google/cloud/aiplatform/v1/schema/predict/prediction:video_object_tracking.proto +@googleapis//google/cloud/aiplatform/v1/schema/trainingjob/definition:automl_image_classification.proto +@googleapis//google/cloud/aiplatform/v1/schema/trainingjob/definition:automl_image_object_detection.proto +@googleapis//google/cloud/aiplatform/v1/schema/trainingjob/definition:automl_image_segmentation.proto +@googleapis//google/cloud/aiplatform/v1/schema/trainingjob/definition:automl_tables.proto +@googleapis//google/cloud/aiplatform/v1/schema/trainingjob/definition:automl_text_classification.proto +@googleapis//google/cloud/aiplatform/v1/schema/trainingjob/definition:automl_text_extraction.proto +@googleapis//google/cloud/aiplatform/v1/schema/trainingjob/definition:automl_text_sentiment.proto +@googleapis//google/cloud/aiplatform/v1/schema/trainingjob/definition:automl_video_action_recognition.proto +@googleapis//google/cloud/aiplatform/v1/schema/trainingjob/definition:automl_video_classification.proto +@googleapis//google/cloud/aiplatform/v1/schema/trainingjob/definition:automl_video_object_tracking.proto +@googleapis//google/cloud/aiplatform/v1/schema/trainingjob/definition:export_evaluated_data_items_config.proto +@googleapis//google/cloud/aiplatform/v1:accelerator_type.proto +@googleapis//google/cloud/aiplatform/v1:annotation.proto +@googleapis//google/cloud/aiplatform/v1:annotation_spec.proto +@googleapis//google/cloud/aiplatform/v1:api_auth.proto +@googleapis//google/cloud/aiplatform/v1:artifact.proto +@googleapis//google/cloud/aiplatform/v1:batch_prediction_job.proto +@googleapis//google/cloud/aiplatform/v1:cached_content.proto +@googleapis//google/cloud/aiplatform/v1:completion_stats.proto +@googleapis//google/cloud/aiplatform/v1:content.proto +@googleapis//google/cloud/aiplatform/v1:context.proto +@googleapis//google/cloud/aiplatform/v1:custom_job.proto +@googleapis//google/cloud/aiplatform/v1:data_foundry_service.proto +@googleapis//google/cloud/aiplatform/v1:data_item.proto +@googleapis//google/cloud/aiplatform/v1:data_labeling_job.proto +@googleapis//google/cloud/aiplatform/v1:dataset.proto +@googleapis//google/cloud/aiplatform/v1:dataset_service.proto +@googleapis//google/cloud/aiplatform/v1:dataset_version.proto +@googleapis//google/cloud/aiplatform/v1:deployed_index_ref.proto +@googleapis//google/cloud/aiplatform/v1:deployed_model_ref.proto +@googleapis//google/cloud/aiplatform/v1:deployment_resource_pool.proto +@googleapis//google/cloud/aiplatform/v1:deployment_resource_pool_service.proto +@googleapis//google/cloud/aiplatform/v1:deployment_stage.proto +@googleapis//google/cloud/aiplatform/v1:encryption_spec.proto +@googleapis//google/cloud/aiplatform/v1:endpoint.proto +@googleapis//google/cloud/aiplatform/v1:endpoint_service.proto +@googleapis//google/cloud/aiplatform/v1:entity_type.proto +@googleapis//google/cloud/aiplatform/v1:env_var.proto +@googleapis//google/cloud/aiplatform/v1:evaluated_annotation.proto +@googleapis//google/cloud/aiplatform/v1:evaluation_service.proto +@googleapis//google/cloud/aiplatform/v1:event.proto +@googleapis//google/cloud/aiplatform/v1:execution.proto +@googleapis//google/cloud/aiplatform/v1:explanation.proto +@googleapis//google/cloud/aiplatform/v1:explanation_metadata.proto +@googleapis//google/cloud/aiplatform/v1:feature.proto +@googleapis//google/cloud/aiplatform/v1:feature_group.proto +@googleapis//google/cloud/aiplatform/v1:feature_monitoring_stats.proto +@googleapis//google/cloud/aiplatform/v1:feature_online_store.proto +@googleapis//google/cloud/aiplatform/v1:feature_online_store_admin_service.proto +@googleapis//google/cloud/aiplatform/v1:feature_online_store_service.proto +@googleapis//google/cloud/aiplatform/v1:feature_registry_service.proto +@googleapis//google/cloud/aiplatform/v1:feature_selector.proto +@googleapis//google/cloud/aiplatform/v1:feature_view.proto +@googleapis//google/cloud/aiplatform/v1:feature_view_sync.proto +@googleapis//google/cloud/aiplatform/v1:featurestore.proto +@googleapis//google/cloud/aiplatform/v1:featurestore_monitoring.proto +@googleapis//google/cloud/aiplatform/v1:featurestore_online_service.proto +@googleapis//google/cloud/aiplatform/v1:featurestore_service.proto +@googleapis//google/cloud/aiplatform/v1:gen_ai_cache_service.proto +@googleapis//google/cloud/aiplatform/v1:genai_tuning_service.proto +@googleapis//google/cloud/aiplatform/v1:hyperparameter_tuning_job.proto +@googleapis//google/cloud/aiplatform/v1:index.proto +@googleapis//google/cloud/aiplatform/v1:index_endpoint.proto +@googleapis//google/cloud/aiplatform/v1:index_endpoint_service.proto +@googleapis//google/cloud/aiplatform/v1:index_service.proto +@googleapis//google/cloud/aiplatform/v1:io.proto +@googleapis//google/cloud/aiplatform/v1:job_service.proto +@googleapis//google/cloud/aiplatform/v1:job_state.proto +@googleapis//google/cloud/aiplatform/v1:lineage_subgraph.proto +@googleapis//google/cloud/aiplatform/v1:llm_utility_service.proto +@googleapis//google/cloud/aiplatform/v1:machine_resources.proto +@googleapis//google/cloud/aiplatform/v1:manual_batch_tuning_parameters.proto +@googleapis//google/cloud/aiplatform/v1:match_service.proto +@googleapis//google/cloud/aiplatform/v1:metadata_schema.proto +@googleapis//google/cloud/aiplatform/v1:metadata_service.proto +@googleapis//google/cloud/aiplatform/v1:metadata_store.proto +@googleapis//google/cloud/aiplatform/v1:migratable_resource.proto +@googleapis//google/cloud/aiplatform/v1:migration_service.proto +@googleapis//google/cloud/aiplatform/v1:model.proto +@googleapis//google/cloud/aiplatform/v1:model_deployment_monitoring_job.proto +@googleapis//google/cloud/aiplatform/v1:model_evaluation.proto +@googleapis//google/cloud/aiplatform/v1:model_evaluation_slice.proto +@googleapis//google/cloud/aiplatform/v1:model_garden_service.proto +@googleapis//google/cloud/aiplatform/v1:model_monitoring.proto +@googleapis//google/cloud/aiplatform/v1:model_service.proto +@googleapis//google/cloud/aiplatform/v1:nas_job.proto +@googleapis//google/cloud/aiplatform/v1:network_spec.proto +@googleapis//google/cloud/aiplatform/v1:notebook_euc_config.proto +@googleapis//google/cloud/aiplatform/v1:notebook_execution_job.proto +@googleapis//google/cloud/aiplatform/v1:notebook_idle_shutdown_config.proto +@googleapis//google/cloud/aiplatform/v1:notebook_runtime.proto +@googleapis//google/cloud/aiplatform/v1:notebook_runtime_template_ref.proto +@googleapis//google/cloud/aiplatform/v1:notebook_service.proto +@googleapis//google/cloud/aiplatform/v1:notebook_software_config.proto +@googleapis//google/cloud/aiplatform/v1:openapi.proto +@googleapis//google/cloud/aiplatform/v1:operation.proto +@googleapis//google/cloud/aiplatform/v1:persistent_resource.proto +@googleapis//google/cloud/aiplatform/v1:persistent_resource_service.proto +@googleapis//google/cloud/aiplatform/v1:pipeline_failure_policy.proto +@googleapis//google/cloud/aiplatform/v1:pipeline_job.proto +@googleapis//google/cloud/aiplatform/v1:pipeline_service.proto +@googleapis//google/cloud/aiplatform/v1:pipeline_state.proto +@googleapis//google/cloud/aiplatform/v1:prediction_service.proto +@googleapis//google/cloud/aiplatform/v1:publisher_model.proto +@googleapis//google/cloud/aiplatform/v1:reasoning_engine.proto +@googleapis//google/cloud/aiplatform/v1:reasoning_engine_execution_service.proto +@googleapis//google/cloud/aiplatform/v1:reasoning_engine_service.proto +@googleapis//google/cloud/aiplatform/v1:reservation_affinity.proto +@googleapis//google/cloud/aiplatform/v1:saved_query.proto +@googleapis//google/cloud/aiplatform/v1:schedule.proto +@googleapis//google/cloud/aiplatform/v1:schedule_service.proto +@googleapis//google/cloud/aiplatform/v1:service_networking.proto +@googleapis//google/cloud/aiplatform/v1:specialist_pool.proto +@googleapis//google/cloud/aiplatform/v1:specialist_pool_service.proto +@googleapis//google/cloud/aiplatform/v1:study.proto +@googleapis//google/cloud/aiplatform/v1:tensorboard.proto +@googleapis//google/cloud/aiplatform/v1:tensorboard_data.proto +@googleapis//google/cloud/aiplatform/v1:tensorboard_experiment.proto +@googleapis//google/cloud/aiplatform/v1:tensorboard_run.proto +@googleapis//google/cloud/aiplatform/v1:tensorboard_service.proto +@googleapis//google/cloud/aiplatform/v1:tensorboard_time_series.proto +@googleapis//google/cloud/aiplatform/v1:tool.proto +@googleapis//google/cloud/aiplatform/v1:training_pipeline.proto +@googleapis//google/cloud/aiplatform/v1:tuning_job.proto +@googleapis//google/cloud/aiplatform/v1:types.proto +@googleapis//google/cloud/aiplatform/v1:unmanaged_container_model.proto +@googleapis//google/cloud/aiplatform/v1:usage_metadata.proto +@googleapis//google/cloud/aiplatform/v1:user_action_reference.proto +@googleapis//google/cloud/aiplatform/v1:value.proto +@googleapis//google/cloud/aiplatform/v1:vertex_rag_data.proto +@googleapis//google/cloud/aiplatform/v1:vertex_rag_data_service.proto +@googleapis//google/cloud/aiplatform/v1:vertex_rag_service.proto +@googleapis//google/cloud/aiplatform/v1:vizier_service.proto diff --git a/external/googleapis/protolists/alloydb.list b/external/googleapis/protolists/alloydb.list index ba56b31936a46..bffc9babb8c6b 100644 --- a/external/googleapis/protolists/alloydb.list +++ b/external/googleapis/protolists/alloydb.list @@ -1,5 +1,5 @@ -@com_google_googleapis//google/cloud/alloydb/v1:csql_resources.proto -@com_google_googleapis//google/cloud/alloydb/v1:csql_service.proto -@com_google_googleapis//google/cloud/alloydb/v1:data_model.proto -@com_google_googleapis//google/cloud/alloydb/v1:resources.proto -@com_google_googleapis//google/cloud/alloydb/v1:service.proto +@googleapis//google/cloud/alloydb/v1:csql_resources.proto +@googleapis//google/cloud/alloydb/v1:csql_service.proto +@googleapis//google/cloud/alloydb/v1:data_model.proto +@googleapis//google/cloud/alloydb/v1:resources.proto +@googleapis//google/cloud/alloydb/v1:service.proto diff --git a/external/googleapis/protolists/apigateway.list b/external/googleapis/protolists/apigateway.list index 45ec3e32801f4..14440962c2dd2 100644 --- a/external/googleapis/protolists/apigateway.list +++ b/external/googleapis/protolists/apigateway.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/cloud/apigateway/v1:apigateway.proto -@com_google_googleapis//google/cloud/apigateway/v1:apigateway_service.proto +@googleapis//google/cloud/apigateway/v1:apigateway.proto +@googleapis//google/cloud/apigateway/v1:apigateway_service.proto diff --git a/external/googleapis/protolists/apigeeconnect.list b/external/googleapis/protolists/apigeeconnect.list index df09cb07d7e15..58e521d081404 100644 --- a/external/googleapis/protolists/apigeeconnect.list +++ b/external/googleapis/protolists/apigeeconnect.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/cloud/apigeeconnect/v1:connection.proto -@com_google_googleapis//google/cloud/apigeeconnect/v1:tether.proto +@googleapis//google/cloud/apigeeconnect/v1:connection.proto +@googleapis//google/cloud/apigeeconnect/v1:tether.proto diff --git a/external/googleapis/protolists/apikeys.list b/external/googleapis/protolists/apikeys.list index f8d04a268cb20..dcec62e504b39 100644 --- a/external/googleapis/protolists/apikeys.list +++ b/external/googleapis/protolists/apikeys.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/api/apikeys/v2:apikeys.proto -@com_google_googleapis//google/api/apikeys/v2:resources.proto +@googleapis//google/api/apikeys/v2:apikeys.proto +@googleapis//google/api/apikeys/v2:resources.proto diff --git a/external/googleapis/protolists/apiregistry.list b/external/googleapis/protolists/apiregistry.list index 6470878934037..ca575abf9dba6 100644 --- a/external/googleapis/protolists/apiregistry.list +++ b/external/googleapis/protolists/apiregistry.list @@ -1,3 +1,3 @@ -@com_google_googleapis//google/cloud/apiregistry/v1:common.proto -@com_google_googleapis//google/cloud/apiregistry/v1:resources.proto -@com_google_googleapis//google/cloud/apiregistry/v1:service.proto +@googleapis//google/cloud/apiregistry/v1:common.proto +@googleapis//google/cloud/apiregistry/v1:resources.proto +@googleapis//google/cloud/apiregistry/v1:service.proto diff --git a/external/googleapis/protolists/appengine.list b/external/googleapis/protolists/appengine.list index 251ea26f4e5c8..516ec196250c4 100644 --- a/external/googleapis/protolists/appengine.list +++ b/external/googleapis/protolists/appengine.list @@ -1,18 +1,18 @@ -@com_google_googleapis//google/appengine/legacy:audit_data.proto -@com_google_googleapis//google/appengine/logging/v1:request_log.proto -@com_google_googleapis//google/appengine/v1:app_yaml.proto -@com_google_googleapis//google/appengine/v1:appengine.proto -@com_google_googleapis//google/appengine/v1:application.proto -@com_google_googleapis//google/appengine/v1:audit_data.proto -@com_google_googleapis//google/appengine/v1:certificate.proto -@com_google_googleapis//google/appengine/v1:deploy.proto -@com_google_googleapis//google/appengine/v1:deployed_files.proto -@com_google_googleapis//google/appengine/v1:domain.proto -@com_google_googleapis//google/appengine/v1:domain_mapping.proto -@com_google_googleapis//google/appengine/v1:firewall.proto -@com_google_googleapis//google/appengine/v1:instance.proto -@com_google_googleapis//google/appengine/v1:location.proto -@com_google_googleapis//google/appengine/v1:network_settings.proto -@com_google_googleapis//google/appengine/v1:operation.proto -@com_google_googleapis//google/appengine/v1:service.proto -@com_google_googleapis//google/appengine/v1:version.proto +@googleapis//google/appengine/legacy:audit_data.proto +@googleapis//google/appengine/logging/v1:request_log.proto +@googleapis//google/appengine/v1:app_yaml.proto +@googleapis//google/appengine/v1:appengine.proto +@googleapis//google/appengine/v1:application.proto +@googleapis//google/appengine/v1:audit_data.proto +@googleapis//google/appengine/v1:certificate.proto +@googleapis//google/appengine/v1:deploy.proto +@googleapis//google/appengine/v1:deployed_files.proto +@googleapis//google/appengine/v1:domain.proto +@googleapis//google/appengine/v1:domain_mapping.proto +@googleapis//google/appengine/v1:firewall.proto +@googleapis//google/appengine/v1:instance.proto +@googleapis//google/appengine/v1:location.proto +@googleapis//google/appengine/v1:network_settings.proto +@googleapis//google/appengine/v1:operation.proto +@googleapis//google/appengine/v1:service.proto +@googleapis//google/appengine/v1:version.proto diff --git a/external/googleapis/protolists/apphub.list b/external/googleapis/protolists/apphub.list index 6dc02c5da7f60..aba5a64493d7d 100644 --- a/external/googleapis/protolists/apphub.list +++ b/external/googleapis/protolists/apphub.list @@ -1,6 +1,6 @@ -@com_google_googleapis//google/cloud/apphub/v1:apphub_service.proto -@com_google_googleapis//google/cloud/apphub/v1:application.proto -@com_google_googleapis//google/cloud/apphub/v1:attributes.proto -@com_google_googleapis//google/cloud/apphub/v1:service.proto -@com_google_googleapis//google/cloud/apphub/v1:service_project_attachment.proto -@com_google_googleapis//google/cloud/apphub/v1:workload.proto +@googleapis//google/cloud/apphub/v1:apphub_service.proto +@googleapis//google/cloud/apphub/v1:application.proto +@googleapis//google/cloud/apphub/v1:attributes.proto +@googleapis//google/cloud/apphub/v1:service.proto +@googleapis//google/cloud/apphub/v1:service_project_attachment.proto +@googleapis//google/cloud/apphub/v1:workload.proto diff --git a/external/googleapis/protolists/artifactregistry.list b/external/googleapis/protolists/artifactregistry.list index 78b0bbb95740b..6d9b4ea2b6361 100644 --- a/external/googleapis/protolists/artifactregistry.list +++ b/external/googleapis/protolists/artifactregistry.list @@ -1,17 +1,17 @@ -@com_google_googleapis//google/devtools/artifactregistry/v1:apt_artifact.proto -@com_google_googleapis//google/devtools/artifactregistry/v1:artifact.proto -@com_google_googleapis//google/devtools/artifactregistry/v1:attachment.proto -@com_google_googleapis//google/devtools/artifactregistry/v1:export.proto -@com_google_googleapis//google/devtools/artifactregistry/v1:file.proto -@com_google_googleapis//google/devtools/artifactregistry/v1:generic.proto -@com_google_googleapis//google/devtools/artifactregistry/v1:go.proto -@com_google_googleapis//google/devtools/artifactregistry/v1:kfp_artifact.proto -@com_google_googleapis//google/devtools/artifactregistry/v1:package.proto -@com_google_googleapis//google/devtools/artifactregistry/v1:repository.proto -@com_google_googleapis//google/devtools/artifactregistry/v1:rule.proto -@com_google_googleapis//google/devtools/artifactregistry/v1:service.proto -@com_google_googleapis//google/devtools/artifactregistry/v1:settings.proto -@com_google_googleapis//google/devtools/artifactregistry/v1:tag.proto -@com_google_googleapis//google/devtools/artifactregistry/v1:version.proto -@com_google_googleapis//google/devtools/artifactregistry/v1:vpcsc_config.proto -@com_google_googleapis//google/devtools/artifactregistry/v1:yum_artifact.proto +@googleapis//google/devtools/artifactregistry/v1:apt_artifact.proto +@googleapis//google/devtools/artifactregistry/v1:artifact.proto +@googleapis//google/devtools/artifactregistry/v1:attachment.proto +@googleapis//google/devtools/artifactregistry/v1:export.proto +@googleapis//google/devtools/artifactregistry/v1:file.proto +@googleapis//google/devtools/artifactregistry/v1:generic.proto +@googleapis//google/devtools/artifactregistry/v1:go.proto +@googleapis//google/devtools/artifactregistry/v1:kfp_artifact.proto +@googleapis//google/devtools/artifactregistry/v1:package.proto +@googleapis//google/devtools/artifactregistry/v1:repository.proto +@googleapis//google/devtools/artifactregistry/v1:rule.proto +@googleapis//google/devtools/artifactregistry/v1:service.proto +@googleapis//google/devtools/artifactregistry/v1:settings.proto +@googleapis//google/devtools/artifactregistry/v1:tag.proto +@googleapis//google/devtools/artifactregistry/v1:version.proto +@googleapis//google/devtools/artifactregistry/v1:vpcsc_config.proto +@googleapis//google/devtools/artifactregistry/v1:yum_artifact.proto diff --git a/external/googleapis/protolists/asset.list b/external/googleapis/protolists/asset.list index 4ff0d00333e7d..80d6e2ac1b51a 100644 --- a/external/googleapis/protolists/asset.list +++ b/external/googleapis/protolists/asset.list @@ -1,3 +1,3 @@ -@com_google_googleapis//google/cloud/asset/v1:asset_enrichment_resourceowners.proto -@com_google_googleapis//google/cloud/asset/v1:asset_service.proto -@com_google_googleapis//google/cloud/asset/v1:assets.proto +@googleapis//google/cloud/asset/v1:asset_enrichment_resourceowners.proto +@googleapis//google/cloud/asset/v1:asset_service.proto +@googleapis//google/cloud/asset/v1:assets.proto diff --git a/external/googleapis/protolists/assuredworkloads.list b/external/googleapis/protolists/assuredworkloads.list index df25c7e857683..a121c3154f8ed 100644 --- a/external/googleapis/protolists/assuredworkloads.list +++ b/external/googleapis/protolists/assuredworkloads.list @@ -1 +1 @@ -@com_google_googleapis//google/cloud/assuredworkloads/v1:assuredworkloads.proto +@googleapis//google/cloud/assuredworkloads/v1:assuredworkloads.proto diff --git a/external/googleapis/protolists/auditmanager.list b/external/googleapis/protolists/auditmanager.list index b3b99d045599d..fad3cb6d5e34a 100644 --- a/external/googleapis/protolists/auditmanager.list +++ b/external/googleapis/protolists/auditmanager.list @@ -1 +1 @@ -@com_google_googleapis//google/cloud/auditmanager/v1:auditmanager.proto +@googleapis//google/cloud/auditmanager/v1:auditmanager.proto diff --git a/external/googleapis/protolists/automl.list b/external/googleapis/protolists/automl.list index 8cf18d3f86de7..b07ce43626863 100644 --- a/external/googleapis/protolists/automl.list +++ b/external/googleapis/protolists/automl.list @@ -1,19 +1,19 @@ -@com_google_googleapis//google/cloud/automl/v1:annotation_payload.proto -@com_google_googleapis//google/cloud/automl/v1:annotation_spec.proto -@com_google_googleapis//google/cloud/automl/v1:classification.proto -@com_google_googleapis//google/cloud/automl/v1:data_items.proto -@com_google_googleapis//google/cloud/automl/v1:dataset.proto -@com_google_googleapis//google/cloud/automl/v1:detection.proto -@com_google_googleapis//google/cloud/automl/v1:geometry.proto -@com_google_googleapis//google/cloud/automl/v1:image.proto -@com_google_googleapis//google/cloud/automl/v1:io.proto -@com_google_googleapis//google/cloud/automl/v1:model.proto -@com_google_googleapis//google/cloud/automl/v1:model_evaluation.proto -@com_google_googleapis//google/cloud/automl/v1:operations.proto -@com_google_googleapis//google/cloud/automl/v1:prediction_service.proto -@com_google_googleapis//google/cloud/automl/v1:service.proto -@com_google_googleapis//google/cloud/automl/v1:text.proto -@com_google_googleapis//google/cloud/automl/v1:text_extraction.proto -@com_google_googleapis//google/cloud/automl/v1:text_segment.proto -@com_google_googleapis//google/cloud/automl/v1:text_sentiment.proto -@com_google_googleapis//google/cloud/automl/v1:translation.proto +@googleapis//google/cloud/automl/v1:annotation_payload.proto +@googleapis//google/cloud/automl/v1:annotation_spec.proto +@googleapis//google/cloud/automl/v1:classification.proto +@googleapis//google/cloud/automl/v1:data_items.proto +@googleapis//google/cloud/automl/v1:dataset.proto +@googleapis//google/cloud/automl/v1:detection.proto +@googleapis//google/cloud/automl/v1:geometry.proto +@googleapis//google/cloud/automl/v1:image.proto +@googleapis//google/cloud/automl/v1:io.proto +@googleapis//google/cloud/automl/v1:model.proto +@googleapis//google/cloud/automl/v1:model_evaluation.proto +@googleapis//google/cloud/automl/v1:operations.proto +@googleapis//google/cloud/automl/v1:prediction_service.proto +@googleapis//google/cloud/automl/v1:service.proto +@googleapis//google/cloud/automl/v1:text.proto +@googleapis//google/cloud/automl/v1:text_extraction.proto +@googleapis//google/cloud/automl/v1:text_segment.proto +@googleapis//google/cloud/automl/v1:text_sentiment.proto +@googleapis//google/cloud/automl/v1:translation.proto diff --git a/external/googleapis/protolists/backupdr.list b/external/googleapis/protolists/backupdr.list index 05924108c54f1..5bfa09f28b558 100644 --- a/external/googleapis/protolists/backupdr.list +++ b/external/googleapis/protolists/backupdr.list @@ -1,14 +1,14 @@ -@com_google_googleapis//google/cloud/backupdr/logging/v1:bdr_log.proto -@com_google_googleapis//google/cloud/backupdr/logging/v1:eventlog.proto -@com_google_googleapis//google/cloud/backupdr/logging/v1:reportlog.proto -@com_google_googleapis//google/cloud/backupdr/v1:backupdr.proto -@com_google_googleapis//google/cloud/backupdr/v1:backupplan.proto -@com_google_googleapis//google/cloud/backupdr/v1:backupplanassociation.proto -@com_google_googleapis//google/cloud/backupdr/v1:backupvault.proto -@com_google_googleapis//google/cloud/backupdr/v1:backupvault_alloydb.proto -@com_google_googleapis//google/cloud/backupdr/v1:backupvault_ba.proto -@com_google_googleapis//google/cloud/backupdr/v1:backupvault_cloudsql.proto -@com_google_googleapis//google/cloud/backupdr/v1:backupvault_disk.proto -@com_google_googleapis//google/cloud/backupdr/v1:backupvault_gce.proto -@com_google_googleapis//google/cloud/backupdr/v1:datasourcereference.proto -@com_google_googleapis//google/cloud/backupdr/v1:protection_summary.proto +@googleapis//google/cloud/backupdr/logging/v1:bdr_log.proto +@googleapis//google/cloud/backupdr/logging/v1:eventlog.proto +@googleapis//google/cloud/backupdr/logging/v1:reportlog.proto +@googleapis//google/cloud/backupdr/v1:backupdr.proto +@googleapis//google/cloud/backupdr/v1:backupplan.proto +@googleapis//google/cloud/backupdr/v1:backupplanassociation.proto +@googleapis//google/cloud/backupdr/v1:backupvault.proto +@googleapis//google/cloud/backupdr/v1:backupvault_alloydb.proto +@googleapis//google/cloud/backupdr/v1:backupvault_ba.proto +@googleapis//google/cloud/backupdr/v1:backupvault_cloudsql.proto +@googleapis//google/cloud/backupdr/v1:backupvault_disk.proto +@googleapis//google/cloud/backupdr/v1:backupvault_gce.proto +@googleapis//google/cloud/backupdr/v1:datasourcereference.proto +@googleapis//google/cloud/backupdr/v1:protection_summary.proto diff --git a/external/googleapis/protolists/baremetalsolution.list b/external/googleapis/protolists/baremetalsolution.list index d4f8031e3af14..e0db0788073d7 100644 --- a/external/googleapis/protolists/baremetalsolution.list +++ b/external/googleapis/protolists/baremetalsolution.list @@ -1,11 +1,11 @@ -@com_google_googleapis//google/cloud/baremetalsolution/v2:baremetalsolution.proto -@com_google_googleapis//google/cloud/baremetalsolution/v2:common.proto -@com_google_googleapis//google/cloud/baremetalsolution/v2:instance.proto -@com_google_googleapis//google/cloud/baremetalsolution/v2:lun.proto -@com_google_googleapis//google/cloud/baremetalsolution/v2:network.proto -@com_google_googleapis//google/cloud/baremetalsolution/v2:nfs_share.proto -@com_google_googleapis//google/cloud/baremetalsolution/v2:osimage.proto -@com_google_googleapis//google/cloud/baremetalsolution/v2:provisioning.proto -@com_google_googleapis//google/cloud/baremetalsolution/v2:ssh_key.proto -@com_google_googleapis//google/cloud/baremetalsolution/v2:volume.proto -@com_google_googleapis//google/cloud/baremetalsolution/v2:volume_snapshot.proto +@googleapis//google/cloud/baremetalsolution/v2:baremetalsolution.proto +@googleapis//google/cloud/baremetalsolution/v2:common.proto +@googleapis//google/cloud/baremetalsolution/v2:instance.proto +@googleapis//google/cloud/baremetalsolution/v2:lun.proto +@googleapis//google/cloud/baremetalsolution/v2:network.proto +@googleapis//google/cloud/baremetalsolution/v2:nfs_share.proto +@googleapis//google/cloud/baremetalsolution/v2:osimage.proto +@googleapis//google/cloud/baremetalsolution/v2:provisioning.proto +@googleapis//google/cloud/baremetalsolution/v2:ssh_key.proto +@googleapis//google/cloud/baremetalsolution/v2:volume.proto +@googleapis//google/cloud/baremetalsolution/v2:volume_snapshot.proto diff --git a/external/googleapis/protolists/batch.list b/external/googleapis/protolists/batch.list index 8e615a6b74a8e..368ec70f8a92a 100644 --- a/external/googleapis/protolists/batch.list +++ b/external/googleapis/protolists/batch.list @@ -1,4 +1,4 @@ -@com_google_googleapis//google/cloud/batch/v1:batch.proto -@com_google_googleapis//google/cloud/batch/v1:job.proto -@com_google_googleapis//google/cloud/batch/v1:task.proto -@com_google_googleapis//google/cloud/batch/v1:volume.proto +@googleapis//google/cloud/batch/v1:batch.proto +@googleapis//google/cloud/batch/v1:job.proto +@googleapis//google/cloud/batch/v1:task.proto +@googleapis//google/cloud/batch/v1:volume.proto diff --git a/external/googleapis/protolists/beyondcorp.list b/external/googleapis/protolists/beyondcorp.list index 10748ee775e2c..d4446e7f910bf 100644 --- a/external/googleapis/protolists/beyondcorp.list +++ b/external/googleapis/protolists/beyondcorp.list @@ -1,5 +1,5 @@ -@com_google_googleapis//google/cloud/beyondcorp/appconnections/v1:app_connections_service.proto -@com_google_googleapis//google/cloud/beyondcorp/appconnectors/v1:app_connector_instance_config.proto -@com_google_googleapis//google/cloud/beyondcorp/appconnectors/v1:app_connectors_service.proto -@com_google_googleapis//google/cloud/beyondcorp/appconnectors/v1:resource_info.proto -@com_google_googleapis//google/cloud/beyondcorp/appgateways/v1:app_gateways_service.proto +@googleapis//google/cloud/beyondcorp/appconnections/v1:app_connections_service.proto +@googleapis//google/cloud/beyondcorp/appconnectors/v1:app_connector_instance_config.proto +@googleapis//google/cloud/beyondcorp/appconnectors/v1:app_connectors_service.proto +@googleapis//google/cloud/beyondcorp/appconnectors/v1:resource_info.proto +@googleapis//google/cloud/beyondcorp/appgateways/v1:app_gateways_service.proto diff --git a/external/googleapis/protolists/bigquery.list b/external/googleapis/protolists/bigquery.list index ff1e1fee59832..698330da6e199 100644 --- a/external/googleapis/protolists/bigquery.list +++ b/external/googleapis/protolists/bigquery.list @@ -1,25 +1,25 @@ -@com_google_googleapis//google/cloud/bigquery/analyticshub/v1:analyticshub.proto -@com_google_googleapis//google/cloud/bigquery/analyticshub/v1:pubsub.proto -@com_google_googleapis//google/cloud/bigquery/biglake/v1:metastore.proto -@com_google_googleapis//google/cloud/bigquery/connection/v1:connection.proto -@com_google_googleapis//google/cloud/bigquery/datapolicies/v1:datapolicy.proto -@com_google_googleapis//google/cloud/bigquery/datapolicies/v2:datapolicy.proto -@com_google_googleapis//google/cloud/bigquery/datatransfer/v1:datatransfer.proto -@com_google_googleapis//google/cloud/bigquery/datatransfer/v1:transfer.proto -@com_google_googleapis//google/cloud/bigquery/logging/v1:audit_data.proto -@com_google_googleapis//google/cloud/bigquery/migration/v2:migration_entities.proto -@com_google_googleapis//google/cloud/bigquery/migration/v2:migration_error_details.proto -@com_google_googleapis//google/cloud/bigquery/migration/v2:migration_metrics.proto -@com_google_googleapis//google/cloud/bigquery/migration/v2:migration_service.proto -@com_google_googleapis//google/cloud/bigquery/migration/v2:translation_config.proto -@com_google_googleapis//google/cloud/bigquery/migration/v2:translation_details.proto -@com_google_googleapis//google/cloud/bigquery/migration/v2:translation_suggestion.proto -@com_google_googleapis//google/cloud/bigquery/migration/v2:translation_usability.proto -@com_google_googleapis//google/cloud/bigquery/reservation/v1:reservation.proto -@com_google_googleapis//google/cloud/bigquery/storage/v1:annotations.proto -@com_google_googleapis//google/cloud/bigquery/storage/v1:arrow.proto -@com_google_googleapis//google/cloud/bigquery/storage/v1:avro.proto -@com_google_googleapis//google/cloud/bigquery/storage/v1:protobuf.proto -@com_google_googleapis//google/cloud/bigquery/storage/v1:storage.proto -@com_google_googleapis//google/cloud/bigquery/storage/v1:stream.proto -@com_google_googleapis//google/cloud/bigquery/storage/v1:table.proto +@googleapis//google/cloud/bigquery/analyticshub/v1:analyticshub.proto +@googleapis//google/cloud/bigquery/analyticshub/v1:pubsub.proto +@googleapis//google/cloud/bigquery/biglake/v1:metastore.proto +@googleapis//google/cloud/bigquery/connection/v1:connection.proto +@googleapis//google/cloud/bigquery/datapolicies/v1:datapolicy.proto +@googleapis//google/cloud/bigquery/datapolicies/v2:datapolicy.proto +@googleapis//google/cloud/bigquery/datatransfer/v1:datatransfer.proto +@googleapis//google/cloud/bigquery/datatransfer/v1:transfer.proto +@googleapis//google/cloud/bigquery/logging/v1:audit_data.proto +@googleapis//google/cloud/bigquery/migration/v2:migration_entities.proto +@googleapis//google/cloud/bigquery/migration/v2:migration_error_details.proto +@googleapis//google/cloud/bigquery/migration/v2:migration_metrics.proto +@googleapis//google/cloud/bigquery/migration/v2:migration_service.proto +@googleapis//google/cloud/bigquery/migration/v2:translation_config.proto +@googleapis//google/cloud/bigquery/migration/v2:translation_details.proto +@googleapis//google/cloud/bigquery/migration/v2:translation_suggestion.proto +@googleapis//google/cloud/bigquery/migration/v2:translation_usability.proto +@googleapis//google/cloud/bigquery/reservation/v1:reservation.proto +@googleapis//google/cloud/bigquery/storage/v1:annotations.proto +@googleapis//google/cloud/bigquery/storage/v1:arrow.proto +@googleapis//google/cloud/bigquery/storage/v1:avro.proto +@googleapis//google/cloud/bigquery/storage/v1:protobuf.proto +@googleapis//google/cloud/bigquery/storage/v1:storage.proto +@googleapis//google/cloud/bigquery/storage/v1:stream.proto +@googleapis//google/cloud/bigquery/storage/v1:table.proto diff --git a/external/googleapis/protolists/bigquerycontrol.list b/external/googleapis/protolists/bigquerycontrol.list index a63307013bf8c..24283eeabae6e 100644 --- a/external/googleapis/protolists/bigquerycontrol.list +++ b/external/googleapis/protolists/bigquerycontrol.list @@ -1,45 +1,45 @@ -@com_google_googleapis//google/cloud/bigquery/v2:biglake_config.proto -@com_google_googleapis//google/cloud/bigquery/v2:clustering.proto -@com_google_googleapis//google/cloud/bigquery/v2:data_format_options.proto -@com_google_googleapis//google/cloud/bigquery/v2:dataset.proto -@com_google_googleapis//google/cloud/bigquery/v2:dataset_reference.proto -@com_google_googleapis//google/cloud/bigquery/v2:decimal_target_types.proto -@com_google_googleapis//google/cloud/bigquery/v2:encryption_config.proto -@com_google_googleapis//google/cloud/bigquery/v2:error.proto -@com_google_googleapis//google/cloud/bigquery/v2:external_catalog_dataset_options.proto -@com_google_googleapis//google/cloud/bigquery/v2:external_catalog_table_options.proto -@com_google_googleapis//google/cloud/bigquery/v2:external_data_config.proto -@com_google_googleapis//google/cloud/bigquery/v2:external_dataset_reference.proto -@com_google_googleapis//google/cloud/bigquery/v2:file_set_specification_type.proto -@com_google_googleapis//google/cloud/bigquery/v2:hive_partitioning.proto -@com_google_googleapis//google/cloud/bigquery/v2:job.proto -@com_google_googleapis//google/cloud/bigquery/v2:job_config.proto -@com_google_googleapis//google/cloud/bigquery/v2:job_creation_reason.proto -@com_google_googleapis//google/cloud/bigquery/v2:job_reference.proto -@com_google_googleapis//google/cloud/bigquery/v2:job_stats.proto -@com_google_googleapis//google/cloud/bigquery/v2:job_status.proto -@com_google_googleapis//google/cloud/bigquery/v2:json_extension.proto -@com_google_googleapis//google/cloud/bigquery/v2:location_metadata.proto -@com_google_googleapis//google/cloud/bigquery/v2:managed_table_type.proto -@com_google_googleapis//google/cloud/bigquery/v2:map_target_type.proto -@com_google_googleapis//google/cloud/bigquery/v2:model.proto -@com_google_googleapis//google/cloud/bigquery/v2:model_reference.proto -@com_google_googleapis//google/cloud/bigquery/v2:partitioning_definition.proto -@com_google_googleapis//google/cloud/bigquery/v2:privacy_policy.proto -@com_google_googleapis//google/cloud/bigquery/v2:project.proto -@com_google_googleapis//google/cloud/bigquery/v2:query_parameter.proto -@com_google_googleapis//google/cloud/bigquery/v2:range_partitioning.proto -@com_google_googleapis//google/cloud/bigquery/v2:restriction_config.proto -@com_google_googleapis//google/cloud/bigquery/v2:routine.proto -@com_google_googleapis//google/cloud/bigquery/v2:routine_reference.proto -@com_google_googleapis//google/cloud/bigquery/v2:row_access_policy.proto -@com_google_googleapis//google/cloud/bigquery/v2:row_access_policy_reference.proto -@com_google_googleapis//google/cloud/bigquery/v2:session_info.proto -@com_google_googleapis//google/cloud/bigquery/v2:standard_sql.proto -@com_google_googleapis//google/cloud/bigquery/v2:system_variable.proto -@com_google_googleapis//google/cloud/bigquery/v2:table.proto -@com_google_googleapis//google/cloud/bigquery/v2:table_constraints.proto -@com_google_googleapis//google/cloud/bigquery/v2:table_reference.proto -@com_google_googleapis//google/cloud/bigquery/v2:table_schema.proto -@com_google_googleapis//google/cloud/bigquery/v2:time_partitioning.proto -@com_google_googleapis//google/cloud/bigquery/v2:udf_resource.proto +@googleapis//google/cloud/bigquery/v2:biglake_config.proto +@googleapis//google/cloud/bigquery/v2:clustering.proto +@googleapis//google/cloud/bigquery/v2:data_format_options.proto +@googleapis//google/cloud/bigquery/v2:dataset.proto +@googleapis//google/cloud/bigquery/v2:dataset_reference.proto +@googleapis//google/cloud/bigquery/v2:decimal_target_types.proto +@googleapis//google/cloud/bigquery/v2:encryption_config.proto +@googleapis//google/cloud/bigquery/v2:error.proto +@googleapis//google/cloud/bigquery/v2:external_catalog_dataset_options.proto +@googleapis//google/cloud/bigquery/v2:external_catalog_table_options.proto +@googleapis//google/cloud/bigquery/v2:external_data_config.proto +@googleapis//google/cloud/bigquery/v2:external_dataset_reference.proto +@googleapis//google/cloud/bigquery/v2:file_set_specification_type.proto +@googleapis//google/cloud/bigquery/v2:hive_partitioning.proto +@googleapis//google/cloud/bigquery/v2:job.proto +@googleapis//google/cloud/bigquery/v2:job_config.proto +@googleapis//google/cloud/bigquery/v2:job_creation_reason.proto +@googleapis//google/cloud/bigquery/v2:job_reference.proto +@googleapis//google/cloud/bigquery/v2:job_stats.proto +@googleapis//google/cloud/bigquery/v2:job_status.proto +@googleapis//google/cloud/bigquery/v2:json_extension.proto +@googleapis//google/cloud/bigquery/v2:location_metadata.proto +@googleapis//google/cloud/bigquery/v2:managed_table_type.proto +@googleapis//google/cloud/bigquery/v2:map_target_type.proto +@googleapis//google/cloud/bigquery/v2:model.proto +@googleapis//google/cloud/bigquery/v2:model_reference.proto +@googleapis//google/cloud/bigquery/v2:partitioning_definition.proto +@googleapis//google/cloud/bigquery/v2:privacy_policy.proto +@googleapis//google/cloud/bigquery/v2:project.proto +@googleapis//google/cloud/bigquery/v2:query_parameter.proto +@googleapis//google/cloud/bigquery/v2:range_partitioning.proto +@googleapis//google/cloud/bigquery/v2:restriction_config.proto +@googleapis//google/cloud/bigquery/v2:routine.proto +@googleapis//google/cloud/bigquery/v2:routine_reference.proto +@googleapis//google/cloud/bigquery/v2:row_access_policy.proto +@googleapis//google/cloud/bigquery/v2:row_access_policy_reference.proto +@googleapis//google/cloud/bigquery/v2:session_info.proto +@googleapis//google/cloud/bigquery/v2:standard_sql.proto +@googleapis//google/cloud/bigquery/v2:system_variable.proto +@googleapis//google/cloud/bigquery/v2:table.proto +@googleapis//google/cloud/bigquery/v2:table_constraints.proto +@googleapis//google/cloud/bigquery/v2:table_reference.proto +@googleapis//google/cloud/bigquery/v2:table_schema.proto +@googleapis//google/cloud/bigquery/v2:time_partitioning.proto +@googleapis//google/cloud/bigquery/v2:udf_resource.proto diff --git a/external/googleapis/protolists/bigtable.list b/external/googleapis/protolists/bigtable.list index 04cbd7ae40fe2..11a5e6f60c84f 100644 --- a/external/googleapis/protolists/bigtable.list +++ b/external/googleapis/protolists/bigtable.list @@ -1,13 +1,13 @@ -@com_google_googleapis//google/bigtable/admin/v2:bigtable_instance_admin.proto -@com_google_googleapis//google/bigtable/admin/v2:bigtable_table_admin.proto -@com_google_googleapis//google/bigtable/admin/v2:common.proto -@com_google_googleapis//google/bigtable/admin/v2:instance.proto -@com_google_googleapis//google/bigtable/admin/v2:table.proto -@com_google_googleapis//google/bigtable/admin/v2:types.proto -@com_google_googleapis//google/bigtable/v2:bigtable.proto -@com_google_googleapis//google/bigtable/v2:data.proto -@com_google_googleapis//google/bigtable/v2:feature_flags.proto -@com_google_googleapis//google/bigtable/v2:peer_info.proto -@com_google_googleapis//google/bigtable/v2:request_stats.proto -@com_google_googleapis//google/bigtable/v2:response_params.proto -@com_google_googleapis//google/bigtable/v2:types.proto +@googleapis//google/bigtable/admin/v2:bigtable_instance_admin.proto +@googleapis//google/bigtable/admin/v2:bigtable_table_admin.proto +@googleapis//google/bigtable/admin/v2:common.proto +@googleapis//google/bigtable/admin/v2:instance.proto +@googleapis//google/bigtable/admin/v2:table.proto +@googleapis//google/bigtable/admin/v2:types.proto +@googleapis//google/bigtable/v2:bigtable.proto +@googleapis//google/bigtable/v2:data.proto +@googleapis//google/bigtable/v2:feature_flags.proto +@googleapis//google/bigtable/v2:peer_info.proto +@googleapis//google/bigtable/v2:request_stats.proto +@googleapis//google/bigtable/v2:response_params.proto +@googleapis//google/bigtable/v2:types.proto diff --git a/external/googleapis/protolists/billing.list b/external/googleapis/protolists/billing.list index 4af71adda7eae..cbf0ce79640cf 100644 --- a/external/googleapis/protolists/billing.list +++ b/external/googleapis/protolists/billing.list @@ -1,4 +1,4 @@ -@com_google_googleapis//google/cloud/billing/budgets/v1:budget_model.proto -@com_google_googleapis//google/cloud/billing/budgets/v1:budget_service.proto -@com_google_googleapis//google/cloud/billing/v1:cloud_billing.proto -@com_google_googleapis//google/cloud/billing/v1:cloud_catalog.proto +@googleapis//google/cloud/billing/budgets/v1:budget_model.proto +@googleapis//google/cloud/billing/budgets/v1:budget_service.proto +@googleapis//google/cloud/billing/v1:cloud_billing.proto +@googleapis//google/cloud/billing/v1:cloud_catalog.proto diff --git a/external/googleapis/protolists/binaryauthorization.list b/external/googleapis/protolists/binaryauthorization.list index 41f5317c7311b..8d26c8c896bdc 100644 --- a/external/googleapis/protolists/binaryauthorization.list +++ b/external/googleapis/protolists/binaryauthorization.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/cloud/binaryauthorization/v1:resources.proto -@com_google_googleapis//google/cloud/binaryauthorization/v1:service.proto +@googleapis//google/cloud/binaryauthorization/v1:resources.proto +@googleapis//google/cloud/binaryauthorization/v1:service.proto diff --git a/external/googleapis/protolists/certificatemanager.list b/external/googleapis/protolists/certificatemanager.list index d11935b471f25..48ca808eede2c 100644 --- a/external/googleapis/protolists/certificatemanager.list +++ b/external/googleapis/protolists/certificatemanager.list @@ -1,4 +1,4 @@ -@com_google_googleapis//google/cloud/certificatemanager/logging/v1:logs.proto -@com_google_googleapis//google/cloud/certificatemanager/v1:certificate_issuance_config.proto -@com_google_googleapis//google/cloud/certificatemanager/v1:certificate_manager.proto -@com_google_googleapis//google/cloud/certificatemanager/v1:trust_config.proto +@googleapis//google/cloud/certificatemanager/logging/v1:logs.proto +@googleapis//google/cloud/certificatemanager/v1:certificate_issuance_config.proto +@googleapis//google/cloud/certificatemanager/v1:certificate_manager.proto +@googleapis//google/cloud/certificatemanager/v1:trust_config.proto diff --git a/external/googleapis/protolists/channel.list b/external/googleapis/protolists/channel.list index 919472ea6530f..4f766a7eb934f 100644 --- a/external/googleapis/protolists/channel.list +++ b/external/googleapis/protolists/channel.list @@ -1,13 +1,13 @@ -@com_google_googleapis//google/cloud/channel/v1:billing_accounts.proto -@com_google_googleapis//google/cloud/channel/v1:channel_partner_links.proto -@com_google_googleapis//google/cloud/channel/v1:common.proto -@com_google_googleapis//google/cloud/channel/v1:customers.proto -@com_google_googleapis//google/cloud/channel/v1:entitlement_changes.proto -@com_google_googleapis//google/cloud/channel/v1:entitlements.proto -@com_google_googleapis//google/cloud/channel/v1:offers.proto -@com_google_googleapis//google/cloud/channel/v1:operations.proto -@com_google_googleapis//google/cloud/channel/v1:products.proto -@com_google_googleapis//google/cloud/channel/v1:reports_service.proto -@com_google_googleapis//google/cloud/channel/v1:repricing.proto -@com_google_googleapis//google/cloud/channel/v1:service.proto -@com_google_googleapis//google/cloud/channel/v1:subscriber_event.proto +@googleapis//google/cloud/channel/v1:billing_accounts.proto +@googleapis//google/cloud/channel/v1:channel_partner_links.proto +@googleapis//google/cloud/channel/v1:common.proto +@googleapis//google/cloud/channel/v1:customers.proto +@googleapis//google/cloud/channel/v1:entitlement_changes.proto +@googleapis//google/cloud/channel/v1:entitlements.proto +@googleapis//google/cloud/channel/v1:offers.proto +@googleapis//google/cloud/channel/v1:operations.proto +@googleapis//google/cloud/channel/v1:products.proto +@googleapis//google/cloud/channel/v1:reports_service.proto +@googleapis//google/cloud/channel/v1:repricing.proto +@googleapis//google/cloud/channel/v1:service.proto +@googleapis//google/cloud/channel/v1:subscriber_event.proto diff --git a/external/googleapis/protolists/chronicle.list b/external/googleapis/protolists/chronicle.list index a294e00e28651..e05a4e8606f15 100644 --- a/external/googleapis/protolists/chronicle.list +++ b/external/googleapis/protolists/chronicle.list @@ -1,5 +1,5 @@ -@com_google_googleapis//google/cloud/chronicle/v1:data_access_control.proto -@com_google_googleapis//google/cloud/chronicle/v1:entity.proto -@com_google_googleapis//google/cloud/chronicle/v1:instance.proto -@com_google_googleapis//google/cloud/chronicle/v1:reference_list.proto -@com_google_googleapis//google/cloud/chronicle/v1:rule.proto +@googleapis//google/cloud/chronicle/v1:data_access_control.proto +@googleapis//google/cloud/chronicle/v1:entity.proto +@googleapis//google/cloud/chronicle/v1:instance.proto +@googleapis//google/cloud/chronicle/v1:reference_list.proto +@googleapis//google/cloud/chronicle/v1:rule.proto diff --git a/external/googleapis/protolists/cloudbuild.list b/external/googleapis/protolists/cloudbuild.list index 1e26f22148d64..4afb9ed5272c4 100644 --- a/external/googleapis/protolists/cloudbuild.list +++ b/external/googleapis/protolists/cloudbuild.list @@ -1,3 +1,3 @@ -@com_google_googleapis//google/devtools/cloudbuild/v1:cloudbuild.proto -@com_google_googleapis//google/devtools/cloudbuild/v2:cloudbuild.proto -@com_google_googleapis//google/devtools/cloudbuild/v2:repositories.proto +@googleapis//google/devtools/cloudbuild/v1:cloudbuild.proto +@googleapis//google/devtools/cloudbuild/v2:cloudbuild.proto +@googleapis//google/devtools/cloudbuild/v2:repositories.proto diff --git a/external/googleapis/protolists/cloudcontrolspartner.list b/external/googleapis/protolists/cloudcontrolspartner.list index 84f72822624a4..3d10ba213c1e9 100644 --- a/external/googleapis/protolists/cloudcontrolspartner.list +++ b/external/googleapis/protolists/cloudcontrolspartner.list @@ -1,10 +1,10 @@ -@com_google_googleapis//google/cloud/cloudcontrolspartner/v1:access_approval_requests.proto -@com_google_googleapis//google/cloud/cloudcontrolspartner/v1:completion_state.proto -@com_google_googleapis//google/cloud/cloudcontrolspartner/v1:core.proto -@com_google_googleapis//google/cloud/cloudcontrolspartner/v1:customer_workloads.proto -@com_google_googleapis//google/cloud/cloudcontrolspartner/v1:customers.proto -@com_google_googleapis//google/cloud/cloudcontrolspartner/v1:ekm_connections.proto -@com_google_googleapis//google/cloud/cloudcontrolspartner/v1:monitoring.proto -@com_google_googleapis//google/cloud/cloudcontrolspartner/v1:partner_permissions.proto -@com_google_googleapis//google/cloud/cloudcontrolspartner/v1:partners.proto -@com_google_googleapis//google/cloud/cloudcontrolspartner/v1:violations.proto +@googleapis//google/cloud/cloudcontrolspartner/v1:access_approval_requests.proto +@googleapis//google/cloud/cloudcontrolspartner/v1:completion_state.proto +@googleapis//google/cloud/cloudcontrolspartner/v1:core.proto +@googleapis//google/cloud/cloudcontrolspartner/v1:customer_workloads.proto +@googleapis//google/cloud/cloudcontrolspartner/v1:customers.proto +@googleapis//google/cloud/cloudcontrolspartner/v1:ekm_connections.proto +@googleapis//google/cloud/cloudcontrolspartner/v1:monitoring.proto +@googleapis//google/cloud/cloudcontrolspartner/v1:partner_permissions.proto +@googleapis//google/cloud/cloudcontrolspartner/v1:partners.proto +@googleapis//google/cloud/cloudcontrolspartner/v1:violations.proto diff --git a/external/googleapis/protolists/cloudquotas.list b/external/googleapis/protolists/cloudquotas.list index f40de87299fd9..bbc5f30d7016c 100644 --- a/external/googleapis/protolists/cloudquotas.list +++ b/external/googleapis/protolists/cloudquotas.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/api/cloudquotas/v1:cloudquotas.proto -@com_google_googleapis//google/api/cloudquotas/v1:resources.proto +@googleapis//google/api/cloudquotas/v1:cloudquotas.proto +@googleapis//google/api/cloudquotas/v1:resources.proto diff --git a/external/googleapis/protolists/cloudsecuritycompliance.list b/external/googleapis/protolists/cloudsecuritycompliance.list index a7bde6c85dccf..b998f802c1039 100644 --- a/external/googleapis/protolists/cloudsecuritycompliance.list +++ b/external/googleapis/protolists/cloudsecuritycompliance.list @@ -1,6 +1,6 @@ -@com_google_googleapis//google/cloud/cloudsecuritycompliance/v1:audit.proto -@com_google_googleapis//google/cloud/cloudsecuritycompliance/v1:cm_enrollment_service.proto -@com_google_googleapis//google/cloud/cloudsecuritycompliance/v1:common.proto -@com_google_googleapis//google/cloud/cloudsecuritycompliance/v1:config.proto -@com_google_googleapis//google/cloud/cloudsecuritycompliance/v1:deployment.proto -@com_google_googleapis//google/cloud/cloudsecuritycompliance/v1:monitoring.proto +@googleapis//google/cloud/cloudsecuritycompliance/v1:audit.proto +@googleapis//google/cloud/cloudsecuritycompliance/v1:cm_enrollment_service.proto +@googleapis//google/cloud/cloudsecuritycompliance/v1:common.proto +@googleapis//google/cloud/cloudsecuritycompliance/v1:config.proto +@googleapis//google/cloud/cloudsecuritycompliance/v1:deployment.proto +@googleapis//google/cloud/cloudsecuritycompliance/v1:monitoring.proto diff --git a/external/googleapis/protolists/commerce.list b/external/googleapis/protolists/commerce.list index 002d4d2a5b930..1c6c2bb5de357 100644 --- a/external/googleapis/protolists/commerce.list +++ b/external/googleapis/protolists/commerce.list @@ -1,3 +1,3 @@ -@com_google_googleapis//google/cloud/commerce/consumer/procurement/v1:license_management_service.proto -@com_google_googleapis//google/cloud/commerce/consumer/procurement/v1:order.proto -@com_google_googleapis//google/cloud/commerce/consumer/procurement/v1:procurement_service.proto +@googleapis//google/cloud/commerce/consumer/procurement/v1:license_management_service.proto +@googleapis//google/cloud/commerce/consumer/procurement/v1:order.proto +@googleapis//google/cloud/commerce/consumer/procurement/v1:procurement_service.proto diff --git a/external/googleapis/protolists/common.list b/external/googleapis/protolists/common.list index 67a3ab77f8387..a0cb24dea2b98 100644 --- a/external/googleapis/protolists/common.list +++ b/external/googleapis/protolists/common.list @@ -1 +1 @@ -@com_google_googleapis//google/cloud/common:operation_metadata.proto +@googleapis//google/cloud/common:operation_metadata.proto diff --git a/external/googleapis/protolists/composer.list b/external/googleapis/protolists/composer.list index cb3d1f7ea017d..bffa84ffd8040 100644 --- a/external/googleapis/protolists/composer.list +++ b/external/googleapis/protolists/composer.list @@ -1,3 +1,3 @@ -@com_google_googleapis//google/cloud/orchestration/airflow/service/v1:environments.proto -@com_google_googleapis//google/cloud/orchestration/airflow/service/v1:image_versions.proto -@com_google_googleapis//google/cloud/orchestration/airflow/service/v1:operations.proto +@googleapis//google/cloud/orchestration/airflow/service/v1:environments.proto +@googleapis//google/cloud/orchestration/airflow/service/v1:image_versions.proto +@googleapis//google/cloud/orchestration/airflow/service/v1:operations.proto diff --git a/external/googleapis/protolists/confidentialcomputing.list b/external/googleapis/protolists/confidentialcomputing.list index 64493bb25a660..194675ea9cafe 100644 --- a/external/googleapis/protolists/confidentialcomputing.list +++ b/external/googleapis/protolists/confidentialcomputing.list @@ -1 +1 @@ -@com_google_googleapis//google/cloud/confidentialcomputing/v1:service.proto +@googleapis//google/cloud/confidentialcomputing/v1:service.proto diff --git a/external/googleapis/protolists/config.list b/external/googleapis/protolists/config.list index b04623d899593..43d1cb13a8179 100644 --- a/external/googleapis/protolists/config.list +++ b/external/googleapis/protolists/config.list @@ -1 +1 @@ -@com_google_googleapis//google/cloud/config/v1:config.proto +@googleapis//google/cloud/config/v1:config.proto diff --git a/external/googleapis/protolists/configdelivery.list b/external/googleapis/protolists/configdelivery.list index 5188314ee93f1..55475568c20e4 100644 --- a/external/googleapis/protolists/configdelivery.list +++ b/external/googleapis/protolists/configdelivery.list @@ -1 +1 @@ -@com_google_googleapis//google/cloud/configdelivery/v1:config_delivery.proto +@googleapis//google/cloud/configdelivery/v1:config_delivery.proto diff --git a/external/googleapis/protolists/connectors.list b/external/googleapis/protolists/connectors.list index abe5ebbba3cda..e3cf9badab54f 100644 --- a/external/googleapis/protolists/connectors.list +++ b/external/googleapis/protolists/connectors.list @@ -1,11 +1,11 @@ -@com_google_googleapis//google/cloud/connectors/v1:authconfig.proto -@com_google_googleapis//google/cloud/connectors/v1:common.proto -@com_google_googleapis//google/cloud/connectors/v1:connection.proto -@com_google_googleapis//google/cloud/connectors/v1:connector.proto -@com_google_googleapis//google/cloud/connectors/v1:connector_version.proto -@com_google_googleapis//google/cloud/connectors/v1:connectors_service.proto -@com_google_googleapis//google/cloud/connectors/v1:destination_config.proto -@com_google_googleapis//google/cloud/connectors/v1:provider.proto -@com_google_googleapis//google/cloud/connectors/v1:runtime.proto -@com_google_googleapis//google/cloud/connectors/v1:settings.proto -@com_google_googleapis//google/cloud/connectors/v1:ssl_config.proto +@googleapis//google/cloud/connectors/v1:authconfig.proto +@googleapis//google/cloud/connectors/v1:common.proto +@googleapis//google/cloud/connectors/v1:connection.proto +@googleapis//google/cloud/connectors/v1:connector.proto +@googleapis//google/cloud/connectors/v1:connector_version.proto +@googleapis//google/cloud/connectors/v1:connectors_service.proto +@googleapis//google/cloud/connectors/v1:destination_config.proto +@googleapis//google/cloud/connectors/v1:provider.proto +@googleapis//google/cloud/connectors/v1:runtime.proto +@googleapis//google/cloud/connectors/v1:settings.proto +@googleapis//google/cloud/connectors/v1:ssl_config.proto diff --git a/external/googleapis/protolists/contactcenterinsights.list b/external/googleapis/protolists/contactcenterinsights.list index 462afe82f2ed3..19c2eee697f1c 100644 --- a/external/googleapis/protolists/contactcenterinsights.list +++ b/external/googleapis/protolists/contactcenterinsights.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/cloud/contactcenterinsights/v1:contact_center_insights.proto -@com_google_googleapis//google/cloud/contactcenterinsights/v1:resources.proto +@googleapis//google/cloud/contactcenterinsights/v1:contact_center_insights.proto +@googleapis//google/cloud/contactcenterinsights/v1:resources.proto diff --git a/external/googleapis/protolists/container.list b/external/googleapis/protolists/container.list index 387306c1dcf8f..b1d4a753de836 100644 --- a/external/googleapis/protolists/container.list +++ b/external/googleapis/protolists/container.list @@ -1 +1 @@ -@com_google_googleapis//google/container/v1:cluster_service.proto +@googleapis//google/container/v1:cluster_service.proto diff --git a/external/googleapis/protolists/containeranalysis.list b/external/googleapis/protolists/containeranalysis.list index cf04e89e6ceb3..665fd476ce103 100644 --- a/external/googleapis/protolists/containeranalysis.list +++ b/external/googleapis/protolists/containeranalysis.list @@ -1 +1 @@ -@com_google_googleapis//google/devtools/containeranalysis/v1:containeranalysis.proto +@googleapis//google/devtools/containeranalysis/v1:containeranalysis.proto diff --git a/external/googleapis/protolists/contentwarehouse.list b/external/googleapis/protolists/contentwarehouse.list index 206b4c4364062..71d026e2307fa 100644 --- a/external/googleapis/protolists/contentwarehouse.list +++ b/external/googleapis/protolists/contentwarehouse.list @@ -1,18 +1,18 @@ -@com_google_googleapis//google/cloud/contentwarehouse/v1:async_document_service_request.proto -@com_google_googleapis//google/cloud/contentwarehouse/v1:common.proto -@com_google_googleapis//google/cloud/contentwarehouse/v1:document.proto -@com_google_googleapis//google/cloud/contentwarehouse/v1:document_link_service.proto -@com_google_googleapis//google/cloud/contentwarehouse/v1:document_schema.proto -@com_google_googleapis//google/cloud/contentwarehouse/v1:document_schema_service.proto -@com_google_googleapis//google/cloud/contentwarehouse/v1:document_service.proto -@com_google_googleapis//google/cloud/contentwarehouse/v1:document_service_request.proto -@com_google_googleapis//google/cloud/contentwarehouse/v1:filters.proto -@com_google_googleapis//google/cloud/contentwarehouse/v1:histogram.proto -@com_google_googleapis//google/cloud/contentwarehouse/v1:pipeline_service.proto -@com_google_googleapis//google/cloud/contentwarehouse/v1:pipelines.proto -@com_google_googleapis//google/cloud/contentwarehouse/v1:rule_engine.proto -@com_google_googleapis//google/cloud/contentwarehouse/v1:ruleset_service.proto -@com_google_googleapis//google/cloud/contentwarehouse/v1:ruleset_service_request.proto -@com_google_googleapis//google/cloud/contentwarehouse/v1:synonymset.proto -@com_google_googleapis//google/cloud/contentwarehouse/v1:synonymset_service.proto -@com_google_googleapis//google/cloud/contentwarehouse/v1:synonymset_service_request.proto +@googleapis//google/cloud/contentwarehouse/v1:async_document_service_request.proto +@googleapis//google/cloud/contentwarehouse/v1:common.proto +@googleapis//google/cloud/contentwarehouse/v1:document.proto +@googleapis//google/cloud/contentwarehouse/v1:document_link_service.proto +@googleapis//google/cloud/contentwarehouse/v1:document_schema.proto +@googleapis//google/cloud/contentwarehouse/v1:document_schema_service.proto +@googleapis//google/cloud/contentwarehouse/v1:document_service.proto +@googleapis//google/cloud/contentwarehouse/v1:document_service_request.proto +@googleapis//google/cloud/contentwarehouse/v1:filters.proto +@googleapis//google/cloud/contentwarehouse/v1:histogram.proto +@googleapis//google/cloud/contentwarehouse/v1:pipeline_service.proto +@googleapis//google/cloud/contentwarehouse/v1:pipelines.proto +@googleapis//google/cloud/contentwarehouse/v1:rule_engine.proto +@googleapis//google/cloud/contentwarehouse/v1:ruleset_service.proto +@googleapis//google/cloud/contentwarehouse/v1:ruleset_service_request.proto +@googleapis//google/cloud/contentwarehouse/v1:synonymset.proto +@googleapis//google/cloud/contentwarehouse/v1:synonymset_service.proto +@googleapis//google/cloud/contentwarehouse/v1:synonymset_service_request.proto diff --git a/external/googleapis/protolists/datacatalog.list b/external/googleapis/protolists/datacatalog.list index 2eb2ef0147769..f801de4561991 100644 --- a/external/googleapis/protolists/datacatalog.list +++ b/external/googleapis/protolists/datacatalog.list @@ -1,17 +1,17 @@ -@com_google_googleapis//google/cloud/datacatalog/lineage/v1:lineage.proto -@com_google_googleapis//google/cloud/datacatalog/v1:bigquery.proto -@com_google_googleapis//google/cloud/datacatalog/v1:common.proto -@com_google_googleapis//google/cloud/datacatalog/v1:data_source.proto -@com_google_googleapis//google/cloud/datacatalog/v1:datacatalog.proto -@com_google_googleapis//google/cloud/datacatalog/v1:dataplex_spec.proto -@com_google_googleapis//google/cloud/datacatalog/v1:dump_content.proto -@com_google_googleapis//google/cloud/datacatalog/v1:gcs_fileset_spec.proto -@com_google_googleapis//google/cloud/datacatalog/v1:physical_schema.proto -@com_google_googleapis//google/cloud/datacatalog/v1:policytagmanager.proto -@com_google_googleapis//google/cloud/datacatalog/v1:policytagmanagerserialization.proto -@com_google_googleapis//google/cloud/datacatalog/v1:schema.proto -@com_google_googleapis//google/cloud/datacatalog/v1:search.proto -@com_google_googleapis//google/cloud/datacatalog/v1:table_spec.proto -@com_google_googleapis//google/cloud/datacatalog/v1:tags.proto -@com_google_googleapis//google/cloud/datacatalog/v1:timestamps.proto -@com_google_googleapis//google/cloud/datacatalog/v1:usage.proto +@googleapis//google/cloud/datacatalog/lineage/v1:lineage.proto +@googleapis//google/cloud/datacatalog/v1:bigquery.proto +@googleapis//google/cloud/datacatalog/v1:common.proto +@googleapis//google/cloud/datacatalog/v1:data_source.proto +@googleapis//google/cloud/datacatalog/v1:datacatalog.proto +@googleapis//google/cloud/datacatalog/v1:dataplex_spec.proto +@googleapis//google/cloud/datacatalog/v1:dump_content.proto +@googleapis//google/cloud/datacatalog/v1:gcs_fileset_spec.proto +@googleapis//google/cloud/datacatalog/v1:physical_schema.proto +@googleapis//google/cloud/datacatalog/v1:policytagmanager.proto +@googleapis//google/cloud/datacatalog/v1:policytagmanagerserialization.proto +@googleapis//google/cloud/datacatalog/v1:schema.proto +@googleapis//google/cloud/datacatalog/v1:search.proto +@googleapis//google/cloud/datacatalog/v1:table_spec.proto +@googleapis//google/cloud/datacatalog/v1:tags.proto +@googleapis//google/cloud/datacatalog/v1:timestamps.proto +@googleapis//google/cloud/datacatalog/v1:usage.proto diff --git a/external/googleapis/protolists/dataform.list b/external/googleapis/protolists/dataform.list index 5b8e73cbd5f39..23b44a266c1c8 100644 --- a/external/googleapis/protolists/dataform.list +++ b/external/googleapis/protolists/dataform.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/cloud/dataform/logging/v1:logging.proto -@com_google_googleapis//google/cloud/dataform/v1:dataform.proto +@googleapis//google/cloud/dataform/logging/v1:logging.proto +@googleapis//google/cloud/dataform/v1:dataform.proto diff --git a/external/googleapis/protolists/datafusion.list b/external/googleapis/protolists/datafusion.list index c736d23ac29e2..04d7053087438 100644 --- a/external/googleapis/protolists/datafusion.list +++ b/external/googleapis/protolists/datafusion.list @@ -1 +1 @@ -@com_google_googleapis//google/cloud/datafusion/v1:datafusion.proto +@googleapis//google/cloud/datafusion/v1:datafusion.proto diff --git a/external/googleapis/protolists/datamigration.list b/external/googleapis/protolists/datamigration.list index 52a5b20a1a382..da87ace35d0c7 100644 --- a/external/googleapis/protolists/datamigration.list +++ b/external/googleapis/protolists/datamigration.list @@ -1,4 +1,4 @@ -@com_google_googleapis//google/cloud/clouddms/logging/v1:clouddms_platform_logs.proto -@com_google_googleapis//google/cloud/clouddms/v1:clouddms.proto -@com_google_googleapis//google/cloud/clouddms/v1:clouddms_resources.proto -@com_google_googleapis//google/cloud/clouddms/v1:conversionworkspace_resources.proto +@googleapis//google/cloud/clouddms/logging/v1:clouddms_platform_logs.proto +@googleapis//google/cloud/clouddms/v1:clouddms.proto +@googleapis//google/cloud/clouddms/v1:clouddms_resources.proto +@googleapis//google/cloud/clouddms/v1:conversionworkspace_resources.proto diff --git a/external/googleapis/protolists/dataplex.list b/external/googleapis/protolists/dataplex.list index de426ab75fe68..c0e82abf6c348 100644 --- a/external/googleapis/protolists/dataplex.list +++ b/external/googleapis/protolists/dataplex.list @@ -1,19 +1,19 @@ -@com_google_googleapis//google/cloud/dataplex/v1:analyze.proto -@com_google_googleapis//google/cloud/dataplex/v1:business_glossary.proto -@com_google_googleapis//google/cloud/dataplex/v1:catalog.proto -@com_google_googleapis//google/cloud/dataplex/v1:cmek.proto -@com_google_googleapis//google/cloud/dataplex/v1:content.proto -@com_google_googleapis//google/cloud/dataplex/v1:data_discovery.proto -@com_google_googleapis//google/cloud/dataplex/v1:data_documentation.proto -@com_google_googleapis//google/cloud/dataplex/v1:data_profile.proto -@com_google_googleapis//google/cloud/dataplex/v1:data_quality.proto -@com_google_googleapis//google/cloud/dataplex/v1:data_taxonomy.proto -@com_google_googleapis//google/cloud/dataplex/v1:datascans.proto -@com_google_googleapis//google/cloud/dataplex/v1:datascans_common.proto -@com_google_googleapis//google/cloud/dataplex/v1:logs.proto -@com_google_googleapis//google/cloud/dataplex/v1:metadata.proto -@com_google_googleapis//google/cloud/dataplex/v1:processing.proto -@com_google_googleapis//google/cloud/dataplex/v1:resources.proto -@com_google_googleapis//google/cloud/dataplex/v1:security.proto -@com_google_googleapis//google/cloud/dataplex/v1:service.proto -@com_google_googleapis//google/cloud/dataplex/v1:tasks.proto +@googleapis//google/cloud/dataplex/v1:analyze.proto +@googleapis//google/cloud/dataplex/v1:business_glossary.proto +@googleapis//google/cloud/dataplex/v1:catalog.proto +@googleapis//google/cloud/dataplex/v1:cmek.proto +@googleapis//google/cloud/dataplex/v1:content.proto +@googleapis//google/cloud/dataplex/v1:data_discovery.proto +@googleapis//google/cloud/dataplex/v1:data_documentation.proto +@googleapis//google/cloud/dataplex/v1:data_profile.proto +@googleapis//google/cloud/dataplex/v1:data_quality.proto +@googleapis//google/cloud/dataplex/v1:data_taxonomy.proto +@googleapis//google/cloud/dataplex/v1:datascans.proto +@googleapis//google/cloud/dataplex/v1:datascans_common.proto +@googleapis//google/cloud/dataplex/v1:logs.proto +@googleapis//google/cloud/dataplex/v1:metadata.proto +@googleapis//google/cloud/dataplex/v1:processing.proto +@googleapis//google/cloud/dataplex/v1:resources.proto +@googleapis//google/cloud/dataplex/v1:security.proto +@googleapis//google/cloud/dataplex/v1:service.proto +@googleapis//google/cloud/dataplex/v1:tasks.proto diff --git a/external/googleapis/protolists/dataproc.list b/external/googleapis/protolists/dataproc.list index f1bb983c092d2..3deb2d2c6ed17 100644 --- a/external/googleapis/protolists/dataproc.list +++ b/external/googleapis/protolists/dataproc.list @@ -1,10 +1,10 @@ -@com_google_googleapis//google/cloud/dataproc/v1:autoscaling_policies.proto -@com_google_googleapis//google/cloud/dataproc/v1:batches.proto -@com_google_googleapis//google/cloud/dataproc/v1:clusters.proto -@com_google_googleapis//google/cloud/dataproc/v1:jobs.proto -@com_google_googleapis//google/cloud/dataproc/v1:node_groups.proto -@com_google_googleapis//google/cloud/dataproc/v1:operations.proto -@com_google_googleapis//google/cloud/dataproc/v1:session_templates.proto -@com_google_googleapis//google/cloud/dataproc/v1:sessions.proto -@com_google_googleapis//google/cloud/dataproc/v1:shared.proto -@com_google_googleapis//google/cloud/dataproc/v1:workflow_templates.proto +@googleapis//google/cloud/dataproc/v1:autoscaling_policies.proto +@googleapis//google/cloud/dataproc/v1:batches.proto +@googleapis//google/cloud/dataproc/v1:clusters.proto +@googleapis//google/cloud/dataproc/v1:jobs.proto +@googleapis//google/cloud/dataproc/v1:node_groups.proto +@googleapis//google/cloud/dataproc/v1:operations.proto +@googleapis//google/cloud/dataproc/v1:session_templates.proto +@googleapis//google/cloud/dataproc/v1:sessions.proto +@googleapis//google/cloud/dataproc/v1:shared.proto +@googleapis//google/cloud/dataproc/v1:workflow_templates.proto diff --git a/external/googleapis/protolists/datastore.list b/external/googleapis/protolists/datastore.list index 81374f05b4dee..70073fa25517e 100644 --- a/external/googleapis/protolists/datastore.list +++ b/external/googleapis/protolists/datastore.list @@ -1,8 +1,8 @@ -@com_google_googleapis//google/datastore/admin/v1:datastore_admin.proto -@com_google_googleapis//google/datastore/admin/v1:index.proto -@com_google_googleapis//google/datastore/admin/v1:migration.proto -@com_google_googleapis//google/datastore/v1:aggregation_result.proto -@com_google_googleapis//google/datastore/v1:datastore.proto -@com_google_googleapis//google/datastore/v1:entity.proto -@com_google_googleapis//google/datastore/v1:query.proto -@com_google_googleapis//google/datastore/v1:query_profile.proto +@googleapis//google/datastore/admin/v1:datastore_admin.proto +@googleapis//google/datastore/admin/v1:index.proto +@googleapis//google/datastore/admin/v1:migration.proto +@googleapis//google/datastore/v1:aggregation_result.proto +@googleapis//google/datastore/v1:datastore.proto +@googleapis//google/datastore/v1:entity.proto +@googleapis//google/datastore/v1:query.proto +@googleapis//google/datastore/v1:query_profile.proto diff --git a/external/googleapis/protolists/datastream.list b/external/googleapis/protolists/datastream.list index 233efb1ae8250..5edaf8e9c2dce 100644 --- a/external/googleapis/protolists/datastream.list +++ b/external/googleapis/protolists/datastream.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/cloud/datastream/v1:datastream.proto -@com_google_googleapis//google/cloud/datastream/v1:datastream_resources.proto +@googleapis//google/cloud/datastream/v1:datastream.proto +@googleapis//google/cloud/datastream/v1:datastream_resources.proto diff --git a/external/googleapis/protolists/deploy.list b/external/googleapis/protolists/deploy.list index e8c7143200875..62c077abb0fce 100644 --- a/external/googleapis/protolists/deploy.list +++ b/external/googleapis/protolists/deploy.list @@ -1,14 +1,14 @@ -@com_google_googleapis//google/cloud/deploy/v1:automation_payload.proto -@com_google_googleapis//google/cloud/deploy/v1:automationrun_payload.proto -@com_google_googleapis//google/cloud/deploy/v1:cloud_deploy.proto -@com_google_googleapis//google/cloud/deploy/v1:customtargettype_notification_payload.proto -@com_google_googleapis//google/cloud/deploy/v1:deliverypipeline_notification_payload.proto -@com_google_googleapis//google/cloud/deploy/v1:deploypolicy_evaluation_payload.proto -@com_google_googleapis//google/cloud/deploy/v1:deploypolicy_notification_payload.proto -@com_google_googleapis//google/cloud/deploy/v1:jobrun_notification_payload.proto -@com_google_googleapis//google/cloud/deploy/v1:log_enums.proto -@com_google_googleapis//google/cloud/deploy/v1:release_notification_payload.proto -@com_google_googleapis//google/cloud/deploy/v1:release_render_payload.proto -@com_google_googleapis//google/cloud/deploy/v1:rollout_notification_payload.proto -@com_google_googleapis//google/cloud/deploy/v1:rollout_update_payload.proto -@com_google_googleapis//google/cloud/deploy/v1:target_notification_payload.proto +@googleapis//google/cloud/deploy/v1:automation_payload.proto +@googleapis//google/cloud/deploy/v1:automationrun_payload.proto +@googleapis//google/cloud/deploy/v1:cloud_deploy.proto +@googleapis//google/cloud/deploy/v1:customtargettype_notification_payload.proto +@googleapis//google/cloud/deploy/v1:deliverypipeline_notification_payload.proto +@googleapis//google/cloud/deploy/v1:deploypolicy_evaluation_payload.proto +@googleapis//google/cloud/deploy/v1:deploypolicy_notification_payload.proto +@googleapis//google/cloud/deploy/v1:jobrun_notification_payload.proto +@googleapis//google/cloud/deploy/v1:log_enums.proto +@googleapis//google/cloud/deploy/v1:release_notification_payload.proto +@googleapis//google/cloud/deploy/v1:release_render_payload.proto +@googleapis//google/cloud/deploy/v1:rollout_notification_payload.proto +@googleapis//google/cloud/deploy/v1:rollout_update_payload.proto +@googleapis//google/cloud/deploy/v1:target_notification_payload.proto diff --git a/external/googleapis/protolists/developerconnect.list b/external/googleapis/protolists/developerconnect.list index b720197c889da..df705e8e37e11 100644 --- a/external/googleapis/protolists/developerconnect.list +++ b/external/googleapis/protolists/developerconnect.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/cloud/developerconnect/v1:developer_connect.proto -@com_google_googleapis//google/cloud/developerconnect/v1:insights_config.proto +@googleapis//google/cloud/developerconnect/v1:developer_connect.proto +@googleapis//google/cloud/developerconnect/v1:insights_config.proto diff --git a/external/googleapis/protolists/devicestreaming.list b/external/googleapis/protolists/devicestreaming.list index bfa0c525f0b4d..11db2904bc6e5 100644 --- a/external/googleapis/protolists/devicestreaming.list +++ b/external/googleapis/protolists/devicestreaming.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/cloud/devicestreaming/v1:adb_service.proto -@com_google_googleapis//google/cloud/devicestreaming/v1:service.proto +@googleapis//google/cloud/devicestreaming/v1:adb_service.proto +@googleapis//google/cloud/devicestreaming/v1:service.proto diff --git a/external/googleapis/protolists/dialogflow_cx.list b/external/googleapis/protolists/dialogflow_cx.list index 6e48cd19ef7a9..55a06b1c85f65 100644 --- a/external/googleapis/protolists/dialogflow_cx.list +++ b/external/googleapis/protolists/dialogflow_cx.list @@ -1,35 +1,35 @@ -@com_google_googleapis//google/cloud/dialogflow/cx/v3:advanced_settings.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:agent.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:audio_config.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:changelog.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:code_block.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:data_store_connection.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:deployment.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:entity_type.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:environment.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:example.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:experiment.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:flow.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:fulfillment.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:gcs.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:generative_settings.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:generator.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:import_strategy.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:inline.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:intent.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:page.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:parameter_definition.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:playbook.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:response_message.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:safety_settings.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:security_settings.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:session.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:session_entity_type.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:test_case.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:tool.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:tool_call.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:trace.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:transition_route_group.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:validation_message.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:version.proto -@com_google_googleapis//google/cloud/dialogflow/cx/v3:webhook.proto +@googleapis//google/cloud/dialogflow/cx/v3:advanced_settings.proto +@googleapis//google/cloud/dialogflow/cx/v3:agent.proto +@googleapis//google/cloud/dialogflow/cx/v3:audio_config.proto +@googleapis//google/cloud/dialogflow/cx/v3:changelog.proto +@googleapis//google/cloud/dialogflow/cx/v3:code_block.proto +@googleapis//google/cloud/dialogflow/cx/v3:data_store_connection.proto +@googleapis//google/cloud/dialogflow/cx/v3:deployment.proto +@googleapis//google/cloud/dialogflow/cx/v3:entity_type.proto +@googleapis//google/cloud/dialogflow/cx/v3:environment.proto +@googleapis//google/cloud/dialogflow/cx/v3:example.proto +@googleapis//google/cloud/dialogflow/cx/v3:experiment.proto +@googleapis//google/cloud/dialogflow/cx/v3:flow.proto +@googleapis//google/cloud/dialogflow/cx/v3:fulfillment.proto +@googleapis//google/cloud/dialogflow/cx/v3:gcs.proto +@googleapis//google/cloud/dialogflow/cx/v3:generative_settings.proto +@googleapis//google/cloud/dialogflow/cx/v3:generator.proto +@googleapis//google/cloud/dialogflow/cx/v3:import_strategy.proto +@googleapis//google/cloud/dialogflow/cx/v3:inline.proto +@googleapis//google/cloud/dialogflow/cx/v3:intent.proto +@googleapis//google/cloud/dialogflow/cx/v3:page.proto +@googleapis//google/cloud/dialogflow/cx/v3:parameter_definition.proto +@googleapis//google/cloud/dialogflow/cx/v3:playbook.proto +@googleapis//google/cloud/dialogflow/cx/v3:response_message.proto +@googleapis//google/cloud/dialogflow/cx/v3:safety_settings.proto +@googleapis//google/cloud/dialogflow/cx/v3:security_settings.proto +@googleapis//google/cloud/dialogflow/cx/v3:session.proto +@googleapis//google/cloud/dialogflow/cx/v3:session_entity_type.proto +@googleapis//google/cloud/dialogflow/cx/v3:test_case.proto +@googleapis//google/cloud/dialogflow/cx/v3:tool.proto +@googleapis//google/cloud/dialogflow/cx/v3:tool_call.proto +@googleapis//google/cloud/dialogflow/cx/v3:trace.proto +@googleapis//google/cloud/dialogflow/cx/v3:transition_route_group.proto +@googleapis//google/cloud/dialogflow/cx/v3:validation_message.proto +@googleapis//google/cloud/dialogflow/cx/v3:version.proto +@googleapis//google/cloud/dialogflow/cx/v3:webhook.proto diff --git a/external/googleapis/protolists/dialogflow_es.list b/external/googleapis/protolists/dialogflow_es.list index 7561b7a7aeadf..f8033289c5e91 100644 --- a/external/googleapis/protolists/dialogflow_es.list +++ b/external/googleapis/protolists/dialogflow_es.list @@ -1,31 +1,31 @@ -@com_google_googleapis//google/cloud/dialogflow/v2:agent.proto -@com_google_googleapis//google/cloud/dialogflow/v2:agent_coaching_instruction.proto -@com_google_googleapis//google/cloud/dialogflow/v2:answer_record.proto -@com_google_googleapis//google/cloud/dialogflow/v2:audio_config.proto -@com_google_googleapis//google/cloud/dialogflow/v2:context.proto -@com_google_googleapis//google/cloud/dialogflow/v2:conversation.proto -@com_google_googleapis//google/cloud/dialogflow/v2:conversation_dataset.proto -@com_google_googleapis//google/cloud/dialogflow/v2:conversation_event.proto -@com_google_googleapis//google/cloud/dialogflow/v2:conversation_model.proto -@com_google_googleapis//google/cloud/dialogflow/v2:conversation_profile.proto -@com_google_googleapis//google/cloud/dialogflow/v2:document.proto -@com_google_googleapis//google/cloud/dialogflow/v2:encryption_spec.proto -@com_google_googleapis//google/cloud/dialogflow/v2:entity_type.proto -@com_google_googleapis//google/cloud/dialogflow/v2:environment.proto -@com_google_googleapis//google/cloud/dialogflow/v2:fulfillment.proto -@com_google_googleapis//google/cloud/dialogflow/v2:gcs.proto -@com_google_googleapis//google/cloud/dialogflow/v2:generator.proto -@com_google_googleapis//google/cloud/dialogflow/v2:generator_evaluation.proto -@com_google_googleapis//google/cloud/dialogflow/v2:human_agent_assistant_event.proto -@com_google_googleapis//google/cloud/dialogflow/v2:intent.proto -@com_google_googleapis//google/cloud/dialogflow/v2:knowledge_base.proto -@com_google_googleapis//google/cloud/dialogflow/v2:operations.proto -@com_google_googleapis//google/cloud/dialogflow/v2:participant.proto -@com_google_googleapis//google/cloud/dialogflow/v2:session.proto -@com_google_googleapis//google/cloud/dialogflow/v2:session_entity_type.proto -@com_google_googleapis//google/cloud/dialogflow/v2:sip_trunk.proto -@com_google_googleapis//google/cloud/dialogflow/v2:tool.proto -@com_google_googleapis//google/cloud/dialogflow/v2:tool_call.proto -@com_google_googleapis//google/cloud/dialogflow/v2:validation_result.proto -@com_google_googleapis//google/cloud/dialogflow/v2:version.proto -@com_google_googleapis//google/cloud/dialogflow/v2:webhook.proto +@googleapis//google/cloud/dialogflow/v2:agent.proto +@googleapis//google/cloud/dialogflow/v2:agent_coaching_instruction.proto +@googleapis//google/cloud/dialogflow/v2:answer_record.proto +@googleapis//google/cloud/dialogflow/v2:audio_config.proto +@googleapis//google/cloud/dialogflow/v2:context.proto +@googleapis//google/cloud/dialogflow/v2:conversation.proto +@googleapis//google/cloud/dialogflow/v2:conversation_dataset.proto +@googleapis//google/cloud/dialogflow/v2:conversation_event.proto +@googleapis//google/cloud/dialogflow/v2:conversation_model.proto +@googleapis//google/cloud/dialogflow/v2:conversation_profile.proto +@googleapis//google/cloud/dialogflow/v2:document.proto +@googleapis//google/cloud/dialogflow/v2:encryption_spec.proto +@googleapis//google/cloud/dialogflow/v2:entity_type.proto +@googleapis//google/cloud/dialogflow/v2:environment.proto +@googleapis//google/cloud/dialogflow/v2:fulfillment.proto +@googleapis//google/cloud/dialogflow/v2:gcs.proto +@googleapis//google/cloud/dialogflow/v2:generator.proto +@googleapis//google/cloud/dialogflow/v2:generator_evaluation.proto +@googleapis//google/cloud/dialogflow/v2:human_agent_assistant_event.proto +@googleapis//google/cloud/dialogflow/v2:intent.proto +@googleapis//google/cloud/dialogflow/v2:knowledge_base.proto +@googleapis//google/cloud/dialogflow/v2:operations.proto +@googleapis//google/cloud/dialogflow/v2:participant.proto +@googleapis//google/cloud/dialogflow/v2:session.proto +@googleapis//google/cloud/dialogflow/v2:session_entity_type.proto +@googleapis//google/cloud/dialogflow/v2:sip_trunk.proto +@googleapis//google/cloud/dialogflow/v2:tool.proto +@googleapis//google/cloud/dialogflow/v2:tool_call.proto +@googleapis//google/cloud/dialogflow/v2:validation_result.proto +@googleapis//google/cloud/dialogflow/v2:version.proto +@googleapis//google/cloud/dialogflow/v2:webhook.proto diff --git a/external/googleapis/protolists/discoveryengine.list b/external/googleapis/protolists/discoveryengine.list index 7894ead553ed7..7e5db77358599 100644 --- a/external/googleapis/protolists/discoveryengine.list +++ b/external/googleapis/protolists/discoveryengine.list @@ -1,46 +1,46 @@ -@com_google_googleapis//google/cloud/discoveryengine/v1:answer.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:assist_answer.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:assistant.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:assistant_service.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:chunk.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:cmek_config_service.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:common.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:completion.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:completion_service.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:control.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:control_service.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:conversation.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:conversational_search_service.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:custom_tuning_model.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:data_store.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:data_store_service.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:document.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:document_processing_config.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:document_service.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:engine.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:engine_service.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:grounded_generation_service.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:grounding.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:identity_mapping_store.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:identity_mapping_store_service.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:import_config.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:project.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:project_service.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:purge_config.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:rank_service.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:recommendation_service.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:safety.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:schema.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:schema_service.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:search_service.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:search_tuning_service.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:serving_config.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:serving_config_service.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:session.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:session_service.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:site_search_engine.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:site_search_engine_service.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:user_event.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:user_event_service.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:user_license.proto -@com_google_googleapis//google/cloud/discoveryengine/v1:user_license_service.proto +@googleapis//google/cloud/discoveryengine/v1:answer.proto +@googleapis//google/cloud/discoveryengine/v1:assist_answer.proto +@googleapis//google/cloud/discoveryengine/v1:assistant.proto +@googleapis//google/cloud/discoveryengine/v1:assistant_service.proto +@googleapis//google/cloud/discoveryengine/v1:chunk.proto +@googleapis//google/cloud/discoveryengine/v1:cmek_config_service.proto +@googleapis//google/cloud/discoveryengine/v1:common.proto +@googleapis//google/cloud/discoveryengine/v1:completion.proto +@googleapis//google/cloud/discoveryengine/v1:completion_service.proto +@googleapis//google/cloud/discoveryengine/v1:control.proto +@googleapis//google/cloud/discoveryengine/v1:control_service.proto +@googleapis//google/cloud/discoveryengine/v1:conversation.proto +@googleapis//google/cloud/discoveryengine/v1:conversational_search_service.proto +@googleapis//google/cloud/discoveryengine/v1:custom_tuning_model.proto +@googleapis//google/cloud/discoveryengine/v1:data_store.proto +@googleapis//google/cloud/discoveryengine/v1:data_store_service.proto +@googleapis//google/cloud/discoveryengine/v1:document.proto +@googleapis//google/cloud/discoveryengine/v1:document_processing_config.proto +@googleapis//google/cloud/discoveryengine/v1:document_service.proto +@googleapis//google/cloud/discoveryengine/v1:engine.proto +@googleapis//google/cloud/discoveryengine/v1:engine_service.proto +@googleapis//google/cloud/discoveryengine/v1:grounded_generation_service.proto +@googleapis//google/cloud/discoveryengine/v1:grounding.proto +@googleapis//google/cloud/discoveryengine/v1:identity_mapping_store.proto +@googleapis//google/cloud/discoveryengine/v1:identity_mapping_store_service.proto +@googleapis//google/cloud/discoveryengine/v1:import_config.proto +@googleapis//google/cloud/discoveryengine/v1:project.proto +@googleapis//google/cloud/discoveryengine/v1:project_service.proto +@googleapis//google/cloud/discoveryengine/v1:purge_config.proto +@googleapis//google/cloud/discoveryengine/v1:rank_service.proto +@googleapis//google/cloud/discoveryengine/v1:recommendation_service.proto +@googleapis//google/cloud/discoveryengine/v1:safety.proto +@googleapis//google/cloud/discoveryengine/v1:schema.proto +@googleapis//google/cloud/discoveryengine/v1:schema_service.proto +@googleapis//google/cloud/discoveryengine/v1:search_service.proto +@googleapis//google/cloud/discoveryengine/v1:search_tuning_service.proto +@googleapis//google/cloud/discoveryengine/v1:serving_config.proto +@googleapis//google/cloud/discoveryengine/v1:serving_config_service.proto +@googleapis//google/cloud/discoveryengine/v1:session.proto +@googleapis//google/cloud/discoveryengine/v1:session_service.proto +@googleapis//google/cloud/discoveryengine/v1:site_search_engine.proto +@googleapis//google/cloud/discoveryengine/v1:site_search_engine_service.proto +@googleapis//google/cloud/discoveryengine/v1:user_event.proto +@googleapis//google/cloud/discoveryengine/v1:user_event_service.proto +@googleapis//google/cloud/discoveryengine/v1:user_license.proto +@googleapis//google/cloud/discoveryengine/v1:user_license_service.proto diff --git a/external/googleapis/protolists/dlp.list b/external/googleapis/protolists/dlp.list index 838d602acb8fa..2756d9a964737 100644 --- a/external/googleapis/protolists/dlp.list +++ b/external/googleapis/protolists/dlp.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/privacy/dlp/v2:dlp.proto -@com_google_googleapis//google/privacy/dlp/v2:storage.proto +@googleapis//google/privacy/dlp/v2:dlp.proto +@googleapis//google/privacy/dlp/v2:storage.proto diff --git a/external/googleapis/protolists/documentai.list b/external/googleapis/protolists/documentai.list index 1b7c34821f90f..39b5627cb0721 100644 --- a/external/googleapis/protolists/documentai.list +++ b/external/googleapis/protolists/documentai.list @@ -1,10 +1,10 @@ -@com_google_googleapis//google/cloud/documentai/v1:barcode.proto -@com_google_googleapis//google/cloud/documentai/v1:document.proto -@com_google_googleapis//google/cloud/documentai/v1:document_io.proto -@com_google_googleapis//google/cloud/documentai/v1:document_processor_service.proto -@com_google_googleapis//google/cloud/documentai/v1:document_schema.proto -@com_google_googleapis//google/cloud/documentai/v1:evaluation.proto -@com_google_googleapis//google/cloud/documentai/v1:geometry.proto -@com_google_googleapis//google/cloud/documentai/v1:operation_metadata.proto -@com_google_googleapis//google/cloud/documentai/v1:processor.proto -@com_google_googleapis//google/cloud/documentai/v1:processor_type.proto +@googleapis//google/cloud/documentai/v1:barcode.proto +@googleapis//google/cloud/documentai/v1:document.proto +@googleapis//google/cloud/documentai/v1:document_io.proto +@googleapis//google/cloud/documentai/v1:document_processor_service.proto +@googleapis//google/cloud/documentai/v1:document_schema.proto +@googleapis//google/cloud/documentai/v1:evaluation.proto +@googleapis//google/cloud/documentai/v1:geometry.proto +@googleapis//google/cloud/documentai/v1:operation_metadata.proto +@googleapis//google/cloud/documentai/v1:processor.proto +@googleapis//google/cloud/documentai/v1:processor_type.proto diff --git a/external/googleapis/protolists/domains.list b/external/googleapis/protolists/domains.list index ed603a3e1e19d..9e7caf1d1a2a1 100644 --- a/external/googleapis/protolists/domains.list +++ b/external/googleapis/protolists/domains.list @@ -1 +1 @@ -@com_google_googleapis//google/cloud/domains/v1:domains.proto +@googleapis//google/cloud/domains/v1:domains.proto diff --git a/external/googleapis/protolists/edgecontainer.list b/external/googleapis/protolists/edgecontainer.list index 202b5f564d04b..b00cffcf74969 100644 --- a/external/googleapis/protolists/edgecontainer.list +++ b/external/googleapis/protolists/edgecontainer.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/cloud/edgecontainer/v1:resources.proto -@com_google_googleapis//google/cloud/edgecontainer/v1:service.proto +@googleapis//google/cloud/edgecontainer/v1:resources.proto +@googleapis//google/cloud/edgecontainer/v1:service.proto diff --git a/external/googleapis/protolists/edgenetwork.list b/external/googleapis/protolists/edgenetwork.list index 3c3fdd55292ec..05ca1e671fed6 100644 --- a/external/googleapis/protolists/edgenetwork.list +++ b/external/googleapis/protolists/edgenetwork.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/cloud/edgenetwork/v1:resources.proto -@com_google_googleapis//google/cloud/edgenetwork/v1:service.proto +@googleapis//google/cloud/edgenetwork/v1:resources.proto +@googleapis//google/cloud/edgenetwork/v1:service.proto diff --git a/external/googleapis/protolists/essentialcontacts.list b/external/googleapis/protolists/essentialcontacts.list index cc8480f3683e0..fba232072ea0f 100644 --- a/external/googleapis/protolists/essentialcontacts.list +++ b/external/googleapis/protolists/essentialcontacts.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/cloud/essentialcontacts/v1:enums.proto -@com_google_googleapis//google/cloud/essentialcontacts/v1:service.proto +@googleapis//google/cloud/essentialcontacts/v1:enums.proto +@googleapis//google/cloud/essentialcontacts/v1:service.proto diff --git a/external/googleapis/protolists/eventarc.list b/external/googleapis/protolists/eventarc.list index fd0efedc3d1e1..414237bceebe9 100644 --- a/external/googleapis/protolists/eventarc.list +++ b/external/googleapis/protolists/eventarc.list @@ -1,14 +1,14 @@ -@com_google_googleapis//google/cloud/eventarc/publishing/v1:cloud_event.proto -@com_google_googleapis//google/cloud/eventarc/publishing/v1:publisher.proto -@com_google_googleapis//google/cloud/eventarc/v1:channel.proto -@com_google_googleapis//google/cloud/eventarc/v1:channel_connection.proto -@com_google_googleapis//google/cloud/eventarc/v1:discovery.proto -@com_google_googleapis//google/cloud/eventarc/v1:enrollment.proto -@com_google_googleapis//google/cloud/eventarc/v1:eventarc.proto -@com_google_googleapis//google/cloud/eventarc/v1:google_api_source.proto -@com_google_googleapis//google/cloud/eventarc/v1:google_channel_config.proto -@com_google_googleapis//google/cloud/eventarc/v1:logging_config.proto -@com_google_googleapis//google/cloud/eventarc/v1:message_bus.proto -@com_google_googleapis//google/cloud/eventarc/v1:network_config.proto -@com_google_googleapis//google/cloud/eventarc/v1:pipeline.proto -@com_google_googleapis//google/cloud/eventarc/v1:trigger.proto +@googleapis//google/cloud/eventarc/publishing/v1:cloud_event.proto +@googleapis//google/cloud/eventarc/publishing/v1:publisher.proto +@googleapis//google/cloud/eventarc/v1:channel.proto +@googleapis//google/cloud/eventarc/v1:channel_connection.proto +@googleapis//google/cloud/eventarc/v1:discovery.proto +@googleapis//google/cloud/eventarc/v1:enrollment.proto +@googleapis//google/cloud/eventarc/v1:eventarc.proto +@googleapis//google/cloud/eventarc/v1:google_api_source.proto +@googleapis//google/cloud/eventarc/v1:google_channel_config.proto +@googleapis//google/cloud/eventarc/v1:logging_config.proto +@googleapis//google/cloud/eventarc/v1:message_bus.proto +@googleapis//google/cloud/eventarc/v1:network_config.proto +@googleapis//google/cloud/eventarc/v1:pipeline.proto +@googleapis//google/cloud/eventarc/v1:trigger.proto diff --git a/external/googleapis/protolists/filestore.list b/external/googleapis/protolists/filestore.list index 8c5f3f8f8ecd2..0e5008b2f3abf 100644 --- a/external/googleapis/protolists/filestore.list +++ b/external/googleapis/protolists/filestore.list @@ -1 +1 @@ -@com_google_googleapis//google/cloud/filestore/v1:cloud_filestore_service.proto +@googleapis//google/cloud/filestore/v1:cloud_filestore_service.proto diff --git a/external/googleapis/protolists/financialservices.list b/external/googleapis/protolists/financialservices.list index e4feb668f9ac4..9becdd0d23b0d 100644 --- a/external/googleapis/protolists/financialservices.list +++ b/external/googleapis/protolists/financialservices.list @@ -1,10 +1,10 @@ -@com_google_googleapis//google/cloud/financialservices/v1:backtest_result.proto -@com_google_googleapis//google/cloud/financialservices/v1:bigquery_destination.proto -@com_google_googleapis//google/cloud/financialservices/v1:dataset.proto -@com_google_googleapis//google/cloud/financialservices/v1:engine_config.proto -@com_google_googleapis//google/cloud/financialservices/v1:engine_version.proto -@com_google_googleapis//google/cloud/financialservices/v1:instance.proto -@com_google_googleapis//google/cloud/financialservices/v1:line_of_business.proto -@com_google_googleapis//google/cloud/financialservices/v1:model.proto -@com_google_googleapis//google/cloud/financialservices/v1:prediction_result.proto -@com_google_googleapis//google/cloud/financialservices/v1:service.proto +@googleapis//google/cloud/financialservices/v1:backtest_result.proto +@googleapis//google/cloud/financialservices/v1:bigquery_destination.proto +@googleapis//google/cloud/financialservices/v1:dataset.proto +@googleapis//google/cloud/financialservices/v1:engine_config.proto +@googleapis//google/cloud/financialservices/v1:engine_version.proto +@googleapis//google/cloud/financialservices/v1:instance.proto +@googleapis//google/cloud/financialservices/v1:line_of_business.proto +@googleapis//google/cloud/financialservices/v1:model.proto +@googleapis//google/cloud/financialservices/v1:prediction_result.proto +@googleapis//google/cloud/financialservices/v1:service.proto diff --git a/external/googleapis/protolists/functions.list b/external/googleapis/protolists/functions.list index 78831280d291f..bbeee9c6a1161 100644 --- a/external/googleapis/protolists/functions.list +++ b/external/googleapis/protolists/functions.list @@ -1,3 +1,3 @@ -@com_google_googleapis//google/cloud/functions/v1:functions.proto -@com_google_googleapis//google/cloud/functions/v1:operations.proto -@com_google_googleapis//google/cloud/functions/v2:functions.proto +@googleapis//google/cloud/functions/v1:functions.proto +@googleapis//google/cloud/functions/v1:operations.proto +@googleapis//google/cloud/functions/v2:functions.proto diff --git a/external/googleapis/protolists/gkebackup.list b/external/googleapis/protolists/gkebackup.list index 3fabfe7539177..a6223295cfd56 100644 --- a/external/googleapis/protolists/gkebackup.list +++ b/external/googleapis/protolists/gkebackup.list @@ -1,21 +1,21 @@ -@com_google_googleapis//google/cloud/gkebackup/logging/v1:logged_backup.proto -@com_google_googleapis//google/cloud/gkebackup/logging/v1:logged_backup_channel.proto -@com_google_googleapis//google/cloud/gkebackup/logging/v1:logged_backup_plan.proto -@com_google_googleapis//google/cloud/gkebackup/logging/v1:logged_backup_plan_metadata.proto -@com_google_googleapis//google/cloud/gkebackup/logging/v1:logged_common.proto -@com_google_googleapis//google/cloud/gkebackup/logging/v1:logged_restore.proto -@com_google_googleapis//google/cloud/gkebackup/logging/v1:logged_restore_channel.proto -@com_google_googleapis//google/cloud/gkebackup/logging/v1:logged_restore_plan.proto -@com_google_googleapis//google/cloud/gkebackup/logging/v1:logged_restore_plan_metadata.proto -@com_google_googleapis//google/cloud/gkebackup/logging/v1:logging.proto -@com_google_googleapis//google/cloud/gkebackup/v1:backup.proto -@com_google_googleapis//google/cloud/gkebackup/v1:backup_channel.proto -@com_google_googleapis//google/cloud/gkebackup/v1:backup_plan.proto -@com_google_googleapis//google/cloud/gkebackup/v1:backup_plan_binding.proto -@com_google_googleapis//google/cloud/gkebackup/v1:common.proto -@com_google_googleapis//google/cloud/gkebackup/v1:gkebackup.proto -@com_google_googleapis//google/cloud/gkebackup/v1:restore.proto -@com_google_googleapis//google/cloud/gkebackup/v1:restore_channel.proto -@com_google_googleapis//google/cloud/gkebackup/v1:restore_plan.proto -@com_google_googleapis//google/cloud/gkebackup/v1:restore_plan_binding.proto -@com_google_googleapis//google/cloud/gkebackup/v1:volume.proto +@googleapis//google/cloud/gkebackup/logging/v1:logged_backup.proto +@googleapis//google/cloud/gkebackup/logging/v1:logged_backup_channel.proto +@googleapis//google/cloud/gkebackup/logging/v1:logged_backup_plan.proto +@googleapis//google/cloud/gkebackup/logging/v1:logged_backup_plan_metadata.proto +@googleapis//google/cloud/gkebackup/logging/v1:logged_common.proto +@googleapis//google/cloud/gkebackup/logging/v1:logged_restore.proto +@googleapis//google/cloud/gkebackup/logging/v1:logged_restore_channel.proto +@googleapis//google/cloud/gkebackup/logging/v1:logged_restore_plan.proto +@googleapis//google/cloud/gkebackup/logging/v1:logged_restore_plan_metadata.proto +@googleapis//google/cloud/gkebackup/logging/v1:logging.proto +@googleapis//google/cloud/gkebackup/v1:backup.proto +@googleapis//google/cloud/gkebackup/v1:backup_channel.proto +@googleapis//google/cloud/gkebackup/v1:backup_plan.proto +@googleapis//google/cloud/gkebackup/v1:backup_plan_binding.proto +@googleapis//google/cloud/gkebackup/v1:common.proto +@googleapis//google/cloud/gkebackup/v1:gkebackup.proto +@googleapis//google/cloud/gkebackup/v1:restore.proto +@googleapis//google/cloud/gkebackup/v1:restore_channel.proto +@googleapis//google/cloud/gkebackup/v1:restore_plan.proto +@googleapis//google/cloud/gkebackup/v1:restore_plan_binding.proto +@googleapis//google/cloud/gkebackup/v1:volume.proto diff --git a/external/googleapis/protolists/gkeconnect.list b/external/googleapis/protolists/gkeconnect.list index 72af37af9a2d5..c12f99bec9986 100644 --- a/external/googleapis/protolists/gkeconnect.list +++ b/external/googleapis/protolists/gkeconnect.list @@ -1 +1 @@ -@com_google_googleapis//google/cloud/gkeconnect/gateway/v1:control.proto +@googleapis//google/cloud/gkeconnect/gateway/v1:control.proto diff --git a/external/googleapis/protolists/gkehub.list b/external/googleapis/protolists/gkehub.list index 5f5e8a1e61f01..9f9e124972213 100644 --- a/external/googleapis/protolists/gkehub.list +++ b/external/googleapis/protolists/gkehub.list @@ -1,5 +1,5 @@ -@com_google_googleapis//google/cloud/gkehub/v1/configmanagement:configmanagement.proto -@com_google_googleapis//google/cloud/gkehub/v1/multiclusteringress:multiclusteringress.proto -@com_google_googleapis//google/cloud/gkehub/v1:feature.proto -@com_google_googleapis//google/cloud/gkehub/v1:membership.proto -@com_google_googleapis//google/cloud/gkehub/v1:service.proto +@googleapis//google/cloud/gkehub/v1/configmanagement:configmanagement.proto +@googleapis//google/cloud/gkehub/v1/multiclusteringress:multiclusteringress.proto +@googleapis//google/cloud/gkehub/v1:feature.proto +@googleapis//google/cloud/gkehub/v1:membership.proto +@googleapis//google/cloud/gkehub/v1:service.proto diff --git a/external/googleapis/protolists/gkemulticloud.list b/external/googleapis/protolists/gkemulticloud.list index fac2cdbe82867..5134e66e34a58 100644 --- a/external/googleapis/protolists/gkemulticloud.list +++ b/external/googleapis/protolists/gkemulticloud.list @@ -1,7 +1,7 @@ -@com_google_googleapis//google/cloud/gkemulticloud/v1:attached_resources.proto -@com_google_googleapis//google/cloud/gkemulticloud/v1:attached_service.proto -@com_google_googleapis//google/cloud/gkemulticloud/v1:aws_resources.proto -@com_google_googleapis//google/cloud/gkemulticloud/v1:aws_service.proto -@com_google_googleapis//google/cloud/gkemulticloud/v1:azure_resources.proto -@com_google_googleapis//google/cloud/gkemulticloud/v1:azure_service.proto -@com_google_googleapis//google/cloud/gkemulticloud/v1:common_resources.proto +@googleapis//google/cloud/gkemulticloud/v1:attached_resources.proto +@googleapis//google/cloud/gkemulticloud/v1:attached_service.proto +@googleapis//google/cloud/gkemulticloud/v1:aws_resources.proto +@googleapis//google/cloud/gkemulticloud/v1:aws_service.proto +@googleapis//google/cloud/gkemulticloud/v1:azure_resources.proto +@googleapis//google/cloud/gkemulticloud/v1:azure_service.proto +@googleapis//google/cloud/gkemulticloud/v1:common_resources.proto diff --git a/external/googleapis/protolists/gkerecommender.list b/external/googleapis/protolists/gkerecommender.list index 6bd3721910a64..401c7a03e449f 100644 --- a/external/googleapis/protolists/gkerecommender.list +++ b/external/googleapis/protolists/gkerecommender.list @@ -1 +1 @@ -@com_google_googleapis//google/cloud/gkerecommender/v1:gkerecommender.proto +@googleapis//google/cloud/gkerecommender/v1:gkerecommender.proto diff --git a/external/googleapis/protolists/grafeas.list b/external/googleapis/protolists/grafeas.list index 4b38af808f86a..6f02754d76137 100644 --- a/external/googleapis/protolists/grafeas.list +++ b/external/googleapis/protolists/grafeas.list @@ -1,23 +1,23 @@ -@com_google_googleapis//grafeas/v1:attestation.proto -@com_google_googleapis//grafeas/v1:build.proto -@com_google_googleapis//grafeas/v1:common.proto -@com_google_googleapis//grafeas/v1:compliance.proto -@com_google_googleapis//grafeas/v1:cvss.proto -@com_google_googleapis//grafeas/v1:deployment.proto -@com_google_googleapis//grafeas/v1:discovery.proto -@com_google_googleapis//grafeas/v1:dsse_attestation.proto -@com_google_googleapis//grafeas/v1:grafeas.proto -@com_google_googleapis//grafeas/v1:image.proto -@com_google_googleapis//grafeas/v1:intoto_provenance.proto -@com_google_googleapis//grafeas/v1:intoto_statement.proto -@com_google_googleapis//grafeas/v1:package.proto -@com_google_googleapis//grafeas/v1:provenance.proto -@com_google_googleapis//grafeas/v1:risk.proto -@com_google_googleapis//grafeas/v1:sbom.proto -@com_google_googleapis//grafeas/v1:secret.proto -@com_google_googleapis//grafeas/v1:severity.proto -@com_google_googleapis//grafeas/v1:slsa_provenance.proto -@com_google_googleapis//grafeas/v1:slsa_provenance_zero_two.proto -@com_google_googleapis//grafeas/v1:upgrade.proto -@com_google_googleapis//grafeas/v1:vex.proto -@com_google_googleapis//grafeas/v1:vulnerability.proto +@googleapis//grafeas/v1:attestation.proto +@googleapis//grafeas/v1:build.proto +@googleapis//grafeas/v1:common.proto +@googleapis//grafeas/v1:compliance.proto +@googleapis//grafeas/v1:cvss.proto +@googleapis//grafeas/v1:deployment.proto +@googleapis//grafeas/v1:discovery.proto +@googleapis//grafeas/v1:dsse_attestation.proto +@googleapis//grafeas/v1:grafeas.proto +@googleapis//grafeas/v1:image.proto +@googleapis//grafeas/v1:intoto_provenance.proto +@googleapis//grafeas/v1:intoto_statement.proto +@googleapis//grafeas/v1:package.proto +@googleapis//grafeas/v1:provenance.proto +@googleapis//grafeas/v1:risk.proto +@googleapis//grafeas/v1:sbom.proto +@googleapis//grafeas/v1:secret.proto +@googleapis//grafeas/v1:severity.proto +@googleapis//grafeas/v1:slsa_provenance.proto +@googleapis//grafeas/v1:slsa_provenance_zero_two.proto +@googleapis//grafeas/v1:upgrade.proto +@googleapis//grafeas/v1:vex.proto +@googleapis//grafeas/v1:vulnerability.proto diff --git a/external/googleapis/protolists/iam.list b/external/googleapis/protolists/iam.list index e5736a9cc1674..dacc4a809a0ee 100644 --- a/external/googleapis/protolists/iam.list +++ b/external/googleapis/protolists/iam.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/iam/admin/v1:audit_data.proto -@com_google_googleapis//google/iam/admin/v1:iam.proto +@googleapis//google/iam/admin/v1:audit_data.proto +@googleapis//google/iam/admin/v1:iam.proto diff --git a/external/googleapis/protolists/iam_v2.list b/external/googleapis/protolists/iam_v2.list index 8fb4a963d1c1e..64654a95e5f27 100644 --- a/external/googleapis/protolists/iam_v2.list +++ b/external/googleapis/protolists/iam_v2.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/iam/v2:deny.proto -@com_google_googleapis//google/iam/v2:policy.proto +@googleapis//google/iam/v2:deny.proto +@googleapis//google/iam/v2:policy.proto diff --git a/external/googleapis/protolists/iam_v3.list b/external/googleapis/protolists/iam_v3.list index da1849ff962ab..a72437f0c6fca 100644 --- a/external/googleapis/protolists/iam_v3.list +++ b/external/googleapis/protolists/iam_v3.list @@ -1,5 +1,5 @@ -@com_google_googleapis//google/iam/v3:operation_metadata.proto -@com_google_googleapis//google/iam/v3:policy_binding_resources.proto -@com_google_googleapis//google/iam/v3:policy_bindings_service.proto -@com_google_googleapis//google/iam/v3:principal_access_boundary_policies_service.proto -@com_google_googleapis//google/iam/v3:principal_access_boundary_policy_resources.proto +@googleapis//google/iam/v3:operation_metadata.proto +@googleapis//google/iam/v3:policy_binding_resources.proto +@googleapis//google/iam/v3:policy_bindings_service.proto +@googleapis//google/iam/v3:principal_access_boundary_policies_service.proto +@googleapis//google/iam/v3:principal_access_boundary_policy_resources.proto diff --git a/external/googleapis/protolists/iap.list b/external/googleapis/protolists/iap.list index c9fe8a86f48a4..d3d7a76642492 100644 --- a/external/googleapis/protolists/iap.list +++ b/external/googleapis/protolists/iap.list @@ -1 +1 @@ -@com_google_googleapis//google/cloud/iap/v1:service.proto +@googleapis//google/cloud/iap/v1:service.proto diff --git a/external/googleapis/protolists/ids.list b/external/googleapis/protolists/ids.list index a1a43f91d8a13..faa82693da1f9 100644 --- a/external/googleapis/protolists/ids.list +++ b/external/googleapis/protolists/ids.list @@ -1 +1 @@ -@com_google_googleapis//google/cloud/ids/v1:ids.proto +@googleapis//google/cloud/ids/v1:ids.proto diff --git a/external/googleapis/protolists/kms.list b/external/googleapis/protolists/kms.list index 8d8fff7e8d7ad..c9a8589b16f89 100644 --- a/external/googleapis/protolists/kms.list +++ b/external/googleapis/protolists/kms.list @@ -1,8 +1,8 @@ -@com_google_googleapis//google/cloud/kms/inventory/v1:key_dashboard_service.proto -@com_google_googleapis//google/cloud/kms/inventory/v1:key_tracking_service.proto -@com_google_googleapis//google/cloud/kms/v1:autokey.proto -@com_google_googleapis//google/cloud/kms/v1:autokey_admin.proto -@com_google_googleapis//google/cloud/kms/v1:ekm_service.proto -@com_google_googleapis//google/cloud/kms/v1:hsm_management.proto -@com_google_googleapis//google/cloud/kms/v1:resources.proto -@com_google_googleapis//google/cloud/kms/v1:service.proto +@googleapis//google/cloud/kms/inventory/v1:key_dashboard_service.proto +@googleapis//google/cloud/kms/inventory/v1:key_tracking_service.proto +@googleapis//google/cloud/kms/v1:autokey.proto +@googleapis//google/cloud/kms/v1:autokey_admin.proto +@googleapis//google/cloud/kms/v1:ekm_service.proto +@googleapis//google/cloud/kms/v1:hsm_management.proto +@googleapis//google/cloud/kms/v1:resources.proto +@googleapis//google/cloud/kms/v1:service.proto diff --git a/external/googleapis/protolists/language.list b/external/googleapis/protolists/language.list index 11fcee13ff4fa..dce1ed7c2dfc5 100644 --- a/external/googleapis/protolists/language.list +++ b/external/googleapis/protolists/language.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/cloud/language/v1:language_service.proto -@com_google_googleapis//google/cloud/language/v2:language_service.proto +@googleapis//google/cloud/language/v1:language_service.proto +@googleapis//google/cloud/language/v2:language_service.proto diff --git a/external/googleapis/protolists/licensemanager.list b/external/googleapis/protolists/licensemanager.list index b8b737b22443a..0c2346a801804 100644 --- a/external/googleapis/protolists/licensemanager.list +++ b/external/googleapis/protolists/licensemanager.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/cloud/licensemanager/v1:api_entities.proto -@com_google_googleapis//google/cloud/licensemanager/v1:licensemanager.proto +@googleapis//google/cloud/licensemanager/v1:api_entities.proto +@googleapis//google/cloud/licensemanager/v1:licensemanager.proto diff --git a/external/googleapis/protolists/logging.list b/external/googleapis/protolists/logging.list index c17233e432056..7a32e64762b6d 100644 --- a/external/googleapis/protolists/logging.list +++ b/external/googleapis/protolists/logging.list @@ -1,4 +1,4 @@ -@com_google_googleapis//google/logging/v2:log_entry.proto -@com_google_googleapis//google/logging/v2:logging.proto -@com_google_googleapis//google/logging/v2:logging_config.proto -@com_google_googleapis//google/logging/v2:logging_metrics.proto +@googleapis//google/logging/v2:log_entry.proto +@googleapis//google/logging/v2:logging.proto +@googleapis//google/logging/v2:logging_config.proto +@googleapis//google/logging/v2:logging_metrics.proto diff --git a/external/googleapis/protolists/logging_type.list b/external/googleapis/protolists/logging_type.list index fde81c913e41d..40039bc218ed6 100644 --- a/external/googleapis/protolists/logging_type.list +++ b/external/googleapis/protolists/logging_type.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/logging/type:http_request.proto -@com_google_googleapis//google/logging/type:log_severity.proto +@googleapis//google/logging/type:http_request.proto +@googleapis//google/logging/type:log_severity.proto diff --git a/external/googleapis/protolists/lustre.list b/external/googleapis/protolists/lustre.list index 676a40809c361..9da3687a2546e 100644 --- a/external/googleapis/protolists/lustre.list +++ b/external/googleapis/protolists/lustre.list @@ -1,3 +1,3 @@ -@com_google_googleapis//google/cloud/lustre/v1:instance.proto -@com_google_googleapis//google/cloud/lustre/v1:lustre.proto -@com_google_googleapis//google/cloud/lustre/v1:transfer.proto +@googleapis//google/cloud/lustre/v1:instance.proto +@googleapis//google/cloud/lustre/v1:lustre.proto +@googleapis//google/cloud/lustre/v1:transfer.proto diff --git a/external/googleapis/protolists/maintenance.list b/external/googleapis/protolists/maintenance.list index 3c118b13d3f73..1d214e3500b23 100644 --- a/external/googleapis/protolists/maintenance.list +++ b/external/googleapis/protolists/maintenance.list @@ -1 +1 @@ -@com_google_googleapis//google/cloud/maintenance/api/v1:maintenance_service.proto +@googleapis//google/cloud/maintenance/api/v1:maintenance_service.proto diff --git a/external/googleapis/protolists/managedidentities.list b/external/googleapis/protolists/managedidentities.list index 86337eb3002af..f986905ce8a24 100644 --- a/external/googleapis/protolists/managedidentities.list +++ b/external/googleapis/protolists/managedidentities.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/cloud/managedidentities/v1:managed_identities_service.proto -@com_google_googleapis//google/cloud/managedidentities/v1:resource.proto +@googleapis//google/cloud/managedidentities/v1:managed_identities_service.proto +@googleapis//google/cloud/managedidentities/v1:resource.proto diff --git a/external/googleapis/protolists/managedkafka.list b/external/googleapis/protolists/managedkafka.list index b359d9053f2d4..4187899be663a 100644 --- a/external/googleapis/protolists/managedkafka.list +++ b/external/googleapis/protolists/managedkafka.list @@ -1,5 +1,5 @@ -@com_google_googleapis//google/cloud/managedkafka/schemaregistry/v1:schema_registry.proto -@com_google_googleapis//google/cloud/managedkafka/schemaregistry/v1:schema_registry_resources.proto -@com_google_googleapis//google/cloud/managedkafka/v1:managed_kafka.proto -@com_google_googleapis//google/cloud/managedkafka/v1:managed_kafka_connect.proto -@com_google_googleapis//google/cloud/managedkafka/v1:resources.proto +@googleapis//google/cloud/managedkafka/schemaregistry/v1:schema_registry.proto +@googleapis//google/cloud/managedkafka/schemaregistry/v1:schema_registry_resources.proto +@googleapis//google/cloud/managedkafka/v1:managed_kafka.proto +@googleapis//google/cloud/managedkafka/v1:managed_kafka_connect.proto +@googleapis//google/cloud/managedkafka/v1:resources.proto diff --git a/external/googleapis/protolists/memcache.list b/external/googleapis/protolists/memcache.list index 3e67d6855bf9c..6e6962ff4823a 100644 --- a/external/googleapis/protolists/memcache.list +++ b/external/googleapis/protolists/memcache.list @@ -1 +1 @@ -@com_google_googleapis//google/cloud/memcache/v1:cloud_memcache.proto +@googleapis//google/cloud/memcache/v1:cloud_memcache.proto diff --git a/external/googleapis/protolists/memorystore.list b/external/googleapis/protolists/memorystore.list index 2b9be63a9d600..4d7355e8fd396 100644 --- a/external/googleapis/protolists/memorystore.list +++ b/external/googleapis/protolists/memorystore.list @@ -1 +1 @@ -@com_google_googleapis//google/cloud/memorystore/v1:memorystore.proto +@googleapis//google/cloud/memorystore/v1:memorystore.proto diff --git a/external/googleapis/protolists/metastore.list b/external/googleapis/protolists/metastore.list index 5eb58d3e1c6f4..744e3350a2fcc 100644 --- a/external/googleapis/protolists/metastore.list +++ b/external/googleapis/protolists/metastore.list @@ -1,3 +1,3 @@ -@com_google_googleapis//google/cloud/metastore/logging/v1:log_streams.proto -@com_google_googleapis//google/cloud/metastore/v1:metastore.proto -@com_google_googleapis//google/cloud/metastore/v1:metastore_federation.proto +@googleapis//google/cloud/metastore/logging/v1:log_streams.proto +@googleapis//google/cloud/metastore/v1:metastore.proto +@googleapis//google/cloud/metastore/v1:metastore_federation.proto diff --git a/external/googleapis/protolists/migrationcenter.list b/external/googleapis/protolists/migrationcenter.list index f08c9c1eab9b1..bdb3b2aa300c4 100644 --- a/external/googleapis/protolists/migrationcenter.list +++ b/external/googleapis/protolists/migrationcenter.list @@ -1 +1 @@ -@com_google_googleapis//google/cloud/migrationcenter/v1:migrationcenter.proto +@googleapis//google/cloud/migrationcenter/v1:migrationcenter.proto diff --git a/external/googleapis/protolists/monitoring.list b/external/googleapis/protolists/monitoring.list index 378157448fd33..68b7571fb8705 100644 --- a/external/googleapis/protolists/monitoring.list +++ b/external/googleapis/protolists/monitoring.list @@ -1,43 +1,43 @@ -@com_google_googleapis//google/monitoring/dashboard/v1:alertchart.proto -@com_google_googleapis//google/monitoring/dashboard/v1:collapsible_group.proto -@com_google_googleapis//google/monitoring/dashboard/v1:common.proto -@com_google_googleapis//google/monitoring/dashboard/v1:dashboard.proto -@com_google_googleapis//google/monitoring/dashboard/v1:dashboard_filter.proto -@com_google_googleapis//google/monitoring/dashboard/v1:dashboards_service.proto -@com_google_googleapis//google/monitoring/dashboard/v1:drilldowns.proto -@com_google_googleapis//google/monitoring/dashboard/v1:error_reporting_panel.proto -@com_google_googleapis//google/monitoring/dashboard/v1:incident_list.proto -@com_google_googleapis//google/monitoring/dashboard/v1:layouts.proto -@com_google_googleapis//google/monitoring/dashboard/v1:logs_panel.proto -@com_google_googleapis//google/monitoring/dashboard/v1:metrics.proto -@com_google_googleapis//google/monitoring/dashboard/v1:piechart.proto -@com_google_googleapis//google/monitoring/dashboard/v1:scorecard.proto -@com_google_googleapis//google/monitoring/dashboard/v1:section_header.proto -@com_google_googleapis//google/monitoring/dashboard/v1:service.proto -@com_google_googleapis//google/monitoring/dashboard/v1:single_view_group.proto -@com_google_googleapis//google/monitoring/dashboard/v1:table.proto -@com_google_googleapis//google/monitoring/dashboard/v1:table_display_options.proto -@com_google_googleapis//google/monitoring/dashboard/v1:text.proto -@com_google_googleapis//google/monitoring/dashboard/v1:widget.proto -@com_google_googleapis//google/monitoring/dashboard/v1:xychart.proto -@com_google_googleapis//google/monitoring/metricsscope/v1:metrics_scope.proto -@com_google_googleapis//google/monitoring/metricsscope/v1:metrics_scopes.proto -@com_google_googleapis//google/monitoring/v3:alert.proto -@com_google_googleapis//google/monitoring/v3:alert_service.proto -@com_google_googleapis//google/monitoring/v3:common.proto -@com_google_googleapis//google/monitoring/v3:dropped_labels.proto -@com_google_googleapis//google/monitoring/v3:group.proto -@com_google_googleapis//google/monitoring/v3:group_service.proto -@com_google_googleapis//google/monitoring/v3:metric.proto -@com_google_googleapis//google/monitoring/v3:metric_service.proto -@com_google_googleapis//google/monitoring/v3:mutation_record.proto -@com_google_googleapis//google/monitoring/v3:notification.proto -@com_google_googleapis//google/monitoring/v3:notification_service.proto -@com_google_googleapis//google/monitoring/v3:query_service.proto -@com_google_googleapis//google/monitoring/v3:service.proto -@com_google_googleapis//google/monitoring/v3:service_service.proto -@com_google_googleapis//google/monitoring/v3:snooze.proto -@com_google_googleapis//google/monitoring/v3:snooze_service.proto -@com_google_googleapis//google/monitoring/v3:span_context.proto -@com_google_googleapis//google/monitoring/v3:uptime.proto -@com_google_googleapis//google/monitoring/v3:uptime_service.proto +@googleapis//google/monitoring/dashboard/v1:alertchart.proto +@googleapis//google/monitoring/dashboard/v1:collapsible_group.proto +@googleapis//google/monitoring/dashboard/v1:common.proto +@googleapis//google/monitoring/dashboard/v1:dashboard.proto +@googleapis//google/monitoring/dashboard/v1:dashboard_filter.proto +@googleapis//google/monitoring/dashboard/v1:dashboards_service.proto +@googleapis//google/monitoring/dashboard/v1:drilldowns.proto +@googleapis//google/monitoring/dashboard/v1:error_reporting_panel.proto +@googleapis//google/monitoring/dashboard/v1:incident_list.proto +@googleapis//google/monitoring/dashboard/v1:layouts.proto +@googleapis//google/monitoring/dashboard/v1:logs_panel.proto +@googleapis//google/monitoring/dashboard/v1:metrics.proto +@googleapis//google/monitoring/dashboard/v1:piechart.proto +@googleapis//google/monitoring/dashboard/v1:scorecard.proto +@googleapis//google/monitoring/dashboard/v1:section_header.proto +@googleapis//google/monitoring/dashboard/v1:service.proto +@googleapis//google/monitoring/dashboard/v1:single_view_group.proto +@googleapis//google/monitoring/dashboard/v1:table.proto +@googleapis//google/monitoring/dashboard/v1:table_display_options.proto +@googleapis//google/monitoring/dashboard/v1:text.proto +@googleapis//google/monitoring/dashboard/v1:widget.proto +@googleapis//google/monitoring/dashboard/v1:xychart.proto +@googleapis//google/monitoring/metricsscope/v1:metrics_scope.proto +@googleapis//google/monitoring/metricsscope/v1:metrics_scopes.proto +@googleapis//google/monitoring/v3:alert.proto +@googleapis//google/monitoring/v3:alert_service.proto +@googleapis//google/monitoring/v3:common.proto +@googleapis//google/monitoring/v3:dropped_labels.proto +@googleapis//google/monitoring/v3:group.proto +@googleapis//google/monitoring/v3:group_service.proto +@googleapis//google/monitoring/v3:metric.proto +@googleapis//google/monitoring/v3:metric_service.proto +@googleapis//google/monitoring/v3:mutation_record.proto +@googleapis//google/monitoring/v3:notification.proto +@googleapis//google/monitoring/v3:notification_service.proto +@googleapis//google/monitoring/v3:query_service.proto +@googleapis//google/monitoring/v3:service.proto +@googleapis//google/monitoring/v3:service_service.proto +@googleapis//google/monitoring/v3:snooze.proto +@googleapis//google/monitoring/v3:snooze_service.proto +@googleapis//google/monitoring/v3:span_context.proto +@googleapis//google/monitoring/v3:uptime.proto +@googleapis//google/monitoring/v3:uptime_service.proto diff --git a/external/googleapis/protolists/netapp.list b/external/googleapis/protolists/netapp.list index c0a7a143007c8..f8b9d854d58e3 100644 --- a/external/googleapis/protolists/netapp.list +++ b/external/googleapis/protolists/netapp.list @@ -1,13 +1,13 @@ -@com_google_googleapis//google/cloud/netapp/v1:active_directory.proto -@com_google_googleapis//google/cloud/netapp/v1:backup.proto -@com_google_googleapis//google/cloud/netapp/v1:backup_policy.proto -@com_google_googleapis//google/cloud/netapp/v1:backup_vault.proto -@com_google_googleapis//google/cloud/netapp/v1:cloud_netapp_service.proto -@com_google_googleapis//google/cloud/netapp/v1:common.proto -@com_google_googleapis//google/cloud/netapp/v1:host_group.proto -@com_google_googleapis//google/cloud/netapp/v1:kms.proto -@com_google_googleapis//google/cloud/netapp/v1:quota_rule.proto -@com_google_googleapis//google/cloud/netapp/v1:replication.proto -@com_google_googleapis//google/cloud/netapp/v1:snapshot.proto -@com_google_googleapis//google/cloud/netapp/v1:storage_pool.proto -@com_google_googleapis//google/cloud/netapp/v1:volume.proto +@googleapis//google/cloud/netapp/v1:active_directory.proto +@googleapis//google/cloud/netapp/v1:backup.proto +@googleapis//google/cloud/netapp/v1:backup_policy.proto +@googleapis//google/cloud/netapp/v1:backup_vault.proto +@googleapis//google/cloud/netapp/v1:cloud_netapp_service.proto +@googleapis//google/cloud/netapp/v1:common.proto +@googleapis//google/cloud/netapp/v1:host_group.proto +@googleapis//google/cloud/netapp/v1:kms.proto +@googleapis//google/cloud/netapp/v1:quota_rule.proto +@googleapis//google/cloud/netapp/v1:replication.proto +@googleapis//google/cloud/netapp/v1:snapshot.proto +@googleapis//google/cloud/netapp/v1:storage_pool.proto +@googleapis//google/cloud/netapp/v1:volume.proto diff --git a/external/googleapis/protolists/networkconnectivity.list b/external/googleapis/protolists/networkconnectivity.list index ae27f5c6d90b3..a1edd2a0e982a 100644 --- a/external/googleapis/protolists/networkconnectivity.list +++ b/external/googleapis/protolists/networkconnectivity.list @@ -1,6 +1,6 @@ -@com_google_googleapis//google/cloud/networkconnectivity/v1:common.proto -@com_google_googleapis//google/cloud/networkconnectivity/v1:cross_network_automation.proto -@com_google_googleapis//google/cloud/networkconnectivity/v1:data_transfer.proto -@com_google_googleapis//google/cloud/networkconnectivity/v1:hub.proto -@com_google_googleapis//google/cloud/networkconnectivity/v1:internal_range.proto -@com_google_googleapis//google/cloud/networkconnectivity/v1:policy_based_routing.proto +@googleapis//google/cloud/networkconnectivity/v1:common.proto +@googleapis//google/cloud/networkconnectivity/v1:cross_network_automation.proto +@googleapis//google/cloud/networkconnectivity/v1:data_transfer.proto +@googleapis//google/cloud/networkconnectivity/v1:hub.proto +@googleapis//google/cloud/networkconnectivity/v1:internal_range.proto +@googleapis//google/cloud/networkconnectivity/v1:policy_based_routing.proto diff --git a/external/googleapis/protolists/networkmanagement.list b/external/googleapis/protolists/networkmanagement.list index fb9f1ff700015..2ac265aa9d7eb 100644 --- a/external/googleapis/protolists/networkmanagement.list +++ b/external/googleapis/protolists/networkmanagement.list @@ -1,5 +1,5 @@ -@com_google_googleapis//google/cloud/networkmanagement/v1:connectivity_test.proto -@com_google_googleapis//google/cloud/networkmanagement/v1:reachability.proto -@com_google_googleapis//google/cloud/networkmanagement/v1:trace.proto -@com_google_googleapis//google/cloud/networkmanagement/v1:vpc_flow_logs.proto -@com_google_googleapis//google/cloud/networkmanagement/v1:vpc_flow_logs_config.proto +@googleapis//google/cloud/networkmanagement/v1:connectivity_test.proto +@googleapis//google/cloud/networkmanagement/v1:reachability.proto +@googleapis//google/cloud/networkmanagement/v1:trace.proto +@googleapis//google/cloud/networkmanagement/v1:vpc_flow_logs.proto +@googleapis//google/cloud/networkmanagement/v1:vpc_flow_logs_config.proto diff --git a/external/googleapis/protolists/networksecurity.list b/external/googleapis/protolists/networksecurity.list index 4303002c9cd51..917cc32161b26 100644 --- a/external/googleapis/protolists/networksecurity.list +++ b/external/googleapis/protolists/networksecurity.list @@ -1,7 +1,7 @@ -@com_google_googleapis//google/cloud/networksecurity/v1:address_group.proto -@com_google_googleapis//google/cloud/networksecurity/v1:authorization_policy.proto -@com_google_googleapis//google/cloud/networksecurity/v1:client_tls_policy.proto -@com_google_googleapis//google/cloud/networksecurity/v1:common.proto -@com_google_googleapis//google/cloud/networksecurity/v1:network_security.proto -@com_google_googleapis//google/cloud/networksecurity/v1:server_tls_policy.proto -@com_google_googleapis//google/cloud/networksecurity/v1:tls.proto +@googleapis//google/cloud/networksecurity/v1:address_group.proto +@googleapis//google/cloud/networksecurity/v1:authorization_policy.proto +@googleapis//google/cloud/networksecurity/v1:client_tls_policy.proto +@googleapis//google/cloud/networksecurity/v1:common.proto +@googleapis//google/cloud/networksecurity/v1:network_security.proto +@googleapis//google/cloud/networksecurity/v1:server_tls_policy.proto +@googleapis//google/cloud/networksecurity/v1:tls.proto diff --git a/external/googleapis/protolists/networkservices.list b/external/googleapis/protolists/networkservices.list index b74da16242691..92670c8db8031 100644 --- a/external/googleapis/protolists/networkservices.list +++ b/external/googleapis/protolists/networkservices.list @@ -1,14 +1,14 @@ -@com_google_googleapis//google/cloud/networkservices/v1:common.proto -@com_google_googleapis//google/cloud/networkservices/v1:dep.proto -@com_google_googleapis//google/cloud/networkservices/v1:endpoint_policy.proto -@com_google_googleapis//google/cloud/networkservices/v1:extensibility.proto -@com_google_googleapis//google/cloud/networkservices/v1:gateway.proto -@com_google_googleapis//google/cloud/networkservices/v1:grpc_route.proto -@com_google_googleapis//google/cloud/networkservices/v1:http_route.proto -@com_google_googleapis//google/cloud/networkservices/v1:mesh.proto -@com_google_googleapis//google/cloud/networkservices/v1:network_services.proto -@com_google_googleapis//google/cloud/networkservices/v1:route_view.proto -@com_google_googleapis//google/cloud/networkservices/v1:service_binding.proto -@com_google_googleapis//google/cloud/networkservices/v1:service_lb_policy.proto -@com_google_googleapis//google/cloud/networkservices/v1:tcp_route.proto -@com_google_googleapis//google/cloud/networkservices/v1:tls_route.proto +@googleapis//google/cloud/networkservices/v1:common.proto +@googleapis//google/cloud/networkservices/v1:dep.proto +@googleapis//google/cloud/networkservices/v1:endpoint_policy.proto +@googleapis//google/cloud/networkservices/v1:extensibility.proto +@googleapis//google/cloud/networkservices/v1:gateway.proto +@googleapis//google/cloud/networkservices/v1:grpc_route.proto +@googleapis//google/cloud/networkservices/v1:http_route.proto +@googleapis//google/cloud/networkservices/v1:mesh.proto +@googleapis//google/cloud/networkservices/v1:network_services.proto +@googleapis//google/cloud/networkservices/v1:route_view.proto +@googleapis//google/cloud/networkservices/v1:service_binding.proto +@googleapis//google/cloud/networkservices/v1:service_lb_policy.proto +@googleapis//google/cloud/networkservices/v1:tcp_route.proto +@googleapis//google/cloud/networkservices/v1:tls_route.proto diff --git a/external/googleapis/protolists/notebooks.list b/external/googleapis/protolists/notebooks.list index 4d8373e3848dc..9fb3b4aa7e793 100644 --- a/external/googleapis/protolists/notebooks.list +++ b/external/googleapis/protolists/notebooks.list @@ -1,15 +1,15 @@ -@com_google_googleapis//google/cloud/notebooks/v1:diagnostic_config.proto -@com_google_googleapis//google/cloud/notebooks/v1:environment.proto -@com_google_googleapis//google/cloud/notebooks/v1:event.proto -@com_google_googleapis//google/cloud/notebooks/v1:execution.proto -@com_google_googleapis//google/cloud/notebooks/v1:instance.proto -@com_google_googleapis//google/cloud/notebooks/v1:instance_config.proto -@com_google_googleapis//google/cloud/notebooks/v1:managed_service.proto -@com_google_googleapis//google/cloud/notebooks/v1:runtime.proto -@com_google_googleapis//google/cloud/notebooks/v1:schedule.proto -@com_google_googleapis//google/cloud/notebooks/v1:service.proto -@com_google_googleapis//google/cloud/notebooks/v2:diagnostic_config.proto -@com_google_googleapis//google/cloud/notebooks/v2:event.proto -@com_google_googleapis//google/cloud/notebooks/v2:gce_setup.proto -@com_google_googleapis//google/cloud/notebooks/v2:instance.proto -@com_google_googleapis//google/cloud/notebooks/v2:service.proto +@googleapis//google/cloud/notebooks/v1:diagnostic_config.proto +@googleapis//google/cloud/notebooks/v1:environment.proto +@googleapis//google/cloud/notebooks/v1:event.proto +@googleapis//google/cloud/notebooks/v1:execution.proto +@googleapis//google/cloud/notebooks/v1:instance.proto +@googleapis//google/cloud/notebooks/v1:instance_config.proto +@googleapis//google/cloud/notebooks/v1:managed_service.proto +@googleapis//google/cloud/notebooks/v1:runtime.proto +@googleapis//google/cloud/notebooks/v1:schedule.proto +@googleapis//google/cloud/notebooks/v1:service.proto +@googleapis//google/cloud/notebooks/v2:diagnostic_config.proto +@googleapis//google/cloud/notebooks/v2:event.proto +@googleapis//google/cloud/notebooks/v2:gce_setup.proto +@googleapis//google/cloud/notebooks/v2:instance.proto +@googleapis//google/cloud/notebooks/v2:service.proto diff --git a/external/googleapis/protolists/optimization.list b/external/googleapis/protolists/optimization.list index cede1e4935509..99c814ce70592 100644 --- a/external/googleapis/protolists/optimization.list +++ b/external/googleapis/protolists/optimization.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/cloud/optimization/v1:async_model.proto -@com_google_googleapis//google/cloud/optimization/v1:fleet_routing.proto +@googleapis//google/cloud/optimization/v1:async_model.proto +@googleapis//google/cloud/optimization/v1:fleet_routing.proto diff --git a/external/googleapis/protolists/oracledatabase.list b/external/googleapis/protolists/oracledatabase.list index 4ab863e29dead..b2175edf2ace3 100644 --- a/external/googleapis/protolists/oracledatabase.list +++ b/external/googleapis/protolists/oracledatabase.list @@ -1,25 +1,25 @@ -@com_google_googleapis//google/cloud/oracledatabase/v1:autonomous_database.proto -@com_google_googleapis//google/cloud/oracledatabase/v1:autonomous_database_character_set.proto -@com_google_googleapis//google/cloud/oracledatabase/v1:autonomous_db_backup.proto -@com_google_googleapis//google/cloud/oracledatabase/v1:autonomous_db_version.proto -@com_google_googleapis//google/cloud/oracledatabase/v1:common.proto -@com_google_googleapis//google/cloud/oracledatabase/v1:database.proto -@com_google_googleapis//google/cloud/oracledatabase/v1:database_character_set.proto -@com_google_googleapis//google/cloud/oracledatabase/v1:db_node.proto -@com_google_googleapis//google/cloud/oracledatabase/v1:db_server.proto -@com_google_googleapis//google/cloud/oracledatabase/v1:db_system.proto -@com_google_googleapis//google/cloud/oracledatabase/v1:db_system_initial_storage_size.proto -@com_google_googleapis//google/cloud/oracledatabase/v1:db_system_shape.proto -@com_google_googleapis//google/cloud/oracledatabase/v1:db_version.proto -@com_google_googleapis//google/cloud/oracledatabase/v1:entitlement.proto -@com_google_googleapis//google/cloud/oracledatabase/v1:exadata_infra.proto -@com_google_googleapis//google/cloud/oracledatabase/v1:exadb_vm_cluster.proto -@com_google_googleapis//google/cloud/oracledatabase/v1:exascale_db_storage_vault.proto -@com_google_googleapis//google/cloud/oracledatabase/v1:gi_version.proto -@com_google_googleapis//google/cloud/oracledatabase/v1:location_metadata.proto -@com_google_googleapis//google/cloud/oracledatabase/v1:minor_version.proto -@com_google_googleapis//google/cloud/oracledatabase/v1:odb_network.proto -@com_google_googleapis//google/cloud/oracledatabase/v1:odb_subnet.proto -@com_google_googleapis//google/cloud/oracledatabase/v1:oracledatabase.proto -@com_google_googleapis//google/cloud/oracledatabase/v1:pluggable_database.proto -@com_google_googleapis//google/cloud/oracledatabase/v1:vm_cluster.proto +@googleapis//google/cloud/oracledatabase/v1:autonomous_database.proto +@googleapis//google/cloud/oracledatabase/v1:autonomous_database_character_set.proto +@googleapis//google/cloud/oracledatabase/v1:autonomous_db_backup.proto +@googleapis//google/cloud/oracledatabase/v1:autonomous_db_version.proto +@googleapis//google/cloud/oracledatabase/v1:common.proto +@googleapis//google/cloud/oracledatabase/v1:database.proto +@googleapis//google/cloud/oracledatabase/v1:database_character_set.proto +@googleapis//google/cloud/oracledatabase/v1:db_node.proto +@googleapis//google/cloud/oracledatabase/v1:db_server.proto +@googleapis//google/cloud/oracledatabase/v1:db_system.proto +@googleapis//google/cloud/oracledatabase/v1:db_system_initial_storage_size.proto +@googleapis//google/cloud/oracledatabase/v1:db_system_shape.proto +@googleapis//google/cloud/oracledatabase/v1:db_version.proto +@googleapis//google/cloud/oracledatabase/v1:entitlement.proto +@googleapis//google/cloud/oracledatabase/v1:exadata_infra.proto +@googleapis//google/cloud/oracledatabase/v1:exadb_vm_cluster.proto +@googleapis//google/cloud/oracledatabase/v1:exascale_db_storage_vault.proto +@googleapis//google/cloud/oracledatabase/v1:gi_version.proto +@googleapis//google/cloud/oracledatabase/v1:location_metadata.proto +@googleapis//google/cloud/oracledatabase/v1:minor_version.proto +@googleapis//google/cloud/oracledatabase/v1:odb_network.proto +@googleapis//google/cloud/oracledatabase/v1:odb_subnet.proto +@googleapis//google/cloud/oracledatabase/v1:oracledatabase.proto +@googleapis//google/cloud/oracledatabase/v1:pluggable_database.proto +@googleapis//google/cloud/oracledatabase/v1:vm_cluster.proto diff --git a/external/googleapis/protolists/orgpolicy.list b/external/googleapis/protolists/orgpolicy.list index d817d0f1df97a..d635a01563a49 100644 --- a/external/googleapis/protolists/orgpolicy.list +++ b/external/googleapis/protolists/orgpolicy.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/cloud/orgpolicy/v2:constraint.proto -@com_google_googleapis//google/cloud/orgpolicy/v2:orgpolicy.proto +@googleapis//google/cloud/orgpolicy/v2:constraint.proto +@googleapis//google/cloud/orgpolicy/v2:orgpolicy.proto diff --git a/external/googleapis/protolists/osconfig.list b/external/googleapis/protolists/osconfig.list index 3e002ad07ca17..eb46136c55545 100644 --- a/external/googleapis/protolists/osconfig.list +++ b/external/googleapis/protolists/osconfig.list @@ -1,17 +1,17 @@ -@com_google_googleapis//google/cloud/osconfig/agentendpoint/v1:agentendpoint.proto -@com_google_googleapis//google/cloud/osconfig/agentendpoint/v1:config_common.proto -@com_google_googleapis//google/cloud/osconfig/agentendpoint/v1:inventory.proto -@com_google_googleapis//google/cloud/osconfig/agentendpoint/v1:os_policy.proto -@com_google_googleapis//google/cloud/osconfig/agentendpoint/v1:patch_jobs.proto -@com_google_googleapis//google/cloud/osconfig/agentendpoint/v1:tasks.proto -@com_google_googleapis//google/cloud/osconfig/agentendpoint/v1:vm_inventory.proto -@com_google_googleapis//google/cloud/osconfig/v1:inventory.proto -@com_google_googleapis//google/cloud/osconfig/v1:os_policy.proto -@com_google_googleapis//google/cloud/osconfig/v1:os_policy_assignment_reports.proto -@com_google_googleapis//google/cloud/osconfig/v1:os_policy_assignments.proto -@com_google_googleapis//google/cloud/osconfig/v1:osconfig_common.proto -@com_google_googleapis//google/cloud/osconfig/v1:osconfig_service.proto -@com_google_googleapis//google/cloud/osconfig/v1:osconfig_zonal_service.proto -@com_google_googleapis//google/cloud/osconfig/v1:patch_deployments.proto -@com_google_googleapis//google/cloud/osconfig/v1:patch_jobs.proto -@com_google_googleapis//google/cloud/osconfig/v1:vulnerability.proto +@googleapis//google/cloud/osconfig/agentendpoint/v1:agentendpoint.proto +@googleapis//google/cloud/osconfig/agentendpoint/v1:config_common.proto +@googleapis//google/cloud/osconfig/agentendpoint/v1:inventory.proto +@googleapis//google/cloud/osconfig/agentendpoint/v1:os_policy.proto +@googleapis//google/cloud/osconfig/agentendpoint/v1:patch_jobs.proto +@googleapis//google/cloud/osconfig/agentendpoint/v1:tasks.proto +@googleapis//google/cloud/osconfig/agentendpoint/v1:vm_inventory.proto +@googleapis//google/cloud/osconfig/v1:inventory.proto +@googleapis//google/cloud/osconfig/v1:os_policy.proto +@googleapis//google/cloud/osconfig/v1:os_policy_assignment_reports.proto +@googleapis//google/cloud/osconfig/v1:os_policy_assignments.proto +@googleapis//google/cloud/osconfig/v1:osconfig_common.proto +@googleapis//google/cloud/osconfig/v1:osconfig_service.proto +@googleapis//google/cloud/osconfig/v1:osconfig_zonal_service.proto +@googleapis//google/cloud/osconfig/v1:patch_deployments.proto +@googleapis//google/cloud/osconfig/v1:patch_jobs.proto +@googleapis//google/cloud/osconfig/v1:vulnerability.proto diff --git a/external/googleapis/protolists/oslogin.list b/external/googleapis/protolists/oslogin.list index 17d4b36451e60..65132fc0a09eb 100644 --- a/external/googleapis/protolists/oslogin.list +++ b/external/googleapis/protolists/oslogin.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/cloud/oslogin/common:common.proto -@com_google_googleapis//google/cloud/oslogin/v1:oslogin.proto +@googleapis//google/cloud/oslogin/common:common.proto +@googleapis//google/cloud/oslogin/v1:oslogin.proto diff --git a/external/googleapis/protolists/parallelstore.list b/external/googleapis/protolists/parallelstore.list index f2bba8e97dc84..3db79b6e13a1e 100644 --- a/external/googleapis/protolists/parallelstore.list +++ b/external/googleapis/protolists/parallelstore.list @@ -1 +1 @@ -@com_google_googleapis//google/cloud/parallelstore/v1:parallelstore.proto +@googleapis//google/cloud/parallelstore/v1:parallelstore.proto diff --git a/external/googleapis/protolists/parametermanager.list b/external/googleapis/protolists/parametermanager.list index 1667aadb7cd15..897b0def96d3f 100644 --- a/external/googleapis/protolists/parametermanager.list +++ b/external/googleapis/protolists/parametermanager.list @@ -1 +1 @@ -@com_google_googleapis//google/cloud/parametermanager/v1:service.proto +@googleapis//google/cloud/parametermanager/v1:service.proto diff --git a/external/googleapis/protolists/policysimulator.list b/external/googleapis/protolists/policysimulator.list index b142102b80ac5..5a1fecd4689a6 100644 --- a/external/googleapis/protolists/policysimulator.list +++ b/external/googleapis/protolists/policysimulator.list @@ -1,3 +1,3 @@ -@com_google_googleapis//google/cloud/policysimulator/v1:explanations.proto -@com_google_googleapis//google/cloud/policysimulator/v1:orgpolicy.proto -@com_google_googleapis//google/cloud/policysimulator/v1:simulator.proto +@googleapis//google/cloud/policysimulator/v1:explanations.proto +@googleapis//google/cloud/policysimulator/v1:orgpolicy.proto +@googleapis//google/cloud/policysimulator/v1:simulator.proto diff --git a/external/googleapis/protolists/policytroubleshooter.list b/external/googleapis/protolists/policytroubleshooter.list index d1eee16bdb7a6..f1069d1a0fc09 100644 --- a/external/googleapis/protolists/policytroubleshooter.list +++ b/external/googleapis/protolists/policytroubleshooter.list @@ -1,3 +1,3 @@ -@com_google_googleapis//google/cloud/policytroubleshooter/iam/v3:troubleshooter.proto -@com_google_googleapis//google/cloud/policytroubleshooter/v1:checker.proto -@com_google_googleapis//google/cloud/policytroubleshooter/v1:explanations.proto +@googleapis//google/cloud/policytroubleshooter/iam/v3:troubleshooter.proto +@googleapis//google/cloud/policytroubleshooter/v1:checker.proto +@googleapis//google/cloud/policytroubleshooter/v1:explanations.proto diff --git a/external/googleapis/protolists/privateca.list b/external/googleapis/protolists/privateca.list index daecfec413538..a98563539c742 100644 --- a/external/googleapis/protolists/privateca.list +++ b/external/googleapis/protolists/privateca.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/cloud/security/privateca/v1:resources.proto -@com_google_googleapis//google/cloud/security/privateca/v1:service.proto +@googleapis//google/cloud/security/privateca/v1:resources.proto +@googleapis//google/cloud/security/privateca/v1:service.proto diff --git a/external/googleapis/protolists/privilegedaccessmanager.list b/external/googleapis/protolists/privilegedaccessmanager.list index a62ebaa12a002..7d87db5e5f273 100644 --- a/external/googleapis/protolists/privilegedaccessmanager.list +++ b/external/googleapis/protolists/privilegedaccessmanager.list @@ -1 +1 @@ -@com_google_googleapis//google/cloud/privilegedaccessmanager/v1:privilegedaccessmanager.proto +@googleapis//google/cloud/privilegedaccessmanager/v1:privilegedaccessmanager.proto diff --git a/external/googleapis/protolists/profiler.list b/external/googleapis/protolists/profiler.list index 890099f603643..bcb4aa7fad9df 100644 --- a/external/googleapis/protolists/profiler.list +++ b/external/googleapis/protolists/profiler.list @@ -1 +1 @@ -@com_google_googleapis//google/devtools/cloudprofiler/v2:profiler.proto +@googleapis//google/devtools/cloudprofiler/v2:profiler.proto diff --git a/external/googleapis/protolists/publicca.list b/external/googleapis/protolists/publicca.list index ef80cc31777a5..26d3fcece6206 100644 --- a/external/googleapis/protolists/publicca.list +++ b/external/googleapis/protolists/publicca.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/cloud/security/publicca/v1:resources.proto -@com_google_googleapis//google/cloud/security/publicca/v1:service.proto +@googleapis//google/cloud/security/publicca/v1:resources.proto +@googleapis//google/cloud/security/publicca/v1:service.proto diff --git a/external/googleapis/protolists/pubsub.list b/external/googleapis/protolists/pubsub.list index 613ad8287ac85..b87f07346559e 100644 --- a/external/googleapis/protolists/pubsub.list +++ b/external/googleapis/protolists/pubsub.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/pubsub/v1:pubsub.proto -@com_google_googleapis//google/pubsub/v1:schema.proto +@googleapis//google/pubsub/v1:pubsub.proto +@googleapis//google/pubsub/v1:schema.proto diff --git a/external/googleapis/protolists/pubsublite.list b/external/googleapis/protolists/pubsublite.list index 432660ba52f1a..12e8c33cbd52b 100644 --- a/external/googleapis/protolists/pubsublite.list +++ b/external/googleapis/protolists/pubsublite.list @@ -1,6 +1,6 @@ -@com_google_googleapis//google/cloud/pubsublite/v1:admin.proto -@com_google_googleapis//google/cloud/pubsublite/v1:common.proto -@com_google_googleapis//google/cloud/pubsublite/v1:cursor.proto -@com_google_googleapis//google/cloud/pubsublite/v1:publisher.proto -@com_google_googleapis//google/cloud/pubsublite/v1:subscriber.proto -@com_google_googleapis//google/cloud/pubsublite/v1:topic_stats.proto +@googleapis//google/cloud/pubsublite/v1:admin.proto +@googleapis//google/cloud/pubsublite/v1:common.proto +@googleapis//google/cloud/pubsublite/v1:cursor.proto +@googleapis//google/cloud/pubsublite/v1:publisher.proto +@googleapis//google/cloud/pubsublite/v1:subscriber.proto +@googleapis//google/cloud/pubsublite/v1:topic_stats.proto diff --git a/external/googleapis/protolists/rapidmigrationassessment.list b/external/googleapis/protolists/rapidmigrationassessment.list index 381b0b6cea239..172e900b5a555 100644 --- a/external/googleapis/protolists/rapidmigrationassessment.list +++ b/external/googleapis/protolists/rapidmigrationassessment.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/cloud/rapidmigrationassessment/v1:api_entities.proto -@com_google_googleapis//google/cloud/rapidmigrationassessment/v1:rapidmigrationassessment.proto +@googleapis//google/cloud/rapidmigrationassessment/v1:api_entities.proto +@googleapis//google/cloud/rapidmigrationassessment/v1:rapidmigrationassessment.proto diff --git a/external/googleapis/protolists/recaptchaenterprise.list b/external/googleapis/protolists/recaptchaenterprise.list index 29a1d833e7a85..5f891628c92bc 100644 --- a/external/googleapis/protolists/recaptchaenterprise.list +++ b/external/googleapis/protolists/recaptchaenterprise.list @@ -1 +1 @@ -@com_google_googleapis//google/cloud/recaptchaenterprise/v1:recaptchaenterprise.proto +@googleapis//google/cloud/recaptchaenterprise/v1:recaptchaenterprise.proto diff --git a/external/googleapis/protolists/recommender.list b/external/googleapis/protolists/recommender.list index 26eec6bcc5fa1..28e011f336ff9 100644 --- a/external/googleapis/protolists/recommender.list +++ b/external/googleapis/protolists/recommender.list @@ -1,6 +1,6 @@ -@com_google_googleapis//google/cloud/recommender/logging/v1:action_log.proto -@com_google_googleapis//google/cloud/recommender/v1:insight.proto -@com_google_googleapis//google/cloud/recommender/v1:insight_type_config.proto -@com_google_googleapis//google/cloud/recommender/v1:recommendation.proto -@com_google_googleapis//google/cloud/recommender/v1:recommender_config.proto -@com_google_googleapis//google/cloud/recommender/v1:recommender_service.proto +@googleapis//google/cloud/recommender/logging/v1:action_log.proto +@googleapis//google/cloud/recommender/v1:insight.proto +@googleapis//google/cloud/recommender/v1:insight_type_config.proto +@googleapis//google/cloud/recommender/v1:recommendation.proto +@googleapis//google/cloud/recommender/v1:recommender_config.proto +@googleapis//google/cloud/recommender/v1:recommender_service.proto diff --git a/external/googleapis/protolists/redis.list b/external/googleapis/protolists/redis.list index 4586e2a40350b..84cb8152dd6d7 100644 --- a/external/googleapis/protolists/redis.list +++ b/external/googleapis/protolists/redis.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/cloud/redis/cluster/v1:cloud_redis_cluster.proto -@com_google_googleapis//google/cloud/redis/v1:cloud_redis.proto +@googleapis//google/cloud/redis/cluster/v1:cloud_redis_cluster.proto +@googleapis//google/cloud/redis/v1:cloud_redis.proto diff --git a/external/googleapis/protolists/resourcemanager.list b/external/googleapis/protolists/resourcemanager.list index 60f81aa13deb3..1b773586eb59b 100644 --- a/external/googleapis/protolists/resourcemanager.list +++ b/external/googleapis/protolists/resourcemanager.list @@ -1,7 +1,7 @@ -@com_google_googleapis//google/cloud/resourcemanager/v3:folders.proto -@com_google_googleapis//google/cloud/resourcemanager/v3:organizations.proto -@com_google_googleapis//google/cloud/resourcemanager/v3:projects.proto -@com_google_googleapis//google/cloud/resourcemanager/v3:tag_bindings.proto -@com_google_googleapis//google/cloud/resourcemanager/v3:tag_holds.proto -@com_google_googleapis//google/cloud/resourcemanager/v3:tag_keys.proto -@com_google_googleapis//google/cloud/resourcemanager/v3:tag_values.proto +@googleapis//google/cloud/resourcemanager/v3:folders.proto +@googleapis//google/cloud/resourcemanager/v3:organizations.proto +@googleapis//google/cloud/resourcemanager/v3:projects.proto +@googleapis//google/cloud/resourcemanager/v3:tag_bindings.proto +@googleapis//google/cloud/resourcemanager/v3:tag_holds.proto +@googleapis//google/cloud/resourcemanager/v3:tag_keys.proto +@googleapis//google/cloud/resourcemanager/v3:tag_values.proto diff --git a/external/googleapis/protolists/retail.list b/external/googleapis/protolists/retail.list index 58372766eea06..e3fe13ffb2a5e 100644 --- a/external/googleapis/protolists/retail.list +++ b/external/googleapis/protolists/retail.list @@ -1,25 +1,25 @@ -@com_google_googleapis//google/cloud/retail/v2:analytics_service.proto -@com_google_googleapis//google/cloud/retail/v2:catalog.proto -@com_google_googleapis//google/cloud/retail/v2:catalog_service.proto -@com_google_googleapis//google/cloud/retail/v2:common.proto -@com_google_googleapis//google/cloud/retail/v2:completion_service.proto -@com_google_googleapis//google/cloud/retail/v2:control.proto -@com_google_googleapis//google/cloud/retail/v2:control_service.proto -@com_google_googleapis//google/cloud/retail/v2:conversational_search_service.proto -@com_google_googleapis//google/cloud/retail/v2:export_config.proto -@com_google_googleapis//google/cloud/retail/v2:generative_question.proto -@com_google_googleapis//google/cloud/retail/v2:generative_question_service.proto -@com_google_googleapis//google/cloud/retail/v2:import_config.proto -@com_google_googleapis//google/cloud/retail/v2:model.proto -@com_google_googleapis//google/cloud/retail/v2:model_service.proto -@com_google_googleapis//google/cloud/retail/v2:prediction_service.proto -@com_google_googleapis//google/cloud/retail/v2:product.proto -@com_google_googleapis//google/cloud/retail/v2:product_service.proto -@com_google_googleapis//google/cloud/retail/v2:promotion.proto -@com_google_googleapis//google/cloud/retail/v2:purge_config.proto -@com_google_googleapis//google/cloud/retail/v2:safety.proto -@com_google_googleapis//google/cloud/retail/v2:search_service.proto -@com_google_googleapis//google/cloud/retail/v2:serving_config.proto -@com_google_googleapis//google/cloud/retail/v2:serving_config_service.proto -@com_google_googleapis//google/cloud/retail/v2:user_event.proto -@com_google_googleapis//google/cloud/retail/v2:user_event_service.proto +@googleapis//google/cloud/retail/v2:analytics_service.proto +@googleapis//google/cloud/retail/v2:catalog.proto +@googleapis//google/cloud/retail/v2:catalog_service.proto +@googleapis//google/cloud/retail/v2:common.proto +@googleapis//google/cloud/retail/v2:completion_service.proto +@googleapis//google/cloud/retail/v2:control.proto +@googleapis//google/cloud/retail/v2:control_service.proto +@googleapis//google/cloud/retail/v2:conversational_search_service.proto +@googleapis//google/cloud/retail/v2:export_config.proto +@googleapis//google/cloud/retail/v2:generative_question.proto +@googleapis//google/cloud/retail/v2:generative_question_service.proto +@googleapis//google/cloud/retail/v2:import_config.proto +@googleapis//google/cloud/retail/v2:model.proto +@googleapis//google/cloud/retail/v2:model_service.proto +@googleapis//google/cloud/retail/v2:prediction_service.proto +@googleapis//google/cloud/retail/v2:product.proto +@googleapis//google/cloud/retail/v2:product_service.proto +@googleapis//google/cloud/retail/v2:promotion.proto +@googleapis//google/cloud/retail/v2:purge_config.proto +@googleapis//google/cloud/retail/v2:safety.proto +@googleapis//google/cloud/retail/v2:search_service.proto +@googleapis//google/cloud/retail/v2:serving_config.proto +@googleapis//google/cloud/retail/v2:serving_config_service.proto +@googleapis//google/cloud/retail/v2:user_event.proto +@googleapis//google/cloud/retail/v2:user_event_service.proto diff --git a/external/googleapis/protolists/run.list b/external/googleapis/protolists/run.list index 5ebc6fc0f5ab6..55f5c2a3aaef1 100644 --- a/external/googleapis/protolists/run.list +++ b/external/googleapis/protolists/run.list @@ -1,19 +1,19 @@ -@com_google_googleapis//google/cloud/run/v2:build.proto -@com_google_googleapis//google/cloud/run/v2:condition.proto -@com_google_googleapis//google/cloud/run/v2:container_status.proto -@com_google_googleapis//google/cloud/run/v2:execution.proto -@com_google_googleapis//google/cloud/run/v2:execution_template.proto -@com_google_googleapis//google/cloud/run/v2:instance.proto -@com_google_googleapis//google/cloud/run/v2:instance_split.proto -@com_google_googleapis//google/cloud/run/v2:job.proto -@com_google_googleapis//google/cloud/run/v2:k8s.min.proto -@com_google_googleapis//google/cloud/run/v2:revision.proto -@com_google_googleapis//google/cloud/run/v2:revision_template.proto -@com_google_googleapis//google/cloud/run/v2:service.proto -@com_google_googleapis//google/cloud/run/v2:status.proto -@com_google_googleapis//google/cloud/run/v2:task.proto -@com_google_googleapis//google/cloud/run/v2:task_template.proto -@com_google_googleapis//google/cloud/run/v2:traffic_target.proto -@com_google_googleapis//google/cloud/run/v2:vendor_settings.proto -@com_google_googleapis//google/cloud/run/v2:worker_pool.proto -@com_google_googleapis//google/cloud/run/v2:worker_pool_revision_template.proto +@googleapis//google/cloud/run/v2:build.proto +@googleapis//google/cloud/run/v2:condition.proto +@googleapis//google/cloud/run/v2:container_status.proto +@googleapis//google/cloud/run/v2:execution.proto +@googleapis//google/cloud/run/v2:execution_template.proto +@googleapis//google/cloud/run/v2:instance.proto +@googleapis//google/cloud/run/v2:instance_split.proto +@googleapis//google/cloud/run/v2:job.proto +@googleapis//google/cloud/run/v2:k8s.min.proto +@googleapis//google/cloud/run/v2:revision.proto +@googleapis//google/cloud/run/v2:revision_template.proto +@googleapis//google/cloud/run/v2:service.proto +@googleapis//google/cloud/run/v2:status.proto +@googleapis//google/cloud/run/v2:task.proto +@googleapis//google/cloud/run/v2:task_template.proto +@googleapis//google/cloud/run/v2:traffic_target.proto +@googleapis//google/cloud/run/v2:vendor_settings.proto +@googleapis//google/cloud/run/v2:worker_pool.proto +@googleapis//google/cloud/run/v2:worker_pool_revision_template.proto diff --git a/external/googleapis/protolists/scheduler.list b/external/googleapis/protolists/scheduler.list index 9e9a8cfd27a51..c2ece6488eb77 100644 --- a/external/googleapis/protolists/scheduler.list +++ b/external/googleapis/protolists/scheduler.list @@ -1,3 +1,3 @@ -@com_google_googleapis//google/cloud/scheduler/v1:cloudscheduler.proto -@com_google_googleapis//google/cloud/scheduler/v1:job.proto -@com_google_googleapis//google/cloud/scheduler/v1:target.proto +@googleapis//google/cloud/scheduler/v1:cloudscheduler.proto +@googleapis//google/cloud/scheduler/v1:job.proto +@googleapis//google/cloud/scheduler/v1:target.proto diff --git a/external/googleapis/protolists/secretmanager.list b/external/googleapis/protolists/secretmanager.list index 5837622371b8e..eef868e48221c 100644 --- a/external/googleapis/protolists/secretmanager.list +++ b/external/googleapis/protolists/secretmanager.list @@ -1,3 +1,3 @@ -@com_google_googleapis//google/cloud/secretmanager/logging/v1:secret_event.proto -@com_google_googleapis//google/cloud/secretmanager/v1:resources.proto -@com_google_googleapis//google/cloud/secretmanager/v1:service.proto +@googleapis//google/cloud/secretmanager/logging/v1:secret_event.proto +@googleapis//google/cloud/secretmanager/v1:resources.proto +@googleapis//google/cloud/secretmanager/v1:service.proto diff --git a/external/googleapis/protolists/securesourcemanager.list b/external/googleapis/protolists/securesourcemanager.list index fe6a032f39e7a..79260e37a6055 100644 --- a/external/googleapis/protolists/securesourcemanager.list +++ b/external/googleapis/protolists/securesourcemanager.list @@ -1 +1 @@ -@com_google_googleapis//google/cloud/securesourcemanager/v1:secure_source_manager.proto +@googleapis//google/cloud/securesourcemanager/v1:secure_source_manager.proto diff --git a/external/googleapis/protolists/securitycenter.list b/external/googleapis/protolists/securitycenter.list index bca33514fa290..f40643817ce87 100644 --- a/external/googleapis/protolists/securitycenter.list +++ b/external/googleapis/protolists/securitycenter.list @@ -1,108 +1,108 @@ -@com_google_googleapis//google/cloud/securitycenter/v1:access.proto -@com_google_googleapis//google/cloud/securitycenter/v1:application.proto -@com_google_googleapis//google/cloud/securitycenter/v1:asset.proto -@com_google_googleapis//google/cloud/securitycenter/v1:attack_exposure.proto -@com_google_googleapis//google/cloud/securitycenter/v1:attack_path.proto -@com_google_googleapis//google/cloud/securitycenter/v1:backup_disaster_recovery.proto -@com_google_googleapis//google/cloud/securitycenter/v1:bigquery_export.proto -@com_google_googleapis//google/cloud/securitycenter/v1:cloud_armor.proto -@com_google_googleapis//google/cloud/securitycenter/v1:cloud_dlp_data_profile.proto -@com_google_googleapis//google/cloud/securitycenter/v1:cloud_dlp_inspection.proto -@com_google_googleapis//google/cloud/securitycenter/v1:compliance.proto -@com_google_googleapis//google/cloud/securitycenter/v1:connection.proto -@com_google_googleapis//google/cloud/securitycenter/v1:contact_details.proto -@com_google_googleapis//google/cloud/securitycenter/v1:container.proto -@com_google_googleapis//google/cloud/securitycenter/v1:database.proto -@com_google_googleapis//google/cloud/securitycenter/v1:effective_event_threat_detection_custom_module.proto -@com_google_googleapis//google/cloud/securitycenter/v1:effective_security_health_analytics_custom_module.proto -@com_google_googleapis//google/cloud/securitycenter/v1:event_threat_detection_custom_module.proto -@com_google_googleapis//google/cloud/securitycenter/v1:event_threat_detection_custom_module_validation_errors.proto -@com_google_googleapis//google/cloud/securitycenter/v1:exfiltration.proto -@com_google_googleapis//google/cloud/securitycenter/v1:external_system.proto -@com_google_googleapis//google/cloud/securitycenter/v1:file.proto -@com_google_googleapis//google/cloud/securitycenter/v1:finding.proto -@com_google_googleapis//google/cloud/securitycenter/v1:folder.proto -@com_google_googleapis//google/cloud/securitycenter/v1:group_membership.proto -@com_google_googleapis//google/cloud/securitycenter/v1:iam_binding.proto -@com_google_googleapis//google/cloud/securitycenter/v1:indicator.proto -@com_google_googleapis//google/cloud/securitycenter/v1:kernel_rootkit.proto -@com_google_googleapis//google/cloud/securitycenter/v1:kubernetes.proto -@com_google_googleapis//google/cloud/securitycenter/v1:label.proto -@com_google_googleapis//google/cloud/securitycenter/v1:load_balancer.proto -@com_google_googleapis//google/cloud/securitycenter/v1:log_entry.proto -@com_google_googleapis//google/cloud/securitycenter/v1:mitre_attack.proto -@com_google_googleapis//google/cloud/securitycenter/v1:mute_config.proto -@com_google_googleapis//google/cloud/securitycenter/v1:notebook.proto -@com_google_googleapis//google/cloud/securitycenter/v1:notification_config.proto -@com_google_googleapis//google/cloud/securitycenter/v1:notification_message.proto -@com_google_googleapis//google/cloud/securitycenter/v1:org_policy.proto -@com_google_googleapis//google/cloud/securitycenter/v1:organization_settings.proto -@com_google_googleapis//google/cloud/securitycenter/v1:process.proto -@com_google_googleapis//google/cloud/securitycenter/v1:resource.proto -@com_google_googleapis//google/cloud/securitycenter/v1:resource_value_config.proto -@com_google_googleapis//google/cloud/securitycenter/v1:run_asset_discovery_response.proto -@com_google_googleapis//google/cloud/securitycenter/v1:security_health_analytics_custom_config.proto -@com_google_googleapis//google/cloud/securitycenter/v1:security_health_analytics_custom_module.proto -@com_google_googleapis//google/cloud/securitycenter/v1:security_marks.proto -@com_google_googleapis//google/cloud/securitycenter/v1:security_posture.proto -@com_google_googleapis//google/cloud/securitycenter/v1:securitycenter_service.proto -@com_google_googleapis//google/cloud/securitycenter/v1:simulation.proto -@com_google_googleapis//google/cloud/securitycenter/v1:source.proto -@com_google_googleapis//google/cloud/securitycenter/v1:toxic_combination.proto -@com_google_googleapis//google/cloud/securitycenter/v1:valued_resource.proto -@com_google_googleapis//google/cloud/securitycenter/v1:vulnerability.proto -@com_google_googleapis//google/cloud/securitycenter/v2:access.proto -@com_google_googleapis//google/cloud/securitycenter/v2:affected_resources.proto -@com_google_googleapis//google/cloud/securitycenter/v2:ai_model.proto -@com_google_googleapis//google/cloud/securitycenter/v2:application.proto -@com_google_googleapis//google/cloud/securitycenter/v2:attack_exposure.proto -@com_google_googleapis//google/cloud/securitycenter/v2:attack_path.proto -@com_google_googleapis//google/cloud/securitycenter/v2:backup_disaster_recovery.proto -@com_google_googleapis//google/cloud/securitycenter/v2:bigquery_export.proto -@com_google_googleapis//google/cloud/securitycenter/v2:chokepoint.proto -@com_google_googleapis//google/cloud/securitycenter/v2:cloud_armor.proto -@com_google_googleapis//google/cloud/securitycenter/v2:cloud_dlp_data_profile.proto -@com_google_googleapis//google/cloud/securitycenter/v2:cloud_dlp_inspection.proto -@com_google_googleapis//google/cloud/securitycenter/v2:compliance.proto -@com_google_googleapis//google/cloud/securitycenter/v2:connection.proto -@com_google_googleapis//google/cloud/securitycenter/v2:contact_details.proto -@com_google_googleapis//google/cloud/securitycenter/v2:container.proto -@com_google_googleapis//google/cloud/securitycenter/v2:data_access_event.proto -@com_google_googleapis//google/cloud/securitycenter/v2:data_flow_event.proto -@com_google_googleapis//google/cloud/securitycenter/v2:data_retention_deletion_event.proto -@com_google_googleapis//google/cloud/securitycenter/v2:database.proto -@com_google_googleapis//google/cloud/securitycenter/v2:disk.proto -@com_google_googleapis//google/cloud/securitycenter/v2:exfiltration.proto -@com_google_googleapis//google/cloud/securitycenter/v2:external_system.proto -@com_google_googleapis//google/cloud/securitycenter/v2:file.proto -@com_google_googleapis//google/cloud/securitycenter/v2:finding.proto -@com_google_googleapis//google/cloud/securitycenter/v2:folder.proto -@com_google_googleapis//google/cloud/securitycenter/v2:group_membership.proto -@com_google_googleapis//google/cloud/securitycenter/v2:iam_binding.proto -@com_google_googleapis//google/cloud/securitycenter/v2:indicator.proto -@com_google_googleapis//google/cloud/securitycenter/v2:ip_rules.proto -@com_google_googleapis//google/cloud/securitycenter/v2:job.proto -@com_google_googleapis//google/cloud/securitycenter/v2:kernel_rootkit.proto -@com_google_googleapis//google/cloud/securitycenter/v2:kubernetes.proto -@com_google_googleapis//google/cloud/securitycenter/v2:label.proto -@com_google_googleapis//google/cloud/securitycenter/v2:load_balancer.proto -@com_google_googleapis//google/cloud/securitycenter/v2:log_entry.proto -@com_google_googleapis//google/cloud/securitycenter/v2:mitre_attack.proto -@com_google_googleapis//google/cloud/securitycenter/v2:mute_config.proto -@com_google_googleapis//google/cloud/securitycenter/v2:network.proto -@com_google_googleapis//google/cloud/securitycenter/v2:notebook.proto -@com_google_googleapis//google/cloud/securitycenter/v2:notification_config.proto -@com_google_googleapis//google/cloud/securitycenter/v2:notification_message.proto -@com_google_googleapis//google/cloud/securitycenter/v2:org_policy.proto -@com_google_googleapis//google/cloud/securitycenter/v2:process.proto -@com_google_googleapis//google/cloud/securitycenter/v2:resource.proto -@com_google_googleapis//google/cloud/securitycenter/v2:resource_value_config.proto -@com_google_googleapis//google/cloud/securitycenter/v2:security_marks.proto -@com_google_googleapis//google/cloud/securitycenter/v2:security_posture.proto -@com_google_googleapis//google/cloud/securitycenter/v2:securitycenter_service.proto -@com_google_googleapis//google/cloud/securitycenter/v2:simulation.proto -@com_google_googleapis//google/cloud/securitycenter/v2:source.proto -@com_google_googleapis//google/cloud/securitycenter/v2:toxic_combination.proto -@com_google_googleapis//google/cloud/securitycenter/v2:valued_resource.proto -@com_google_googleapis//google/cloud/securitycenter/v2:vertex_ai.proto -@com_google_googleapis//google/cloud/securitycenter/v2:vulnerability.proto +@googleapis//google/cloud/securitycenter/v1:access.proto +@googleapis//google/cloud/securitycenter/v1:application.proto +@googleapis//google/cloud/securitycenter/v1:asset.proto +@googleapis//google/cloud/securitycenter/v1:attack_exposure.proto +@googleapis//google/cloud/securitycenter/v1:attack_path.proto +@googleapis//google/cloud/securitycenter/v1:backup_disaster_recovery.proto +@googleapis//google/cloud/securitycenter/v1:bigquery_export.proto +@googleapis//google/cloud/securitycenter/v1:cloud_armor.proto +@googleapis//google/cloud/securitycenter/v1:cloud_dlp_data_profile.proto +@googleapis//google/cloud/securitycenter/v1:cloud_dlp_inspection.proto +@googleapis//google/cloud/securitycenter/v1:compliance.proto +@googleapis//google/cloud/securitycenter/v1:connection.proto +@googleapis//google/cloud/securitycenter/v1:contact_details.proto +@googleapis//google/cloud/securitycenter/v1:container.proto +@googleapis//google/cloud/securitycenter/v1:database.proto +@googleapis//google/cloud/securitycenter/v1:effective_event_threat_detection_custom_module.proto +@googleapis//google/cloud/securitycenter/v1:effective_security_health_analytics_custom_module.proto +@googleapis//google/cloud/securitycenter/v1:event_threat_detection_custom_module.proto +@googleapis//google/cloud/securitycenter/v1:event_threat_detection_custom_module_validation_errors.proto +@googleapis//google/cloud/securitycenter/v1:exfiltration.proto +@googleapis//google/cloud/securitycenter/v1:external_system.proto +@googleapis//google/cloud/securitycenter/v1:file.proto +@googleapis//google/cloud/securitycenter/v1:finding.proto +@googleapis//google/cloud/securitycenter/v1:folder.proto +@googleapis//google/cloud/securitycenter/v1:group_membership.proto +@googleapis//google/cloud/securitycenter/v1:iam_binding.proto +@googleapis//google/cloud/securitycenter/v1:indicator.proto +@googleapis//google/cloud/securitycenter/v1:kernel_rootkit.proto +@googleapis//google/cloud/securitycenter/v1:kubernetes.proto +@googleapis//google/cloud/securitycenter/v1:label.proto +@googleapis//google/cloud/securitycenter/v1:load_balancer.proto +@googleapis//google/cloud/securitycenter/v1:log_entry.proto +@googleapis//google/cloud/securitycenter/v1:mitre_attack.proto +@googleapis//google/cloud/securitycenter/v1:mute_config.proto +@googleapis//google/cloud/securitycenter/v1:notebook.proto +@googleapis//google/cloud/securitycenter/v1:notification_config.proto +@googleapis//google/cloud/securitycenter/v1:notification_message.proto +@googleapis//google/cloud/securitycenter/v1:org_policy.proto +@googleapis//google/cloud/securitycenter/v1:organization_settings.proto +@googleapis//google/cloud/securitycenter/v1:process.proto +@googleapis//google/cloud/securitycenter/v1:resource.proto +@googleapis//google/cloud/securitycenter/v1:resource_value_config.proto +@googleapis//google/cloud/securitycenter/v1:run_asset_discovery_response.proto +@googleapis//google/cloud/securitycenter/v1:security_health_analytics_custom_config.proto +@googleapis//google/cloud/securitycenter/v1:security_health_analytics_custom_module.proto +@googleapis//google/cloud/securitycenter/v1:security_marks.proto +@googleapis//google/cloud/securitycenter/v1:security_posture.proto +@googleapis//google/cloud/securitycenter/v1:securitycenter_service.proto +@googleapis//google/cloud/securitycenter/v1:simulation.proto +@googleapis//google/cloud/securitycenter/v1:source.proto +@googleapis//google/cloud/securitycenter/v1:toxic_combination.proto +@googleapis//google/cloud/securitycenter/v1:valued_resource.proto +@googleapis//google/cloud/securitycenter/v1:vulnerability.proto +@googleapis//google/cloud/securitycenter/v2:access.proto +@googleapis//google/cloud/securitycenter/v2:affected_resources.proto +@googleapis//google/cloud/securitycenter/v2:ai_model.proto +@googleapis//google/cloud/securitycenter/v2:application.proto +@googleapis//google/cloud/securitycenter/v2:attack_exposure.proto +@googleapis//google/cloud/securitycenter/v2:attack_path.proto +@googleapis//google/cloud/securitycenter/v2:backup_disaster_recovery.proto +@googleapis//google/cloud/securitycenter/v2:bigquery_export.proto +@googleapis//google/cloud/securitycenter/v2:chokepoint.proto +@googleapis//google/cloud/securitycenter/v2:cloud_armor.proto +@googleapis//google/cloud/securitycenter/v2:cloud_dlp_data_profile.proto +@googleapis//google/cloud/securitycenter/v2:cloud_dlp_inspection.proto +@googleapis//google/cloud/securitycenter/v2:compliance.proto +@googleapis//google/cloud/securitycenter/v2:connection.proto +@googleapis//google/cloud/securitycenter/v2:contact_details.proto +@googleapis//google/cloud/securitycenter/v2:container.proto +@googleapis//google/cloud/securitycenter/v2:data_access_event.proto +@googleapis//google/cloud/securitycenter/v2:data_flow_event.proto +@googleapis//google/cloud/securitycenter/v2:data_retention_deletion_event.proto +@googleapis//google/cloud/securitycenter/v2:database.proto +@googleapis//google/cloud/securitycenter/v2:disk.proto +@googleapis//google/cloud/securitycenter/v2:exfiltration.proto +@googleapis//google/cloud/securitycenter/v2:external_system.proto +@googleapis//google/cloud/securitycenter/v2:file.proto +@googleapis//google/cloud/securitycenter/v2:finding.proto +@googleapis//google/cloud/securitycenter/v2:folder.proto +@googleapis//google/cloud/securitycenter/v2:group_membership.proto +@googleapis//google/cloud/securitycenter/v2:iam_binding.proto +@googleapis//google/cloud/securitycenter/v2:indicator.proto +@googleapis//google/cloud/securitycenter/v2:ip_rules.proto +@googleapis//google/cloud/securitycenter/v2:job.proto +@googleapis//google/cloud/securitycenter/v2:kernel_rootkit.proto +@googleapis//google/cloud/securitycenter/v2:kubernetes.proto +@googleapis//google/cloud/securitycenter/v2:label.proto +@googleapis//google/cloud/securitycenter/v2:load_balancer.proto +@googleapis//google/cloud/securitycenter/v2:log_entry.proto +@googleapis//google/cloud/securitycenter/v2:mitre_attack.proto +@googleapis//google/cloud/securitycenter/v2:mute_config.proto +@googleapis//google/cloud/securitycenter/v2:network.proto +@googleapis//google/cloud/securitycenter/v2:notebook.proto +@googleapis//google/cloud/securitycenter/v2:notification_config.proto +@googleapis//google/cloud/securitycenter/v2:notification_message.proto +@googleapis//google/cloud/securitycenter/v2:org_policy.proto +@googleapis//google/cloud/securitycenter/v2:process.proto +@googleapis//google/cloud/securitycenter/v2:resource.proto +@googleapis//google/cloud/securitycenter/v2:resource_value_config.proto +@googleapis//google/cloud/securitycenter/v2:security_marks.proto +@googleapis//google/cloud/securitycenter/v2:security_posture.proto +@googleapis//google/cloud/securitycenter/v2:securitycenter_service.proto +@googleapis//google/cloud/securitycenter/v2:simulation.proto +@googleapis//google/cloud/securitycenter/v2:source.proto +@googleapis//google/cloud/securitycenter/v2:toxic_combination.proto +@googleapis//google/cloud/securitycenter/v2:valued_resource.proto +@googleapis//google/cloud/securitycenter/v2:vertex_ai.proto +@googleapis//google/cloud/securitycenter/v2:vulnerability.proto diff --git a/external/googleapis/protolists/securitycentermanagement.list b/external/googleapis/protolists/securitycentermanagement.list index 4304ce74912e9..fcbb29181b7b0 100644 --- a/external/googleapis/protolists/securitycentermanagement.list +++ b/external/googleapis/protolists/securitycentermanagement.list @@ -1 +1 @@ -@com_google_googleapis//google/cloud/securitycentermanagement/v1:security_center_management.proto +@googleapis//google/cloud/securitycentermanagement/v1:security_center_management.proto diff --git a/external/googleapis/protolists/servicecontrol.list b/external/googleapis/protolists/servicecontrol.list index fdc8678cf5f34..62ff470c9430b 100644 --- a/external/googleapis/protolists/servicecontrol.list +++ b/external/googleapis/protolists/servicecontrol.list @@ -1,9 +1,9 @@ -@com_google_googleapis//google/api/servicecontrol/v1:check_error.proto -@com_google_googleapis//google/api/servicecontrol/v1:distribution.proto -@com_google_googleapis//google/api/servicecontrol/v1:http_request.proto -@com_google_googleapis//google/api/servicecontrol/v1:log_entry.proto -@com_google_googleapis//google/api/servicecontrol/v1:metric_value.proto -@com_google_googleapis//google/api/servicecontrol/v1:operation.proto -@com_google_googleapis//google/api/servicecontrol/v1:quota_controller.proto -@com_google_googleapis//google/api/servicecontrol/v1:service_controller.proto -@com_google_googleapis//google/api/servicecontrol/v2:service_controller.proto +@googleapis//google/api/servicecontrol/v1:check_error.proto +@googleapis//google/api/servicecontrol/v1:distribution.proto +@googleapis//google/api/servicecontrol/v1:http_request.proto +@googleapis//google/api/servicecontrol/v1:log_entry.proto +@googleapis//google/api/servicecontrol/v1:metric_value.proto +@googleapis//google/api/servicecontrol/v1:operation.proto +@googleapis//google/api/servicecontrol/v1:quota_controller.proto +@googleapis//google/api/servicecontrol/v1:service_controller.proto +@googleapis//google/api/servicecontrol/v2:service_controller.proto diff --git a/external/googleapis/protolists/servicedirectory.list b/external/googleapis/protolists/servicedirectory.list index 9050ad50aa26f..e6089ac3a7115 100644 --- a/external/googleapis/protolists/servicedirectory.list +++ b/external/googleapis/protolists/servicedirectory.list @@ -1,5 +1,5 @@ -@com_google_googleapis//google/cloud/servicedirectory/v1:endpoint.proto -@com_google_googleapis//google/cloud/servicedirectory/v1:lookup_service.proto -@com_google_googleapis//google/cloud/servicedirectory/v1:namespace.proto -@com_google_googleapis//google/cloud/servicedirectory/v1:registration_service.proto -@com_google_googleapis//google/cloud/servicedirectory/v1:service.proto +@googleapis//google/cloud/servicedirectory/v1:endpoint.proto +@googleapis//google/cloud/servicedirectory/v1:lookup_service.proto +@googleapis//google/cloud/servicedirectory/v1:namespace.proto +@googleapis//google/cloud/servicedirectory/v1:registration_service.proto +@googleapis//google/cloud/servicedirectory/v1:service.proto diff --git a/external/googleapis/protolists/servicehealth.list b/external/googleapis/protolists/servicehealth.list index 371f08183aa41..6e1111e738ff1 100644 --- a/external/googleapis/protolists/servicehealth.list +++ b/external/googleapis/protolists/servicehealth.list @@ -1,3 +1,3 @@ -@com_google_googleapis//google/cloud/servicehealth/logging/v1:event_log.proto -@com_google_googleapis//google/cloud/servicehealth/v1:event_resources.proto -@com_google_googleapis//google/cloud/servicehealth/v1:event_service.proto +@googleapis//google/cloud/servicehealth/logging/v1:event_log.proto +@googleapis//google/cloud/servicehealth/v1:event_resources.proto +@googleapis//google/cloud/servicehealth/v1:event_service.proto diff --git a/external/googleapis/protolists/servicemanagement.list b/external/googleapis/protolists/servicemanagement.list index 70b3f804d1553..f75090e9809ba 100644 --- a/external/googleapis/protolists/servicemanagement.list +++ b/external/googleapis/protolists/servicemanagement.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/api/servicemanagement/v1:resources.proto -@com_google_googleapis//google/api/servicemanagement/v1:servicemanager.proto +@googleapis//google/api/servicemanagement/v1:resources.proto +@googleapis//google/api/servicemanagement/v1:servicemanager.proto diff --git a/external/googleapis/protolists/serviceusage.list b/external/googleapis/protolists/serviceusage.list index d565f298c4b8a..0e3d570162238 100644 --- a/external/googleapis/protolists/serviceusage.list +++ b/external/googleapis/protolists/serviceusage.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/api/serviceusage/v1:resources.proto -@com_google_googleapis//google/api/serviceusage/v1:serviceusage.proto +@googleapis//google/api/serviceusage/v1:resources.proto +@googleapis//google/api/serviceusage/v1:serviceusage.proto diff --git a/external/googleapis/protolists/shell.list b/external/googleapis/protolists/shell.list index faa9e1b53898e..b806640c6b53a 100644 --- a/external/googleapis/protolists/shell.list +++ b/external/googleapis/protolists/shell.list @@ -1 +1 @@ -@com_google_googleapis//google/cloud/shell/v1:cloudshell.proto +@googleapis//google/cloud/shell/v1:cloudshell.proto diff --git a/external/googleapis/protolists/spanner.list b/external/googleapis/protolists/spanner.list index 64d7b1ac0ea91..283fe697494fa 100644 --- a/external/googleapis/protolists/spanner.list +++ b/external/googleapis/protolists/spanner.list @@ -1,16 +1,16 @@ -@com_google_googleapis//google/spanner/admin/database/v1:backup.proto -@com_google_googleapis//google/spanner/admin/database/v1:backup_schedule.proto -@com_google_googleapis//google/spanner/admin/database/v1:common.proto -@com_google_googleapis//google/spanner/admin/database/v1:spanner_database_admin.proto -@com_google_googleapis//google/spanner/admin/instance/v1:common.proto -@com_google_googleapis//google/spanner/admin/instance/v1:spanner_instance_admin.proto -@com_google_googleapis//google/spanner/v1:change_stream.proto -@com_google_googleapis//google/spanner/v1:commit_response.proto -@com_google_googleapis//google/spanner/v1:keys.proto -@com_google_googleapis//google/spanner/v1:location.proto -@com_google_googleapis//google/spanner/v1:mutation.proto -@com_google_googleapis//google/spanner/v1:query_plan.proto -@com_google_googleapis//google/spanner/v1:result_set.proto -@com_google_googleapis//google/spanner/v1:spanner.proto -@com_google_googleapis//google/spanner/v1:transaction.proto -@com_google_googleapis//google/spanner/v1:type.proto +@googleapis//google/spanner/admin/database/v1:backup.proto +@googleapis//google/spanner/admin/database/v1:backup_schedule.proto +@googleapis//google/spanner/admin/database/v1:common.proto +@googleapis//google/spanner/admin/database/v1:spanner_database_admin.proto +@googleapis//google/spanner/admin/instance/v1:common.proto +@googleapis//google/spanner/admin/instance/v1:spanner_instance_admin.proto +@googleapis//google/spanner/v1:change_stream.proto +@googleapis//google/spanner/v1:commit_response.proto +@googleapis//google/spanner/v1:keys.proto +@googleapis//google/spanner/v1:location.proto +@googleapis//google/spanner/v1:mutation.proto +@googleapis//google/spanner/v1:query_plan.proto +@googleapis//google/spanner/v1:result_set.proto +@googleapis//google/spanner/v1:spanner.proto +@googleapis//google/spanner/v1:transaction.proto +@googleapis//google/spanner/v1:type.proto diff --git a/external/googleapis/protolists/speech.list b/external/googleapis/protolists/speech.list index 17363f4df7d53..99eca04ec9f45 100644 --- a/external/googleapis/protolists/speech.list +++ b/external/googleapis/protolists/speech.list @@ -1,5 +1,5 @@ -@com_google_googleapis//google/cloud/speech/v1:cloud_speech.proto -@com_google_googleapis//google/cloud/speech/v1:cloud_speech_adaptation.proto -@com_google_googleapis//google/cloud/speech/v1:resource.proto -@com_google_googleapis//google/cloud/speech/v2:cloud_speech.proto -@com_google_googleapis//google/cloud/speech/v2:locations_metadata.proto +@googleapis//google/cloud/speech/v1:cloud_speech.proto +@googleapis//google/cloud/speech/v1:cloud_speech_adaptation.proto +@googleapis//google/cloud/speech/v1:resource.proto +@googleapis//google/cloud/speech/v2:cloud_speech.proto +@googleapis//google/cloud/speech/v2:locations_metadata.proto diff --git a/external/googleapis/protolists/sql.list b/external/googleapis/protolists/sql.list index 72487de861210..989db332c0fc7 100644 --- a/external/googleapis/protolists/sql.list +++ b/external/googleapis/protolists/sql.list @@ -1,17 +1,17 @@ -@com_google_googleapis//google/cloud/sql/v1:cloud_sql_available_database_versions.proto -@com_google_googleapis//google/cloud/sql/v1:cloud_sql_backup_runs.proto -@com_google_googleapis//google/cloud/sql/v1:cloud_sql_backups.proto -@com_google_googleapis//google/cloud/sql/v1:cloud_sql_connect.proto -@com_google_googleapis//google/cloud/sql/v1:cloud_sql_databases.proto -@com_google_googleapis//google/cloud/sql/v1:cloud_sql_events.proto -@com_google_googleapis//google/cloud/sql/v1:cloud_sql_feature_eligibility.proto -@com_google_googleapis//google/cloud/sql/v1:cloud_sql_flags.proto -@com_google_googleapis//google/cloud/sql/v1:cloud_sql_iam_policies.proto -@com_google_googleapis//google/cloud/sql/v1:cloud_sql_instance_names.proto -@com_google_googleapis//google/cloud/sql/v1:cloud_sql_instances.proto -@com_google_googleapis//google/cloud/sql/v1:cloud_sql_operations.proto -@com_google_googleapis//google/cloud/sql/v1:cloud_sql_regions.proto -@com_google_googleapis//google/cloud/sql/v1:cloud_sql_resources.proto -@com_google_googleapis//google/cloud/sql/v1:cloud_sql_ssl_certs.proto -@com_google_googleapis//google/cloud/sql/v1:cloud_sql_tiers.proto -@com_google_googleapis//google/cloud/sql/v1:cloud_sql_users.proto +@googleapis//google/cloud/sql/v1:cloud_sql_available_database_versions.proto +@googleapis//google/cloud/sql/v1:cloud_sql_backup_runs.proto +@googleapis//google/cloud/sql/v1:cloud_sql_backups.proto +@googleapis//google/cloud/sql/v1:cloud_sql_connect.proto +@googleapis//google/cloud/sql/v1:cloud_sql_databases.proto +@googleapis//google/cloud/sql/v1:cloud_sql_events.proto +@googleapis//google/cloud/sql/v1:cloud_sql_feature_eligibility.proto +@googleapis//google/cloud/sql/v1:cloud_sql_flags.proto +@googleapis//google/cloud/sql/v1:cloud_sql_iam_policies.proto +@googleapis//google/cloud/sql/v1:cloud_sql_instance_names.proto +@googleapis//google/cloud/sql/v1:cloud_sql_instances.proto +@googleapis//google/cloud/sql/v1:cloud_sql_operations.proto +@googleapis//google/cloud/sql/v1:cloud_sql_regions.proto +@googleapis//google/cloud/sql/v1:cloud_sql_resources.proto +@googleapis//google/cloud/sql/v1:cloud_sql_ssl_certs.proto +@googleapis//google/cloud/sql/v1:cloud_sql_tiers.proto +@googleapis//google/cloud/sql/v1:cloud_sql_users.proto diff --git a/external/googleapis/protolists/storage.list b/external/googleapis/protolists/storage.list index 69b9a97eff1c4..7874486032bb3 100644 --- a/external/googleapis/protolists/storage.list +++ b/external/googleapis/protolists/storage.list @@ -1 +1 @@ -@com_google_googleapis//google/storage/v2:storage.proto +@googleapis//google/storage/v2:storage.proto diff --git a/external/googleapis/protolists/storagebatchoperations.list b/external/googleapis/protolists/storagebatchoperations.list index 933ffabcfeaec..07b97aba1ee8b 100644 --- a/external/googleapis/protolists/storagebatchoperations.list +++ b/external/googleapis/protolists/storagebatchoperations.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/cloud/storagebatchoperations/v1:storage_batch_operations.proto -@com_google_googleapis//google/cloud/storagebatchoperations/v1:storage_batch_operations_types.proto +@googleapis//google/cloud/storagebatchoperations/v1:storage_batch_operations.proto +@googleapis//google/cloud/storagebatchoperations/v1:storage_batch_operations_types.proto diff --git a/external/googleapis/protolists/storagecontrol.list b/external/googleapis/protolists/storagecontrol.list index af50b603b5e44..facaa06bd4d82 100644 --- a/external/googleapis/protolists/storagecontrol.list +++ b/external/googleapis/protolists/storagecontrol.list @@ -1 +1 @@ -@com_google_googleapis//google/storage/control/v2:storage_control.proto +@googleapis//google/storage/control/v2:storage_control.proto diff --git a/external/googleapis/protolists/storageinsights.list b/external/googleapis/protolists/storageinsights.list index 3147e0bd0d9e9..de77e3541300c 100644 --- a/external/googleapis/protolists/storageinsights.list +++ b/external/googleapis/protolists/storageinsights.list @@ -1 +1 @@ -@com_google_googleapis//google/cloud/storageinsights/v1:storageinsights.proto +@googleapis//google/cloud/storageinsights/v1:storageinsights.proto diff --git a/external/googleapis/protolists/storagetransfer.list b/external/googleapis/protolists/storagetransfer.list index f3a7810e22021..2bf9743423e27 100644 --- a/external/googleapis/protolists/storagetransfer.list +++ b/external/googleapis/protolists/storagetransfer.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/storagetransfer/v1:transfer.proto -@com_google_googleapis//google/storagetransfer/v1:transfer_types.proto +@googleapis//google/storagetransfer/v1:transfer.proto +@googleapis//google/storagetransfer/v1:transfer_types.proto diff --git a/external/googleapis/protolists/support.list b/external/googleapis/protolists/support.list index 875f466b01c46..c93e53e76d5b5 100644 --- a/external/googleapis/protolists/support.list +++ b/external/googleapis/protolists/support.list @@ -1,8 +1,8 @@ -@com_google_googleapis//google/cloud/support/v2:actor.proto -@com_google_googleapis//google/cloud/support/v2:attachment.proto -@com_google_googleapis//google/cloud/support/v2:attachment_service.proto -@com_google_googleapis//google/cloud/support/v2:case.proto -@com_google_googleapis//google/cloud/support/v2:case_service.proto -@com_google_googleapis//google/cloud/support/v2:comment.proto -@com_google_googleapis//google/cloud/support/v2:comment_service.proto -@com_google_googleapis//google/cloud/support/v2:escalation.proto +@googleapis//google/cloud/support/v2:actor.proto +@googleapis//google/cloud/support/v2:attachment.proto +@googleapis//google/cloud/support/v2:attachment_service.proto +@googleapis//google/cloud/support/v2:case.proto +@googleapis//google/cloud/support/v2:case_service.proto +@googleapis//google/cloud/support/v2:comment.proto +@googleapis//google/cloud/support/v2:comment_service.proto +@googleapis//google/cloud/support/v2:escalation.proto diff --git a/external/googleapis/protolists/talent.list b/external/googleapis/protolists/talent.list index 9ed14f4ead85f..00e594f391196 100644 --- a/external/googleapis/protolists/talent.list +++ b/external/googleapis/protolists/talent.list @@ -1,12 +1,12 @@ -@com_google_googleapis//google/cloud/talent/v4:common.proto -@com_google_googleapis//google/cloud/talent/v4:company.proto -@com_google_googleapis//google/cloud/talent/v4:company_service.proto -@com_google_googleapis//google/cloud/talent/v4:completion_service.proto -@com_google_googleapis//google/cloud/talent/v4:event.proto -@com_google_googleapis//google/cloud/talent/v4:event_service.proto -@com_google_googleapis//google/cloud/talent/v4:filters.proto -@com_google_googleapis//google/cloud/talent/v4:histogram.proto -@com_google_googleapis//google/cloud/talent/v4:job.proto -@com_google_googleapis//google/cloud/talent/v4:job_service.proto -@com_google_googleapis//google/cloud/talent/v4:tenant.proto -@com_google_googleapis//google/cloud/talent/v4:tenant_service.proto +@googleapis//google/cloud/talent/v4:common.proto +@googleapis//google/cloud/talent/v4:company.proto +@googleapis//google/cloud/talent/v4:company_service.proto +@googleapis//google/cloud/talent/v4:completion_service.proto +@googleapis//google/cloud/talent/v4:event.proto +@googleapis//google/cloud/talent/v4:event_service.proto +@googleapis//google/cloud/talent/v4:filters.proto +@googleapis//google/cloud/talent/v4:histogram.proto +@googleapis//google/cloud/talent/v4:job.proto +@googleapis//google/cloud/talent/v4:job_service.proto +@googleapis//google/cloud/talent/v4:tenant.proto +@googleapis//google/cloud/talent/v4:tenant_service.proto diff --git a/external/googleapis/protolists/tasks.list b/external/googleapis/protolists/tasks.list index 052e131396663..6371fd6df42a5 100644 --- a/external/googleapis/protolists/tasks.list +++ b/external/googleapis/protolists/tasks.list @@ -1,4 +1,4 @@ -@com_google_googleapis//google/cloud/tasks/v2:cloudtasks.proto -@com_google_googleapis//google/cloud/tasks/v2:queue.proto -@com_google_googleapis//google/cloud/tasks/v2:target.proto -@com_google_googleapis//google/cloud/tasks/v2:task.proto +@googleapis//google/cloud/tasks/v2:cloudtasks.proto +@googleapis//google/cloud/tasks/v2:queue.proto +@googleapis//google/cloud/tasks/v2:target.proto +@googleapis//google/cloud/tasks/v2:task.proto diff --git a/external/googleapis/protolists/telcoautomation.list b/external/googleapis/protolists/telcoautomation.list index 6b81e7687af94..1c8a769149a36 100644 --- a/external/googleapis/protolists/telcoautomation.list +++ b/external/googleapis/protolists/telcoautomation.list @@ -1 +1 @@ -@com_google_googleapis//google/cloud/telcoautomation/v1:telcoautomation.proto +@googleapis//google/cloud/telcoautomation/v1:telcoautomation.proto diff --git a/external/googleapis/protolists/texttospeech.list b/external/googleapis/protolists/texttospeech.list index 0aae47d75b4f9..1622bfd784662 100644 --- a/external/googleapis/protolists/texttospeech.list +++ b/external/googleapis/protolists/texttospeech.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/cloud/texttospeech/v1:cloud_tts.proto -@com_google_googleapis//google/cloud/texttospeech/v1:cloud_tts_lrs.proto +@googleapis//google/cloud/texttospeech/v1:cloud_tts.proto +@googleapis//google/cloud/texttospeech/v1:cloud_tts_lrs.proto diff --git a/external/googleapis/protolists/timeseriesinsights.list b/external/googleapis/protolists/timeseriesinsights.list index f76afc3335aa4..143ef6b6a17c7 100644 --- a/external/googleapis/protolists/timeseriesinsights.list +++ b/external/googleapis/protolists/timeseriesinsights.list @@ -1 +1 @@ -@com_google_googleapis//google/cloud/timeseriesinsights/v1:timeseries_insights.proto +@googleapis//google/cloud/timeseriesinsights/v1:timeseries_insights.proto diff --git a/external/googleapis/protolists/tpu.list b/external/googleapis/protolists/tpu.list index 9ec3a2a29b809..31b72d3a2d18c 100644 --- a/external/googleapis/protolists/tpu.list +++ b/external/googleapis/protolists/tpu.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/cloud/tpu/v1:cloud_tpu.proto -@com_google_googleapis//google/cloud/tpu/v2:cloud_tpu.proto +@googleapis//google/cloud/tpu/v1:cloud_tpu.proto +@googleapis//google/cloud/tpu/v2:cloud_tpu.proto diff --git a/external/googleapis/protolists/trace.list b/external/googleapis/protolists/trace.list index bb199c12eecf3..d319a16df722a 100644 --- a/external/googleapis/protolists/trace.list +++ b/external/googleapis/protolists/trace.list @@ -1,3 +1,3 @@ -@com_google_googleapis//google/devtools/cloudtrace/v1:trace.proto -@com_google_googleapis//google/devtools/cloudtrace/v2:trace.proto -@com_google_googleapis//google/devtools/cloudtrace/v2:tracing.proto +@googleapis//google/devtools/cloudtrace/v1:trace.proto +@googleapis//google/devtools/cloudtrace/v2:trace.proto +@googleapis//google/devtools/cloudtrace/v2:tracing.proto diff --git a/external/googleapis/protolists/translate.list b/external/googleapis/protolists/translate.list index 6ce22d7561282..e18baadfb73d3 100644 --- a/external/googleapis/protolists/translate.list +++ b/external/googleapis/protolists/translate.list @@ -1,4 +1,4 @@ -@com_google_googleapis//google/cloud/translate/v3:adaptive_mt.proto -@com_google_googleapis//google/cloud/translate/v3:automl_translation.proto -@com_google_googleapis//google/cloud/translate/v3:common.proto -@com_google_googleapis//google/cloud/translate/v3:translation_service.proto +@googleapis//google/cloud/translate/v3:adaptive_mt.proto +@googleapis//google/cloud/translate/v3:automl_translation.proto +@googleapis//google/cloud/translate/v3:common.proto +@googleapis//google/cloud/translate/v3:translation_service.proto diff --git a/external/googleapis/protolists/video.list b/external/googleapis/protolists/video.list index 1781b13fd8bd9..19195191f72fe 100644 --- a/external/googleapis/protolists/video.list +++ b/external/googleapis/protolists/video.list @@ -1,16 +1,16 @@ -@com_google_googleapis//google/cloud/video/livestream/v1:outputs.proto -@com_google_googleapis//google/cloud/video/livestream/v1:resources.proto -@com_google_googleapis//google/cloud/video/livestream/v1:service.proto -@com_google_googleapis//google/cloud/video/stitcher/v1:ad_tag_details.proto -@com_google_googleapis//google/cloud/video/stitcher/v1:cdn_keys.proto -@com_google_googleapis//google/cloud/video/stitcher/v1:companions.proto -@com_google_googleapis//google/cloud/video/stitcher/v1:events.proto -@com_google_googleapis//google/cloud/video/stitcher/v1:fetch_options.proto -@com_google_googleapis//google/cloud/video/stitcher/v1:live_configs.proto -@com_google_googleapis//google/cloud/video/stitcher/v1:sessions.proto -@com_google_googleapis//google/cloud/video/stitcher/v1:slates.proto -@com_google_googleapis//google/cloud/video/stitcher/v1:stitch_details.proto -@com_google_googleapis//google/cloud/video/stitcher/v1:video_stitcher_service.proto -@com_google_googleapis//google/cloud/video/stitcher/v1:vod_configs.proto -@com_google_googleapis//google/cloud/video/transcoder/v1:resources.proto -@com_google_googleapis//google/cloud/video/transcoder/v1:services.proto +@googleapis//google/cloud/video/livestream/v1:outputs.proto +@googleapis//google/cloud/video/livestream/v1:resources.proto +@googleapis//google/cloud/video/livestream/v1:service.proto +@googleapis//google/cloud/video/stitcher/v1:ad_tag_details.proto +@googleapis//google/cloud/video/stitcher/v1:cdn_keys.proto +@googleapis//google/cloud/video/stitcher/v1:companions.proto +@googleapis//google/cloud/video/stitcher/v1:events.proto +@googleapis//google/cloud/video/stitcher/v1:fetch_options.proto +@googleapis//google/cloud/video/stitcher/v1:live_configs.proto +@googleapis//google/cloud/video/stitcher/v1:sessions.proto +@googleapis//google/cloud/video/stitcher/v1:slates.proto +@googleapis//google/cloud/video/stitcher/v1:stitch_details.proto +@googleapis//google/cloud/video/stitcher/v1:video_stitcher_service.proto +@googleapis//google/cloud/video/stitcher/v1:vod_configs.proto +@googleapis//google/cloud/video/transcoder/v1:resources.proto +@googleapis//google/cloud/video/transcoder/v1:services.proto diff --git a/external/googleapis/protolists/videointelligence.list b/external/googleapis/protolists/videointelligence.list index e1b8829615f88..7400115525ca9 100644 --- a/external/googleapis/protolists/videointelligence.list +++ b/external/googleapis/protolists/videointelligence.list @@ -1 +1 @@ -@com_google_googleapis//google/cloud/videointelligence/v1:video_intelligence.proto +@googleapis//google/cloud/videointelligence/v1:video_intelligence.proto diff --git a/external/googleapis/protolists/vision.list b/external/googleapis/protolists/vision.list index ec2be6c85430c..f7dfd554bb52e 100644 --- a/external/googleapis/protolists/vision.list +++ b/external/googleapis/protolists/vision.list @@ -1,6 +1,6 @@ -@com_google_googleapis//google/cloud/vision/v1:geometry.proto -@com_google_googleapis//google/cloud/vision/v1:image_annotator.proto -@com_google_googleapis//google/cloud/vision/v1:product_search.proto -@com_google_googleapis//google/cloud/vision/v1:product_search_service.proto -@com_google_googleapis//google/cloud/vision/v1:text_annotation.proto -@com_google_googleapis//google/cloud/vision/v1:web_detection.proto +@googleapis//google/cloud/vision/v1:geometry.proto +@googleapis//google/cloud/vision/v1:image_annotator.proto +@googleapis//google/cloud/vision/v1:product_search.proto +@googleapis//google/cloud/vision/v1:product_search_service.proto +@googleapis//google/cloud/vision/v1:text_annotation.proto +@googleapis//google/cloud/vision/v1:web_detection.proto diff --git a/external/googleapis/protolists/vmmigration.list b/external/googleapis/protolists/vmmigration.list index 1f35f0b6b0cde..5eae4fbf7f378 100644 --- a/external/googleapis/protolists/vmmigration.list +++ b/external/googleapis/protolists/vmmigration.list @@ -1 +1 @@ -@com_google_googleapis//google/cloud/vmmigration/v1:vmmigration.proto +@googleapis//google/cloud/vmmigration/v1:vmmigration.proto diff --git a/external/googleapis/protolists/vmwareengine.list b/external/googleapis/protolists/vmwareengine.list index 2d0f479d7a7d9..674ed166bcbfe 100644 --- a/external/googleapis/protolists/vmwareengine.list +++ b/external/googleapis/protolists/vmwareengine.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/cloud/vmwareengine/v1:vmwareengine.proto -@com_google_googleapis//google/cloud/vmwareengine/v1:vmwareengine_resources.proto +@googleapis//google/cloud/vmwareengine/v1:vmwareengine.proto +@googleapis//google/cloud/vmwareengine/v1:vmwareengine_resources.proto diff --git a/external/googleapis/protolists/vpcaccess.list b/external/googleapis/protolists/vpcaccess.list index 1480b40df7c4d..a87365fe77cd7 100644 --- a/external/googleapis/protolists/vpcaccess.list +++ b/external/googleapis/protolists/vpcaccess.list @@ -1 +1 @@ -@com_google_googleapis//google/cloud/vpcaccess/v1:vpc_access.proto +@googleapis//google/cloud/vpcaccess/v1:vpc_access.proto diff --git a/external/googleapis/protolists/webrisk.list b/external/googleapis/protolists/webrisk.list index b5d3deda4fcc7..fab89756a71cf 100644 --- a/external/googleapis/protolists/webrisk.list +++ b/external/googleapis/protolists/webrisk.list @@ -1 +1 @@ -@com_google_googleapis//google/cloud/webrisk/v1:webrisk.proto +@googleapis//google/cloud/webrisk/v1:webrisk.proto diff --git a/external/googleapis/protolists/websecurityscanner.list b/external/googleapis/protolists/websecurityscanner.list index 057a470df0fa9..79a5ace189be2 100644 --- a/external/googleapis/protolists/websecurityscanner.list +++ b/external/googleapis/protolists/websecurityscanner.list @@ -1,11 +1,11 @@ -@com_google_googleapis//google/cloud/websecurityscanner/v1:crawled_url.proto -@com_google_googleapis//google/cloud/websecurityscanner/v1:finding.proto -@com_google_googleapis//google/cloud/websecurityscanner/v1:finding_addon.proto -@com_google_googleapis//google/cloud/websecurityscanner/v1:finding_type_stats.proto -@com_google_googleapis//google/cloud/websecurityscanner/v1:scan_config.proto -@com_google_googleapis//google/cloud/websecurityscanner/v1:scan_config_error.proto -@com_google_googleapis//google/cloud/websecurityscanner/v1:scan_run.proto -@com_google_googleapis//google/cloud/websecurityscanner/v1:scan_run_error_trace.proto -@com_google_googleapis//google/cloud/websecurityscanner/v1:scan_run_log.proto -@com_google_googleapis//google/cloud/websecurityscanner/v1:scan_run_warning_trace.proto -@com_google_googleapis//google/cloud/websecurityscanner/v1:web_security_scanner.proto +@googleapis//google/cloud/websecurityscanner/v1:crawled_url.proto +@googleapis//google/cloud/websecurityscanner/v1:finding.proto +@googleapis//google/cloud/websecurityscanner/v1:finding_addon.proto +@googleapis//google/cloud/websecurityscanner/v1:finding_type_stats.proto +@googleapis//google/cloud/websecurityscanner/v1:scan_config.proto +@googleapis//google/cloud/websecurityscanner/v1:scan_config_error.proto +@googleapis//google/cloud/websecurityscanner/v1:scan_run.proto +@googleapis//google/cloud/websecurityscanner/v1:scan_run_error_trace.proto +@googleapis//google/cloud/websecurityscanner/v1:scan_run_log.proto +@googleapis//google/cloud/websecurityscanner/v1:scan_run_warning_trace.proto +@googleapis//google/cloud/websecurityscanner/v1:web_security_scanner.proto diff --git a/external/googleapis/protolists/workflows.list b/external/googleapis/protolists/workflows.list index ee98e517fc87b..bedfddc5834e5 100644 --- a/external/googleapis/protolists/workflows.list +++ b/external/googleapis/protolists/workflows.list @@ -1,4 +1,4 @@ -@com_google_googleapis//google/cloud/workflows/executions/v1:executions.proto -@com_google_googleapis//google/cloud/workflows/type:engine_call.proto -@com_google_googleapis//google/cloud/workflows/type:executions_system.proto -@com_google_googleapis//google/cloud/workflows/v1:workflows.proto +@googleapis//google/cloud/workflows/executions/v1:executions.proto +@googleapis//google/cloud/workflows/type:engine_call.proto +@googleapis//google/cloud/workflows/type:executions_system.proto +@googleapis//google/cloud/workflows/v1:workflows.proto diff --git a/external/googleapis/protolists/workstations.list b/external/googleapis/protolists/workstations.list index e85920cb02c3c..11431de4aad29 100644 --- a/external/googleapis/protolists/workstations.list +++ b/external/googleapis/protolists/workstations.list @@ -1,2 +1,2 @@ -@com_google_googleapis//google/cloud/workstations/logging/v1:platform_logs.proto -@com_google_googleapis//google/cloud/workstations/v1:workstations.proto +@googleapis//google/cloud/workstations/logging/v1:platform_logs.proto +@googleapis//google/cloud/workstations/v1:workstations.proto diff --git a/external/googleapis/update_libraries.sh b/external/googleapis/update_libraries.sh index c31577a64e4a8..fc7888d7f0e4e 100755 --- a/external/googleapis/update_libraries.sh +++ b/external/googleapis/update_libraries.sh @@ -16,343 +16,343 @@ set -euo pipefail declare -A -r LIBRARIES=( - ["accessapproval"]="@com_google_googleapis//google/cloud/accessapproval/v1:accessapproval_cc_grpc" + ["accessapproval"]="@googleapis//google/cloud/accessapproval/v1:accessapproval_cc_grpc" ["accesscontextmanager"]="$( printf ",%s" \ - "@com_google_googleapis//google/identity/accesscontextmanager/type:type_cc_grpc" \ - "@com_google_googleapis//google/identity/accesscontextmanager/v1:accesscontextmanager_cc_grpc" + "@googleapis//google/identity/accesscontextmanager/type:type_cc_grpc" \ + "@googleapis//google/identity/accesscontextmanager/v1:accesscontextmanager_cc_grpc" )" - ["advisorynotifications"]="@com_google_googleapis//google/cloud/advisorynotifications/v1:advisorynotifications_cc_grpc" + ["advisorynotifications"]="@googleapis//google/cloud/advisorynotifications/v1:advisorynotifications_cc_grpc" ["aiplatform"]="$( printf ",%s" \ - "@com_google_googleapis//google/cloud/aiplatform/logging:logging_cc_grpc" \ - "@com_google_googleapis//google/cloud/aiplatform/v1:aiplatform_cc_grpc" \ - "@com_google_googleapis//google/cloud/aiplatform/v1/schema/predict/instance:instance_cc_grpc" \ - "@com_google_googleapis//google/cloud/aiplatform/v1/schema/predict/params:params_cc_grpc" \ - "@com_google_googleapis//google/cloud/aiplatform/v1/schema/predict/prediction:prediction_cc_grpc" \ - "@com_google_googleapis//google/cloud/aiplatform/v1/schema/trainingjob/definition:definition_cc_grpc" - )" - ["alloydb"]="@com_google_googleapis//google/cloud/alloydb/v1:alloydb_cc_grpc" - ["apigateway"]="@com_google_googleapis//google/cloud/apigateway/v1:apigateway_cc_grpc" - ["apigeeconnect"]="@com_google_googleapis//google/cloud/apigeeconnect/v1:apigeeconnect_cc_grpc" - ["apikeys"]="@com_google_googleapis//google/api/apikeys/v2:apikeys_cc_grpc" - ["apiregistry"]="@com_google_googleapis//google/cloud/apiregistry/v1:apiregistry_cc_grpc" + "@googleapis//google/cloud/aiplatform/logging:logging_cc_grpc" \ + "@googleapis//google/cloud/aiplatform/v1:aiplatform_cc_grpc" \ + "@googleapis//google/cloud/aiplatform/v1/schema/predict/instance:instance_cc_grpc" \ + "@googleapis//google/cloud/aiplatform/v1/schema/predict/params:params_cc_grpc" \ + "@googleapis//google/cloud/aiplatform/v1/schema/predict/prediction:prediction_cc_grpc" \ + "@googleapis//google/cloud/aiplatform/v1/schema/trainingjob/definition:definition_cc_grpc" + )" + ["alloydb"]="@googleapis//google/cloud/alloydb/v1:alloydb_cc_grpc" + ["apigateway"]="@googleapis//google/cloud/apigateway/v1:apigateway_cc_grpc" + ["apigeeconnect"]="@googleapis//google/cloud/apigeeconnect/v1:apigeeconnect_cc_grpc" + ["apikeys"]="@googleapis//google/api/apikeys/v2:apikeys_cc_grpc" + ["apiregistry"]="@googleapis//google/cloud/apiregistry/v1:apiregistry_cc_grpc" ["appengine"]="$( printf ",%s" \ - "@com_google_googleapis//google/appengine/v1:appengine_cc_grpc" \ - "@com_google_googleapis//google/appengine/logging/v1:logging_cc_grpc" \ - "@com_google_googleapis//google/appengine/legacy:legacy_cc_grpc" + "@googleapis//google/appengine/v1:appengine_cc_grpc" \ + "@googleapis//google/appengine/logging/v1:logging_cc_grpc" \ + "@googleapis//google/appengine/legacy:legacy_cc_grpc" )" - ["apphub"]="@com_google_googleapis//google/cloud/apphub/v1:apphub_cc_grpc" - ["artifactregistry"]="@com_google_googleapis//google/devtools/artifactregistry/v1:artifactregistry_cc_grpc" - ["asset"]="@com_google_googleapis//google/cloud/asset/v1:asset_cc_grpc" - ["assuredworkloads"]="@com_google_googleapis//google/cloud/assuredworkloads/v1:assuredworkloads_cc_grpc" - ["auditmanager"]="@com_google_googleapis//google/cloud/auditmanager/v1:auditmanager_cc_grpc" - ["automl"]="@com_google_googleapis//google/cloud/automl/v1:automl_cc_grpc" + ["apphub"]="@googleapis//google/cloud/apphub/v1:apphub_cc_grpc" + ["artifactregistry"]="@googleapis//google/devtools/artifactregistry/v1:artifactregistry_cc_grpc" + ["asset"]="@googleapis//google/cloud/asset/v1:asset_cc_grpc" + ["assuredworkloads"]="@googleapis//google/cloud/assuredworkloads/v1:assuredworkloads_cc_grpc" + ["auditmanager"]="@googleapis//google/cloud/auditmanager/v1:auditmanager_cc_grpc" + ["automl"]="@googleapis//google/cloud/automl/v1:automl_cc_grpc" ["backupdr"]="$( printf ",%s" \ - "@com_google_googleapis//google/cloud/backupdr/v1:backupdr_cc_grpc" \ - "@com_google_googleapis//google/cloud/backupdr/logging/v1:logging_cc_grpc" + "@googleapis//google/cloud/backupdr/v1:backupdr_cc_grpc" \ + "@googleapis//google/cloud/backupdr/logging/v1:logging_cc_grpc" )" - ["baremetalsolution"]="@com_google_googleapis//google/cloud/baremetalsolution/v2:baremetalsolution_cc_grpc" - ["batch"]="@com_google_googleapis//google/cloud/batch/v1:batch_cc_grpc" + ["baremetalsolution"]="@googleapis//google/cloud/baremetalsolution/v2:baremetalsolution_cc_grpc" + ["batch"]="@googleapis//google/cloud/batch/v1:batch_cc_grpc" ["beyondcorp"]="$( printf ",%s" \ - "@com_google_googleapis//google/cloud/beyondcorp/appconnections/v1:appconnections_cc_grpc" \ - "@com_google_googleapis//google/cloud/beyondcorp/appconnectors/v1:appconnectors_cc_grpc" \ - "@com_google_googleapis//google/cloud/beyondcorp/appgateways/v1:appgateways_cc_grpc" + "@googleapis//google/cloud/beyondcorp/appconnections/v1:appconnections_cc_grpc" \ + "@googleapis//google/cloud/beyondcorp/appconnectors/v1:appconnectors_cc_grpc" \ + "@googleapis//google/cloud/beyondcorp/appgateways/v1:appgateways_cc_grpc" )" ["bigquery"]="$( # This is long enough that it needs to be kept in alphabetical order printf ",%s" \ - "@com_google_googleapis//google/cloud/bigquery/analyticshub/v1:analyticshub_cc_grpc" \ - "@com_google_googleapis//google/cloud/bigquery/biglake/v1:biglake_cc_grpc" \ - "@com_google_googleapis//google/cloud/bigquery/connection/v1:connection_cc_grpc" \ - "@com_google_googleapis//google/cloud/bigquery/datapolicies/v1:datapolicies_cc_grpc" \ - "@com_google_googleapis//google/cloud/bigquery/datapolicies/v2:datapolicies_cc_grpc" \ - "@com_google_googleapis//google/cloud/bigquery/datatransfer/v1:datatransfer_cc_grpc" \ - "@com_google_googleapis//google/cloud/bigquery/logging/v1:logging_cc_grpc" \ - "@com_google_googleapis//google/cloud/bigquery/migration/v2:migration_cc_grpc" \ - "@com_google_googleapis//google/cloud/bigquery/reservation/v1:reservation_cc_grpc" \ - "@com_google_googleapis//google/cloud/bigquery/storage/v1:storage_cc_grpc" - )" - ["bigquerycontrol"]="@com_google_googleapis//google/cloud/bigquery/v2:bigquery_cc_proto" + "@googleapis//google/cloud/bigquery/analyticshub/v1:analyticshub_cc_grpc" \ + "@googleapis//google/cloud/bigquery/biglake/v1:biglake_cc_grpc" \ + "@googleapis//google/cloud/bigquery/connection/v1:connection_cc_grpc" \ + "@googleapis//google/cloud/bigquery/datapolicies/v1:datapolicies_cc_grpc" \ + "@googleapis//google/cloud/bigquery/datapolicies/v2:datapolicies_cc_grpc" \ + "@googleapis//google/cloud/bigquery/datatransfer/v1:datatransfer_cc_grpc" \ + "@googleapis//google/cloud/bigquery/logging/v1:logging_cc_grpc" \ + "@googleapis//google/cloud/bigquery/migration/v2:migration_cc_grpc" \ + "@googleapis//google/cloud/bigquery/reservation/v1:reservation_cc_grpc" \ + "@googleapis//google/cloud/bigquery/storage/v1:storage_cc_grpc" + )" + ["bigquerycontrol"]="@googleapis//google/cloud/bigquery/v2:bigquery_cc_proto" ["bigtable"]="$( printf ",%s" \ - "@com_google_googleapis//google/bigtable/v2:bigtable_cc_grpc" \ - "@com_google_googleapis//google/bigtable/admin/v2:admin_cc_grpc" + "@googleapis//google/bigtable/v2:bigtable_cc_grpc" \ + "@googleapis//google/bigtable/admin/v2:admin_cc_grpc" )" ["billing"]="$( printf ",%s" \ - "@com_google_googleapis//google/cloud/billing/v1:billing_cc_grpc" \ - "@com_google_googleapis//google/cloud/billing/budgets/v1:budgets_cc_grpc" + "@googleapis//google/cloud/billing/v1:billing_cc_grpc" \ + "@googleapis//google/cloud/billing/budgets/v1:budgets_cc_grpc" )" - ["binaryauthorization"]="@com_google_googleapis//google/cloud/binaryauthorization/v1:binaryauthorization_cc_grpc" + ["binaryauthorization"]="@googleapis//google/cloud/binaryauthorization/v1:binaryauthorization_cc_grpc" ["certificatemanager"]="$( printf ",%s" \ - "@com_google_googleapis//google/cloud/certificatemanager/logging/v1:logging_cc_grpc" \ - "@com_google_googleapis//google/cloud/certificatemanager/v1:certificatemanager_cc_grpc" + "@googleapis//google/cloud/certificatemanager/logging/v1:logging_cc_grpc" \ + "@googleapis//google/cloud/certificatemanager/v1:certificatemanager_cc_grpc" )" - ["channel"]="@com_google_googleapis//google/cloud/channel/v1:channel_cc_grpc" - ["chronicle"]="@com_google_googleapis//google/cloud/chronicle/v1:chronicle_cc_grpc" + ["channel"]="@googleapis//google/cloud/channel/v1:channel_cc_grpc" + ["chronicle"]="@googleapis//google/cloud/chronicle/v1:chronicle_cc_grpc" ["cloudbuild"]="$( printf ",%s" \ - "@com_google_googleapis//google/devtools/cloudbuild/v1:cloudbuild_cc_grpc" \ - "@com_google_googleapis//google/devtools/cloudbuild/v2:cloudbuild_cc_grpc" - )" - ["cloudcontrolspartner"]="@com_google_googleapis//google/cloud/cloudcontrolspartner/v1:cloudcontrolspartner_cc_grpc" - ["cloudquotas"]="@com_google_googleapis//google/api/cloudquotas/v1:cloudquotas_cc_grpc" - ["cloudsecuritycompliance"]="@com_google_googleapis//google/cloud/cloudsecuritycompliance/v1:cloudsecuritycompliance_cc_grpc" - ["commerce"]="@com_google_googleapis//google/cloud/commerce/consumer/procurement/v1:procurement_cc_grpc" - ["common"]="@com_google_googleapis//google/cloud/common:common_cc_grpc" - ["composer"]="@com_google_googleapis//google/cloud/orchestration/airflow/service/v1:service_cc_grpc" - ["confidentialcomputing"]="@com_google_googleapis//google/cloud/confidentialcomputing/v1:confidentialcomputing_cc_grpc" - ["config"]="@com_google_googleapis//google/cloud/config/v1:config_cc_grpc" - ["configdelivery"]="@com_google_googleapis//google/cloud/configdelivery/v1:configdelivery_cc_grpc" - ["connectors"]="@com_google_googleapis//google/cloud/connectors/v1:connectors_cc_grpc" - ["contactcenterinsights"]="@com_google_googleapis//google/cloud/contactcenterinsights/v1:contactcenterinsights_cc_grpc" - ["container"]="@com_google_googleapis//google/container/v1:container_cc_grpc" - ["containeranalysis"]="@com_google_googleapis//google/devtools/containeranalysis/v1:containeranalysis_cc_grpc" - ["contentwarehouse"]="@com_google_googleapis//google/cloud/contentwarehouse/v1:contentwarehouse_cc_grpc" + "@googleapis//google/devtools/cloudbuild/v1:cloudbuild_cc_grpc" \ + "@googleapis//google/devtools/cloudbuild/v2:cloudbuild_cc_grpc" + )" + ["cloudcontrolspartner"]="@googleapis//google/cloud/cloudcontrolspartner/v1:cloudcontrolspartner_cc_grpc" + ["cloudquotas"]="@googleapis//google/api/cloudquotas/v1:cloudquotas_cc_grpc" + ["cloudsecuritycompliance"]="@googleapis//google/cloud/cloudsecuritycompliance/v1:cloudsecuritycompliance_cc_grpc" + ["commerce"]="@googleapis//google/cloud/commerce/consumer/procurement/v1:procurement_cc_grpc" + ["common"]="@googleapis//google/cloud/common:common_cc_grpc" + ["composer"]="@googleapis//google/cloud/orchestration/airflow/service/v1:service_cc_grpc" + ["confidentialcomputing"]="@googleapis//google/cloud/confidentialcomputing/v1:confidentialcomputing_cc_grpc" + ["config"]="@googleapis//google/cloud/config/v1:config_cc_grpc" + ["configdelivery"]="@googleapis//google/cloud/configdelivery/v1:configdelivery_cc_grpc" + ["connectors"]="@googleapis//google/cloud/connectors/v1:connectors_cc_grpc" + ["contactcenterinsights"]="@googleapis//google/cloud/contactcenterinsights/v1:contactcenterinsights_cc_grpc" + ["container"]="@googleapis//google/container/v1:container_cc_grpc" + ["containeranalysis"]="@googleapis//google/devtools/containeranalysis/v1:containeranalysis_cc_grpc" + ["contentwarehouse"]="@googleapis//google/cloud/contentwarehouse/v1:contentwarehouse_cc_grpc" ["datacatalog"]="$( printf ",%s" \ - "@com_google_googleapis//google/cloud/datacatalog/v1:datacatalog_cc_grpc" \ - "@com_google_googleapis//google/cloud/datacatalog/lineage/v1:lineage_cc_grpc" + "@googleapis//google/cloud/datacatalog/v1:datacatalog_cc_grpc" \ + "@googleapis//google/cloud/datacatalog/lineage/v1:lineage_cc_grpc" )" ["dataform"]="$( printf ",%s" \ - "@com_google_googleapis//google/cloud/dataform/v1:dataform_cc_grpc" \ - "@com_google_googleapis//google/cloud/dataform/logging/v1:logging_cc_grpc" + "@googleapis//google/cloud/dataform/v1:dataform_cc_grpc" \ + "@googleapis//google/cloud/dataform/logging/v1:logging_cc_grpc" )" - ["datafusion"]="@com_google_googleapis//google/cloud/datafusion/v1:datafusion_cc_grpc" + ["datafusion"]="@googleapis//google/cloud/datafusion/v1:datafusion_cc_grpc" ["datamigration"]="$( printf ",%s" \ - "@com_google_googleapis//google/cloud/clouddms/v1:clouddms_cc_grpc" \ - "@com_google_googleapis//google/cloud/clouddms/logging/v1:logging_cc_grpc" + "@googleapis//google/cloud/clouddms/v1:clouddms_cc_grpc" \ + "@googleapis//google/cloud/clouddms/logging/v1:logging_cc_grpc" )" - ["dataplex"]="@com_google_googleapis//google/cloud/dataplex/v1:dataplex_cc_grpc" - ["dataproc"]="@com_google_googleapis//google/cloud/dataproc/v1:dataproc_cc_grpc" + ["dataplex"]="@googleapis//google/cloud/dataplex/v1:dataplex_cc_grpc" + ["dataproc"]="@googleapis//google/cloud/dataproc/v1:dataproc_cc_grpc" ["datastore"]="$( printf ",%s" \ - "@com_google_googleapis//google/datastore/admin/v1:admin_cc_grpc" \ - "@com_google_googleapis//google/datastore/v1:datastore_cc_grpc" - )" - ["datastream"]="@com_google_googleapis//google/cloud/datastream/v1:datastream_cc_grpc" - ["deploy"]="@com_google_googleapis//google/cloud/deploy/v1:deploy_cc_grpc" - ["developerconnect"]="@com_google_googleapis//google/cloud/developerconnect/v1:developerconnect_cc_grpc" - ["devicestreaming"]="@com_google_googleapis//google/cloud/devicestreaming/v1:devicestreaming_cc_grpc" - ["dialogflow_es"]="@com_google_googleapis//google/cloud/dialogflow/v2:dialogflow_cc_grpc" - ["dialogflow_cx"]="@com_google_googleapis//google/cloud/dialogflow/cx/v3:cx_cc_grpc" - ["discoveryengine"]="@com_google_googleapis//google/cloud/discoveryengine/v1:discoveryengine_cc_grpc" - ["dlp"]="@com_google_googleapis//google/privacy/dlp/v2:dlp_cc_grpc" - ["documentai"]="@com_google_googleapis//google/cloud/documentai/v1:documentai_cc_grpc" - ["domains"]="@com_google_googleapis//google/cloud/domains/v1:domains_cc_grpc" - ["edgecontainer"]="@com_google_googleapis//google/cloud/edgecontainer/v1:edgecontainer_cc_grpc" - ["edgenetwork"]="@com_google_googleapis//google/cloud/edgenetwork/v1:edgenetwork_cc_grpc" - ["essentialcontacts"]="@com_google_googleapis//google/cloud/essentialcontacts/v1:essentialcontacts_cc_grpc" + "@googleapis//google/datastore/admin/v1:admin_cc_grpc" \ + "@googleapis//google/datastore/v1:datastore_cc_grpc" + )" + ["datastream"]="@googleapis//google/cloud/datastream/v1:datastream_cc_grpc" + ["deploy"]="@googleapis//google/cloud/deploy/v1:deploy_cc_grpc" + ["developerconnect"]="@googleapis//google/cloud/developerconnect/v1:developerconnect_cc_grpc" + ["devicestreaming"]="@googleapis//google/cloud/devicestreaming/v1:devicestreaming_cc_grpc" + ["dialogflow_es"]="@googleapis//google/cloud/dialogflow/v2:dialogflow_cc_grpc" + ["dialogflow_cx"]="@googleapis//google/cloud/dialogflow/cx/v3:cx_cc_grpc" + ["discoveryengine"]="@googleapis//google/cloud/discoveryengine/v1:discoveryengine_cc_grpc" + ["dlp"]="@googleapis//google/privacy/dlp/v2:dlp_cc_grpc" + ["documentai"]="@googleapis//google/cloud/documentai/v1:documentai_cc_grpc" + ["domains"]="@googleapis//google/cloud/domains/v1:domains_cc_grpc" + ["edgecontainer"]="@googleapis//google/cloud/edgecontainer/v1:edgecontainer_cc_grpc" + ["edgenetwork"]="@googleapis//google/cloud/edgenetwork/v1:edgenetwork_cc_grpc" + ["essentialcontacts"]="@googleapis//google/cloud/essentialcontacts/v1:essentialcontacts_cc_grpc" ["eventarc"]="$( printf ",%s" \ - "@com_google_googleapis//google/cloud/eventarc/v1:eventarc_cc_grpc" \ - "@com_google_googleapis//google/cloud/eventarc/publishing/v1:publishing_cc_grpc" + "@googleapis//google/cloud/eventarc/v1:eventarc_cc_grpc" \ + "@googleapis//google/cloud/eventarc/publishing/v1:publishing_cc_grpc" )" - ["filestore"]="@com_google_googleapis//google/cloud/filestore/v1:filestore_cc_grpc" - ["financialservices"]="@com_google_googleapis//google/cloud/financialservices/v1:financialservices_cc_grpc" + ["filestore"]="@googleapis//google/cloud/filestore/v1:filestore_cc_grpc" + ["financialservices"]="@googleapis//google/cloud/financialservices/v1:financialservices_cc_grpc" ["functions"]="$( printf ",%s" \ - "@com_google_googleapis//google/cloud/functions/v1:functions_cc_grpc" \ - "@com_google_googleapis//google/cloud/functions/v2:functions_cc_grpc" + "@googleapis//google/cloud/functions/v1:functions_cc_grpc" \ + "@googleapis//google/cloud/functions/v2:functions_cc_grpc" )" ["gkebackup"]="$( printf ",%s" \ - "@com_google_googleapis//google/cloud/gkebackup/logging/v1:logging_cc_grpc" \ - "@com_google_googleapis//google/cloud/gkebackup/v1:gkebackup_cc_grpc" + "@googleapis//google/cloud/gkebackup/logging/v1:logging_cc_grpc" \ + "@googleapis//google/cloud/gkebackup/v1:gkebackup_cc_grpc" )" - ["gkeconnect"]="@com_google_googleapis//google/cloud/gkeconnect/gateway/v1:gateway_cc_grpc" - ["gkerecommender"]="@com_google_googleapis//google/cloud/gkerecommender/v1:gkerecommender_cc_grpc" + ["gkeconnect"]="@googleapis//google/cloud/gkeconnect/gateway/v1:gateway_cc_grpc" + ["gkerecommender"]="@googleapis//google/cloud/gkerecommender/v1:gkerecommender_cc_grpc" ["gkehub"]="$( printf ",%s" \ - "@com_google_googleapis//google/cloud/gkehub/v1:gkehub_cc_grpc" \ - "@com_google_googleapis//google/cloud/gkehub/v1/multiclusteringress:multiclusteringress_cc_grpc" \ - "@com_google_googleapis//google/cloud/gkehub/v1/configmanagement:configmanagement_cc_grpc" - )" - ["gkemulticloud"]="@com_google_googleapis//google/cloud/gkemulticloud/v1:gkemulticloud_cc_grpc" - ["grafeas"]="@com_google_googleapis//grafeas/v1:grafeas_cc_grpc" - ["iam"]="@com_google_googleapis//google/iam/admin/v1:admin_cc_grpc" - ["iam_v2"]="@com_google_googleapis//google/iam/v2:iam_cc_grpc" - ["iam_v3"]="@com_google_googleapis//google/iam/v3:iam_cc_grpc" - ["iap"]="@com_google_googleapis//google/cloud/iap/v1:iap_cc_grpc" - ["ids"]="@com_google_googleapis//google/cloud/ids/v1:ids_cc_grpc" + "@googleapis//google/cloud/gkehub/v1:gkehub_cc_grpc" \ + "@googleapis//google/cloud/gkehub/v1/multiclusteringress:multiclusteringress_cc_grpc" \ + "@googleapis//google/cloud/gkehub/v1/configmanagement:configmanagement_cc_grpc" + )" + ["gkemulticloud"]="@googleapis//google/cloud/gkemulticloud/v1:gkemulticloud_cc_grpc" + ["grafeas"]="@googleapis//grafeas/v1:grafeas_cc_grpc" + ["iam"]="@googleapis//google/iam/admin/v1:admin_cc_grpc" + ["iam_v2"]="@googleapis//google/iam/v2:iam_cc_grpc" + ["iam_v3"]="@googleapis//google/iam/v3:iam_cc_grpc" + ["iap"]="@googleapis//google/cloud/iap/v1:iap_cc_grpc" + ["ids"]="@googleapis//google/cloud/ids/v1:ids_cc_grpc" ["kms"]="$( printf ",%s" \ - "@com_google_googleapis//google/cloud/kms/v1:kms_cc_grpc" \ - "@com_google_googleapis//google/cloud/kms/inventory/v1:inventory_cc_grpc" + "@googleapis//google/cloud/kms/v1:kms_cc_grpc" \ + "@googleapis//google/cloud/kms/inventory/v1:inventory_cc_grpc" )" ["language"]="$( printf ",%s" \ - "@com_google_googleapis//google/cloud/language/v1:language_cc_grpc" \ - "@com_google_googleapis//google/cloud/language/v2:language_cc_grpc" + "@googleapis//google/cloud/language/v1:language_cc_grpc" \ + "@googleapis//google/cloud/language/v2:language_cc_grpc" )" - ["licensemanager"]="@com_google_googleapis//google/cloud/licensemanager/v1:licensemanager_cc_grpc" - ["logging_type"]="@com_google_googleapis//google/logging/type:type_cc_grpc" - ["logging"]="@com_google_googleapis//google/logging/v2:logging_cc_grpc" - ["lustre"]="@com_google_googleapis//google/cloud/lustre/v1:lustre_cc_grpc" - ["maintenance"]="@com_google_googleapis//google/cloud/maintenance/api/v1:api_cc_grpc" - ["managedidentities"]="@com_google_googleapis//google/cloud/managedidentities/v1:managedidentities_cc_grpc" + ["licensemanager"]="@googleapis//google/cloud/licensemanager/v1:licensemanager_cc_grpc" + ["logging_type"]="@googleapis//google/logging/type:type_cc_grpc" + ["logging"]="@googleapis//google/logging/v2:logging_cc_grpc" + ["lustre"]="@googleapis//google/cloud/lustre/v1:lustre_cc_grpc" + ["maintenance"]="@googleapis//google/cloud/maintenance/api/v1:api_cc_grpc" + ["managedidentities"]="@googleapis//google/cloud/managedidentities/v1:managedidentities_cc_grpc" ["managedkafka"]="$( printf ",%s" \ - "@com_google_googleapis//google/cloud/managedkafka/schemaregistry/v1:schemaregistry_cc_grpc" \ - "@com_google_googleapis//google/cloud/managedkafka/v1:managedkafka_cc_grpc" + "@googleapis//google/cloud/managedkafka/schemaregistry/v1:schemaregistry_cc_grpc" \ + "@googleapis//google/cloud/managedkafka/v1:managedkafka_cc_grpc" )" - ["memcache"]="@com_google_googleapis//google/cloud/memcache/v1:memcache_cc_grpc" - ["memorystore"]="@com_google_googleapis//google/cloud/memorystore/v1:memorystore_cc_grpc" + ["memcache"]="@googleapis//google/cloud/memcache/v1:memcache_cc_grpc" + ["memorystore"]="@googleapis//google/cloud/memorystore/v1:memorystore_cc_grpc" ["metastore"]="$( printf ",%s" \ - "@com_google_googleapis//google/cloud/metastore/logging/v1:logging_cc_grpc" \ - "@com_google_googleapis//google/cloud/metastore/v1:metastore_cc_grpc" + "@googleapis//google/cloud/metastore/logging/v1:logging_cc_grpc" \ + "@googleapis//google/cloud/metastore/v1:metastore_cc_grpc" )" - ["migrationcenter"]="@com_google_googleapis//google/cloud/migrationcenter/v1:migrationcenter_cc_grpc" + ["migrationcenter"]="@googleapis//google/cloud/migrationcenter/v1:migrationcenter_cc_grpc" ["monitoring"]="$( printf ",%s" \ - "@com_google_googleapis//google/monitoring/v3:monitoring_cc_grpc" \ - "@com_google_googleapis//google/monitoring/dashboard/v1:dashboard_cc_grpc" \ - "@com_google_googleapis//google/monitoring/metricsscope/v1:metricsscope_cc_grpc" + "@googleapis//google/monitoring/v3:monitoring_cc_grpc" \ + "@googleapis//google/monitoring/dashboard/v1:dashboard_cc_grpc" \ + "@googleapis//google/monitoring/metricsscope/v1:metricsscope_cc_grpc" )" - ["netapp"]="@com_google_googleapis//google/cloud/netapp/v1:netapp_cc_grpc" - ["networkconnectivity"]="@com_google_googleapis//google/cloud/networkconnectivity/v1:networkconnectivity_cc_grpc" - ["networkmanagement"]="@com_google_googleapis//google/cloud/networkmanagement/v1:networkmanagement_cc_grpc" - ["networksecurity"]="@com_google_googleapis//google/cloud/networksecurity/v1:networksecurity_cc_grpc" - ["networkservices"]="@com_google_googleapis//google/cloud/networkservices/v1:networkservices_cc_grpc" + ["netapp"]="@googleapis//google/cloud/netapp/v1:netapp_cc_grpc" + ["networkconnectivity"]="@googleapis//google/cloud/networkconnectivity/v1:networkconnectivity_cc_grpc" + ["networkmanagement"]="@googleapis//google/cloud/networkmanagement/v1:networkmanagement_cc_grpc" + ["networksecurity"]="@googleapis//google/cloud/networksecurity/v1:networksecurity_cc_grpc" + ["networkservices"]="@googleapis//google/cloud/networkservices/v1:networkservices_cc_grpc" ["notebooks"]="$( printf ",%s" \ - "@com_google_googleapis//google/cloud/notebooks/v1:notebooks_cc_grpc" \ - "@com_google_googleapis//google/cloud/notebooks/v2:notebooks_cc_grpc" + "@googleapis//google/cloud/notebooks/v1:notebooks_cc_grpc" \ + "@googleapis//google/cloud/notebooks/v2:notebooks_cc_grpc" )" - ["optimization"]="@com_google_googleapis//google/cloud/optimization/v1:optimization_cc_grpc" - ["oracledatabase"]="@com_google_googleapis//google/cloud/oracledatabase/v1:oracledatabase_cc_grpc" - ["orgpolicy"]="@com_google_googleapis//google/cloud/orgpolicy/v2:orgpolicy_cc_grpc" + ["optimization"]="@googleapis//google/cloud/optimization/v1:optimization_cc_grpc" + ["oracledatabase"]="@googleapis//google/cloud/oracledatabase/v1:oracledatabase_cc_grpc" + ["orgpolicy"]="@googleapis//google/cloud/orgpolicy/v2:orgpolicy_cc_grpc" ["osconfig"]="$( printf ",%s" \ - "@com_google_googleapis//google/cloud/osconfig/agentendpoint/v1:agentendpoint_cc_grpc" \ - "@com_google_googleapis//google/cloud/osconfig/v1:osconfig_cc_grpc" + "@googleapis//google/cloud/osconfig/agentendpoint/v1:agentendpoint_cc_grpc" \ + "@googleapis//google/cloud/osconfig/v1:osconfig_cc_grpc" )" ["oslogin"]="$( printf ",%s" \ - "@com_google_googleapis//google/cloud/oslogin/v1:oslogin_cc_grpc" \ - "@com_google_googleapis//google/cloud/oslogin/common:common_cc_grpc" + "@googleapis//google/cloud/oslogin/v1:oslogin_cc_grpc" \ + "@googleapis//google/cloud/oslogin/common:common_cc_grpc" )" - ["parametermanager"]="@com_google_googleapis//google/cloud/parametermanager/v1:parametermanager_cc_grpc" - ["parallelstore"]="@com_google_googleapis//google/cloud/parallelstore/v1:parallelstore_cc_grpc" - ["policysimulator"]="@com_google_googleapis//google/cloud/policysimulator/v1:policysimulator_cc_grpc" + ["parametermanager"]="@googleapis//google/cloud/parametermanager/v1:parametermanager_cc_grpc" + ["parallelstore"]="@googleapis//google/cloud/parallelstore/v1:parallelstore_cc_grpc" + ["policysimulator"]="@googleapis//google/cloud/policysimulator/v1:policysimulator_cc_grpc" ["policytroubleshooter"]="$( printf ",%s" \ - "@com_google_googleapis//google/cloud/policytroubleshooter/v1:policytroubleshooter_cc_grpc" \ - "@com_google_googleapis//google/cloud/policytroubleshooter/iam/v3:iam_cc_grpc" - )" - ["privateca"]="@com_google_googleapis//google/cloud/security/privateca/v1:privateca_cc_grpc" - ["privilegedaccessmanager"]="@com_google_googleapis//google/cloud/privilegedaccessmanager/v1:privilegedaccessmanager_cc_grpc" - ["profiler"]="@com_google_googleapis//google/devtools/cloudprofiler/v2:cloudprofiler_cc_grpc" - ["publicca"]="@com_google_googleapis//google/cloud/security/publicca/v1:publicca_cc_grpc" - ["pubsub"]="@com_google_googleapis//google/pubsub/v1:pubsub_cc_grpc" - ["pubsublite"]="@com_google_googleapis//google/cloud/pubsublite/v1:pubsublite_cc_grpc" - ["rapidmigrationassessment"]="@com_google_googleapis//google/cloud/rapidmigrationassessment/v1:rapidmigrationassessment_cc_grpc" - ["recaptchaenterprise"]="@com_google_googleapis//google/cloud/recaptchaenterprise/v1:recaptchaenterprise_cc_grpc" + "@googleapis//google/cloud/policytroubleshooter/v1:policytroubleshooter_cc_grpc" \ + "@googleapis//google/cloud/policytroubleshooter/iam/v3:iam_cc_grpc" + )" + ["privateca"]="@googleapis//google/cloud/security/privateca/v1:privateca_cc_grpc" + ["privilegedaccessmanager"]="@googleapis//google/cloud/privilegedaccessmanager/v1:privilegedaccessmanager_cc_grpc" + ["profiler"]="@googleapis//google/devtools/cloudprofiler/v2:cloudprofiler_cc_grpc" + ["publicca"]="@googleapis//google/cloud/security/publicca/v1:publicca_cc_grpc" + ["pubsub"]="@googleapis//google/pubsub/v1:pubsub_cc_grpc" + ["pubsublite"]="@googleapis//google/cloud/pubsublite/v1:pubsublite_cc_grpc" + ["rapidmigrationassessment"]="@googleapis//google/cloud/rapidmigrationassessment/v1:rapidmigrationassessment_cc_grpc" + ["recaptchaenterprise"]="@googleapis//google/cloud/recaptchaenterprise/v1:recaptchaenterprise_cc_grpc" ["recommender"]="$( printf ",%s" \ - "@com_google_googleapis//google/cloud/recommender/v1:recommender_cc_grpc" \ - "@com_google_googleapis//google/cloud/recommender/logging/v1:logging_cc_grpc" + "@googleapis//google/cloud/recommender/v1:recommender_cc_grpc" \ + "@googleapis//google/cloud/recommender/logging/v1:logging_cc_grpc" )" ["redis"]="$( printf ",%s" \ - "@com_google_googleapis//google/cloud/redis/cluster/v1:cluster_cc_grpc" \ - "@com_google_googleapis//google/cloud/redis/v1:redis_cc_grpc" + "@googleapis//google/cloud/redis/cluster/v1:cluster_cc_grpc" \ + "@googleapis//google/cloud/redis/v1:redis_cc_grpc" )" - ["resourcemanager"]="@com_google_googleapis//google/cloud/resourcemanager/v3:resourcemanager_cc_grpc" - ["retail"]="@com_google_googleapis//google/cloud/retail/v2:retail_cc_grpc" - ["run"]="@com_google_googleapis//google/cloud/run/v2:run_cc_grpc" - ["scheduler"]="@com_google_googleapis//google/cloud/scheduler/v1:scheduler_cc_grpc" + ["resourcemanager"]="@googleapis//google/cloud/resourcemanager/v3:resourcemanager_cc_grpc" + ["retail"]="@googleapis//google/cloud/retail/v2:retail_cc_grpc" + ["run"]="@googleapis//google/cloud/run/v2:run_cc_grpc" + ["scheduler"]="@googleapis//google/cloud/scheduler/v1:scheduler_cc_grpc" ["secretmanager"]="$( printf ",%s" \ - "@com_google_googleapis//google/cloud/secretmanager/v1:secretmanager_cc_grpc" \ - "@com_google_googleapis//google/cloud/secretmanager/logging/v1:logging_cc_grpc" + "@googleapis//google/cloud/secretmanager/v1:secretmanager_cc_grpc" \ + "@googleapis//google/cloud/secretmanager/logging/v1:logging_cc_grpc" )" - ["securesourcemanager"]="@com_google_googleapis//google/cloud/securesourcemanager/v1:securesourcemanager_cc_grpc" + ["securesourcemanager"]="@googleapis//google/cloud/securesourcemanager/v1:securesourcemanager_cc_grpc" ["securitycenter"]="$( printf ",%s" \ - "@com_google_googleapis//google/cloud/securitycenter/v1:securitycenter_cc_grpc" \ - "@com_google_googleapis//google/cloud/securitycenter/v2:securitycenter_cc_grpc" + "@googleapis//google/cloud/securitycenter/v1:securitycenter_cc_grpc" \ + "@googleapis//google/cloud/securitycenter/v2:securitycenter_cc_grpc" )" - ["securitycentermanagement"]="@com_google_googleapis//google/cloud/securitycentermanagement/v1:securitycentermanagement_cc_grpc" + ["securitycentermanagement"]="@googleapis//google/cloud/securitycentermanagement/v1:securitycentermanagement_cc_grpc" ["servicecontrol"]="$( printf ",%s" \ - "@com_google_googleapis//google/api/servicecontrol/v1:servicecontrol_cc_grpc" \ - "@com_google_googleapis//google/api/servicecontrol/v2:servicecontrol_cc_grpc" + "@googleapis//google/api/servicecontrol/v1:servicecontrol_cc_grpc" \ + "@googleapis//google/api/servicecontrol/v2:servicecontrol_cc_grpc" )" - ["servicedirectory"]="@com_google_googleapis//google/cloud/servicedirectory/v1:servicedirectory_cc_grpc" + ["servicedirectory"]="@googleapis//google/cloud/servicedirectory/v1:servicedirectory_cc_grpc" ["servicehealth"]="$( printf ",%s" \ - "@com_google_googleapis//google/cloud/servicehealth/v1:servicehealth_cc_grpc" \ - "@com_google_googleapis//google/cloud/servicehealth/logging/v1:logging_cc_grpc" + "@googleapis//google/cloud/servicehealth/v1:servicehealth_cc_grpc" \ + "@googleapis//google/cloud/servicehealth/logging/v1:logging_cc_grpc" )" - ["servicemanagement"]="@com_google_googleapis//google/api/servicemanagement/v1:servicemanagement_cc_grpc" - ["serviceusage"]="@com_google_googleapis//google/api/serviceusage/v1:serviceusage_cc_grpc" - ["shell"]="@com_google_googleapis//google/cloud/shell/v1:shell_cc_grpc" + ["servicemanagement"]="@googleapis//google/api/servicemanagement/v1:servicemanagement_cc_grpc" + ["serviceusage"]="@googleapis//google/api/serviceusage/v1:serviceusage_cc_grpc" + ["shell"]="@googleapis//google/cloud/shell/v1:shell_cc_grpc" ["spanner"]="$( printf ",%s" \ - "@com_google_googleapis//google/spanner/v1:spanner_cc_grpc" \ - "@com_google_googleapis//google/spanner/admin/instance/v1:instance_cc_grpc" \ - "@com_google_googleapis//google/spanner/admin/database/v1:database_cc_grpc" + "@googleapis//google/spanner/v1:spanner_cc_grpc" \ + "@googleapis//google/spanner/admin/instance/v1:instance_cc_grpc" \ + "@googleapis//google/spanner/admin/database/v1:database_cc_grpc" )" ["speech"]="$( printf ",%s" \ - "@com_google_googleapis//google/cloud/speech/v1:speech_cc_grpc" \ - "@com_google_googleapis//google/cloud/speech/v2:speech_cc_grpc" - )" - ["sql"]="@com_google_googleapis//google/cloud/sql/v1:sql_cc_proto" - ["storage"]="@com_google_googleapis//google/storage/v2:storage_cc_grpc" - ["storagebatchoperations"]="@com_google_googleapis//google/cloud/storagebatchoperations/v1:storagebatchoperations_cc_grpc" - ["storagecontrol"]="@com_google_googleapis//google/storage/control/v2:control_cc_grpc" - ["storageinsights"]="@com_google_googleapis//google/cloud/storageinsights/v1:storageinsights_cc_grpc" - ["storagetransfer"]="@com_google_googleapis//google/storagetransfer/v1:storagetransfer_cc_grpc" - ["support"]="@com_google_googleapis//google/cloud/support/v2:support_cc_grpc" - ["talent"]="@com_google_googleapis//google/cloud/talent/v4:talent_cc_grpc" - ["tasks"]="@com_google_googleapis//google/cloud/tasks/v2:tasks_cc_grpc" - ["telcoautomation"]="@com_google_googleapis//google/cloud/telcoautomation/v1:telcoautomation_cc_grpc" - ["texttospeech"]="@com_google_googleapis//google/cloud/texttospeech/v1:texttospeech_cc_grpc" - ["timeseriesinsights"]="@com_google_googleapis//google/cloud/timeseriesinsights/v1:timeseriesinsights_cc_grpc" + "@googleapis//google/cloud/speech/v1:speech_cc_grpc" \ + "@googleapis//google/cloud/speech/v2:speech_cc_grpc" + )" + ["sql"]="@googleapis//google/cloud/sql/v1:sql_cc_proto" + ["storage"]="@googleapis//google/storage/v2:storage_cc_grpc" + ["storagebatchoperations"]="@googleapis//google/cloud/storagebatchoperations/v1:storagebatchoperations_cc_grpc" + ["storagecontrol"]="@googleapis//google/storage/control/v2:control_cc_grpc" + ["storageinsights"]="@googleapis//google/cloud/storageinsights/v1:storageinsights_cc_grpc" + ["storagetransfer"]="@googleapis//google/storagetransfer/v1:storagetransfer_cc_grpc" + ["support"]="@googleapis//google/cloud/support/v2:support_cc_grpc" + ["talent"]="@googleapis//google/cloud/talent/v4:talent_cc_grpc" + ["tasks"]="@googleapis//google/cloud/tasks/v2:tasks_cc_grpc" + ["telcoautomation"]="@googleapis//google/cloud/telcoautomation/v1:telcoautomation_cc_grpc" + ["texttospeech"]="@googleapis//google/cloud/texttospeech/v1:texttospeech_cc_grpc" + ["timeseriesinsights"]="@googleapis//google/cloud/timeseriesinsights/v1:timeseriesinsights_cc_grpc" ["tpu"]="$( printf ",%s" \ - "@com_google_googleapis//google/cloud/tpu/v1:tpu_cc_grpc" \ - "@com_google_googleapis//google/cloud/tpu/v2:tpu_cc_grpc" + "@googleapis//google/cloud/tpu/v1:tpu_cc_grpc" \ + "@googleapis//google/cloud/tpu/v2:tpu_cc_grpc" )" ["trace"]="$( printf ",%s" \ - "@com_google_googleapis//google/devtools/cloudtrace/v1:cloudtrace_cc_grpc" \ - "@com_google_googleapis//google/devtools/cloudtrace/v2:cloudtrace_cc_grpc" + "@googleapis//google/devtools/cloudtrace/v1:cloudtrace_cc_grpc" \ + "@googleapis//google/devtools/cloudtrace/v2:cloudtrace_cc_grpc" )" - ["translate"]="@com_google_googleapis//google/cloud/translate/v3:translation_cc_grpc" + ["translate"]="@googleapis//google/cloud/translate/v3:translation_cc_grpc" ["video"]="$( printf ",%s" \ - "@com_google_googleapis//google/cloud/video/livestream/v1:livestream_cc_grpc" \ - "@com_google_googleapis//google/cloud/video/stitcher/v1:stitcher_cc_grpc" \ - "@com_google_googleapis//google/cloud/video/transcoder/v1:transcoder_cc_grpc" - )" - ["videointelligence"]="@com_google_googleapis//google/cloud/videointelligence/v1:videointelligence_cc_grpc" - ["vision"]="@com_google_googleapis//google/cloud/vision/v1:vision_cc_grpc" - ["vmmigration"]="@com_google_googleapis//google/cloud/vmmigration/v1:vmmigration_cc_grpc" - ["vmwareengine"]="@com_google_googleapis//google/cloud/vmwareengine/v1:vmwareengine_cc_grpc" - ["vpcaccess"]="@com_google_googleapis//google/cloud/vpcaccess/v1:vpcaccess_cc_grpc" - ["webrisk"]="@com_google_googleapis//google/cloud/webrisk/v1:webrisk_cc_grpc" - ["websecurityscanner"]="@com_google_googleapis//google/cloud/websecurityscanner/v1:websecurityscanner_cc_grpc" + "@googleapis//google/cloud/video/livestream/v1:livestream_cc_grpc" \ + "@googleapis//google/cloud/video/stitcher/v1:stitcher_cc_grpc" \ + "@googleapis//google/cloud/video/transcoder/v1:transcoder_cc_grpc" + )" + ["videointelligence"]="@googleapis//google/cloud/videointelligence/v1:videointelligence_cc_grpc" + ["vision"]="@googleapis//google/cloud/vision/v1:vision_cc_grpc" + ["vmmigration"]="@googleapis//google/cloud/vmmigration/v1:vmmigration_cc_grpc" + ["vmwareengine"]="@googleapis//google/cloud/vmwareengine/v1:vmwareengine_cc_grpc" + ["vpcaccess"]="@googleapis//google/cloud/vpcaccess/v1:vpcaccess_cc_grpc" + ["webrisk"]="@googleapis//google/cloud/webrisk/v1:webrisk_cc_grpc" + ["websecurityscanner"]="@googleapis//google/cloud/websecurityscanner/v1:websecurityscanner_cc_grpc" ["workflows"]="$( printf ",%s" \ - "@com_google_googleapis//google/cloud/workflows/v1:workflows_cc_grpc" \ - "@com_google_googleapis//google/cloud/workflows/type:type_cc_grpc" \ - "@com_google_googleapis//google/cloud/workflows/executions/v1:executions_cc_grpc" + "@googleapis//google/cloud/workflows/v1:workflows_cc_grpc" \ + "@googleapis//google/cloud/workflows/type:type_cc_grpc" \ + "@googleapis//google/cloud/workflows/executions/v1:executions_cc_grpc" )" ["workstations"]="$( printf ",%s" \ - "@com_google_googleapis//google/cloud/workstations/logging/v1:logging_cc_grpc" \ - "@com_google_googleapis//google/cloud/workstations/v1:workstations_cc_grpc" + "@googleapis//google/cloud/workstations/logging/v1:logging_cc_grpc" \ + "@googleapis//google/cloud/workstations/v1:workstations_cc_grpc" )" ) @@ -382,7 +382,7 @@ for library in "${keys[@]}"; do >>"external/googleapis/protolists/${library}.list" || true bazelisk query --noshow_progress --noshow_loading_progress \ "deps(${rule})" | - grep "@com_google_googleapis//" | grep _proto | + grep "@googleapis//" | grep _proto | grep -v "${path}" \ >>"external/googleapis/protodeps/${library}.deps" || true done @@ -395,5 +395,5 @@ done # TODO(#11694) - the Bazel file introduces a dependency that we do not build. # Fortunately (maybe?) we do not use or need the dep until the issue is # resolved. -sed -i '/@com_google_googleapis\/\/google\/cloud\/location:location_proto/d' \ +sed -i '/@googleapis\/\/google\/cloud\/location:location_proto/d' \ "external/googleapis/protodeps/datamigration.deps" diff --git a/generator/BUILD.bazel b/generator/BUILD.bazel index 50509b159bcb9..13f4a6b5b4e20 100644 --- a/generator/BUILD.bazel +++ b/generator/BUILD.bazel @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +load("@com_google_protobuf//bazel:cc_proto_library.bzl", "cc_proto_library") +load("@com_google_protobuf//bazel:proto_library.bzl", "proto_library") load(":google_cloud_cpp_generator.bzl", "google_cloud_cpp_generator_hdrs", "google_cloud_cpp_generator_srcs") load(":google_cloud_cpp_generator_testing.bzl", "google_cloud_cpp_generator_testing_hdrs", "google_cloud_cpp_generator_testing_srcs") load(":google_cloud_cpp_generator_unit_tests.bzl", "google_cloud_cpp_generator_unit_tests") @@ -33,17 +35,16 @@ cc_library( ":generator_config_cc_proto", "//:common", "//google/cloud:google_cloud_cpp_rest_internal", + "@abseil-cpp//absl/strings", + "@abseil-cpp//absl/strings:str_format", "@com_github_jbeder_yaml_cpp//:yaml-cpp", - "@com_github_nlohmann_json//:json", - "@com_google_absl//absl/strings", - "@com_google_absl//absl/strings:str_format", - "@com_google_googleapis//:googleapis_system_includes", - "@com_google_googleapis//google/api:client_cc_proto", - "@com_google_googleapis//google/api:field_info_cc_proto", - "@com_google_googleapis//google/api:routing_cc_proto", - "@com_google_googleapis//google/cloud:extended_operations_cc_proto", - "@com_google_googleapis//google/longrunning:longrunning_cc_proto", "@com_google_protobuf//:protoc_lib", + "@googleapis//google/api:client_cc_proto", + "@googleapis//google/api:field_info_cc_proto", + "@googleapis//google/api:routing_cc_proto", + "@googleapis//google/cloud:extended_operations_cc_proto", + "@googleapis//google/longrunning:longrunning_cc_proto", + "@nlohmann_json//:json", ], ) @@ -61,8 +62,8 @@ cc_library( ":google_cloud_cpp_generator", "//:common", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_google_googleapis//google/longrunning:longrunning_cc_proto", - "@com_google_googletest//:gtest", + "@googleapis//google/longrunning:longrunning_cc_proto", + "@googletest//:gtest", ], ) @@ -78,7 +79,7 @@ cc_library( ":google_cloud_cpp_generator", ":google_cloud_cpp_generator_testing", "//google/cloud/testing_util:google_cloud_cpp_testing_grpc_private", - "@com_google_googletest//:gtest", + "@googletest//:gtest", ], ) for test in google_cloud_cpp_generator_unit_tests] @@ -116,8 +117,8 @@ cc_binary( deps = [ ":generator_config_cc_proto", ":google_cloud_cpp_generator", - "@com_google_absl//absl/flags:commandlineflag", - "@com_google_absl//absl/flags:flag", - "@com_google_absl//absl/flags:parse", + "@abseil-cpp//absl/flags:commandlineflag", + "@abseil-cpp//absl/flags:flag", + "@abseil-cpp//absl/flags:parse", ], ) diff --git a/generator/CMakeLists.txt b/generator/CMakeLists.txt index 8503589dcb862..c6533bdf68984 100644 --- a/generator/CMakeLists.txt +++ b/generator/CMakeLists.txt @@ -27,7 +27,7 @@ find_package(Protobuf CONFIG QUIET) if (NOT Protobuf_FOUND) find_package(Protobuf REQUIRED) endif () -include(IncludeNlohmannJson) +find_package(nlohmann_json CONFIG REQUIRED) find_package(yaml-cpp CONFIG REQUIRED) add_library( @@ -67,16 +67,6 @@ add_library( internal/format_class_comments.h internal/format_method_comments.cc internal/format_method_comments.h - internal/forwarding_client_generator.cc - internal/forwarding_client_generator.h - internal/forwarding_connection_generator.cc - internal/forwarding_connection_generator.h - internal/forwarding_idempotency_policy_generator.cc - internal/forwarding_idempotency_policy_generator.h - internal/forwarding_mock_connection_generator.cc - internal/forwarding_mock_connection_generator.h - internal/forwarding_options_generator.cc - internal/forwarding_options_generator.h internal/generator_interface.h internal/http_annotation_parser.cc internal/http_annotation_parser.h diff --git a/generator/generator.cc b/generator/generator.cc index 50d18f34f9349..d14beb3df7dc0 100644 --- a/generator/generator.cc +++ b/generator/generator.cc @@ -17,12 +17,12 @@ #include "generator/internal/descriptor_utils.h" #include "generator/internal/generator_interface.h" #include "generator/internal/make_generators.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/filesystem.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_split.h" -#include +#include "google/api/client.pb.h" #include #include #include @@ -72,7 +72,8 @@ bool Generator::Generate(google::protobuf::FileDescriptor const* file, services.reserve(file->service_count()); for (int i = 0; i < file->service_count(); ++i) { auto const* service = file->service(i); - if (!internal::Contains(omitted_services, service->name())) { + if (!internal::Contains(omitted_services, service->name()) && + !internal::Contains(omitted_services, service->full_name())) { services.push_back(generator_internal::MakeGenerators( service, context, service_config, *command_line_args)); } diff --git a/generator/generator_config.proto b/generator/generator_config.proto index 68859b70030d1..0dc865a2dd285 100644 --- a/generator/generator_config.proto +++ b/generator/generator_config.proto @@ -38,11 +38,6 @@ message ServiceConfiguration { repeated string omitted_services = 8; - // If set to true generate the `gcpxxV1` alias for our inline namespace. Older - // versions of the generated libraries need this, but new libraries should not - // have it. - bool backwards_compatibility_namespace_alias = 9; - // If all rpcs in the service have the same set of retryable status codes, // typically found in the service_config.json accompanying the proto files, // generate the ServiceNameRetryTraits struct using the provided codes. @@ -118,19 +113,6 @@ message ServiceConfiguration { // constructor and the connection factory function. bool experimental = 18; - // We use this setting to maintain backwards compatibility when relocating a - // service from the undesired `forwarding_product_path` to the desired - // `product_path`. - // - // If set, generate backwards compatibility headers at the - // `forwarding_product_path`. These headers define aliases (in the namespace - // derived from `forwarding_product_path`), which point to types defined at - // the `product_path` (in the namespace derived from `product_path`). - // - // For details on why we would relocate a service, see #10170, or - // https://github.com/googleapis/google-cloud-cpp/blob/main/doc/adr/2022-11-11-multiple-versions-of-GCP-service-in-one-library.md - string forwarding_product_path = 19; - // Override idempotency policy values for specific rpcs. message IdempotencyOverride { // rpc_name should be qualified with the service name e.g.: Service.Method. @@ -185,6 +167,21 @@ message ServiceConfiguration { // RPCs. If set to false (the default), a no-op resumption function will be // generated. bool omit_streaming_updater = 29; + + message BespokeMethod { + string name = 1; + string return_type = 2; + string parameters = 3; + } + + // Only added to maintain feature parity when migrating from the handwritten + // Bigtable Table Admin class to the generated class. While some attempts were + // made to generalize this feature, it currently only supports the + // WaitForConsistency method. This functionality can be enhanced later if we + // ever need to use this again. + // The implementation for this method in the ConnectionImpl class is not + // generated and must be handwritten in a separate .cc file. + repeated BespokeMethod bespoke_methods = 30; } message DiscoveryDocumentDefinedProduct { diff --git a/generator/generator_config.textproto b/generator/generator_config.textproto index 0f5348a2b5b2d..91e201db7e3f5 100644 --- a/generator/generator_config.textproto +++ b/generator/generator_config.textproto @@ -20,14 +20,12 @@ service { product_path: "google/cloud/accessapproval/v1" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] - forwarding_product_path: "google/cloud/accessapproval" } # Access Context Manager service { service_proto_path: "google/identity/accesscontextmanager/v1/access_context_manager.proto" product_path: "google/cloud/accesscontextmanager/v1" - forwarding_product_path: "google/cloud/accesscontextmanager" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -271,7 +269,6 @@ service { service { service_proto_path: "google/cloud/apigateway/v1/apigateway_service.proto" product_path: "google/cloud/apigateway/v1" - forwarding_product_path: "google/cloud/apigateway" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable", "kUnknown"] } @@ -280,7 +277,6 @@ service { service { service_proto_path: "google/cloud/apigeeconnect/v1/connection.proto" product_path: "google/cloud/apigeeconnect/v1" - forwarding_product_path: "google/cloud/apigeeconnect" initial_copyright_year: "2022" service_endpoint_env_var: "GOOGLE_CLOUD_CPP_APIGEE_CONNECTION_SERVICE_ENDPOINT" retryable_status_codes: ["kUnavailable", "kUnknown"] @@ -290,7 +286,6 @@ service { service { service_proto_path: "google/api/apikeys/v2/apikeys.proto" product_path: "google/cloud/apikeys/v2" - forwarding_product_path: "google/cloud/apikeys" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -308,7 +303,6 @@ service { service_proto_path: "google/appengine/v1/appengine.proto" additional_proto_files: ["google/appengine/v1/operation.proto"] product_path: "google/cloud/appengine/v1" - forwarding_product_path: "google/cloud/appengine" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -325,7 +319,6 @@ service { service { service_proto_path: "google/devtools/artifactregistry/v1/service.proto" product_path: "google/cloud/artifactregistry/v1" - forwarding_product_path: "google/cloud/artifactregistry" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -334,7 +327,6 @@ service { service { service_proto_path: "google/cloud/asset/v1/asset_service.proto" product_path: "google/cloud/asset/v1" - forwarding_product_path: "google/cloud/asset" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -343,7 +335,6 @@ service { service { service_proto_path: "google/cloud/assuredworkloads/v1/assuredworkloads.proto" product_path: "google/cloud/assuredworkloads/v1" - forwarding_product_path: "google/cloud/assuredworkloads" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -361,7 +352,6 @@ service { service_proto_path: "google/cloud/automl/v1/service.proto" additional_proto_files: ["google/cloud/automl/v1/operations.proto"] product_path: "google/cloud/automl/v1" - forwarding_product_path: "google/cloud/automl" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -370,7 +360,6 @@ service { service_proto_path: "google/cloud/automl/v1/prediction_service.proto" additional_proto_files: ["google/cloud/automl/v1/operations.proto"] product_path: "google/cloud/automl/v1" - forwarding_product_path: "google/cloud/automl" initial_copyright_year: "2022" service_endpoint_env_var: "GOOGLE_CLOUD_CPP_AUTOML_PREDICTION_SERVICE_ENDPOINT" retryable_status_codes: ["kUnavailable"] @@ -388,7 +377,6 @@ service { service { service_proto_path: "google/cloud/baremetalsolution/v2/baremetalsolution.proto" product_path: "google/cloud/baremetalsolution/v2" - forwarding_product_path: "google/cloud/baremetalsolution" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -397,7 +385,6 @@ service { service { service_proto_path: "google/cloud/batch/v1/batch.proto" product_path: "google/cloud/batch/v1" - forwarding_product_path: "google/cloud/batch" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -406,7 +393,6 @@ service { service { service_proto_path: "google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.proto" product_path: "google/cloud/beyondcorp/appconnectors/v1" - forwarding_product_path: "google/cloud/beyondcorp" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -414,7 +400,6 @@ service { service { service_proto_path: "google/cloud/beyondcorp/appgateways/v1/app_gateways_service.proto" product_path: "google/cloud/beyondcorp/appgateways/v1" - forwarding_product_path: "google/cloud/beyondcorp" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -422,7 +407,6 @@ service { service { service_proto_path: "google/cloud/beyondcorp/appconnections/v1/app_connections_service.proto" product_path: "google/cloud/beyondcorp/appconnections/v1" - forwarding_product_path: "google/cloud/beyondcorp" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -431,7 +415,6 @@ service { service { service_proto_path: "google/cloud/bigquery/analyticshub/v1/analyticshub.proto" product_path: "google/cloud/bigquery/analyticshub/v1" - forwarding_product_path: "google/cloud/bigquery" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -446,7 +429,6 @@ service { service { service_proto_path: "google/cloud/bigquery/connection/v1/connection.proto" product_path: "google/cloud/bigquery/connection/v1" - forwarding_product_path: "google/cloud/bigquery" initial_copyright_year: "2022" service_endpoint_env_var: "GOOGLE_CLOUD_CPP_BIGQUERY_CONNECTION_SERVICE_ENDPOINT" retryable_status_codes: ["kUnavailable"] @@ -455,7 +437,6 @@ service { service { service_proto_path: "google/cloud/bigquery/datapolicies/v1/datapolicy.proto" product_path: "google/cloud/bigquery/datapolicies/v1" - forwarding_product_path: "google/cloud/bigquery" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -470,7 +451,6 @@ service { service { service_proto_path: "google/cloud/bigquery/datatransfer/v1/datatransfer.proto" product_path: "google/cloud/bigquery/datatransfer/v1" - forwarding_product_path: "google/cloud/bigquery" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -478,7 +458,6 @@ service { service { service_proto_path: "google/cloud/bigquery/migration/v2/migration_service.proto" product_path: "google/cloud/bigquery/migration/v2" - forwarding_product_path: "google/cloud/bigquery" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -486,7 +465,6 @@ service { service { service_proto_path: "google/cloud/bigquery/reservation/v1/reservation.proto" product_path: "google/cloud/bigquery/reservation/v1" - forwarding_product_path: "google/cloud/bigquery" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -494,10 +472,8 @@ service { service { service_proto_path: "google/cloud/bigquery/storage/v1/storage.proto" product_path: "google/cloud/bigquery/storage/v1" - forwarding_product_path: "google/cloud/bigquery" initial_copyright_year: "2021" omitted_services: ["BigQueryWrite"] - backwards_compatibility_namespace_alias: true retryable_status_codes: ["kUnavailable"] omit_streaming_updater: true } @@ -505,7 +481,6 @@ service { service { service_proto_path: "google/cloud/bigquery/storage/v1/storage.proto" product_path: "google/cloud/bigquery/storage/v1" - forwarding_product_path: "google/cloud/bigquery" initial_copyright_year: "2022" omitted_services: ["BigQueryRead"] retryable_status_codes: ["kUnavailable"] @@ -629,13 +604,19 @@ service { {rpc_name: "BigtableTableAdmin.CheckConsistency", idempotency: IDEMPOTENT} ] omit_repo_metadata: true + bespoke_methods : [ + { + name: "WaitForConsistency", + return_type: "future>", + parameters: "(google::bigtable::admin::v2::CheckConsistencyRequest const& request, Options opts = {})" + } + ] } # Billing service { service_proto_path: "google/cloud/billing/v1/cloud_billing.proto" product_path: "google/cloud/billing/v1" - forwarding_product_path: "google/cloud/billing" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -643,7 +624,6 @@ service { service { service_proto_path: "google/cloud/billing/v1/cloud_catalog.proto" product_path: "google/cloud/billing/v1" - forwarding_product_path: "google/cloud/billing" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -651,7 +631,6 @@ service { service { service_proto_path: "google/cloud/billing/budgets/v1/budget_service.proto" product_path: "google/cloud/billing/budgets/v1" - forwarding_product_path: "google/cloud/billing" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -660,7 +639,6 @@ service { service { service_proto_path: "google/cloud/binaryauthorization/v1/service.proto" product_path: "google/cloud/binaryauthorization/v1" - forwarding_product_path: "google/cloud/binaryauthorization" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -669,7 +647,6 @@ service { service { service_proto_path: "google/cloud/security/privateca/v1/service.proto" product_path: "google/cloud/privateca/v1" - forwarding_product_path: "google/cloud/privateca" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable", "kUnknown"] } @@ -685,7 +662,6 @@ service { service { service_proto_path: "google/cloud/certificatemanager/v1/certificate_manager.proto" product_path: "google/cloud/certificatemanager/v1" - forwarding_product_path: "google/cloud/certificatemanager" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -730,7 +706,6 @@ service { service { service_proto_path: "google/devtools/cloudbuild/v1/cloudbuild.proto" product_path: "google/cloud/cloudbuild/v1" - forwarding_product_path: "google/cloud/cloudbuild" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -756,19 +731,10 @@ service { service_proto_path: "google/cloud/channel/v1/service.proto" additional_proto_files: ["google/cloud/channel/v1/operations.proto"] product_path: "google/cloud/channel/v1" - forwarding_product_path: "google/cloud/channel" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } -service { - service_proto_path: "google/cloud/channel/v1/reports_service.proto" - additional_proto_files: ["google/cloud/channel/v1/operations.proto"] - product_path: "google/cloud/channel/v1" - initial_copyright_year: "2023" - retryable_status_codes: ["kUnavailable"] -} - # Cloud Controls Partner service { service_proto_path: "google/cloud/cloudcontrolspartner/v1/core.proto" @@ -812,7 +778,6 @@ service { service_proto_path: "google/cloud/orchestration/airflow/service/v1/environments.proto" additional_proto_files: ["google/cloud/orchestration/airflow/service/v1/operations.proto"] product_path: "google/cloud/composer/v1" - forwarding_product_path: "google/cloud/composer" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -820,7 +785,6 @@ service { service { service_proto_path: "google/cloud/orchestration/airflow/service/v1/image_versions.proto" product_path: "google/cloud/composer/v1" - forwarding_product_path: "google/cloud/composer" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -1806,7 +1770,6 @@ service { service { service_proto_path: "google/cloud/connectors/v1/connectors_service.proto" product_path: "google/cloud/connectors/v1" - forwarding_product_path: "google/cloud/connectors" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -1815,7 +1778,6 @@ service { service { service_proto_path: "google/cloud/contactcenterinsights/v1/contact_center_insights.proto" product_path: "google/cloud/contactcenterinsights/v1" - forwarding_product_path: "google/cloud/contactcenterinsights" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -1824,7 +1786,6 @@ service { service { service_proto_path: "google/container/v1/cluster_service.proto" product_path: "google/cloud/container/v1" - forwarding_product_path: "google/cloud/container" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] omitted_rpcs: [ @@ -1859,7 +1820,6 @@ service { service_proto_path: "google/devtools/containeranalysis/v1/containeranalysis.proto" additional_proto_files: ["grafeas/v1/grafeas.proto"] product_path: "google/cloud/containeranalysis/v1" - forwarding_product_path: "google/cloud/containeranalysis" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -1919,7 +1879,6 @@ service { service { service_proto_path: "google/cloud/datacatalog/v1/datacatalog.proto" product_path: "google/cloud/datacatalog/v1" - forwarding_product_path: "google/cloud/datacatalog" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -1927,7 +1886,6 @@ service { service { service_proto_path: "google/cloud/datacatalog/v1/policytagmanager.proto" product_path: "google/cloud/datacatalog/v1" - forwarding_product_path: "google/cloud/datacatalog" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -1935,7 +1893,6 @@ service { service { service_proto_path: "google/cloud/datacatalog/v1/policytagmanagerserialization.proto" product_path: "google/cloud/datacatalog/v1" - forwarding_product_path: "google/cloud/datacatalog" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -1951,7 +1908,6 @@ service { service { service_proto_path: "google/cloud/clouddms/v1/clouddms.proto" product_path: "google/cloud/datamigration/v1" - forwarding_product_path: "google/cloud/datamigration" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -1975,7 +1931,6 @@ service { service { service_proto_path: "google/cloud/dataplex/v1/content.proto" product_path: "google/cloud/dataplex/v1" - forwarding_product_path: "google/cloud/dataplex" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -1997,7 +1952,6 @@ service { service { service_proto_path: "google/cloud/dataplex/v1/metadata.proto" product_path: "google/cloud/dataplex/v1" - forwarding_product_path: "google/cloud/dataplex" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -2005,7 +1959,6 @@ service { service { service_proto_path: "google/cloud/dataplex/v1/service.proto" product_path: "google/cloud/dataplex/v1" - forwarding_product_path: "google/cloud/dataplex" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -2014,7 +1967,6 @@ service { service { service_proto_path: "google/cloud/dataproc/v1/autoscaling_policies.proto" product_path: "google/cloud/dataproc/v1" - forwarding_product_path: "google/cloud/dataproc" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] endpoint_location_style: LOCATION_DEPENDENT_COMPAT @@ -2024,7 +1976,6 @@ service { service_proto_path: "google/cloud/dataproc/v1/batches.proto" additional_proto_files: ["google/cloud/dataproc/v1/operations.proto"] product_path: "google/cloud/dataproc/v1" - forwarding_product_path: "google/cloud/dataproc" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] endpoint_location_style: LOCATION_DEPENDENT_COMPAT @@ -2034,7 +1985,6 @@ service { service_proto_path: "google/cloud/dataproc/v1/clusters.proto" additional_proto_files: ["google/cloud/dataproc/v1/operations.proto"] product_path: "google/cloud/dataproc/v1" - forwarding_product_path: "google/cloud/dataproc" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] endpoint_location_style: LOCATION_DEPENDENT_COMPAT @@ -2043,7 +1993,6 @@ service { service { service_proto_path: "google/cloud/dataproc/v1/jobs.proto" product_path: "google/cloud/dataproc/v1" - forwarding_product_path: "google/cloud/dataproc" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] endpoint_location_style: LOCATION_DEPENDENT_COMPAT @@ -2078,7 +2027,6 @@ service { service { service_proto_path: "google/cloud/dataproc/v1/workflow_templates.proto" product_path: "google/cloud/dataproc/v1" - forwarding_product_path: "google/cloud/dataproc" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] endpoint_location_style: LOCATION_DEPENDENT_COMPAT @@ -2088,7 +2036,6 @@ service { service { service_proto_path: "google/privacy/dlp/v2/dlp.proto" product_path: "google/cloud/dlp/v2" - forwarding_product_path: "google/cloud/dlp" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -2114,7 +2061,6 @@ service { service { service_proto_path: "google/cloud/datastream/v1/datastream.proto" product_path: "google/cloud/datastream/v1" - forwarding_product_path: "google/cloud/datastream" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -2123,7 +2069,6 @@ service { service { service_proto_path: "google/cloud/deploy/v1/cloud_deploy.proto" product_path: "google/cloud/deploy/v1" - forwarding_product_path: "google/cloud/deploy" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -2548,7 +2493,6 @@ service { service { service_proto_path: "google/cloud/documentai/v1/document_processor_service.proto" product_path: "google/cloud/documentai/v1" - forwarding_product_path: "google/cloud/documentai" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] endpoint_location_style: LOCATION_DEPENDENT_COMPAT @@ -2566,7 +2510,6 @@ service { service { service_proto_path: "google/cloud/edgecontainer/v1/service.proto" product_path: "google/cloud/edgecontainer/v1" - forwarding_product_path: "google/cloud/edgecontainer" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -2591,7 +2534,6 @@ service { service { service_proto_path: "google/cloud/eventarc/v1/eventarc.proto" product_path: "google/cloud/eventarc/v1" - forwarding_product_path: "google/cloud/eventarc" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable", "kUnknown"] } @@ -2599,7 +2541,6 @@ service { service { service_proto_path: "google/cloud/eventarc/publishing/v1/publisher.proto" product_path: "google/cloud/eventarc/publishing/v1" - forwarding_product_path: "google/cloud/eventarc" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -2608,7 +2549,6 @@ service { service { service_proto_path: "google/cloud/filestore/v1/cloud_filestore_service.proto" product_path: "google/cloud/filestore/v1" - forwarding_product_path: "google/cloud/filestore" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -2625,7 +2565,6 @@ service { service_proto_path: "google/cloud/functions/v1/functions.proto" additional_proto_files: ["google/cloud/functions/v1/operations.proto"] product_path: "google/cloud/functions/v1" - forwarding_product_path: "google/cloud/functions" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -2649,7 +2588,6 @@ service { service { service_proto_path: "google/cloud/gkehub/v1/service.proto" product_path: "google/cloud/gkehub/v1" - forwarding_product_path: "google/cloud/gkehub" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -2701,9 +2639,7 @@ service { service { service_proto_path: "google/iam/credentials/v1/iamcredentials.proto" product_path: "google/cloud/iam/credentials/v1" - forwarding_product_path: "google/cloud/iam" initial_copyright_year: "2020" - backwards_compatibility_namespace_alias: true retryable_status_codes: ["kUnavailable"] idempotency_overrides: [ {rpc_name: "IAMCredentials.GenerateAccessToken", idempotency: IDEMPOTENT}, @@ -2716,10 +2652,8 @@ service { service { service_proto_path: "google/iam/admin/v1/iam.proto" product_path: "google/cloud/iam/admin/v1" - forwarding_product_path: "google/cloud/iam" initial_copyright_year: "2021" omitted_rpcs: ["SignBlob", "SignJwt", "UpdateServiceAccount"] - backwards_compatibility_namespace_alias: true retryable_status_codes: ["kUnavailable"] omitted_rpcs: [ "SignBlob(std::string const&, std::string const&)", @@ -2737,7 +2671,6 @@ service { service { service_proto_path: "google/iam/v1/iam_policy.proto" product_path: "google/cloud/iam/v1" - forwarding_product_path: "google/cloud/iam" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -2767,7 +2700,6 @@ service { service { service_proto_path: "google/cloud/iap/v1/service.proto" product_path: "google/cloud/iap/v1" - forwarding_product_path: "google/cloud/iap" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -2784,7 +2716,6 @@ service { service { service_proto_path: "google/cloud/policytroubleshooter/v1/checker.proto" product_path: "google/cloud/policytroubleshooter/v1" - forwarding_product_path: "google/cloud/policytroubleshooter" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -2800,7 +2731,6 @@ service { service { service_proto_path: "google/cloud/ids/v1/ids.proto" product_path: "google/cloud/ids/v1" - forwarding_product_path: "google/cloud/ids" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -2823,7 +2753,6 @@ service { service { service_proto_path: "google/cloud/kms/v1/service.proto" product_path: "google/cloud/kms/v1" - forwarding_product_path: "google/cloud/kms" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -2831,7 +2760,6 @@ service { service { service_proto_path: "google/cloud/kms/v1/ekm_service.proto" product_path: "google/cloud/kms/v1" - forwarding_product_path: "google/cloud/kms" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -2854,7 +2782,6 @@ service { service { service_proto_path: "google/cloud/language/v1/language_service.proto" product_path: "google/cloud/language/v1" - forwarding_product_path: "google/cloud/language" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -2878,7 +2805,6 @@ service { service { service_proto_path: "google/logging/v2/logging.proto" product_path: "google/cloud/logging/v2" - forwarding_product_path: "google/cloud/logging" initial_copyright_year: "2021" gen_async_rpcs: ["WriteLogEntries"] retryable_status_codes: ["kInternal", "kUnavailable"] @@ -2920,7 +2846,6 @@ service { service { service_proto_path: "google/cloud/managedidentities/v1/managed_identities_service.proto" product_path: "google/cloud/managedidentities/v1" - forwarding_product_path: "google/cloud/managedidentities" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -2945,7 +2870,6 @@ service { service { service_proto_path: "google/cloud/memcache/v1/cloud_memcache.proto" product_path: "google/cloud/memcache/v1" - forwarding_product_path: "google/cloud/memcache" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -2985,7 +2909,6 @@ service { service { service_proto_path: "google/monitoring/v3/alert_service.proto" product_path: "google/cloud/monitoring/v3" - forwarding_product_path: "google/cloud/monitoring" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -2993,7 +2916,6 @@ service { service { service_proto_path: "google/monitoring/v3/group_service.proto" product_path: "google/cloud/monitoring/v3" - forwarding_product_path: "google/cloud/monitoring" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -3001,7 +2923,6 @@ service { service { service_proto_path: "google/monitoring/v3/metric_service.proto" product_path: "google/cloud/monitoring/v3" - forwarding_product_path: "google/cloud/monitoring" initial_copyright_year: "2022" gen_async_rpcs: ["CreateTimeSeries"] retryable_status_codes: ["kUnavailable"] @@ -3010,7 +2931,6 @@ service { service { service_proto_path: "google/monitoring/v3/notification_service.proto" product_path: "google/cloud/monitoring/v3" - forwarding_product_path: "google/cloud/monitoring" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -3018,7 +2938,6 @@ service { service { service_proto_path: "google/monitoring/v3/query_service.proto" product_path: "google/cloud/monitoring/v3" - forwarding_product_path: "google/cloud/monitoring" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -3026,7 +2945,6 @@ service { service { service_proto_path: "google/monitoring/v3/service_service.proto" product_path: "google/cloud/monitoring/v3" - forwarding_product_path: "google/cloud/monitoring" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -3041,7 +2959,6 @@ service { service { service_proto_path: "google/monitoring/v3/uptime_service.proto" product_path: "google/cloud/monitoring/v3" - forwarding_product_path: "google/cloud/monitoring" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -3049,7 +2966,6 @@ service { service { service_proto_path: "google/monitoring/dashboard/v1/dashboards_service.proto" product_path: "google/cloud/monitoring/dashboard/v1" - forwarding_product_path: "google/cloud/monitoring" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -3057,7 +2973,6 @@ service { service { service_proto_path: "google/monitoring/metricsscope/v1/metrics_scopes.proto" product_path: "google/cloud/monitoring/metricsscope/v1" - forwarding_product_path: "google/cloud/monitoring" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -3075,7 +2990,6 @@ service { service_proto_path: "google/cloud/networkconnectivity/v1/hub.proto" additional_proto_files: ["google/cloud/networkconnectivity/v1/common.proto"] product_path: "google/cloud/networkconnectivity/v1" - forwarding_product_path: "google/cloud/networkconnectivity" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -3098,7 +3012,6 @@ service { service { service_proto_path: "google/cloud/networkmanagement/v1/reachability.proto" product_path: "google/cloud/networkmanagement/v1" - forwarding_product_path: "google/cloud/networkmanagement" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -3133,7 +3046,6 @@ service { service_proto_path: "google/cloud/notebooks/v1/managed_service.proto" additional_proto_files: ["google/cloud/notebooks/v1/service.proto"] product_path: "google/cloud/notebooks/v1" - forwarding_product_path: "google/cloud/notebooks" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -3149,7 +3061,6 @@ service { service { service_proto_path: "google/cloud/optimization/v1/fleet_routing.proto" product_path: "google/cloud/optimization/v1" - forwarding_product_path: "google/cloud/optimization" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -3166,7 +3077,6 @@ service { service { service_proto_path: "google/cloud/orgpolicy/v2/orgpolicy.proto" product_path: "google/cloud/orgpolicy/v2" - forwarding_product_path: "google/cloud/orgpolicy" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -3175,7 +3085,6 @@ service { service { service_proto_path: "google/cloud/osconfig/v1/osconfig_service.proto" product_path: "google/cloud/osconfig/v1" - forwarding_product_path: "google/cloud/osconfig" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -3190,7 +3099,6 @@ service { service { service_proto_path: "google/cloud/osconfig/agentendpoint/v1/agentendpoint.proto" product_path: "google/cloud/osconfig/agentendpoint/v1" - forwarding_product_path: "google/cloud/osconfig" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] # For this service, updating the streaming RPC is a no-op. The response has @@ -3203,7 +3111,6 @@ service { service { service_proto_path: "google/cloud/oslogin/v1/oslogin.proto" product_path: "google/cloud/oslogin/v1" - forwarding_product_path: "google/cloud/oslogin" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -3229,7 +3136,6 @@ service { service { service_proto_path: "google/devtools/cloudprofiler/v2/profiler.proto" product_path: "google/cloud/profiler/v2" - forwarding_product_path: "google/cloud/profiler" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] omitted_services: ["ExportService"] @@ -3373,7 +3279,6 @@ service { service { service_proto_path: "google/cloud/recommender/v1/recommender_service.proto" product_path: "google/cloud/recommender/v1" - forwarding_product_path: "google/cloud/recommender" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -3382,7 +3287,6 @@ service { service { service_proto_path: "google/cloud/redis/v1/cloud_redis.proto" product_path: "google/cloud/redis/v1" - forwarding_product_path: "google/cloud/redis" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -3398,7 +3302,6 @@ service { service { service_proto_path: "google/cloud/resourcemanager/v3/folders.proto" product_path: "google/cloud/resourcemanager/v3" - forwarding_product_path: "google/cloud/resourcemanager" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] endpoint_location_style: LOCATION_OPTIONALLY_DEPENDENT @@ -3407,7 +3310,6 @@ service { service { service_proto_path: "google/cloud/resourcemanager/v3/organizations.proto" product_path: "google/cloud/resourcemanager/v3" - forwarding_product_path: "google/cloud/resourcemanager" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] endpoint_location_style: LOCATION_OPTIONALLY_DEPENDENT @@ -3416,7 +3318,6 @@ service { service { service_proto_path: "google/cloud/resourcemanager/v3/projects.proto" product_path: "google/cloud/resourcemanager/v3" - forwarding_product_path: "google/cloud/resourcemanager" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] endpoint_location_style: LOCATION_OPTIONALLY_DEPENDENT @@ -3465,7 +3366,6 @@ service { service { service_proto_path: "google/cloud/retail/v2/catalog_service.proto" product_path: "google/cloud/retail/v2" - forwarding_product_path: "google/cloud/retail" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -3473,7 +3373,6 @@ service { service { service_proto_path: "google/cloud/retail/v2/completion_service.proto" product_path: "google/cloud/retail/v2" - forwarding_product_path: "google/cloud/retail" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -3495,7 +3394,6 @@ service { service { service_proto_path: "google/cloud/retail/v2/prediction_service.proto" product_path: "google/cloud/retail/v2" - forwarding_product_path: "google/cloud/retail" initial_copyright_year: "2022" service_endpoint_env_var: "GOOGLE_CLOUD_CPP_RETAIL_PREDICTION_SERVICE_ENDPOINT" retryable_status_codes: ["kUnavailable"] @@ -3504,7 +3402,6 @@ service { service { service_proto_path: "google/cloud/retail/v2/product_service.proto" product_path: "google/cloud/retail/v2" - forwarding_product_path: "google/cloud/retail" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -3512,7 +3409,6 @@ service { service { service_proto_path: "google/cloud/retail/v2/search_service.proto" product_path: "google/cloud/retail/v2" - forwarding_product_path: "google/cloud/retail" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -3527,7 +3423,6 @@ service { service { service_proto_path: "google/cloud/retail/v2/user_event_service.proto" product_path: "google/cloud/retail/v2" - forwarding_product_path: "google/cloud/retail" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -3544,7 +3439,6 @@ service { service { service_proto_path: "google/cloud/run/v2/revision.proto" product_path: "google/cloud/run/v2" - forwarding_product_path: "google/cloud/run" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -3552,7 +3446,6 @@ service { service { service_proto_path: "google/cloud/run/v2/service.proto" product_path: "google/cloud/run/v2" - forwarding_product_path: "google/cloud/run" initial_copyright_year: "2022" service_endpoint_env_var: "GOOGLE_CLOUD_CPP_RUN_SERVICES_ENDPOINT" retryable_status_codes: ["kUnavailable"] @@ -3569,7 +3462,6 @@ service { service { service_proto_path: "google/cloud/scheduler/v1/cloudscheduler.proto" product_path: "google/cloud/scheduler/v1" - forwarding_product_path: "google/cloud/scheduler" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -3578,7 +3470,6 @@ service { service { service_proto_path: "google/cloud/secretmanager/v1/service.proto" product_path: "google/cloud/secretmanager/v1" - forwarding_product_path: "google/cloud/secretmanager" initial_copyright_year: "2021" retryable_status_codes: ["kUnavailable"] } @@ -3595,7 +3486,6 @@ service { service { service_proto_path: "google/cloud/securitycenter/v1/securitycenter_service.proto" product_path: "google/cloud/securitycenter/v1" - forwarding_product_path: "google/cloud/securitycenter" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -3619,7 +3509,6 @@ service { service { service_proto_path: "google/api/servicecontrol/v1/quota_controller.proto" product_path: "google/cloud/servicecontrol/v1" - forwarding_product_path: "google/cloud/servicecontrol" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -3627,7 +3516,6 @@ service { service { service_proto_path: "google/api/servicecontrol/v1/service_controller.proto" product_path: "google/cloud/servicecontrol/v1" - forwarding_product_path: "google/cloud/servicecontrol" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -3643,7 +3531,6 @@ service { service { service_proto_path: "google/cloud/servicedirectory/v1/lookup_service.proto" product_path: "google/cloud/servicedirectory/v1" - forwarding_product_path: "google/cloud/servicedirectory" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable", "kUnknown"] } @@ -3651,7 +3538,6 @@ service { service { service_proto_path: "google/cloud/servicedirectory/v1/registration_service.proto" product_path: "google/cloud/servicedirectory/v1" - forwarding_product_path: "google/cloud/servicedirectory" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable", "kUnknown"] } @@ -3668,7 +3554,6 @@ service { service { service_proto_path: "google/api/servicemanagement/v1/servicemanager.proto" product_path: "google/cloud/servicemanagement/v1" - forwarding_product_path: "google/cloud/servicemanagement" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] omitted_rpcs: [ @@ -3680,7 +3565,6 @@ service { service { service_proto_path: "google/api/serviceusage/v1/serviceusage.proto" product_path: "google/cloud/serviceusage/v1" - forwarding_product_path: "google/cloud/serviceusage" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -3689,7 +3573,6 @@ service { service { service_proto_path: "google/cloud/shell/v1/cloudshell.proto" product_path: "google/cloud/shell/v1" - forwarding_product_path: "google/cloud/shell" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable", "kUnknown"] } @@ -3722,7 +3605,6 @@ service { initial_copyright_year: "2021" service_endpoint_env_var: "GOOGLE_CLOUD_CPP_SPANNER_DEFAULT_ENDPOINT" emulator_endpoint_env_var: "SPANNER_EMULATOR_HOST" - backwards_compatibility_namespace_alias: true retryable_status_codes: ["kUnavailable"] generate_rest_transport: true omit_repo_metadata: true @@ -3735,7 +3617,6 @@ service { initial_copyright_year: "2021" service_endpoint_env_var: "GOOGLE_CLOUD_CPP_SPANNER_DEFAULT_ENDPOINT" emulator_endpoint_env_var: "SPANNER_EMULATOR_HOST" - backwards_compatibility_namespace_alias: true retryable_status_codes: ["kUnavailable"] generate_rest_transport: true omit_repo_metadata: true @@ -3745,7 +3626,6 @@ service { service { service_proto_path: "google/cloud/speech/v1/cloud_speech.proto" product_path: "google/cloud/speech/v1" - forwarding_product_path: "google/cloud/speech" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -4000,7 +3880,6 @@ service { service { service_proto_path: "google/storagetransfer/v1/transfer.proto" product_path: "google/cloud/storagetransfer/v1" - forwarding_product_path: "google/cloud/storagetransfer" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -4009,7 +3888,6 @@ service { service { service_proto_path: "google/cloud/talent/v4/company_service.proto" product_path: "google/cloud/talent/v4" - forwarding_product_path: "google/cloud/talent" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -4017,7 +3895,6 @@ service { service { service_proto_path: "google/cloud/talent/v4/completion_service.proto" product_path: "google/cloud/talent/v4" - forwarding_product_path: "google/cloud/talent" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -4025,7 +3902,6 @@ service { service { service_proto_path: "google/cloud/talent/v4/event_service.proto" product_path: "google/cloud/talent/v4" - forwarding_product_path: "google/cloud/talent" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -4033,7 +3909,6 @@ service { service { service_proto_path: "google/cloud/talent/v4/job_service.proto" product_path: "google/cloud/talent/v4" - forwarding_product_path: "google/cloud/talent" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -4041,7 +3916,6 @@ service { service { service_proto_path: "google/cloud/talent/v4/tenant_service.proto" product_path: "google/cloud/talent/v4" - forwarding_product_path: "google/cloud/talent" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -4050,7 +3924,6 @@ service { service { service_proto_path: "google/cloud/tasks/v2/cloudtasks.proto" product_path: "google/cloud/tasks/v2" - forwarding_product_path: "google/cloud/tasks" initial_copyright_year: "2021" retryable_status_codes: ["kInternal", "kUnavailable"] } @@ -4067,7 +3940,6 @@ service { service { service_proto_path: "google/cloud/texttospeech/v1/cloud_tts.proto" product_path: "google/cloud/texttospeech/v1" - forwarding_product_path: "google/cloud/texttospeech" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -4086,7 +3958,6 @@ service { product_path: "google/cloud/tpu/v1" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] - forwarding_product_path: "google/cloud/tpu" } service { @@ -4110,7 +3981,6 @@ service { service { service_proto_path: "google/devtools/cloudtrace/v2/tracing.proto" product_path: "google/cloud/trace/v2" - forwarding_product_path: "google/cloud/trace" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -4119,7 +3989,6 @@ service { service { service_proto_path: "google/cloud/translate/v3/translation_service.proto" product_path: "google/cloud/translate/v3" - forwarding_product_path: "google/cloud/translate" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -4128,7 +3997,6 @@ service { service { service_proto_path: "google/cloud/video/livestream/v1/service.proto" product_path: "google/cloud/video/livestream/v1" - forwarding_product_path: "google/cloud/video" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -4136,7 +4004,6 @@ service { service { service_proto_path: "google/cloud/video/stitcher/v1/video_stitcher_service.proto" product_path: "google/cloud/video/stitcher/v1" - forwarding_product_path: "google/cloud/video" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -4144,7 +4011,6 @@ service { service { service_proto_path: "google/cloud/video/transcoder/v1/services.proto" product_path: "google/cloud/video/transcoder/v1" - forwarding_product_path: "google/cloud/video" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -4153,7 +4019,6 @@ service { service { service_proto_path: "google/cloud/videointelligence/v1/video_intelligence.proto" product_path: "google/cloud/videointelligence/v1" - forwarding_product_path: "google/cloud/videointelligence" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -4162,7 +4027,6 @@ service { service { service_proto_path: "google/cloud/vision/v1/image_annotator.proto" product_path: "google/cloud/vision/v1" - forwarding_product_path: "google/cloud/vision" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -4170,7 +4034,6 @@ service { service { service_proto_path: "google/cloud/vision/v1/product_search_service.proto" product_path: "google/cloud/vision/v1" - forwarding_product_path: "google/cloud/vision" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -4179,7 +4042,6 @@ service { service { service_proto_path: "google/cloud/vmmigration/v1/vmmigration.proto" product_path: "google/cloud/vmmigration/v1" - forwarding_product_path: "google/cloud/vmmigration" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -4196,7 +4058,6 @@ service { service { service_proto_path: "google/cloud/vpcaccess/v1/vpc_access.proto" product_path: "google/cloud/vpcaccess/v1" - forwarding_product_path: "google/cloud/vpcaccess" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable", "kUnknown"] } @@ -4205,7 +4066,6 @@ service { service { service_proto_path: "google/cloud/webrisk/v1/webrisk.proto" product_path: "google/cloud/webrisk/v1" - forwarding_product_path: "google/cloud/webrisk" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -4214,7 +4074,6 @@ service { service { service_proto_path: "google/cloud/websecurityscanner/v1/web_security_scanner.proto" product_path: "google/cloud/websecurityscanner/v1" - forwarding_product_path: "google/cloud/websecurityscanner" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -4223,7 +4082,6 @@ service { service { service_proto_path: "google/cloud/workflows/v1/workflows.proto" product_path: "google/cloud/workflows/v1" - forwarding_product_path: "google/cloud/workflows" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } @@ -4231,7 +4089,6 @@ service { service { service_proto_path: "google/cloud/workflows/executions/v1/executions.proto" product_path: "google/cloud/workflows/executions/v1" - forwarding_product_path: "google/cloud/workflows" initial_copyright_year: "2022" retryable_status_codes: ["kUnavailable"] } diff --git a/generator/generator_test.cc b/generator/generator_test.cc index d0400c9d29860..118b3e4f88ab1 100644 --- a/generator/generator_test.cc +++ b/generator/generator_test.cc @@ -17,9 +17,9 @@ #include "generator/testing/error_collectors.h" #include "generator/testing/fake_source_tree.h" #include "generator/testing/printer_mocks.h" +#include "google/protobuf/descriptor.pb.h" #include #include -#include #include #include diff --git a/generator/google_cloud_cpp_generator.bzl b/generator/google_cloud_cpp_generator.bzl index 29f7a3c9dbe36..9a20c262e612e 100644 --- a/generator/google_cloud_cpp_generator.bzl +++ b/generator/google_cloud_cpp_generator.bzl @@ -35,11 +35,6 @@ google_cloud_cpp_generator_hdrs = [ "internal/doxygen.h", "internal/format_class_comments.h", "internal/format_method_comments.h", - "internal/forwarding_client_generator.h", - "internal/forwarding_connection_generator.h", - "internal/forwarding_idempotency_policy_generator.h", - "internal/forwarding_mock_connection_generator.h", - "internal/forwarding_options_generator.h", "internal/generator_interface.h", "internal/http_annotation_parser.h", "internal/http_option_utils.h", @@ -95,11 +90,6 @@ google_cloud_cpp_generator_srcs = [ "internal/doxygen.cc", "internal/format_class_comments.cc", "internal/format_method_comments.cc", - "internal/forwarding_client_generator.cc", - "internal/forwarding_connection_generator.cc", - "internal/forwarding_idempotency_policy_generator.cc", - "internal/forwarding_mock_connection_generator.cc", - "internal/forwarding_options_generator.cc", "internal/http_annotation_parser.cc", "internal/http_option_utils.cc", "internal/idempotency_policy_generator.cc", diff --git a/generator/integration_tests/BUILD.bazel b/generator/integration_tests/BUILD.bazel index 597fae36f8cf0..89d521759ee43 100644 --- a/generator/integration_tests/BUILD.bazel +++ b/generator/integration_tests/BUILD.bazel @@ -12,12 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -load( - "@com_google_googleapis_imports//:imports.bzl", - "cc_grpc_library", - "cc_proto_library", -) -load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_protobuf//bazel:cc_proto_library.bzl", "cc_proto_library") +load("@com_google_protobuf//bazel:proto_library.bzl", "proto_library") +load("@grpc//bazel:cc_grpc_library.bzl", "cc_grpc_library") package(default_visibility = ["//visibility:private"]) @@ -34,22 +31,22 @@ proto_library( "test_request_id.proto", ], deps = [ - "@com_google_googleapis//google/api:annotations_proto", - "@com_google_googleapis//google/api:client_proto", - "@com_google_googleapis//google/api:field_behavior_proto", - "@com_google_googleapis//google/api:field_info_proto", - "@com_google_googleapis//google/api:resource_proto", - "@com_google_googleapis//google/api:routing_proto", - "@com_google_googleapis//google/iam/v1:iam_policy_proto", - "@com_google_googleapis//google/iam/v1:policy_proto", - "@com_google_googleapis//google/longrunning:operations_proto", - "@com_google_googleapis//google/rpc:status_proto", "@com_google_protobuf//:any_proto", "@com_google_protobuf//:duration_proto", "@com_google_protobuf//:empty_proto", "@com_google_protobuf//:field_mask_proto", "@com_google_protobuf//:struct_proto", "@com_google_protobuf//:timestamp_proto", + "@googleapis//google/api:annotations_proto", + "@googleapis//google/api:client_proto", + "@googleapis//google/api:field_behavior_proto", + "@googleapis//google/api:field_info_proto", + "@googleapis//google/api:resource_proto", + "@googleapis//google/api:routing_proto", + "@googleapis//google/iam/v1:iam_policy_proto", + "@googleapis//google/iam/v1:policy_proto", + "@googleapis//google/longrunning:operations_proto", + "@googleapis//google/rpc:status_proto", ], ) @@ -67,18 +64,19 @@ cc_grpc_library( filegroup( name = "golden_srcs", - srcs = glob([ - "golden/v1/internal/*_sources.cc", - "golden/v1/internal/streaming.cc", - ]), + srcs = glob( + [ + "golden/v1/internal/*_sources.cc", + "golden/v1/internal/streaming.cc", + ], + allow_empty = True, + ), ) filegroup( name = "golden_hdrs", srcs = glob( include = [ - "golden/*.h", - "golden/mocks/*.h", "golden/v1/*.cc", "golden/v1/*.h", "golden/v1/internal/*.cc", @@ -106,8 +104,8 @@ cc_library( "//:grpc_utils", "//google/cloud:google_cloud_cpp_rest_internal", "//google/cloud:google_cloud_cpp_rest_protobuf_internal", - "@com_google_absl//absl/strings", - "@com_google_googleapis//google/longrunning:longrunning_cc_grpc", + "@abseil-cpp//absl/strings", + "@googleapis//google/longrunning:longrunning_cc_grpc", ], ) @@ -132,7 +130,7 @@ filegroup( "//google/cloud/testing_util:google_cloud_cpp_testing_grpc_private", "//google/cloud/testing_util:google_cloud_cpp_testing_private", "//google/cloud/testing_util:google_cloud_cpp_testing_rest_private", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) for test in glob(["tests/*.cc"])] diff --git a/generator/integration_tests/CMakeLists.txt b/generator/integration_tests/CMakeLists.txt index 11169e24a3435..fb3fdd6ee7ec4 100644 --- a/generator/integration_tests/CMakeLists.txt +++ b/generator/integration_tests/CMakeLists.txt @@ -54,13 +54,8 @@ set_target_properties(google_cloud_cpp_generator_golden_protos file( GLOB google_cloud_cpp_generator_golden_files RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" - "golden/*.h" - "golden/mocks/*.h" - "golden/v1/*.h" - "golden/v1/internal/*.h" - "golden/v1/internal/*_sources.cc" - "golden/v1/internal/streaming.cc" - "golden/v1/mocks/*.h") + "golden/v1/*.h" "golden/v1/internal/*.h" "golden/v1/internal/*_sources.cc" + "golden/v1/internal/streaming.cc" "golden/v1/mocks/*.h") list(SORT google_cloud_cpp_generator_golden_files) # Create a library from the where the golden code was copied to. diff --git a/generator/integration_tests/benchmarks/client_benchmark.cc b/generator/integration_tests/benchmarks/client_benchmark.cc index 44ae46eba7e57..d73959e361212 100644 --- a/generator/integration_tests/benchmarks/client_benchmark.cc +++ b/generator/integration_tests/benchmarks/client_benchmark.cc @@ -19,14 +19,14 @@ #include "generator/integration_tests/golden/v1/internal/golden_kitchen_sink_metadata_decorator.h" #include "generator/integration_tests/golden/v1/internal/golden_kitchen_sink_option_defaults.h" #include "generator/integration_tests/golden/v1/internal/golden_kitchen_sink_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/log.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/generator/integration_tests/golden/golden_kitchen_sink_client.h b/generator/integration_tests/golden/golden_kitchen_sink_client.h deleted file mode 100644 index d56d725dd1ef2..0000000000000 --- a/generator/integration_tests/golden/golden_kitchen_sink_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: generator/integration_tests/test.proto - -#ifndef GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_GOLDEN_KITCHEN_SINK_CLIENT_H -#define GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_GOLDEN_KITCHEN_SINK_CLIENT_H - -#include "generator/integration_tests/golden/golden_kitchen_sink_connection.h" -#include "generator/integration_tests/golden/v1/golden_kitchen_sink_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in golden_v1 instead of the aliases defined in -/// this namespace. -namespace golden { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use golden_v1::GoldenKitchenSinkClient directly. -using ::google::cloud::golden_v1::GoldenKitchenSinkClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace golden -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_GOLDEN_KITCHEN_SINK_CLIENT_H diff --git a/generator/integration_tests/golden/golden_kitchen_sink_connection.h b/generator/integration_tests/golden/golden_kitchen_sink_connection.h deleted file mode 100644 index fadd800f282a5..0000000000000 --- a/generator/integration_tests/golden/golden_kitchen_sink_connection.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: generator/integration_tests/test.proto - -#ifndef GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_GOLDEN_KITCHEN_SINK_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_GOLDEN_KITCHEN_SINK_CONNECTION_H - -#include "generator/integration_tests/golden/golden_kitchen_sink_connection_idempotency_policy.h" -#include "generator/integration_tests/golden/v1/golden_kitchen_sink_connection.h" - -namespace google { -namespace cloud { -namespace golden { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use golden_v1::MakeGoldenKitchenSinkConnection directly. -using ::google::cloud::golden_v1::MakeGoldenKitchenSinkConnection; - -/// @deprecated Use golden_v1::GoldenKitchenSinkConnection directly. -using ::google::cloud::golden_v1::GoldenKitchenSinkConnection; - -/// @deprecated Use golden_v1::GoldenKitchenSinkLimitedErrorCountRetryPolicy directly. -using ::google::cloud::golden_v1::GoldenKitchenSinkLimitedErrorCountRetryPolicy; - -/// @deprecated Use golden_v1::GoldenKitchenSinkLimitedTimeRetryPolicy directly. -using ::google::cloud::golden_v1::GoldenKitchenSinkLimitedTimeRetryPolicy; - -/// @deprecated Use golden_v1::GoldenKitchenSinkRetryPolicy directly. -using ::google::cloud::golden_v1::GoldenKitchenSinkRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace golden -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_GOLDEN_KITCHEN_SINK_CONNECTION_H diff --git a/generator/integration_tests/golden/golden_kitchen_sink_connection_idempotency_policy.h b/generator/integration_tests/golden/golden_kitchen_sink_connection_idempotency_policy.h deleted file mode 100644 index 9917eabc4d73e..0000000000000 --- a/generator/integration_tests/golden/golden_kitchen_sink_connection_idempotency_policy.h +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: generator/integration_tests/test.proto - -#ifndef GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_GOLDEN_KITCHEN_SINK_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_GOLDEN_KITCHEN_SINK_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "generator/integration_tests/golden/v1/golden_kitchen_sink_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace golden { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use golden_v1::MakeDefaultGoldenKitchenSinkConnectionIdempotencyPolicy directly. -using ::google::cloud::golden_v1::MakeDefaultGoldenKitchenSinkConnectionIdempotencyPolicy; - -/// @deprecated Use golden_v1::GoldenKitchenSinkConnectionIdempotencyPolicy directly. -using ::google::cloud::golden_v1::GoldenKitchenSinkConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace golden -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_GOLDEN_KITCHEN_SINK_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/generator/integration_tests/golden/golden_kitchen_sink_options.h b/generator/integration_tests/golden/golden_kitchen_sink_options.h deleted file mode 100644 index d341c6a472e8e..0000000000000 --- a/generator/integration_tests/golden/golden_kitchen_sink_options.h +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: generator/integration_tests/test.proto - -#ifndef GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_GOLDEN_KITCHEN_SINK_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_GOLDEN_KITCHEN_SINK_OPTIONS_H - -#include "generator/integration_tests/golden/golden_kitchen_sink_connection.h" -#include "generator/integration_tests/golden/golden_kitchen_sink_connection_idempotency_policy.h" -#include "generator/integration_tests/golden/v1/golden_kitchen_sink_options.h" - -namespace google { -namespace cloud { -namespace golden { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use golden_v1::GoldenKitchenSinkBackoffPolicyOption directly. -using ::google::cloud::golden_v1::GoldenKitchenSinkBackoffPolicyOption; - -/// @deprecated Use golden_v1::GoldenKitchenSinkConnectionIdempotencyPolicyOption directly. -using ::google::cloud::golden_v1::GoldenKitchenSinkConnectionIdempotencyPolicyOption; - -/// @deprecated Use golden_v1::GoldenKitchenSinkPolicyOptionList directly. -using ::google::cloud::golden_v1::GoldenKitchenSinkPolicyOptionList; - -/// @deprecated Use golden_v1::GoldenKitchenSinkRetryPolicyOption directly. -using ::google::cloud::golden_v1::GoldenKitchenSinkRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace golden -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_GOLDEN_KITCHEN_SINK_OPTIONS_H diff --git a/generator/integration_tests/golden/golden_thing_admin_client.h b/generator/integration_tests/golden/golden_thing_admin_client.h deleted file mode 100644 index f6a025d2c33a8..0000000000000 --- a/generator/integration_tests/golden/golden_thing_admin_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: generator/integration_tests/test.proto - -#ifndef GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_GOLDEN_THING_ADMIN_CLIENT_H -#define GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_GOLDEN_THING_ADMIN_CLIENT_H - -#include "generator/integration_tests/golden/golden_thing_admin_connection.h" -#include "generator/integration_tests/golden/v1/golden_thing_admin_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in golden_v1 instead of the aliases defined in -/// this namespace. -namespace golden { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use golden_v1::GoldenThingAdminClient directly. -using ::google::cloud::golden_v1::GoldenThingAdminClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace golden -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_GOLDEN_THING_ADMIN_CLIENT_H diff --git a/generator/integration_tests/golden/golden_thing_admin_connection.h b/generator/integration_tests/golden/golden_thing_admin_connection.h deleted file mode 100644 index 1983cc96c8f34..0000000000000 --- a/generator/integration_tests/golden/golden_thing_admin_connection.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: generator/integration_tests/test.proto - -#ifndef GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_GOLDEN_THING_ADMIN_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_GOLDEN_THING_ADMIN_CONNECTION_H - -#include "generator/integration_tests/golden/golden_thing_admin_connection_idempotency_policy.h" -#include "generator/integration_tests/golden/v1/golden_thing_admin_connection.h" - -namespace google { -namespace cloud { -namespace golden { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use golden_v1::MakeGoldenThingAdminConnection directly. -using ::google::cloud::golden_v1::MakeGoldenThingAdminConnection; - -/// @deprecated Use golden_v1::GoldenThingAdminConnection directly. -using ::google::cloud::golden_v1::GoldenThingAdminConnection; - -/// @deprecated Use golden_v1::GoldenThingAdminLimitedErrorCountRetryPolicy directly. -using ::google::cloud::golden_v1::GoldenThingAdminLimitedErrorCountRetryPolicy; - -/// @deprecated Use golden_v1::GoldenThingAdminLimitedTimeRetryPolicy directly. -using ::google::cloud::golden_v1::GoldenThingAdminLimitedTimeRetryPolicy; - -/// @deprecated Use golden_v1::GoldenThingAdminRetryPolicy directly. -using ::google::cloud::golden_v1::GoldenThingAdminRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace golden -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_GOLDEN_THING_ADMIN_CONNECTION_H diff --git a/generator/integration_tests/golden/golden_thing_admin_connection_idempotency_policy.h b/generator/integration_tests/golden/golden_thing_admin_connection_idempotency_policy.h deleted file mode 100644 index af07244991e57..0000000000000 --- a/generator/integration_tests/golden/golden_thing_admin_connection_idempotency_policy.h +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: generator/integration_tests/test.proto - -#ifndef GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_GOLDEN_THING_ADMIN_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_GOLDEN_THING_ADMIN_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "generator/integration_tests/golden/v1/golden_thing_admin_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace golden { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use golden_v1::MakeDefaultGoldenThingAdminConnectionIdempotencyPolicy directly. -using ::google::cloud::golden_v1::MakeDefaultGoldenThingAdminConnectionIdempotencyPolicy; - -/// @deprecated Use golden_v1::GoldenThingAdminConnectionIdempotencyPolicy directly. -using ::google::cloud::golden_v1::GoldenThingAdminConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace golden -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_GOLDEN_THING_ADMIN_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/generator/integration_tests/golden/golden_thing_admin_options.h b/generator/integration_tests/golden/golden_thing_admin_options.h deleted file mode 100644 index ae75afd9faff1..0000000000000 --- a/generator/integration_tests/golden/golden_thing_admin_options.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: generator/integration_tests/test.proto - -#ifndef GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_GOLDEN_THING_ADMIN_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_GOLDEN_THING_ADMIN_OPTIONS_H - -#include "generator/integration_tests/golden/golden_thing_admin_connection.h" -#include "generator/integration_tests/golden/golden_thing_admin_connection_idempotency_policy.h" -#include "generator/integration_tests/golden/v1/golden_thing_admin_options.h" - -namespace google { -namespace cloud { -namespace golden { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use golden_v1::GoldenThingAdminPollingPolicyOption directly. -using ::google::cloud::golden_v1::GoldenThingAdminPollingPolicyOption; - -/// @deprecated Use golden_v1::GoldenThingAdminBackoffPolicyOption directly. -using ::google::cloud::golden_v1::GoldenThingAdminBackoffPolicyOption; - -/// @deprecated Use golden_v1::GoldenThingAdminConnectionIdempotencyPolicyOption directly. -using ::google::cloud::golden_v1::GoldenThingAdminConnectionIdempotencyPolicyOption; - -/// @deprecated Use golden_v1::GoldenThingAdminPolicyOptionList directly. -using ::google::cloud::golden_v1::GoldenThingAdminPolicyOptionList; - -/// @deprecated Use golden_v1::GoldenThingAdminRetryPolicyOption directly. -using ::google::cloud::golden_v1::GoldenThingAdminRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace golden -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_GOLDEN_THING_ADMIN_OPTIONS_H diff --git a/generator/integration_tests/golden/mocks/mock_golden_kitchen_sink_connection.h b/generator/integration_tests/golden/mocks/mock_golden_kitchen_sink_connection.h deleted file mode 100644 index cdc30e3cc27c5..0000000000000 --- a/generator/integration_tests/golden/mocks/mock_golden_kitchen_sink_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: generator/integration_tests/test.proto - -#ifndef GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_MOCKS_MOCK_GOLDEN_KITCHEN_SINK_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_MOCKS_MOCK_GOLDEN_KITCHEN_SINK_CONNECTION_H - -#include "generator/integration_tests/golden/golden_kitchen_sink_connection.h" -#include "generator/integration_tests/golden/v1/mocks/mock_golden_kitchen_sink_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in golden_v1_mocks instead of the aliases -/// defined in this namespace. -namespace golden_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use golden_v1_mocks::MockGoldenKitchenSinkConnection directly. -using ::google::cloud::golden_v1_mocks::MockGoldenKitchenSinkConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace golden_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_MOCKS_MOCK_GOLDEN_KITCHEN_SINK_CONNECTION_H diff --git a/generator/integration_tests/golden/mocks/mock_golden_thing_admin_connection.h b/generator/integration_tests/golden/mocks/mock_golden_thing_admin_connection.h deleted file mode 100644 index 225acf2a20e79..0000000000000 --- a/generator/integration_tests/golden/mocks/mock_golden_thing_admin_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: generator/integration_tests/test.proto - -#ifndef GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_MOCKS_MOCK_GOLDEN_THING_ADMIN_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_MOCKS_MOCK_GOLDEN_THING_ADMIN_CONNECTION_H - -#include "generator/integration_tests/golden/golden_thing_admin_connection.h" -#include "generator/integration_tests/golden/v1/mocks/mock_golden_thing_admin_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in golden_v1_mocks instead of the aliases -/// defined in this namespace. -namespace golden_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use golden_v1_mocks::MockGoldenThingAdminConnection directly. -using ::google::cloud::golden_v1_mocks::MockGoldenThingAdminConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace golden_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_MOCKS_MOCK_GOLDEN_THING_ADMIN_CONNECTION_H diff --git a/generator/integration_tests/golden/v1/deprecated_connection.h b/generator/integration_tests/golden/v1/deprecated_connection.h index f4727a71ea2d9..2e25bcaa34df5 100644 --- a/generator/integration_tests/golden/v1/deprecated_connection.h +++ b/generator/integration_tests/golden/v1/deprecated_connection.h @@ -26,7 +26,7 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "generator/integration_tests/test_deprecated.pb.h" #include namespace google { diff --git a/generator/integration_tests/golden/v1/deprecated_connection_idempotency_policy.h b/generator/integration_tests/golden/v1/deprecated_connection_idempotency_policy.h index 1c4e23e7e3a60..c29fb07e877c4 100644 --- a/generator/integration_tests/golden/v1/deprecated_connection_idempotency_policy.h +++ b/generator/integration_tests/golden/v1/deprecated_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "generator/integration_tests/test_deprecated.grpc.pb.h" #include namespace google { diff --git a/generator/integration_tests/golden/v1/golden_kitchen_sink_client.h b/generator/integration_tests/golden/v1/golden_kitchen_sink_client.h index 8976243806b6d..e6a8424fb7f41 100644 --- a/generator/integration_tests/golden/v1/golden_kitchen_sink_client.h +++ b/generator/integration_tests/golden/v1/golden_kitchen_sink_client.h @@ -25,7 +25,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/protobuf/duration.pb.h" #include #include #include diff --git a/generator/integration_tests/golden/v1/golden_kitchen_sink_connection.h b/generator/integration_tests/golden/v1/golden_kitchen_sink_connection.h index 6c7ac2a9bd245..9d130a614e51b 100644 --- a/generator/integration_tests/golden/v1/golden_kitchen_sink_connection.h +++ b/generator/integration_tests/golden/v1/golden_kitchen_sink_connection.h @@ -29,8 +29,8 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "generator/integration_tests/backup.pb.h" +#include "generator/integration_tests/test.pb.h" #include namespace google { diff --git a/generator/integration_tests/golden/v1/golden_kitchen_sink_connection_idempotency_policy.h b/generator/integration_tests/golden/v1/golden_kitchen_sink_connection_idempotency_policy.h index cfb7da3604b1f..50018df400595 100644 --- a/generator/integration_tests/golden/v1/golden_kitchen_sink_connection_idempotency_policy.h +++ b/generator/integration_tests/golden/v1/golden_kitchen_sink_connection_idempotency_policy.h @@ -21,10 +21,10 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "generator/integration_tests/test.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/generator/integration_tests/golden/v1/golden_rest_only_client.cc b/generator/integration_tests/golden/v1/golden_rest_only_client.cc index 59b55bebb84bf..321cb26e741d7 100644 --- a/generator/integration_tests/golden/v1/golden_rest_only_client.cc +++ b/generator/integration_tests/golden/v1/golden_rest_only_client.cc @@ -38,6 +38,11 @@ GoldenRestOnlyClient::Noop(google::protobuf::Empty const& request, Options opts) return connection_->Noop(request); } +StatusOr GoldenRestOnlyClient::WaitForConsistency(google::protobuf::Empty const& request, Options opts) { + internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_)); + return connection_->WaitForConsistency(request); +} + GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1 } // namespace cloud diff --git a/generator/integration_tests/golden/v1/golden_rest_only_client.h b/generator/integration_tests/golden/v1/golden_rest_only_client.h index 8da2941554009..5b299490d2335 100644 --- a/generator/integration_tests/golden/v1/golden_rest_only_client.h +++ b/generator/integration_tests/golden/v1/golden_rest_only_client.h @@ -109,6 +109,37 @@ class GoldenRestOnlyClient { Status Noop(google::protobuf::Empty const& request, Options opts = {}); + + // clang-format off + /// + /// Polls a table until it is consistent or the RetryPolicy is exhausted based + /// on a consistency token, that is, if replication has caught up based on the + /// provided conditions specified in the token and the check request. + /// + /// @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.bigtable.admin.v2.CheckConsistencyRequest]. + /// 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 the result of the RPC. The response message type + /// ([google.bigtable.admin.v2.CheckConsistencyResponse]) + /// is mapped to a C++ class using the [Protobuf mapping rules]. + /// If the request fails, the [`StatusOr`] contains the error details. + /// + /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/ + /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator + /// [`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.bigtable.admin.v2.CheckConsistencyRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_table_admin.proto#L909} + /// [google.bigtable.admin.v2.CheckConsistencyResponse]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_table_admin.proto#L948} + /// + // clang-format on +StatusOr WaitForConsistency(google::protobuf::Empty const& request, Options opts = {}); private: std::shared_ptr connection_; Options options_; diff --git a/generator/integration_tests/golden/v1/golden_rest_only_connection.cc b/generator/integration_tests/golden/v1/golden_rest_only_connection.cc index 4c88d9c0b35f9..44651b4a554e0 100644 --- a/generator/integration_tests/golden/v1/golden_rest_only_connection.cc +++ b/generator/integration_tests/golden/v1/golden_rest_only_connection.cc @@ -41,6 +41,11 @@ GoldenRestOnlyConnection::Noop( return Status(StatusCode::kUnimplemented, "not implemented"); } +StatusOr GoldenRestOnlyConnection::WaitForConsistency(google::protobuf::Empty const&) { + return StatusOr( + Status(StatusCode::kUnimplemented, "not implemented")); +} + GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1 } // namespace cloud diff --git a/generator/integration_tests/golden/v1/golden_rest_only_connection.h b/generator/integration_tests/golden/v1/golden_rest_only_connection.h index 49b0a925e4378..d485875264e1b 100644 --- a/generator/integration_tests/golden/v1/golden_rest_only_connection.h +++ b/generator/integration_tests/golden/v1/golden_rest_only_connection.h @@ -26,7 +26,7 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "generator/integration_tests/test2.pb.h" #include namespace google { @@ -176,6 +176,8 @@ class GoldenRestOnlyConnection { virtual Status Noop(google::protobuf::Empty const& request); + + virtual StatusOr WaitForConsistency(google::protobuf::Empty const& request); }; GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END diff --git a/generator/integration_tests/golden/v1/golden_rest_only_connection_idempotency_policy.h b/generator/integration_tests/golden/v1/golden_rest_only_connection_idempotency_policy.h index 50bb4d53d89a4..85bca182f6dca 100644 --- a/generator/integration_tests/golden/v1/golden_rest_only_connection_idempotency_policy.h +++ b/generator/integration_tests/golden/v1/golden_rest_only_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "generator/integration_tests/test2.pb.h" #include namespace google { diff --git a/generator/integration_tests/golden/v1/golden_thing_admin_client.h b/generator/integration_tests/golden/v1/golden_thing_admin_client.h index e86ade00888e6..01dd5d8a41830 100644 --- a/generator/integration_tests/golden/v1/golden_thing_admin_client.h +++ b/generator/integration_tests/golden/v1/golden_thing_admin_client.h @@ -28,7 +28,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/version.h" #include "google/cloud/iam_updater.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/generator/integration_tests/golden/v1/golden_thing_admin_connection.h b/generator/integration_tests/golden/v1/golden_thing_admin_connection.h index d30c8e892f3db..83f4108f646e8 100644 --- a/generator/integration_tests/golden/v1/golden_thing_admin_connection.h +++ b/generator/integration_tests/golden/v1/golden_thing_admin_connection.h @@ -30,9 +30,9 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include -#include +#include "generator/integration_tests/backup.pb.h" +#include "generator/integration_tests/test.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/generator/integration_tests/golden/v1/golden_thing_admin_connection_idempotency_policy.h b/generator/integration_tests/golden/v1/golden_thing_admin_connection_idempotency_policy.h index 660653e2db819..7ae7345fd84ab 100644 --- a/generator/integration_tests/golden/v1/golden_thing_admin_connection_idempotency_policy.h +++ b/generator/integration_tests/golden/v1/golden_thing_admin_connection_idempotency_policy.h @@ -21,9 +21,9 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "generator/integration_tests/test.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/generator/integration_tests/golden/v1/internal/deprecated_auth_decorator.cc b/generator/integration_tests/golden/v1/internal/deprecated_auth_decorator.cc index 1fc8379cae6a3..fb771377331b8 100644 --- a/generator/integration_tests/golden/v1/internal/deprecated_auth_decorator.cc +++ b/generator/integration_tests/golden/v1/internal/deprecated_auth_decorator.cc @@ -17,10 +17,13 @@ // source: generator/integration_tests/test_deprecated.proto #include "generator/integration_tests/golden/v1/internal/deprecated_auth_decorator.h" -#include +#include "generator/integration_tests/test_deprecated.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -44,3 +47,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/generator/integration_tests/golden/v1/internal/deprecated_auth_decorator.h b/generator/integration_tests/golden/v1/internal/deprecated_auth_decorator.h index 52506df15aca1..e44c49ab6f889 100644 --- a/generator/integration_tests/golden/v1/internal/deprecated_auth_decorator.h +++ b/generator/integration_tests/golden/v1/internal/deprecated_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -53,4 +56,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_V1_INTERNAL_DEPRECATED_AUTH_DECORATOR_H diff --git a/generator/integration_tests/golden/v1/internal/deprecated_logging_decorator.cc b/generator/integration_tests/golden/v1/internal/deprecated_logging_decorator.cc index 16172166b5c33..af28110e22f8b 100644 --- a/generator/integration_tests/golden/v1/internal/deprecated_logging_decorator.cc +++ b/generator/integration_tests/golden/v1/internal/deprecated_logging_decorator.cc @@ -19,12 +19,15 @@ #include "generator/integration_tests/golden/v1/internal/deprecated_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "generator/integration_tests/test_deprecated.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -55,3 +58,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/generator/integration_tests/golden/v1/internal/deprecated_logging_decorator.h b/generator/integration_tests/golden/v1/internal/deprecated_logging_decorator.h index 69ac4937ed695..4e1758223050d 100644 --- a/generator/integration_tests/golden/v1/internal/deprecated_logging_decorator.h +++ b/generator/integration_tests/golden/v1/internal/deprecated_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -53,4 +56,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_V1_INTERNAL_DEPRECATED_LOGGING_DECORATOR_H diff --git a/generator/integration_tests/golden/v1/internal/deprecated_metadata_decorator.cc b/generator/integration_tests/golden/v1/internal/deprecated_metadata_decorator.cc index 3e639da2f2e49..3e73ae0046a87 100644 --- a/generator/integration_tests/golden/v1/internal/deprecated_metadata_decorator.cc +++ b/generator/integration_tests/golden/v1/internal/deprecated_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: generator/integration_tests/test_deprecated.proto #include "generator/integration_tests/golden/v1/internal/deprecated_metadata_decorator.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "generator/integration_tests/test_deprecated.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -70,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/generator/integration_tests/golden/v1/internal/deprecated_metadata_decorator.h b/generator/integration_tests/golden/v1/internal/deprecated_metadata_decorator.h index 097cc7e8137f2..a0a9b0f5e55fa 100644 --- a/generator/integration_tests/golden/v1/internal/deprecated_metadata_decorator.h +++ b/generator/integration_tests/golden/v1/internal/deprecated_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -60,4 +63,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_V1_INTERNAL_DEPRECATED_METADATA_DECORATOR_H diff --git a/generator/integration_tests/golden/v1/internal/deprecated_option_defaults.cc b/generator/integration_tests/golden/v1/internal/deprecated_option_defaults.cc index e7e4c8301db38..e88e8ee232a19 100644 --- a/generator/integration_tests/golden/v1/internal/deprecated_option_defaults.cc +++ b/generator/integration_tests/golden/v1/internal/deprecated_option_defaults.cc @@ -42,7 +42,7 @@ Options DeprecatedServiceDefaultOptions(Options options) { if (!options.has()) { options.set( golden_v1::DeprecatedServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)).clone()); + std::chrono::minutes(10)).clone()); } if (!options.has()) { options.set( diff --git a/generator/integration_tests/golden/v1/internal/deprecated_rest_logging_decorator.h b/generator/integration_tests/golden/v1/internal/deprecated_rest_logging_decorator.h index 7b682de3e278f..9f9bf38be0e29 100644 --- a/generator/integration_tests/golden/v1/internal/deprecated_rest_logging_decorator.h +++ b/generator/integration_tests/golden/v1/internal/deprecated_rest_logging_decorator.h @@ -24,7 +24,7 @@ #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "generator/integration_tests/test_deprecated.pb.h" #include #include #include diff --git a/generator/integration_tests/golden/v1/internal/deprecated_rest_metadata_decorator.cc b/generator/integration_tests/golden/v1/internal/deprecated_rest_metadata_decorator.cc index 20c60adf00e18..66141d45baeed 100644 --- a/generator/integration_tests/golden/v1/internal/deprecated_rest_metadata_decorator.cc +++ b/generator/integration_tests/golden/v1/internal/deprecated_rest_metadata_decorator.cc @@ -17,8 +17,8 @@ // source: generator/integration_tests/test_deprecated.proto #include "generator/integration_tests/golden/v1/internal/deprecated_rest_metadata_decorator.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" diff --git a/generator/integration_tests/golden/v1/internal/deprecated_rest_metadata_decorator.h b/generator/integration_tests/golden/v1/internal/deprecated_rest_metadata_decorator.h index 3de817571145e..f4754e705e3e5 100644 --- a/generator/integration_tests/golden/v1/internal/deprecated_rest_metadata_decorator.h +++ b/generator/integration_tests/golden/v1/internal/deprecated_rest_metadata_decorator.h @@ -23,7 +23,7 @@ #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include +#include "generator/integration_tests/test_deprecated.pb.h" #include #include diff --git a/generator/integration_tests/golden/v1/internal/deprecated_rest_stub.cc b/generator/integration_tests/golden/v1/internal/deprecated_rest_stub.cc index e93d035098e3d..19f91146b4b68 100644 --- a/generator/integration_tests/golden/v1/internal/deprecated_rest_stub.cc +++ b/generator/integration_tests/golden/v1/internal/deprecated_rest_stub.cc @@ -17,11 +17,11 @@ // source: generator/integration_tests/test_deprecated.proto #include "generator/integration_tests/golden/v1/internal/deprecated_rest_stub.h" +#include "absl/strings/str_cat.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "generator/integration_tests/test_deprecated.pb.h" #include #include diff --git a/generator/integration_tests/golden/v1/internal/deprecated_rest_stub.h b/generator/integration_tests/golden/v1/internal/deprecated_rest_stub.h index dbf2efee3ac36..c5ce59c4efc35 100644 --- a/generator/integration_tests/golden/v1/internal/deprecated_rest_stub.h +++ b/generator/integration_tests/golden/v1/internal/deprecated_rest_stub.h @@ -24,7 +24,7 @@ #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "generator/integration_tests/test_deprecated.pb.h" #include namespace google { diff --git a/generator/integration_tests/golden/v1/internal/deprecated_stub.cc b/generator/integration_tests/golden/v1/internal/deprecated_stub.cc index cbad6955ba0a6..009e0f9e04b13 100644 --- a/generator/integration_tests/golden/v1/internal/deprecated_stub.cc +++ b/generator/integration_tests/golden/v1/internal/deprecated_stub.cc @@ -19,10 +19,13 @@ #include "generator/integration_tests/golden/v1/internal/deprecated_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "generator/integration_tests/test_deprecated.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -47,3 +50,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/generator/integration_tests/golden/v1/internal/deprecated_stub.h b/generator/integration_tests/golden/v1/internal/deprecated_stub.h index 36a20e1f1a5da..d44e262e324fd 100644 --- a/generator/integration_tests/golden/v1/internal/deprecated_stub.h +++ b/generator/integration_tests/golden/v1/internal/deprecated_stub.h @@ -22,10 +22,13 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "generator/integration_tests/test_deprecated.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -61,4 +64,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_V1_INTERNAL_DEPRECATED_STUB_H diff --git a/generator/integration_tests/golden/v1/internal/deprecated_stub_factory.cc b/generator/integration_tests/golden/v1/internal/deprecated_stub_factory.cc index a9b7623d84f4b..ad8fd80d7b7b9 100644 --- a/generator/integration_tests/golden/v1/internal/deprecated_stub_factory.cc +++ b/generator/integration_tests/golden/v1/internal/deprecated_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "generator/integration_tests/test_deprecated.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/generator/integration_tests/golden/v1/internal/deprecated_stub_factory.h b/generator/integration_tests/golden/v1/internal/deprecated_stub_factory.h index 79d9fdf84b80d..90f420ccf3375 100644 --- a/generator/integration_tests/golden/v1/internal/deprecated_stub_factory.h +++ b/generator/integration_tests/golden/v1/internal/deprecated_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_V1_INTERNAL_DEPRECATED_STUB_FACTORY_H diff --git a/generator/integration_tests/golden/v1/internal/deprecated_tracing_connection.cc b/generator/integration_tests/golden/v1/internal/deprecated_tracing_connection.cc index d13c81924d3e5..6b12cb658120c 100644 --- a/generator/integration_tests/golden/v1/internal/deprecated_tracing_connection.cc +++ b/generator/integration_tests/golden/v1/internal/deprecated_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace golden_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DeprecatedServiceTracingConnection::DeprecatedServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -39,16 +37,12 @@ DeprecatedServiceTracingConnection::Noop(google::test::deprecated::v1::Deprecate return internal::EndSpan(*span, child_->Noop(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDeprecatedServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/generator/integration_tests/golden/v1/internal/deprecated_tracing_connection.h b/generator/integration_tests/golden/v1/internal/deprecated_tracing_connection.h index eefcbb36a1f18..541576c6d8c55 100644 --- a/generator/integration_tests/golden/v1/internal/deprecated_tracing_connection.h +++ b/generator/integration_tests/golden/v1/internal/deprecated_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace golden_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DeprecatedServiceTracingConnection : public golden_v1::DeprecatedServiceConnection { public: @@ -47,8 +45,6 @@ class DeprecatedServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/generator/integration_tests/golden/v1/internal/deprecated_tracing_stub.cc b/generator/integration_tests/golden/v1/internal/deprecated_tracing_stub.cc index a56fb521c6ba5..d82448aeb971e 100644 --- a/generator/integration_tests/golden/v1/internal/deprecated_tracing_stub.cc +++ b/generator/integration_tests/golden/v1/internal/deprecated_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DeprecatedServiceTracingStub::DeprecatedServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -43,18 +44,14 @@ Status DeprecatedServiceTracingStub::Noop( child_->Noop(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDeprecatedServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/generator/integration_tests/golden/v1/internal/deprecated_tracing_stub.h b/generator/integration_tests/golden/v1/internal/deprecated_tracing_stub.h index 9e2297a69573a..97c9b19717562 100644 --- a/generator/integration_tests/golden/v1/internal/deprecated_tracing_stub.h +++ b/generator/integration_tests/golden/v1/internal/deprecated_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DeprecatedServiceTracingStub : public DeprecatedServiceStub { public: ~DeprecatedServiceTracingStub() override = default; @@ -48,8 +49,6 @@ class DeprecatedServiceTracingStub : public DeprecatedServiceStub { std::shared_ptr propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -64,4 +63,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_V1_INTERNAL_DEPRECATED_TRACING_STUB_H diff --git a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_auth_decorator.cc b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_auth_decorator.cc index 9ba86c1582d76..bfc1a30640416 100644 --- a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_auth_decorator.cc +++ b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_auth_decorator.cc @@ -21,10 +21,13 @@ #include "google/cloud/internal/async_streaming_read_rpc_auth.h" #include "google/cloud/internal/async_streaming_write_rpc_auth.h" #include "google/cloud/internal/streaming_write_rpc_impl.h" -#include +#include "generator/integration_tests/test.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -225,3 +228,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_auth_decorator.h b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_auth_decorator.h index 6878af270a2bf..0c730391f495f 100644 --- a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_auth_decorator.h +++ b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -144,4 +147,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_V1_INTERNAL_GOLDEN_KITCHEN_SINK_AUTH_DECORATOR_H diff --git a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_logging_decorator.cc b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_logging_decorator.cc index ddbd94428d4f6..855ec6b3d51a8 100644 --- a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_logging_decorator.cc +++ b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_logging_decorator.cc @@ -24,12 +24,15 @@ #include "google/cloud/internal/streaming_read_rpc_logging.h" #include "google/cloud/internal/streaming_write_rpc_logging.h" #include "google/cloud/status_or.h" -#include +#include "generator/integration_tests/test.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -323,3 +326,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_logging_decorator.h b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_logging_decorator.h index 6b1e9cc829e78..2c9c49a54dc11 100644 --- a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_logging_decorator.h +++ b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -145,4 +148,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_V1_INTERNAL_GOLDEN_KITCHEN_SINK_LOGGING_DECORATOR_H diff --git a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_metadata_decorator.cc b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_metadata_decorator.cc index 42de8cb22315a..46d01bf6abdfa 100644 --- a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_metadata_decorator.cc +++ b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_metadata_decorator.cc @@ -17,19 +17,22 @@ // source: generator/integration_tests/test.proto #include "generator/integration_tests/golden/v1/internal/golden_kitchen_sink_metadata_decorator.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/routing_matcher.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "generator/integration_tests/test.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -284,3 +287,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_metadata_decorator.h b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_metadata_decorator.h index 1d311a70ace4f..57f31c8b24d3b 100644 --- a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_metadata_decorator.h +++ b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -151,4 +154,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_V1_INTERNAL_GOLDEN_KITCHEN_SINK_METADATA_DECORATOR_H diff --git a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_option_defaults.cc b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_option_defaults.cc index e8c2f7433f1ea..b5a80120266e9 100644 --- a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_option_defaults.cc +++ b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_option_defaults.cc @@ -42,7 +42,7 @@ Options GoldenKitchenSinkDefaultOptions(Options options) { if (!options.has()) { options.set( golden_v1::GoldenKitchenSinkLimitedTimeRetryPolicy( - std::chrono::minutes(30)).clone()); + std::chrono::minutes(10)).clone()); } if (!options.has()) { options.set( diff --git a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_rest_logging_decorator.h b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_rest_logging_decorator.h index df10cae810a7f..1685990b2dc14 100644 --- a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_rest_logging_decorator.h +++ b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_rest_logging_decorator.h @@ -24,7 +24,7 @@ #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "generator/integration_tests/test.pb.h" #include #include #include diff --git a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_rest_metadata_decorator.cc b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_rest_metadata_decorator.cc index 1ae999a7c3717..d2b3859215f0e 100644 --- a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_rest_metadata_decorator.cc +++ b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_rest_metadata_decorator.cc @@ -17,8 +17,8 @@ // source: generator/integration_tests/test.proto #include "generator/integration_tests/golden/v1/internal/golden_kitchen_sink_rest_metadata_decorator.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/internal/routing_matcher.h" diff --git a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_rest_metadata_decorator.h b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_rest_metadata_decorator.h index be9f9bc99b00f..76cbdfe28c54b 100644 --- a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_rest_metadata_decorator.h +++ b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_rest_metadata_decorator.h @@ -23,7 +23,7 @@ #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include +#include "generator/integration_tests/test.pb.h" #include #include diff --git a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_rest_stub.cc b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_rest_stub.cc index c99d9c8015f51..d494614674bfb 100644 --- a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_rest_stub.cc +++ b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_rest_stub.cc @@ -17,11 +17,11 @@ // source: generator/integration_tests/test.proto #include "generator/integration_tests/golden/v1/internal/golden_kitchen_sink_rest_stub.h" +#include "absl/strings/str_cat.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "generator/integration_tests/test.pb.h" #include #include diff --git a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_rest_stub.h b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_rest_stub.h index 5967727ed7a73..682ed67a59950 100644 --- a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_rest_stub.h +++ b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_rest_stub.h @@ -24,11 +24,11 @@ #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include -#include +#include "generator/integration_tests/backup.pb.h" +#include "google/cloud/location/locations.pb.h" +#include "google/iam/v1/iam_policy.pb.h" +#include "google/longrunning/operations.pb.h" +#include "generator/integration_tests/test.pb.h" #include namespace google { diff --git a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_round_robin_decorator.cc b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_round_robin_decorator.cc index dca9944170b7c..404a367e27fc2 100644 --- a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_round_robin_decorator.cc +++ b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_round_robin_decorator.cc @@ -21,6 +21,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -176,3 +179,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_round_robin_decorator.h b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_round_robin_decorator.h index b33762b040970..de3ebeb185ffe 100644 --- a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_round_robin_decorator.h +++ b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_round_robin_decorator.h @@ -25,6 +25,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -145,4 +148,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_V1_INTERNAL_GOLDEN_KITCHEN_SINK_ROUND_ROBIN_DECORATOR_H diff --git a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_stub.cc b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_stub.cc index 116f81d935b47..f7d8a80f18f72 100644 --- a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_stub.cc +++ b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_stub.cc @@ -23,10 +23,13 @@ #include "google/cloud/internal/async_streaming_write_rpc_impl.h" #include "google/cloud/internal/streaming_write_rpc_impl.h" #include "google/cloud/status_or.h" -#include +#include "generator/integration_tests/test.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -259,3 +262,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_stub.h b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_stub.h index 9051aadd25728..2642dc8c220c9 100644 --- a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_stub.h +++ b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_stub.h @@ -29,14 +29,17 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include -#include +#include "generator/integration_tests/backup.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" +#include "generator/integration_tests/test.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -266,4 +269,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_V1_INTERNAL_GOLDEN_KITCHEN_SINK_STUB_H diff --git a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_stub_factory.cc b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_stub_factory.cc index b3b0beca42d6d..009a82963c128 100644 --- a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_stub_factory.cc +++ b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_stub_factory.cc @@ -28,13 +28,16 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "generator/integration_tests/test.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/iam/v1/iam_policy.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -77,3 +80,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_stub_factory.h b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_stub_factory.h index e680ee1ec8657..bd5535015596d 100644 --- a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_stub_factory.h +++ b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_V1_INTERNAL_GOLDEN_KITCHEN_SINK_STUB_FACTORY_H diff --git a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_tracing_connection.cc b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_tracing_connection.cc index c1cd546b9b301..ce259785752b9 100644 --- a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_tracing_connection.cc +++ b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace golden_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GoldenKitchenSinkTracingConnection::GoldenKitchenSinkTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -136,16 +134,12 @@ GoldenKitchenSinkTracingConnection::ListOperations(google::longrunning::ListOper std::move(span), std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeGoldenKitchenSinkTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_tracing_connection.h b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_tracing_connection.h index ab3c947fc10fa..62f8387932398 100644 --- a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_tracing_connection.h +++ b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace golden_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class GoldenKitchenSinkTracingConnection : public golden_v1::GoldenKitchenSinkConnection { public: @@ -88,8 +86,6 @@ class GoldenKitchenSinkTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_tracing_stub.cc b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_tracing_stub.cc index 32f1dcee73593..eadfdac1d6165 100644 --- a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_tracing_stub.cc +++ b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_tracing_stub.cc @@ -26,13 +26,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GoldenKitchenSinkTracingStub::GoldenKitchenSinkTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -242,18 +243,14 @@ GoldenKitchenSinkTracingStub::AsyncStreamingWrite( std::move(context), std::move(stream), std::move(span)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeGoldenKitchenSinkTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_tracing_stub.h b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_tracing_stub.h index 5713f2b4a7fac..ae0f43cd13d54 100644 --- a/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_tracing_stub.h +++ b/generator/integration_tests/golden/v1/internal/golden_kitchen_sink_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class GoldenKitchenSinkTracingStub : public GoldenKitchenSinkStub { public: ~GoldenKitchenSinkTracingStub() override = default; @@ -139,8 +140,6 @@ class GoldenKitchenSinkTracingStub : public GoldenKitchenSinkStub { std::shared_ptr propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -155,4 +154,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_V1_INTERNAL_GOLDEN_KITCHEN_SINK_TRACING_STUB_H diff --git a/generator/integration_tests/golden/v1/internal/golden_rest_only_option_defaults.cc b/generator/integration_tests/golden/v1/internal/golden_rest_only_option_defaults.cc index bd3b1813fab2a..aa60c705e7319 100644 --- a/generator/integration_tests/golden/v1/internal/golden_rest_only_option_defaults.cc +++ b/generator/integration_tests/golden/v1/internal/golden_rest_only_option_defaults.cc @@ -21,7 +21,7 @@ #include "generator/integration_tests/golden/v1/golden_rest_only_options.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" +#include "absl/strings/str_cat.h" #include #include @@ -44,7 +44,7 @@ Options GoldenRestOnlyDefaultOptions(std::string const& location, Options option if (!options.has()) { options.set( golden_v1::GoldenRestOnlyLimitedTimeRetryPolicy( - std::chrono::minutes(30)).clone()); + std::chrono::minutes(10)).clone()); } if (!options.has()) { options.set( diff --git a/generator/integration_tests/golden/v1/internal/golden_rest_only_rest_logging_decorator.h b/generator/integration_tests/golden/v1/internal/golden_rest_only_rest_logging_decorator.h index 619143e1aebeb..f5964745c3f52 100644 --- a/generator/integration_tests/golden/v1/internal/golden_rest_only_rest_logging_decorator.h +++ b/generator/integration_tests/golden/v1/internal/golden_rest_only_rest_logging_decorator.h @@ -24,7 +24,7 @@ #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "generator/integration_tests/test2.pb.h" #include #include #include diff --git a/generator/integration_tests/golden/v1/internal/golden_rest_only_rest_metadata_decorator.cc b/generator/integration_tests/golden/v1/internal/golden_rest_only_rest_metadata_decorator.cc index 93b97ccfc14c2..22ef122507784 100644 --- a/generator/integration_tests/golden/v1/internal/golden_rest_only_rest_metadata_decorator.cc +++ b/generator/integration_tests/golden/v1/internal/golden_rest_only_rest_metadata_decorator.cc @@ -17,8 +17,8 @@ // source: generator/integration_tests/test2.proto #include "generator/integration_tests/golden/v1/internal/golden_rest_only_rest_metadata_decorator.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" diff --git a/generator/integration_tests/golden/v1/internal/golden_rest_only_rest_metadata_decorator.h b/generator/integration_tests/golden/v1/internal/golden_rest_only_rest_metadata_decorator.h index 3235417000a87..e774ad23b639f 100644 --- a/generator/integration_tests/golden/v1/internal/golden_rest_only_rest_metadata_decorator.h +++ b/generator/integration_tests/golden/v1/internal/golden_rest_only_rest_metadata_decorator.h @@ -23,7 +23,7 @@ #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include +#include "generator/integration_tests/test2.pb.h" #include #include diff --git a/generator/integration_tests/golden/v1/internal/golden_rest_only_rest_stub.cc b/generator/integration_tests/golden/v1/internal/golden_rest_only_rest_stub.cc index 1c4d0945bc7ab..6b89bc3ec21ba 100644 --- a/generator/integration_tests/golden/v1/internal/golden_rest_only_rest_stub.cc +++ b/generator/integration_tests/golden/v1/internal/golden_rest_only_rest_stub.cc @@ -17,11 +17,11 @@ // source: generator/integration_tests/test2.proto #include "generator/integration_tests/golden/v1/internal/golden_rest_only_rest_stub.h" +#include "absl/strings/str_cat.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "generator/integration_tests/test2.pb.h" #include #include diff --git a/generator/integration_tests/golden/v1/internal/golden_rest_only_rest_stub.h b/generator/integration_tests/golden/v1/internal/golden_rest_only_rest_stub.h index 7277a95c1ca9a..0fe224a7b8de3 100644 --- a/generator/integration_tests/golden/v1/internal/golden_rest_only_rest_stub.h +++ b/generator/integration_tests/golden/v1/internal/golden_rest_only_rest_stub.h @@ -24,7 +24,7 @@ #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "generator/integration_tests/test2.pb.h" #include namespace google { diff --git a/generator/integration_tests/golden/v1/internal/golden_rest_only_tracing_connection.cc b/generator/integration_tests/golden/v1/internal/golden_rest_only_tracing_connection.cc index f55f4fb1c958f..0cba6dedbdf53 100644 --- a/generator/integration_tests/golden/v1/internal/golden_rest_only_tracing_connection.cc +++ b/generator/integration_tests/golden/v1/internal/golden_rest_only_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace golden_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GoldenRestOnlyTracingConnection::GoldenRestOnlyTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -39,16 +37,12 @@ GoldenRestOnlyTracingConnection::Noop(google::protobuf::Empty const& request) { return internal::EndSpan(*span, child_->Noop(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeGoldenRestOnlyTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/generator/integration_tests/golden/v1/internal/golden_rest_only_tracing_connection.h b/generator/integration_tests/golden/v1/internal/golden_rest_only_tracing_connection.h index 4938ea49facbc..d8570f8c7564c 100644 --- a/generator/integration_tests/golden/v1/internal/golden_rest_only_tracing_connection.h +++ b/generator/integration_tests/golden/v1/internal/golden_rest_only_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace golden_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class GoldenRestOnlyTracingConnection : public golden_v1::GoldenRestOnlyConnection { public: @@ -47,8 +45,6 @@ class GoldenRestOnlyTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/generator/integration_tests/golden/v1/internal/golden_thing_admin_auth_decorator.cc b/generator/integration_tests/golden/v1/internal/golden_thing_admin_auth_decorator.cc index 0bd19f49b07e3..de3e8777a1ef5 100644 --- a/generator/integration_tests/golden/v1/internal/golden_thing_admin_auth_decorator.cc +++ b/generator/integration_tests/golden/v1/internal/golden_thing_admin_auth_decorator.cc @@ -17,10 +17,13 @@ // source: generator/integration_tests/test.proto #include "generator/integration_tests/golden/v1/internal/golden_thing_admin_auth_decorator.h" -#include +#include "generator/integration_tests/test.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -384,3 +387,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/generator/integration_tests/golden/v1/internal/golden_thing_admin_auth_decorator.h b/generator/integration_tests/golden/v1/internal/golden_thing_admin_auth_decorator.h index ba01c26554ab8..70607ed59fa32 100644 --- a/generator/integration_tests/golden/v1/internal/golden_thing_admin_auth_decorator.h +++ b/generator/integration_tests/golden/v1/internal/golden_thing_admin_auth_decorator.h @@ -22,11 +22,14 @@ #include "generator/integration_tests/golden/v1/internal/golden_thing_admin_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -203,4 +206,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_V1_INTERNAL_GOLDEN_THING_ADMIN_AUTH_DECORATOR_H diff --git a/generator/integration_tests/golden/v1/internal/golden_thing_admin_connection_impl.h b/generator/integration_tests/golden/v1/internal/golden_thing_admin_connection_impl.h index 54f892d78bdb5..c4290e915f619 100644 --- a/generator/integration_tests/golden/v1/internal/golden_thing_admin_connection_impl.h +++ b/generator/integration_tests/golden/v1/internal/golden_thing_admin_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/generator/integration_tests/golden/v1/internal/golden_thing_admin_logging_decorator.cc b/generator/integration_tests/golden/v1/internal/golden_thing_admin_logging_decorator.cc index 0b7b3163e3803..a95c9319616d6 100644 --- a/generator/integration_tests/golden/v1/internal/golden_thing_admin_logging_decorator.cc +++ b/generator/integration_tests/golden/v1/internal/golden_thing_admin_logging_decorator.cc @@ -19,12 +19,15 @@ #include "generator/integration_tests/golden/v1/internal/golden_thing_admin_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "generator/integration_tests/test.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -480,3 +483,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/generator/integration_tests/golden/v1/internal/golden_thing_admin_logging_decorator.h b/generator/integration_tests/golden/v1/internal/golden_thing_admin_logging_decorator.h index 07519724e30e0..ef8c07be28621 100644 --- a/generator/integration_tests/golden/v1/internal/golden_thing_admin_logging_decorator.h +++ b/generator/integration_tests/golden/v1/internal/golden_thing_admin_logging_decorator.h @@ -22,11 +22,14 @@ #include "generator/integration_tests/golden/v1/internal/golden_thing_admin_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -203,4 +206,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_V1_INTERNAL_GOLDEN_THING_ADMIN_LOGGING_DECORATOR_H diff --git a/generator/integration_tests/golden/v1/internal/golden_thing_admin_metadata_decorator.cc b/generator/integration_tests/golden/v1/internal/golden_thing_admin_metadata_decorator.cc index 5e2e6b5dcd5f8..c23b1da89a2c1 100644 --- a/generator/integration_tests/golden/v1/internal/golden_thing_admin_metadata_decorator.cc +++ b/generator/integration_tests/golden/v1/internal/golden_thing_admin_metadata_decorator.cc @@ -17,19 +17,22 @@ // source: generator/integration_tests/test.proto #include "generator/integration_tests/golden/v1/internal/golden_thing_admin_metadata_decorator.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/routing_matcher.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "generator/integration_tests/test.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -423,3 +426,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/generator/integration_tests/golden/v1/internal/golden_thing_admin_metadata_decorator.h b/generator/integration_tests/golden/v1/internal/golden_thing_admin_metadata_decorator.h index ae81704e87b18..c11e15b0e60e2 100644 --- a/generator/integration_tests/golden/v1/internal/golden_thing_admin_metadata_decorator.h +++ b/generator/integration_tests/golden/v1/internal/golden_thing_admin_metadata_decorator.h @@ -22,11 +22,14 @@ #include "generator/integration_tests/golden/v1/internal/golden_thing_admin_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -210,4 +213,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_V1_INTERNAL_GOLDEN_THING_ADMIN_METADATA_DECORATOR_H diff --git a/generator/integration_tests/golden/v1/internal/golden_thing_admin_option_defaults.cc b/generator/integration_tests/golden/v1/internal/golden_thing_admin_option_defaults.cc index 97628414fa551..b8e6a9d874248 100644 --- a/generator/integration_tests/golden/v1/internal/golden_thing_admin_option_defaults.cc +++ b/generator/integration_tests/golden/v1/internal/golden_thing_admin_option_defaults.cc @@ -42,7 +42,7 @@ Options GoldenThingAdminDefaultOptions(Options options) { if (!options.has()) { options.set( golden_v1::GoldenThingAdminLimitedTimeRetryPolicy( - std::chrono::minutes(30)).clone()); + std::chrono::minutes(10)).clone()); } if (!options.has()) { options.set( diff --git a/generator/integration_tests/golden/v1/internal/golden_thing_admin_rest_connection_impl.h b/generator/integration_tests/golden/v1/internal/golden_thing_admin_rest_connection_impl.h index cf40b64cf244f..5724dd54f0276 100644 --- a/generator/integration_tests/golden/v1/internal/golden_thing_admin_rest_connection_impl.h +++ b/generator/integration_tests/golden/v1/internal/golden_thing_admin_rest_connection_impl.h @@ -30,7 +30,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.pb.h" #include namespace google { diff --git a/generator/integration_tests/golden/v1/internal/golden_thing_admin_rest_logging_decorator.h b/generator/integration_tests/golden/v1/internal/golden_thing_admin_rest_logging_decorator.h index 8564cbbc67794..daa327d9cd76b 100644 --- a/generator/integration_tests/golden/v1/internal/golden_thing_admin_rest_logging_decorator.h +++ b/generator/integration_tests/golden/v1/internal/golden_thing_admin_rest_logging_decorator.h @@ -24,8 +24,8 @@ #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include +#include "generator/integration_tests/test.pb.h" +#include "google/longrunning/operations.pb.h" #include #include #include diff --git a/generator/integration_tests/golden/v1/internal/golden_thing_admin_rest_metadata_decorator.cc b/generator/integration_tests/golden/v1/internal/golden_thing_admin_rest_metadata_decorator.cc index c7df00fb03887..6f7ce3febd5a4 100644 --- a/generator/integration_tests/golden/v1/internal/golden_thing_admin_rest_metadata_decorator.cc +++ b/generator/integration_tests/golden/v1/internal/golden_thing_admin_rest_metadata_decorator.cc @@ -17,8 +17,8 @@ // source: generator/integration_tests/test.proto #include "generator/integration_tests/golden/v1/internal/golden_thing_admin_rest_metadata_decorator.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/internal/routing_matcher.h" diff --git a/generator/integration_tests/golden/v1/internal/golden_thing_admin_rest_metadata_decorator.h b/generator/integration_tests/golden/v1/internal/golden_thing_admin_rest_metadata_decorator.h index 7345b0754e766..fd3794aea77d4 100644 --- a/generator/integration_tests/golden/v1/internal/golden_thing_admin_rest_metadata_decorator.h +++ b/generator/integration_tests/golden/v1/internal/golden_thing_admin_rest_metadata_decorator.h @@ -23,8 +23,8 @@ #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include +#include "generator/integration_tests/test.pb.h" +#include "google/longrunning/operations.pb.h" #include #include diff --git a/generator/integration_tests/golden/v1/internal/golden_thing_admin_rest_stub.cc b/generator/integration_tests/golden/v1/internal/golden_thing_admin_rest_stub.cc index fba4abc3082e8..83303673aed35 100644 --- a/generator/integration_tests/golden/v1/internal/golden_thing_admin_rest_stub.cc +++ b/generator/integration_tests/golden/v1/internal/golden_thing_admin_rest_stub.cc @@ -17,12 +17,12 @@ // source: generator/integration_tests/test.proto #include "generator/integration_tests/golden/v1/internal/golden_thing_admin_rest_stub.h" +#include "absl/strings/str_cat.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "generator/integration_tests/test.pb.h" +#include "google/longrunning/operations.pb.h" #include #include diff --git a/generator/integration_tests/golden/v1/internal/golden_thing_admin_rest_stub.h b/generator/integration_tests/golden/v1/internal/golden_thing_admin_rest_stub.h index a8da517cd5c60..342a94718c7fb 100644 --- a/generator/integration_tests/golden/v1/internal/golden_thing_admin_rest_stub.h +++ b/generator/integration_tests/golden/v1/internal/golden_thing_admin_rest_stub.h @@ -24,10 +24,10 @@ #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "generator/integration_tests/backup.pb.h" +#include "google/cloud/location/locations.pb.h" +#include "google/longrunning/operations.pb.h" +#include "generator/integration_tests/test.pb.h" #include namespace google { diff --git a/generator/integration_tests/golden/v1/internal/golden_thing_admin_round_robin_decorator.cc b/generator/integration_tests/golden/v1/internal/golden_thing_admin_round_robin_decorator.cc index 029059b8f119f..a9a3517e6c454 100644 --- a/generator/integration_tests/golden/v1/internal/golden_thing_admin_round_robin_decorator.cc +++ b/generator/integration_tests/golden/v1/internal/golden_thing_admin_round_robin_decorator.cc @@ -21,6 +21,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -278,3 +281,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/generator/integration_tests/golden/v1/internal/golden_thing_admin_round_robin_decorator.h b/generator/integration_tests/golden/v1/internal/golden_thing_admin_round_robin_decorator.h index f70d24d68719a..c29a1f108a7af 100644 --- a/generator/integration_tests/golden/v1/internal/golden_thing_admin_round_robin_decorator.h +++ b/generator/integration_tests/golden/v1/internal/golden_thing_admin_round_robin_decorator.h @@ -25,6 +25,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -203,4 +206,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_V1_INTERNAL_GOLDEN_THING_ADMIN_ROUND_ROBIN_DECORATOR_H diff --git a/generator/integration_tests/golden/v1/internal/golden_thing_admin_stub.cc b/generator/integration_tests/golden/v1/internal/golden_thing_admin_stub.cc index d55035d5fe0ad..92cccb9cba775 100644 --- a/generator/integration_tests/golden/v1/internal/golden_thing_admin_stub.cc +++ b/generator/integration_tests/golden/v1/internal/golden_thing_admin_stub.cc @@ -19,11 +19,14 @@ #include "generator/integration_tests/golden/v1/internal/golden_thing_admin_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "generator/integration_tests/test.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -462,3 +465,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/generator/integration_tests/golden/v1/internal/golden_thing_admin_stub.h b/generator/integration_tests/golden/v1/internal/golden_thing_admin_stub.h index 3591f12bc6e0b..846f66a66e5fa 100644 --- a/generator/integration_tests/golden/v1/internal/golden_thing_admin_stub.h +++ b/generator/integration_tests/golden/v1/internal/golden_thing_admin_stub.h @@ -24,13 +24,16 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "generator/integration_tests/backup.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" +#include "generator/integration_tests/test.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -372,4 +375,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_V1_INTERNAL_GOLDEN_THING_ADMIN_STUB_H diff --git a/generator/integration_tests/golden/v1/internal/golden_thing_admin_stub_factory.cc b/generator/integration_tests/golden/v1/internal/golden_thing_admin_stub_factory.cc index 00515d63f390e..e2503a3044c55 100644 --- a/generator/integration_tests/golden/v1/internal/golden_thing_admin_stub_factory.cc +++ b/generator/integration_tests/golden/v1/internal/golden_thing_admin_stub_factory.cc @@ -28,12 +28,15 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "generator/integration_tests/test.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -76,3 +79,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/generator/integration_tests/golden/v1/internal/golden_thing_admin_stub_factory.h b/generator/integration_tests/golden/v1/internal/golden_thing_admin_stub_factory.h index ec537c40eb073..2d4e9da5fc1e1 100644 --- a/generator/integration_tests/golden/v1/internal/golden_thing_admin_stub_factory.h +++ b/generator/integration_tests/golden/v1/internal/golden_thing_admin_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_V1_INTERNAL_GOLDEN_THING_ADMIN_STUB_FACTORY_H diff --git a/generator/integration_tests/golden/v1/internal/golden_thing_admin_tracing_connection.cc b/generator/integration_tests/golden/v1/internal/golden_thing_admin_tracing_connection.cc index dd53241b4bc6b..de42374fbfa9c 100644 --- a/generator/integration_tests/golden/v1/internal/golden_thing_admin_tracing_connection.cc +++ b/generator/integration_tests/golden/v1/internal/golden_thing_admin_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace golden_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GoldenThingAdminTracingConnection::GoldenThingAdminTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -304,16 +302,12 @@ GoldenThingAdminTracingConnection::AsyncDropDatabase(google::test::admin::databa return internal::EndSpan(std::move(span), child_->AsyncDropDatabase(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeGoldenThingAdminTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/generator/integration_tests/golden/v1/internal/golden_thing_admin_tracing_connection.h b/generator/integration_tests/golden/v1/internal/golden_thing_admin_tracing_connection.h index 5d14f538b444b..6d446df563c95 100644 --- a/generator/integration_tests/golden/v1/internal/golden_thing_admin_tracing_connection.h +++ b/generator/integration_tests/golden/v1/internal/golden_thing_admin_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace golden_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class GoldenThingAdminTracingConnection : public golden_v1::GoldenThingAdminConnection { public: @@ -150,8 +148,6 @@ class GoldenThingAdminTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/generator/integration_tests/golden/v1/internal/golden_thing_admin_tracing_stub.cc b/generator/integration_tests/golden/v1/internal/golden_thing_admin_tracing_stub.cc index 47aa68eba184f..2c068e9771d65 100644 --- a/generator/integration_tests/golden/v1/internal/golden_thing_admin_tracing_stub.cc +++ b/generator/integration_tests/golden/v1/internal/golden_thing_admin_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GoldenThingAdminTracingStub::GoldenThingAdminTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -377,18 +378,14 @@ future GoldenThingAdminTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeGoldenThingAdminTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/generator/integration_tests/golden/v1/internal/golden_thing_admin_tracing_stub.h b/generator/integration_tests/golden/v1/internal/golden_thing_admin_tracing_stub.h index 83ed2aeff5258..95d0a1e5b356e 100644 --- a/generator/integration_tests/golden/v1/internal/golden_thing_admin_tracing_stub.h +++ b/generator/integration_tests/golden/v1/internal/golden_thing_admin_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class GoldenThingAdminTracingStub : public GoldenThingAdminStub { public: ~GoldenThingAdminTracingStub() override = default; @@ -197,8 +198,6 @@ class GoldenThingAdminTracingStub : public GoldenThingAdminStub { std::shared_ptr propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -213,4 +212,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_V1_INTERNAL_GOLDEN_THING_ADMIN_TRACING_STUB_H diff --git a/generator/integration_tests/golden/v1/internal/request_id_auth_decorator.cc b/generator/integration_tests/golden/v1/internal/request_id_auth_decorator.cc index 872f68ee68c4c..a81626b9446b2 100644 --- a/generator/integration_tests/golden/v1/internal/request_id_auth_decorator.cc +++ b/generator/integration_tests/golden/v1/internal/request_id_auth_decorator.cc @@ -17,10 +17,13 @@ // source: generator/integration_tests/test_request_id.proto #include "generator/integration_tests/golden/v1/internal/request_id_auth_decorator.h" -#include +#include "generator/integration_tests/test_request_id.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -135,3 +138,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/generator/integration_tests/golden/v1/internal/request_id_auth_decorator.h b/generator/integration_tests/golden/v1/internal/request_id_auth_decorator.h index 8d87238884abc..d270ef706427f 100644 --- a/generator/integration_tests/golden/v1/internal/request_id_auth_decorator.h +++ b/generator/integration_tests/golden/v1/internal/request_id_auth_decorator.h @@ -22,11 +22,14 @@ #include "generator/integration_tests/golden/v1/internal/request_id_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -88,4 +91,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_V1_INTERNAL_REQUEST_ID_AUTH_DECORATOR_H diff --git a/generator/integration_tests/golden/v1/internal/request_id_connection_impl.h b/generator/integration_tests/golden/v1/internal/request_id_connection_impl.h index 9579a41f81b99..f449357766f47 100644 --- a/generator/integration_tests/golden/v1/internal/request_id_connection_impl.h +++ b/generator/integration_tests/golden/v1/internal/request_id_connection_impl.h @@ -33,7 +33,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/generator/integration_tests/golden/v1/internal/request_id_logging_decorator.cc b/generator/integration_tests/golden/v1/internal/request_id_logging_decorator.cc index 61725291df815..8f500b7466685 100644 --- a/generator/integration_tests/golden/v1/internal/request_id_logging_decorator.cc +++ b/generator/integration_tests/golden/v1/internal/request_id_logging_decorator.cc @@ -19,12 +19,15 @@ #include "generator/integration_tests/golden/v1/internal/request_id_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "generator/integration_tests/test_request_id.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -153,3 +156,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/generator/integration_tests/golden/v1/internal/request_id_logging_decorator.h b/generator/integration_tests/golden/v1/internal/request_id_logging_decorator.h index 8e60a32dfc8ca..4e8c11b11a34f 100644 --- a/generator/integration_tests/golden/v1/internal/request_id_logging_decorator.h +++ b/generator/integration_tests/golden/v1/internal/request_id_logging_decorator.h @@ -22,11 +22,14 @@ #include "generator/integration_tests/golden/v1/internal/request_id_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -88,4 +91,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_V1_INTERNAL_REQUEST_ID_LOGGING_DECORATOR_H diff --git a/generator/integration_tests/golden/v1/internal/request_id_metadata_decorator.cc b/generator/integration_tests/golden/v1/internal/request_id_metadata_decorator.cc index f57605e72e98d..d90276dbabb52 100644 --- a/generator/integration_tests/golden/v1/internal/request_id_metadata_decorator.cc +++ b/generator/integration_tests/golden/v1/internal/request_id_metadata_decorator.cc @@ -17,19 +17,22 @@ // source: generator/integration_tests/test_request_id.proto #include "generator/integration_tests/golden/v1/internal/request_id_metadata_decorator.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/routing_matcher.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "generator/integration_tests/test_request_id.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -204,3 +207,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/generator/integration_tests/golden/v1/internal/request_id_metadata_decorator.h b/generator/integration_tests/golden/v1/internal/request_id_metadata_decorator.h index 5668cfd9d7b06..3955bc0ea385c 100644 --- a/generator/integration_tests/golden/v1/internal/request_id_metadata_decorator.h +++ b/generator/integration_tests/golden/v1/internal/request_id_metadata_decorator.h @@ -22,11 +22,14 @@ #include "generator/integration_tests/golden/v1/internal/request_id_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -95,4 +98,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_V1_INTERNAL_REQUEST_ID_METADATA_DECORATOR_H diff --git a/generator/integration_tests/golden/v1/internal/request_id_option_defaults.cc b/generator/integration_tests/golden/v1/internal/request_id_option_defaults.cc index 0a476ae463a3c..4c9bf43123199 100644 --- a/generator/integration_tests/golden/v1/internal/request_id_option_defaults.cc +++ b/generator/integration_tests/golden/v1/internal/request_id_option_defaults.cc @@ -42,7 +42,7 @@ Options RequestIdServiceDefaultOptions(Options options) { if (!options.has()) { options.set( golden_v1::RequestIdServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)).clone()); + std::chrono::minutes(10)).clone()); } if (!options.has()) { options.set( diff --git a/generator/integration_tests/golden/v1/internal/request_id_stub.cc b/generator/integration_tests/golden/v1/internal/request_id_stub.cc index cd8b7b8346c43..5d0bdebd3b320 100644 --- a/generator/integration_tests/golden/v1/internal/request_id_stub.cc +++ b/generator/integration_tests/golden/v1/internal/request_id_stub.cc @@ -19,11 +19,14 @@ #include "generator/integration_tests/golden/v1/internal/request_id_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "generator/integration_tests/test_request_id.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -148,3 +151,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/generator/integration_tests/golden/v1/internal/request_id_stub.h b/generator/integration_tests/golden/v1/internal/request_id_stub.h index 71abeb30b5374..4f54e0dd470fd 100644 --- a/generator/integration_tests/golden/v1/internal/request_id_stub.h +++ b/generator/integration_tests/golden/v1/internal/request_id_stub.h @@ -24,11 +24,14 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "generator/integration_tests/test_request_id.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -136,4 +139,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_V1_INTERNAL_REQUEST_ID_STUB_H diff --git a/generator/integration_tests/golden/v1/internal/request_id_stub_factory.cc b/generator/integration_tests/golden/v1/internal/request_id_stub_factory.cc index dc7c18524340a..ffc059e793b09 100644 --- a/generator/integration_tests/golden/v1/internal/request_id_stub_factory.cc +++ b/generator/integration_tests/golden/v1/internal/request_id_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "generator/integration_tests/test_request_id.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/generator/integration_tests/golden/v1/internal/request_id_stub_factory.h b/generator/integration_tests/golden/v1/internal/request_id_stub_factory.h index 344f4582be905..f378692a5051e 100644 --- a/generator/integration_tests/golden/v1/internal/request_id_stub_factory.h +++ b/generator/integration_tests/golden/v1/internal/request_id_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_V1_INTERNAL_REQUEST_ID_STUB_FACTORY_H diff --git a/generator/integration_tests/golden/v1/internal/request_id_tracing_connection.cc b/generator/integration_tests/golden/v1/internal/request_id_tracing_connection.cc index 4f6c6233ef909..6877827edd0e8 100644 --- a/generator/integration_tests/golden/v1/internal/request_id_tracing_connection.cc +++ b/generator/integration_tests/golden/v1/internal/request_id_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace golden_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RequestIdServiceTracingConnection::RequestIdServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -85,16 +83,12 @@ RequestIdServiceTracingConnection::AsyncCreateFoo(google::test::requestid::v1::C return internal::EndSpan(std::move(span), child_->AsyncCreateFoo(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRequestIdServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/generator/integration_tests/golden/v1/internal/request_id_tracing_connection.h b/generator/integration_tests/golden/v1/internal/request_id_tracing_connection.h index 9403699b7aa73..237448814d618 100644 --- a/generator/integration_tests/golden/v1/internal/request_id_tracing_connection.h +++ b/generator/integration_tests/golden/v1/internal/request_id_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace golden_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RequestIdServiceTracingConnection : public golden_v1::RequestIdServiceConnection { public: @@ -64,8 +62,6 @@ class RequestIdServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/generator/integration_tests/golden/v1/internal/request_id_tracing_stub.cc b/generator/integration_tests/golden/v1/internal/request_id_tracing_stub.cc index 5a0f6843f7994..2f908cd698ba3 100644 --- a/generator/integration_tests/golden/v1/internal/request_id_tracing_stub.cc +++ b/generator/integration_tests/golden/v1/internal/request_id_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RequestIdServiceTracingStub::RequestIdServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -125,18 +126,14 @@ future RequestIdServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRequestIdServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/generator/integration_tests/golden/v1/internal/request_id_tracing_stub.h b/generator/integration_tests/golden/v1/internal/request_id_tracing_stub.h index 49fae34d273a2..4d0ec0e9ce420 100644 --- a/generator/integration_tests/golden/v1/internal/request_id_tracing_stub.h +++ b/generator/integration_tests/golden/v1/internal/request_id_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace golden_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RequestIdServiceTracingStub : public RequestIdServiceStub { public: ~RequestIdServiceTracingStub() override = default; @@ -82,8 +83,6 @@ class RequestIdServiceTracingStub : public RequestIdServiceStub { std::shared_ptr propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -98,4 +97,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GENERATOR_INTEGRATION_TESTS_GOLDEN_V1_INTERNAL_REQUEST_ID_TRACING_STUB_H diff --git a/generator/integration_tests/golden/v1/request_id_client.h b/generator/integration_tests/golden/v1/request_id_client.h index 3176a8cb94c93..5ee58ed51ead4 100644 --- a/generator/integration_tests/golden/v1/request_id_client.h +++ b/generator/integration_tests/golden/v1/request_id_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/generator/integration_tests/golden/v1/request_id_connection.h b/generator/integration_tests/golden/v1/request_id_connection.h index 2ae948ebdc811..0370a57a271f3 100644 --- a/generator/integration_tests/golden/v1/request_id_connection.h +++ b/generator/integration_tests/golden/v1/request_id_connection.h @@ -30,8 +30,8 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "generator/integration_tests/test_request_id.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/generator/integration_tests/golden/v1/request_id_connection_idempotency_policy.h b/generator/integration_tests/golden/v1/request_id_connection_idempotency_policy.h index 1d5e01994a644..c5b3eb6e173f3 100644 --- a/generator/integration_tests/golden/v1/request_id_connection_idempotency_policy.h +++ b/generator/integration_tests/golden/v1/request_id_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "generator/integration_tests/test_request_id.grpc.pb.h" #include namespace google { diff --git a/generator/integration_tests/golden_config.textproto b/generator/integration_tests/golden_config.textproto index f86b49fb27b2d..894e152e87be0 100644 --- a/generator/integration_tests/golden_config.textproto +++ b/generator/integration_tests/golden_config.textproto @@ -40,7 +40,6 @@ service { ] generate_round_robin_decorator: true generate_rest_transport: true - forwarding_product_path: "generator/integration_tests/golden" idempotency_overrides: [ {rpc_name: "GoldenThingAdmin.DropDatabase", idempotency: IDEMPOTENT}, {rpc_name: "GoldenKitchenSink.ListLogs", idempotency: NON_IDEMPOTENT} @@ -60,6 +59,13 @@ service { ] override_service_config_yaml_name: "generator/integration_tests/test2.yaml" endpoint_location_style: LOCATION_OPTIONALLY_DEPENDENT + bespoke_methods : [ + { + name: "WaitForConsistency", + return_type: "StatusOr", + parameters: "(google::protobuf::Empty const& request, Options opts = {})" + } + ] } service { diff --git a/generator/integration_tests/tests/forwarding_headers_test.cc b/generator/integration_tests/tests/forwarding_headers_test.cc deleted file mode 100644 index 937e1a2af7b33..0000000000000 --- a/generator/integration_tests/tests/forwarding_headers_test.cc +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// In order to test backwards compatibility, we only include `golden` headers. -// We do not include any headers from `golden/v1`. -#include "generator/integration_tests/golden/golden_kitchen_sink_client.h" -#include "generator/integration_tests/golden/golden_kitchen_sink_options.h" -#include "generator/integration_tests/golden/golden_thing_admin_client.h" -#include "generator/integration_tests/golden/golden_thing_admin_options.h" -#include "generator/integration_tests/golden/mocks/mock_golden_kitchen_sink_connection.h" -#include "generator/integration_tests/golden/mocks/mock_golden_thing_admin_connection.h" -#include -#include - -namespace google { -namespace cloud { -// In order to test backwards compatibility, we only use types from the `golden` -// namespace. We do not use any types from `golden_v1` or `golden_v1_mocks`. -namespace golden { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -TEST(ForwardingHeadersTest, BackwardsCompatForGoldenThingAdmin) { - std::shared_ptr retry = - std::make_shared(5); - retry = std::make_shared( - std::chrono::minutes(5)); - std::shared_ptr idempotency = - MakeDefaultGoldenThingAdminConnectionIdempotencyPolicy(); - - auto options = - Options{} - .set(nullptr) - .set(nullptr) - .set(idempotency) - .set(retry); - - std::shared_ptr conn = - std::make_shared(); - GoldenThingAdminClient client(conn, options); - - std::function(Options)> f = - MakeGoldenThingAdminConnection; - EXPECT_TRUE(static_cast(f)); -} - -TEST(ForwardingHeadersTest, BackwardsCompatForGoldenKitchenSink) { - std::shared_ptr retry = - std::make_shared(5); - retry = std::make_shared( - std::chrono::minutes(5)); - std::shared_ptr idempotency = - MakeDefaultGoldenKitchenSinkConnectionIdempotencyPolicy(); - - auto options = - Options{} - .set(nullptr) - .set(idempotency) - .set(retry); - - std::shared_ptr conn = - std::make_shared(); - GoldenKitchenSinkClient client(conn, options); - - std::function(Options)> f = - MakeGoldenKitchenSinkConnection; - EXPECT_TRUE(static_cast(f)); -} - -} // namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace golden -} // namespace cloud -} // namespace google diff --git a/generator/integration_tests/tests/golden_kitchen_sink_client_test.cc b/generator/integration_tests/tests/golden_kitchen_sink_client_test.cc index 3e7ea494cb8a4..8ccd182c1acbf 100644 --- a/generator/integration_tests/tests/golden_kitchen_sink_client_test.cc +++ b/generator/integration_tests/tests/golden_kitchen_sink_client_test.cc @@ -21,7 +21,7 @@ #include "google/cloud/internal/time_utils.h" #include "google/cloud/testing_util/is_proto_equal.h" #include "google/cloud/testing_util/status_matchers.h" -#include +#include "google/iam/v1/policy.pb.h" #include #include #include diff --git a/generator/integration_tests/tests/golden_kitchen_sink_connection_test.cc b/generator/integration_tests/tests/golden_kitchen_sink_connection_test.cc index 5163dd758f5f9..1458a64863107 100644 --- a/generator/integration_tests/tests/golden_kitchen_sink_connection_test.cc +++ b/generator/integration_tests/tests/golden_kitchen_sink_connection_test.cc @@ -371,7 +371,6 @@ TEST(GoldenKitchenSinkConnectionTest, CheckExpectedOptions) { Contains(ContainsRegex("Unexpected option.+UnexpectedOption"))); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::DisableTracing; using ::google::cloud::testing_util::EnableTracing; using ::google::cloud::testing_util::SpanNamed; @@ -417,8 +416,6 @@ TEST(GoldenKitchenSinkConnectionTest, TracingDisabled) { "golden_v1::GoldenKitchenSinkConnection::DoNothing")))); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1 diff --git a/generator/integration_tests/tests/golden_kitchen_sink_rest_connection_test.cc b/generator/integration_tests/tests/golden_kitchen_sink_rest_connection_test.cc index ca394218f997b..572927a0119ab 100644 --- a/generator/integration_tests/tests/golden_kitchen_sink_rest_connection_test.cc +++ b/generator/integration_tests/tests/golden_kitchen_sink_rest_connection_test.cc @@ -329,7 +329,6 @@ TEST(GoldenKitchenSinkConnectionTest, CheckExpectedOptions) { Contains(ContainsRegex("Unexpected option.+UnexpectedOption"))); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::DisableTracing; using ::google::cloud::testing_util::EnableTracing; using ::google::cloud::testing_util::SpanNamed; @@ -374,8 +373,6 @@ TEST(GoldenKitchenSinkConnectionTest, TracingDisabled) { Not(Contains(SpanNamed( "golden_v1::GoldenKitchenSinkConnection::DoNothing")))); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1 diff --git a/generator/integration_tests/tests/golden_kitchen_sink_rest_stub_factory_test.cc b/generator/integration_tests/tests/golden_kitchen_sink_rest_stub_factory_test.cc index 3e32e57e54d66..596d26013872c 100644 --- a/generator/integration_tests/tests/golden_kitchen_sink_rest_stub_factory_test.cc +++ b/generator/integration_tests/tests/golden_kitchen_sink_rest_stub_factory_test.cc @@ -13,10 +13,10 @@ // limitations under the License. #include "generator/integration_tests/golden/v1/internal/golden_kitchen_sink_rest_stub_factory.h" +#include "generator/integration_tests/test.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/testing_util/scoped_log.h" #include "google/cloud/testing_util/status_matchers.h" -#include #include #include diff --git a/generator/integration_tests/tests/golden_kitchen_sink_stub_factory_test.cc b/generator/integration_tests/tests/golden_kitchen_sink_stub_factory_test.cc index 7d533ec279f03..cedcd641ae342 100644 --- a/generator/integration_tests/tests/golden_kitchen_sink_stub_factory_test.cc +++ b/generator/integration_tests/tests/golden_kitchen_sink_stub_factory_test.cc @@ -71,7 +71,6 @@ TEST(GoldenKitchenSinkStubFactoryTest, DefaultStubWithAuth) { EXPECT_THAT(response, StatusIs(StatusCode::kAborted, "fail")); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::DisableTracing; using ::google::cloud::testing_util::EnableTracing; using ::google::cloud::testing_util::SpanNamed; @@ -108,8 +107,6 @@ TEST(GoldenKitchenSinkStubFactoryTest, DefaultStubWithTracingDisabled) { "google.test.admin.database.v1.GoldenKitchenSink/DoNothing")))); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1_internal diff --git a/generator/integration_tests/tests/golden_kitchen_sink_tracing_connection_test.cc b/generator/integration_tests/tests/golden_kitchen_sink_tracing_connection_test.cc index dee9cb2a324a3..72646886eee35 100644 --- a/generator/integration_tests/tests/golden_kitchen_sink_tracing_connection_test.cc +++ b/generator/integration_tests/tests/golden_kitchen_sink_tracing_connection_test.cc @@ -32,7 +32,6 @@ using ::google::cloud::golden_v1_mocks::MockGoldenKitchenSinkConnection; using ::google::cloud::testing_util::StatusIs; using ::testing::Return; -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::DisableTracing; using ::google::cloud::testing_util::EnableTracing; using ::google::cloud::testing_util::InstallSpanCatcher; @@ -376,20 +375,6 @@ TEST(MakeGoldenKitchenSinkTracingConnection, TracingDisabled) { EXPECT_THAT(spans, IsEmpty()); } -#else - -TEST(MakeGoldenKitchenSinkTracingConnection, NoOpenTelemetry) { - auto mock = std::make_shared(); - EXPECT_CALL(*mock, DoNothing) - .WillOnce(Return(internal::AbortedError("fail"))); - - auto under_test = MakeGoldenKitchenSinkTracingConnection(mock); - auto result = under_test->DoNothing({}); - EXPECT_THAT(result, StatusIs(StatusCode::kAborted)); -} - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1_internal diff --git a/generator/integration_tests/tests/golden_kitchen_sink_tracing_stub_test.cc b/generator/integration_tests/tests/golden_kitchen_sink_tracing_stub_test.cc index 306754d8db0f4..69e6bf36d0630 100644 --- a/generator/integration_tests/tests/golden_kitchen_sink_tracing_stub_test.cc +++ b/generator/integration_tests/tests/golden_kitchen_sink_tracing_stub_test.cc @@ -33,8 +33,6 @@ namespace { using ::google::cloud::testing_util::StatusIs; using ::testing::Return; -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - using ::google::cloud::testing_util::InstallSpanCatcher; using ::google::cloud::testing_util::OTelAttribute; using ::google::cloud::testing_util::OTelContextCaptured; @@ -489,21 +487,6 @@ TEST(MakeGoldenKitchenSinkTracingStub, OpenTelemetry) { EXPECT_THAT(spans, Not(IsEmpty())); } -#else - -TEST(MakeGoldenKitchenSinkTracingStub, NoOpenTelemetry) { - auto mock = std::make_shared(); - EXPECT_CALL(*mock, DoNothing) - .WillOnce(Return(internal::AbortedError("fail"))); - - auto under_test = MakeGoldenKitchenSinkTracingStub(mock); - grpc::ClientContext context; - auto result = under_test->DoNothing(context, Options{}, {}); - EXPECT_THAT(result, StatusIs(StatusCode::kAborted)); -} - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1_internal diff --git a/generator/integration_tests/tests/golden_thing_admin_client_test.cc b/generator/integration_tests/tests/golden_thing_admin_client_test.cc index 5eecfeeaa077b..9e1b871df89a3 100644 --- a/generator/integration_tests/tests/golden_thing_admin_client_test.cc +++ b/generator/integration_tests/tests/golden_thing_admin_client_test.cc @@ -22,7 +22,7 @@ #include "google/cloud/internal/time_utils.h" #include "google/cloud/testing_util/is_proto_equal.h" #include "google/cloud/testing_util/status_matchers.h" -#include +#include "google/iam/v1/policy.pb.h" #include #include #include diff --git a/generator/integration_tests/tests/golden_thing_admin_connection_test.cc b/generator/integration_tests/tests/golden_thing_admin_connection_test.cc index f4fd6b1c543cf..ef2d6171bd9a3 100644 --- a/generator/integration_tests/tests/golden_thing_admin_connection_test.cc +++ b/generator/integration_tests/tests/golden_thing_admin_connection_test.cc @@ -1617,7 +1617,6 @@ TEST(GoldenThingAdminConnectionTest, CheckExpectedOptions) { Contains(ContainsRegex("Unexpected option.+UnexpectedOption"))); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::DisableTracing; using ::google::cloud::testing_util::EnableTracing; using ::google::cloud::testing_util::SpanNamed; @@ -1662,9 +1661,6 @@ TEST(GoldenThingAdminConnectionTest, TracingDisabled) { Not(Contains(SpanNamed( "golden_v1::GoldenThingAdminConnection::DeleteBackup")))); } - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1 diff --git a/generator/integration_tests/tests/golden_thing_admin_rest_connection_test.cc b/generator/integration_tests/tests/golden_thing_admin_rest_connection_test.cc index 3e148cc032271..721ff35c2e208 100644 --- a/generator/integration_tests/tests/golden_thing_admin_rest_connection_test.cc +++ b/generator/integration_tests/tests/golden_thing_admin_rest_connection_test.cc @@ -1678,7 +1678,6 @@ TEST(GoldenThingAdminConnectionTest, ConnectionCreatedWithOption) { EXPECT_THAT(conn->options().get(), Eq("foo")); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::DisableTracing; using ::google::cloud::testing_util::EnableTracing; using ::google::cloud::testing_util::SpanNamed; @@ -1723,8 +1722,6 @@ TEST(GoldenThingAdminConnectionTest, TracingDisabled) { Not(Contains(SpanNamed( "golden_v1::GoldenThingAdminConnection::DeleteBackup")))); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1 diff --git a/generator/integration_tests/tests/golden_thing_admin_stub_factory_test.cc b/generator/integration_tests/tests/golden_thing_admin_stub_factory_test.cc index 891b661895da2..07f5153e836a1 100644 --- a/generator/integration_tests/tests/golden_thing_admin_stub_factory_test.cc +++ b/generator/integration_tests/tests/golden_thing_admin_stub_factory_test.cc @@ -71,7 +71,6 @@ TEST(GoldenStubFactoryTest, DefaultStubWithAuth) { EXPECT_THAT(response, StatusIs(StatusCode::kAborted, "fail")); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::DisableTracing; using ::google::cloud::testing_util::EnableTracing; using ::google::cloud::testing_util::SpanNamed; @@ -109,8 +108,6 @@ TEST(GoldenStubFactoryTest, DefaultStubWithTracingDisabled) { "google.test.admin.database.v1.GoldenThingAdmin/DeleteBackup")))); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1_internal diff --git a/generator/integration_tests/tests/golden_thing_admin_tracing_connection_test.cc b/generator/integration_tests/tests/golden_thing_admin_tracing_connection_test.cc index 7e994c2abef99..348d7016d2761 100644 --- a/generator/integration_tests/tests/golden_thing_admin_tracing_connection_test.cc +++ b/generator/integration_tests/tests/golden_thing_admin_tracing_connection_test.cc @@ -32,7 +32,6 @@ using ::google::cloud::golden_v1_mocks::MockGoldenThingAdminConnection; using ::google::cloud::testing_util::StatusIs; using ::testing::Return; -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::DisableTracing; using ::google::cloud::testing_util::EnableTracing; using ::google::cloud::testing_util::InstallSpanCatcher; @@ -702,20 +701,6 @@ TEST(MakeGoldenThingAdminTracingConnection, TracingDisabled) { EXPECT_THAT(spans, IsEmpty()); } -#else - -TEST(MakeGoldenThingAdminTracingConnection, NoOpenTelemetry) { - auto mock = std::make_shared(); - EXPECT_CALL(*mock, DropDatabase) - .WillOnce(Return(internal::AbortedError("fail"))); - - auto under_test = MakeGoldenThingAdminTracingConnection(mock); - auto result = under_test->DropDatabase({}); - EXPECT_THAT(result, StatusIs(StatusCode::kAborted)); -} - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1_internal diff --git a/generator/integration_tests/tests/golden_thing_admin_tracing_stub_test.cc b/generator/integration_tests/tests/golden_thing_admin_tracing_stub_test.cc index 8ca098fdea0a8..4c01aa06805c3 100644 --- a/generator/integration_tests/tests/golden_thing_admin_tracing_stub_test.cc +++ b/generator/integration_tests/tests/golden_thing_admin_tracing_stub_test.cc @@ -26,8 +26,6 @@ namespace golden_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN namespace { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - using ::google::cloud::testing_util::InstallSpanCatcher; using ::google::cloud::testing_util::OTelAttribute; using ::google::cloud::testing_util::OTelContextCaptured; @@ -698,24 +696,6 @@ TEST(MakeGoldenThingAdminTracingStub, OpenTelemetry) { EXPECT_THAT(spans, Not(IsEmpty())); } -#else - -using ::google::cloud::testing_util::StatusIs; -using ::testing::Return; - -TEST(MakeGoldenThingAdminTracingStub, NoOpenTelemetry) { - auto mock = std::make_shared(); - EXPECT_CALL(*mock, DropDatabase) - .WillOnce(Return(internal::AbortedError("fail"))); - - auto under_test = MakeGoldenThingAdminTracingStub(mock); - grpc::ClientContext context; - auto result = under_test->DropDatabase(context, Options{}, {}); - EXPECT_THAT(result, StatusIs(StatusCode::kAborted)); -} - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1_internal diff --git a/generator/integration_tests/tests/request_id_tracing_stub_test.cc b/generator/integration_tests/tests/request_id_tracing_stub_test.cc index a92d4f28f81ee..fb4f9fbaa1562 100644 --- a/generator/integration_tests/tests/request_id_tracing_stub_test.cc +++ b/generator/integration_tests/tests/request_id_tracing_stub_test.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "generator/integration_tests/golden/v1/internal/request_id_tracing_stub.h" #include "generator/integration_tests/golden/v1/internal/request_id_connection_impl.h" #include "generator/integration_tests/golden/v1/internal/request_id_option_defaults.h" @@ -39,27 +37,16 @@ namespace { using ::google::cloud::golden_v1_testing::MockRequestIdServiceStub; using ::google::cloud::testing_util::InstallSpanCatcher; using ::google::cloud::testing_util::OTelAttribute; -using ::google::cloud::testing_util::OTelContextCaptured; using ::google::cloud::testing_util::SpanHasAttributes; -using ::google::cloud::testing_util::SpanHasInstrumentationScope; -using ::google::cloud::testing_util::SpanKindIsClient; using ::google::cloud::testing_util::SpanNamed; -using ::google::cloud::testing_util::SpanWithStatus; using ::google::cloud::testing_util::ThereIsAnActiveSpan; using ::google::cloud::testing_util::ValidatePropagator; using ::google::test::requestid::v1::CreateFooRequest; using ::google::test::requestid::v1::Foo; -using ::google::test::requestid::v1::ListFoosRequest; -using ::google::test::requestid::v1::ListFoosResponse; using ::google::test::requestid::v1::RenameFooRequest; -using ::testing::_; -using ::testing::ByMove; using ::testing::ElementsAre; -using ::testing::Eq; using ::testing::IsEmpty; using ::testing::Not; -using ::testing::ResultOf; -using ::testing::Return; Status TransientError() { return Status(StatusCode::kUnavailable, "try-again"); @@ -214,5 +201,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace golden_v1 } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/generator/internal/auth_decorator_generator.cc b/generator/internal/auth_decorator_generator.cc index 6628f4dcce822..fb8c640fe7a5b 100644 --- a/generator/internal/auth_decorator_generator.cc +++ b/generator/internal/auth_decorator_generator.cc @@ -55,7 +55,7 @@ Status AuthDecoratorGenerator::GenerateHeader() { ? "google/longrunning/operations.grpc.pb.h" : ""}); HeaderSystemIncludes({"memory", "set", "string"}); - + HeaderGrpcPortsDefInclude(); auto result = HeaderOpenNamespaces(NamespaceType::kInternal); if (!result.ok()) return result; @@ -80,6 +80,7 @@ class $auth_class_name$ : public $stub_class_name$ { )"""); HeaderCloseNamespaces(); + HeaderGrpcPortsUndefInclude(); // close header guard HeaderPrint("\n#endif // $header_include_guard$\n"); return {}; @@ -113,7 +114,7 @@ Status AuthDecoratorGenerator::GenerateCc() { }); CcProtobufGenCodeIncludes({vars("proto_grpc_header_path")}); CcSystemIncludes({"memory", "utility"}); - + CcGrpcPortsDefInclude(); auto result = CcOpenNamespaces(NamespaceType::kInternal); if (!result.ok()) return result; @@ -362,6 +363,7 @@ future $auth_class_name$::AsyncCancelOperation( } CcCloseNamespaces(); + CcGrpcPortsUndefInclude(); return {}; } diff --git a/generator/internal/client_generator.cc b/generator/internal/client_generator.cc index baa28c4995f2c..c2585c255ee97 100644 --- a/generator/internal/client_generator.cc +++ b/generator/internal/client_generator.cc @@ -20,13 +20,52 @@ #include "generator/internal/pagination.h" #include "generator/internal/predicate_utils.h" #include "generator/internal/printer.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_replace.h" +#include "google/api/client.pb.h" #include namespace google { namespace cloud { namespace generator_internal { +namespace { +std::string FormatBespokeMethodComments(std::string const& method_name) { + if (method_name == "WaitForConsistency") { + return R"""( + // clang-format off + /// + /// Polls a table until it is consistent or the RetryPolicy is exhausted based + /// on a consistency token, that is, if replication has caught up based on the + /// provided conditions specified in the token and the check request. + /// + /// @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.bigtable.admin.v2.CheckConsistencyRequest]. + /// 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 the result of the RPC. The response message type + /// ([google.bigtable.admin.v2.CheckConsistencyResponse]) + /// is mapped to a C++ class using the [Protobuf mapping rules]. + /// If the request fails, the [`StatusOr`] contains the error details. + /// + /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/ + /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator + /// [`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.bigtable.admin.v2.CheckConsistencyRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_table_admin.proto#L909} + /// [google.bigtable.admin.v2.CheckConsistencyResponse]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_table_admin.proto#L948} + /// + // clang-format on +)"""; + } + return ""; +} +} // namespace ClientGenerator::ClientGenerator( google::protobuf::ServiceDescriptor const* service_descriptor, @@ -380,6 +419,13 @@ R"""( std::unique_ptr<::google::cloud::AsyncStreamingReadWriteRpc< __FILE__, __LINE__); } + for (auto const& method : bespoke_methods()) { + HeaderPrint("\n"); + HeaderPrint(FormatBespokeMethodComments(method.name())); + HeaderPrint(absl::StrCat(method.return_type(), " ", method.name(), + method.parameters(), ";")); + } + HeaderPrint( // clang-format off "\n" " private:\n" @@ -716,6 +762,19 @@ std::unique_ptr<::google::cloud::AsyncStreamingReadWriteRpc< __FILE__, __LINE__); } + for (auto const& method : bespoke_methods()) { + CcPrint("\n"); + CcPrint(absl::StrCat( + method.return_type(), R"""( $client_class_name$::)""", method.name(), + absl::StrReplaceAll(method.parameters(), {{" = {}", ""}}), + absl::StrFormat(R"""( { + internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_)); + return connection_->%s(request); +} +)""", + method.name()))); + } + CcCloseNamespaces(); return {}; } diff --git a/generator/internal/codegen_utils.cc b/generator/internal/codegen_utils.cc index 9d347017daaf2..3e5be23b867d1 100644 --- a/generator/internal/codegen_utils.cc +++ b/generator/internal/codegen_utils.cc @@ -14,12 +14,12 @@ #include "generator/internal/codegen_utils.h" #include "generator/internal/scaffold_generator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_join_quiet.h" -#include "google/cloud/internal/absl_str_replace_quiet.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/log.h" #include "absl/strings/match.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "absl/strings/str_replace.h" #include "absl/strings/str_split.h" #include "absl/time/clock.h" #include "absl/time/time.h" @@ -111,6 +111,11 @@ void ProcessArgOmitRpc( ProcessRepeated("omit_rpc", "omitted_rpcs", command_line_args); } +void ProcessArgBespokeMethod( + std::vector>& command_line_args) { + ProcessRepeated("bespoke_method", "bespoke_methods", command_line_args); +} + void ProcessArgServiceEndpointEnvVar( std::vector>& command_line_args) { auto service_endpoint_env_var = @@ -165,16 +170,6 @@ void ProcessArgAdditionalProtoFiles( command_line_args); } -void ProcessArgForwardingProductPath( - std::vector>& command_line_args) { - auto path = std::find_if(command_line_args.begin(), command_line_args.end(), - [](std::pair const& p) { - return p.first == "forwarding_product_path"; - }); - if (path == command_line_args.end() || path->second.empty()) return; - FormatProductPath(path->second); -} - void ProcessArgIdempotencyOverride( std::vector>& command_line_args) { ProcessRepeated("idempotency_override", "idempotency_overrides", @@ -279,13 +274,13 @@ ProcessCommandLineArgs(std::string const& parameters) { ProcessArgCopyrightYear(command_line_args); ProcessArgOmitService(command_line_args); ProcessArgOmitRpc(command_line_args); + ProcessArgBespokeMethod(command_line_args); ProcessArgServiceEndpointEnvVar(command_line_args); ProcessArgEmulatorEndpointEnvVar(command_line_args); ProcessArgEndpointLocationStyle(command_line_args); ProcessArgGenerateAsyncRpc(command_line_args); ProcessArgRetryGrpcStatusCode(command_line_args); ProcessArgAdditionalProtoFiles(command_line_args); - ProcessArgForwardingProductPath(command_line_args); ProcessArgIdempotencyOverride(command_line_args); ProcessArgServiceNameMapping(command_line_args); ProcessArgServiceNameToComment(command_line_args); diff --git a/generator/internal/codegen_utils_test.cc b/generator/internal/codegen_utils_test.cc index 930ca5ebd2273..de160074187a7 100644 --- a/generator/internal/codegen_utils_test.cc +++ b/generator/internal/codegen_utils_test.cc @@ -13,8 +13,8 @@ // limitations under the License. #include "generator/internal/codegen_utils.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/testing_util/status_matchers.h" +#include "absl/strings/str_cat.h" #include "absl/time/clock.h" #include "absl/time/time.h" #include @@ -265,16 +265,6 @@ TEST(ProcessCommandLineArgs, ProcessArgAsyncOnlyRpc) { Contains(Pair("gen_async_rpcs", HasSubstr("AsyncOnly")))); } -TEST(ProcessCommandLineArgs, ProcessArgNamespaceAlias) { - auto result = ProcessCommandLineArgs( - ",product_path=google/cloud/spanner/" - ",emulator_endpoint_env_var=SPANNER_EMULATOR_HOST" - ",backwards_compatibility_namespace_alias=true"); - ASSERT_THAT(result, IsOk()); - EXPECT_THAT(*result, Contains(Pair("backwards_compatibility_namespace_alias", - HasSubstr("true")))); -} - TEST(ProcessCommandLineArgs, ProcessOmitClient) { auto result = ProcessCommandLineArgs( "product_path=google/cloud/spanner/" @@ -333,15 +323,6 @@ TEST(ProcessCommandLineArgs, ProcessExperimental) { EXPECT_THAT(*result, Contains(Pair("experimental", "true"))); } -TEST(ProcessCommandLineArgs, ProcessArgForwardingProductPath) { - auto result = ProcessCommandLineArgs( - "product_path=/google/cloud/spanner/v1" - ",forwarding_product_path=google/cloud/spanner"); - ASSERT_THAT(result, IsOk()); - EXPECT_THAT(*result, Contains(Pair("forwarding_product_path", - "google/cloud/spanner/"))); -} - TEST(ProcessCommandLineArgs, ProcessServiceNameMapping) { auto result = ProcessCommandLineArgs( "product_path=google/cloud/pubsub/" diff --git a/generator/internal/connection_generator.cc b/generator/internal/connection_generator.cc index 660fda650c8bd..b45cc3d46b638 100644 --- a/generator/internal/connection_generator.cc +++ b/generator/internal/connection_generator.cc @@ -19,6 +19,7 @@ #include "generator/internal/pagination.h" #include "generator/internal/predicate_utils.h" #include "generator/internal/printer.h" +#include "absl/strings/str_replace.h" #include "absl/strings/str_split.h" #include @@ -315,6 +316,14 @@ class $connection_class_name$ { __FILE__, __LINE__); } + for (auto const& method : bespoke_methods()) { + HeaderPrint("\n"); + HeaderPrint(absl::StrCat( + " virtual ", method.return_type(), " ", method.name(), + absl::StrReplaceAll(method.parameters(), {{", Options opts = {}", ""}}), + ";\n")); + } + // close abstract interface Connection base class HeaderPrint("};\n"); @@ -490,27 +499,31 @@ future> __FILE__, __LINE__); } + for (auto const& method : bespoke_methods()) { + CcPrint("\n"); + std::string make_return = + absl::StrContains(method.return_type(), "future") + ? absl::StrCat("google::cloud::make_ready_", method.return_type()) + : method.return_type(); + + CcPrint( + absl::StrCat(method.return_type(), R"""( $connection_class_name$::)""", + method.name(), + absl::StrReplaceAll(method.parameters(), + {{" request, Options opts = {}", ""}}), + " {\n", + absl::StrFormat(R"""( return %s( + Status(StatusCode::kUnimplemented, "not implemented")); +} +)""", + make_return))); + } + if (HasGenerateGrpcTransport()) { EmitFactoryFunctionDefinition(EndpointLocationStyle()); } CcCloseNamespaces(); - - // TODO(#8234): This is a special case for backwards compatibility of the - // streaming update function. - if (vars().at("service_name") == "BigQueryRead") { - CcOpenForwardingNamespaces(); - CcPrint(R"""( -void BigQueryReadReadRowsStreamingUpdater( - google::cloud::bigquery::storage::v1::ReadRowsResponse const& response, - google::cloud::bigquery::storage::v1::ReadRowsRequest& request) { - return bigquery_storage_v1_internal::BigQueryReadReadRowsStreamingUpdater(response, - request); -} -)"""); - CcCloseNamespaces(); - } - return {}; } diff --git a/generator/internal/connection_impl_generator.cc b/generator/internal/connection_impl_generator.cc index 7823cdcc81fa1..cb1ac65aa51a7 100644 --- a/generator/internal/connection_impl_generator.cc +++ b/generator/internal/connection_impl_generator.cc @@ -18,7 +18,8 @@ #include "generator/internal/pagination.h" #include "generator/internal/predicate_utils.h" #include "generator/internal/printer.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_replace.h" #include namespace google { @@ -120,6 +121,14 @@ class $connection_class_name$Impl HeaderPrintMethod(method, __FILE__, __LINE__, AsyncMethodDeclaration()); } + for (auto const& method : bespoke_methods()) { + HeaderPrint("\n"); + HeaderPrint(absl::StrCat( + method.return_type(), " ", method.name(), + absl::StrReplaceAll(method.parameters(), {{", Options opts = {}", ""}}), + " override;")); + } + HeaderPrint(R"""( private: std::unique_ptr background_; diff --git a/generator/internal/connection_impl_rest_generator.cc b/generator/internal/connection_impl_rest_generator.cc index b4f1b168f2b38..b0b6e7b16405d 100644 --- a/generator/internal/connection_impl_rest_generator.cc +++ b/generator/internal/connection_impl_rest_generator.cc @@ -19,7 +19,7 @@ #include "generator/internal/pagination.h" #include "generator/internal/predicate_utils.h" #include "generator/internal/printer.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" +#include "absl/strings/str_cat.h" #include namespace google { diff --git a/generator/internal/descriptor_utils.cc b/generator/internal/descriptor_utils.cc index 342a1d7dd9cba..88580bccb56f0 100644 --- a/generator/internal/descriptor_utils.cc +++ b/generator/internal/descriptor_utils.cc @@ -26,19 +26,19 @@ #include "generator/internal/resolve_method_return.h" #include "generator/internal/routing.h" #include "generator/internal/scaffold_generator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_join_quiet.h" -#include "google/cloud/internal/absl_str_replace_quiet.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/log.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "absl/strings/str_replace.h" #include "absl/strings/str_split.h" #include "absl/strings/strip.h" #include "absl/types/variant.h" -#include -#include -#include -#include +#include "google/api/annotations.pb.h" +#include "google/api/http.pb.h" +#include "google/api/routing.pb.h" +#include "google/longrunning/operations.pb.h" #include #include #include diff --git a/generator/internal/descriptor_utils_test.cc b/generator/internal/descriptor_utils_test.cc index 467251f6d2a0d..3726301a8c199 100644 --- a/generator/internal/descriptor_utils_test.cc +++ b/generator/internal/descriptor_utils_test.cc @@ -17,11 +17,11 @@ #include "generator/testing/error_collectors.h" #include "generator/testing/fake_source_tree.h" #include "generator/testing/printer_mocks.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/testing_util/status_matchers.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_split.h" +#include "google/protobuf/descriptor.pb.h" #include -#include #include #include #include @@ -221,43 +221,6 @@ TEST_F(CreateServiceVarsTest, AdditionalGrpcHeaderPathsEmpty) { EXPECT_THAT(iter->second, Eq("")); } -TEST_F(CreateServiceVarsTest, ForwardingHeaderPaths) { - FileDescriptor const* service_file_descriptor = - pool_.FindFileByName("google/cloud/frobber/v1/frobber.proto"); - service_vars_ = CreateServiceVars( - *service_file_descriptor->service(0), - {std::make_pair("product_path", "google/cloud/frobber/v1/"), - std::make_pair("forwarding_product_path", "google/cloud/frobber/")}); - EXPECT_THAT( - service_vars_, - AllOf(Contains(Pair("forwarding_client_header_path", - "google/cloud/frobber/frobber_client.h")), - Contains(Pair("forwarding_connection_header_path", - "google/cloud/frobber/frobber_connection.h")), - Contains(Pair("forwarding_idempotency_policy_header_path", - "google/cloud/frobber/" - "frobber_connection_idempotency_policy.h")), - Contains( - Pair("forwarding_mock_connection_header_path", - "google/cloud/frobber/mocks/mock_frobber_connection.h")), - Contains(Pair("forwarding_options_header_path", - "google/cloud/frobber/frobber_options.h")))); - EXPECT_THAT( - service_vars_, - AllOf(Contains(Pair("client_header_path", - "google/cloud/frobber/v1/frobber_client.h")), - Contains(Pair("connection_header_path", - "google/cloud/frobber/v1/frobber_connection.h")), - Contains(Pair("idempotency_policy_header_path", - "google/cloud/frobber/v1/" - "frobber_connection_idempotency_policy.h")), - Contains(Pair( - "mock_connection_header_path", - "google/cloud/frobber/v1/mocks/mock_frobber_connection.h")), - Contains(Pair("options_header_path", - "google/cloud/frobber/v1/frobber_options.h")))); -} - TEST_F(CreateServiceVarsTest, MixinProtoHeaderPaths) { FileDescriptor const* file = pool_.FindFileByName("google/cloud/frobber/v1/frobber.proto"); diff --git a/generator/internal/discovery_file.cc b/generator/internal/discovery_file.cc index e76ca853afec0..370c7e5c300d6 100644 --- a/generator/internal/discovery_file.cc +++ b/generator/internal/discovery_file.cc @@ -14,8 +14,8 @@ #include "generator/internal/discovery_file.h" #include "generator/internal/codegen_utils.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "absl/strings/str_format.h" +#include "absl/strings/str_join.h" #include #include #include @@ -62,8 +62,8 @@ Status DiscoveryFile::FormatFile( {"version", document_properties.version}}; google::protobuf::io::OstreamOutputStream output(&output_stream); google::protobuf::io::Printer printer(&output, '$'); - printer.Print(vars, CopyrightLicenseFileHeader().c_str()); - printer.Print(vars, GeneratedProtoPreamble().c_str()); + printer.Print(vars, CopyrightLicenseFileHeader()); + printer.Print(vars, GeneratedProtoPreamble()); printer.Print(vars, R"""( syntax = "proto3"; @@ -73,7 +73,7 @@ package $package_name$; if (!import_paths_.empty()) { printer.Print("\n"); for (auto const& path : import_paths_) { - printer.Print(vars, absl::StrFormat("import \"%s\";\n", path).c_str()); + printer.Print(vars, absl::StrFormat("import \"%s\";\n", path)); } } @@ -84,14 +84,14 @@ package $package_name$; if (!service_definition) { return std::move(service_definition).status(); } - printer.Print(vars, std::move(service_definition)->c_str()); + printer.Print(vars, *service_definition); } for (auto const& t : types_) { auto message = t->JsonToProtobufMessage(types, package_name_); if (!message) return std::move(message).status(); printer.Print("\n"); - printer.Print(vars, std::move(message)->c_str()); + printer.Print(vars, *message); } return {}; diff --git a/generator/internal/discovery_file_test.cc b/generator/internal/discovery_file_test.cc index b7f0f08bf7dba..fcc54f67381c9 100644 --- a/generator/internal/discovery_file_test.cc +++ b/generator/internal/discovery_file_test.cc @@ -15,8 +15,8 @@ #include "generator/internal/discovery_file.h" #include "generator/internal/codegen_utils.h" #include "generator/testing/descriptor_pool_fixture.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/testing_util/status_matchers.h" +#include "absl/strings/str_cat.h" #include namespace google { diff --git a/generator/internal/discovery_proto_export_file.cc b/generator/internal/discovery_proto_export_file.cc index cecd30328e852..248328a71a506 100644 --- a/generator/internal/discovery_proto_export_file.cc +++ b/generator/internal/discovery_proto_export_file.cc @@ -14,8 +14,8 @@ #include "generator/internal/discovery_proto_export_file.h" #include "generator/internal/codegen_utils.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_replace_quiet.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_replace.h" #include #include #include @@ -55,9 +55,9 @@ Status DiscoveryProtoExportFile::FormatFile(std::ostream& output_stream) const { )"""); printer.Print("// IWYU pragma: begin_exports\n"); for (auto const& p : proto_includes_) { - printer.Print("#include <"); + printer.Print("#include \""); printer.Print(absl::StrReplaceAll(p, {{".proto", ".pb.h"}})); - printer.Print(">\n"); + printer.Print("\"\n"); } printer.Print("// IWYU pragma: end_exports\n"); printer.Print(vars, R"""( diff --git a/generator/internal/discovery_proto_export_file_test.cc b/generator/internal/discovery_proto_export_file_test.cc index 13f079b131d9d..1942f0853e370 100644 --- a/generator/internal/discovery_proto_export_file_test.cc +++ b/generator/internal/discovery_proto_export_file_test.cc @@ -14,8 +14,8 @@ #include "generator/internal/discovery_proto_export_file.h" #include "generator/internal/codegen_utils.h" -#include "google/cloud/internal/absl_str_replace_quiet.h" #include "google/cloud/testing_util/status_matchers.h" +#include "absl/strings/str_replace.h" #include namespace google { @@ -55,8 +55,8 @@ TEST(DiscoveryProtoExportFileTest, FormatFile) { #define GOOGLE_CLOUD_CPP_RELATIVE_FILE_PATH_H // IWYU pragma: begin_exports -#include -#include +#include "google/cloud/compute/v1/internal/common_001.pb.h" +#include "google/cloud/compute/v1/internal/common_002.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_RELATIVE_FILE_PATH_H diff --git a/generator/internal/discovery_resource.cc b/generator/internal/discovery_resource.cc index b97488bdf6cdc..ce1ec18dd3b1a 100644 --- a/generator/internal/discovery_resource.cc +++ b/generator/internal/discovery_resource.cc @@ -14,13 +14,13 @@ #include "generator/internal/discovery_resource.h" #include "generator/internal/codegen_utils.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_join_quiet.h" -#include "google/cloud/internal/absl_str_replace_quiet.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/make_status.h" #include "absl/strings/ascii.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" +#include "absl/strings/str_join.h" +#include "absl/strings/str_replace.h" #include "absl/strings/str_split.h" #include diff --git a/generator/internal/discovery_to_proto.cc b/generator/internal/discovery_to_proto.cc index 520ae6a4dc4a7..da7bca5d10de9 100644 --- a/generator/internal/discovery_to_proto.cc +++ b/generator/internal/discovery_to_proto.cc @@ -17,15 +17,15 @@ #include "generator/internal/discovery_proto_export_file.h" #include "generator/internal/discovery_resource.h" #include "generator/internal/discovery_type_vertex.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/log.h" #include "google/cloud/status_or.h" #include "absl/strings/match.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" +#include "absl/strings/str_join.h" #include "absl/strings/str_split.h" #include #include diff --git a/generator/internal/discovery_type_vertex.cc b/generator/internal/discovery_type_vertex.cc index c29683c7cc2a4..645adb402a9f0 100644 --- a/generator/internal/discovery_type_vertex.cc +++ b/generator/internal/discovery_type_vertex.cc @@ -14,15 +14,15 @@ #include "generator/internal/discovery_type_vertex.h" #include "generator/internal/codegen_utils.h" -#include "google/cloud/internal/absl_str_join_quiet.h" -#include "google/cloud/internal/absl_str_replace_quiet.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/log.h" #include "absl/strings/str_format.h" +#include "absl/strings/str_join.h" +#include "absl/strings/str_replace.h" #include "absl/strings/str_split.h" #include "absl/types/optional.h" -#include +#include "google/protobuf/descriptor.pb.h" #include #include diff --git a/generator/internal/doxygen.cc b/generator/internal/doxygen.cc index 777c5d35088eb..4066e429b85e3 100644 --- a/generator/internal/doxygen.cc +++ b/generator/internal/doxygen.cc @@ -14,7 +14,7 @@ #include "generator/internal/doxygen.h" #include "generator/internal/codegen_utils.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" +#include "absl/strings/str_cat.h" namespace google { namespace cloud { diff --git a/generator/internal/format_class_comments.cc b/generator/internal/format_class_comments.cc index 5ad6e1659e535..b6f82500c1328 100644 --- a/generator/internal/format_class_comments.cc +++ b/generator/internal/format_class_comments.cc @@ -14,9 +14,9 @@ #include "generator/internal/format_class_comments.h" #include "generator/internal/resolve_comment_references.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_replace_quiet.h" #include "google/cloud/log.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_replace.h" #include "absl/strings/strip.h" #include diff --git a/generator/internal/format_method_comments.cc b/generator/internal/format_method_comments.cc index 3e3be6647b204..9780926dfcabf 100644 --- a/generator/internal/format_method_comments.cc +++ b/generator/internal/format_method_comments.cc @@ -20,11 +20,11 @@ #include "generator/internal/predicate_utils.h" #include "generator/internal/resolve_comment_references.h" #include "generator/internal/resolve_method_return.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_replace_quiet.h" #include "google/cloud/log.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_replace.h" #include "absl/strings/string_view.h" -#include +#include "google/longrunning/operations.pb.h" #include #include #include diff --git a/generator/internal/forwarding_client_generator.cc b/generator/internal/forwarding_client_generator.cc deleted file mode 100644 index 73bfff5530528..0000000000000 --- a/generator/internal/forwarding_client_generator.cc +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "generator/internal/forwarding_client_generator.h" - -namespace google { -namespace cloud { -namespace generator_internal { - -ForwardingClientGenerator::ForwardingClientGenerator( - google::protobuf::ServiceDescriptor const* service_descriptor, - VarsDictionary service_vars, - std::map service_method_vars, - google::protobuf::compiler::GeneratorContext* context, - std::vector const& mixin_methods) - : ServiceCodeGenerator("forwarding_client_header_path", service_descriptor, - std::move(service_vars), - std::move(service_method_vars), context, - mixin_methods) {} - -Status ForwardingClientGenerator::GenerateHeader() { - HeaderPrint(CopyrightLicenseFileHeader()); - HeaderPrint(R"""( -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: $proto_file_name$ - -#ifndef $header_include_guard$ -#define $header_include_guard$ - -)"""); - - // includes - HeaderLocalIncludes({ - vars("forwarding_connection_header_path"), - vars("client_header_path"), - }); - - auto result = HeaderOpenForwardingNamespaces(NamespaceType::kNormal, R"""( -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in $product_namespace$ instead of the aliases defined in -/// this namespace.)"""); - if (!result.ok()) return result; - - // forwards - HeaderPrint( - R"""( -/// @deprecated Use $product_namespace$::$client_class_name$ directly. -using ::google::cloud::$product_namespace$::$client_class_name$; -)"""); - - HeaderCloseNamespaces(); - // close header guard - HeaderPrint(R"""( -#endif // $header_include_guard$ -)"""); - return {}; -} - -} // namespace generator_internal -} // namespace cloud -} // namespace google diff --git a/generator/internal/forwarding_client_generator.h b/generator/internal/forwarding_client_generator.h deleted file mode 100644 index 6a348197eda17..0000000000000 --- a/generator/internal/forwarding_client_generator.h +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GENERATOR_INTERNAL_FORWARDING_CLIENT_GENERATOR_H -#define GOOGLE_CLOUD_CPP_GENERATOR_INTERNAL_FORWARDING_CLIENT_GENERATOR_H - -#include "generator/internal/service_code_generator.h" -#include "google/cloud/status.h" -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace generator_internal { - -/** - * Generates the forwarding header file for a Client class for a particular - * service. - */ -class ForwardingClientGenerator : public ServiceCodeGenerator { - public: - ForwardingClientGenerator( - google::protobuf::ServiceDescriptor const* service_descriptor, - VarsDictionary service_vars, - std::map service_method_vars, - google::protobuf::compiler::GeneratorContext* context, - std::vector const& mixin_methods); - - ~ForwardingClientGenerator() override = default; - - ForwardingClientGenerator(ForwardingClientGenerator const&) = delete; - ForwardingClientGenerator& operator=(ForwardingClientGenerator const&) = - delete; - ForwardingClientGenerator(ForwardingClientGenerator&&) = default; - ForwardingClientGenerator& operator=(ForwardingClientGenerator&&) = default; - - private: - Status GenerateHeader() override; - Status GenerateCc() override { return Status(); } -}; - -} // namespace generator_internal -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GENERATOR_INTERNAL_FORWARDING_CLIENT_GENERATOR_H diff --git a/generator/internal/forwarding_connection_generator.cc b/generator/internal/forwarding_connection_generator.cc deleted file mode 100644 index 8447ed3dbf0d7..0000000000000 --- a/generator/internal/forwarding_connection_generator.cc +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "generator/internal/forwarding_connection_generator.h" - -namespace google { -namespace cloud { -namespace generator_internal { - -ForwardingConnectionGenerator::ForwardingConnectionGenerator( - google::protobuf::ServiceDescriptor const* service_descriptor, - VarsDictionary service_vars, - std::map service_method_vars, - google::protobuf::compiler::GeneratorContext* context, - std::vector const& mixin_methods) - : ServiceCodeGenerator("forwarding_connection_header_path", - service_descriptor, std::move(service_vars), - std::move(service_method_vars), context, - mixin_methods) {} - -Status ForwardingConnectionGenerator::GenerateHeader() { - HeaderPrint(CopyrightLicenseFileHeader()); - HeaderPrint(R"""( -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: $proto_file_name$ - -#ifndef $header_include_guard$ -#define $header_include_guard$ - -)"""); - - // includes - HeaderLocalIncludes({ - vars("forwarding_idempotency_policy_header_path"), - vars("connection_header_path"), - }); - - auto result = HeaderOpenForwardingNamespaces(); - if (!result.ok()) return result; - - HeaderPrint( - R"""( -/// @deprecated Use $product_namespace$::Make$connection_class_name$ directly. -using ::google::cloud::$product_namespace$::Make$connection_class_name$; - -/// @deprecated Use $product_namespace$::$connection_class_name$ directly. -using ::google::cloud::$product_namespace$::$connection_class_name$; - -/// @deprecated Use $product_namespace$::$limited_error_count_retry_policy_name$ directly. -using ::google::cloud::$product_namespace$::$limited_error_count_retry_policy_name$; - -/// @deprecated Use $product_namespace$::$limited_time_retry_policy_name$ directly. -using ::google::cloud::$product_namespace$::$limited_time_retry_policy_name$; - -/// @deprecated Use $product_namespace$::$retry_policy_name$ directly. -using ::google::cloud::$product_namespace$::$retry_policy_name$; -)"""); - - // TODO(#8234): This is a special case for backwards compatibility of the - // streaming update function. - if (vars().at("service_name") == "BigQueryRead") { - // streaming updater functions - for (auto const& method : methods()) { - HeaderPrintMethod( - method, - {MethodPattern( - {// clang-format off - {"\n" - "GOOGLE_CLOUD_CPP_DEPRECATED(\n" - " \"applications should not need this.\"\n" - " \" Please file a bug at https://github.com/googleapis/google-cloud-cpp\"\n" - " \" if you do.\")" - "void $service_name$$method_name$StreamingUpdater(\n" - " $response_type$ const& response,\n" - " $request_type$& request);\n"} - }, IsStreamingRead)}, - // clang-format on - __FILE__, __LINE__); - } - } - - HeaderCloseNamespaces(); - // close header guard - HeaderPrint(R"""( -#endif // $header_include_guard$ -)"""); - return {}; -} - -} // namespace generator_internal -} // namespace cloud -} // namespace google diff --git a/generator/internal/forwarding_connection_generator.h b/generator/internal/forwarding_connection_generator.h deleted file mode 100644 index 35a82254f4990..0000000000000 --- a/generator/internal/forwarding_connection_generator.h +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GENERATOR_INTERNAL_FORWARDING_CONNECTION_GENERATOR_H -#define GOOGLE_CLOUD_CPP_GENERATOR_INTERNAL_FORWARDING_CONNECTION_GENERATOR_H - -#include "generator/internal/service_code_generator.h" -#include "google/cloud/status.h" -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace generator_internal { - -/** - * Generates the forwarding header file for a Connection class for a particular - * service. - */ -class ForwardingConnectionGenerator : public ServiceCodeGenerator { - public: - ForwardingConnectionGenerator( - google::protobuf::ServiceDescriptor const* service_descriptor, - VarsDictionary service_vars, - std::map service_method_vars, - google::protobuf::compiler::GeneratorContext* context, - std::vector const& mixin_methods); - - ~ForwardingConnectionGenerator() override = default; - - ForwardingConnectionGenerator(ForwardingConnectionGenerator const&) = delete; - ForwardingConnectionGenerator& operator=( - ForwardingConnectionGenerator const&) = delete; - ForwardingConnectionGenerator(ForwardingConnectionGenerator&&) = default; - ForwardingConnectionGenerator& operator=(ForwardingConnectionGenerator&&) = - default; - - private: - Status GenerateHeader() override; - Status GenerateCc() override { return Status(); } -}; - -} // namespace generator_internal -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GENERATOR_INTERNAL_FORWARDING_CONNECTION_GENERATOR_H diff --git a/generator/internal/forwarding_idempotency_policy_generator.cc b/generator/internal/forwarding_idempotency_policy_generator.cc deleted file mode 100644 index 3fbab6c018141..0000000000000 --- a/generator/internal/forwarding_idempotency_policy_generator.cc +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "generator/internal/forwarding_idempotency_policy_generator.h" - -namespace google { -namespace cloud { -namespace generator_internal { - -ForwardingIdempotencyPolicyGenerator::ForwardingIdempotencyPolicyGenerator( - google::protobuf::ServiceDescriptor const* service_descriptor, - VarsDictionary service_vars, - std::map service_method_vars, - google::protobuf::compiler::GeneratorContext* context, - std::vector const& mixin_methods) - : ServiceCodeGenerator("forwarding_idempotency_policy_header_path", - service_descriptor, std::move(service_vars), - std::move(service_method_vars), context, - mixin_methods) {} - -Status ForwardingIdempotencyPolicyGenerator::GenerateHeader() { - HeaderPrint(CopyrightLicenseFileHeader()); - HeaderPrint(R"""( -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: $proto_file_name$ - -#ifndef $header_include_guard$ -#define $header_include_guard$ - -)"""); - - // includes - HeaderLocalIncludes({ - vars("idempotency_policy_header_path"), - }); - - auto result = HeaderOpenForwardingNamespaces(); - if (!result.ok()) return result; - - // forwards - HeaderPrint( - R"""( -/// @deprecated Use $product_namespace$::MakeDefault$idempotency_class_name$ directly. -using ::google::cloud::$product_namespace$::MakeDefault$idempotency_class_name$; - -/// @deprecated Use $product_namespace$::$idempotency_class_name$ directly. -using ::google::cloud::$product_namespace$::$idempotency_class_name$; -)"""); - - HeaderCloseNamespaces(); - // close header guard - HeaderPrint(R"""( -#endif // $header_include_guard$ -)"""); - return {}; -} - -} // namespace generator_internal -} // namespace cloud -} // namespace google diff --git a/generator/internal/forwarding_idempotency_policy_generator.h b/generator/internal/forwarding_idempotency_policy_generator.h deleted file mode 100644 index 6411d109ae8eb..0000000000000 --- a/generator/internal/forwarding_idempotency_policy_generator.h +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GENERATOR_INTERNAL_FORWARDING_IDEMPOTENCY_POLICY_GENERATOR_H -#define GOOGLE_CLOUD_CPP_GENERATOR_INTERNAL_FORWARDING_IDEMPOTENCY_POLICY_GENERATOR_H - -#include "generator/internal/service_code_generator.h" -#include "google/cloud/status.h" -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace generator_internal { - -/** - * Generates the forwarding header file for a IdempotencyPolicy class for a - * particular service. - */ -class ForwardingIdempotencyPolicyGenerator : public ServiceCodeGenerator { - public: - ForwardingIdempotencyPolicyGenerator( - google::protobuf::ServiceDescriptor const* service_descriptor, - VarsDictionary service_vars, - std::map service_method_vars, - google::protobuf::compiler::GeneratorContext* context, - std::vector const& mixin_methods); - - ~ForwardingIdempotencyPolicyGenerator() override = default; - - ForwardingIdempotencyPolicyGenerator( - ForwardingIdempotencyPolicyGenerator const&) = delete; - ForwardingIdempotencyPolicyGenerator& operator=( - ForwardingIdempotencyPolicyGenerator const&) = delete; - ForwardingIdempotencyPolicyGenerator(ForwardingIdempotencyPolicyGenerator&&) = - default; - ForwardingIdempotencyPolicyGenerator& operator=( - ForwardingIdempotencyPolicyGenerator&&) = default; - - private: - Status GenerateHeader() override; - Status GenerateCc() override { return Status(); } -}; - -} // namespace generator_internal -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GENERATOR_INTERNAL_FORWARDING_IDEMPOTENCY_POLICY_GENERATOR_H diff --git a/generator/internal/forwarding_mock_connection_generator.cc b/generator/internal/forwarding_mock_connection_generator.cc deleted file mode 100644 index 4b8cce6971407..0000000000000 --- a/generator/internal/forwarding_mock_connection_generator.cc +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "generator/internal/forwarding_mock_connection_generator.h" - -namespace google { -namespace cloud { -namespace generator_internal { - -ForwardingMockConnectionGenerator::ForwardingMockConnectionGenerator( - google::protobuf::ServiceDescriptor const* service_descriptor, - VarsDictionary service_vars, - std::map service_method_vars, - google::protobuf::compiler::GeneratorContext* context, - std::vector const& mixin_methods) - : ServiceCodeGenerator("forwarding_mock_connection_header_path", - service_descriptor, std::move(service_vars), - std::move(service_method_vars), context, - mixin_methods) {} - -Status ForwardingMockConnectionGenerator::GenerateHeader() { - HeaderPrint(CopyrightLicenseFileHeader()); - HeaderPrint(R"""( -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: $proto_file_name$ - -#ifndef $header_include_guard$ -#define $header_include_guard$ - -)"""); - - // includes - HeaderLocalIncludes({ - vars("mock_connection_header_path"), - vars("forwarding_connection_header_path"), - }); - - auto result = HeaderOpenForwardingNamespaces(NamespaceType::kMocks, R"""( -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in $product_namespace$_mocks instead of the aliases -/// defined in this namespace.)"""); - if (!result.ok()) return result; - - HeaderPrint( - R"""( -/// @deprecated Use $product_namespace$_mocks::$mock_connection_class_name$ directly. -using ::google::cloud::$product_namespace$_mocks::$mock_connection_class_name$; -)"""); - - HeaderCloseNamespaces(); - // close header guard - HeaderPrint(R"""( -#endif // $header_include_guard$ -)"""); - return {}; -} - -} // namespace generator_internal -} // namespace cloud -} // namespace google diff --git a/generator/internal/forwarding_mock_connection_generator.h b/generator/internal/forwarding_mock_connection_generator.h deleted file mode 100644 index 04b01445c3329..0000000000000 --- a/generator/internal/forwarding_mock_connection_generator.h +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GENERATOR_INTERNAL_FORWARDING_MOCK_CONNECTION_GENERATOR_H -#define GOOGLE_CLOUD_CPP_GENERATOR_INTERNAL_FORWARDING_MOCK_CONNECTION_GENERATOR_H - -#include "generator/internal/service_code_generator.h" -#include "google/cloud/status.h" -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace generator_internal { - -/** - * Generates the forwarding header file for a MockConnection class for a - * particular service. - */ -class ForwardingMockConnectionGenerator : public ServiceCodeGenerator { - public: - ForwardingMockConnectionGenerator( - google::protobuf::ServiceDescriptor const* service_descriptor, - VarsDictionary service_vars, - std::map service_method_vars, - google::protobuf::compiler::GeneratorContext* context, - std::vector const& mixin_methods); - - ~ForwardingMockConnectionGenerator() override = default; - - ForwardingMockConnectionGenerator(ForwardingMockConnectionGenerator const&) = - delete; - ForwardingMockConnectionGenerator& operator=( - ForwardingMockConnectionGenerator const&) = delete; - ForwardingMockConnectionGenerator(ForwardingMockConnectionGenerator&&) = - default; - ForwardingMockConnectionGenerator& operator=( - ForwardingMockConnectionGenerator&&) = default; - - private: - Status GenerateHeader() override; - Status GenerateCc() override { return Status(); } -}; - -} // namespace generator_internal -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GENERATOR_INTERNAL_FORWARDING_MOCK_CONNECTION_GENERATOR_H diff --git a/generator/internal/forwarding_options_generator.cc b/generator/internal/forwarding_options_generator.cc deleted file mode 100644 index d79882fad809e..0000000000000 --- a/generator/internal/forwarding_options_generator.cc +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "generator/internal/forwarding_options_generator.h" - -namespace google { -namespace cloud { -namespace generator_internal { - -ForwardingOptionsGenerator::ForwardingOptionsGenerator( - google::protobuf::ServiceDescriptor const* service_descriptor, - VarsDictionary service_vars, - std::map service_method_vars, - google::protobuf::compiler::GeneratorContext* context, - std::vector const& mixin_methods) - : ServiceCodeGenerator("forwarding_options_header_path", service_descriptor, - std::move(service_vars), - std::move(service_method_vars), context, - mixin_methods) {} - -Status ForwardingOptionsGenerator::GenerateHeader() { - HeaderPrint(CopyrightLicenseFileHeader()); - HeaderPrint(R"""( -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: $proto_file_name$ - -#ifndef $header_include_guard$ -#define $header_include_guard$ - -)"""); - - // includes - HeaderLocalIncludes({ - vars("forwarding_connection_header_path"), - vars("forwarding_idempotency_policy_header_path"), - vars("options_header_path"), - }); - - auto result = HeaderOpenForwardingNamespaces(); - if (!result.ok()) return result; - - // forwards - if (HasLongrunningMethod()) { - HeaderPrint(R"""( -/// @deprecated Use $product_namespace$::$service_name$PollingPolicyOption directly. -using ::google::cloud::$product_namespace$::$service_name$PollingPolicyOption; -)"""); - } - HeaderPrint(R"""( -/// @deprecated Use $product_namespace$::$service_name$BackoffPolicyOption directly. -using ::google::cloud::$product_namespace$::$service_name$BackoffPolicyOption; - -/// @deprecated Use $product_namespace$::$service_name$ConnectionIdempotencyPolicyOption directly. -using ::google::cloud::$product_namespace$::$service_name$ConnectionIdempotencyPolicyOption; - -/// @deprecated Use $product_namespace$::$service_name$PolicyOptionList directly. -using ::google::cloud::$product_namespace$::$service_name$PolicyOptionList; - -/// @deprecated Use $product_namespace$::$service_name$RetryPolicyOption directly. -using ::google::cloud::$product_namespace$::$service_name$RetryPolicyOption; -)"""); - - HeaderCloseNamespaces(); - // close header guard - HeaderPrint(R"""( -#endif // $header_include_guard$ -)"""); - return {}; -} - -} // namespace generator_internal -} // namespace cloud -} // namespace google diff --git a/generator/internal/forwarding_options_generator.h b/generator/internal/forwarding_options_generator.h deleted file mode 100644 index c2250296c9997..0000000000000 --- a/generator/internal/forwarding_options_generator.h +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GENERATOR_INTERNAL_FORWARDING_OPTIONS_GENERATOR_H -#define GOOGLE_CLOUD_CPP_GENERATOR_INTERNAL_FORWARDING_OPTIONS_GENERATOR_H - -#include "generator/internal/service_code_generator.h" -#include "google/cloud/status.h" -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace generator_internal { - -/** - * Generates the forwarding header file for a Options class for a particular - * service. - */ -class ForwardingOptionsGenerator : public ServiceCodeGenerator { - public: - ForwardingOptionsGenerator( - google::protobuf::ServiceDescriptor const* service_descriptor, - VarsDictionary service_vars, - std::map service_method_vars, - google::protobuf::compiler::GeneratorContext* context, - std::vector const& mixin_methods); - - ~ForwardingOptionsGenerator() override = default; - - ForwardingOptionsGenerator(ForwardingOptionsGenerator const&) = delete; - ForwardingOptionsGenerator& operator=(ForwardingOptionsGenerator const&) = - delete; - ForwardingOptionsGenerator(ForwardingOptionsGenerator&&) = default; - ForwardingOptionsGenerator& operator=(ForwardingOptionsGenerator&&) = default; - - private: - Status GenerateHeader() override; - Status GenerateCc() override { return Status(); } -}; - -} // namespace generator_internal -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GENERATOR_INTERNAL_FORWARDING_OPTIONS_GENERATOR_H diff --git a/generator/internal/http_annotation_parser.cc b/generator/internal/http_annotation_parser.cc index 2998499e9eae7..03096241d581a 100644 --- a/generator/internal/http_annotation_parser.cc +++ b/generator/internal/http_annotation_parser.cc @@ -13,10 +13,10 @@ // limitations under the License. #include "generator/internal/http_annotation_parser.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/log.h" #include "absl/strings/match.h" +#include "absl/strings/str_cat.h" #include #include diff --git a/generator/internal/http_option_utils.cc b/generator/internal/http_option_utils.cc index 6d085c145a9b2..4ed9baa5120fb 100644 --- a/generator/internal/http_option_utils.cc +++ b/generator/internal/http_option_utils.cc @@ -17,16 +17,16 @@ #include "generator/internal/longrunning.h" #include "generator/internal/mixin_utils.h" #include "generator/internal/printer.h" -#include "google/cloud/internal/absl_str_join_quiet.h" -#include "google/cloud/internal/absl_str_replace_quiet.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/log.h" #include "absl/strings/str_format.h" +#include "absl/strings/str_join.h" +#include "absl/strings/str_replace.h" #include "absl/strings/str_split.h" #include "absl/types/optional.h" -#include +#include "google/api/annotations.pb.h" #include #include #include diff --git a/generator/internal/http_option_utils.h b/generator/internal/http_option_utils.h index 67c94bceee67b..d337c53079b8c 100644 --- a/generator/internal/http_option_utils.h +++ b/generator/internal/http_option_utils.h @@ -19,7 +19,7 @@ #include "generator/internal/mixin_utils.h" #include "generator/internal/printer.h" #include "absl/types/optional.h" -#include +#include "google/api/http.pb.h" #include #include diff --git a/generator/internal/http_option_utils_test.cc b/generator/internal/http_option_utils_test.cc index 5769678f72c53..7a830e060dd9d 100644 --- a/generator/internal/http_option_utils_test.cc +++ b/generator/internal/http_option_utils_test.cc @@ -15,8 +15,8 @@ #include "generator/internal/http_option_utils.h" #include "generator/testing/error_collectors.h" #include "generator/testing/fake_source_tree.h" -#include -#include +#include "google/api/annotations.pb.h" +#include "google/protobuf/descriptor.pb.h" #include #include #include diff --git a/generator/internal/idempotency_policy_generator.cc b/generator/internal/idempotency_policy_generator.cc index 372856850377d..6cd7917ff74de 100644 --- a/generator/internal/idempotency_policy_generator.cc +++ b/generator/internal/idempotency_policy_generator.cc @@ -19,7 +19,7 @@ #include "generator/internal/predicate_utils.h" #include "generator/internal/printer.h" #include "generator/internal/request_id.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" +#include "absl/strings/str_cat.h" #include namespace google { diff --git a/generator/internal/logging_decorator_generator.cc b/generator/internal/logging_decorator_generator.cc index a2329677ca06c..c572f862d8fd2 100644 --- a/generator/internal/logging_decorator_generator.cc +++ b/generator/internal/logging_decorator_generator.cc @@ -18,7 +18,7 @@ #include "generator/internal/longrunning.h" #include "generator/internal/predicate_utils.h" #include "generator/internal/printer.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_split.h" #include @@ -63,7 +63,7 @@ Status LoggingDecoratorGenerator::GenerateHeader() { ? "google/longrunning/operations.grpc.pb.h" : ""}); HeaderSystemIncludes({"memory", "set", "string"}); - + HeaderGrpcPortsDefInclude(); auto result = HeaderOpenNamespaces(NamespaceType::kInternal); if (!result.ok()) return result; @@ -92,6 +92,7 @@ Status LoggingDecoratorGenerator::GenerateHeader() { HeaderPrint("}; // $logging_class_name$\n"); HeaderCloseNamespaces(); + HeaderGrpcPortsUndefInclude(); HeaderPrint("\n#endif // $header_include_guard$\n"); return {}; } @@ -127,7 +128,7 @@ Status LoggingDecoratorGenerator::GenerateCc() { "google/cloud/status_or.h"}); CcProtobufGenCodeIncludes({vars("proto_grpc_header_path")}); CcSystemIncludes({"memory", "set", "string", "utility"}); - + CcGrpcPortsDefInclude(); auto result = CcOpenNamespaces(NamespaceType::kInternal); if (!result.ok()) return result; @@ -408,6 +409,7 @@ future $logging_class_name$::AsyncCancelOperation( } CcCloseNamespaces(); + CcGrpcPortsUndefInclude(); return {}; } diff --git a/generator/internal/longrunning.cc b/generator/internal/longrunning.cc index 60fc92129d267..255f3031db438 100644 --- a/generator/internal/longrunning.cc +++ b/generator/internal/longrunning.cc @@ -16,11 +16,11 @@ #include "generator/internal/codegen_utils.h" #include "generator/internal/doxygen.h" #include "generator/internal/http_option_utils.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" +#include "google/cloud/extended_operations.pb.h" #include "google/cloud/log.h" +#include "absl/strings/str_cat.h" #include "absl/types/variant.h" -#include -#include +#include "google/longrunning/operations.pb.h" #include using ::google::protobuf::Descriptor; diff --git a/generator/internal/longrunning_test.cc b/generator/internal/longrunning_test.cc index f8dfa62086da3..cf9528b1bdf36 100644 --- a/generator/internal/longrunning_test.cc +++ b/generator/internal/longrunning_test.cc @@ -15,8 +15,8 @@ #include "generator/internal/longrunning.h" #include "generator/testing/error_collectors.h" #include "generator/testing/fake_source_tree.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include +#include "absl/strings/str_cat.h" +#include "google/protobuf/descriptor.pb.h" #include #include diff --git a/generator/internal/make_generators.cc b/generator/internal/make_generators.cc index 672bc474d26bb..6106010436cd3 100644 --- a/generator/internal/make_generators.cc +++ b/generator/internal/make_generators.cc @@ -20,11 +20,6 @@ #include "generator/internal/connection_impl_rest_generator.h" #include "generator/internal/connection_rest_generator.h" #include "generator/internal/descriptor_utils.h" -#include "generator/internal/forwarding_client_generator.h" -#include "generator/internal/forwarding_connection_generator.h" -#include "generator/internal/forwarding_idempotency_policy_generator.h" -#include "generator/internal/forwarding_mock_connection_generator.h" -#include "generator/internal/forwarding_options_generator.h" #include "generator/internal/idempotency_policy_generator.h" #include "generator/internal/logging_decorator_generator.h" #include "generator/internal/logging_decorator_rest_generator.h" @@ -111,22 +106,6 @@ std::vector> MakeGenerators( code_generators.push_back(std::make_unique( service, service_vars, method_vars, context, mixin_methods)); } - auto const forwarding_headers = service_vars.find("forwarding_product_path"); - if (forwarding_headers != service_vars.end() && - !forwarding_headers->second.empty()) { - code_generators.push_back(std::make_unique( - service, service_vars, method_vars, context, mixin_methods)); - code_generators.push_back(std::make_unique( - service, service_vars, method_vars, context, mixin_methods)); - code_generators.push_back( - std::make_unique( - service, service_vars, method_vars, context, mixin_methods)); - code_generators.push_back( - std::make_unique( - service, service_vars, method_vars, context, mixin_methods)); - code_generators.push_back(std::make_unique( - service, service_vars, method_vars, context, mixin_methods)); - } if (generate_grpc_transport) { code_generators.push_back(std::make_unique( @@ -148,10 +127,7 @@ std::vector> MakeGenerators( } if (generate_rest_transport) { - // All REST interfaces postdate the change to the format of our inline - // namespace name, so we never need to add a backwards-compatibility alias. auto rest_service_vars = service_vars; - rest_service_vars.erase("backwards_compatibility_namespace_alias"); code_generators.push_back(std::make_unique( service, rest_service_vars, method_vars, context, mixin_methods)); code_generators.push_back(std::make_unique( diff --git a/generator/internal/make_generators_test.cc b/generator/internal/make_generators_test.cc index 8ffd8cf80b0cc..9d750054976cd 100644 --- a/generator/internal/make_generators_test.cc +++ b/generator/internal/make_generators_test.cc @@ -17,9 +17,9 @@ #include "generator/testing/error_collectors.h" #include "generator/testing/fake_source_tree.h" #include "generator/testing/printer_mocks.h" +#include "google/protobuf/descriptor.pb.h" #include #include -#include #include namespace google { diff --git a/generator/internal/metadata_decorator_generator.cc b/generator/internal/metadata_decorator_generator.cc index 4501ac0558eb6..9af1a2ab16cc0 100644 --- a/generator/internal/metadata_decorator_generator.cc +++ b/generator/internal/metadata_decorator_generator.cc @@ -19,8 +19,8 @@ #include "generator/internal/predicate_utils.h" #include "generator/internal/printer.h" #include "generator/internal/routing.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/url_encode.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_split.h" #include "absl/strings/string_view.h" #include @@ -133,7 +133,7 @@ Status MetadataDecoratorGenerator::GenerateHeader() { ? "google/longrunning/operations.grpc.pb.h" : ""}); HeaderSystemIncludes({"map", "memory", "string"}); - + HeaderGrpcPortsDefInclude(); auto result = HeaderOpenNamespaces(NamespaceType::kInternal); if (!result.ok()) return result; @@ -164,6 +164,7 @@ class $metadata_class_name$ : public $stub_class_name$ { )"""); HeaderCloseNamespaces(); + HeaderGrpcPortsUndefInclude(); // close header guard HeaderPrint("\n#endif // $header_include_guard$\n"); return {}; @@ -181,19 +182,15 @@ Status MetadataDecoratorGenerator::GenerateCc() { // includes CcPrint("\n"); CcLocalIncludes( - {vars("metadata_header_path"), - "google/cloud/internal/absl_str_cat_quiet.h", - HasExplicitRoutingMethod() - ? "google/cloud/internal/absl_str_join_quiet.h" - : "", - "google/cloud/internal/api_client_header.h", + {vars("metadata_header_path"), "absl/strings/str_cat.h", + "absl/strings/str_join.h", "google/cloud/internal/api_client_header.h", "google/cloud/grpc_options.h", HasExplicitRoutingMethod() ? "google/cloud/internal/routing_matcher.h" : "", "google/cloud/status_or.h", "google/cloud/internal/url_encode.h"}); CcProtobufGenCodeIncludes({vars("proto_grpc_header_path")}); CcSystemIncludes({"memory", "string", "utility", "vector"}); - + CcGrpcPortsDefInclude(); auto result = CcOpenNamespaces(NamespaceType::kInternal); if (!result.ok()) return result; @@ -421,6 +418,7 @@ void $metadata_class_name$::SetMetadata(grpc::ClientContext& context, )"""); CcCloseNamespaces(); + CcGrpcPortsUndefInclude(); return {}; } diff --git a/generator/internal/metadata_decorator_rest_generator.cc b/generator/internal/metadata_decorator_rest_generator.cc index 27d9dee5b9030..6204aff2cc578 100644 --- a/generator/internal/metadata_decorator_rest_generator.cc +++ b/generator/internal/metadata_decorator_rest_generator.cc @@ -19,8 +19,8 @@ #include "generator/internal/predicate_utils.h" #include "generator/internal/printer.h" #include "generator/internal/routing.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/url_encode.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_split.h" #include #include @@ -219,14 +219,14 @@ Status MetadataDecoratorRestGenerator::GenerateCc() { // includes CcPrint("\n"); - CcLocalIncludes( - {vars("metadata_rest_header_path"), - "google/cloud/internal/api_client_header.h", - HasExplicitRoutingMethod() ? "google/cloud/internal/routing_matcher.h" - : "", - "google/cloud/status_or.h", "google/cloud/internal/absl_str_cat_quiet.h", - "google/cloud/internal/rest_set_metadata.h", - "absl/strings/str_format.h"}); + CcLocalIncludes({vars("metadata_rest_header_path"), + "google/cloud/internal/api_client_header.h", + HasExplicitRoutingMethod() + ? "google/cloud/internal/routing_matcher.h" + : "", + "google/cloud/status_or.h", "absl/strings/str_cat.h", + "google/cloud/internal/rest_set_metadata.h", + "absl/strings/str_format.h"}); CcSystemIncludes({"memory", "utility"}); auto result = CcOpenNamespaces(NamespaceType::kInternal); diff --git a/generator/internal/mixin_utils.cc b/generator/internal/mixin_utils.cc index c24a6f943f9bf..ed92825885a45 100644 --- a/generator/internal/mixin_utils.cc +++ b/generator/internal/mixin_utils.cc @@ -14,10 +14,10 @@ #include "generator/internal/mixin_utils.h" #include "generator/internal/codegen_utils.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/log.h" #include "absl/base/no_destructor.h" #include "absl/strings/ascii.h" +#include "absl/strings/str_join.h" #include "absl/types/optional.h" #include #include @@ -140,27 +140,28 @@ std::unordered_set GetMethodNames( } // namespace -std::vector GetMixinProtoPaths(YAML::Node const& service_config) { - std::vector proto_paths; - if (service_config.Type() != YAML::NodeType::Map) return proto_paths; +std::vector GetMixinServiceProto( + YAML::Node const& service_config) { + std::vector mixin_services; + if (service_config.Type() != YAML::NodeType::Map) return mixin_services; auto const& apis = service_config["apis"]; - if (apis.Type() != YAML::NodeType::Sequence) return proto_paths; + if (apis.Type() != YAML::NodeType::Sequence) return mixin_services; for (auto const& api : apis) { if (api.Type() != YAML::NodeType::Map) continue; auto const& name = api["name"]; if (name.Type() != YAML::NodeType::Scalar) continue; - auto const package_path = name.as(); + auto const service = name.as(); auto const& mixin_proto_path_map = GetMixinProtoPathMap(); - auto const it = mixin_proto_path_map.find(package_path); + auto const it = mixin_proto_path_map.find(service); if (it == mixin_proto_path_map.end()) continue; - proto_paths.push_back(it->second); + mixin_services.push_back({it->first, it->second}); } - return proto_paths; + return mixin_services; } -std::vector GetMixinProtoPaths( +std::vector GetMixinServiceProto( std::string const& service_yaml_path) { - return GetMixinProtoPaths(YAML::LoadFile(service_yaml_path)); + return GetMixinServiceProto(YAML::LoadFile(service_yaml_path)); } std::vector GetMixinMethods(YAML::Node const& service_config, @@ -173,15 +174,16 @@ std::vector GetMixinMethods(YAML::Node const& service_config, << service.full_name(); } std::unordered_set const method_names = GetMethodNames(service); - auto const mixin_proto_paths = GetMixinProtoPaths(service_config); + auto const mixin_proto_paths = GetMixinServiceProto(service_config); auto const mixin_http_overrides = GetMixinHttpOverrides(service_config); for (auto const& mixin_proto_path : mixin_proto_paths) { - FileDescriptor const* mixin_file = pool->FindFileByName(mixin_proto_path); + FileDescriptor const* mixin_file = + pool->FindFileByName(mixin_proto_path.proto_file_path); if (mixin_file == nullptr) { GCP_LOG(FATAL) << __FILE__ << ":" << __LINE__ << " Mixin FileDescriptor is not found for path: " - << mixin_proto_path + << mixin_proto_path.proto_file_path << " in service: " << service.full_name(); } for (int i = 0; i < mixin_file->service_count(); ++i) { diff --git a/generator/internal/mixin_utils.h b/generator/internal/mixin_utils.h index 2e91cf3418b71..57967a7bb9f7f 100644 --- a/generator/internal/mixin_utils.h +++ b/generator/internal/mixin_utils.h @@ -16,7 +16,7 @@ #define GOOGLE_CLOUD_CPP_GENERATOR_INTERNAL_MIXIN_UTILS_H #include "absl/types/optional.h" -#include +#include "google/api/http.pb.h" #include #include #include @@ -38,16 +38,30 @@ struct MixinMethod { google::api::HttpRule http_override; }; +struct MixinService { + std::string service_full_name; + std::string proto_file_path; +}; + +inline bool operator==(MixinService const& lhs, MixinService const& rhs) { + return lhs.service_full_name == rhs.service_full_name && + lhs.proto_file_path == rhs.proto_file_path; +} +inline bool operator!=(MixinService const& lhs, MixinService const& rhs) { + return !(lhs == rhs); +} + /** * Extract Mixin proto file paths from the YAML Node. */ -std::vector GetMixinProtoPaths(YAML::Node const& service_config); +std::vector GetMixinServiceProto( + YAML::Node const& service_config); /** * Extract Mixin proto file paths from the YAML Node loaded from a YAML file * path. */ -std::vector GetMixinProtoPaths( +std::vector GetMixinServiceProto( std::string const& service_yaml_path); /** diff --git a/generator/internal/mixin_utils_test.cc b/generator/internal/mixin_utils_test.cc index 568156f6833c2..e517e4098c91a 100644 --- a/generator/internal/mixin_utils_test.cc +++ b/generator/internal/mixin_utils_test.cc @@ -15,7 +15,7 @@ #include "generator/internal/mixin_utils.h" #include "generator/testing/descriptor_pool_fixture.h" #include "google/cloud/testing_util/is_proto_equal.h" -#include +#include "google/api/annotations.pb.h" #include #include @@ -207,11 +207,16 @@ TEST_F(MixinUtilsTest, FilesParseSuccessfully) { } TEST_F(MixinUtilsTest, ExtractMixinProtoPathsFromYaml) { - auto const mixin_proto_paths = GetMixinProtoPaths(service_config_); - EXPECT_THAT(mixin_proto_paths, - AllOf(Contains("google/cloud/location/locations.proto"), - Contains("google/iam/v1/iam_policy.proto"), - Contains("google/longrunning/operations.proto"))); + std::vector const mixin_proto_paths = + GetMixinServiceProto(service_config_); + EXPECT_THAT( + mixin_proto_paths, + AllOf(Contains(MixinService{"google.cloud.location.Locations", + "google/cloud/location/locations.proto"}), + Contains(MixinService{"google.iam.v1.IAMPolicy", + "google/iam/v1/iam_policy.proto"}), + Contains(MixinService{"google.longrunning.Operations", + "google/longrunning/operations.proto"}))); } TEST_F(MixinUtilsTest, GetMixinMethods) { diff --git a/generator/internal/option_defaults_generator.cc b/generator/internal/option_defaults_generator.cc index 19d4f59c52b5f..00bc3d07c7b72 100644 --- a/generator/internal/option_defaults_generator.cc +++ b/generator/internal/option_defaults_generator.cc @@ -100,7 +100,7 @@ Status OptionDefaultsGenerator::GenerateCc() { case ServiceConfiguration::LOCATION_DEPENDENT: case ServiceConfiguration::LOCATION_DEPENDENT_COMPAT: case ServiceConfiguration::LOCATION_OPTIONALLY_DEPENDENT: - CcLocalIncludes({"google/cloud/internal/absl_str_cat_quiet.h"}); + CcLocalIncludes({"absl/strings/str_cat.h"}); break; default: break; @@ -159,7 +159,7 @@ auto constexpr kBackoffScaling = 2.0; if (!options.has<$product_namespace$::$retry_policy_name$Option>()) { options.set<$product_namespace$::$retry_policy_name$Option>( $product_namespace$::$limited_time_retry_policy_name$( - std::chrono::minutes(30)).clone()); + std::chrono::minutes(10)).clone()); } if (!options.has<$product_namespace$::$service_name$BackoffPolicyOption>()) { options.set<$product_namespace$::$service_name$BackoffPolicyOption>( diff --git a/generator/internal/pagination.cc b/generator/internal/pagination.cc index 7c1d1812ba4b9..c77122cd085e0 100644 --- a/generator/internal/pagination.cc +++ b/generator/internal/pagination.cc @@ -16,9 +16,9 @@ #include "generator/internal/codegen_utils.h" #include "generator/internal/descriptor_utils.h" #include "generator/internal/doxygen.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/log.h" #include "google/cloud/optional.h" +#include "absl/strings/str_cat.h" namespace google { namespace cloud { diff --git a/generator/internal/pagination_test.cc b/generator/internal/pagination_test.cc index d31223ad428bb..35ae79e707b95 100644 --- a/generator/internal/pagination_test.cc +++ b/generator/internal/pagination_test.cc @@ -16,9 +16,9 @@ #include "generator/testing/descriptor_pool_fixture.h" #include "generator/testing/error_collectors.h" #include "generator/testing/fake_source_tree.h" -#include "google/cloud/internal/absl_str_replace_quiet.h" +#include "absl/strings/str_replace.h" +#include "google/protobuf/descriptor.pb.h" #include -#include #include #include diff --git a/generator/internal/predicate_utils.cc b/generator/internal/predicate_utils.cc index 6b28d7dddcade..e1f55e1ed8780 100644 --- a/generator/internal/predicate_utils.cc +++ b/generator/internal/predicate_utils.cc @@ -15,7 +15,7 @@ #include "generator/internal/predicate_utils.h" #include "generator/internal/descriptor_utils.h" #include "google/cloud/log.h" -#include +#include "google/longrunning/operations.pb.h" #include namespace google { diff --git a/generator/internal/predicate_utils_test.cc b/generator/internal/predicate_utils_test.cc index 16d14e5c96dce..93fcfb82f8370 100644 --- a/generator/internal/predicate_utils_test.cc +++ b/generator/internal/predicate_utils_test.cc @@ -16,9 +16,9 @@ #include "generator/testing/error_collectors.h" #include "generator/testing/fake_source_tree.h" #include "google/cloud/log.h" +#include "google/protobuf/descriptor.pb.h" #include #include -#include #include #include #include diff --git a/generator/internal/printer.h b/generator/internal/printer.h index d626858d95b84..d565ea29b36a2 100644 --- a/generator/internal/printer.h +++ b/generator/internal/printer.h @@ -56,7 +56,7 @@ class Printer { * are defined by the given map. */ void Print(VarsDictionary const& variables, std::string const& text) { - printer_->Print(variables, text.c_str()); + printer_->Print(variables, text); } /** @@ -64,7 +64,7 @@ class Printer { */ template void Print(std::string const& text, Args&&... args) { - printer_->Print(text.c_str(), std::forward(args)...); + printer_->Print(text, std::forward(args)...); } /** diff --git a/generator/internal/request_id.cc b/generator/internal/request_id.cc index be27ca8525596..4c86a06c743c9 100644 --- a/generator/internal/request_id.cc +++ b/generator/internal/request_id.cc @@ -13,7 +13,7 @@ // limitations under the License. #include "generator/internal/request_id.h" -#include +#include "google/api/field_info.pb.h" namespace google { namespace cloud { diff --git a/generator/internal/resolve_comment_references.cc b/generator/internal/resolve_comment_references.cc index 4a7c5dbf5e9db..4240af0b15eec 100644 --- a/generator/internal/resolve_comment_references.cc +++ b/generator/internal/resolve_comment_references.cc @@ -13,7 +13,7 @@ // limitations under the License. #include "generator/internal/resolve_comment_references.h" -#include "google/cloud/internal/absl_str_join_quiet.h" +#include "absl/strings/str_join.h" #include "absl/strings/str_split.h" #include "absl/types/optional.h" #include diff --git a/generator/internal/resolve_method_return.cc b/generator/internal/resolve_method_return.cc index 1b1b97c64dda6..b78ab41a0d8bf 100644 --- a/generator/internal/resolve_method_return.cc +++ b/generator/internal/resolve_method_return.cc @@ -15,7 +15,7 @@ #include "generator/internal/resolve_method_return.h" #include "generator/internal/longrunning.h" #include "generator/internal/pagination.h" -#include +#include "google/longrunning/operations.pb.h" #include #include #include diff --git a/generator/internal/round_robin_decorator_generator.cc b/generator/internal/round_robin_decorator_generator.cc index 12ebe514c5eda..47bcb561d3280 100644 --- a/generator/internal/round_robin_decorator_generator.cc +++ b/generator/internal/round_robin_decorator_generator.cc @@ -51,7 +51,7 @@ Status RoundRobinDecoratorGenerator::GenerateHeader() { HeaderPrint("\n"); HeaderLocalIncludes({vars("stub_header_path"), "google/cloud/version.h"}); HeaderSystemIncludes({"memory", "mutex", "vector"}); - + HeaderGrpcPortsDefInclude(); auto result = HeaderOpenNamespaces(NamespaceType::kInternal); if (!result.ok()) return result; @@ -78,6 +78,7 @@ class $round_robin_class_name$ : public $stub_class_name$ { )"""); HeaderCloseNamespaces(); + HeaderGrpcPortsUndefInclude(); // close header guard HeaderPrint("\n#endif // $header_include_guard$\n"); return {}; @@ -98,6 +99,7 @@ Status RoundRobinDecoratorGenerator::GenerateCc() { vars("round_robin_header_path"), }); CcSystemIncludes({"memory", "mutex", "vector"}); + CcGrpcPortsDefInclude(); auto result = CcOpenNamespaces(NamespaceType::kInternal); if (!result.ok()) return result; @@ -268,6 +270,7 @@ std::shared_ptr<$stub_class_name$> )"""); CcCloseNamespaces(); + CcGrpcPortsUndefInclude(); return {}; } diff --git a/generator/internal/routing.cc b/generator/internal/routing.cc index 408f009ab60ec..e5565fff060bd 100644 --- a/generator/internal/routing.cc +++ b/generator/internal/routing.cc @@ -13,11 +13,11 @@ // limitations under the License. #include "generator/internal/routing.h" -#include "google/cloud/internal/absl_str_join_quiet.h" -#include "google/cloud/internal/absl_str_replace_quiet.h" #include "google/cloud/log.h" +#include "absl/strings/str_join.h" +#include "absl/strings/str_replace.h" #include "absl/strings/str_split.h" -#include +#include "google/api/routing.pb.h" #include #include using ::google::protobuf::compiler::cpp::FieldName; diff --git a/generator/internal/scaffold_generator.cc b/generator/internal/scaffold_generator.cc index 1ee505cd277a2..18f9672969917 100644 --- a/generator/internal/scaffold_generator.cc +++ b/generator/internal/scaffold_generator.cc @@ -14,10 +14,10 @@ #include "generator/internal/scaffold_generator.h" #include "generator/internal/codegen_utils.h" -#include "google/cloud/internal/absl_str_join_quiet.h" -#include "google/cloud/internal/absl_str_replace_quiet.h" #include "google/cloud/internal/filesystem.h" #include "google/cloud/log.h" +#include "absl/strings/str_join.h" +#include "absl/strings/str_replace.h" #include "absl/strings/str_split.h" #include #include @@ -424,8 +424,7 @@ this library. google::protobuf::io::Printer printer(&output, '$'); printer.Print( variables, - absl::StrCat(kText1, FormatCloudServiceDocsLink(variables), kText2) - .c_str()); + absl::StrCat(kText1, FormatCloudServiceDocsLink(variables), kText2)); } void GenerateBuild(std::ostream& os, @@ -453,7 +452,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["$service_subdirectory$"] googleapis_deps = [ - "@com_google_googleapis//$directory$:$library$_cc_grpc", + "@googleapis//$directory$:$library$_cc_grpc", ] cc_gapic_library( @@ -560,8 +559,7 @@ which should give you a taste of the $title$ C++ client library API. google::protobuf::io::Printer printer(&output, '$'); printer.Print( variables, - absl::StrCat(kText1, FormatCloudServiceDocsLink(variables), kText2) - .c_str()); + absl::StrCat(kText1, FormatCloudServiceDocsLink(variables), kText2)); } void GenerateDoxygenEnvironmentPage( @@ -1021,7 +1019,7 @@ void GenerateQuickstartCMake( # This file shows how to use the $title$ C++ client library from a larger # CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-$library$-quickstart CXX) find_package(google_cloud_cpp_$library$ REQUIRED) @@ -1086,7 +1084,7 @@ CLIENT_LIBS := $$(shell pkg-config $$(CLIENT_MODULE) --libs-only-l) )"""; google::protobuf::io::OstreamOutputStream output(&os); google::protobuf::io::Printer printer(&output, '$'); - printer.Print(variables, format.c_str()); + printer.Print(variables, format); } void GenerateQuickstartWorkspace( @@ -1094,7 +1092,7 @@ void GenerateQuickstartWorkspace( std::string const& contents) { google::protobuf::io::OstreamOutputStream output(&os); google::protobuf::io::Printer printer(&output, '$'); - printer.Print(variables, contents.c_str()); + printer.Print(variables, contents); } void GenerateQuickstartBuild( diff --git a/generator/internal/scaffold_generator_test.cc b/generator/internal/scaffold_generator_test.cc index ace489a009a58..b953aaa7b71e1 100644 --- a/generator/internal/scaffold_generator_test.cc +++ b/generator/internal/scaffold_generator_test.cc @@ -122,18 +122,18 @@ class ScaffoldGenerator : public ::testing::Test { for (auto const* s : kHierarchy) MakeDirectory(path_ + s); std::ofstream(path_ + "/external/googleapis/protolists/test.list") - << R"""(@com_google_googleapis//google/cloud/test/v1:foo.proto -@com_google_googleapis//google/cloud/test/v1:admin.proto + << R"""(@googleapis//google/cloud/test/v1:foo.proto +@googleapis//google/cloud/test/v1:admin.proto )"""; std::ofstream(path_ + "/external/googleapis/protodeps/test.deps") - << R"""(@com_google_googleapis//google/longrunning:operations_proto -@com_google_googleapis//google/rpc:status_proto -@com_google_googleapis//google/api:resource_proto -@com_google_googleapis//google/api:field_behavior_proto -@com_google_googleapis//google/api:client_proto -@com_google_googleapis//google/api:annotations_proto -@com_google_googleapis//google/api:http_proto + << R"""(@googleapis//google/longrunning:operations_proto +@googleapis//google/rpc:status_proto +@googleapis//google/api:resource_proto +@googleapis//google/api:field_behavior_proto +@googleapis//google/api:client_proto +@googleapis//google/api:annotations_proto +@googleapis//google/api:http_proto )"""; std::ofstream(path_ + "/google/cloud/test/v1/test_v1.yaml") @@ -274,8 +274,7 @@ TEST_F(ScaffoldGenerator, Build) { EXPECT_THAT(actual, HasSubstr(R"""(name = "test",)""")); EXPECT_THAT( actual, - HasSubstr( - R"""(@com_google_googleapis//google/cloud/test/v1:test_cc_grpc",)""")); + HasSubstr(R"""(@googleapis//google/cloud/test/v1:test_cc_grpc",)""")); } TEST_F(ScaffoldGenerator, CMakeLists) { diff --git a/generator/internal/service_code_generator.cc b/generator/internal/service_code_generator.cc index cb31ba54435b7..30f0b1b59c810 100644 --- a/generator/internal/service_code_generator.cc +++ b/generator/internal/service_code_generator.cc @@ -18,15 +18,15 @@ #include "generator/internal/pagination.h" #include "generator/internal/printer.h" #include "generator/internal/request_id.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_replace_quiet.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/log.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_replace.h" #include "absl/strings/str_split.h" #include "absl/strings/strip.h" -#include -#include +#include "google/api/client.pb.h" +#include "google/api/routing.pb.h" #include #include #include @@ -72,9 +72,6 @@ ServiceCodeGenerator::ServiceCodeGenerator( assert(context != nullptr); SetVars(service_vars_[header_path_key]); SetMethods(); - auto e = service_vars_.find("backwards_compatibility_namespace_alias"); - define_backwards_compatibility_namespace_alias_ = - (e != service_vars_.end() && e->second == "true"); } ServiceCodeGenerator::ServiceCodeGenerator( @@ -314,29 +311,40 @@ void ServiceCodeGenerator::CcSystemIncludes( GenerateSystemIncludes(cc_, system_includes); } -Status ServiceCodeGenerator::HeaderOpenNamespaces(NamespaceType ns_type) { - return OpenNamespaces(header_, ns_type, "product_path"); +void ServiceCodeGenerator::HeaderGrpcPortsDefInclude() { + header_.Print(R"""( +// Must be included last. +#include "google/cloud/ports_def.inc" +)"""); } - -Status ServiceCodeGenerator::HeaderOpenForwardingNamespaces( - NamespaceType ns_type, std::string const& ns_documentation) { - return OpenNamespaces(header_, ns_type, "forwarding_product_path", - ns_documentation); +void ServiceCodeGenerator::HeaderGrpcPortsUndefInclude() { + header_.Print(R"""( +#include "google/cloud/ports_undef.inc" +)"""); +} +void ServiceCodeGenerator::CcGrpcPortsDefInclude() { + cc_.Print(R"""( +// Must be included last. +#include "google/cloud/ports_def.inc" +)"""); +} +void ServiceCodeGenerator::CcGrpcPortsUndefInclude() { + cc_.Print(R"""( +#include "google/cloud/ports_undef.inc" +)"""); } -void ServiceCodeGenerator::HeaderCloseNamespaces() { - CloseNamespaces(header_, define_backwards_compatibility_namespace_alias_); +Status ServiceCodeGenerator::HeaderOpenNamespaces(NamespaceType ns_type) { + return OpenNamespaces(header_, ns_type, "product_path"); } +void ServiceCodeGenerator::HeaderCloseNamespaces() { CloseNamespaces(header_); } + Status ServiceCodeGenerator::CcOpenNamespaces(NamespaceType ns_type) { return OpenNamespaces(cc_, ns_type, "product_path"); } -Status ServiceCodeGenerator::CcOpenForwardingNamespaces(NamespaceType ns_type) { - return OpenNamespaces(cc_, ns_type, "forwarding_product_path"); -} - -void ServiceCodeGenerator::CcCloseNamespaces() { CloseNamespaces(cc_, false); } +void ServiceCodeGenerator::CcCloseNamespaces() { CloseNamespaces(cc_); } void ServiceCodeGenerator::HeaderPrint(std::string const& text) { header_.Print(service_vars_, text); @@ -445,15 +453,9 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN return {}; } -void ServiceCodeGenerator::CloseNamespaces( - Printer& p, bool define_backwards_compatibility_namespace_alias) { +void ServiceCodeGenerator::CloseNamespaces(Printer& p) { p.Print(R"""( GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END)"""); - // TODO(#7463) - remove backwards compatibility namespaces - if (define_backwards_compatibility_namespace_alias) { - p.Print(R"""( -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls))"""); - } p.Print(R"""( } // namespace $namespace$ } // namespace cloud @@ -503,6 +505,20 @@ void ServiceCodeGenerator::SetMethods() { for (auto const& mixin_method : mixin_methods_) { methods_.emplace_back(mixin_method.method.get()); } + + auto bespoke_methods_var = service_vars_.find("bespoke_methods"); + if (bespoke_methods_var != service_vars_.end()) { + auto methods = absl::StrSplit(bespoke_methods_var->second, ','); + for (auto const& method : methods) { + std::vector pieces = absl::StrSplit(method, "@@"); + assert(pieces.size() == 3); + cpp::generator::ServiceConfiguration::BespokeMethod bespoke_method; + bespoke_method.set_name(SafeReplaceAll(pieces[0], "@", ",")); + bespoke_method.set_return_type(SafeReplaceAll(pieces[1], "@", ",")); + bespoke_method.set_parameters(SafeReplaceAll(pieces[2], "@", ",")); + bespoke_methods_.emplace_back(std::move(bespoke_method)); + } + } } std::string ServiceCodeGenerator::GetPbIncludeByTransport() const { diff --git a/generator/internal/service_code_generator.h b/generator/internal/service_code_generator.h index d76cc824bd161..7cab00a27a7e4 100644 --- a/generator/internal/service_code_generator.h +++ b/generator/internal/service_code_generator.h @@ -68,6 +68,10 @@ class ServiceCodeGenerator : public GeneratorInterface { std::string vars(std::string const& key) const; MethodDescriptorList const& methods() const { return methods_; } MethodDescriptorList const& async_methods() const { return async_methods_; } + std::vector const& + bespoke_methods() const { + return bespoke_methods_; + } void SetVars(absl::string_view header_path); VarsDictionary MergeServiceAndMethodVars( google::protobuf::MethodDescriptor const& method) const; @@ -77,6 +81,11 @@ class ServiceCodeGenerator : public GeneratorInterface { void HeaderSystemIncludes(std::vector const& system_includes); void CcSystemIncludes(std::vector const& system_includes); + void HeaderGrpcPortsDefInclude(); + void HeaderGrpcPortsUndefInclude(); + void CcGrpcPortsDefInclude(); + void CcGrpcPortsUndefInclude(); + void HeaderProtobufGenCodeIncludes( std::vector const& pb_h_includes); void CcProtobufGenCodeIncludes(std::vector const& pb_h_includes); @@ -259,17 +268,17 @@ class ServiceCodeGenerator : public GeneratorInterface { Status OpenNamespaces(Printer& p, NamespaceType ns_type, std::string const& product_path_var, std::string const& ns_documentation = ""); - void CloseNamespaces(Printer& p, - bool define_backwards_compatibility_namespace_alias); + void CloseNamespaces(Printer& p); google::protobuf::ServiceDescriptor const* service_descriptor_; VarsDictionary service_vars_; std::map service_method_vars_; std::string namespace_; - bool define_backwards_compatibility_namespace_alias_ = false; - bool pb_h_system_includes_ = true; + bool pb_h_system_includes_ = false; MethodDescriptorList methods_; MethodDescriptorList async_methods_; + std::vector + bespoke_methods_; Printer header_; Printer cc_; std::vector mixin_methods_; diff --git a/generator/internal/service_code_generator_test.cc b/generator/internal/service_code_generator_test.cc index 4a65fb279743a..20080e1e9eb6c 100644 --- a/generator/internal/service_code_generator_test.cc +++ b/generator/internal/service_code_generator_test.cc @@ -19,9 +19,9 @@ #include "generator/testing/fake_source_tree.h" #include "generator/testing/printer_mocks.h" #include "google/cloud/log.h" +#include "google/protobuf/descriptor.pb.h" #include #include -#include #include #include #include diff --git a/generator/internal/stub_factory_generator.cc b/generator/internal/stub_factory_generator.cc index a0e4a8c9b6990..a7f057a1676a4 100644 --- a/generator/internal/stub_factory_generator.cc +++ b/generator/internal/stub_factory_generator.cc @@ -51,7 +51,7 @@ Status StubFactoryGenerator::GenerateHeader() { "google/cloud/internal/unified_grpc_credentials.h", "google/cloud/options.h", "google/cloud/version.h"}); HeaderSystemIncludes({"memory"}); - + HeaderGrpcPortsDefInclude(); auto result = HeaderOpenNamespaces(NamespaceType::kInternal); if (!result.ok()) return result; @@ -63,6 +63,7 @@ std::shared_ptr<$stub_class_name$> CreateDefault$stub_class_name$( )"""); HeaderCloseNamespaces(); + HeaderGrpcPortsUndefInclude(); // close header guard HeaderPrint("\n#endif // $header_include_guard$\n"); return {}; @@ -93,7 +94,7 @@ Status StubFactoryGenerator::GenerateCc() { headers.insert(headers.end(), {vars("proto_grpc_header_path")}); CcProtobufGenCodeIncludes(headers); CcSystemIncludes({"memory", "utility"}); - + CcGrpcPortsDefInclude(); auto result = CcOpenNamespaces(NamespaceType::kInternal); if (!result.ok()) return result; @@ -168,6 +169,7 @@ CreateDefault$stub_class_name$( )"""); CcCloseNamespaces(); + CcGrpcPortsUndefInclude(); return {}; } diff --git a/generator/internal/stub_generator.cc b/generator/internal/stub_generator.cc index df3a361202926..020a01ce3e18b 100644 --- a/generator/internal/stub_generator.cc +++ b/generator/internal/stub_generator.cc @@ -18,8 +18,8 @@ #include "generator/internal/longrunning.h" #include "generator/internal/predicate_utils.h" #include "generator/internal/printer.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_join_quiet.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include "absl/strings/str_split.h" #include @@ -86,7 +86,7 @@ Status StubGenerator::GenerateHeader() { {vars("proto_grpc_header_path"), include_lro_header ? "google/longrunning/operations.grpc.pb.h" : ""}); HeaderSystemIncludes({"memory", "utility"}); - + HeaderGrpcPortsDefInclude(); auto result = HeaderOpenNamespaces(NamespaceType::kInternal); if (!result.ok()) return result; @@ -288,8 +288,8 @@ Status StubGenerator::GenerateHeader() { // clang-format on } HeaderPrint("};\n"); - HeaderCloseNamespaces(); + HeaderGrpcPortsUndefInclude(); // close header guard HeaderPrint("\n#endif // $header_include_guard$\n"); return {}; @@ -326,7 +326,7 @@ Status StubGenerator::GenerateCc() { ? "google/longrunning/operations.grpc.pb.h" : ""}); CcSystemIncludes({"memory", "utility"}); - + CcGrpcPortsDefInclude(); auto result = CcOpenNamespaces(NamespaceType::kInternal); if (!result.ok()) return result; @@ -596,6 +596,7 @@ future Default$stub_class_name$::AsyncCancelOperation( } CcCloseNamespaces(); + CcGrpcPortsUndefInclude(); return {}; } diff --git a/generator/internal/stub_rest_generator.cc b/generator/internal/stub_rest_generator.cc index 8692f774aa581..19e87462a9ade 100644 --- a/generator/internal/stub_rest_generator.cc +++ b/generator/internal/stub_rest_generator.cc @@ -257,8 +257,7 @@ Status StubRestGenerator::GenerateCc() { CcPrint("\n"); CcLocalIncludes({vars("stub_rest_header_path"), - "google/cloud/common_options.h", - "google/cloud/internal/absl_str_cat_quiet.h", + "google/cloud/common_options.h", "absl/strings/str_cat.h", "google/cloud/internal/rest_stub_helpers.h", "google/cloud/status_or.h"}); CcProtobufGenCodeIncludes({vars("proto_header_path"), diff --git a/generator/internal/tracing_connection_generator.cc b/generator/internal/tracing_connection_generator.cc index 1afea7c3997cb..dd8462270cb67 100644 --- a/generator/internal/tracing_connection_generator.cc +++ b/generator/internal/tracing_connection_generator.cc @@ -18,7 +18,7 @@ #include "generator/internal/pagination.h" #include "generator/internal/predicate_utils.h" #include "generator/internal/printer.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" +#include "absl/strings/str_cat.h" #include namespace google { @@ -57,8 +57,6 @@ Status TracingConnectionGenerator::GenerateHeader() { if (!result.ok()) return result; HeaderPrint(R"""( -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class $tracing_connection_class_name$ : public $product_namespace$::$connection_class_name$ { public: @@ -87,8 +85,6 @@ class $tracing_connection_class_name$ std::shared_ptr<$product_namespace$::$connection_class_name$> child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * @@ -130,8 +126,6 @@ Status TracingConnectionGenerator::GenerateCc() { if (!result.ok()) return result; CcPrint(R"""( -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - $tracing_connection_class_name$::$tracing_connection_class_name$( std::shared_ptr<$product_namespace$::$connection_class_name$> child) : child_(std::move(child)) {} @@ -148,16 +142,12 @@ Status TracingConnectionGenerator::GenerateCc() { } CcPrint(R"""( -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr<$product_namespace$::$connection_class_name$> Make$tracing_connection_class_name$( std::shared_ptr<$product_namespace$::$connection_class_name$> conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared<$tracing_connection_class_name$>(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } )"""); diff --git a/generator/internal/tracing_stub_generator.cc b/generator/internal/tracing_stub_generator.cc index f48aaab69b27e..3288cfd2630e0 100644 --- a/generator/internal/tracing_stub_generator.cc +++ b/generator/internal/tracing_stub_generator.cc @@ -50,15 +50,13 @@ Status TracingStubGenerator::GenerateHeader() { "google/cloud/internal/trace_propagator.h", "google/cloud/options.h", "google/cloud/version.h"}); HeaderSystemIncludes({"memory"}); - + HeaderGrpcPortsDefInclude(); auto result = HeaderOpenNamespaces(NamespaceType::kInternal); if (!result.ok()) return result; // Tracing stub class definition HeaderPrint( R"""( -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class $tracing_stub_class_name$ : public $stub_class_name$ { public: ~$tracing_stub_class_name$() override = default; @@ -74,8 +72,6 @@ class $tracing_stub_class_name$ : public $stub_class_name$ { std::shared_ptr propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -87,6 +83,7 @@ std::shared_ptr<$stub_class_name$> Make$tracing_stub_class_name$( )"""); HeaderCloseNamespaces(); + HeaderGrpcPortsUndefInclude(); // close header guard HeaderPrint("\n#endif // $header_include_guard$\n"); return {}; @@ -122,15 +119,13 @@ Status TracingStubGenerator::GenerateCc() { : "", "google/cloud/internal/grpc_opentelemetry.h"}); CcSystemIncludes({"memory", "utility"}); - + CcGrpcPortsDefInclude(); auto result = CcOpenNamespaces(NamespaceType::kInternal); if (!result.ok()) return result; // constructor CcPrint( R"""( -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - $tracing_stub_class_name$::$tracing_stub_class_name$( std::shared_ptr<$stub_class_name$> child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -346,18 +341,13 @@ future $tracing_stub_class_name$::AsyncCancelOperation( } CcPrint(R"""( -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr<$stub_class_name$> Make$tracing_stub_class_name$( std::shared_ptr<$stub_class_name$> stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared<$tracing_stub_class_name$>(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } )"""); CcCloseNamespaces(); + CcGrpcPortsUndefInclude(); return {}; } diff --git a/generator/standalone_main.cc b/generator/standalone_main.cc index ff7db95f54018..f94a944d760b1 100644 --- a/generator/standalone_main.cc +++ b/generator/standalone_main.cc @@ -18,15 +18,16 @@ #include "generator/internal/descriptor_utils.h" #include "generator/internal/discovery_to_proto.h" #include "generator/internal/format_method_comments.h" +#include "generator/internal/mixin_utils.h" #include "generator/internal/scaffold_generator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/log.h" #include "google/cloud/status_or.h" #include "absl/flags/flag.h" #include "absl/flags/parse.h" #include "absl/strings/match.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include @@ -164,14 +165,6 @@ int WriteInstallDirectories( if (!service.omit_connection()) { install_directories.push_back("./include/" + product_path + "/mocks"); } - auto const& forwarding_product_path = service.forwarding_product_path(); - if (!forwarding_product_path.empty()) { - install_directories.push_back("./include/" + forwarding_product_path); - if (!service.omit_connection()) { - install_directories.push_back("./include/" + forwarding_product_path + - "/mocks"); - } - } auto const lib = LibraryName(product_path); install_directories.push_back("./lib64/cmake/google_cloud_cpp_" + lib); // Note that storage does not have a public-facing mocks library. Only @@ -288,9 +281,13 @@ std::vector> GenerateCodeFromProtos( args.emplace_back(absl::StrCat("--cpp_codegen_opt=omit_rpc=", SafeReplaceAll(omit_rpc, ",", "@"))); } - if (service.backwards_compatibility_namespace_alias()) { - args.emplace_back( - "--cpp_codegen_opt=backwards_compatibility_namespace_alias=true"); + for (auto const& bespoke_method : service.bespoke_methods()) { + args.emplace_back(absl::StrCat( + "--cpp_codegen_opt=bespoke_method=", + absl::StrJoin({SafeReplaceAll(bespoke_method.name(), ",", "@"), + SafeReplaceAll(bespoke_method.return_type(), ",", "@"), + SafeReplaceAll(bespoke_method.parameters(), ",", "@")}, + "@@"))); } for (auto const& retry_code : service.retryable_status_codes()) { args.emplace_back("--cpp_codegen_opt=retry_status_code=" + retry_code); @@ -329,17 +326,9 @@ std::vector> GenerateCodeFromProtos( if (service.generate_rest_transport()) { args.emplace_back("--cpp_codegen_opt=generate_rest_transport=true"); } - args.emplace_back(service.service_proto_path()); - for (auto const& additional_proto_file : service.additional_proto_files()) { - args.emplace_back(additional_proto_file); - } if (service.experimental()) { args.emplace_back("--cpp_codegen_opt=experimental=true"); } - if (!service.forwarding_product_path().empty()) { - args.emplace_back("--cpp_codegen_opt=forwarding_product_path=" + - service.forwarding_product_path()); - } for (auto const& o : service.idempotency_overrides()) { args.emplace_back(absl::StrCat( "--cpp_codegen_opt=idempotency_override=", o.rpc_name(), ":", @@ -388,10 +377,30 @@ std::vector> GenerateCodeFromProtos( "=", kv.second)); } + std::vector mixin_files_to_append; auto path = ServiceConfigYamlPath(yaml_root, scaffold_vars); if (!path.empty()) { + auto mixins = + google::cloud::generator_internal::GetMixinServiceProto(path); args.emplace_back(absl::StrCat("--cpp_codegen_opt=service_config_yaml=", std::move(path))); + for (auto& mixin_service : mixins) { + if (mixin_service.proto_file_path != service.service_proto_path()) { + args.emplace_back("--cpp_codegen_opt=omit_service=" + + std::move(mixin_service.service_full_name)); + mixin_files_to_append.push_back( + std::move(mixin_service.proto_file_path)); + } + } + } + + args.push_back(service.service_proto_path()); + for (auto const& additional_proto_file : service.additional_proto_files()) { + args.push_back(additional_proto_file); + } + + for (auto& mixin_path : mixin_files_to_append) { + args.push_back(std::move(mixin_path)); } GCP_LOG(INFO) << "Generating service code using: " diff --git a/generator/testing/descriptor_pool_fixture.cc b/generator/testing/descriptor_pool_fixture.cc index a6f983892a58b..60ee37a58cf83 100644 --- a/generator/testing/descriptor_pool_fixture.cc +++ b/generator/testing/descriptor_pool_fixture.cc @@ -14,13 +14,13 @@ #include "generator/testing/descriptor_pool_fixture.h" #include "generator/testing/error_collectors.h" -#include -#include -#include -#include -#include -#include -#include +#include "google/api/annotations.pb.h" +#include "google/api/client.pb.h" +#include "google/longrunning/operations.pb.h" +#include "google/protobuf/any.pb.h" +#include "google/protobuf/duration.pb.h" +#include "google/protobuf/empty.pb.h" +#include "google/rpc/status.pb.h" namespace google { namespace cloud { diff --git a/google/cloud/BUILD.bazel b/google/cloud/BUILD.bazel index 51e32938280c6..68bd685293f5f 100644 --- a/google/cloud/BUILD.bazel +++ b/google/cloud/BUILD.bazel @@ -44,13 +44,6 @@ capture_build_info( ], ) -config_setting( - name = "enable_opentelemetry", - flag_values = { - "//:enable_opentelemetry": "true", - }, -) - filegroup( name = "common_hdrs", srcs = [h for h in google_cloud_cpp_common_hdrs if not h.startswith("internal/")], @@ -61,13 +54,6 @@ cc_library( name = "google_cloud_cpp_common_private", srcs = google_cloud_cpp_common_srcs + ["internal/build_info.cc"], hdrs = google_cloud_cpp_common_hdrs, - defines = select({ - ":enable_opentelemetry": [ - # Enable OpenTelemetry features in google-cloud-cpp - "GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY", - ], - "//conditions:default": [], - }), linkopts = select({ "@platforms//os:windows": [ "-DEFAULTLIB:bcrypt.lib", @@ -86,20 +72,16 @@ cc_library( "//:__pkg__", ], deps = [ - "@com_google_absl//absl/base", - "@com_google_absl//absl/functional:function_ref", - "@com_google_absl//absl/strings", - "@com_google_absl//absl/strings:str_format", - "@com_google_absl//absl/time", - "@com_google_absl//absl/types:optional", - "@com_google_absl//absl/types:span", - "@com_google_absl//absl/types:variant", + "@abseil-cpp//absl/base", + "@abseil-cpp//absl/functional:function_ref", + "@abseil-cpp//absl/strings", + "@abseil-cpp//absl/strings:str_format", + "@abseil-cpp//absl/time", + "@abseil-cpp//absl/types:optional", + "@abseil-cpp//absl/types:span", + "@abseil-cpp//absl/types:variant", + "@opentelemetry-cpp//api", ] + select({ - ":enable_opentelemetry": [ - "@io_opentelemetry_cpp//api", - ], - "//conditions:default": [], - }) + select({ "@platforms//os:windows": [], "//conditions:default": [ "@boringssl//:crypto", @@ -109,13 +91,11 @@ cc_library( cc_library( name = "google_cloud_cpp_common", - deprecation = """ - This target is deprecated and will be removed on or after 2023-04-01. Use - //:common instead. More info: - https://github.com/googleapis/google-cloud-cpp/issues/3701 - """, tags = ["manual"], - visibility = ["//visibility:public"], + visibility = [ + ":__subpackages__", + "//:__pkg__", + ], deps = [":google_cloud_cpp_common_private"], ) @@ -130,7 +110,7 @@ cc_library( ":google_cloud_cpp_common", ":google_cloud_cpp_mocks", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) for test in google_cloud_cpp_common_unit_tests] @@ -166,28 +146,25 @@ cc_library( ], deps = [ ":google_cloud_cpp_common", - "@com_github_grpc_grpc//:grpc++", - "@com_google_absl//absl/functional:function_ref", - "@com_google_absl//absl/time", - "@com_google_googleapis//:googleapis_system_includes", - "@com_google_googleapis//google/cloud/location:location_cc_grpc", - "@com_google_googleapis//google/iam/credentials/v1:credentials_cc_grpc", - "@com_google_googleapis//google/iam/v1:iam_cc_grpc", - "@com_google_googleapis//google/longrunning:longrunning_cc_grpc", - "@com_google_googleapis//google/rpc:error_details_cc_proto", - "@com_google_googleapis//google/rpc:status_cc_proto", + "@abseil-cpp//absl/functional:function_ref", + "@abseil-cpp//absl/time", + "@googleapis//google/cloud/location:location_cc_grpc", + "@googleapis//google/iam/credentials/v1:credentials_cc_grpc", + "@googleapis//google/iam/v1:iam_cc_grpc", + "@googleapis//google/longrunning:longrunning_cc_grpc", + "@googleapis//google/rpc:error_details_cc_proto", + "@googleapis//google/rpc:status_cc_proto", + "@grpc//:grpc++", ], ) cc_library( name = "google_cloud_cpp_grpc_utils", - deprecation = """ - This target is deprecated and will be removed on or after 2023-04-01. Use - //:grpc_utils instead. More info: - https://github.com/googleapis/google-cloud-cpp/issues/3701 - """, tags = ["manual"], - visibility = ["//visibility:public"], + visibility = [ + ":__subpackages__", + "//:__pkg__", + ], deps = [":google_cloud_cpp_grpc_utils_private"], ) @@ -200,9 +177,9 @@ cc_library( ":google_cloud_cpp_mocks", "//google/cloud/testing_util:google_cloud_cpp_testing_grpc_private", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_google_googleapis//google/bigtable/admin/v2:admin_cc_grpc", - "@com_google_googleapis//google/bigtable/v2:bigtable_cc_grpc", - "@com_google_googletest//:gtest_main", + "@googleapis//google/bigtable/admin/v2:admin_cc_grpc", + "@googleapis//google/bigtable/v2:bigtable_cc_grpc", + "@googletest//:gtest_main", ], ) for test in google_cloud_cpp_grpc_utils_unit_tests] @@ -217,9 +194,9 @@ cc_library( ":google_cloud_cpp_grpc_utils", "//google/cloud/testing_util:google_cloud_cpp_testing_grpc_private", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_google_googleapis//google/bigtable/admin/v2:admin_cc_grpc", - "@com_google_googleapis//google/bigtable/v2:bigtable_cc_grpc", - "@com_google_googletest//:gtest_main", + "@googleapis//google/bigtable/admin/v2:admin_cc_grpc", + "@googleapis//google/bigtable/v2:bigtable_cc_grpc", + "@googletest//:gtest_main", ], ) for test in google_cloud_cpp_grpc_utils_integration_tests] @@ -231,8 +208,8 @@ cc_library( ":google_cloud_cpp_grpc_utils", "@com_google_benchmark//:benchmark", "@com_google_benchmark//:benchmark_main", - "@com_google_googleapis//google/bigtable/admin/v2:admin_cc_grpc", - "@com_google_googleapis//google/bigtable/v2:bigtable_cc_grpc", + "@googleapis//google/bigtable/admin/v2:admin_cc_grpc", + "@googleapis//google/bigtable/v2:bigtable_cc_grpc", ], ) for test in google_cloud_cpp_grpc_utils_benchmarks] @@ -279,10 +256,10 @@ cc_library( visibility = ["//:__subpackages__"], deps = [ ":google_cloud_cpp_common", - "@com_github_curl_curl//:curl", - "@com_github_nlohmann_json//:json", - "@com_google_absl//absl/functional:function_ref", - "@com_google_absl//absl/types:span", + "@abseil-cpp//absl/functional:function_ref", + "@abseil-cpp//absl/types:span", + "@curl", + "@nlohmann_json//:json", ] + select({ "@platforms//os:windows": [], "//conditions:default": [ @@ -299,7 +276,7 @@ cc_library( ":google_cloud_cpp_rest_internal", "//google/cloud/testing_util:google_cloud_cpp_testing_private", "//google/cloud/testing_util:google_cloud_cpp_testing_rest_private", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) for test in google_cloud_cpp_rest_internal_unit_tests] @@ -312,7 +289,7 @@ cc_library( deps = [ ":google_cloud_cpp_rest_internal", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) for test in google_cloud_cpp_rest_internal_emulator_integration_tests] @@ -325,7 +302,7 @@ cc_library( deps = [ ":google_cloud_cpp_rest_internal", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) for test in google_cloud_cpp_rest_internal_production_integration_tests] @@ -360,9 +337,9 @@ cc_library( "//google/cloud/testing_util:google_cloud_cpp_testing_grpc_private", "//google/cloud/testing_util:google_cloud_cpp_testing_private", "//google/cloud/testing_util:google_cloud_cpp_testing_rest_private", - "@com_google_googleapis//google/bigtable/admin/v2:admin_cc_grpc", - "@com_google_googleapis//google/iam/admin/v1:admin_cc_grpc", - "@com_google_googletest//:gtest_main", + "@googleapis//google/bigtable/admin/v2:admin_cc_grpc", + "@googleapis//google/iam/admin/v1:admin_cc_grpc", + "@googletest//:gtest_main", ], ) for test in google_cloud_cpp_rest_protobuf_internal_unit_tests] @@ -384,7 +361,7 @@ cc_library( ":google_cloud_cpp_universe_domain", "//google/cloud/testing_util:google_cloud_cpp_testing_private", "//google/cloud/testing_util:google_cloud_cpp_testing_rest_private", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) for test in google_cloud_cpp_universe_domain_unit_tests] diff --git a/google/cloud/README.md b/google/cloud/README.md index 98e2d2689bbe2..6e0dc7f76e8da 100644 --- a/google/cloud/README.md +++ b/google/cloud/README.md @@ -15,14 +15,6 @@ intended for general use. They are subject to change and/or removal without notice. These include `google/cloud/internal/`, and `google/cloud/testing_utils/`. -## Supported Platforms - -- Windows, macOS, Linux -- C++14 (and higher) compilers. We test with GCC >= 7.5, Clang >= 6.0, and MSVC - \>= 2022 -- Environments with or without exceptions -- Bazel (>= 6.0) and CMake (>= 3.5) builds - ## Documentation - [Reference doxygen documentation][doxygen-link] for each release of this diff --git a/google/cloud/accessapproval/BUILD.bazel b/google/cloud/accessapproval/BUILD.bazel index a18e446f3f00d..bde1c5ea5b791 100644 --- a/google/cloud/accessapproval/BUILD.bazel +++ b/google/cloud/accessapproval/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/accessapproval/v1:accessapproval_cc_grpc", + "@googleapis//google/cloud/accessapproval/v1:accessapproval_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/accessapproval/CMakeLists.txt b/google/cloud/accessapproval/CMakeLists.txt index ed2dadc4fc1af..3d22ecb1d1483 100644 --- a/google/cloud/accessapproval/CMakeLists.txt +++ b/google/cloud/accessapproval/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(accessapproval "Access Approval API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(accessapproval_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/accessapproval/access_approval_client.h b/google/cloud/accessapproval/access_approval_client.h deleted file mode 100644 index 8fd41234aa446..0000000000000 --- a/google/cloud/accessapproval/access_approval_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/accessapproval/v1/accessapproval.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSAPPROVAL_ACCESS_APPROVAL_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSAPPROVAL_ACCESS_APPROVAL_CLIENT_H - -#include "google/cloud/accessapproval/access_approval_connection.h" -#include "google/cloud/accessapproval/v1/access_approval_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in accessapproval_v1 instead of the aliases defined in -/// this namespace. -namespace accessapproval { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use accessapproval_v1::AccessApprovalClient directly. -using ::google::cloud::accessapproval_v1::AccessApprovalClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace accessapproval -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSAPPROVAL_ACCESS_APPROVAL_CLIENT_H diff --git a/google/cloud/accessapproval/access_approval_connection.h b/google/cloud/accessapproval/access_approval_connection.h deleted file mode 100644 index 532e3a404a4ec..0000000000000 --- a/google/cloud/accessapproval/access_approval_connection.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/accessapproval/v1/accessapproval.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSAPPROVAL_ACCESS_APPROVAL_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSAPPROVAL_ACCESS_APPROVAL_CONNECTION_H - -#include "google/cloud/accessapproval/access_approval_connection_idempotency_policy.h" -#include "google/cloud/accessapproval/v1/access_approval_connection.h" - -namespace google { -namespace cloud { -namespace accessapproval { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use accessapproval_v1::MakeAccessApprovalConnection directly. -using ::google::cloud::accessapproval_v1::MakeAccessApprovalConnection; - -/// @deprecated Use accessapproval_v1::AccessApprovalConnection directly. -using ::google::cloud::accessapproval_v1::AccessApprovalConnection; - -/// @deprecated Use -/// accessapproval_v1::AccessApprovalLimitedErrorCountRetryPolicy directly. -using ::google::cloud::accessapproval_v1:: - AccessApprovalLimitedErrorCountRetryPolicy; - -/// @deprecated Use accessapproval_v1::AccessApprovalLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::accessapproval_v1::AccessApprovalLimitedTimeRetryPolicy; - -/// @deprecated Use accessapproval_v1::AccessApprovalRetryPolicy directly. -using ::google::cloud::accessapproval_v1::AccessApprovalRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace accessapproval -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSAPPROVAL_ACCESS_APPROVAL_CONNECTION_H diff --git a/google/cloud/accessapproval/access_approval_connection_idempotency_policy.h b/google/cloud/accessapproval/access_approval_connection_idempotency_policy.h deleted file mode 100644 index d72277c785324..0000000000000 --- a/google/cloud/accessapproval/access_approval_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/accessapproval/v1/accessapproval.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSAPPROVAL_ACCESS_APPROVAL_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSAPPROVAL_ACCESS_APPROVAL_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/accessapproval/v1/access_approval_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace accessapproval { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// accessapproval_v1::MakeDefaultAccessApprovalConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::accessapproval_v1:: - MakeDefaultAccessApprovalConnectionIdempotencyPolicy; - -/// @deprecated Use accessapproval_v1::AccessApprovalConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::accessapproval_v1:: - AccessApprovalConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace accessapproval -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSAPPROVAL_ACCESS_APPROVAL_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/accessapproval/access_approval_options.h b/google/cloud/accessapproval/access_approval_options.h deleted file mode 100644 index 8393ed07eb985..0000000000000 --- a/google/cloud/accessapproval/access_approval_options.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/accessapproval/v1/accessapproval.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSAPPROVAL_ACCESS_APPROVAL_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSAPPROVAL_ACCESS_APPROVAL_OPTIONS_H - -#include "google/cloud/accessapproval/access_approval_connection.h" -#include "google/cloud/accessapproval/access_approval_connection_idempotency_policy.h" -#include "google/cloud/accessapproval/v1/access_approval_options.h" - -namespace google { -namespace cloud { -namespace accessapproval { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use accessapproval_v1::AccessApprovalBackoffPolicyOption -/// directly. -using ::google::cloud::accessapproval_v1::AccessApprovalBackoffPolicyOption; - -/// @deprecated Use -/// accessapproval_v1::AccessApprovalConnectionIdempotencyPolicyOption directly. -using ::google::cloud::accessapproval_v1:: - AccessApprovalConnectionIdempotencyPolicyOption; - -/// @deprecated Use accessapproval_v1::AccessApprovalPolicyOptionList directly. -using ::google::cloud::accessapproval_v1::AccessApprovalPolicyOptionList; - -/// @deprecated Use accessapproval_v1::AccessApprovalRetryPolicyOption directly. -using ::google::cloud::accessapproval_v1::AccessApprovalRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace accessapproval -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSAPPROVAL_ACCESS_APPROVAL_OPTIONS_H diff --git a/google/cloud/accessapproval/mocks/mock_access_approval_connection.h b/google/cloud/accessapproval/mocks/mock_access_approval_connection.h deleted file mode 100644 index c9f2f67c63fa1..0000000000000 --- a/google/cloud/accessapproval/mocks/mock_access_approval_connection.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/accessapproval/v1/accessapproval.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSAPPROVAL_MOCKS_MOCK_ACCESS_APPROVAL_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSAPPROVAL_MOCKS_MOCK_ACCESS_APPROVAL_CONNECTION_H - -#include "google/cloud/accessapproval/access_approval_connection.h" -#include "google/cloud/accessapproval/v1/mocks/mock_access_approval_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in accessapproval_v1_mocks instead of the aliases -/// defined in this namespace. -namespace accessapproval_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use accessapproval_v1_mocks::MockAccessApprovalConnection -/// directly. -using ::google::cloud::accessapproval_v1_mocks::MockAccessApprovalConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace accessapproval_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSAPPROVAL_MOCKS_MOCK_ACCESS_APPROVAL_CONNECTION_H diff --git a/google/cloud/accessapproval/quickstart/.bazelrc b/google/cloud/accessapproval/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/accessapproval/quickstart/.bazelrc +++ b/google/cloud/accessapproval/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/accessapproval/quickstart/CMakeLists.txt b/google/cloud/accessapproval/quickstart/CMakeLists.txt index 63bea4cbcde1b..43a083c44f1c3 100644 --- a/google/cloud/accessapproval/quickstart/CMakeLists.txt +++ b/google/cloud/accessapproval/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Access Approval API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-accessapproval-quickstart CXX) find_package(google_cloud_cpp_accessapproval REQUIRED) diff --git a/google/cloud/accessapproval/v1/access_approval_connection.h b/google/cloud/accessapproval/v1/access_approval_connection.h index 613727bf693d7..bf36771e5831b 100644 --- a/google/cloud/accessapproval/v1/access_approval_connection.h +++ b/google/cloud/accessapproval/v1/access_approval_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSAPPROVAL_V1_ACCESS_APPROVAL_CONNECTION_H #include "google/cloud/accessapproval/v1/access_approval_connection_idempotency_policy.h" +#include "google/cloud/accessapproval/v1/accessapproval.pb.h" #include "google/cloud/accessapproval/v1/internal/access_approval_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/accessapproval/v1/access_approval_connection_idempotency_policy.h b/google/cloud/accessapproval/v1/access_approval_connection_idempotency_policy.h index 348ac7346e7ed..662276327e49f 100644 --- a/google/cloud/accessapproval/v1/access_approval_connection_idempotency_policy.h +++ b/google/cloud/accessapproval/v1/access_approval_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSAPPROVAL_V1_ACCESS_APPROVAL_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSAPPROVAL_V1_ACCESS_APPROVAL_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/accessapproval/v1/accessapproval.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/accessapproval/v1/internal/access_approval_auth_decorator.cc b/google/cloud/accessapproval/v1/internal/access_approval_auth_decorator.cc index 636d93fd8822b..d3eda57f48a88 100644 --- a/google/cloud/accessapproval/v1/internal/access_approval_auth_decorator.cc +++ b/google/cloud/accessapproval/v1/internal/access_approval_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/accessapproval/v1/accessapproval.proto #include "google/cloud/accessapproval/v1/internal/access_approval_auth_decorator.h" -#include +#include "google/cloud/accessapproval/v1/accessapproval.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace accessapproval_v1_internal { @@ -124,3 +127,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace accessapproval_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/accessapproval/v1/internal/access_approval_auth_decorator.h b/google/cloud/accessapproval/v1/internal/access_approval_auth_decorator.h index 952dedada86db..b770afec0bf3d 100644 --- a/google/cloud/accessapproval/v1/internal/access_approval_auth_decorator.h +++ b/google/cloud/accessapproval/v1/internal/access_approval_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace accessapproval_v1_internal { @@ -101,4 +104,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSAPPROVAL_V1_INTERNAL_ACCESS_APPROVAL_AUTH_DECORATOR_H diff --git a/google/cloud/accessapproval/v1/internal/access_approval_logging_decorator.cc b/google/cloud/accessapproval/v1/internal/access_approval_logging_decorator.cc index d71dd6539436e..ac21aa792d383 100644 --- a/google/cloud/accessapproval/v1/internal/access_approval_logging_decorator.cc +++ b/google/cloud/accessapproval/v1/internal/access_approval_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/accessapproval/v1/accessapproval.proto #include "google/cloud/accessapproval/v1/internal/access_approval_logging_decorator.h" +#include "google/cloud/accessapproval/v1/accessapproval.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace accessapproval_v1_internal { @@ -166,3 +169,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace accessapproval_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/accessapproval/v1/internal/access_approval_logging_decorator.h b/google/cloud/accessapproval/v1/internal/access_approval_logging_decorator.h index b534adc2c32b6..2179ac9003549 100644 --- a/google/cloud/accessapproval/v1/internal/access_approval_logging_decorator.h +++ b/google/cloud/accessapproval/v1/internal/access_approval_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace accessapproval_v1_internal { @@ -101,4 +104,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSAPPROVAL_V1_INTERNAL_ACCESS_APPROVAL_LOGGING_DECORATOR_H diff --git a/google/cloud/accessapproval/v1/internal/access_approval_metadata_decorator.cc b/google/cloud/accessapproval/v1/internal/access_approval_metadata_decorator.cc index 9e73c7f2fc264..ce5f874cec6b9 100644 --- a/google/cloud/accessapproval/v1/internal/access_approval_metadata_decorator.cc +++ b/google/cloud/accessapproval/v1/internal/access_approval_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/accessapproval/v1/accessapproval.proto #include "google/cloud/accessapproval/v1/internal/access_approval_metadata_decorator.h" +#include "google/cloud/accessapproval/v1/accessapproval.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace accessapproval_v1_internal { @@ -151,3 +155,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace accessapproval_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/accessapproval/v1/internal/access_approval_metadata_decorator.h b/google/cloud/accessapproval/v1/internal/access_approval_metadata_decorator.h index 540fcf58f69cc..ed9674c6464b5 100644 --- a/google/cloud/accessapproval/v1/internal/access_approval_metadata_decorator.h +++ b/google/cloud/accessapproval/v1/internal/access_approval_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace accessapproval_v1_internal { @@ -106,4 +109,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSAPPROVAL_V1_INTERNAL_ACCESS_APPROVAL_METADATA_DECORATOR_H diff --git a/google/cloud/accessapproval/v1/internal/access_approval_option_defaults.cc b/google/cloud/accessapproval/v1/internal/access_approval_option_defaults.cc index 88a064f8dc1db..10fb8e272aff2 100644 --- a/google/cloud/accessapproval/v1/internal/access_approval_option_defaults.cc +++ b/google/cloud/accessapproval/v1/internal/access_approval_option_defaults.cc @@ -42,7 +42,7 @@ Options AccessApprovalDefaultOptions(Options options) { if (!options.has()) { options.set( accessapproval_v1::AccessApprovalLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/accessapproval/v1/internal/access_approval_stub.cc b/google/cloud/accessapproval/v1/internal/access_approval_stub.cc index b7327fa7eb667..66d8d3a2dd37b 100644 --- a/google/cloud/accessapproval/v1/internal/access_approval_stub.cc +++ b/google/cloud/accessapproval/v1/internal/access_approval_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/accessapproval/v1/accessapproval.proto #include "google/cloud/accessapproval/v1/internal/access_approval_stub.h" +#include "google/cloud/accessapproval/v1/accessapproval.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace accessapproval_v1_internal { @@ -157,3 +160,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace accessapproval_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/accessapproval/v1/internal/access_approval_stub.h b/google/cloud/accessapproval/v1/internal/access_approval_stub.h index dd1c7c09e6744..eb1700bef052b 100644 --- a/google/cloud/accessapproval/v1/internal/access_approval_stub.h +++ b/google/cloud/accessapproval/v1/internal/access_approval_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSAPPROVAL_V1_INTERNAL_ACCESS_APPROVAL_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSAPPROVAL_V1_INTERNAL_ACCESS_APPROVAL_STUB_H +#include "google/cloud/accessapproval/v1/accessapproval.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace accessapproval_v1_internal { @@ -163,4 +166,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSAPPROVAL_V1_INTERNAL_ACCESS_APPROVAL_STUB_H diff --git a/google/cloud/accessapproval/v1/internal/access_approval_stub_factory.cc b/google/cloud/accessapproval/v1/internal/access_approval_stub_factory.cc index 590ed2cf44ba4..d2e9076024088 100644 --- a/google/cloud/accessapproval/v1/internal/access_approval_stub_factory.cc +++ b/google/cloud/accessapproval/v1/internal/access_approval_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/accessapproval/v1/accessapproval.proto #include "google/cloud/accessapproval/v1/internal/access_approval_stub_factory.h" +#include "google/cloud/accessapproval/v1/accessapproval.grpc.pb.h" #include "google/cloud/accessapproval/v1/internal/access_approval_auth_decorator.h" #include "google/cloud/accessapproval/v1/internal/access_approval_logging_decorator.h" #include "google/cloud/accessapproval/v1/internal/access_approval_metadata_decorator.h" @@ -28,10 +29,12 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace accessapproval_v1_internal { @@ -69,3 +72,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace accessapproval_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/accessapproval/v1/internal/access_approval_stub_factory.h b/google/cloud/accessapproval/v1/internal/access_approval_stub_factory.h index a41c33fddc628..73157c8c089de 100644 --- a/google/cloud/accessapproval/v1/internal/access_approval_stub_factory.h +++ b/google/cloud/accessapproval/v1/internal/access_approval_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace accessapproval_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSAPPROVAL_V1_INTERNAL_ACCESS_APPROVAL_STUB_FACTORY_H diff --git a/google/cloud/accessapproval/v1/internal/access_approval_tracing_connection.cc b/google/cloud/accessapproval/v1/internal/access_approval_tracing_connection.cc index 63330e54258fe..8b535a3f8d0bf 100644 --- a/google/cloud/accessapproval/v1/internal/access_approval_tracing_connection.cc +++ b/google/cloud/accessapproval/v1/internal/access_approval_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace accessapproval_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AccessApprovalTracingConnection::AccessApprovalTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -130,16 +128,12 @@ AccessApprovalTracingConnection::GetAccessApprovalServiceAccount( child_->GetAccessApprovalServiceAccount(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAccessApprovalTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/accessapproval/v1/internal/access_approval_tracing_connection.h b/google/cloud/accessapproval/v1/internal/access_approval_tracing_connection.h index 66b59d3c6c08c..d406d7f02d799 100644 --- a/google/cloud/accessapproval/v1/internal/access_approval_tracing_connection.h +++ b/google/cloud/accessapproval/v1/internal/access_approval_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace accessapproval_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AccessApprovalTracingConnection : public accessapproval_v1::AccessApprovalConnection { public: @@ -88,8 +86,6 @@ class AccessApprovalTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/accessapproval/v1/internal/access_approval_tracing_stub.cc b/google/cloud/accessapproval/v1/internal/access_approval_tracing_stub.cc index 365332268e5cf..0bff843346db0 100644 --- a/google/cloud/accessapproval/v1/internal/access_approval_tracing_stub.cc +++ b/google/cloud/accessapproval/v1/internal/access_approval_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace accessapproval_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AccessApprovalTracingStub::AccessApprovalTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -162,18 +163,14 @@ AccessApprovalTracingStub::GetAccessApprovalServiceAccount( child_->GetAccessApprovalServiceAccount(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAccessApprovalTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace accessapproval_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/accessapproval/v1/internal/access_approval_tracing_stub.h b/google/cloud/accessapproval/v1/internal/access_approval_tracing_stub.h index 64b307080c378..f678cafb8d935 100644 --- a/google/cloud/accessapproval/v1/internal/access_approval_tracing_stub.h +++ b/google/cloud/accessapproval/v1/internal/access_approval_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace accessapproval_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AccessApprovalTracingStub : public AccessApprovalStub { public: ~AccessApprovalTracingStub() override = default; @@ -97,8 +98,6 @@ class AccessApprovalTracingStub : public AccessApprovalStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -113,4 +112,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSAPPROVAL_V1_INTERNAL_ACCESS_APPROVAL_TRACING_STUB_H diff --git a/google/cloud/accesscontextmanager/BUILD.bazel b/google/cloud/accesscontextmanager/BUILD.bazel index 9970c6c24fbf3..7aa7362445cc5 100644 --- a/google/cloud/accesscontextmanager/BUILD.bazel +++ b/google/cloud/accesscontextmanager/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/identity/accesscontextmanager/v1:accesscontextmanager_cc_grpc", + "@googleapis//google/identity/accesscontextmanager/v1:accesscontextmanager_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/accesscontextmanager/CMakeLists.txt b/google/cloud/accesscontextmanager/CMakeLists.txt index ed4fb0ca0a228..50e28e53c7f87 100644 --- a/google/cloud/accesscontextmanager/CMakeLists.txt +++ b/google/cloud/accesscontextmanager/CMakeLists.txt @@ -17,8 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library( - accesscontextmanager "Access Context Manager API" SERVICE_DIRS "__EMPTY__" - "v1/") + accesscontextmanager "Access Context Manager API" SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(accesscontextmanager_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/accesscontextmanager/access_context_manager_client.h b/google/cloud/accesscontextmanager/access_context_manager_client.h deleted file mode 100644 index 34d876ce7301f..0000000000000 --- a/google/cloud/accesscontextmanager/access_context_manager_client.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/identity/accesscontextmanager/v1/access_context_manager.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSCONTEXTMANAGER_ACCESS_CONTEXT_MANAGER_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSCONTEXTMANAGER_ACCESS_CONTEXT_MANAGER_CLIENT_H - -#include "google/cloud/accesscontextmanager/access_context_manager_connection.h" -#include "google/cloud/accesscontextmanager/v1/access_context_manager_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in accesscontextmanager_v1 instead of the aliases defined -/// in this namespace. -namespace accesscontextmanager { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use accesscontextmanager_v1::AccessContextManagerClient -/// directly. -using ::google::cloud::accesscontextmanager_v1::AccessContextManagerClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace accesscontextmanager -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSCONTEXTMANAGER_ACCESS_CONTEXT_MANAGER_CLIENT_H diff --git a/google/cloud/accesscontextmanager/access_context_manager_connection.h b/google/cloud/accesscontextmanager/access_context_manager_connection.h deleted file mode 100644 index e4e857eaaf5f9..0000000000000 --- a/google/cloud/accesscontextmanager/access_context_manager_connection.h +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/identity/accesscontextmanager/v1/access_context_manager.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSCONTEXTMANAGER_ACCESS_CONTEXT_MANAGER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSCONTEXTMANAGER_ACCESS_CONTEXT_MANAGER_CONNECTION_H - -#include "google/cloud/accesscontextmanager/access_context_manager_connection_idempotency_policy.h" -#include "google/cloud/accesscontextmanager/v1/access_context_manager_connection.h" - -namespace google { -namespace cloud { -namespace accesscontextmanager { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use accesscontextmanager_v1::MakeAccessContextManagerConnection -/// directly. -using ::google::cloud::accesscontextmanager_v1:: - MakeAccessContextManagerConnection; - -/// @deprecated Use accesscontextmanager_v1::AccessContextManagerConnection -/// directly. -using ::google::cloud::accesscontextmanager_v1::AccessContextManagerConnection; - -/// @deprecated Use -/// accesscontextmanager_v1::AccessContextManagerLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::accesscontextmanager_v1:: - AccessContextManagerLimitedErrorCountRetryPolicy; - -/// @deprecated Use -/// accesscontextmanager_v1::AccessContextManagerLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::accesscontextmanager_v1:: - AccessContextManagerLimitedTimeRetryPolicy; - -/// @deprecated Use accesscontextmanager_v1::AccessContextManagerRetryPolicy -/// directly. -using ::google::cloud::accesscontextmanager_v1::AccessContextManagerRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace accesscontextmanager -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSCONTEXTMANAGER_ACCESS_CONTEXT_MANAGER_CONNECTION_H diff --git a/google/cloud/accesscontextmanager/access_context_manager_connection_idempotency_policy.h b/google/cloud/accesscontextmanager/access_context_manager_connection_idempotency_policy.h deleted file mode 100644 index 537c22d95d5d6..0000000000000 --- a/google/cloud/accesscontextmanager/access_context_manager_connection_idempotency_policy.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/identity/accesscontextmanager/v1/access_context_manager.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSCONTEXTMANAGER_ACCESS_CONTEXT_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSCONTEXTMANAGER_ACCESS_CONTEXT_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/accesscontextmanager/v1/access_context_manager_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace accesscontextmanager { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// accesscontextmanager_v1::MakeDefaultAccessContextManagerConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::accesscontextmanager_v1:: - MakeDefaultAccessContextManagerConnectionIdempotencyPolicy; - -/// @deprecated Use -/// accesscontextmanager_v1::AccessContextManagerConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::accesscontextmanager_v1:: - AccessContextManagerConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace accesscontextmanager -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSCONTEXTMANAGER_ACCESS_CONTEXT_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/accesscontextmanager/access_context_manager_options.h b/google/cloud/accesscontextmanager/access_context_manager_options.h deleted file mode 100644 index ce05c2fc804c2..0000000000000 --- a/google/cloud/accesscontextmanager/access_context_manager_options.h +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/identity/accesscontextmanager/v1/access_context_manager.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSCONTEXTMANAGER_ACCESS_CONTEXT_MANAGER_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSCONTEXTMANAGER_ACCESS_CONTEXT_MANAGER_OPTIONS_H - -#include "google/cloud/accesscontextmanager/access_context_manager_connection.h" -#include "google/cloud/accesscontextmanager/access_context_manager_connection_idempotency_policy.h" -#include "google/cloud/accesscontextmanager/v1/access_context_manager_options.h" - -namespace google { -namespace cloud { -namespace accesscontextmanager { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// accesscontextmanager_v1::AccessContextManagerPollingPolicyOption directly. -using ::google::cloud::accesscontextmanager_v1:: - AccessContextManagerPollingPolicyOption; - -/// @deprecated Use -/// accesscontextmanager_v1::AccessContextManagerBackoffPolicyOption directly. -using ::google::cloud::accesscontextmanager_v1:: - AccessContextManagerBackoffPolicyOption; - -/// @deprecated Use -/// accesscontextmanager_v1::AccessContextManagerConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::accesscontextmanager_v1:: - AccessContextManagerConnectionIdempotencyPolicyOption; - -/// @deprecated Use -/// accesscontextmanager_v1::AccessContextManagerPolicyOptionList directly. -using ::google::cloud::accesscontextmanager_v1:: - AccessContextManagerPolicyOptionList; - -/// @deprecated Use -/// accesscontextmanager_v1::AccessContextManagerRetryPolicyOption directly. -using ::google::cloud::accesscontextmanager_v1:: - AccessContextManagerRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace accesscontextmanager -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSCONTEXTMANAGER_ACCESS_CONTEXT_MANAGER_OPTIONS_H diff --git a/google/cloud/accesscontextmanager/mocks/mock_access_context_manager_connection.h b/google/cloud/accesscontextmanager/mocks/mock_access_context_manager_connection.h deleted file mode 100644 index 1d1b70fbf3f64..0000000000000 --- a/google/cloud/accesscontextmanager/mocks/mock_access_context_manager_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/identity/accesscontextmanager/v1/access_context_manager.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSCONTEXTMANAGER_MOCKS_MOCK_ACCESS_CONTEXT_MANAGER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSCONTEXTMANAGER_MOCKS_MOCK_ACCESS_CONTEXT_MANAGER_CONNECTION_H - -#include "google/cloud/accesscontextmanager/access_context_manager_connection.h" -#include "google/cloud/accesscontextmanager/v1/mocks/mock_access_context_manager_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in accesscontextmanager_v1_mocks instead of the aliases -/// defined in this namespace. -namespace accesscontextmanager_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// accesscontextmanager_v1_mocks::MockAccessContextManagerConnection directly. -using ::google::cloud::accesscontextmanager_v1_mocks:: - MockAccessContextManagerConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace accesscontextmanager_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSCONTEXTMANAGER_MOCKS_MOCK_ACCESS_CONTEXT_MANAGER_CONNECTION_H diff --git a/google/cloud/accesscontextmanager/quickstart/.bazelrc b/google/cloud/accesscontextmanager/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/accesscontextmanager/quickstart/.bazelrc +++ b/google/cloud/accesscontextmanager/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/accesscontextmanager/quickstart/CMakeLists.txt b/google/cloud/accesscontextmanager/quickstart/CMakeLists.txt index 8ae77adaeea1d..fd63ac9813095 100644 --- a/google/cloud/accesscontextmanager/quickstart/CMakeLists.txt +++ b/google/cloud/accesscontextmanager/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Access Context Manager API C++ client library # from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-accesscontextmanager-quickstart CXX) find_package(google_cloud_cpp_accesscontextmanager REQUIRED) diff --git a/google/cloud/accesscontextmanager/v1/access_context_manager_client.h b/google/cloud/accesscontextmanager/v1/access_context_manager_client.h index 9dc0e0fa65f3b..4bbe028367b23 100644 --- a/google/cloud/accesscontextmanager/v1/access_context_manager_client.h +++ b/google/cloud/accesscontextmanager/v1/access_context_manager_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/accesscontextmanager/v1/access_context_manager_connection.h b/google/cloud/accesscontextmanager/v1/access_context_manager_connection.h index d086f006f60e9..99ee60ec71b24 100644 --- a/google/cloud/accesscontextmanager/v1/access_context_manager_connection.h +++ b/google/cloud/accesscontextmanager/v1/access_context_manager_connection.h @@ -30,8 +30,8 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/identity/accesscontextmanager/v1/access_context_manager.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/accesscontextmanager/v1/access_context_manager_connection_idempotency_policy.h b/google/cloud/accesscontextmanager/v1/access_context_manager_connection_idempotency_policy.h index 0eb739ac779b5..0b78cc9623285 100644 --- a/google/cloud/accesscontextmanager/v1/access_context_manager_connection_idempotency_policy.h +++ b/google/cloud/accesscontextmanager/v1/access_context_manager_connection_idempotency_policy.h @@ -21,8 +21,8 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/identity/accesscontextmanager/v1/access_context_manager.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/accesscontextmanager/v1/internal/access_context_manager_auth_decorator.cc b/google/cloud/accesscontextmanager/v1/internal/access_context_manager_auth_decorator.cc index dc864544f7a97..93677a66122f9 100644 --- a/google/cloud/accesscontextmanager/v1/internal/access_context_manager_auth_decorator.cc +++ b/google/cloud/accesscontextmanager/v1/internal/access_context_manager_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/identity/accesscontextmanager/v1/access_context_manager.proto #include "google/cloud/accesscontextmanager/v1/internal/access_context_manager_auth_decorator.h" -#include +#include "google/identity/accesscontextmanager/v1/access_context_manager.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace accesscontextmanager_v1_internal { @@ -649,3 +652,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace accesscontextmanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/accesscontextmanager/v1/internal/access_context_manager_auth_decorator.h b/google/cloud/accesscontextmanager/v1/internal/access_context_manager_auth_decorator.h index efde008bcff0c..3d21e7e9960fa 100644 --- a/google/cloud/accesscontextmanager/v1/internal/access_context_manager_auth_decorator.h +++ b/google/cloud/accesscontextmanager/v1/internal/access_context_manager_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/accesscontextmanager/v1/internal/access_context_manager_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace accesscontextmanager_v1_internal { @@ -310,4 +313,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSCONTEXTMANAGER_V1_INTERNAL_ACCESS_CONTEXT_MANAGER_AUTH_DECORATOR_H diff --git a/google/cloud/accesscontextmanager/v1/internal/access_context_manager_connection_impl.h b/google/cloud/accesscontextmanager/v1/internal/access_context_manager_connection_impl.h index f3ca0294e700f..3bf72214b08fe 100644 --- a/google/cloud/accesscontextmanager/v1/internal/access_context_manager_connection_impl.h +++ b/google/cloud/accesscontextmanager/v1/internal/access_context_manager_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/accesscontextmanager/v1/internal/access_context_manager_logging_decorator.cc b/google/cloud/accesscontextmanager/v1/internal/access_context_manager_logging_decorator.cc index 3db37e0e4e9dd..91642147b154d 100644 --- a/google/cloud/accesscontextmanager/v1/internal/access_context_manager_logging_decorator.cc +++ b/google/cloud/accesscontextmanager/v1/internal/access_context_manager_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/accesscontextmanager/v1/internal/access_context_manager_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/identity/accesscontextmanager/v1/access_context_manager.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace accesscontextmanager_v1_internal { @@ -742,3 +745,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace accesscontextmanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/accesscontextmanager/v1/internal/access_context_manager_logging_decorator.h b/google/cloud/accesscontextmanager/v1/internal/access_context_manager_logging_decorator.h index 8e68588e6df28..80389128a6e41 100644 --- a/google/cloud/accesscontextmanager/v1/internal/access_context_manager_logging_decorator.h +++ b/google/cloud/accesscontextmanager/v1/internal/access_context_manager_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/accesscontextmanager/v1/internal/access_context_manager_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace accesscontextmanager_v1_internal { @@ -310,4 +313,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSCONTEXTMANAGER_V1_INTERNAL_ACCESS_CONTEXT_MANAGER_LOGGING_DECORATOR_H diff --git a/google/cloud/accesscontextmanager/v1/internal/access_context_manager_metadata_decorator.cc b/google/cloud/accesscontextmanager/v1/internal/access_context_manager_metadata_decorator.cc index 2a22436194ac8..bd5d94085adb7 100644 --- a/google/cloud/accesscontextmanager/v1/internal/access_context_manager_metadata_decorator.cc +++ b/google/cloud/accesscontextmanager/v1/internal/access_context_manager_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/accesscontextmanager/v1/internal/access_context_manager_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/identity/accesscontextmanager/v1/access_context_manager.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace accesscontextmanager_v1_internal { @@ -555,3 +559,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace accesscontextmanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/accesscontextmanager/v1/internal/access_context_manager_metadata_decorator.h b/google/cloud/accesscontextmanager/v1/internal/access_context_manager_metadata_decorator.h index f994cd011d061..e17214f952937 100644 --- a/google/cloud/accesscontextmanager/v1/internal/access_context_manager_metadata_decorator.h +++ b/google/cloud/accesscontextmanager/v1/internal/access_context_manager_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/accesscontextmanager/v1/internal/access_context_manager_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace accesscontextmanager_v1_internal { @@ -316,4 +319,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSCONTEXTMANAGER_V1_INTERNAL_ACCESS_CONTEXT_MANAGER_METADATA_DECORATOR_H diff --git a/google/cloud/accesscontextmanager/v1/internal/access_context_manager_option_defaults.cc b/google/cloud/accesscontextmanager/v1/internal/access_context_manager_option_defaults.cc index f2cafebd699d0..367675a81b8e9 100644 --- a/google/cloud/accesscontextmanager/v1/internal/access_context_manager_option_defaults.cc +++ b/google/cloud/accesscontextmanager/v1/internal/access_context_manager_option_defaults.cc @@ -43,7 +43,7 @@ Options AccessContextManagerDefaultOptions(Options options) { accesscontextmanager_v1::AccessContextManagerRetryPolicyOption>()) { options.set( accesscontextmanager_v1::AccessContextManagerLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/accesscontextmanager/v1/internal/access_context_manager_stub.cc b/google/cloud/accesscontextmanager/v1/internal/access_context_manager_stub.cc index de9ae931f53ea..197e1a74f31f5 100644 --- a/google/cloud/accesscontextmanager/v1/internal/access_context_manager_stub.cc +++ b/google/cloud/accesscontextmanager/v1/internal/access_context_manager_stub.cc @@ -19,11 +19,14 @@ #include "google/cloud/accesscontextmanager/v1/internal/access_context_manager_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/identity/accesscontextmanager/v1/access_context_manager.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace accesscontextmanager_v1_internal { @@ -735,3 +738,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace accesscontextmanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/accesscontextmanager/v1/internal/access_context_manager_stub.h b/google/cloud/accesscontextmanager/v1/internal/access_context_manager_stub.h index 8201a17b445d6..12ec2c6901f37 100644 --- a/google/cloud/accesscontextmanager/v1/internal/access_context_manager_stub.h +++ b/google/cloud/accesscontextmanager/v1/internal/access_context_manager_stub.h @@ -24,11 +24,14 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/identity/accesscontextmanager/v1/access_context_manager.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace accesscontextmanager_v1_internal { @@ -592,4 +595,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSCONTEXTMANAGER_V1_INTERNAL_ACCESS_CONTEXT_MANAGER_STUB_H diff --git a/google/cloud/accesscontextmanager/v1/internal/access_context_manager_stub_factory.cc b/google/cloud/accesscontextmanager/v1/internal/access_context_manager_stub_factory.cc index a9804819762d4..cf72f09fe0d93 100644 --- a/google/cloud/accesscontextmanager/v1/internal/access_context_manager_stub_factory.cc +++ b/google/cloud/accesscontextmanager/v1/internal/access_context_manager_stub_factory.cc @@ -28,11 +28,14 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/identity/accesscontextmanager/v1/access_context_manager.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace accesscontextmanager_v1_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace accesscontextmanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/accesscontextmanager/v1/internal/access_context_manager_stub_factory.h b/google/cloud/accesscontextmanager/v1/internal/access_context_manager_stub_factory.h index ededefed4ce26..0cd7c2b9204f0 100644 --- a/google/cloud/accesscontextmanager/v1/internal/access_context_manager_stub_factory.h +++ b/google/cloud/accesscontextmanager/v1/internal/access_context_manager_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace accesscontextmanager_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSCONTEXTMANAGER_V1_INTERNAL_ACCESS_CONTEXT_MANAGER_STUB_FACTORY_H diff --git a/google/cloud/accesscontextmanager/v1/internal/access_context_manager_tracing_connection.cc b/google/cloud/accesscontextmanager/v1/internal/access_context_manager_tracing_connection.cc index f5235aea2932f..3c262886e27a1 100644 --- a/google/cloud/accesscontextmanager/v1/internal/access_context_manager_tracing_connection.cc +++ b/google/cloud/accesscontextmanager/v1/internal/access_context_manager_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace accesscontextmanager_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AccessContextManagerTracingConnection::AccessContextManagerTracingConnection( std::shared_ptr child) @@ -715,18 +713,14 @@ AccessContextManagerTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAccessContextManagerTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/accesscontextmanager/v1/internal/access_context_manager_tracing_connection.h b/google/cloud/accesscontextmanager/v1/internal/access_context_manager_tracing_connection.h index 1145661c6db1a..63b5c965a193a 100644 --- a/google/cloud/accesscontextmanager/v1/internal/access_context_manager_tracing_connection.h +++ b/google/cloud/accesscontextmanager/v1/internal/access_context_manager_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace accesscontextmanager_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AccessContextManagerTracingConnection : public accesscontextmanager_v1::AccessContextManagerConnection { public: @@ -301,8 +299,6 @@ class AccessContextManagerTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/accesscontextmanager/v1/internal/access_context_manager_tracing_stub.cc b/google/cloud/accesscontextmanager/v1/internal/access_context_manager_tracing_stub.cc index 84fdea8249754..041ac9a51e601 100644 --- a/google/cloud/accesscontextmanager/v1/internal/access_context_manager_tracing_stub.cc +++ b/google/cloud/accesscontextmanager/v1/internal/access_context_manager_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace accesscontextmanager_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AccessContextManagerTracingStub::AccessContextManagerTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -697,18 +698,14 @@ future AccessContextManagerTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAccessContextManagerTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace accesscontextmanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/accesscontextmanager/v1/internal/access_context_manager_tracing_stub.h b/google/cloud/accesscontextmanager/v1/internal/access_context_manager_tracing_stub.h index 02c1e1c5aed72..1a3bf60203013 100644 --- a/google/cloud/accesscontextmanager/v1/internal/access_context_manager_tracing_stub.h +++ b/google/cloud/accesscontextmanager/v1/internal/access_context_manager_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace accesscontextmanager_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AccessContextManagerTracingStub : public AccessContextManagerStub { public: ~AccessContextManagerTracingStub() override = default; @@ -306,8 +307,6 @@ class AccessContextManagerTracingStub : public AccessContextManagerStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -322,4 +321,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ACCESSCONTEXTMANAGER_V1_INTERNAL_ACCESS_CONTEXT_MANAGER_TRACING_STUB_H diff --git a/google/cloud/advisorynotifications/BUILD.bazel b/google/cloud/advisorynotifications/BUILD.bazel index f7ac0e5cce0a3..c8b02f28eac04 100644 --- a/google/cloud/advisorynotifications/BUILD.bazel +++ b/google/cloud/advisorynotifications/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/advisorynotifications/v1:advisorynotifications_cc_grpc", + "@googleapis//google/cloud/advisorynotifications/v1:advisorynotifications_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/advisorynotifications/quickstart/.bazelrc b/google/cloud/advisorynotifications/quickstart/.bazelrc index 6777c6b4c95de..ec27511a60add 100644 --- a/google/cloud/advisorynotifications/quickstart/.bazelrc +++ b/google/cloud/advisorynotifications/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/advisorynotifications/quickstart/CMakeLists.txt b/google/cloud/advisorynotifications/quickstart/CMakeLists.txt index bff831625ae52..ab6388f6a9e72 100644 --- a/google/cloud/advisorynotifications/quickstart/CMakeLists.txt +++ b/google/cloud/advisorynotifications/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Advisory Notifications API C++ client library # from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-advisorynotifications-quickstart CXX) find_package(google_cloud_cpp_advisorynotifications REQUIRED) diff --git a/google/cloud/advisorynotifications/v1/advisory_notifications_connection.h b/google/cloud/advisorynotifications/v1/advisory_notifications_connection.h index cfb32f9b0ddc7..c801bcb2313ff 100644 --- a/google/cloud/advisorynotifications/v1/advisory_notifications_connection.h +++ b/google/cloud/advisorynotifications/v1/advisory_notifications_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/advisorynotifications/v1/advisory_notifications_connection_idempotency_policy.h" #include "google/cloud/advisorynotifications/v1/internal/advisory_notifications_retry_traits.h" +#include "google/cloud/advisorynotifications/v1/service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/advisorynotifications/v1/advisory_notifications_connection_idempotency_policy.h b/google/cloud/advisorynotifications/v1/advisory_notifications_connection_idempotency_policy.h index e2a718e43847b..de901aea7f4f3 100644 --- a/google/cloud/advisorynotifications/v1/advisory_notifications_connection_idempotency_policy.h +++ b/google/cloud/advisorynotifications/v1/advisory_notifications_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ADVISORYNOTIFICATIONS_V1_ADVISORY_NOTIFICATIONS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ADVISORYNOTIFICATIONS_V1_ADVISORY_NOTIFICATIONS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/advisorynotifications/v1/service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/advisorynotifications/v1/internal/advisory_notifications_auth_decorator.cc b/google/cloud/advisorynotifications/v1/internal/advisory_notifications_auth_decorator.cc index 9900c4e0df921..d3aca52f5ffaa 100644 --- a/google/cloud/advisorynotifications/v1/internal/advisory_notifications_auth_decorator.cc +++ b/google/cloud/advisorynotifications/v1/internal/advisory_notifications_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/advisorynotifications/v1/service.proto #include "google/cloud/advisorynotifications/v1/internal/advisory_notifications_auth_decorator.h" -#include +#include "google/cloud/advisorynotifications/v1/service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace advisorynotifications_v1_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace advisorynotifications_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/advisorynotifications/v1/internal/advisory_notifications_auth_decorator.h b/google/cloud/advisorynotifications/v1/internal/advisory_notifications_auth_decorator.h index 42cbad9890c79..918d9cbad3590 100644 --- a/google/cloud/advisorynotifications/v1/internal/advisory_notifications_auth_decorator.h +++ b/google/cloud/advisorynotifications/v1/internal/advisory_notifications_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace advisorynotifications_v1_internal { @@ -71,4 +74,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ADVISORYNOTIFICATIONS_V1_INTERNAL_ADVISORY_NOTIFICATIONS_AUTH_DECORATOR_H diff --git a/google/cloud/advisorynotifications/v1/internal/advisory_notifications_logging_decorator.cc b/google/cloud/advisorynotifications/v1/internal/advisory_notifications_logging_decorator.cc index 87d040cef97f5..530e730a883ce 100644 --- a/google/cloud/advisorynotifications/v1/internal/advisory_notifications_logging_decorator.cc +++ b/google/cloud/advisorynotifications/v1/internal/advisory_notifications_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/advisorynotifications/v1/service.proto #include "google/cloud/advisorynotifications/v1/internal/advisory_notifications_logging_decorator.h" +#include "google/cloud/advisorynotifications/v1/service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace advisorynotifications_v1_internal { @@ -96,3 +99,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace advisorynotifications_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/advisorynotifications/v1/internal/advisory_notifications_logging_decorator.h b/google/cloud/advisorynotifications/v1/internal/advisory_notifications_logging_decorator.h index 940ded5f00198..aa48046e72a7a 100644 --- a/google/cloud/advisorynotifications/v1/internal/advisory_notifications_logging_decorator.h +++ b/google/cloud/advisorynotifications/v1/internal/advisory_notifications_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace advisorynotifications_v1_internal { @@ -71,4 +74,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ADVISORYNOTIFICATIONS_V1_INTERNAL_ADVISORY_NOTIFICATIONS_LOGGING_DECORATOR_H diff --git a/google/cloud/advisorynotifications/v1/internal/advisory_notifications_metadata_decorator.cc b/google/cloud/advisorynotifications/v1/internal/advisory_notifications_metadata_decorator.cc index 451308c1395be..4c5af9c923203 100644 --- a/google/cloud/advisorynotifications/v1/internal/advisory_notifications_metadata_decorator.cc +++ b/google/cloud/advisorynotifications/v1/internal/advisory_notifications_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/advisorynotifications/v1/service.proto #include "google/cloud/advisorynotifications/v1/internal/advisory_notifications_metadata_decorator.h" +#include "google/cloud/advisorynotifications/v1/service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace advisorynotifications_v1_internal { @@ -102,3 +106,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace advisorynotifications_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/advisorynotifications/v1/internal/advisory_notifications_metadata_decorator.h b/google/cloud/advisorynotifications/v1/internal/advisory_notifications_metadata_decorator.h index 254e2d24d4be6..4f42f0f3b17ea 100644 --- a/google/cloud/advisorynotifications/v1/internal/advisory_notifications_metadata_decorator.h +++ b/google/cloud/advisorynotifications/v1/internal/advisory_notifications_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace advisorynotifications_v1_internal { @@ -77,4 +80,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ADVISORYNOTIFICATIONS_V1_INTERNAL_ADVISORY_NOTIFICATIONS_METADATA_DECORATOR_H diff --git a/google/cloud/advisorynotifications/v1/internal/advisory_notifications_option_defaults.cc b/google/cloud/advisorynotifications/v1/internal/advisory_notifications_option_defaults.cc index 4dd1fee0e0acd..5127147e20306 100644 --- a/google/cloud/advisorynotifications/v1/internal/advisory_notifications_option_defaults.cc +++ b/google/cloud/advisorynotifications/v1/internal/advisory_notifications_option_defaults.cc @@ -46,7 +46,7 @@ Options AdvisoryNotificationsServiceDefaultOptions(Options options) { AdvisoryNotificationsServiceRetryPolicyOption>( advisorynotifications_v1:: AdvisoryNotificationsServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace advisorynotifications_v1_internal { @@ -86,3 +89,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace advisorynotifications_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/advisorynotifications/v1/internal/advisory_notifications_stub.h b/google/cloud/advisorynotifications/v1/internal/advisory_notifications_stub.h index a4a34d3fe79ec..34f33a061f495 100644 --- a/google/cloud/advisorynotifications/v1/internal/advisory_notifications_stub.h +++ b/google/cloud/advisorynotifications/v1/internal/advisory_notifications_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ADVISORYNOTIFICATIONS_V1_INTERNAL_ADVISORY_NOTIFICATIONS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ADVISORYNOTIFICATIONS_V1_INTERNAL_ADVISORY_NOTIFICATIONS_STUB_H +#include "google/cloud/advisorynotifications/v1/service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace advisorynotifications_v1_internal { @@ -103,4 +106,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ADVISORYNOTIFICATIONS_V1_INTERNAL_ADVISORY_NOTIFICATIONS_STUB_H diff --git a/google/cloud/advisorynotifications/v1/internal/advisory_notifications_stub_factory.cc b/google/cloud/advisorynotifications/v1/internal/advisory_notifications_stub_factory.cc index 8b5e381768696..2bfa5eec051e3 100644 --- a/google/cloud/advisorynotifications/v1/internal/advisory_notifications_stub_factory.cc +++ b/google/cloud/advisorynotifications/v1/internal/advisory_notifications_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/advisorynotifications/v1/internal/advisory_notifications_metadata_decorator.h" #include "google/cloud/advisorynotifications/v1/internal/advisory_notifications_stub.h" #include "google/cloud/advisorynotifications/v1/internal/advisory_notifications_tracing_stub.h" +#include "google/cloud/advisorynotifications/v1/service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace advisorynotifications_v1_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace advisorynotifications_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/advisorynotifications/v1/internal/advisory_notifications_stub_factory.h b/google/cloud/advisorynotifications/v1/internal/advisory_notifications_stub_factory.h index 003e7e4dd7fb9..9532e445f99b9 100644 --- a/google/cloud/advisorynotifications/v1/internal/advisory_notifications_stub_factory.h +++ b/google/cloud/advisorynotifications/v1/internal/advisory_notifications_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace advisorynotifications_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ADVISORYNOTIFICATIONS_V1_INTERNAL_ADVISORY_NOTIFICATIONS_STUB_FACTORY_H diff --git a/google/cloud/advisorynotifications/v1/internal/advisory_notifications_tracing_connection.cc b/google/cloud/advisorynotifications/v1/internal/advisory_notifications_tracing_connection.cc index 39fabc0f29c26..ed70ea41287b1 100644 --- a/google/cloud/advisorynotifications/v1/internal/advisory_notifications_tracing_connection.cc +++ b/google/cloud/advisorynotifications/v1/internal/advisory_notifications_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace advisorynotifications_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AdvisoryNotificationsServiceTracingConnection:: AdvisoryNotificationsServiceTracingConnection( std::shared_ptr< @@ -83,20 +81,16 @@ AdvisoryNotificationsServiceTracingConnection::UpdateSettings( return internal::EndSpan(*span, child_->UpdateSettings(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr< advisorynotifications_v1::AdvisoryNotificationsServiceConnection> MakeAdvisoryNotificationsServiceTracingConnection( std::shared_ptr< advisorynotifications_v1::AdvisoryNotificationsServiceConnection> conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/advisorynotifications/v1/internal/advisory_notifications_tracing_connection.h b/google/cloud/advisorynotifications/v1/internal/advisory_notifications_tracing_connection.h index ac4fda5815d1a..e8da64991bf1d 100644 --- a/google/cloud/advisorynotifications/v1/internal/advisory_notifications_tracing_connection.h +++ b/google/cloud/advisorynotifications/v1/internal/advisory_notifications_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace advisorynotifications_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AdvisoryNotificationsServiceTracingConnection : public advisorynotifications_v1::AdvisoryNotificationsServiceConnection { public: @@ -66,8 +64,6 @@ class AdvisoryNotificationsServiceTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/advisorynotifications/v1/internal/advisory_notifications_tracing_stub.cc b/google/cloud/advisorynotifications/v1/internal/advisory_notifications_tracing_stub.cc index 98aa7c2bd0d7e..377fdb3d7ff55 100644 --- a/google/cloud/advisorynotifications/v1/internal/advisory_notifications_tracing_stub.cc +++ b/google/cloud/advisorynotifications/v1/internal/advisory_notifications_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace advisorynotifications_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AdvisoryNotificationsServiceTracingStub:: AdvisoryNotificationsServiceTracingStub( std::shared_ptr child) @@ -89,20 +90,16 @@ AdvisoryNotificationsServiceTracingStub::UpdateSettings( child_->UpdateSettings(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAdvisoryNotificationsServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared( std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace advisorynotifications_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/advisorynotifications/v1/internal/advisory_notifications_tracing_stub.h b/google/cloud/advisorynotifications/v1/internal/advisory_notifications_tracing_stub.h index 01a7bb7e41ccd..872b95d8778bc 100644 --- a/google/cloud/advisorynotifications/v1/internal/advisory_notifications_tracing_stub.h +++ b/google/cloud/advisorynotifications/v1/internal/advisory_notifications_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace advisorynotifications_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AdvisoryNotificationsServiceTracingStub : public AdvisoryNotificationsServiceStub { public: @@ -68,8 +69,6 @@ class AdvisoryNotificationsServiceTracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -85,4 +84,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ADVISORYNOTIFICATIONS_V1_INTERNAL_ADVISORY_NOTIFICATIONS_TRACING_STUB_H diff --git a/google/cloud/aiplatform/BUILD.bazel b/google/cloud/aiplatform/BUILD.bazel index 3a32819257484..b67fb44afc2f2 100644 --- a/google/cloud/aiplatform/BUILD.bazel +++ b/google/cloud/aiplatform/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/aiplatform/v1:aiplatform_cc_grpc", + "@googleapis//google/cloud/aiplatform/v1:aiplatform_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/aiplatform/quickstart/.bazelrc b/google/cloud/aiplatform/quickstart/.bazelrc index 6777c6b4c95de..ec27511a60add 100644 --- a/google/cloud/aiplatform/quickstart/.bazelrc +++ b/google/cloud/aiplatform/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/aiplatform/quickstart/CMakeLists.txt b/google/cloud/aiplatform/quickstart/CMakeLists.txt index 9c86a6be9adb1..7b22a138fc6af 100644 --- a/google/cloud/aiplatform/quickstart/CMakeLists.txt +++ b/google/cloud/aiplatform/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Vertex AI API C++ client library from a larger # CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-aiplatform-quickstart CXX) find_package(google_cloud_cpp_aiplatform REQUIRED) diff --git a/google/cloud/aiplatform/v1/dataset_client.h b/google/cloud/aiplatform/v1/dataset_client.h index eb70c8665ef60..d4da487633f17 100644 --- a/google/cloud/aiplatform/v1/dataset_client.h +++ b/google/cloud/aiplatform/v1/dataset_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/aiplatform/v1/dataset_connection.h b/google/cloud/aiplatform/v1/dataset_connection.h index 6607415688baf..cadfd2451138a 100644 --- a/google/cloud/aiplatform/v1/dataset_connection.h +++ b/google/cloud/aiplatform/v1/dataset_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_DATASET_CONNECTION_H #include "google/cloud/aiplatform/v1/dataset_connection_idempotency_policy.h" +#include "google/cloud/aiplatform/v1/dataset_service.pb.h" #include "google/cloud/aiplatform/v1/internal/dataset_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/aiplatform/v1/dataset_connection_idempotency_policy.h b/google/cloud/aiplatform/v1/dataset_connection_idempotency_policy.h index 3f5f321d02bc0..3ddfbbfada5b1 100644 --- a/google/cloud/aiplatform/v1/dataset_connection_idempotency_policy.h +++ b/google/cloud/aiplatform/v1/dataset_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_DATASET_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_DATASET_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/aiplatform/v1/dataset_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/deployment_resource_pool_client.h b/google/cloud/aiplatform/v1/deployment_resource_pool_client.h index ad1b03a170283..d2b90f8025a0b 100644 --- a/google/cloud/aiplatform/v1/deployment_resource_pool_client.h +++ b/google/cloud/aiplatform/v1/deployment_resource_pool_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/aiplatform/v1/deployment_resource_pool_connection.h b/google/cloud/aiplatform/v1/deployment_resource_pool_connection.h index eaa455f09821b..6d858b4f71239 100644 --- a/google/cloud/aiplatform/v1/deployment_resource_pool_connection.h +++ b/google/cloud/aiplatform/v1/deployment_resource_pool_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_DEPLOYMENT_RESOURCE_POOL_CONNECTION_H #include "google/cloud/aiplatform/v1/deployment_resource_pool_connection_idempotency_policy.h" +#include "google/cloud/aiplatform/v1/deployment_resource_pool_service.pb.h" #include "google/cloud/aiplatform/v1/internal/deployment_resource_pool_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/aiplatform/v1/deployment_resource_pool_connection_idempotency_policy.h b/google/cloud/aiplatform/v1/deployment_resource_pool_connection_idempotency_policy.h index b82c38b14afd8..b5fd956d3abbc 100644 --- a/google/cloud/aiplatform/v1/deployment_resource_pool_connection_idempotency_policy.h +++ b/google/cloud/aiplatform/v1/deployment_resource_pool_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_DEPLOYMENT_RESOURCE_POOL_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_DEPLOYMENT_RESOURCE_POOL_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/aiplatform/v1/deployment_resource_pool_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/endpoint_client.h b/google/cloud/aiplatform/v1/endpoint_client.h index 3dd6d64eefd63..c068f364609e2 100644 --- a/google/cloud/aiplatform/v1/endpoint_client.h +++ b/google/cloud/aiplatform/v1/endpoint_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/aiplatform/v1/endpoint_connection.h b/google/cloud/aiplatform/v1/endpoint_connection.h index d5bb5c906ddf0..619565af19b12 100644 --- a/google/cloud/aiplatform/v1/endpoint_connection.h +++ b/google/cloud/aiplatform/v1/endpoint_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_ENDPOINT_CONNECTION_H #include "google/cloud/aiplatform/v1/endpoint_connection_idempotency_policy.h" +#include "google/cloud/aiplatform/v1/endpoint_service.pb.h" #include "google/cloud/aiplatform/v1/internal/endpoint_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/aiplatform/v1/endpoint_connection_idempotency_policy.h b/google/cloud/aiplatform/v1/endpoint_connection_idempotency_policy.h index d743a9be23753..2b9539cb02d2d 100644 --- a/google/cloud/aiplatform/v1/endpoint_connection_idempotency_policy.h +++ b/google/cloud/aiplatform/v1/endpoint_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_ENDPOINT_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_ENDPOINT_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/aiplatform/v1/endpoint_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/evaluation_connection.h b/google/cloud/aiplatform/v1/evaluation_connection.h index 776ef4d0ca989..2930dc5f9e15b 100644 --- a/google/cloud/aiplatform/v1/evaluation_connection.h +++ b/google/cloud/aiplatform/v1/evaluation_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_EVALUATION_CONNECTION_H #include "google/cloud/aiplatform/v1/evaluation_connection_idempotency_policy.h" +#include "google/cloud/aiplatform/v1/evaluation_service.pb.h" #include "google/cloud/aiplatform/v1/internal/evaluation_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/aiplatform/v1/evaluation_connection_idempotency_policy.h b/google/cloud/aiplatform/v1/evaluation_connection_idempotency_policy.h index 25f5b5f3c58d6..32421e1f33adb 100644 --- a/google/cloud/aiplatform/v1/evaluation_connection_idempotency_policy.h +++ b/google/cloud/aiplatform/v1/evaluation_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_EVALUATION_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_EVALUATION_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/aiplatform/v1/evaluation_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/feature_online_store_admin_client.h b/google/cloud/aiplatform/v1/feature_online_store_admin_client.h index 45c419a304b34..c3c23749bfcfa 100644 --- a/google/cloud/aiplatform/v1/feature_online_store_admin_client.h +++ b/google/cloud/aiplatform/v1/feature_online_store_admin_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/aiplatform/v1/feature_online_store_admin_connection.h b/google/cloud/aiplatform/v1/feature_online_store_admin_connection.h index 0ca95936cfb94..82a630e17f31c 100644 --- a/google/cloud/aiplatform/v1/feature_online_store_admin_connection.h +++ b/google/cloud/aiplatform/v1/feature_online_store_admin_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_FEATURE_ONLINE_STORE_ADMIN_CONNECTION_H #include "google/cloud/aiplatform/v1/feature_online_store_admin_connection_idempotency_policy.h" +#include "google/cloud/aiplatform/v1/feature_online_store_admin_service.pb.h" #include "google/cloud/aiplatform/v1/internal/feature_online_store_admin_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/aiplatform/v1/feature_online_store_admin_connection_idempotency_policy.h b/google/cloud/aiplatform/v1/feature_online_store_admin_connection_idempotency_policy.h index 40edb0049b4ec..4991f465900aa 100644 --- a/google/cloud/aiplatform/v1/feature_online_store_admin_connection_idempotency_policy.h +++ b/google/cloud/aiplatform/v1/feature_online_store_admin_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_FEATURE_ONLINE_STORE_ADMIN_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_FEATURE_ONLINE_STORE_ADMIN_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/aiplatform/v1/feature_online_store_admin_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/feature_online_store_connection.h b/google/cloud/aiplatform/v1/feature_online_store_connection.h index 4cae02f7280e4..043a81fed3beb 100644 --- a/google/cloud/aiplatform/v1/feature_online_store_connection.h +++ b/google/cloud/aiplatform/v1/feature_online_store_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_FEATURE_ONLINE_STORE_CONNECTION_H #include "google/cloud/aiplatform/v1/feature_online_store_connection_idempotency_policy.h" +#include "google/cloud/aiplatform/v1/feature_online_store_service.pb.h" #include "google/cloud/aiplatform/v1/internal/feature_online_store_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/async_read_write_stream_impl.h" @@ -28,7 +29,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/aiplatform/v1/feature_online_store_connection_idempotency_policy.h b/google/cloud/aiplatform/v1/feature_online_store_connection_idempotency_policy.h index 11afa137a48ac..1dd7b39e8aff7 100644 --- a/google/cloud/aiplatform/v1/feature_online_store_connection_idempotency_policy.h +++ b/google/cloud/aiplatform/v1/feature_online_store_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_FEATURE_ONLINE_STORE_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_FEATURE_ONLINE_STORE_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/aiplatform/v1/feature_online_store_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/feature_registry_client.h b/google/cloud/aiplatform/v1/feature_registry_client.h index 21e76c5b5d449..bcc37fe8c96bf 100644 --- a/google/cloud/aiplatform/v1/feature_registry_client.h +++ b/google/cloud/aiplatform/v1/feature_registry_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/aiplatform/v1/feature_registry_connection.h b/google/cloud/aiplatform/v1/feature_registry_connection.h index 9b6656d5aa215..a461a3556f6c5 100644 --- a/google/cloud/aiplatform/v1/feature_registry_connection.h +++ b/google/cloud/aiplatform/v1/feature_registry_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_FEATURE_REGISTRY_CONNECTION_H #include "google/cloud/aiplatform/v1/feature_registry_connection_idempotency_policy.h" +#include "google/cloud/aiplatform/v1/feature_registry_service.pb.h" #include "google/cloud/aiplatform/v1/internal/feature_registry_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/aiplatform/v1/feature_registry_connection_idempotency_policy.h b/google/cloud/aiplatform/v1/feature_registry_connection_idempotency_policy.h index ae95d4f62042a..99fd555cb2224 100644 --- a/google/cloud/aiplatform/v1/feature_registry_connection_idempotency_policy.h +++ b/google/cloud/aiplatform/v1/feature_registry_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_FEATURE_REGISTRY_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_FEATURE_REGISTRY_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/aiplatform/v1/feature_registry_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/featurestore_client.h b/google/cloud/aiplatform/v1/featurestore_client.h index d80ecad5da24c..79650eaf2c306 100644 --- a/google/cloud/aiplatform/v1/featurestore_client.h +++ b/google/cloud/aiplatform/v1/featurestore_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/aiplatform/v1/featurestore_connection.h b/google/cloud/aiplatform/v1/featurestore_connection.h index ce0d529a4f648..842a45aaa6b6b 100644 --- a/google/cloud/aiplatform/v1/featurestore_connection.h +++ b/google/cloud/aiplatform/v1/featurestore_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_FEATURESTORE_CONNECTION_H #include "google/cloud/aiplatform/v1/featurestore_connection_idempotency_policy.h" +#include "google/cloud/aiplatform/v1/featurestore_service.pb.h" #include "google/cloud/aiplatform/v1/internal/featurestore_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/aiplatform/v1/featurestore_connection_idempotency_policy.h b/google/cloud/aiplatform/v1/featurestore_connection_idempotency_policy.h index b68cf26714780..cb28307d53e0f 100644 --- a/google/cloud/aiplatform/v1/featurestore_connection_idempotency_policy.h +++ b/google/cloud/aiplatform/v1/featurestore_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_FEATURESTORE_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_FEATURESTORE_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/aiplatform/v1/featurestore_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/featurestore_online_serving_connection.h b/google/cloud/aiplatform/v1/featurestore_online_serving_connection.h index d6c2c69a520f6..98ecca8d5c36f 100644 --- a/google/cloud/aiplatform/v1/featurestore_online_serving_connection.h +++ b/google/cloud/aiplatform/v1/featurestore_online_serving_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_FEATURESTORE_ONLINE_SERVING_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_FEATURESTORE_ONLINE_SERVING_CONNECTION_H +#include "google/cloud/aiplatform/v1/featurestore_online_service.pb.h" #include "google/cloud/aiplatform/v1/featurestore_online_serving_connection_idempotency_policy.h" #include "google/cloud/aiplatform/v1/internal/featurestore_online_serving_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/aiplatform/v1/featurestore_online_serving_connection_idempotency_policy.h b/google/cloud/aiplatform/v1/featurestore_online_serving_connection_idempotency_policy.h index 27261454e4971..9a2f0af5c1462 100644 --- a/google/cloud/aiplatform/v1/featurestore_online_serving_connection_idempotency_policy.h +++ b/google/cloud/aiplatform/v1/featurestore_online_serving_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_FEATURESTORE_ONLINE_SERVING_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_FEATURESTORE_ONLINE_SERVING_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/aiplatform/v1/featurestore_online_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/gen_ai_tuning_client.h b/google/cloud/aiplatform/v1/gen_ai_tuning_client.h index 6d0b45a8c3e45..0dde1a79b0881 100644 --- a/google/cloud/aiplatform/v1/gen_ai_tuning_client.h +++ b/google/cloud/aiplatform/v1/gen_ai_tuning_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/aiplatform/v1/gen_ai_tuning_connection.h b/google/cloud/aiplatform/v1/gen_ai_tuning_connection.h index b13055b3fae95..0897d61d845de 100644 --- a/google/cloud/aiplatform/v1/gen_ai_tuning_connection.h +++ b/google/cloud/aiplatform/v1/gen_ai_tuning_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_GEN_AI_TUNING_CONNECTION_H #include "google/cloud/aiplatform/v1/gen_ai_tuning_connection_idempotency_policy.h" +#include "google/cloud/aiplatform/v1/genai_tuning_service.pb.h" #include "google/cloud/aiplatform/v1/internal/gen_ai_tuning_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/aiplatform/v1/gen_ai_tuning_connection_idempotency_policy.h b/google/cloud/aiplatform/v1/gen_ai_tuning_connection_idempotency_policy.h index 0ee9dff240655..bae4f749f36ef 100644 --- a/google/cloud/aiplatform/v1/gen_ai_tuning_connection_idempotency_policy.h +++ b/google/cloud/aiplatform/v1/gen_ai_tuning_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_GEN_AI_TUNING_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_GEN_AI_TUNING_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/aiplatform/v1/genai_tuning_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/index_client.h b/google/cloud/aiplatform/v1/index_client.h index f6b76cf49a56b..01048b5562221 100644 --- a/google/cloud/aiplatform/v1/index_client.h +++ b/google/cloud/aiplatform/v1/index_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/aiplatform/v1/index_connection.h b/google/cloud/aiplatform/v1/index_connection.h index 03835e83241e9..1b8883df73826 100644 --- a/google/cloud/aiplatform/v1/index_connection.h +++ b/google/cloud/aiplatform/v1/index_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INDEX_CONNECTION_H #include "google/cloud/aiplatform/v1/index_connection_idempotency_policy.h" +#include "google/cloud/aiplatform/v1/index_service.pb.h" #include "google/cloud/aiplatform/v1/internal/index_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/aiplatform/v1/index_connection_idempotency_policy.h b/google/cloud/aiplatform/v1/index_connection_idempotency_policy.h index 2d6a4a9f33f24..4a84e43b6a358 100644 --- a/google/cloud/aiplatform/v1/index_connection_idempotency_policy.h +++ b/google/cloud/aiplatform/v1/index_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INDEX_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INDEX_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/aiplatform/v1/index_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/index_endpoint_client.h b/google/cloud/aiplatform/v1/index_endpoint_client.h index d02cb0518af57..0caddbbe2e4fb 100644 --- a/google/cloud/aiplatform/v1/index_endpoint_client.h +++ b/google/cloud/aiplatform/v1/index_endpoint_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/aiplatform/v1/index_endpoint_connection.h b/google/cloud/aiplatform/v1/index_endpoint_connection.h index 667f0e461cfb5..494516bfccf50 100644 --- a/google/cloud/aiplatform/v1/index_endpoint_connection.h +++ b/google/cloud/aiplatform/v1/index_endpoint_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INDEX_ENDPOINT_CONNECTION_H #include "google/cloud/aiplatform/v1/index_endpoint_connection_idempotency_policy.h" +#include "google/cloud/aiplatform/v1/index_endpoint_service.pb.h" #include "google/cloud/aiplatform/v1/internal/index_endpoint_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/aiplatform/v1/index_endpoint_connection_idempotency_policy.h b/google/cloud/aiplatform/v1/index_endpoint_connection_idempotency_policy.h index 85c76ee774687..45380a935a59e 100644 --- a/google/cloud/aiplatform/v1/index_endpoint_connection_idempotency_policy.h +++ b/google/cloud/aiplatform/v1/index_endpoint_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INDEX_ENDPOINT_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INDEX_ENDPOINT_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/aiplatform/v1/index_endpoint_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/internal/dataset_auth_decorator.cc b/google/cloud/aiplatform/v1/internal/dataset_auth_decorator.cc index ad1a80e259ac7..9931171fed46d 100644 --- a/google/cloud/aiplatform/v1/internal/dataset_auth_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/dataset_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/aiplatform/v1/dataset_service.proto #include "google/cloud/aiplatform/v1/internal/dataset_auth_decorator.h" -#include +#include "google/cloud/aiplatform/v1/dataset_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -481,3 +484,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/dataset_auth_decorator.h b/google/cloud/aiplatform/v1/internal/dataset_auth_decorator.h index 83b88efb15374..28955d75057d5 100644 --- a/google/cloud/aiplatform/v1/internal/dataset_auth_decorator.h +++ b/google/cloud/aiplatform/v1/internal/dataset_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/dataset_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -248,4 +251,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_DATASET_AUTH_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/dataset_connection_impl.h b/google/cloud/aiplatform/v1/internal/dataset_connection_impl.h index d8ad53b542c98..f4ac8d1b8a61a 100644 --- a/google/cloud/aiplatform/v1/internal/dataset_connection_impl.h +++ b/google/cloud/aiplatform/v1/internal/dataset_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/internal/dataset_logging_decorator.cc b/google/cloud/aiplatform/v1/internal/dataset_logging_decorator.cc index d5dcc11797295..7975e3630e9bf 100644 --- a/google/cloud/aiplatform/v1/internal/dataset_logging_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/dataset_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/aiplatform/v1/dataset_service.proto #include "google/cloud/aiplatform/v1/internal/dataset_logging_decorator.h" +#include "google/cloud/aiplatform/v1/dataset_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -579,3 +582,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/dataset_logging_decorator.h b/google/cloud/aiplatform/v1/internal/dataset_logging_decorator.h index 19a4f110e9b28..b61bb9f26f5e6 100644 --- a/google/cloud/aiplatform/v1/internal/dataset_logging_decorator.h +++ b/google/cloud/aiplatform/v1/internal/dataset_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/dataset_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -248,4 +251,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_DATASET_LOGGING_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/dataset_metadata_decorator.cc b/google/cloud/aiplatform/v1/internal/dataset_metadata_decorator.cc index 53a4dc71a767b..db622adff9263 100644 --- a/google/cloud/aiplatform/v1/internal/dataset_metadata_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/dataset_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/aiplatform/v1/dataset_service.proto #include "google/cloud/aiplatform/v1/internal/dataset_metadata_decorator.h" +#include "google/cloud/aiplatform/v1/dataset_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -437,3 +441,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/dataset_metadata_decorator.h b/google/cloud/aiplatform/v1/internal/dataset_metadata_decorator.h index 67f613312af82..ca9db6f749104 100644 --- a/google/cloud/aiplatform/v1/internal/dataset_metadata_decorator.h +++ b/google/cloud/aiplatform/v1/internal/dataset_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/dataset_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -253,4 +256,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_DATASET_METADATA_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/dataset_option_defaults.cc b/google/cloud/aiplatform/v1/internal/dataset_option_defaults.cc index 2074fe51edeb2..7fe4775b435cc 100644 --- a/google/cloud/aiplatform/v1/internal/dataset_option_defaults.cc +++ b/google/cloud/aiplatform/v1/internal/dataset_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/aiplatform/v1/internal/dataset_option_defaults.h" #include "google/cloud/aiplatform/v1/dataset_connection.h" #include "google/cloud/aiplatform/v1/dataset_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -44,7 +44,7 @@ Options DatasetServiceDefaultOptions(std::string const& location, if (!options.has()) { options.set( aiplatform_v1::DatasetServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/aiplatform/v1/internal/dataset_stub.cc b/google/cloud/aiplatform/v1/internal/dataset_stub.cc index 4f6a50568bc0a..9a56e6d733d46 100644 --- a/google/cloud/aiplatform/v1/internal/dataset_stub.cc +++ b/google/cloud/aiplatform/v1/internal/dataset_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/aiplatform/v1/dataset_service.proto #include "google/cloud/aiplatform/v1/internal/dataset_stub.h" +#include "google/cloud/aiplatform/v1/dataset_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -567,3 +570,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/dataset_stub.h b/google/cloud/aiplatform/v1/internal/dataset_stub.h index 3c3dffaa040d1..492d6d7311e2a 100644 --- a/google/cloud/aiplatform/v1/internal/dataset_stub.h +++ b/google/cloud/aiplatform/v1/internal/dataset_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_DATASET_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_DATASET_STUB_H +#include "google/cloud/aiplatform/v1/dataset_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -474,4 +477,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_DATASET_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/dataset_stub_factory.cc b/google/cloud/aiplatform/v1/internal/dataset_stub_factory.cc index 422c77c91999f..ec2a21ad5daa9 100644 --- a/google/cloud/aiplatform/v1/internal/dataset_stub_factory.cc +++ b/google/cloud/aiplatform/v1/internal/dataset_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/aiplatform/v1/dataset_service.proto #include "google/cloud/aiplatform/v1/internal/dataset_stub_factory.h" +#include "google/cloud/aiplatform/v1/dataset_service.grpc.pb.h" #include "google/cloud/aiplatform/v1/internal/dataset_auth_decorator.h" #include "google/cloud/aiplatform/v1/internal/dataset_logging_decorator.h" #include "google/cloud/aiplatform/v1/internal/dataset_metadata_decorator.h" #include "google/cloud/aiplatform/v1/internal/dataset_stub.h" #include "google/cloud/aiplatform/v1/internal/dataset_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -78,3 +81,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/dataset_stub_factory.h b/google/cloud/aiplatform/v1/internal/dataset_stub_factory.h index 6453c5e686285..e4936e867229c 100644 --- a/google/cloud/aiplatform/v1/internal/dataset_stub_factory.h +++ b/google/cloud/aiplatform/v1/internal/dataset_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_DATASET_STUB_FACTORY_H diff --git a/google/cloud/aiplatform/v1/internal/dataset_tracing_connection.cc b/google/cloud/aiplatform/v1/internal/dataset_tracing_connection.cc index d491cb283ffa3..437c5c8975606 100644 --- a/google/cloud/aiplatform/v1/internal/dataset_tracing_connection.cc +++ b/google/cloud/aiplatform/v1/internal/dataset_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DatasetServiceTracingConnection::DatasetServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -475,16 +473,12 @@ DatasetServiceTracingConnection::WaitOperation( return internal::EndSpan(*span, child_->WaitOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDatasetServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/aiplatform/v1/internal/dataset_tracing_connection.h b/google/cloud/aiplatform/v1/internal/dataset_tracing_connection.h index 91827a87b5e80..e0816301ce192 100644 --- a/google/cloud/aiplatform/v1/internal/dataset_tracing_connection.h +++ b/google/cloud/aiplatform/v1/internal/dataset_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DatasetServiceTracingConnection : public aiplatform_v1::DatasetServiceConnection { public: @@ -212,8 +210,6 @@ class DatasetServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/aiplatform/v1/internal/dataset_tracing_stub.cc b/google/cloud/aiplatform/v1/internal/dataset_tracing_stub.cc index 84a1aca6330ac..54a24c18a4fd3 100644 --- a/google/cloud/aiplatform/v1/internal/dataset_tracing_stub.cc +++ b/google/cloud/aiplatform/v1/internal/dataset_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DatasetServiceTracingStub::DatasetServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -520,18 +521,14 @@ future DatasetServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDatasetServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/dataset_tracing_stub.h b/google/cloud/aiplatform/v1/internal/dataset_tracing_stub.h index 9d387745c42eb..da7cda0d47ef5 100644 --- a/google/cloud/aiplatform/v1/internal/dataset_tracing_stub.h +++ b/google/cloud/aiplatform/v1/internal/dataset_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DatasetServiceTracingStub : public DatasetServiceStub { public: ~DatasetServiceTracingStub() override = default; @@ -243,8 +244,6 @@ class DatasetServiceTracingStub : public DatasetServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -259,4 +258,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_DATASET_TRACING_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/deployment_resource_pool_auth_decorator.cc b/google/cloud/aiplatform/v1/internal/deployment_resource_pool_auth_decorator.cc index dd93af66a992c..e3793bc0b6ddc 100644 --- a/google/cloud/aiplatform/v1/internal/deployment_resource_pool_auth_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/deployment_resource_pool_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/aiplatform/v1/deployment_resource_pool_service.proto #include "google/cloud/aiplatform/v1/internal/deployment_resource_pool_auth_decorator.h" -#include +#include "google/cloud/aiplatform/v1/deployment_resource_pool_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -272,3 +275,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/deployment_resource_pool_auth_decorator.h b/google/cloud/aiplatform/v1/internal/deployment_resource_pool_auth_decorator.h index 24ae4f899b2e5..ecaba53dafc95 100644 --- a/google/cloud/aiplatform/v1/internal/deployment_resource_pool_auth_decorator.h +++ b/google/cloud/aiplatform/v1/internal/deployment_resource_pool_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/deployment_resource_pool_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -153,4 +156,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_DEPLOYMENT_RESOURCE_POOL_AUTH_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/deployment_resource_pool_connection_impl.h b/google/cloud/aiplatform/v1/internal/deployment_resource_pool_connection_impl.h index 644df1274b835..d8b6aa32a84ef 100644 --- a/google/cloud/aiplatform/v1/internal/deployment_resource_pool_connection_impl.h +++ b/google/cloud/aiplatform/v1/internal/deployment_resource_pool_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/internal/deployment_resource_pool_logging_decorator.cc b/google/cloud/aiplatform/v1/internal/deployment_resource_pool_logging_decorator.cc index 424a67da7717a..7fe02b8539148 100644 --- a/google/cloud/aiplatform/v1/internal/deployment_resource_pool_logging_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/deployment_resource_pool_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/aiplatform/v1/deployment_resource_pool_service.proto #include "google/cloud/aiplatform/v1/internal/deployment_resource_pool_logging_decorator.h" +#include "google/cloud/aiplatform/v1/deployment_resource_pool_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -323,3 +326,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/deployment_resource_pool_logging_decorator.h b/google/cloud/aiplatform/v1/internal/deployment_resource_pool_logging_decorator.h index 48a02beab4b4d..91cb6bc5ba507 100644 --- a/google/cloud/aiplatform/v1/internal/deployment_resource_pool_logging_decorator.h +++ b/google/cloud/aiplatform/v1/internal/deployment_resource_pool_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/deployment_resource_pool_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -153,4 +156,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_DEPLOYMENT_RESOURCE_POOL_LOGGING_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/deployment_resource_pool_metadata_decorator.cc b/google/cloud/aiplatform/v1/internal/deployment_resource_pool_metadata_decorator.cc index fd881f57d9a0b..99ee610d4549e 100644 --- a/google/cloud/aiplatform/v1/internal/deployment_resource_pool_metadata_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/deployment_resource_pool_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/aiplatform/v1/deployment_resource_pool_service.proto #include "google/cloud/aiplatform/v1/internal/deployment_resource_pool_metadata_decorator.h" +#include "google/cloud/aiplatform/v1/deployment_resource_pool_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -267,3 +271,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/deployment_resource_pool_metadata_decorator.h b/google/cloud/aiplatform/v1/internal/deployment_resource_pool_metadata_decorator.h index 0e5f2ab320785..c0cda43459386 100644 --- a/google/cloud/aiplatform/v1/internal/deployment_resource_pool_metadata_decorator.h +++ b/google/cloud/aiplatform/v1/internal/deployment_resource_pool_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/deployment_resource_pool_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -159,4 +162,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_DEPLOYMENT_RESOURCE_POOL_METADATA_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/deployment_resource_pool_option_defaults.cc b/google/cloud/aiplatform/v1/internal/deployment_resource_pool_option_defaults.cc index 64c2186a02046..b899b1d40cfc9 100644 --- a/google/cloud/aiplatform/v1/internal/deployment_resource_pool_option_defaults.cc +++ b/google/cloud/aiplatform/v1/internal/deployment_resource_pool_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/aiplatform/v1/internal/deployment_resource_pool_option_defaults.h" #include "google/cloud/aiplatform/v1/deployment_resource_pool_connection.h" #include "google/cloud/aiplatform/v1/deployment_resource_pool_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -46,7 +46,7 @@ Options DeploymentResourcePoolServiceDefaultOptions(std::string const& location, aiplatform_v1::DeploymentResourcePoolServiceRetryPolicyOption>()) { options.set( aiplatform_v1::DeploymentResourcePoolServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/aiplatform/v1/internal/deployment_resource_pool_stub.cc b/google/cloud/aiplatform/v1/internal/deployment_resource_pool_stub.cc index f29ccf725822b..bbfdd291fc1ce 100644 --- a/google/cloud/aiplatform/v1/internal/deployment_resource_pool_stub.cc +++ b/google/cloud/aiplatform/v1/internal/deployment_resource_pool_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/aiplatform/v1/deployment_resource_pool_service.proto #include "google/cloud/aiplatform/v1/internal/deployment_resource_pool_stub.h" +#include "google/cloud/aiplatform/v1/deployment_resource_pool_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -327,3 +330,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/deployment_resource_pool_stub.h b/google/cloud/aiplatform/v1/internal/deployment_resource_pool_stub.h index 3097782e6834a..84be4fcc5708c 100644 --- a/google/cloud/aiplatform/v1/internal/deployment_resource_pool_stub.h +++ b/google/cloud/aiplatform/v1/internal/deployment_resource_pool_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_DEPLOYMENT_RESOURCE_POOL_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_DEPLOYMENT_RESOURCE_POOL_STUB_H +#include "google/cloud/aiplatform/v1/deployment_resource_pool_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -283,4 +286,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_DEPLOYMENT_RESOURCE_POOL_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/deployment_resource_pool_stub_factory.cc b/google/cloud/aiplatform/v1/internal/deployment_resource_pool_stub_factory.cc index 9f607c7304c3c..0c1f591eafb17 100644 --- a/google/cloud/aiplatform/v1/internal/deployment_resource_pool_stub_factory.cc +++ b/google/cloud/aiplatform/v1/internal/deployment_resource_pool_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/aiplatform/v1/deployment_resource_pool_service.proto #include "google/cloud/aiplatform/v1/internal/deployment_resource_pool_stub_factory.h" +#include "google/cloud/aiplatform/v1/deployment_resource_pool_service.grpc.pb.h" #include "google/cloud/aiplatform/v1/internal/deployment_resource_pool_auth_decorator.h" #include "google/cloud/aiplatform/v1/internal/deployment_resource_pool_logging_decorator.h" #include "google/cloud/aiplatform/v1/internal/deployment_resource_pool_metadata_decorator.h" #include "google/cloud/aiplatform/v1/internal/deployment_resource_pool_stub.h" #include "google/cloud/aiplatform/v1/internal/deployment_resource_pool_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -80,3 +83,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/deployment_resource_pool_stub_factory.h b/google/cloud/aiplatform/v1/internal/deployment_resource_pool_stub_factory.h index 35f744222f004..c8f61fb7079f9 100644 --- a/google/cloud/aiplatform/v1/internal/deployment_resource_pool_stub_factory.h +++ b/google/cloud/aiplatform/v1/internal/deployment_resource_pool_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_DEPLOYMENT_RESOURCE_POOL_STUB_FACTORY_H diff --git a/google/cloud/aiplatform/v1/internal/deployment_resource_pool_tracing_connection.cc b/google/cloud/aiplatform/v1/internal/deployment_resource_pool_tracing_connection.cc index 4504c3d03ae98..445e4019ed3c1 100644 --- a/google/cloud/aiplatform/v1/internal/deployment_resource_pool_tracing_connection.cc +++ b/google/cloud/aiplatform/v1/internal/deployment_resource_pool_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DeploymentResourcePoolServiceTracingConnection:: DeploymentResourcePoolServiceTracingConnection( std::shared_ptr @@ -262,18 +260,14 @@ DeploymentResourcePoolServiceTracingConnection::WaitOperation( return internal::EndSpan(*span, child_->WaitOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDeploymentResourcePoolServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/aiplatform/v1/internal/deployment_resource_pool_tracing_connection.h b/google/cloud/aiplatform/v1/internal/deployment_resource_pool_tracing_connection.h index 64b1d492576a0..70fc188e69c53 100644 --- a/google/cloud/aiplatform/v1/internal/deployment_resource_pool_tracing_connection.h +++ b/google/cloud/aiplatform/v1/internal/deployment_resource_pool_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DeploymentResourcePoolServiceTracingConnection : public aiplatform_v1::DeploymentResourcePoolServiceConnection { public: @@ -128,8 +126,6 @@ class DeploymentResourcePoolServiceTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/aiplatform/v1/internal/deployment_resource_pool_tracing_stub.cc b/google/cloud/aiplatform/v1/internal/deployment_resource_pool_tracing_stub.cc index cd3c2c84ec81f..fbe99bcea304b 100644 --- a/google/cloud/aiplatform/v1/internal/deployment_resource_pool_tracing_stub.cc +++ b/google/cloud/aiplatform/v1/internal/deployment_resource_pool_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DeploymentResourcePoolServiceTracingStub:: DeploymentResourcePoolServiceTracingStub( std::shared_ptr child) @@ -315,20 +316,16 @@ future DeploymentResourcePoolServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDeploymentResourcePoolServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared( std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/deployment_resource_pool_tracing_stub.h b/google/cloud/aiplatform/v1/internal/deployment_resource_pool_tracing_stub.h index a773b0b32ada7..04e037b9313cb 100644 --- a/google/cloud/aiplatform/v1/internal/deployment_resource_pool_tracing_stub.h +++ b/google/cloud/aiplatform/v1/internal/deployment_resource_pool_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DeploymentResourcePoolServiceTracingStub : public DeploymentResourcePoolServiceStub { public: @@ -149,8 +150,6 @@ class DeploymentResourcePoolServiceTracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -166,4 +165,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_DEPLOYMENT_RESOURCE_POOL_TRACING_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/endpoint_auth_decorator.cc b/google/cloud/aiplatform/v1/internal/endpoint_auth_decorator.cc index b2aaf5cb2f537..3d5fc848da8b1 100644 --- a/google/cloud/aiplatform/v1/internal/endpoint_auth_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/endpoint_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/aiplatform/v1/endpoint_service.proto #include "google/cloud/aiplatform/v1/internal/endpoint_auth_decorator.h" -#include +#include "google/cloud/aiplatform/v1/endpoint_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -353,3 +356,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/endpoint_auth_decorator.h b/google/cloud/aiplatform/v1/internal/endpoint_auth_decorator.h index b0e91beb3d96d..45f44b95b3986 100644 --- a/google/cloud/aiplatform/v1/internal/endpoint_auth_decorator.h +++ b/google/cloud/aiplatform/v1/internal/endpoint_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/endpoint_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -189,4 +192,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_ENDPOINT_AUTH_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/endpoint_connection_impl.h b/google/cloud/aiplatform/v1/internal/endpoint_connection_impl.h index f47cd8ed64348..a5a61855f4295 100644 --- a/google/cloud/aiplatform/v1/internal/endpoint_connection_impl.h +++ b/google/cloud/aiplatform/v1/internal/endpoint_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/internal/endpoint_logging_decorator.cc b/google/cloud/aiplatform/v1/internal/endpoint_logging_decorator.cc index 14498fc29b6fa..21e1a4c014b37 100644 --- a/google/cloud/aiplatform/v1/internal/endpoint_logging_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/endpoint_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/aiplatform/v1/endpoint_service.proto #include "google/cloud/aiplatform/v1/internal/endpoint_logging_decorator.h" +#include "google/cloud/aiplatform/v1/endpoint_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -415,3 +418,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/endpoint_logging_decorator.h b/google/cloud/aiplatform/v1/internal/endpoint_logging_decorator.h index 0a61443564422..aa3dabc14dff9 100644 --- a/google/cloud/aiplatform/v1/internal/endpoint_logging_decorator.h +++ b/google/cloud/aiplatform/v1/internal/endpoint_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/endpoint_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -189,4 +192,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_ENDPOINT_LOGGING_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/endpoint_metadata_decorator.cc b/google/cloud/aiplatform/v1/internal/endpoint_metadata_decorator.cc index f0beb0de14446..715a2c14206b7 100644 --- a/google/cloud/aiplatform/v1/internal/endpoint_metadata_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/endpoint_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/aiplatform/v1/endpoint_service.proto #include "google/cloud/aiplatform/v1/internal/endpoint_metadata_decorator.h" +#include "google/cloud/aiplatform/v1/endpoint_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -332,3 +336,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/endpoint_metadata_decorator.h b/google/cloud/aiplatform/v1/internal/endpoint_metadata_decorator.h index 0ad7500bcab41..daddbaeb673b8 100644 --- a/google/cloud/aiplatform/v1/internal/endpoint_metadata_decorator.h +++ b/google/cloud/aiplatform/v1/internal/endpoint_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/endpoint_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -195,4 +198,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_ENDPOINT_METADATA_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/endpoint_option_defaults.cc b/google/cloud/aiplatform/v1/internal/endpoint_option_defaults.cc index 45afe916360aa..748bd8b4822c1 100644 --- a/google/cloud/aiplatform/v1/internal/endpoint_option_defaults.cc +++ b/google/cloud/aiplatform/v1/internal/endpoint_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/aiplatform/v1/internal/endpoint_option_defaults.h" #include "google/cloud/aiplatform/v1/endpoint_connection.h" #include "google/cloud/aiplatform/v1/endpoint_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -44,7 +44,7 @@ Options EndpointServiceDefaultOptions(std::string const& location, if (!options.has()) { options.set( aiplatform_v1::EndpointServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/aiplatform/v1/internal/endpoint_stub.cc b/google/cloud/aiplatform/v1/internal/endpoint_stub.cc index d07ca910bf68c..228705417be29 100644 --- a/google/cloud/aiplatform/v1/internal/endpoint_stub.cc +++ b/google/cloud/aiplatform/v1/internal/endpoint_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/aiplatform/v1/endpoint_service.proto #include "google/cloud/aiplatform/v1/internal/endpoint_stub.h" +#include "google/cloud/aiplatform/v1/endpoint_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -415,3 +418,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/endpoint_stub.h b/google/cloud/aiplatform/v1/internal/endpoint_stub.h index ad2e887552109..fd06c9b4e8696 100644 --- a/google/cloud/aiplatform/v1/internal/endpoint_stub.h +++ b/google/cloud/aiplatform/v1/internal/endpoint_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_ENDPOINT_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_ENDPOINT_STUB_H +#include "google/cloud/aiplatform/v1/endpoint_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -345,4 +348,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_ENDPOINT_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/endpoint_stub_factory.cc b/google/cloud/aiplatform/v1/internal/endpoint_stub_factory.cc index bf05ffca0ba7d..fd9a0c5eb0eb3 100644 --- a/google/cloud/aiplatform/v1/internal/endpoint_stub_factory.cc +++ b/google/cloud/aiplatform/v1/internal/endpoint_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/aiplatform/v1/endpoint_service.proto #include "google/cloud/aiplatform/v1/internal/endpoint_stub_factory.h" +#include "google/cloud/aiplatform/v1/endpoint_service.grpc.pb.h" #include "google/cloud/aiplatform/v1/internal/endpoint_auth_decorator.h" #include "google/cloud/aiplatform/v1/internal/endpoint_logging_decorator.h" #include "google/cloud/aiplatform/v1/internal/endpoint_metadata_decorator.h" #include "google/cloud/aiplatform/v1/internal/endpoint_stub.h" #include "google/cloud/aiplatform/v1/internal/endpoint_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -78,3 +81,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/endpoint_stub_factory.h b/google/cloud/aiplatform/v1/internal/endpoint_stub_factory.h index 8ed65bb39e576..92d20d31c5e32 100644 --- a/google/cloud/aiplatform/v1/internal/endpoint_stub_factory.h +++ b/google/cloud/aiplatform/v1/internal/endpoint_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_ENDPOINT_STUB_FACTORY_H diff --git a/google/cloud/aiplatform/v1/internal/endpoint_tracing_connection.cc b/google/cloud/aiplatform/v1/internal/endpoint_tracing_connection.cc index 6fcf2b4bee9ce..1a3f41853e485 100644 --- a/google/cloud/aiplatform/v1/internal/endpoint_tracing_connection.cc +++ b/google/cloud/aiplatform/v1/internal/endpoint_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - EndpointServiceTracingConnection::EndpointServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -332,16 +330,12 @@ EndpointServiceTracingConnection::WaitOperation( return internal::EndSpan(*span, child_->WaitOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeEndpointServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/aiplatform/v1/internal/endpoint_tracing_connection.h b/google/cloud/aiplatform/v1/internal/endpoint_tracing_connection.h index 7e49a57ee0956..950fe8ea853dd 100644 --- a/google/cloud/aiplatform/v1/internal/endpoint_tracing_connection.h +++ b/google/cloud/aiplatform/v1/internal/endpoint_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class EndpointServiceTracingConnection : public aiplatform_v1::EndpointServiceConnection { public: @@ -160,8 +158,6 @@ class EndpointServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/aiplatform/v1/internal/endpoint_tracing_stub.cc b/google/cloud/aiplatform/v1/internal/endpoint_tracing_stub.cc index 7316f3f1a8d26..5f1b2c8b97a84 100644 --- a/google/cloud/aiplatform/v1/internal/endpoint_tracing_stub.cc +++ b/google/cloud/aiplatform/v1/internal/endpoint_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - EndpointServiceTracingStub::EndpointServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -377,18 +378,14 @@ future EndpointServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeEndpointServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/endpoint_tracing_stub.h b/google/cloud/aiplatform/v1/internal/endpoint_tracing_stub.h index 454c56c3f824f..6f09516dcb658 100644 --- a/google/cloud/aiplatform/v1/internal/endpoint_tracing_stub.h +++ b/google/cloud/aiplatform/v1/internal/endpoint_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class EndpointServiceTracingStub : public EndpointServiceStub { public: ~EndpointServiceTracingStub() override = default; @@ -185,8 +186,6 @@ class EndpointServiceTracingStub : public EndpointServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -201,4 +200,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_ENDPOINT_TRACING_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/evaluation_auth_decorator.cc b/google/cloud/aiplatform/v1/internal/evaluation_auth_decorator.cc index 407aaa6689be5..22a37596f5423 100644 --- a/google/cloud/aiplatform/v1/internal/evaluation_auth_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/evaluation_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/aiplatform/v1/evaluation_service.proto #include "google/cloud/aiplatform/v1/internal/evaluation_auth_decorator.h" -#include +#include "google/cloud/aiplatform/v1/evaluation_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -127,3 +130,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/evaluation_auth_decorator.h b/google/cloud/aiplatform/v1/internal/evaluation_auth_decorator.h index dda0a2ceabdd2..c15900ae11ae2 100644 --- a/google/cloud/aiplatform/v1/internal/evaluation_auth_decorator.h +++ b/google/cloud/aiplatform/v1/internal/evaluation_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -94,4 +97,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_EVALUATION_AUTH_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/evaluation_logging_decorator.cc b/google/cloud/aiplatform/v1/internal/evaluation_logging_decorator.cc index 7d47e43e0fde4..badb3c47a1edb 100644 --- a/google/cloud/aiplatform/v1/internal/evaluation_logging_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/evaluation_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/aiplatform/v1/evaluation_service.proto #include "google/cloud/aiplatform/v1/internal/evaluation_logging_decorator.h" +#include "google/cloud/aiplatform/v1/evaluation_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -167,3 +170,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/evaluation_logging_decorator.h b/google/cloud/aiplatform/v1/internal/evaluation_logging_decorator.h index 7b32e2ab4508f..2bdcf852e3a80 100644 --- a/google/cloud/aiplatform/v1/internal/evaluation_logging_decorator.h +++ b/google/cloud/aiplatform/v1/internal/evaluation_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -94,4 +97,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_EVALUATION_LOGGING_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/evaluation_metadata_decorator.cc b/google/cloud/aiplatform/v1/internal/evaluation_metadata_decorator.cc index fafd56bb9397a..7c6c5d89a4407 100644 --- a/google/cloud/aiplatform/v1/internal/evaluation_metadata_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/evaluation_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/aiplatform/v1/evaluation_service.proto #include "google/cloud/aiplatform/v1/internal/evaluation_metadata_decorator.h" +#include "google/cloud/aiplatform/v1/evaluation_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -159,3 +163,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/evaluation_metadata_decorator.h b/google/cloud/aiplatform/v1/internal/evaluation_metadata_decorator.h index bd742ce84bc9b..28d5691ad029c 100644 --- a/google/cloud/aiplatform/v1/internal/evaluation_metadata_decorator.h +++ b/google/cloud/aiplatform/v1/internal/evaluation_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -100,4 +103,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_EVALUATION_METADATA_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/evaluation_option_defaults.cc b/google/cloud/aiplatform/v1/internal/evaluation_option_defaults.cc index 88729698bff88..e828134ac44eb 100644 --- a/google/cloud/aiplatform/v1/internal/evaluation_option_defaults.cc +++ b/google/cloud/aiplatform/v1/internal/evaluation_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/aiplatform/v1/internal/evaluation_option_defaults.h" #include "google/cloud/aiplatform/v1/evaluation_connection.h" #include "google/cloud/aiplatform/v1/evaluation_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -44,7 +44,7 @@ Options EvaluationServiceDefaultOptions(std::string const& location, if (!options.has()) { options.set( aiplatform_v1::EvaluationServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/aiplatform/v1/internal/evaluation_stub.cc b/google/cloud/aiplatform/v1/internal/evaluation_stub.cc index 301423f05946a..87615246435ae 100644 --- a/google/cloud/aiplatform/v1/internal/evaluation_stub.cc +++ b/google/cloud/aiplatform/v1/internal/evaluation_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/aiplatform/v1/evaluation_service.proto #include "google/cloud/aiplatform/v1/internal/evaluation_stub.h" +#include "google/cloud/aiplatform/v1/evaluation_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -163,3 +166,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/evaluation_stub.h b/google/cloud/aiplatform/v1/internal/evaluation_stub.h index 3689bb3bce21a..ffaf41e6ca884 100644 --- a/google/cloud/aiplatform/v1/internal/evaluation_stub.h +++ b/google/cloud/aiplatform/v1/internal/evaluation_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_EVALUATION_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_EVALUATION_STUB_H +#include "google/cloud/aiplatform/v1/evaluation_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -165,4 +168,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_EVALUATION_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/evaluation_stub_factory.cc b/google/cloud/aiplatform/v1/internal/evaluation_stub_factory.cc index f70ddf3088f87..3ef2eda852374 100644 --- a/google/cloud/aiplatform/v1/internal/evaluation_stub_factory.cc +++ b/google/cloud/aiplatform/v1/internal/evaluation_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/aiplatform/v1/evaluation_service.proto #include "google/cloud/aiplatform/v1/internal/evaluation_stub_factory.h" +#include "google/cloud/aiplatform/v1/evaluation_service.grpc.pb.h" #include "google/cloud/aiplatform/v1/internal/evaluation_auth_decorator.h" #include "google/cloud/aiplatform/v1/internal/evaluation_logging_decorator.h" #include "google/cloud/aiplatform/v1/internal/evaluation_metadata_decorator.h" #include "google/cloud/aiplatform/v1/internal/evaluation_stub.h" #include "google/cloud/aiplatform/v1/internal/evaluation_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -79,3 +82,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/evaluation_stub_factory.h b/google/cloud/aiplatform/v1/internal/evaluation_stub_factory.h index f716921ffccc8..2bffc218a928a 100644 --- a/google/cloud/aiplatform/v1/internal/evaluation_stub_factory.h +++ b/google/cloud/aiplatform/v1/internal/evaluation_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_EVALUATION_STUB_FACTORY_H diff --git a/google/cloud/aiplatform/v1/internal/evaluation_tracing_connection.cc b/google/cloud/aiplatform/v1/internal/evaluation_tracing_connection.cc index d0444ab154450..b7066f56fbba8 100644 --- a/google/cloud/aiplatform/v1/internal/evaluation_tracing_connection.cc +++ b/google/cloud/aiplatform/v1/internal/evaluation_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - EvaluationServiceTracingConnection::EvaluationServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -134,17 +132,13 @@ EvaluationServiceTracingConnection::WaitOperation( return internal::EndSpan(*span, child_->WaitOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeEvaluationServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/aiplatform/v1/internal/evaluation_tracing_connection.h b/google/cloud/aiplatform/v1/internal/evaluation_tracing_connection.h index ce8ef35478fcb..aa0d1fd3f9e44 100644 --- a/google/cloud/aiplatform/v1/internal/evaluation_tracing_connection.h +++ b/google/cloud/aiplatform/v1/internal/evaluation_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class EvaluationServiceTracingConnection : public aiplatform_v1::EvaluationServiceConnection { public: @@ -79,8 +77,6 @@ class EvaluationServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/aiplatform/v1/internal/evaluation_tracing_stub.cc b/google/cloud/aiplatform/v1/internal/evaluation_tracing_stub.cc index fa7ef3f07f1a7..15b1fc442e354 100644 --- a/google/cloud/aiplatform/v1/internal/evaluation_tracing_stub.cc +++ b/google/cloud/aiplatform/v1/internal/evaluation_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - EvaluationServiceTracingStub::EvaluationServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -160,18 +161,14 @@ EvaluationServiceTracingStub::WaitOperation( child_->WaitOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeEvaluationServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/evaluation_tracing_stub.h b/google/cloud/aiplatform/v1/internal/evaluation_tracing_stub.h index 6c63eca305aeb..2487ac10a0c74 100644 --- a/google/cloud/aiplatform/v1/internal/evaluation_tracing_stub.h +++ b/google/cloud/aiplatform/v1/internal/evaluation_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class EvaluationServiceTracingStub : public EvaluationServiceStub { public: ~EvaluationServiceTracingStub() override = default; @@ -91,8 +92,6 @@ class EvaluationServiceTracingStub : public EvaluationServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -107,4 +106,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_EVALUATION_TRACING_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/feature_online_store_admin_auth_decorator.cc b/google/cloud/aiplatform/v1/internal/feature_online_store_admin_auth_decorator.cc index 9ce33b09c9967..6ff4867072493 100644 --- a/google/cloud/aiplatform/v1/internal/feature_online_store_admin_auth_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/feature_online_store_admin_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto #include "google/cloud/aiplatform/v1/internal/feature_online_store_admin_auth_decorator.h" -#include +#include "google/cloud/aiplatform/v1/feature_online_store_admin_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -404,3 +407,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/feature_online_store_admin_auth_decorator.h b/google/cloud/aiplatform/v1/internal/feature_online_store_admin_auth_decorator.h index 9a02562f2a83d..efaba408cafdf 100644 --- a/google/cloud/aiplatform/v1/internal/feature_online_store_admin_auth_decorator.h +++ b/google/cloud/aiplatform/v1/internal/feature_online_store_admin_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/feature_online_store_admin_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -215,4 +218,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURE_ONLINE_STORE_ADMIN_AUTH_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/feature_online_store_admin_connection_impl.h b/google/cloud/aiplatform/v1/internal/feature_online_store_admin_connection_impl.h index 1bb71592f12e5..fde2abf0f77c8 100644 --- a/google/cloud/aiplatform/v1/internal/feature_online_store_admin_connection_impl.h +++ b/google/cloud/aiplatform/v1/internal/feature_online_store_admin_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/internal/feature_online_store_admin_logging_decorator.cc b/google/cloud/aiplatform/v1/internal/feature_online_store_admin_logging_decorator.cc index 51810252dc1b6..8e88385f27151 100644 --- a/google/cloud/aiplatform/v1/internal/feature_online_store_admin_logging_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/feature_online_store_admin_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto #include "google/cloud/aiplatform/v1/internal/feature_online_store_admin_logging_decorator.h" +#include "google/cloud/aiplatform/v1/feature_online_store_admin_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -490,3 +493,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/feature_online_store_admin_logging_decorator.h b/google/cloud/aiplatform/v1/internal/feature_online_store_admin_logging_decorator.h index 8bfc6a9aa8b08..e5d50eed1c8eb 100644 --- a/google/cloud/aiplatform/v1/internal/feature_online_store_admin_logging_decorator.h +++ b/google/cloud/aiplatform/v1/internal/feature_online_store_admin_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/feature_online_store_admin_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -215,4 +218,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURE_ONLINE_STORE_ADMIN_LOGGING_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/feature_online_store_admin_metadata_decorator.cc b/google/cloud/aiplatform/v1/internal/feature_online_store_admin_metadata_decorator.cc index 04a2d630d3b9e..e71c5ad65f6e0 100644 --- a/google/cloud/aiplatform/v1/internal/feature_online_store_admin_metadata_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/feature_online_store_admin_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto #include "google/cloud/aiplatform/v1/internal/feature_online_store_admin_metadata_decorator.h" +#include "google/cloud/aiplatform/v1/feature_online_store_admin_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -378,3 +382,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/feature_online_store_admin_metadata_decorator.h b/google/cloud/aiplatform/v1/internal/feature_online_store_admin_metadata_decorator.h index af7016f613c89..c4025b680dd1b 100644 --- a/google/cloud/aiplatform/v1/internal/feature_online_store_admin_metadata_decorator.h +++ b/google/cloud/aiplatform/v1/internal/feature_online_store_admin_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/feature_online_store_admin_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -221,4 +224,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURE_ONLINE_STORE_ADMIN_METADATA_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/feature_online_store_admin_option_defaults.cc b/google/cloud/aiplatform/v1/internal/feature_online_store_admin_option_defaults.cc index 1e0b21f342d2f..2d33c89e8cb89 100644 --- a/google/cloud/aiplatform/v1/internal/feature_online_store_admin_option_defaults.cc +++ b/google/cloud/aiplatform/v1/internal/feature_online_store_admin_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/aiplatform/v1/internal/feature_online_store_admin_option_defaults.h" #include "google/cloud/aiplatform/v1/feature_online_store_admin_connection.h" #include "google/cloud/aiplatform/v1/feature_online_store_admin_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -46,7 +46,7 @@ Options FeatureOnlineStoreAdminServiceDefaultOptions( aiplatform_v1::FeatureOnlineStoreAdminServiceRetryPolicyOption>()) { options.set( aiplatform_v1::FeatureOnlineStoreAdminServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/aiplatform/v1/internal/feature_online_store_admin_stub.cc b/google/cloud/aiplatform/v1/internal/feature_online_store_admin_stub.cc index 9fe66cf582223..8f0bdda1a8dff 100644 --- a/google/cloud/aiplatform/v1/internal/feature_online_store_admin_stub.cc +++ b/google/cloud/aiplatform/v1/internal/feature_online_store_admin_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto #include "google/cloud/aiplatform/v1/internal/feature_online_store_admin_stub.h" +#include "google/cloud/aiplatform/v1/feature_online_store_admin_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -479,3 +482,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/feature_online_store_admin_stub.h b/google/cloud/aiplatform/v1/internal/feature_online_store_admin_stub.h index 87647af1ec515..d403efa055ff0 100644 --- a/google/cloud/aiplatform/v1/internal/feature_online_store_admin_stub.h +++ b/google/cloud/aiplatform/v1/internal/feature_online_store_admin_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURE_ONLINE_STORE_ADMIN_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURE_ONLINE_STORE_ADMIN_STUB_H +#include "google/cloud/aiplatform/v1/feature_online_store_admin_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -410,4 +413,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURE_ONLINE_STORE_ADMIN_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/feature_online_store_admin_stub_factory.cc b/google/cloud/aiplatform/v1/internal/feature_online_store_admin_stub_factory.cc index c5c2b1bda290a..cce7c176abb94 100644 --- a/google/cloud/aiplatform/v1/internal/feature_online_store_admin_stub_factory.cc +++ b/google/cloud/aiplatform/v1/internal/feature_online_store_admin_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/aiplatform/v1/feature_online_store_admin_service.proto #include "google/cloud/aiplatform/v1/internal/feature_online_store_admin_stub_factory.h" +#include "google/cloud/aiplatform/v1/feature_online_store_admin_service.grpc.pb.h" #include "google/cloud/aiplatform/v1/internal/feature_online_store_admin_auth_decorator.h" #include "google/cloud/aiplatform/v1/internal/feature_online_store_admin_logging_decorator.h" #include "google/cloud/aiplatform/v1/internal/feature_online_store_admin_metadata_decorator.h" #include "google/cloud/aiplatform/v1/internal/feature_online_store_admin_stub.h" #include "google/cloud/aiplatform/v1/internal/feature_online_store_admin_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -80,3 +83,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/feature_online_store_admin_stub_factory.h b/google/cloud/aiplatform/v1/internal/feature_online_store_admin_stub_factory.h index ffb70c26531db..c8c37181c9150 100644 --- a/google/cloud/aiplatform/v1/internal/feature_online_store_admin_stub_factory.h +++ b/google/cloud/aiplatform/v1/internal/feature_online_store_admin_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURE_ONLINE_STORE_ADMIN_STUB_FACTORY_H diff --git a/google/cloud/aiplatform/v1/internal/feature_online_store_admin_tracing_connection.cc b/google/cloud/aiplatform/v1/internal/feature_online_store_admin_tracing_connection.cc index f5e66fab917ba..3ce7dfa39e1b6 100644 --- a/google/cloud/aiplatform/v1/internal/feature_online_store_admin_tracing_connection.cc +++ b/google/cloud/aiplatform/v1/internal/feature_online_store_admin_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - FeatureOnlineStoreAdminServiceTracingConnection:: FeatureOnlineStoreAdminServiceTracingConnection( std::shared_ptr @@ -418,18 +416,14 @@ FeatureOnlineStoreAdminServiceTracingConnection::WaitOperation( return internal::EndSpan(*span, child_->WaitOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeFeatureOnlineStoreAdminServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/aiplatform/v1/internal/feature_online_store_admin_tracing_connection.h b/google/cloud/aiplatform/v1/internal/feature_online_store_admin_tracing_connection.h index 0cba9b13c61b5..5c50d75e297cb 100644 --- a/google/cloud/aiplatform/v1/internal/feature_online_store_admin_tracing_connection.h +++ b/google/cloud/aiplatform/v1/internal/feature_online_store_admin_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class FeatureOnlineStoreAdminServiceTracingConnection : public aiplatform_v1::FeatureOnlineStoreAdminServiceConnection { public: @@ -187,8 +185,6 @@ class FeatureOnlineStoreAdminServiceTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/aiplatform/v1/internal/feature_online_store_admin_tracing_stub.cc b/google/cloud/aiplatform/v1/internal/feature_online_store_admin_tracing_stub.cc index 24b92e9ff994c..5a8f23bd0ed63 100644 --- a/google/cloud/aiplatform/v1/internal/feature_online_store_admin_tracing_stub.cc +++ b/google/cloud/aiplatform/v1/internal/feature_online_store_admin_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - FeatureOnlineStoreAdminServiceTracingStub:: FeatureOnlineStoreAdminServiceTracingStub( std::shared_ptr child) @@ -466,20 +467,16 @@ future FeatureOnlineStoreAdminServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeFeatureOnlineStoreAdminServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared( std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/feature_online_store_admin_tracing_stub.h b/google/cloud/aiplatform/v1/internal/feature_online_store_admin_tracing_stub.h index 5d1dbe3bf7b09..48e6d109a1d7f 100644 --- a/google/cloud/aiplatform/v1/internal/feature_online_store_admin_tracing_stub.h +++ b/google/cloud/aiplatform/v1/internal/feature_online_store_admin_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class FeatureOnlineStoreAdminServiceTracingStub : public FeatureOnlineStoreAdminServiceStub { public: @@ -211,8 +212,6 @@ class FeatureOnlineStoreAdminServiceTracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -228,4 +227,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURE_ONLINE_STORE_ADMIN_TRACING_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/feature_online_store_auth_decorator.cc b/google/cloud/aiplatform/v1/internal/feature_online_store_auth_decorator.cc index 461c6604cb30c..b0447ec1595c2 100644 --- a/google/cloud/aiplatform/v1/internal/feature_online_store_auth_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/feature_online_store_auth_decorator.cc @@ -17,11 +17,14 @@ // source: google/cloud/aiplatform/v1/feature_online_store_service.proto #include "google/cloud/aiplatform/v1/internal/feature_online_store_auth_decorator.h" +#include "google/cloud/aiplatform/v1/feature_online_store_service.grpc.pb.h" #include "google/cloud/internal/async_read_write_stream_auth.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -170,3 +173,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/feature_online_store_auth_decorator.h b/google/cloud/aiplatform/v1/internal/feature_online_store_auth_decorator.h index 3116cdafe7b9c..68d8d99967b50 100644 --- a/google/cloud/aiplatform/v1/internal/feature_online_store_auth_decorator.h +++ b/google/cloud/aiplatform/v1/internal/feature_online_store_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -114,4 +117,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURE_ONLINE_STORE_AUTH_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/feature_online_store_logging_decorator.cc b/google/cloud/aiplatform/v1/internal/feature_online_store_logging_decorator.cc index f449fcf481fe2..2a4982b061a4c 100644 --- a/google/cloud/aiplatform/v1/internal/feature_online_store_logging_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/feature_online_store_logging_decorator.cc @@ -17,15 +17,18 @@ // source: google/cloud/aiplatform/v1/feature_online_store_service.proto #include "google/cloud/aiplatform/v1/internal/feature_online_store_logging_decorator.h" +#include "google/cloud/aiplatform/v1/feature_online_store_service.grpc.pb.h" #include "google/cloud/internal/async_read_write_stream_logging.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -225,3 +228,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/feature_online_store_logging_decorator.h b/google/cloud/aiplatform/v1/internal/feature_online_store_logging_decorator.h index 0ca2fcd931999..7951683655aca 100644 --- a/google/cloud/aiplatform/v1/internal/feature_online_store_logging_decorator.h +++ b/google/cloud/aiplatform/v1/internal/feature_online_store_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -115,4 +118,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURE_ONLINE_STORE_LOGGING_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/feature_online_store_metadata_decorator.cc b/google/cloud/aiplatform/v1/internal/feature_online_store_metadata_decorator.cc index 92fbf6dd621ba..6ae4a3893a335 100644 --- a/google/cloud/aiplatform/v1/internal/feature_online_store_metadata_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/feature_online_store_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/aiplatform/v1/feature_online_store_service.proto #include "google/cloud/aiplatform/v1/internal/feature_online_store_metadata_decorator.h" +#include "google/cloud/aiplatform/v1/feature_online_store_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -195,3 +199,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/feature_online_store_metadata_decorator.h b/google/cloud/aiplatform/v1/internal/feature_online_store_metadata_decorator.h index 91cb5e3658010..8bb047d4c97a5 100644 --- a/google/cloud/aiplatform/v1/internal/feature_online_store_metadata_decorator.h +++ b/google/cloud/aiplatform/v1/internal/feature_online_store_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -120,4 +123,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURE_ONLINE_STORE_METADATA_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/feature_online_store_option_defaults.cc b/google/cloud/aiplatform/v1/internal/feature_online_store_option_defaults.cc index ed8600f383fcd..6cf9ebc8bcf10 100644 --- a/google/cloud/aiplatform/v1/internal/feature_online_store_option_defaults.cc +++ b/google/cloud/aiplatform/v1/internal/feature_online_store_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/aiplatform/v1/internal/feature_online_store_option_defaults.h" #include "google/cloud/aiplatform/v1/feature_online_store_connection.h" #include "google/cloud/aiplatform/v1/feature_online_store_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -46,7 +46,7 @@ Options FeatureOnlineStoreServiceDefaultOptions(std::string const& location, .has()) { options.set( aiplatform_v1::FeatureOnlineStoreServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/aiplatform/v1/internal/feature_online_store_stub.cc b/google/cloud/aiplatform/v1/internal/feature_online_store_stub.cc index 665c1e046f933..df0368c806934 100644 --- a/google/cloud/aiplatform/v1/internal/feature_online_store_stub.cc +++ b/google/cloud/aiplatform/v1/internal/feature_online_store_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/aiplatform/v1/feature_online_store_service.proto #include "google/cloud/aiplatform/v1/internal/feature_online_store_stub.h" +#include "google/cloud/aiplatform/v1/feature_online_store_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/internal/async_read_write_stream_impl.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -209,3 +212,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/feature_online_store_stub.h b/google/cloud/aiplatform/v1/internal/feature_online_store_stub.h index c9c7fa272af75..c4e2071a3e2d3 100644 --- a/google/cloud/aiplatform/v1/internal/feature_online_store_stub.h +++ b/google/cloud/aiplatform/v1/internal/feature_online_store_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURE_ONLINE_STORE_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURE_ONLINE_STORE_STUB_H +#include "google/cloud/aiplatform/v1/feature_online_store_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/async_streaming_read_write_rpc.h" #include "google/cloud/completion_queue.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -209,4 +212,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURE_ONLINE_STORE_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/feature_online_store_stub_factory.cc b/google/cloud/aiplatform/v1/internal/feature_online_store_stub_factory.cc index 661fa97a4f9e3..e5e55723228f5 100644 --- a/google/cloud/aiplatform/v1/internal/feature_online_store_stub_factory.cc +++ b/google/cloud/aiplatform/v1/internal/feature_online_store_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/aiplatform/v1/feature_online_store_service.proto #include "google/cloud/aiplatform/v1/internal/feature_online_store_stub_factory.h" +#include "google/cloud/aiplatform/v1/feature_online_store_service.grpc.pb.h" #include "google/cloud/aiplatform/v1/internal/feature_online_store_auth_decorator.h" #include "google/cloud/aiplatform/v1/internal/feature_online_store_logging_decorator.h" #include "google/cloud/aiplatform/v1/internal/feature_online_store_metadata_decorator.h" #include "google/cloud/aiplatform/v1/internal/feature_online_store_stub.h" #include "google/cloud/aiplatform/v1/internal/feature_online_store_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -81,3 +84,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/feature_online_store_stub_factory.h b/google/cloud/aiplatform/v1/internal/feature_online_store_stub_factory.h index 9ca6ef20d2772..f18305485338b 100644 --- a/google/cloud/aiplatform/v1/internal/feature_online_store_stub_factory.h +++ b/google/cloud/aiplatform/v1/internal/feature_online_store_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURE_ONLINE_STORE_STUB_FACTORY_H diff --git a/google/cloud/aiplatform/v1/internal/feature_online_store_tracing_connection.cc b/google/cloud/aiplatform/v1/internal/feature_online_store_tracing_connection.cc index 6cb9d8b582ea9..b35d187f8042a 100644 --- a/google/cloud/aiplatform/v1/internal/feature_online_store_tracing_connection.cc +++ b/google/cloud/aiplatform/v1/internal/feature_online_store_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - FeatureOnlineStoreServiceTracingConnection:: FeatureOnlineStoreServiceTracingConnection( std::shared_ptr @@ -165,17 +163,13 @@ FeatureOnlineStoreServiceTracingConnection::WaitOperation( return internal::EndSpan(*span, child_->WaitOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeFeatureOnlineStoreServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/aiplatform/v1/internal/feature_online_store_tracing_connection.h b/google/cloud/aiplatform/v1/internal/feature_online_store_tracing_connection.h index 9c85fcbc74bcd..1e3bb89bfb029 100644 --- a/google/cloud/aiplatform/v1/internal/feature_online_store_tracing_connection.h +++ b/google/cloud/aiplatform/v1/internal/feature_online_store_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class FeatureOnlineStoreServiceTracingConnection : public aiplatform_v1::FeatureOnlineStoreServiceConnection { public: @@ -95,8 +93,6 @@ class FeatureOnlineStoreServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/aiplatform/v1/internal/feature_online_store_tracing_stub.cc b/google/cloud/aiplatform/v1/internal/feature_online_store_tracing_stub.cc index 3438ecfa21b64..177d35bf250f5 100644 --- a/google/cloud/aiplatform/v1/internal/feature_online_store_tracing_stub.cc +++ b/google/cloud/aiplatform/v1/internal/feature_online_store_tracing_stub.cc @@ -22,13 +22,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - FeatureOnlineStoreServiceTracingStub::FeatureOnlineStoreServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -215,20 +216,16 @@ FeatureOnlineStoreServiceTracingStub::WaitOperation( child_->WaitOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeFeatureOnlineStoreServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared( std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/feature_online_store_tracing_stub.h b/google/cloud/aiplatform/v1/internal/feature_online_store_tracing_stub.h index cde29d18cbc44..040770f44b533 100644 --- a/google/cloud/aiplatform/v1/internal/feature_online_store_tracing_stub.h +++ b/google/cloud/aiplatform/v1/internal/feature_online_store_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class FeatureOnlineStoreServiceTracingStub : public FeatureOnlineStoreServiceStub { public: @@ -112,8 +113,6 @@ class FeatureOnlineStoreServiceTracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -129,4 +128,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURE_ONLINE_STORE_TRACING_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/feature_registry_auth_decorator.cc b/google/cloud/aiplatform/v1/internal/feature_registry_auth_decorator.cc index 1b04333f98c19..409e17cfce5d1 100644 --- a/google/cloud/aiplatform/v1/internal/feature_registry_auth_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/feature_registry_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/aiplatform/v1/feature_registry_service.proto #include "google/cloud/aiplatform/v1/internal/feature_registry_auth_decorator.h" -#include +#include "google/cloud/aiplatform/v1/feature_registry_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -396,3 +399,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/feature_registry_auth_decorator.h b/google/cloud/aiplatform/v1/internal/feature_registry_auth_decorator.h index a67bfeb7944dd..2a91d9e7ca657 100644 --- a/google/cloud/aiplatform/v1/internal/feature_registry_auth_decorator.h +++ b/google/cloud/aiplatform/v1/internal/feature_registry_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/feature_registry_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -205,4 +208,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURE_REGISTRY_AUTH_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/feature_registry_connection_impl.h b/google/cloud/aiplatform/v1/internal/feature_registry_connection_impl.h index 0d265a94b6b9b..99a45a4833e4c 100644 --- a/google/cloud/aiplatform/v1/internal/feature_registry_connection_impl.h +++ b/google/cloud/aiplatform/v1/internal/feature_registry_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/internal/feature_registry_logging_decorator.cc b/google/cloud/aiplatform/v1/internal/feature_registry_logging_decorator.cc index bfb92cd69f858..d363537369a09 100644 --- a/google/cloud/aiplatform/v1/internal/feature_registry_logging_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/feature_registry_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/aiplatform/v1/feature_registry_service.proto #include "google/cloud/aiplatform/v1/internal/feature_registry_logging_decorator.h" +#include "google/cloud/aiplatform/v1/feature_registry_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -465,3 +468,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/feature_registry_logging_decorator.h b/google/cloud/aiplatform/v1/internal/feature_registry_logging_decorator.h index 0e98771688c94..9815d06ff71df 100644 --- a/google/cloud/aiplatform/v1/internal/feature_registry_logging_decorator.h +++ b/google/cloud/aiplatform/v1/internal/feature_registry_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/feature_registry_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -205,4 +208,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURE_REGISTRY_LOGGING_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/feature_registry_metadata_decorator.cc b/google/cloud/aiplatform/v1/internal/feature_registry_metadata_decorator.cc index 1acbafb58f5a1..35ff255caed0e 100644 --- a/google/cloud/aiplatform/v1/internal/feature_registry_metadata_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/feature_registry_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/aiplatform/v1/feature_registry_service.proto #include "google/cloud/aiplatform/v1/internal/feature_registry_metadata_decorator.h" +#include "google/cloud/aiplatform/v1/feature_registry_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -361,3 +365,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/feature_registry_metadata_decorator.h b/google/cloud/aiplatform/v1/internal/feature_registry_metadata_decorator.h index ba3e829743b39..8246dd5e808fe 100644 --- a/google/cloud/aiplatform/v1/internal/feature_registry_metadata_decorator.h +++ b/google/cloud/aiplatform/v1/internal/feature_registry_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/feature_registry_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -211,4 +214,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURE_REGISTRY_METADATA_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/feature_registry_option_defaults.cc b/google/cloud/aiplatform/v1/internal/feature_registry_option_defaults.cc index e8df9d0695557..67c6703a617f0 100644 --- a/google/cloud/aiplatform/v1/internal/feature_registry_option_defaults.cc +++ b/google/cloud/aiplatform/v1/internal/feature_registry_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/aiplatform/v1/internal/feature_registry_option_defaults.h" #include "google/cloud/aiplatform/v1/feature_registry_connection.h" #include "google/cloud/aiplatform/v1/feature_registry_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -44,7 +44,7 @@ Options FeatureRegistryServiceDefaultOptions(std::string const& location, if (!options.has()) { options.set( aiplatform_v1::FeatureRegistryServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/aiplatform/v1/internal/feature_registry_stub.cc b/google/cloud/aiplatform/v1/internal/feature_registry_stub.cc index 1ce5fc329fef9..851bd20aaaf80 100644 --- a/google/cloud/aiplatform/v1/internal/feature_registry_stub.cc +++ b/google/cloud/aiplatform/v1/internal/feature_registry_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/aiplatform/v1/feature_registry_service.proto #include "google/cloud/aiplatform/v1/internal/feature_registry_stub.h" +#include "google/cloud/aiplatform/v1/feature_registry_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -455,3 +458,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/feature_registry_stub.h b/google/cloud/aiplatform/v1/internal/feature_registry_stub.h index 2552d71dfada9..e83aba589e686 100644 --- a/google/cloud/aiplatform/v1/internal/feature_registry_stub.h +++ b/google/cloud/aiplatform/v1/internal/feature_registry_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURE_REGISTRY_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURE_REGISTRY_STUB_H +#include "google/cloud/aiplatform/v1/feature_registry_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -384,4 +387,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURE_REGISTRY_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/feature_registry_stub_factory.cc b/google/cloud/aiplatform/v1/internal/feature_registry_stub_factory.cc index e22411b9d6fce..5810852093fee 100644 --- a/google/cloud/aiplatform/v1/internal/feature_registry_stub_factory.cc +++ b/google/cloud/aiplatform/v1/internal/feature_registry_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/aiplatform/v1/feature_registry_service.proto #include "google/cloud/aiplatform/v1/internal/feature_registry_stub_factory.h" +#include "google/cloud/aiplatform/v1/feature_registry_service.grpc.pb.h" #include "google/cloud/aiplatform/v1/internal/feature_registry_auth_decorator.h" #include "google/cloud/aiplatform/v1/internal/feature_registry_logging_decorator.h" #include "google/cloud/aiplatform/v1/internal/feature_registry_metadata_decorator.h" #include "google/cloud/aiplatform/v1/internal/feature_registry_stub.h" #include "google/cloud/aiplatform/v1/internal/feature_registry_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -79,3 +82,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/feature_registry_stub_factory.h b/google/cloud/aiplatform/v1/internal/feature_registry_stub_factory.h index 86271fe2ae195..bc8493e3b5b99 100644 --- a/google/cloud/aiplatform/v1/internal/feature_registry_stub_factory.h +++ b/google/cloud/aiplatform/v1/internal/feature_registry_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURE_REGISTRY_STUB_FACTORY_H diff --git a/google/cloud/aiplatform/v1/internal/feature_registry_tracing_connection.cc b/google/cloud/aiplatform/v1/internal/feature_registry_tracing_connection.cc index 22486d8f9f840..5d100ccc674c1 100644 --- a/google/cloud/aiplatform/v1/internal/feature_registry_tracing_connection.cc +++ b/google/cloud/aiplatform/v1/internal/feature_registry_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - FeatureRegistryServiceTracingConnection:: FeatureRegistryServiceTracingConnection( std::shared_ptr child) @@ -375,17 +373,13 @@ FeatureRegistryServiceTracingConnection::WaitOperation( return internal::EndSpan(*span, child_->WaitOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeFeatureRegistryServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/aiplatform/v1/internal/feature_registry_tracing_connection.h b/google/cloud/aiplatform/v1/internal/feature_registry_tracing_connection.h index 5a0fe6aa2c242..e4517b5574d12 100644 --- a/google/cloud/aiplatform/v1/internal/feature_registry_tracing_connection.h +++ b/google/cloud/aiplatform/v1/internal/feature_registry_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class FeatureRegistryServiceTracingConnection : public aiplatform_v1::FeatureRegistryServiceConnection { public: @@ -175,8 +173,6 @@ class FeatureRegistryServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/aiplatform/v1/internal/feature_registry_tracing_stub.cc b/google/cloud/aiplatform/v1/internal/feature_registry_tracing_stub.cc index f091632fb6c5b..884ecb38bca3c 100644 --- a/google/cloud/aiplatform/v1/internal/feature_registry_tracing_stub.cc +++ b/google/cloud/aiplatform/v1/internal/feature_registry_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - FeatureRegistryServiceTracingStub::FeatureRegistryServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -421,19 +422,15 @@ future FeatureRegistryServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeFeatureRegistryServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/feature_registry_tracing_stub.h b/google/cloud/aiplatform/v1/internal/feature_registry_tracing_stub.h index 1143e615e8646..824f8b87b4671 100644 --- a/google/cloud/aiplatform/v1/internal/feature_registry_tracing_stub.h +++ b/google/cloud/aiplatform/v1/internal/feature_registry_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class FeatureRegistryServiceTracingStub : public FeatureRegistryServiceStub { public: ~FeatureRegistryServiceTracingStub() override = default; @@ -201,8 +202,6 @@ class FeatureRegistryServiceTracingStub : public FeatureRegistryServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -218,4 +217,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURE_REGISTRY_TRACING_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/featurestore_auth_decorator.cc b/google/cloud/aiplatform/v1/internal/featurestore_auth_decorator.cc index 3c6e519991a32..3c4e13c59a5aa 100644 --- a/google/cloud/aiplatform/v1/internal/featurestore_auth_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/featurestore_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/aiplatform/v1/featurestore_service.proto #include "google/cloud/aiplatform/v1/internal/featurestore_auth_decorator.h" -#include +#include "google/cloud/aiplatform/v1/featurestore_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -584,3 +587,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/featurestore_auth_decorator.h b/google/cloud/aiplatform/v1/internal/featurestore_auth_decorator.h index e0968a62866b1..141027311a864 100644 --- a/google/cloud/aiplatform/v1/internal/featurestore_auth_decorator.h +++ b/google/cloud/aiplatform/v1/internal/featurestore_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/featurestore_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -290,4 +293,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURESTORE_AUTH_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/featurestore_connection_impl.h b/google/cloud/aiplatform/v1/internal/featurestore_connection_impl.h index 5daf4b771d1bb..fef37ae62e664 100644 --- a/google/cloud/aiplatform/v1/internal/featurestore_connection_impl.h +++ b/google/cloud/aiplatform/v1/internal/featurestore_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/internal/featurestore_logging_decorator.cc b/google/cloud/aiplatform/v1/internal/featurestore_logging_decorator.cc index 1cffac611d310..a083cae735577 100644 --- a/google/cloud/aiplatform/v1/internal/featurestore_logging_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/featurestore_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/aiplatform/v1/featurestore_service.proto #include "google/cloud/aiplatform/v1/internal/featurestore_logging_decorator.h" +#include "google/cloud/aiplatform/v1/featurestore_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -692,3 +695,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/featurestore_logging_decorator.h b/google/cloud/aiplatform/v1/internal/featurestore_logging_decorator.h index ae22c91068a23..ec3e8e9d2db64 100644 --- a/google/cloud/aiplatform/v1/internal/featurestore_logging_decorator.h +++ b/google/cloud/aiplatform/v1/internal/featurestore_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/featurestore_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -290,4 +293,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURESTORE_LOGGING_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/featurestore_metadata_decorator.cc b/google/cloud/aiplatform/v1/internal/featurestore_metadata_decorator.cc index 9106fdfc69bfb..1a72fe1b40bd2 100644 --- a/google/cloud/aiplatform/v1/internal/featurestore_metadata_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/featurestore_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/aiplatform/v1/featurestore_service.proto #include "google/cloud/aiplatform/v1/internal/featurestore_metadata_decorator.h" +#include "google/cloud/aiplatform/v1/featurestore_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -520,3 +524,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/featurestore_metadata_decorator.h b/google/cloud/aiplatform/v1/internal/featurestore_metadata_decorator.h index aff8a544ccdd0..85ec68796a3b4 100644 --- a/google/cloud/aiplatform/v1/internal/featurestore_metadata_decorator.h +++ b/google/cloud/aiplatform/v1/internal/featurestore_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/featurestore_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -296,4 +299,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURESTORE_METADATA_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/featurestore_online_serving_auth_decorator.cc b/google/cloud/aiplatform/v1/internal/featurestore_online_serving_auth_decorator.cc index 9030868cf78c2..5691a5754a7a7 100644 --- a/google/cloud/aiplatform/v1/internal/featurestore_online_serving_auth_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/featurestore_online_serving_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/aiplatform/v1/featurestore_online_service.proto #include "google/cloud/aiplatform/v1/internal/featurestore_online_serving_auth_decorator.h" -#include +#include "google/cloud/aiplatform/v1/featurestore_online_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -155,3 +158,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/featurestore_online_serving_auth_decorator.h b/google/cloud/aiplatform/v1/internal/featurestore_online_serving_auth_decorator.h index cd1a3e72d1d40..09e586a631a05 100644 --- a/google/cloud/aiplatform/v1/internal/featurestore_online_serving_auth_decorator.h +++ b/google/cloud/aiplatform/v1/internal/featurestore_online_serving_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -108,4 +111,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURESTORE_ONLINE_SERVING_AUTH_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/featurestore_online_serving_logging_decorator.cc b/google/cloud/aiplatform/v1/internal/featurestore_online_serving_logging_decorator.cc index 8c7daae5589de..0399c21c5ea30 100644 --- a/google/cloud/aiplatform/v1/internal/featurestore_online_serving_logging_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/featurestore_online_serving_logging_decorator.cc @@ -17,15 +17,18 @@ // source: google/cloud/aiplatform/v1/featurestore_online_service.proto #include "google/cloud/aiplatform/v1/internal/featurestore_online_serving_logging_decorator.h" +#include "google/cloud/aiplatform/v1/featurestore_online_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/internal/streaming_read_rpc_logging.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -214,3 +217,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/featurestore_online_serving_logging_decorator.h b/google/cloud/aiplatform/v1/internal/featurestore_online_serving_logging_decorator.h index 934acbee744cb..0f156d22f1ad6 100644 --- a/google/cloud/aiplatform/v1/internal/featurestore_online_serving_logging_decorator.h +++ b/google/cloud/aiplatform/v1/internal/featurestore_online_serving_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -109,4 +112,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURESTORE_ONLINE_SERVING_LOGGING_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/featurestore_online_serving_metadata_decorator.cc b/google/cloud/aiplatform/v1/internal/featurestore_online_serving_metadata_decorator.cc index 9b9d312bfeda1..db59ff7a9a54a 100644 --- a/google/cloud/aiplatform/v1/internal/featurestore_online_serving_metadata_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/featurestore_online_serving_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/aiplatform/v1/featurestore_online_service.proto #include "google/cloud/aiplatform/v1/internal/featurestore_online_serving_metadata_decorator.h" +#include "google/cloud/aiplatform/v1/featurestore_online_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -185,3 +189,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/featurestore_online_serving_metadata_decorator.h b/google/cloud/aiplatform/v1/internal/featurestore_online_serving_metadata_decorator.h index f737e1ba1ee1d..5695e7a3d2592 100644 --- a/google/cloud/aiplatform/v1/internal/featurestore_online_serving_metadata_decorator.h +++ b/google/cloud/aiplatform/v1/internal/featurestore_online_serving_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -114,4 +117,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURESTORE_ONLINE_SERVING_METADATA_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/featurestore_online_serving_option_defaults.cc b/google/cloud/aiplatform/v1/internal/featurestore_online_serving_option_defaults.cc index 34fc1b01420ba..b5d82cf98eb6d 100644 --- a/google/cloud/aiplatform/v1/internal/featurestore_online_serving_option_defaults.cc +++ b/google/cloud/aiplatform/v1/internal/featurestore_online_serving_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/aiplatform/v1/internal/featurestore_online_serving_option_defaults.h" #include "google/cloud/aiplatform/v1/featurestore_online_serving_connection.h" #include "google/cloud/aiplatform/v1/featurestore_online_serving_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -47,7 +47,7 @@ Options FeaturestoreOnlineServingServiceDefaultOptions( options.set< aiplatform_v1::FeaturestoreOnlineServingServiceRetryPolicyOption>( aiplatform_v1::FeaturestoreOnlineServingServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -190,3 +193,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/featurestore_online_serving_stub.h b/google/cloud/aiplatform/v1/internal/featurestore_online_serving_stub.h index 08f42e67e90ff..18c51cb2fa971 100644 --- a/google/cloud/aiplatform/v1/internal/featurestore_online_serving_stub.h +++ b/google/cloud/aiplatform/v1/internal/featurestore_online_serving_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURESTORE_ONLINE_SERVING_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURESTORE_ONLINE_SERVING_STUB_H +#include "google/cloud/aiplatform/v1/featurestore_online_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/internal/streaming_read_rpc.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -193,4 +196,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURESTORE_ONLINE_SERVING_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/featurestore_online_serving_stub_factory.cc b/google/cloud/aiplatform/v1/internal/featurestore_online_serving_stub_factory.cc index 4dd7bde13e473..8051ebeef518f 100644 --- a/google/cloud/aiplatform/v1/internal/featurestore_online_serving_stub_factory.cc +++ b/google/cloud/aiplatform/v1/internal/featurestore_online_serving_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/aiplatform/v1/featurestore_online_service.proto #include "google/cloud/aiplatform/v1/internal/featurestore_online_serving_stub_factory.h" +#include "google/cloud/aiplatform/v1/featurestore_online_service.grpc.pb.h" #include "google/cloud/aiplatform/v1/internal/featurestore_online_serving_auth_decorator.h" #include "google/cloud/aiplatform/v1/internal/featurestore_online_serving_logging_decorator.h" #include "google/cloud/aiplatform/v1/internal/featurestore_online_serving_metadata_decorator.h" #include "google/cloud/aiplatform/v1/internal/featurestore_online_serving_stub.h" #include "google/cloud/aiplatform/v1/internal/featurestore_online_serving_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -81,3 +84,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/featurestore_online_serving_stub_factory.h b/google/cloud/aiplatform/v1/internal/featurestore_online_serving_stub_factory.h index ea32727e39fb2..2275855257255 100644 --- a/google/cloud/aiplatform/v1/internal/featurestore_online_serving_stub_factory.h +++ b/google/cloud/aiplatform/v1/internal/featurestore_online_serving_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURESTORE_ONLINE_SERVING_STUB_FACTORY_H diff --git a/google/cloud/aiplatform/v1/internal/featurestore_online_serving_tracing_connection.cc b/google/cloud/aiplatform/v1/internal/featurestore_online_serving_tracing_connection.cc index ba7ffd0928bc5..03a793a8c534f 100644 --- a/google/cloud/aiplatform/v1/internal/featurestore_online_serving_tracing_connection.cc +++ b/google/cloud/aiplatform/v1/internal/featurestore_online_serving_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - FeaturestoreOnlineServingServiceTracingConnection:: FeaturestoreOnlineServingServiceTracingConnection( std::shared_ptr< @@ -170,18 +168,14 @@ FeaturestoreOnlineServingServiceTracingConnection::WaitOperation( return internal::EndSpan(*span, child_->WaitOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeFeaturestoreOnlineServingServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/aiplatform/v1/internal/featurestore_online_serving_tracing_connection.h b/google/cloud/aiplatform/v1/internal/featurestore_online_serving_tracing_connection.h index 418a08aafa2e0..1b17dc0a7dc65 100644 --- a/google/cloud/aiplatform/v1/internal/featurestore_online_serving_tracing_connection.h +++ b/google/cloud/aiplatform/v1/internal/featurestore_online_serving_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class FeaturestoreOnlineServingServiceTracingConnection : public aiplatform_v1::FeaturestoreOnlineServingServiceConnection { public: @@ -91,8 +89,6 @@ class FeaturestoreOnlineServingServiceTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/aiplatform/v1/internal/featurestore_online_serving_tracing_stub.cc b/google/cloud/aiplatform/v1/internal/featurestore_online_serving_tracing_stub.cc index da2abd7e3dc0d..db4851ebdb2ce 100644 --- a/google/cloud/aiplatform/v1/internal/featurestore_online_serving_tracing_stub.cc +++ b/google/cloud/aiplatform/v1/internal/featurestore_online_serving_tracing_stub.cc @@ -22,13 +22,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - FeaturestoreOnlineServingServiceTracingStub:: FeaturestoreOnlineServingServiceTracingStub( std::shared_ptr child) @@ -205,20 +206,16 @@ FeaturestoreOnlineServingServiceTracingStub::WaitOperation( child_->WaitOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeFeaturestoreOnlineServingServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared( std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/featurestore_online_serving_tracing_stub.h b/google/cloud/aiplatform/v1/internal/featurestore_online_serving_tracing_stub.h index 5cc9249bc780a..ecec6f9c1a59a 100644 --- a/google/cloud/aiplatform/v1/internal/featurestore_online_serving_tracing_stub.h +++ b/google/cloud/aiplatform/v1/internal/featurestore_online_serving_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class FeaturestoreOnlineServingServiceTracingStub : public FeaturestoreOnlineServingServiceStub { public: @@ -105,8 +106,6 @@ class FeaturestoreOnlineServingServiceTracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -122,4 +121,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURESTORE_ONLINE_SERVING_TRACING_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/featurestore_option_defaults.cc b/google/cloud/aiplatform/v1/internal/featurestore_option_defaults.cc index 1d65b624999ed..13ecf2fdc9234 100644 --- a/google/cloud/aiplatform/v1/internal/featurestore_option_defaults.cc +++ b/google/cloud/aiplatform/v1/internal/featurestore_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/aiplatform/v1/internal/featurestore_option_defaults.h" #include "google/cloud/aiplatform/v1/featurestore_connection.h" #include "google/cloud/aiplatform/v1/featurestore_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -44,7 +44,7 @@ Options FeaturestoreServiceDefaultOptions(std::string const& location, if (!options.has()) { options.set( aiplatform_v1::FeaturestoreServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/aiplatform/v1/internal/featurestore_stub.cc b/google/cloud/aiplatform/v1/internal/featurestore_stub.cc index e55a7247f15e4..9902c24234c79 100644 --- a/google/cloud/aiplatform/v1/internal/featurestore_stub.cc +++ b/google/cloud/aiplatform/v1/internal/featurestore_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/aiplatform/v1/featurestore_service.proto #include "google/cloud/aiplatform/v1/internal/featurestore_stub.h" +#include "google/cloud/aiplatform/v1/featurestore_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -672,3 +675,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/featurestore_stub.h b/google/cloud/aiplatform/v1/internal/featurestore_stub.h index 2edf9eed58974..94ad996d31999 100644 --- a/google/cloud/aiplatform/v1/internal/featurestore_stub.h +++ b/google/cloud/aiplatform/v1/internal/featurestore_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURESTORE_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURESTORE_STUB_H +#include "google/cloud/aiplatform/v1/featurestore_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -560,4 +563,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURESTORE_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/featurestore_stub_factory.cc b/google/cloud/aiplatform/v1/internal/featurestore_stub_factory.cc index fefe00b3dbceb..f6ef27aa8a4be 100644 --- a/google/cloud/aiplatform/v1/internal/featurestore_stub_factory.cc +++ b/google/cloud/aiplatform/v1/internal/featurestore_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/aiplatform/v1/featurestore_service.proto #include "google/cloud/aiplatform/v1/internal/featurestore_stub_factory.h" +#include "google/cloud/aiplatform/v1/featurestore_service.grpc.pb.h" #include "google/cloud/aiplatform/v1/internal/featurestore_auth_decorator.h" #include "google/cloud/aiplatform/v1/internal/featurestore_logging_decorator.h" #include "google/cloud/aiplatform/v1/internal/featurestore_metadata_decorator.h" #include "google/cloud/aiplatform/v1/internal/featurestore_stub.h" #include "google/cloud/aiplatform/v1/internal/featurestore_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -78,3 +81,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/featurestore_stub_factory.h b/google/cloud/aiplatform/v1/internal/featurestore_stub_factory.h index ed7e6a816744f..e532920739271 100644 --- a/google/cloud/aiplatform/v1/internal/featurestore_stub_factory.h +++ b/google/cloud/aiplatform/v1/internal/featurestore_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURESTORE_STUB_FACTORY_H diff --git a/google/cloud/aiplatform/v1/internal/featurestore_tracing_connection.cc b/google/cloud/aiplatform/v1/internal/featurestore_tracing_connection.cc index a616ea9ebeea3..7d340c7a532c3 100644 --- a/google/cloud/aiplatform/v1/internal/featurestore_tracing_connection.cc +++ b/google/cloud/aiplatform/v1/internal/featurestore_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - FeaturestoreServiceTracingConnection::FeaturestoreServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -582,17 +580,13 @@ FeaturestoreServiceTracingConnection::WaitOperation( return internal::EndSpan(*span, child_->WaitOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeFeaturestoreServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/aiplatform/v1/internal/featurestore_tracing_connection.h b/google/cloud/aiplatform/v1/internal/featurestore_tracing_connection.h index 15853b5c74622..7183a998520f5 100644 --- a/google/cloud/aiplatform/v1/internal/featurestore_tracing_connection.h +++ b/google/cloud/aiplatform/v1/internal/featurestore_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class FeaturestoreServiceTracingConnection : public aiplatform_v1::FeaturestoreServiceConnection { public: @@ -260,8 +258,6 @@ class FeaturestoreServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/aiplatform/v1/internal/featurestore_tracing_stub.cc b/google/cloud/aiplatform/v1/internal/featurestore_tracing_stub.cc index 3083bcc9771cc..d7ae0eabc0665 100644 --- a/google/cloud/aiplatform/v1/internal/featurestore_tracing_stub.cc +++ b/google/cloud/aiplatform/v1/internal/featurestore_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - FeaturestoreServiceTracingStub::FeaturestoreServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -611,18 +612,14 @@ future FeaturestoreServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeFeaturestoreServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/featurestore_tracing_stub.h b/google/cloud/aiplatform/v1/internal/featurestore_tracing_stub.h index a57448bbc80da..3892f687e41b9 100644 --- a/google/cloud/aiplatform/v1/internal/featurestore_tracing_stub.h +++ b/google/cloud/aiplatform/v1/internal/featurestore_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class FeaturestoreServiceTracingStub : public FeaturestoreServiceStub { public: ~FeaturestoreServiceTracingStub() override = default; @@ -286,8 +287,6 @@ class FeaturestoreServiceTracingStub : public FeaturestoreServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -302,4 +301,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_FEATURESTORE_TRACING_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/gen_ai_tuning_auth_decorator.cc b/google/cloud/aiplatform/v1/internal/gen_ai_tuning_auth_decorator.cc index d3490880a4538..6050d077a483b 100644 --- a/google/cloud/aiplatform/v1/internal/gen_ai_tuning_auth_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/gen_ai_tuning_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/aiplatform/v1/genai_tuning_service.proto #include "google/cloud/aiplatform/v1/internal/gen_ai_tuning_auth_decorator.h" -#include +#include "google/cloud/aiplatform/v1/genai_tuning_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -218,3 +221,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/gen_ai_tuning_auth_decorator.h b/google/cloud/aiplatform/v1/internal/gen_ai_tuning_auth_decorator.h index 685b885e767b1..e625f4190e75a 100644 --- a/google/cloud/aiplatform/v1/internal/gen_ai_tuning_auth_decorator.h +++ b/google/cloud/aiplatform/v1/internal/gen_ai_tuning_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/gen_ai_tuning_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -133,4 +136,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_GEN_AI_TUNING_AUTH_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/gen_ai_tuning_connection_impl.h b/google/cloud/aiplatform/v1/internal/gen_ai_tuning_connection_impl.h index 0dbaa5a496cb5..afba9f45d298d 100644 --- a/google/cloud/aiplatform/v1/internal/gen_ai_tuning_connection_impl.h +++ b/google/cloud/aiplatform/v1/internal/gen_ai_tuning_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/internal/gen_ai_tuning_logging_decorator.cc b/google/cloud/aiplatform/v1/internal/gen_ai_tuning_logging_decorator.cc index 95f6c86fc02ec..df6215f899498 100644 --- a/google/cloud/aiplatform/v1/internal/gen_ai_tuning_logging_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/gen_ai_tuning_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/aiplatform/v1/genai_tuning_service.proto #include "google/cloud/aiplatform/v1/internal/gen_ai_tuning_logging_decorator.h" +#include "google/cloud/aiplatform/v1/genai_tuning_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -273,3 +276,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/gen_ai_tuning_logging_decorator.h b/google/cloud/aiplatform/v1/internal/gen_ai_tuning_logging_decorator.h index 72dc1ccc454d1..f6c6afdd841b5 100644 --- a/google/cloud/aiplatform/v1/internal/gen_ai_tuning_logging_decorator.h +++ b/google/cloud/aiplatform/v1/internal/gen_ai_tuning_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/gen_ai_tuning_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -133,4 +136,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_GEN_AI_TUNING_LOGGING_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/gen_ai_tuning_metadata_decorator.cc b/google/cloud/aiplatform/v1/internal/gen_ai_tuning_metadata_decorator.cc index d6c3abfccedf8..657b7ffc2e59e 100644 --- a/google/cloud/aiplatform/v1/internal/gen_ai_tuning_metadata_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/gen_ai_tuning_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/aiplatform/v1/genai_tuning_service.proto #include "google/cloud/aiplatform/v1/internal/gen_ai_tuning_metadata_decorator.h" +#include "google/cloud/aiplatform/v1/genai_tuning_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -228,3 +232,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/gen_ai_tuning_metadata_decorator.h b/google/cloud/aiplatform/v1/internal/gen_ai_tuning_metadata_decorator.h index 4fa43fb245c9c..b9adf6e22fe45 100644 --- a/google/cloud/aiplatform/v1/internal/gen_ai_tuning_metadata_decorator.h +++ b/google/cloud/aiplatform/v1/internal/gen_ai_tuning_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/gen_ai_tuning_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -139,4 +142,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_GEN_AI_TUNING_METADATA_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/gen_ai_tuning_option_defaults.cc b/google/cloud/aiplatform/v1/internal/gen_ai_tuning_option_defaults.cc index 06e52dda73223..7bb3b59e61222 100644 --- a/google/cloud/aiplatform/v1/internal/gen_ai_tuning_option_defaults.cc +++ b/google/cloud/aiplatform/v1/internal/gen_ai_tuning_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/aiplatform/v1/internal/gen_ai_tuning_option_defaults.h" #include "google/cloud/aiplatform/v1/gen_ai_tuning_connection.h" #include "google/cloud/aiplatform/v1/gen_ai_tuning_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -44,7 +44,7 @@ Options GenAiTuningServiceDefaultOptions(std::string const& location, if (!options.has()) { options.set( aiplatform_v1::GenAiTuningServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/aiplatform/v1/internal/gen_ai_tuning_stub.cc b/google/cloud/aiplatform/v1/internal/gen_ai_tuning_stub.cc index 61728e12152e0..cdce4b7b6349b 100644 --- a/google/cloud/aiplatform/v1/internal/gen_ai_tuning_stub.cc +++ b/google/cloud/aiplatform/v1/internal/gen_ai_tuning_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/aiplatform/v1/genai_tuning_service.proto #include "google/cloud/aiplatform/v1/internal/gen_ai_tuning_stub.h" +#include "google/cloud/aiplatform/v1/genai_tuning_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -269,3 +272,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/gen_ai_tuning_stub.h b/google/cloud/aiplatform/v1/internal/gen_ai_tuning_stub.h index 90995f0dfc97a..ce3e384402bd6 100644 --- a/google/cloud/aiplatform/v1/internal/gen_ai_tuning_stub.h +++ b/google/cloud/aiplatform/v1/internal/gen_ai_tuning_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_GEN_AI_TUNING_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_GEN_AI_TUNING_STUB_H +#include "google/cloud/aiplatform/v1/genai_tuning_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -241,4 +244,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_GEN_AI_TUNING_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/gen_ai_tuning_stub_factory.cc b/google/cloud/aiplatform/v1/internal/gen_ai_tuning_stub_factory.cc index 67b1854720a07..db20792616363 100644 --- a/google/cloud/aiplatform/v1/internal/gen_ai_tuning_stub_factory.cc +++ b/google/cloud/aiplatform/v1/internal/gen_ai_tuning_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/aiplatform/v1/genai_tuning_service.proto #include "google/cloud/aiplatform/v1/internal/gen_ai_tuning_stub_factory.h" +#include "google/cloud/aiplatform/v1/genai_tuning_service.grpc.pb.h" #include "google/cloud/aiplatform/v1/internal/gen_ai_tuning_auth_decorator.h" #include "google/cloud/aiplatform/v1/internal/gen_ai_tuning_logging_decorator.h" #include "google/cloud/aiplatform/v1/internal/gen_ai_tuning_metadata_decorator.h" #include "google/cloud/aiplatform/v1/internal/gen_ai_tuning_stub.h" #include "google/cloud/aiplatform/v1/internal/gen_ai_tuning_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -78,3 +81,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/gen_ai_tuning_stub_factory.h b/google/cloud/aiplatform/v1/internal/gen_ai_tuning_stub_factory.h index c898ccf282274..2887458bdcaa8 100644 --- a/google/cloud/aiplatform/v1/internal/gen_ai_tuning_stub_factory.h +++ b/google/cloud/aiplatform/v1/internal/gen_ai_tuning_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_GEN_AI_TUNING_STUB_FACTORY_H diff --git a/google/cloud/aiplatform/v1/internal/gen_ai_tuning_tracing_connection.cc b/google/cloud/aiplatform/v1/internal/gen_ai_tuning_tracing_connection.cc index 04f4c25684838..cb2261d6865d7 100644 --- a/google/cloud/aiplatform/v1/internal/gen_ai_tuning_tracing_connection.cc +++ b/google/cloud/aiplatform/v1/internal/gen_ai_tuning_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GenAiTuningServiceTracingConnection::GenAiTuningServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -192,17 +190,13 @@ GenAiTuningServiceTracingConnection::WaitOperation( return internal::EndSpan(*span, child_->WaitOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeGenAiTuningServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/aiplatform/v1/internal/gen_ai_tuning_tracing_connection.h b/google/cloud/aiplatform/v1/internal/gen_ai_tuning_tracing_connection.h index ef1d4f33daa34..fc8eed57f03ec 100644 --- a/google/cloud/aiplatform/v1/internal/gen_ai_tuning_tracing_connection.h +++ b/google/cloud/aiplatform/v1/internal/gen_ai_tuning_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class GenAiTuningServiceTracingConnection : public aiplatform_v1::GenAiTuningServiceConnection { public: @@ -101,8 +99,6 @@ class GenAiTuningServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/aiplatform/v1/internal/gen_ai_tuning_tracing_stub.cc b/google/cloud/aiplatform/v1/internal/gen_ai_tuning_tracing_stub.cc index db66cfdecfed0..26ca6450fa947 100644 --- a/google/cloud/aiplatform/v1/internal/gen_ai_tuning_tracing_stub.cc +++ b/google/cloud/aiplatform/v1/internal/gen_ai_tuning_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GenAiTuningServiceTracingStub::GenAiTuningServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -250,18 +251,14 @@ future GenAiTuningServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeGenAiTuningServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/gen_ai_tuning_tracing_stub.h b/google/cloud/aiplatform/v1/internal/gen_ai_tuning_tracing_stub.h index 29ad1bdb690fd..9418dc9dc17ad 100644 --- a/google/cloud/aiplatform/v1/internal/gen_ai_tuning_tracing_stub.h +++ b/google/cloud/aiplatform/v1/internal/gen_ai_tuning_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class GenAiTuningServiceTracingStub : public GenAiTuningServiceStub { public: ~GenAiTuningServiceTracingStub() override = default; @@ -129,8 +130,6 @@ class GenAiTuningServiceTracingStub : public GenAiTuningServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -145,4 +144,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_GEN_AI_TUNING_TRACING_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/index_auth_decorator.cc b/google/cloud/aiplatform/v1/internal/index_auth_decorator.cc index 6f7bf9cdb718e..4a98befa2d035 100644 --- a/google/cloud/aiplatform/v1/internal/index_auth_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/index_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/aiplatform/v1/index_service.proto #include "google/cloud/aiplatform/v1/internal/index_auth_decorator.h" -#include +#include "google/cloud/aiplatform/v1/index_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -273,3 +276,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/index_auth_decorator.h b/google/cloud/aiplatform/v1/internal/index_auth_decorator.h index 7d615341d6e85..84e1ec0428162 100644 --- a/google/cloud/aiplatform/v1/internal/index_auth_decorator.h +++ b/google/cloud/aiplatform/v1/internal/index_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/index_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -156,4 +159,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_INDEX_AUTH_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/index_connection_impl.h b/google/cloud/aiplatform/v1/internal/index_connection_impl.h index 88f90b7a8bca9..f7148e72d0c00 100644 --- a/google/cloud/aiplatform/v1/internal/index_connection_impl.h +++ b/google/cloud/aiplatform/v1/internal/index_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/internal/index_endpoint_auth_decorator.cc b/google/cloud/aiplatform/v1/internal/index_endpoint_auth_decorator.cc index 388da09f4b777..69bfbef2c8bae 100644 --- a/google/cloud/aiplatform/v1/internal/index_endpoint_auth_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/index_endpoint_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/aiplatform/v1/index_endpoint_service.proto #include "google/cloud/aiplatform/v1/internal/index_endpoint_auth_decorator.h" -#include +#include "google/cloud/aiplatform/v1/index_endpoint_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -327,3 +330,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/index_endpoint_auth_decorator.h b/google/cloud/aiplatform/v1/internal/index_endpoint_auth_decorator.h index 9df9faadf5387..95b14b722e5b4 100644 --- a/google/cloud/aiplatform/v1/internal/index_endpoint_auth_decorator.h +++ b/google/cloud/aiplatform/v1/internal/index_endpoint_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/index_endpoint_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -177,4 +180,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_INDEX_ENDPOINT_AUTH_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/index_endpoint_connection_impl.h b/google/cloud/aiplatform/v1/internal/index_endpoint_connection_impl.h index a9455057c8d48..1954d8c76b72e 100644 --- a/google/cloud/aiplatform/v1/internal/index_endpoint_connection_impl.h +++ b/google/cloud/aiplatform/v1/internal/index_endpoint_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/internal/index_endpoint_logging_decorator.cc b/google/cloud/aiplatform/v1/internal/index_endpoint_logging_decorator.cc index 83e0630fc4c59..b4f3306a9a098 100644 --- a/google/cloud/aiplatform/v1/internal/index_endpoint_logging_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/index_endpoint_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/aiplatform/v1/index_endpoint_service.proto #include "google/cloud/aiplatform/v1/internal/index_endpoint_logging_decorator.h" +#include "google/cloud/aiplatform/v1/index_endpoint_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -387,3 +390,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/index_endpoint_logging_decorator.h b/google/cloud/aiplatform/v1/internal/index_endpoint_logging_decorator.h index 807dd358d4e29..9c20ae2d5fb87 100644 --- a/google/cloud/aiplatform/v1/internal/index_endpoint_logging_decorator.h +++ b/google/cloud/aiplatform/v1/internal/index_endpoint_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/index_endpoint_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -177,4 +180,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_INDEX_ENDPOINT_LOGGING_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/index_endpoint_metadata_decorator.cc b/google/cloud/aiplatform/v1/internal/index_endpoint_metadata_decorator.cc index 565e93006d0c7..90207132a65be 100644 --- a/google/cloud/aiplatform/v1/internal/index_endpoint_metadata_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/index_endpoint_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/aiplatform/v1/index_endpoint_service.proto #include "google/cloud/aiplatform/v1/internal/index_endpoint_metadata_decorator.h" +#include "google/cloud/aiplatform/v1/index_endpoint_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -312,3 +316,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/index_endpoint_metadata_decorator.h b/google/cloud/aiplatform/v1/internal/index_endpoint_metadata_decorator.h index 43b5f368e9119..b73676228710a 100644 --- a/google/cloud/aiplatform/v1/internal/index_endpoint_metadata_decorator.h +++ b/google/cloud/aiplatform/v1/internal/index_endpoint_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/index_endpoint_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -183,4 +186,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_INDEX_ENDPOINT_METADATA_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/index_endpoint_option_defaults.cc b/google/cloud/aiplatform/v1/internal/index_endpoint_option_defaults.cc index 00c0e23fc14de..9a3fc76fc427d 100644 --- a/google/cloud/aiplatform/v1/internal/index_endpoint_option_defaults.cc +++ b/google/cloud/aiplatform/v1/internal/index_endpoint_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/aiplatform/v1/internal/index_endpoint_option_defaults.h" #include "google/cloud/aiplatform/v1/index_endpoint_connection.h" #include "google/cloud/aiplatform/v1/index_endpoint_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -44,7 +44,7 @@ Options IndexEndpointServiceDefaultOptions(std::string const& location, if (!options.has()) { options.set( aiplatform_v1::IndexEndpointServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/aiplatform/v1/internal/index_endpoint_stub.cc b/google/cloud/aiplatform/v1/internal/index_endpoint_stub.cc index 8e88bb310273e..98572be2f1152 100644 --- a/google/cloud/aiplatform/v1/internal/index_endpoint_stub.cc +++ b/google/cloud/aiplatform/v1/internal/index_endpoint_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/aiplatform/v1/index_endpoint_service.proto #include "google/cloud/aiplatform/v1/internal/index_endpoint_stub.h" +#include "google/cloud/aiplatform/v1/index_endpoint_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -380,3 +383,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/index_endpoint_stub.h b/google/cloud/aiplatform/v1/internal/index_endpoint_stub.h index 925d944cf9158..938bc63d7d90f 100644 --- a/google/cloud/aiplatform/v1/internal/index_endpoint_stub.h +++ b/google/cloud/aiplatform/v1/internal/index_endpoint_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_INDEX_ENDPOINT_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_INDEX_ENDPOINT_STUB_H +#include "google/cloud/aiplatform/v1/index_endpoint_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -331,4 +334,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_INDEX_ENDPOINT_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/index_endpoint_stub_factory.cc b/google/cloud/aiplatform/v1/internal/index_endpoint_stub_factory.cc index 85076d33ee753..afdb0b8401e84 100644 --- a/google/cloud/aiplatform/v1/internal/index_endpoint_stub_factory.cc +++ b/google/cloud/aiplatform/v1/internal/index_endpoint_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/aiplatform/v1/index_endpoint_service.proto #include "google/cloud/aiplatform/v1/internal/index_endpoint_stub_factory.h" +#include "google/cloud/aiplatform/v1/index_endpoint_service.grpc.pb.h" #include "google/cloud/aiplatform/v1/internal/index_endpoint_auth_decorator.h" #include "google/cloud/aiplatform/v1/internal/index_endpoint_logging_decorator.h" #include "google/cloud/aiplatform/v1/internal/index_endpoint_metadata_decorator.h" #include "google/cloud/aiplatform/v1/internal/index_endpoint_stub.h" #include "google/cloud/aiplatform/v1/internal/index_endpoint_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -78,3 +81,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/index_endpoint_stub_factory.h b/google/cloud/aiplatform/v1/internal/index_endpoint_stub_factory.h index da11d6892a7d0..2e868cf8f0398 100644 --- a/google/cloud/aiplatform/v1/internal/index_endpoint_stub_factory.h +++ b/google/cloud/aiplatform/v1/internal/index_endpoint_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_INDEX_ENDPOINT_STUB_FACTORY_H diff --git a/google/cloud/aiplatform/v1/internal/index_endpoint_tracing_connection.cc b/google/cloud/aiplatform/v1/internal/index_endpoint_tracing_connection.cc index eda5cfea4d0a9..a7247f4307a5f 100644 --- a/google/cloud/aiplatform/v1/internal/index_endpoint_tracing_connection.cc +++ b/google/cloud/aiplatform/v1/internal/index_endpoint_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - IndexEndpointServiceTracingConnection::IndexEndpointServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -304,17 +302,13 @@ IndexEndpointServiceTracingConnection::WaitOperation( return internal::EndSpan(*span, child_->WaitOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeIndexEndpointServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/aiplatform/v1/internal/index_endpoint_tracing_connection.h b/google/cloud/aiplatform/v1/internal/index_endpoint_tracing_connection.h index 6e52b5bebbc76..c693fbbc4c93e 100644 --- a/google/cloud/aiplatform/v1/internal/index_endpoint_tracing_connection.h +++ b/google/cloud/aiplatform/v1/internal/index_endpoint_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class IndexEndpointServiceTracingConnection : public aiplatform_v1::IndexEndpointServiceConnection { public: @@ -149,8 +147,6 @@ class IndexEndpointServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/aiplatform/v1/internal/index_endpoint_tracing_stub.cc b/google/cloud/aiplatform/v1/internal/index_endpoint_tracing_stub.cc index 0c6ebc04e7ed2..ad50c54e6c2f0 100644 --- a/google/cloud/aiplatform/v1/internal/index_endpoint_tracing_stub.cc +++ b/google/cloud/aiplatform/v1/internal/index_endpoint_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - IndexEndpointServiceTracingStub::IndexEndpointServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -345,18 +346,14 @@ future IndexEndpointServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeIndexEndpointServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/index_endpoint_tracing_stub.h b/google/cloud/aiplatform/v1/internal/index_endpoint_tracing_stub.h index 3253974c179c7..0310c2c84ac52 100644 --- a/google/cloud/aiplatform/v1/internal/index_endpoint_tracing_stub.h +++ b/google/cloud/aiplatform/v1/internal/index_endpoint_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class IndexEndpointServiceTracingStub : public IndexEndpointServiceStub { public: ~IndexEndpointServiceTracingStub() override = default; @@ -173,8 +174,6 @@ class IndexEndpointServiceTracingStub : public IndexEndpointServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -189,4 +188,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_INDEX_ENDPOINT_TRACING_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/index_logging_decorator.cc b/google/cloud/aiplatform/v1/internal/index_logging_decorator.cc index a0317bf9a67ea..e96da96d64400 100644 --- a/google/cloud/aiplatform/v1/internal/index_logging_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/index_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/aiplatform/v1/index_service.proto #include "google/cloud/aiplatform/v1/internal/index_logging_decorator.h" +#include "google/cloud/aiplatform/v1/index_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -323,3 +326,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/index_logging_decorator.h b/google/cloud/aiplatform/v1/internal/index_logging_decorator.h index ff27751de1f6a..d291daeb90a25 100644 --- a/google/cloud/aiplatform/v1/internal/index_logging_decorator.h +++ b/google/cloud/aiplatform/v1/internal/index_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/index_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -156,4 +159,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_INDEX_LOGGING_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/index_metadata_decorator.cc b/google/cloud/aiplatform/v1/internal/index_metadata_decorator.cc index 512b560c07978..ca222c89d75b9 100644 --- a/google/cloud/aiplatform/v1/internal/index_metadata_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/index_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/aiplatform/v1/index_service.proto #include "google/cloud/aiplatform/v1/internal/index_metadata_decorator.h" +#include "google/cloud/aiplatform/v1/index_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -266,3 +270,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/index_metadata_decorator.h b/google/cloud/aiplatform/v1/internal/index_metadata_decorator.h index 60b3115519c75..ebf0e9521fff8 100644 --- a/google/cloud/aiplatform/v1/internal/index_metadata_decorator.h +++ b/google/cloud/aiplatform/v1/internal/index_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/index_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -161,4 +164,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_INDEX_METADATA_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/index_option_defaults.cc b/google/cloud/aiplatform/v1/internal/index_option_defaults.cc index e9236d8a1d025..711597e128a30 100644 --- a/google/cloud/aiplatform/v1/internal/index_option_defaults.cc +++ b/google/cloud/aiplatform/v1/internal/index_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/aiplatform/v1/internal/index_option_defaults.h" #include "google/cloud/aiplatform/v1/index_connection.h" #include "google/cloud/aiplatform/v1/index_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -44,7 +44,7 @@ Options IndexServiceDefaultOptions(std::string const& location, if (!options.has()) { options.set( aiplatform_v1::IndexServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/aiplatform/v1/internal/index_stub.cc b/google/cloud/aiplatform/v1/internal/index_stub.cc index b09586e01527f..e106d3d4d4329 100644 --- a/google/cloud/aiplatform/v1/internal/index_stub.cc +++ b/google/cloud/aiplatform/v1/internal/index_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/aiplatform/v1/index_service.proto #include "google/cloud/aiplatform/v1/internal/index_stub.h" +#include "google/cloud/aiplatform/v1/index_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -324,3 +327,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/index_stub.h b/google/cloud/aiplatform/v1/internal/index_stub.h index 00685327e71be..ad547ab571329 100644 --- a/google/cloud/aiplatform/v1/internal/index_stub.h +++ b/google/cloud/aiplatform/v1/internal/index_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_INDEX_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_INDEX_STUB_H +#include "google/cloud/aiplatform/v1/index_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -282,4 +285,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_INDEX_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/index_stub_factory.cc b/google/cloud/aiplatform/v1/internal/index_stub_factory.cc index 942271ee114ba..8e0fa7011ae02 100644 --- a/google/cloud/aiplatform/v1/internal/index_stub_factory.cc +++ b/google/cloud/aiplatform/v1/internal/index_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/aiplatform/v1/index_service.proto #include "google/cloud/aiplatform/v1/internal/index_stub_factory.h" +#include "google/cloud/aiplatform/v1/index_service.grpc.pb.h" #include "google/cloud/aiplatform/v1/internal/index_auth_decorator.h" #include "google/cloud/aiplatform/v1/internal/index_logging_decorator.h" #include "google/cloud/aiplatform/v1/internal/index_metadata_decorator.h" #include "google/cloud/aiplatform/v1/internal/index_stub.h" #include "google/cloud/aiplatform/v1/internal/index_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -77,3 +80,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/index_stub_factory.h b/google/cloud/aiplatform/v1/internal/index_stub_factory.h index ff8861e65d2cd..eb75d103d00dd 100644 --- a/google/cloud/aiplatform/v1/internal/index_stub_factory.h +++ b/google/cloud/aiplatform/v1/internal/index_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_INDEX_STUB_FACTORY_H diff --git a/google/cloud/aiplatform/v1/internal/index_tracing_connection.cc b/google/cloud/aiplatform/v1/internal/index_tracing_connection.cc index 63e47c99bcd79..360562d2365ff 100644 --- a/google/cloud/aiplatform/v1/internal/index_tracing_connection.cc +++ b/google/cloud/aiplatform/v1/internal/index_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - IndexServiceTracingConnection::IndexServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -245,16 +243,12 @@ IndexServiceTracingConnection::WaitOperation( return internal::EndSpan(*span, child_->WaitOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeIndexServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/aiplatform/v1/internal/index_tracing_connection.h b/google/cloud/aiplatform/v1/internal/index_tracing_connection.h index b8762c0754e54..22ec0fa1985c4 100644 --- a/google/cloud/aiplatform/v1/internal/index_tracing_connection.h +++ b/google/cloud/aiplatform/v1/internal/index_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class IndexServiceTracingConnection : public aiplatform_v1::IndexServiceConnection { public: @@ -124,8 +122,6 @@ class IndexServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/aiplatform/v1/internal/index_tracing_stub.cc b/google/cloud/aiplatform/v1/internal/index_tracing_stub.cc index d97b44f113337..7e29f7c30c014 100644 --- a/google/cloud/aiplatform/v1/internal/index_tracing_stub.cc +++ b/google/cloud/aiplatform/v1/internal/index_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - IndexServiceTracingStub::IndexServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -297,18 +298,14 @@ future IndexServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeIndexServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/index_tracing_stub.h b/google/cloud/aiplatform/v1/internal/index_tracing_stub.h index f56724dd48c5b..e5c6f40835782 100644 --- a/google/cloud/aiplatform/v1/internal/index_tracing_stub.h +++ b/google/cloud/aiplatform/v1/internal/index_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class IndexServiceTracingStub : public IndexServiceStub { public: ~IndexServiceTracingStub() override = default; @@ -151,8 +152,6 @@ class IndexServiceTracingStub : public IndexServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -167,4 +166,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_INDEX_TRACING_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/job_auth_decorator.cc b/google/cloud/aiplatform/v1/internal/job_auth_decorator.cc index 6618f31d44575..8862107184c74 100644 --- a/google/cloud/aiplatform/v1/internal/job_auth_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/job_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/aiplatform/v1/job_service.proto #include "google/cloud/aiplatform/v1/internal/job_auth_decorator.h" -#include +#include "google/cloud/aiplatform/v1/job_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -625,3 +628,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/job_auth_decorator.h b/google/cloud/aiplatform/v1/internal/job_auth_decorator.h index b9b9db5971119..28bbe177316f3 100644 --- a/google/cloud/aiplatform/v1/internal/job_auth_decorator.h +++ b/google/cloud/aiplatform/v1/internal/job_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/job_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -343,4 +346,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_JOB_AUTH_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/job_connection_impl.h b/google/cloud/aiplatform/v1/internal/job_connection_impl.h index 4a1e9093b9a7b..6b75e793f521d 100644 --- a/google/cloud/aiplatform/v1/internal/job_connection_impl.h +++ b/google/cloud/aiplatform/v1/internal/job_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/internal/job_logging_decorator.cc b/google/cloud/aiplatform/v1/internal/job_logging_decorator.cc index 7246f93d8cded..f66f548916820 100644 --- a/google/cloud/aiplatform/v1/internal/job_logging_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/job_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/aiplatform/v1/job_service.proto #include "google/cloud/aiplatform/v1/internal/job_logging_decorator.h" +#include "google/cloud/aiplatform/v1/job_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -804,3 +807,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/job_logging_decorator.h b/google/cloud/aiplatform/v1/internal/job_logging_decorator.h index ceb3aaa9986e8..7eb573ad57f78 100644 --- a/google/cloud/aiplatform/v1/internal/job_logging_decorator.h +++ b/google/cloud/aiplatform/v1/internal/job_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/job_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -343,4 +346,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_JOB_LOGGING_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/job_metadata_decorator.cc b/google/cloud/aiplatform/v1/internal/job_metadata_decorator.cc index bbbb689befcde..fd36c946083f5 100644 --- a/google/cloud/aiplatform/v1/internal/job_metadata_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/job_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/aiplatform/v1/job_service.proto #include "google/cloud/aiplatform/v1/internal/job_metadata_decorator.h" +#include "google/cloud/aiplatform/v1/job_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -595,3 +599,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/job_metadata_decorator.h b/google/cloud/aiplatform/v1/internal/job_metadata_decorator.h index 9cecf5e666b98..5873ec810e789 100644 --- a/google/cloud/aiplatform/v1/internal/job_metadata_decorator.h +++ b/google/cloud/aiplatform/v1/internal/job_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/job_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -348,4 +351,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_JOB_METADATA_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/job_option_defaults.cc b/google/cloud/aiplatform/v1/internal/job_option_defaults.cc index fd695ebe1c565..7d0b511625f4d 100644 --- a/google/cloud/aiplatform/v1/internal/job_option_defaults.cc +++ b/google/cloud/aiplatform/v1/internal/job_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/aiplatform/v1/internal/job_option_defaults.h" #include "google/cloud/aiplatform/v1/job_connection.h" #include "google/cloud/aiplatform/v1/job_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -43,7 +43,7 @@ Options JobServiceDefaultOptions(std::string const& location, Options options) { if (!options.has()) { options.set( aiplatform_v1::JobServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/aiplatform/v1/internal/job_stub.cc b/google/cloud/aiplatform/v1/internal/job_stub.cc index 6df2a36a6e0d8..ca56f0b80b262 100644 --- a/google/cloud/aiplatform/v1/internal/job_stub.cc +++ b/google/cloud/aiplatform/v1/internal/job_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/aiplatform/v1/job_service.proto #include "google/cloud/aiplatform/v1/internal/job_stub.h" +#include "google/cloud/aiplatform/v1/job_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -782,3 +785,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/job_stub.h b/google/cloud/aiplatform/v1/internal/job_stub.h index 7c40ff6eafef5..f7a2d2d3d5e63 100644 --- a/google/cloud/aiplatform/v1/internal/job_stub.h +++ b/google/cloud/aiplatform/v1/internal/job_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_JOB_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_JOB_STUB_H +#include "google/cloud/aiplatform/v1/job_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -661,4 +664,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_JOB_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/job_stub_factory.cc b/google/cloud/aiplatform/v1/internal/job_stub_factory.cc index 701d198f483f0..f270d9fb5cb34 100644 --- a/google/cloud/aiplatform/v1/internal/job_stub_factory.cc +++ b/google/cloud/aiplatform/v1/internal/job_stub_factory.cc @@ -22,19 +22,22 @@ #include "google/cloud/aiplatform/v1/internal/job_metadata_decorator.h" #include "google/cloud/aiplatform/v1/internal/job_stub.h" #include "google/cloud/aiplatform/v1/internal/job_tracing_stub.h" +#include "google/cloud/aiplatform/v1/job_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -77,3 +80,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/job_stub_factory.h b/google/cloud/aiplatform/v1/internal/job_stub_factory.h index 4044390d24498..b98bf8bd7ae5a 100644 --- a/google/cloud/aiplatform/v1/internal/job_stub_factory.h +++ b/google/cloud/aiplatform/v1/internal/job_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_JOB_STUB_FACTORY_H diff --git a/google/cloud/aiplatform/v1/internal/job_tracing_connection.cc b/google/cloud/aiplatform/v1/internal/job_tracing_connection.cc index 653d4fe2aab00..bb0e5702ea31d 100644 --- a/google/cloud/aiplatform/v1/internal/job_tracing_connection.cc +++ b/google/cloud/aiplatform/v1/internal/job_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - JobServiceTracingConnection::JobServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -641,16 +639,12 @@ JobServiceTracingConnection::WaitOperation( return internal::EndSpan(*span, child_->WaitOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeJobServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/aiplatform/v1/internal/job_tracing_connection.h b/google/cloud/aiplatform/v1/internal/job_tracing_connection.h index 04da12fc38384..e0a3d5328f206 100644 --- a/google/cloud/aiplatform/v1/internal/job_tracing_connection.h +++ b/google/cloud/aiplatform/v1/internal/job_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class JobServiceTracingConnection : public aiplatform_v1::JobServiceConnection { public: ~JobServiceTracingConnection() override = default; @@ -288,8 +286,6 @@ class JobServiceTracingConnection : public aiplatform_v1::JobServiceConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/aiplatform/v1/internal/job_tracing_stub.cc b/google/cloud/aiplatform/v1/internal/job_tracing_stub.cc index 0898fa7512a9a..c6eda876dc560 100644 --- a/google/cloud/aiplatform/v1/internal/job_tracing_stub.cc +++ b/google/cloud/aiplatform/v1/internal/job_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - JobServiceTracingStub::JobServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -735,18 +736,14 @@ future JobServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeJobServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/job_tracing_stub.h b/google/cloud/aiplatform/v1/internal/job_tracing_stub.h index fb656016fe6ad..2e01bce37656a 100644 --- a/google/cloud/aiplatform/v1/internal/job_tracing_stub.h +++ b/google/cloud/aiplatform/v1/internal/job_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class JobServiceTracingStub : public JobServiceStub { public: ~JobServiceTracingStub() override = default; @@ -338,8 +339,6 @@ class JobServiceTracingStub : public JobServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -354,4 +353,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_JOB_TRACING_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/llm_utility_auth_decorator.cc b/google/cloud/aiplatform/v1/internal/llm_utility_auth_decorator.cc index 0b3f3b0b3d80a..bd1abca29d5ad 100644 --- a/google/cloud/aiplatform/v1/internal/llm_utility_auth_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/llm_utility_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/aiplatform/v1/llm_utility_service.proto #include "google/cloud/aiplatform/v1/internal/llm_utility_auth_decorator.h" -#include +#include "google/cloud/aiplatform/v1/llm_utility_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -136,3 +139,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/llm_utility_auth_decorator.h b/google/cloud/aiplatform/v1/internal/llm_utility_auth_decorator.h index 313b1633c078c..44907257fa863 100644 --- a/google/cloud/aiplatform/v1/internal/llm_utility_auth_decorator.h +++ b/google/cloud/aiplatform/v1/internal/llm_utility_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -98,4 +101,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_LLM_UTILITY_AUTH_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/llm_utility_logging_decorator.cc b/google/cloud/aiplatform/v1/internal/llm_utility_logging_decorator.cc index 70061887b3012..b392dda401a80 100644 --- a/google/cloud/aiplatform/v1/internal/llm_utility_logging_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/llm_utility_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/aiplatform/v1/llm_utility_service.proto #include "google/cloud/aiplatform/v1/internal/llm_utility_logging_decorator.h" +#include "google/cloud/aiplatform/v1/llm_utility_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -179,3 +182,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/llm_utility_logging_decorator.h b/google/cloud/aiplatform/v1/internal/llm_utility_logging_decorator.h index 67e869dd373e6..ad8a092993470 100644 --- a/google/cloud/aiplatform/v1/internal/llm_utility_logging_decorator.h +++ b/google/cloud/aiplatform/v1/internal/llm_utility_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -98,4 +101,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_LLM_UTILITY_LOGGING_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/llm_utility_metadata_decorator.cc b/google/cloud/aiplatform/v1/internal/llm_utility_metadata_decorator.cc index 717f722c77191..dc609589f0104 100644 --- a/google/cloud/aiplatform/v1/internal/llm_utility_metadata_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/llm_utility_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/aiplatform/v1/llm_utility_service.proto #include "google/cloud/aiplatform/v1/internal/llm_utility_metadata_decorator.h" +#include "google/cloud/aiplatform/v1/llm_utility_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -169,3 +173,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/llm_utility_metadata_decorator.h b/google/cloud/aiplatform/v1/internal/llm_utility_metadata_decorator.h index d423f5a540ead..38d35d1e17521 100644 --- a/google/cloud/aiplatform/v1/internal/llm_utility_metadata_decorator.h +++ b/google/cloud/aiplatform/v1/internal/llm_utility_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -104,4 +107,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_LLM_UTILITY_METADATA_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/llm_utility_option_defaults.cc b/google/cloud/aiplatform/v1/internal/llm_utility_option_defaults.cc index b9794c422f7f5..e4e09bbbba719 100644 --- a/google/cloud/aiplatform/v1/internal/llm_utility_option_defaults.cc +++ b/google/cloud/aiplatform/v1/internal/llm_utility_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/aiplatform/v1/internal/llm_utility_option_defaults.h" #include "google/cloud/aiplatform/v1/llm_utility_connection.h" #include "google/cloud/aiplatform/v1/llm_utility_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -44,7 +44,7 @@ Options LlmUtilityServiceDefaultOptions(std::string const& location, if (!options.has()) { options.set( aiplatform_v1::LlmUtilityServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/aiplatform/v1/internal/llm_utility_stub.cc b/google/cloud/aiplatform/v1/internal/llm_utility_stub.cc index 8ee839c47f102..8a5ef006f5753 100644 --- a/google/cloud/aiplatform/v1/internal/llm_utility_stub.cc +++ b/google/cloud/aiplatform/v1/internal/llm_utility_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/aiplatform/v1/llm_utility_service.proto #include "google/cloud/aiplatform/v1/internal/llm_utility_stub.h" +#include "google/cloud/aiplatform/v1/llm_utility_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -175,3 +178,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/llm_utility_stub.h b/google/cloud/aiplatform/v1/internal/llm_utility_stub.h index 01e3c91d90f77..9b2d18b823dea 100644 --- a/google/cloud/aiplatform/v1/internal/llm_utility_stub.h +++ b/google/cloud/aiplatform/v1/internal/llm_utility_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_LLM_UTILITY_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_LLM_UTILITY_STUB_H +#include "google/cloud/aiplatform/v1/llm_utility_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -173,4 +176,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_LLM_UTILITY_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/llm_utility_stub_factory.cc b/google/cloud/aiplatform/v1/internal/llm_utility_stub_factory.cc index c842326478816..ab2a3085cade6 100644 --- a/google/cloud/aiplatform/v1/internal/llm_utility_stub_factory.cc +++ b/google/cloud/aiplatform/v1/internal/llm_utility_stub_factory.cc @@ -22,19 +22,22 @@ #include "google/cloud/aiplatform/v1/internal/llm_utility_metadata_decorator.h" #include "google/cloud/aiplatform/v1/internal/llm_utility_stub.h" #include "google/cloud/aiplatform/v1/internal/llm_utility_tracing_stub.h" +#include "google/cloud/aiplatform/v1/llm_utility_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -79,3 +82,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/llm_utility_stub_factory.h b/google/cloud/aiplatform/v1/internal/llm_utility_stub_factory.h index 62a69bca27904..399bf39051faf 100644 --- a/google/cloud/aiplatform/v1/internal/llm_utility_stub_factory.h +++ b/google/cloud/aiplatform/v1/internal/llm_utility_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_LLM_UTILITY_STUB_FACTORY_H diff --git a/google/cloud/aiplatform/v1/internal/llm_utility_tracing_connection.cc b/google/cloud/aiplatform/v1/internal/llm_utility_tracing_connection.cc index c87ebad3c7479..33837f38fa214 100644 --- a/google/cloud/aiplatform/v1/internal/llm_utility_tracing_connection.cc +++ b/google/cloud/aiplatform/v1/internal/llm_utility_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - LlmUtilityServiceTracingConnection::LlmUtilityServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -143,17 +141,13 @@ LlmUtilityServiceTracingConnection::WaitOperation( return internal::EndSpan(*span, child_->WaitOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeLlmUtilityServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/aiplatform/v1/internal/llm_utility_tracing_connection.h b/google/cloud/aiplatform/v1/internal/llm_utility_tracing_connection.h index ce19704faf7f0..0d5a7e2be99fb 100644 --- a/google/cloud/aiplatform/v1/internal/llm_utility_tracing_connection.h +++ b/google/cloud/aiplatform/v1/internal/llm_utility_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class LlmUtilityServiceTracingConnection : public aiplatform_v1::LlmUtilityServiceConnection { public: @@ -82,8 +80,6 @@ class LlmUtilityServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/aiplatform/v1/internal/llm_utility_tracing_stub.cc b/google/cloud/aiplatform/v1/internal/llm_utility_tracing_stub.cc index d6b3f67afd1eb..e4131f77802e5 100644 --- a/google/cloud/aiplatform/v1/internal/llm_utility_tracing_stub.cc +++ b/google/cloud/aiplatform/v1/internal/llm_utility_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - LlmUtilityServiceTracingStub::LlmUtilityServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -172,18 +173,14 @@ LlmUtilityServiceTracingStub::WaitOperation( child_->WaitOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeLlmUtilityServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/llm_utility_tracing_stub.h b/google/cloud/aiplatform/v1/internal/llm_utility_tracing_stub.h index 73d3c59dc56e5..40b54f9c7e39b 100644 --- a/google/cloud/aiplatform/v1/internal/llm_utility_tracing_stub.h +++ b/google/cloud/aiplatform/v1/internal/llm_utility_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class LlmUtilityServiceTracingStub : public LlmUtilityServiceStub { public: ~LlmUtilityServiceTracingStub() override = default; @@ -95,8 +96,6 @@ class LlmUtilityServiceTracingStub : public LlmUtilityServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -111,4 +110,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_LLM_UTILITY_TRACING_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/match_auth_decorator.cc b/google/cloud/aiplatform/v1/internal/match_auth_decorator.cc index 169a2aad33276..14b3f1ea44ce2 100644 --- a/google/cloud/aiplatform/v1/internal/match_auth_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/match_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/aiplatform/v1/match_service.proto #include "google/cloud/aiplatform/v1/internal/match_auth_decorator.h" -#include +#include "google/cloud/aiplatform/v1/match_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -136,3 +139,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/match_auth_decorator.h b/google/cloud/aiplatform/v1/internal/match_auth_decorator.h index 2251b55d9da20..5bc9c8ca65ac7 100644 --- a/google/cloud/aiplatform/v1/internal/match_auth_decorator.h +++ b/google/cloud/aiplatform/v1/internal/match_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -99,4 +102,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_MATCH_AUTH_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/match_logging_decorator.cc b/google/cloud/aiplatform/v1/internal/match_logging_decorator.cc index 07b6461e09bb8..ab004efce4855 100644 --- a/google/cloud/aiplatform/v1/internal/match_logging_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/match_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/aiplatform/v1/match_service.proto #include "google/cloud/aiplatform/v1/internal/match_logging_decorator.h" +#include "google/cloud/aiplatform/v1/match_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -178,3 +181,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/match_logging_decorator.h b/google/cloud/aiplatform/v1/internal/match_logging_decorator.h index b1b503c7139b6..7e61d5854b3ab 100644 --- a/google/cloud/aiplatform/v1/internal/match_logging_decorator.h +++ b/google/cloud/aiplatform/v1/internal/match_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -99,4 +102,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_MATCH_LOGGING_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/match_metadata_decorator.cc b/google/cloud/aiplatform/v1/internal/match_metadata_decorator.cc index 3a9b866f30ad6..f06c05679ac55 100644 --- a/google/cloud/aiplatform/v1/internal/match_metadata_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/match_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/aiplatform/v1/match_service.proto #include "google/cloud/aiplatform/v1/internal/match_metadata_decorator.h" +#include "google/cloud/aiplatform/v1/match_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -166,3 +170,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/match_metadata_decorator.h b/google/cloud/aiplatform/v1/internal/match_metadata_decorator.h index ab3c176f80985..6b4ac23b18e77 100644 --- a/google/cloud/aiplatform/v1/internal/match_metadata_decorator.h +++ b/google/cloud/aiplatform/v1/internal/match_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -104,4 +107,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_MATCH_METADATA_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/match_option_defaults.cc b/google/cloud/aiplatform/v1/internal/match_option_defaults.cc index b3c6dde6f3761..2789ba584adfd 100644 --- a/google/cloud/aiplatform/v1/internal/match_option_defaults.cc +++ b/google/cloud/aiplatform/v1/internal/match_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/aiplatform/v1/internal/match_option_defaults.h" #include "google/cloud/aiplatform/v1/match_connection.h" #include "google/cloud/aiplatform/v1/match_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -44,7 +44,7 @@ Options MatchServiceDefaultOptions(std::string const& location, if (!options.has()) { options.set( aiplatform_v1::MatchServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/aiplatform/v1/internal/match_stub.cc b/google/cloud/aiplatform/v1/internal/match_stub.cc index 01c5625626eb5..7df509d0615ff 100644 --- a/google/cloud/aiplatform/v1/internal/match_stub.cc +++ b/google/cloud/aiplatform/v1/internal/match_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/aiplatform/v1/match_service.proto #include "google/cloud/aiplatform/v1/internal/match_stub.h" +#include "google/cloud/aiplatform/v1/match_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -173,3 +176,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/match_stub.h b/google/cloud/aiplatform/v1/internal/match_stub.h index 1f873ad330e02..5e5bcd0596219 100644 --- a/google/cloud/aiplatform/v1/internal/match_stub.h +++ b/google/cloud/aiplatform/v1/internal/match_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_MATCH_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_MATCH_STUB_H +#include "google/cloud/aiplatform/v1/match_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -174,4 +177,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_MATCH_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/match_stub_factory.cc b/google/cloud/aiplatform/v1/internal/match_stub_factory.cc index ddc23fb9581ed..ca5a47e0e5bc5 100644 --- a/google/cloud/aiplatform/v1/internal/match_stub_factory.cc +++ b/google/cloud/aiplatform/v1/internal/match_stub_factory.cc @@ -22,19 +22,22 @@ #include "google/cloud/aiplatform/v1/internal/match_metadata_decorator.h" #include "google/cloud/aiplatform/v1/internal/match_stub.h" #include "google/cloud/aiplatform/v1/internal/match_tracing_stub.h" +#include "google/cloud/aiplatform/v1/match_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -78,3 +81,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/match_stub_factory.h b/google/cloud/aiplatform/v1/internal/match_stub_factory.h index 807a800868956..860e4ae693421 100644 --- a/google/cloud/aiplatform/v1/internal/match_stub_factory.h +++ b/google/cloud/aiplatform/v1/internal/match_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_MATCH_STUB_FACTORY_H diff --git a/google/cloud/aiplatform/v1/internal/match_tracing_connection.cc b/google/cloud/aiplatform/v1/internal/match_tracing_connection.cc index 11f580130ac5a..f728c37b97711 100644 --- a/google/cloud/aiplatform/v1/internal/match_tracing_connection.cc +++ b/google/cloud/aiplatform/v1/internal/match_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - MatchServiceTracingConnection::MatchServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -141,16 +139,12 @@ MatchServiceTracingConnection::WaitOperation( return internal::EndSpan(*span, child_->WaitOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeMatchServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/aiplatform/v1/internal/match_tracing_connection.h b/google/cloud/aiplatform/v1/internal/match_tracing_connection.h index 9fde896895324..b17e70a144cbf 100644 --- a/google/cloud/aiplatform/v1/internal/match_tracing_connection.h +++ b/google/cloud/aiplatform/v1/internal/match_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class MatchServiceTracingConnection : public aiplatform_v1::MatchServiceConnection { public: @@ -83,8 +81,6 @@ class MatchServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/aiplatform/v1/internal/match_tracing_stub.cc b/google/cloud/aiplatform/v1/internal/match_tracing_stub.cc index ac69ace20446d..fb1260cad8cc9 100644 --- a/google/cloud/aiplatform/v1/internal/match_tracing_stub.cc +++ b/google/cloud/aiplatform/v1/internal/match_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - MatchServiceTracingStub::MatchServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -170,18 +171,14 @@ StatusOr MatchServiceTracingStub::WaitOperation( child_->WaitOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeMatchServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/match_tracing_stub.h b/google/cloud/aiplatform/v1/internal/match_tracing_stub.h index af9f24428d6dc..cf7dd70303d94 100644 --- a/google/cloud/aiplatform/v1/internal/match_tracing_stub.h +++ b/google/cloud/aiplatform/v1/internal/match_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class MatchServiceTracingStub : public MatchServiceStub { public: ~MatchServiceTracingStub() override = default; @@ -95,8 +96,6 @@ class MatchServiceTracingStub : public MatchServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -111,4 +110,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_MATCH_TRACING_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/metadata_auth_decorator.cc b/google/cloud/aiplatform/v1/internal/metadata_auth_decorator.cc index bca5649794111..7580e61d49703 100644 --- a/google/cloud/aiplatform/v1/internal/metadata_auth_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/metadata_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/aiplatform/v1/metadata_service.proto #include "google/cloud/aiplatform/v1/internal/metadata_auth_decorator.h" -#include +#include "google/cloud/aiplatform/v1/metadata_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -602,3 +605,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/metadata_auth_decorator.h b/google/cloud/aiplatform/v1/internal/metadata_auth_decorator.h index 75ffb3cbcc251..8cd76c64ec917 100644 --- a/google/cloud/aiplatform/v1/internal/metadata_auth_decorator.h +++ b/google/cloud/aiplatform/v1/internal/metadata_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/metadata_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -326,4 +329,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_METADATA_AUTH_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/metadata_connection_impl.h b/google/cloud/aiplatform/v1/internal/metadata_connection_impl.h index 0584c00d57a1d..65cb9578ae25e 100644 --- a/google/cloud/aiplatform/v1/internal/metadata_connection_impl.h +++ b/google/cloud/aiplatform/v1/internal/metadata_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/internal/metadata_logging_decorator.cc b/google/cloud/aiplatform/v1/internal/metadata_logging_decorator.cc index 8f8c1954c23b9..ce50dcf6ec647 100644 --- a/google/cloud/aiplatform/v1/internal/metadata_logging_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/metadata_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/aiplatform/v1/metadata_service.proto #include "google/cloud/aiplatform/v1/internal/metadata_logging_decorator.h" +#include "google/cloud/aiplatform/v1/metadata_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -757,3 +760,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/metadata_logging_decorator.h b/google/cloud/aiplatform/v1/internal/metadata_logging_decorator.h index d362e4b8e434b..2f500a2ec6ea8 100644 --- a/google/cloud/aiplatform/v1/internal/metadata_logging_decorator.h +++ b/google/cloud/aiplatform/v1/internal/metadata_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/metadata_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -326,4 +329,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_METADATA_LOGGING_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/metadata_metadata_decorator.cc b/google/cloud/aiplatform/v1/internal/metadata_metadata_decorator.cc index d682e4451e579..d1ea5eb51bf54 100644 --- a/google/cloud/aiplatform/v1/internal/metadata_metadata_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/metadata_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/aiplatform/v1/metadata_service.proto #include "google/cloud/aiplatform/v1/internal/metadata_metadata_decorator.h" +#include "google/cloud/aiplatform/v1/metadata_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -564,3 +568,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/metadata_metadata_decorator.h b/google/cloud/aiplatform/v1/internal/metadata_metadata_decorator.h index bed00b283513d..73baaa4d4f796 100644 --- a/google/cloud/aiplatform/v1/internal/metadata_metadata_decorator.h +++ b/google/cloud/aiplatform/v1/internal/metadata_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/metadata_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -332,4 +335,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_METADATA_METADATA_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/metadata_option_defaults.cc b/google/cloud/aiplatform/v1/internal/metadata_option_defaults.cc index 61bcdea95edcf..c800e41aede8c 100644 --- a/google/cloud/aiplatform/v1/internal/metadata_option_defaults.cc +++ b/google/cloud/aiplatform/v1/internal/metadata_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/aiplatform/v1/internal/metadata_option_defaults.h" #include "google/cloud/aiplatform/v1/metadata_connection.h" #include "google/cloud/aiplatform/v1/metadata_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -44,7 +44,7 @@ Options MetadataServiceDefaultOptions(std::string const& location, if (!options.has()) { options.set( aiplatform_v1::MetadataServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/aiplatform/v1/internal/metadata_stub.cc b/google/cloud/aiplatform/v1/internal/metadata_stub.cc index e58c05ad4ff57..648bea70979ab 100644 --- a/google/cloud/aiplatform/v1/internal/metadata_stub.cc +++ b/google/cloud/aiplatform/v1/internal/metadata_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/aiplatform/v1/metadata_service.proto #include "google/cloud/aiplatform/v1/internal/metadata_stub.h" +#include "google/cloud/aiplatform/v1/metadata_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -736,3 +739,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/metadata_stub.h b/google/cloud/aiplatform/v1/internal/metadata_stub.h index d529b6e7f23fb..72a5584eed4b8 100644 --- a/google/cloud/aiplatform/v1/internal/metadata_stub.h +++ b/google/cloud/aiplatform/v1/internal/metadata_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_METADATA_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_METADATA_STUB_H +#include "google/cloud/aiplatform/v1/metadata_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -612,4 +615,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_METADATA_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/metadata_stub_factory.cc b/google/cloud/aiplatform/v1/internal/metadata_stub_factory.cc index a65abdf6bed7c..76722749f8807 100644 --- a/google/cloud/aiplatform/v1/internal/metadata_stub_factory.cc +++ b/google/cloud/aiplatform/v1/internal/metadata_stub_factory.cc @@ -22,19 +22,22 @@ #include "google/cloud/aiplatform/v1/internal/metadata_metadata_decorator.h" #include "google/cloud/aiplatform/v1/internal/metadata_stub.h" #include "google/cloud/aiplatform/v1/internal/metadata_tracing_stub.h" +#include "google/cloud/aiplatform/v1/metadata_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -78,3 +81,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/metadata_stub_factory.h b/google/cloud/aiplatform/v1/internal/metadata_stub_factory.h index 01bd8cfcc3b39..98a579c5533c7 100644 --- a/google/cloud/aiplatform/v1/internal/metadata_stub_factory.h +++ b/google/cloud/aiplatform/v1/internal/metadata_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_METADATA_STUB_FACTORY_H diff --git a/google/cloud/aiplatform/v1/internal/metadata_tracing_connection.cc b/google/cloud/aiplatform/v1/internal/metadata_tracing_connection.cc index 2633507caf6a5..b4cc74ef433ad 100644 --- a/google/cloud/aiplatform/v1/internal/metadata_tracing_connection.cc +++ b/google/cloud/aiplatform/v1/internal/metadata_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - MetadataServiceTracingConnection::MetadataServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -600,16 +598,12 @@ MetadataServiceTracingConnection::WaitOperation( return internal::EndSpan(*span, child_->WaitOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeMetadataServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/aiplatform/v1/internal/metadata_tracing_connection.h b/google/cloud/aiplatform/v1/internal/metadata_tracing_connection.h index f0958482808da..2de74ef303fcd 100644 --- a/google/cloud/aiplatform/v1/internal/metadata_tracing_connection.h +++ b/google/cloud/aiplatform/v1/internal/metadata_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class MetadataServiceTracingConnection : public aiplatform_v1::MetadataServiceConnection { public: @@ -274,8 +272,6 @@ class MetadataServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/aiplatform/v1/internal/metadata_tracing_stub.cc b/google/cloud/aiplatform/v1/internal/metadata_tracing_stub.cc index 267484029bc4d..f48da7508b814 100644 --- a/google/cloud/aiplatform/v1/internal/metadata_tracing_stub.cc +++ b/google/cloud/aiplatform/v1/internal/metadata_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - MetadataServiceTracingStub::MetadataServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -692,18 +693,14 @@ future MetadataServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeMetadataServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/metadata_tracing_stub.h b/google/cloud/aiplatform/v1/internal/metadata_tracing_stub.h index f5612096e0300..5ecd3d803a6c6 100644 --- a/google/cloud/aiplatform/v1/internal/metadata_tracing_stub.h +++ b/google/cloud/aiplatform/v1/internal/metadata_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class MetadataServiceTracingStub : public MetadataServiceStub { public: ~MetadataServiceTracingStub() override = default; @@ -322,8 +323,6 @@ class MetadataServiceTracingStub : public MetadataServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -338,4 +337,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_METADATA_TRACING_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/migration_auth_decorator.cc b/google/cloud/aiplatform/v1/internal/migration_auth_decorator.cc index b979a135d774f..906ec48cf451a 100644 --- a/google/cloud/aiplatform/v1/internal/migration_auth_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/migration_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/aiplatform/v1/migration_service.proto #include "google/cloud/aiplatform/v1/internal/migration_auth_decorator.h" -#include +#include "google/cloud/aiplatform/v1/migration_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -195,3 +198,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/migration_auth_decorator.h b/google/cloud/aiplatform/v1/internal/migration_auth_decorator.h index 9cd7bfc76b989..1c43be6ab2502 100644 --- a/google/cloud/aiplatform/v1/internal/migration_auth_decorator.h +++ b/google/cloud/aiplatform/v1/internal/migration_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/migration_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -119,4 +122,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_MIGRATION_AUTH_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/migration_connection_impl.h b/google/cloud/aiplatform/v1/internal/migration_connection_impl.h index 945462fa06fad..372d6a41759c7 100644 --- a/google/cloud/aiplatform/v1/internal/migration_connection_impl.h +++ b/google/cloud/aiplatform/v1/internal/migration_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/internal/migration_logging_decorator.cc b/google/cloud/aiplatform/v1/internal/migration_logging_decorator.cc index c79c84beda3b1..79abcf987701e 100644 --- a/google/cloud/aiplatform/v1/internal/migration_logging_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/migration_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/aiplatform/v1/migration_service.proto #include "google/cloud/aiplatform/v1/internal/migration_logging_decorator.h" +#include "google/cloud/aiplatform/v1/migration_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -237,3 +240,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/migration_logging_decorator.h b/google/cloud/aiplatform/v1/internal/migration_logging_decorator.h index a1b5aa18c5635..e926e975eabbc 100644 --- a/google/cloud/aiplatform/v1/internal/migration_logging_decorator.h +++ b/google/cloud/aiplatform/v1/internal/migration_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/migration_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -119,4 +122,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_MIGRATION_LOGGING_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/migration_metadata_decorator.cc b/google/cloud/aiplatform/v1/internal/migration_metadata_decorator.cc index fd58fa7db4557..e40291cc2bab6 100644 --- a/google/cloud/aiplatform/v1/internal/migration_metadata_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/migration_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/aiplatform/v1/migration_service.proto #include "google/cloud/aiplatform/v1/internal/migration_metadata_decorator.h" +#include "google/cloud/aiplatform/v1/migration_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -204,3 +208,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/migration_metadata_decorator.h b/google/cloud/aiplatform/v1/internal/migration_metadata_decorator.h index b6d1549b80f31..73acb0d8cfc5c 100644 --- a/google/cloud/aiplatform/v1/internal/migration_metadata_decorator.h +++ b/google/cloud/aiplatform/v1/internal/migration_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/migration_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -125,4 +128,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_MIGRATION_METADATA_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/migration_option_defaults.cc b/google/cloud/aiplatform/v1/internal/migration_option_defaults.cc index 0e4babe6fff0a..42e037acd0489 100644 --- a/google/cloud/aiplatform/v1/internal/migration_option_defaults.cc +++ b/google/cloud/aiplatform/v1/internal/migration_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/aiplatform/v1/internal/migration_option_defaults.h" #include "google/cloud/aiplatform/v1/migration_connection.h" #include "google/cloud/aiplatform/v1/migration_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -44,7 +44,7 @@ Options MigrationServiceDefaultOptions(std::string const& location, if (!options.has()) { options.set( aiplatform_v1::MigrationServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/aiplatform/v1/internal/migration_stub.cc b/google/cloud/aiplatform/v1/internal/migration_stub.cc index c0ec77ab7f8ec..cd775dc549a74 100644 --- a/google/cloud/aiplatform/v1/internal/migration_stub.cc +++ b/google/cloud/aiplatform/v1/internal/migration_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/aiplatform/v1/migration_service.proto #include "google/cloud/aiplatform/v1/internal/migration_stub.h" +#include "google/cloud/aiplatform/v1/migration_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -238,3 +241,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/migration_stub.h b/google/cloud/aiplatform/v1/internal/migration_stub.h index 828fb58c7b8c2..617538f2df6db 100644 --- a/google/cloud/aiplatform/v1/internal/migration_stub.h +++ b/google/cloud/aiplatform/v1/internal/migration_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_MIGRATION_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_MIGRATION_STUB_H +#include "google/cloud/aiplatform/v1/migration_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -217,4 +220,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_MIGRATION_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/migration_stub_factory.cc b/google/cloud/aiplatform/v1/internal/migration_stub_factory.cc index ff538294f5e42..a5520b371ba40 100644 --- a/google/cloud/aiplatform/v1/internal/migration_stub_factory.cc +++ b/google/cloud/aiplatform/v1/internal/migration_stub_factory.cc @@ -22,19 +22,22 @@ #include "google/cloud/aiplatform/v1/internal/migration_metadata_decorator.h" #include "google/cloud/aiplatform/v1/internal/migration_stub.h" #include "google/cloud/aiplatform/v1/internal/migration_tracing_stub.h" +#include "google/cloud/aiplatform/v1/migration_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -78,3 +81,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/migration_stub_factory.h b/google/cloud/aiplatform/v1/internal/migration_stub_factory.h index 5cddee33bf640..350d152b9c7fe 100644 --- a/google/cloud/aiplatform/v1/internal/migration_stub_factory.h +++ b/google/cloud/aiplatform/v1/internal/migration_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_MIGRATION_STUB_FACTORY_H diff --git a/google/cloud/aiplatform/v1/internal/migration_tracing_connection.cc b/google/cloud/aiplatform/v1/internal/migration_tracing_connection.cc index 21aa88a6a5a81..5058c920c796d 100644 --- a/google/cloud/aiplatform/v1/internal/migration_tracing_connection.cc +++ b/google/cloud/aiplatform/v1/internal/migration_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - MigrationServiceTracingConnection::MigrationServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -170,16 +168,12 @@ MigrationServiceTracingConnection::WaitOperation( return internal::EndSpan(*span, child_->WaitOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeMigrationServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/aiplatform/v1/internal/migration_tracing_connection.h b/google/cloud/aiplatform/v1/internal/migration_tracing_connection.h index 68b4edd35e6c4..cd75d6801cafc 100644 --- a/google/cloud/aiplatform/v1/internal/migration_tracing_connection.h +++ b/google/cloud/aiplatform/v1/internal/migration_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class MigrationServiceTracingConnection : public aiplatform_v1::MigrationServiceConnection { public: @@ -93,8 +91,6 @@ class MigrationServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/aiplatform/v1/internal/migration_tracing_stub.cc b/google/cloud/aiplatform/v1/internal/migration_tracing_stub.cc index 27f46567ec427..7b1ee2688cd93 100644 --- a/google/cloud/aiplatform/v1/internal/migration_tracing_stub.cc +++ b/google/cloud/aiplatform/v1/internal/migration_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - MigrationServiceTracingStub::MigrationServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -220,18 +221,14 @@ future MigrationServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeMigrationServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/migration_tracing_stub.h b/google/cloud/aiplatform/v1/internal/migration_tracing_stub.h index 340b34282df10..47143dec81565 100644 --- a/google/cloud/aiplatform/v1/internal/migration_tracing_stub.h +++ b/google/cloud/aiplatform/v1/internal/migration_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class MigrationServiceTracingStub : public MigrationServiceStub { public: ~MigrationServiceTracingStub() override = default; @@ -115,8 +116,6 @@ class MigrationServiceTracingStub : public MigrationServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -131,4 +130,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_MIGRATION_TRACING_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/model_auth_decorator.cc b/google/cloud/aiplatform/v1/internal/model_auth_decorator.cc index 8e7c4758591bd..cdd760719489f 100644 --- a/google/cloud/aiplatform/v1/internal/model_auth_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/model_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/aiplatform/v1/model_service.proto #include "google/cloud/aiplatform/v1/internal/model_auth_decorator.h" -#include +#include "google/cloud/aiplatform/v1/model_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -447,3 +450,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/model_auth_decorator.h b/google/cloud/aiplatform/v1/internal/model_auth_decorator.h index 2a18d231572a4..90efd5dc21c47 100644 --- a/google/cloud/aiplatform/v1/internal/model_auth_decorator.h +++ b/google/cloud/aiplatform/v1/internal/model_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/model_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -245,4 +248,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_MODEL_AUTH_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/model_connection_impl.h b/google/cloud/aiplatform/v1/internal/model_connection_impl.h index d7bad7c0ec829..eb3936cefdee1 100644 --- a/google/cloud/aiplatform/v1/internal/model_connection_impl.h +++ b/google/cloud/aiplatform/v1/internal/model_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/internal/model_garden_auth_decorator.cc b/google/cloud/aiplatform/v1/internal/model_garden_auth_decorator.cc index 8364d719db038..850c92bf7ef05 100644 --- a/google/cloud/aiplatform/v1/internal/model_garden_auth_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/model_garden_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/aiplatform/v1/model_garden_service.proto #include "google/cloud/aiplatform/v1/internal/model_garden_auth_decorator.h" -#include +#include "google/cloud/aiplatform/v1/model_garden_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -191,3 +194,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/model_garden_auth_decorator.h b/google/cloud/aiplatform/v1/internal/model_garden_auth_decorator.h index 35316c8707bde..6154a42bee9d2 100644 --- a/google/cloud/aiplatform/v1/internal/model_garden_auth_decorator.h +++ b/google/cloud/aiplatform/v1/internal/model_garden_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/model_garden_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -116,4 +119,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_MODEL_GARDEN_AUTH_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/model_garden_connection_impl.h b/google/cloud/aiplatform/v1/internal/model_garden_connection_impl.h index aa284dbf3b901..6dec955b26cce 100644 --- a/google/cloud/aiplatform/v1/internal/model_garden_connection_impl.h +++ b/google/cloud/aiplatform/v1/internal/model_garden_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/internal/model_garden_logging_decorator.cc b/google/cloud/aiplatform/v1/internal/model_garden_logging_decorator.cc index 054023dc5e905..91e2fbcfc065f 100644 --- a/google/cloud/aiplatform/v1/internal/model_garden_logging_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/model_garden_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/aiplatform/v1/model_garden_service.proto #include "google/cloud/aiplatform/v1/internal/model_garden_logging_decorator.h" +#include "google/cloud/aiplatform/v1/model_garden_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -232,3 +235,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/model_garden_logging_decorator.h b/google/cloud/aiplatform/v1/internal/model_garden_logging_decorator.h index b4931ca211f14..386e56dd8300a 100644 --- a/google/cloud/aiplatform/v1/internal/model_garden_logging_decorator.h +++ b/google/cloud/aiplatform/v1/internal/model_garden_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/model_garden_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -116,4 +119,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_MODEL_GARDEN_LOGGING_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/model_garden_metadata_decorator.cc b/google/cloud/aiplatform/v1/internal/model_garden_metadata_decorator.cc index 99d47433413bd..6e9e0e3ac6cf0 100644 --- a/google/cloud/aiplatform/v1/internal/model_garden_metadata_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/model_garden_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/aiplatform/v1/model_garden_service.proto #include "google/cloud/aiplatform/v1/internal/model_garden_metadata_decorator.h" +#include "google/cloud/aiplatform/v1/model_garden_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -203,3 +207,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/model_garden_metadata_decorator.h b/google/cloud/aiplatform/v1/internal/model_garden_metadata_decorator.h index 5e05533b329dc..98eaa8b12bcf0 100644 --- a/google/cloud/aiplatform/v1/internal/model_garden_metadata_decorator.h +++ b/google/cloud/aiplatform/v1/internal/model_garden_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/model_garden_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -122,4 +125,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_MODEL_GARDEN_METADATA_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/model_garden_option_defaults.cc b/google/cloud/aiplatform/v1/internal/model_garden_option_defaults.cc index c848813b19396..d0b80799a7d28 100644 --- a/google/cloud/aiplatform/v1/internal/model_garden_option_defaults.cc +++ b/google/cloud/aiplatform/v1/internal/model_garden_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/aiplatform/v1/internal/model_garden_option_defaults.h" #include "google/cloud/aiplatform/v1/model_garden_connection.h" #include "google/cloud/aiplatform/v1/model_garden_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -44,7 +44,7 @@ Options ModelGardenServiceDefaultOptions(std::string const& location, if (!options.has()) { options.set( aiplatform_v1::ModelGardenServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/aiplatform/v1/internal/model_garden_stub.cc b/google/cloud/aiplatform/v1/internal/model_garden_stub.cc index 1dae9ace2d294..95e05bfa5563c 100644 --- a/google/cloud/aiplatform/v1/internal/model_garden_stub.cc +++ b/google/cloud/aiplatform/v1/internal/model_garden_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/aiplatform/v1/model_garden_service.proto #include "google/cloud/aiplatform/v1/internal/model_garden_stub.h" +#include "google/cloud/aiplatform/v1/model_garden_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -232,3 +235,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/model_garden_stub.h b/google/cloud/aiplatform/v1/internal/model_garden_stub.h index 6fe4bf9517d12..99903e6dd7e09 100644 --- a/google/cloud/aiplatform/v1/internal/model_garden_stub.h +++ b/google/cloud/aiplatform/v1/internal/model_garden_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_MODEL_GARDEN_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_MODEL_GARDEN_STUB_H +#include "google/cloud/aiplatform/v1/model_garden_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -210,4 +213,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_MODEL_GARDEN_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/model_garden_stub_factory.cc b/google/cloud/aiplatform/v1/internal/model_garden_stub_factory.cc index e5aa9ba918298..346513aaea1c1 100644 --- a/google/cloud/aiplatform/v1/internal/model_garden_stub_factory.cc +++ b/google/cloud/aiplatform/v1/internal/model_garden_stub_factory.cc @@ -22,19 +22,22 @@ #include "google/cloud/aiplatform/v1/internal/model_garden_metadata_decorator.h" #include "google/cloud/aiplatform/v1/internal/model_garden_stub.h" #include "google/cloud/aiplatform/v1/internal/model_garden_tracing_stub.h" +#include "google/cloud/aiplatform/v1/model_garden_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -78,3 +81,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/model_garden_stub_factory.h b/google/cloud/aiplatform/v1/internal/model_garden_stub_factory.h index 79f2ef2fc0050..cdff0cfb4ed60 100644 --- a/google/cloud/aiplatform/v1/internal/model_garden_stub_factory.h +++ b/google/cloud/aiplatform/v1/internal/model_garden_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_MODEL_GARDEN_STUB_FACTORY_H diff --git a/google/cloud/aiplatform/v1/internal/model_garden_tracing_connection.cc b/google/cloud/aiplatform/v1/internal/model_garden_tracing_connection.cc index a22a9ab0e01c9..621b284e33f82 100644 --- a/google/cloud/aiplatform/v1/internal/model_garden_tracing_connection.cc +++ b/google/cloud/aiplatform/v1/internal/model_garden_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ModelGardenServiceTracingConnection::ModelGardenServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -161,17 +159,13 @@ ModelGardenServiceTracingConnection::WaitOperation( return internal::EndSpan(*span, child_->WaitOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeModelGardenServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/aiplatform/v1/internal/model_garden_tracing_connection.h b/google/cloud/aiplatform/v1/internal/model_garden_tracing_connection.h index bd1849a45228c..9deab23d3cf71 100644 --- a/google/cloud/aiplatform/v1/internal/model_garden_tracing_connection.h +++ b/google/cloud/aiplatform/v1/internal/model_garden_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ModelGardenServiceTracingConnection : public aiplatform_v1::ModelGardenServiceConnection { public: @@ -88,8 +86,6 @@ class ModelGardenServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/aiplatform/v1/internal/model_garden_tracing_stub.cc b/google/cloud/aiplatform/v1/internal/model_garden_tracing_stub.cc index 1204881fdd49e..38f46a3c0a669 100644 --- a/google/cloud/aiplatform/v1/internal/model_garden_tracing_stub.cc +++ b/google/cloud/aiplatform/v1/internal/model_garden_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ModelGardenServiceTracingStub::ModelGardenServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -213,18 +214,14 @@ future ModelGardenServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeModelGardenServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/model_garden_tracing_stub.h b/google/cloud/aiplatform/v1/internal/model_garden_tracing_stub.h index ff03af012ba9e..bd2dfc3f641cf 100644 --- a/google/cloud/aiplatform/v1/internal/model_garden_tracing_stub.h +++ b/google/cloud/aiplatform/v1/internal/model_garden_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ModelGardenServiceTracingStub : public ModelGardenServiceStub { public: ~ModelGardenServiceTracingStub() override = default; @@ -112,8 +113,6 @@ class ModelGardenServiceTracingStub : public ModelGardenServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -128,4 +127,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_MODEL_GARDEN_TRACING_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/model_logging_decorator.cc b/google/cloud/aiplatform/v1/internal/model_logging_decorator.cc index 7e65f6f1b6fbe..f0534c2bde2d5 100644 --- a/google/cloud/aiplatform/v1/internal/model_logging_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/model_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/aiplatform/v1/model_service.proto #include "google/cloud/aiplatform/v1/internal/model_logging_decorator.h" +#include "google/cloud/aiplatform/v1/model_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -546,3 +549,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/model_logging_decorator.h b/google/cloud/aiplatform/v1/internal/model_logging_decorator.h index ac7d78131a730..02ec42cb9cb49 100644 --- a/google/cloud/aiplatform/v1/internal/model_logging_decorator.h +++ b/google/cloud/aiplatform/v1/internal/model_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/model_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -245,4 +248,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_MODEL_LOGGING_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/model_metadata_decorator.cc b/google/cloud/aiplatform/v1/internal/model_metadata_decorator.cc index 33571d0239c26..ab78e6b4a89e6 100644 --- a/google/cloud/aiplatform/v1/internal/model_metadata_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/model_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/aiplatform/v1/model_service.proto #include "google/cloud/aiplatform/v1/internal/model_metadata_decorator.h" +#include "google/cloud/aiplatform/v1/model_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -417,3 +421,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/model_metadata_decorator.h b/google/cloud/aiplatform/v1/internal/model_metadata_decorator.h index 609febf3e4be9..e1e194834b1e4 100644 --- a/google/cloud/aiplatform/v1/internal/model_metadata_decorator.h +++ b/google/cloud/aiplatform/v1/internal/model_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/model_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -250,4 +253,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_MODEL_METADATA_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/model_option_defaults.cc b/google/cloud/aiplatform/v1/internal/model_option_defaults.cc index a85c0ce3df8ca..200cccdf67c7e 100644 --- a/google/cloud/aiplatform/v1/internal/model_option_defaults.cc +++ b/google/cloud/aiplatform/v1/internal/model_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/aiplatform/v1/internal/model_option_defaults.h" #include "google/cloud/aiplatform/v1/model_connection.h" #include "google/cloud/aiplatform/v1/model_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -44,7 +44,7 @@ Options ModelServiceDefaultOptions(std::string const& location, if (!options.has()) { options.set( aiplatform_v1::ModelServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/aiplatform/v1/internal/model_stub.cc b/google/cloud/aiplatform/v1/internal/model_stub.cc index 1c96ec5c5a6f7..99b5ab5b7f971 100644 --- a/google/cloud/aiplatform/v1/internal/model_stub.cc +++ b/google/cloud/aiplatform/v1/internal/model_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/aiplatform/v1/model_service.proto #include "google/cloud/aiplatform/v1/internal/model_stub.h" +#include "google/cloud/aiplatform/v1/model_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -541,3 +544,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/model_stub.h b/google/cloud/aiplatform/v1/internal/model_stub.h index dd75acbd68c1c..8aa429af72b34 100644 --- a/google/cloud/aiplatform/v1/internal/model_stub.h +++ b/google/cloud/aiplatform/v1/internal/model_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_MODEL_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_MODEL_STUB_H +#include "google/cloud/aiplatform/v1/model_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -464,4 +467,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_MODEL_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/model_stub_factory.cc b/google/cloud/aiplatform/v1/internal/model_stub_factory.cc index 509f837315b14..26a6f41b3643a 100644 --- a/google/cloud/aiplatform/v1/internal/model_stub_factory.cc +++ b/google/cloud/aiplatform/v1/internal/model_stub_factory.cc @@ -22,19 +22,22 @@ #include "google/cloud/aiplatform/v1/internal/model_metadata_decorator.h" #include "google/cloud/aiplatform/v1/internal/model_stub.h" #include "google/cloud/aiplatform/v1/internal/model_tracing_stub.h" +#include "google/cloud/aiplatform/v1/model_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -77,3 +80,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/model_stub_factory.h b/google/cloud/aiplatform/v1/internal/model_stub_factory.h index caccd81d857e6..ed7ed1be543c2 100644 --- a/google/cloud/aiplatform/v1/internal/model_stub_factory.h +++ b/google/cloud/aiplatform/v1/internal/model_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_MODEL_STUB_FACTORY_H diff --git a/google/cloud/aiplatform/v1/internal/model_tracing_connection.cc b/google/cloud/aiplatform/v1/internal/model_tracing_connection.cc index fa83f90980e3b..5cbede77dc90b 100644 --- a/google/cloud/aiplatform/v1/internal/model_tracing_connection.cc +++ b/google/cloud/aiplatform/v1/internal/model_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ModelServiceTracingConnection::ModelServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -439,16 +437,12 @@ ModelServiceTracingConnection::WaitOperation( return internal::EndSpan(*span, child_->WaitOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeModelServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/aiplatform/v1/internal/model_tracing_connection.h b/google/cloud/aiplatform/v1/internal/model_tracing_connection.h index 8ceffc7bd6d8a..81d7c0c9fd5ed 100644 --- a/google/cloud/aiplatform/v1/internal/model_tracing_connection.h +++ b/google/cloud/aiplatform/v1/internal/model_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ModelServiceTracingConnection : public aiplatform_v1::ModelServiceConnection { public: @@ -207,8 +205,6 @@ class ModelServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/aiplatform/v1/internal/model_tracing_stub.cc b/google/cloud/aiplatform/v1/internal/model_tracing_stub.cc index 1f19efb642d52..4f302af20cc9d 100644 --- a/google/cloud/aiplatform/v1/internal/model_tracing_stub.cc +++ b/google/cloud/aiplatform/v1/internal/model_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ModelServiceTracingStub::ModelServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -499,18 +500,14 @@ future ModelServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeModelServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/model_tracing_stub.h b/google/cloud/aiplatform/v1/internal/model_tracing_stub.h index 57a4cd056a36a..04134d6a15f8b 100644 --- a/google/cloud/aiplatform/v1/internal/model_tracing_stub.h +++ b/google/cloud/aiplatform/v1/internal/model_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ModelServiceTracingStub : public ModelServiceStub { public: ~ModelServiceTracingStub() override = default; @@ -240,8 +241,6 @@ class ModelServiceTracingStub : public ModelServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -256,4 +255,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_MODEL_TRACING_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/notebook_auth_decorator.cc b/google/cloud/aiplatform/v1/internal/notebook_auth_decorator.cc index 8170e503c78f0..d250828edc9a8 100644 --- a/google/cloud/aiplatform/v1/internal/notebook_auth_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/notebook_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/aiplatform/v1/notebook_service.proto #include "google/cloud/aiplatform/v1/internal/notebook_auth_decorator.h" -#include +#include "google/cloud/aiplatform/v1/notebook_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -497,3 +500,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/notebook_auth_decorator.h b/google/cloud/aiplatform/v1/internal/notebook_auth_decorator.h index 552dc4f4821b5..1d03dc6cd826a 100644 --- a/google/cloud/aiplatform/v1/internal/notebook_auth_decorator.h +++ b/google/cloud/aiplatform/v1/internal/notebook_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/notebook_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -254,4 +257,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_NOTEBOOK_AUTH_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/notebook_connection_impl.h b/google/cloud/aiplatform/v1/internal/notebook_connection_impl.h index e4f05481252a9..afc154846f687 100644 --- a/google/cloud/aiplatform/v1/internal/notebook_connection_impl.h +++ b/google/cloud/aiplatform/v1/internal/notebook_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/internal/notebook_logging_decorator.cc b/google/cloud/aiplatform/v1/internal/notebook_logging_decorator.cc index 02c75e946ecee..2a221c5351ad5 100644 --- a/google/cloud/aiplatform/v1/internal/notebook_logging_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/notebook_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/aiplatform/v1/notebook_service.proto #include "google/cloud/aiplatform/v1/internal/notebook_logging_decorator.h" +#include "google/cloud/aiplatform/v1/notebook_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -587,3 +590,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/notebook_logging_decorator.h b/google/cloud/aiplatform/v1/internal/notebook_logging_decorator.h index 2bdeeb9ceb0e1..14c1e29862e03 100644 --- a/google/cloud/aiplatform/v1/internal/notebook_logging_decorator.h +++ b/google/cloud/aiplatform/v1/internal/notebook_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/notebook_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -254,4 +257,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_NOTEBOOK_LOGGING_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/notebook_metadata_decorator.cc b/google/cloud/aiplatform/v1/internal/notebook_metadata_decorator.cc index 903e963cb376e..0e83272894900 100644 --- a/google/cloud/aiplatform/v1/internal/notebook_metadata_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/notebook_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/aiplatform/v1/notebook_service.proto #include "google/cloud/aiplatform/v1/internal/notebook_metadata_decorator.h" +#include "google/cloud/aiplatform/v1/notebook_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -443,3 +447,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/notebook_metadata_decorator.h b/google/cloud/aiplatform/v1/internal/notebook_metadata_decorator.h index a989d617d6b16..fb2a83a1234ae 100644 --- a/google/cloud/aiplatform/v1/internal/notebook_metadata_decorator.h +++ b/google/cloud/aiplatform/v1/internal/notebook_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/notebook_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -260,4 +263,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_NOTEBOOK_METADATA_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/notebook_option_defaults.cc b/google/cloud/aiplatform/v1/internal/notebook_option_defaults.cc index 2fc69d552724e..ce50d31100299 100644 --- a/google/cloud/aiplatform/v1/internal/notebook_option_defaults.cc +++ b/google/cloud/aiplatform/v1/internal/notebook_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/aiplatform/v1/internal/notebook_option_defaults.h" #include "google/cloud/aiplatform/v1/notebook_connection.h" #include "google/cloud/aiplatform/v1/notebook_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -44,7 +44,7 @@ Options NotebookServiceDefaultOptions(std::string const& location, if (!options.has()) { options.set( aiplatform_v1::NotebookServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/aiplatform/v1/internal/notebook_stub.cc b/google/cloud/aiplatform/v1/internal/notebook_stub.cc index b4debca94a5c8..87fc23be3e403 100644 --- a/google/cloud/aiplatform/v1/internal/notebook_stub.cc +++ b/google/cloud/aiplatform/v1/internal/notebook_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/aiplatform/v1/notebook_service.proto #include "google/cloud/aiplatform/v1/internal/notebook_stub.h" +#include "google/cloud/aiplatform/v1/notebook_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -587,3 +590,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/notebook_stub.h b/google/cloud/aiplatform/v1/internal/notebook_stub.h index c88c1803084e0..4f8ce8f299619 100644 --- a/google/cloud/aiplatform/v1/internal/notebook_stub.h +++ b/google/cloud/aiplatform/v1/internal/notebook_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_NOTEBOOK_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_NOTEBOOK_STUB_H +#include "google/cloud/aiplatform/v1/notebook_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -494,4 +497,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_NOTEBOOK_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/notebook_stub_factory.cc b/google/cloud/aiplatform/v1/internal/notebook_stub_factory.cc index 2abb664bff2fa..78f374aca1482 100644 --- a/google/cloud/aiplatform/v1/internal/notebook_stub_factory.cc +++ b/google/cloud/aiplatform/v1/internal/notebook_stub_factory.cc @@ -22,19 +22,22 @@ #include "google/cloud/aiplatform/v1/internal/notebook_metadata_decorator.h" #include "google/cloud/aiplatform/v1/internal/notebook_stub.h" #include "google/cloud/aiplatform/v1/internal/notebook_tracing_stub.h" +#include "google/cloud/aiplatform/v1/notebook_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -78,3 +81,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/notebook_stub_factory.h b/google/cloud/aiplatform/v1/internal/notebook_stub_factory.h index 3648319ab9dc3..7d838cd1d86c6 100644 --- a/google/cloud/aiplatform/v1/internal/notebook_stub_factory.h +++ b/google/cloud/aiplatform/v1/internal/notebook_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_NOTEBOOK_STUB_FACTORY_H diff --git a/google/cloud/aiplatform/v1/internal/notebook_tracing_connection.cc b/google/cloud/aiplatform/v1/internal/notebook_tracing_connection.cc index 0f54a7b3bc8b5..650f5347177ea 100644 --- a/google/cloud/aiplatform/v1/internal/notebook_tracing_connection.cc +++ b/google/cloud/aiplatform/v1/internal/notebook_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - NotebookServiceTracingConnection::NotebookServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -502,16 +500,12 @@ NotebookServiceTracingConnection::WaitOperation( return internal::EndSpan(*span, child_->WaitOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeNotebookServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/aiplatform/v1/internal/notebook_tracing_connection.h b/google/cloud/aiplatform/v1/internal/notebook_tracing_connection.h index 63d2a20c07f7b..427405b246f7e 100644 --- a/google/cloud/aiplatform/v1/internal/notebook_tracing_connection.h +++ b/google/cloud/aiplatform/v1/internal/notebook_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class NotebookServiceTracingConnection : public aiplatform_v1::NotebookServiceConnection { public: @@ -235,8 +233,6 @@ class NotebookServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/aiplatform/v1/internal/notebook_tracing_stub.cc b/google/cloud/aiplatform/v1/internal/notebook_tracing_stub.cc index 24f669d348eba..db55d9eacb4b2 100644 --- a/google/cloud/aiplatform/v1/internal/notebook_tracing_stub.cc +++ b/google/cloud/aiplatform/v1/internal/notebook_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - NotebookServiceTracingStub::NotebookServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -544,18 +545,14 @@ future NotebookServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeNotebookServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/notebook_tracing_stub.h b/google/cloud/aiplatform/v1/internal/notebook_tracing_stub.h index 2a8c107360d8c..e213097a41aa0 100644 --- a/google/cloud/aiplatform/v1/internal/notebook_tracing_stub.h +++ b/google/cloud/aiplatform/v1/internal/notebook_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class NotebookServiceTracingStub : public NotebookServiceStub { public: ~NotebookServiceTracingStub() override = default; @@ -250,8 +251,6 @@ class NotebookServiceTracingStub : public NotebookServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -266,4 +265,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_NOTEBOOK_TRACING_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/persistent_resource_auth_decorator.cc b/google/cloud/aiplatform/v1/internal/persistent_resource_auth_decorator.cc index 27cdfe41dd900..657644ebc66cd 100644 --- a/google/cloud/aiplatform/v1/internal/persistent_resource_auth_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/persistent_resource_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/aiplatform/v1/persistent_resource_service.proto #include "google/cloud/aiplatform/v1/internal/persistent_resource_auth_decorator.h" -#include +#include "google/cloud/aiplatform/v1/persistent_resource_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -301,3 +304,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/persistent_resource_auth_decorator.h b/google/cloud/aiplatform/v1/internal/persistent_resource_auth_decorator.h index 2a233cc812167..b7fc90de97472 100644 --- a/google/cloud/aiplatform/v1/internal/persistent_resource_auth_decorator.h +++ b/google/cloud/aiplatform/v1/internal/persistent_resource_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/persistent_resource_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -165,4 +168,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_PERSISTENT_RESOURCE_AUTH_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/persistent_resource_connection_impl.h b/google/cloud/aiplatform/v1/internal/persistent_resource_connection_impl.h index ff50567f084f1..5ffc836f8fdae 100644 --- a/google/cloud/aiplatform/v1/internal/persistent_resource_connection_impl.h +++ b/google/cloud/aiplatform/v1/internal/persistent_resource_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/internal/persistent_resource_logging_decorator.cc b/google/cloud/aiplatform/v1/internal/persistent_resource_logging_decorator.cc index b23e8d783ce50..34aeb0c185426 100644 --- a/google/cloud/aiplatform/v1/internal/persistent_resource_logging_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/persistent_resource_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/aiplatform/v1/persistent_resource_service.proto #include "google/cloud/aiplatform/v1/internal/persistent_resource_logging_decorator.h" +#include "google/cloud/aiplatform/v1/persistent_resource_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -365,3 +368,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/persistent_resource_logging_decorator.h b/google/cloud/aiplatform/v1/internal/persistent_resource_logging_decorator.h index dbcf0dadc5bbc..c7ac13c508db2 100644 --- a/google/cloud/aiplatform/v1/internal/persistent_resource_logging_decorator.h +++ b/google/cloud/aiplatform/v1/internal/persistent_resource_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/persistent_resource_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -165,4 +168,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_PERSISTENT_RESOURCE_LOGGING_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/persistent_resource_metadata_decorator.cc b/google/cloud/aiplatform/v1/internal/persistent_resource_metadata_decorator.cc index 0d021f98800f6..3b1fc1e2e0c3f 100644 --- a/google/cloud/aiplatform/v1/internal/persistent_resource_metadata_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/persistent_resource_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/aiplatform/v1/persistent_resource_service.proto #include "google/cloud/aiplatform/v1/internal/persistent_resource_metadata_decorator.h" +#include "google/cloud/aiplatform/v1/persistent_resource_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -290,3 +294,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/persistent_resource_metadata_decorator.h b/google/cloud/aiplatform/v1/internal/persistent_resource_metadata_decorator.h index 542bd95f2a16c..5e43119a6724a 100644 --- a/google/cloud/aiplatform/v1/internal/persistent_resource_metadata_decorator.h +++ b/google/cloud/aiplatform/v1/internal/persistent_resource_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/persistent_resource_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -171,4 +174,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_PERSISTENT_RESOURCE_METADATA_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/persistent_resource_option_defaults.cc b/google/cloud/aiplatform/v1/internal/persistent_resource_option_defaults.cc index 90c57ef83b2f1..ba88a2c651b48 100644 --- a/google/cloud/aiplatform/v1/internal/persistent_resource_option_defaults.cc +++ b/google/cloud/aiplatform/v1/internal/persistent_resource_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/aiplatform/v1/internal/persistent_resource_option_defaults.h" #include "google/cloud/aiplatform/v1/persistent_resource_connection.h" #include "google/cloud/aiplatform/v1/persistent_resource_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -46,7 +46,7 @@ Options PersistentResourceServiceDefaultOptions(std::string const& location, .has()) { options.set( aiplatform_v1::PersistentResourceServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/aiplatform/v1/internal/persistent_resource_stub.cc b/google/cloud/aiplatform/v1/internal/persistent_resource_stub.cc index a53d617de7fd0..09b30bcee3bbb 100644 --- a/google/cloud/aiplatform/v1/internal/persistent_resource_stub.cc +++ b/google/cloud/aiplatform/v1/internal/persistent_resource_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/aiplatform/v1/persistent_resource_service.proto #include "google/cloud/aiplatform/v1/internal/persistent_resource_stub.h" +#include "google/cloud/aiplatform/v1/persistent_resource_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -360,3 +363,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/persistent_resource_stub.h b/google/cloud/aiplatform/v1/internal/persistent_resource_stub.h index 4135276d851d5..f9f9592c24e77 100644 --- a/google/cloud/aiplatform/v1/internal/persistent_resource_stub.h +++ b/google/cloud/aiplatform/v1/internal/persistent_resource_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_PERSISTENT_RESOURCE_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_PERSISTENT_RESOURCE_STUB_H +#include "google/cloud/aiplatform/v1/persistent_resource_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -309,4 +312,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_PERSISTENT_RESOURCE_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/persistent_resource_stub_factory.cc b/google/cloud/aiplatform/v1/internal/persistent_resource_stub_factory.cc index f285d96824b02..74c4e2445ec32 100644 --- a/google/cloud/aiplatform/v1/internal/persistent_resource_stub_factory.cc +++ b/google/cloud/aiplatform/v1/internal/persistent_resource_stub_factory.cc @@ -22,19 +22,22 @@ #include "google/cloud/aiplatform/v1/internal/persistent_resource_metadata_decorator.h" #include "google/cloud/aiplatform/v1/internal/persistent_resource_stub.h" #include "google/cloud/aiplatform/v1/internal/persistent_resource_tracing_stub.h" +#include "google/cloud/aiplatform/v1/persistent_resource_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -80,3 +83,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/persistent_resource_stub_factory.h b/google/cloud/aiplatform/v1/internal/persistent_resource_stub_factory.h index 6290ac25ba7c3..78027ecbfd451 100644 --- a/google/cloud/aiplatform/v1/internal/persistent_resource_stub_factory.h +++ b/google/cloud/aiplatform/v1/internal/persistent_resource_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_PERSISTENT_RESOURCE_STUB_FACTORY_H diff --git a/google/cloud/aiplatform/v1/internal/persistent_resource_tracing_connection.cc b/google/cloud/aiplatform/v1/internal/persistent_resource_tracing_connection.cc index 336ecf4a963d9..a71c277894c30 100644 --- a/google/cloud/aiplatform/v1/internal/persistent_resource_tracing_connection.cc +++ b/google/cloud/aiplatform/v1/internal/persistent_resource_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PersistentResourceServiceTracingConnection:: PersistentResourceServiceTracingConnection( std::shared_ptr @@ -295,17 +293,13 @@ PersistentResourceServiceTracingConnection::WaitOperation( return internal::EndSpan(*span, child_->WaitOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePersistentResourceServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/aiplatform/v1/internal/persistent_resource_tracing_connection.h b/google/cloud/aiplatform/v1/internal/persistent_resource_tracing_connection.h index b22ae0c624ebe..981da883868f8 100644 --- a/google/cloud/aiplatform/v1/internal/persistent_resource_tracing_connection.h +++ b/google/cloud/aiplatform/v1/internal/persistent_resource_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PersistentResourceServiceTracingConnection : public aiplatform_v1::PersistentResourceServiceConnection { public: @@ -141,8 +139,6 @@ class PersistentResourceServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/aiplatform/v1/internal/persistent_resource_tracing_stub.cc b/google/cloud/aiplatform/v1/internal/persistent_resource_tracing_stub.cc index 120407fabb943..a74ed47dea122 100644 --- a/google/cloud/aiplatform/v1/internal/persistent_resource_tracing_stub.cc +++ b/google/cloud/aiplatform/v1/internal/persistent_resource_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PersistentResourceServiceTracingStub::PersistentResourceServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -338,20 +339,16 @@ future PersistentResourceServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePersistentResourceServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared( std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/persistent_resource_tracing_stub.h b/google/cloud/aiplatform/v1/internal/persistent_resource_tracing_stub.h index e9297235108fb..9a08bb10fe0ab 100644 --- a/google/cloud/aiplatform/v1/internal/persistent_resource_tracing_stub.h +++ b/google/cloud/aiplatform/v1/internal/persistent_resource_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PersistentResourceServiceTracingStub : public PersistentResourceServiceStub { public: @@ -162,8 +163,6 @@ class PersistentResourceServiceTracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -179,4 +178,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_PERSISTENT_RESOURCE_TRACING_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/pipeline_auth_decorator.cc b/google/cloud/aiplatform/v1/internal/pipeline_auth_decorator.cc index 685f70781763b..8fd8bde4bc925 100644 --- a/google/cloud/aiplatform/v1/internal/pipeline_auth_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/pipeline_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/aiplatform/v1/pipeline_service.proto #include "google/cloud/aiplatform/v1/internal/pipeline_auth_decorator.h" -#include +#include "google/cloud/aiplatform/v1/pipeline_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -348,3 +351,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/pipeline_auth_decorator.h b/google/cloud/aiplatform/v1/internal/pipeline_auth_decorator.h index 1e2fc3c621fb7..3c7d96d26a4e7 100644 --- a/google/cloud/aiplatform/v1/internal/pipeline_auth_decorator.h +++ b/google/cloud/aiplatform/v1/internal/pipeline_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/pipeline_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -191,4 +194,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_PIPELINE_AUTH_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/pipeline_connection_impl.h b/google/cloud/aiplatform/v1/internal/pipeline_connection_impl.h index 97aaa4ce5ab7a..60d7249fc0173 100644 --- a/google/cloud/aiplatform/v1/internal/pipeline_connection_impl.h +++ b/google/cloud/aiplatform/v1/internal/pipeline_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/internal/pipeline_logging_decorator.cc b/google/cloud/aiplatform/v1/internal/pipeline_logging_decorator.cc index 80c486868ad56..73708add7e2f9 100644 --- a/google/cloud/aiplatform/v1/internal/pipeline_logging_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/pipeline_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/aiplatform/v1/pipeline_service.proto #include "google/cloud/aiplatform/v1/internal/pipeline_logging_decorator.h" +#include "google/cloud/aiplatform/v1/pipeline_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -430,3 +433,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/pipeline_logging_decorator.h b/google/cloud/aiplatform/v1/internal/pipeline_logging_decorator.h index 09f98eef8af1a..a1d7de3c58cca 100644 --- a/google/cloud/aiplatform/v1/internal/pipeline_logging_decorator.h +++ b/google/cloud/aiplatform/v1/internal/pipeline_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/pipeline_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -191,4 +194,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_PIPELINE_LOGGING_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/pipeline_metadata_decorator.cc b/google/cloud/aiplatform/v1/internal/pipeline_metadata_decorator.cc index 72dcad2df4f2c..1764c4402ac0f 100644 --- a/google/cloud/aiplatform/v1/internal/pipeline_metadata_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/pipeline_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/aiplatform/v1/pipeline_service.proto #include "google/cloud/aiplatform/v1/internal/pipeline_metadata_decorator.h" +#include "google/cloud/aiplatform/v1/pipeline_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -333,3 +337,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/pipeline_metadata_decorator.h b/google/cloud/aiplatform/v1/internal/pipeline_metadata_decorator.h index 9c368c2ea2942..c1791bbf067ee 100644 --- a/google/cloud/aiplatform/v1/internal/pipeline_metadata_decorator.h +++ b/google/cloud/aiplatform/v1/internal/pipeline_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/pipeline_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -197,4 +200,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_PIPELINE_METADATA_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/pipeline_option_defaults.cc b/google/cloud/aiplatform/v1/internal/pipeline_option_defaults.cc index 098385f773015..8e5320477f6b1 100644 --- a/google/cloud/aiplatform/v1/internal/pipeline_option_defaults.cc +++ b/google/cloud/aiplatform/v1/internal/pipeline_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/aiplatform/v1/internal/pipeline_option_defaults.h" #include "google/cloud/aiplatform/v1/pipeline_connection.h" #include "google/cloud/aiplatform/v1/pipeline_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -44,7 +44,7 @@ Options PipelineServiceDefaultOptions(std::string const& location, if (!options.has()) { options.set( aiplatform_v1::PipelineServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/aiplatform/v1/internal/pipeline_stub.cc b/google/cloud/aiplatform/v1/internal/pipeline_stub.cc index 3fe72031e865e..9d2d0240012f6 100644 --- a/google/cloud/aiplatform/v1/internal/pipeline_stub.cc +++ b/google/cloud/aiplatform/v1/internal/pipeline_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/aiplatform/v1/pipeline_service.proto #include "google/cloud/aiplatform/v1/internal/pipeline_stub.h" +#include "google/cloud/aiplatform/v1/pipeline_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -425,3 +428,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/pipeline_stub.h b/google/cloud/aiplatform/v1/internal/pipeline_stub.h index 856177ab4f873..1c70137b083c4 100644 --- a/google/cloud/aiplatform/v1/internal/pipeline_stub.h +++ b/google/cloud/aiplatform/v1/internal/pipeline_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_PIPELINE_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_PIPELINE_STUB_H +#include "google/cloud/aiplatform/v1/pipeline_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -363,4 +366,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_PIPELINE_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/pipeline_stub_factory.cc b/google/cloud/aiplatform/v1/internal/pipeline_stub_factory.cc index d53fb3e99dff7..38e5316072279 100644 --- a/google/cloud/aiplatform/v1/internal/pipeline_stub_factory.cc +++ b/google/cloud/aiplatform/v1/internal/pipeline_stub_factory.cc @@ -22,19 +22,22 @@ #include "google/cloud/aiplatform/v1/internal/pipeline_metadata_decorator.h" #include "google/cloud/aiplatform/v1/internal/pipeline_stub.h" #include "google/cloud/aiplatform/v1/internal/pipeline_tracing_stub.h" +#include "google/cloud/aiplatform/v1/pipeline_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -78,3 +81,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/pipeline_stub_factory.h b/google/cloud/aiplatform/v1/internal/pipeline_stub_factory.h index 9a7deb0189dc2..2a8f8aae5b343 100644 --- a/google/cloud/aiplatform/v1/internal/pipeline_stub_factory.h +++ b/google/cloud/aiplatform/v1/internal/pipeline_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_PIPELINE_STUB_FACTORY_H diff --git a/google/cloud/aiplatform/v1/internal/pipeline_tracing_connection.cc b/google/cloud/aiplatform/v1/internal/pipeline_tracing_connection.cc index 2e9ecea13af50..0b815a1290928 100644 --- a/google/cloud/aiplatform/v1/internal/pipeline_tracing_connection.cc +++ b/google/cloud/aiplatform/v1/internal/pipeline_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PipelineServiceTracingConnection::PipelineServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -332,16 +330,12 @@ PipelineServiceTracingConnection::WaitOperation( return internal::EndSpan(*span, child_->WaitOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePipelineServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/aiplatform/v1/internal/pipeline_tracing_connection.h b/google/cloud/aiplatform/v1/internal/pipeline_tracing_connection.h index 396c815a836d8..0acba441e5804 100644 --- a/google/cloud/aiplatform/v1/internal/pipeline_tracing_connection.h +++ b/google/cloud/aiplatform/v1/internal/pipeline_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PipelineServiceTracingConnection : public aiplatform_v1::PipelineServiceConnection { public: @@ -166,8 +164,6 @@ class PipelineServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/aiplatform/v1/internal/pipeline_tracing_stub.cc b/google/cloud/aiplatform/v1/internal/pipeline_tracing_stub.cc index fed723308c89f..fa5eca133a997 100644 --- a/google/cloud/aiplatform/v1/internal/pipeline_tracing_stub.cc +++ b/google/cloud/aiplatform/v1/internal/pipeline_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PipelineServiceTracingStub::PipelineServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -392,18 +393,14 @@ future PipelineServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePipelineServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/pipeline_tracing_stub.h b/google/cloud/aiplatform/v1/internal/pipeline_tracing_stub.h index e20c8b9259cea..978c0b085e78e 100644 --- a/google/cloud/aiplatform/v1/internal/pipeline_tracing_stub.h +++ b/google/cloud/aiplatform/v1/internal/pipeline_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PipelineServiceTracingStub : public PipelineServiceStub { public: ~PipelineServiceTracingStub() override = default; @@ -187,8 +188,6 @@ class PipelineServiceTracingStub : public PipelineServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -203,4 +202,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_PIPELINE_TRACING_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/prediction_auth_decorator.cc b/google/cloud/aiplatform/v1/internal/prediction_auth_decorator.cc index 92defa2eb1e73..bafd2c683632d 100644 --- a/google/cloud/aiplatform/v1/internal/prediction_auth_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/prediction_auth_decorator.cc @@ -17,11 +17,14 @@ // source: google/cloud/aiplatform/v1/prediction_service.proto #include "google/cloud/aiplatform/v1/internal/prediction_auth_decorator.h" +#include "google/cloud/aiplatform/v1/prediction_service.grpc.pb.h" #include "google/cloud/internal/async_read_write_stream_auth.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -293,3 +296,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/prediction_auth_decorator.h b/google/cloud/aiplatform/v1/internal/prediction_auth_decorator.h index ebeff1e6652b4..a9d6eab4288b5 100644 --- a/google/cloud/aiplatform/v1/internal/prediction_auth_decorator.h +++ b/google/cloud/aiplatform/v1/internal/prediction_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -173,4 +176,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_PREDICTION_AUTH_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/prediction_logging_decorator.cc b/google/cloud/aiplatform/v1/internal/prediction_logging_decorator.cc index f4534f0b8d193..92b7b22e1e185 100644 --- a/google/cloud/aiplatform/v1/internal/prediction_logging_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/prediction_logging_decorator.cc @@ -17,16 +17,19 @@ // source: google/cloud/aiplatform/v1/prediction_service.proto #include "google/cloud/aiplatform/v1/internal/prediction_logging_decorator.h" +#include "google/cloud/aiplatform/v1/prediction_service.grpc.pb.h" #include "google/cloud/internal/async_read_write_stream_logging.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/internal/streaming_read_rpc_logging.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -412,3 +415,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/prediction_logging_decorator.h b/google/cloud/aiplatform/v1/internal/prediction_logging_decorator.h index b73d69ec67079..8e89c6b9f359f 100644 --- a/google/cloud/aiplatform/v1/internal/prediction_logging_decorator.h +++ b/google/cloud/aiplatform/v1/internal/prediction_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -174,4 +177,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_PREDICTION_LOGGING_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/prediction_metadata_decorator.cc b/google/cloud/aiplatform/v1/internal/prediction_metadata_decorator.cc index e61cdca2aa952..1f1d44505f52b 100644 --- a/google/cloud/aiplatform/v1/internal/prediction_metadata_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/prediction_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/aiplatform/v1/prediction_service.proto #include "google/cloud/aiplatform/v1/internal/prediction_metadata_decorator.h" +#include "google/cloud/aiplatform/v1/prediction_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -296,3 +300,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/prediction_metadata_decorator.h b/google/cloud/aiplatform/v1/internal/prediction_metadata_decorator.h index 22c1a6d187f3b..a354b3c6e8e24 100644 --- a/google/cloud/aiplatform/v1/internal/prediction_metadata_decorator.h +++ b/google/cloud/aiplatform/v1/internal/prediction_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -179,4 +182,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_PREDICTION_METADATA_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/prediction_option_defaults.cc b/google/cloud/aiplatform/v1/internal/prediction_option_defaults.cc index 694f103ead76c..3f9892f988667 100644 --- a/google/cloud/aiplatform/v1/internal/prediction_option_defaults.cc +++ b/google/cloud/aiplatform/v1/internal/prediction_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/aiplatform/v1/internal/prediction_option_defaults.h" #include "google/cloud/aiplatform/v1/prediction_connection.h" #include "google/cloud/aiplatform/v1/prediction_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -44,7 +44,7 @@ Options PredictionServiceDefaultOptions(std::string const& location, if (!options.has()) { options.set( aiplatform_v1::PredictionServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/aiplatform/v1/internal/prediction_stub.cc b/google/cloud/aiplatform/v1/internal/prediction_stub.cc index 9fe265094cbf1..47d63c0ffbb90 100644 --- a/google/cloud/aiplatform/v1/internal/prediction_stub.cc +++ b/google/cloud/aiplatform/v1/internal/prediction_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/aiplatform/v1/prediction_service.proto #include "google/cloud/aiplatform/v1/internal/prediction_stub.h" +#include "google/cloud/aiplatform/v1/prediction_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/internal/async_read_write_stream_impl.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -332,3 +335,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/prediction_stub.h b/google/cloud/aiplatform/v1/internal/prediction_stub.h index 9fcd28cb8ddd2..8b8a2e1b5cbc5 100644 --- a/google/cloud/aiplatform/v1/internal/prediction_stub.h +++ b/google/cloud/aiplatform/v1/internal/prediction_stub.h @@ -19,19 +19,22 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_PREDICTION_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_PREDICTION_STUB_H +#include "google/cloud/aiplatform/v1/prediction_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/async_streaming_read_write_rpc.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/streaming_read_rpc.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -324,4 +327,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_PREDICTION_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/prediction_stub_factory.cc b/google/cloud/aiplatform/v1/internal/prediction_stub_factory.cc index 28d1d4221ad0a..61a5ef82e0879 100644 --- a/google/cloud/aiplatform/v1/internal/prediction_stub_factory.cc +++ b/google/cloud/aiplatform/v1/internal/prediction_stub_factory.cc @@ -22,19 +22,22 @@ #include "google/cloud/aiplatform/v1/internal/prediction_metadata_decorator.h" #include "google/cloud/aiplatform/v1/internal/prediction_stub.h" #include "google/cloud/aiplatform/v1/internal/prediction_tracing_stub.h" +#include "google/cloud/aiplatform/v1/prediction_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -79,3 +82,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/prediction_stub_factory.h b/google/cloud/aiplatform/v1/internal/prediction_stub_factory.h index f6d6f8d8a75c2..51dcd91aec4d9 100644 --- a/google/cloud/aiplatform/v1/internal/prediction_stub_factory.h +++ b/google/cloud/aiplatform/v1/internal/prediction_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_PREDICTION_STUB_FACTORY_H diff --git a/google/cloud/aiplatform/v1/internal/prediction_tracing_connection.cc b/google/cloud/aiplatform/v1/internal/prediction_tracing_connection.cc index 94ad46219a977..142d364cdf5f9 100644 --- a/google/cloud/aiplatform/v1/internal/prediction_tracing_connection.cc +++ b/google/cloud/aiplatform/v1/internal/prediction_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PredictionServiceTracingConnection::PredictionServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -247,17 +245,13 @@ PredictionServiceTracingConnection::WaitOperation( return internal::EndSpan(*span, child_->WaitOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePredictionServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/aiplatform/v1/internal/prediction_tracing_connection.h b/google/cloud/aiplatform/v1/internal/prediction_tracing_connection.h index 034c291082190..6d57f76c878f1 100644 --- a/google/cloud/aiplatform/v1/internal/prediction_tracing_connection.h +++ b/google/cloud/aiplatform/v1/internal/prediction_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PredictionServiceTracingConnection : public aiplatform_v1::PredictionServiceConnection { public: @@ -133,8 +131,6 @@ class PredictionServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/aiplatform/v1/internal/prediction_tracing_stub.cc b/google/cloud/aiplatform/v1/internal/prediction_tracing_stub.cc index 6329fabf2efcb..3bf0c1f9691dc 100644 --- a/google/cloud/aiplatform/v1/internal/prediction_tracing_stub.cc +++ b/google/cloud/aiplatform/v1/internal/prediction_tracing_stub.cc @@ -23,13 +23,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PredictionServiceTracingStub::PredictionServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -349,18 +350,14 @@ PredictionServiceTracingStub::WaitOperation( child_->WaitOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePredictionServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/prediction_tracing_stub.h b/google/cloud/aiplatform/v1/internal/prediction_tracing_stub.h index 9efedd095ea76..63cde29c054cf 100644 --- a/google/cloud/aiplatform/v1/internal/prediction_tracing_stub.h +++ b/google/cloud/aiplatform/v1/internal/prediction_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PredictionServiceTracingStub : public PredictionServiceStub { public: ~PredictionServiceTracingStub() override = default; @@ -170,8 +171,6 @@ class PredictionServiceTracingStub : public PredictionServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -186,4 +185,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_PREDICTION_TRACING_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/schedule_auth_decorator.cc b/google/cloud/aiplatform/v1/internal/schedule_auth_decorator.cc index 22ebeb51fce0e..16548ef93aacf 100644 --- a/google/cloud/aiplatform/v1/internal/schedule_auth_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/schedule_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/aiplatform/v1/schedule_service.proto #include "google/cloud/aiplatform/v1/internal/schedule_auth_decorator.h" -#include +#include "google/cloud/aiplatform/v1/schedule_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -234,3 +237,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/schedule_auth_decorator.h b/google/cloud/aiplatform/v1/internal/schedule_auth_decorator.h index 491fc533077b0..bf6df2574bc70 100644 --- a/google/cloud/aiplatform/v1/internal/schedule_auth_decorator.h +++ b/google/cloud/aiplatform/v1/internal/schedule_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/schedule_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -143,4 +146,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_SCHEDULE_AUTH_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/schedule_connection_impl.h b/google/cloud/aiplatform/v1/internal/schedule_connection_impl.h index dae0584614b4a..e0e742b516dd4 100644 --- a/google/cloud/aiplatform/v1/internal/schedule_connection_impl.h +++ b/google/cloud/aiplatform/v1/internal/schedule_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/internal/schedule_logging_decorator.cc b/google/cloud/aiplatform/v1/internal/schedule_logging_decorator.cc index 65d4b515936b9..e48d263f933ac 100644 --- a/google/cloud/aiplatform/v1/internal/schedule_logging_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/schedule_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/aiplatform/v1/schedule_service.proto #include "google/cloud/aiplatform/v1/internal/schedule_logging_decorator.h" +#include "google/cloud/aiplatform/v1/schedule_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -293,3 +296,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/schedule_logging_decorator.h b/google/cloud/aiplatform/v1/internal/schedule_logging_decorator.h index c1a20787aed2b..df24d876f7cc3 100644 --- a/google/cloud/aiplatform/v1/internal/schedule_logging_decorator.h +++ b/google/cloud/aiplatform/v1/internal/schedule_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/schedule_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -143,4 +146,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_SCHEDULE_LOGGING_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/schedule_metadata_decorator.cc b/google/cloud/aiplatform/v1/internal/schedule_metadata_decorator.cc index f4d9db5703795..b1d2597e16a57 100644 --- a/google/cloud/aiplatform/v1/internal/schedule_metadata_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/schedule_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/aiplatform/v1/schedule_service.proto #include "google/cloud/aiplatform/v1/internal/schedule_metadata_decorator.h" +#include "google/cloud/aiplatform/v1/schedule_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -244,3 +248,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/schedule_metadata_decorator.h b/google/cloud/aiplatform/v1/internal/schedule_metadata_decorator.h index 1cb9f44a5e97f..1271992402888 100644 --- a/google/cloud/aiplatform/v1/internal/schedule_metadata_decorator.h +++ b/google/cloud/aiplatform/v1/internal/schedule_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/schedule_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -149,4 +152,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_SCHEDULE_METADATA_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/schedule_option_defaults.cc b/google/cloud/aiplatform/v1/internal/schedule_option_defaults.cc index 573dab18c1a34..7a8be356ab4b6 100644 --- a/google/cloud/aiplatform/v1/internal/schedule_option_defaults.cc +++ b/google/cloud/aiplatform/v1/internal/schedule_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/aiplatform/v1/internal/schedule_option_defaults.h" #include "google/cloud/aiplatform/v1/schedule_connection.h" #include "google/cloud/aiplatform/v1/schedule_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -44,7 +44,7 @@ Options ScheduleServiceDefaultOptions(std::string const& location, if (!options.has()) { options.set( aiplatform_v1::ScheduleServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/aiplatform/v1/internal/schedule_stub.cc b/google/cloud/aiplatform/v1/internal/schedule_stub.cc index f3711d706c48a..b5e7dc6ab261b 100644 --- a/google/cloud/aiplatform/v1/internal/schedule_stub.cc +++ b/google/cloud/aiplatform/v1/internal/schedule_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/aiplatform/v1/schedule_service.proto #include "google/cloud/aiplatform/v1/internal/schedule_stub.h" +#include "google/cloud/aiplatform/v1/schedule_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -292,3 +295,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/schedule_stub.h b/google/cloud/aiplatform/v1/internal/schedule_stub.h index 5e3cc59354173..b2aa0e69b123a 100644 --- a/google/cloud/aiplatform/v1/internal/schedule_stub.h +++ b/google/cloud/aiplatform/v1/internal/schedule_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_SCHEDULE_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_SCHEDULE_STUB_H +#include "google/cloud/aiplatform/v1/schedule_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -255,4 +258,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_SCHEDULE_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/schedule_stub_factory.cc b/google/cloud/aiplatform/v1/internal/schedule_stub_factory.cc index 8a6c4c899830f..e52af931210ca 100644 --- a/google/cloud/aiplatform/v1/internal/schedule_stub_factory.cc +++ b/google/cloud/aiplatform/v1/internal/schedule_stub_factory.cc @@ -22,19 +22,22 @@ #include "google/cloud/aiplatform/v1/internal/schedule_metadata_decorator.h" #include "google/cloud/aiplatform/v1/internal/schedule_stub.h" #include "google/cloud/aiplatform/v1/internal/schedule_tracing_stub.h" +#include "google/cloud/aiplatform/v1/schedule_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -78,3 +81,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/schedule_stub_factory.h b/google/cloud/aiplatform/v1/internal/schedule_stub_factory.h index b06af5be57118..d03d2ffbc746b 100644 --- a/google/cloud/aiplatform/v1/internal/schedule_stub_factory.h +++ b/google/cloud/aiplatform/v1/internal/schedule_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_SCHEDULE_STUB_FACTORY_H diff --git a/google/cloud/aiplatform/v1/internal/schedule_tracing_connection.cc b/google/cloud/aiplatform/v1/internal/schedule_tracing_connection.cc index f025448a5b62a..4039ce9aef634 100644 --- a/google/cloud/aiplatform/v1/internal/schedule_tracing_connection.cc +++ b/google/cloud/aiplatform/v1/internal/schedule_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ScheduleServiceTracingConnection::ScheduleServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -208,16 +206,12 @@ ScheduleServiceTracingConnection::WaitOperation( return internal::EndSpan(*span, child_->WaitOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeScheduleServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/aiplatform/v1/internal/schedule_tracing_connection.h b/google/cloud/aiplatform/v1/internal/schedule_tracing_connection.h index 25a6f339c2e48..1752686a1936e 100644 --- a/google/cloud/aiplatform/v1/internal/schedule_tracing_connection.h +++ b/google/cloud/aiplatform/v1/internal/schedule_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ScheduleServiceTracingConnection : public aiplatform_v1::ScheduleServiceConnection { public: @@ -109,8 +107,6 @@ class ScheduleServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/aiplatform/v1/internal/schedule_tracing_stub.cc b/google/cloud/aiplatform/v1/internal/schedule_tracing_stub.cc index 9caf9919b78f0..8a48fe65264f8 100644 --- a/google/cloud/aiplatform/v1/internal/schedule_tracing_stub.cc +++ b/google/cloud/aiplatform/v1/internal/schedule_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ScheduleServiceTracingStub::ScheduleServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -273,18 +274,14 @@ future ScheduleServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeScheduleServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/schedule_tracing_stub.h b/google/cloud/aiplatform/v1/internal/schedule_tracing_stub.h index f3e80a81d77b1..8d4dcfca2b104 100644 --- a/google/cloud/aiplatform/v1/internal/schedule_tracing_stub.h +++ b/google/cloud/aiplatform/v1/internal/schedule_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ScheduleServiceTracingStub : public ScheduleServiceStub { public: ~ScheduleServiceTracingStub() override = default; @@ -139,8 +140,6 @@ class ScheduleServiceTracingStub : public ScheduleServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -155,4 +154,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_SCHEDULE_TRACING_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/specialist_pool_auth_decorator.cc b/google/cloud/aiplatform/v1/internal/specialist_pool_auth_decorator.cc index c60d355f50100..8facf664d479f 100644 --- a/google/cloud/aiplatform/v1/internal/specialist_pool_auth_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/specialist_pool_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/aiplatform/v1/specialist_pool_service.proto #include "google/cloud/aiplatform/v1/internal/specialist_pool_auth_decorator.h" -#include +#include "google/cloud/aiplatform/v1/specialist_pool_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -262,3 +265,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/specialist_pool_auth_decorator.h b/google/cloud/aiplatform/v1/internal/specialist_pool_auth_decorator.h index 4a406c5f7d082..cf66df9dc31a8 100644 --- a/google/cloud/aiplatform/v1/internal/specialist_pool_auth_decorator.h +++ b/google/cloud/aiplatform/v1/internal/specialist_pool_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/specialist_pool_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -148,4 +151,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_SPECIALIST_POOL_AUTH_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/specialist_pool_connection_impl.h b/google/cloud/aiplatform/v1/internal/specialist_pool_connection_impl.h index 8e3a3f117818b..2f5474705a13e 100644 --- a/google/cloud/aiplatform/v1/internal/specialist_pool_connection_impl.h +++ b/google/cloud/aiplatform/v1/internal/specialist_pool_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/internal/specialist_pool_logging_decorator.cc b/google/cloud/aiplatform/v1/internal/specialist_pool_logging_decorator.cc index 982e6a3bab8e2..a247f128f10ef 100644 --- a/google/cloud/aiplatform/v1/internal/specialist_pool_logging_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/specialist_pool_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/aiplatform/v1/specialist_pool_service.proto #include "google/cloud/aiplatform/v1/internal/specialist_pool_logging_decorator.h" +#include "google/cloud/aiplatform/v1/specialist_pool_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -312,3 +315,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/specialist_pool_logging_decorator.h b/google/cloud/aiplatform/v1/internal/specialist_pool_logging_decorator.h index 2be66816765af..84897dc4c8d7d 100644 --- a/google/cloud/aiplatform/v1/internal/specialist_pool_logging_decorator.h +++ b/google/cloud/aiplatform/v1/internal/specialist_pool_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/specialist_pool_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -148,4 +151,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_SPECIALIST_POOL_LOGGING_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/specialist_pool_metadata_decorator.cc b/google/cloud/aiplatform/v1/internal/specialist_pool_metadata_decorator.cc index 7574d8989b9d2..f78c7c06bf44b 100644 --- a/google/cloud/aiplatform/v1/internal/specialist_pool_metadata_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/specialist_pool_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/aiplatform/v1/specialist_pool_service.proto #include "google/cloud/aiplatform/v1/internal/specialist_pool_metadata_decorator.h" +#include "google/cloud/aiplatform/v1/specialist_pool_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -257,3 +261,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/specialist_pool_metadata_decorator.h b/google/cloud/aiplatform/v1/internal/specialist_pool_metadata_decorator.h index 64a29fe777d6d..663e41cc5b477 100644 --- a/google/cloud/aiplatform/v1/internal/specialist_pool_metadata_decorator.h +++ b/google/cloud/aiplatform/v1/internal/specialist_pool_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/specialist_pool_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -154,4 +157,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_SPECIALIST_POOL_METADATA_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/specialist_pool_option_defaults.cc b/google/cloud/aiplatform/v1/internal/specialist_pool_option_defaults.cc index fd6b65dd1561e..0823c596c57fb 100644 --- a/google/cloud/aiplatform/v1/internal/specialist_pool_option_defaults.cc +++ b/google/cloud/aiplatform/v1/internal/specialist_pool_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/aiplatform/v1/internal/specialist_pool_option_defaults.h" #include "google/cloud/aiplatform/v1/specialist_pool_connection.h" #include "google/cloud/aiplatform/v1/specialist_pool_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -44,7 +44,7 @@ Options SpecialistPoolServiceDefaultOptions(std::string const& location, if (!options.has()) { options.set( aiplatform_v1::SpecialistPoolServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/aiplatform/v1/internal/specialist_pool_stub.cc b/google/cloud/aiplatform/v1/internal/specialist_pool_stub.cc index 841c9c013ef67..52daaebe9396e 100644 --- a/google/cloud/aiplatform/v1/internal/specialist_pool_stub.cc +++ b/google/cloud/aiplatform/v1/internal/specialist_pool_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/aiplatform/v1/specialist_pool_service.proto #include "google/cloud/aiplatform/v1/internal/specialist_pool_stub.h" +#include "google/cloud/aiplatform/v1/specialist_pool_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -310,3 +313,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/specialist_pool_stub.h b/google/cloud/aiplatform/v1/internal/specialist_pool_stub.h index 43a77d0569957..baaa887186bce 100644 --- a/google/cloud/aiplatform/v1/internal/specialist_pool_stub.h +++ b/google/cloud/aiplatform/v1/internal/specialist_pool_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_SPECIALIST_POOL_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_SPECIALIST_POOL_STUB_H +#include "google/cloud/aiplatform/v1/specialist_pool_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -277,4 +280,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_SPECIALIST_POOL_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/specialist_pool_stub_factory.cc b/google/cloud/aiplatform/v1/internal/specialist_pool_stub_factory.cc index 24c792ff1a719..b32d0deba75d6 100644 --- a/google/cloud/aiplatform/v1/internal/specialist_pool_stub_factory.cc +++ b/google/cloud/aiplatform/v1/internal/specialist_pool_stub_factory.cc @@ -22,19 +22,22 @@ #include "google/cloud/aiplatform/v1/internal/specialist_pool_metadata_decorator.h" #include "google/cloud/aiplatform/v1/internal/specialist_pool_stub.h" #include "google/cloud/aiplatform/v1/internal/specialist_pool_tracing_stub.h" +#include "google/cloud/aiplatform/v1/specialist_pool_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -79,3 +82,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/specialist_pool_stub_factory.h b/google/cloud/aiplatform/v1/internal/specialist_pool_stub_factory.h index 1cd266476c1e9..e4baa124fb116 100644 --- a/google/cloud/aiplatform/v1/internal/specialist_pool_stub_factory.h +++ b/google/cloud/aiplatform/v1/internal/specialist_pool_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_SPECIALIST_POOL_STUB_FACTORY_H diff --git a/google/cloud/aiplatform/v1/internal/specialist_pool_tracing_connection.cc b/google/cloud/aiplatform/v1/internal/specialist_pool_tracing_connection.cc index 3b05bdbcb8d82..08240a6673ab9 100644 --- a/google/cloud/aiplatform/v1/internal/specialist_pool_tracing_connection.cc +++ b/google/cloud/aiplatform/v1/internal/specialist_pool_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SpecialistPoolServiceTracingConnection::SpecialistPoolServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -239,17 +237,13 @@ SpecialistPoolServiceTracingConnection::WaitOperation( return internal::EndSpan(*span, child_->WaitOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSpecialistPoolServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/aiplatform/v1/internal/specialist_pool_tracing_connection.h b/google/cloud/aiplatform/v1/internal/specialist_pool_tracing_connection.h index 14835ac33192e..00aa26d9ced4d 100644 --- a/google/cloud/aiplatform/v1/internal/specialist_pool_tracing_connection.h +++ b/google/cloud/aiplatform/v1/internal/specialist_pool_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SpecialistPoolServiceTracingConnection : public aiplatform_v1::SpecialistPoolServiceConnection { public: @@ -124,8 +122,6 @@ class SpecialistPoolServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/aiplatform/v1/internal/specialist_pool_tracing_stub.cc b/google/cloud/aiplatform/v1/internal/specialist_pool_tracing_stub.cc index a83e32d22d736..9360337392172 100644 --- a/google/cloud/aiplatform/v1/internal/specialist_pool_tracing_stub.cc +++ b/google/cloud/aiplatform/v1/internal/specialist_pool_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SpecialistPoolServiceTracingStub::SpecialistPoolServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -290,18 +291,14 @@ future SpecialistPoolServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSpecialistPoolServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/specialist_pool_tracing_stub.h b/google/cloud/aiplatform/v1/internal/specialist_pool_tracing_stub.h index 8e12b6b0d78d0..326305ff03b72 100644 --- a/google/cloud/aiplatform/v1/internal/specialist_pool_tracing_stub.h +++ b/google/cloud/aiplatform/v1/internal/specialist_pool_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SpecialistPoolServiceTracingStub : public SpecialistPoolServiceStub { public: ~SpecialistPoolServiceTracingStub() override = default; @@ -144,8 +145,6 @@ class SpecialistPoolServiceTracingStub : public SpecialistPoolServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -160,4 +159,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_SPECIALIST_POOL_TRACING_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/tensorboard_auth_decorator.cc b/google/cloud/aiplatform/v1/internal/tensorboard_auth_decorator.cc index 670ccaa7104cb..d675d691ba032 100644 --- a/google/cloud/aiplatform/v1/internal/tensorboard_auth_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/tensorboard_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/aiplatform/v1/tensorboard_service.proto #include "google/cloud/aiplatform/v1/internal/tensorboard_auth_decorator.h" -#include +#include "google/cloud/aiplatform/v1/tensorboard_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -569,3 +572,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/tensorboard_auth_decorator.h b/google/cloud/aiplatform/v1/internal/tensorboard_auth_decorator.h index d368603c0115e..44c4bbd8efeb0 100644 --- a/google/cloud/aiplatform/v1/internal/tensorboard_auth_decorator.h +++ b/google/cloud/aiplatform/v1/internal/tensorboard_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/tensorboard_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -319,4 +322,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_TENSORBOARD_AUTH_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/tensorboard_connection_impl.h b/google/cloud/aiplatform/v1/internal/tensorboard_connection_impl.h index aa7acdf469c75..de8631c8f5f7c 100644 --- a/google/cloud/aiplatform/v1/internal/tensorboard_connection_impl.h +++ b/google/cloud/aiplatform/v1/internal/tensorboard_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/internal/tensorboard_logging_decorator.cc b/google/cloud/aiplatform/v1/internal/tensorboard_logging_decorator.cc index ddc000d245b4a..6f5a349e46659 100644 --- a/google/cloud/aiplatform/v1/internal/tensorboard_logging_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/tensorboard_logging_decorator.cc @@ -17,15 +17,18 @@ // source: google/cloud/aiplatform/v1/tensorboard_service.proto #include "google/cloud/aiplatform/v1/internal/tensorboard_logging_decorator.h" +#include "google/cloud/aiplatform/v1/tensorboard_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/internal/streaming_read_rpc_logging.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -741,3 +744,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/tensorboard_logging_decorator.h b/google/cloud/aiplatform/v1/internal/tensorboard_logging_decorator.h index 4be5647485a56..1bb0412caf516 100644 --- a/google/cloud/aiplatform/v1/internal/tensorboard_logging_decorator.h +++ b/google/cloud/aiplatform/v1/internal/tensorboard_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/tensorboard_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -320,4 +323,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_TENSORBOARD_LOGGING_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/tensorboard_metadata_decorator.cc b/google/cloud/aiplatform/v1/internal/tensorboard_metadata_decorator.cc index 7b9322c7e8b2c..e6cee3033678d 100644 --- a/google/cloud/aiplatform/v1/internal/tensorboard_metadata_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/tensorboard_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/aiplatform/v1/tensorboard_service.proto #include "google/cloud/aiplatform/v1/internal/tensorboard_metadata_decorator.h" +#include "google/cloud/aiplatform/v1/tensorboard_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -556,3 +560,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/tensorboard_metadata_decorator.h b/google/cloud/aiplatform/v1/internal/tensorboard_metadata_decorator.h index 8c435cb1f9c95..72f51b9112688 100644 --- a/google/cloud/aiplatform/v1/internal/tensorboard_metadata_decorator.h +++ b/google/cloud/aiplatform/v1/internal/tensorboard_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/tensorboard_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -325,4 +328,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_TENSORBOARD_METADATA_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/tensorboard_option_defaults.cc b/google/cloud/aiplatform/v1/internal/tensorboard_option_defaults.cc index 1a63d22e87128..9b12105902c0e 100644 --- a/google/cloud/aiplatform/v1/internal/tensorboard_option_defaults.cc +++ b/google/cloud/aiplatform/v1/internal/tensorboard_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/aiplatform/v1/internal/tensorboard_option_defaults.h" #include "google/cloud/aiplatform/v1/tensorboard_connection.h" #include "google/cloud/aiplatform/v1/tensorboard_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -44,7 +44,7 @@ Options TensorboardServiceDefaultOptions(std::string const& location, if (!options.has()) { options.set( aiplatform_v1::TensorboardServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/aiplatform/v1/internal/tensorboard_stub.cc b/google/cloud/aiplatform/v1/internal/tensorboard_stub.cc index 7d225b0cce8d8..48932548cc1ad 100644 --- a/google/cloud/aiplatform/v1/internal/tensorboard_stub.cc +++ b/google/cloud/aiplatform/v1/internal/tensorboard_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/aiplatform/v1/tensorboard_service.proto #include "google/cloud/aiplatform/v1/internal/tensorboard_stub.h" +#include "google/cloud/aiplatform/v1/tensorboard_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -709,3 +712,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/tensorboard_stub.h b/google/cloud/aiplatform/v1/internal/tensorboard_stub.h index d89eb5e236944..067dc71d81a5d 100644 --- a/google/cloud/aiplatform/v1/internal/tensorboard_stub.h +++ b/google/cloud/aiplatform/v1/internal/tensorboard_stub.h @@ -19,19 +19,22 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_TENSORBOARD_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_TENSORBOARD_STUB_H +#include "google/cloud/aiplatform/v1/tensorboard_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/internal/streaming_read_rpc.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -627,4 +630,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_TENSORBOARD_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/tensorboard_stub_factory.cc b/google/cloud/aiplatform/v1/internal/tensorboard_stub_factory.cc index af4e993d9299c..f97395293009b 100644 --- a/google/cloud/aiplatform/v1/internal/tensorboard_stub_factory.cc +++ b/google/cloud/aiplatform/v1/internal/tensorboard_stub_factory.cc @@ -22,19 +22,22 @@ #include "google/cloud/aiplatform/v1/internal/tensorboard_metadata_decorator.h" #include "google/cloud/aiplatform/v1/internal/tensorboard_stub.h" #include "google/cloud/aiplatform/v1/internal/tensorboard_tracing_stub.h" +#include "google/cloud/aiplatform/v1/tensorboard_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -78,3 +81,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/tensorboard_stub_factory.h b/google/cloud/aiplatform/v1/internal/tensorboard_stub_factory.h index a9f75ea8c848f..efbe62bdb010c 100644 --- a/google/cloud/aiplatform/v1/internal/tensorboard_stub_factory.h +++ b/google/cloud/aiplatform/v1/internal/tensorboard_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_TENSORBOARD_STUB_FACTORY_H diff --git a/google/cloud/aiplatform/v1/internal/tensorboard_tracing_connection.cc b/google/cloud/aiplatform/v1/internal/tensorboard_tracing_connection.cc index d6bc9ec2ec262..d99a66bf99d2e 100644 --- a/google/cloud/aiplatform/v1/internal/tensorboard_tracing_connection.cc +++ b/google/cloud/aiplatform/v1/internal/tensorboard_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TensorboardServiceTracingConnection::TensorboardServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -582,17 +580,13 @@ TensorboardServiceTracingConnection::WaitOperation( return internal::EndSpan(*span, child_->WaitOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTensorboardServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/aiplatform/v1/internal/tensorboard_tracing_connection.h b/google/cloud/aiplatform/v1/internal/tensorboard_tracing_connection.h index 824973f4ea846..50f2b29f7b51a 100644 --- a/google/cloud/aiplatform/v1/internal/tensorboard_tracing_connection.h +++ b/google/cloud/aiplatform/v1/internal/tensorboard_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TensorboardServiceTracingConnection : public aiplatform_v1::TensorboardServiceConnection { public: @@ -271,8 +269,6 @@ class TensorboardServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/aiplatform/v1/internal/tensorboard_tracing_stub.cc b/google/cloud/aiplatform/v1/internal/tensorboard_tracing_stub.cc index 55276a5e7514a..839fe49e27af6 100644 --- a/google/cloud/aiplatform/v1/internal/tensorboard_tracing_stub.cc +++ b/google/cloud/aiplatform/v1/internal/tensorboard_tracing_stub.cc @@ -22,13 +22,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TensorboardServiceTracingStub::TensorboardServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -689,18 +690,14 @@ future TensorboardServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTensorboardServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/tensorboard_tracing_stub.h b/google/cloud/aiplatform/v1/internal/tensorboard_tracing_stub.h index 5c9b863789d6a..8c3115a91aeda 100644 --- a/google/cloud/aiplatform/v1/internal/tensorboard_tracing_stub.h +++ b/google/cloud/aiplatform/v1/internal/tensorboard_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TensorboardServiceTracingStub : public TensorboardServiceStub { public: ~TensorboardServiceTracingStub() override = default; @@ -315,8 +316,6 @@ class TensorboardServiceTracingStub : public TensorboardServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -331,4 +330,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_TENSORBOARD_TRACING_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/vizier_auth_decorator.cc b/google/cloud/aiplatform/v1/internal/vizier_auth_decorator.cc index 6805d476d2485..382b43d9dca26 100644 --- a/google/cloud/aiplatform/v1/internal/vizier_auth_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/vizier_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/aiplatform/v1/vizier_service.proto #include "google/cloud/aiplatform/v1/internal/vizier_auth_decorator.h" -#include +#include "google/cloud/aiplatform/v1/vizier_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -321,3 +324,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/vizier_auth_decorator.h b/google/cloud/aiplatform/v1/internal/vizier_auth_decorator.h index afef20b19185a..bb37738d87888 100644 --- a/google/cloud/aiplatform/v1/internal/vizier_auth_decorator.h +++ b/google/cloud/aiplatform/v1/internal/vizier_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/vizier_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -186,4 +189,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_VIZIER_AUTH_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/vizier_connection_impl.h b/google/cloud/aiplatform/v1/internal/vizier_connection_impl.h index 223676940fa04..4dc4689fd0a41 100644 --- a/google/cloud/aiplatform/v1/internal/vizier_connection_impl.h +++ b/google/cloud/aiplatform/v1/internal/vizier_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/internal/vizier_logging_decorator.cc b/google/cloud/aiplatform/v1/internal/vizier_logging_decorator.cc index 1e1bf57902070..3efe4648720bc 100644 --- a/google/cloud/aiplatform/v1/internal/vizier_logging_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/vizier_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/aiplatform/v1/vizier_service.proto #include "google/cloud/aiplatform/v1/internal/vizier_logging_decorator.h" +#include "google/cloud/aiplatform/v1/vizier_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -406,3 +409,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/vizier_logging_decorator.h b/google/cloud/aiplatform/v1/internal/vizier_logging_decorator.h index 2de7fbe6b4b78..d09d816d317d7 100644 --- a/google/cloud/aiplatform/v1/internal/vizier_logging_decorator.h +++ b/google/cloud/aiplatform/v1/internal/vizier_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/vizier_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -186,4 +189,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_VIZIER_LOGGING_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/vizier_metadata_decorator.cc b/google/cloud/aiplatform/v1/internal/vizier_metadata_decorator.cc index ff7f1960111a0..178eb154c7cd6 100644 --- a/google/cloud/aiplatform/v1/internal/vizier_metadata_decorator.cc +++ b/google/cloud/aiplatform/v1/internal/vizier_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/aiplatform/v1/vizier_service.proto #include "google/cloud/aiplatform/v1/internal/vizier_metadata_decorator.h" +#include "google/cloud/aiplatform/v1/vizier_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -327,3 +331,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/vizier_metadata_decorator.h b/google/cloud/aiplatform/v1/internal/vizier_metadata_decorator.h index 186deaf547ecd..81596df9fddcd 100644 --- a/google/cloud/aiplatform/v1/internal/vizier_metadata_decorator.h +++ b/google/cloud/aiplatform/v1/internal/vizier_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/aiplatform/v1/internal/vizier_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -191,4 +194,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_VIZIER_METADATA_DECORATOR_H diff --git a/google/cloud/aiplatform/v1/internal/vizier_option_defaults.cc b/google/cloud/aiplatform/v1/internal/vizier_option_defaults.cc index 24231f2b6e9d5..3a75179df6166 100644 --- a/google/cloud/aiplatform/v1/internal/vizier_option_defaults.cc +++ b/google/cloud/aiplatform/v1/internal/vizier_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/aiplatform/v1/internal/vizier_option_defaults.h" #include "google/cloud/aiplatform/v1/vizier_connection.h" #include "google/cloud/aiplatform/v1/vizier_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -44,7 +44,7 @@ Options VizierServiceDefaultOptions(std::string const& location, if (!options.has()) { options.set( aiplatform_v1::VizierServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/aiplatform/v1/internal/vizier_stub.cc b/google/cloud/aiplatform/v1/internal/vizier_stub.cc index ca92970cbf97d..4810f307e1a3d 100644 --- a/google/cloud/aiplatform/v1/internal/vizier_stub.cc +++ b/google/cloud/aiplatform/v1/internal/vizier_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/aiplatform/v1/vizier_service.proto #include "google/cloud/aiplatform/v1/internal/vizier_stub.h" +#include "google/cloud/aiplatform/v1/vizier_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -409,3 +412,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/vizier_stub.h b/google/cloud/aiplatform/v1/internal/vizier_stub.h index 8bdad179953a9..c09e81a334d1b 100644 --- a/google/cloud/aiplatform/v1/internal/vizier_stub.h +++ b/google/cloud/aiplatform/v1/internal/vizier_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_VIZIER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_VIZIER_STUB_H +#include "google/cloud/aiplatform/v1/vizier_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -343,4 +346,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_VIZIER_STUB_H diff --git a/google/cloud/aiplatform/v1/internal/vizier_stub_factory.cc b/google/cloud/aiplatform/v1/internal/vizier_stub_factory.cc index a62f4e0206bd3..802bd03e70c09 100644 --- a/google/cloud/aiplatform/v1/internal/vizier_stub_factory.cc +++ b/google/cloud/aiplatform/v1/internal/vizier_stub_factory.cc @@ -22,19 +22,22 @@ #include "google/cloud/aiplatform/v1/internal/vizier_metadata_decorator.h" #include "google/cloud/aiplatform/v1/internal/vizier_stub.h" #include "google/cloud/aiplatform/v1/internal/vizier_tracing_stub.h" +#include "google/cloud/aiplatform/v1/vizier_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -78,3 +81,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/vizier_stub_factory.h b/google/cloud/aiplatform/v1/internal/vizier_stub_factory.h index 659d4fe9ad78d..5c1bf617a3fb9 100644 --- a/google/cloud/aiplatform/v1/internal/vizier_stub_factory.h +++ b/google/cloud/aiplatform/v1/internal/vizier_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_VIZIER_STUB_FACTORY_H diff --git a/google/cloud/aiplatform/v1/internal/vizier_tracing_connection.cc b/google/cloud/aiplatform/v1/internal/vizier_tracing_connection.cc index c409ce92dee41..3d82dba4471a6 100644 --- a/google/cloud/aiplatform/v1/internal/vizier_tracing_connection.cc +++ b/google/cloud/aiplatform/v1/internal/vizier_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - VizierServiceTracingConnection::VizierServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -305,16 +303,12 @@ VizierServiceTracingConnection::WaitOperation( return internal::EndSpan(*span, child_->WaitOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeVizierServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/aiplatform/v1/internal/vizier_tracing_connection.h b/google/cloud/aiplatform/v1/internal/vizier_tracing_connection.h index 38b4a4a1d638a..8d4ebdffff0f1 100644 --- a/google/cloud/aiplatform/v1/internal/vizier_tracing_connection.h +++ b/google/cloud/aiplatform/v1/internal/vizier_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class VizierServiceTracingConnection : public aiplatform_v1::VizierServiceConnection { public: @@ -148,8 +146,6 @@ class VizierServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/aiplatform/v1/internal/vizier_tracing_stub.cc b/google/cloud/aiplatform/v1/internal/vizier_tracing_stub.cc index 76c9aa7f8c077..cb8769024bd78 100644 --- a/google/cloud/aiplatform/v1/internal/vizier_tracing_stub.cc +++ b/google/cloud/aiplatform/v1/internal/vizier_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - VizierServiceTracingStub::VizierServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -385,18 +386,14 @@ future VizierServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeVizierServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace aiplatform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/aiplatform/v1/internal/vizier_tracing_stub.h b/google/cloud/aiplatform/v1/internal/vizier_tracing_stub.h index f2cb2ec0c94c4..7d23caeb1730f 100644 --- a/google/cloud/aiplatform/v1/internal/vizier_tracing_stub.h +++ b/google/cloud/aiplatform/v1/internal/vizier_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace aiplatform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class VizierServiceTracingStub : public VizierServiceStub { public: ~VizierServiceTracingStub() override = default; @@ -181,8 +182,6 @@ class VizierServiceTracingStub : public VizierServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -197,4 +196,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_INTERNAL_VIZIER_TRACING_STUB_H diff --git a/google/cloud/aiplatform/v1/job_client.h b/google/cloud/aiplatform/v1/job_client.h index d161580a96854..b7a93ead72212 100644 --- a/google/cloud/aiplatform/v1/job_client.h +++ b/google/cloud/aiplatform/v1/job_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/aiplatform/v1/job_connection.h b/google/cloud/aiplatform/v1/job_connection.h index 36211341f6fec..33c162a632b61 100644 --- a/google/cloud/aiplatform/v1/job_connection.h +++ b/google/cloud/aiplatform/v1/job_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/aiplatform/v1/internal/job_retry_traits.h" #include "google/cloud/aiplatform/v1/job_connection_idempotency_policy.h" +#include "google/cloud/aiplatform/v1/job_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/aiplatform/v1/job_connection_idempotency_policy.h b/google/cloud/aiplatform/v1/job_connection_idempotency_policy.h index 69814e5a459c0..620ff2bd2de91 100644 --- a/google/cloud/aiplatform/v1/job_connection_idempotency_policy.h +++ b/google/cloud/aiplatform/v1/job_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_JOB_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_JOB_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/aiplatform/v1/job_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/llm_utility_connection.h b/google/cloud/aiplatform/v1/llm_utility_connection.h index cbbbab31abfa4..191a1b59ca0bd 100644 --- a/google/cloud/aiplatform/v1/llm_utility_connection.h +++ b/google/cloud/aiplatform/v1/llm_utility_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/aiplatform/v1/internal/llm_utility_retry_traits.h" #include "google/cloud/aiplatform/v1/llm_utility_connection_idempotency_policy.h" +#include "google/cloud/aiplatform/v1/llm_utility_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/aiplatform/v1/llm_utility_connection_idempotency_policy.h b/google/cloud/aiplatform/v1/llm_utility_connection_idempotency_policy.h index dc9d95c02a6c6..e7a571ba732ea 100644 --- a/google/cloud/aiplatform/v1/llm_utility_connection_idempotency_policy.h +++ b/google/cloud/aiplatform/v1/llm_utility_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_LLM_UTILITY_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_LLM_UTILITY_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/aiplatform/v1/llm_utility_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/match_connection.h b/google/cloud/aiplatform/v1/match_connection.h index ae3c16010343d..7ac977c10d15a 100644 --- a/google/cloud/aiplatform/v1/match_connection.h +++ b/google/cloud/aiplatform/v1/match_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/aiplatform/v1/internal/match_retry_traits.h" #include "google/cloud/aiplatform/v1/match_connection_idempotency_policy.h" +#include "google/cloud/aiplatform/v1/match_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/aiplatform/v1/match_connection_idempotency_policy.h b/google/cloud/aiplatform/v1/match_connection_idempotency_policy.h index 3fdd966b0e886..79a1993966abe 100644 --- a/google/cloud/aiplatform/v1/match_connection_idempotency_policy.h +++ b/google/cloud/aiplatform/v1/match_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_MATCH_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_MATCH_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/aiplatform/v1/match_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/metadata_client.h b/google/cloud/aiplatform/v1/metadata_client.h index 28548d9428724..8fc349016330f 100644 --- a/google/cloud/aiplatform/v1/metadata_client.h +++ b/google/cloud/aiplatform/v1/metadata_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/aiplatform/v1/metadata_connection.h b/google/cloud/aiplatform/v1/metadata_connection.h index ff802d1254bc3..70236da9b8c59 100644 --- a/google/cloud/aiplatform/v1/metadata_connection.h +++ b/google/cloud/aiplatform/v1/metadata_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/aiplatform/v1/internal/metadata_retry_traits.h" #include "google/cloud/aiplatform/v1/metadata_connection_idempotency_policy.h" +#include "google/cloud/aiplatform/v1/metadata_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/aiplatform/v1/metadata_connection_idempotency_policy.h b/google/cloud/aiplatform/v1/metadata_connection_idempotency_policy.h index cc88b3f5bf6b4..5680c4b071cb0 100644 --- a/google/cloud/aiplatform/v1/metadata_connection_idempotency_policy.h +++ b/google/cloud/aiplatform/v1/metadata_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_METADATA_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_METADATA_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/aiplatform/v1/metadata_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/migration_client.h b/google/cloud/aiplatform/v1/migration_client.h index 7204cf37b3452..b8f61135d1acd 100644 --- a/google/cloud/aiplatform/v1/migration_client.h +++ b/google/cloud/aiplatform/v1/migration_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/aiplatform/v1/migration_connection.h b/google/cloud/aiplatform/v1/migration_connection.h index bbadd5bfa71b7..b1dce629941cf 100644 --- a/google/cloud/aiplatform/v1/migration_connection.h +++ b/google/cloud/aiplatform/v1/migration_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/aiplatform/v1/internal/migration_retry_traits.h" #include "google/cloud/aiplatform/v1/migration_connection_idempotency_policy.h" +#include "google/cloud/aiplatform/v1/migration_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/aiplatform/v1/migration_connection_idempotency_policy.h b/google/cloud/aiplatform/v1/migration_connection_idempotency_policy.h index 228a4dfb989b3..e5382a8efcd71 100644 --- a/google/cloud/aiplatform/v1/migration_connection_idempotency_policy.h +++ b/google/cloud/aiplatform/v1/migration_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_MIGRATION_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_MIGRATION_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/aiplatform/v1/migration_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/model_client.h b/google/cloud/aiplatform/v1/model_client.h index 05c9d14ce41a3..823454f1840e2 100644 --- a/google/cloud/aiplatform/v1/model_client.h +++ b/google/cloud/aiplatform/v1/model_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/aiplatform/v1/model_connection.h b/google/cloud/aiplatform/v1/model_connection.h index c4f57b5c83d5e..35c90921fed5d 100644 --- a/google/cloud/aiplatform/v1/model_connection.h +++ b/google/cloud/aiplatform/v1/model_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/aiplatform/v1/internal/model_retry_traits.h" #include "google/cloud/aiplatform/v1/model_connection_idempotency_policy.h" +#include "google/cloud/aiplatform/v1/model_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/aiplatform/v1/model_connection_idempotency_policy.h b/google/cloud/aiplatform/v1/model_connection_idempotency_policy.h index 2be68a892c44a..9651156dadd22 100644 --- a/google/cloud/aiplatform/v1/model_connection_idempotency_policy.h +++ b/google/cloud/aiplatform/v1/model_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_MODEL_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_MODEL_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/aiplatform/v1/model_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/model_garden_client.h b/google/cloud/aiplatform/v1/model_garden_client.h index 78a1a0a8905a8..5932ce9e6e6d1 100644 --- a/google/cloud/aiplatform/v1/model_garden_client.h +++ b/google/cloud/aiplatform/v1/model_garden_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/aiplatform/v1/model_garden_connection.h b/google/cloud/aiplatform/v1/model_garden_connection.h index 9a82b9d264fdf..ed39fe437ea82 100644 --- a/google/cloud/aiplatform/v1/model_garden_connection.h +++ b/google/cloud/aiplatform/v1/model_garden_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/aiplatform/v1/internal/model_garden_retry_traits.h" #include "google/cloud/aiplatform/v1/model_garden_connection_idempotency_policy.h" +#include "google/cloud/aiplatform/v1/model_garden_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/aiplatform/v1/model_garden_connection_idempotency_policy.h b/google/cloud/aiplatform/v1/model_garden_connection_idempotency_policy.h index 5d5743ff0f564..9894b122a7057 100644 --- a/google/cloud/aiplatform/v1/model_garden_connection_idempotency_policy.h +++ b/google/cloud/aiplatform/v1/model_garden_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_MODEL_GARDEN_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_MODEL_GARDEN_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/aiplatform/v1/model_garden_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/notebook_client.h b/google/cloud/aiplatform/v1/notebook_client.h index 7dff5106fd915..e398003f92ac5 100644 --- a/google/cloud/aiplatform/v1/notebook_client.h +++ b/google/cloud/aiplatform/v1/notebook_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/aiplatform/v1/notebook_connection.h b/google/cloud/aiplatform/v1/notebook_connection.h index be9505e1563e9..c33de4c75ff9b 100644 --- a/google/cloud/aiplatform/v1/notebook_connection.h +++ b/google/cloud/aiplatform/v1/notebook_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/aiplatform/v1/internal/notebook_retry_traits.h" #include "google/cloud/aiplatform/v1/notebook_connection_idempotency_policy.h" +#include "google/cloud/aiplatform/v1/notebook_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/aiplatform/v1/notebook_connection_idempotency_policy.h b/google/cloud/aiplatform/v1/notebook_connection_idempotency_policy.h index 1495b6fa70022..4ae60255120b9 100644 --- a/google/cloud/aiplatform/v1/notebook_connection_idempotency_policy.h +++ b/google/cloud/aiplatform/v1/notebook_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_NOTEBOOK_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_NOTEBOOK_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/aiplatform/v1/notebook_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/persistent_resource_client.h b/google/cloud/aiplatform/v1/persistent_resource_client.h index 6e1da918e5ab3..94a3a2719b7ac 100644 --- a/google/cloud/aiplatform/v1/persistent_resource_client.h +++ b/google/cloud/aiplatform/v1/persistent_resource_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/aiplatform/v1/persistent_resource_connection.h b/google/cloud/aiplatform/v1/persistent_resource_connection.h index 6dac0171625ec..f676b4654d675 100644 --- a/google/cloud/aiplatform/v1/persistent_resource_connection.h +++ b/google/cloud/aiplatform/v1/persistent_resource_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/aiplatform/v1/internal/persistent_resource_retry_traits.h" #include "google/cloud/aiplatform/v1/persistent_resource_connection_idempotency_policy.h" +#include "google/cloud/aiplatform/v1/persistent_resource_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/aiplatform/v1/persistent_resource_connection_idempotency_policy.h b/google/cloud/aiplatform/v1/persistent_resource_connection_idempotency_policy.h index 835dfcbe513aa..92a3a9d131c4d 100644 --- a/google/cloud/aiplatform/v1/persistent_resource_connection_idempotency_policy.h +++ b/google/cloud/aiplatform/v1/persistent_resource_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_PERSISTENT_RESOURCE_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_PERSISTENT_RESOURCE_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/aiplatform/v1/persistent_resource_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/pipeline_client.h b/google/cloud/aiplatform/v1/pipeline_client.h index 88b967418b822..b52895c309b21 100644 --- a/google/cloud/aiplatform/v1/pipeline_client.h +++ b/google/cloud/aiplatform/v1/pipeline_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/aiplatform/v1/pipeline_connection.h b/google/cloud/aiplatform/v1/pipeline_connection.h index 43561cd9cc7bb..3311d9eceaa3b 100644 --- a/google/cloud/aiplatform/v1/pipeline_connection.h +++ b/google/cloud/aiplatform/v1/pipeline_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/aiplatform/v1/internal/pipeline_retry_traits.h" #include "google/cloud/aiplatform/v1/pipeline_connection_idempotency_policy.h" +#include "google/cloud/aiplatform/v1/pipeline_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/aiplatform/v1/pipeline_connection_idempotency_policy.h b/google/cloud/aiplatform/v1/pipeline_connection_idempotency_policy.h index 9d11d229dbe82..811234c1ee4f3 100644 --- a/google/cloud/aiplatform/v1/pipeline_connection_idempotency_policy.h +++ b/google/cloud/aiplatform/v1/pipeline_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_PIPELINE_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_PIPELINE_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/aiplatform/v1/pipeline_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/prediction_connection.h b/google/cloud/aiplatform/v1/prediction_connection.h index 61a4011a3aa49..7eb7aba43e99b 100644 --- a/google/cloud/aiplatform/v1/prediction_connection.h +++ b/google/cloud/aiplatform/v1/prediction_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/aiplatform/v1/internal/prediction_retry_traits.h" #include "google/cloud/aiplatform/v1/prediction_connection_idempotency_policy.h" +#include "google/cloud/aiplatform/v1/prediction_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/async_read_write_stream_impl.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -28,7 +29,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/aiplatform/v1/prediction_connection_idempotency_policy.h b/google/cloud/aiplatform/v1/prediction_connection_idempotency_policy.h index 2cbe32a74e1c8..39d04a7567bc2 100644 --- a/google/cloud/aiplatform/v1/prediction_connection_idempotency_policy.h +++ b/google/cloud/aiplatform/v1/prediction_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_PREDICTION_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_PREDICTION_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/aiplatform/v1/prediction_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/schedule_client.h b/google/cloud/aiplatform/v1/schedule_client.h index 93f744c9a7282..06933e2ae4a8e 100644 --- a/google/cloud/aiplatform/v1/schedule_client.h +++ b/google/cloud/aiplatform/v1/schedule_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/aiplatform/v1/schedule_connection.h b/google/cloud/aiplatform/v1/schedule_connection.h index 0be8920d0a862..497c4d1066c44 100644 --- a/google/cloud/aiplatform/v1/schedule_connection.h +++ b/google/cloud/aiplatform/v1/schedule_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/aiplatform/v1/internal/schedule_retry_traits.h" #include "google/cloud/aiplatform/v1/schedule_connection_idempotency_policy.h" +#include "google/cloud/aiplatform/v1/schedule_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/aiplatform/v1/schedule_connection_idempotency_policy.h b/google/cloud/aiplatform/v1/schedule_connection_idempotency_policy.h index 15e1a41e4869e..4dfdbce8390bd 100644 --- a/google/cloud/aiplatform/v1/schedule_connection_idempotency_policy.h +++ b/google/cloud/aiplatform/v1/schedule_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_SCHEDULE_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_SCHEDULE_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/aiplatform/v1/schedule_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/specialist_pool_client.h b/google/cloud/aiplatform/v1/specialist_pool_client.h index dbd2ea4919019..9b3c9ef544dac 100644 --- a/google/cloud/aiplatform/v1/specialist_pool_client.h +++ b/google/cloud/aiplatform/v1/specialist_pool_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/aiplatform/v1/specialist_pool_connection.h b/google/cloud/aiplatform/v1/specialist_pool_connection.h index 91c4c39a7505b..1cc5eadef32a3 100644 --- a/google/cloud/aiplatform/v1/specialist_pool_connection.h +++ b/google/cloud/aiplatform/v1/specialist_pool_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/aiplatform/v1/internal/specialist_pool_retry_traits.h" #include "google/cloud/aiplatform/v1/specialist_pool_connection_idempotency_policy.h" +#include "google/cloud/aiplatform/v1/specialist_pool_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/aiplatform/v1/specialist_pool_connection_idempotency_policy.h b/google/cloud/aiplatform/v1/specialist_pool_connection_idempotency_policy.h index c21ee99f1bcdc..f297d723a698c 100644 --- a/google/cloud/aiplatform/v1/specialist_pool_connection_idempotency_policy.h +++ b/google/cloud/aiplatform/v1/specialist_pool_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_SPECIALIST_POOL_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_SPECIALIST_POOL_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/aiplatform/v1/specialist_pool_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/tensorboard_client.h b/google/cloud/aiplatform/v1/tensorboard_client.h index d6f10a11cd36b..9844c0b24ac3f 100644 --- a/google/cloud/aiplatform/v1/tensorboard_client.h +++ b/google/cloud/aiplatform/v1/tensorboard_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/aiplatform/v1/tensorboard_connection.h b/google/cloud/aiplatform/v1/tensorboard_connection.h index 353d2277041f1..baa2d6199d97b 100644 --- a/google/cloud/aiplatform/v1/tensorboard_connection.h +++ b/google/cloud/aiplatform/v1/tensorboard_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/aiplatform/v1/internal/tensorboard_retry_traits.h" #include "google/cloud/aiplatform/v1/tensorboard_connection_idempotency_policy.h" +#include "google/cloud/aiplatform/v1/tensorboard_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/aiplatform/v1/tensorboard_connection_idempotency_policy.h b/google/cloud/aiplatform/v1/tensorboard_connection_idempotency_policy.h index de0b426880245..342e83ca0d870 100644 --- a/google/cloud/aiplatform/v1/tensorboard_connection_idempotency_policy.h +++ b/google/cloud/aiplatform/v1/tensorboard_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_TENSORBOARD_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_TENSORBOARD_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/aiplatform/v1/tensorboard_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/aiplatform/v1/vizier_client.h b/google/cloud/aiplatform/v1/vizier_client.h index 39bdf58b2bcfa..e7faea5ecd189 100644 --- a/google/cloud/aiplatform/v1/vizier_client.h +++ b/google/cloud/aiplatform/v1/vizier_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/aiplatform/v1/vizier_connection.h b/google/cloud/aiplatform/v1/vizier_connection.h index 23ca3d936d359..47b078d3a0177 100644 --- a/google/cloud/aiplatform/v1/vizier_connection.h +++ b/google/cloud/aiplatform/v1/vizier_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/aiplatform/v1/internal/vizier_retry_traits.h" #include "google/cloud/aiplatform/v1/vizier_connection_idempotency_policy.h" +#include "google/cloud/aiplatform/v1/vizier_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/aiplatform/v1/vizier_connection_idempotency_policy.h b/google/cloud/aiplatform/v1/vizier_connection_idempotency_policy.h index a94b8ebcfa0ec..4342b560891c7 100644 --- a/google/cloud/aiplatform/v1/vizier_connection_idempotency_policy.h +++ b/google/cloud/aiplatform/v1/vizier_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_VIZIER_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AIPLATFORM_V1_VIZIER_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/aiplatform/v1/vizier_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/alloydb/BUILD.bazel b/google/cloud/alloydb/BUILD.bazel index 9b90196e9337c..1a6fc0ddfa957 100644 --- a/google/cloud/alloydb/BUILD.bazel +++ b/google/cloud/alloydb/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/alloydb/v1:alloydb_cc_grpc", + "@googleapis//google/cloud/alloydb/v1:alloydb_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/alloydb/quickstart/.bazelrc b/google/cloud/alloydb/quickstart/.bazelrc index 6777c6b4c95de..ec27511a60add 100644 --- a/google/cloud/alloydb/quickstart/.bazelrc +++ b/google/cloud/alloydb/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/alloydb/quickstart/CMakeLists.txt b/google/cloud/alloydb/quickstart/CMakeLists.txt index e1b180b12c4cb..38b1c1ceaca63 100644 --- a/google/cloud/alloydb/quickstart/CMakeLists.txt +++ b/google/cloud/alloydb/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the AlloyDB API C++ client library from a larger # CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-alloydb-quickstart CXX) find_package(google_cloud_cpp_alloydb REQUIRED) diff --git a/google/cloud/alloydb/v1/alloy_db_admin_client.h b/google/cloud/alloydb/v1/alloy_db_admin_client.h index a8fe6f1431d73..8e124b0f0bb85 100644 --- a/google/cloud/alloydb/v1/alloy_db_admin_client.h +++ b/google/cloud/alloydb/v1/alloy_db_admin_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/alloydb/v1/alloy_db_admin_connection.h b/google/cloud/alloydb/v1/alloy_db_admin_connection.h index 3d1d8a21ff748..a9ec08c2a38e6 100644 --- a/google/cloud/alloydb/v1/alloy_db_admin_connection.h +++ b/google/cloud/alloydb/v1/alloy_db_admin_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/alloydb/v1/alloy_db_admin_connection_idempotency_policy.h" #include "google/cloud/alloydb/v1/internal/alloy_db_admin_retry_traits.h" +#include "google/cloud/alloydb/v1/service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/alloydb/v1/alloy_db_admin_connection_idempotency_policy.h b/google/cloud/alloydb/v1/alloy_db_admin_connection_idempotency_policy.h index 351efc9e62522..e11bcadb9dea7 100644 --- a/google/cloud/alloydb/v1/alloy_db_admin_connection_idempotency_policy.h +++ b/google/cloud/alloydb/v1/alloy_db_admin_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ALLOYDB_V1_ALLOY_DB_ADMIN_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ALLOYDB_V1_ALLOY_DB_ADMIN_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/alloydb/v1/service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/alloydb/v1/internal/alloy_db_admin_auth_decorator.cc b/google/cloud/alloydb/v1/internal/alloy_db_admin_auth_decorator.cc index 0555447f5b519..088a7b60ac0d4 100644 --- a/google/cloud/alloydb/v1/internal/alloy_db_admin_auth_decorator.cc +++ b/google/cloud/alloydb/v1/internal/alloy_db_admin_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/alloydb/v1/service.proto #include "google/cloud/alloydb/v1/internal/alloy_db_admin_auth_decorator.h" -#include +#include "google/cloud/alloydb/v1/service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace alloydb_v1_internal { @@ -850,3 +853,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace alloydb_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/alloydb/v1/internal/alloy_db_admin_auth_decorator.h b/google/cloud/alloydb/v1/internal/alloy_db_admin_auth_decorator.h index 290c386e554aa..459a2370b07ce 100644 --- a/google/cloud/alloydb/v1/internal/alloy_db_admin_auth_decorator.h +++ b/google/cloud/alloydb/v1/internal/alloy_db_admin_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/alloydb/v1/internal/alloy_db_admin_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace alloydb_v1_internal { @@ -388,4 +391,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ALLOYDB_V1_INTERNAL_ALLOY_DB_ADMIN_AUTH_DECORATOR_H diff --git a/google/cloud/alloydb/v1/internal/alloy_db_admin_connection_impl.h b/google/cloud/alloydb/v1/internal/alloy_db_admin_connection_impl.h index 2122c10698b20..d1170b5b70661 100644 --- a/google/cloud/alloydb/v1/internal/alloy_db_admin_connection_impl.h +++ b/google/cloud/alloydb/v1/internal/alloy_db_admin_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/alloydb/v1/internal/alloy_db_admin_logging_decorator.cc b/google/cloud/alloydb/v1/internal/alloy_db_admin_logging_decorator.cc index e4451b8c60dd1..9a6392cc8db57 100644 --- a/google/cloud/alloydb/v1/internal/alloy_db_admin_logging_decorator.cc +++ b/google/cloud/alloydb/v1/internal/alloy_db_admin_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/alloydb/v1/service.proto #include "google/cloud/alloydb/v1/internal/alloy_db_admin_logging_decorator.h" +#include "google/cloud/alloydb/v1/service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace alloydb_v1_internal { @@ -957,3 +960,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace alloydb_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/alloydb/v1/internal/alloy_db_admin_logging_decorator.h b/google/cloud/alloydb/v1/internal/alloy_db_admin_logging_decorator.h index 32d1b789a8d3d..7fe12dbee1dea 100644 --- a/google/cloud/alloydb/v1/internal/alloy_db_admin_logging_decorator.h +++ b/google/cloud/alloydb/v1/internal/alloy_db_admin_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/alloydb/v1/internal/alloy_db_admin_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace alloydb_v1_internal { @@ -388,4 +391,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ALLOYDB_V1_INTERNAL_ALLOY_DB_ADMIN_LOGGING_DECORATOR_H diff --git a/google/cloud/alloydb/v1/internal/alloy_db_admin_metadata_decorator.cc b/google/cloud/alloydb/v1/internal/alloy_db_admin_metadata_decorator.cc index 6fcce41ba2af3..22f94daf25694 100644 --- a/google/cloud/alloydb/v1/internal/alloy_db_admin_metadata_decorator.cc +++ b/google/cloud/alloydb/v1/internal/alloy_db_admin_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/alloydb/v1/service.proto #include "google/cloud/alloydb/v1/internal/alloy_db_admin_metadata_decorator.h" +#include "google/cloud/alloydb/v1/service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace alloydb_v1_internal { @@ -706,3 +710,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace alloydb_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/alloydb/v1/internal/alloy_db_admin_metadata_decorator.h b/google/cloud/alloydb/v1/internal/alloy_db_admin_metadata_decorator.h index 72630a43e6388..84478b9ca4240 100644 --- a/google/cloud/alloydb/v1/internal/alloy_db_admin_metadata_decorator.h +++ b/google/cloud/alloydb/v1/internal/alloy_db_admin_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/alloydb/v1/internal/alloy_db_admin_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace alloydb_v1_internal { @@ -393,4 +396,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ALLOYDB_V1_INTERNAL_ALLOY_DB_ADMIN_METADATA_DECORATOR_H diff --git a/google/cloud/alloydb/v1/internal/alloy_db_admin_option_defaults.cc b/google/cloud/alloydb/v1/internal/alloy_db_admin_option_defaults.cc index cbeba5b8074e5..002b02ca2472e 100644 --- a/google/cloud/alloydb/v1/internal/alloy_db_admin_option_defaults.cc +++ b/google/cloud/alloydb/v1/internal/alloy_db_admin_option_defaults.cc @@ -40,7 +40,7 @@ Options AlloyDBAdminDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - alloydb_v1::AlloyDBAdminLimitedTimeRetryPolicy(std::chrono::minutes(30)) + alloydb_v1::AlloyDBAdminLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/alloydb/v1/internal/alloy_db_admin_stub.cc b/google/cloud/alloydb/v1/internal/alloy_db_admin_stub.cc index a0f18ecd4205d..6cacb7ae0fbae 100644 --- a/google/cloud/alloydb/v1/internal/alloy_db_admin_stub.cc +++ b/google/cloud/alloydb/v1/internal/alloy_db_admin_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/alloydb/v1/service.proto #include "google/cloud/alloydb/v1/internal/alloy_db_admin_stub.h" +#include "google/cloud/alloydb/v1/service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace alloydb_v1_internal { @@ -961,3 +964,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace alloydb_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/alloydb/v1/internal/alloy_db_admin_stub.h b/google/cloud/alloydb/v1/internal/alloy_db_admin_stub.h index 448991524bb62..f34e60da77f8d 100644 --- a/google/cloud/alloydb/v1/internal/alloy_db_admin_stub.h +++ b/google/cloud/alloydb/v1/internal/alloy_db_admin_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ALLOYDB_V1_INTERNAL_ALLOY_DB_ADMIN_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ALLOYDB_V1_INTERNAL_ALLOY_DB_ADMIN_STUB_H +#include "google/cloud/alloydb/v1/service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace alloydb_v1_internal { @@ -738,4 +741,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ALLOYDB_V1_INTERNAL_ALLOY_DB_ADMIN_STUB_H diff --git a/google/cloud/alloydb/v1/internal/alloy_db_admin_stub_factory.cc b/google/cloud/alloydb/v1/internal/alloy_db_admin_stub_factory.cc index f82f732e137e3..5986d74749204 100644 --- a/google/cloud/alloydb/v1/internal/alloy_db_admin_stub_factory.cc +++ b/google/cloud/alloydb/v1/internal/alloy_db_admin_stub_factory.cc @@ -22,18 +22,21 @@ #include "google/cloud/alloydb/v1/internal/alloy_db_admin_metadata_decorator.h" #include "google/cloud/alloydb/v1/internal/alloy_db_admin_stub.h" #include "google/cloud/alloydb/v1/internal/alloy_db_admin_tracing_stub.h" +#include "google/cloud/alloydb/v1/service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace alloydb_v1_internal { @@ -74,3 +77,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace alloydb_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/alloydb/v1/internal/alloy_db_admin_stub_factory.h b/google/cloud/alloydb/v1/internal/alloy_db_admin_stub_factory.h index eb59381f5205c..298af23712777 100644 --- a/google/cloud/alloydb/v1/internal/alloy_db_admin_stub_factory.h +++ b/google/cloud/alloydb/v1/internal/alloy_db_admin_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace alloydb_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ALLOYDB_V1_INTERNAL_ALLOY_DB_ADMIN_STUB_FACTORY_H diff --git a/google/cloud/alloydb/v1/internal/alloy_db_admin_tracing_connection.cc b/google/cloud/alloydb/v1/internal/alloy_db_admin_tracing_connection.cc index c021f389e8d33..2870a46744f37 100644 --- a/google/cloud/alloydb/v1/internal/alloy_db_admin_tracing_connection.cc +++ b/google/cloud/alloydb/v1/internal/alloy_db_admin_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace alloydb_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AlloyDBAdminTracingConnection::AlloyDBAdminTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -852,16 +850,12 @@ Status AlloyDBAdminTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAlloyDBAdminTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/alloydb/v1/internal/alloy_db_admin_tracing_connection.h b/google/cloud/alloydb/v1/internal/alloy_db_admin_tracing_connection.h index 44aa83f712883..b8e8c12e94df7 100644 --- a/google/cloud/alloydb/v1/internal/alloy_db_admin_tracing_connection.h +++ b/google/cloud/alloydb/v1/internal/alloy_db_admin_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace alloydb_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AlloyDBAdminTracingConnection : public alloydb_v1::AlloyDBAdminConnection { public: @@ -355,8 +353,6 @@ class AlloyDBAdminTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/alloydb/v1/internal/alloy_db_admin_tracing_stub.cc b/google/cloud/alloydb/v1/internal/alloy_db_admin_tracing_stub.cc index b5b776d547499..57c2ef409b6aa 100644 --- a/google/cloud/alloydb/v1/internal/alloy_db_admin_tracing_stub.cc +++ b/google/cloud/alloydb/v1/internal/alloy_db_admin_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace alloydb_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AlloyDBAdminTracingStub::AlloyDBAdminTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -871,18 +872,14 @@ future AlloyDBAdminTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAlloyDBAdminTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace alloydb_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/alloydb/v1/internal/alloy_db_admin_tracing_stub.h b/google/cloud/alloydb/v1/internal/alloy_db_admin_tracing_stub.h index abc55c7320afc..5440a73025212 100644 --- a/google/cloud/alloydb/v1/internal/alloy_db_admin_tracing_stub.h +++ b/google/cloud/alloydb/v1/internal/alloy_db_admin_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace alloydb_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AlloyDBAdminTracingStub : public AlloyDBAdminStub { public: ~AlloyDBAdminTracingStub() override = default; @@ -383,8 +384,6 @@ class AlloyDBAdminTracingStub : public AlloyDBAdminStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -399,4 +398,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ALLOYDB_V1_INTERNAL_ALLOY_DB_ADMIN_TRACING_STUB_H diff --git a/google/cloud/apigateway/BUILD.bazel b/google/cloud/apigateway/BUILD.bazel index 78feee464f8bc..28d101db96038 100644 --- a/google/cloud/apigateway/BUILD.bazel +++ b/google/cloud/apigateway/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/apigateway/v1:apigateway_cc_grpc", + "@googleapis//google/cloud/apigateway/v1:apigateway_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/apigateway/CMakeLists.txt b/google/cloud/apigateway/CMakeLists.txt index f8716f3925908..44a49c3102bbd 100644 --- a/google/cloud/apigateway/CMakeLists.txt +++ b/google/cloud/apigateway/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(apigateway "API Gateway API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(apigateway_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/apigateway/api_gateway_client.h b/google/cloud/apigateway/api_gateway_client.h deleted file mode 100644 index 11682e568526f..0000000000000 --- a/google/cloud/apigateway/api_gateway_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/apigateway/v1/apigateway_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGATEWAY_API_GATEWAY_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGATEWAY_API_GATEWAY_CLIENT_H - -#include "google/cloud/apigateway/api_gateway_connection.h" -#include "google/cloud/apigateway/v1/api_gateway_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in apigateway_v1 instead of the aliases defined in -/// this namespace. -namespace apigateway { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use apigateway_v1::ApiGatewayServiceClient directly. -using ::google::cloud::apigateway_v1::ApiGatewayServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace apigateway -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGATEWAY_API_GATEWAY_CLIENT_H diff --git a/google/cloud/apigateway/api_gateway_connection.h b/google/cloud/apigateway/api_gateway_connection.h deleted file mode 100644 index 443ca07c15bc9..0000000000000 --- a/google/cloud/apigateway/api_gateway_connection.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/apigateway/v1/apigateway_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGATEWAY_API_GATEWAY_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGATEWAY_API_GATEWAY_CONNECTION_H - -#include "google/cloud/apigateway/api_gateway_connection_idempotency_policy.h" -#include "google/cloud/apigateway/v1/api_gateway_connection.h" - -namespace google { -namespace cloud { -namespace apigateway { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use apigateway_v1::MakeApiGatewayServiceConnection directly. -using ::google::cloud::apigateway_v1::MakeApiGatewayServiceConnection; - -/// @deprecated Use apigateway_v1::ApiGatewayServiceConnection directly. -using ::google::cloud::apigateway_v1::ApiGatewayServiceConnection; - -/// @deprecated Use apigateway_v1::ApiGatewayServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::apigateway_v1:: - ApiGatewayServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use apigateway_v1::ApiGatewayServiceLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::apigateway_v1::ApiGatewayServiceLimitedTimeRetryPolicy; - -/// @deprecated Use apigateway_v1::ApiGatewayServiceRetryPolicy directly. -using ::google::cloud::apigateway_v1::ApiGatewayServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace apigateway -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGATEWAY_API_GATEWAY_CONNECTION_H diff --git a/google/cloud/apigateway/api_gateway_connection_idempotency_policy.h b/google/cloud/apigateway/api_gateway_connection_idempotency_policy.h deleted file mode 100644 index fb27239b47976..0000000000000 --- a/google/cloud/apigateway/api_gateway_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/apigateway/v1/apigateway_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGATEWAY_API_GATEWAY_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGATEWAY_API_GATEWAY_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/apigateway/v1/api_gateway_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace apigateway { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// apigateway_v1::MakeDefaultApiGatewayServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::apigateway_v1:: - MakeDefaultApiGatewayServiceConnectionIdempotencyPolicy; - -/// @deprecated Use apigateway_v1::ApiGatewayServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::apigateway_v1:: - ApiGatewayServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace apigateway -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGATEWAY_API_GATEWAY_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/apigateway/api_gateway_options.h b/google/cloud/apigateway/api_gateway_options.h deleted file mode 100644 index 1d45ecba0b52e..0000000000000 --- a/google/cloud/apigateway/api_gateway_options.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/apigateway/v1/apigateway_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGATEWAY_API_GATEWAY_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGATEWAY_API_GATEWAY_OPTIONS_H - -#include "google/cloud/apigateway/api_gateway_connection.h" -#include "google/cloud/apigateway/api_gateway_connection_idempotency_policy.h" -#include "google/cloud/apigateway/v1/api_gateway_options.h" - -namespace google { -namespace cloud { -namespace apigateway { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use apigateway_v1::ApiGatewayServicePollingPolicyOption -/// directly. -using ::google::cloud::apigateway_v1::ApiGatewayServicePollingPolicyOption; - -/// @deprecated Use apigateway_v1::ApiGatewayServiceBackoffPolicyOption -/// directly. -using ::google::cloud::apigateway_v1::ApiGatewayServiceBackoffPolicyOption; - -/// @deprecated Use -/// apigateway_v1::ApiGatewayServiceConnectionIdempotencyPolicyOption directly. -using ::google::cloud::apigateway_v1:: - ApiGatewayServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use apigateway_v1::ApiGatewayServicePolicyOptionList directly. -using ::google::cloud::apigateway_v1::ApiGatewayServicePolicyOptionList; - -/// @deprecated Use apigateway_v1::ApiGatewayServiceRetryPolicyOption directly. -using ::google::cloud::apigateway_v1::ApiGatewayServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace apigateway -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGATEWAY_API_GATEWAY_OPTIONS_H diff --git a/google/cloud/apigateway/mocks/mock_api_gateway_connection.h b/google/cloud/apigateway/mocks/mock_api_gateway_connection.h deleted file mode 100644 index e8fa59547c057..0000000000000 --- a/google/cloud/apigateway/mocks/mock_api_gateway_connection.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/apigateway/v1/apigateway_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGATEWAY_MOCKS_MOCK_API_GATEWAY_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGATEWAY_MOCKS_MOCK_API_GATEWAY_CONNECTION_H - -#include "google/cloud/apigateway/api_gateway_connection.h" -#include "google/cloud/apigateway/v1/mocks/mock_api_gateway_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in apigateway_v1_mocks instead of the aliases -/// defined in this namespace. -namespace apigateway_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use apigateway_v1_mocks::MockApiGatewayServiceConnection -/// directly. -using ::google::cloud::apigateway_v1_mocks::MockApiGatewayServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace apigateway_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGATEWAY_MOCKS_MOCK_API_GATEWAY_CONNECTION_H diff --git a/google/cloud/apigateway/quickstart/.bazelrc b/google/cloud/apigateway/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/apigateway/quickstart/.bazelrc +++ b/google/cloud/apigateway/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/apigateway/quickstart/CMakeLists.txt b/google/cloud/apigateway/quickstart/CMakeLists.txt index 1f9e2b88c55dc..79dc737b27e39 100644 --- a/google/cloud/apigateway/quickstart/CMakeLists.txt +++ b/google/cloud/apigateway/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the API Gateway API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-apigateway-quickstart CXX) find_package(google_cloud_cpp_apigateway REQUIRED) diff --git a/google/cloud/apigateway/v1/api_gateway_client.h b/google/cloud/apigateway/v1/api_gateway_client.h index a5c8d59062d90..73eb87ee11038 100644 --- a/google/cloud/apigateway/v1/api_gateway_client.h +++ b/google/cloud/apigateway/v1/api_gateway_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/apigateway/v1/api_gateway_connection.h b/google/cloud/apigateway/v1/api_gateway_connection.h index ebaf51e29e0d8..a376f5d952702 100644 --- a/google/cloud/apigateway/v1/api_gateway_connection.h +++ b/google/cloud/apigateway/v1/api_gateway_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGATEWAY_V1_API_GATEWAY_CONNECTION_H #include "google/cloud/apigateway/v1/api_gateway_connection_idempotency_policy.h" +#include "google/cloud/apigateway/v1/apigateway_service.pb.h" #include "google/cloud/apigateway/v1/internal/api_gateway_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/apigateway/v1/api_gateway_connection_idempotency_policy.h b/google/cloud/apigateway/v1/api_gateway_connection_idempotency_policy.h index f7643569af365..66d28e6b09a43 100644 --- a/google/cloud/apigateway/v1/api_gateway_connection_idempotency_policy.h +++ b/google/cloud/apigateway/v1/api_gateway_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGATEWAY_V1_API_GATEWAY_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGATEWAY_V1_API_GATEWAY_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/apigateway/v1/apigateway_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/apigateway/v1/internal/api_gateway_auth_decorator.cc b/google/cloud/apigateway/v1/internal/api_gateway_auth_decorator.cc index dadcf70243831..494c205901c69 100644 --- a/google/cloud/apigateway/v1/internal/api_gateway_auth_decorator.cc +++ b/google/cloud/apigateway/v1/internal/api_gateway_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/apigateway/v1/apigateway_service.proto #include "google/cloud/apigateway/v1/internal/api_gateway_auth_decorator.h" -#include +#include "google/cloud/apigateway/v1/apigateway_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apigateway_v1_internal { @@ -376,3 +379,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace apigateway_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/apigateway/v1/internal/api_gateway_auth_decorator.h b/google/cloud/apigateway/v1/internal/api_gateway_auth_decorator.h index 93c3156215daf..7671a0f82f4c8 100644 --- a/google/cloud/apigateway/v1/internal/api_gateway_auth_decorator.h +++ b/google/cloud/apigateway/v1/internal/api_gateway_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/apigateway/v1/internal/api_gateway_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apigateway_v1_internal { @@ -190,4 +193,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGATEWAY_V1_INTERNAL_API_GATEWAY_AUTH_DECORATOR_H diff --git a/google/cloud/apigateway/v1/internal/api_gateway_connection_impl.h b/google/cloud/apigateway/v1/internal/api_gateway_connection_impl.h index 7ecf3194e2e63..c2965086db970 100644 --- a/google/cloud/apigateway/v1/internal/api_gateway_connection_impl.h +++ b/google/cloud/apigateway/v1/internal/api_gateway_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/apigateway/v1/internal/api_gateway_logging_decorator.cc b/google/cloud/apigateway/v1/internal/api_gateway_logging_decorator.cc index b0c6358a39a2d..4308fcbb72ad2 100644 --- a/google/cloud/apigateway/v1/internal/api_gateway_logging_decorator.cc +++ b/google/cloud/apigateway/v1/internal/api_gateway_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/apigateway/v1/apigateway_service.proto #include "google/cloud/apigateway/v1/internal/api_gateway_logging_decorator.h" +#include "google/cloud/apigateway/v1/apigateway_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apigateway_v1_internal { @@ -427,3 +430,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace apigateway_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/apigateway/v1/internal/api_gateway_logging_decorator.h b/google/cloud/apigateway/v1/internal/api_gateway_logging_decorator.h index edd5a751bc940..aee320d115454 100644 --- a/google/cloud/apigateway/v1/internal/api_gateway_logging_decorator.h +++ b/google/cloud/apigateway/v1/internal/api_gateway_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/apigateway/v1/internal/api_gateway_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apigateway_v1_internal { @@ -190,4 +193,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGATEWAY_V1_INTERNAL_API_GATEWAY_LOGGING_DECORATOR_H diff --git a/google/cloud/apigateway/v1/internal/api_gateway_metadata_decorator.cc b/google/cloud/apigateway/v1/internal/api_gateway_metadata_decorator.cc index 09771ce5fb159..4a536b4264718 100644 --- a/google/cloud/apigateway/v1/internal/api_gateway_metadata_decorator.cc +++ b/google/cloud/apigateway/v1/internal/api_gateway_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/apigateway/v1/apigateway_service.proto #include "google/cloud/apigateway/v1/internal/api_gateway_metadata_decorator.h" +#include "google/cloud/apigateway/v1/apigateway_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apigateway_v1_internal { @@ -329,3 +333,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace apigateway_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/apigateway/v1/internal/api_gateway_metadata_decorator.h b/google/cloud/apigateway/v1/internal/api_gateway_metadata_decorator.h index f7fb5e6ee2d53..b7b268ac83537 100644 --- a/google/cloud/apigateway/v1/internal/api_gateway_metadata_decorator.h +++ b/google/cloud/apigateway/v1/internal/api_gateway_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/apigateway/v1/internal/api_gateway_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apigateway_v1_internal { @@ -196,4 +199,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGATEWAY_V1_INTERNAL_API_GATEWAY_METADATA_DECORATOR_H diff --git a/google/cloud/apigateway/v1/internal/api_gateway_option_defaults.cc b/google/cloud/apigateway/v1/internal/api_gateway_option_defaults.cc index 1644d4e5fbc39..c33b07bb670c6 100644 --- a/google/cloud/apigateway/v1/internal/api_gateway_option_defaults.cc +++ b/google/cloud/apigateway/v1/internal/api_gateway_option_defaults.cc @@ -42,7 +42,7 @@ Options ApiGatewayServiceDefaultOptions(Options options) { if (!options.has()) { options.set( apigateway_v1::ApiGatewayServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/apigateway/v1/internal/api_gateway_stub.cc b/google/cloud/apigateway/v1/internal/api_gateway_stub.cc index 09d5f97b2b025..e7757e76ed354 100644 --- a/google/cloud/apigateway/v1/internal/api_gateway_stub.cc +++ b/google/cloud/apigateway/v1/internal/api_gateway_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/apigateway/v1/apigateway_service.proto #include "google/cloud/apigateway/v1/internal/api_gateway_stub.h" +#include "google/cloud/apigateway/v1/apigateway_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apigateway_v1_internal { @@ -419,3 +422,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace apigateway_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/apigateway/v1/internal/api_gateway_stub.h b/google/cloud/apigateway/v1/internal/api_gateway_stub.h index a0e1f55b004db..7c1fc88665277 100644 --- a/google/cloud/apigateway/v1/internal/api_gateway_stub.h +++ b/google/cloud/apigateway/v1/internal/api_gateway_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGATEWAY_V1_INTERNAL_API_GATEWAY_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGATEWAY_V1_INTERNAL_API_GATEWAY_STUB_H +#include "google/cloud/apigateway/v1/apigateway_service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apigateway_v1_internal { @@ -332,4 +335,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGATEWAY_V1_INTERNAL_API_GATEWAY_STUB_H diff --git a/google/cloud/apigateway/v1/internal/api_gateway_stub_factory.cc b/google/cloud/apigateway/v1/internal/api_gateway_stub_factory.cc index dd40a5d2a1247..325b74b390453 100644 --- a/google/cloud/apigateway/v1/internal/api_gateway_stub_factory.cc +++ b/google/cloud/apigateway/v1/internal/api_gateway_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/apigateway/v1/apigateway_service.proto #include "google/cloud/apigateway/v1/internal/api_gateway_stub_factory.h" +#include "google/cloud/apigateway/v1/apigateway_service.grpc.pb.h" #include "google/cloud/apigateway/v1/internal/api_gateway_auth_decorator.h" #include "google/cloud/apigateway/v1/internal/api_gateway_logging_decorator.h" #include "google/cloud/apigateway/v1/internal/api_gateway_metadata_decorator.h" @@ -28,10 +29,12 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apigateway_v1_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace apigateway_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/apigateway/v1/internal/api_gateway_stub_factory.h b/google/cloud/apigateway/v1/internal/api_gateway_stub_factory.h index 45b9f506978e6..6035ab0f9f84a 100644 --- a/google/cloud/apigateway/v1/internal/api_gateway_stub_factory.h +++ b/google/cloud/apigateway/v1/internal/api_gateway_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apigateway_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGATEWAY_V1_INTERNAL_API_GATEWAY_STUB_FACTORY_H diff --git a/google/cloud/apigateway/v1/internal/api_gateway_tracing_connection.cc b/google/cloud/apigateway/v1/internal/api_gateway_tracing_connection.cc index 539f41bc71d48..19844e08f35f4 100644 --- a/google/cloud/apigateway/v1/internal/api_gateway_tracing_connection.cc +++ b/google/cloud/apigateway/v1/internal/api_gateway_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace apigateway_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ApiGatewayServiceTracingConnection::ApiGatewayServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -348,17 +346,13 @@ ApiGatewayServiceTracingConnection::DeleteApiConfig( return internal::EndSpan(std::move(span), child_->DeleteApiConfig(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeApiGatewayServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/apigateway/v1/internal/api_gateway_tracing_connection.h b/google/cloud/apigateway/v1/internal/api_gateway_tracing_connection.h index 7a180a7ce1054..39c967f077577 100644 --- a/google/cloud/apigateway/v1/internal/api_gateway_tracing_connection.h +++ b/google/cloud/apigateway/v1/internal/api_gateway_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace apigateway_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ApiGatewayServiceTracingConnection : public apigateway_v1::ApiGatewayServiceConnection { public: @@ -165,8 +163,6 @@ class ApiGatewayServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/apigateway/v1/internal/api_gateway_tracing_stub.cc b/google/cloud/apigateway/v1/internal/api_gateway_tracing_stub.cc index 50b4ff12a5f75..07509df64e7b0 100644 --- a/google/cloud/apigateway/v1/internal/api_gateway_tracing_stub.cc +++ b/google/cloud/apigateway/v1/internal/api_gateway_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apigateway_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ApiGatewayServiceTracingStub::ApiGatewayServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -369,18 +370,14 @@ future ApiGatewayServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeApiGatewayServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace apigateway_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/apigateway/v1/internal/api_gateway_tracing_stub.h b/google/cloud/apigateway/v1/internal/api_gateway_tracing_stub.h index a21e4de539d4a..940d6054e2dd9 100644 --- a/google/cloud/apigateway/v1/internal/api_gateway_tracing_stub.h +++ b/google/cloud/apigateway/v1/internal/api_gateway_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apigateway_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ApiGatewayServiceTracingStub : public ApiGatewayServiceStub { public: ~ApiGatewayServiceTracingStub() override = default; @@ -186,8 +187,6 @@ class ApiGatewayServiceTracingStub : public ApiGatewayServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -202,4 +201,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGATEWAY_V1_INTERNAL_API_GATEWAY_TRACING_STUB_H diff --git a/google/cloud/apigeeconnect/BUILD.bazel b/google/cloud/apigeeconnect/BUILD.bazel index 6a8714fa07948..6d3b46405035e 100644 --- a/google/cloud/apigeeconnect/BUILD.bazel +++ b/google/cloud/apigeeconnect/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/apigeeconnect/v1:apigeeconnect_cc_grpc", + "@googleapis//google/cloud/apigeeconnect/v1:apigeeconnect_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/apigeeconnect/CMakeLists.txt b/google/cloud/apigeeconnect/CMakeLists.txt index 1cd0bd5580905..5f0260ac1f1ec 100644 --- a/google/cloud/apigeeconnect/CMakeLists.txt +++ b/google/cloud/apigeeconnect/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(apigeeconnect "Apigee Connect API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(apigeeconnect_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/apigeeconnect/connection_client.h b/google/cloud/apigeeconnect/connection_client.h deleted file mode 100644 index 06f649bb13415..0000000000000 --- a/google/cloud/apigeeconnect/connection_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/apigeeconnect/v1/connection.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGEECONNECT_CONNECTION_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGEECONNECT_CONNECTION_CLIENT_H - -#include "google/cloud/apigeeconnect/connection_connection.h" -#include "google/cloud/apigeeconnect/v1/connection_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in apigeeconnect_v1 instead of the aliases defined in -/// this namespace. -namespace apigeeconnect { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use apigeeconnect_v1::ConnectionServiceClient directly. -using ::google::cloud::apigeeconnect_v1::ConnectionServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace apigeeconnect -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGEECONNECT_CONNECTION_CLIENT_H diff --git a/google/cloud/apigeeconnect/connection_connection.h b/google/cloud/apigeeconnect/connection_connection.h deleted file mode 100644 index faf53eff5cc35..0000000000000 --- a/google/cloud/apigeeconnect/connection_connection.h +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/apigeeconnect/v1/connection.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGEECONNECT_CONNECTION_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGEECONNECT_CONNECTION_CONNECTION_H - -#include "google/cloud/apigeeconnect/connection_connection_idempotency_policy.h" -#include "google/cloud/apigeeconnect/v1/connection_connection.h" - -namespace google { -namespace cloud { -namespace apigeeconnect { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use apigeeconnect_v1::MakeConnectionServiceConnection directly. -using ::google::cloud::apigeeconnect_v1::MakeConnectionServiceConnection; - -/// @deprecated Use apigeeconnect_v1::ConnectionServiceConnection directly. -using ::google::cloud::apigeeconnect_v1::ConnectionServiceConnection; - -/// @deprecated Use -/// apigeeconnect_v1::ConnectionServiceLimitedErrorCountRetryPolicy directly. -using ::google::cloud::apigeeconnect_v1:: - ConnectionServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use apigeeconnect_v1::ConnectionServiceLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::apigeeconnect_v1:: - ConnectionServiceLimitedTimeRetryPolicy; - -/// @deprecated Use apigeeconnect_v1::ConnectionServiceRetryPolicy directly. -using ::google::cloud::apigeeconnect_v1::ConnectionServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace apigeeconnect -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGEECONNECT_CONNECTION_CONNECTION_H diff --git a/google/cloud/apigeeconnect/connection_connection_idempotency_policy.h b/google/cloud/apigeeconnect/connection_connection_idempotency_policy.h deleted file mode 100644 index 95089111aedf2..0000000000000 --- a/google/cloud/apigeeconnect/connection_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/apigeeconnect/v1/connection.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGEECONNECT_CONNECTION_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGEECONNECT_CONNECTION_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/apigeeconnect/v1/connection_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace apigeeconnect { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// apigeeconnect_v1::MakeDefaultConnectionServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::apigeeconnect_v1:: - MakeDefaultConnectionServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// apigeeconnect_v1::ConnectionServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::apigeeconnect_v1:: - ConnectionServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace apigeeconnect -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGEECONNECT_CONNECTION_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/apigeeconnect/connection_options.h b/google/cloud/apigeeconnect/connection_options.h deleted file mode 100644 index 1b39a2d29fab4..0000000000000 --- a/google/cloud/apigeeconnect/connection_options.h +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/apigeeconnect/v1/connection.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGEECONNECT_CONNECTION_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGEECONNECT_CONNECTION_OPTIONS_H - -#include "google/cloud/apigeeconnect/connection_connection.h" -#include "google/cloud/apigeeconnect/connection_connection_idempotency_policy.h" -#include "google/cloud/apigeeconnect/v1/connection_options.h" - -namespace google { -namespace cloud { -namespace apigeeconnect { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use apigeeconnect_v1::ConnectionServiceBackoffPolicyOption -/// directly. -using ::google::cloud::apigeeconnect_v1::ConnectionServiceBackoffPolicyOption; - -/// @deprecated Use -/// apigeeconnect_v1::ConnectionServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::apigeeconnect_v1:: - ConnectionServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use apigeeconnect_v1::ConnectionServicePolicyOptionList -/// directly. -using ::google::cloud::apigeeconnect_v1::ConnectionServicePolicyOptionList; - -/// @deprecated Use apigeeconnect_v1::ConnectionServiceRetryPolicyOption -/// directly. -using ::google::cloud::apigeeconnect_v1::ConnectionServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace apigeeconnect -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGEECONNECT_CONNECTION_OPTIONS_H diff --git a/google/cloud/apigeeconnect/mocks/mock_connection_connection.h b/google/cloud/apigeeconnect/mocks/mock_connection_connection.h deleted file mode 100644 index 97a554a229806..0000000000000 --- a/google/cloud/apigeeconnect/mocks/mock_connection_connection.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/apigeeconnect/v1/connection.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGEECONNECT_MOCKS_MOCK_CONNECTION_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGEECONNECT_MOCKS_MOCK_CONNECTION_CONNECTION_H - -#include "google/cloud/apigeeconnect/connection_connection.h" -#include "google/cloud/apigeeconnect/v1/mocks/mock_connection_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in apigeeconnect_v1_mocks instead of the aliases -/// defined in this namespace. -namespace apigeeconnect_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use apigeeconnect_v1_mocks::MockConnectionServiceConnection -/// directly. -using ::google::cloud::apigeeconnect_v1_mocks::MockConnectionServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace apigeeconnect_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGEECONNECT_MOCKS_MOCK_CONNECTION_CONNECTION_H diff --git a/google/cloud/apigeeconnect/quickstart/.bazelrc b/google/cloud/apigeeconnect/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/apigeeconnect/quickstart/.bazelrc +++ b/google/cloud/apigeeconnect/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/apigeeconnect/quickstart/CMakeLists.txt b/google/cloud/apigeeconnect/quickstart/CMakeLists.txt index 880a23ecd68fd..776822142848f 100644 --- a/google/cloud/apigeeconnect/quickstart/CMakeLists.txt +++ b/google/cloud/apigeeconnect/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Apigee Connect API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-apigeeconnect-quickstart CXX) find_package(google_cloud_cpp_apigeeconnect REQUIRED) diff --git a/google/cloud/apigeeconnect/v1/connection_connection.h b/google/cloud/apigeeconnect/v1/connection_connection.h index 506e345332ec4..0acd5da0b0674 100644 --- a/google/cloud/apigeeconnect/v1/connection_connection.h +++ b/google/cloud/apigeeconnect/v1/connection_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGEECONNECT_V1_CONNECTION_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGEECONNECT_V1_CONNECTION_CONNECTION_H +#include "google/cloud/apigeeconnect/v1/connection.pb.h" #include "google/cloud/apigeeconnect/v1/connection_connection_idempotency_policy.h" #include "google/cloud/apigeeconnect/v1/internal/connection_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/apigeeconnect/v1/connection_connection_idempotency_policy.h b/google/cloud/apigeeconnect/v1/connection_connection_idempotency_policy.h index 19bf869a8a2b9..bb1b3b5f8632a 100644 --- a/google/cloud/apigeeconnect/v1/connection_connection_idempotency_policy.h +++ b/google/cloud/apigeeconnect/v1/connection_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGEECONNECT_V1_CONNECTION_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGEECONNECT_V1_CONNECTION_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/apigeeconnect/v1/connection.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/apigeeconnect/v1/internal/connection_auth_decorator.cc b/google/cloud/apigeeconnect/v1/internal/connection_auth_decorator.cc index 92d3995628ea6..d0f07a30156ae 100644 --- a/google/cloud/apigeeconnect/v1/internal/connection_auth_decorator.cc +++ b/google/cloud/apigeeconnect/v1/internal/connection_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/apigeeconnect/v1/connection.proto #include "google/cloud/apigeeconnect/v1/internal/connection_auth_decorator.h" -#include +#include "google/cloud/apigeeconnect/v1/connection.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apigeeconnect_v1_internal { @@ -44,3 +47,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace apigeeconnect_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/apigeeconnect/v1/internal/connection_auth_decorator.h b/google/cloud/apigeeconnect/v1/internal/connection_auth_decorator.h index fa066b714e04b..d226c55c1fb34 100644 --- a/google/cloud/apigeeconnect/v1/internal/connection_auth_decorator.h +++ b/google/cloud/apigeeconnect/v1/internal/connection_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apigeeconnect_v1_internal { @@ -54,4 +57,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGEECONNECT_V1_INTERNAL_CONNECTION_AUTH_DECORATOR_H diff --git a/google/cloud/apigeeconnect/v1/internal/connection_logging_decorator.cc b/google/cloud/apigeeconnect/v1/internal/connection_logging_decorator.cc index fc9c8cbcc1c1b..ed999edba43ad 100644 --- a/google/cloud/apigeeconnect/v1/internal/connection_logging_decorator.cc +++ b/google/cloud/apigeeconnect/v1/internal/connection_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/apigeeconnect/v1/connection.proto #include "google/cloud/apigeeconnect/v1/internal/connection_logging_decorator.h" +#include "google/cloud/apigeeconnect/v1/connection.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apigeeconnect_v1_internal { @@ -52,3 +55,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace apigeeconnect_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/apigeeconnect/v1/internal/connection_logging_decorator.h b/google/cloud/apigeeconnect/v1/internal/connection_logging_decorator.h index 80f46ea42f17d..7201ad2e97d27 100644 --- a/google/cloud/apigeeconnect/v1/internal/connection_logging_decorator.h +++ b/google/cloud/apigeeconnect/v1/internal/connection_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apigeeconnect_v1_internal { @@ -54,4 +57,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGEECONNECT_V1_INTERNAL_CONNECTION_LOGGING_DECORATOR_H diff --git a/google/cloud/apigeeconnect/v1/internal/connection_metadata_decorator.cc b/google/cloud/apigeeconnect/v1/internal/connection_metadata_decorator.cc index f4ff80e2e7942..8078b807a6b0d 100644 --- a/google/cloud/apigeeconnect/v1/internal/connection_metadata_decorator.cc +++ b/google/cloud/apigeeconnect/v1/internal/connection_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/apigeeconnect/v1/connection.proto #include "google/cloud/apigeeconnect/v1/internal/connection_metadata_decorator.h" +#include "google/cloud/apigeeconnect/v1/connection.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apigeeconnect_v1_internal { @@ -70,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace apigeeconnect_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/apigeeconnect/v1/internal/connection_metadata_decorator.h b/google/cloud/apigeeconnect/v1/internal/connection_metadata_decorator.h index 0196f9c597df9..92da7b45c2226 100644 --- a/google/cloud/apigeeconnect/v1/internal/connection_metadata_decorator.h +++ b/google/cloud/apigeeconnect/v1/internal/connection_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apigeeconnect_v1_internal { @@ -60,4 +63,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGEECONNECT_V1_INTERNAL_CONNECTION_METADATA_DECORATOR_H diff --git a/google/cloud/apigeeconnect/v1/internal/connection_option_defaults.cc b/google/cloud/apigeeconnect/v1/internal/connection_option_defaults.cc index e80d12ae29e7d..ec7f427ac9030 100644 --- a/google/cloud/apigeeconnect/v1/internal/connection_option_defaults.cc +++ b/google/cloud/apigeeconnect/v1/internal/connection_option_defaults.cc @@ -42,7 +42,7 @@ Options ConnectionServiceDefaultOptions(Options options) { if (!options.has()) { options.set( apigeeconnect_v1::ConnectionServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/apigeeconnect/v1/internal/connection_stub.cc b/google/cloud/apigeeconnect/v1/internal/connection_stub.cc index 61bd92a3d2fc2..18dc9b6359c59 100644 --- a/google/cloud/apigeeconnect/v1/internal/connection_stub.cc +++ b/google/cloud/apigeeconnect/v1/internal/connection_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/apigeeconnect/v1/connection.proto #include "google/cloud/apigeeconnect/v1/internal/connection_stub.h" +#include "google/cloud/apigeeconnect/v1/connection.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apigeeconnect_v1_internal { @@ -46,3 +49,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace apigeeconnect_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/apigeeconnect/v1/internal/connection_stub.h b/google/cloud/apigeeconnect/v1/internal/connection_stub.h index d24cbc8b7cad5..c5132d37548e7 100644 --- a/google/cloud/apigeeconnect/v1/internal/connection_stub.h +++ b/google/cloud/apigeeconnect/v1/internal/connection_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGEECONNECT_V1_INTERNAL_CONNECTION_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGEECONNECT_V1_INTERNAL_CONNECTION_STUB_H +#include "google/cloud/apigeeconnect/v1/connection.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apigeeconnect_v1_internal { @@ -67,4 +70,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGEECONNECT_V1_INTERNAL_CONNECTION_STUB_H diff --git a/google/cloud/apigeeconnect/v1/internal/connection_stub_factory.cc b/google/cloud/apigeeconnect/v1/internal/connection_stub_factory.cc index bc2c14d37cf80..6b1c2f51e38be 100644 --- a/google/cloud/apigeeconnect/v1/internal/connection_stub_factory.cc +++ b/google/cloud/apigeeconnect/v1/internal/connection_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/apigeeconnect/v1/connection.proto #include "google/cloud/apigeeconnect/v1/internal/connection_stub_factory.h" +#include "google/cloud/apigeeconnect/v1/connection.grpc.pb.h" #include "google/cloud/apigeeconnect/v1/internal/connection_auth_decorator.h" #include "google/cloud/apigeeconnect/v1/internal/connection_logging_decorator.h" #include "google/cloud/apigeeconnect/v1/internal/connection_metadata_decorator.h" @@ -28,10 +29,12 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apigeeconnect_v1_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace apigeeconnect_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/apigeeconnect/v1/internal/connection_stub_factory.h b/google/cloud/apigeeconnect/v1/internal/connection_stub_factory.h index a58e3444667e2..f88e499ebc2ec 100644 --- a/google/cloud/apigeeconnect/v1/internal/connection_stub_factory.h +++ b/google/cloud/apigeeconnect/v1/internal/connection_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apigeeconnect_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGEECONNECT_V1_INTERNAL_CONNECTION_STUB_FACTORY_H diff --git a/google/cloud/apigeeconnect/v1/internal/connection_tracing_connection.cc b/google/cloud/apigeeconnect/v1/internal/connection_tracing_connection.cc index 91dd2035e8453..7097253d7072d 100644 --- a/google/cloud/apigeeconnect/v1/internal/connection_tracing_connection.cc +++ b/google/cloud/apigeeconnect/v1/internal/connection_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace apigeeconnect_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ConnectionServiceTracingConnection::ConnectionServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -45,17 +43,13 @@ ConnectionServiceTracingConnection::ListConnections( std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeConnectionServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/apigeeconnect/v1/internal/connection_tracing_connection.h b/google/cloud/apigeeconnect/v1/internal/connection_tracing_connection.h index 1052cb0d351be..d597a0964f6ae 100644 --- a/google/cloud/apigeeconnect/v1/internal/connection_tracing_connection.h +++ b/google/cloud/apigeeconnect/v1/internal/connection_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace apigeeconnect_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ConnectionServiceTracingConnection : public apigeeconnect_v1::ConnectionServiceConnection { public: @@ -48,8 +46,6 @@ class ConnectionServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/apigeeconnect/v1/internal/connection_tracing_stub.cc b/google/cloud/apigeeconnect/v1/internal/connection_tracing_stub.cc index 005cd0ffcb7dd..080bb24e3b6fc 100644 --- a/google/cloud/apigeeconnect/v1/internal/connection_tracing_stub.cc +++ b/google/cloud/apigeeconnect/v1/internal/connection_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apigeeconnect_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ConnectionServiceTracingStub::ConnectionServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -44,18 +45,14 @@ ConnectionServiceTracingStub::ListConnections( child_->ListConnections(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeConnectionServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace apigeeconnect_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/apigeeconnect/v1/internal/connection_tracing_stub.h b/google/cloud/apigeeconnect/v1/internal/connection_tracing_stub.h index 9bf61f26ff102..243b098500369 100644 --- a/google/cloud/apigeeconnect/v1/internal/connection_tracing_stub.h +++ b/google/cloud/apigeeconnect/v1/internal/connection_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apigeeconnect_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ConnectionServiceTracingStub : public ConnectionServiceStub { public: ~ConnectionServiceTracingStub() override = default; @@ -51,8 +52,6 @@ class ConnectionServiceTracingStub : public ConnectionServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -67,4 +66,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIGEECONNECT_V1_INTERNAL_CONNECTION_TRACING_STUB_H diff --git a/google/cloud/apikeys/BUILD.bazel b/google/cloud/apikeys/BUILD.bazel index 5cdf8c63ef63e..77c3f7bbfbefa 100644 --- a/google/cloud/apikeys/BUILD.bazel +++ b/google/cloud/apikeys/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v2/", ] googleapis_deps = [ - "@com_google_googleapis//google/api/apikeys/v2:apikeys_cc_grpc", + "@googleapis//google/api/apikeys/v2:apikeys_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/apikeys/CMakeLists.txt b/google/cloud/apikeys/CMakeLists.txt index a3f8fed13c9d9..538a9db2255b1 100644 --- a/google/cloud/apikeys/CMakeLists.txt +++ b/google/cloud/apikeys/CMakeLists.txt @@ -16,8 +16,7 @@ include(GoogleCloudCppLibrary) -google_cloud_cpp_add_gapic_library(apikeys "API Keys API" - SERVICE_DIRS "__EMPTY__" "v2/") +google_cloud_cpp_add_gapic_library(apikeys "API Keys API" SERVICE_DIRS "v2/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(apikeys_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/apikeys/api_keys_client.h b/google/cloud/apikeys/api_keys_client.h deleted file mode 100644 index 08676a2051b37..0000000000000 --- a/google/cloud/apikeys/api_keys_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/api/apikeys/v2/apikeys.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIKEYS_API_KEYS_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIKEYS_API_KEYS_CLIENT_H - -#include "google/cloud/apikeys/api_keys_connection.h" -#include "google/cloud/apikeys/v2/api_keys_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in apikeys_v2 instead of the aliases defined in -/// this namespace. -namespace apikeys { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use apikeys_v2::ApiKeysClient directly. -using ::google::cloud::apikeys_v2::ApiKeysClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace apikeys -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIKEYS_API_KEYS_CLIENT_H diff --git a/google/cloud/apikeys/api_keys_connection.h b/google/cloud/apikeys/api_keys_connection.h deleted file mode 100644 index 638f0d4ffc0d7..0000000000000 --- a/google/cloud/apikeys/api_keys_connection.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/api/apikeys/v2/apikeys.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIKEYS_API_KEYS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIKEYS_API_KEYS_CONNECTION_H - -#include "google/cloud/apikeys/api_keys_connection_idempotency_policy.h" -#include "google/cloud/apikeys/v2/api_keys_connection.h" - -namespace google { -namespace cloud { -namespace apikeys { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use apikeys_v2::MakeApiKeysConnection directly. -using ::google::cloud::apikeys_v2::MakeApiKeysConnection; - -/// @deprecated Use apikeys_v2::ApiKeysConnection directly. -using ::google::cloud::apikeys_v2::ApiKeysConnection; - -/// @deprecated Use apikeys_v2::ApiKeysLimitedErrorCountRetryPolicy directly. -using ::google::cloud::apikeys_v2::ApiKeysLimitedErrorCountRetryPolicy; - -/// @deprecated Use apikeys_v2::ApiKeysLimitedTimeRetryPolicy directly. -using ::google::cloud::apikeys_v2::ApiKeysLimitedTimeRetryPolicy; - -/// @deprecated Use apikeys_v2::ApiKeysRetryPolicy directly. -using ::google::cloud::apikeys_v2::ApiKeysRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace apikeys -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIKEYS_API_KEYS_CONNECTION_H diff --git a/google/cloud/apikeys/api_keys_connection_idempotency_policy.h b/google/cloud/apikeys/api_keys_connection_idempotency_policy.h deleted file mode 100644 index 7edf168469e3e..0000000000000 --- a/google/cloud/apikeys/api_keys_connection_idempotency_policy.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/api/apikeys/v2/apikeys.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIKEYS_API_KEYS_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIKEYS_API_KEYS_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/apikeys/v2/api_keys_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace apikeys { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use apikeys_v2::MakeDefaultApiKeysConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::apikeys_v2:: - MakeDefaultApiKeysConnectionIdempotencyPolicy; - -/// @deprecated Use apikeys_v2::ApiKeysConnectionIdempotencyPolicy directly. -using ::google::cloud::apikeys_v2::ApiKeysConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace apikeys -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIKEYS_API_KEYS_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/apikeys/api_keys_options.h b/google/cloud/apikeys/api_keys_options.h deleted file mode 100644 index 15775fe00eb88..0000000000000 --- a/google/cloud/apikeys/api_keys_options.h +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/api/apikeys/v2/apikeys.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIKEYS_API_KEYS_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIKEYS_API_KEYS_OPTIONS_H - -#include "google/cloud/apikeys/api_keys_connection.h" -#include "google/cloud/apikeys/api_keys_connection_idempotency_policy.h" -#include "google/cloud/apikeys/v2/api_keys_options.h" - -namespace google { -namespace cloud { -namespace apikeys { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use apikeys_v2::ApiKeysPollingPolicyOption directly. -using ::google::cloud::apikeys_v2::ApiKeysPollingPolicyOption; - -/// @deprecated Use apikeys_v2::ApiKeysBackoffPolicyOption directly. -using ::google::cloud::apikeys_v2::ApiKeysBackoffPolicyOption; - -/// @deprecated Use apikeys_v2::ApiKeysConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::apikeys_v2::ApiKeysConnectionIdempotencyPolicyOption; - -/// @deprecated Use apikeys_v2::ApiKeysPolicyOptionList directly. -using ::google::cloud::apikeys_v2::ApiKeysPolicyOptionList; - -/// @deprecated Use apikeys_v2::ApiKeysRetryPolicyOption directly. -using ::google::cloud::apikeys_v2::ApiKeysRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace apikeys -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIKEYS_API_KEYS_OPTIONS_H diff --git a/google/cloud/apikeys/mocks/mock_api_keys_connection.h b/google/cloud/apikeys/mocks/mock_api_keys_connection.h deleted file mode 100644 index 4022a1820decb..0000000000000 --- a/google/cloud/apikeys/mocks/mock_api_keys_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/api/apikeys/v2/apikeys.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIKEYS_MOCKS_MOCK_API_KEYS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIKEYS_MOCKS_MOCK_API_KEYS_CONNECTION_H - -#include "google/cloud/apikeys/api_keys_connection.h" -#include "google/cloud/apikeys/v2/mocks/mock_api_keys_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in apikeys_v2_mocks instead of the aliases -/// defined in this namespace. -namespace apikeys_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use apikeys_v2_mocks::MockApiKeysConnection directly. -using ::google::cloud::apikeys_v2_mocks::MockApiKeysConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace apikeys_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIKEYS_MOCKS_MOCK_API_KEYS_CONNECTION_H diff --git a/google/cloud/apikeys/quickstart/.bazelrc b/google/cloud/apikeys/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/apikeys/quickstart/.bazelrc +++ b/google/cloud/apikeys/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/apikeys/quickstart/CMakeLists.txt b/google/cloud/apikeys/quickstart/CMakeLists.txt index b0aa635b06ba9..fa968d0c91ef6 100644 --- a/google/cloud/apikeys/quickstart/CMakeLists.txt +++ b/google/cloud/apikeys/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the API Keys API C++ client library from a larger # CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-apikeys-quickstart CXX) find_package(google_cloud_cpp_apikeys REQUIRED) diff --git a/google/cloud/apikeys/v2/api_keys_client.h b/google/cloud/apikeys/v2/api_keys_client.h index 2be36706202f2..497962470258a 100644 --- a/google/cloud/apikeys/v2/api_keys_client.h +++ b/google/cloud/apikeys/v2/api_keys_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/apikeys/v2/api_keys_connection.h b/google/cloud/apikeys/v2/api_keys_connection.h index d31c39d5016fe..e2ed3166006aa 100644 --- a/google/cloud/apikeys/v2/api_keys_connection.h +++ b/google/cloud/apikeys/v2/api_keys_connection.h @@ -30,8 +30,8 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/api/apikeys/v2/apikeys.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/apikeys/v2/api_keys_connection_idempotency_policy.h b/google/cloud/apikeys/v2/api_keys_connection_idempotency_policy.h index ae88488a6f709..c130e9565ffa2 100644 --- a/google/cloud/apikeys/v2/api_keys_connection_idempotency_policy.h +++ b/google/cloud/apikeys/v2/api_keys_connection_idempotency_policy.h @@ -21,8 +21,8 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/api/apikeys/v2/apikeys.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/apikeys/v2/internal/api_keys_auth_decorator.cc b/google/cloud/apikeys/v2/internal/api_keys_auth_decorator.cc index 2cee7a101ec3e..567f49da84008 100644 --- a/google/cloud/apikeys/v2/internal/api_keys_auth_decorator.cc +++ b/google/cloud/apikeys/v2/internal/api_keys_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/api/apikeys/v2/apikeys.proto #include "google/cloud/apikeys/v2/internal/api_keys_auth_decorator.h" -#include +#include "google/api/apikeys/v2/apikeys.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apikeys_v2_internal { @@ -219,3 +222,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace apikeys_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/apikeys/v2/internal/api_keys_auth_decorator.h b/google/cloud/apikeys/v2/internal/api_keys_auth_decorator.h index 2022492482f28..f4a0cd2a1b541 100644 --- a/google/cloud/apikeys/v2/internal/api_keys_auth_decorator.h +++ b/google/cloud/apikeys/v2/internal/api_keys_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/apikeys/v2/internal/api_keys_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apikeys_v2_internal { @@ -121,4 +124,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIKEYS_V2_INTERNAL_API_KEYS_AUTH_DECORATOR_H diff --git a/google/cloud/apikeys/v2/internal/api_keys_connection_impl.h b/google/cloud/apikeys/v2/internal/api_keys_connection_impl.h index 0b4affed839a1..00f3d701d0e37 100644 --- a/google/cloud/apikeys/v2/internal/api_keys_connection_impl.h +++ b/google/cloud/apikeys/v2/internal/api_keys_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/apikeys/v2/internal/api_keys_logging_decorator.cc b/google/cloud/apikeys/v2/internal/api_keys_logging_decorator.cc index dc08d8cf174c3..530fdf7e7db17 100644 --- a/google/cloud/apikeys/v2/internal/api_keys_logging_decorator.cc +++ b/google/cloud/apikeys/v2/internal/api_keys_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/apikeys/v2/internal/api_keys_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/api/apikeys/v2/apikeys.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apikeys_v2_internal { @@ -243,3 +246,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace apikeys_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/apikeys/v2/internal/api_keys_logging_decorator.h b/google/cloud/apikeys/v2/internal/api_keys_logging_decorator.h index c1e1a80148367..a17c002215cc6 100644 --- a/google/cloud/apikeys/v2/internal/api_keys_logging_decorator.h +++ b/google/cloud/apikeys/v2/internal/api_keys_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/apikeys/v2/internal/api_keys_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apikeys_v2_internal { @@ -121,4 +124,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIKEYS_V2_INTERNAL_API_KEYS_LOGGING_DECORATOR_H diff --git a/google/cloud/apikeys/v2/internal/api_keys_metadata_decorator.cc b/google/cloud/apikeys/v2/internal/api_keys_metadata_decorator.cc index a38b3c956bce4..fdac36f41aefb 100644 --- a/google/cloud/apikeys/v2/internal/api_keys_metadata_decorator.cc +++ b/google/cloud/apikeys/v2/internal/api_keys_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/apikeys/v2/internal/api_keys_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/api/apikeys/v2/apikeys.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apikeys_v2_internal { @@ -207,3 +211,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace apikeys_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/apikeys/v2/internal/api_keys_metadata_decorator.h b/google/cloud/apikeys/v2/internal/api_keys_metadata_decorator.h index 28b73655e3f18..117220b7890eb 100644 --- a/google/cloud/apikeys/v2/internal/api_keys_metadata_decorator.h +++ b/google/cloud/apikeys/v2/internal/api_keys_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/apikeys/v2/internal/api_keys_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apikeys_v2_internal { @@ -126,4 +129,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIKEYS_V2_INTERNAL_API_KEYS_METADATA_DECORATOR_H diff --git a/google/cloud/apikeys/v2/internal/api_keys_option_defaults.cc b/google/cloud/apikeys/v2/internal/api_keys_option_defaults.cc index 92a132ccdf578..0ef4bb5b1206a 100644 --- a/google/cloud/apikeys/v2/internal/api_keys_option_defaults.cc +++ b/google/cloud/apikeys/v2/internal/api_keys_option_defaults.cc @@ -40,7 +40,7 @@ Options ApiKeysDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - apikeys_v2::ApiKeysLimitedTimeRetryPolicy(std::chrono::minutes(30)) + apikeys_v2::ApiKeysLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/apikeys/v2/internal/api_keys_stub.cc b/google/cloud/apikeys/v2/internal/api_keys_stub.cc index aa19c80e4136f..7328cec32bee4 100644 --- a/google/cloud/apikeys/v2/internal/api_keys_stub.cc +++ b/google/cloud/apikeys/v2/internal/api_keys_stub.cc @@ -19,11 +19,14 @@ #include "google/cloud/apikeys/v2/internal/api_keys_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/api/apikeys/v2/apikeys.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apikeys_v2_internal { @@ -245,3 +248,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace apikeys_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/apikeys/v2/internal/api_keys_stub.h b/google/cloud/apikeys/v2/internal/api_keys_stub.h index 83759ad184c58..c8ff6eeaa3d9b 100644 --- a/google/cloud/apikeys/v2/internal/api_keys_stub.h +++ b/google/cloud/apikeys/v2/internal/api_keys_stub.h @@ -24,11 +24,14 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/api/apikeys/v2/apikeys.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apikeys_v2_internal { @@ -204,4 +207,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIKEYS_V2_INTERNAL_API_KEYS_STUB_H diff --git a/google/cloud/apikeys/v2/internal/api_keys_stub_factory.cc b/google/cloud/apikeys/v2/internal/api_keys_stub_factory.cc index 5195d11709456..edc37ad6c0750 100644 --- a/google/cloud/apikeys/v2/internal/api_keys_stub_factory.cc +++ b/google/cloud/apikeys/v2/internal/api_keys_stub_factory.cc @@ -28,11 +28,14 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/api/apikeys/v2/apikeys.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apikeys_v2_internal { @@ -69,3 +72,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace apikeys_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/apikeys/v2/internal/api_keys_stub_factory.h b/google/cloud/apikeys/v2/internal/api_keys_stub_factory.h index 748719154e9a5..baddea2e216da 100644 --- a/google/cloud/apikeys/v2/internal/api_keys_stub_factory.h +++ b/google/cloud/apikeys/v2/internal/api_keys_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apikeys_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIKEYS_V2_INTERNAL_API_KEYS_STUB_FACTORY_H diff --git a/google/cloud/apikeys/v2/internal/api_keys_tracing_connection.cc b/google/cloud/apikeys/v2/internal/api_keys_tracing_connection.cc index 85e578504fddf..4eb8e3db000c8 100644 --- a/google/cloud/apikeys/v2/internal/api_keys_tracing_connection.cc +++ b/google/cloud/apikeys/v2/internal/api_keys_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace apikeys_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ApiKeysTracingConnection::ApiKeysTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -164,15 +162,11 @@ StatusOr ApiKeysTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeApiKeysTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/apikeys/v2/internal/api_keys_tracing_connection.h b/google/cloud/apikeys/v2/internal/api_keys_tracing_connection.h index 7e40c48d17fc3..209a16af49e38 100644 --- a/google/cloud/apikeys/v2/internal/api_keys_tracing_connection.h +++ b/google/cloud/apikeys/v2/internal/api_keys_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace apikeys_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ApiKeysTracingConnection : public apikeys_v2::ApiKeysConnection { public: ~ApiKeysTracingConnection() override = default; @@ -98,8 +96,6 @@ class ApiKeysTracingConnection : public apikeys_v2::ApiKeysConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/apikeys/v2/internal/api_keys_tracing_stub.cc b/google/cloud/apikeys/v2/internal/api_keys_tracing_stub.cc index 88df642e28a5c..d0169f58b5bf6 100644 --- a/google/cloud/apikeys/v2/internal/api_keys_tracing_stub.cc +++ b/google/cloud/apikeys/v2/internal/api_keys_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apikeys_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ApiKeysTracingStub::ApiKeysTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -216,18 +217,14 @@ future ApiKeysTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeApiKeysTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace apikeys_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/apikeys/v2/internal/api_keys_tracing_stub.h b/google/cloud/apikeys/v2/internal/api_keys_tracing_stub.h index 0633583786c4d..c8703ae4d2936 100644 --- a/google/cloud/apikeys/v2/internal/api_keys_tracing_stub.h +++ b/google/cloud/apikeys/v2/internal/api_keys_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apikeys_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ApiKeysTracingStub : public ApiKeysStub { public: ~ApiKeysTracingStub() override = default; @@ -116,8 +117,6 @@ class ApiKeysTracingStub : public ApiKeysStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -132,4 +131,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIKEYS_V2_INTERNAL_API_KEYS_TRACING_STUB_H diff --git a/google/cloud/apiregistry/BUILD.bazel b/google/cloud/apiregistry/BUILD.bazel index b6758ea5301a9..734cfecfc9ccb 100644 --- a/google/cloud/apiregistry/BUILD.bazel +++ b/google/cloud/apiregistry/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/apiregistry/v1:apiregistry_cc_grpc", + "@googleapis//google/cloud/apiregistry/v1:apiregistry_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/apiregistry/quickstart/CMakeLists.txt b/google/cloud/apiregistry/quickstart/CMakeLists.txt index 1d782abb87bee..6bbdd791bd0e0 100644 --- a/google/cloud/apiregistry/quickstart/CMakeLists.txt +++ b/google/cloud/apiregistry/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud API Registry API C++ client library from # a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-apiregistry-quickstart CXX) find_package(google_cloud_cpp_apiregistry REQUIRED) diff --git a/google/cloud/apiregistry/v1/cloud_api_registry_connection.h b/google/cloud/apiregistry/v1/cloud_api_registry_connection.h index d2fc7bb2668eb..ec46192e3220e 100644 --- a/google/cloud/apiregistry/v1/cloud_api_registry_connection.h +++ b/google/cloud/apiregistry/v1/cloud_api_registry_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/apiregistry/v1/cloud_api_registry_connection_idempotency_policy.h" #include "google/cloud/apiregistry/v1/internal/cloud_api_registry_retry_traits.h" +#include "google/cloud/apiregistry/v1/service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/apiregistry/v1/cloud_api_registry_connection_idempotency_policy.h b/google/cloud/apiregistry/v1/cloud_api_registry_connection_idempotency_policy.h index 4ef1549399271..18e7776c7f048 100644 --- a/google/cloud/apiregistry/v1/cloud_api_registry_connection_idempotency_policy.h +++ b/google/cloud/apiregistry/v1/cloud_api_registry_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIREGISTRY_V1_CLOUD_API_REGISTRY_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIREGISTRY_V1_CLOUD_API_REGISTRY_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/apiregistry/v1/service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/apiregistry/v1/internal/cloud_api_registry_auth_decorator.cc b/google/cloud/apiregistry/v1/internal/cloud_api_registry_auth_decorator.cc index 5389a7dd2db0c..e444f8f816828 100644 --- a/google/cloud/apiregistry/v1/internal/cloud_api_registry_auth_decorator.cc +++ b/google/cloud/apiregistry/v1/internal/cloud_api_registry_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/apiregistry/v1/service.proto #include "google/cloud/apiregistry/v1/internal/cloud_api_registry_auth_decorator.h" -#include +#include "google/cloud/apiregistry/v1/service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apiregistry_v1_internal { @@ -88,3 +91,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace apiregistry_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/apiregistry/v1/internal/cloud_api_registry_auth_decorator.h b/google/cloud/apiregistry/v1/internal/cloud_api_registry_auth_decorator.h index a9e56dd00dd1d..6611d200dbc3f 100644 --- a/google/cloud/apiregistry/v1/internal/cloud_api_registry_auth_decorator.h +++ b/google/cloud/apiregistry/v1/internal/cloud_api_registry_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apiregistry_v1_internal { @@ -76,4 +79,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIREGISTRY_V1_INTERNAL_CLOUD_API_REGISTRY_AUTH_DECORATOR_H diff --git a/google/cloud/apiregistry/v1/internal/cloud_api_registry_logging_decorator.cc b/google/cloud/apiregistry/v1/internal/cloud_api_registry_logging_decorator.cc index 2afb0b0652370..4304f8b273a0c 100644 --- a/google/cloud/apiregistry/v1/internal/cloud_api_registry_logging_decorator.cc +++ b/google/cloud/apiregistry/v1/internal/cloud_api_registry_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/apiregistry/v1/service.proto #include "google/cloud/apiregistry/v1/internal/cloud_api_registry_logging_decorator.h" +#include "google/cloud/apiregistry/v1/service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apiregistry_v1_internal { @@ -114,3 +117,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace apiregistry_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/apiregistry/v1/internal/cloud_api_registry_logging_decorator.h b/google/cloud/apiregistry/v1/internal/cloud_api_registry_logging_decorator.h index 51b2ebc1b7566..2ba753dbb62e0 100644 --- a/google/cloud/apiregistry/v1/internal/cloud_api_registry_logging_decorator.h +++ b/google/cloud/apiregistry/v1/internal/cloud_api_registry_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apiregistry_v1_internal { @@ -76,4 +79,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIREGISTRY_V1_INTERNAL_CLOUD_API_REGISTRY_LOGGING_DECORATOR_H diff --git a/google/cloud/apiregistry/v1/internal/cloud_api_registry_metadata_decorator.cc b/google/cloud/apiregistry/v1/internal/cloud_api_registry_metadata_decorator.cc index fe369e8676ed8..2a438feaca914 100644 --- a/google/cloud/apiregistry/v1/internal/cloud_api_registry_metadata_decorator.cc +++ b/google/cloud/apiregistry/v1/internal/cloud_api_registry_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/apiregistry/v1/service.proto #include "google/cloud/apiregistry/v1/internal/cloud_api_registry_metadata_decorator.h" +#include "google/cloud/apiregistry/v1/service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apiregistry_v1_internal { @@ -115,3 +119,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace apiregistry_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/apiregistry/v1/internal/cloud_api_registry_metadata_decorator.h b/google/cloud/apiregistry/v1/internal/cloud_api_registry_metadata_decorator.h index 2a24a658c606c..6d93b6392e63b 100644 --- a/google/cloud/apiregistry/v1/internal/cloud_api_registry_metadata_decorator.h +++ b/google/cloud/apiregistry/v1/internal/cloud_api_registry_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apiregistry_v1_internal { @@ -82,4 +85,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIREGISTRY_V1_INTERNAL_CLOUD_API_REGISTRY_METADATA_DECORATOR_H diff --git a/google/cloud/apiregistry/v1/internal/cloud_api_registry_option_defaults.cc b/google/cloud/apiregistry/v1/internal/cloud_api_registry_option_defaults.cc index 29e305704f20e..591c9a50547d9 100644 --- a/google/cloud/apiregistry/v1/internal/cloud_api_registry_option_defaults.cc +++ b/google/cloud/apiregistry/v1/internal/cloud_api_registry_option_defaults.cc @@ -42,7 +42,7 @@ Options CloudApiRegistryDefaultOptions(Options options) { if (!options.has()) { options.set( apiregistry_v1::CloudApiRegistryLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/apiregistry/v1/internal/cloud_api_registry_stub.cc b/google/cloud/apiregistry/v1/internal/cloud_api_registry_stub.cc index 818a19cf4d3b7..e1b8fd65afcb8 100644 --- a/google/cloud/apiregistry/v1/internal/cloud_api_registry_stub.cc +++ b/google/cloud/apiregistry/v1/internal/cloud_api_registry_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/apiregistry/v1/service.proto #include "google/cloud/apiregistry/v1/internal/cloud_api_registry_stub.h" +#include "google/cloud/apiregistry/v1/service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apiregistry_v1_internal { @@ -106,3 +109,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace apiregistry_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/apiregistry/v1/internal/cloud_api_registry_stub.h b/google/cloud/apiregistry/v1/internal/cloud_api_registry_stub.h index 211e3a889634f..275c4e9e1f915 100644 --- a/google/cloud/apiregistry/v1/internal/cloud_api_registry_stub.h +++ b/google/cloud/apiregistry/v1/internal/cloud_api_registry_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIREGISTRY_V1_INTERNAL_CLOUD_API_REGISTRY_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIREGISTRY_V1_INTERNAL_CLOUD_API_REGISTRY_STUB_H +#include "google/cloud/apiregistry/v1/service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apiregistry_v1_internal { @@ -116,4 +119,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIREGISTRY_V1_INTERNAL_CLOUD_API_REGISTRY_STUB_H diff --git a/google/cloud/apiregistry/v1/internal/cloud_api_registry_stub_factory.cc b/google/cloud/apiregistry/v1/internal/cloud_api_registry_stub_factory.cc index 6c84f5c85cd62..b7887f093c3ba 100644 --- a/google/cloud/apiregistry/v1/internal/cloud_api_registry_stub_factory.cc +++ b/google/cloud/apiregistry/v1/internal/cloud_api_registry_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/apiregistry/v1/internal/cloud_api_registry_metadata_decorator.h" #include "google/cloud/apiregistry/v1/internal/cloud_api_registry_stub.h" #include "google/cloud/apiregistry/v1/internal/cloud_api_registry_tracing_stub.h" +#include "google/cloud/apiregistry/v1/service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apiregistry_v1_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace apiregistry_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/apiregistry/v1/internal/cloud_api_registry_stub_factory.h b/google/cloud/apiregistry/v1/internal/cloud_api_registry_stub_factory.h index 7885509c78c21..d27f858c4068d 100644 --- a/google/cloud/apiregistry/v1/internal/cloud_api_registry_stub_factory.h +++ b/google/cloud/apiregistry/v1/internal/cloud_api_registry_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apiregistry_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIREGISTRY_V1_INTERNAL_CLOUD_API_REGISTRY_STUB_FACTORY_H diff --git a/google/cloud/apiregistry/v1/internal/cloud_api_registry_tracing_connection.cc b/google/cloud/apiregistry/v1/internal/cloud_api_registry_tracing_connection.cc index 9202a283928e2..17d44600a7714 100644 --- a/google/cloud/apiregistry/v1/internal/cloud_api_registry_tracing_connection.cc +++ b/google/cloud/apiregistry/v1/internal/cloud_api_registry_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace apiregistry_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudApiRegistryTracingConnection::CloudApiRegistryTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -94,16 +92,12 @@ CloudApiRegistryTracingConnection::GetLocation( return internal::EndSpan(*span, child_->GetLocation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCloudApiRegistryTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/apiregistry/v1/internal/cloud_api_registry_tracing_connection.h b/google/cloud/apiregistry/v1/internal/cloud_api_registry_tracing_connection.h index a9b53c8bf117a..d258b5935240b 100644 --- a/google/cloud/apiregistry/v1/internal/cloud_api_registry_tracing_connection.h +++ b/google/cloud/apiregistry/v1/internal/cloud_api_registry_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace apiregistry_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudApiRegistryTracingConnection : public apiregistry_v1::CloudApiRegistryConnection { public: @@ -64,8 +62,6 @@ class CloudApiRegistryTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/apiregistry/v1/internal/cloud_api_registry_tracing_stub.cc b/google/cloud/apiregistry/v1/internal/cloud_api_registry_tracing_stub.cc index 06b5454f5fafc..d45cb36fcc856 100644 --- a/google/cloud/apiregistry/v1/internal/cloud_api_registry_tracing_stub.cc +++ b/google/cloud/apiregistry/v1/internal/cloud_api_registry_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apiregistry_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudApiRegistryTracingStub::CloudApiRegistryTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -104,18 +105,14 @@ CloudApiRegistryTracingStub::GetLocation( child_->GetLocation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCloudApiRegistryTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace apiregistry_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/apiregistry/v1/internal/cloud_api_registry_tracing_stub.h b/google/cloud/apiregistry/v1/internal/cloud_api_registry_tracing_stub.h index f684b07836511..62cfe8eeadfbd 100644 --- a/google/cloud/apiregistry/v1/internal/cloud_api_registry_tracing_stub.h +++ b/google/cloud/apiregistry/v1/internal/cloud_api_registry_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apiregistry_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudApiRegistryTracingStub : public CloudApiRegistryStub { public: ~CloudApiRegistryTracingStub() override = default; @@ -73,8 +74,6 @@ class CloudApiRegistryTracingStub : public CloudApiRegistryStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -89,4 +88,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APIREGISTRY_V1_INTERNAL_CLOUD_API_REGISTRY_TRACING_STUB_H diff --git a/google/cloud/appengine/BUILD.bazel b/google/cloud/appengine/BUILD.bazel index dbc35a71b2972..9f5046349c8f7 100644 --- a/google/cloud/appengine/BUILD.bazel +++ b/google/cloud/appengine/BUILD.bazel @@ -19,14 +19,13 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/appengine/legacy:legacy_cc_grpc", - "@com_google_googleapis//google/appengine/logging/v1:logging_cc_grpc", - "@com_google_googleapis//google/appengine/v1:appengine_cc_grpc", + "@googleapis//google/appengine/legacy:legacy_cc_grpc", + "@googleapis//google/appengine/logging/v1:logging_cc_grpc", + "@googleapis//google/appengine/v1:appengine_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/appengine/CMakeLists.txt b/google/cloud/appengine/CMakeLists.txt index 9dee07931b368..a82c639c7b1f2 100644 --- a/google/cloud/appengine/CMakeLists.txt +++ b/google/cloud/appengine/CMakeLists.txt @@ -18,7 +18,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library( appengine "App Engine Admin API" - SERVICE_DIRS "__EMPTY__" "v1/" + SERVICE_DIRS "v1/" SHARED_PROTO_DEPS "logging_type") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) diff --git a/google/cloud/appengine/applications_client.h b/google/cloud/appengine/applications_client.h deleted file mode 100644 index 2d4508d7967c4..0000000000000 --- a/google/cloud/appengine/applications_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_APPLICATIONS_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_APPLICATIONS_CLIENT_H - -#include "google/cloud/appengine/applications_connection.h" -#include "google/cloud/appengine/v1/applications_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in appengine_v1 instead of the aliases defined in -/// this namespace. -namespace appengine { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1::ApplicationsClient directly. -using ::google::cloud::appengine_v1::ApplicationsClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_APPLICATIONS_CLIENT_H diff --git a/google/cloud/appengine/applications_connection.h b/google/cloud/appengine/applications_connection.h deleted file mode 100644 index 1dcfc5984fb6a..0000000000000 --- a/google/cloud/appengine/applications_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_APPLICATIONS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_APPLICATIONS_CONNECTION_H - -#include "google/cloud/appengine/applications_connection_idempotency_policy.h" -#include "google/cloud/appengine/v1/applications_connection.h" - -namespace google { -namespace cloud { -namespace appengine { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1::MakeApplicationsConnection directly. -using ::google::cloud::appengine_v1::MakeApplicationsConnection; - -/// @deprecated Use appengine_v1::ApplicationsConnection directly. -using ::google::cloud::appengine_v1::ApplicationsConnection; - -/// @deprecated Use appengine_v1::ApplicationsLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::appengine_v1::ApplicationsLimitedErrorCountRetryPolicy; - -/// @deprecated Use appengine_v1::ApplicationsLimitedTimeRetryPolicy directly. -using ::google::cloud::appengine_v1::ApplicationsLimitedTimeRetryPolicy; - -/// @deprecated Use appengine_v1::ApplicationsRetryPolicy directly. -using ::google::cloud::appengine_v1::ApplicationsRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_APPLICATIONS_CONNECTION_H diff --git a/google/cloud/appengine/applications_connection_idempotency_policy.h b/google/cloud/appengine/applications_connection_idempotency_policy.h deleted file mode 100644 index aa93a19e506cb..0000000000000 --- a/google/cloud/appengine/applications_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_APPLICATIONS_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_APPLICATIONS_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/appengine/v1/applications_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace appengine { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// appengine_v1::MakeDefaultApplicationsConnectionIdempotencyPolicy directly. -using ::google::cloud::appengine_v1:: - MakeDefaultApplicationsConnectionIdempotencyPolicy; - -/// @deprecated Use appengine_v1::ApplicationsConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::appengine_v1::ApplicationsConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_APPLICATIONS_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/appengine/applications_options.h b/google/cloud/appengine/applications_options.h deleted file mode 100644 index 164cf1a04cb6b..0000000000000 --- a/google/cloud/appengine/applications_options.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_APPLICATIONS_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_APPLICATIONS_OPTIONS_H - -#include "google/cloud/appengine/applications_connection.h" -#include "google/cloud/appengine/applications_connection_idempotency_policy.h" -#include "google/cloud/appengine/v1/applications_options.h" - -namespace google { -namespace cloud { -namespace appengine { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1::ApplicationsPollingPolicyOption directly. -using ::google::cloud::appengine_v1::ApplicationsPollingPolicyOption; - -/// @deprecated Use appengine_v1::ApplicationsBackoffPolicyOption directly. -using ::google::cloud::appengine_v1::ApplicationsBackoffPolicyOption; - -/// @deprecated Use appengine_v1::ApplicationsConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::appengine_v1:: - ApplicationsConnectionIdempotencyPolicyOption; - -/// @deprecated Use appengine_v1::ApplicationsPolicyOptionList directly. -using ::google::cloud::appengine_v1::ApplicationsPolicyOptionList; - -/// @deprecated Use appengine_v1::ApplicationsRetryPolicyOption directly. -using ::google::cloud::appengine_v1::ApplicationsRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_APPLICATIONS_OPTIONS_H diff --git a/google/cloud/appengine/authorized_certificates_client.h b/google/cloud/appengine/authorized_certificates_client.h deleted file mode 100644 index 68ffd8bcecaa9..0000000000000 --- a/google/cloud/appengine/authorized_certificates_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_AUTHORIZED_CERTIFICATES_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_AUTHORIZED_CERTIFICATES_CLIENT_H - -#include "google/cloud/appengine/authorized_certificates_connection.h" -#include "google/cloud/appengine/v1/authorized_certificates_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in appengine_v1 instead of the aliases defined in -/// this namespace. -namespace appengine { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1::AuthorizedCertificatesClient directly. -using ::google::cloud::appengine_v1::AuthorizedCertificatesClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_AUTHORIZED_CERTIFICATES_CLIENT_H diff --git a/google/cloud/appengine/authorized_certificates_connection.h b/google/cloud/appengine/authorized_certificates_connection.h deleted file mode 100644 index 29f7c62a37f7e..0000000000000 --- a/google/cloud/appengine/authorized_certificates_connection.h +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_AUTHORIZED_CERTIFICATES_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_AUTHORIZED_CERTIFICATES_CONNECTION_H - -#include "google/cloud/appengine/authorized_certificates_connection_idempotency_policy.h" -#include "google/cloud/appengine/v1/authorized_certificates_connection.h" - -namespace google { -namespace cloud { -namespace appengine { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1::MakeAuthorizedCertificatesConnection directly. -using ::google::cloud::appengine_v1::MakeAuthorizedCertificatesConnection; - -/// @deprecated Use appengine_v1::AuthorizedCertificatesConnection directly. -using ::google::cloud::appengine_v1::AuthorizedCertificatesConnection; - -/// @deprecated Use -/// appengine_v1::AuthorizedCertificatesLimitedErrorCountRetryPolicy directly. -using ::google::cloud::appengine_v1:: - AuthorizedCertificatesLimitedErrorCountRetryPolicy; - -/// @deprecated Use appengine_v1::AuthorizedCertificatesLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::appengine_v1:: - AuthorizedCertificatesLimitedTimeRetryPolicy; - -/// @deprecated Use appengine_v1::AuthorizedCertificatesRetryPolicy directly. -using ::google::cloud::appengine_v1::AuthorizedCertificatesRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_AUTHORIZED_CERTIFICATES_CONNECTION_H diff --git a/google/cloud/appengine/authorized_certificates_connection_idempotency_policy.h b/google/cloud/appengine/authorized_certificates_connection_idempotency_policy.h deleted file mode 100644 index 0787975666c6c..0000000000000 --- a/google/cloud/appengine/authorized_certificates_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_AUTHORIZED_CERTIFICATES_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_AUTHORIZED_CERTIFICATES_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/appengine/v1/authorized_certificates_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace appengine { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// appengine_v1::MakeDefaultAuthorizedCertificatesConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::appengine_v1:: - MakeDefaultAuthorizedCertificatesConnectionIdempotencyPolicy; - -/// @deprecated Use -/// appengine_v1::AuthorizedCertificatesConnectionIdempotencyPolicy directly. -using ::google::cloud::appengine_v1:: - AuthorizedCertificatesConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_AUTHORIZED_CERTIFICATES_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/appengine/authorized_certificates_options.h b/google/cloud/appengine/authorized_certificates_options.h deleted file mode 100644 index fa9a8bc820d09..0000000000000 --- a/google/cloud/appengine/authorized_certificates_options.h +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_AUTHORIZED_CERTIFICATES_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_AUTHORIZED_CERTIFICATES_OPTIONS_H - -#include "google/cloud/appengine/authorized_certificates_connection.h" -#include "google/cloud/appengine/authorized_certificates_connection_idempotency_policy.h" -#include "google/cloud/appengine/v1/authorized_certificates_options.h" - -namespace google { -namespace cloud { -namespace appengine { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1::AuthorizedCertificatesBackoffPolicyOption -/// directly. -using ::google::cloud::appengine_v1::AuthorizedCertificatesBackoffPolicyOption; - -/// @deprecated Use -/// appengine_v1::AuthorizedCertificatesConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::appengine_v1:: - AuthorizedCertificatesConnectionIdempotencyPolicyOption; - -/// @deprecated Use appengine_v1::AuthorizedCertificatesPolicyOptionList -/// directly. -using ::google::cloud::appengine_v1::AuthorizedCertificatesPolicyOptionList; - -/// @deprecated Use appengine_v1::AuthorizedCertificatesRetryPolicyOption -/// directly. -using ::google::cloud::appengine_v1::AuthorizedCertificatesRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_AUTHORIZED_CERTIFICATES_OPTIONS_H diff --git a/google/cloud/appengine/authorized_domains_client.h b/google/cloud/appengine/authorized_domains_client.h deleted file mode 100644 index 59ecc60acbab2..0000000000000 --- a/google/cloud/appengine/authorized_domains_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_AUTHORIZED_DOMAINS_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_AUTHORIZED_DOMAINS_CLIENT_H - -#include "google/cloud/appengine/authorized_domains_connection.h" -#include "google/cloud/appengine/v1/authorized_domains_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in appengine_v1 instead of the aliases defined in -/// this namespace. -namespace appengine { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1::AuthorizedDomainsClient directly. -using ::google::cloud::appengine_v1::AuthorizedDomainsClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_AUTHORIZED_DOMAINS_CLIENT_H diff --git a/google/cloud/appengine/authorized_domains_connection.h b/google/cloud/appengine/authorized_domains_connection.h deleted file mode 100644 index 2ccc4ea5df5b9..0000000000000 --- a/google/cloud/appengine/authorized_domains_connection.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_AUTHORIZED_DOMAINS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_AUTHORIZED_DOMAINS_CONNECTION_H - -#include "google/cloud/appengine/authorized_domains_connection_idempotency_policy.h" -#include "google/cloud/appengine/v1/authorized_domains_connection.h" - -namespace google { -namespace cloud { -namespace appengine { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1::MakeAuthorizedDomainsConnection directly. -using ::google::cloud::appengine_v1::MakeAuthorizedDomainsConnection; - -/// @deprecated Use appengine_v1::AuthorizedDomainsConnection directly. -using ::google::cloud::appengine_v1::AuthorizedDomainsConnection; - -/// @deprecated Use appengine_v1::AuthorizedDomainsLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::appengine_v1:: - AuthorizedDomainsLimitedErrorCountRetryPolicy; - -/// @deprecated Use appengine_v1::AuthorizedDomainsLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::appengine_v1::AuthorizedDomainsLimitedTimeRetryPolicy; - -/// @deprecated Use appengine_v1::AuthorizedDomainsRetryPolicy directly. -using ::google::cloud::appengine_v1::AuthorizedDomainsRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_AUTHORIZED_DOMAINS_CONNECTION_H diff --git a/google/cloud/appengine/authorized_domains_connection_idempotency_policy.h b/google/cloud/appengine/authorized_domains_connection_idempotency_policy.h deleted file mode 100644 index e35bec99a5f9c..0000000000000 --- a/google/cloud/appengine/authorized_domains_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_AUTHORIZED_DOMAINS_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_AUTHORIZED_DOMAINS_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/appengine/v1/authorized_domains_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace appengine { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// appengine_v1::MakeDefaultAuthorizedDomainsConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::appengine_v1:: - MakeDefaultAuthorizedDomainsConnectionIdempotencyPolicy; - -/// @deprecated Use appengine_v1::AuthorizedDomainsConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::appengine_v1:: - AuthorizedDomainsConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_AUTHORIZED_DOMAINS_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/appengine/authorized_domains_options.h b/google/cloud/appengine/authorized_domains_options.h deleted file mode 100644 index 374ee80ee7548..0000000000000 --- a/google/cloud/appengine/authorized_domains_options.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_AUTHORIZED_DOMAINS_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_AUTHORIZED_DOMAINS_OPTIONS_H - -#include "google/cloud/appengine/authorized_domains_connection.h" -#include "google/cloud/appengine/authorized_domains_connection_idempotency_policy.h" -#include "google/cloud/appengine/v1/authorized_domains_options.h" - -namespace google { -namespace cloud { -namespace appengine { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1::AuthorizedDomainsBackoffPolicyOption directly. -using ::google::cloud::appengine_v1::AuthorizedDomainsBackoffPolicyOption; - -/// @deprecated Use -/// appengine_v1::AuthorizedDomainsConnectionIdempotencyPolicyOption directly. -using ::google::cloud::appengine_v1:: - AuthorizedDomainsConnectionIdempotencyPolicyOption; - -/// @deprecated Use appengine_v1::AuthorizedDomainsPolicyOptionList directly. -using ::google::cloud::appengine_v1::AuthorizedDomainsPolicyOptionList; - -/// @deprecated Use appengine_v1::AuthorizedDomainsRetryPolicyOption directly. -using ::google::cloud::appengine_v1::AuthorizedDomainsRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_AUTHORIZED_DOMAINS_OPTIONS_H diff --git a/google/cloud/appengine/domain_mappings_client.h b/google/cloud/appengine/domain_mappings_client.h deleted file mode 100644 index 21a6dbb2577de..0000000000000 --- a/google/cloud/appengine/domain_mappings_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_DOMAIN_MAPPINGS_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_DOMAIN_MAPPINGS_CLIENT_H - -#include "google/cloud/appengine/domain_mappings_connection.h" -#include "google/cloud/appengine/v1/domain_mappings_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in appengine_v1 instead of the aliases defined in -/// this namespace. -namespace appengine { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1::DomainMappingsClient directly. -using ::google::cloud::appengine_v1::DomainMappingsClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_DOMAIN_MAPPINGS_CLIENT_H diff --git a/google/cloud/appengine/domain_mappings_connection.h b/google/cloud/appengine/domain_mappings_connection.h deleted file mode 100644 index cae216f3a7d8c..0000000000000 --- a/google/cloud/appengine/domain_mappings_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_DOMAIN_MAPPINGS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_DOMAIN_MAPPINGS_CONNECTION_H - -#include "google/cloud/appengine/domain_mappings_connection_idempotency_policy.h" -#include "google/cloud/appengine/v1/domain_mappings_connection.h" - -namespace google { -namespace cloud { -namespace appengine { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1::MakeDomainMappingsConnection directly. -using ::google::cloud::appengine_v1::MakeDomainMappingsConnection; - -/// @deprecated Use appengine_v1::DomainMappingsConnection directly. -using ::google::cloud::appengine_v1::DomainMappingsConnection; - -/// @deprecated Use appengine_v1::DomainMappingsLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::appengine_v1::DomainMappingsLimitedErrorCountRetryPolicy; - -/// @deprecated Use appengine_v1::DomainMappingsLimitedTimeRetryPolicy directly. -using ::google::cloud::appengine_v1::DomainMappingsLimitedTimeRetryPolicy; - -/// @deprecated Use appengine_v1::DomainMappingsRetryPolicy directly. -using ::google::cloud::appengine_v1::DomainMappingsRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_DOMAIN_MAPPINGS_CONNECTION_H diff --git a/google/cloud/appengine/domain_mappings_connection_idempotency_policy.h b/google/cloud/appengine/domain_mappings_connection_idempotency_policy.h deleted file mode 100644 index 3c535df709204..0000000000000 --- a/google/cloud/appengine/domain_mappings_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_DOMAIN_MAPPINGS_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_DOMAIN_MAPPINGS_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/appengine/v1/domain_mappings_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace appengine { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// appengine_v1::MakeDefaultDomainMappingsConnectionIdempotencyPolicy directly. -using ::google::cloud::appengine_v1:: - MakeDefaultDomainMappingsConnectionIdempotencyPolicy; - -/// @deprecated Use appengine_v1::DomainMappingsConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::appengine_v1::DomainMappingsConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_DOMAIN_MAPPINGS_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/appengine/domain_mappings_options.h b/google/cloud/appengine/domain_mappings_options.h deleted file mode 100644 index 24cb092e57566..0000000000000 --- a/google/cloud/appengine/domain_mappings_options.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_DOMAIN_MAPPINGS_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_DOMAIN_MAPPINGS_OPTIONS_H - -#include "google/cloud/appengine/domain_mappings_connection.h" -#include "google/cloud/appengine/domain_mappings_connection_idempotency_policy.h" -#include "google/cloud/appengine/v1/domain_mappings_options.h" - -namespace google { -namespace cloud { -namespace appengine { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1::DomainMappingsPollingPolicyOption directly. -using ::google::cloud::appengine_v1::DomainMappingsPollingPolicyOption; - -/// @deprecated Use appengine_v1::DomainMappingsBackoffPolicyOption directly. -using ::google::cloud::appengine_v1::DomainMappingsBackoffPolicyOption; - -/// @deprecated Use -/// appengine_v1::DomainMappingsConnectionIdempotencyPolicyOption directly. -using ::google::cloud::appengine_v1:: - DomainMappingsConnectionIdempotencyPolicyOption; - -/// @deprecated Use appengine_v1::DomainMappingsPolicyOptionList directly. -using ::google::cloud::appengine_v1::DomainMappingsPolicyOptionList; - -/// @deprecated Use appengine_v1::DomainMappingsRetryPolicyOption directly. -using ::google::cloud::appengine_v1::DomainMappingsRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_DOMAIN_MAPPINGS_OPTIONS_H diff --git a/google/cloud/appengine/firewall_client.h b/google/cloud/appengine/firewall_client.h deleted file mode 100644 index bfe06f596d985..0000000000000 --- a/google/cloud/appengine/firewall_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_FIREWALL_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_FIREWALL_CLIENT_H - -#include "google/cloud/appengine/firewall_connection.h" -#include "google/cloud/appengine/v1/firewall_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in appengine_v1 instead of the aliases defined in -/// this namespace. -namespace appengine { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1::FirewallClient directly. -using ::google::cloud::appengine_v1::FirewallClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_FIREWALL_CLIENT_H diff --git a/google/cloud/appengine/firewall_connection.h b/google/cloud/appengine/firewall_connection.h deleted file mode 100644 index 35353d72e8316..0000000000000 --- a/google/cloud/appengine/firewall_connection.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_FIREWALL_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_FIREWALL_CONNECTION_H - -#include "google/cloud/appengine/firewall_connection_idempotency_policy.h" -#include "google/cloud/appengine/v1/firewall_connection.h" - -namespace google { -namespace cloud { -namespace appengine { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1::MakeFirewallConnection directly. -using ::google::cloud::appengine_v1::MakeFirewallConnection; - -/// @deprecated Use appengine_v1::FirewallConnection directly. -using ::google::cloud::appengine_v1::FirewallConnection; - -/// @deprecated Use appengine_v1::FirewallLimitedErrorCountRetryPolicy directly. -using ::google::cloud::appengine_v1::FirewallLimitedErrorCountRetryPolicy; - -/// @deprecated Use appengine_v1::FirewallLimitedTimeRetryPolicy directly. -using ::google::cloud::appengine_v1::FirewallLimitedTimeRetryPolicy; - -/// @deprecated Use appengine_v1::FirewallRetryPolicy directly. -using ::google::cloud::appengine_v1::FirewallRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_FIREWALL_CONNECTION_H diff --git a/google/cloud/appengine/firewall_connection_idempotency_policy.h b/google/cloud/appengine/firewall_connection_idempotency_policy.h deleted file mode 100644 index 1ab1bc3200dea..0000000000000 --- a/google/cloud/appengine/firewall_connection_idempotency_policy.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_FIREWALL_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_FIREWALL_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/appengine/v1/firewall_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace appengine { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1::MakeDefaultFirewallConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::appengine_v1:: - MakeDefaultFirewallConnectionIdempotencyPolicy; - -/// @deprecated Use appengine_v1::FirewallConnectionIdempotencyPolicy directly. -using ::google::cloud::appengine_v1::FirewallConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_FIREWALL_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/appengine/firewall_options.h b/google/cloud/appengine/firewall_options.h deleted file mode 100644 index 77fba158950d8..0000000000000 --- a/google/cloud/appengine/firewall_options.h +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_FIREWALL_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_FIREWALL_OPTIONS_H - -#include "google/cloud/appengine/firewall_connection.h" -#include "google/cloud/appengine/firewall_connection_idempotency_policy.h" -#include "google/cloud/appengine/v1/firewall_options.h" - -namespace google { -namespace cloud { -namespace appengine { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1::FirewallBackoffPolicyOption directly. -using ::google::cloud::appengine_v1::FirewallBackoffPolicyOption; - -/// @deprecated Use appengine_v1::FirewallConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::appengine_v1::FirewallConnectionIdempotencyPolicyOption; - -/// @deprecated Use appengine_v1::FirewallPolicyOptionList directly. -using ::google::cloud::appengine_v1::FirewallPolicyOptionList; - -/// @deprecated Use appengine_v1::FirewallRetryPolicyOption directly. -using ::google::cloud::appengine_v1::FirewallRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_FIREWALL_OPTIONS_H diff --git a/google/cloud/appengine/instances_client.h b/google/cloud/appengine/instances_client.h deleted file mode 100644 index 4a6dc74b581e8..0000000000000 --- a/google/cloud/appengine/instances_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_INSTANCES_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_INSTANCES_CLIENT_H - -#include "google/cloud/appengine/instances_connection.h" -#include "google/cloud/appengine/v1/instances_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in appengine_v1 instead of the aliases defined in -/// this namespace. -namespace appengine { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1::InstancesClient directly. -using ::google::cloud::appengine_v1::InstancesClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_INSTANCES_CLIENT_H diff --git a/google/cloud/appengine/instances_connection.h b/google/cloud/appengine/instances_connection.h deleted file mode 100644 index 9020f69687cd0..0000000000000 --- a/google/cloud/appengine/instances_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_INSTANCES_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_INSTANCES_CONNECTION_H - -#include "google/cloud/appengine/instances_connection_idempotency_policy.h" -#include "google/cloud/appengine/v1/instances_connection.h" - -namespace google { -namespace cloud { -namespace appengine { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1::MakeInstancesConnection directly. -using ::google::cloud::appengine_v1::MakeInstancesConnection; - -/// @deprecated Use appengine_v1::InstancesConnection directly. -using ::google::cloud::appengine_v1::InstancesConnection; - -/// @deprecated Use appengine_v1::InstancesLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::appengine_v1::InstancesLimitedErrorCountRetryPolicy; - -/// @deprecated Use appengine_v1::InstancesLimitedTimeRetryPolicy directly. -using ::google::cloud::appengine_v1::InstancesLimitedTimeRetryPolicy; - -/// @deprecated Use appengine_v1::InstancesRetryPolicy directly. -using ::google::cloud::appengine_v1::InstancesRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_INSTANCES_CONNECTION_H diff --git a/google/cloud/appengine/instances_connection_idempotency_policy.h b/google/cloud/appengine/instances_connection_idempotency_policy.h deleted file mode 100644 index 0c70380c44a3b..0000000000000 --- a/google/cloud/appengine/instances_connection_idempotency_policy.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_INSTANCES_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_INSTANCES_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/appengine/v1/instances_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace appengine { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// appengine_v1::MakeDefaultInstancesConnectionIdempotencyPolicy directly. -using ::google::cloud::appengine_v1:: - MakeDefaultInstancesConnectionIdempotencyPolicy; - -/// @deprecated Use appengine_v1::InstancesConnectionIdempotencyPolicy directly. -using ::google::cloud::appengine_v1::InstancesConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_INSTANCES_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/appengine/instances_options.h b/google/cloud/appengine/instances_options.h deleted file mode 100644 index a1ef7fb7ee125..0000000000000 --- a/google/cloud/appengine/instances_options.h +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_INSTANCES_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_INSTANCES_OPTIONS_H - -#include "google/cloud/appengine/instances_connection.h" -#include "google/cloud/appengine/instances_connection_idempotency_policy.h" -#include "google/cloud/appengine/v1/instances_options.h" - -namespace google { -namespace cloud { -namespace appengine { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1::InstancesPollingPolicyOption directly. -using ::google::cloud::appengine_v1::InstancesPollingPolicyOption; - -/// @deprecated Use appengine_v1::InstancesBackoffPolicyOption directly. -using ::google::cloud::appengine_v1::InstancesBackoffPolicyOption; - -/// @deprecated Use appengine_v1::InstancesConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::appengine_v1::InstancesConnectionIdempotencyPolicyOption; - -/// @deprecated Use appengine_v1::InstancesPolicyOptionList directly. -using ::google::cloud::appengine_v1::InstancesPolicyOptionList; - -/// @deprecated Use appengine_v1::InstancesRetryPolicyOption directly. -using ::google::cloud::appengine_v1::InstancesRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_INSTANCES_OPTIONS_H diff --git a/google/cloud/appengine/mocks/mock_applications_connection.h b/google/cloud/appengine/mocks/mock_applications_connection.h deleted file mode 100644 index 960b72041b782..0000000000000 --- a/google/cloud/appengine/mocks/mock_applications_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_MOCKS_MOCK_APPLICATIONS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_MOCKS_MOCK_APPLICATIONS_CONNECTION_H - -#include "google/cloud/appengine/applications_connection.h" -#include "google/cloud/appengine/v1/mocks/mock_applications_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in appengine_v1_mocks instead of the aliases -/// defined in this namespace. -namespace appengine_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1_mocks::MockApplicationsConnection directly. -using ::google::cloud::appengine_v1_mocks::MockApplicationsConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_MOCKS_MOCK_APPLICATIONS_CONNECTION_H diff --git a/google/cloud/appengine/mocks/mock_authorized_certificates_connection.h b/google/cloud/appengine/mocks/mock_authorized_certificates_connection.h deleted file mode 100644 index eac1b064665de..0000000000000 --- a/google/cloud/appengine/mocks/mock_authorized_certificates_connection.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_MOCKS_MOCK_AUTHORIZED_CERTIFICATES_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_MOCKS_MOCK_AUTHORIZED_CERTIFICATES_CONNECTION_H - -#include "google/cloud/appengine/authorized_certificates_connection.h" -#include "google/cloud/appengine/v1/mocks/mock_authorized_certificates_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in appengine_v1_mocks instead of the aliases -/// defined in this namespace. -namespace appengine_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1_mocks::MockAuthorizedCertificatesConnection -/// directly. -using ::google::cloud::appengine_v1_mocks::MockAuthorizedCertificatesConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_MOCKS_MOCK_AUTHORIZED_CERTIFICATES_CONNECTION_H diff --git a/google/cloud/appengine/mocks/mock_authorized_domains_connection.h b/google/cloud/appengine/mocks/mock_authorized_domains_connection.h deleted file mode 100644 index 1e87e7cbb7087..0000000000000 --- a/google/cloud/appengine/mocks/mock_authorized_domains_connection.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_MOCKS_MOCK_AUTHORIZED_DOMAINS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_MOCKS_MOCK_AUTHORIZED_DOMAINS_CONNECTION_H - -#include "google/cloud/appengine/authorized_domains_connection.h" -#include "google/cloud/appengine/v1/mocks/mock_authorized_domains_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in appengine_v1_mocks instead of the aliases -/// defined in this namespace. -namespace appengine_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1_mocks::MockAuthorizedDomainsConnection -/// directly. -using ::google::cloud::appengine_v1_mocks::MockAuthorizedDomainsConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_MOCKS_MOCK_AUTHORIZED_DOMAINS_CONNECTION_H diff --git a/google/cloud/appengine/mocks/mock_domain_mappings_connection.h b/google/cloud/appengine/mocks/mock_domain_mappings_connection.h deleted file mode 100644 index af6c1db4426fe..0000000000000 --- a/google/cloud/appengine/mocks/mock_domain_mappings_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_MOCKS_MOCK_DOMAIN_MAPPINGS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_MOCKS_MOCK_DOMAIN_MAPPINGS_CONNECTION_H - -#include "google/cloud/appengine/domain_mappings_connection.h" -#include "google/cloud/appengine/v1/mocks/mock_domain_mappings_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in appengine_v1_mocks instead of the aliases -/// defined in this namespace. -namespace appengine_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1_mocks::MockDomainMappingsConnection directly. -using ::google::cloud::appengine_v1_mocks::MockDomainMappingsConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_MOCKS_MOCK_DOMAIN_MAPPINGS_CONNECTION_H diff --git a/google/cloud/appengine/mocks/mock_firewall_connection.h b/google/cloud/appengine/mocks/mock_firewall_connection.h deleted file mode 100644 index 22fdd5b071b82..0000000000000 --- a/google/cloud/appengine/mocks/mock_firewall_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_MOCKS_MOCK_FIREWALL_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_MOCKS_MOCK_FIREWALL_CONNECTION_H - -#include "google/cloud/appengine/firewall_connection.h" -#include "google/cloud/appengine/v1/mocks/mock_firewall_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in appengine_v1_mocks instead of the aliases -/// defined in this namespace. -namespace appengine_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1_mocks::MockFirewallConnection directly. -using ::google::cloud::appengine_v1_mocks::MockFirewallConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_MOCKS_MOCK_FIREWALL_CONNECTION_H diff --git a/google/cloud/appengine/mocks/mock_instances_connection.h b/google/cloud/appengine/mocks/mock_instances_connection.h deleted file mode 100644 index 5d5de36c446a9..0000000000000 --- a/google/cloud/appengine/mocks/mock_instances_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_MOCKS_MOCK_INSTANCES_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_MOCKS_MOCK_INSTANCES_CONNECTION_H - -#include "google/cloud/appengine/instances_connection.h" -#include "google/cloud/appengine/v1/mocks/mock_instances_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in appengine_v1_mocks instead of the aliases -/// defined in this namespace. -namespace appengine_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1_mocks::MockInstancesConnection directly. -using ::google::cloud::appengine_v1_mocks::MockInstancesConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_MOCKS_MOCK_INSTANCES_CONNECTION_H diff --git a/google/cloud/appengine/mocks/mock_services_connection.h b/google/cloud/appengine/mocks/mock_services_connection.h deleted file mode 100644 index 8ea0a3758fc54..0000000000000 --- a/google/cloud/appengine/mocks/mock_services_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_MOCKS_MOCK_SERVICES_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_MOCKS_MOCK_SERVICES_CONNECTION_H - -#include "google/cloud/appengine/services_connection.h" -#include "google/cloud/appengine/v1/mocks/mock_services_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in appengine_v1_mocks instead of the aliases -/// defined in this namespace. -namespace appengine_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1_mocks::MockServicesConnection directly. -using ::google::cloud::appengine_v1_mocks::MockServicesConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_MOCKS_MOCK_SERVICES_CONNECTION_H diff --git a/google/cloud/appengine/mocks/mock_versions_connection.h b/google/cloud/appengine/mocks/mock_versions_connection.h deleted file mode 100644 index e1d72b5613a95..0000000000000 --- a/google/cloud/appengine/mocks/mock_versions_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_MOCKS_MOCK_VERSIONS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_MOCKS_MOCK_VERSIONS_CONNECTION_H - -#include "google/cloud/appengine/v1/mocks/mock_versions_connection.h" -#include "google/cloud/appengine/versions_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in appengine_v1_mocks instead of the aliases -/// defined in this namespace. -namespace appengine_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1_mocks::MockVersionsConnection directly. -using ::google::cloud::appengine_v1_mocks::MockVersionsConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_MOCKS_MOCK_VERSIONS_CONNECTION_H diff --git a/google/cloud/appengine/quickstart/.bazelrc b/google/cloud/appengine/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/appengine/quickstart/.bazelrc +++ b/google/cloud/appengine/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/appengine/quickstart/CMakeLists.txt b/google/cloud/appengine/quickstart/CMakeLists.txt index 4a0310c1326fe..94e4b97a4254a 100644 --- a/google/cloud/appengine/quickstart/CMakeLists.txt +++ b/google/cloud/appengine/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the App Engine Admin API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-appengine-quickstart CXX) find_package(google_cloud_cpp_appengine REQUIRED) diff --git a/google/cloud/appengine/services_client.h b/google/cloud/appengine/services_client.h deleted file mode 100644 index c786f15a232bc..0000000000000 --- a/google/cloud/appengine/services_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_SERVICES_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_SERVICES_CLIENT_H - -#include "google/cloud/appengine/services_connection.h" -#include "google/cloud/appengine/v1/services_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in appengine_v1 instead of the aliases defined in -/// this namespace. -namespace appengine { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1::ServicesClient directly. -using ::google::cloud::appengine_v1::ServicesClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_SERVICES_CLIENT_H diff --git a/google/cloud/appengine/services_connection.h b/google/cloud/appengine/services_connection.h deleted file mode 100644 index e35fb5dc203fc..0000000000000 --- a/google/cloud/appengine/services_connection.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_SERVICES_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_SERVICES_CONNECTION_H - -#include "google/cloud/appengine/services_connection_idempotency_policy.h" -#include "google/cloud/appengine/v1/services_connection.h" - -namespace google { -namespace cloud { -namespace appengine { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1::MakeServicesConnection directly. -using ::google::cloud::appengine_v1::MakeServicesConnection; - -/// @deprecated Use appengine_v1::ServicesConnection directly. -using ::google::cloud::appengine_v1::ServicesConnection; - -/// @deprecated Use appengine_v1::ServicesLimitedErrorCountRetryPolicy directly. -using ::google::cloud::appengine_v1::ServicesLimitedErrorCountRetryPolicy; - -/// @deprecated Use appengine_v1::ServicesLimitedTimeRetryPolicy directly. -using ::google::cloud::appengine_v1::ServicesLimitedTimeRetryPolicy; - -/// @deprecated Use appengine_v1::ServicesRetryPolicy directly. -using ::google::cloud::appengine_v1::ServicesRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_SERVICES_CONNECTION_H diff --git a/google/cloud/appengine/services_connection_idempotency_policy.h b/google/cloud/appengine/services_connection_idempotency_policy.h deleted file mode 100644 index 2e8d5895d736b..0000000000000 --- a/google/cloud/appengine/services_connection_idempotency_policy.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_SERVICES_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_SERVICES_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/appengine/v1/services_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace appengine { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1::MakeDefaultServicesConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::appengine_v1:: - MakeDefaultServicesConnectionIdempotencyPolicy; - -/// @deprecated Use appengine_v1::ServicesConnectionIdempotencyPolicy directly. -using ::google::cloud::appengine_v1::ServicesConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_SERVICES_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/appengine/services_options.h b/google/cloud/appengine/services_options.h deleted file mode 100644 index e533fdbcb278f..0000000000000 --- a/google/cloud/appengine/services_options.h +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_SERVICES_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_SERVICES_OPTIONS_H - -#include "google/cloud/appengine/services_connection.h" -#include "google/cloud/appengine/services_connection_idempotency_policy.h" -#include "google/cloud/appengine/v1/services_options.h" - -namespace google { -namespace cloud { -namespace appengine { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1::ServicesPollingPolicyOption directly. -using ::google::cloud::appengine_v1::ServicesPollingPolicyOption; - -/// @deprecated Use appengine_v1::ServicesBackoffPolicyOption directly. -using ::google::cloud::appengine_v1::ServicesBackoffPolicyOption; - -/// @deprecated Use appengine_v1::ServicesConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::appengine_v1::ServicesConnectionIdempotencyPolicyOption; - -/// @deprecated Use appengine_v1::ServicesPolicyOptionList directly. -using ::google::cloud::appengine_v1::ServicesPolicyOptionList; - -/// @deprecated Use appengine_v1::ServicesRetryPolicyOption directly. -using ::google::cloud::appengine_v1::ServicesRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_SERVICES_OPTIONS_H diff --git a/google/cloud/appengine/v1/applications_client.h b/google/cloud/appengine/v1/applications_client.h index 858b253225e14..886d19815fb29 100644 --- a/google/cloud/appengine/v1/applications_client.h +++ b/google/cloud/appengine/v1/applications_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/appengine/v1/applications_connection.h b/google/cloud/appengine/v1/applications_connection.h index 2cde9edc612de..60e2d20bef5ef 100644 --- a/google/cloud/appengine/v1/applications_connection.h +++ b/google/cloud/appengine/v1/applications_connection.h @@ -29,9 +29,9 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/appengine/v1/appengine.pb.h" +#include "google/appengine/v1/operation.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/appengine/v1/applications_connection_idempotency_policy.h b/google/cloud/appengine/v1/applications_connection_idempotency_policy.h index 0e3d3d4afa7fe..50885547b435f 100644 --- a/google/cloud/appengine/v1/applications_connection_idempotency_policy.h +++ b/google/cloud/appengine/v1/applications_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include namespace google { diff --git a/google/cloud/appengine/v1/authorized_certificates_connection.h b/google/cloud/appengine/v1/authorized_certificates_connection.h index bd2cbfdd1f457..0a17cb2917e39 100644 --- a/google/cloud/appengine/v1/authorized_certificates_connection.h +++ b/google/cloud/appengine/v1/authorized_certificates_connection.h @@ -27,8 +27,8 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/appengine/v1/appengine.pb.h" +#include "google/appengine/v1/operation.pb.h" #include namespace google { diff --git a/google/cloud/appengine/v1/authorized_certificates_connection_idempotency_policy.h b/google/cloud/appengine/v1/authorized_certificates_connection_idempotency_policy.h index c2603b3aa0a04..a1950e2b18871 100644 --- a/google/cloud/appengine/v1/authorized_certificates_connection_idempotency_policy.h +++ b/google/cloud/appengine/v1/authorized_certificates_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include namespace google { diff --git a/google/cloud/appengine/v1/authorized_domains_connection.h b/google/cloud/appengine/v1/authorized_domains_connection.h index 396a0235da93f..14ba727bf2dcd 100644 --- a/google/cloud/appengine/v1/authorized_domains_connection.h +++ b/google/cloud/appengine/v1/authorized_domains_connection.h @@ -27,8 +27,8 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/appengine/v1/appengine.pb.h" +#include "google/appengine/v1/operation.pb.h" #include namespace google { diff --git a/google/cloud/appengine/v1/authorized_domains_connection_idempotency_policy.h b/google/cloud/appengine/v1/authorized_domains_connection_idempotency_policy.h index 1c208e1e49940..ec917751c4561 100644 --- a/google/cloud/appengine/v1/authorized_domains_connection_idempotency_policy.h +++ b/google/cloud/appengine/v1/authorized_domains_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include namespace google { diff --git a/google/cloud/appengine/v1/domain_mappings_client.h b/google/cloud/appengine/v1/domain_mappings_client.h index ee4f5df537551..0be96fd049670 100644 --- a/google/cloud/appengine/v1/domain_mappings_client.h +++ b/google/cloud/appengine/v1/domain_mappings_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/appengine/v1/domain_mappings_connection.h b/google/cloud/appengine/v1/domain_mappings_connection.h index fb918bcf886d2..d7f7e25dfbe75 100644 --- a/google/cloud/appengine/v1/domain_mappings_connection.h +++ b/google/cloud/appengine/v1/domain_mappings_connection.h @@ -30,9 +30,9 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/appengine/v1/appengine.pb.h" +#include "google/appengine/v1/operation.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/appengine/v1/domain_mappings_connection_idempotency_policy.h b/google/cloud/appengine/v1/domain_mappings_connection_idempotency_policy.h index b568538e1652f..fc18543d459be 100644 --- a/google/cloud/appengine/v1/domain_mappings_connection_idempotency_policy.h +++ b/google/cloud/appengine/v1/domain_mappings_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include namespace google { diff --git a/google/cloud/appengine/v1/firewall_connection.h b/google/cloud/appengine/v1/firewall_connection.h index 63d558a56d152..7ec4c6e27089c 100644 --- a/google/cloud/appengine/v1/firewall_connection.h +++ b/google/cloud/appengine/v1/firewall_connection.h @@ -27,8 +27,8 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/appengine/v1/appengine.pb.h" +#include "google/appengine/v1/operation.pb.h" #include namespace google { diff --git a/google/cloud/appengine/v1/firewall_connection_idempotency_policy.h b/google/cloud/appengine/v1/firewall_connection_idempotency_policy.h index e33f5d4f7463a..dc4b08950980b 100644 --- a/google/cloud/appengine/v1/firewall_connection_idempotency_policy.h +++ b/google/cloud/appengine/v1/firewall_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include namespace google { diff --git a/google/cloud/appengine/v1/instances_client.h b/google/cloud/appengine/v1/instances_client.h index 9c2f8779eed68..190f36922be90 100644 --- a/google/cloud/appengine/v1/instances_client.h +++ b/google/cloud/appengine/v1/instances_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/appengine/v1/instances_connection.h b/google/cloud/appengine/v1/instances_connection.h index 839adaaf4bc9a..f82664ff815f0 100644 --- a/google/cloud/appengine/v1/instances_connection.h +++ b/google/cloud/appengine/v1/instances_connection.h @@ -30,9 +30,9 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/appengine/v1/appengine.pb.h" +#include "google/appengine/v1/operation.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/appengine/v1/instances_connection_idempotency_policy.h b/google/cloud/appengine/v1/instances_connection_idempotency_policy.h index 468212711766d..12d0d17907d23 100644 --- a/google/cloud/appengine/v1/instances_connection_idempotency_policy.h +++ b/google/cloud/appengine/v1/instances_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include namespace google { diff --git a/google/cloud/appengine/v1/internal/applications_auth_decorator.cc b/google/cloud/appengine/v1/internal/applications_auth_decorator.cc index 282336771331a..5feb36601a915 100644 --- a/google/cloud/appengine/v1/internal/applications_auth_decorator.cc +++ b/google/cloud/appengine/v1/internal/applications_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/appengine/v1/appengine.proto #include "google/cloud/appengine/v1/internal/applications_auth_decorator.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -163,3 +166,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/applications_auth_decorator.h b/google/cloud/appengine/v1/internal/applications_auth_decorator.h index 9fee26d361c8b..092d91b36a487 100644 --- a/google/cloud/appengine/v1/internal/applications_auth_decorator.h +++ b/google/cloud/appengine/v1/internal/applications_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/appengine/v1/internal/applications_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -95,4 +98,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_APPLICATIONS_AUTH_DECORATOR_H diff --git a/google/cloud/appengine/v1/internal/applications_connection_impl.h b/google/cloud/appengine/v1/internal/applications_connection_impl.h index cb2e3cb703c96..cd87094394313 100644 --- a/google/cloud/appengine/v1/internal/applications_connection_impl.h +++ b/google/cloud/appengine/v1/internal/applications_connection_impl.h @@ -31,7 +31,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/appengine/v1/internal/applications_logging_decorator.cc b/google/cloud/appengine/v1/internal/applications_logging_decorator.cc index 3448dcf84e5e6..42c21b2b0941c 100644 --- a/google/cloud/appengine/v1/internal/applications_logging_decorator.cc +++ b/google/cloud/appengine/v1/internal/applications_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/appengine/v1/internal/applications_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -173,3 +176,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/applications_logging_decorator.h b/google/cloud/appengine/v1/internal/applications_logging_decorator.h index 0170a9751c031..52e173f362812 100644 --- a/google/cloud/appengine/v1/internal/applications_logging_decorator.h +++ b/google/cloud/appengine/v1/internal/applications_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/appengine/v1/internal/applications_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -95,4 +98,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_APPLICATIONS_LOGGING_DECORATOR_H diff --git a/google/cloud/appengine/v1/internal/applications_metadata_decorator.cc b/google/cloud/appengine/v1/internal/applications_metadata_decorator.cc index 4f66faf429770..614bfeca2fb6c 100644 --- a/google/cloud/appengine/v1/internal/applications_metadata_decorator.cc +++ b/google/cloud/appengine/v1/internal/applications_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/appengine/v1/internal/applications_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -154,3 +158,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/applications_metadata_decorator.h b/google/cloud/appengine/v1/internal/applications_metadata_decorator.h index 7244fd7d2ab9c..9ad052926f061 100644 --- a/google/cloud/appengine/v1/internal/applications_metadata_decorator.h +++ b/google/cloud/appengine/v1/internal/applications_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/appengine/v1/internal/applications_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -100,4 +103,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_APPLICATIONS_METADATA_DECORATOR_H diff --git a/google/cloud/appengine/v1/internal/applications_option_defaults.cc b/google/cloud/appengine/v1/internal/applications_option_defaults.cc index ac149d7a5395d..b53a22d282f18 100644 --- a/google/cloud/appengine/v1/internal/applications_option_defaults.cc +++ b/google/cloud/appengine/v1/internal/applications_option_defaults.cc @@ -41,7 +41,7 @@ Options ApplicationsDefaultOptions(Options options) { if (!options.has()) { options.set( appengine_v1::ApplicationsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/appengine/v1/internal/applications_stub.cc b/google/cloud/appengine/v1/internal/applications_stub.cc index d91b01ce047bc..d29a758aaeedb 100644 --- a/google/cloud/appengine/v1/internal/applications_stub.cc +++ b/google/cloud/appengine/v1/internal/applications_stub.cc @@ -19,11 +19,14 @@ #include "google/cloud/appengine/v1/internal/applications_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/appengine/v1/appengine.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -176,3 +179,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/applications_stub.h b/google/cloud/appengine/v1/internal/applications_stub.h index bb4cccb85ba7f..fba66f5a81314 100644 --- a/google/cloud/appengine/v1/internal/applications_stub.h +++ b/google/cloud/appengine/v1/internal/applications_stub.h @@ -24,12 +24,15 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/appengine/v1/appengine.grpc.pb.h" +#include "google/appengine/v1/operation.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -157,4 +160,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_APPLICATIONS_STUB_H diff --git a/google/cloud/appengine/v1/internal/applications_stub_factory.cc b/google/cloud/appengine/v1/internal/applications_stub_factory.cc index 57cf34d56fc8f..7e630b1ab174e 100644 --- a/google/cloud/appengine/v1/internal/applications_stub_factory.cc +++ b/google/cloud/appengine/v1/internal/applications_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/applications_stub_factory.h b/google/cloud/appengine/v1/internal/applications_stub_factory.h index bcd64da0c33c5..36cff8a49f052 100644 --- a/google/cloud/appengine/v1/internal/applications_stub_factory.h +++ b/google/cloud/appengine/v1/internal/applications_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_APPLICATIONS_STUB_FACTORY_H diff --git a/google/cloud/appengine/v1/internal/applications_tracing_connection.cc b/google/cloud/appengine/v1/internal/applications_tracing_connection.cc index c35ddc1c0c8bc..f2fdbf3dffdf2 100644 --- a/google/cloud/appengine/v1/internal/applications_tracing_connection.cc +++ b/google/cloud/appengine/v1/internal/applications_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace appengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ApplicationsTracingConnection::ApplicationsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -131,16 +129,12 @@ ApplicationsTracingConnection::RepairApplication( child_->RepairApplication(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeApplicationsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/appengine/v1/internal/applications_tracing_connection.h b/google/cloud/appengine/v1/internal/applications_tracing_connection.h index e14ebebcfbb08..6c6a08c54bfea 100644 --- a/google/cloud/appengine/v1/internal/applications_tracing_connection.h +++ b/google/cloud/appengine/v1/internal/applications_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace appengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ApplicationsTracingConnection : public appengine_v1::ApplicationsConnection { public: @@ -77,8 +75,6 @@ class ApplicationsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/appengine/v1/internal/applications_tracing_stub.cc b/google/cloud/appengine/v1/internal/applications_tracing_stub.cc index 9819abf8b9986..3c9fd9757bac1 100644 --- a/google/cloud/appengine/v1/internal/applications_tracing_stub.cc +++ b/google/cloud/appengine/v1/internal/applications_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ApplicationsTracingStub::ApplicationsTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -153,18 +154,14 @@ future ApplicationsTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeApplicationsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/applications_tracing_stub.h b/google/cloud/appengine/v1/internal/applications_tracing_stub.h index d78d8dc774d18..89b945cccfa6e 100644 --- a/google/cloud/appengine/v1/internal/applications_tracing_stub.h +++ b/google/cloud/appengine/v1/internal/applications_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ApplicationsTracingStub : public ApplicationsStub { public: ~ApplicationsTracingStub() override = default; @@ -90,8 +91,6 @@ class ApplicationsTracingStub : public ApplicationsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -106,4 +105,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_APPLICATIONS_TRACING_STUB_H diff --git a/google/cloud/appengine/v1/internal/authorized_certificates_auth_decorator.cc b/google/cloud/appengine/v1/internal/authorized_certificates_auth_decorator.cc index 65ad8d61a3dfd..001bd920ab198 100644 --- a/google/cloud/appengine/v1/internal/authorized_certificates_auth_decorator.cc +++ b/google/cloud/appengine/v1/internal/authorized_certificates_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/appengine/v1/appengine.proto #include "google/cloud/appengine/v1/internal/authorized_certificates_auth_decorator.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -79,3 +82,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/authorized_certificates_auth_decorator.h b/google/cloud/appengine/v1/internal/authorized_certificates_auth_decorator.h index 27b2846943d63..cc1522e85de1b 100644 --- a/google/cloud/appengine/v1/internal/authorized_certificates_auth_decorator.h +++ b/google/cloud/appengine/v1/internal/authorized_certificates_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -77,4 +80,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_AUTHORIZED_CERTIFICATES_AUTH_DECORATOR_H diff --git a/google/cloud/appengine/v1/internal/authorized_certificates_logging_decorator.cc b/google/cloud/appengine/v1/internal/authorized_certificates_logging_decorator.cc index 4ecf60d08a380..4739c7ea18a6f 100644 --- a/google/cloud/appengine/v1/internal/authorized_certificates_logging_decorator.cc +++ b/google/cloud/appengine/v1/internal/authorized_certificates_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/appengine/v1/internal/authorized_certificates_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -103,3 +106,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/authorized_certificates_logging_decorator.h b/google/cloud/appengine/v1/internal/authorized_certificates_logging_decorator.h index ae49c8d334ea8..83450786c8b36 100644 --- a/google/cloud/appengine/v1/internal/authorized_certificates_logging_decorator.h +++ b/google/cloud/appengine/v1/internal/authorized_certificates_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -77,4 +80,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_AUTHORIZED_CERTIFICATES_LOGGING_DECORATOR_H diff --git a/google/cloud/appengine/v1/internal/authorized_certificates_metadata_decorator.cc b/google/cloud/appengine/v1/internal/authorized_certificates_metadata_decorator.cc index 6959ed147d1d0..0856bd6e0aade 100644 --- a/google/cloud/appengine/v1/internal/authorized_certificates_metadata_decorator.cc +++ b/google/cloud/appengine/v1/internal/authorized_certificates_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/appengine/v1/internal/authorized_certificates_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -105,3 +109,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/authorized_certificates_metadata_decorator.h b/google/cloud/appengine/v1/internal/authorized_certificates_metadata_decorator.h index 61cac4c44cbf4..f10e0ca1883a2 100644 --- a/google/cloud/appengine/v1/internal/authorized_certificates_metadata_decorator.h +++ b/google/cloud/appengine/v1/internal/authorized_certificates_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -83,4 +86,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_AUTHORIZED_CERTIFICATES_METADATA_DECORATOR_H diff --git a/google/cloud/appengine/v1/internal/authorized_certificates_option_defaults.cc b/google/cloud/appengine/v1/internal/authorized_certificates_option_defaults.cc index 8bdcf1735b0ad..64d6f1379e522 100644 --- a/google/cloud/appengine/v1/internal/authorized_certificates_option_defaults.cc +++ b/google/cloud/appengine/v1/internal/authorized_certificates_option_defaults.cc @@ -42,7 +42,7 @@ Options AuthorizedCertificatesDefaultOptions(Options options) { if (!options.has()) { options.set( appengine_v1::AuthorizedCertificatesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/appengine/v1/internal/authorized_certificates_stub.cc b/google/cloud/appengine/v1/internal/authorized_certificates_stub.cc index 45278d3884910..003e65cbb2488 100644 --- a/google/cloud/appengine/v1/internal/authorized_certificates_stub.cc +++ b/google/cloud/appengine/v1/internal/authorized_certificates_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/appengine/v1/internal/authorized_certificates_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -98,3 +101,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/authorized_certificates_stub.h b/google/cloud/appengine/v1/internal/authorized_certificates_stub.h index 47ef0d0aa39e3..5a3bc380b0625 100644 --- a/google/cloud/appengine/v1/internal/authorized_certificates_stub.h +++ b/google/cloud/appengine/v1/internal/authorized_certificates_stub.h @@ -22,11 +22,14 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/appengine/v1/appengine.grpc.pb.h" +#include "google/appengine/v1/operation.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -113,4 +116,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_AUTHORIZED_CERTIFICATES_STUB_H diff --git a/google/cloud/appengine/v1/internal/authorized_certificates_stub_factory.cc b/google/cloud/appengine/v1/internal/authorized_certificates_stub_factory.cc index 4f2f146032649..63f40244f1b41 100644 --- a/google/cloud/appengine/v1/internal/authorized_certificates_stub_factory.cc +++ b/google/cloud/appengine/v1/internal/authorized_certificates_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/authorized_certificates_stub_factory.h b/google/cloud/appengine/v1/internal/authorized_certificates_stub_factory.h index fcc3b5aedd23c..3d2370e520a78 100644 --- a/google/cloud/appengine/v1/internal/authorized_certificates_stub_factory.h +++ b/google/cloud/appengine/v1/internal/authorized_certificates_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_AUTHORIZED_CERTIFICATES_STUB_FACTORY_H diff --git a/google/cloud/appengine/v1/internal/authorized_certificates_tracing_connection.cc b/google/cloud/appengine/v1/internal/authorized_certificates_tracing_connection.cc index aa9611a7b308a..e99f5e55a0f19 100644 --- a/google/cloud/appengine/v1/internal/authorized_certificates_tracing_connection.cc +++ b/google/cloud/appengine/v1/internal/authorized_certificates_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace appengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AuthorizedCertificatesTracingConnection:: AuthorizedCertificatesTracingConnection( std::shared_ptr child) @@ -86,17 +84,13 @@ Status AuthorizedCertificatesTracingConnection::DeleteAuthorizedCertificate( return internal::EndSpan(*span, child_->DeleteAuthorizedCertificate(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAuthorizedCertificatesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/appengine/v1/internal/authorized_certificates_tracing_connection.h b/google/cloud/appengine/v1/internal/authorized_certificates_tracing_connection.h index ed4b6f5937cd1..88efffc4aabc9 100644 --- a/google/cloud/appengine/v1/internal/authorized_certificates_tracing_connection.h +++ b/google/cloud/appengine/v1/internal/authorized_certificates_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace appengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AuthorizedCertificatesTracingConnection : public appengine_v1::AuthorizedCertificatesConnection { public: @@ -68,8 +66,6 @@ class AuthorizedCertificatesTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/appengine/v1/internal/authorized_certificates_tracing_stub.cc b/google/cloud/appengine/v1/internal/authorized_certificates_tracing_stub.cc index 2ecb9c3b6ae1f..7f6048d766ddb 100644 --- a/google/cloud/appengine/v1/internal/authorized_certificates_tracing_stub.cc +++ b/google/cloud/appengine/v1/internal/authorized_certificates_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AuthorizedCertificatesTracingStub::AuthorizedCertificatesTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -100,19 +101,15 @@ Status AuthorizedCertificatesTracingStub::DeleteAuthorizedCertificate( child_->DeleteAuthorizedCertificate(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAuthorizedCertificatesTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/authorized_certificates_tracing_stub.h b/google/cloud/appengine/v1/internal/authorized_certificates_tracing_stub.h index 665d11b2bd928..1a59fa2de6e1b 100644 --- a/google/cloud/appengine/v1/internal/authorized_certificates_tracing_stub.h +++ b/google/cloud/appengine/v1/internal/authorized_certificates_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AuthorizedCertificatesTracingStub : public AuthorizedCertificatesStub { public: ~AuthorizedCertificatesTracingStub() override = default; @@ -74,8 +75,6 @@ class AuthorizedCertificatesTracingStub : public AuthorizedCertificatesStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -91,4 +90,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_AUTHORIZED_CERTIFICATES_TRACING_STUB_H diff --git a/google/cloud/appengine/v1/internal/authorized_domains_auth_decorator.cc b/google/cloud/appengine/v1/internal/authorized_domains_auth_decorator.cc index b1eecbffb6e5d..216fd3e080fb8 100644 --- a/google/cloud/appengine/v1/internal/authorized_domains_auth_decorator.cc +++ b/google/cloud/appengine/v1/internal/authorized_domains_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/appengine/v1/appengine.proto #include "google/cloud/appengine/v1/internal/authorized_domains_auth_decorator.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -44,3 +47,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/authorized_domains_auth_decorator.h b/google/cloud/appengine/v1/internal/authorized_domains_auth_decorator.h index 5059b6f826cd1..7d7737000a5d6 100644 --- a/google/cloud/appengine/v1/internal/authorized_domains_auth_decorator.h +++ b/google/cloud/appengine/v1/internal/authorized_domains_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -54,4 +57,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_AUTHORIZED_DOMAINS_AUTH_DECORATOR_H diff --git a/google/cloud/appengine/v1/internal/authorized_domains_logging_decorator.cc b/google/cloud/appengine/v1/internal/authorized_domains_logging_decorator.cc index 84e04e22130ab..fea1b85a3ba24 100644 --- a/google/cloud/appengine/v1/internal/authorized_domains_logging_decorator.cc +++ b/google/cloud/appengine/v1/internal/authorized_domains_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/appengine/v1/internal/authorized_domains_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -52,3 +55,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/authorized_domains_logging_decorator.h b/google/cloud/appengine/v1/internal/authorized_domains_logging_decorator.h index f01da02535b9f..9cf515f685157 100644 --- a/google/cloud/appengine/v1/internal/authorized_domains_logging_decorator.h +++ b/google/cloud/appengine/v1/internal/authorized_domains_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -54,4 +57,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_AUTHORIZED_DOMAINS_LOGGING_DECORATOR_H diff --git a/google/cloud/appengine/v1/internal/authorized_domains_metadata_decorator.cc b/google/cloud/appengine/v1/internal/authorized_domains_metadata_decorator.cc index 62e8f3486c620..c65cd5ee5edc7 100644 --- a/google/cloud/appengine/v1/internal/authorized_domains_metadata_decorator.cc +++ b/google/cloud/appengine/v1/internal/authorized_domains_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/appengine/v1/internal/authorized_domains_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -70,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/authorized_domains_metadata_decorator.h b/google/cloud/appengine/v1/internal/authorized_domains_metadata_decorator.h index c5f0ffb9772ca..5495cf4039980 100644 --- a/google/cloud/appengine/v1/internal/authorized_domains_metadata_decorator.h +++ b/google/cloud/appengine/v1/internal/authorized_domains_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -60,4 +63,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_AUTHORIZED_DOMAINS_METADATA_DECORATOR_H diff --git a/google/cloud/appengine/v1/internal/authorized_domains_option_defaults.cc b/google/cloud/appengine/v1/internal/authorized_domains_option_defaults.cc index 4a18cc962769c..1cba0f76d62d2 100644 --- a/google/cloud/appengine/v1/internal/authorized_domains_option_defaults.cc +++ b/google/cloud/appengine/v1/internal/authorized_domains_option_defaults.cc @@ -42,7 +42,7 @@ Options AuthorizedDomainsDefaultOptions(Options options) { if (!options.has()) { options.set( appengine_v1::AuthorizedDomainsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/appengine/v1/internal/authorized_domains_stub.cc b/google/cloud/appengine/v1/internal/authorized_domains_stub.cc index 0dabc689a6fb9..9fde7e54a3fbd 100644 --- a/google/cloud/appengine/v1/internal/authorized_domains_stub.cc +++ b/google/cloud/appengine/v1/internal/authorized_domains_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/appengine/v1/internal/authorized_domains_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -46,3 +49,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/authorized_domains_stub.h b/google/cloud/appengine/v1/internal/authorized_domains_stub.h index 8736625bcb1e9..87801e7f018b3 100644 --- a/google/cloud/appengine/v1/internal/authorized_domains_stub.h +++ b/google/cloud/appengine/v1/internal/authorized_domains_stub.h @@ -22,11 +22,14 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/appengine/v1/appengine.grpc.pb.h" +#include "google/appengine/v1/operation.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -65,4 +68,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_AUTHORIZED_DOMAINS_STUB_H diff --git a/google/cloud/appengine/v1/internal/authorized_domains_stub_factory.cc b/google/cloud/appengine/v1/internal/authorized_domains_stub_factory.cc index ad88107fa9b44..8d39d88f1f1db 100644 --- a/google/cloud/appengine/v1/internal/authorized_domains_stub_factory.cc +++ b/google/cloud/appengine/v1/internal/authorized_domains_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/authorized_domains_stub_factory.h b/google/cloud/appengine/v1/internal/authorized_domains_stub_factory.h index 24e6aca27a895..0a3a611bc83cf 100644 --- a/google/cloud/appengine/v1/internal/authorized_domains_stub_factory.h +++ b/google/cloud/appengine/v1/internal/authorized_domains_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_AUTHORIZED_DOMAINS_STUB_FACTORY_H diff --git a/google/cloud/appengine/v1/internal/authorized_domains_tracing_connection.cc b/google/cloud/appengine/v1/internal/authorized_domains_tracing_connection.cc index 85543616a90de..f952d047b18e1 100644 --- a/google/cloud/appengine/v1/internal/authorized_domains_tracing_connection.cc +++ b/google/cloud/appengine/v1/internal/authorized_domains_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace appengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AuthorizedDomainsTracingConnection::AuthorizedDomainsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -44,17 +42,13 @@ AuthorizedDomainsTracingConnection::ListAuthorizedDomains( google::appengine::v1::AuthorizedDomain>(std::move(span), std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAuthorizedDomainsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/appengine/v1/internal/authorized_domains_tracing_connection.h b/google/cloud/appengine/v1/internal/authorized_domains_tracing_connection.h index b310f5153f8fa..ee1b003e38be5 100644 --- a/google/cloud/appengine/v1/internal/authorized_domains_tracing_connection.h +++ b/google/cloud/appengine/v1/internal/authorized_domains_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace appengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AuthorizedDomainsTracingConnection : public appengine_v1::AuthorizedDomainsConnection { public: @@ -47,8 +45,6 @@ class AuthorizedDomainsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/appengine/v1/internal/authorized_domains_tracing_stub.cc b/google/cloud/appengine/v1/internal/authorized_domains_tracing_stub.cc index 6e2826252d38d..b3949ee59d271 100644 --- a/google/cloud/appengine/v1/internal/authorized_domains_tracing_stub.cc +++ b/google/cloud/appengine/v1/internal/authorized_domains_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AuthorizedDomainsTracingStub::AuthorizedDomainsTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -44,18 +45,14 @@ AuthorizedDomainsTracingStub::ListAuthorizedDomains( context, *span, child_->ListAuthorizedDomains(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAuthorizedDomainsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/authorized_domains_tracing_stub.h b/google/cloud/appengine/v1/internal/authorized_domains_tracing_stub.h index b7165266027e1..1768fc4723fe8 100644 --- a/google/cloud/appengine/v1/internal/authorized_domains_tracing_stub.h +++ b/google/cloud/appengine/v1/internal/authorized_domains_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AuthorizedDomainsTracingStub : public AuthorizedDomainsStub { public: ~AuthorizedDomainsTracingStub() override = default; @@ -51,8 +52,6 @@ class AuthorizedDomainsTracingStub : public AuthorizedDomainsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -67,4 +66,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_AUTHORIZED_DOMAINS_TRACING_STUB_H diff --git a/google/cloud/appengine/v1/internal/domain_mappings_auth_decorator.cc b/google/cloud/appengine/v1/internal/domain_mappings_auth_decorator.cc index 4e37c8bb1b192..ba2a4784fe0dd 100644 --- a/google/cloud/appengine/v1/internal/domain_mappings_auth_decorator.cc +++ b/google/cloud/appengine/v1/internal/domain_mappings_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/appengine/v1/appengine.proto #include "google/cloud/appengine/v1/internal/domain_mappings_auth_decorator.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -176,3 +179,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/domain_mappings_auth_decorator.h b/google/cloud/appengine/v1/internal/domain_mappings_auth_decorator.h index 1cca255964231..15de9252f71a6 100644 --- a/google/cloud/appengine/v1/internal/domain_mappings_auth_decorator.h +++ b/google/cloud/appengine/v1/internal/domain_mappings_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/appengine/v1/internal/domain_mappings_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -106,4 +109,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_DOMAIN_MAPPINGS_AUTH_DECORATOR_H diff --git a/google/cloud/appengine/v1/internal/domain_mappings_connection_impl.h b/google/cloud/appengine/v1/internal/domain_mappings_connection_impl.h index 4f1de87cccbb5..feac915343bd0 100644 --- a/google/cloud/appengine/v1/internal/domain_mappings_connection_impl.h +++ b/google/cloud/appengine/v1/internal/domain_mappings_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/appengine/v1/internal/domain_mappings_logging_decorator.cc b/google/cloud/appengine/v1/internal/domain_mappings_logging_decorator.cc index 29a6109f9a415..2f88a146e3d98 100644 --- a/google/cloud/appengine/v1/internal/domain_mappings_logging_decorator.cc +++ b/google/cloud/appengine/v1/internal/domain_mappings_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/appengine/v1/internal/domain_mappings_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -188,3 +191,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/domain_mappings_logging_decorator.h b/google/cloud/appengine/v1/internal/domain_mappings_logging_decorator.h index 0da2847d4bd7f..3896d86028d5c 100644 --- a/google/cloud/appengine/v1/internal/domain_mappings_logging_decorator.h +++ b/google/cloud/appengine/v1/internal/domain_mappings_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/appengine/v1/internal/domain_mappings_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -106,4 +109,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_DOMAIN_MAPPINGS_LOGGING_DECORATOR_H diff --git a/google/cloud/appengine/v1/internal/domain_mappings_metadata_decorator.cc b/google/cloud/appengine/v1/internal/domain_mappings_metadata_decorator.cc index b95243c5a604b..b9981bf3bd79d 100644 --- a/google/cloud/appengine/v1/internal/domain_mappings_metadata_decorator.cc +++ b/google/cloud/appengine/v1/internal/domain_mappings_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/appengine/v1/internal/domain_mappings_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -165,3 +169,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/domain_mappings_metadata_decorator.h b/google/cloud/appengine/v1/internal/domain_mappings_metadata_decorator.h index dbd7b7cf72c7d..d576e0cc3138b 100644 --- a/google/cloud/appengine/v1/internal/domain_mappings_metadata_decorator.h +++ b/google/cloud/appengine/v1/internal/domain_mappings_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/appengine/v1/internal/domain_mappings_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -111,4 +114,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_DOMAIN_MAPPINGS_METADATA_DECORATOR_H diff --git a/google/cloud/appengine/v1/internal/domain_mappings_option_defaults.cc b/google/cloud/appengine/v1/internal/domain_mappings_option_defaults.cc index 12b5218311f37..3082cb086c6a0 100644 --- a/google/cloud/appengine/v1/internal/domain_mappings_option_defaults.cc +++ b/google/cloud/appengine/v1/internal/domain_mappings_option_defaults.cc @@ -41,7 +41,7 @@ Options DomainMappingsDefaultOptions(Options options) { if (!options.has()) { options.set( appengine_v1::DomainMappingsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/appengine/v1/internal/domain_mappings_stub.cc b/google/cloud/appengine/v1/internal/domain_mappings_stub.cc index 3a9f8b71b9bce..6cb547b466d1c 100644 --- a/google/cloud/appengine/v1/internal/domain_mappings_stub.cc +++ b/google/cloud/appengine/v1/internal/domain_mappings_stub.cc @@ -19,11 +19,14 @@ #include "google/cloud/appengine/v1/internal/domain_mappings_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/appengine/v1/appengine.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -188,3 +191,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/domain_mappings_stub.h b/google/cloud/appengine/v1/internal/domain_mappings_stub.h index e8396daf9c3fb..d8e6b214fe01b 100644 --- a/google/cloud/appengine/v1/internal/domain_mappings_stub.h +++ b/google/cloud/appengine/v1/internal/domain_mappings_stub.h @@ -24,12 +24,15 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/appengine/v1/appengine.grpc.pb.h" +#include "google/appengine/v1/operation.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -173,4 +176,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_DOMAIN_MAPPINGS_STUB_H diff --git a/google/cloud/appengine/v1/internal/domain_mappings_stub_factory.cc b/google/cloud/appengine/v1/internal/domain_mappings_stub_factory.cc index fc8c386d2d33b..b26b2de1b450b 100644 --- a/google/cloud/appengine/v1/internal/domain_mappings_stub_factory.cc +++ b/google/cloud/appengine/v1/internal/domain_mappings_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/domain_mappings_stub_factory.h b/google/cloud/appengine/v1/internal/domain_mappings_stub_factory.h index d49e7f4f11112..5b6a362e2e330 100644 --- a/google/cloud/appengine/v1/internal/domain_mappings_stub_factory.h +++ b/google/cloud/appengine/v1/internal/domain_mappings_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_DOMAIN_MAPPINGS_STUB_FACTORY_H diff --git a/google/cloud/appengine/v1/internal/domain_mappings_tracing_connection.cc b/google/cloud/appengine/v1/internal/domain_mappings_tracing_connection.cc index a78f31edd9810..4a45ebe79583c 100644 --- a/google/cloud/appengine/v1/internal/domain_mappings_tracing_connection.cc +++ b/google/cloud/appengine/v1/internal/domain_mappings_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace appengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DomainMappingsTracingConnection::DomainMappingsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -146,16 +144,12 @@ DomainMappingsTracingConnection::DeleteDomainMapping( child_->DeleteDomainMapping(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDomainMappingsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/appengine/v1/internal/domain_mappings_tracing_connection.h b/google/cloud/appengine/v1/internal/domain_mappings_tracing_connection.h index 48ea354b0ab93..9b3abdcdda0bb 100644 --- a/google/cloud/appengine/v1/internal/domain_mappings_tracing_connection.h +++ b/google/cloud/appengine/v1/internal/domain_mappings_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace appengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DomainMappingsTracingConnection : public appengine_v1::DomainMappingsConnection { public: @@ -86,8 +84,6 @@ class DomainMappingsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/appengine/v1/internal/domain_mappings_tracing_stub.cc b/google/cloud/appengine/v1/internal/domain_mappings_tracing_stub.cc index 2d1944ed2b8f7..2428ec517055c 100644 --- a/google/cloud/appengine/v1/internal/domain_mappings_tracing_stub.cc +++ b/google/cloud/appengine/v1/internal/domain_mappings_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DomainMappingsTracingStub::DomainMappingsTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -165,18 +166,14 @@ future DomainMappingsTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDomainMappingsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/domain_mappings_tracing_stub.h b/google/cloud/appengine/v1/internal/domain_mappings_tracing_stub.h index bba974650a5f2..a9256ad5599d8 100644 --- a/google/cloud/appengine/v1/internal/domain_mappings_tracing_stub.h +++ b/google/cloud/appengine/v1/internal/domain_mappings_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DomainMappingsTracingStub : public DomainMappingsStub { public: ~DomainMappingsTracingStub() override = default; @@ -101,8 +102,6 @@ class DomainMappingsTracingStub : public DomainMappingsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -117,4 +116,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_DOMAIN_MAPPINGS_TRACING_STUB_H diff --git a/google/cloud/appengine/v1/internal/firewall_auth_decorator.cc b/google/cloud/appengine/v1/internal/firewall_auth_decorator.cc index ece924a1c1717..6f565cf1cbd5d 100644 --- a/google/cloud/appengine/v1/internal/firewall_auth_decorator.cc +++ b/google/cloud/appengine/v1/internal/firewall_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/appengine/v1/appengine.proto #include "google/cloud/appengine/v1/internal/firewall_auth_decorator.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -85,3 +88,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/firewall_auth_decorator.h b/google/cloud/appengine/v1/internal/firewall_auth_decorator.h index 7b2d5787cb76b..872267633a789 100644 --- a/google/cloud/appengine/v1/internal/firewall_auth_decorator.h +++ b/google/cloud/appengine/v1/internal/firewall_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -74,4 +77,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_FIREWALL_AUTH_DECORATOR_H diff --git a/google/cloud/appengine/v1/internal/firewall_logging_decorator.cc b/google/cloud/appengine/v1/internal/firewall_logging_decorator.cc index ec8107af18bc3..a7149aed29aef 100644 --- a/google/cloud/appengine/v1/internal/firewall_logging_decorator.cc +++ b/google/cloud/appengine/v1/internal/firewall_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/appengine/v1/internal/firewall_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -110,3 +113,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/firewall_logging_decorator.h b/google/cloud/appengine/v1/internal/firewall_logging_decorator.h index bfa6c6bb25bf8..65dc7a398a98e 100644 --- a/google/cloud/appengine/v1/internal/firewall_logging_decorator.h +++ b/google/cloud/appengine/v1/internal/firewall_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -74,4 +77,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_FIREWALL_LOGGING_DECORATOR_H diff --git a/google/cloud/appengine/v1/internal/firewall_metadata_decorator.cc b/google/cloud/appengine/v1/internal/firewall_metadata_decorator.cc index 2b6934cfb9eaf..ebf9bbcc9c783 100644 --- a/google/cloud/appengine/v1/internal/firewall_metadata_decorator.cc +++ b/google/cloud/appengine/v1/internal/firewall_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/appengine/v1/internal/firewall_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -113,3 +117,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/firewall_metadata_decorator.h b/google/cloud/appengine/v1/internal/firewall_metadata_decorator.h index b437a4cd7e0aa..55f823650227b 100644 --- a/google/cloud/appengine/v1/internal/firewall_metadata_decorator.h +++ b/google/cloud/appengine/v1/internal/firewall_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -79,4 +82,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_FIREWALL_METADATA_DECORATOR_H diff --git a/google/cloud/appengine/v1/internal/firewall_option_defaults.cc b/google/cloud/appengine/v1/internal/firewall_option_defaults.cc index 4a4ebc08deaf0..ea51decdc2ab0 100644 --- a/google/cloud/appengine/v1/internal/firewall_option_defaults.cc +++ b/google/cloud/appengine/v1/internal/firewall_option_defaults.cc @@ -40,7 +40,7 @@ Options FirewallDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - appengine_v1::FirewallLimitedTimeRetryPolicy(std::chrono::minutes(30)) + appengine_v1::FirewallLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/appengine/v1/internal/firewall_stub.cc b/google/cloud/appengine/v1/internal/firewall_stub.cc index 6051df0a471de..a8d45e30ea7fc 100644 --- a/google/cloud/appengine/v1/internal/firewall_stub.cc +++ b/google/cloud/appengine/v1/internal/firewall_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/appengine/v1/internal/firewall_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -106,3 +109,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/firewall_stub.h b/google/cloud/appengine/v1/internal/firewall_stub.h index 7d4135cbf737b..7e0a16c59bc80 100644 --- a/google/cloud/appengine/v1/internal/firewall_stub.h +++ b/google/cloud/appengine/v1/internal/firewall_stub.h @@ -22,11 +22,14 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/appengine/v1/appengine.grpc.pb.h" +#include "google/appengine/v1/operation.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -104,4 +107,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_FIREWALL_STUB_H diff --git a/google/cloud/appengine/v1/internal/firewall_stub_factory.cc b/google/cloud/appengine/v1/internal/firewall_stub_factory.cc index 814ea94685739..4c02dc0ec3f3a 100644 --- a/google/cloud/appengine/v1/internal/firewall_stub_factory.cc +++ b/google/cloud/appengine/v1/internal/firewall_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -67,3 +70,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/firewall_stub_factory.h b/google/cloud/appengine/v1/internal/firewall_stub_factory.h index dbc37c89d6fae..cd6d3546354f4 100644 --- a/google/cloud/appengine/v1/internal/firewall_stub_factory.h +++ b/google/cloud/appengine/v1/internal/firewall_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_FIREWALL_STUB_FACTORY_H diff --git a/google/cloud/appengine/v1/internal/firewall_tracing_connection.cc b/google/cloud/appengine/v1/internal/firewall_tracing_connection.cc index db9ccadffeec4..a1e9d475024cf 100644 --- a/google/cloud/appengine/v1/internal/firewall_tracing_connection.cc +++ b/google/cloud/appengine/v1/internal/firewall_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace appengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - FirewallTracingConnection::FirewallTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -88,15 +86,11 @@ Status FirewallTracingConnection::DeleteIngressRule( return internal::EndSpan(*span, child_->DeleteIngressRule(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeFirewallTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/appengine/v1/internal/firewall_tracing_connection.h b/google/cloud/appengine/v1/internal/firewall_tracing_connection.h index ff4c5cf236730..a4fc505b38bcf 100644 --- a/google/cloud/appengine/v1/internal/firewall_tracing_connection.h +++ b/google/cloud/appengine/v1/internal/firewall_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace appengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class FirewallTracingConnection : public appengine_v1::FirewallConnection { public: ~FirewallTracingConnection() override = default; @@ -63,8 +61,6 @@ class FirewallTracingConnection : public appengine_v1::FirewallConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/appengine/v1/internal/firewall_tracing_stub.cc b/google/cloud/appengine/v1/internal/firewall_tracing_stub.cc index 0817ad775be99..8d8ae4d64a0f4 100644 --- a/google/cloud/appengine/v1/internal/firewall_tracing_stub.cc +++ b/google/cloud/appengine/v1/internal/firewall_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - FirewallTracingStub::FirewallTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -103,18 +104,14 @@ Status FirewallTracingStub::DeleteIngressRule( context, *span, child_->DeleteIngressRule(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeFirewallTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/firewall_tracing_stub.h b/google/cloud/appengine/v1/internal/firewall_tracing_stub.h index 7890a025deaa7..13142df324ddc 100644 --- a/google/cloud/appengine/v1/internal/firewall_tracing_stub.h +++ b/google/cloud/appengine/v1/internal/firewall_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class FirewallTracingStub : public FirewallStub { public: ~FirewallTracingStub() override = default; @@ -70,8 +71,6 @@ class FirewallTracingStub : public FirewallStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -86,4 +85,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_FIREWALL_TRACING_STUB_H diff --git a/google/cloud/appengine/v1/internal/instances_auth_decorator.cc b/google/cloud/appengine/v1/internal/instances_auth_decorator.cc index 10d0d651bb679..4f8b805afd1f3 100644 --- a/google/cloud/appengine/v1/internal/instances_auth_decorator.cc +++ b/google/cloud/appengine/v1/internal/instances_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/appengine/v1/appengine.proto #include "google/cloud/appengine/v1/internal/instances_auth_decorator.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -144,3 +147,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/instances_auth_decorator.h b/google/cloud/appengine/v1/internal/instances_auth_decorator.h index 5b8c15b9171db..f7e3be7c0bb0a 100644 --- a/google/cloud/appengine/v1/internal/instances_auth_decorator.h +++ b/google/cloud/appengine/v1/internal/instances_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/appengine/v1/internal/instances_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -89,4 +92,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_INSTANCES_AUTH_DECORATOR_H diff --git a/google/cloud/appengine/v1/internal/instances_connection_impl.h b/google/cloud/appengine/v1/internal/instances_connection_impl.h index 7eb4be50b2f92..f37ebb2bfccca 100644 --- a/google/cloud/appengine/v1/internal/instances_connection_impl.h +++ b/google/cloud/appengine/v1/internal/instances_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/appengine/v1/internal/instances_logging_decorator.cc b/google/cloud/appengine/v1/internal/instances_logging_decorator.cc index f121e89ab5762..21e67f937d2ea 100644 --- a/google/cloud/appengine/v1/internal/instances_logging_decorator.cc +++ b/google/cloud/appengine/v1/internal/instances_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/appengine/v1/internal/instances_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -155,3 +158,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/instances_logging_decorator.h b/google/cloud/appengine/v1/internal/instances_logging_decorator.h index 122ed4b8e8089..8674d5ba7764f 100644 --- a/google/cloud/appengine/v1/internal/instances_logging_decorator.h +++ b/google/cloud/appengine/v1/internal/instances_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/appengine/v1/internal/instances_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -89,4 +92,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_INSTANCES_LOGGING_DECORATOR_H diff --git a/google/cloud/appengine/v1/internal/instances_metadata_decorator.cc b/google/cloud/appengine/v1/internal/instances_metadata_decorator.cc index 5e63760cf9ec2..297eec6410afd 100644 --- a/google/cloud/appengine/v1/internal/instances_metadata_decorator.cc +++ b/google/cloud/appengine/v1/internal/instances_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/appengine/v1/internal/instances_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -141,3 +145,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/instances_metadata_decorator.h b/google/cloud/appengine/v1/internal/instances_metadata_decorator.h index ec67073047bc2..cc9e4e6b3ffbe 100644 --- a/google/cloud/appengine/v1/internal/instances_metadata_decorator.h +++ b/google/cloud/appengine/v1/internal/instances_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/appengine/v1/internal/instances_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -94,4 +97,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_INSTANCES_METADATA_DECORATOR_H diff --git a/google/cloud/appengine/v1/internal/instances_option_defaults.cc b/google/cloud/appengine/v1/internal/instances_option_defaults.cc index 0428bcca6df0f..4eafd1d995723 100644 --- a/google/cloud/appengine/v1/internal/instances_option_defaults.cc +++ b/google/cloud/appengine/v1/internal/instances_option_defaults.cc @@ -40,7 +40,7 @@ Options InstancesDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - appengine_v1::InstancesLimitedTimeRetryPolicy(std::chrono::minutes(30)) + appengine_v1::InstancesLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/appengine/v1/internal/instances_stub.cc b/google/cloud/appengine/v1/internal/instances_stub.cc index 0f0f648407573..9f0073417396d 100644 --- a/google/cloud/appengine/v1/internal/instances_stub.cc +++ b/google/cloud/appengine/v1/internal/instances_stub.cc @@ -19,11 +19,14 @@ #include "google/cloud/appengine/v1/internal/instances_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/appengine/v1/appengine.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -154,3 +157,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/instances_stub.h b/google/cloud/appengine/v1/internal/instances_stub.h index cb3e8d4316070..bc5d9ec09e99b 100644 --- a/google/cloud/appengine/v1/internal/instances_stub.h +++ b/google/cloud/appengine/v1/internal/instances_stub.h @@ -24,12 +24,15 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/appengine/v1/appengine.grpc.pb.h" +#include "google/appengine/v1/operation.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -141,4 +144,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_INSTANCES_STUB_H diff --git a/google/cloud/appengine/v1/internal/instances_stub_factory.cc b/google/cloud/appengine/v1/internal/instances_stub_factory.cc index 8c93005a726e8..48e0c2b286975 100644 --- a/google/cloud/appengine/v1/internal/instances_stub_factory.cc +++ b/google/cloud/appengine/v1/internal/instances_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -68,3 +71,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/instances_stub_factory.h b/google/cloud/appengine/v1/internal/instances_stub_factory.h index 00d0d89447765..c2373e7fd2d9c 100644 --- a/google/cloud/appengine/v1/internal/instances_stub_factory.h +++ b/google/cloud/appengine/v1/internal/instances_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_INSTANCES_STUB_FACTORY_H diff --git a/google/cloud/appengine/v1/internal/instances_tracing_connection.cc b/google/cloud/appengine/v1/internal/instances_tracing_connection.cc index 9754f6ec18683..8ffcda2a8ff92 100644 --- a/google/cloud/appengine/v1/internal/instances_tracing_connection.cc +++ b/google/cloud/appengine/v1/internal/instances_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace appengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - InstancesTracingConnection::InstancesTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -108,16 +106,12 @@ InstancesTracingConnection::DebugInstance( return internal::EndSpan(std::move(span), child_->DebugInstance(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeInstancesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/appengine/v1/internal/instances_tracing_connection.h b/google/cloud/appengine/v1/internal/instances_tracing_connection.h index 4d1a16f6445e5..537844ee7e01e 100644 --- a/google/cloud/appengine/v1/internal/instances_tracing_connection.h +++ b/google/cloud/appengine/v1/internal/instances_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace appengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class InstancesTracingConnection : public appengine_v1::InstancesConnection { public: ~InstancesTracingConnection() override = default; @@ -69,8 +67,6 @@ class InstancesTracingConnection : public appengine_v1::InstancesConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/appengine/v1/internal/instances_tracing_stub.cc b/google/cloud/appengine/v1/internal/instances_tracing_stub.cc index a11e273e04424..41e56ff2758e5 100644 --- a/google/cloud/appengine/v1/internal/instances_tracing_stub.cc +++ b/google/cloud/appengine/v1/internal/instances_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - InstancesTracingStub::InstancesTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -133,18 +134,14 @@ future InstancesTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeInstancesTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/instances_tracing_stub.h b/google/cloud/appengine/v1/internal/instances_tracing_stub.h index 07beaa58419aa..625c1d18508b3 100644 --- a/google/cloud/appengine/v1/internal/instances_tracing_stub.h +++ b/google/cloud/appengine/v1/internal/instances_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class InstancesTracingStub : public InstancesStub { public: ~InstancesTracingStub() override = default; @@ -84,8 +85,6 @@ class InstancesTracingStub : public InstancesStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -100,4 +99,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_INSTANCES_TRACING_STUB_H diff --git a/google/cloud/appengine/v1/internal/services_auth_decorator.cc b/google/cloud/appengine/v1/internal/services_auth_decorator.cc index a113a7e0a7224..a1057ebfd87f1 100644 --- a/google/cloud/appengine/v1/internal/services_auth_decorator.cc +++ b/google/cloud/appengine/v1/internal/services_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/appengine/v1/appengine.proto #include "google/cloud/appengine/v1/internal/services_auth_decorator.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -144,3 +147,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/services_auth_decorator.h b/google/cloud/appengine/v1/internal/services_auth_decorator.h index 38af16469a1f4..1d63a95e8bfb0 100644 --- a/google/cloud/appengine/v1/internal/services_auth_decorator.h +++ b/google/cloud/appengine/v1/internal/services_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/appengine/v1/internal/services_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -89,4 +92,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_SERVICES_AUTH_DECORATOR_H diff --git a/google/cloud/appengine/v1/internal/services_connection_impl.h b/google/cloud/appengine/v1/internal/services_connection_impl.h index 1f25749575ecb..31b927105c601 100644 --- a/google/cloud/appengine/v1/internal/services_connection_impl.h +++ b/google/cloud/appengine/v1/internal/services_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/appengine/v1/internal/services_logging_decorator.cc b/google/cloud/appengine/v1/internal/services_logging_decorator.cc index 8dd0238a7aa9d..63e1be9d5139d 100644 --- a/google/cloud/appengine/v1/internal/services_logging_decorator.cc +++ b/google/cloud/appengine/v1/internal/services_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/appengine/v1/internal/services_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -155,3 +158,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/services_logging_decorator.h b/google/cloud/appengine/v1/internal/services_logging_decorator.h index 71d03651f60dc..a2c9f9dc51ba7 100644 --- a/google/cloud/appengine/v1/internal/services_logging_decorator.h +++ b/google/cloud/appengine/v1/internal/services_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/appengine/v1/internal/services_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -89,4 +92,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_SERVICES_LOGGING_DECORATOR_H diff --git a/google/cloud/appengine/v1/internal/services_metadata_decorator.cc b/google/cloud/appengine/v1/internal/services_metadata_decorator.cc index 70c1046a70a5a..d12b9b7f44661 100644 --- a/google/cloud/appengine/v1/internal/services_metadata_decorator.cc +++ b/google/cloud/appengine/v1/internal/services_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/appengine/v1/internal/services_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -141,3 +145,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/services_metadata_decorator.h b/google/cloud/appengine/v1/internal/services_metadata_decorator.h index 2ec01f076d748..ef16f280d9fa2 100644 --- a/google/cloud/appengine/v1/internal/services_metadata_decorator.h +++ b/google/cloud/appengine/v1/internal/services_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/appengine/v1/internal/services_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -94,4 +97,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_SERVICES_METADATA_DECORATOR_H diff --git a/google/cloud/appengine/v1/internal/services_option_defaults.cc b/google/cloud/appengine/v1/internal/services_option_defaults.cc index 9350b14265b79..4c64e69d2908b 100644 --- a/google/cloud/appengine/v1/internal/services_option_defaults.cc +++ b/google/cloud/appengine/v1/internal/services_option_defaults.cc @@ -40,7 +40,7 @@ Options ServicesDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - appengine_v1::ServicesLimitedTimeRetryPolicy(std::chrono::minutes(30)) + appengine_v1::ServicesLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/appengine/v1/internal/services_stub.cc b/google/cloud/appengine/v1/internal/services_stub.cc index cec7dceabbee0..f4912bba753ab 100644 --- a/google/cloud/appengine/v1/internal/services_stub.cc +++ b/google/cloud/appengine/v1/internal/services_stub.cc @@ -19,11 +19,14 @@ #include "google/cloud/appengine/v1/internal/services_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/appengine/v1/appengine.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -153,3 +156,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/services_stub.h b/google/cloud/appengine/v1/internal/services_stub.h index 7b0d31246d9bb..a843784abd3e3 100644 --- a/google/cloud/appengine/v1/internal/services_stub.h +++ b/google/cloud/appengine/v1/internal/services_stub.h @@ -24,12 +24,15 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/appengine/v1/appengine.grpc.pb.h" +#include "google/appengine/v1/operation.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -140,4 +143,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_SERVICES_STUB_H diff --git a/google/cloud/appengine/v1/internal/services_stub_factory.cc b/google/cloud/appengine/v1/internal/services_stub_factory.cc index e43c9da1f9cb5..252c1b972207c 100644 --- a/google/cloud/appengine/v1/internal/services_stub_factory.cc +++ b/google/cloud/appengine/v1/internal/services_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -68,3 +71,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/services_stub_factory.h b/google/cloud/appengine/v1/internal/services_stub_factory.h index f59d89d5a38df..aa8025019120e 100644 --- a/google/cloud/appengine/v1/internal/services_stub_factory.h +++ b/google/cloud/appengine/v1/internal/services_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_SERVICES_STUB_FACTORY_H diff --git a/google/cloud/appengine/v1/internal/services_tracing_connection.cc b/google/cloud/appengine/v1/internal/services_tracing_connection.cc index 24d806c96a9f1..8bfbc134cd34e 100644 --- a/google/cloud/appengine/v1/internal/services_tracing_connection.cc +++ b/google/cloud/appengine/v1/internal/services_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace appengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ServicesTracingConnection::ServicesTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -106,15 +104,11 @@ ServicesTracingConnection::DeleteService( return internal::EndSpan(std::move(span), child_->DeleteService(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeServicesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/appengine/v1/internal/services_tracing_connection.h b/google/cloud/appengine/v1/internal/services_tracing_connection.h index 90f66b56626ac..cd6893a84f61e 100644 --- a/google/cloud/appengine/v1/internal/services_tracing_connection.h +++ b/google/cloud/appengine/v1/internal/services_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace appengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ServicesTracingConnection : public appengine_v1::ServicesConnection { public: ~ServicesTracingConnection() override = default; @@ -69,8 +67,6 @@ class ServicesTracingConnection : public appengine_v1::ServicesConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/appengine/v1/internal/services_tracing_stub.cc b/google/cloud/appengine/v1/internal/services_tracing_stub.cc index ecd270ca728c3..097ee5163834d 100644 --- a/google/cloud/appengine/v1/internal/services_tracing_stub.cc +++ b/google/cloud/appengine/v1/internal/services_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ServicesTracingStub::ServicesTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -132,18 +133,14 @@ future ServicesTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeServicesTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/services_tracing_stub.h b/google/cloud/appengine/v1/internal/services_tracing_stub.h index 1dfa5977d3b25..998e868d9f136 100644 --- a/google/cloud/appengine/v1/internal/services_tracing_stub.h +++ b/google/cloud/appengine/v1/internal/services_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ServicesTracingStub : public ServicesStub { public: ~ServicesTracingStub() override = default; @@ -84,8 +85,6 @@ class ServicesTracingStub : public ServicesStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -100,4 +99,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_SERVICES_TRACING_STUB_H diff --git a/google/cloud/appengine/v1/internal/versions_auth_decorator.cc b/google/cloud/appengine/v1/internal/versions_auth_decorator.cc index 5002a54db7e84..fe22e6b7792ed 100644 --- a/google/cloud/appengine/v1/internal/versions_auth_decorator.cc +++ b/google/cloud/appengine/v1/internal/versions_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/appengine/v1/appengine.proto #include "google/cloud/appengine/v1/internal/versions_auth_decorator.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -172,3 +175,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/versions_auth_decorator.h b/google/cloud/appengine/v1/internal/versions_auth_decorator.h index f9b92a9842838..ecff2a8f4fe5d 100644 --- a/google/cloud/appengine/v1/internal/versions_auth_decorator.h +++ b/google/cloud/appengine/v1/internal/versions_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/appengine/v1/internal/versions_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -99,4 +102,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_VERSIONS_AUTH_DECORATOR_H diff --git a/google/cloud/appengine/v1/internal/versions_connection_impl.h b/google/cloud/appengine/v1/internal/versions_connection_impl.h index 6126bdf65087a..9ad5e6270b20b 100644 --- a/google/cloud/appengine/v1/internal/versions_connection_impl.h +++ b/google/cloud/appengine/v1/internal/versions_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/appengine/v1/internal/versions_logging_decorator.cc b/google/cloud/appengine/v1/internal/versions_logging_decorator.cc index 50b8cb9a45b85..4d8a0db53b835 100644 --- a/google/cloud/appengine/v1/internal/versions_logging_decorator.cc +++ b/google/cloud/appengine/v1/internal/versions_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/appengine/v1/internal/versions_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -184,3 +187,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/versions_logging_decorator.h b/google/cloud/appengine/v1/internal/versions_logging_decorator.h index 3feec16fa7beb..abfb510541fae 100644 --- a/google/cloud/appengine/v1/internal/versions_logging_decorator.h +++ b/google/cloud/appengine/v1/internal/versions_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/appengine/v1/internal/versions_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -99,4 +102,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_VERSIONS_LOGGING_DECORATOR_H diff --git a/google/cloud/appengine/v1/internal/versions_metadata_decorator.cc b/google/cloud/appengine/v1/internal/versions_metadata_decorator.cc index f50adae9c4fe5..d4855469bf1ad 100644 --- a/google/cloud/appengine/v1/internal/versions_metadata_decorator.cc +++ b/google/cloud/appengine/v1/internal/versions_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/appengine/v1/internal/versions_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -161,3 +165,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/versions_metadata_decorator.h b/google/cloud/appengine/v1/internal/versions_metadata_decorator.h index a6e195e8a0580..d904c618c4423 100644 --- a/google/cloud/appengine/v1/internal/versions_metadata_decorator.h +++ b/google/cloud/appengine/v1/internal/versions_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/appengine/v1/internal/versions_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -104,4 +107,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_VERSIONS_METADATA_DECORATOR_H diff --git a/google/cloud/appengine/v1/internal/versions_option_defaults.cc b/google/cloud/appengine/v1/internal/versions_option_defaults.cc index 60c691d5594dc..d396b0b015746 100644 --- a/google/cloud/appengine/v1/internal/versions_option_defaults.cc +++ b/google/cloud/appengine/v1/internal/versions_option_defaults.cc @@ -40,7 +40,7 @@ Options VersionsDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - appengine_v1::VersionsLimitedTimeRetryPolicy(std::chrono::minutes(30)) + appengine_v1::VersionsLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/appengine/v1/internal/versions_stub.cc b/google/cloud/appengine/v1/internal/versions_stub.cc index 1b99381ddda1a..6d444437f4584 100644 --- a/google/cloud/appengine/v1/internal/versions_stub.cc +++ b/google/cloud/appengine/v1/internal/versions_stub.cc @@ -19,11 +19,14 @@ #include "google/cloud/appengine/v1/internal/versions_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/appengine/v1/appengine.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -181,3 +184,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/versions_stub.h b/google/cloud/appengine/v1/internal/versions_stub.h index 5c117b15e2cb5..e56b7c264e494 100644 --- a/google/cloud/appengine/v1/internal/versions_stub.h +++ b/google/cloud/appengine/v1/internal/versions_stub.h @@ -24,12 +24,15 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/appengine/v1/appengine.grpc.pb.h" +#include "google/appengine/v1/operation.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -160,4 +163,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_VERSIONS_STUB_H diff --git a/google/cloud/appengine/v1/internal/versions_stub_factory.cc b/google/cloud/appengine/v1/internal/versions_stub_factory.cc index 3c17501525d90..7adc1771188bb 100644 --- a/google/cloud/appengine/v1/internal/versions_stub_factory.cc +++ b/google/cloud/appengine/v1/internal/versions_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -68,3 +71,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/versions_stub_factory.h b/google/cloud/appengine/v1/internal/versions_stub_factory.h index 727b74e32d073..38c0e9c8961b2 100644 --- a/google/cloud/appengine/v1/internal/versions_stub_factory.h +++ b/google/cloud/appengine/v1/internal/versions_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_VERSIONS_STUB_FACTORY_H diff --git a/google/cloud/appengine/v1/internal/versions_tracing_connection.cc b/google/cloud/appengine/v1/internal/versions_tracing_connection.cc index 568ffb44bbb3f..fb6cf6f97d142 100644 --- a/google/cloud/appengine/v1/internal/versions_tracing_connection.cc +++ b/google/cloud/appengine/v1/internal/versions_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace appengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - VersionsTracingConnection::VersionsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -133,15 +131,11 @@ VersionsTracingConnection::DeleteVersion( return internal::EndSpan(std::move(span), child_->DeleteVersion(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeVersionsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/appengine/v1/internal/versions_tracing_connection.h b/google/cloud/appengine/v1/internal/versions_tracing_connection.h index 002f10c1fd714..db32d79d30cda 100644 --- a/google/cloud/appengine/v1/internal/versions_tracing_connection.h +++ b/google/cloud/appengine/v1/internal/versions_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace appengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class VersionsTracingConnection : public appengine_v1::VersionsConnection { public: ~VersionsTracingConnection() override = default; @@ -79,8 +77,6 @@ class VersionsTracingConnection : public appengine_v1::VersionsConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/appengine/v1/internal/versions_tracing_stub.cc b/google/cloud/appengine/v1/internal/versions_tracing_stub.cc index 9169c902e19ee..975675eb5b600 100644 --- a/google/cloud/appengine/v1/internal/versions_tracing_stub.cc +++ b/google/cloud/appengine/v1/internal/versions_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - VersionsTracingStub::VersionsTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -157,18 +158,14 @@ future VersionsTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeVersionsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace appengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/appengine/v1/internal/versions_tracing_stub.h b/google/cloud/appengine/v1/internal/versions_tracing_stub.h index f0b18e876c14f..65fee06599e45 100644 --- a/google/cloud/appengine/v1/internal/versions_tracing_stub.h +++ b/google/cloud/appengine/v1/internal/versions_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace appengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class VersionsTracingStub : public VersionsStub { public: ~VersionsTracingStub() override = default; @@ -94,8 +95,6 @@ class VersionsTracingStub : public VersionsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -110,4 +109,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_V1_INTERNAL_VERSIONS_TRACING_STUB_H diff --git a/google/cloud/appengine/v1/services_client.h b/google/cloud/appengine/v1/services_client.h index bdce72c302c88..c3c1269fd81c5 100644 --- a/google/cloud/appengine/v1/services_client.h +++ b/google/cloud/appengine/v1/services_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/appengine/v1/services_connection.h b/google/cloud/appengine/v1/services_connection.h index bcdf2cc9cd041..df7b86574b371 100644 --- a/google/cloud/appengine/v1/services_connection.h +++ b/google/cloud/appengine/v1/services_connection.h @@ -30,9 +30,9 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/appengine/v1/appengine.pb.h" +#include "google/appengine/v1/operation.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/appengine/v1/services_connection_idempotency_policy.h b/google/cloud/appengine/v1/services_connection_idempotency_policy.h index 626e1e1a4aed8..c2cd4f4d06b7e 100644 --- a/google/cloud/appengine/v1/services_connection_idempotency_policy.h +++ b/google/cloud/appengine/v1/services_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include namespace google { diff --git a/google/cloud/appengine/v1/versions_client.h b/google/cloud/appengine/v1/versions_client.h index 434c2fbb64d8a..5f4497294ed7a 100644 --- a/google/cloud/appengine/v1/versions_client.h +++ b/google/cloud/appengine/v1/versions_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/appengine/v1/versions_connection.h b/google/cloud/appengine/v1/versions_connection.h index 427e86c3923ef..8b5d7fcf9089d 100644 --- a/google/cloud/appengine/v1/versions_connection.h +++ b/google/cloud/appengine/v1/versions_connection.h @@ -30,9 +30,9 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/appengine/v1/appengine.pb.h" +#include "google/appengine/v1/operation.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/appengine/v1/versions_connection_idempotency_policy.h b/google/cloud/appengine/v1/versions_connection_idempotency_policy.h index 354d10df0f1b0..3c51d65d8625b 100644 --- a/google/cloud/appengine/v1/versions_connection_idempotency_policy.h +++ b/google/cloud/appengine/v1/versions_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/appengine/v1/appengine.grpc.pb.h" #include namespace google { diff --git a/google/cloud/appengine/versions_client.h b/google/cloud/appengine/versions_client.h deleted file mode 100644 index 444c53df2a3bb..0000000000000 --- a/google/cloud/appengine/versions_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_VERSIONS_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_VERSIONS_CLIENT_H - -#include "google/cloud/appengine/v1/versions_client.h" -#include "google/cloud/appengine/versions_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in appengine_v1 instead of the aliases defined in -/// this namespace. -namespace appengine { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1::VersionsClient directly. -using ::google::cloud::appengine_v1::VersionsClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_VERSIONS_CLIENT_H diff --git a/google/cloud/appengine/versions_connection.h b/google/cloud/appengine/versions_connection.h deleted file mode 100644 index d91e582a9901b..0000000000000 --- a/google/cloud/appengine/versions_connection.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_VERSIONS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_VERSIONS_CONNECTION_H - -#include "google/cloud/appengine/v1/versions_connection.h" -#include "google/cloud/appengine/versions_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace appengine { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1::MakeVersionsConnection directly. -using ::google::cloud::appengine_v1::MakeVersionsConnection; - -/// @deprecated Use appengine_v1::VersionsConnection directly. -using ::google::cloud::appengine_v1::VersionsConnection; - -/// @deprecated Use appengine_v1::VersionsLimitedErrorCountRetryPolicy directly. -using ::google::cloud::appengine_v1::VersionsLimitedErrorCountRetryPolicy; - -/// @deprecated Use appengine_v1::VersionsLimitedTimeRetryPolicy directly. -using ::google::cloud::appengine_v1::VersionsLimitedTimeRetryPolicy; - -/// @deprecated Use appengine_v1::VersionsRetryPolicy directly. -using ::google::cloud::appengine_v1::VersionsRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_VERSIONS_CONNECTION_H diff --git a/google/cloud/appengine/versions_connection_idempotency_policy.h b/google/cloud/appengine/versions_connection_idempotency_policy.h deleted file mode 100644 index f7f65b87f14f7..0000000000000 --- a/google/cloud/appengine/versions_connection_idempotency_policy.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_VERSIONS_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_VERSIONS_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/appengine/v1/versions_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace appengine { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1::MakeDefaultVersionsConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::appengine_v1:: - MakeDefaultVersionsConnectionIdempotencyPolicy; - -/// @deprecated Use appengine_v1::VersionsConnectionIdempotencyPolicy directly. -using ::google::cloud::appengine_v1::VersionsConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_VERSIONS_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/appengine/versions_options.h b/google/cloud/appengine/versions_options.h deleted file mode 100644 index 4add537e75c43..0000000000000 --- a/google/cloud/appengine/versions_options.h +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/appengine/v1/appengine.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_VERSIONS_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_VERSIONS_OPTIONS_H - -#include "google/cloud/appengine/v1/versions_options.h" -#include "google/cloud/appengine/versions_connection.h" -#include "google/cloud/appengine/versions_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace appengine { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use appengine_v1::VersionsPollingPolicyOption directly. -using ::google::cloud::appengine_v1::VersionsPollingPolicyOption; - -/// @deprecated Use appengine_v1::VersionsBackoffPolicyOption directly. -using ::google::cloud::appengine_v1::VersionsBackoffPolicyOption; - -/// @deprecated Use appengine_v1::VersionsConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::appengine_v1::VersionsConnectionIdempotencyPolicyOption; - -/// @deprecated Use appengine_v1::VersionsPolicyOptionList directly. -using ::google::cloud::appengine_v1::VersionsPolicyOptionList; - -/// @deprecated Use appengine_v1::VersionsRetryPolicyOption directly. -using ::google::cloud::appengine_v1::VersionsRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace appengine -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPENGINE_VERSIONS_OPTIONS_H diff --git a/google/cloud/apphub/BUILD.bazel b/google/cloud/apphub/BUILD.bazel index 61ab437e885b4..a65ea4dbdfe27 100644 --- a/google/cloud/apphub/BUILD.bazel +++ b/google/cloud/apphub/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/apphub/v1:apphub_cc_grpc", + "@googleapis//google/cloud/apphub/v1:apphub_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/apphub/quickstart/.bazelrc b/google/cloud/apphub/quickstart/.bazelrc index 15d5c055db074..343e7f623d628 100644 --- a/google/cloud/apphub/quickstart/.bazelrc +++ b/google/cloud/apphub/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/apphub/quickstart/CMakeLists.txt b/google/cloud/apphub/quickstart/CMakeLists.txt index 61300202b466f..acffa96eb4b18 100644 --- a/google/cloud/apphub/quickstart/CMakeLists.txt +++ b/google/cloud/apphub/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the App Hub API C++ client library from a larger # CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-apphub-quickstart CXX) find_package(google_cloud_cpp_apphub REQUIRED) diff --git a/google/cloud/apphub/v1/app_hub_client.h b/google/cloud/apphub/v1/app_hub_client.h index 24a8b45035896..341ab90c6a3b9 100644 --- a/google/cloud/apphub/v1/app_hub_client.h +++ b/google/cloud/apphub/v1/app_hub_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/apphub/v1/app_hub_connection.h b/google/cloud/apphub/v1/app_hub_connection.h index 489c3fd7ad31c..7c8d508ba4601 100644 --- a/google/cloud/apphub/v1/app_hub_connection.h +++ b/google/cloud/apphub/v1/app_hub_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPHUB_V1_APP_HUB_CONNECTION_H #include "google/cloud/apphub/v1/app_hub_connection_idempotency_policy.h" +#include "google/cloud/apphub/v1/apphub_service.pb.h" #include "google/cloud/apphub/v1/internal/app_hub_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/apphub/v1/app_hub_connection_idempotency_policy.h b/google/cloud/apphub/v1/app_hub_connection_idempotency_policy.h index 3d336bb2f2b3d..4e2e20f3419d3 100644 --- a/google/cloud/apphub/v1/app_hub_connection_idempotency_policy.h +++ b/google/cloud/apphub/v1/app_hub_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPHUB_V1_APP_HUB_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPHUB_V1_APP_HUB_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/apphub/v1/apphub_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/apphub/v1/internal/app_hub_auth_decorator.cc b/google/cloud/apphub/v1/internal/app_hub_auth_decorator.cc index f89ae3524161a..5cba34db0d79b 100644 --- a/google/cloud/apphub/v1/internal/app_hub_auth_decorator.cc +++ b/google/cloud/apphub/v1/internal/app_hub_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/apphub/v1/apphub_service.proto #include "google/cloud/apphub/v1/internal/app_hub_auth_decorator.h" -#include +#include "google/cloud/apphub/v1/apphub_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apphub_v1_internal { @@ -601,3 +604,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace apphub_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/apphub/v1/internal/app_hub_auth_decorator.h b/google/cloud/apphub/v1/internal/app_hub_auth_decorator.h index 92f90eb7169b3..47a0202f9722c 100644 --- a/google/cloud/apphub/v1/internal/app_hub_auth_decorator.h +++ b/google/cloud/apphub/v1/internal/app_hub_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/apphub/v1/internal/app_hub_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apphub_v1_internal { @@ -302,4 +305,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPHUB_V1_INTERNAL_APP_HUB_AUTH_DECORATOR_H diff --git a/google/cloud/apphub/v1/internal/app_hub_connection_impl.h b/google/cloud/apphub/v1/internal/app_hub_connection_impl.h index b8d2914b1835f..42facde00c007 100644 --- a/google/cloud/apphub/v1/internal/app_hub_connection_impl.h +++ b/google/cloud/apphub/v1/internal/app_hub_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/apphub/v1/internal/app_hub_logging_decorator.cc b/google/cloud/apphub/v1/internal/app_hub_logging_decorator.cc index 4e061a1aede07..dac8dd1579382 100644 --- a/google/cloud/apphub/v1/internal/app_hub_logging_decorator.cc +++ b/google/cloud/apphub/v1/internal/app_hub_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/apphub/v1/apphub_service.proto #include "google/cloud/apphub/v1/internal/app_hub_logging_decorator.h" +#include "google/cloud/apphub/v1/apphub_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apphub_v1_internal { @@ -721,3 +724,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace apphub_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/apphub/v1/internal/app_hub_logging_decorator.h b/google/cloud/apphub/v1/internal/app_hub_logging_decorator.h index b5d2debd42155..5f611aa8718dc 100644 --- a/google/cloud/apphub/v1/internal/app_hub_logging_decorator.h +++ b/google/cloud/apphub/v1/internal/app_hub_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/apphub/v1/internal/app_hub_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apphub_v1_internal { @@ -302,4 +305,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPHUB_V1_INTERNAL_APP_HUB_LOGGING_DECORATOR_H diff --git a/google/cloud/apphub/v1/internal/app_hub_metadata_decorator.cc b/google/cloud/apphub/v1/internal/app_hub_metadata_decorator.cc index f397482b69e0f..dc237eb4aefa0 100644 --- a/google/cloud/apphub/v1/internal/app_hub_metadata_decorator.cc +++ b/google/cloud/apphub/v1/internal/app_hub_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/apphub/v1/apphub_service.proto #include "google/cloud/apphub/v1/internal/app_hub_metadata_decorator.h" +#include "google/cloud/apphub/v1/apphub_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apphub_v1_internal { @@ -539,3 +543,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace apphub_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/apphub/v1/internal/app_hub_metadata_decorator.h b/google/cloud/apphub/v1/internal/app_hub_metadata_decorator.h index 38c91580bd843..3f03bfbfa12d3 100644 --- a/google/cloud/apphub/v1/internal/app_hub_metadata_decorator.h +++ b/google/cloud/apphub/v1/internal/app_hub_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/apphub/v1/internal/app_hub_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apphub_v1_internal { @@ -307,4 +310,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPHUB_V1_INTERNAL_APP_HUB_METADATA_DECORATOR_H diff --git a/google/cloud/apphub/v1/internal/app_hub_option_defaults.cc b/google/cloud/apphub/v1/internal/app_hub_option_defaults.cc index 999b8f4458dc5..838b00c6a1c11 100644 --- a/google/cloud/apphub/v1/internal/app_hub_option_defaults.cc +++ b/google/cloud/apphub/v1/internal/app_hub_option_defaults.cc @@ -40,7 +40,7 @@ Options AppHubDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - apphub_v1::AppHubLimitedTimeRetryPolicy(std::chrono::minutes(30)) + apphub_v1::AppHubLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/apphub/v1/internal/app_hub_stub.cc b/google/cloud/apphub/v1/internal/app_hub_stub.cc index d8e5fcbfbcc84..fbb62039bf0af 100644 --- a/google/cloud/apphub/v1/internal/app_hub_stub.cc +++ b/google/cloud/apphub/v1/internal/app_hub_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/apphub/v1/apphub_service.proto #include "google/cloud/apphub/v1/internal/app_hub_stub.h" +#include "google/cloud/apphub/v1/apphub_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apphub_v1_internal { @@ -710,3 +713,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace apphub_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/apphub/v1/internal/app_hub_stub.h b/google/cloud/apphub/v1/internal/app_hub_stub.h index ab5ee09d662cf..fe9005467eda7 100644 --- a/google/cloud/apphub/v1/internal/app_hub_stub.h +++ b/google/cloud/apphub/v1/internal/app_hub_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPHUB_V1_INTERNAL_APP_HUB_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPHUB_V1_INTERNAL_APP_HUB_STUB_H +#include "google/cloud/apphub/v1/apphub_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apphub_v1_internal { @@ -584,4 +587,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPHUB_V1_INTERNAL_APP_HUB_STUB_H diff --git a/google/cloud/apphub/v1/internal/app_hub_stub_factory.cc b/google/cloud/apphub/v1/internal/app_hub_stub_factory.cc index b514ecadaa409..b56c9aa3baca6 100644 --- a/google/cloud/apphub/v1/internal/app_hub_stub_factory.cc +++ b/google/cloud/apphub/v1/internal/app_hub_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/apphub/v1/apphub_service.proto #include "google/cloud/apphub/v1/internal/app_hub_stub_factory.h" +#include "google/cloud/apphub/v1/apphub_service.grpc.pb.h" #include "google/cloud/apphub/v1/internal/app_hub_auth_decorator.h" #include "google/cloud/apphub/v1/internal/app_hub_logging_decorator.h" #include "google/cloud/apphub/v1/internal/app_hub_metadata_decorator.h" #include "google/cloud/apphub/v1/internal/app_hub_stub.h" #include "google/cloud/apphub/v1/internal/app_hub_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apphub_v1_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace apphub_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/apphub/v1/internal/app_hub_stub_factory.h b/google/cloud/apphub/v1/internal/app_hub_stub_factory.h index 118e284c42b64..b8a8620f22b9b 100644 --- a/google/cloud/apphub/v1/internal/app_hub_stub_factory.h +++ b/google/cloud/apphub/v1/internal/app_hub_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apphub_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPHUB_V1_INTERNAL_APP_HUB_STUB_FACTORY_H diff --git a/google/cloud/apphub/v1/internal/app_hub_tracing_connection.cc b/google/cloud/apphub/v1/internal/app_hub_tracing_connection.cc index e2e0c310b8dbe..03437e3257091 100644 --- a/google/cloud/apphub/v1/internal/app_hub_tracing_connection.cc +++ b/google/cloud/apphub/v1/internal/app_hub_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace apphub_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AppHubTracingConnection::AppHubTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -572,15 +570,11 @@ Status AppHubTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAppHubTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/apphub/v1/internal/app_hub_tracing_connection.h b/google/cloud/apphub/v1/internal/app_hub_tracing_connection.h index 151167469297c..18359565d92a4 100644 --- a/google/cloud/apphub/v1/internal/app_hub_tracing_connection.h +++ b/google/cloud/apphub/v1/internal/app_hub_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace apphub_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AppHubTracingConnection : public apphub_v1::AppHubConnection { public: ~AppHubTracingConnection() override = default; @@ -260,8 +258,6 @@ class AppHubTracingConnection : public apphub_v1::AppHubConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/apphub/v1/internal/app_hub_tracing_stub.cc b/google/cloud/apphub/v1/internal/app_hub_tracing_stub.cc index 34b45ce686409..37554ad451759 100644 --- a/google/cloud/apphub/v1/internal/app_hub_tracing_stub.cc +++ b/google/cloud/apphub/v1/internal/app_hub_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apphub_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AppHubTracingStub::AppHubTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -654,18 +655,14 @@ future AppHubTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAppHubTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace apphub_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/apphub/v1/internal/app_hub_tracing_stub.h b/google/cloud/apphub/v1/internal/app_hub_tracing_stub.h index 76147543c3b67..82c28f060b8e3 100644 --- a/google/cloud/apphub/v1/internal/app_hub_tracing_stub.h +++ b/google/cloud/apphub/v1/internal/app_hub_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace apphub_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AppHubTracingStub : public AppHubStub { public: ~AppHubTracingStub() override = default; @@ -297,8 +298,6 @@ class AppHubTracingStub : public AppHubStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -313,4 +312,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_APPHUB_V1_INTERNAL_APP_HUB_TRACING_STUB_H diff --git a/google/cloud/artifactregistry/BUILD.bazel b/google/cloud/artifactregistry/BUILD.bazel index 9d4f9177dd000..9c5047fdf4f91 100644 --- a/google/cloud/artifactregistry/BUILD.bazel +++ b/google/cloud/artifactregistry/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/devtools/artifactregistry/v1:artifactregistry_cc_grpc", + "@googleapis//google/devtools/artifactregistry/v1:artifactregistry_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/artifactregistry/CMakeLists.txt b/google/cloud/artifactregistry/CMakeLists.txt index 4a64078b3e0bd..e72cdb91cd067 100644 --- a/google/cloud/artifactregistry/CMakeLists.txt +++ b/google/cloud/artifactregistry/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(artifactregistry "Artifact Registry API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(artifactregistry_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/artifactregistry/artifact_registry_client.h b/google/cloud/artifactregistry/artifact_registry_client.h deleted file mode 100644 index a63dd317061c1..0000000000000 --- a/google/cloud/artifactregistry/artifact_registry_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/devtools/artifactregistry/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ARTIFACTREGISTRY_ARTIFACT_REGISTRY_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ARTIFACTREGISTRY_ARTIFACT_REGISTRY_CLIENT_H - -#include "google/cloud/artifactregistry/artifact_registry_connection.h" -#include "google/cloud/artifactregistry/v1/artifact_registry_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in artifactregistry_v1 instead of the aliases defined in -/// this namespace. -namespace artifactregistry { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use artifactregistry_v1::ArtifactRegistryClient directly. -using ::google::cloud::artifactregistry_v1::ArtifactRegistryClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace artifactregistry -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ARTIFACTREGISTRY_ARTIFACT_REGISTRY_CLIENT_H diff --git a/google/cloud/artifactregistry/artifact_registry_connection.h b/google/cloud/artifactregistry/artifact_registry_connection.h deleted file mode 100644 index 079d726ba150c..0000000000000 --- a/google/cloud/artifactregistry/artifact_registry_connection.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/devtools/artifactregistry/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ARTIFACTREGISTRY_ARTIFACT_REGISTRY_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ARTIFACTREGISTRY_ARTIFACT_REGISTRY_CONNECTION_H - -#include "google/cloud/artifactregistry/artifact_registry_connection_idempotency_policy.h" -#include "google/cloud/artifactregistry/v1/artifact_registry_connection.h" - -namespace google { -namespace cloud { -namespace artifactregistry { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use artifactregistry_v1::MakeArtifactRegistryConnection -/// directly. -using ::google::cloud::artifactregistry_v1::MakeArtifactRegistryConnection; - -/// @deprecated Use artifactregistry_v1::ArtifactRegistryConnection directly. -using ::google::cloud::artifactregistry_v1::ArtifactRegistryConnection; - -/// @deprecated Use -/// artifactregistry_v1::ArtifactRegistryLimitedErrorCountRetryPolicy directly. -using ::google::cloud::artifactregistry_v1:: - ArtifactRegistryLimitedErrorCountRetryPolicy; - -/// @deprecated Use artifactregistry_v1::ArtifactRegistryLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::artifactregistry_v1:: - ArtifactRegistryLimitedTimeRetryPolicy; - -/// @deprecated Use artifactregistry_v1::ArtifactRegistryRetryPolicy directly. -using ::google::cloud::artifactregistry_v1::ArtifactRegistryRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace artifactregistry -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ARTIFACTREGISTRY_ARTIFACT_REGISTRY_CONNECTION_H diff --git a/google/cloud/artifactregistry/artifact_registry_connection_idempotency_policy.h b/google/cloud/artifactregistry/artifact_registry_connection_idempotency_policy.h deleted file mode 100644 index 2db4d00926e5c..0000000000000 --- a/google/cloud/artifactregistry/artifact_registry_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/devtools/artifactregistry/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ARTIFACTREGISTRY_ARTIFACT_REGISTRY_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ARTIFACTREGISTRY_ARTIFACT_REGISTRY_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/artifactregistry/v1/artifact_registry_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace artifactregistry { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// artifactregistry_v1::MakeDefaultArtifactRegistryConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::artifactregistry_v1:: - MakeDefaultArtifactRegistryConnectionIdempotencyPolicy; - -/// @deprecated Use -/// artifactregistry_v1::ArtifactRegistryConnectionIdempotencyPolicy directly. -using ::google::cloud::artifactregistry_v1:: - ArtifactRegistryConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace artifactregistry -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ARTIFACTREGISTRY_ARTIFACT_REGISTRY_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/artifactregistry/artifact_registry_options.h b/google/cloud/artifactregistry/artifact_registry_options.h deleted file mode 100644 index ebc600d81af0b..0000000000000 --- a/google/cloud/artifactregistry/artifact_registry_options.h +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/devtools/artifactregistry/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ARTIFACTREGISTRY_ARTIFACT_REGISTRY_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ARTIFACTREGISTRY_ARTIFACT_REGISTRY_OPTIONS_H - -#include "google/cloud/artifactregistry/artifact_registry_connection.h" -#include "google/cloud/artifactregistry/artifact_registry_connection_idempotency_policy.h" -#include "google/cloud/artifactregistry/v1/artifact_registry_options.h" - -namespace google { -namespace cloud { -namespace artifactregistry { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use artifactregistry_v1::ArtifactRegistryPollingPolicyOption -/// directly. -using ::google::cloud::artifactregistry_v1::ArtifactRegistryPollingPolicyOption; - -/// @deprecated Use artifactregistry_v1::ArtifactRegistryBackoffPolicyOption -/// directly. -using ::google::cloud::artifactregistry_v1::ArtifactRegistryBackoffPolicyOption; - -/// @deprecated Use -/// artifactregistry_v1::ArtifactRegistryConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::artifactregistry_v1:: - ArtifactRegistryConnectionIdempotencyPolicyOption; - -/// @deprecated Use artifactregistry_v1::ArtifactRegistryPolicyOptionList -/// directly. -using ::google::cloud::artifactregistry_v1::ArtifactRegistryPolicyOptionList; - -/// @deprecated Use artifactregistry_v1::ArtifactRegistryRetryPolicyOption -/// directly. -using ::google::cloud::artifactregistry_v1::ArtifactRegistryRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace artifactregistry -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ARTIFACTREGISTRY_ARTIFACT_REGISTRY_OPTIONS_H diff --git a/google/cloud/artifactregistry/mocks/mock_artifact_registry_connection.h b/google/cloud/artifactregistry/mocks/mock_artifact_registry_connection.h deleted file mode 100644 index 76c73ef319623..0000000000000 --- a/google/cloud/artifactregistry/mocks/mock_artifact_registry_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/devtools/artifactregistry/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ARTIFACTREGISTRY_MOCKS_MOCK_ARTIFACT_REGISTRY_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ARTIFACTREGISTRY_MOCKS_MOCK_ARTIFACT_REGISTRY_CONNECTION_H - -#include "google/cloud/artifactregistry/artifact_registry_connection.h" -#include "google/cloud/artifactregistry/v1/mocks/mock_artifact_registry_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in artifactregistry_v1_mocks instead of the aliases -/// defined in this namespace. -namespace artifactregistry_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use artifactregistry_v1_mocks::MockArtifactRegistryConnection -/// directly. -using ::google::cloud::artifactregistry_v1_mocks:: - MockArtifactRegistryConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace artifactregistry_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ARTIFACTREGISTRY_MOCKS_MOCK_ARTIFACT_REGISTRY_CONNECTION_H diff --git a/google/cloud/artifactregistry/quickstart/.bazelrc b/google/cloud/artifactregistry/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/artifactregistry/quickstart/.bazelrc +++ b/google/cloud/artifactregistry/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/artifactregistry/quickstart/CMakeLists.txt b/google/cloud/artifactregistry/quickstart/CMakeLists.txt index a4726e8ee6973..3d9736a372ee2 100644 --- a/google/cloud/artifactregistry/quickstart/CMakeLists.txt +++ b/google/cloud/artifactregistry/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Artifact Registry API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-artifactregistry-quickstart CXX) find_package(google_cloud_cpp_artifactregistry REQUIRED) diff --git a/google/cloud/artifactregistry/v1/artifact_registry_client.h b/google/cloud/artifactregistry/v1/artifact_registry_client.h index ff75c8bdcb4ac..d363e7fed1f0b 100644 --- a/google/cloud/artifactregistry/v1/artifact_registry_client.h +++ b/google/cloud/artifactregistry/v1/artifact_registry_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/artifactregistry/v1/artifact_registry_connection.h b/google/cloud/artifactregistry/v1/artifact_registry_connection.h index e52570702f305..16cb13bc4eb43 100644 --- a/google/cloud/artifactregistry/v1/artifact_registry_connection.h +++ b/google/cloud/artifactregistry/v1/artifact_registry_connection.h @@ -30,8 +30,8 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/devtools/artifactregistry/v1/service.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/artifactregistry/v1/artifact_registry_connection_idempotency_policy.h b/google/cloud/artifactregistry/v1/artifact_registry_connection_idempotency_policy.h index ac52cc868894f..dcf1306ffaaa5 100644 --- a/google/cloud/artifactregistry/v1/artifact_registry_connection_idempotency_policy.h +++ b/google/cloud/artifactregistry/v1/artifact_registry_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ARTIFACTREGISTRY_V1_ARTIFACT_REGISTRY_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ARTIFACTREGISTRY_V1_ARTIFACT_REGISTRY_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/devtools/artifactregistry/v1/service.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/artifactregistry/v1/internal/artifact_registry_auth_decorator.cc b/google/cloud/artifactregistry/v1/internal/artifact_registry_auth_decorator.cc index bd6a1a5604a60..24bb94198a297 100644 --- a/google/cloud/artifactregistry/v1/internal/artifact_registry_auth_decorator.cc +++ b/google/cloud/artifactregistry/v1/internal/artifact_registry_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/devtools/artifactregistry/v1/service.proto #include "google/cloud/artifactregistry/v1/internal/artifact_registry_auth_decorator.h" -#include +#include "google/devtools/artifactregistry/v1/service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace artifactregistry_v1_internal { @@ -795,3 +798,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace artifactregistry_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/artifactregistry/v1/internal/artifact_registry_auth_decorator.h b/google/cloud/artifactregistry/v1/internal/artifact_registry_auth_decorator.h index 3c33874c115c4..17431717ffd53 100644 --- a/google/cloud/artifactregistry/v1/internal/artifact_registry_auth_decorator.h +++ b/google/cloud/artifactregistry/v1/internal/artifact_registry_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/artifactregistry/v1/internal/artifact_registry_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace artifactregistry_v1_internal { @@ -410,4 +413,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ARTIFACTREGISTRY_V1_INTERNAL_ARTIFACT_REGISTRY_AUTH_DECORATOR_H diff --git a/google/cloud/artifactregistry/v1/internal/artifact_registry_connection_impl.h b/google/cloud/artifactregistry/v1/internal/artifact_registry_connection_impl.h index d6a92b605b6c2..cd6d8c20db250 100644 --- a/google/cloud/artifactregistry/v1/internal/artifact_registry_connection_impl.h +++ b/google/cloud/artifactregistry/v1/internal/artifact_registry_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/artifactregistry/v1/internal/artifact_registry_logging_decorator.cc b/google/cloud/artifactregistry/v1/internal/artifact_registry_logging_decorator.cc index 82b32dc7e282f..e854892109191 100644 --- a/google/cloud/artifactregistry/v1/internal/artifact_registry_logging_decorator.cc +++ b/google/cloud/artifactregistry/v1/internal/artifact_registry_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/artifactregistry/v1/internal/artifact_registry_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/devtools/artifactregistry/v1/service.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace artifactregistry_v1_internal { @@ -1016,3 +1019,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace artifactregistry_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/artifactregistry/v1/internal/artifact_registry_logging_decorator.h b/google/cloud/artifactregistry/v1/internal/artifact_registry_logging_decorator.h index 92eb7533b044e..bdc0fd31a8a1e 100644 --- a/google/cloud/artifactregistry/v1/internal/artifact_registry_logging_decorator.h +++ b/google/cloud/artifactregistry/v1/internal/artifact_registry_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/artifactregistry/v1/internal/artifact_registry_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace artifactregistry_v1_internal { @@ -410,4 +413,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ARTIFACTREGISTRY_V1_INTERNAL_ARTIFACT_REGISTRY_LOGGING_DECORATOR_H diff --git a/google/cloud/artifactregistry/v1/internal/artifact_registry_metadata_decorator.cc b/google/cloud/artifactregistry/v1/internal/artifact_registry_metadata_decorator.cc index e1ee2b3576f01..a1671c13c0d5d 100644 --- a/google/cloud/artifactregistry/v1/internal/artifact_registry_metadata_decorator.cc +++ b/google/cloud/artifactregistry/v1/internal/artifact_registry_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/artifactregistry/v1/internal/artifact_registry_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/devtools/artifactregistry/v1/service.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace artifactregistry_v1_internal { @@ -742,3 +746,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace artifactregistry_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/artifactregistry/v1/internal/artifact_registry_metadata_decorator.h b/google/cloud/artifactregistry/v1/internal/artifact_registry_metadata_decorator.h index c64bb2e855a29..12527a16f6198 100644 --- a/google/cloud/artifactregistry/v1/internal/artifact_registry_metadata_decorator.h +++ b/google/cloud/artifactregistry/v1/internal/artifact_registry_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/artifactregistry/v1/internal/artifact_registry_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace artifactregistry_v1_internal { @@ -416,4 +419,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ARTIFACTREGISTRY_V1_INTERNAL_ARTIFACT_REGISTRY_METADATA_DECORATOR_H diff --git a/google/cloud/artifactregistry/v1/internal/artifact_registry_option_defaults.cc b/google/cloud/artifactregistry/v1/internal/artifact_registry_option_defaults.cc index 7a990fe3b07c4..2f258686271ba 100644 --- a/google/cloud/artifactregistry/v1/internal/artifact_registry_option_defaults.cc +++ b/google/cloud/artifactregistry/v1/internal/artifact_registry_option_defaults.cc @@ -42,7 +42,7 @@ Options ArtifactRegistryDefaultOptions(Options options) { if (!options.has()) { options.set( artifactregistry_v1::ArtifactRegistryLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/artifactregistry/v1/internal/artifact_registry_stub.cc b/google/cloud/artifactregistry/v1/internal/artifact_registry_stub.cc index faad75521e9c4..dfb7d9ab0a8e4 100644 --- a/google/cloud/artifactregistry/v1/internal/artifact_registry_stub.cc +++ b/google/cloud/artifactregistry/v1/internal/artifact_registry_stub.cc @@ -19,11 +19,14 @@ #include "google/cloud/artifactregistry/v1/internal/artifact_registry_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/devtools/artifactregistry/v1/service.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace artifactregistry_v1_internal { @@ -961,3 +964,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace artifactregistry_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/artifactregistry/v1/internal/artifact_registry_stub.h b/google/cloud/artifactregistry/v1/internal/artifact_registry_stub.h index a72d6812b0a15..73d2f53b75baa 100644 --- a/google/cloud/artifactregistry/v1/internal/artifact_registry_stub.h +++ b/google/cloud/artifactregistry/v1/internal/artifact_registry_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ARTIFACTREGISTRY_V1_INTERNAL_ARTIFACT_REGISTRY_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ARTIFACTREGISTRY_V1_INTERNAL_ARTIFACT_REGISTRY_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/devtools/artifactregistry/v1/service.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace artifactregistry_v1_internal { @@ -812,4 +815,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ARTIFACTREGISTRY_V1_INTERNAL_ARTIFACT_REGISTRY_STUB_H diff --git a/google/cloud/artifactregistry/v1/internal/artifact_registry_stub_factory.cc b/google/cloud/artifactregistry/v1/internal/artifact_registry_stub_factory.cc index 269be927b3334..bc31f298c1206 100644 --- a/google/cloud/artifactregistry/v1/internal/artifact_registry_stub_factory.cc +++ b/google/cloud/artifactregistry/v1/internal/artifact_registry_stub_factory.cc @@ -22,18 +22,21 @@ #include "google/cloud/artifactregistry/v1/internal/artifact_registry_metadata_decorator.h" #include "google/cloud/artifactregistry/v1/internal/artifact_registry_stub.h" #include "google/cloud/artifactregistry/v1/internal/artifact_registry_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/devtools/artifactregistry/v1/service.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace artifactregistry_v1_internal { @@ -76,3 +79,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace artifactregistry_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/artifactregistry/v1/internal/artifact_registry_stub_factory.h b/google/cloud/artifactregistry/v1/internal/artifact_registry_stub_factory.h index 63f3bb032a65d..43edf479d6f26 100644 --- a/google/cloud/artifactregistry/v1/internal/artifact_registry_stub_factory.h +++ b/google/cloud/artifactregistry/v1/internal/artifact_registry_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace artifactregistry_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ARTIFACTREGISTRY_V1_INTERNAL_ARTIFACT_REGISTRY_STUB_FACTORY_H diff --git a/google/cloud/artifactregistry/v1/internal/artifact_registry_tracing_connection.cc b/google/cloud/artifactregistry/v1/internal/artifact_registry_tracing_connection.cc index a7fcd6ee45ee5..a98fa88d64c2f 100644 --- a/google/cloud/artifactregistry/v1/internal/artifact_registry_tracing_connection.cc +++ b/google/cloud/artifactregistry/v1/internal/artifact_registry_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace artifactregistry_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ArtifactRegistryTracingConnection::ArtifactRegistryTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -809,16 +807,12 @@ ArtifactRegistryTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeArtifactRegistryTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/artifactregistry/v1/internal/artifact_registry_tracing_connection.h b/google/cloud/artifactregistry/v1/internal/artifact_registry_tracing_connection.h index a0b48173097c8..63426066ce15a 100644 --- a/google/cloud/artifactregistry/v1/internal/artifact_registry_tracing_connection.h +++ b/google/cloud/artifactregistry/v1/internal/artifact_registry_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace artifactregistry_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ArtifactRegistryTracingConnection : public artifactregistry_v1::ArtifactRegistryConnection { public: @@ -364,8 +362,6 @@ class ArtifactRegistryTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/artifactregistry/v1/internal/artifact_registry_tracing_stub.cc b/google/cloud/artifactregistry/v1/internal/artifact_registry_tracing_stub.cc index 5cd23bf79be88..22709fe25468e 100644 --- a/google/cloud/artifactregistry/v1/internal/artifact_registry_tracing_stub.cc +++ b/google/cloud/artifactregistry/v1/internal/artifact_registry_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace artifactregistry_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ArtifactRegistryTracingStub::ArtifactRegistryTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -922,18 +923,14 @@ future ArtifactRegistryTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeArtifactRegistryTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace artifactregistry_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/artifactregistry/v1/internal/artifact_registry_tracing_stub.h b/google/cloud/artifactregistry/v1/internal/artifact_registry_tracing_stub.h index 79b07c367990b..f3d902e0345ee 100644 --- a/google/cloud/artifactregistry/v1/internal/artifact_registry_tracing_stub.h +++ b/google/cloud/artifactregistry/v1/internal/artifact_registry_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace artifactregistry_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ArtifactRegistryTracingStub : public ArtifactRegistryStub { public: ~ArtifactRegistryTracingStub() override = default; @@ -406,8 +407,6 @@ class ArtifactRegistryTracingStub : public ArtifactRegistryStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -422,4 +421,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ARTIFACTREGISTRY_V1_INTERNAL_ARTIFACT_REGISTRY_TRACING_STUB_H diff --git a/google/cloud/asset/BUILD.bazel b/google/cloud/asset/BUILD.bazel index ac20e571b2aea..d79d987e283b8 100644 --- a/google/cloud/asset/BUILD.bazel +++ b/google/cloud/asset/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/asset/v1:asset_cc_grpc", + "@googleapis//google/cloud/asset/v1:asset_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/asset/CMakeLists.txt b/google/cloud/asset/CMakeLists.txt index 6666c8fc4aae3..f79442409d31d 100644 --- a/google/cloud/asset/CMakeLists.txt +++ b/google/cloud/asset/CMakeLists.txt @@ -19,7 +19,6 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library( asset "Cloud Asset API" SERVICE_DIRS - "__EMPTY__" "v1/" # orgpolicy/v**1** is used *indirectly* by google/cloud/asset, therefore # it does not appear in protolists/asset.list. In addition, it is not diff --git a/google/cloud/asset/asset_client.h b/google/cloud/asset/asset_client.h deleted file mode 100644 index bff7b3a05c1f9..0000000000000 --- a/google/cloud/asset/asset_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/asset/v1/asset_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSET_ASSET_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSET_ASSET_CLIENT_H - -#include "google/cloud/asset/asset_connection.h" -#include "google/cloud/asset/v1/asset_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in asset_v1 instead of the aliases defined in -/// this namespace. -namespace asset { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use asset_v1::AssetServiceClient directly. -using ::google::cloud::asset_v1::AssetServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace asset -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSET_ASSET_CLIENT_H diff --git a/google/cloud/asset/asset_connection.h b/google/cloud/asset/asset_connection.h deleted file mode 100644 index 804f1f3bd0c02..0000000000000 --- a/google/cloud/asset/asset_connection.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/asset/v1/asset_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSET_ASSET_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSET_ASSET_CONNECTION_H - -#include "google/cloud/asset/asset_connection_idempotency_policy.h" -#include "google/cloud/asset/v1/asset_connection.h" - -namespace google { -namespace cloud { -namespace asset { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use asset_v1::MakeAssetServiceConnection directly. -using ::google::cloud::asset_v1::MakeAssetServiceConnection; - -/// @deprecated Use asset_v1::AssetServiceConnection directly. -using ::google::cloud::asset_v1::AssetServiceConnection; - -/// @deprecated Use asset_v1::AssetServiceLimitedErrorCountRetryPolicy directly. -using ::google::cloud::asset_v1::AssetServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use asset_v1::AssetServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::asset_v1::AssetServiceLimitedTimeRetryPolicy; - -/// @deprecated Use asset_v1::AssetServiceRetryPolicy directly. -using ::google::cloud::asset_v1::AssetServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace asset -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSET_ASSET_CONNECTION_H diff --git a/google/cloud/asset/asset_connection_idempotency_policy.h b/google/cloud/asset/asset_connection_idempotency_policy.h deleted file mode 100644 index 2f34cdf3ddf67..0000000000000 --- a/google/cloud/asset/asset_connection_idempotency_policy.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/asset/v1/asset_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSET_ASSET_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSET_ASSET_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/asset/v1/asset_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace asset { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use asset_v1::MakeDefaultAssetServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::asset_v1:: - MakeDefaultAssetServiceConnectionIdempotencyPolicy; - -/// @deprecated Use asset_v1::AssetServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::asset_v1::AssetServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace asset -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSET_ASSET_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/asset/asset_options.h b/google/cloud/asset/asset_options.h deleted file mode 100644 index d09b4dfd6d67b..0000000000000 --- a/google/cloud/asset/asset_options.h +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/asset/v1/asset_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSET_ASSET_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSET_ASSET_OPTIONS_H - -#include "google/cloud/asset/asset_connection.h" -#include "google/cloud/asset/asset_connection_idempotency_policy.h" -#include "google/cloud/asset/v1/asset_options.h" - -namespace google { -namespace cloud { -namespace asset { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use asset_v1::AssetServicePollingPolicyOption directly. -using ::google::cloud::asset_v1::AssetServicePollingPolicyOption; - -/// @deprecated Use asset_v1::AssetServiceBackoffPolicyOption directly. -using ::google::cloud::asset_v1::AssetServiceBackoffPolicyOption; - -/// @deprecated Use asset_v1::AssetServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::asset_v1::AssetServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use asset_v1::AssetServicePolicyOptionList directly. -using ::google::cloud::asset_v1::AssetServicePolicyOptionList; - -/// @deprecated Use asset_v1::AssetServiceRetryPolicyOption directly. -using ::google::cloud::asset_v1::AssetServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace asset -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSET_ASSET_OPTIONS_H diff --git a/google/cloud/asset/mocks/mock_asset_connection.h b/google/cloud/asset/mocks/mock_asset_connection.h deleted file mode 100644 index 5e1942dd419eb..0000000000000 --- a/google/cloud/asset/mocks/mock_asset_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/asset/v1/asset_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSET_MOCKS_MOCK_ASSET_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSET_MOCKS_MOCK_ASSET_CONNECTION_H - -#include "google/cloud/asset/asset_connection.h" -#include "google/cloud/asset/v1/mocks/mock_asset_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in asset_v1_mocks instead of the aliases -/// defined in this namespace. -namespace asset_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use asset_v1_mocks::MockAssetServiceConnection directly. -using ::google::cloud::asset_v1_mocks::MockAssetServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace asset_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSET_MOCKS_MOCK_ASSET_CONNECTION_H diff --git a/google/cloud/asset/quickstart/.bazelrc b/google/cloud/asset/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/asset/quickstart/.bazelrc +++ b/google/cloud/asset/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/asset/quickstart/CMakeLists.txt b/google/cloud/asset/quickstart/CMakeLists.txt index 55542d1a15588..b49b78bf356a0 100644 --- a/google/cloud/asset/quickstart/CMakeLists.txt +++ b/google/cloud/asset/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Asset API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-asset-quickstart CXX) find_package(google_cloud_cpp_asset REQUIRED) diff --git a/google/cloud/asset/v1/asset_client.h b/google/cloud/asset/v1/asset_client.h index f57bfa95d5797..f47a0cf08ddeb 100644 --- a/google/cloud/asset/v1/asset_client.h +++ b/google/cloud/asset/v1/asset_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/asset/v1/asset_connection.h b/google/cloud/asset/v1/asset_connection.h index 0c6a555f28505..1904b68bded77 100644 --- a/google/cloud/asset/v1/asset_connection.h +++ b/google/cloud/asset/v1/asset_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSET_V1_ASSET_CONNECTION_H #include "google/cloud/asset/v1/asset_connection_idempotency_policy.h" +#include "google/cloud/asset/v1/asset_service.pb.h" #include "google/cloud/asset/v1/internal/asset_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/asset/v1/asset_connection_idempotency_policy.h b/google/cloud/asset/v1/asset_connection_idempotency_policy.h index 9bbf0da4f4d49..e10055a36fe01 100644 --- a/google/cloud/asset/v1/asset_connection_idempotency_policy.h +++ b/google/cloud/asset/v1/asset_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSET_V1_ASSET_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSET_V1_ASSET_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/asset/v1/asset_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/asset/v1/internal/asset_auth_decorator.cc b/google/cloud/asset/v1/internal/asset_auth_decorator.cc index 4bd1e5e57da91..12aa2d5eee41d 100644 --- a/google/cloud/asset/v1/internal/asset_auth_decorator.cc +++ b/google/cloud/asset/v1/internal/asset_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/asset/v1/asset_service.proto #include "google/cloud/asset/v1/internal/asset_auth_decorator.h" -#include +#include "google/cloud/asset/v1/asset_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace asset_v1_internal { @@ -324,3 +327,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace asset_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/asset/v1/internal/asset_auth_decorator.h b/google/cloud/asset/v1/internal/asset_auth_decorator.h index 2a6420080f586..dcc769d4fefd3 100644 --- a/google/cloud/asset/v1/internal/asset_auth_decorator.h +++ b/google/cloud/asset/v1/internal/asset_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/asset/v1/internal/asset_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace asset_v1_internal { @@ -189,4 +192,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSET_V1_INTERNAL_ASSET_AUTH_DECORATOR_H diff --git a/google/cloud/asset/v1/internal/asset_connection_impl.h b/google/cloud/asset/v1/internal/asset_connection_impl.h index 952f6e78b9270..b1b9a367279ef 100644 --- a/google/cloud/asset/v1/internal/asset_connection_impl.h +++ b/google/cloud/asset/v1/internal/asset_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/asset/v1/internal/asset_logging_decorator.cc b/google/cloud/asset/v1/internal/asset_logging_decorator.cc index a4aca53587acf..83adb16375fc4 100644 --- a/google/cloud/asset/v1/internal/asset_logging_decorator.cc +++ b/google/cloud/asset/v1/internal/asset_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/asset/v1/asset_service.proto #include "google/cloud/asset/v1/internal/asset_logging_decorator.h" +#include "google/cloud/asset/v1/asset_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace asset_v1_internal { @@ -409,3 +412,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace asset_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/asset/v1/internal/asset_logging_decorator.h b/google/cloud/asset/v1/internal/asset_logging_decorator.h index f84bd68791412..40b6b9b1cb6de 100644 --- a/google/cloud/asset/v1/internal/asset_logging_decorator.h +++ b/google/cloud/asset/v1/internal/asset_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/asset/v1/internal/asset_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace asset_v1_internal { @@ -189,4 +192,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSET_V1_INTERNAL_ASSET_LOGGING_DECORATOR_H diff --git a/google/cloud/asset/v1/internal/asset_metadata_decorator.cc b/google/cloud/asset/v1/internal/asset_metadata_decorator.cc index 90503e18cbeef..a9ca4877a88ff 100644 --- a/google/cloud/asset/v1/internal/asset_metadata_decorator.cc +++ b/google/cloud/asset/v1/internal/asset_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/asset/v1/asset_service.proto #include "google/cloud/asset/v1/internal/asset_metadata_decorator.h" +#include "google/cloud/asset/v1/asset_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace asset_v1_internal { @@ -331,3 +335,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace asset_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/asset/v1/internal/asset_metadata_decorator.h b/google/cloud/asset/v1/internal/asset_metadata_decorator.h index 0ca1f7b156daa..3f8cec6fcb2e7 100644 --- a/google/cloud/asset/v1/internal/asset_metadata_decorator.h +++ b/google/cloud/asset/v1/internal/asset_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/asset/v1/internal/asset_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace asset_v1_internal { @@ -194,4 +197,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSET_V1_INTERNAL_ASSET_METADATA_DECORATOR_H diff --git a/google/cloud/asset/v1/internal/asset_option_defaults.cc b/google/cloud/asset/v1/internal/asset_option_defaults.cc index 0e79630e355cc..ad9a1a66070fc 100644 --- a/google/cloud/asset/v1/internal/asset_option_defaults.cc +++ b/google/cloud/asset/v1/internal/asset_option_defaults.cc @@ -40,7 +40,7 @@ Options AssetServiceDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - asset_v1::AssetServiceLimitedTimeRetryPolicy(std::chrono::minutes(30)) + asset_v1::AssetServiceLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/asset/v1/internal/asset_stub.cc b/google/cloud/asset/v1/internal/asset_stub.cc index def5c641f166a..47f3c2e49939e 100644 --- a/google/cloud/asset/v1/internal/asset_stub.cc +++ b/google/cloud/asset/v1/internal/asset_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/asset/v1/asset_service.proto #include "google/cloud/asset/v1/internal/asset_stub.h" +#include "google/cloud/asset/v1/asset_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace asset_v1_internal { @@ -402,3 +405,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace asset_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/asset/v1/internal/asset_stub.h b/google/cloud/asset/v1/internal/asset_stub.h index e692c365bb676..8f1f6d0571ec9 100644 --- a/google/cloud/asset/v1/internal/asset_stub.h +++ b/google/cloud/asset/v1/internal/asset_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSET_V1_INTERNAL_ASSET_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSET_V1_INTERNAL_ASSET_STUB_H +#include "google/cloud/asset/v1/asset_service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace asset_v1_internal { @@ -340,4 +343,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSET_V1_INTERNAL_ASSET_STUB_H diff --git a/google/cloud/asset/v1/internal/asset_stub_factory.cc b/google/cloud/asset/v1/internal/asset_stub_factory.cc index c4b68909f7769..9601a6ccf3ef2 100644 --- a/google/cloud/asset/v1/internal/asset_stub_factory.cc +++ b/google/cloud/asset/v1/internal/asset_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/asset/v1/asset_service.proto #include "google/cloud/asset/v1/internal/asset_stub_factory.h" +#include "google/cloud/asset/v1/asset_service.grpc.pb.h" #include "google/cloud/asset/v1/internal/asset_auth_decorator.h" #include "google/cloud/asset/v1/internal/asset_logging_decorator.h" #include "google/cloud/asset/v1/internal/asset_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace asset_v1_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace asset_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/asset/v1/internal/asset_stub_factory.h b/google/cloud/asset/v1/internal/asset_stub_factory.h index 6b3404bada0a3..65a7fba65a2fc 100644 --- a/google/cloud/asset/v1/internal/asset_stub_factory.h +++ b/google/cloud/asset/v1/internal/asset_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace asset_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSET_V1_INTERNAL_ASSET_STUB_FACTORY_H diff --git a/google/cloud/asset/v1/internal/asset_tracing_connection.cc b/google/cloud/asset/v1/internal/asset_tracing_connection.cc index 845b455cc0064..7fa1aa769298f 100644 --- a/google/cloud/asset/v1/internal/asset_tracing_connection.cc +++ b/google/cloud/asset/v1/internal/asset_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace asset_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AssetServiceTracingConnection::AssetServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -311,16 +309,12 @@ AssetServiceTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAssetServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/asset/v1/internal/asset_tracing_connection.h b/google/cloud/asset/v1/internal/asset_tracing_connection.h index 9c530c2cf0598..27b5ed39e10d8 100644 --- a/google/cloud/asset/v1/internal/asset_tracing_connection.h +++ b/google/cloud/asset/v1/internal/asset_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace asset_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AssetServiceTracingConnection : public asset_v1::AssetServiceConnection { public: ~AssetServiceTracingConnection() override = default; @@ -153,8 +151,6 @@ class AssetServiceTracingConnection : public asset_v1::AssetServiceConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/asset/v1/internal/asset_tracing_stub.cc b/google/cloud/asset/v1/internal/asset_tracing_stub.cc index 1eacf06144070..ec035f8957950 100644 --- a/google/cloud/asset/v1/internal/asset_tracing_stub.cc +++ b/google/cloud/asset/v1/internal/asset_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace asset_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AssetServiceTracingStub::AssetServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -379,18 +380,14 @@ future AssetServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAssetServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace asset_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/asset/v1/internal/asset_tracing_stub.h b/google/cloud/asset/v1/internal/asset_tracing_stub.h index 8c7a9e4e93cac..daf4ca43a3a9e 100644 --- a/google/cloud/asset/v1/internal/asset_tracing_stub.h +++ b/google/cloud/asset/v1/internal/asset_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace asset_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AssetServiceTracingStub : public AssetServiceStub { public: ~AssetServiceTracingStub() override = default; @@ -184,8 +185,6 @@ class AssetServiceTracingStub : public AssetServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -200,4 +199,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSET_V1_INTERNAL_ASSET_TRACING_STUB_H diff --git a/google/cloud/assuredworkloads/BUILD.bazel b/google/cloud/assuredworkloads/BUILD.bazel index c37769d131870..d5f42fa943315 100644 --- a/google/cloud/assuredworkloads/BUILD.bazel +++ b/google/cloud/assuredworkloads/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/assuredworkloads/v1:assuredworkloads_cc_grpc", + "@googleapis//google/cloud/assuredworkloads/v1:assuredworkloads_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/assuredworkloads/CMakeLists.txt b/google/cloud/assuredworkloads/CMakeLists.txt index 2508a6b1afc23..000704d148d18 100644 --- a/google/cloud/assuredworkloads/CMakeLists.txt +++ b/google/cloud/assuredworkloads/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(assuredworkloads "Assured Workloads API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(assuredworkloads_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/assuredworkloads/assured_workloads_client.h b/google/cloud/assuredworkloads/assured_workloads_client.h deleted file mode 100644 index 02eca9191d101..0000000000000 --- a/google/cloud/assuredworkloads/assured_workloads_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/assuredworkloads/v1/assuredworkloads.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSUREDWORKLOADS_ASSURED_WORKLOADS_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSUREDWORKLOADS_ASSURED_WORKLOADS_CLIENT_H - -#include "google/cloud/assuredworkloads/assured_workloads_connection.h" -#include "google/cloud/assuredworkloads/v1/assured_workloads_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in assuredworkloads_v1 instead of the aliases defined in -/// this namespace. -namespace assuredworkloads { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use assuredworkloads_v1::AssuredWorkloadsServiceClient directly. -using ::google::cloud::assuredworkloads_v1::AssuredWorkloadsServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace assuredworkloads -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSUREDWORKLOADS_ASSURED_WORKLOADS_CLIENT_H diff --git a/google/cloud/assuredworkloads/assured_workloads_connection.h b/google/cloud/assuredworkloads/assured_workloads_connection.h deleted file mode 100644 index 71bbcfe0a23da..0000000000000 --- a/google/cloud/assuredworkloads/assured_workloads_connection.h +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/assuredworkloads/v1/assuredworkloads.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSUREDWORKLOADS_ASSURED_WORKLOADS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSUREDWORKLOADS_ASSURED_WORKLOADS_CONNECTION_H - -#include "google/cloud/assuredworkloads/assured_workloads_connection_idempotency_policy.h" -#include "google/cloud/assuredworkloads/v1/assured_workloads_connection.h" - -namespace google { -namespace cloud { -namespace assuredworkloads { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use assuredworkloads_v1::MakeAssuredWorkloadsServiceConnection -/// directly. -using ::google::cloud::assuredworkloads_v1:: - MakeAssuredWorkloadsServiceConnection; - -/// @deprecated Use assuredworkloads_v1::AssuredWorkloadsServiceConnection -/// directly. -using ::google::cloud::assuredworkloads_v1::AssuredWorkloadsServiceConnection; - -/// @deprecated Use -/// assuredworkloads_v1::AssuredWorkloadsServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::assuredworkloads_v1:: - AssuredWorkloadsServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use -/// assuredworkloads_v1::AssuredWorkloadsServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::assuredworkloads_v1:: - AssuredWorkloadsServiceLimitedTimeRetryPolicy; - -/// @deprecated Use assuredworkloads_v1::AssuredWorkloadsServiceRetryPolicy -/// directly. -using ::google::cloud::assuredworkloads_v1::AssuredWorkloadsServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace assuredworkloads -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSUREDWORKLOADS_ASSURED_WORKLOADS_CONNECTION_H diff --git a/google/cloud/assuredworkloads/assured_workloads_connection_idempotency_policy.h b/google/cloud/assuredworkloads/assured_workloads_connection_idempotency_policy.h deleted file mode 100644 index 904e74012f079..0000000000000 --- a/google/cloud/assuredworkloads/assured_workloads_connection_idempotency_policy.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/assuredworkloads/v1/assuredworkloads.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSUREDWORKLOADS_ASSURED_WORKLOADS_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSUREDWORKLOADS_ASSURED_WORKLOADS_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/assuredworkloads/v1/assured_workloads_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace assuredworkloads { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// assuredworkloads_v1::MakeDefaultAssuredWorkloadsServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::assuredworkloads_v1:: - MakeDefaultAssuredWorkloadsServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// assuredworkloads_v1::AssuredWorkloadsServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::assuredworkloads_v1:: - AssuredWorkloadsServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace assuredworkloads -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSUREDWORKLOADS_ASSURED_WORKLOADS_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/assuredworkloads/assured_workloads_options.h b/google/cloud/assuredworkloads/assured_workloads_options.h deleted file mode 100644 index 658ab48c70bcb..0000000000000 --- a/google/cloud/assuredworkloads/assured_workloads_options.h +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/assuredworkloads/v1/assuredworkloads.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSUREDWORKLOADS_ASSURED_WORKLOADS_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSUREDWORKLOADS_ASSURED_WORKLOADS_OPTIONS_H - -#include "google/cloud/assuredworkloads/assured_workloads_connection.h" -#include "google/cloud/assuredworkloads/assured_workloads_connection_idempotency_policy.h" -#include "google/cloud/assuredworkloads/v1/assured_workloads_options.h" - -namespace google { -namespace cloud { -namespace assuredworkloads { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// assuredworkloads_v1::AssuredWorkloadsServicePollingPolicyOption directly. -using ::google::cloud::assuredworkloads_v1:: - AssuredWorkloadsServicePollingPolicyOption; - -/// @deprecated Use -/// assuredworkloads_v1::AssuredWorkloadsServiceBackoffPolicyOption directly. -using ::google::cloud::assuredworkloads_v1:: - AssuredWorkloadsServiceBackoffPolicyOption; - -/// @deprecated Use -/// assuredworkloads_v1::AssuredWorkloadsServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::assuredworkloads_v1:: - AssuredWorkloadsServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use assuredworkloads_v1::AssuredWorkloadsServicePolicyOptionList -/// directly. -using ::google::cloud::assuredworkloads_v1:: - AssuredWorkloadsServicePolicyOptionList; - -/// @deprecated Use -/// assuredworkloads_v1::AssuredWorkloadsServiceRetryPolicyOption directly. -using ::google::cloud::assuredworkloads_v1:: - AssuredWorkloadsServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace assuredworkloads -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSUREDWORKLOADS_ASSURED_WORKLOADS_OPTIONS_H diff --git a/google/cloud/assuredworkloads/mocks/mock_assured_workloads_connection.h b/google/cloud/assuredworkloads/mocks/mock_assured_workloads_connection.h deleted file mode 100644 index a3c2084eeab7b..0000000000000 --- a/google/cloud/assuredworkloads/mocks/mock_assured_workloads_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/assuredworkloads/v1/assuredworkloads.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSUREDWORKLOADS_MOCKS_MOCK_ASSURED_WORKLOADS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSUREDWORKLOADS_MOCKS_MOCK_ASSURED_WORKLOADS_CONNECTION_H - -#include "google/cloud/assuredworkloads/assured_workloads_connection.h" -#include "google/cloud/assuredworkloads/v1/mocks/mock_assured_workloads_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in assuredworkloads_v1_mocks instead of the aliases -/// defined in this namespace. -namespace assuredworkloads_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// assuredworkloads_v1_mocks::MockAssuredWorkloadsServiceConnection directly. -using ::google::cloud::assuredworkloads_v1_mocks:: - MockAssuredWorkloadsServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace assuredworkloads_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSUREDWORKLOADS_MOCKS_MOCK_ASSURED_WORKLOADS_CONNECTION_H diff --git a/google/cloud/assuredworkloads/quickstart/.bazelrc b/google/cloud/assuredworkloads/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/assuredworkloads/quickstart/.bazelrc +++ b/google/cloud/assuredworkloads/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/assuredworkloads/quickstart/CMakeLists.txt b/google/cloud/assuredworkloads/quickstart/CMakeLists.txt index bfcc9b6f27562..c6cf9373b7157 100644 --- a/google/cloud/assuredworkloads/quickstart/CMakeLists.txt +++ b/google/cloud/assuredworkloads/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Assured Workloads API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-assuredworkloads-quickstart CXX) find_package(google_cloud_cpp_assuredworkloads REQUIRED) diff --git a/google/cloud/assuredworkloads/v1/assured_workloads_client.h b/google/cloud/assuredworkloads/v1/assured_workloads_client.h index 17ebe1cc01650..dcfcb49044b0e 100644 --- a/google/cloud/assuredworkloads/v1/assured_workloads_client.h +++ b/google/cloud/assuredworkloads/v1/assured_workloads_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/assuredworkloads/v1/assured_workloads_connection.h b/google/cloud/assuredworkloads/v1/assured_workloads_connection.h index d8cdc5787f047..4d0e8aa2d42fd 100644 --- a/google/cloud/assuredworkloads/v1/assured_workloads_connection.h +++ b/google/cloud/assuredworkloads/v1/assured_workloads_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSUREDWORKLOADS_V1_ASSURED_WORKLOADS_CONNECTION_H #include "google/cloud/assuredworkloads/v1/assured_workloads_connection_idempotency_policy.h" +#include "google/cloud/assuredworkloads/v1/assuredworkloads.pb.h" #include "google/cloud/assuredworkloads/v1/internal/assured_workloads_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/assuredworkloads/v1/assured_workloads_connection_idempotency_policy.h b/google/cloud/assuredworkloads/v1/assured_workloads_connection_idempotency_policy.h index 291a560655c7e..2ebe27ecf146a 100644 --- a/google/cloud/assuredworkloads/v1/assured_workloads_connection_idempotency_policy.h +++ b/google/cloud/assuredworkloads/v1/assured_workloads_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSUREDWORKLOADS_V1_ASSURED_WORKLOADS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSUREDWORKLOADS_V1_ASSURED_WORKLOADS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/assuredworkloads/v1/assuredworkloads.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/assuredworkloads/v1/internal/assured_workloads_auth_decorator.cc b/google/cloud/assuredworkloads/v1/internal/assured_workloads_auth_decorator.cc index 643f48be0ecee..b37ccc5d4ef19 100644 --- a/google/cloud/assuredworkloads/v1/internal/assured_workloads_auth_decorator.cc +++ b/google/cloud/assuredworkloads/v1/internal/assured_workloads_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/assuredworkloads/v1/assuredworkloads.proto #include "google/cloud/assuredworkloads/v1/internal/assured_workloads_auth_decorator.h" -#include +#include "google/cloud/assuredworkloads/v1/assuredworkloads.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace assuredworkloads_v1_internal { @@ -191,3 +194,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace assuredworkloads_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/assuredworkloads/v1/internal/assured_workloads_auth_decorator.h b/google/cloud/assuredworkloads/v1/internal/assured_workloads_auth_decorator.h index b45484afd1d98..41ddc6043dadf 100644 --- a/google/cloud/assuredworkloads/v1/internal/assured_workloads_auth_decorator.h +++ b/google/cloud/assuredworkloads/v1/internal/assured_workloads_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/assuredworkloads/v1/internal/assured_workloads_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace assuredworkloads_v1_internal { @@ -125,4 +128,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSUREDWORKLOADS_V1_INTERNAL_ASSURED_WORKLOADS_AUTH_DECORATOR_H diff --git a/google/cloud/assuredworkloads/v1/internal/assured_workloads_connection_impl.h b/google/cloud/assuredworkloads/v1/internal/assured_workloads_connection_impl.h index bf8d205a3df82..772759a6a371d 100644 --- a/google/cloud/assuredworkloads/v1/internal/assured_workloads_connection_impl.h +++ b/google/cloud/assuredworkloads/v1/internal/assured_workloads_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/assuredworkloads/v1/internal/assured_workloads_logging_decorator.cc b/google/cloud/assuredworkloads/v1/internal/assured_workloads_logging_decorator.cc index 139602cf7027d..ec50b8cb2d714 100644 --- a/google/cloud/assuredworkloads/v1/internal/assured_workloads_logging_decorator.cc +++ b/google/cloud/assuredworkloads/v1/internal/assured_workloads_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/assuredworkloads/v1/assuredworkloads.proto #include "google/cloud/assuredworkloads/v1/internal/assured_workloads_logging_decorator.h" +#include "google/cloud/assuredworkloads/v1/assuredworkloads.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace assuredworkloads_v1_internal { @@ -235,3 +238,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace assuredworkloads_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/assuredworkloads/v1/internal/assured_workloads_logging_decorator.h b/google/cloud/assuredworkloads/v1/internal/assured_workloads_logging_decorator.h index 300fde6d1702c..b6ce0ffcb95ee 100644 --- a/google/cloud/assuredworkloads/v1/internal/assured_workloads_logging_decorator.h +++ b/google/cloud/assuredworkloads/v1/internal/assured_workloads_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/assuredworkloads/v1/internal/assured_workloads_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace assuredworkloads_v1_internal { @@ -125,4 +128,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSUREDWORKLOADS_V1_INTERNAL_ASSURED_WORKLOADS_LOGGING_DECORATOR_H diff --git a/google/cloud/assuredworkloads/v1/internal/assured_workloads_metadata_decorator.cc b/google/cloud/assuredworkloads/v1/internal/assured_workloads_metadata_decorator.cc index 1312347835a8e..3fa10049bb922 100644 --- a/google/cloud/assuredworkloads/v1/internal/assured_workloads_metadata_decorator.cc +++ b/google/cloud/assuredworkloads/v1/internal/assured_workloads_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/assuredworkloads/v1/assuredworkloads.proto #include "google/cloud/assuredworkloads/v1/internal/assured_workloads_metadata_decorator.h" +#include "google/cloud/assuredworkloads/v1/assuredworkloads.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace assuredworkloads_v1_internal { @@ -194,3 +198,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace assuredworkloads_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/assuredworkloads/v1/internal/assured_workloads_metadata_decorator.h b/google/cloud/assuredworkloads/v1/internal/assured_workloads_metadata_decorator.h index d849d8f8cfbb9..ec6bcf9149cf9 100644 --- a/google/cloud/assuredworkloads/v1/internal/assured_workloads_metadata_decorator.h +++ b/google/cloud/assuredworkloads/v1/internal/assured_workloads_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/assuredworkloads/v1/internal/assured_workloads_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace assuredworkloads_v1_internal { @@ -131,4 +134,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSUREDWORKLOADS_V1_INTERNAL_ASSURED_WORKLOADS_METADATA_DECORATOR_H diff --git a/google/cloud/assuredworkloads/v1/internal/assured_workloads_option_defaults.cc b/google/cloud/assuredworkloads/v1/internal/assured_workloads_option_defaults.cc index 20ef27f069541..5137de60c6133 100644 --- a/google/cloud/assuredworkloads/v1/internal/assured_workloads_option_defaults.cc +++ b/google/cloud/assuredworkloads/v1/internal/assured_workloads_option_defaults.cc @@ -43,7 +43,7 @@ Options AssuredWorkloadsServiceDefaultOptions(Options options) { assuredworkloads_v1::AssuredWorkloadsServiceRetryPolicyOption>()) { options.set( assuredworkloads_v1::AssuredWorkloadsServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/assuredworkloads/v1/internal/assured_workloads_stub.cc b/google/cloud/assuredworkloads/v1/internal/assured_workloads_stub.cc index ef6ad1c12f0b6..aa610051fc898 100644 --- a/google/cloud/assuredworkloads/v1/internal/assured_workloads_stub.cc +++ b/google/cloud/assuredworkloads/v1/internal/assured_workloads_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/assuredworkloads/v1/assuredworkloads.proto #include "google/cloud/assuredworkloads/v1/internal/assured_workloads_stub.h" +#include "google/cloud/assuredworkloads/v1/assuredworkloads.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace assuredworkloads_v1_internal { @@ -228,3 +231,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace assuredworkloads_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/assuredworkloads/v1/internal/assured_workloads_stub.h b/google/cloud/assuredworkloads/v1/internal/assured_workloads_stub.h index ec7b3e9897b3b..1ec01ba744bca 100644 --- a/google/cloud/assuredworkloads/v1/internal/assured_workloads_stub.h +++ b/google/cloud/assuredworkloads/v1/internal/assured_workloads_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSUREDWORKLOADS_V1_INTERNAL_ASSURED_WORKLOADS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSUREDWORKLOADS_V1_INTERNAL_ASSURED_WORKLOADS_STUB_H +#include "google/cloud/assuredworkloads/v1/assuredworkloads.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace assuredworkloads_v1_internal { @@ -217,4 +220,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSUREDWORKLOADS_V1_INTERNAL_ASSURED_WORKLOADS_STUB_H diff --git a/google/cloud/assuredworkloads/v1/internal/assured_workloads_stub_factory.cc b/google/cloud/assuredworkloads/v1/internal/assured_workloads_stub_factory.cc index 42a8f6d9b788a..21db12f2cb1d2 100644 --- a/google/cloud/assuredworkloads/v1/internal/assured_workloads_stub_factory.cc +++ b/google/cloud/assuredworkloads/v1/internal/assured_workloads_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/assuredworkloads/v1/assuredworkloads.proto #include "google/cloud/assuredworkloads/v1/internal/assured_workloads_stub_factory.h" +#include "google/cloud/assuredworkloads/v1/assuredworkloads.grpc.pb.h" #include "google/cloud/assuredworkloads/v1/internal/assured_workloads_auth_decorator.h" #include "google/cloud/assuredworkloads/v1/internal/assured_workloads_logging_decorator.h" #include "google/cloud/assuredworkloads/v1/internal/assured_workloads_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace assuredworkloads_v1_internal { @@ -74,3 +77,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace assuredworkloads_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/assuredworkloads/v1/internal/assured_workloads_stub_factory.h b/google/cloud/assuredworkloads/v1/internal/assured_workloads_stub_factory.h index 13998f0ca84ae..5ad0391ef2119 100644 --- a/google/cloud/assuredworkloads/v1/internal/assured_workloads_stub_factory.h +++ b/google/cloud/assuredworkloads/v1/internal/assured_workloads_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace assuredworkloads_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSUREDWORKLOADS_V1_INTERNAL_ASSURED_WORKLOADS_STUB_FACTORY_H diff --git a/google/cloud/assuredworkloads/v1/internal/assured_workloads_tracing_connection.cc b/google/cloud/assuredworkloads/v1/internal/assured_workloads_tracing_connection.cc index c761ea543cb04..9071dbaac9a78 100644 --- a/google/cloud/assuredworkloads/v1/internal/assured_workloads_tracing_connection.cc +++ b/google/cloud/assuredworkloads/v1/internal/assured_workloads_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace assuredworkloads_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AssuredWorkloadsServiceTracingConnection:: AssuredWorkloadsServiceTracingConnection( std::shared_ptr @@ -165,18 +163,14 @@ AssuredWorkloadsServiceTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAssuredWorkloadsServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/assuredworkloads/v1/internal/assured_workloads_tracing_connection.h b/google/cloud/assuredworkloads/v1/internal/assured_workloads_tracing_connection.h index be933bd9dce06..b4f082c039750 100644 --- a/google/cloud/assuredworkloads/v1/internal/assured_workloads_tracing_connection.h +++ b/google/cloud/assuredworkloads/v1/internal/assured_workloads_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace assuredworkloads_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AssuredWorkloadsServiceTracingConnection : public assuredworkloads_v1::AssuredWorkloadsServiceConnection { public: @@ -100,8 +98,6 @@ class AssuredWorkloadsServiceTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/assuredworkloads/v1/internal/assured_workloads_tracing_stub.cc b/google/cloud/assuredworkloads/v1/internal/assured_workloads_tracing_stub.cc index f61ace61860f9..f9dd0ba228dc1 100644 --- a/google/cloud/assuredworkloads/v1/internal/assured_workloads_tracing_stub.cc +++ b/google/cloud/assuredworkloads/v1/internal/assured_workloads_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace assuredworkloads_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AssuredWorkloadsServiceTracingStub::AssuredWorkloadsServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -221,19 +222,15 @@ future AssuredWorkloadsServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAssuredWorkloadsServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace assuredworkloads_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/assuredworkloads/v1/internal/assured_workloads_tracing_stub.h b/google/cloud/assuredworkloads/v1/internal/assured_workloads_tracing_stub.h index 2a7e2fb2ad12e..fd2beebc53e7b 100644 --- a/google/cloud/assuredworkloads/v1/internal/assured_workloads_tracing_stub.h +++ b/google/cloud/assuredworkloads/v1/internal/assured_workloads_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace assuredworkloads_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AssuredWorkloadsServiceTracingStub : public AssuredWorkloadsServiceStub { public: ~AssuredWorkloadsServiceTracingStub() override = default; @@ -121,8 +122,6 @@ class AssuredWorkloadsServiceTracingStub : public AssuredWorkloadsServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -138,4 +137,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ASSUREDWORKLOADS_V1_INTERNAL_ASSURED_WORKLOADS_TRACING_STUB_H diff --git a/google/cloud/auditmanager/BUILD.bazel b/google/cloud/auditmanager/BUILD.bazel index 63115f5c8cc93..12d139ac53cd5 100644 --- a/google/cloud/auditmanager/BUILD.bazel +++ b/google/cloud/auditmanager/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/auditmanager/v1:auditmanager_cc_grpc", + "@googleapis//google/cloud/auditmanager/v1:auditmanager_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/auditmanager/quickstart/CMakeLists.txt b/google/cloud/auditmanager/quickstart/CMakeLists.txt index bf27dc65fedc1..ee787043e69a1 100644 --- a/google/cloud/auditmanager/quickstart/CMakeLists.txt +++ b/google/cloud/auditmanager/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Audit Manager API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-auditmanager-quickstart CXX) find_package(google_cloud_cpp_auditmanager REQUIRED) diff --git a/google/cloud/auditmanager/v1/audit_manager_client.h b/google/cloud/auditmanager/v1/audit_manager_client.h index 90ae8e707b4b1..de335a23be428 100644 --- a/google/cloud/auditmanager/v1/audit_manager_client.h +++ b/google/cloud/auditmanager/v1/audit_manager_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/auditmanager/v1/audit_manager_connection.h b/google/cloud/auditmanager/v1/audit_manager_connection.h index 2fe7b1b90c6be..e78fb182bd30e 100644 --- a/google/cloud/auditmanager/v1/audit_manager_connection.h +++ b/google/cloud/auditmanager/v1/audit_manager_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUDITMANAGER_V1_AUDIT_MANAGER_CONNECTION_H #include "google/cloud/auditmanager/v1/audit_manager_connection_idempotency_policy.h" +#include "google/cloud/auditmanager/v1/auditmanager.pb.h" #include "google/cloud/auditmanager/v1/internal/audit_manager_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/auditmanager/v1/audit_manager_connection_idempotency_policy.h b/google/cloud/auditmanager/v1/audit_manager_connection_idempotency_policy.h index c593e9df57759..39ff96e1f39c5 100644 --- a/google/cloud/auditmanager/v1/audit_manager_connection_idempotency_policy.h +++ b/google/cloud/auditmanager/v1/audit_manager_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUDITMANAGER_V1_AUDIT_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUDITMANAGER_V1_AUDIT_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/auditmanager/v1/auditmanager.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/auditmanager/v1/internal/audit_manager_auth_decorator.cc b/google/cloud/auditmanager/v1/internal/audit_manager_auth_decorator.cc index f6fc8928981a9..9f128f06c0562 100644 --- a/google/cloud/auditmanager/v1/internal/audit_manager_auth_decorator.cc +++ b/google/cloud/auditmanager/v1/internal/audit_manager_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/auditmanager/v1/auditmanager.proto #include "google/cloud/auditmanager/v1/internal/audit_manager_auth_decorator.h" -#include +#include "google/cloud/auditmanager/v1/auditmanager.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace auditmanager_v1_internal { @@ -218,3 +221,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace auditmanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/auditmanager/v1/internal/audit_manager_auth_decorator.h b/google/cloud/auditmanager/v1/internal/audit_manager_auth_decorator.h index 031879b54f61f..83d98a7112c1b 100644 --- a/google/cloud/auditmanager/v1/internal/audit_manager_auth_decorator.h +++ b/google/cloud/auditmanager/v1/internal/audit_manager_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/auditmanager/v1/internal/audit_manager_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace auditmanager_v1_internal { @@ -137,4 +140,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUDITMANAGER_V1_INTERNAL_AUDIT_MANAGER_AUTH_DECORATOR_H diff --git a/google/cloud/auditmanager/v1/internal/audit_manager_connection_impl.h b/google/cloud/auditmanager/v1/internal/audit_manager_connection_impl.h index 96198e64e0541..080613ff181e8 100644 --- a/google/cloud/auditmanager/v1/internal/audit_manager_connection_impl.h +++ b/google/cloud/auditmanager/v1/internal/audit_manager_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/auditmanager/v1/internal/audit_manager_logging_decorator.cc b/google/cloud/auditmanager/v1/internal/audit_manager_logging_decorator.cc index 5bcff8e69f004..20c6188e40cdc 100644 --- a/google/cloud/auditmanager/v1/internal/audit_manager_logging_decorator.cc +++ b/google/cloud/auditmanager/v1/internal/audit_manager_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/auditmanager/v1/auditmanager.proto #include "google/cloud/auditmanager/v1/internal/audit_manager_logging_decorator.h" +#include "google/cloud/auditmanager/v1/auditmanager.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace auditmanager_v1_internal { @@ -272,3 +275,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace auditmanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/auditmanager/v1/internal/audit_manager_logging_decorator.h b/google/cloud/auditmanager/v1/internal/audit_manager_logging_decorator.h index f749738ac420d..605169e07cb3e 100644 --- a/google/cloud/auditmanager/v1/internal/audit_manager_logging_decorator.h +++ b/google/cloud/auditmanager/v1/internal/audit_manager_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/auditmanager/v1/internal/audit_manager_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace auditmanager_v1_internal { @@ -137,4 +140,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUDITMANAGER_V1_INTERNAL_AUDIT_MANAGER_LOGGING_DECORATOR_H diff --git a/google/cloud/auditmanager/v1/internal/audit_manager_metadata_decorator.cc b/google/cloud/auditmanager/v1/internal/audit_manager_metadata_decorator.cc index 89f29697b949c..625ccaeeba5ba 100644 --- a/google/cloud/auditmanager/v1/internal/audit_manager_metadata_decorator.cc +++ b/google/cloud/auditmanager/v1/internal/audit_manager_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/auditmanager/v1/auditmanager.proto #include "google/cloud/auditmanager/v1/internal/audit_manager_metadata_decorator.h" +#include "google/cloud/auditmanager/v1/auditmanager.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace auditmanager_v1_internal { @@ -224,3 +228,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace auditmanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/auditmanager/v1/internal/audit_manager_metadata_decorator.h b/google/cloud/auditmanager/v1/internal/audit_manager_metadata_decorator.h index f275f38596bd8..5663df261c7c7 100644 --- a/google/cloud/auditmanager/v1/internal/audit_manager_metadata_decorator.h +++ b/google/cloud/auditmanager/v1/internal/audit_manager_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/auditmanager/v1/internal/audit_manager_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace auditmanager_v1_internal { @@ -142,4 +145,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUDITMANAGER_V1_INTERNAL_AUDIT_MANAGER_METADATA_DECORATOR_H diff --git a/google/cloud/auditmanager/v1/internal/audit_manager_option_defaults.cc b/google/cloud/auditmanager/v1/internal/audit_manager_option_defaults.cc index b803e024ef737..262ab0b39ae3c 100644 --- a/google/cloud/auditmanager/v1/internal/audit_manager_option_defaults.cc +++ b/google/cloud/auditmanager/v1/internal/audit_manager_option_defaults.cc @@ -42,7 +42,7 @@ Options AuditManagerDefaultOptions(Options options) { if (!options.has()) { options.set( auditmanager_v1::AuditManagerLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/auditmanager/v1/internal/audit_manager_stub.cc b/google/cloud/auditmanager/v1/internal/audit_manager_stub.cc index f61896bd78a7d..4272cbaf3dfc1 100644 --- a/google/cloud/auditmanager/v1/internal/audit_manager_stub.cc +++ b/google/cloud/auditmanager/v1/internal/audit_manager_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/auditmanager/v1/auditmanager.proto #include "google/cloud/auditmanager/v1/internal/audit_manager_stub.h" +#include "google/cloud/auditmanager/v1/auditmanager.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace auditmanager_v1_internal { @@ -268,3 +271,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace auditmanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/auditmanager/v1/internal/audit_manager_stub.h b/google/cloud/auditmanager/v1/internal/audit_manager_stub.h index c42a7d6f93ee3..789d5311926d9 100644 --- a/google/cloud/auditmanager/v1/internal/audit_manager_stub.h +++ b/google/cloud/auditmanager/v1/internal/audit_manager_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUDITMANAGER_V1_INTERNAL_AUDIT_MANAGER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUDITMANAGER_V1_INTERNAL_AUDIT_MANAGER_STUB_H +#include "google/cloud/auditmanager/v1/auditmanager.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace auditmanager_v1_internal { @@ -246,4 +249,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUDITMANAGER_V1_INTERNAL_AUDIT_MANAGER_STUB_H diff --git a/google/cloud/auditmanager/v1/internal/audit_manager_stub_factory.cc b/google/cloud/auditmanager/v1/internal/audit_manager_stub_factory.cc index 1a8a7fd1da8f9..1bc82b028b1a5 100644 --- a/google/cloud/auditmanager/v1/internal/audit_manager_stub_factory.cc +++ b/google/cloud/auditmanager/v1/internal/audit_manager_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/auditmanager/v1/auditmanager.proto #include "google/cloud/auditmanager/v1/internal/audit_manager_stub_factory.h" +#include "google/cloud/auditmanager/v1/auditmanager.grpc.pb.h" #include "google/cloud/auditmanager/v1/internal/audit_manager_auth_decorator.h" #include "google/cloud/auditmanager/v1/internal/audit_manager_logging_decorator.h" #include "google/cloud/auditmanager/v1/internal/audit_manager_metadata_decorator.h" #include "google/cloud/auditmanager/v1/internal/audit_manager_stub.h" #include "google/cloud/auditmanager/v1/internal/audit_manager_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace auditmanager_v1_internal { @@ -74,3 +77,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace auditmanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/auditmanager/v1/internal/audit_manager_stub_factory.h b/google/cloud/auditmanager/v1/internal/audit_manager_stub_factory.h index 04b92b7e1d4c5..2e09d794174f1 100644 --- a/google/cloud/auditmanager/v1/internal/audit_manager_stub_factory.h +++ b/google/cloud/auditmanager/v1/internal/audit_manager_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace auditmanager_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUDITMANAGER_V1_INTERNAL_AUDIT_MANAGER_STUB_FACTORY_H diff --git a/google/cloud/auditmanager/v1/internal/audit_manager_tracing_connection.cc b/google/cloud/auditmanager/v1/internal/audit_manager_tracing_connection.cc index 6c1e5bc8f877c..a0182ad6924dc 100644 --- a/google/cloud/auditmanager/v1/internal/audit_manager_tracing_connection.cc +++ b/google/cloud/auditmanager/v1/internal/audit_manager_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace auditmanager_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AuditManagerTracingConnection::AuditManagerTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -197,16 +195,12 @@ Status AuditManagerTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAuditManagerTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/auditmanager/v1/internal/audit_manager_tracing_connection.h b/google/cloud/auditmanager/v1/internal/audit_manager_tracing_connection.h index 830e6cfcf0733..d8161bc88f38f 100644 --- a/google/cloud/auditmanager/v1/internal/audit_manager_tracing_connection.h +++ b/google/cloud/auditmanager/v1/internal/audit_manager_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace auditmanager_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AuditManagerTracingConnection : public auditmanager_v1::AuditManagerConnection { public: @@ -105,8 +103,6 @@ class AuditManagerTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/auditmanager/v1/internal/audit_manager_tracing_stub.cc b/google/cloud/auditmanager/v1/internal/audit_manager_tracing_stub.cc index 21766ace47208..d506097f508c5 100644 --- a/google/cloud/auditmanager/v1/internal/audit_manager_tracing_stub.cc +++ b/google/cloud/auditmanager/v1/internal/audit_manager_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace auditmanager_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AuditManagerTracingStub::AuditManagerTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -251,18 +252,14 @@ future AuditManagerTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAuditManagerTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace auditmanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/auditmanager/v1/internal/audit_manager_tracing_stub.h b/google/cloud/auditmanager/v1/internal/audit_manager_tracing_stub.h index 7a57b28457ea4..9a43afbb907a5 100644 --- a/google/cloud/auditmanager/v1/internal/audit_manager_tracing_stub.h +++ b/google/cloud/auditmanager/v1/internal/audit_manager_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace auditmanager_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AuditManagerTracingStub : public AuditManagerStub { public: ~AuditManagerTracingStub() override = default; @@ -132,8 +133,6 @@ class AuditManagerTracingStub : public AuditManagerStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -148,4 +147,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUDITMANAGER_V1_INTERNAL_AUDIT_MANAGER_TRACING_STUB_H diff --git a/google/cloud/automl/BUILD.bazel b/google/cloud/automl/BUILD.bazel index 6572061302753..2c2fffeb097d6 100644 --- a/google/cloud/automl/BUILD.bazel +++ b/google/cloud/automl/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/automl/v1:automl_cc_grpc", + "@googleapis//google/cloud/automl/v1:automl_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/automl/CMakeLists.txt b/google/cloud/automl/CMakeLists.txt index 9a1847f2d83b7..15d96c9942eb8 100644 --- a/google/cloud/automl/CMakeLists.txt +++ b/google/cloud/automl/CMakeLists.txt @@ -16,8 +16,7 @@ include(GoogleCloudCppLibrary) -google_cloud_cpp_add_gapic_library(automl "Cloud AutoML API" - SERVICE_DIRS "__EMPTY__" "v1/") +google_cloud_cpp_add_gapic_library(automl "Cloud AutoML API" SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(automl_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/automl/auto_ml_client.h b/google/cloud/automl/auto_ml_client.h deleted file mode 100644 index e81071bc20f62..0000000000000 --- a/google/cloud/automl/auto_ml_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/automl/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_AUTO_ML_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_AUTO_ML_CLIENT_H - -#include "google/cloud/automl/auto_ml_connection.h" -#include "google/cloud/automl/v1/auto_ml_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in automl_v1 instead of the aliases defined in -/// this namespace. -namespace automl { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use automl_v1::AutoMlClient directly. -using ::google::cloud::automl_v1::AutoMlClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace automl -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_AUTO_ML_CLIENT_H diff --git a/google/cloud/automl/auto_ml_connection.h b/google/cloud/automl/auto_ml_connection.h deleted file mode 100644 index 816afb7339679..0000000000000 --- a/google/cloud/automl/auto_ml_connection.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/automl/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_AUTO_ML_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_AUTO_ML_CONNECTION_H - -#include "google/cloud/automl/auto_ml_connection_idempotency_policy.h" -#include "google/cloud/automl/v1/auto_ml_connection.h" - -namespace google { -namespace cloud { -namespace automl { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use automl_v1::MakeAutoMlConnection directly. -using ::google::cloud::automl_v1::MakeAutoMlConnection; - -/// @deprecated Use automl_v1::AutoMlConnection directly. -using ::google::cloud::automl_v1::AutoMlConnection; - -/// @deprecated Use automl_v1::AutoMlLimitedErrorCountRetryPolicy directly. -using ::google::cloud::automl_v1::AutoMlLimitedErrorCountRetryPolicy; - -/// @deprecated Use automl_v1::AutoMlLimitedTimeRetryPolicy directly. -using ::google::cloud::automl_v1::AutoMlLimitedTimeRetryPolicy; - -/// @deprecated Use automl_v1::AutoMlRetryPolicy directly. -using ::google::cloud::automl_v1::AutoMlRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace automl -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_AUTO_ML_CONNECTION_H diff --git a/google/cloud/automl/auto_ml_connection_idempotency_policy.h b/google/cloud/automl/auto_ml_connection_idempotency_policy.h deleted file mode 100644 index a2e3d38147feb..0000000000000 --- a/google/cloud/automl/auto_ml_connection_idempotency_policy.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/automl/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_AUTO_ML_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_AUTO_ML_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/automl/v1/auto_ml_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace automl { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use automl_v1::MakeDefaultAutoMlConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::automl_v1::MakeDefaultAutoMlConnectionIdempotencyPolicy; - -/// @deprecated Use automl_v1::AutoMlConnectionIdempotencyPolicy directly. -using ::google::cloud::automl_v1::AutoMlConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace automl -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_AUTO_ML_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/automl/auto_ml_options.h b/google/cloud/automl/auto_ml_options.h deleted file mode 100644 index d78d664a98ac3..0000000000000 --- a/google/cloud/automl/auto_ml_options.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/automl/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_AUTO_ML_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_AUTO_ML_OPTIONS_H - -#include "google/cloud/automl/auto_ml_connection.h" -#include "google/cloud/automl/auto_ml_connection_idempotency_policy.h" -#include "google/cloud/automl/v1/auto_ml_options.h" - -namespace google { -namespace cloud { -namespace automl { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use automl_v1::AutoMlPollingPolicyOption directly. -using ::google::cloud::automl_v1::AutoMlPollingPolicyOption; - -/// @deprecated Use automl_v1::AutoMlBackoffPolicyOption directly. -using ::google::cloud::automl_v1::AutoMlBackoffPolicyOption; - -/// @deprecated Use automl_v1::AutoMlConnectionIdempotencyPolicyOption directly. -using ::google::cloud::automl_v1::AutoMlConnectionIdempotencyPolicyOption; - -/// @deprecated Use automl_v1::AutoMlPolicyOptionList directly. -using ::google::cloud::automl_v1::AutoMlPolicyOptionList; - -/// @deprecated Use automl_v1::AutoMlRetryPolicyOption directly. -using ::google::cloud::automl_v1::AutoMlRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace automl -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_AUTO_ML_OPTIONS_H diff --git a/google/cloud/automl/mocks/mock_auto_ml_connection.h b/google/cloud/automl/mocks/mock_auto_ml_connection.h deleted file mode 100644 index 37176375063a8..0000000000000 --- a/google/cloud/automl/mocks/mock_auto_ml_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/automl/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_MOCKS_MOCK_AUTO_ML_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_MOCKS_MOCK_AUTO_ML_CONNECTION_H - -#include "google/cloud/automl/auto_ml_connection.h" -#include "google/cloud/automl/v1/mocks/mock_auto_ml_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in automl_v1_mocks instead of the aliases -/// defined in this namespace. -namespace automl_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use automl_v1_mocks::MockAutoMlConnection directly. -using ::google::cloud::automl_v1_mocks::MockAutoMlConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace automl_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_MOCKS_MOCK_AUTO_ML_CONNECTION_H diff --git a/google/cloud/automl/mocks/mock_prediction_connection.h b/google/cloud/automl/mocks/mock_prediction_connection.h deleted file mode 100644 index e2ba2faf7013e..0000000000000 --- a/google/cloud/automl/mocks/mock_prediction_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/automl/v1/prediction_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_MOCKS_MOCK_PREDICTION_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_MOCKS_MOCK_PREDICTION_CONNECTION_H - -#include "google/cloud/automl/prediction_connection.h" -#include "google/cloud/automl/v1/mocks/mock_prediction_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in automl_v1_mocks instead of the aliases -/// defined in this namespace. -namespace automl_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use automl_v1_mocks::MockPredictionServiceConnection directly. -using ::google::cloud::automl_v1_mocks::MockPredictionServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace automl_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_MOCKS_MOCK_PREDICTION_CONNECTION_H diff --git a/google/cloud/automl/prediction_client.h b/google/cloud/automl/prediction_client.h deleted file mode 100644 index 5539add369f4a..0000000000000 --- a/google/cloud/automl/prediction_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/automl/v1/prediction_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_PREDICTION_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_PREDICTION_CLIENT_H - -#include "google/cloud/automl/prediction_connection.h" -#include "google/cloud/automl/v1/prediction_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in automl_v1 instead of the aliases defined in -/// this namespace. -namespace automl { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use automl_v1::PredictionServiceClient directly. -using ::google::cloud::automl_v1::PredictionServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace automl -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_PREDICTION_CLIENT_H diff --git a/google/cloud/automl/prediction_connection.h b/google/cloud/automl/prediction_connection.h deleted file mode 100644 index 3191c0c3e1647..0000000000000 --- a/google/cloud/automl/prediction_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/automl/v1/prediction_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_PREDICTION_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_PREDICTION_CONNECTION_H - -#include "google/cloud/automl/prediction_connection_idempotency_policy.h" -#include "google/cloud/automl/v1/prediction_connection.h" - -namespace google { -namespace cloud { -namespace automl { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use automl_v1::MakePredictionServiceConnection directly. -using ::google::cloud::automl_v1::MakePredictionServiceConnection; - -/// @deprecated Use automl_v1::PredictionServiceConnection directly. -using ::google::cloud::automl_v1::PredictionServiceConnection; - -/// @deprecated Use automl_v1::PredictionServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::automl_v1::PredictionServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use automl_v1::PredictionServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::automl_v1::PredictionServiceLimitedTimeRetryPolicy; - -/// @deprecated Use automl_v1::PredictionServiceRetryPolicy directly. -using ::google::cloud::automl_v1::PredictionServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace automl -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_PREDICTION_CONNECTION_H diff --git a/google/cloud/automl/prediction_connection_idempotency_policy.h b/google/cloud/automl/prediction_connection_idempotency_policy.h deleted file mode 100644 index c024d7fe06eea..0000000000000 --- a/google/cloud/automl/prediction_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/automl/v1/prediction_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_PREDICTION_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_PREDICTION_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/automl/v1/prediction_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace automl { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// automl_v1::MakeDefaultPredictionServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::automl_v1:: - MakeDefaultPredictionServiceConnectionIdempotencyPolicy; - -/// @deprecated Use automl_v1::PredictionServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::automl_v1::PredictionServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace automl -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_PREDICTION_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/automl/prediction_options.h b/google/cloud/automl/prediction_options.h deleted file mode 100644 index d1de0bfff3371..0000000000000 --- a/google/cloud/automl/prediction_options.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/automl/v1/prediction_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_PREDICTION_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_PREDICTION_OPTIONS_H - -#include "google/cloud/automl/prediction_connection.h" -#include "google/cloud/automl/prediction_connection_idempotency_policy.h" -#include "google/cloud/automl/v1/prediction_options.h" - -namespace google { -namespace cloud { -namespace automl { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use automl_v1::PredictionServicePollingPolicyOption directly. -using ::google::cloud::automl_v1::PredictionServicePollingPolicyOption; - -/// @deprecated Use automl_v1::PredictionServiceBackoffPolicyOption directly. -using ::google::cloud::automl_v1::PredictionServiceBackoffPolicyOption; - -/// @deprecated Use -/// automl_v1::PredictionServiceConnectionIdempotencyPolicyOption directly. -using ::google::cloud::automl_v1:: - PredictionServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use automl_v1::PredictionServicePolicyOptionList directly. -using ::google::cloud::automl_v1::PredictionServicePolicyOptionList; - -/// @deprecated Use automl_v1::PredictionServiceRetryPolicyOption directly. -using ::google::cloud::automl_v1::PredictionServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace automl -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_PREDICTION_OPTIONS_H diff --git a/google/cloud/automl/quickstart/.bazelrc b/google/cloud/automl/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/automl/quickstart/.bazelrc +++ b/google/cloud/automl/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/automl/quickstart/CMakeLists.txt b/google/cloud/automl/quickstart/CMakeLists.txt index 71a80e37e26ae..27664b3628e95 100644 --- a/google/cloud/automl/quickstart/CMakeLists.txt +++ b/google/cloud/automl/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud AutoML API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-automl-quickstart CXX) find_package(google_cloud_cpp_automl REQUIRED) diff --git a/google/cloud/automl/v1/auto_ml_client.h b/google/cloud/automl/v1/auto_ml_client.h index f281fc2249ceb..8e6ebd5c0de89 100644 --- a/google/cloud/automl/v1/auto_ml_client.h +++ b/google/cloud/automl/v1/auto_ml_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/automl/v1/auto_ml_connection.h b/google/cloud/automl/v1/auto_ml_connection.h index c60c26cff3f95..6e866fdaa9f46 100644 --- a/google/cloud/automl/v1/auto_ml_connection.h +++ b/google/cloud/automl/v1/auto_ml_connection.h @@ -21,6 +21,8 @@ #include "google/cloud/automl/v1/auto_ml_connection_idempotency_policy.h" #include "google/cloud/automl/v1/internal/auto_ml_retry_traits.h" +#include "google/cloud/automl/v1/operations.pb.h" +#include "google/cloud/automl/v1/service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,9 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/automl/v1/auto_ml_connection_idempotency_policy.h b/google/cloud/automl/v1/auto_ml_connection_idempotency_policy.h index ef1d689d03a1d..86f76836dbf00 100644 --- a/google/cloud/automl/v1/auto_ml_connection_idempotency_policy.h +++ b/google/cloud/automl/v1/auto_ml_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_V1_AUTO_ML_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_V1_AUTO_ML_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/automl/v1/service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/automl/v1/internal/auto_ml_auth_decorator.cc b/google/cloud/automl/v1/internal/auto_ml_auth_decorator.cc index 36402ef6436bc..63bc129b8e966 100644 --- a/google/cloud/automl/v1/internal/auto_ml_auth_decorator.cc +++ b/google/cloud/automl/v1/internal/auto_ml_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/automl/v1/service.proto #include "google/cloud/automl/v1/internal/auto_ml_auth_decorator.h" -#include +#include "google/cloud/automl/v1/service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace automl_v1_internal { @@ -389,3 +392,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace automl_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/automl/v1/internal/auto_ml_auth_decorator.h b/google/cloud/automl/v1/internal/auto_ml_auth_decorator.h index 0aaab45338c19..90f7fd21af5b9 100644 --- a/google/cloud/automl/v1/internal/auto_ml_auth_decorator.h +++ b/google/cloud/automl/v1/internal/auto_ml_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/automl/v1/internal/auto_ml_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace automl_v1_internal { @@ -191,4 +194,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_V1_INTERNAL_AUTO_ML_AUTH_DECORATOR_H diff --git a/google/cloud/automl/v1/internal/auto_ml_connection_impl.h b/google/cloud/automl/v1/internal/auto_ml_connection_impl.h index e005d91af56a2..35ad118282396 100644 --- a/google/cloud/automl/v1/internal/auto_ml_connection_impl.h +++ b/google/cloud/automl/v1/internal/auto_ml_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/automl/v1/internal/auto_ml_logging_decorator.cc b/google/cloud/automl/v1/internal/auto_ml_logging_decorator.cc index c52e99d512cd9..b7232a0bbc810 100644 --- a/google/cloud/automl/v1/internal/auto_ml_logging_decorator.cc +++ b/google/cloud/automl/v1/internal/auto_ml_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/automl/v1/service.proto #include "google/cloud/automl/v1/internal/auto_ml_logging_decorator.h" +#include "google/cloud/automl/v1/service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace automl_v1_internal { @@ -440,3 +443,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace automl_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/automl/v1/internal/auto_ml_logging_decorator.h b/google/cloud/automl/v1/internal/auto_ml_logging_decorator.h index ea25ed6a22681..984944bdb0432 100644 --- a/google/cloud/automl/v1/internal/auto_ml_logging_decorator.h +++ b/google/cloud/automl/v1/internal/auto_ml_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/automl/v1/internal/auto_ml_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace automl_v1_internal { @@ -191,4 +194,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_V1_INTERNAL_AUTO_ML_LOGGING_DECORATOR_H diff --git a/google/cloud/automl/v1/internal/auto_ml_metadata_decorator.cc b/google/cloud/automl/v1/internal/auto_ml_metadata_decorator.cc index a50ef4ae42991..1e48bf8302a25 100644 --- a/google/cloud/automl/v1/internal/auto_ml_metadata_decorator.cc +++ b/google/cloud/automl/v1/internal/auto_ml_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/automl/v1/service.proto #include "google/cloud/automl/v1/internal/auto_ml_metadata_decorator.h" +#include "google/cloud/automl/v1/service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace automl_v1_internal { @@ -343,3 +347,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace automl_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/automl/v1/internal/auto_ml_metadata_decorator.h b/google/cloud/automl/v1/internal/auto_ml_metadata_decorator.h index 892dfafb9ad52..2789af4ecc02a 100644 --- a/google/cloud/automl/v1/internal/auto_ml_metadata_decorator.h +++ b/google/cloud/automl/v1/internal/auto_ml_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/automl/v1/internal/auto_ml_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace automl_v1_internal { @@ -196,4 +199,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_V1_INTERNAL_AUTO_ML_METADATA_DECORATOR_H diff --git a/google/cloud/automl/v1/internal/auto_ml_option_defaults.cc b/google/cloud/automl/v1/internal/auto_ml_option_defaults.cc index 1fb7694d6bcb4..202ec6458675e 100644 --- a/google/cloud/automl/v1/internal/auto_ml_option_defaults.cc +++ b/google/cloud/automl/v1/internal/auto_ml_option_defaults.cc @@ -40,7 +40,7 @@ Options AutoMlDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - automl_v1::AutoMlLimitedTimeRetryPolicy(std::chrono::minutes(30)) + automl_v1::AutoMlLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/automl/v1/internal/auto_ml_stub.cc b/google/cloud/automl/v1/internal/auto_ml_stub.cc index 4ece2a2bc4141..3c08eae1998a9 100644 --- a/google/cloud/automl/v1/internal/auto_ml_stub.cc +++ b/google/cloud/automl/v1/internal/auto_ml_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/automl/v1/service.proto #include "google/cloud/automl/v1/internal/auto_ml_stub.h" +#include "google/cloud/automl/v1/service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace automl_v1_internal { @@ -439,3 +442,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace automl_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/automl/v1/internal/auto_ml_stub.h b/google/cloud/automl/v1/internal/auto_ml_stub.h index d2d9a872271d5..b0f3e71e65fdc 100644 --- a/google/cloud/automl/v1/internal/auto_ml_stub.h +++ b/google/cloud/automl/v1/internal/auto_ml_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_V1_INTERNAL_AUTO_ML_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_V1_INTERNAL_AUTO_ML_STUB_H +#include "google/cloud/automl/v1/operations.pb.h" +#include "google/cloud/automl/v1/service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace automl_v1_internal { @@ -345,4 +348,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_V1_INTERNAL_AUTO_ML_STUB_H diff --git a/google/cloud/automl/v1/internal/auto_ml_stub_factory.cc b/google/cloud/automl/v1/internal/auto_ml_stub_factory.cc index c836df0f52d4f..4afd64d49a51f 100644 --- a/google/cloud/automl/v1/internal/auto_ml_stub_factory.cc +++ b/google/cloud/automl/v1/internal/auto_ml_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/automl/v1/internal/auto_ml_metadata_decorator.h" #include "google/cloud/automl/v1/internal/auto_ml_stub.h" #include "google/cloud/automl/v1/internal/auto_ml_tracing_stub.h" +#include "google/cloud/automl/v1/service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace automl_v1_internal { @@ -68,3 +71,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace automl_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/automl/v1/internal/auto_ml_stub_factory.h b/google/cloud/automl/v1/internal/auto_ml_stub_factory.h index b50f6fcd7fa55..3fb6983ef70f0 100644 --- a/google/cloud/automl/v1/internal/auto_ml_stub_factory.h +++ b/google/cloud/automl/v1/internal/auto_ml_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace automl_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_V1_INTERNAL_AUTO_ML_STUB_FACTORY_H diff --git a/google/cloud/automl/v1/internal/auto_ml_tracing_connection.cc b/google/cloud/automl/v1/internal/auto_ml_tracing_connection.cc index c15b77304666b..89e0220a4c783 100644 --- a/google/cloud/automl/v1/internal/auto_ml_tracing_connection.cc +++ b/google/cloud/automl/v1/internal/auto_ml_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace automl_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AutoMlTracingConnection::AutoMlTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -323,15 +321,11 @@ AutoMlTracingConnection::ListModelEvaluations( std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAutoMlTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/automl/v1/internal/auto_ml_tracing_connection.h b/google/cloud/automl/v1/internal/auto_ml_tracing_connection.h index 76bbd6b70665e..285eb2ce0b8b6 100644 --- a/google/cloud/automl/v1/internal/auto_ml_tracing_connection.h +++ b/google/cloud/automl/v1/internal/auto_ml_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace automl_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AutoMlTracingConnection : public automl_v1::AutoMlConnection { public: ~AutoMlTracingConnection() override = default; @@ -162,8 +160,6 @@ class AutoMlTracingConnection : public automl_v1::AutoMlConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/automl/v1/internal/auto_ml_tracing_stub.cc b/google/cloud/automl/v1/internal/auto_ml_tracing_stub.cc index e44dfab750e9d..f8160a0f2f014 100644 --- a/google/cloud/automl/v1/internal/auto_ml_tracing_stub.cc +++ b/google/cloud/automl/v1/internal/auto_ml_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace automl_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AutoMlTracingStub::AutoMlTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -388,18 +389,14 @@ future AutoMlTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAutoMlTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace automl_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/automl/v1/internal/auto_ml_tracing_stub.h b/google/cloud/automl/v1/internal/auto_ml_tracing_stub.h index ee26bbdcc252e..83de738cf1713 100644 --- a/google/cloud/automl/v1/internal/auto_ml_tracing_stub.h +++ b/google/cloud/automl/v1/internal/auto_ml_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace automl_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AutoMlTracingStub : public AutoMlStub { public: ~AutoMlTracingStub() override = default; @@ -186,8 +187,6 @@ class AutoMlTracingStub : public AutoMlStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -202,4 +201,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_V1_INTERNAL_AUTO_ML_TRACING_STUB_H diff --git a/google/cloud/automl/v1/internal/prediction_auth_decorator.cc b/google/cloud/automl/v1/internal/prediction_auth_decorator.cc index e1a60c5475163..735af29e2e3a6 100644 --- a/google/cloud/automl/v1/internal/prediction_auth_decorator.cc +++ b/google/cloud/automl/v1/internal/prediction_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/automl/v1/prediction_service.proto #include "google/cloud/automl/v1/internal/prediction_auth_decorator.h" -#include +#include "google/cloud/automl/v1/prediction_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace automl_v1_internal { @@ -108,3 +111,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace automl_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/automl/v1/internal/prediction_auth_decorator.h b/google/cloud/automl/v1/internal/prediction_auth_decorator.h index 619ab0b3ea7b6..25d16c87b41b9 100644 --- a/google/cloud/automl/v1/internal/prediction_auth_decorator.h +++ b/google/cloud/automl/v1/internal/prediction_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/automl/v1/internal/prediction_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace automl_v1_internal { @@ -75,4 +78,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_V1_INTERNAL_PREDICTION_AUTH_DECORATOR_H diff --git a/google/cloud/automl/v1/internal/prediction_connection_impl.h b/google/cloud/automl/v1/internal/prediction_connection_impl.h index d9603732ff669..7754af79ff1ee 100644 --- a/google/cloud/automl/v1/internal/prediction_connection_impl.h +++ b/google/cloud/automl/v1/internal/prediction_connection_impl.h @@ -31,7 +31,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/automl/v1/internal/prediction_logging_decorator.cc b/google/cloud/automl/v1/internal/prediction_logging_decorator.cc index 9be66f2c27306..e0bd53d084af3 100644 --- a/google/cloud/automl/v1/internal/prediction_logging_decorator.cc +++ b/google/cloud/automl/v1/internal/prediction_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/automl/v1/prediction_service.proto #include "google/cloud/automl/v1/internal/prediction_logging_decorator.h" +#include "google/cloud/automl/v1/prediction_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace automl_v1_internal { @@ -115,3 +118,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace automl_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/automl/v1/internal/prediction_logging_decorator.h b/google/cloud/automl/v1/internal/prediction_logging_decorator.h index 3bb4f53388c47..b64cc0144d52d 100644 --- a/google/cloud/automl/v1/internal/prediction_logging_decorator.h +++ b/google/cloud/automl/v1/internal/prediction_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/automl/v1/internal/prediction_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace automl_v1_internal { @@ -75,4 +78,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_V1_INTERNAL_PREDICTION_LOGGING_DECORATOR_H diff --git a/google/cloud/automl/v1/internal/prediction_metadata_decorator.cc b/google/cloud/automl/v1/internal/prediction_metadata_decorator.cc index 28155dbce58d5..6a4876d4fc154 100644 --- a/google/cloud/automl/v1/internal/prediction_metadata_decorator.cc +++ b/google/cloud/automl/v1/internal/prediction_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/automl/v1/prediction_service.proto #include "google/cloud/automl/v1/internal/prediction_metadata_decorator.h" +#include "google/cloud/automl/v1/prediction_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace automl_v1_internal { @@ -114,3 +118,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace automl_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/automl/v1/internal/prediction_metadata_decorator.h b/google/cloud/automl/v1/internal/prediction_metadata_decorator.h index 86b9fdf689b24..541e6d5f11db6 100644 --- a/google/cloud/automl/v1/internal/prediction_metadata_decorator.h +++ b/google/cloud/automl/v1/internal/prediction_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/automl/v1/internal/prediction_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace automl_v1_internal { @@ -81,4 +84,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_V1_INTERNAL_PREDICTION_METADATA_DECORATOR_H diff --git a/google/cloud/automl/v1/internal/prediction_option_defaults.cc b/google/cloud/automl/v1/internal/prediction_option_defaults.cc index 85e6ce01e24ea..63b0db52ae3d3 100644 --- a/google/cloud/automl/v1/internal/prediction_option_defaults.cc +++ b/google/cloud/automl/v1/internal/prediction_option_defaults.cc @@ -42,7 +42,7 @@ Options PredictionServiceDefaultOptions(Options options) { if (!options.has()) { options.set( automl_v1::PredictionServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/automl/v1/internal/prediction_stub.cc b/google/cloud/automl/v1/internal/prediction_stub.cc index 3baca91123a65..5edb28f36d4af 100644 --- a/google/cloud/automl/v1/internal/prediction_stub.cc +++ b/google/cloud/automl/v1/internal/prediction_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/automl/v1/prediction_service.proto #include "google/cloud/automl/v1/internal/prediction_stub.h" +#include "google/cloud/automl/v1/prediction_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace automl_v1_internal { @@ -116,3 +119,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace automl_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/automl/v1/internal/prediction_stub.h b/google/cloud/automl/v1/internal/prediction_stub.h index d7405d242a2d0..2908cd7284686 100644 --- a/google/cloud/automl/v1/internal/prediction_stub.h +++ b/google/cloud/automl/v1/internal/prediction_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_V1_INTERNAL_PREDICTION_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_V1_INTERNAL_PREDICTION_STUB_H +#include "google/cloud/automl/v1/operations.pb.h" +#include "google/cloud/automl/v1/prediction_service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace automl_v1_internal { @@ -115,4 +118,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_V1_INTERNAL_PREDICTION_STUB_H diff --git a/google/cloud/automl/v1/internal/prediction_stub_factory.cc b/google/cloud/automl/v1/internal/prediction_stub_factory.cc index 8d8b371df2eeb..d0d47bee50fc3 100644 --- a/google/cloud/automl/v1/internal/prediction_stub_factory.cc +++ b/google/cloud/automl/v1/internal/prediction_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/automl/v1/internal/prediction_metadata_decorator.h" #include "google/cloud/automl/v1/internal/prediction_stub.h" #include "google/cloud/automl/v1/internal/prediction_tracing_stub.h" +#include "google/cloud/automl/v1/prediction_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace automl_v1_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace automl_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/automl/v1/internal/prediction_stub_factory.h b/google/cloud/automl/v1/internal/prediction_stub_factory.h index cf242a5dc29ea..7f364c3ac8464 100644 --- a/google/cloud/automl/v1/internal/prediction_stub_factory.h +++ b/google/cloud/automl/v1/internal/prediction_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace automl_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_V1_INTERNAL_PREDICTION_STUB_FACTORY_H diff --git a/google/cloud/automl/v1/internal/prediction_tracing_connection.cc b/google/cloud/automl/v1/internal/prediction_tracing_connection.cc index a4fd5f8671e28..59071f8a15dde 100644 --- a/google/cloud/automl/v1/internal/prediction_tracing_connection.cc +++ b/google/cloud/automl/v1/internal/prediction_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace automl_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PredictionServiceTracingConnection::PredictionServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -68,17 +66,13 @@ PredictionServiceTracingConnection::BatchPredict( return internal::EndSpan(std::move(span), child_->BatchPredict(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePredictionServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/automl/v1/internal/prediction_tracing_connection.h b/google/cloud/automl/v1/internal/prediction_tracing_connection.h index 899eedff39fbd..0814f9fa10ad0 100644 --- a/google/cloud/automl/v1/internal/prediction_tracing_connection.h +++ b/google/cloud/automl/v1/internal/prediction_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace automl_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PredictionServiceTracingConnection : public automl_v1::PredictionServiceConnection { public: @@ -57,8 +55,6 @@ class PredictionServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/automl/v1/internal/prediction_tracing_stub.cc b/google/cloud/automl/v1/internal/prediction_tracing_stub.cc index da96a0638ab65..ccc41beeeca11 100644 --- a/google/cloud/automl/v1/internal/prediction_tracing_stub.cc +++ b/google/cloud/automl/v1/internal/prediction_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace automl_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PredictionServiceTracingStub::PredictionServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -98,18 +99,14 @@ future PredictionServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePredictionServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace automl_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/automl/v1/internal/prediction_tracing_stub.h b/google/cloud/automl/v1/internal/prediction_tracing_stub.h index 3e998964a3e1b..02cc7080edc7d 100644 --- a/google/cloud/automl/v1/internal/prediction_tracing_stub.h +++ b/google/cloud/automl/v1/internal/prediction_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace automl_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PredictionServiceTracingStub : public PredictionServiceStub { public: ~PredictionServiceTracingStub() override = default; @@ -71,8 +72,6 @@ class PredictionServiceTracingStub : public PredictionServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -87,4 +86,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_V1_INTERNAL_PREDICTION_TRACING_STUB_H diff --git a/google/cloud/automl/v1/prediction_client.h b/google/cloud/automl/v1/prediction_client.h index 161a3e83ca66a..d65dd41f85c17 100644 --- a/google/cloud/automl/v1/prediction_client.h +++ b/google/cloud/automl/v1/prediction_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/automl/v1/prediction_connection.h b/google/cloud/automl/v1/prediction_connection.h index a17adc590b1a1..5ed238daf79d3 100644 --- a/google/cloud/automl/v1/prediction_connection.h +++ b/google/cloud/automl/v1/prediction_connection.h @@ -20,7 +20,9 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_V1_PREDICTION_CONNECTION_H #include "google/cloud/automl/v1/internal/prediction_retry_traits.h" +#include "google/cloud/automl/v1/operations.pb.h" #include "google/cloud/automl/v1/prediction_connection_idempotency_policy.h" +#include "google/cloud/automl/v1/prediction_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -29,9 +31,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/automl/v1/prediction_connection_idempotency_policy.h b/google/cloud/automl/v1/prediction_connection_idempotency_policy.h index 2fbfed25ee4f6..2154f5c579054 100644 --- a/google/cloud/automl/v1/prediction_connection_idempotency_policy.h +++ b/google/cloud/automl/v1/prediction_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_V1_PREDICTION_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_AUTOML_V1_PREDICTION_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/automl/v1/prediction_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/backupdr/BUILD.bazel b/google/cloud/backupdr/BUILD.bazel index 3376b9ace5870..0e6b09e36b3af 100644 --- a/google/cloud/backupdr/BUILD.bazel +++ b/google/cloud/backupdr/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/backupdr/v1:backupdr_cc_grpc", + "@googleapis//google/cloud/backupdr/v1:backupdr_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/backupdr/quickstart/.bazelrc b/google/cloud/backupdr/quickstart/.bazelrc index 15d5c055db074..343e7f623d628 100644 --- a/google/cloud/backupdr/quickstart/.bazelrc +++ b/google/cloud/backupdr/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/backupdr/quickstart/CMakeLists.txt b/google/cloud/backupdr/quickstart/CMakeLists.txt index dbe53c9161f7d..b02302a95f2cc 100644 --- a/google/cloud/backupdr/quickstart/CMakeLists.txt +++ b/google/cloud/backupdr/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Backup and DR Service API C++ client library # from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-backupdr-quickstart CXX) find_package(google_cloud_cpp_backupdr REQUIRED) diff --git a/google/cloud/backupdr/v1/backup_dr_client.h b/google/cloud/backupdr/v1/backup_dr_client.h index e4eefbdb5669b..72ef66c71b00f 100644 --- a/google/cloud/backupdr/v1/backup_dr_client.h +++ b/google/cloud/backupdr/v1/backup_dr_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/backupdr/v1/backup_dr_connection.h b/google/cloud/backupdr/v1/backup_dr_connection.h index 8020d4c359819..7f984ed961bd6 100644 --- a/google/cloud/backupdr/v1/backup_dr_connection.h +++ b/google/cloud/backupdr/v1/backup_dr_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BACKUPDR_V1_BACKUP_DR_CONNECTION_H #include "google/cloud/backupdr/v1/backup_dr_connection_idempotency_policy.h" +#include "google/cloud/backupdr/v1/backupdr.pb.h" #include "google/cloud/backupdr/v1/internal/backup_dr_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/backupdr/v1/backup_dr_connection_idempotency_policy.h b/google/cloud/backupdr/v1/backup_dr_connection_idempotency_policy.h index c37bcd85d7417..27439ee252e7a 100644 --- a/google/cloud/backupdr/v1/backup_dr_connection_idempotency_policy.h +++ b/google/cloud/backupdr/v1/backup_dr_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BACKUPDR_V1_BACKUP_DR_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BACKUPDR_V1_BACKUP_DR_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/backupdr/v1/backupdr.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/backupdr/v1/internal/backup_dr_auth_decorator.cc b/google/cloud/backupdr/v1/internal/backup_dr_auth_decorator.cc index bd1eb022073b9..b6c72d5388ed6 100644 --- a/google/cloud/backupdr/v1/internal/backup_dr_auth_decorator.cc +++ b/google/cloud/backupdr/v1/internal/backup_dr_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/backupdr/v1/backupdr.proto #include "google/cloud/backupdr/v1/internal/backup_dr_auth_decorator.h" -#include +#include "google/cloud/backupdr/v1/backupdr.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace backupdr_v1_internal { @@ -819,3 +822,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace backupdr_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/backupdr/v1/internal/backup_dr_auth_decorator.h b/google/cloud/backupdr/v1/internal/backup_dr_auth_decorator.h index b666398d7c113..618ff96518ce1 100644 --- a/google/cloud/backupdr/v1/internal/backup_dr_auth_decorator.h +++ b/google/cloud/backupdr/v1/internal/backup_dr_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/backupdr/v1/internal/backup_dr_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace backupdr_v1_internal { @@ -413,4 +416,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BACKUPDR_V1_INTERNAL_BACKUP_DR_AUTH_DECORATOR_H diff --git a/google/cloud/backupdr/v1/internal/backup_dr_connection_impl.h b/google/cloud/backupdr/v1/internal/backup_dr_connection_impl.h index 5fcc2e03b386f..c07a4f4aac040 100644 --- a/google/cloud/backupdr/v1/internal/backup_dr_connection_impl.h +++ b/google/cloud/backupdr/v1/internal/backup_dr_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/backupdr/v1/internal/backup_dr_logging_decorator.cc b/google/cloud/backupdr/v1/internal/backup_dr_logging_decorator.cc index 0dd4002e1b93b..6c10bbb0fc6d5 100644 --- a/google/cloud/backupdr/v1/internal/backup_dr_logging_decorator.cc +++ b/google/cloud/backupdr/v1/internal/backup_dr_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/backupdr/v1/backupdr.proto #include "google/cloud/backupdr/v1/internal/backup_dr_logging_decorator.h" +#include "google/cloud/backupdr/v1/backupdr.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace backupdr_v1_internal { @@ -983,3 +986,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace backupdr_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/backupdr/v1/internal/backup_dr_logging_decorator.h b/google/cloud/backupdr/v1/internal/backup_dr_logging_decorator.h index b7798f44fdc9f..1810d9141fdda 100644 --- a/google/cloud/backupdr/v1/internal/backup_dr_logging_decorator.h +++ b/google/cloud/backupdr/v1/internal/backup_dr_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/backupdr/v1/internal/backup_dr_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace backupdr_v1_internal { @@ -413,4 +416,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BACKUPDR_V1_INTERNAL_BACKUP_DR_LOGGING_DECORATOR_H diff --git a/google/cloud/backupdr/v1/internal/backup_dr_metadata_decorator.cc b/google/cloud/backupdr/v1/internal/backup_dr_metadata_decorator.cc index daca16070bfb4..c3b84ee2916d8 100644 --- a/google/cloud/backupdr/v1/internal/backup_dr_metadata_decorator.cc +++ b/google/cloud/backupdr/v1/internal/backup_dr_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/backupdr/v1/backupdr.proto #include "google/cloud/backupdr/v1/internal/backup_dr_metadata_decorator.h" +#include "google/cloud/backupdr/v1/backupdr.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace backupdr_v1_internal { @@ -716,3 +720,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace backupdr_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/backupdr/v1/internal/backup_dr_metadata_decorator.h b/google/cloud/backupdr/v1/internal/backup_dr_metadata_decorator.h index df1c76d809c66..8d07c37ed6f36 100644 --- a/google/cloud/backupdr/v1/internal/backup_dr_metadata_decorator.h +++ b/google/cloud/backupdr/v1/internal/backup_dr_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/backupdr/v1/internal/backup_dr_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace backupdr_v1_internal { @@ -418,4 +421,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BACKUPDR_V1_INTERNAL_BACKUP_DR_METADATA_DECORATOR_H diff --git a/google/cloud/backupdr/v1/internal/backup_dr_option_defaults.cc b/google/cloud/backupdr/v1/internal/backup_dr_option_defaults.cc index 1b2b82a80da54..3282c63f29810 100644 --- a/google/cloud/backupdr/v1/internal/backup_dr_option_defaults.cc +++ b/google/cloud/backupdr/v1/internal/backup_dr_option_defaults.cc @@ -40,7 +40,7 @@ Options BackupDRDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - backupdr_v1::BackupDRLimitedTimeRetryPolicy(std::chrono::minutes(30)) + backupdr_v1::BackupDRLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/backupdr/v1/internal/backup_dr_stub.cc b/google/cloud/backupdr/v1/internal/backup_dr_stub.cc index 5c9e9b0377c38..1862ca922b0b8 100644 --- a/google/cloud/backupdr/v1/internal/backup_dr_stub.cc +++ b/google/cloud/backupdr/v1/internal/backup_dr_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/backupdr/v1/backupdr.proto #include "google/cloud/backupdr/v1/internal/backup_dr_stub.h" +#include "google/cloud/backupdr/v1/backupdr.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace backupdr_v1_internal { @@ -965,3 +968,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace backupdr_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/backupdr/v1/internal/backup_dr_stub.h b/google/cloud/backupdr/v1/internal/backup_dr_stub.h index 4ca1ba56a99fb..986cdf75beda3 100644 --- a/google/cloud/backupdr/v1/internal/backup_dr_stub.h +++ b/google/cloud/backupdr/v1/internal/backup_dr_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BACKUPDR_V1_INTERNAL_BACKUP_DR_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BACKUPDR_V1_INTERNAL_BACKUP_DR_STUB_H +#include "google/cloud/backupdr/v1/backupdr.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace backupdr_v1_internal { @@ -791,4 +794,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BACKUPDR_V1_INTERNAL_BACKUP_DR_STUB_H diff --git a/google/cloud/backupdr/v1/internal/backup_dr_stub_factory.cc b/google/cloud/backupdr/v1/internal/backup_dr_stub_factory.cc index ea806afe2edc9..abcb429329bee 100644 --- a/google/cloud/backupdr/v1/internal/backup_dr_stub_factory.cc +++ b/google/cloud/backupdr/v1/internal/backup_dr_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/backupdr/v1/backupdr.proto #include "google/cloud/backupdr/v1/internal/backup_dr_stub_factory.h" +#include "google/cloud/backupdr/v1/backupdr.grpc.pb.h" #include "google/cloud/backupdr/v1/internal/backup_dr_auth_decorator.h" #include "google/cloud/backupdr/v1/internal/backup_dr_logging_decorator.h" #include "google/cloud/backupdr/v1/internal/backup_dr_metadata_decorator.h" #include "google/cloud/backupdr/v1/internal/backup_dr_stub.h" #include "google/cloud/backupdr/v1/internal/backup_dr_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace backupdr_v1_internal { @@ -76,3 +79,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace backupdr_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/backupdr/v1/internal/backup_dr_stub_factory.h b/google/cloud/backupdr/v1/internal/backup_dr_stub_factory.h index 9b42765528abf..f3cccf851092e 100644 --- a/google/cloud/backupdr/v1/internal/backup_dr_stub_factory.h +++ b/google/cloud/backupdr/v1/internal/backup_dr_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace backupdr_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BACKUPDR_V1_INTERNAL_BACKUP_DR_STUB_FACTORY_H diff --git a/google/cloud/backupdr/v1/internal/backup_dr_tracing_connection.cc b/google/cloud/backupdr/v1/internal/backup_dr_tracing_connection.cc index 4de739cc92619..26e6a3ea5179c 100644 --- a/google/cloud/backupdr/v1/internal/backup_dr_tracing_connection.cc +++ b/google/cloud/backupdr/v1/internal/backup_dr_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace backupdr_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - BackupDRTracingConnection::BackupDRTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -843,15 +841,11 @@ Status BackupDRTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeBackupDRTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/backupdr/v1/internal/backup_dr_tracing_connection.h b/google/cloud/backupdr/v1/internal/backup_dr_tracing_connection.h index bcb8b68dbb137..872bbe8b2b414 100644 --- a/google/cloud/backupdr/v1/internal/backup_dr_tracing_connection.h +++ b/google/cloud/backupdr/v1/internal/backup_dr_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace backupdr_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class BackupDRTracingConnection : public backupdr_v1::BackupDRConnection { public: ~BackupDRTracingConnection() override = default; @@ -364,8 +362,6 @@ class BackupDRTracingConnection : public backupdr_v1::BackupDRConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/backupdr/v1/internal/backup_dr_tracing_stub.cc b/google/cloud/backupdr/v1/internal/backup_dr_tracing_stub.cc index 6cf2a60df74ca..1815ccb607ff7 100644 --- a/google/cloud/backupdr/v1/internal/backup_dr_tracing_stub.cc +++ b/google/cloud/backupdr/v1/internal/backup_dr_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace backupdr_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - BackupDRTracingStub::BackupDRTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -875,18 +876,14 @@ future BackupDRTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeBackupDRTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace backupdr_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/backupdr/v1/internal/backup_dr_tracing_stub.h b/google/cloud/backupdr/v1/internal/backup_dr_tracing_stub.h index bf238c46d2771..2e5dc86160d5a 100644 --- a/google/cloud/backupdr/v1/internal/backup_dr_tracing_stub.h +++ b/google/cloud/backupdr/v1/internal/backup_dr_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace backupdr_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class BackupDRTracingStub : public BackupDRStub { public: ~BackupDRTracingStub() override = default; @@ -408,8 +409,6 @@ class BackupDRTracingStub : public BackupDRStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -424,4 +423,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BACKUPDR_V1_INTERNAL_BACKUP_DR_TRACING_STUB_H diff --git a/google/cloud/baremetalsolution/BUILD.bazel b/google/cloud/baremetalsolution/BUILD.bazel index d716d05083e07..9b3f22d958b28 100644 --- a/google/cloud/baremetalsolution/BUILD.bazel +++ b/google/cloud/baremetalsolution/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v2/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/baremetalsolution/v2:baremetalsolution_cc_grpc", + "@googleapis//google/cloud/baremetalsolution/v2:baremetalsolution_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/baremetalsolution/CMakeLists.txt b/google/cloud/baremetalsolution/CMakeLists.txt index e0ec28f2cb48b..e3051db7e264e 100644 --- a/google/cloud/baremetalsolution/CMakeLists.txt +++ b/google/cloud/baremetalsolution/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(baremetalsolution "Bare Metal Solution API" - SERVICE_DIRS "__EMPTY__" "v2/") + SERVICE_DIRS "v2/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(baremetalsolution_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/baremetalsolution/bare_metal_solution_client.h b/google/cloud/baremetalsolution/bare_metal_solution_client.h deleted file mode 100644 index a94eb474aa8a1..0000000000000 --- a/google/cloud/baremetalsolution/bare_metal_solution_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BAREMETALSOLUTION_BARE_METAL_SOLUTION_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BAREMETALSOLUTION_BARE_METAL_SOLUTION_CLIENT_H - -#include "google/cloud/baremetalsolution/bare_metal_solution_connection.h" -#include "google/cloud/baremetalsolution/v2/bare_metal_solution_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in baremetalsolution_v2 instead of the aliases defined in -/// this namespace. -namespace baremetalsolution { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use baremetalsolution_v2::BareMetalSolutionClient directly. -using ::google::cloud::baremetalsolution_v2::BareMetalSolutionClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace baremetalsolution -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BAREMETALSOLUTION_BARE_METAL_SOLUTION_CLIENT_H diff --git a/google/cloud/baremetalsolution/bare_metal_solution_connection.h b/google/cloud/baremetalsolution/bare_metal_solution_connection.h deleted file mode 100644 index e7915dc0c9f3e..0000000000000 --- a/google/cloud/baremetalsolution/bare_metal_solution_connection.h +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BAREMETALSOLUTION_BARE_METAL_SOLUTION_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BAREMETALSOLUTION_BARE_METAL_SOLUTION_CONNECTION_H - -#include "google/cloud/baremetalsolution/bare_metal_solution_connection_idempotency_policy.h" -#include "google/cloud/baremetalsolution/v2/bare_metal_solution_connection.h" - -namespace google { -namespace cloud { -namespace baremetalsolution { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use baremetalsolution_v2::MakeBareMetalSolutionConnection -/// directly. -using ::google::cloud::baremetalsolution_v2::MakeBareMetalSolutionConnection; - -/// @deprecated Use baremetalsolution_v2::BareMetalSolutionConnection directly. -using ::google::cloud::baremetalsolution_v2::BareMetalSolutionConnection; - -/// @deprecated Use -/// baremetalsolution_v2::BareMetalSolutionLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::baremetalsolution_v2:: - BareMetalSolutionLimitedErrorCountRetryPolicy; - -/// @deprecated Use -/// baremetalsolution_v2::BareMetalSolutionLimitedTimeRetryPolicy directly. -using ::google::cloud::baremetalsolution_v2:: - BareMetalSolutionLimitedTimeRetryPolicy; - -/// @deprecated Use baremetalsolution_v2::BareMetalSolutionRetryPolicy directly. -using ::google::cloud::baremetalsolution_v2::BareMetalSolutionRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace baremetalsolution -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BAREMETALSOLUTION_BARE_METAL_SOLUTION_CONNECTION_H diff --git a/google/cloud/baremetalsolution/bare_metal_solution_connection_idempotency_policy.h b/google/cloud/baremetalsolution/bare_metal_solution_connection_idempotency_policy.h deleted file mode 100644 index e06ada6977fea..0000000000000 --- a/google/cloud/baremetalsolution/bare_metal_solution_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BAREMETALSOLUTION_BARE_METAL_SOLUTION_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BAREMETALSOLUTION_BARE_METAL_SOLUTION_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/baremetalsolution/v2/bare_metal_solution_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace baremetalsolution { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// baremetalsolution_v2::MakeDefaultBareMetalSolutionConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::baremetalsolution_v2:: - MakeDefaultBareMetalSolutionConnectionIdempotencyPolicy; - -/// @deprecated Use -/// baremetalsolution_v2::BareMetalSolutionConnectionIdempotencyPolicy directly. -using ::google::cloud::baremetalsolution_v2:: - BareMetalSolutionConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace baremetalsolution -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BAREMETALSOLUTION_BARE_METAL_SOLUTION_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/baremetalsolution/bare_metal_solution_options.h b/google/cloud/baremetalsolution/bare_metal_solution_options.h deleted file mode 100644 index 6bfbe7d78211f..0000000000000 --- a/google/cloud/baremetalsolution/bare_metal_solution_options.h +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BAREMETALSOLUTION_BARE_METAL_SOLUTION_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BAREMETALSOLUTION_BARE_METAL_SOLUTION_OPTIONS_H - -#include "google/cloud/baremetalsolution/bare_metal_solution_connection.h" -#include "google/cloud/baremetalsolution/bare_metal_solution_connection_idempotency_policy.h" -#include "google/cloud/baremetalsolution/v2/bare_metal_solution_options.h" - -namespace google { -namespace cloud { -namespace baremetalsolution { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use baremetalsolution_v2::BareMetalSolutionPollingPolicyOption -/// directly. -using ::google::cloud::baremetalsolution_v2:: - BareMetalSolutionPollingPolicyOption; - -/// @deprecated Use baremetalsolution_v2::BareMetalSolutionBackoffPolicyOption -/// directly. -using ::google::cloud::baremetalsolution_v2:: - BareMetalSolutionBackoffPolicyOption; - -/// @deprecated Use -/// baremetalsolution_v2::BareMetalSolutionConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::baremetalsolution_v2:: - BareMetalSolutionConnectionIdempotencyPolicyOption; - -/// @deprecated Use baremetalsolution_v2::BareMetalSolutionPolicyOptionList -/// directly. -using ::google::cloud::baremetalsolution_v2::BareMetalSolutionPolicyOptionList; - -/// @deprecated Use baremetalsolution_v2::BareMetalSolutionRetryPolicyOption -/// directly. -using ::google::cloud::baremetalsolution_v2::BareMetalSolutionRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace baremetalsolution -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BAREMETALSOLUTION_BARE_METAL_SOLUTION_OPTIONS_H diff --git a/google/cloud/baremetalsolution/mocks/mock_bare_metal_solution_connection.h b/google/cloud/baremetalsolution/mocks/mock_bare_metal_solution_connection.h deleted file mode 100644 index c417c27e9a693..0000000000000 --- a/google/cloud/baremetalsolution/mocks/mock_bare_metal_solution_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/baremetalsolution/v2/baremetalsolution.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BAREMETALSOLUTION_MOCKS_MOCK_BARE_METAL_SOLUTION_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BAREMETALSOLUTION_MOCKS_MOCK_BARE_METAL_SOLUTION_CONNECTION_H - -#include "google/cloud/baremetalsolution/bare_metal_solution_connection.h" -#include "google/cloud/baremetalsolution/v2/mocks/mock_bare_metal_solution_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in baremetalsolution_v2_mocks instead of the aliases -/// defined in this namespace. -namespace baremetalsolution_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use baremetalsolution_v2_mocks::MockBareMetalSolutionConnection -/// directly. -using ::google::cloud::baremetalsolution_v2_mocks:: - MockBareMetalSolutionConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace baremetalsolution_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BAREMETALSOLUTION_MOCKS_MOCK_BARE_METAL_SOLUTION_CONNECTION_H diff --git a/google/cloud/baremetalsolution/quickstart/.bazelrc b/google/cloud/baremetalsolution/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/baremetalsolution/quickstart/.bazelrc +++ b/google/cloud/baremetalsolution/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/baremetalsolution/quickstart/CMakeLists.txt b/google/cloud/baremetalsolution/quickstart/CMakeLists.txt index a387986d55287..5f2b143060e85 100644 --- a/google/cloud/baremetalsolution/quickstart/CMakeLists.txt +++ b/google/cloud/baremetalsolution/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Bare Metal Solution API C++ client library from # a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-baremetalsolution-quickstart CXX) find_package(google_cloud_cpp_baremetalsolution REQUIRED) diff --git a/google/cloud/baremetalsolution/v2/bare_metal_solution_client.h b/google/cloud/baremetalsolution/v2/bare_metal_solution_client.h index 39b35d15feee9..8659c95296454 100644 --- a/google/cloud/baremetalsolution/v2/bare_metal_solution_client.h +++ b/google/cloud/baremetalsolution/v2/bare_metal_solution_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/baremetalsolution/v2/bare_metal_solution_connection.h b/google/cloud/baremetalsolution/v2/bare_metal_solution_connection.h index acb287cbe863c..9bfeb8ac9136c 100644 --- a/google/cloud/baremetalsolution/v2/bare_metal_solution_connection.h +++ b/google/cloud/baremetalsolution/v2/bare_metal_solution_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BAREMETALSOLUTION_V2_BARE_METAL_SOLUTION_CONNECTION_H #include "google/cloud/baremetalsolution/v2/bare_metal_solution_connection_idempotency_policy.h" +#include "google/cloud/baremetalsolution/v2/baremetalsolution.pb.h" #include "google/cloud/baremetalsolution/v2/internal/bare_metal_solution_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/baremetalsolution/v2/bare_metal_solution_connection_idempotency_policy.h b/google/cloud/baremetalsolution/v2/bare_metal_solution_connection_idempotency_policy.h index acbb0d4e5581d..494a34954397a 100644 --- a/google/cloud/baremetalsolution/v2/bare_metal_solution_connection_idempotency_policy.h +++ b/google/cloud/baremetalsolution/v2/bare_metal_solution_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BAREMETALSOLUTION_V2_BARE_METAL_SOLUTION_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BAREMETALSOLUTION_V2_BARE_METAL_SOLUTION_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/baremetalsolution/v2/baremetalsolution.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_auth_decorator.cc b/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_auth_decorator.cc index 939b5d383e175..37add98894b0d 100644 --- a/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_auth_decorator.cc +++ b/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/baremetalsolution/v2/baremetalsolution.proto #include "google/cloud/baremetalsolution/v2/internal/bare_metal_solution_auth_decorator.h" -#include +#include "google/cloud/baremetalsolution/v2/baremetalsolution.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace baremetalsolution_v2_internal { @@ -815,3 +818,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace baremetalsolution_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_auth_decorator.h b/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_auth_decorator.h index 6588653dd4740..0bc20af78226e 100644 --- a/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_auth_decorator.h +++ b/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/baremetalsolution/v2/internal/bare_metal_solution_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace baremetalsolution_v2_internal { @@ -415,4 +418,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BAREMETALSOLUTION_V2_INTERNAL_BARE_METAL_SOLUTION_AUTH_DECORATOR_H diff --git a/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_connection_impl.h b/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_connection_impl.h index 8ef115e2a414f..d8f2ecd9ffdab 100644 --- a/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_connection_impl.h +++ b/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_logging_decorator.cc b/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_logging_decorator.cc index 6907cf41d8522..d6a64b9e5ea39 100644 --- a/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_logging_decorator.cc +++ b/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/baremetalsolution/v2/baremetalsolution.proto #include "google/cloud/baremetalsolution/v2/internal/bare_metal_solution_logging_decorator.h" +#include "google/cloud/baremetalsolution/v2/baremetalsolution.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace baremetalsolution_v2_internal { @@ -996,3 +999,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace baremetalsolution_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_logging_decorator.h b/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_logging_decorator.h index 598d103e6eaa4..7efe2cd8d1c43 100644 --- a/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_logging_decorator.h +++ b/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/baremetalsolution/v2/internal/bare_metal_solution_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace baremetalsolution_v2_internal { @@ -415,4 +418,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BAREMETALSOLUTION_V2_INTERNAL_BARE_METAL_SOLUTION_LOGGING_DECORATOR_H diff --git a/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_metadata_decorator.cc b/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_metadata_decorator.cc index 1c83cad6e1500..3e545211108a5 100644 --- a/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_metadata_decorator.cc +++ b/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/baremetalsolution/v2/baremetalsolution.proto #include "google/cloud/baremetalsolution/v2/internal/bare_metal_solution_metadata_decorator.h" +#include "google/cloud/baremetalsolution/v2/baremetalsolution.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace baremetalsolution_v2_internal { @@ -726,3 +730,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace baremetalsolution_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_metadata_decorator.h b/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_metadata_decorator.h index 981c882851e8d..12e911852f396 100644 --- a/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_metadata_decorator.h +++ b/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/baremetalsolution/v2/internal/bare_metal_solution_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace baremetalsolution_v2_internal { @@ -421,4 +424,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BAREMETALSOLUTION_V2_INTERNAL_BARE_METAL_SOLUTION_METADATA_DECORATOR_H diff --git a/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_option_defaults.cc b/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_option_defaults.cc index 41261d5072c81..38839cf717f9a 100644 --- a/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_option_defaults.cc +++ b/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_option_defaults.cc @@ -43,7 +43,7 @@ Options BareMetalSolutionDefaultOptions(Options options) { .has()) { options.set( baremetalsolution_v2::BareMetalSolutionLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_stub.cc b/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_stub.cc index cc0bd2a5a49fd..aa2b6365df29f 100644 --- a/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_stub.cc +++ b/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/baremetalsolution/v2/baremetalsolution.proto #include "google/cloud/baremetalsolution/v2/internal/bare_metal_solution_stub.h" +#include "google/cloud/baremetalsolution/v2/baremetalsolution.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace baremetalsolution_v2_internal { @@ -962,3 +965,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace baremetalsolution_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_stub.h b/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_stub.h index 41c3590b354e8..a6a2629790c43 100644 --- a/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_stub.h +++ b/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BAREMETALSOLUTION_V2_INTERNAL_BARE_METAL_SOLUTION_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BAREMETALSOLUTION_V2_INTERNAL_BARE_METAL_SOLUTION_STUB_H +#include "google/cloud/baremetalsolution/v2/baremetalsolution.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace baremetalsolution_v2_internal { @@ -807,4 +810,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BAREMETALSOLUTION_V2_INTERNAL_BARE_METAL_SOLUTION_STUB_H diff --git a/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_stub_factory.cc b/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_stub_factory.cc index 5154b14bf2ae9..b5babaea82e6c 100644 --- a/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_stub_factory.cc +++ b/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_stub_factory.cc @@ -17,22 +17,25 @@ // source: google/cloud/baremetalsolution/v2/baremetalsolution.proto #include "google/cloud/baremetalsolution/v2/internal/bare_metal_solution_stub_factory.h" +#include "google/cloud/baremetalsolution/v2/baremetalsolution.grpc.pb.h" #include "google/cloud/baremetalsolution/v2/internal/bare_metal_solution_auth_decorator.h" #include "google/cloud/baremetalsolution/v2/internal/bare_metal_solution_logging_decorator.h" #include "google/cloud/baremetalsolution/v2/internal/bare_metal_solution_metadata_decorator.h" #include "google/cloud/baremetalsolution/v2/internal/bare_metal_solution_stub.h" #include "google/cloud/baremetalsolution/v2/internal/bare_metal_solution_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace baremetalsolution_v2_internal { @@ -74,3 +77,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace baremetalsolution_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_stub_factory.h b/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_stub_factory.h index 685542d080c0e..843a52a82182f 100644 --- a/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_stub_factory.h +++ b/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace baremetalsolution_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BAREMETALSOLUTION_V2_INTERNAL_BARE_METAL_SOLUTION_STUB_FACTORY_H diff --git a/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_tracing_connection.cc b/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_tracing_connection.cc index 76f390f6fb1f3..3df7023fc7db5 100644 --- a/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_tracing_connection.cc +++ b/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace baremetalsolution_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - BareMetalSolutionTracingConnection::BareMetalSolutionTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -834,17 +832,13 @@ BareMetalSolutionTracingConnection::GetLocation( return internal::EndSpan(*span, child_->GetLocation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeBareMetalSolutionTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_tracing_connection.h b/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_tracing_connection.h index f65c5fb6482db..14bd6703d766f 100644 --- a/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_tracing_connection.h +++ b/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace baremetalsolution_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class BareMetalSolutionTracingConnection : public baremetalsolution_v2::BareMetalSolutionConnection { public: @@ -379,8 +377,6 @@ class BareMetalSolutionTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_tracing_stub.cc b/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_tracing_stub.cc index ef74fcc5602a1..bf1a716b7e8dd 100644 --- a/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_tracing_stub.cc +++ b/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace baremetalsolution_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - BareMetalSolutionTracingStub::BareMetalSolutionTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -888,18 +889,14 @@ future BareMetalSolutionTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeBareMetalSolutionTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace baremetalsolution_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_tracing_stub.h b/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_tracing_stub.h index 8bd6f4ddbbd6a..52c60189a1bcb 100644 --- a/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_tracing_stub.h +++ b/google/cloud/baremetalsolution/v2/internal/bare_metal_solution_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace baremetalsolution_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class BareMetalSolutionTracingStub : public BareMetalSolutionStub { public: ~BareMetalSolutionTracingStub() override = default; @@ -411,8 +412,6 @@ class BareMetalSolutionTracingStub : public BareMetalSolutionStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -427,4 +426,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BAREMETALSOLUTION_V2_INTERNAL_BARE_METAL_SOLUTION_TRACING_STUB_H diff --git a/google/cloud/batch/BUILD.bazel b/google/cloud/batch/BUILD.bazel index 9592453d25621..b5e81a5df7aaf 100644 --- a/google/cloud/batch/BUILD.bazel +++ b/google/cloud/batch/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/batch/v1:batch_cc_grpc", + "@googleapis//google/cloud/batch/v1:batch_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/batch/CMakeLists.txt b/google/cloud/batch/CMakeLists.txt index fae373f2eecd9..7de07e2d24d69 100644 --- a/google/cloud/batch/CMakeLists.txt +++ b/google/cloud/batch/CMakeLists.txt @@ -16,8 +16,7 @@ include(GoogleCloudCppLibrary) -google_cloud_cpp_add_gapic_library(batch "Batch API" SERVICE_DIRS "__EMPTY__" - "v1/") +google_cloud_cpp_add_gapic_library(batch "Batch API" SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(batch_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/batch/batch_client.h b/google/cloud/batch/batch_client.h deleted file mode 100644 index 39ee96fbba302..0000000000000 --- a/google/cloud/batch/batch_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/batch/v1/batch.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BATCH_BATCH_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BATCH_BATCH_CLIENT_H - -#include "google/cloud/batch/batch_connection.h" -#include "google/cloud/batch/v1/batch_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in batch_v1 instead of the aliases defined in -/// this namespace. -namespace batch { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use batch_v1::BatchServiceClient directly. -using ::google::cloud::batch_v1::BatchServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace batch -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BATCH_BATCH_CLIENT_H diff --git a/google/cloud/batch/batch_connection.h b/google/cloud/batch/batch_connection.h deleted file mode 100644 index ac1b4838740b1..0000000000000 --- a/google/cloud/batch/batch_connection.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/batch/v1/batch.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BATCH_BATCH_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BATCH_BATCH_CONNECTION_H - -#include "google/cloud/batch/batch_connection_idempotency_policy.h" -#include "google/cloud/batch/v1/batch_connection.h" - -namespace google { -namespace cloud { -namespace batch { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use batch_v1::MakeBatchServiceConnection directly. -using ::google::cloud::batch_v1::MakeBatchServiceConnection; - -/// @deprecated Use batch_v1::BatchServiceConnection directly. -using ::google::cloud::batch_v1::BatchServiceConnection; - -/// @deprecated Use batch_v1::BatchServiceLimitedErrorCountRetryPolicy directly. -using ::google::cloud::batch_v1::BatchServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use batch_v1::BatchServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::batch_v1::BatchServiceLimitedTimeRetryPolicy; - -/// @deprecated Use batch_v1::BatchServiceRetryPolicy directly. -using ::google::cloud::batch_v1::BatchServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace batch -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BATCH_BATCH_CONNECTION_H diff --git a/google/cloud/batch/batch_connection_idempotency_policy.h b/google/cloud/batch/batch_connection_idempotency_policy.h deleted file mode 100644 index 09358aa9fff0e..0000000000000 --- a/google/cloud/batch/batch_connection_idempotency_policy.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/batch/v1/batch.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BATCH_BATCH_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BATCH_BATCH_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/batch/v1/batch_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace batch { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use batch_v1::MakeDefaultBatchServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::batch_v1:: - MakeDefaultBatchServiceConnectionIdempotencyPolicy; - -/// @deprecated Use batch_v1::BatchServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::batch_v1::BatchServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace batch -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BATCH_BATCH_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/batch/batch_options.h b/google/cloud/batch/batch_options.h deleted file mode 100644 index b72ecba673e82..0000000000000 --- a/google/cloud/batch/batch_options.h +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/batch/v1/batch.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BATCH_BATCH_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BATCH_BATCH_OPTIONS_H - -#include "google/cloud/batch/batch_connection.h" -#include "google/cloud/batch/batch_connection_idempotency_policy.h" -#include "google/cloud/batch/v1/batch_options.h" - -namespace google { -namespace cloud { -namespace batch { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use batch_v1::BatchServicePollingPolicyOption directly. -using ::google::cloud::batch_v1::BatchServicePollingPolicyOption; - -/// @deprecated Use batch_v1::BatchServiceBackoffPolicyOption directly. -using ::google::cloud::batch_v1::BatchServiceBackoffPolicyOption; - -/// @deprecated Use batch_v1::BatchServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::batch_v1::BatchServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use batch_v1::BatchServicePolicyOptionList directly. -using ::google::cloud::batch_v1::BatchServicePolicyOptionList; - -/// @deprecated Use batch_v1::BatchServiceRetryPolicyOption directly. -using ::google::cloud::batch_v1::BatchServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace batch -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BATCH_BATCH_OPTIONS_H diff --git a/google/cloud/batch/mocks/mock_batch_connection.h b/google/cloud/batch/mocks/mock_batch_connection.h deleted file mode 100644 index 83e2af3d253d8..0000000000000 --- a/google/cloud/batch/mocks/mock_batch_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/batch/v1/batch.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BATCH_MOCKS_MOCK_BATCH_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BATCH_MOCKS_MOCK_BATCH_CONNECTION_H - -#include "google/cloud/batch/batch_connection.h" -#include "google/cloud/batch/v1/mocks/mock_batch_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in batch_v1_mocks instead of the aliases -/// defined in this namespace. -namespace batch_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use batch_v1_mocks::MockBatchServiceConnection directly. -using ::google::cloud::batch_v1_mocks::MockBatchServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace batch_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BATCH_MOCKS_MOCK_BATCH_CONNECTION_H diff --git a/google/cloud/batch/quickstart/.bazelrc b/google/cloud/batch/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/batch/quickstart/.bazelrc +++ b/google/cloud/batch/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/batch/quickstart/CMakeLists.txt b/google/cloud/batch/quickstart/CMakeLists.txt index 1cf56ed20390d..ee62b0e45f103 100644 --- a/google/cloud/batch/quickstart/CMakeLists.txt +++ b/google/cloud/batch/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Batch API C++ client library from a larger # CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-batch-quickstart CXX) find_package(google_cloud_cpp_batch REQUIRED) diff --git a/google/cloud/batch/v1/batch_client.h b/google/cloud/batch/v1/batch_client.h index c75133defc921..e0d673a6cbe3b 100644 --- a/google/cloud/batch/v1/batch_client.h +++ b/google/cloud/batch/v1/batch_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/batch/v1/batch_connection.h b/google/cloud/batch/v1/batch_connection.h index ae2cbf28f8700..1d5a53807fed7 100644 --- a/google/cloud/batch/v1/batch_connection.h +++ b/google/cloud/batch/v1/batch_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BATCH_V1_BATCH_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BATCH_V1_BATCH_CONNECTION_H +#include "google/cloud/batch/v1/batch.pb.h" #include "google/cloud/batch/v1/batch_connection_idempotency_policy.h" #include "google/cloud/batch/v1/internal/batch_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/batch/v1/batch_connection_idempotency_policy.h b/google/cloud/batch/v1/batch_connection_idempotency_policy.h index 60846fc67a053..f5ef04434ceb5 100644 --- a/google/cloud/batch/v1/batch_connection_idempotency_policy.h +++ b/google/cloud/batch/v1/batch_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BATCH_V1_BATCH_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BATCH_V1_BATCH_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/batch/v1/batch.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/batch/v1/internal/batch_auth_decorator.cc b/google/cloud/batch/v1/internal/batch_auth_decorator.cc index b56288568880f..9618543a32653 100644 --- a/google/cloud/batch/v1/internal/batch_auth_decorator.cc +++ b/google/cloud/batch/v1/internal/batch_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/batch/v1/batch.proto #include "google/cloud/batch/v1/internal/batch_auth_decorator.h" -#include +#include "google/cloud/batch/v1/batch.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace batch_v1_internal { @@ -218,3 +221,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace batch_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/batch/v1/internal/batch_auth_decorator.h b/google/cloud/batch/v1/internal/batch_auth_decorator.h index 5c552dce22990..b907ae057a3f0 100644 --- a/google/cloud/batch/v1/internal/batch_auth_decorator.h +++ b/google/cloud/batch/v1/internal/batch_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/batch/v1/internal/batch_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace batch_v1_internal { @@ -125,4 +128,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BATCH_V1_INTERNAL_BATCH_AUTH_DECORATOR_H diff --git a/google/cloud/batch/v1/internal/batch_connection_impl.h b/google/cloud/batch/v1/internal/batch_connection_impl.h index d6129c89029a0..123debd9f979e 100644 --- a/google/cloud/batch/v1/internal/batch_connection_impl.h +++ b/google/cloud/batch/v1/internal/batch_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/batch/v1/internal/batch_logging_decorator.cc b/google/cloud/batch/v1/internal/batch_logging_decorator.cc index dc2ebe7d94fa1..dc0aadb50b993 100644 --- a/google/cloud/batch/v1/internal/batch_logging_decorator.cc +++ b/google/cloud/batch/v1/internal/batch_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/batch/v1/batch.proto #include "google/cloud/batch/v1/internal/batch_logging_decorator.h" +#include "google/cloud/batch/v1/batch.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace batch_v1_internal { @@ -257,3 +260,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace batch_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/batch/v1/internal/batch_logging_decorator.h b/google/cloud/batch/v1/internal/batch_logging_decorator.h index 301e343f39153..0736a8363e264 100644 --- a/google/cloud/batch/v1/internal/batch_logging_decorator.h +++ b/google/cloud/batch/v1/internal/batch_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/batch/v1/internal/batch_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace batch_v1_internal { @@ -125,4 +128,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BATCH_V1_INTERNAL_BATCH_LOGGING_DECORATOR_H diff --git a/google/cloud/batch/v1/internal/batch_metadata_decorator.cc b/google/cloud/batch/v1/internal/batch_metadata_decorator.cc index c6b7241f34926..a6663aa28a4b3 100644 --- a/google/cloud/batch/v1/internal/batch_metadata_decorator.cc +++ b/google/cloud/batch/v1/internal/batch_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/batch/v1/batch.proto #include "google/cloud/batch/v1/internal/batch_metadata_decorator.h" +#include "google/cloud/batch/v1/batch.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace batch_v1_internal { @@ -216,3 +220,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace batch_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/batch/v1/internal/batch_metadata_decorator.h b/google/cloud/batch/v1/internal/batch_metadata_decorator.h index c3e436c718910..8b6aa4bf7d62a 100644 --- a/google/cloud/batch/v1/internal/batch_metadata_decorator.h +++ b/google/cloud/batch/v1/internal/batch_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/batch/v1/internal/batch_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace batch_v1_internal { @@ -130,4 +133,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BATCH_V1_INTERNAL_BATCH_METADATA_DECORATOR_H diff --git a/google/cloud/batch/v1/internal/batch_option_defaults.cc b/google/cloud/batch/v1/internal/batch_option_defaults.cc index 5fd58dc1fc1a2..193aa6c19798c 100644 --- a/google/cloud/batch/v1/internal/batch_option_defaults.cc +++ b/google/cloud/batch/v1/internal/batch_option_defaults.cc @@ -40,7 +40,7 @@ Options BatchServiceDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - batch_v1::BatchServiceLimitedTimeRetryPolicy(std::chrono::minutes(30)) + batch_v1::BatchServiceLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/batch/v1/internal/batch_stub.cc b/google/cloud/batch/v1/internal/batch_stub.cc index fd146dfe18ddf..9278af2de4b26 100644 --- a/google/cloud/batch/v1/internal/batch_stub.cc +++ b/google/cloud/batch/v1/internal/batch_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/batch/v1/batch.proto #include "google/cloud/batch/v1/internal/batch_stub.h" +#include "google/cloud/batch/v1/batch.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace batch_v1_internal { @@ -256,3 +259,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace batch_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/batch/v1/internal/batch_stub.h b/google/cloud/batch/v1/internal/batch_stub.h index b8d25b57dc5fd..9569430a7a727 100644 --- a/google/cloud/batch/v1/internal/batch_stub.h +++ b/google/cloud/batch/v1/internal/batch_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BATCH_V1_INTERNAL_BATCH_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BATCH_V1_INTERNAL_BATCH_STUB_H +#include "google/cloud/batch/v1/batch.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace batch_v1_internal { @@ -220,4 +223,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BATCH_V1_INTERNAL_BATCH_STUB_H diff --git a/google/cloud/batch/v1/internal/batch_stub_factory.cc b/google/cloud/batch/v1/internal/batch_stub_factory.cc index 2c17f0b50aed0..c03a5cb5d32dc 100644 --- a/google/cloud/batch/v1/internal/batch_stub_factory.cc +++ b/google/cloud/batch/v1/internal/batch_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/batch/v1/batch.proto #include "google/cloud/batch/v1/internal/batch_stub_factory.h" +#include "google/cloud/batch/v1/batch.grpc.pb.h" #include "google/cloud/batch/v1/internal/batch_auth_decorator.h" #include "google/cloud/batch/v1/internal/batch_logging_decorator.h" #include "google/cloud/batch/v1/internal/batch_metadata_decorator.h" #include "google/cloud/batch/v1/internal/batch_stub.h" #include "google/cloud/batch/v1/internal/batch_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace batch_v1_internal { @@ -74,3 +77,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace batch_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/batch/v1/internal/batch_stub_factory.h b/google/cloud/batch/v1/internal/batch_stub_factory.h index 93b8d875c5ad0..2db3a5b9d060f 100644 --- a/google/cloud/batch/v1/internal/batch_stub_factory.h +++ b/google/cloud/batch/v1/internal/batch_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace batch_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BATCH_V1_INTERNAL_BATCH_STUB_FACTORY_H diff --git a/google/cloud/batch/v1/internal/batch_tracing_connection.cc b/google/cloud/batch/v1/internal/batch_tracing_connection.cc index e784bc29b9aad..8454e9ac1206c 100644 --- a/google/cloud/batch/v1/internal/batch_tracing_connection.cc +++ b/google/cloud/batch/v1/internal/batch_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace batch_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - BatchServiceTracingConnection::BatchServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -179,16 +177,12 @@ Status BatchServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeBatchServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/batch/v1/internal/batch_tracing_connection.h b/google/cloud/batch/v1/internal/batch_tracing_connection.h index f38107579da47..9852b70e08582 100644 --- a/google/cloud/batch/v1/internal/batch_tracing_connection.h +++ b/google/cloud/batch/v1/internal/batch_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace batch_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class BatchServiceTracingConnection : public batch_v1::BatchServiceConnection { public: ~BatchServiceTracingConnection() override = default; @@ -96,8 +94,6 @@ class BatchServiceTracingConnection : public batch_v1::BatchServiceConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/batch/v1/internal/batch_tracing_stub.cc b/google/cloud/batch/v1/internal/batch_tracing_stub.cc index 2691b27faf073..703e25518374a 100644 --- a/google/cloud/batch/v1/internal/batch_tracing_stub.cc +++ b/google/cloud/batch/v1/internal/batch_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace batch_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - BatchServiceTracingStub::BatchServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -236,18 +237,14 @@ future BatchServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeBatchServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace batch_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/batch/v1/internal/batch_tracing_stub.h b/google/cloud/batch/v1/internal/batch_tracing_stub.h index d61667b2cc87b..8ebca0a3824ee 100644 --- a/google/cloud/batch/v1/internal/batch_tracing_stub.h +++ b/google/cloud/batch/v1/internal/batch_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace batch_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class BatchServiceTracingStub : public BatchServiceStub { public: ~BatchServiceTracingStub() override = default; @@ -120,8 +121,6 @@ class BatchServiceTracingStub : public BatchServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -136,4 +135,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BATCH_V1_INTERNAL_BATCH_TRACING_STUB_H diff --git a/google/cloud/beyondcorp/BUILD.bazel b/google/cloud/beyondcorp/BUILD.bazel index 46b948e8bd841..10d7d8f39750f 100644 --- a/google/cloud/beyondcorp/BUILD.bazel +++ b/google/cloud/beyondcorp/BUILD.bazel @@ -19,16 +19,15 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "appconnections/v1/", "appconnectors/v1/", "appgateways/v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/beyondcorp/appconnections/v1:appconnections_cc_grpc", - "@com_google_googleapis//google/cloud/beyondcorp/appconnectors/v1:appconnectors_cc_grpc", - "@com_google_googleapis//google/cloud/beyondcorp/appgateways/v1:appgateways_cc_grpc", + "@googleapis//google/cloud/beyondcorp/appconnections/v1:appconnections_cc_grpc", + "@googleapis//google/cloud/beyondcorp/appconnectors/v1:appconnectors_cc_grpc", + "@googleapis//google/cloud/beyondcorp/appgateways/v1:appgateways_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/beyondcorp/CMakeLists.txt b/google/cloud/beyondcorp/CMakeLists.txt index fdcdab5e15ce6..2e358192deb67 100644 --- a/google/cloud/beyondcorp/CMakeLists.txt +++ b/google/cloud/beyondcorp/CMakeLists.txt @@ -18,8 +18,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library( beyondcorp "BeyondCorp API" - SERVICE_DIRS "__EMPTY__" "appconnections/v1/" "appconnectors/v1/" - "appgateways/v1/") + SERVICE_DIRS "appconnections/v1/" "appconnectors/v1/" "appgateways/v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(beyondcorp_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/beyondcorp/app_connections_client.h b/google/cloud/beyondcorp/app_connections_client.h deleted file mode 100644 index a841e175bd2e9..0000000000000 --- a/google/cloud/beyondcorp/app_connections_client.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: -// google/cloud/beyondcorp/appconnections/v1/app_connections_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_CONNECTIONS_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_CONNECTIONS_CLIENT_H - -#include "google/cloud/beyondcorp/app_connections_connection.h" -#include "google/cloud/beyondcorp/appconnections/v1/app_connections_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in beyondcorp_appconnections_v1 instead of the aliases -/// defined in this namespace. -namespace beyondcorp { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use beyondcorp_appconnections_v1::AppConnectionsServiceClient -/// directly. -using ::google::cloud::beyondcorp_appconnections_v1:: - AppConnectionsServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace beyondcorp -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_CONNECTIONS_CLIENT_H diff --git a/google/cloud/beyondcorp/app_connections_connection.h b/google/cloud/beyondcorp/app_connections_connection.h deleted file mode 100644 index e007c9d21f015..0000000000000 --- a/google/cloud/beyondcorp/app_connections_connection.h +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: -// google/cloud/beyondcorp/appconnections/v1/app_connections_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_CONNECTIONS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_CONNECTIONS_CONNECTION_H - -#include "google/cloud/beyondcorp/app_connections_connection_idempotency_policy.h" -#include "google/cloud/beyondcorp/appconnections/v1/app_connections_connection.h" - -namespace google { -namespace cloud { -namespace beyondcorp { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// beyondcorp_appconnections_v1::MakeAppConnectionsServiceConnection directly. -using ::google::cloud::beyondcorp_appconnections_v1:: - MakeAppConnectionsServiceConnection; - -/// @deprecated Use -/// beyondcorp_appconnections_v1::AppConnectionsServiceConnection directly. -using ::google::cloud::beyondcorp_appconnections_v1:: - AppConnectionsServiceConnection; - -/// @deprecated Use -/// beyondcorp_appconnections_v1::AppConnectionsServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::beyondcorp_appconnections_v1:: - AppConnectionsServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use -/// beyondcorp_appconnections_v1::AppConnectionsServiceLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::beyondcorp_appconnections_v1:: - AppConnectionsServiceLimitedTimeRetryPolicy; - -/// @deprecated Use -/// beyondcorp_appconnections_v1::AppConnectionsServiceRetryPolicy directly. -using ::google::cloud::beyondcorp_appconnections_v1:: - AppConnectionsServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace beyondcorp -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_CONNECTIONS_CONNECTION_H diff --git a/google/cloud/beyondcorp/app_connections_connection_idempotency_policy.h b/google/cloud/beyondcorp/app_connections_connection_idempotency_policy.h deleted file mode 100644 index 267e80aa2b05b..0000000000000 --- a/google/cloud/beyondcorp/app_connections_connection_idempotency_policy.h +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: -// google/cloud/beyondcorp/appconnections/v1/app_connections_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_CONNECTIONS_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_CONNECTIONS_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/beyondcorp/appconnections/v1/app_connections_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace beyondcorp { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// beyondcorp_appconnections_v1::MakeDefaultAppConnectionsServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::beyondcorp_appconnections_v1:: - MakeDefaultAppConnectionsServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// beyondcorp_appconnections_v1::AppConnectionsServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::beyondcorp_appconnections_v1:: - AppConnectionsServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace beyondcorp -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_CONNECTIONS_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/beyondcorp/app_connections_options.h b/google/cloud/beyondcorp/app_connections_options.h deleted file mode 100644 index e71951ae3e3a8..0000000000000 --- a/google/cloud/beyondcorp/app_connections_options.h +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: -// google/cloud/beyondcorp/appconnections/v1/app_connections_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_CONNECTIONS_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_CONNECTIONS_OPTIONS_H - -#include "google/cloud/beyondcorp/app_connections_connection.h" -#include "google/cloud/beyondcorp/app_connections_connection_idempotency_policy.h" -#include "google/cloud/beyondcorp/appconnections/v1/app_connections_options.h" - -namespace google { -namespace cloud { -namespace beyondcorp { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// beyondcorp_appconnections_v1::AppConnectionsServicePollingPolicyOption -/// directly. -using ::google::cloud::beyondcorp_appconnections_v1:: - AppConnectionsServicePollingPolicyOption; - -/// @deprecated Use -/// beyondcorp_appconnections_v1::AppConnectionsServiceBackoffPolicyOption -/// directly. -using ::google::cloud::beyondcorp_appconnections_v1:: - AppConnectionsServiceBackoffPolicyOption; - -/// @deprecated Use -/// beyondcorp_appconnections_v1::AppConnectionsServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::beyondcorp_appconnections_v1:: - AppConnectionsServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use -/// beyondcorp_appconnections_v1::AppConnectionsServicePolicyOptionList -/// directly. -using ::google::cloud::beyondcorp_appconnections_v1:: - AppConnectionsServicePolicyOptionList; - -/// @deprecated Use -/// beyondcorp_appconnections_v1::AppConnectionsServiceRetryPolicyOption -/// directly. -using ::google::cloud::beyondcorp_appconnections_v1:: - AppConnectionsServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace beyondcorp -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_CONNECTIONS_OPTIONS_H diff --git a/google/cloud/beyondcorp/app_connectors_client.h b/google/cloud/beyondcorp/app_connectors_client.h deleted file mode 100644 index ac15683cc2805..0000000000000 --- a/google/cloud/beyondcorp/app_connectors_client.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_CONNECTORS_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_CONNECTORS_CLIENT_H - -#include "google/cloud/beyondcorp/app_connectors_connection.h" -#include "google/cloud/beyondcorp/appconnectors/v1/app_connectors_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in beyondcorp_appconnectors_v1 instead of the aliases -/// defined in this namespace. -namespace beyondcorp { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use beyondcorp_appconnectors_v1::AppConnectorsServiceClient -/// directly. -using ::google::cloud::beyondcorp_appconnectors_v1::AppConnectorsServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace beyondcorp -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_CONNECTORS_CLIENT_H diff --git a/google/cloud/beyondcorp/app_connectors_connection.h b/google/cloud/beyondcorp/app_connectors_connection.h deleted file mode 100644 index 0703c1726f1de..0000000000000 --- a/google/cloud/beyondcorp/app_connectors_connection.h +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_CONNECTORS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_CONNECTORS_CONNECTION_H - -#include "google/cloud/beyondcorp/app_connectors_connection_idempotency_policy.h" -#include "google/cloud/beyondcorp/appconnectors/v1/app_connectors_connection.h" - -namespace google { -namespace cloud { -namespace beyondcorp { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// beyondcorp_appconnectors_v1::MakeAppConnectorsServiceConnection directly. -using ::google::cloud::beyondcorp_appconnectors_v1:: - MakeAppConnectorsServiceConnection; - -/// @deprecated Use beyondcorp_appconnectors_v1::AppConnectorsServiceConnection -/// directly. -using ::google::cloud::beyondcorp_appconnectors_v1:: - AppConnectorsServiceConnection; - -/// @deprecated Use -/// beyondcorp_appconnectors_v1::AppConnectorsServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::beyondcorp_appconnectors_v1:: - AppConnectorsServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use -/// beyondcorp_appconnectors_v1::AppConnectorsServiceLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::beyondcorp_appconnectors_v1:: - AppConnectorsServiceLimitedTimeRetryPolicy; - -/// @deprecated Use beyondcorp_appconnectors_v1::AppConnectorsServiceRetryPolicy -/// directly. -using ::google::cloud::beyondcorp_appconnectors_v1:: - AppConnectorsServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace beyondcorp -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_CONNECTORS_CONNECTION_H diff --git a/google/cloud/beyondcorp/app_connectors_connection_idempotency_policy.h b/google/cloud/beyondcorp/app_connectors_connection_idempotency_policy.h deleted file mode 100644 index 843387259f446..0000000000000 --- a/google/cloud/beyondcorp/app_connectors_connection_idempotency_policy.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_CONNECTORS_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_CONNECTORS_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/beyondcorp/appconnectors/v1/app_connectors_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace beyondcorp { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// beyondcorp_appconnectors_v1::MakeDefaultAppConnectorsServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::beyondcorp_appconnectors_v1:: - MakeDefaultAppConnectorsServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// beyondcorp_appconnectors_v1::AppConnectorsServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::beyondcorp_appconnectors_v1:: - AppConnectorsServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace beyondcorp -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_CONNECTORS_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/beyondcorp/app_connectors_options.h b/google/cloud/beyondcorp/app_connectors_options.h deleted file mode 100644 index 8063446bc3df9..0000000000000 --- a/google/cloud/beyondcorp/app_connectors_options.h +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_CONNECTORS_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_CONNECTORS_OPTIONS_H - -#include "google/cloud/beyondcorp/app_connectors_connection.h" -#include "google/cloud/beyondcorp/app_connectors_connection_idempotency_policy.h" -#include "google/cloud/beyondcorp/appconnectors/v1/app_connectors_options.h" - -namespace google { -namespace cloud { -namespace beyondcorp { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// beyondcorp_appconnectors_v1::AppConnectorsServicePollingPolicyOption -/// directly. -using ::google::cloud::beyondcorp_appconnectors_v1:: - AppConnectorsServicePollingPolicyOption; - -/// @deprecated Use -/// beyondcorp_appconnectors_v1::AppConnectorsServiceBackoffPolicyOption -/// directly. -using ::google::cloud::beyondcorp_appconnectors_v1:: - AppConnectorsServiceBackoffPolicyOption; - -/// @deprecated Use -/// beyondcorp_appconnectors_v1::AppConnectorsServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::beyondcorp_appconnectors_v1:: - AppConnectorsServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use -/// beyondcorp_appconnectors_v1::AppConnectorsServicePolicyOptionList directly. -using ::google::cloud::beyondcorp_appconnectors_v1:: - AppConnectorsServicePolicyOptionList; - -/// @deprecated Use -/// beyondcorp_appconnectors_v1::AppConnectorsServiceRetryPolicyOption directly. -using ::google::cloud::beyondcorp_appconnectors_v1:: - AppConnectorsServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace beyondcorp -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_CONNECTORS_OPTIONS_H diff --git a/google/cloud/beyondcorp/app_gateways_client.h b/google/cloud/beyondcorp/app_gateways_client.h deleted file mode 100644 index 4fbf2585f8232..0000000000000 --- a/google/cloud/beyondcorp/app_gateways_client.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/beyondcorp/appgateways/v1/app_gateways_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_GATEWAYS_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_GATEWAYS_CLIENT_H - -#include "google/cloud/beyondcorp/app_gateways_connection.h" -#include "google/cloud/beyondcorp/appgateways/v1/app_gateways_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in beyondcorp_appgateways_v1 instead of the aliases -/// defined in this namespace. -namespace beyondcorp { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use beyondcorp_appgateways_v1::AppGatewaysServiceClient -/// directly. -using ::google::cloud::beyondcorp_appgateways_v1::AppGatewaysServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace beyondcorp -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_GATEWAYS_CLIENT_H diff --git a/google/cloud/beyondcorp/app_gateways_connection.h b/google/cloud/beyondcorp/app_gateways_connection.h deleted file mode 100644 index a47ca91cfa0d8..0000000000000 --- a/google/cloud/beyondcorp/app_gateways_connection.h +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/beyondcorp/appgateways/v1/app_gateways_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_GATEWAYS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_GATEWAYS_CONNECTION_H - -#include "google/cloud/beyondcorp/app_gateways_connection_idempotency_policy.h" -#include "google/cloud/beyondcorp/appgateways/v1/app_gateways_connection.h" - -namespace google { -namespace cloud { -namespace beyondcorp { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use beyondcorp_appgateways_v1::MakeAppGatewaysServiceConnection -/// directly. -using ::google::cloud::beyondcorp_appgateways_v1:: - MakeAppGatewaysServiceConnection; - -/// @deprecated Use beyondcorp_appgateways_v1::AppGatewaysServiceConnection -/// directly. -using ::google::cloud::beyondcorp_appgateways_v1::AppGatewaysServiceConnection; - -/// @deprecated Use -/// beyondcorp_appgateways_v1::AppGatewaysServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::beyondcorp_appgateways_v1:: - AppGatewaysServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use -/// beyondcorp_appgateways_v1::AppGatewaysServiceLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::beyondcorp_appgateways_v1:: - AppGatewaysServiceLimitedTimeRetryPolicy; - -/// @deprecated Use beyondcorp_appgateways_v1::AppGatewaysServiceRetryPolicy -/// directly. -using ::google::cloud::beyondcorp_appgateways_v1::AppGatewaysServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace beyondcorp -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_GATEWAYS_CONNECTION_H diff --git a/google/cloud/beyondcorp/app_gateways_connection_idempotency_policy.h b/google/cloud/beyondcorp/app_gateways_connection_idempotency_policy.h deleted file mode 100644 index f04d58be7d850..0000000000000 --- a/google/cloud/beyondcorp/app_gateways_connection_idempotency_policy.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/beyondcorp/appgateways/v1/app_gateways_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_GATEWAYS_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_GATEWAYS_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/beyondcorp/appgateways/v1/app_gateways_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace beyondcorp { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// beyondcorp_appgateways_v1::MakeDefaultAppGatewaysServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::beyondcorp_appgateways_v1:: - MakeDefaultAppGatewaysServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// beyondcorp_appgateways_v1::AppGatewaysServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::beyondcorp_appgateways_v1:: - AppGatewaysServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace beyondcorp -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_GATEWAYS_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/beyondcorp/app_gateways_options.h b/google/cloud/beyondcorp/app_gateways_options.h deleted file mode 100644 index b850da294655f..0000000000000 --- a/google/cloud/beyondcorp/app_gateways_options.h +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/beyondcorp/appgateways/v1/app_gateways_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_GATEWAYS_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_GATEWAYS_OPTIONS_H - -#include "google/cloud/beyondcorp/app_gateways_connection.h" -#include "google/cloud/beyondcorp/app_gateways_connection_idempotency_policy.h" -#include "google/cloud/beyondcorp/appgateways/v1/app_gateways_options.h" - -namespace google { -namespace cloud { -namespace beyondcorp { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// beyondcorp_appgateways_v1::AppGatewaysServicePollingPolicyOption directly. -using ::google::cloud::beyondcorp_appgateways_v1:: - AppGatewaysServicePollingPolicyOption; - -/// @deprecated Use -/// beyondcorp_appgateways_v1::AppGatewaysServiceBackoffPolicyOption directly. -using ::google::cloud::beyondcorp_appgateways_v1:: - AppGatewaysServiceBackoffPolicyOption; - -/// @deprecated Use -/// beyondcorp_appgateways_v1::AppGatewaysServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::beyondcorp_appgateways_v1:: - AppGatewaysServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use -/// beyondcorp_appgateways_v1::AppGatewaysServicePolicyOptionList directly. -using ::google::cloud::beyondcorp_appgateways_v1:: - AppGatewaysServicePolicyOptionList; - -/// @deprecated Use -/// beyondcorp_appgateways_v1::AppGatewaysServiceRetryPolicyOption directly. -using ::google::cloud::beyondcorp_appgateways_v1:: - AppGatewaysServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace beyondcorp -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APP_GATEWAYS_OPTIONS_H diff --git a/google/cloud/beyondcorp/appconnections/v1/app_connections_client.h b/google/cloud/beyondcorp/appconnections/v1/app_connections_client.h index 787f3d0dd2664..13b38fe88d535 100644 --- a/google/cloud/beyondcorp/appconnections/v1/app_connections_client.h +++ b/google/cloud/beyondcorp/appconnections/v1/app_connections_client.h @@ -27,7 +27,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/beyondcorp/appconnections/v1/app_connections_connection.h b/google/cloud/beyondcorp/appconnections/v1/app_connections_connection.h index b1add147978b6..2d919f0b6a8dc 100644 --- a/google/cloud/beyondcorp/appconnections/v1/app_connections_connection.h +++ b/google/cloud/beyondcorp/appconnections/v1/app_connections_connection.h @@ -21,6 +21,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APPCONNECTIONS_V1_APP_CONNECTIONS_CONNECTION_H #include "google/cloud/beyondcorp/appconnections/v1/app_connections_connection_idempotency_policy.h" +#include "google/cloud/beyondcorp/appconnections/v1/app_connections_service.pb.h" #include "google/cloud/beyondcorp/appconnections/v1/internal/app_connections_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -31,8 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/beyondcorp/appconnections/v1/app_connections_connection_idempotency_policy.h b/google/cloud/beyondcorp/appconnections/v1/app_connections_connection_idempotency_policy.h index a7add5df1e169..26c76c014170e 100644 --- a/google/cloud/beyondcorp/appconnections/v1/app_connections_connection_idempotency_policy.h +++ b/google/cloud/beyondcorp/appconnections/v1/app_connections_connection_idempotency_policy.h @@ -20,12 +20,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APPCONNECTIONS_V1_APP_CONNECTIONS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APPCONNECTIONS_V1_APP_CONNECTIONS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/beyondcorp/appconnections/v1/app_connections_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_auth_decorator.cc b/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_auth_decorator.cc index 7c1540d34acc6..8523f18ab84db 100644 --- a/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_auth_decorator.cc +++ b/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_auth_decorator.cc @@ -18,10 +18,13 @@ // google/cloud/beyondcorp/appconnections/v1/app_connections_service.proto #include "google/cloud/beyondcorp/appconnections/v1/internal/app_connections_auth_decorator.h" -#include +#include "google/cloud/beyondcorp/appconnections/v1/app_connections_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appconnections_v1_internal { @@ -274,3 +277,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace beyondcorp_appconnections_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_auth_decorator.h b/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_auth_decorator.h index ae72d2fd8dd87..723d3da74056b 100644 --- a/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_auth_decorator.h +++ b/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_auth_decorator.h @@ -23,11 +23,14 @@ #include "google/cloud/beyondcorp/appconnections/v1/internal/app_connections_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appconnections_v1_internal { @@ -152,4 +155,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APPCONNECTIONS_V1_INTERNAL_APP_CONNECTIONS_AUTH_DECORATOR_H diff --git a/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_connection_impl.h b/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_connection_impl.h index ea82e4d0edc53..226f749aa852c 100644 --- a/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_connection_impl.h +++ b/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_connection_impl.h @@ -33,7 +33,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_logging_decorator.cc b/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_logging_decorator.cc index 7a715d52ec2f4..2164c02af4f6e 100644 --- a/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_logging_decorator.cc +++ b/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_logging_decorator.cc @@ -18,14 +18,17 @@ // google/cloud/beyondcorp/appconnections/v1/app_connections_service.proto #include "google/cloud/beyondcorp/appconnections/v1/internal/app_connections_logging_decorator.h" +#include "google/cloud/beyondcorp/appconnections/v1/app_connections_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appconnections_v1_internal { @@ -325,3 +328,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace beyondcorp_appconnections_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_logging_decorator.h b/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_logging_decorator.h index 8d838adec5920..da5c81f993b30 100644 --- a/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_logging_decorator.h +++ b/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_logging_decorator.h @@ -23,11 +23,14 @@ #include "google/cloud/beyondcorp/appconnections/v1/internal/app_connections_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appconnections_v1_internal { @@ -152,4 +155,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APPCONNECTIONS_V1_INTERNAL_APP_CONNECTIONS_LOGGING_DECORATOR_H diff --git a/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_metadata_decorator.cc b/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_metadata_decorator.cc index 63a7a46960df4..2ebcdbae22f5a 100644 --- a/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_metadata_decorator.cc +++ b/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_metadata_decorator.cc @@ -18,17 +18,21 @@ // google/cloud/beyondcorp/appconnections/v1/app_connections_service.proto #include "google/cloud/beyondcorp/appconnections/v1/internal/app_connections_metadata_decorator.h" +#include "google/cloud/beyondcorp/appconnections/v1/app_connections_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appconnections_v1_internal { @@ -270,3 +274,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace beyondcorp_appconnections_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_metadata_decorator.h b/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_metadata_decorator.h index c0aeaa36c2f98..739f73df08fde 100644 --- a/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_metadata_decorator.h +++ b/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_metadata_decorator.h @@ -23,11 +23,14 @@ #include "google/cloud/beyondcorp/appconnections/v1/internal/app_connections_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appconnections_v1_internal { @@ -158,4 +161,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APPCONNECTIONS_V1_INTERNAL_APP_CONNECTIONS_METADATA_DECORATOR_H diff --git a/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_option_defaults.cc b/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_option_defaults.cc index e157a637d9958..fd3371f52da68 100644 --- a/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_option_defaults.cc +++ b/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_option_defaults.cc @@ -46,7 +46,7 @@ Options AppConnectionsServiceDefaultOptions(Options options) { beyondcorp_appconnections_v1::AppConnectionsServiceRetryPolicyOption>( beyondcorp_appconnections_v1:: AppConnectionsServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appconnections_v1_internal { @@ -324,3 +327,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace beyondcorp_appconnections_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_stub.h b/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_stub.h index b8d334e0e9059..3c113981dac8b 100644 --- a/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_stub.h +++ b/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_stub.h @@ -20,18 +20,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APPCONNECTIONS_V1_INTERNAL_APP_CONNECTIONS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APPCONNECTIONS_V1_INTERNAL_APP_CONNECTIONS_STUB_H +#include "google/cloud/beyondcorp/appconnections/v1/app_connections_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appconnections_v1_internal { @@ -279,4 +282,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APPCONNECTIONS_V1_INTERNAL_APP_CONNECTIONS_STUB_H diff --git a/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_stub_factory.cc b/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_stub_factory.cc index e70e8a2881d89..d700d42db2849 100644 --- a/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_stub_factory.cc +++ b/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_stub_factory.cc @@ -18,24 +18,27 @@ // google/cloud/beyondcorp/appconnections/v1/app_connections_service.proto #include "google/cloud/beyondcorp/appconnections/v1/internal/app_connections_stub_factory.h" +#include "google/cloud/beyondcorp/appconnections/v1/app_connections_service.grpc.pb.h" #include "google/cloud/beyondcorp/appconnections/v1/internal/app_connections_auth_decorator.h" #include "google/cloud/beyondcorp/appconnections/v1/internal/app_connections_logging_decorator.h" #include "google/cloud/beyondcorp/appconnections/v1/internal/app_connections_metadata_decorator.h" #include "google/cloud/beyondcorp/appconnections/v1/internal/app_connections_stub.h" #include "google/cloud/beyondcorp/appconnections/v1/internal/app_connections_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appconnections_v1_internal { @@ -80,3 +83,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace beyondcorp_appconnections_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_stub_factory.h b/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_stub_factory.h index b0afc0043c8fb..150c7497c17e4 100644 --- a/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_stub_factory.h +++ b/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_stub_factory.h @@ -26,6 +26,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appconnections_v1_internal { @@ -41,4 +44,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APPCONNECTIONS_V1_INTERNAL_APP_CONNECTIONS_STUB_FACTORY_H diff --git a/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_tracing_connection.cc b/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_tracing_connection.cc index 5150845c034e2..e3b40d2a29f20 100644 --- a/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_tracing_connection.cc +++ b/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace beyondcorp_appconnections_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AppConnectionsServiceTracingConnection::AppConnectionsServiceTracingConnection( std::shared_ptr< beyondcorp_appconnections_v1::AppConnectionsServiceConnection> @@ -276,19 +274,15 @@ Status AppConnectionsServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAppConnectionsServiceTracingConnection( std::shared_ptr< beyondcorp_appconnections_v1::AppConnectionsServiceConnection> conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_tracing_connection.h b/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_tracing_connection.h index fb7ef92fc956d..68e2ffda60a86 100644 --- a/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_tracing_connection.h +++ b/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace beyondcorp_appconnections_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AppConnectionsServiceTracingConnection : public beyondcorp_appconnections_v1::AppConnectionsServiceConnection { public: @@ -124,8 +122,6 @@ class AppConnectionsServiceTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_tracing_stub.cc b/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_tracing_stub.cc index a8a1cd0049cec..d7f742f375eb4 100644 --- a/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_tracing_stub.cc +++ b/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_tracing_stub.cc @@ -22,13 +22,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appconnections_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AppConnectionsServiceTracingStub::AppConnectionsServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -313,18 +314,14 @@ future AppConnectionsServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAppConnectionsServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace beyondcorp_appconnections_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_tracing_stub.h b/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_tracing_stub.h index 4dbc1b436118a..5921e82f0c461 100644 --- a/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_tracing_stub.h +++ b/google/cloud/beyondcorp/appconnections/v1/internal/app_connections_tracing_stub.h @@ -26,13 +26,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appconnections_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AppConnectionsServiceTracingStub : public AppConnectionsServiceStub { public: ~AppConnectionsServiceTracingStub() override = default; @@ -148,8 +149,6 @@ class AppConnectionsServiceTracingStub : public AppConnectionsServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -164,4 +163,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APPCONNECTIONS_V1_INTERNAL_APP_CONNECTIONS_TRACING_STUB_H diff --git a/google/cloud/beyondcorp/appconnectors/v1/app_connectors_client.h b/google/cloud/beyondcorp/appconnectors/v1/app_connectors_client.h index 0fe3e1a7ce4ff..566b6476d2783 100644 --- a/google/cloud/beyondcorp/appconnectors/v1/app_connectors_client.h +++ b/google/cloud/beyondcorp/appconnectors/v1/app_connectors_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/beyondcorp/appconnectors/v1/app_connectors_connection.h b/google/cloud/beyondcorp/appconnectors/v1/app_connectors_connection.h index d199e5ad2d98f..7dc7cbfecf54e 100644 --- a/google/cloud/beyondcorp/appconnectors/v1/app_connectors_connection.h +++ b/google/cloud/beyondcorp/appconnectors/v1/app_connectors_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APPCONNECTORS_V1_APP_CONNECTORS_CONNECTION_H #include "google/cloud/beyondcorp/appconnectors/v1/app_connectors_connection_idempotency_policy.h" +#include "google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.pb.h" #include "google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/beyondcorp/appconnectors/v1/app_connectors_connection_idempotency_policy.h b/google/cloud/beyondcorp/appconnectors/v1/app_connectors_connection_idempotency_policy.h index 7e4add7a2232d..a71570a5e95c7 100644 --- a/google/cloud/beyondcorp/appconnectors/v1/app_connectors_connection_idempotency_policy.h +++ b/google/cloud/beyondcorp/appconnectors/v1/app_connectors_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APPCONNECTORS_V1_APP_CONNECTORS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APPCONNECTORS_V1_APP_CONNECTORS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_auth_decorator.cc b/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_auth_decorator.cc index 83a979d3b7a39..f070ef107d057 100644 --- a/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_auth_decorator.cc +++ b/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.proto #include "google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_auth_decorator.h" -#include +#include "google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appconnectors_v1_internal { @@ -291,3 +294,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace beyondcorp_appconnectors_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_auth_decorator.h b/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_auth_decorator.h index 097c69337a3a8..c056846553762 100644 --- a/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_auth_decorator.h +++ b/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appconnectors_v1_internal { @@ -156,4 +159,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APPCONNECTORS_V1_INTERNAL_APP_CONNECTORS_AUTH_DECORATOR_H diff --git a/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_connection_impl.h b/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_connection_impl.h index bcd96cfcce674..352aefea9fa90 100644 --- a/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_connection_impl.h +++ b/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_logging_decorator.cc b/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_logging_decorator.cc index d015c1cb93615..6b7a04a3c2172 100644 --- a/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_logging_decorator.cc +++ b/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.proto #include "google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_logging_decorator.h" +#include "google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appconnectors_v1_internal { @@ -343,3 +346,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace beyondcorp_appconnectors_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_logging_decorator.h b/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_logging_decorator.h index edf5080582e16..3664a15a90fd3 100644 --- a/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_logging_decorator.h +++ b/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appconnectors_v1_internal { @@ -156,4 +159,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APPCONNECTORS_V1_INTERNAL_APP_CONNECTORS_LOGGING_DECORATOR_H diff --git a/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_metadata_decorator.cc b/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_metadata_decorator.cc index 03ea4907257b3..e85f4fbaf84ef 100644 --- a/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_metadata_decorator.cc +++ b/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.proto #include "google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_metadata_decorator.h" +#include "google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appconnectors_v1_internal { @@ -283,3 +287,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace beyondcorp_appconnectors_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_metadata_decorator.h b/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_metadata_decorator.h index d8618f1049f5b..8079e4cf821d5 100644 --- a/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_metadata_decorator.h +++ b/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appconnectors_v1_internal { @@ -162,4 +165,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APPCONNECTORS_V1_INTERNAL_APP_CONNECTORS_METADATA_DECORATOR_H diff --git a/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_option_defaults.cc b/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_option_defaults.cc index 8506a523bcba1..872fbdd351c07 100644 --- a/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_option_defaults.cc +++ b/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_option_defaults.cc @@ -44,7 +44,7 @@ Options AppConnectorsServiceDefaultOptions(Options options) { options.set< beyondcorp_appconnectors_v1::AppConnectorsServiceRetryPolicyOption>( beyondcorp_appconnectors_v1::AppConnectorsServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appconnectors_v1_internal { @@ -339,3 +342,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace beyondcorp_appconnectors_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_stub.h b/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_stub.h index 47a578a0ba116..5780513255c73 100644 --- a/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_stub.h +++ b/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APPCONNECTORS_V1_INTERNAL_APP_CONNECTORS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APPCONNECTORS_V1_INTERNAL_APP_CONNECTORS_STUB_H +#include "google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appconnectors_v1_internal { @@ -289,4 +292,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APPCONNECTORS_V1_INTERNAL_APP_CONNECTORS_STUB_H diff --git a/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_stub_factory.cc b/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_stub_factory.cc index ad05d1ab7cfcd..4ba43aae3cd04 100644 --- a/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_stub_factory.cc +++ b/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.proto #include "google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_stub_factory.h" +#include "google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.grpc.pb.h" #include "google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_auth_decorator.h" #include "google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_logging_decorator.h" #include "google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_metadata_decorator.h" #include "google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_stub.h" #include "google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appconnectors_v1_internal { @@ -78,3 +81,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace beyondcorp_appconnectors_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_stub_factory.h b/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_stub_factory.h index 113af39cca030..f15a97c33142d 100644 --- a/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_stub_factory.h +++ b/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appconnectors_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APPCONNECTORS_V1_INTERNAL_APP_CONNECTORS_STUB_FACTORY_H diff --git a/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_tracing_connection.cc b/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_tracing_connection.cc index b34f9df2ffdb2..e0a559687daae 100644 --- a/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_tracing_connection.cc +++ b/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace beyondcorp_appconnectors_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AppConnectorsServiceTracingConnection::AppConnectorsServiceTracingConnection( std::shared_ptr child) @@ -291,18 +289,14 @@ Status AppConnectorsServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAppConnectorsServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_tracing_connection.h b/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_tracing_connection.h index f7821a55eef54..f82d67d83e54f 100644 --- a/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_tracing_connection.h +++ b/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace beyondcorp_appconnectors_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AppConnectorsServiceTracingConnection : public beyondcorp_appconnectors_v1::AppConnectorsServiceConnection { public: @@ -131,8 +129,6 @@ class AppConnectorsServiceTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_tracing_stub.cc b/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_tracing_stub.cc index 87aa44ec1acc0..a559bc43d4702 100644 --- a/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_tracing_stub.cc +++ b/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appconnectors_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AppConnectorsServiceTracingStub::AppConnectorsServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -325,18 +326,14 @@ future AppConnectorsServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAppConnectorsServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace beyondcorp_appconnectors_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_tracing_stub.h b/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_tracing_stub.h index 12faa23f05eec..88cce8dd01e50 100644 --- a/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_tracing_stub.h +++ b/google/cloud/beyondcorp/appconnectors/v1/internal/app_connectors_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appconnectors_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AppConnectorsServiceTracingStub : public AppConnectorsServiceStub { public: ~AppConnectorsServiceTracingStub() override = default; @@ -152,8 +153,6 @@ class AppConnectorsServiceTracingStub : public AppConnectorsServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -168,4 +167,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APPCONNECTORS_V1_INTERNAL_APP_CONNECTORS_TRACING_STUB_H diff --git a/google/cloud/beyondcorp/appgateways/v1/app_gateways_client.h b/google/cloud/beyondcorp/appgateways/v1/app_gateways_client.h index a4546e818a095..b317410b2be2d 100644 --- a/google/cloud/beyondcorp/appgateways/v1/app_gateways_client.h +++ b/google/cloud/beyondcorp/appgateways/v1/app_gateways_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/beyondcorp/appgateways/v1/app_gateways_connection.h b/google/cloud/beyondcorp/appgateways/v1/app_gateways_connection.h index 5be7808362b26..fd3aa704dbbb6 100644 --- a/google/cloud/beyondcorp/appgateways/v1/app_gateways_connection.h +++ b/google/cloud/beyondcorp/appgateways/v1/app_gateways_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APPGATEWAYS_V1_APP_GATEWAYS_CONNECTION_H #include "google/cloud/beyondcorp/appgateways/v1/app_gateways_connection_idempotency_policy.h" +#include "google/cloud/beyondcorp/appgateways/v1/app_gateways_service.pb.h" #include "google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/beyondcorp/appgateways/v1/app_gateways_connection_idempotency_policy.h b/google/cloud/beyondcorp/appgateways/v1/app_gateways_connection_idempotency_policy.h index 413008cb33a4c..639d2ce9e13b0 100644 --- a/google/cloud/beyondcorp/appgateways/v1/app_gateways_connection_idempotency_policy.h +++ b/google/cloud/beyondcorp/appgateways/v1/app_gateways_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APPGATEWAYS_V1_APP_GATEWAYS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APPGATEWAYS_V1_APP_GATEWAYS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/beyondcorp/appgateways/v1/app_gateways_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_auth_decorator.cc b/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_auth_decorator.cc index bce20174bbbf3..573f305d47ef8 100644 --- a/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_auth_decorator.cc +++ b/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/beyondcorp/appgateways/v1/app_gateways_service.proto #include "google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_auth_decorator.h" -#include +#include "google/cloud/beyondcorp/appgateways/v1/app_gateways_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appgateways_v1_internal { @@ -228,3 +231,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace beyondcorp_appgateways_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_auth_decorator.h b/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_auth_decorator.h index 1817a6e3e65d0..6475c2b247154 100644 --- a/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_auth_decorator.h +++ b/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appgateways_v1_internal { @@ -133,4 +136,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APPGATEWAYS_V1_INTERNAL_APP_GATEWAYS_AUTH_DECORATOR_H diff --git a/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_connection_impl.h b/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_connection_impl.h index d83207209b50c..40ca52a49e8f4 100644 --- a/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_connection_impl.h +++ b/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_logging_decorator.cc b/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_logging_decorator.cc index 334a70137cca1..df8bcbe73e90a 100644 --- a/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_logging_decorator.cc +++ b/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/beyondcorp/appgateways/v1/app_gateways_service.proto #include "google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_logging_decorator.h" +#include "google/cloud/beyondcorp/appgateways/v1/app_gateways_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appgateways_v1_internal { @@ -274,3 +277,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace beyondcorp_appgateways_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_logging_decorator.h b/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_logging_decorator.h index 2bb57552f98b7..302f7631cd6e5 100644 --- a/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_logging_decorator.h +++ b/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appgateways_v1_internal { @@ -133,4 +136,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APPGATEWAYS_V1_INTERNAL_APP_GATEWAYS_LOGGING_DECORATOR_H diff --git a/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_metadata_decorator.cc b/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_metadata_decorator.cc index 240458625edbe..57ae7cc175e4f 100644 --- a/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_metadata_decorator.cc +++ b/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/beyondcorp/appgateways/v1/app_gateways_service.proto #include "google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_metadata_decorator.h" +#include "google/cloud/beyondcorp/appgateways/v1/app_gateways_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appgateways_v1_internal { @@ -230,3 +234,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace beyondcorp_appgateways_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_metadata_decorator.h b/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_metadata_decorator.h index 7b1b60c901def..dfdb0a404c8a7 100644 --- a/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_metadata_decorator.h +++ b/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appgateways_v1_internal { @@ -139,4 +142,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APPGATEWAYS_V1_INTERNAL_APP_GATEWAYS_METADATA_DECORATOR_H diff --git a/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_option_defaults.cc b/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_option_defaults.cc index d0e69eaeca38c..b99158652991d 100644 --- a/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_option_defaults.cc +++ b/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_option_defaults.cc @@ -43,7 +43,7 @@ Options AppGatewaysServiceDefaultOptions(Options options) { beyondcorp_appgateways_v1::AppGatewaysServiceRetryPolicyOption>()) { options.set( beyondcorp_appgateways_v1::AppGatewaysServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_stub.cc b/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_stub.cc index f940a29c0ea84..4b60a55c71f7f 100644 --- a/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_stub.cc +++ b/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/beyondcorp/appgateways/v1/app_gateways_service.proto #include "google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_stub.h" +#include "google/cloud/beyondcorp/appgateways/v1/app_gateways_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appgateways_v1_internal { @@ -271,3 +274,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace beyondcorp_appgateways_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_stub.h b/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_stub.h index 788d012b0b0be..5614bf6e89835 100644 --- a/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_stub.h +++ b/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APPGATEWAYS_V1_INTERNAL_APP_GATEWAYS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APPGATEWAYS_V1_INTERNAL_APP_GATEWAYS_STUB_H +#include "google/cloud/beyondcorp/appgateways/v1/app_gateways_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appgateways_v1_internal { @@ -246,4 +249,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APPGATEWAYS_V1_INTERNAL_APP_GATEWAYS_STUB_H diff --git a/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_stub_factory.cc b/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_stub_factory.cc index ae7a851730fa4..c02f91966dc5d 100644 --- a/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_stub_factory.cc +++ b/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/beyondcorp/appgateways/v1/app_gateways_service.proto #include "google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_stub_factory.h" +#include "google/cloud/beyondcorp/appgateways/v1/app_gateways_service.grpc.pb.h" #include "google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_auth_decorator.h" #include "google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_logging_decorator.h" #include "google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_metadata_decorator.h" #include "google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_stub.h" #include "google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appgateways_v1_internal { @@ -79,3 +82,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace beyondcorp_appgateways_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_stub_factory.h b/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_stub_factory.h index 0a7f349f9cce4..8ca34771c9795 100644 --- a/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_stub_factory.h +++ b/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appgateways_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APPGATEWAYS_V1_INTERNAL_APP_GATEWAYS_STUB_FACTORY_H diff --git a/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_tracing_connection.cc b/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_tracing_connection.cc index c349cf6cf3e3a..94c12965cfed6 100644 --- a/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_tracing_connection.cc +++ b/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace beyondcorp_appgateways_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AppGatewaysServiceTracingConnection::AppGatewaysServiceTracingConnection( std::shared_ptr child) @@ -217,18 +215,14 @@ Status AppGatewaysServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAppGatewaysServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_tracing_connection.h b/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_tracing_connection.h index d9ac514a90782..e4692ebf654a2 100644 --- a/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_tracing_connection.h +++ b/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace beyondcorp_appgateways_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AppGatewaysServiceTracingConnection : public beyondcorp_appgateways_v1::AppGatewaysServiceConnection { public: @@ -111,8 +109,6 @@ class AppGatewaysServiceTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_tracing_stub.cc b/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_tracing_stub.cc index d476254114146..5831078b4eaf4 100644 --- a/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_tracing_stub.cc +++ b/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appgateways_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AppGatewaysServiceTracingStub::AppGatewaysServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -263,18 +264,14 @@ future AppGatewaysServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAppGatewaysServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace beyondcorp_appgateways_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_tracing_stub.h b/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_tracing_stub.h index b5fac507432e1..d105333dbc3ff 100644 --- a/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_tracing_stub.h +++ b/google/cloud/beyondcorp/appgateways/v1/internal/app_gateways_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace beyondcorp_appgateways_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AppGatewaysServiceTracingStub : public AppGatewaysServiceStub { public: ~AppGatewaysServiceTracingStub() override = default; @@ -129,8 +130,6 @@ class AppGatewaysServiceTracingStub : public AppGatewaysServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -145,4 +144,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_APPGATEWAYS_V1_INTERNAL_APP_GATEWAYS_TRACING_STUB_H diff --git a/google/cloud/beyondcorp/mocks/mock_app_connections_connection.h b/google/cloud/beyondcorp/mocks/mock_app_connections_connection.h deleted file mode 100644 index a0d3fe2ab466c..0000000000000 --- a/google/cloud/beyondcorp/mocks/mock_app_connections_connection.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: -// google/cloud/beyondcorp/appconnections/v1/app_connections_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_MOCKS_MOCK_APP_CONNECTIONS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_MOCKS_MOCK_APP_CONNECTIONS_CONNECTION_H - -#include "google/cloud/beyondcorp/app_connections_connection.h" -#include "google/cloud/beyondcorp/appconnections/v1/mocks/mock_app_connections_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in beyondcorp_appconnections_v1_mocks instead of the -/// aliases defined in this namespace. -namespace beyondcorp_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// beyondcorp_appconnections_v1_mocks::MockAppConnectionsServiceConnection -/// directly. -using ::google::cloud::beyondcorp_appconnections_v1_mocks:: - MockAppConnectionsServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace beyondcorp_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_MOCKS_MOCK_APP_CONNECTIONS_CONNECTION_H diff --git a/google/cloud/beyondcorp/mocks/mock_app_connectors_connection.h b/google/cloud/beyondcorp/mocks/mock_app_connectors_connection.h deleted file mode 100644 index c0c9e4c3ba6c7..0000000000000 --- a/google/cloud/beyondcorp/mocks/mock_app_connectors_connection.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_MOCKS_MOCK_APP_CONNECTORS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_MOCKS_MOCK_APP_CONNECTORS_CONNECTION_H - -#include "google/cloud/beyondcorp/app_connectors_connection.h" -#include "google/cloud/beyondcorp/appconnectors/v1/mocks/mock_app_connectors_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in beyondcorp_appconnectors_v1_mocks instead of the -/// aliases defined in this namespace. -namespace beyondcorp_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// beyondcorp_appconnectors_v1_mocks::MockAppConnectorsServiceConnection -/// directly. -using ::google::cloud::beyondcorp_appconnectors_v1_mocks:: - MockAppConnectorsServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace beyondcorp_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_MOCKS_MOCK_APP_CONNECTORS_CONNECTION_H diff --git a/google/cloud/beyondcorp/mocks/mock_app_gateways_connection.h b/google/cloud/beyondcorp/mocks/mock_app_gateways_connection.h deleted file mode 100644 index d561b025cd2d4..0000000000000 --- a/google/cloud/beyondcorp/mocks/mock_app_gateways_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/beyondcorp/appgateways/v1/app_gateways_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_MOCKS_MOCK_APP_GATEWAYS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_MOCKS_MOCK_APP_GATEWAYS_CONNECTION_H - -#include "google/cloud/beyondcorp/app_gateways_connection.h" -#include "google/cloud/beyondcorp/appgateways/v1/mocks/mock_app_gateways_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in beyondcorp_appgateways_v1_mocks instead of the aliases -/// defined in this namespace. -namespace beyondcorp_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// beyondcorp_appgateways_v1_mocks::MockAppGatewaysServiceConnection directly. -using ::google::cloud::beyondcorp_appgateways_v1_mocks:: - MockAppGatewaysServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace beyondcorp_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BEYONDCORP_MOCKS_MOCK_APP_GATEWAYS_CONNECTION_H diff --git a/google/cloud/beyondcorp/quickstart/.bazelrc b/google/cloud/beyondcorp/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/beyondcorp/quickstart/.bazelrc +++ b/google/cloud/beyondcorp/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/beyondcorp/quickstart/CMakeLists.txt b/google/cloud/beyondcorp/quickstart/CMakeLists.txt index bcbcd6f778cee..00e6d31b05121 100644 --- a/google/cloud/beyondcorp/quickstart/CMakeLists.txt +++ b/google/cloud/beyondcorp/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the BeyondCorp API C++ client library from a larger # CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-beyondcorp-quickstart CXX) find_package(google_cloud_cpp_beyondcorp REQUIRED) diff --git a/google/cloud/bigquery/BUILD.bazel b/google/cloud/bigquery/BUILD.bazel index fa8bc6047c540..11484888b4822 100644 --- a/google/cloud/bigquery/BUILD.bazel +++ b/google/cloud/bigquery/BUILD.bazel @@ -23,7 +23,6 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "biglake/v1/", "analyticshub/v1/", "connection/v1/", @@ -38,16 +37,16 @@ service_dirs = [ src_dirs = service_dirs + [d + "internal/" for d in service_dirs] googleapis_deps = [ - "@com_google_googleapis//google/cloud/bigquery/analyticshub/v1:analyticshub_cc_grpc", - "@com_google_googleapis//google/cloud/bigquery/biglake/v1:biglake_cc_grpc", - "@com_google_googleapis//google/cloud/bigquery/connection/v1:connection_cc_grpc", - "@com_google_googleapis//google/cloud/bigquery/datapolicies/v1:datapolicies_cc_grpc", - "@com_google_googleapis//google/cloud/bigquery/datapolicies/v2:datapolicies_cc_grpc", - "@com_google_googleapis//google/cloud/bigquery/datatransfer/v1:datatransfer_cc_grpc", - "@com_google_googleapis//google/cloud/bigquery/logging/v1:logging_cc_grpc", - "@com_google_googleapis//google/cloud/bigquery/migration/v2:migration_cc_grpc", - "@com_google_googleapis//google/cloud/bigquery/reservation/v1:reservation_cc_grpc", - "@com_google_googleapis//google/cloud/bigquery/storage/v1:storage_cc_grpc", + "@googleapis//google/cloud/bigquery/analyticshub/v1:analyticshub_cc_grpc", + "@googleapis//google/cloud/bigquery/biglake/v1:biglake_cc_grpc", + "@googleapis//google/cloud/bigquery/connection/v1:connection_cc_grpc", + "@googleapis//google/cloud/bigquery/datapolicies/v1:datapolicies_cc_grpc", + "@googleapis//google/cloud/bigquery/datapolicies/v2:datapolicies_cc_grpc", + "@googleapis//google/cloud/bigquery/datatransfer/v1:datatransfer_cc_grpc", + "@googleapis//google/cloud/bigquery/logging/v1:logging_cc_grpc", + "@googleapis//google/cloud/bigquery/migration/v2:migration_cc_grpc", + "@googleapis//google/cloud/bigquery/reservation/v1:reservation_cc_grpc", + "@googleapis//google/cloud/bigquery/storage/v1:storage_cc_grpc", ] cc_gapic_library( @@ -85,7 +84,7 @@ cc_library( visibility = ["//:__subpackages__"], deps = [ ":google_cloud_cpp_bigquery_rest", - "@com_google_googletest//:gtest", + "@googletest//:gtest", ], ) @@ -100,7 +99,7 @@ cc_library( ":google_cloud_cpp_bigquery_rest_mocks", "//:common", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) @@ -114,6 +113,6 @@ cc_library( "//google/cloud:google_cloud_cpp_mocks", "//google/cloud/testing_util:google_cloud_cpp_testing_private", "//google/cloud/testing_util:google_cloud_cpp_testing_rest_private", - "@com_google_googletest//:gtest", + "@googletest//:gtest", ], ) for test in bigquery_rest_unit_tests] diff --git a/google/cloud/bigquery/analytics_hub_client.h b/google/cloud/bigquery/analytics_hub_client.h deleted file mode 100644 index f5cca725c6ce2..0000000000000 --- a/google/cloud/bigquery/analytics_hub_client.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/analyticshub/v1/analyticshub.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_ANALYTICS_HUB_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_ANALYTICS_HUB_CLIENT_H - -#include "google/cloud/bigquery/analytics_hub_connection.h" -#include "google/cloud/bigquery/analyticshub/v1/analytics_hub_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in bigquery_analyticshub_v1 instead of the aliases defined -/// in this namespace. -namespace bigquery { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use bigquery_analyticshub_v1::AnalyticsHubServiceClient -/// directly. -using ::google::cloud::bigquery_analyticshub_v1::AnalyticsHubServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_ANALYTICS_HUB_CLIENT_H diff --git a/google/cloud/bigquery/analytics_hub_connection.h b/google/cloud/bigquery/analytics_hub_connection.h deleted file mode 100644 index 4caa9a09b2a70..0000000000000 --- a/google/cloud/bigquery/analytics_hub_connection.h +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/analyticshub/v1/analyticshub.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_ANALYTICS_HUB_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_ANALYTICS_HUB_CONNECTION_H - -#include "google/cloud/bigquery/analytics_hub_connection_idempotency_policy.h" -#include "google/cloud/bigquery/analyticshub/v1/analytics_hub_connection.h" - -namespace google { -namespace cloud { -namespace bigquery { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use bigquery_analyticshub_v1::MakeAnalyticsHubServiceConnection -/// directly. -using ::google::cloud::bigquery_analyticshub_v1:: - MakeAnalyticsHubServiceConnection; - -/// @deprecated Use bigquery_analyticshub_v1::AnalyticsHubServiceConnection -/// directly. -using ::google::cloud::bigquery_analyticshub_v1::AnalyticsHubServiceConnection; - -/// @deprecated Use -/// bigquery_analyticshub_v1::AnalyticsHubServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::bigquery_analyticshub_v1:: - AnalyticsHubServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use -/// bigquery_analyticshub_v1::AnalyticsHubServiceLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::bigquery_analyticshub_v1:: - AnalyticsHubServiceLimitedTimeRetryPolicy; - -/// @deprecated Use bigquery_analyticshub_v1::AnalyticsHubServiceRetryPolicy -/// directly. -using ::google::cloud::bigquery_analyticshub_v1::AnalyticsHubServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_ANALYTICS_HUB_CONNECTION_H diff --git a/google/cloud/bigquery/analytics_hub_connection_idempotency_policy.h b/google/cloud/bigquery/analytics_hub_connection_idempotency_policy.h deleted file mode 100644 index bb371e89fed4c..0000000000000 --- a/google/cloud/bigquery/analytics_hub_connection_idempotency_policy.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/analyticshub/v1/analyticshub.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_ANALYTICS_HUB_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_ANALYTICS_HUB_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/bigquery/analyticshub/v1/analytics_hub_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace bigquery { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// bigquery_analyticshub_v1::MakeDefaultAnalyticsHubServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::bigquery_analyticshub_v1:: - MakeDefaultAnalyticsHubServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// bigquery_analyticshub_v1::AnalyticsHubServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::bigquery_analyticshub_v1:: - AnalyticsHubServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_ANALYTICS_HUB_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/bigquery/analytics_hub_options.h b/google/cloud/bigquery/analytics_hub_options.h deleted file mode 100644 index d538cdf852634..0000000000000 --- a/google/cloud/bigquery/analytics_hub_options.h +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/analyticshub/v1/analyticshub.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_ANALYTICS_HUB_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_ANALYTICS_HUB_OPTIONS_H - -#include "google/cloud/bigquery/analytics_hub_connection.h" -#include "google/cloud/bigquery/analytics_hub_connection_idempotency_policy.h" -#include "google/cloud/bigquery/analyticshub/v1/analytics_hub_options.h" - -namespace google { -namespace cloud { -namespace bigquery { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// bigquery_analyticshub_v1::AnalyticsHubServicePollingPolicyOption directly. -using ::google::cloud::bigquery_analyticshub_v1:: - AnalyticsHubServicePollingPolicyOption; - -/// @deprecated Use -/// bigquery_analyticshub_v1::AnalyticsHubServiceBackoffPolicyOption directly. -using ::google::cloud::bigquery_analyticshub_v1:: - AnalyticsHubServiceBackoffPolicyOption; - -/// @deprecated Use -/// bigquery_analyticshub_v1::AnalyticsHubServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::bigquery_analyticshub_v1:: - AnalyticsHubServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use -/// bigquery_analyticshub_v1::AnalyticsHubServicePolicyOptionList directly. -using ::google::cloud::bigquery_analyticshub_v1:: - AnalyticsHubServicePolicyOptionList; - -/// @deprecated Use -/// bigquery_analyticshub_v1::AnalyticsHubServiceRetryPolicyOption directly. -using ::google::cloud::bigquery_analyticshub_v1:: - AnalyticsHubServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_ANALYTICS_HUB_OPTIONS_H diff --git a/google/cloud/bigquery/analyticshub/v1/analytics_hub_client.h b/google/cloud/bigquery/analyticshub/v1/analytics_hub_client.h index ab56fa6c65f12..9c9db6346b4b7 100644 --- a/google/cloud/bigquery/analyticshub/v1/analytics_hub_client.h +++ b/google/cloud/bigquery/analyticshub/v1/analytics_hub_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/bigquery/analyticshub/v1/analytics_hub_connection.h b/google/cloud/bigquery/analyticshub/v1/analytics_hub_connection.h index 5ff4adc99c788..f9b74258d06b1 100644 --- a/google/cloud/bigquery/analyticshub/v1/analytics_hub_connection.h +++ b/google/cloud/bigquery/analyticshub/v1/analytics_hub_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_ANALYTICSHUB_V1_ANALYTICS_HUB_CONNECTION_H #include "google/cloud/bigquery/analyticshub/v1/analytics_hub_connection_idempotency_policy.h" +#include "google/cloud/bigquery/analyticshub/v1/analyticshub.pb.h" #include "google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/bigquery/analyticshub/v1/analytics_hub_connection_idempotency_policy.h b/google/cloud/bigquery/analyticshub/v1/analytics_hub_connection_idempotency_policy.h index 11f883ab91bdc..0b5bdeb74d6ad 100644 --- a/google/cloud/bigquery/analyticshub/v1/analytics_hub_connection_idempotency_policy.h +++ b/google/cloud/bigquery/analyticshub/v1/analytics_hub_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_ANALYTICSHUB_V1_ANALYTICS_HUB_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_ANALYTICSHUB_V1_ANALYTICS_HUB_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/bigquery/analyticshub/v1/analyticshub.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_auth_decorator.cc b/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_auth_decorator.cc index c10c52da05983..c79f1776b9cb0 100644 --- a/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_auth_decorator.cc +++ b/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/bigquery/analyticshub/v1/analyticshub.proto #include "google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_auth_decorator.h" -#include +#include "google/cloud/bigquery/analyticshub/v1/analyticshub.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_analyticshub_v1_internal { @@ -418,3 +421,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_analyticshub_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_auth_decorator.h b/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_auth_decorator.h index 28040cd3fe87f..29d18d66f6560 100644 --- a/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_auth_decorator.h +++ b/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_analyticshub_v1_internal { @@ -236,4 +239,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_ANALYTICSHUB_V1_INTERNAL_ANALYTICS_HUB_AUTH_DECORATOR_H diff --git a/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_connection_impl.h b/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_connection_impl.h index f6649c7eccc0b..a0060132752c2 100644 --- a/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_connection_impl.h +++ b/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_logging_decorator.cc b/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_logging_decorator.cc index c71db34cb5a23..c0d6aa9eb2a4c 100644 --- a/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_logging_decorator.cc +++ b/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/bigquery/analyticshub/v1/analyticshub.proto #include "google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_logging_decorator.h" +#include "google/cloud/bigquery/analyticshub/v1/analyticshub.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_analyticshub_v1_internal { @@ -536,3 +539,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_analyticshub_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_logging_decorator.h b/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_logging_decorator.h index 7c27d2cc2518e..d641062d75c1f 100644 --- a/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_logging_decorator.h +++ b/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_analyticshub_v1_internal { @@ -236,4 +239,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_ANALYTICSHUB_V1_INTERNAL_ANALYTICS_HUB_LOGGING_DECORATOR_H diff --git a/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_metadata_decorator.cc b/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_metadata_decorator.cc index 00c50a400954f..b9b73d6a5ed26 100644 --- a/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_metadata_decorator.cc +++ b/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/bigquery/analyticshub/v1/analyticshub.proto #include "google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_metadata_decorator.h" +#include "google/cloud/bigquery/analyticshub/v1/analyticshub.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_analyticshub_v1_internal { @@ -417,3 +421,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_analyticshub_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_metadata_decorator.h b/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_metadata_decorator.h index 494d8b2c29306..3b9358436ae31 100644 --- a/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_metadata_decorator.h +++ b/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_analyticshub_v1_internal { @@ -242,4 +245,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_ANALYTICSHUB_V1_INTERNAL_ANALYTICS_HUB_METADATA_DECORATOR_H diff --git a/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_option_defaults.cc b/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_option_defaults.cc index 75da1da7b9644..9f02230aff358 100644 --- a/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_option_defaults.cc +++ b/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_option_defaults.cc @@ -43,7 +43,7 @@ Options AnalyticsHubServiceDefaultOptions(Options options) { bigquery_analyticshub_v1::AnalyticsHubServiceRetryPolicyOption>()) { options.set( bigquery_analyticshub_v1::AnalyticsHubServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_stub.cc b/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_stub.cc index 0f2e671046b5c..de898030c73d5 100644 --- a/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_stub.cc +++ b/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/bigquery/analyticshub/v1/analyticshub.proto #include "google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_stub.h" +#include "google/cloud/bigquery/analyticshub/v1/analyticshub.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_analyticshub_v1_internal { @@ -510,3 +513,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_analyticshub_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_stub.h b/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_stub.h index c77da72a36266..8f05aa0534394 100644 --- a/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_stub.h +++ b/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_ANALYTICSHUB_V1_INTERNAL_ANALYTICS_HUB_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_ANALYTICSHUB_V1_INTERNAL_ANALYTICS_HUB_STUB_H +#include "google/cloud/bigquery/analyticshub/v1/analyticshub.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_analyticshub_v1_internal { @@ -445,4 +448,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_ANALYTICSHUB_V1_INTERNAL_ANALYTICS_HUB_STUB_H diff --git a/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_stub_factory.cc b/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_stub_factory.cc index a51b6b0a8ece6..d646089a1c9f4 100644 --- a/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_stub_factory.cc +++ b/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/bigquery/analyticshub/v1/analyticshub.proto #include "google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_stub_factory.h" +#include "google/cloud/bigquery/analyticshub/v1/analyticshub.grpc.pb.h" #include "google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_auth_decorator.h" #include "google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_logging_decorator.h" #include "google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_metadata_decorator.h" @@ -28,10 +29,12 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_analyticshub_v1_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_analyticshub_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_stub_factory.h b/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_stub_factory.h index 8506c20f6bc08..766af722c7040 100644 --- a/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_stub_factory.h +++ b/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_analyticshub_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_ANALYTICSHUB_V1_INTERNAL_ANALYTICS_HUB_STUB_FACTORY_H diff --git a/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_tracing_connection.cc b/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_tracing_connection.cc index b9c7defede782..90073cfe991bb 100644 --- a/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_tracing_connection.cc +++ b/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace bigquery_analyticshub_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AnalyticsHubServiceTracingConnection::AnalyticsHubServiceTracingConnection( std::shared_ptr child) @@ -435,18 +433,14 @@ AnalyticsHubServiceTracingConnection::ApproveQueryTemplate( return internal::EndSpan(*span, child_->ApproveQueryTemplate(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAnalyticsHubServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_tracing_connection.h b/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_tracing_connection.h index 0a88db7b76706..019bfcf07147d 100644 --- a/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_tracing_connection.h +++ b/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace bigquery_analyticshub_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AnalyticsHubServiceTracingConnection : public bigquery_analyticshub_v1::AnalyticsHubServiceConnection { public: @@ -196,8 +194,6 @@ class AnalyticsHubServiceTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_tracing_stub.cc b/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_tracing_stub.cc index 50ffa4fc889c0..35ab9f9a00969 100644 --- a/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_tracing_stub.cc +++ b/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_analyticshub_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AnalyticsHubServiceTracingStub::AnalyticsHubServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -512,18 +513,14 @@ future AnalyticsHubServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAnalyticsHubServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_analyticshub_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_tracing_stub.h b/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_tracing_stub.h index d197183eeff11..4c599319f0d41 100644 --- a/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_tracing_stub.h +++ b/google/cloud/bigquery/analyticshub/v1/internal/analytics_hub_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_analyticshub_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AnalyticsHubServiceTracingStub : public AnalyticsHubServiceStub { public: ~AnalyticsHubServiceTracingStub() override = default; @@ -232,8 +233,6 @@ class AnalyticsHubServiceTracingStub : public AnalyticsHubServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -248,4 +247,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_ANALYTICSHUB_V1_INTERNAL_ANALYTICS_HUB_TRACING_STUB_H diff --git a/google/cloud/bigquery/biglake/v1/internal/metastore_auth_decorator.cc b/google/cloud/bigquery/biglake/v1/internal/metastore_auth_decorator.cc index 6766f9444a4f0..92db5f8d43252 100644 --- a/google/cloud/bigquery/biglake/v1/internal/metastore_auth_decorator.cc +++ b/google/cloud/bigquery/biglake/v1/internal/metastore_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/bigquery/biglake/v1/metastore.proto #include "google/cloud/bigquery/biglake/v1/internal/metastore_auth_decorator.h" -#include +#include "google/cloud/bigquery/biglake/v1/metastore.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_biglake_v1_internal { @@ -173,3 +176,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_biglake_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/biglake/v1/internal/metastore_auth_decorator.h b/google/cloud/bigquery/biglake/v1/internal/metastore_auth_decorator.h index c855069afc11e..c2ccb4672792e 100644 --- a/google/cloud/bigquery/biglake/v1/internal/metastore_auth_decorator.h +++ b/google/cloud/bigquery/biglake/v1/internal/metastore_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_biglake_v1_internal { @@ -124,4 +127,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGLAKE_V1_INTERNAL_METASTORE_AUTH_DECORATOR_H diff --git a/google/cloud/bigquery/biglake/v1/internal/metastore_logging_decorator.cc b/google/cloud/bigquery/biglake/v1/internal/metastore_logging_decorator.cc index 2261f80e6c736..3c1fad175269b 100644 --- a/google/cloud/bigquery/biglake/v1/internal/metastore_logging_decorator.cc +++ b/google/cloud/bigquery/biglake/v1/internal/metastore_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/bigquery/biglake/v1/metastore.proto #include "google/cloud/bigquery/biglake/v1/internal/metastore_logging_decorator.h" +#include "google/cloud/bigquery/biglake/v1/metastore.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_biglake_v1_internal { @@ -237,3 +240,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_biglake_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/biglake/v1/internal/metastore_logging_decorator.h b/google/cloud/bigquery/biglake/v1/internal/metastore_logging_decorator.h index ba902dfadc240..61f43b65dc6ed 100644 --- a/google/cloud/bigquery/biglake/v1/internal/metastore_logging_decorator.h +++ b/google/cloud/bigquery/biglake/v1/internal/metastore_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_biglake_v1_internal { @@ -124,4 +127,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGLAKE_V1_INTERNAL_METASTORE_LOGGING_DECORATOR_H diff --git a/google/cloud/bigquery/biglake/v1/internal/metastore_metadata_decorator.cc b/google/cloud/bigquery/biglake/v1/internal/metastore_metadata_decorator.cc index 3464c99390b47..f1af220946b27 100644 --- a/google/cloud/bigquery/biglake/v1/internal/metastore_metadata_decorator.cc +++ b/google/cloud/bigquery/biglake/v1/internal/metastore_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/bigquery/biglake/v1/metastore.proto #include "google/cloud/bigquery/biglake/v1/internal/metastore_metadata_decorator.h" +#include "google/cloud/bigquery/biglake/v1/metastore.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_biglake_v1_internal { @@ -201,3 +205,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_biglake_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/biglake/v1/internal/metastore_metadata_decorator.h b/google/cloud/bigquery/biglake/v1/internal/metastore_metadata_decorator.h index f09915397a47a..d03baabf91428 100644 --- a/google/cloud/bigquery/biglake/v1/internal/metastore_metadata_decorator.h +++ b/google/cloud/bigquery/biglake/v1/internal/metastore_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_biglake_v1_internal { @@ -130,4 +133,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGLAKE_V1_INTERNAL_METASTORE_METADATA_DECORATOR_H diff --git a/google/cloud/bigquery/biglake/v1/internal/metastore_option_defaults.cc b/google/cloud/bigquery/biglake/v1/internal/metastore_option_defaults.cc index 781fca3044b15..aa9cd618bbbbe 100644 --- a/google/cloud/bigquery/biglake/v1/internal/metastore_option_defaults.cc +++ b/google/cloud/bigquery/biglake/v1/internal/metastore_option_defaults.cc @@ -41,7 +41,7 @@ Options MetastoreServiceDefaultOptions(Options options) { if (!options.has()) { options.set( bigquery_biglake_v1::MetastoreServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/bigquery/biglake/v1/internal/metastore_stub.cc b/google/cloud/bigquery/biglake/v1/internal/metastore_stub.cc index 07f81506dd82b..2add2591aa5cb 100644 --- a/google/cloud/bigquery/biglake/v1/internal/metastore_stub.cc +++ b/google/cloud/bigquery/biglake/v1/internal/metastore_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/bigquery/biglake/v1/metastore.proto #include "google/cloud/bigquery/biglake/v1/internal/metastore_stub.h" +#include "google/cloud/bigquery/biglake/v1/metastore.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_biglake_v1_internal { @@ -217,3 +220,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_biglake_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/biglake/v1/internal/metastore_stub.h b/google/cloud/bigquery/biglake/v1/internal/metastore_stub.h index 5814b1b7a0513..6f2b2e7861726 100644 --- a/google/cloud/bigquery/biglake/v1/internal/metastore_stub.h +++ b/google/cloud/bigquery/biglake/v1/internal/metastore_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGLAKE_V1_INTERNAL_METASTORE_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGLAKE_V1_INTERNAL_METASTORE_STUB_H +#include "google/cloud/bigquery/biglake/v1/metastore.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_biglake_v1_internal { @@ -209,4 +212,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGLAKE_V1_INTERNAL_METASTORE_STUB_H diff --git a/google/cloud/bigquery/biglake/v1/internal/metastore_stub_factory.cc b/google/cloud/bigquery/biglake/v1/internal/metastore_stub_factory.cc index 49c09175ac5cc..0d1d9d487e752 100644 --- a/google/cloud/bigquery/biglake/v1/internal/metastore_stub_factory.cc +++ b/google/cloud/bigquery/biglake/v1/internal/metastore_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/bigquery/biglake/v1/internal/metastore_metadata_decorator.h" #include "google/cloud/bigquery/biglake/v1/internal/metastore_stub.h" #include "google/cloud/bigquery/biglake/v1/internal/metastore_tracing_stub.h" +#include "google/cloud/bigquery/biglake/v1/metastore.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_biglake_v1_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_biglake_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/biglake/v1/internal/metastore_stub_factory.h b/google/cloud/bigquery/biglake/v1/internal/metastore_stub_factory.h index 207680adfd3cb..3b6bd7ddb9760 100644 --- a/google/cloud/bigquery/biglake/v1/internal/metastore_stub_factory.h +++ b/google/cloud/bigquery/biglake/v1/internal/metastore_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_biglake_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGLAKE_V1_INTERNAL_METASTORE_STUB_FACTORY_H diff --git a/google/cloud/bigquery/biglake/v1/internal/metastore_tracing_connection.cc b/google/cloud/bigquery/biglake/v1/internal/metastore_tracing_connection.cc index cbd27bd3de629..489eab0fcac8d 100644 --- a/google/cloud/bigquery/biglake/v1/internal/metastore_tracing_connection.cc +++ b/google/cloud/bigquery/biglake/v1/internal/metastore_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace bigquery_biglake_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - MetastoreServiceTracingConnection::MetastoreServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -180,16 +178,12 @@ MetastoreServiceTracingConnection::ListTables( std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeMetastoreServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/bigquery/biglake/v1/internal/metastore_tracing_connection.h b/google/cloud/bigquery/biglake/v1/internal/metastore_tracing_connection.h index bba0c07a2a350..60c1b478f06ec 100644 --- a/google/cloud/bigquery/biglake/v1/internal/metastore_tracing_connection.h +++ b/google/cloud/bigquery/biglake/v1/internal/metastore_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace bigquery_biglake_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class MetastoreServiceTracingConnection : public bigquery_biglake_v1::MetastoreServiceConnection { public: @@ -103,8 +101,6 @@ class MetastoreServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/bigquery/biglake/v1/internal/metastore_tracing_stub.cc b/google/cloud/bigquery/biglake/v1/internal/metastore_tracing_stub.cc index cd6918c3b4adf..587ce56886f11 100644 --- a/google/cloud/bigquery/biglake/v1/internal/metastore_tracing_stub.cc +++ b/google/cloud/bigquery/biglake/v1/internal/metastore_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_biglake_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - MetastoreServiceTracingStub::MetastoreServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -215,18 +216,14 @@ MetastoreServiceTracingStub::ListTables( child_->ListTables(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeMetastoreServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_biglake_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/biglake/v1/internal/metastore_tracing_stub.h b/google/cloud/bigquery/biglake/v1/internal/metastore_tracing_stub.h index fa7cc6db3ad74..282d1b30fb721 100644 --- a/google/cloud/bigquery/biglake/v1/internal/metastore_tracing_stub.h +++ b/google/cloud/bigquery/biglake/v1/internal/metastore_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_biglake_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class MetastoreServiceTracingStub : public MetastoreServiceStub { public: ~MetastoreServiceTracingStub() override = default; @@ -121,8 +122,6 @@ class MetastoreServiceTracingStub : public MetastoreServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -137,4 +136,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGLAKE_V1_INTERNAL_METASTORE_TRACING_STUB_H diff --git a/google/cloud/bigquery/biglake/v1/metastore_connection.h b/google/cloud/bigquery/biglake/v1/metastore_connection.h index acf97201beea7..d3b2b2fb07547 100644 --- a/google/cloud/bigquery/biglake/v1/metastore_connection.h +++ b/google/cloud/bigquery/biglake/v1/metastore_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGLAKE_V1_METASTORE_CONNECTION_H #include "google/cloud/bigquery/biglake/v1/internal/metastore_retry_traits.h" +#include "google/cloud/bigquery/biglake/v1/metastore.pb.h" #include "google/cloud/bigquery/biglake/v1/metastore_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquery/biglake/v1/metastore_connection_idempotency_policy.h b/google/cloud/bigquery/biglake/v1/metastore_connection_idempotency_policy.h index 07a3e2484e814..7845dfca91250 100644 --- a/google/cloud/bigquery/biglake/v1/metastore_connection_idempotency_policy.h +++ b/google/cloud/bigquery/biglake/v1/metastore_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGLAKE_V1_METASTORE_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGLAKE_V1_METASTORE_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/bigquery/biglake/v1/metastore.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquery/bigquery_read_client.h b/google/cloud/bigquery/bigquery_read_client.h deleted file mode 100644 index afffa9ded2bf5..0000000000000 --- a/google/cloud/bigquery/bigquery_read_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/storage/v1/storage.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGQUERY_READ_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGQUERY_READ_CLIENT_H - -#include "google/cloud/bigquery/bigquery_read_connection.h" -#include "google/cloud/bigquery/storage/v1/bigquery_read_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in bigquery_storage_v1 instead of the aliases defined in -/// this namespace. -namespace bigquery { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use bigquery_storage_v1::BigQueryReadClient directly. -using ::google::cloud::bigquery_storage_v1::BigQueryReadClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGQUERY_READ_CLIENT_H diff --git a/google/cloud/bigquery/bigquery_read_connection.h b/google/cloud/bigquery/bigquery_read_connection.h deleted file mode 100644 index 6326dcfbd6369..0000000000000 --- a/google/cloud/bigquery/bigquery_read_connection.h +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/storage/v1/storage.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGQUERY_READ_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGQUERY_READ_CONNECTION_H - -#include "google/cloud/bigquery/bigquery_read_connection_idempotency_policy.h" -#include "google/cloud/bigquery/storage/v1/bigquery_read_connection.h" - -namespace google { -namespace cloud { -namespace bigquery { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use bigquery_storage_v1::MakeBigQueryReadConnection directly. -using ::google::cloud::bigquery_storage_v1::MakeBigQueryReadConnection; - -/// @deprecated Use bigquery_storage_v1::BigQueryReadConnection directly. -using ::google::cloud::bigquery_storage_v1::BigQueryReadConnection; - -/// @deprecated Use -/// bigquery_storage_v1::BigQueryReadLimitedErrorCountRetryPolicy directly. -using ::google::cloud::bigquery_storage_v1:: - BigQueryReadLimitedErrorCountRetryPolicy; - -/// @deprecated Use bigquery_storage_v1::BigQueryReadLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::bigquery_storage_v1::BigQueryReadLimitedTimeRetryPolicy; - -/// @deprecated Use bigquery_storage_v1::BigQueryReadRetryPolicy directly. -using ::google::cloud::bigquery_storage_v1::BigQueryReadRetryPolicy; - -GOOGLE_CLOUD_CPP_DEPRECATED( - "applications should not need this." - " Please file a bug at https://github.com/googleapis/google-cloud-cpp" - " if you do.") -void BigQueryReadReadRowsStreamingUpdater( - google::cloud::bigquery::storage::v1::ReadRowsResponse const& response, - google::cloud::bigquery::storage::v1::ReadRowsRequest& request); - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGQUERY_READ_CONNECTION_H diff --git a/google/cloud/bigquery/bigquery_read_connection_idempotency_policy.h b/google/cloud/bigquery/bigquery_read_connection_idempotency_policy.h deleted file mode 100644 index f3dde2491de48..0000000000000 --- a/google/cloud/bigquery/bigquery_read_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/storage/v1/storage.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGQUERY_READ_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGQUERY_READ_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/bigquery/storage/v1/bigquery_read_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace bigquery { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// bigquery_storage_v1::MakeDefaultBigQueryReadConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::bigquery_storage_v1:: - MakeDefaultBigQueryReadConnectionIdempotencyPolicy; - -/// @deprecated Use bigquery_storage_v1::BigQueryReadConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::bigquery_storage_v1:: - BigQueryReadConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGQUERY_READ_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/bigquery/bigquery_read_options.h b/google/cloud/bigquery/bigquery_read_options.h deleted file mode 100644 index 264828d43bbd3..0000000000000 --- a/google/cloud/bigquery/bigquery_read_options.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/storage/v1/storage.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGQUERY_READ_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGQUERY_READ_OPTIONS_H - -#include "google/cloud/bigquery/bigquery_read_connection.h" -#include "google/cloud/bigquery/bigquery_read_connection_idempotency_policy.h" -#include "google/cloud/bigquery/storage/v1/bigquery_read_options.h" - -namespace google { -namespace cloud { -namespace bigquery { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use bigquery_storage_v1::BigQueryReadBackoffPolicyOption -/// directly. -using ::google::cloud::bigquery_storage_v1::BigQueryReadBackoffPolicyOption; - -/// @deprecated Use -/// bigquery_storage_v1::BigQueryReadConnectionIdempotencyPolicyOption directly. -using ::google::cloud::bigquery_storage_v1:: - BigQueryReadConnectionIdempotencyPolicyOption; - -/// @deprecated Use bigquery_storage_v1::BigQueryReadPolicyOptionList directly. -using ::google::cloud::bigquery_storage_v1::BigQueryReadPolicyOptionList; - -/// @deprecated Use bigquery_storage_v1::BigQueryReadRetryPolicyOption directly. -using ::google::cloud::bigquery_storage_v1::BigQueryReadRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGQUERY_READ_OPTIONS_H diff --git a/google/cloud/bigquery/bigquery_write_client.h b/google/cloud/bigquery/bigquery_write_client.h deleted file mode 100644 index b28e7676cbe91..0000000000000 --- a/google/cloud/bigquery/bigquery_write_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/storage/v1/storage.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGQUERY_WRITE_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGQUERY_WRITE_CLIENT_H - -#include "google/cloud/bigquery/bigquery_write_connection.h" -#include "google/cloud/bigquery/storage/v1/bigquery_write_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in bigquery_storage_v1 instead of the aliases defined in -/// this namespace. -namespace bigquery { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use bigquery_storage_v1::BigQueryWriteClient directly. -using ::google::cloud::bigquery_storage_v1::BigQueryWriteClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGQUERY_WRITE_CLIENT_H diff --git a/google/cloud/bigquery/bigquery_write_connection.h b/google/cloud/bigquery/bigquery_write_connection.h deleted file mode 100644 index 29be103d41960..0000000000000 --- a/google/cloud/bigquery/bigquery_write_connection.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/storage/v1/storage.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGQUERY_WRITE_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGQUERY_WRITE_CONNECTION_H - -#include "google/cloud/bigquery/bigquery_write_connection_idempotency_policy.h" -#include "google/cloud/bigquery/storage/v1/bigquery_write_connection.h" - -namespace google { -namespace cloud { -namespace bigquery { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use bigquery_storage_v1::MakeBigQueryWriteConnection directly. -using ::google::cloud::bigquery_storage_v1::MakeBigQueryWriteConnection; - -/// @deprecated Use bigquery_storage_v1::BigQueryWriteConnection directly. -using ::google::cloud::bigquery_storage_v1::BigQueryWriteConnection; - -/// @deprecated Use -/// bigquery_storage_v1::BigQueryWriteLimitedErrorCountRetryPolicy directly. -using ::google::cloud::bigquery_storage_v1:: - BigQueryWriteLimitedErrorCountRetryPolicy; - -/// @deprecated Use bigquery_storage_v1::BigQueryWriteLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::bigquery_storage_v1::BigQueryWriteLimitedTimeRetryPolicy; - -/// @deprecated Use bigquery_storage_v1::BigQueryWriteRetryPolicy directly. -using ::google::cloud::bigquery_storage_v1::BigQueryWriteRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGQUERY_WRITE_CONNECTION_H diff --git a/google/cloud/bigquery/bigquery_write_connection_idempotency_policy.h b/google/cloud/bigquery/bigquery_write_connection_idempotency_policy.h deleted file mode 100644 index e13b586bd34d4..0000000000000 --- a/google/cloud/bigquery/bigquery_write_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/storage/v1/storage.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGQUERY_WRITE_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGQUERY_WRITE_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/bigquery/storage/v1/bigquery_write_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace bigquery { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// bigquery_storage_v1::MakeDefaultBigQueryWriteConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::bigquery_storage_v1:: - MakeDefaultBigQueryWriteConnectionIdempotencyPolicy; - -/// @deprecated Use -/// bigquery_storage_v1::BigQueryWriteConnectionIdempotencyPolicy directly. -using ::google::cloud::bigquery_storage_v1:: - BigQueryWriteConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGQUERY_WRITE_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/bigquery/bigquery_write_options.h b/google/cloud/bigquery/bigquery_write_options.h deleted file mode 100644 index 7f30a3b330713..0000000000000 --- a/google/cloud/bigquery/bigquery_write_options.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/storage/v1/storage.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGQUERY_WRITE_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGQUERY_WRITE_OPTIONS_H - -#include "google/cloud/bigquery/bigquery_write_connection.h" -#include "google/cloud/bigquery/bigquery_write_connection_idempotency_policy.h" -#include "google/cloud/bigquery/storage/v1/bigquery_write_options.h" - -namespace google { -namespace cloud { -namespace bigquery { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use bigquery_storage_v1::BigQueryWriteBackoffPolicyOption -/// directly. -using ::google::cloud::bigquery_storage_v1::BigQueryWriteBackoffPolicyOption; - -/// @deprecated Use -/// bigquery_storage_v1::BigQueryWriteConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::bigquery_storage_v1:: - BigQueryWriteConnectionIdempotencyPolicyOption; - -/// @deprecated Use bigquery_storage_v1::BigQueryWritePolicyOptionList directly. -using ::google::cloud::bigquery_storage_v1::BigQueryWritePolicyOptionList; - -/// @deprecated Use bigquery_storage_v1::BigQueryWriteRetryPolicyOption -/// directly. -using ::google::cloud::bigquery_storage_v1::BigQueryWriteRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_BIGQUERY_WRITE_OPTIONS_H diff --git a/google/cloud/bigquery/connection/v1/connection_connection.h b/google/cloud/bigquery/connection/v1/connection_connection.h index cacdee9d8391c..aec88ed03c5f1 100644 --- a/google/cloud/bigquery/connection/v1/connection_connection.h +++ b/google/cloud/bigquery/connection/v1/connection_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_CONNECTION_V1_CONNECTION_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_CONNECTION_V1_CONNECTION_CONNECTION_H +#include "google/cloud/bigquery/connection/v1/connection.pb.h" #include "google/cloud/bigquery/connection/v1/connection_connection_idempotency_policy.h" #include "google/cloud/bigquery/connection/v1/internal/connection_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquery/connection/v1/connection_connection_idempotency_policy.h b/google/cloud/bigquery/connection/v1/connection_connection_idempotency_policy.h index b540df89661eb..2fc00302485a6 100644 --- a/google/cloud/bigquery/connection/v1/connection_connection_idempotency_policy.h +++ b/google/cloud/bigquery/connection/v1/connection_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_CONNECTION_V1_CONNECTION_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_CONNECTION_V1_CONNECTION_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/bigquery/connection/v1/connection.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquery/connection/v1/internal/connection_auth_decorator.cc b/google/cloud/bigquery/connection/v1/internal/connection_auth_decorator.cc index c1bcdf88a1a33..49b290f087980 100644 --- a/google/cloud/bigquery/connection/v1/internal/connection_auth_decorator.cc +++ b/google/cloud/bigquery/connection/v1/internal/connection_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/bigquery/connection/v1/connection.proto #include "google/cloud/bigquery/connection/v1/internal/connection_auth_decorator.h" -#include +#include "google/cloud/bigquery/connection/v1/connection.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_connection_v1_internal { @@ -109,3 +112,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_connection_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/connection/v1/internal/connection_auth_decorator.h b/google/cloud/bigquery/connection/v1/internal/connection_auth_decorator.h index 322744953d67e..a7339b7e732f9 100644 --- a/google/cloud/bigquery/connection/v1/internal/connection_auth_decorator.h +++ b/google/cloud/bigquery/connection/v1/internal/connection_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_connection_v1_internal { @@ -88,4 +91,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_CONNECTION_V1_INTERNAL_CONNECTION_AUTH_DECORATOR_H diff --git a/google/cloud/bigquery/connection/v1/internal/connection_logging_decorator.cc b/google/cloud/bigquery/connection/v1/internal/connection_logging_decorator.cc index 5f2fe324473d5..d2118aae96118 100644 --- a/google/cloud/bigquery/connection/v1/internal/connection_logging_decorator.cc +++ b/google/cloud/bigquery/connection/v1/internal/connection_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/bigquery/connection/v1/connection.proto #include "google/cloud/bigquery/connection/v1/internal/connection_logging_decorator.h" +#include "google/cloud/bigquery/connection/v1/connection.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_connection_v1_internal { @@ -144,3 +147,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_connection_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/connection/v1/internal/connection_logging_decorator.h b/google/cloud/bigquery/connection/v1/internal/connection_logging_decorator.h index 3c14d3eed0f24..473fdab95a19f 100644 --- a/google/cloud/bigquery/connection/v1/internal/connection_logging_decorator.h +++ b/google/cloud/bigquery/connection/v1/internal/connection_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_connection_v1_internal { @@ -88,4 +91,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_CONNECTION_V1_INTERNAL_CONNECTION_LOGGING_DECORATOR_H diff --git a/google/cloud/bigquery/connection/v1/internal/connection_metadata_decorator.cc b/google/cloud/bigquery/connection/v1/internal/connection_metadata_decorator.cc index 0e4fe466fe728..9b8afe9123b5c 100644 --- a/google/cloud/bigquery/connection/v1/internal/connection_metadata_decorator.cc +++ b/google/cloud/bigquery/connection/v1/internal/connection_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/bigquery/connection/v1/connection.proto #include "google/cloud/bigquery/connection/v1/internal/connection_metadata_decorator.h" +#include "google/cloud/bigquery/connection/v1/connection.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_connection_v1_internal { @@ -138,3 +142,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_connection_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/connection/v1/internal/connection_metadata_decorator.h b/google/cloud/bigquery/connection/v1/internal/connection_metadata_decorator.h index 5621123f46782..77eca89dcf4f2 100644 --- a/google/cloud/bigquery/connection/v1/internal/connection_metadata_decorator.h +++ b/google/cloud/bigquery/connection/v1/internal/connection_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_connection_v1_internal { @@ -94,4 +97,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_CONNECTION_V1_INTERNAL_CONNECTION_METADATA_DECORATOR_H diff --git a/google/cloud/bigquery/connection/v1/internal/connection_option_defaults.cc b/google/cloud/bigquery/connection/v1/internal/connection_option_defaults.cc index 646dc5dcc8a8d..197bb00314073 100644 --- a/google/cloud/bigquery/connection/v1/internal/connection_option_defaults.cc +++ b/google/cloud/bigquery/connection/v1/internal/connection_option_defaults.cc @@ -44,7 +44,7 @@ Options ConnectionServiceDefaultOptions(Options options) { .has()) { options.set( bigquery_connection_v1::ConnectionServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/bigquery/connection/v1/internal/connection_stub.cc b/google/cloud/bigquery/connection/v1/internal/connection_stub.cc index be06b6cade127..8404708c78429 100644 --- a/google/cloud/bigquery/connection/v1/internal/connection_stub.cc +++ b/google/cloud/bigquery/connection/v1/internal/connection_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/bigquery/connection/v1/connection.proto #include "google/cloud/bigquery/connection/v1/internal/connection_stub.h" +#include "google/cloud/bigquery/connection/v1/connection.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_connection_v1_internal { @@ -132,3 +135,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_connection_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/connection/v1/internal/connection_stub.h b/google/cloud/bigquery/connection/v1/internal/connection_stub.h index 75f9c02c1dcd3..02e8d99294d71 100644 --- a/google/cloud/bigquery/connection/v1/internal/connection_stub.h +++ b/google/cloud/bigquery/connection/v1/internal/connection_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_CONNECTION_V1_INTERNAL_CONNECTION_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_CONNECTION_V1_INTERNAL_CONNECTION_STUB_H +#include "google/cloud/bigquery/connection/v1/connection.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_connection_v1_internal { @@ -138,4 +141,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_CONNECTION_V1_INTERNAL_CONNECTION_STUB_H diff --git a/google/cloud/bigquery/connection/v1/internal/connection_stub_factory.cc b/google/cloud/bigquery/connection/v1/internal/connection_stub_factory.cc index bc6b52f89f079..b7e8c25f871c8 100644 --- a/google/cloud/bigquery/connection/v1/internal/connection_stub_factory.cc +++ b/google/cloud/bigquery/connection/v1/internal/connection_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/bigquery/connection/v1/connection.proto #include "google/cloud/bigquery/connection/v1/internal/connection_stub_factory.h" +#include "google/cloud/bigquery/connection/v1/connection.grpc.pb.h" #include "google/cloud/bigquery/connection/v1/internal/connection_auth_decorator.h" #include "google/cloud/bigquery/connection/v1/internal/connection_logging_decorator.h" #include "google/cloud/bigquery/connection/v1/internal/connection_metadata_decorator.h" @@ -28,10 +29,12 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_connection_v1_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_connection_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/connection/v1/internal/connection_stub_factory.h b/google/cloud/bigquery/connection/v1/internal/connection_stub_factory.h index abbf7dbbe07a6..fc100768a1677 100644 --- a/google/cloud/bigquery/connection/v1/internal/connection_stub_factory.h +++ b/google/cloud/bigquery/connection/v1/internal/connection_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_connection_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_CONNECTION_V1_INTERNAL_CONNECTION_STUB_FACTORY_H diff --git a/google/cloud/bigquery/connection/v1/internal/connection_tracing_connection.cc b/google/cloud/bigquery/connection/v1/internal/connection_tracing_connection.cc index 965a68ca8e48b..acce93c68805d 100644 --- a/google/cloud/bigquery/connection/v1/internal/connection_tracing_connection.cc +++ b/google/cloud/bigquery/connection/v1/internal/connection_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace bigquery_connection_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ConnectionServiceTracingConnection::ConnectionServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -112,17 +110,13 @@ ConnectionServiceTracingConnection::TestIamPermissions( return internal::EndSpan(*span, child_->TestIamPermissions(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeConnectionServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/bigquery/connection/v1/internal/connection_tracing_connection.h b/google/cloud/bigquery/connection/v1/internal/connection_tracing_connection.h index 98501492107d4..1a747a000ebcc 100644 --- a/google/cloud/bigquery/connection/v1/internal/connection_tracing_connection.h +++ b/google/cloud/bigquery/connection/v1/internal/connection_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace bigquery_connection_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ConnectionServiceTracingConnection : public bigquery_connection_v1::ConnectionServiceConnection { public: @@ -77,8 +75,6 @@ class ConnectionServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/bigquery/connection/v1/internal/connection_tracing_stub.cc b/google/cloud/bigquery/connection/v1/internal/connection_tracing_stub.cc index 3534c059d3e29..ba7e075ea4ecf 100644 --- a/google/cloud/bigquery/connection/v1/internal/connection_tracing_stub.cc +++ b/google/cloud/bigquery/connection/v1/internal/connection_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_connection_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ConnectionServiceTracingStub::ConnectionServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -135,18 +136,14 @@ ConnectionServiceTracingStub::TestIamPermissions( context, *span, child_->TestIamPermissions(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeConnectionServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_connection_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/connection/v1/internal/connection_tracing_stub.h b/google/cloud/bigquery/connection/v1/internal/connection_tracing_stub.h index 79215354bf4fb..a761d1f79cc1a 100644 --- a/google/cloud/bigquery/connection/v1/internal/connection_tracing_stub.h +++ b/google/cloud/bigquery/connection/v1/internal/connection_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_connection_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ConnectionServiceTracingStub : public ConnectionServiceStub { public: ~ConnectionServiceTracingStub() override = default; @@ -85,8 +86,6 @@ class ConnectionServiceTracingStub : public ConnectionServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -101,4 +100,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_CONNECTION_V1_INTERNAL_CONNECTION_TRACING_STUB_H diff --git a/google/cloud/bigquery/connection_client.h b/google/cloud/bigquery/connection_client.h deleted file mode 100644 index 21f69cb895166..0000000000000 --- a/google/cloud/bigquery/connection_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/connection/v1/connection.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_CONNECTION_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_CONNECTION_CLIENT_H - -#include "google/cloud/bigquery/connection/v1/connection_client.h" -#include "google/cloud/bigquery/connection_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in bigquery_connection_v1 instead of the aliases defined -/// in this namespace. -namespace bigquery { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use bigquery_connection_v1::ConnectionServiceClient directly. -using ::google::cloud::bigquery_connection_v1::ConnectionServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_CONNECTION_CLIENT_H diff --git a/google/cloud/bigquery/connection_connection.h b/google/cloud/bigquery/connection_connection.h deleted file mode 100644 index 2c73c22664d3a..0000000000000 --- a/google/cloud/bigquery/connection_connection.h +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/connection/v1/connection.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_CONNECTION_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_CONNECTION_CONNECTION_H - -#include "google/cloud/bigquery/connection/v1/connection_connection.h" -#include "google/cloud/bigquery/connection_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace bigquery { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use bigquery_connection_v1::MakeConnectionServiceConnection -/// directly. -using ::google::cloud::bigquery_connection_v1::MakeConnectionServiceConnection; - -/// @deprecated Use bigquery_connection_v1::ConnectionServiceConnection -/// directly. -using ::google::cloud::bigquery_connection_v1::ConnectionServiceConnection; - -/// @deprecated Use -/// bigquery_connection_v1::ConnectionServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::bigquery_connection_v1:: - ConnectionServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use -/// bigquery_connection_v1::ConnectionServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::bigquery_connection_v1:: - ConnectionServiceLimitedTimeRetryPolicy; - -/// @deprecated Use bigquery_connection_v1::ConnectionServiceRetryPolicy -/// directly. -using ::google::cloud::bigquery_connection_v1::ConnectionServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_CONNECTION_CONNECTION_H diff --git a/google/cloud/bigquery/connection_connection_idempotency_policy.h b/google/cloud/bigquery/connection_connection_idempotency_policy.h deleted file mode 100644 index 79752b579c3d1..0000000000000 --- a/google/cloud/bigquery/connection_connection_idempotency_policy.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/connection/v1/connection.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_CONNECTION_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_CONNECTION_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/bigquery/connection/v1/connection_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace bigquery { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// bigquery_connection_v1::MakeDefaultConnectionServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::bigquery_connection_v1:: - MakeDefaultConnectionServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// bigquery_connection_v1::ConnectionServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::bigquery_connection_v1:: - ConnectionServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_CONNECTION_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/bigquery/connection_options.h b/google/cloud/bigquery/connection_options.h deleted file mode 100644 index c580429e52d15..0000000000000 --- a/google/cloud/bigquery/connection_options.h +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/connection/v1/connection.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_CONNECTION_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_CONNECTION_OPTIONS_H - -#include "google/cloud/bigquery/connection/v1/connection_options.h" -#include "google/cloud/bigquery/connection_connection.h" -#include "google/cloud/bigquery/connection_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace bigquery { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use bigquery_connection_v1::ConnectionServiceBackoffPolicyOption -/// directly. -using ::google::cloud::bigquery_connection_v1:: - ConnectionServiceBackoffPolicyOption; - -/// @deprecated Use -/// bigquery_connection_v1::ConnectionServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::bigquery_connection_v1:: - ConnectionServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use bigquery_connection_v1::ConnectionServicePolicyOptionList -/// directly. -using ::google::cloud::bigquery_connection_v1:: - ConnectionServicePolicyOptionList; - -/// @deprecated Use bigquery_connection_v1::ConnectionServiceRetryPolicyOption -/// directly. -using ::google::cloud::bigquery_connection_v1:: - ConnectionServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_CONNECTION_OPTIONS_H diff --git a/google/cloud/bigquery/data_policy_client.h b/google/cloud/bigquery/data_policy_client.h deleted file mode 100644 index c0d2074140d9a..0000000000000 --- a/google/cloud/bigquery/data_policy_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/datapolicies/v1/datapolicy.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATA_POLICY_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATA_POLICY_CLIENT_H - -#include "google/cloud/bigquery/data_policy_connection.h" -#include "google/cloud/bigquery/datapolicies/v1/data_policy_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in bigquery_datapolicies_v1 instead of the aliases defined -/// in this namespace. -namespace bigquery { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use bigquery_datapolicies_v1::DataPolicyServiceClient directly. -using ::google::cloud::bigquery_datapolicies_v1::DataPolicyServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATA_POLICY_CLIENT_H diff --git a/google/cloud/bigquery/data_policy_connection.h b/google/cloud/bigquery/data_policy_connection.h deleted file mode 100644 index aa62574b3a4ca..0000000000000 --- a/google/cloud/bigquery/data_policy_connection.h +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/datapolicies/v1/datapolicy.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATA_POLICY_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATA_POLICY_CONNECTION_H - -#include "google/cloud/bigquery/data_policy_connection_idempotency_policy.h" -#include "google/cloud/bigquery/datapolicies/v1/data_policy_connection.h" - -namespace google { -namespace cloud { -namespace bigquery { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use bigquery_datapolicies_v1::MakeDataPolicyServiceConnection -/// directly. -using ::google::cloud::bigquery_datapolicies_v1:: - MakeDataPolicyServiceConnection; - -/// @deprecated Use bigquery_datapolicies_v1::DataPolicyServiceConnection -/// directly. -using ::google::cloud::bigquery_datapolicies_v1::DataPolicyServiceConnection; - -/// @deprecated Use -/// bigquery_datapolicies_v1::DataPolicyServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::bigquery_datapolicies_v1:: - DataPolicyServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use -/// bigquery_datapolicies_v1::DataPolicyServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::bigquery_datapolicies_v1:: - DataPolicyServiceLimitedTimeRetryPolicy; - -/// @deprecated Use bigquery_datapolicies_v1::DataPolicyServiceRetryPolicy -/// directly. -using ::google::cloud::bigquery_datapolicies_v1::DataPolicyServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATA_POLICY_CONNECTION_H diff --git a/google/cloud/bigquery/data_policy_connection_idempotency_policy.h b/google/cloud/bigquery/data_policy_connection_idempotency_policy.h deleted file mode 100644 index 7fef76f061bb9..0000000000000 --- a/google/cloud/bigquery/data_policy_connection_idempotency_policy.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/datapolicies/v1/datapolicy.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATA_POLICY_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATA_POLICY_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/bigquery/datapolicies/v1/data_policy_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace bigquery { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// bigquery_datapolicies_v1::MakeDefaultDataPolicyServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::bigquery_datapolicies_v1:: - MakeDefaultDataPolicyServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// bigquery_datapolicies_v1::DataPolicyServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::bigquery_datapolicies_v1:: - DataPolicyServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATA_POLICY_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/bigquery/data_policy_options.h b/google/cloud/bigquery/data_policy_options.h deleted file mode 100644 index 4bab36ae5d024..0000000000000 --- a/google/cloud/bigquery/data_policy_options.h +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/datapolicies/v1/datapolicy.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATA_POLICY_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATA_POLICY_OPTIONS_H - -#include "google/cloud/bigquery/data_policy_connection.h" -#include "google/cloud/bigquery/data_policy_connection_idempotency_policy.h" -#include "google/cloud/bigquery/datapolicies/v1/data_policy_options.h" - -namespace google { -namespace cloud { -namespace bigquery { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// bigquery_datapolicies_v1::DataPolicyServiceBackoffPolicyOption directly. -using ::google::cloud::bigquery_datapolicies_v1:: - DataPolicyServiceBackoffPolicyOption; - -/// @deprecated Use -/// bigquery_datapolicies_v1::DataPolicyServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::bigquery_datapolicies_v1:: - DataPolicyServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use bigquery_datapolicies_v1::DataPolicyServicePolicyOptionList -/// directly. -using ::google::cloud::bigquery_datapolicies_v1:: - DataPolicyServicePolicyOptionList; - -/// @deprecated Use bigquery_datapolicies_v1::DataPolicyServiceRetryPolicyOption -/// directly. -using ::google::cloud::bigquery_datapolicies_v1:: - DataPolicyServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATA_POLICY_OPTIONS_H diff --git a/google/cloud/bigquery/data_transfer_client.h b/google/cloud/bigquery/data_transfer_client.h deleted file mode 100644 index 36d8f6b559544..0000000000000 --- a/google/cloud/bigquery/data_transfer_client.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATA_TRANSFER_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATA_TRANSFER_CLIENT_H - -#include "google/cloud/bigquery/data_transfer_connection.h" -#include "google/cloud/bigquery/datatransfer/v1/data_transfer_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in bigquery_datatransfer_v1 instead of the aliases defined -/// in this namespace. -namespace bigquery { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use bigquery_datatransfer_v1::DataTransferServiceClient -/// directly. -using ::google::cloud::bigquery_datatransfer_v1::DataTransferServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATA_TRANSFER_CLIENT_H diff --git a/google/cloud/bigquery/data_transfer_connection.h b/google/cloud/bigquery/data_transfer_connection.h deleted file mode 100644 index 77ae9f1b1c8d8..0000000000000 --- a/google/cloud/bigquery/data_transfer_connection.h +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATA_TRANSFER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATA_TRANSFER_CONNECTION_H - -#include "google/cloud/bigquery/data_transfer_connection_idempotency_policy.h" -#include "google/cloud/bigquery/datatransfer/v1/data_transfer_connection.h" - -namespace google { -namespace cloud { -namespace bigquery { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use bigquery_datatransfer_v1::MakeDataTransferServiceConnection -/// directly. -using ::google::cloud::bigquery_datatransfer_v1:: - MakeDataTransferServiceConnection; - -/// @deprecated Use bigquery_datatransfer_v1::DataTransferServiceConnection -/// directly. -using ::google::cloud::bigquery_datatransfer_v1::DataTransferServiceConnection; - -/// @deprecated Use -/// bigquery_datatransfer_v1::DataTransferServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::bigquery_datatransfer_v1:: - DataTransferServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use -/// bigquery_datatransfer_v1::DataTransferServiceLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::bigquery_datatransfer_v1:: - DataTransferServiceLimitedTimeRetryPolicy; - -/// @deprecated Use bigquery_datatransfer_v1::DataTransferServiceRetryPolicy -/// directly. -using ::google::cloud::bigquery_datatransfer_v1::DataTransferServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATA_TRANSFER_CONNECTION_H diff --git a/google/cloud/bigquery/data_transfer_connection_idempotency_policy.h b/google/cloud/bigquery/data_transfer_connection_idempotency_policy.h deleted file mode 100644 index f84d3426b2e4e..0000000000000 --- a/google/cloud/bigquery/data_transfer_connection_idempotency_policy.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATA_TRANSFER_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATA_TRANSFER_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/bigquery/datatransfer/v1/data_transfer_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace bigquery { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// bigquery_datatransfer_v1::MakeDefaultDataTransferServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::bigquery_datatransfer_v1:: - MakeDefaultDataTransferServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// bigquery_datatransfer_v1::DataTransferServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::bigquery_datatransfer_v1:: - DataTransferServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATA_TRANSFER_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/bigquery/data_transfer_options.h b/google/cloud/bigquery/data_transfer_options.h deleted file mode 100644 index d930f6ff84c61..0000000000000 --- a/google/cloud/bigquery/data_transfer_options.h +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATA_TRANSFER_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATA_TRANSFER_OPTIONS_H - -#include "google/cloud/bigquery/data_transfer_connection.h" -#include "google/cloud/bigquery/data_transfer_connection_idempotency_policy.h" -#include "google/cloud/bigquery/datatransfer/v1/data_transfer_options.h" - -namespace google { -namespace cloud { -namespace bigquery { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// bigquery_datatransfer_v1::DataTransferServiceBackoffPolicyOption directly. -using ::google::cloud::bigquery_datatransfer_v1:: - DataTransferServiceBackoffPolicyOption; - -/// @deprecated Use -/// bigquery_datatransfer_v1::DataTransferServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::bigquery_datatransfer_v1:: - DataTransferServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use -/// bigquery_datatransfer_v1::DataTransferServicePolicyOptionList directly. -using ::google::cloud::bigquery_datatransfer_v1:: - DataTransferServicePolicyOptionList; - -/// @deprecated Use -/// bigquery_datatransfer_v1::DataTransferServiceRetryPolicyOption directly. -using ::google::cloud::bigquery_datatransfer_v1:: - DataTransferServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATA_TRANSFER_OPTIONS_H diff --git a/google/cloud/bigquery/datapolicies/v1/data_policy_connection.h b/google/cloud/bigquery/datapolicies/v1/data_policy_connection.h index 8adcf71c164fc..80df8989be529 100644 --- a/google/cloud/bigquery/datapolicies/v1/data_policy_connection.h +++ b/google/cloud/bigquery/datapolicies/v1/data_policy_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATAPOLICIES_V1_DATA_POLICY_CONNECTION_H #include "google/cloud/bigquery/datapolicies/v1/data_policy_connection_idempotency_policy.h" +#include "google/cloud/bigquery/datapolicies/v1/datapolicy.pb.h" #include "google/cloud/bigquery/datapolicies/v1/internal/data_policy_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquery/datapolicies/v1/data_policy_connection_idempotency_policy.h b/google/cloud/bigquery/datapolicies/v1/data_policy_connection_idempotency_policy.h index a6fbcd5d8265e..56ebe43a63d41 100644 --- a/google/cloud/bigquery/datapolicies/v1/data_policy_connection_idempotency_policy.h +++ b/google/cloud/bigquery/datapolicies/v1/data_policy_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATAPOLICIES_V1_DATA_POLICY_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATAPOLICIES_V1_DATA_POLICY_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/bigquery/datapolicies/v1/datapolicy.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquery/datapolicies/v1/internal/data_policy_auth_decorator.cc b/google/cloud/bigquery/datapolicies/v1/internal/data_policy_auth_decorator.cc index 50dc6ba1f08c1..4b07bac1a6a24 100644 --- a/google/cloud/bigquery/datapolicies/v1/internal/data_policy_auth_decorator.cc +++ b/google/cloud/bigquery/datapolicies/v1/internal/data_policy_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/bigquery/datapolicies/v1/datapolicy.proto #include "google/cloud/bigquery/datapolicies/v1/internal/data_policy_auth_decorator.h" -#include +#include "google/cloud/bigquery/datapolicies/v1/datapolicy.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datapolicies_v1_internal { @@ -119,3 +122,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_datapolicies_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/datapolicies/v1/internal/data_policy_auth_decorator.h b/google/cloud/bigquery/datapolicies/v1/internal/data_policy_auth_decorator.h index 880297a3342c2..f005ded4f74d4 100644 --- a/google/cloud/bigquery/datapolicies/v1/internal/data_policy_auth_decorator.h +++ b/google/cloud/bigquery/datapolicies/v1/internal/data_policy_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datapolicies_v1_internal { @@ -94,4 +97,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATAPOLICIES_V1_INTERNAL_DATA_POLICY_AUTH_DECORATOR_H diff --git a/google/cloud/bigquery/datapolicies/v1/internal/data_policy_logging_decorator.cc b/google/cloud/bigquery/datapolicies/v1/internal/data_policy_logging_decorator.cc index 6e5138ae2e73d..280dd35540e77 100644 --- a/google/cloud/bigquery/datapolicies/v1/internal/data_policy_logging_decorator.cc +++ b/google/cloud/bigquery/datapolicies/v1/internal/data_policy_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/bigquery/datapolicies/v1/datapolicy.proto #include "google/cloud/bigquery/datapolicies/v1/internal/data_policy_logging_decorator.h" +#include "google/cloud/bigquery/datapolicies/v1/datapolicy.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datapolicies_v1_internal { @@ -157,3 +160,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_datapolicies_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/datapolicies/v1/internal/data_policy_logging_decorator.h b/google/cloud/bigquery/datapolicies/v1/internal/data_policy_logging_decorator.h index 1fc4870575482..3ad98f02ff574 100644 --- a/google/cloud/bigquery/datapolicies/v1/internal/data_policy_logging_decorator.h +++ b/google/cloud/bigquery/datapolicies/v1/internal/data_policy_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datapolicies_v1_internal { @@ -94,4 +97,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATAPOLICIES_V1_INTERNAL_DATA_POLICY_LOGGING_DECORATOR_H diff --git a/google/cloud/bigquery/datapolicies/v1/internal/data_policy_metadata_decorator.cc b/google/cloud/bigquery/datapolicies/v1/internal/data_policy_metadata_decorator.cc index 4d1e06b35dfc0..711d7d902d8e3 100644 --- a/google/cloud/bigquery/datapolicies/v1/internal/data_policy_metadata_decorator.cc +++ b/google/cloud/bigquery/datapolicies/v1/internal/data_policy_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/bigquery/datapolicies/v1/datapolicy.proto #include "google/cloud/bigquery/datapolicies/v1/internal/data_policy_metadata_decorator.h" +#include "google/cloud/bigquery/datapolicies/v1/datapolicy.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datapolicies_v1_internal { @@ -149,3 +153,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_datapolicies_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/datapolicies/v1/internal/data_policy_metadata_decorator.h b/google/cloud/bigquery/datapolicies/v1/internal/data_policy_metadata_decorator.h index 767cdd1249088..34fe630b2160e 100644 --- a/google/cloud/bigquery/datapolicies/v1/internal/data_policy_metadata_decorator.h +++ b/google/cloud/bigquery/datapolicies/v1/internal/data_policy_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datapolicies_v1_internal { @@ -100,4 +103,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATAPOLICIES_V1_INTERNAL_DATA_POLICY_METADATA_DECORATOR_H diff --git a/google/cloud/bigquery/datapolicies/v1/internal/data_policy_option_defaults.cc b/google/cloud/bigquery/datapolicies/v1/internal/data_policy_option_defaults.cc index e04f826e8dc36..d8f0d9fd14c52 100644 --- a/google/cloud/bigquery/datapolicies/v1/internal/data_policy_option_defaults.cc +++ b/google/cloud/bigquery/datapolicies/v1/internal/data_policy_option_defaults.cc @@ -43,7 +43,7 @@ Options DataPolicyServiceDefaultOptions(Options options) { bigquery_datapolicies_v1::DataPolicyServiceRetryPolicyOption>()) { options.set( bigquery_datapolicies_v1::DataPolicyServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/bigquery/datapolicies/v1/internal/data_policy_stub.cc b/google/cloud/bigquery/datapolicies/v1/internal/data_policy_stub.cc index 32358b412489a..28b8a90e79e72 100644 --- a/google/cloud/bigquery/datapolicies/v1/internal/data_policy_stub.cc +++ b/google/cloud/bigquery/datapolicies/v1/internal/data_policy_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/bigquery/datapolicies/v1/datapolicy.proto #include "google/cloud/bigquery/datapolicies/v1/internal/data_policy_stub.h" +#include "google/cloud/bigquery/datapolicies/v1/datapolicy.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datapolicies_v1_internal { @@ -145,3 +148,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_datapolicies_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/datapolicies/v1/internal/data_policy_stub.h b/google/cloud/bigquery/datapolicies/v1/internal/data_policy_stub.h index 63b9ac3e16d86..6e285cd9df23f 100644 --- a/google/cloud/bigquery/datapolicies/v1/internal/data_policy_stub.h +++ b/google/cloud/bigquery/datapolicies/v1/internal/data_policy_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATAPOLICIES_V1_INTERNAL_DATA_POLICY_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATAPOLICIES_V1_INTERNAL_DATA_POLICY_STUB_H +#include "google/cloud/bigquery/datapolicies/v1/datapolicy.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datapolicies_v1_internal { @@ -150,4 +153,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATAPOLICIES_V1_INTERNAL_DATA_POLICY_STUB_H diff --git a/google/cloud/bigquery/datapolicies/v1/internal/data_policy_stub_factory.cc b/google/cloud/bigquery/datapolicies/v1/internal/data_policy_stub_factory.cc index 764d3db6c5a99..80f7c530f0a26 100644 --- a/google/cloud/bigquery/datapolicies/v1/internal/data_policy_stub_factory.cc +++ b/google/cloud/bigquery/datapolicies/v1/internal/data_policy_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/bigquery/datapolicies/v1/datapolicy.proto #include "google/cloud/bigquery/datapolicies/v1/internal/data_policy_stub_factory.h" +#include "google/cloud/bigquery/datapolicies/v1/datapolicy.grpc.pb.h" #include "google/cloud/bigquery/datapolicies/v1/internal/data_policy_auth_decorator.h" #include "google/cloud/bigquery/datapolicies/v1/internal/data_policy_logging_decorator.h" #include "google/cloud/bigquery/datapolicies/v1/internal/data_policy_metadata_decorator.h" @@ -28,10 +29,12 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datapolicies_v1_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_datapolicies_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/datapolicies/v1/internal/data_policy_stub_factory.h b/google/cloud/bigquery/datapolicies/v1/internal/data_policy_stub_factory.h index a28f54cd1cb93..e1d5f13d99cd2 100644 --- a/google/cloud/bigquery/datapolicies/v1/internal/data_policy_stub_factory.h +++ b/google/cloud/bigquery/datapolicies/v1/internal/data_policy_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datapolicies_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATAPOLICIES_V1_INTERNAL_DATA_POLICY_STUB_FACTORY_H diff --git a/google/cloud/bigquery/datapolicies/v1/internal/data_policy_tracing_connection.cc b/google/cloud/bigquery/datapolicies/v1/internal/data_policy_tracing_connection.cc index ad8523acd87af..948698e1755c7 100644 --- a/google/cloud/bigquery/datapolicies/v1/internal/data_policy_tracing_connection.cc +++ b/google/cloud/bigquery/datapolicies/v1/internal/data_policy_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace bigquery_datapolicies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DataPolicyServiceTracingConnection::DataPolicyServiceTracingConnection( std::shared_ptr child) @@ -129,18 +127,14 @@ DataPolicyServiceTracingConnection::TestIamPermissions( return internal::EndSpan(*span, child_->TestIamPermissions(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDataPolicyServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/bigquery/datapolicies/v1/internal/data_policy_tracing_connection.h b/google/cloud/bigquery/datapolicies/v1/internal/data_policy_tracing_connection.h index a1cdb888235ba..f1ae5cbd48950 100644 --- a/google/cloud/bigquery/datapolicies/v1/internal/data_policy_tracing_connection.h +++ b/google/cloud/bigquery/datapolicies/v1/internal/data_policy_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace bigquery_datapolicies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DataPolicyServiceTracingConnection : public bigquery_datapolicies_v1::DataPolicyServiceConnection { public: @@ -82,8 +80,6 @@ class DataPolicyServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/bigquery/datapolicies/v1/internal/data_policy_tracing_stub.cc b/google/cloud/bigquery/datapolicies/v1/internal/data_policy_tracing_stub.cc index 1e22d096d825d..ea7282edb4e34 100644 --- a/google/cloud/bigquery/datapolicies/v1/internal/data_policy_tracing_stub.cc +++ b/google/cloud/bigquery/datapolicies/v1/internal/data_policy_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datapolicies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DataPolicyServiceTracingStub::DataPolicyServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -152,18 +153,14 @@ DataPolicyServiceTracingStub::TestIamPermissions( context, *span, child_->TestIamPermissions(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDataPolicyServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_datapolicies_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/datapolicies/v1/internal/data_policy_tracing_stub.h b/google/cloud/bigquery/datapolicies/v1/internal/data_policy_tracing_stub.h index 51420c60caa2f..69a2150dd693d 100644 --- a/google/cloud/bigquery/datapolicies/v1/internal/data_policy_tracing_stub.h +++ b/google/cloud/bigquery/datapolicies/v1/internal/data_policy_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datapolicies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DataPolicyServiceTracingStub : public DataPolicyServiceStub { public: ~DataPolicyServiceTracingStub() override = default; @@ -91,8 +92,6 @@ class DataPolicyServiceTracingStub : public DataPolicyServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -107,4 +106,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATAPOLICIES_V1_INTERNAL_DATA_POLICY_TRACING_STUB_H diff --git a/google/cloud/bigquery/datapolicies/v2/data_policy_connection.h b/google/cloud/bigquery/datapolicies/v2/data_policy_connection.h index 36c84f6c985df..8bb8278a072d5 100644 --- a/google/cloud/bigquery/datapolicies/v2/data_policy_connection.h +++ b/google/cloud/bigquery/datapolicies/v2/data_policy_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATAPOLICIES_V2_DATA_POLICY_CONNECTION_H #include "google/cloud/bigquery/datapolicies/v2/data_policy_connection_idempotency_policy.h" +#include "google/cloud/bigquery/datapolicies/v2/datapolicy.pb.h" #include "google/cloud/bigquery/datapolicies/v2/internal/data_policy_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquery/datapolicies/v2/data_policy_connection_idempotency_policy.h b/google/cloud/bigquery/datapolicies/v2/data_policy_connection_idempotency_policy.h index 9e648dd3d5a6e..395993851ef5e 100644 --- a/google/cloud/bigquery/datapolicies/v2/data_policy_connection_idempotency_policy.h +++ b/google/cloud/bigquery/datapolicies/v2/data_policy_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATAPOLICIES_V2_DATA_POLICY_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATAPOLICIES_V2_DATA_POLICY_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/bigquery/datapolicies/v2/datapolicy.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquery/datapolicies/v2/internal/data_policy_auth_decorator.cc b/google/cloud/bigquery/datapolicies/v2/internal/data_policy_auth_decorator.cc index 33a250804a110..8fbfa6eab2da6 100644 --- a/google/cloud/bigquery/datapolicies/v2/internal/data_policy_auth_decorator.cc +++ b/google/cloud/bigquery/datapolicies/v2/internal/data_policy_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/bigquery/datapolicies/v2/datapolicy.proto #include "google/cloud/bigquery/datapolicies/v2/internal/data_policy_auth_decorator.h" -#include +#include "google/cloud/bigquery/datapolicies/v2/datapolicy.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datapolicies_v2_internal { @@ -129,3 +132,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_datapolicies_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/datapolicies/v2/internal/data_policy_auth_decorator.h b/google/cloud/bigquery/datapolicies/v2/internal/data_policy_auth_decorator.h index 98135461d5e8e..ac7b34abe5cc9 100644 --- a/google/cloud/bigquery/datapolicies/v2/internal/data_policy_auth_decorator.h +++ b/google/cloud/bigquery/datapolicies/v2/internal/data_policy_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datapolicies_v2_internal { @@ -99,4 +102,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATAPOLICIES_V2_INTERNAL_DATA_POLICY_AUTH_DECORATOR_H diff --git a/google/cloud/bigquery/datapolicies/v2/internal/data_policy_logging_decorator.cc b/google/cloud/bigquery/datapolicies/v2/internal/data_policy_logging_decorator.cc index f5129338a6d57..ca82f67bdf0a9 100644 --- a/google/cloud/bigquery/datapolicies/v2/internal/data_policy_logging_decorator.cc +++ b/google/cloud/bigquery/datapolicies/v2/internal/data_policy_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/bigquery/datapolicies/v2/datapolicy.proto #include "google/cloud/bigquery/datapolicies/v2/internal/data_policy_logging_decorator.h" +#include "google/cloud/bigquery/datapolicies/v2/datapolicy.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datapolicies_v2_internal { @@ -172,3 +175,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_datapolicies_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/datapolicies/v2/internal/data_policy_logging_decorator.h b/google/cloud/bigquery/datapolicies/v2/internal/data_policy_logging_decorator.h index 319f8b30a6ea5..7773fe097ec05 100644 --- a/google/cloud/bigquery/datapolicies/v2/internal/data_policy_logging_decorator.h +++ b/google/cloud/bigquery/datapolicies/v2/internal/data_policy_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datapolicies_v2_internal { @@ -99,4 +102,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATAPOLICIES_V2_INTERNAL_DATA_POLICY_LOGGING_DECORATOR_H diff --git a/google/cloud/bigquery/datapolicies/v2/internal/data_policy_metadata_decorator.cc b/google/cloud/bigquery/datapolicies/v2/internal/data_policy_metadata_decorator.cc index 66f464aaa36cd..e4ca30d307307 100644 --- a/google/cloud/bigquery/datapolicies/v2/internal/data_policy_metadata_decorator.cc +++ b/google/cloud/bigquery/datapolicies/v2/internal/data_policy_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/bigquery/datapolicies/v2/datapolicy.proto #include "google/cloud/bigquery/datapolicies/v2/internal/data_policy_metadata_decorator.h" +#include "google/cloud/bigquery/datapolicies/v2/datapolicy.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datapolicies_v2_internal { @@ -161,3 +165,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_datapolicies_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/datapolicies/v2/internal/data_policy_metadata_decorator.h b/google/cloud/bigquery/datapolicies/v2/internal/data_policy_metadata_decorator.h index b3418eb7f1ae6..3f8dd40cb271a 100644 --- a/google/cloud/bigquery/datapolicies/v2/internal/data_policy_metadata_decorator.h +++ b/google/cloud/bigquery/datapolicies/v2/internal/data_policy_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datapolicies_v2_internal { @@ -105,4 +108,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATAPOLICIES_V2_INTERNAL_DATA_POLICY_METADATA_DECORATOR_H diff --git a/google/cloud/bigquery/datapolicies/v2/internal/data_policy_option_defaults.cc b/google/cloud/bigquery/datapolicies/v2/internal/data_policy_option_defaults.cc index ab8d0c183a7df..74fbbdfc1008c 100644 --- a/google/cloud/bigquery/datapolicies/v2/internal/data_policy_option_defaults.cc +++ b/google/cloud/bigquery/datapolicies/v2/internal/data_policy_option_defaults.cc @@ -43,7 +43,7 @@ Options DataPolicyServiceDefaultOptions(Options options) { bigquery_datapolicies_v2::DataPolicyServiceRetryPolicyOption>()) { options.set( bigquery_datapolicies_v2::DataPolicyServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/bigquery/datapolicies/v2/internal/data_policy_stub.cc b/google/cloud/bigquery/datapolicies/v2/internal/data_policy_stub.cc index ce790d235ad8c..7420862986101 100644 --- a/google/cloud/bigquery/datapolicies/v2/internal/data_policy_stub.cc +++ b/google/cloud/bigquery/datapolicies/v2/internal/data_policy_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/bigquery/datapolicies/v2/datapolicy.proto #include "google/cloud/bigquery/datapolicies/v2/internal/data_policy_stub.h" +#include "google/cloud/bigquery/datapolicies/v2/datapolicy.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datapolicies_v2_internal { @@ -158,3 +161,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_datapolicies_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/datapolicies/v2/internal/data_policy_stub.h b/google/cloud/bigquery/datapolicies/v2/internal/data_policy_stub.h index b675f8b95a92b..3ce0b865e8f50 100644 --- a/google/cloud/bigquery/datapolicies/v2/internal/data_policy_stub.h +++ b/google/cloud/bigquery/datapolicies/v2/internal/data_policy_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATAPOLICIES_V2_INTERNAL_DATA_POLICY_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATAPOLICIES_V2_INTERNAL_DATA_POLICY_STUB_H +#include "google/cloud/bigquery/datapolicies/v2/datapolicy.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datapolicies_v2_internal { @@ -161,4 +164,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATAPOLICIES_V2_INTERNAL_DATA_POLICY_STUB_H diff --git a/google/cloud/bigquery/datapolicies/v2/internal/data_policy_stub_factory.cc b/google/cloud/bigquery/datapolicies/v2/internal/data_policy_stub_factory.cc index fd26c518a3c49..85db349118108 100644 --- a/google/cloud/bigquery/datapolicies/v2/internal/data_policy_stub_factory.cc +++ b/google/cloud/bigquery/datapolicies/v2/internal/data_policy_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/bigquery/datapolicies/v2/datapolicy.proto #include "google/cloud/bigquery/datapolicies/v2/internal/data_policy_stub_factory.h" +#include "google/cloud/bigquery/datapolicies/v2/datapolicy.grpc.pb.h" #include "google/cloud/bigquery/datapolicies/v2/internal/data_policy_auth_decorator.h" #include "google/cloud/bigquery/datapolicies/v2/internal/data_policy_logging_decorator.h" #include "google/cloud/bigquery/datapolicies/v2/internal/data_policy_metadata_decorator.h" @@ -28,10 +29,12 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datapolicies_v2_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_datapolicies_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/datapolicies/v2/internal/data_policy_stub_factory.h b/google/cloud/bigquery/datapolicies/v2/internal/data_policy_stub_factory.h index 36ce1e520bb55..94810f9083e4f 100644 --- a/google/cloud/bigquery/datapolicies/v2/internal/data_policy_stub_factory.h +++ b/google/cloud/bigquery/datapolicies/v2/internal/data_policy_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datapolicies_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATAPOLICIES_V2_INTERNAL_DATA_POLICY_STUB_FACTORY_H diff --git a/google/cloud/bigquery/datapolicies/v2/internal/data_policy_tracing_connection.cc b/google/cloud/bigquery/datapolicies/v2/internal/data_policy_tracing_connection.cc index 3d4568c2f6d62..0e876ff2064e5 100644 --- a/google/cloud/bigquery/datapolicies/v2/internal/data_policy_tracing_connection.cc +++ b/google/cloud/bigquery/datapolicies/v2/internal/data_policy_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace bigquery_datapolicies_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DataPolicyServiceTracingConnection::DataPolicyServiceTracingConnection( std::shared_ptr child) @@ -138,18 +136,14 @@ DataPolicyServiceTracingConnection::TestIamPermissions( return internal::EndSpan(*span, child_->TestIamPermissions(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDataPolicyServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/bigquery/datapolicies/v2/internal/data_policy_tracing_connection.h b/google/cloud/bigquery/datapolicies/v2/internal/data_policy_tracing_connection.h index d24847c78080b..bef38050ad267 100644 --- a/google/cloud/bigquery/datapolicies/v2/internal/data_policy_tracing_connection.h +++ b/google/cloud/bigquery/datapolicies/v2/internal/data_policy_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace bigquery_datapolicies_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DataPolicyServiceTracingConnection : public bigquery_datapolicies_v2::DataPolicyServiceConnection { public: @@ -86,8 +84,6 @@ class DataPolicyServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/bigquery/datapolicies/v2/internal/data_policy_tracing_stub.cc b/google/cloud/bigquery/datapolicies/v2/internal/data_policy_tracing_stub.cc index 4dc26ef7a8ce3..209b78d799642 100644 --- a/google/cloud/bigquery/datapolicies/v2/internal/data_policy_tracing_stub.cc +++ b/google/cloud/bigquery/datapolicies/v2/internal/data_policy_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datapolicies_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DataPolicyServiceTracingStub::DataPolicyServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -165,18 +166,14 @@ DataPolicyServiceTracingStub::TestIamPermissions( context, *span, child_->TestIamPermissions(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDataPolicyServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_datapolicies_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/datapolicies/v2/internal/data_policy_tracing_stub.h b/google/cloud/bigquery/datapolicies/v2/internal/data_policy_tracing_stub.h index b161efd496c37..77d48b3efe111 100644 --- a/google/cloud/bigquery/datapolicies/v2/internal/data_policy_tracing_stub.h +++ b/google/cloud/bigquery/datapolicies/v2/internal/data_policy_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datapolicies_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DataPolicyServiceTracingStub : public DataPolicyServiceStub { public: ~DataPolicyServiceTracingStub() override = default; @@ -96,8 +97,6 @@ class DataPolicyServiceTracingStub : public DataPolicyServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -112,4 +111,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATAPOLICIES_V2_INTERNAL_DATA_POLICY_TRACING_STUB_H diff --git a/google/cloud/bigquery/datatransfer/v1/data_transfer_connection.h b/google/cloud/bigquery/datatransfer/v1/data_transfer_connection.h index 6ace2eafbbd60..fc2ea8dba1bb9 100644 --- a/google/cloud/bigquery/datatransfer/v1/data_transfer_connection.h +++ b/google/cloud/bigquery/datatransfer/v1/data_transfer_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATATRANSFER_V1_DATA_TRANSFER_CONNECTION_H #include "google/cloud/bigquery/datatransfer/v1/data_transfer_connection_idempotency_policy.h" +#include "google/cloud/bigquery/datatransfer/v1/datatransfer.pb.h" #include "google/cloud/bigquery/datatransfer/v1/internal/data_transfer_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquery/datatransfer/v1/data_transfer_connection_idempotency_policy.h b/google/cloud/bigquery/datatransfer/v1/data_transfer_connection_idempotency_policy.h index 6264d14802dd7..c954b16516d07 100644 --- a/google/cloud/bigquery/datatransfer/v1/data_transfer_connection_idempotency_policy.h +++ b/google/cloud/bigquery/datatransfer/v1/data_transfer_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATATRANSFER_V1_DATA_TRANSFER_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATATRANSFER_V1_DATA_TRANSFER_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/bigquery/datatransfer/v1/datatransfer.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_auth_decorator.cc b/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_auth_decorator.cc index 80f1228b847fe..5ee0ec0ed3a71 100644 --- a/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_auth_decorator.cc +++ b/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto #include "google/cloud/bigquery/datatransfer/v1/internal/data_transfer_auth_decorator.h" -#include +#include "google/cloud/bigquery/datatransfer/v1/datatransfer.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datatransfer_v1_internal { @@ -211,3 +214,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_datatransfer_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_auth_decorator.h b/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_auth_decorator.h index 01bf27dbad0a9..3f4a1712240e0 100644 --- a/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_auth_decorator.h +++ b/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datatransfer_v1_internal { @@ -146,4 +149,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATATRANSFER_V1_INTERNAL_DATA_TRANSFER_AUTH_DECORATOR_H diff --git a/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_logging_decorator.cc b/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_logging_decorator.cc index 2990548cad3da..d64b98c6a4141 100644 --- a/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_logging_decorator.cc +++ b/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto #include "google/cloud/bigquery/datatransfer/v1/internal/data_transfer_logging_decorator.h" +#include "google/cloud/bigquery/datatransfer/v1/datatransfer.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datatransfer_v1_internal { @@ -286,3 +289,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_datatransfer_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_logging_decorator.h b/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_logging_decorator.h index bced4fc54d6bf..3777941750e2e 100644 --- a/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_logging_decorator.h +++ b/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datatransfer_v1_internal { @@ -146,4 +149,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATATRANSFER_V1_INTERNAL_DATA_TRANSFER_LOGGING_DECORATOR_H diff --git a/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_metadata_decorator.cc b/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_metadata_decorator.cc index 86f97235fd5dd..e5a6ff5128873 100644 --- a/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_metadata_decorator.cc +++ b/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto #include "google/cloud/bigquery/datatransfer/v1/internal/data_transfer_metadata_decorator.h" +#include "google/cloud/bigquery/datatransfer/v1/datatransfer.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datatransfer_v1_internal { @@ -239,3 +243,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_datatransfer_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_metadata_decorator.h b/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_metadata_decorator.h index d9d3239a1a552..e51680eb96ce5 100644 --- a/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_metadata_decorator.h +++ b/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datatransfer_v1_internal { @@ -152,4 +155,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATATRANSFER_V1_INTERNAL_DATA_TRANSFER_METADATA_DECORATOR_H diff --git a/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_option_defaults.cc b/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_option_defaults.cc index 59d30c64427cb..bc42da71c84b5 100644 --- a/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_option_defaults.cc +++ b/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_option_defaults.cc @@ -43,7 +43,7 @@ Options DataTransferServiceDefaultOptions(Options options) { bigquery_datatransfer_v1::DataTransferServiceRetryPolicyOption>()) { options.set( bigquery_datatransfer_v1::DataTransferServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_stub.cc b/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_stub.cc index 97ff410cf160a..94c24bf8a87df 100644 --- a/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_stub.cc +++ b/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto #include "google/cloud/bigquery/datatransfer/v1/internal/data_transfer_stub.h" +#include "google/cloud/bigquery/datatransfer/v1/datatransfer.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datatransfer_v1_internal { @@ -268,3 +271,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_datatransfer_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_stub.h b/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_stub.h index e5a05f61be1e5..01f98535788a0 100644 --- a/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_stub.h +++ b/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATATRANSFER_V1_INTERNAL_DATA_TRANSFER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATATRANSFER_V1_INTERNAL_DATA_TRANSFER_STUB_H +#include "google/cloud/bigquery/datatransfer/v1/datatransfer.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datatransfer_v1_internal { @@ -263,4 +266,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATATRANSFER_V1_INTERNAL_DATA_TRANSFER_STUB_H diff --git a/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_stub_factory.cc b/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_stub_factory.cc index 9b7f2a0858651..7aa9a9ac30d30 100644 --- a/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_stub_factory.cc +++ b/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_stub_factory.cc @@ -17,22 +17,25 @@ // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto #include "google/cloud/bigquery/datatransfer/v1/internal/data_transfer_stub_factory.h" +#include "google/cloud/bigquery/datatransfer/v1/datatransfer.grpc.pb.h" #include "google/cloud/bigquery/datatransfer/v1/internal/data_transfer_auth_decorator.h" #include "google/cloud/bigquery/datatransfer/v1/internal/data_transfer_logging_decorator.h" #include "google/cloud/bigquery/datatransfer/v1/internal/data_transfer_metadata_decorator.h" #include "google/cloud/bigquery/datatransfer/v1/internal/data_transfer_stub.h" #include "google/cloud/bigquery/datatransfer/v1/internal/data_transfer_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datatransfer_v1_internal { @@ -74,3 +77,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_datatransfer_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_stub_factory.h b/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_stub_factory.h index d5762b98bf052..941dd8e448895 100644 --- a/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_stub_factory.h +++ b/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datatransfer_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATATRANSFER_V1_INTERNAL_DATA_TRANSFER_STUB_FACTORY_H diff --git a/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_tracing_connection.cc b/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_tracing_connection.cc index af3bd81d0053a..3c922f6e5032e 100644 --- a/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_tracing_connection.cc +++ b/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace bigquery_datatransfer_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DataTransferServiceTracingConnection::DataTransferServiceTracingConnection( std::shared_ptr child) @@ -238,18 +236,14 @@ DataTransferServiceTracingConnection::GetLocation( return internal::EndSpan(*span, child_->GetLocation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDataTransferServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_tracing_connection.h b/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_tracing_connection.h index d9841e928c3e2..6bb9ffdc7cb83 100644 --- a/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_tracing_connection.h +++ b/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace bigquery_datatransfer_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DataTransferServiceTracingConnection : public bigquery_datatransfer_v1::DataTransferServiceConnection { public: @@ -126,8 +124,6 @@ class DataTransferServiceTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_tracing_stub.cc b/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_tracing_stub.cc index 41b65665dc9a0..d88f40bc04374 100644 --- a/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_tracing_stub.cc +++ b/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datatransfer_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DataTransferServiceTracingStub::DataTransferServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -281,18 +282,14 @@ DataTransferServiceTracingStub::GetLocation( child_->GetLocation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDataTransferServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_datatransfer_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_tracing_stub.h b/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_tracing_stub.h index 6bc13abef5ea1..d52f9a29cd72a 100644 --- a/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_tracing_stub.h +++ b/google/cloud/bigquery/datatransfer/v1/internal/data_transfer_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_datatransfer_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DataTransferServiceTracingStub : public DataTransferServiceStub { public: ~DataTransferServiceTracingStub() override = default; @@ -143,8 +144,6 @@ class DataTransferServiceTracingStub : public DataTransferServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -159,4 +158,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_DATATRANSFER_V1_INTERNAL_DATA_TRANSFER_TRACING_STUB_H diff --git a/google/cloud/bigquery/migration/v2/internal/migration_auth_decorator.cc b/google/cloud/bigquery/migration/v2/internal/migration_auth_decorator.cc index ddd62d5b802ff..09f5a1fd0872a 100644 --- a/google/cloud/bigquery/migration/v2/internal/migration_auth_decorator.cc +++ b/google/cloud/bigquery/migration/v2/internal/migration_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/bigquery/migration/v2/migration_service.proto #include "google/cloud/bigquery/migration/v2/internal/migration_auth_decorator.h" -#include +#include "google/cloud/bigquery/migration/v2/migration_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_migration_v2_internal { @@ -103,3 +106,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_migration_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/migration/v2/internal/migration_auth_decorator.h b/google/cloud/bigquery/migration/v2/internal/migration_auth_decorator.h index bdd6aa8d6179f..b4d8f15bdc808 100644 --- a/google/cloud/bigquery/migration/v2/internal/migration_auth_decorator.h +++ b/google/cloud/bigquery/migration/v2/internal/migration_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_migration_v2_internal { @@ -90,4 +93,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MIGRATION_V2_INTERNAL_MIGRATION_AUTH_DECORATOR_H diff --git a/google/cloud/bigquery/migration/v2/internal/migration_logging_decorator.cc b/google/cloud/bigquery/migration/v2/internal/migration_logging_decorator.cc index f1fc9f93af503..6a68bca06f290 100644 --- a/google/cloud/bigquery/migration/v2/internal/migration_logging_decorator.cc +++ b/google/cloud/bigquery/migration/v2/internal/migration_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/bigquery/migration/v2/migration_service.proto #include "google/cloud/bigquery/migration/v2/internal/migration_logging_decorator.h" +#include "google/cloud/bigquery/migration/v2/migration_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_migration_v2_internal { @@ -135,3 +138,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_migration_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/migration/v2/internal/migration_logging_decorator.h b/google/cloud/bigquery/migration/v2/internal/migration_logging_decorator.h index 6b7bb846cde44..2ee1b895bf5fd 100644 --- a/google/cloud/bigquery/migration/v2/internal/migration_logging_decorator.h +++ b/google/cloud/bigquery/migration/v2/internal/migration_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_migration_v2_internal { @@ -90,4 +93,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MIGRATION_V2_INTERNAL_MIGRATION_LOGGING_DECORATOR_H diff --git a/google/cloud/bigquery/migration/v2/internal/migration_metadata_decorator.cc b/google/cloud/bigquery/migration/v2/internal/migration_metadata_decorator.cc index c05180f27eaea..b310714c24c05 100644 --- a/google/cloud/bigquery/migration/v2/internal/migration_metadata_decorator.cc +++ b/google/cloud/bigquery/migration/v2/internal/migration_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/bigquery/migration/v2/migration_service.proto #include "google/cloud/bigquery/migration/v2/internal/migration_metadata_decorator.h" +#include "google/cloud/bigquery/migration/v2/migration_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_migration_v2_internal { @@ -129,3 +133,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_migration_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/migration/v2/internal/migration_metadata_decorator.h b/google/cloud/bigquery/migration/v2/internal/migration_metadata_decorator.h index 34ecc0122da69..2a6eb2b9cb579 100644 --- a/google/cloud/bigquery/migration/v2/internal/migration_metadata_decorator.h +++ b/google/cloud/bigquery/migration/v2/internal/migration_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_migration_v2_internal { @@ -96,4 +99,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MIGRATION_V2_INTERNAL_MIGRATION_METADATA_DECORATOR_H diff --git a/google/cloud/bigquery/migration/v2/internal/migration_option_defaults.cc b/google/cloud/bigquery/migration/v2/internal/migration_option_defaults.cc index 2ddfc295a861d..05b3bd5571b8d 100644 --- a/google/cloud/bigquery/migration/v2/internal/migration_option_defaults.cc +++ b/google/cloud/bigquery/migration/v2/internal/migration_option_defaults.cc @@ -43,7 +43,7 @@ Options MigrationServiceDefaultOptions(Options options) { .has()) { options.set( bigquery_migration_v2::MigrationServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/bigquery/migration/v2/internal/migration_stub.cc b/google/cloud/bigquery/migration/v2/internal/migration_stub.cc index 0c3684f4ba572..6e8430e6a4944 100644 --- a/google/cloud/bigquery/migration/v2/internal/migration_stub.cc +++ b/google/cloud/bigquery/migration/v2/internal/migration_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/bigquery/migration/v2/migration_service.proto #include "google/cloud/bigquery/migration/v2/internal/migration_stub.h" +#include "google/cloud/bigquery/migration/v2/migration_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_migration_v2_internal { @@ -129,3 +132,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_migration_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/migration/v2/internal/migration_stub.h b/google/cloud/bigquery/migration/v2/internal/migration_stub.h index 7ed2ae0b5b3fb..8dd4a27e0a001 100644 --- a/google/cloud/bigquery/migration/v2/internal/migration_stub.h +++ b/google/cloud/bigquery/migration/v2/internal/migration_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MIGRATION_V2_INTERNAL_MIGRATION_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MIGRATION_V2_INTERNAL_MIGRATION_STUB_H +#include "google/cloud/bigquery/migration/v2/migration_service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_migration_v2_internal { @@ -137,4 +140,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MIGRATION_V2_INTERNAL_MIGRATION_STUB_H diff --git a/google/cloud/bigquery/migration/v2/internal/migration_stub_factory.cc b/google/cloud/bigquery/migration/v2/internal/migration_stub_factory.cc index b13e2252d720f..f2db4b5bc8b82 100644 --- a/google/cloud/bigquery/migration/v2/internal/migration_stub_factory.cc +++ b/google/cloud/bigquery/migration/v2/internal/migration_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/bigquery/migration/v2/internal/migration_metadata_decorator.h" #include "google/cloud/bigquery/migration/v2/internal/migration_stub.h" #include "google/cloud/bigquery/migration/v2/internal/migration_tracing_stub.h" +#include "google/cloud/bigquery/migration/v2/migration_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_migration_v2_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_migration_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/migration/v2/internal/migration_stub_factory.h b/google/cloud/bigquery/migration/v2/internal/migration_stub_factory.h index 8245258645644..27067e70a3b4a 100644 --- a/google/cloud/bigquery/migration/v2/internal/migration_stub_factory.h +++ b/google/cloud/bigquery/migration/v2/internal/migration_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_migration_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MIGRATION_V2_INTERNAL_MIGRATION_STUB_FACTORY_H diff --git a/google/cloud/bigquery/migration/v2/internal/migration_tracing_connection.cc b/google/cloud/bigquery/migration/v2/internal/migration_tracing_connection.cc index 4e55e7c0c5dbc..cf548f76d6eab 100644 --- a/google/cloud/bigquery/migration/v2/internal/migration_tracing_connection.cc +++ b/google/cloud/bigquery/migration/v2/internal/migration_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace bigquery_migration_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - MigrationServiceTracingConnection::MigrationServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -113,16 +111,12 @@ MigrationServiceTracingConnection::ListMigrationSubtasks( std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeMigrationServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/bigquery/migration/v2/internal/migration_tracing_connection.h b/google/cloud/bigquery/migration/v2/internal/migration_tracing_connection.h index 7be577d96a75e..87341d497d365 100644 --- a/google/cloud/bigquery/migration/v2/internal/migration_tracing_connection.h +++ b/google/cloud/bigquery/migration/v2/internal/migration_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace bigquery_migration_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class MigrationServiceTracingConnection : public bigquery_migration_v2::MigrationServiceConnection { public: @@ -77,8 +75,6 @@ class MigrationServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/bigquery/migration/v2/internal/migration_tracing_stub.cc b/google/cloud/bigquery/migration/v2/internal/migration_tracing_stub.cc index b58a5988764a9..f1593ccef753c 100644 --- a/google/cloud/bigquery/migration/v2/internal/migration_tracing_stub.cc +++ b/google/cloud/bigquery/migration/v2/internal/migration_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_migration_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - MigrationServiceTracingStub::MigrationServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -132,18 +133,14 @@ MigrationServiceTracingStub::ListMigrationSubtasks( context, *span, child_->ListMigrationSubtasks(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeMigrationServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_migration_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/migration/v2/internal/migration_tracing_stub.h b/google/cloud/bigquery/migration/v2/internal/migration_tracing_stub.h index 57509f94cb653..4ffd10da6c025 100644 --- a/google/cloud/bigquery/migration/v2/internal/migration_tracing_stub.h +++ b/google/cloud/bigquery/migration/v2/internal/migration_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_migration_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class MigrationServiceTracingStub : public MigrationServiceStub { public: ~MigrationServiceTracingStub() override = default; @@ -87,8 +88,6 @@ class MigrationServiceTracingStub : public MigrationServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -103,4 +102,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MIGRATION_V2_INTERNAL_MIGRATION_TRACING_STUB_H diff --git a/google/cloud/bigquery/migration/v2/migration_connection.h b/google/cloud/bigquery/migration/v2/migration_connection.h index 773edbb66cbef..4390b09be7413 100644 --- a/google/cloud/bigquery/migration/v2/migration_connection.h +++ b/google/cloud/bigquery/migration/v2/migration_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/bigquery/migration/v2/internal/migration_retry_traits.h" #include "google/cloud/bigquery/migration/v2/migration_connection_idempotency_policy.h" +#include "google/cloud/bigquery/migration/v2/migration_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquery/migration/v2/migration_connection_idempotency_policy.h b/google/cloud/bigquery/migration/v2/migration_connection_idempotency_policy.h index 3fcf7dc68be0b..a1073a8500d62 100644 --- a/google/cloud/bigquery/migration/v2/migration_connection_idempotency_policy.h +++ b/google/cloud/bigquery/migration/v2/migration_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MIGRATION_V2_MIGRATION_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MIGRATION_V2_MIGRATION_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/bigquery/migration/v2/migration_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquery/migration_client.h b/google/cloud/bigquery/migration_client.h deleted file mode 100644 index ddeb5a5877875..0000000000000 --- a/google/cloud/bigquery/migration_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/migration/v2/migration_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MIGRATION_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MIGRATION_CLIENT_H - -#include "google/cloud/bigquery/migration/v2/migration_client.h" -#include "google/cloud/bigquery/migration_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in bigquery_migration_v2 instead of the aliases defined in -/// this namespace. -namespace bigquery { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use bigquery_migration_v2::MigrationServiceClient directly. -using ::google::cloud::bigquery_migration_v2::MigrationServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MIGRATION_CLIENT_H diff --git a/google/cloud/bigquery/migration_connection.h b/google/cloud/bigquery/migration_connection.h deleted file mode 100644 index 032b87776d156..0000000000000 --- a/google/cloud/bigquery/migration_connection.h +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/migration/v2/migration_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MIGRATION_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MIGRATION_CONNECTION_H - -#include "google/cloud/bigquery/migration/v2/migration_connection.h" -#include "google/cloud/bigquery/migration_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace bigquery { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use bigquery_migration_v2::MakeMigrationServiceConnection -/// directly. -using ::google::cloud::bigquery_migration_v2::MakeMigrationServiceConnection; - -/// @deprecated Use bigquery_migration_v2::MigrationServiceConnection directly. -using ::google::cloud::bigquery_migration_v2::MigrationServiceConnection; - -/// @deprecated Use -/// bigquery_migration_v2::MigrationServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::bigquery_migration_v2:: - MigrationServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use -/// bigquery_migration_v2::MigrationServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::bigquery_migration_v2:: - MigrationServiceLimitedTimeRetryPolicy; - -/// @deprecated Use bigquery_migration_v2::MigrationServiceRetryPolicy directly. -using ::google::cloud::bigquery_migration_v2::MigrationServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MIGRATION_CONNECTION_H diff --git a/google/cloud/bigquery/migration_connection_idempotency_policy.h b/google/cloud/bigquery/migration_connection_idempotency_policy.h deleted file mode 100644 index 9cd1ebba3427c..0000000000000 --- a/google/cloud/bigquery/migration_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/migration/v2/migration_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MIGRATION_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MIGRATION_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/bigquery/migration/v2/migration_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace bigquery { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// bigquery_migration_v2::MakeDefaultMigrationServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::bigquery_migration_v2:: - MakeDefaultMigrationServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// bigquery_migration_v2::MigrationServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::bigquery_migration_v2:: - MigrationServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MIGRATION_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/bigquery/migration_options.h b/google/cloud/bigquery/migration_options.h deleted file mode 100644 index 80488f99b8bb1..0000000000000 --- a/google/cloud/bigquery/migration_options.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/migration/v2/migration_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MIGRATION_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MIGRATION_OPTIONS_H - -#include "google/cloud/bigquery/migration/v2/migration_options.h" -#include "google/cloud/bigquery/migration_connection.h" -#include "google/cloud/bigquery/migration_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace bigquery { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use bigquery_migration_v2::MigrationServiceBackoffPolicyOption -/// directly. -using ::google::cloud::bigquery_migration_v2:: - MigrationServiceBackoffPolicyOption; - -/// @deprecated Use -/// bigquery_migration_v2::MigrationServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::bigquery_migration_v2:: - MigrationServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use bigquery_migration_v2::MigrationServicePolicyOptionList -/// directly. -using ::google::cloud::bigquery_migration_v2::MigrationServicePolicyOptionList; - -/// @deprecated Use bigquery_migration_v2::MigrationServiceRetryPolicyOption -/// directly. -using ::google::cloud::bigquery_migration_v2::MigrationServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MIGRATION_OPTIONS_H diff --git a/google/cloud/bigquery/mocks/mock_analytics_hub_connection.h b/google/cloud/bigquery/mocks/mock_analytics_hub_connection.h deleted file mode 100644 index e69d6fede475e..0000000000000 --- a/google/cloud/bigquery/mocks/mock_analytics_hub_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/analyticshub/v1/analyticshub.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MOCKS_MOCK_ANALYTICS_HUB_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MOCKS_MOCK_ANALYTICS_HUB_CONNECTION_H - -#include "google/cloud/bigquery/analytics_hub_connection.h" -#include "google/cloud/bigquery/analyticshub/v1/mocks/mock_analytics_hub_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in bigquery_analyticshub_v1_mocks instead of the aliases -/// defined in this namespace. -namespace bigquery_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// bigquery_analyticshub_v1_mocks::MockAnalyticsHubServiceConnection directly. -using ::google::cloud::bigquery_analyticshub_v1_mocks:: - MockAnalyticsHubServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MOCKS_MOCK_ANALYTICS_HUB_CONNECTION_H diff --git a/google/cloud/bigquery/mocks/mock_bigquery_read_connection.h b/google/cloud/bigquery/mocks/mock_bigquery_read_connection.h deleted file mode 100644 index 19685608ebd11..0000000000000 --- a/google/cloud/bigquery/mocks/mock_bigquery_read_connection.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/storage/v1/storage.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MOCKS_MOCK_BIGQUERY_READ_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MOCKS_MOCK_BIGQUERY_READ_CONNECTION_H - -#include "google/cloud/bigquery/bigquery_read_connection.h" -#include "google/cloud/bigquery/storage/v1/mocks/mock_bigquery_read_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in bigquery_storage_v1_mocks instead of the aliases -/// defined in this namespace. -namespace bigquery_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use bigquery_storage_v1_mocks::MockBigQueryReadConnection -/// directly. -using ::google::cloud::bigquery_storage_v1_mocks::MockBigQueryReadConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MOCKS_MOCK_BIGQUERY_READ_CONNECTION_H diff --git a/google/cloud/bigquery/mocks/mock_bigquery_write_connection.h b/google/cloud/bigquery/mocks/mock_bigquery_write_connection.h deleted file mode 100644 index 3354e6212f6ba..0000000000000 --- a/google/cloud/bigquery/mocks/mock_bigquery_write_connection.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/storage/v1/storage.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MOCKS_MOCK_BIGQUERY_WRITE_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MOCKS_MOCK_BIGQUERY_WRITE_CONNECTION_H - -#include "google/cloud/bigquery/bigquery_write_connection.h" -#include "google/cloud/bigquery/storage/v1/mocks/mock_bigquery_write_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in bigquery_storage_v1_mocks instead of the aliases -/// defined in this namespace. -namespace bigquery_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use bigquery_storage_v1_mocks::MockBigQueryWriteConnection -/// directly. -using ::google::cloud::bigquery_storage_v1_mocks::MockBigQueryWriteConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MOCKS_MOCK_BIGQUERY_WRITE_CONNECTION_H diff --git a/google/cloud/bigquery/mocks/mock_connection_connection.h b/google/cloud/bigquery/mocks/mock_connection_connection.h deleted file mode 100644 index e21493a15f07e..0000000000000 --- a/google/cloud/bigquery/mocks/mock_connection_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/connection/v1/connection.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MOCKS_MOCK_CONNECTION_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MOCKS_MOCK_CONNECTION_CONNECTION_H - -#include "google/cloud/bigquery/connection/v1/mocks/mock_connection_connection.h" -#include "google/cloud/bigquery/connection_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in bigquery_connection_v1_mocks instead of the aliases -/// defined in this namespace. -namespace bigquery_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// bigquery_connection_v1_mocks::MockConnectionServiceConnection directly. -using ::google::cloud::bigquery_connection_v1_mocks:: - MockConnectionServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MOCKS_MOCK_CONNECTION_CONNECTION_H diff --git a/google/cloud/bigquery/mocks/mock_data_policy_connection.h b/google/cloud/bigquery/mocks/mock_data_policy_connection.h deleted file mode 100644 index 13f5c5e84f1ae..0000000000000 --- a/google/cloud/bigquery/mocks/mock_data_policy_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/datapolicies/v1/datapolicy.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MOCKS_MOCK_DATA_POLICY_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MOCKS_MOCK_DATA_POLICY_CONNECTION_H - -#include "google/cloud/bigquery/data_policy_connection.h" -#include "google/cloud/bigquery/datapolicies/v1/mocks/mock_data_policy_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in bigquery_datapolicies_v1_mocks instead of the aliases -/// defined in this namespace. -namespace bigquery_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// bigquery_datapolicies_v1_mocks::MockDataPolicyServiceConnection directly. -using ::google::cloud::bigquery_datapolicies_v1_mocks:: - MockDataPolicyServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MOCKS_MOCK_DATA_POLICY_CONNECTION_H diff --git a/google/cloud/bigquery/mocks/mock_data_transfer_connection.h b/google/cloud/bigquery/mocks/mock_data_transfer_connection.h deleted file mode 100644 index 5be1967395f73..0000000000000 --- a/google/cloud/bigquery/mocks/mock_data_transfer_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MOCKS_MOCK_DATA_TRANSFER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MOCKS_MOCK_DATA_TRANSFER_CONNECTION_H - -#include "google/cloud/bigquery/data_transfer_connection.h" -#include "google/cloud/bigquery/datatransfer/v1/mocks/mock_data_transfer_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in bigquery_datatransfer_v1_mocks instead of the aliases -/// defined in this namespace. -namespace bigquery_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// bigquery_datatransfer_v1_mocks::MockDataTransferServiceConnection directly. -using ::google::cloud::bigquery_datatransfer_v1_mocks:: - MockDataTransferServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MOCKS_MOCK_DATA_TRANSFER_CONNECTION_H diff --git a/google/cloud/bigquery/mocks/mock_migration_connection.h b/google/cloud/bigquery/mocks/mock_migration_connection.h deleted file mode 100644 index 3ebd20884864b..0000000000000 --- a/google/cloud/bigquery/mocks/mock_migration_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/migration/v2/migration_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MOCKS_MOCK_MIGRATION_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MOCKS_MOCK_MIGRATION_CONNECTION_H - -#include "google/cloud/bigquery/migration/v2/mocks/mock_migration_connection.h" -#include "google/cloud/bigquery/migration_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in bigquery_migration_v2_mocks instead of the aliases -/// defined in this namespace. -namespace bigquery_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use bigquery_migration_v2_mocks::MockMigrationServiceConnection -/// directly. -using ::google::cloud::bigquery_migration_v2_mocks:: - MockMigrationServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MOCKS_MOCK_MIGRATION_CONNECTION_H diff --git a/google/cloud/bigquery/mocks/mock_reservation_connection.h b/google/cloud/bigquery/mocks/mock_reservation_connection.h deleted file mode 100644 index 59193794e893f..0000000000000 --- a/google/cloud/bigquery/mocks/mock_reservation_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/reservation/v1/reservation.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MOCKS_MOCK_RESERVATION_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MOCKS_MOCK_RESERVATION_CONNECTION_H - -#include "google/cloud/bigquery/reservation/v1/mocks/mock_reservation_connection.h" -#include "google/cloud/bigquery/reservation_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in bigquery_reservation_v1_mocks instead of the aliases -/// defined in this namespace. -namespace bigquery_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// bigquery_reservation_v1_mocks::MockReservationServiceConnection directly. -using ::google::cloud::bigquery_reservation_v1_mocks:: - MockReservationServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_MOCKS_MOCK_RESERVATION_CONNECTION_H diff --git a/google/cloud/bigquery/quickstart/.bazelrc b/google/cloud/bigquery/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/bigquery/quickstart/.bazelrc +++ b/google/cloud/bigquery/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/bigquery/quickstart/CMakeLists.txt b/google/cloud/bigquery/quickstart/CMakeLists.txt index 7d2f85070ece2..71975b5ceb3f2 100644 --- a/google/cloud/bigquery/quickstart/CMakeLists.txt +++ b/google/cloud/bigquery/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # A minimal CMakeList.txt showing how to use the Cloud BigQuery C++ client # library in CMake-based projects. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-bigquery-quickstart CXX) find_package(google_cloud_cpp_bigquery REQUIRED) diff --git a/google/cloud/bigquery/reservation/v1/internal/reservation_auth_decorator.cc b/google/cloud/bigquery/reservation/v1/internal/reservation_auth_decorator.cc index a28e523bbf4a7..cb9fc3f1fa4e5 100644 --- a/google/cloud/bigquery/reservation/v1/internal/reservation_auth_decorator.cc +++ b/google/cloud/bigquery/reservation/v1/internal/reservation_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/bigquery/reservation/v1/reservation.proto #include "google/cloud/bigquery/reservation/v1/internal/reservation_auth_decorator.h" -#include +#include "google/cloud/bigquery/reservation/v1/reservation.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_reservation_v1_internal { @@ -319,3 +322,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_reservation_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/reservation/v1/internal/reservation_auth_decorator.h b/google/cloud/bigquery/reservation/v1/internal/reservation_auth_decorator.h index 0beb12b998c9a..4cae77012ea5a 100644 --- a/google/cloud/bigquery/reservation/v1/internal/reservation_auth_decorator.h +++ b/google/cloud/bigquery/reservation/v1/internal/reservation_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_reservation_v1_internal { @@ -211,4 +214,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_RESERVATION_V1_INTERNAL_RESERVATION_AUTH_DECORATOR_H diff --git a/google/cloud/bigquery/reservation/v1/internal/reservation_logging_decorator.cc b/google/cloud/bigquery/reservation/v1/internal/reservation_logging_decorator.cc index 3a14eab21e1c4..464b591062764 100644 --- a/google/cloud/bigquery/reservation/v1/internal/reservation_logging_decorator.cc +++ b/google/cloud/bigquery/reservation/v1/internal/reservation_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/bigquery/reservation/v1/reservation.proto #include "google/cloud/bigquery/reservation/v1/internal/reservation_logging_decorator.h" +#include "google/cloud/bigquery/reservation/v1/reservation.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_reservation_v1_internal { @@ -438,3 +441,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_reservation_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/reservation/v1/internal/reservation_logging_decorator.h b/google/cloud/bigquery/reservation/v1/internal/reservation_logging_decorator.h index bbf07d894b67f..faaebed52bcfa 100644 --- a/google/cloud/bigquery/reservation/v1/internal/reservation_logging_decorator.h +++ b/google/cloud/bigquery/reservation/v1/internal/reservation_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_reservation_v1_internal { @@ -211,4 +214,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_RESERVATION_V1_INTERNAL_RESERVATION_LOGGING_DECORATOR_H diff --git a/google/cloud/bigquery/reservation/v1/internal/reservation_metadata_decorator.cc b/google/cloud/bigquery/reservation/v1/internal/reservation_metadata_decorator.cc index cacd0d1e4406a..6540598c89d84 100644 --- a/google/cloud/bigquery/reservation/v1/internal/reservation_metadata_decorator.cc +++ b/google/cloud/bigquery/reservation/v1/internal/reservation_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/bigquery/reservation/v1/reservation.proto #include "google/cloud/bigquery/reservation/v1/internal/reservation_metadata_decorator.h" +#include "google/cloud/bigquery/reservation/v1/reservation.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_reservation_v1_internal { @@ -354,3 +358,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_reservation_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/reservation/v1/internal/reservation_metadata_decorator.h b/google/cloud/bigquery/reservation/v1/internal/reservation_metadata_decorator.h index 2e56e80f91b6a..a0b078cb19211 100644 --- a/google/cloud/bigquery/reservation/v1/internal/reservation_metadata_decorator.h +++ b/google/cloud/bigquery/reservation/v1/internal/reservation_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_reservation_v1_internal { @@ -217,4 +220,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_RESERVATION_V1_INTERNAL_RESERVATION_METADATA_DECORATOR_H diff --git a/google/cloud/bigquery/reservation/v1/internal/reservation_option_defaults.cc b/google/cloud/bigquery/reservation/v1/internal/reservation_option_defaults.cc index 3ed3665c332f4..e8ad2217a8354 100644 --- a/google/cloud/bigquery/reservation/v1/internal/reservation_option_defaults.cc +++ b/google/cloud/bigquery/reservation/v1/internal/reservation_option_defaults.cc @@ -43,7 +43,7 @@ Options ReservationServiceDefaultOptions(Options options) { bigquery_reservation_v1::ReservationServiceRetryPolicyOption>()) { options.set( bigquery_reservation_v1::ReservationServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/bigquery/reservation/v1/internal/reservation_stub.cc b/google/cloud/bigquery/reservation/v1/internal/reservation_stub.cc index 36d3319806399..e9f06560914fb 100644 --- a/google/cloud/bigquery/reservation/v1/internal/reservation_stub.cc +++ b/google/cloud/bigquery/reservation/v1/internal/reservation_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/bigquery/reservation/v1/reservation.proto #include "google/cloud/bigquery/reservation/v1/internal/reservation_stub.h" +#include "google/cloud/bigquery/reservation/v1/reservation.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_reservation_v1_internal { @@ -417,3 +420,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_reservation_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/reservation/v1/internal/reservation_stub.h b/google/cloud/bigquery/reservation/v1/internal/reservation_stub.h index 7dbce9a91437b..bf65deab30ceb 100644 --- a/google/cloud/bigquery/reservation/v1/internal/reservation_stub.h +++ b/google/cloud/bigquery/reservation/v1/internal/reservation_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_RESERVATION_V1_INTERNAL_RESERVATION_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_RESERVATION_V1_INTERNAL_RESERVATION_STUB_H +#include "google/cloud/bigquery/reservation/v1/reservation.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_reservation_v1_internal { @@ -383,4 +386,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_RESERVATION_V1_INTERNAL_RESERVATION_STUB_H diff --git a/google/cloud/bigquery/reservation/v1/internal/reservation_stub_factory.cc b/google/cloud/bigquery/reservation/v1/internal/reservation_stub_factory.cc index e8c82beca748c..a69cc85afe4b3 100644 --- a/google/cloud/bigquery/reservation/v1/internal/reservation_stub_factory.cc +++ b/google/cloud/bigquery/reservation/v1/internal/reservation_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/bigquery/reservation/v1/internal/reservation_metadata_decorator.h" #include "google/cloud/bigquery/reservation/v1/internal/reservation_stub.h" #include "google/cloud/bigquery/reservation/v1/internal/reservation_tracing_stub.h" +#include "google/cloud/bigquery/reservation/v1/reservation.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_reservation_v1_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_reservation_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/reservation/v1/internal/reservation_stub_factory.h b/google/cloud/bigquery/reservation/v1/internal/reservation_stub_factory.h index 75614c952465c..e708af66d687c 100644 --- a/google/cloud/bigquery/reservation/v1/internal/reservation_stub_factory.h +++ b/google/cloud/bigquery/reservation/v1/internal/reservation_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_reservation_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_RESERVATION_V1_INTERNAL_RESERVATION_STUB_FACTORY_H diff --git a/google/cloud/bigquery/reservation/v1/internal/reservation_tracing_connection.cc b/google/cloud/bigquery/reservation/v1/internal/reservation_tracing_connection.cc index 3b2968ba3ff22..4ce33751bd24c 100644 --- a/google/cloud/bigquery/reservation/v1/internal/reservation_tracing_connection.cc +++ b/google/cloud/bigquery/reservation/v1/internal/reservation_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace bigquery_reservation_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ReservationServiceTracingConnection::ReservationServiceTracingConnection( std::shared_ptr child) @@ -358,18 +356,14 @@ ReservationServiceTracingConnection::ListReservationGroups( std::move(span), std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeReservationServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/bigquery/reservation/v1/internal/reservation_tracing_connection.h b/google/cloud/bigquery/reservation/v1/internal/reservation_tracing_connection.h index b0ab19d7d8299..e9d7b93f7836f 100644 --- a/google/cloud/bigquery/reservation/v1/internal/reservation_tracing_connection.h +++ b/google/cloud/bigquery/reservation/v1/internal/reservation_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace bigquery_reservation_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ReservationServiceTracingConnection : public bigquery_reservation_v1::ReservationServiceConnection { public: @@ -177,8 +175,6 @@ class ReservationServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/bigquery/reservation/v1/internal/reservation_tracing_stub.cc b/google/cloud/bigquery/reservation/v1/internal/reservation_tracing_stub.cc index 989b27bc87394..4ce0b8897e83b 100644 --- a/google/cloud/bigquery/reservation/v1/internal/reservation_tracing_stub.cc +++ b/google/cloud/bigquery/reservation/v1/internal/reservation_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_reservation_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ReservationServiceTracingStub::ReservationServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -440,18 +441,14 @@ ReservationServiceTracingStub::ListReservationGroups( context, *span, child_->ListReservationGroups(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeReservationServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_reservation_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/reservation/v1/internal/reservation_tracing_stub.h b/google/cloud/bigquery/reservation/v1/internal/reservation_tracing_stub.h index f3f9c4add5294..d8a6d03e1b802 100644 --- a/google/cloud/bigquery/reservation/v1/internal/reservation_tracing_stub.h +++ b/google/cloud/bigquery/reservation/v1/internal/reservation_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_reservation_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ReservationServiceTracingStub : public ReservationServiceStub { public: ~ReservationServiceTracingStub() override = default; @@ -208,8 +209,6 @@ class ReservationServiceTracingStub : public ReservationServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -224,4 +223,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_RESERVATION_V1_INTERNAL_RESERVATION_TRACING_STUB_H diff --git a/google/cloud/bigquery/reservation/v1/reservation_connection.h b/google/cloud/bigquery/reservation/v1/reservation_connection.h index c991697567aa0..8b2c65250b12d 100644 --- a/google/cloud/bigquery/reservation/v1/reservation_connection.h +++ b/google/cloud/bigquery/reservation/v1/reservation_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_RESERVATION_V1_RESERVATION_CONNECTION_H #include "google/cloud/bigquery/reservation/v1/internal/reservation_retry_traits.h" +#include "google/cloud/bigquery/reservation/v1/reservation.pb.h" #include "google/cloud/bigquery/reservation/v1/reservation_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquery/reservation/v1/reservation_connection_idempotency_policy.h b/google/cloud/bigquery/reservation/v1/reservation_connection_idempotency_policy.h index c297d7838f1d1..247843fbf9ba0 100644 --- a/google/cloud/bigquery/reservation/v1/reservation_connection_idempotency_policy.h +++ b/google/cloud/bigquery/reservation/v1/reservation_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_RESERVATION_V1_RESERVATION_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_RESERVATION_V1_RESERVATION_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/bigquery/reservation/v1/reservation.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquery/reservation_client.h b/google/cloud/bigquery/reservation_client.h deleted file mode 100644 index a728f4643c7b2..0000000000000 --- a/google/cloud/bigquery/reservation_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/reservation/v1/reservation.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_RESERVATION_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_RESERVATION_CLIENT_H - -#include "google/cloud/bigquery/reservation/v1/reservation_client.h" -#include "google/cloud/bigquery/reservation_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in bigquery_reservation_v1 instead of the aliases defined -/// in this namespace. -namespace bigquery { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use bigquery_reservation_v1::ReservationServiceClient directly. -using ::google::cloud::bigquery_reservation_v1::ReservationServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_RESERVATION_CLIENT_H diff --git a/google/cloud/bigquery/reservation_connection.h b/google/cloud/bigquery/reservation_connection.h deleted file mode 100644 index 40bde54134e36..0000000000000 --- a/google/cloud/bigquery/reservation_connection.h +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/reservation/v1/reservation.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_RESERVATION_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_RESERVATION_CONNECTION_H - -#include "google/cloud/bigquery/reservation/v1/reservation_connection.h" -#include "google/cloud/bigquery/reservation_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace bigquery { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use bigquery_reservation_v1::MakeReservationServiceConnection -/// directly. -using ::google::cloud::bigquery_reservation_v1:: - MakeReservationServiceConnection; - -/// @deprecated Use bigquery_reservation_v1::ReservationServiceConnection -/// directly. -using ::google::cloud::bigquery_reservation_v1::ReservationServiceConnection; - -/// @deprecated Use -/// bigquery_reservation_v1::ReservationServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::bigquery_reservation_v1:: - ReservationServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use -/// bigquery_reservation_v1::ReservationServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::bigquery_reservation_v1:: - ReservationServiceLimitedTimeRetryPolicy; - -/// @deprecated Use bigquery_reservation_v1::ReservationServiceRetryPolicy -/// directly. -using ::google::cloud::bigquery_reservation_v1::ReservationServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_RESERVATION_CONNECTION_H diff --git a/google/cloud/bigquery/reservation_connection_idempotency_policy.h b/google/cloud/bigquery/reservation_connection_idempotency_policy.h deleted file mode 100644 index 2a1982ec17c4b..0000000000000 --- a/google/cloud/bigquery/reservation_connection_idempotency_policy.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/reservation/v1/reservation.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_RESERVATION_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_RESERVATION_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/bigquery/reservation/v1/reservation_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace bigquery { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// bigquery_reservation_v1::MakeDefaultReservationServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::bigquery_reservation_v1:: - MakeDefaultReservationServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// bigquery_reservation_v1::ReservationServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::bigquery_reservation_v1:: - ReservationServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_RESERVATION_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/bigquery/reservation_options.h b/google/cloud/bigquery/reservation_options.h deleted file mode 100644 index 6c3e565432c51..0000000000000 --- a/google/cloud/bigquery/reservation_options.h +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/bigquery/reservation/v1/reservation.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_RESERVATION_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_RESERVATION_OPTIONS_H - -#include "google/cloud/bigquery/reservation/v1/reservation_options.h" -#include "google/cloud/bigquery/reservation_connection.h" -#include "google/cloud/bigquery/reservation_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace bigquery { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// bigquery_reservation_v1::ReservationServiceBackoffPolicyOption directly. -using ::google::cloud::bigquery_reservation_v1:: - ReservationServiceBackoffPolicyOption; - -/// @deprecated Use -/// bigquery_reservation_v1::ReservationServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::bigquery_reservation_v1:: - ReservationServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use bigquery_reservation_v1::ReservationServicePolicyOptionList -/// directly. -using ::google::cloud::bigquery_reservation_v1:: - ReservationServicePolicyOptionList; - -/// @deprecated Use bigquery_reservation_v1::ReservationServiceRetryPolicyOption -/// directly. -using ::google::cloud::bigquery_reservation_v1:: - ReservationServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_RESERVATION_OPTIONS_H diff --git a/google/cloud/bigquery/retry_traits.h b/google/cloud/bigquery/retry_traits.h deleted file mode 100644 index 9227228d0295b..0000000000000 --- a/google/cloud/bigquery/retry_traits.h +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_RETRY_TRAITS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_RETRY_TRAITS_H - -#include "google/cloud/bigquery/internal/bigquery_read_retry_traits.h" -#warning "This header is deprecated, it only provided internal symbols." - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_RETRY_TRAITS_H diff --git a/google/cloud/bigquery/storage/v1/bigquery_read_client.h b/google/cloud/bigquery/storage/v1/bigquery_read_client.h index 50d03053cff27..adcf2a533902e 100644 --- a/google/cloud/bigquery/storage/v1/bigquery_read_client.h +++ b/google/cloud/bigquery/storage/v1/bigquery_read_client.h @@ -315,7 +315,6 @@ class BigQueryReadClient { }; GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace bigquery_storage_v1 } // namespace cloud } // namespace google diff --git a/google/cloud/bigquery/storage/v1/bigquery_read_connection.cc b/google/cloud/bigquery/storage/v1/bigquery_read_connection.cc index 9435c6475456d..ac0e222eac708 100644 --- a/google/cloud/bigquery/storage/v1/bigquery_read_connection.cc +++ b/google/cloud/bigquery/storage/v1/bigquery_read_connection.cc @@ -82,20 +82,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_storage_v1 } // namespace cloud } // namespace google - -namespace google { -namespace cloud { -namespace bigquery { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -void BigQueryReadReadRowsStreamingUpdater( - google::cloud::bigquery::storage::v1::ReadRowsResponse const& response, - google::cloud::bigquery::storage::v1::ReadRowsRequest& request) { - return bigquery_storage_v1_internal::BigQueryReadReadRowsStreamingUpdater( - response, request); -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigquery -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigquery/storage/v1/bigquery_read_connection.h b/google/cloud/bigquery/storage/v1/bigquery_read_connection.h index 63a7245212169..7dc9ea8e0103d 100644 --- a/google/cloud/bigquery/storage/v1/bigquery_read_connection.h +++ b/google/cloud/bigquery/storage/v1/bigquery_read_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/bigquery/storage/v1/bigquery_read_connection_idempotency_policy.h" #include "google/cloud/bigquery/storage/v1/internal/bigquery_read_retry_traits.h" +#include "google/cloud/bigquery/storage/v1/storage.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { @@ -223,7 +223,6 @@ std::shared_ptr MakeBigQueryReadConnection( Options options = {}); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace bigquery_storage_v1 } // namespace cloud } // namespace google diff --git a/google/cloud/bigquery/storage/v1/bigquery_read_connection_idempotency_policy.h b/google/cloud/bigquery/storage/v1/bigquery_read_connection_idempotency_policy.h index 7cec89d74c419..520e8f29936bd 100644 --- a/google/cloud/bigquery/storage/v1/bigquery_read_connection_idempotency_policy.h +++ b/google/cloud/bigquery/storage/v1/bigquery_read_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_STORAGE_V1_BIGQUERY_READ_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_STORAGE_V1_BIGQUERY_READ_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/bigquery/storage/v1/storage.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { @@ -50,7 +50,6 @@ std::unique_ptr MakeDefaultBigQueryReadConnectionIdempotencyPolicy(); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace bigquery_storage_v1 } // namespace cloud } // namespace google diff --git a/google/cloud/bigquery/storage/v1/bigquery_write_connection.h b/google/cloud/bigquery/storage/v1/bigquery_write_connection.h index a2dd1c8ee5550..b57ef42c860d8 100644 --- a/google/cloud/bigquery/storage/v1/bigquery_write_connection.h +++ b/google/cloud/bigquery/storage/v1/bigquery_write_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/bigquery/storage/v1/bigquery_write_connection_idempotency_policy.h" #include "google/cloud/bigquery/storage/v1/internal/bigquery_write_retry_traits.h" +#include "google/cloud/bigquery/storage/v1/storage.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/async_read_write_stream_impl.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquery/storage/v1/bigquery_write_connection_idempotency_policy.h b/google/cloud/bigquery/storage/v1/bigquery_write_connection_idempotency_policy.h index ffe761930a202..28bc808ecfbfe 100644 --- a/google/cloud/bigquery/storage/v1/bigquery_write_connection_idempotency_policy.h +++ b/google/cloud/bigquery/storage/v1/bigquery_write_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_STORAGE_V1_BIGQUERY_WRITE_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_STORAGE_V1_BIGQUERY_WRITE_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/bigquery/storage/v1/storage.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquery/storage/v1/internal/bigquery_read_auth_decorator.cc b/google/cloud/bigquery/storage/v1/internal/bigquery_read_auth_decorator.cc index 54aa8bb5d8dfb..d2c78f7a7e389 100644 --- a/google/cloud/bigquery/storage/v1/internal/bigquery_read_auth_decorator.cc +++ b/google/cloud/bigquery/storage/v1/internal/bigquery_read_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/bigquery/storage/v1/storage.proto #include "google/cloud/bigquery/storage/v1/internal/bigquery_read_auth_decorator.h" -#include +#include "google/cloud/bigquery/storage/v1/storage.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_storage_v1_internal { @@ -67,3 +70,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_storage_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/storage/v1/internal/bigquery_read_auth_decorator.h b/google/cloud/bigquery/storage/v1/internal/bigquery_read_auth_decorator.h index 041b831e99ec8..f2bb9e818ba5f 100644 --- a/google/cloud/bigquery/storage/v1/internal/bigquery_read_auth_decorator.h +++ b/google/cloud/bigquery/storage/v1/internal/bigquery_read_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_storage_v1_internal { @@ -61,9 +64,10 @@ class BigQueryReadAuth : public BigQueryReadStub { }; GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace bigquery_storage_v1_internal } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_STORAGE_V1_INTERNAL_BIGQUERY_READ_AUTH_DECORATOR_H diff --git a/google/cloud/bigquery/storage/v1/internal/bigquery_read_connection_impl.h b/google/cloud/bigquery/storage/v1/internal/bigquery_read_connection_impl.h index 3bcf16a8ea721..a4c3cb4c75d7a 100644 --- a/google/cloud/bigquery/storage/v1/internal/bigquery_read_connection_impl.h +++ b/google/cloud/bigquery/storage/v1/internal/bigquery_read_connection_impl.h @@ -73,7 +73,6 @@ class BigQueryReadConnectionImpl }; GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace bigquery_storage_v1_internal } // namespace cloud } // namespace google diff --git a/google/cloud/bigquery/storage/v1/internal/bigquery_read_logging_decorator.cc b/google/cloud/bigquery/storage/v1/internal/bigquery_read_logging_decorator.cc index 835919702d256..ef1193cf769b5 100644 --- a/google/cloud/bigquery/storage/v1/internal/bigquery_read_logging_decorator.cc +++ b/google/cloud/bigquery/storage/v1/internal/bigquery_read_logging_decorator.cc @@ -17,15 +17,18 @@ // source: google/cloud/bigquery/storage/v1/storage.proto #include "google/cloud/bigquery/storage/v1/internal/bigquery_read_logging_decorator.h" +#include "google/cloud/bigquery/storage/v1/storage.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/internal/streaming_read_rpc_logging.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_storage_v1_internal { @@ -95,3 +98,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_storage_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/storage/v1/internal/bigquery_read_logging_decorator.h b/google/cloud/bigquery/storage/v1/internal/bigquery_read_logging_decorator.h index 4c6c06fdfa408..08863fa4d998b 100644 --- a/google/cloud/bigquery/storage/v1/internal/bigquery_read_logging_decorator.h +++ b/google/cloud/bigquery/storage/v1/internal/bigquery_read_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_storage_v1_internal { @@ -62,9 +65,10 @@ class BigQueryReadLogging : public BigQueryReadStub { }; // BigQueryReadLogging GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace bigquery_storage_v1_internal } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_STORAGE_V1_INTERNAL_BIGQUERY_READ_LOGGING_DECORATOR_H diff --git a/google/cloud/bigquery/storage/v1/internal/bigquery_read_metadata_decorator.cc b/google/cloud/bigquery/storage/v1/internal/bigquery_read_metadata_decorator.cc index 0e46204115544..57629b2f492ca 100644 --- a/google/cloud/bigquery/storage/v1/internal/bigquery_read_metadata_decorator.cc +++ b/google/cloud/bigquery/storage/v1/internal/bigquery_read_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/bigquery/storage/v1/storage.proto #include "google/cloud/bigquery/storage/v1/internal/bigquery_read_metadata_decorator.h" +#include "google/cloud/bigquery/storage/v1/storage.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_storage_v1_internal { @@ -94,3 +98,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_storage_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/storage/v1/internal/bigquery_read_metadata_decorator.h b/google/cloud/bigquery/storage/v1/internal/bigquery_read_metadata_decorator.h index 6dd086bb0c809..ead0bf6a6d546 100644 --- a/google/cloud/bigquery/storage/v1/internal/bigquery_read_metadata_decorator.h +++ b/google/cloud/bigquery/storage/v1/internal/bigquery_read_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_storage_v1_internal { @@ -66,9 +69,10 @@ class BigQueryReadMetadata : public BigQueryReadStub { }; GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace bigquery_storage_v1_internal } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_STORAGE_V1_INTERNAL_BIGQUERY_READ_METADATA_DECORATOR_H diff --git a/google/cloud/bigquery/storage/v1/internal/bigquery_read_option_defaults.cc b/google/cloud/bigquery/storage/v1/internal/bigquery_read_option_defaults.cc index 45c6b1d8f5c89..225d1abb6e7ad 100644 --- a/google/cloud/bigquery/storage/v1/internal/bigquery_read_option_defaults.cc +++ b/google/cloud/bigquery/storage/v1/internal/bigquery_read_option_defaults.cc @@ -42,7 +42,7 @@ Options BigQueryReadDefaultOptions(Options options) { if (!options.has()) { options.set( bigquery_storage_v1::BigQueryReadLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/bigquery/storage/v1/internal/bigquery_read_option_defaults.h b/google/cloud/bigquery/storage/v1/internal/bigquery_read_option_defaults.h index 0497533f5df04..d56fe0e0cff43 100644 --- a/google/cloud/bigquery/storage/v1/internal/bigquery_read_option_defaults.h +++ b/google/cloud/bigquery/storage/v1/internal/bigquery_read_option_defaults.h @@ -30,7 +30,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN Options BigQueryReadDefaultOptions(Options options); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace bigquery_storage_v1_internal } // namespace cloud } // namespace google diff --git a/google/cloud/bigquery/storage/v1/internal/bigquery_read_stub.cc b/google/cloud/bigquery/storage/v1/internal/bigquery_read_stub.cc index 23bf8641f0ab1..e8c35717a702f 100644 --- a/google/cloud/bigquery/storage/v1/internal/bigquery_read_stub.cc +++ b/google/cloud/bigquery/storage/v1/internal/bigquery_read_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/bigquery/storage/v1/storage.proto #include "google/cloud/bigquery/storage/v1/internal/bigquery_read_stub.h" +#include "google/cloud/bigquery/storage/v1/storage.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_storage_v1_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_storage_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/storage/v1/internal/bigquery_read_stub.h b/google/cloud/bigquery/storage/v1/internal/bigquery_read_stub.h index c20709cbc33b5..7fde72ea1437e 100644 --- a/google/cloud/bigquery/storage/v1/internal/bigquery_read_stub.h +++ b/google/cloud/bigquery/storage/v1/internal/bigquery_read_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_STORAGE_V1_INTERNAL_BIGQUERY_READ_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_STORAGE_V1_INTERNAL_BIGQUERY_READ_STUB_H +#include "google/cloud/bigquery/storage/v1/storage.grpc.pb.h" #include "google/cloud/internal/streaming_read_rpc.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_storage_v1_internal { @@ -88,9 +91,10 @@ class DefaultBigQueryReadStub : public BigQueryReadStub { }; GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace bigquery_storage_v1_internal } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_STORAGE_V1_INTERNAL_BIGQUERY_READ_STUB_H diff --git a/google/cloud/bigquery/storage/v1/internal/bigquery_read_stub_factory.cc b/google/cloud/bigquery/storage/v1/internal/bigquery_read_stub_factory.cc index bf7847fb6e7ca..a2ce5c15eeea8 100644 --- a/google/cloud/bigquery/storage/v1/internal/bigquery_read_stub_factory.cc +++ b/google/cloud/bigquery/storage/v1/internal/bigquery_read_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/bigquery/storage/v1/internal/bigquery_read_metadata_decorator.h" #include "google/cloud/bigquery/storage/v1/internal/bigquery_read_stub.h" #include "google/cloud/bigquery/storage/v1/internal/bigquery_read_tracing_stub.h" +#include "google/cloud/bigquery/storage/v1/storage.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_storage_v1_internal { @@ -68,3 +71,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_storage_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/storage/v1/internal/bigquery_read_stub_factory.h b/google/cloud/bigquery/storage/v1/internal/bigquery_read_stub_factory.h index 12cdd949325d6..8f10b313d33fe 100644 --- a/google/cloud/bigquery/storage/v1/internal/bigquery_read_stub_factory.h +++ b/google/cloud/bigquery/storage/v1/internal/bigquery_read_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_storage_v1_internal { @@ -35,9 +38,10 @@ std::shared_ptr CreateDefaultBigQueryReadStub( Options const& options); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace bigquery_storage_v1_internal } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_STORAGE_V1_INTERNAL_BIGQUERY_READ_STUB_FACTORY_H diff --git a/google/cloud/bigquery/storage/v1/internal/bigquery_read_tracing_connection.cc b/google/cloud/bigquery/storage/v1/internal/bigquery_read_tracing_connection.cc index 302d0ef2712d4..a7ca606689595 100644 --- a/google/cloud/bigquery/storage/v1/internal/bigquery_read_tracing_connection.cc +++ b/google/cloud/bigquery/storage/v1/internal/bigquery_read_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace bigquery_storage_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - BigQueryReadTracingConnection::BigQueryReadTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -64,16 +62,12 @@ BigQueryReadTracingConnection::SplitReadStream( return internal::EndSpan(*span, child_->SplitReadStream(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeBigQueryReadTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/bigquery/storage/v1/internal/bigquery_read_tracing_connection.h b/google/cloud/bigquery/storage/v1/internal/bigquery_read_tracing_connection.h index 0a7afdee44576..ad2695df10b16 100644 --- a/google/cloud/bigquery/storage/v1/internal/bigquery_read_tracing_connection.h +++ b/google/cloud/bigquery/storage/v1/internal/bigquery_read_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace bigquery_storage_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class BigQueryReadTracingConnection : public bigquery_storage_v1::BigQueryReadConnection { public: @@ -57,8 +55,6 @@ class BigQueryReadTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * @@ -70,7 +66,6 @@ MakeBigQueryReadTracingConnection( std::shared_ptr conn); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace bigquery_storage_v1_internal } // namespace cloud } // namespace google diff --git a/google/cloud/bigquery/storage/v1/internal/bigquery_read_tracing_stub.cc b/google/cloud/bigquery/storage/v1/internal/bigquery_read_tracing_stub.cc index 9436b3e167b93..d3c1cb313a298 100644 --- a/google/cloud/bigquery/storage/v1/internal/bigquery_read_tracing_stub.cc +++ b/google/cloud/bigquery/storage/v1/internal/bigquery_read_tracing_stub.cc @@ -22,13 +22,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_storage_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - BigQueryReadTracingStub::BigQueryReadTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -74,18 +75,14 @@ BigQueryReadTracingStub::SplitReadStream( child_->SplitReadStream(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeBigQueryReadTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_storage_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/storage/v1/internal/bigquery_read_tracing_stub.h b/google/cloud/bigquery/storage/v1/internal/bigquery_read_tracing_stub.h index 31a2a3a952990..a48970ea73f2d 100644 --- a/google/cloud/bigquery/storage/v1/internal/bigquery_read_tracing_stub.h +++ b/google/cloud/bigquery/storage/v1/internal/bigquery_read_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_storage_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class BigQueryReadTracingStub : public BigQueryReadStub { public: ~BigQueryReadTracingStub() override = default; @@ -61,8 +62,6 @@ class BigQueryReadTracingStub : public BigQueryReadStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -73,9 +72,10 @@ std::shared_ptr MakeBigQueryReadTracingStub( std::shared_ptr stub); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace bigquery_storage_v1_internal } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_STORAGE_V1_INTERNAL_BIGQUERY_READ_TRACING_STUB_H diff --git a/google/cloud/bigquery/storage/v1/internal/bigquery_write_auth_decorator.cc b/google/cloud/bigquery/storage/v1/internal/bigquery_write_auth_decorator.cc index 24008ae17fd3c..25b49b52ee813 100644 --- a/google/cloud/bigquery/storage/v1/internal/bigquery_write_auth_decorator.cc +++ b/google/cloud/bigquery/storage/v1/internal/bigquery_write_auth_decorator.cc @@ -17,11 +17,14 @@ // source: google/cloud/bigquery/storage/v1/storage.proto #include "google/cloud/bigquery/storage/v1/internal/bigquery_write_auth_decorator.h" +#include "google/cloud/bigquery/storage/v1/storage.grpc.pb.h" #include "google/cloud/internal/async_read_write_stream_auth.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_storage_v1_internal { @@ -104,3 +107,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_storage_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/storage/v1/internal/bigquery_write_auth_decorator.h b/google/cloud/bigquery/storage/v1/internal/bigquery_write_auth_decorator.h index 13b51dba741de..d73b7125ee4c1 100644 --- a/google/cloud/bigquery/storage/v1/internal/bigquery_write_auth_decorator.h +++ b/google/cloud/bigquery/storage/v1/internal/bigquery_write_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_storage_v1_internal { @@ -83,4 +86,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_STORAGE_V1_INTERNAL_BIGQUERY_WRITE_AUTH_DECORATOR_H diff --git a/google/cloud/bigquery/storage/v1/internal/bigquery_write_logging_decorator.cc b/google/cloud/bigquery/storage/v1/internal/bigquery_write_logging_decorator.cc index 49c725a73f5cd..df4acd6e357ce 100644 --- a/google/cloud/bigquery/storage/v1/internal/bigquery_write_logging_decorator.cc +++ b/google/cloud/bigquery/storage/v1/internal/bigquery_write_logging_decorator.cc @@ -17,15 +17,18 @@ // source: google/cloud/bigquery/storage/v1/storage.proto #include "google/cloud/bigquery/storage/v1/internal/bigquery_write_logging_decorator.h" +#include "google/cloud/bigquery/storage/v1/storage.grpc.pb.h" #include "google/cloud/internal/async_read_write_stream_logging.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_storage_v1_internal { @@ -135,3 +138,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_storage_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/storage/v1/internal/bigquery_write_logging_decorator.h b/google/cloud/bigquery/storage/v1/internal/bigquery_write_logging_decorator.h index d04346bf77f65..782e2e80f94e6 100644 --- a/google/cloud/bigquery/storage/v1/internal/bigquery_write_logging_decorator.h +++ b/google/cloud/bigquery/storage/v1/internal/bigquery_write_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_storage_v1_internal { @@ -84,4 +87,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_STORAGE_V1_INTERNAL_BIGQUERY_WRITE_LOGGING_DECORATOR_H diff --git a/google/cloud/bigquery/storage/v1/internal/bigquery_write_metadata_decorator.cc b/google/cloud/bigquery/storage/v1/internal/bigquery_write_metadata_decorator.cc index 9af03b2621968..88795a84966a1 100644 --- a/google/cloud/bigquery/storage/v1/internal/bigquery_write_metadata_decorator.cc +++ b/google/cloud/bigquery/storage/v1/internal/bigquery_write_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/bigquery/storage/v1/storage.proto #include "google/cloud/bigquery/storage/v1/internal/bigquery_write_metadata_decorator.h" +#include "google/cloud/bigquery/storage/v1/storage.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_storage_v1_internal { @@ -122,3 +126,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_storage_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/storage/v1/internal/bigquery_write_metadata_decorator.h b/google/cloud/bigquery/storage/v1/internal/bigquery_write_metadata_decorator.h index 30d875d3bec3c..26bc891c75c15 100644 --- a/google/cloud/bigquery/storage/v1/internal/bigquery_write_metadata_decorator.h +++ b/google/cloud/bigquery/storage/v1/internal/bigquery_write_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_storage_v1_internal { @@ -88,4 +91,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_STORAGE_V1_INTERNAL_BIGQUERY_WRITE_METADATA_DECORATOR_H diff --git a/google/cloud/bigquery/storage/v1/internal/bigquery_write_option_defaults.cc b/google/cloud/bigquery/storage/v1/internal/bigquery_write_option_defaults.cc index e3385e68da64a..76b34ea265e0c 100644 --- a/google/cloud/bigquery/storage/v1/internal/bigquery_write_option_defaults.cc +++ b/google/cloud/bigquery/storage/v1/internal/bigquery_write_option_defaults.cc @@ -42,7 +42,7 @@ Options BigQueryWriteDefaultOptions(Options options) { if (!options.has()) { options.set( bigquery_storage_v1::BigQueryWriteLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/bigquery/storage/v1/internal/bigquery_write_stub.cc b/google/cloud/bigquery/storage/v1/internal/bigquery_write_stub.cc index 32af6d38ae95f..434b64fb3bded 100644 --- a/google/cloud/bigquery/storage/v1/internal/bigquery_write_stub.cc +++ b/google/cloud/bigquery/storage/v1/internal/bigquery_write_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/bigquery/storage/v1/storage.proto #include "google/cloud/bigquery/storage/v1/internal/bigquery_write_stub.h" +#include "google/cloud/bigquery/storage/v1/storage.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/internal/async_read_write_stream_impl.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_storage_v1_internal { @@ -117,3 +120,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_storage_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/storage/v1/internal/bigquery_write_stub.h b/google/cloud/bigquery/storage/v1/internal/bigquery_write_stub.h index 3485b37155834..c1bcc9443ff25 100644 --- a/google/cloud/bigquery/storage/v1/internal/bigquery_write_stub.h +++ b/google/cloud/bigquery/storage/v1/internal/bigquery_write_stub.h @@ -19,15 +19,18 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_STORAGE_V1_INTERNAL_BIGQUERY_WRITE_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_STORAGE_V1_INTERNAL_BIGQUERY_WRITE_STUB_H +#include "google/cloud/bigquery/storage/v1/storage.grpc.pb.h" #include "google/cloud/async_streaming_read_write_rpc.h" #include "google/cloud/completion_queue.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_storage_v1_internal { @@ -130,4 +133,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_STORAGE_V1_INTERNAL_BIGQUERY_WRITE_STUB_H diff --git a/google/cloud/bigquery/storage/v1/internal/bigquery_write_stub_factory.cc b/google/cloud/bigquery/storage/v1/internal/bigquery_write_stub_factory.cc index 3275d6d215e7c..8a874da6e4d08 100644 --- a/google/cloud/bigquery/storage/v1/internal/bigquery_write_stub_factory.cc +++ b/google/cloud/bigquery/storage/v1/internal/bigquery_write_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/bigquery/storage/v1/internal/bigquery_write_metadata_decorator.h" #include "google/cloud/bigquery/storage/v1/internal/bigquery_write_stub.h" #include "google/cloud/bigquery/storage/v1/internal/bigquery_write_tracing_stub.h" +#include "google/cloud/bigquery/storage/v1/storage.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_storage_v1_internal { @@ -69,3 +72,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_storage_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/storage/v1/internal/bigquery_write_stub_factory.h b/google/cloud/bigquery/storage/v1/internal/bigquery_write_stub_factory.h index ca5aaf5a74ceb..b616060c19af1 100644 --- a/google/cloud/bigquery/storage/v1/internal/bigquery_write_stub_factory.h +++ b/google/cloud/bigquery/storage/v1/internal/bigquery_write_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_storage_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_STORAGE_V1_INTERNAL_BIGQUERY_WRITE_STUB_FACTORY_H diff --git a/google/cloud/bigquery/storage/v1/internal/bigquery_write_tracing_connection.cc b/google/cloud/bigquery/storage/v1/internal/bigquery_write_tracing_connection.cc index b915dff1b13ad..a98f0d4e2b83a 100644 --- a/google/cloud/bigquery/storage/v1/internal/bigquery_write_tracing_connection.cc +++ b/google/cloud/bigquery/storage/v1/internal/bigquery_write_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace bigquery_storage_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - BigQueryWriteTracingConnection::BigQueryWriteTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -88,16 +86,12 @@ BigQueryWriteTracingConnection::FlushRows( return internal::EndSpan(*span, child_->FlushRows(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeBigQueryWriteTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/bigquery/storage/v1/internal/bigquery_write_tracing_connection.h b/google/cloud/bigquery/storage/v1/internal/bigquery_write_tracing_connection.h index f7d1e33a6c10c..573062d21d765 100644 --- a/google/cloud/bigquery/storage/v1/internal/bigquery_write_tracing_connection.h +++ b/google/cloud/bigquery/storage/v1/internal/bigquery_write_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace bigquery_storage_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class BigQueryWriteTracingConnection : public bigquery_storage_v1::BigQueryWriteConnection { public: @@ -72,8 +70,6 @@ class BigQueryWriteTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/bigquery/storage/v1/internal/bigquery_write_tracing_stub.cc b/google/cloud/bigquery/storage/v1/internal/bigquery_write_tracing_stub.cc index 040fd4baff031..5d39a18f8e95b 100644 --- a/google/cloud/bigquery/storage/v1/internal/bigquery_write_tracing_stub.cc +++ b/google/cloud/bigquery/storage/v1/internal/bigquery_write_tracing_stub.cc @@ -22,13 +22,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_storage_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - BigQueryWriteTracingStub::BigQueryWriteTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -116,18 +117,14 @@ BigQueryWriteTracingStub::FlushRows( child_->FlushRows(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeBigQueryWriteTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigquery_storage_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigquery/storage/v1/internal/bigquery_write_tracing_stub.h b/google/cloud/bigquery/storage/v1/internal/bigquery_write_tracing_stub.h index 7a63a3faaac9a..fe19971d38416 100644 --- a/google/cloud/bigquery/storage/v1/internal/bigquery_write_tracing_stub.h +++ b/google/cloud/bigquery/storage/v1/internal/bigquery_write_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigquery_storage_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class BigQueryWriteTracingStub : public BigQueryWriteStub { public: ~BigQueryWriteTracingStub() override = default; @@ -79,8 +80,6 @@ class BigQueryWriteTracingStub : public BigQueryWriteStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -95,4 +94,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_STORAGE_V1_INTERNAL_BIGQUERY_WRITE_TRACING_STUB_H diff --git a/google/cloud/bigquery/v2/minimal/benchmarks/BUILD.bazel b/google/cloud/bigquery/v2/minimal/benchmarks/BUILD.bazel index 3ee10d0eed017..6dbb039fe44ea 100644 --- a/google/cloud/bigquery/v2/minimal/benchmarks/BUILD.bazel +++ b/google/cloud/bigquery/v2/minimal/benchmarks/BUILD.bazel @@ -33,7 +33,7 @@ cc_library( "//google/cloud/bigquery:google_cloud_cpp_bigquery_rest_mocks", "//google/cloud/testing_util:google_cloud_cpp_testing_private", "//google/cloud/testing_util:google_cloud_cpp_testing_rest_private", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) @@ -50,8 +50,8 @@ cc_library( "//google/cloud/bigquery:google_cloud_cpp_bigquery_rest_mocks", "//google/cloud/testing_util:google_cloud_cpp_testing_private", "//google/cloud/testing_util:google_cloud_cpp_testing_rest_private", - "@com_google_googletest//:gtest", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest", + "@googletest//:gtest_main", ], ) for test in experimental_bigquery_rest_client_benchmark_unit_tests] diff --git a/google/cloud/bigquery/v2/minimal/benchmarks/benchmark.cc b/google/cloud/bigquery/v2/minimal/benchmarks/benchmark.cc index 8c4ec61ba536c..7c62b20e95cf2 100644 --- a/google/cloud/bigquery/v2/minimal/benchmarks/benchmark.cc +++ b/google/cloud/bigquery/v2/minimal/benchmarks/benchmark.cc @@ -15,12 +15,12 @@ #include "google/cloud/bigquery/v2/minimal/benchmarks/benchmark.h" #include "google/cloud/bigquery/v2/minimal/internal/common_v2_resources.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/internal/random.h" #include "google/cloud/options.h" #include "google/cloud/stream_range.h" +#include "absl/strings/str_cat.h" #include "absl/time/time.h" #include #include diff --git a/google/cloud/bigquery/v2/minimal/benchmarks/benchmarks_config.cc b/google/cloud/bigquery/v2/minimal/benchmarks/benchmarks_config.cc index fe7b0ed75cfec..83a0119653c6e 100644 --- a/google/cloud/bigquery/v2/minimal/benchmarks/benchmarks_config.cc +++ b/google/cloud/bigquery/v2/minimal/benchmarks/benchmarks_config.cc @@ -13,13 +13,13 @@ // limitations under the License. #include "google/cloud/bigquery/v2/minimal/benchmarks/benchmarks_config.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/build_info.h" #include "google/cloud/internal/compiler_info.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/internal/random.h" #include "absl/strings/match.h" +#include "absl/strings/str_cat.h" #include #include #include diff --git a/google/cloud/bigquery/v2/minimal/internal/dataset_logging.cc b/google/cloud/bigquery/v2/minimal/internal/dataset_logging.cc index 9e5e793fd2661..de7ea76a7f541 100644 --- a/google/cloud/bigquery/v2/minimal/internal/dataset_logging.cc +++ b/google/cloud/bigquery/v2/minimal/internal/dataset_logging.cc @@ -14,11 +14,11 @@ #include "google/cloud/bigquery/v2/minimal/internal/dataset_logging.h" #include "google/cloud/bigquery/v2/minimal/internal/log_wrapper.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/invoke_result.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/log.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_join.h" #include "absl/strings/string_view.h" namespace google { diff --git a/google/cloud/bigquery/v2/minimal/internal/dataset_metadata.cc b/google/cloud/bigquery/v2/minimal/internal/dataset_metadata.cc index 9b0b8ff44d7e8..48ae0681c5305 100644 --- a/google/cloud/bigquery/v2/minimal/internal/dataset_metadata.cc +++ b/google/cloud/bigquery/v2/minimal/internal/dataset_metadata.cc @@ -16,9 +16,9 @@ #include "google/cloud/bigquery/v2/minimal/internal/dataset_metadata.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/api_client_header.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include diff --git a/google/cloud/bigquery/v2/minimal/internal/dataset_request.cc b/google/cloud/bigquery/v2/minimal/internal/dataset_request.cc index 76c29b3b7aa5f..42e1807a52404 100644 --- a/google/cloud/bigquery/v2/minimal/internal/dataset_request.cc +++ b/google/cloud/bigquery/v2/minimal/internal/dataset_request.cc @@ -15,12 +15,12 @@ #include "google/cloud/bigquery/v2/minimal/internal/dataset_request.h" #include "google/cloud/bigquery/v2/minimal/internal/rest_stub_utils.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/debug_string.h" #include "google/cloud/internal/format_time_point.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/status.h" #include "absl/strings/match.h" +#include "absl/strings/str_cat.h" namespace google { namespace cloud { diff --git a/google/cloud/bigquery/v2/minimal/internal/dataset_request_test.cc b/google/cloud/bigquery/v2/minimal/internal/dataset_request_test.cc index 36e2fbd98ec12..6916d4153fcad 100644 --- a/google/cloud/bigquery/v2/minimal/internal/dataset_request_test.cc +++ b/google/cloud/bigquery/v2/minimal/internal/dataset_request_test.cc @@ -14,10 +14,10 @@ #include "google/cloud/bigquery/v2/minimal/internal/dataset_request.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/format_time_point.h" #include "google/cloud/options.h" #include "google/cloud/testing_util/status_matchers.h" +#include "absl/strings/str_cat.h" #include namespace google { diff --git a/google/cloud/bigquery/v2/minimal/internal/dataset_response.cc b/google/cloud/bigquery/v2/minimal/internal/dataset_response.cc index e09176ded08e4..0c163fa4157ac 100644 --- a/google/cloud/bigquery/v2/minimal/internal/dataset_response.cc +++ b/google/cloud/bigquery/v2/minimal/internal/dataset_response.cc @@ -13,9 +13,9 @@ // limitations under the License. #include "google/cloud/bigquery/v2/minimal/internal/dataset_response.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/debug_string.h" #include "google/cloud/internal/make_status.h" +#include "absl/strings/str_cat.h" namespace google { namespace cloud { diff --git a/google/cloud/bigquery/v2/minimal/internal/dataset_rest_stub.cc b/google/cloud/bigquery/v2/minimal/internal/dataset_rest_stub.cc index 01ab5707b7c19..718b84396a711 100644 --- a/google/cloud/bigquery/v2/minimal/internal/dataset_rest_stub.cc +++ b/google/cloud/bigquery/v2/minimal/internal/dataset_rest_stub.cc @@ -14,9 +14,9 @@ #include "google/cloud/bigquery/v2/minimal/internal/dataset_rest_stub.h" #include "google/cloud/bigquery/v2/minimal/internal/rest_stub_utils.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_join.h" namespace google { namespace cloud { diff --git a/google/cloud/bigquery/v2/minimal/internal/job.cc b/google/cloud/bigquery/v2/minimal/internal/job.cc index 6f5b1492b6276..6ac6adde3914e 100644 --- a/google/cloud/bigquery/v2/minimal/internal/job.cc +++ b/google/cloud/bigquery/v2/minimal/internal/job.cc @@ -14,8 +14,8 @@ #include "google/cloud/bigquery/v2/minimal/internal/job.h" #include "google/cloud/bigquery/v2/minimal/internal/json_utils.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/debug_string.h" +#include "absl/strings/str_join.h" namespace google { namespace cloud { diff --git a/google/cloud/bigquery/v2/minimal/internal/job_configuration.cc b/google/cloud/bigquery/v2/minimal/internal/job_configuration.cc index 8e7503fa30f3c..898a4827cf560 100644 --- a/google/cloud/bigquery/v2/minimal/internal/job_configuration.cc +++ b/google/cloud/bigquery/v2/minimal/internal/job_configuration.cc @@ -14,8 +14,8 @@ #include "google/cloud/bigquery/v2/minimal/internal/job_configuration.h" #include "google/cloud/bigquery/v2/minimal/internal/json_utils.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/debug_string.h" +#include "absl/strings/str_join.h" namespace google { namespace cloud { diff --git a/google/cloud/bigquery/v2/minimal/internal/job_configuration_query.cc b/google/cloud/bigquery/v2/minimal/internal/job_configuration_query.cc index 8633e227f56ea..f886642a14784 100644 --- a/google/cloud/bigquery/v2/minimal/internal/job_configuration_query.cc +++ b/google/cloud/bigquery/v2/minimal/internal/job_configuration_query.cc @@ -14,8 +14,8 @@ #include "google/cloud/bigquery/v2/minimal/internal/job_configuration_query.h" #include "google/cloud/bigquery/v2/minimal/internal/json_utils.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/debug_string.h" +#include "absl/strings/str_join.h" namespace google { namespace cloud { diff --git a/google/cloud/bigquery/v2/minimal/internal/job_logging.cc b/google/cloud/bigquery/v2/minimal/internal/job_logging.cc index 83c2624e3883d..002b76801f95b 100644 --- a/google/cloud/bigquery/v2/minimal/internal/job_logging.cc +++ b/google/cloud/bigquery/v2/minimal/internal/job_logging.cc @@ -16,9 +16,9 @@ #include "google/cloud/bigquery/v2/minimal/internal/job_logging.h" #include "google/cloud/bigquery/v2/minimal/internal/log_wrapper.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_join.h" namespace google { namespace cloud { diff --git a/google/cloud/bigquery/v2/minimal/internal/job_metadata.cc b/google/cloud/bigquery/v2/minimal/internal/job_metadata.cc index 8d63fce3d66ff..27ba9e78debd4 100644 --- a/google/cloud/bigquery/v2/minimal/internal/job_metadata.cc +++ b/google/cloud/bigquery/v2/minimal/internal/job_metadata.cc @@ -16,9 +16,9 @@ #include "google/cloud/bigquery/v2/minimal/internal/job_metadata.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/api_client_header.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include diff --git a/google/cloud/bigquery/v2/minimal/internal/job_request.cc b/google/cloud/bigquery/v2/minimal/internal/job_request.cc index d8a7d3bdf1afb..0c2063e936368 100644 --- a/google/cloud/bigquery/v2/minimal/internal/job_request.cc +++ b/google/cloud/bigquery/v2/minimal/internal/job_request.cc @@ -17,11 +17,11 @@ #include "google/cloud/bigquery/v2/minimal/internal/json_utils.h" #include "google/cloud/bigquery/v2/minimal/internal/rest_stub_utils.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/debug_string.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/status.h" #include "absl/strings/match.h" +#include "absl/strings/str_cat.h" #include namespace google { diff --git a/google/cloud/bigquery/v2/minimal/internal/job_request_test.cc b/google/cloud/bigquery/v2/minimal/internal/job_request_test.cc index 7b4de78b1de11..3e27d9b18ee72 100644 --- a/google/cloud/bigquery/v2/minimal/internal/job_request_test.cc +++ b/google/cloud/bigquery/v2/minimal/internal/job_request_test.cc @@ -16,10 +16,10 @@ #include "google/cloud/bigquery/v2/minimal/testing/job_query_test_utils.h" #include "google/cloud/bigquery/v2/minimal/testing/job_test_utils.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/format_time_point.h" #include "google/cloud/options.h" #include "google/cloud/testing_util/status_matchers.h" +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/bigquery/v2/minimal/internal/job_response.cc b/google/cloud/bigquery/v2/minimal/internal/job_response.cc index 3eb2633f5bd8f..1c00a4fa072d0 100644 --- a/google/cloud/bigquery/v2/minimal/internal/job_response.cc +++ b/google/cloud/bigquery/v2/minimal/internal/job_response.cc @@ -14,9 +14,9 @@ #include "google/cloud/bigquery/v2/minimal/internal/job_response.h" #include "google/cloud/bigquery/v2/minimal/internal/json_utils.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/debug_string.h" #include "google/cloud/internal/make_status.h" +#include "absl/strings/str_cat.h" namespace google { namespace cloud { diff --git a/google/cloud/bigquery/v2/minimal/internal/job_rest_stub.cc b/google/cloud/bigquery/v2/minimal/internal/job_rest_stub.cc index b6edf81c97f01..6f0036f6cad4a 100644 --- a/google/cloud/bigquery/v2/minimal/internal/job_rest_stub.cc +++ b/google/cloud/bigquery/v2/minimal/internal/job_rest_stub.cc @@ -14,9 +14,9 @@ #include "google/cloud/bigquery/v2/minimal/internal/job_rest_stub.h" #include "google/cloud/bigquery/v2/minimal/internal/rest_stub_utils.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_join.h" #include namespace google { diff --git a/google/cloud/bigquery/v2/minimal/internal/log_wrapper.h b/google/cloud/bigquery/v2/minimal/internal/log_wrapper.h index aeaaa660bd0a2..2337435bbf05a 100644 --- a/google/cloud/bigquery/v2/minimal/internal/log_wrapper.h +++ b/google/cloud/bigquery/v2/minimal/internal/log_wrapper.h @@ -15,12 +15,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_V2_MINIMAL_INTERNAL_LOG_WRAPPER_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_V2_MINIMAL_INTERNAL_LOG_WRAPPER_H -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/debug_string.h" #include "google/cloud/internal/invoke_result.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/log.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_join.h" #include "absl/strings/string_view.h" namespace google { diff --git a/google/cloud/bigquery/v2/minimal/internal/project_metadata.cc b/google/cloud/bigquery/v2/minimal/internal/project_metadata.cc index 834fd64ffe746..26fb30c156b31 100644 --- a/google/cloud/bigquery/v2/minimal/internal/project_metadata.cc +++ b/google/cloud/bigquery/v2/minimal/internal/project_metadata.cc @@ -16,8 +16,8 @@ #include "google/cloud/bigquery/v2/minimal/internal/project_metadata.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/api_client_header.h" +#include "absl/strings/str_join.h" #include #include diff --git a/google/cloud/bigquery/v2/minimal/internal/project_request.cc b/google/cloud/bigquery/v2/minimal/internal/project_request.cc index e207bf5a8465e..130b6410487fd 100644 --- a/google/cloud/bigquery/v2/minimal/internal/project_request.cc +++ b/google/cloud/bigquery/v2/minimal/internal/project_request.cc @@ -15,12 +15,12 @@ #include "google/cloud/bigquery/v2/minimal/internal/project_request.h" #include "google/cloud/bigquery/v2/minimal/internal/rest_stub_utils.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/debug_string.h" #include "google/cloud/internal/format_time_point.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/status.h" #include "absl/strings/match.h" +#include "absl/strings/str_cat.h" namespace google { namespace cloud { diff --git a/google/cloud/bigquery/v2/minimal/internal/project_request_test.cc b/google/cloud/bigquery/v2/minimal/internal/project_request_test.cc index 0eac637677825..7d836349d1d3c 100644 --- a/google/cloud/bigquery/v2/minimal/internal/project_request_test.cc +++ b/google/cloud/bigquery/v2/minimal/internal/project_request_test.cc @@ -14,10 +14,10 @@ #include "google/cloud/bigquery/v2/minimal/internal/project_request.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/format_time_point.h" #include "google/cloud/options.h" #include "google/cloud/testing_util/status_matchers.h" +#include "absl/strings/str_cat.h" #include namespace google { diff --git a/google/cloud/bigquery/v2/minimal/internal/project_response.cc b/google/cloud/bigquery/v2/minimal/internal/project_response.cc index 122160c8a01d2..b1bf86ad7932b 100644 --- a/google/cloud/bigquery/v2/minimal/internal/project_response.cc +++ b/google/cloud/bigquery/v2/minimal/internal/project_response.cc @@ -13,10 +13,10 @@ // limitations under the License. #include "google/cloud/bigquery/v2/minimal/internal/project_response.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/debug_string.h" #include "google/cloud/internal/make_status.h" #include "absl/strings/numbers.h" +#include "absl/strings/str_cat.h" namespace google { namespace cloud { diff --git a/google/cloud/bigquery/v2/minimal/internal/rest_stub_utils.cc b/google/cloud/bigquery/v2/minimal/internal/rest_stub_utils.cc index 8c1fb5c534a88..c58851bb618eb 100644 --- a/google/cloud/bigquery/v2/minimal/internal/rest_stub_utils.cc +++ b/google/cloud/bigquery/v2/minimal/internal/rest_stub_utils.cc @@ -14,8 +14,8 @@ #include "google/cloud/bigquery/v2/minimal/internal/rest_stub_utils.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "absl/strings/match.h" +#include "absl/strings/str_cat.h" namespace google { namespace cloud { diff --git a/google/cloud/bigquery/v2/minimal/internal/rest_stub_utils.h b/google/cloud/bigquery/v2/minimal/internal/rest_stub_utils.h index c0d12fc650af5..ca0762f1a05b1 100644 --- a/google/cloud/bigquery/v2/minimal/internal/rest_stub_utils.h +++ b/google/cloud/bigquery/v2/minimal/internal/rest_stub_utils.h @@ -16,10 +16,10 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERY_V2_MINIMAL_INTERNAL_REST_STUB_UTILS_H #include "google/cloud/bigquery/v2/minimal/internal/bigquery_http_response.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/internal/rest_request.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_join.h" namespace google { namespace cloud { diff --git a/google/cloud/bigquery/v2/minimal/internal/table_logging.cc b/google/cloud/bigquery/v2/minimal/internal/table_logging.cc index 87871324547ca..18e9750c3fac3 100644 --- a/google/cloud/bigquery/v2/minimal/internal/table_logging.cc +++ b/google/cloud/bigquery/v2/minimal/internal/table_logging.cc @@ -14,11 +14,11 @@ #include "google/cloud/bigquery/v2/minimal/internal/table_logging.h" #include "google/cloud/bigquery/v2/minimal/internal/log_wrapper.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/invoke_result.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/log.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_join.h" #include "absl/strings/string_view.h" namespace google { diff --git a/google/cloud/bigquery/v2/minimal/internal/table_metadata.cc b/google/cloud/bigquery/v2/minimal/internal/table_metadata.cc index 6ac4b345b2961..ac5415aa36bd0 100644 --- a/google/cloud/bigquery/v2/minimal/internal/table_metadata.cc +++ b/google/cloud/bigquery/v2/minimal/internal/table_metadata.cc @@ -16,9 +16,9 @@ #include "google/cloud/bigquery/v2/minimal/internal/table_metadata.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/api_client_header.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include diff --git a/google/cloud/bigquery/v2/minimal/internal/table_request.cc b/google/cloud/bigquery/v2/minimal/internal/table_request.cc index 6cc59ad428890..1ec05597cf28f 100644 --- a/google/cloud/bigquery/v2/minimal/internal/table_request.cc +++ b/google/cloud/bigquery/v2/minimal/internal/table_request.cc @@ -15,12 +15,12 @@ #include "google/cloud/bigquery/v2/minimal/internal/table_request.h" #include "google/cloud/bigquery/v2/minimal/internal/rest_stub_utils.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/debug_string.h" #include "google/cloud/internal/format_time_point.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/status.h" #include "absl/strings/match.h" +#include "absl/strings/str_cat.h" namespace google { namespace cloud { diff --git a/google/cloud/bigquery/v2/minimal/internal/table_request_test.cc b/google/cloud/bigquery/v2/minimal/internal/table_request_test.cc index aa1c730a5efdd..0b4e1d7fb6b02 100644 --- a/google/cloud/bigquery/v2/minimal/internal/table_request_test.cc +++ b/google/cloud/bigquery/v2/minimal/internal/table_request_test.cc @@ -14,10 +14,10 @@ #include "google/cloud/bigquery/v2/minimal/internal/table_request.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/format_time_point.h" #include "google/cloud/options.h" #include "google/cloud/testing_util/status_matchers.h" +#include "absl/strings/str_cat.h" #include namespace google { diff --git a/google/cloud/bigquery/v2/minimal/internal/table_response.cc b/google/cloud/bigquery/v2/minimal/internal/table_response.cc index d274a8f73b16a..18b12e0600620 100644 --- a/google/cloud/bigquery/v2/minimal/internal/table_response.cc +++ b/google/cloud/bigquery/v2/minimal/internal/table_response.cc @@ -13,10 +13,10 @@ // limitations under the License. #include "google/cloud/bigquery/v2/minimal/internal/table_response.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/debug_string.h" #include "google/cloud/internal/make_status.h" #include "absl/strings/numbers.h" +#include "absl/strings/str_cat.h" namespace google { namespace cloud { diff --git a/google/cloud/bigquery/v2/minimal/internal/table_rest_stub.cc b/google/cloud/bigquery/v2/minimal/internal/table_rest_stub.cc index 89c5641c4a8ab..715e0ba87e072 100644 --- a/google/cloud/bigquery/v2/minimal/internal/table_rest_stub.cc +++ b/google/cloud/bigquery/v2/minimal/internal/table_rest_stub.cc @@ -14,9 +14,9 @@ #include "google/cloud/bigquery/v2/minimal/internal/table_rest_stub.h" #include "google/cloud/bigquery/v2/minimal/internal/rest_stub_utils.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_join.h" namespace google { namespace cloud { diff --git a/google/cloud/bigquerycontrol/BUILD.bazel b/google/cloud/bigquerycontrol/BUILD.bazel index b14edb09ad7c2..812cb093dcca5 100644 --- a/google/cloud/bigquerycontrol/BUILD.bazel +++ b/google/cloud/bigquerycontrol/BUILD.bazel @@ -25,7 +25,7 @@ service_dirs = [ src_dirs = service_dirs + [d + "internal/" for d in service_dirs] googleapis_deps = [ - "@com_google_googleapis//google/cloud/bigquery/v2:bigquery_cc_proto", + "@googleapis//google/cloud/bigquery/v2:bigquery_cc_proto", ] cc_gapic_library( diff --git a/google/cloud/bigquerycontrol/quickstart/.bazelrc b/google/cloud/bigquerycontrol/quickstart/.bazelrc index 15d5c055db074..343e7f623d628 100644 --- a/google/cloud/bigquerycontrol/quickstart/.bazelrc +++ b/google/cloud/bigquerycontrol/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/bigquerycontrol/quickstart/CMakeLists.txt b/google/cloud/bigquerycontrol/quickstart/CMakeLists.txt index 665715bcc9c3b..10e1235254bca 100644 --- a/google/cloud/bigquerycontrol/quickstart/CMakeLists.txt +++ b/google/cloud/bigquerycontrol/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the BigQuery API C++ client library from a larger # CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-bigquerycontrol-quickstart CXX) find_package(google_cloud_cpp_bigquerycontrol REQUIRED) diff --git a/google/cloud/bigquerycontrol/v2/dataset_connection.h b/google/cloud/bigquerycontrol/v2/dataset_connection.h index 0be5bdab45456..cd3b94b953285 100644 --- a/google/cloud/bigquerycontrol/v2/dataset_connection.h +++ b/google/cloud/bigquerycontrol/v2/dataset_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_DATASET_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_DATASET_CONNECTION_H +#include "google/cloud/bigquery/v2/dataset.pb.h" #include "google/cloud/bigquerycontrol/v2/dataset_connection_idempotency_policy.h" #include "google/cloud/bigquerycontrol/v2/internal/dataset_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquerycontrol/v2/dataset_connection_idempotency_policy.h b/google/cloud/bigquerycontrol/v2/dataset_connection_idempotency_policy.h index 8164426b20c7e..af5a8fb6bde5a 100644 --- a/google/cloud/bigquerycontrol/v2/dataset_connection_idempotency_policy.h +++ b/google/cloud/bigquerycontrol/v2/dataset_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_DATASET_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_DATASET_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/bigquery/v2/dataset.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquerycontrol/v2/internal/dataset_option_defaults.cc b/google/cloud/bigquerycontrol/v2/internal/dataset_option_defaults.cc index 19f6e15aa8392..7d5446c1a8268 100644 --- a/google/cloud/bigquerycontrol/v2/internal/dataset_option_defaults.cc +++ b/google/cloud/bigquerycontrol/v2/internal/dataset_option_defaults.cc @@ -41,7 +41,7 @@ Options DatasetServiceDefaultOptions(Options options) { if (!options.has()) { options.set( bigquerycontrol_v2::DatasetServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/bigquerycontrol/v2/internal/dataset_rest_logging_decorator.h b/google/cloud/bigquerycontrol/v2/internal/dataset_rest_logging_decorator.h index be6d2cd75efc2..44f45eacff711 100644 --- a/google/cloud/bigquerycontrol/v2/internal/dataset_rest_logging_decorator.h +++ b/google/cloud/bigquerycontrol/v2/internal/dataset_rest_logging_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_DATASET_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_DATASET_REST_LOGGING_DECORATOR_H +#include "google/cloud/bigquery/v2/dataset.pb.h" #include "google/cloud/bigquerycontrol/v2/internal/dataset_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include #include #include #include diff --git a/google/cloud/bigquerycontrol/v2/internal/dataset_rest_metadata_decorator.cc b/google/cloud/bigquerycontrol/v2/internal/dataset_rest_metadata_decorator.cc index cf91d2a9faf0e..415696dca2a0f 100644 --- a/google/cloud/bigquerycontrol/v2/internal/dataset_rest_metadata_decorator.cc +++ b/google/cloud/bigquerycontrol/v2/internal/dataset_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/bigquery/v2/dataset.proto #include "google/cloud/bigquerycontrol/v2/internal/dataset_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/bigquerycontrol/v2/internal/dataset_rest_metadata_decorator.h b/google/cloud/bigquerycontrol/v2/internal/dataset_rest_metadata_decorator.h index 48b20e28f89d1..da3b6686875aa 100644 --- a/google/cloud/bigquerycontrol/v2/internal/dataset_rest_metadata_decorator.h +++ b/google/cloud/bigquerycontrol/v2/internal/dataset_rest_metadata_decorator.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_DATASET_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_DATASET_REST_METADATA_DECORATOR_H +#include "google/cloud/bigquery/v2/dataset.pb.h" #include "google/cloud/bigquerycontrol/v2/internal/dataset_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/bigquerycontrol/v2/internal/dataset_rest_stub.cc b/google/cloud/bigquerycontrol/v2/internal/dataset_rest_stub.cc index fb48a231fdd16..b8a862c958665 100644 --- a/google/cloud/bigquerycontrol/v2/internal/dataset_rest_stub.cc +++ b/google/cloud/bigquerycontrol/v2/internal/dataset_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/bigquery/v2/dataset.proto #include "google/cloud/bigquerycontrol/v2/internal/dataset_rest_stub.h" +#include "google/cloud/bigquery/v2/dataset.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/bigquerycontrol/v2/internal/dataset_rest_stub.h b/google/cloud/bigquerycontrol/v2/internal/dataset_rest_stub.h index db840d5c3a11c..1a1c2629619fd 100644 --- a/google/cloud/bigquerycontrol/v2/internal/dataset_rest_stub.h +++ b/google/cloud/bigquerycontrol/v2/internal/dataset_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_DATASET_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_DATASET_REST_STUB_H +#include "google/cloud/bigquery/v2/dataset.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquerycontrol/v2/internal/dataset_tracing_connection.cc b/google/cloud/bigquerycontrol/v2/internal/dataset_tracing_connection.cc index 87ecb9c487b9a..92e74db4bceae 100644 --- a/google/cloud/bigquerycontrol/v2/internal/dataset_tracing_connection.cc +++ b/google/cloud/bigquerycontrol/v2/internal/dataset_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace bigquerycontrol_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DatasetServiceTracingConnection::DatasetServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -98,16 +96,12 @@ DatasetServiceTracingConnection::UndeleteDataset( return internal::EndSpan(*span, child_->UndeleteDataset(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDatasetServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/bigquerycontrol/v2/internal/dataset_tracing_connection.h b/google/cloud/bigquerycontrol/v2/internal/dataset_tracing_connection.h index ebdc5cac1aa84..363d105f80caa 100644 --- a/google/cloud/bigquerycontrol/v2/internal/dataset_tracing_connection.h +++ b/google/cloud/bigquerycontrol/v2/internal/dataset_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace bigquerycontrol_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DatasetServiceTracingConnection : public bigquerycontrol_v2::DatasetServiceConnection { public: @@ -69,8 +67,6 @@ class DatasetServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/bigquerycontrol/v2/internal/job_option_defaults.cc b/google/cloud/bigquerycontrol/v2/internal/job_option_defaults.cc index e0a80e194ec05..1bd1b480cca76 100644 --- a/google/cloud/bigquerycontrol/v2/internal/job_option_defaults.cc +++ b/google/cloud/bigquerycontrol/v2/internal/job_option_defaults.cc @@ -41,7 +41,7 @@ Options JobServiceDefaultOptions(Options options) { if (!options.has()) { options.set( bigquerycontrol_v2::JobServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/bigquerycontrol/v2/internal/job_rest_logging_decorator.h b/google/cloud/bigquerycontrol/v2/internal/job_rest_logging_decorator.h index 1eba27bd9b1b4..4f211669d1cf8 100644 --- a/google/cloud/bigquerycontrol/v2/internal/job_rest_logging_decorator.h +++ b/google/cloud/bigquerycontrol/v2/internal/job_rest_logging_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_JOB_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_JOB_REST_LOGGING_DECORATOR_H +#include "google/cloud/bigquery/v2/job.pb.h" #include "google/cloud/bigquerycontrol/v2/internal/job_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include #include #include #include diff --git a/google/cloud/bigquerycontrol/v2/internal/job_rest_metadata_decorator.cc b/google/cloud/bigquerycontrol/v2/internal/job_rest_metadata_decorator.cc index a8483fdbe8863..13063d40fa624 100644 --- a/google/cloud/bigquerycontrol/v2/internal/job_rest_metadata_decorator.cc +++ b/google/cloud/bigquerycontrol/v2/internal/job_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/bigquery/v2/job.proto #include "google/cloud/bigquerycontrol/v2/internal/job_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/bigquerycontrol/v2/internal/job_rest_metadata_decorator.h b/google/cloud/bigquerycontrol/v2/internal/job_rest_metadata_decorator.h index 0f4e68970e457..b4386102d45d9 100644 --- a/google/cloud/bigquerycontrol/v2/internal/job_rest_metadata_decorator.h +++ b/google/cloud/bigquerycontrol/v2/internal/job_rest_metadata_decorator.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_JOB_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_JOB_REST_METADATA_DECORATOR_H +#include "google/cloud/bigquery/v2/job.pb.h" #include "google/cloud/bigquerycontrol/v2/internal/job_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/bigquerycontrol/v2/internal/job_rest_stub.cc b/google/cloud/bigquerycontrol/v2/internal/job_rest_stub.cc index 2a468e833894e..d8e00d129c4e7 100644 --- a/google/cloud/bigquerycontrol/v2/internal/job_rest_stub.cc +++ b/google/cloud/bigquerycontrol/v2/internal/job_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/bigquery/v2/job.proto #include "google/cloud/bigquerycontrol/v2/internal/job_rest_stub.h" +#include "google/cloud/bigquery/v2/job.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/bigquerycontrol/v2/internal/job_rest_stub.h b/google/cloud/bigquerycontrol/v2/internal/job_rest_stub.h index a6b24b0a50bec..cf99f90548137 100644 --- a/google/cloud/bigquerycontrol/v2/internal/job_rest_stub.h +++ b/google/cloud/bigquerycontrol/v2/internal/job_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_JOB_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_JOB_REST_STUB_H +#include "google/cloud/bigquery/v2/job.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquerycontrol/v2/internal/job_tracing_connection.cc b/google/cloud/bigquerycontrol/v2/internal/job_tracing_connection.cc index 8a9e1763deee2..a3c4b317d13e6 100644 --- a/google/cloud/bigquerycontrol/v2/internal/job_tracing_connection.cc +++ b/google/cloud/bigquerycontrol/v2/internal/job_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace bigquerycontrol_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - JobServiceTracingConnection::JobServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -97,16 +95,12 @@ JobServiceTracingConnection::Query( return internal::EndSpan(*span, child_->Query(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeJobServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/bigquerycontrol/v2/internal/job_tracing_connection.h b/google/cloud/bigquerycontrol/v2/internal/job_tracing_connection.h index ef7c3a0938506..64e4d7362e59a 100644 --- a/google/cloud/bigquerycontrol/v2/internal/job_tracing_connection.h +++ b/google/cloud/bigquerycontrol/v2/internal/job_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace bigquerycontrol_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class JobServiceTracingConnection : public bigquerycontrol_v2::JobServiceConnection { public: @@ -66,8 +64,6 @@ class JobServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/bigquerycontrol/v2/internal/model_option_defaults.cc b/google/cloud/bigquerycontrol/v2/internal/model_option_defaults.cc index cc610f4b79926..788f269e36ee7 100644 --- a/google/cloud/bigquerycontrol/v2/internal/model_option_defaults.cc +++ b/google/cloud/bigquerycontrol/v2/internal/model_option_defaults.cc @@ -41,7 +41,7 @@ Options ModelServiceDefaultOptions(Options options) { if (!options.has()) { options.set( bigquerycontrol_v2::ModelServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/bigquerycontrol/v2/internal/model_rest_logging_decorator.h b/google/cloud/bigquerycontrol/v2/internal/model_rest_logging_decorator.h index 45a6739f5fb26..f9f3ee58221d3 100644 --- a/google/cloud/bigquerycontrol/v2/internal/model_rest_logging_decorator.h +++ b/google/cloud/bigquerycontrol/v2/internal/model_rest_logging_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_MODEL_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_MODEL_REST_LOGGING_DECORATOR_H +#include "google/cloud/bigquery/v2/model.pb.h" #include "google/cloud/bigquerycontrol/v2/internal/model_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include #include #include #include diff --git a/google/cloud/bigquerycontrol/v2/internal/model_rest_metadata_decorator.cc b/google/cloud/bigquerycontrol/v2/internal/model_rest_metadata_decorator.cc index fdbc039a95da0..1da685d2bd5cf 100644 --- a/google/cloud/bigquerycontrol/v2/internal/model_rest_metadata_decorator.cc +++ b/google/cloud/bigquerycontrol/v2/internal/model_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/bigquery/v2/model.proto #include "google/cloud/bigquerycontrol/v2/internal/model_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/bigquerycontrol/v2/internal/model_rest_metadata_decorator.h b/google/cloud/bigquerycontrol/v2/internal/model_rest_metadata_decorator.h index 276fcd27e64c0..b2b41a7754aa0 100644 --- a/google/cloud/bigquerycontrol/v2/internal/model_rest_metadata_decorator.h +++ b/google/cloud/bigquerycontrol/v2/internal/model_rest_metadata_decorator.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_MODEL_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_MODEL_REST_METADATA_DECORATOR_H +#include "google/cloud/bigquery/v2/model.pb.h" #include "google/cloud/bigquerycontrol/v2/internal/model_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/bigquerycontrol/v2/internal/model_rest_stub.cc b/google/cloud/bigquerycontrol/v2/internal/model_rest_stub.cc index b9026b7d2deab..c6115bc24ed23 100644 --- a/google/cloud/bigquerycontrol/v2/internal/model_rest_stub.cc +++ b/google/cloud/bigquerycontrol/v2/internal/model_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/bigquery/v2/model.proto #include "google/cloud/bigquerycontrol/v2/internal/model_rest_stub.h" +#include "google/cloud/bigquery/v2/model.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/bigquerycontrol/v2/internal/model_rest_stub.h b/google/cloud/bigquerycontrol/v2/internal/model_rest_stub.h index 80c9500815477..7dc939094813d 100644 --- a/google/cloud/bigquerycontrol/v2/internal/model_rest_stub.h +++ b/google/cloud/bigquerycontrol/v2/internal/model_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_MODEL_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_MODEL_REST_STUB_H +#include "google/cloud/bigquery/v2/model.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquerycontrol/v2/internal/model_tracing_connection.cc b/google/cloud/bigquerycontrol/v2/internal/model_tracing_connection.cc index 18abd8120a067..203fffb0273cd 100644 --- a/google/cloud/bigquerycontrol/v2/internal/model_tracing_connection.cc +++ b/google/cloud/bigquerycontrol/v2/internal/model_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace bigquerycontrol_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ModelServiceTracingConnection::ModelServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -70,16 +68,12 @@ Status ModelServiceTracingConnection::DeleteModel( return internal::EndSpan(*span, child_->DeleteModel(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeModelServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/bigquerycontrol/v2/internal/model_tracing_connection.h b/google/cloud/bigquerycontrol/v2/internal/model_tracing_connection.h index c52362bb6f7f4..9cca8bd487294 100644 --- a/google/cloud/bigquerycontrol/v2/internal/model_tracing_connection.h +++ b/google/cloud/bigquerycontrol/v2/internal/model_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace bigquerycontrol_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ModelServiceTracingConnection : public bigquerycontrol_v2::ModelServiceConnection { public: @@ -56,8 +54,6 @@ class ModelServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/bigquerycontrol/v2/internal/project_option_defaults.cc b/google/cloud/bigquerycontrol/v2/internal/project_option_defaults.cc index 73ecab1c6ae72..e8244eb1af57a 100644 --- a/google/cloud/bigquerycontrol/v2/internal/project_option_defaults.cc +++ b/google/cloud/bigquerycontrol/v2/internal/project_option_defaults.cc @@ -41,7 +41,7 @@ Options ProjectServiceDefaultOptions(Options options) { if (!options.has()) { options.set( bigquerycontrol_v2::ProjectServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/bigquerycontrol/v2/internal/project_rest_logging_decorator.h b/google/cloud/bigquerycontrol/v2/internal/project_rest_logging_decorator.h index b066836a55368..d5d545b4d0f1b 100644 --- a/google/cloud/bigquerycontrol/v2/internal/project_rest_logging_decorator.h +++ b/google/cloud/bigquerycontrol/v2/internal/project_rest_logging_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_PROJECT_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_PROJECT_REST_LOGGING_DECORATOR_H +#include "google/cloud/bigquery/v2/project.pb.h" #include "google/cloud/bigquerycontrol/v2/internal/project_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include #include #include #include diff --git a/google/cloud/bigquerycontrol/v2/internal/project_rest_metadata_decorator.cc b/google/cloud/bigquerycontrol/v2/internal/project_rest_metadata_decorator.cc index 3efb814ccebef..c538869322e31 100644 --- a/google/cloud/bigquerycontrol/v2/internal/project_rest_metadata_decorator.cc +++ b/google/cloud/bigquerycontrol/v2/internal/project_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/bigquery/v2/project.proto #include "google/cloud/bigquerycontrol/v2/internal/project_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/bigquerycontrol/v2/internal/project_rest_metadata_decorator.h b/google/cloud/bigquerycontrol/v2/internal/project_rest_metadata_decorator.h index 1a56cf3da9a90..a56693988e4d5 100644 --- a/google/cloud/bigquerycontrol/v2/internal/project_rest_metadata_decorator.h +++ b/google/cloud/bigquerycontrol/v2/internal/project_rest_metadata_decorator.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_PROJECT_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_PROJECT_REST_METADATA_DECORATOR_H +#include "google/cloud/bigquery/v2/project.pb.h" #include "google/cloud/bigquerycontrol/v2/internal/project_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/bigquerycontrol/v2/internal/project_rest_stub.cc b/google/cloud/bigquerycontrol/v2/internal/project_rest_stub.cc index 4f6d6d9ef4b37..9fadfda343b31 100644 --- a/google/cloud/bigquerycontrol/v2/internal/project_rest_stub.cc +++ b/google/cloud/bigquerycontrol/v2/internal/project_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/bigquery/v2/project.proto #include "google/cloud/bigquerycontrol/v2/internal/project_rest_stub.h" +#include "google/cloud/bigquery/v2/project.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/bigquerycontrol/v2/internal/project_rest_stub.h b/google/cloud/bigquerycontrol/v2/internal/project_rest_stub.h index 4d5f357cd33d8..d3c67125bfc51 100644 --- a/google/cloud/bigquerycontrol/v2/internal/project_rest_stub.h +++ b/google/cloud/bigquerycontrol/v2/internal/project_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_PROJECT_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_PROJECT_REST_STUB_H +#include "google/cloud/bigquery/v2/project.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquerycontrol/v2/internal/project_tracing_connection.cc b/google/cloud/bigquerycontrol/v2/internal/project_tracing_connection.cc index 113332042cd56..9d5a4c9dc7bcb 100644 --- a/google/cloud/bigquerycontrol/v2/internal/project_tracing_connection.cc +++ b/google/cloud/bigquerycontrol/v2/internal/project_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace bigquerycontrol_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ProjectServiceTracingConnection::ProjectServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -41,16 +39,12 @@ ProjectServiceTracingConnection::GetServiceAccount( return internal::EndSpan(*span, child_->GetServiceAccount(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeProjectServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/bigquerycontrol/v2/internal/project_tracing_connection.h b/google/cloud/bigquerycontrol/v2/internal/project_tracing_connection.h index 67da6620f2447..4e6262695b724 100644 --- a/google/cloud/bigquerycontrol/v2/internal/project_tracing_connection.h +++ b/google/cloud/bigquerycontrol/v2/internal/project_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace bigquerycontrol_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ProjectServiceTracingConnection : public bigquerycontrol_v2::ProjectServiceConnection { public: @@ -48,8 +46,6 @@ class ProjectServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/bigquerycontrol/v2/internal/routine_option_defaults.cc b/google/cloud/bigquerycontrol/v2/internal/routine_option_defaults.cc index ec8069532c7e3..65ec347cad9b0 100644 --- a/google/cloud/bigquerycontrol/v2/internal/routine_option_defaults.cc +++ b/google/cloud/bigquerycontrol/v2/internal/routine_option_defaults.cc @@ -41,7 +41,7 @@ Options RoutineServiceDefaultOptions(Options options) { if (!options.has()) { options.set( bigquerycontrol_v2::RoutineServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/bigquerycontrol/v2/internal/routine_rest_logging_decorator.h b/google/cloud/bigquerycontrol/v2/internal/routine_rest_logging_decorator.h index 525ea79ca371e..523d7df91b6fc 100644 --- a/google/cloud/bigquerycontrol/v2/internal/routine_rest_logging_decorator.h +++ b/google/cloud/bigquerycontrol/v2/internal/routine_rest_logging_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_ROUTINE_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_ROUTINE_REST_LOGGING_DECORATOR_H +#include "google/cloud/bigquery/v2/routine.pb.h" #include "google/cloud/bigquerycontrol/v2/internal/routine_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include #include #include #include diff --git a/google/cloud/bigquerycontrol/v2/internal/routine_rest_metadata_decorator.cc b/google/cloud/bigquerycontrol/v2/internal/routine_rest_metadata_decorator.cc index 447ffe61787b7..f0d3949dc7620 100644 --- a/google/cloud/bigquerycontrol/v2/internal/routine_rest_metadata_decorator.cc +++ b/google/cloud/bigquerycontrol/v2/internal/routine_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/bigquery/v2/routine.proto #include "google/cloud/bigquerycontrol/v2/internal/routine_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/bigquerycontrol/v2/internal/routine_rest_metadata_decorator.h b/google/cloud/bigquerycontrol/v2/internal/routine_rest_metadata_decorator.h index 10e66ff1765e5..7a4f3e10421aa 100644 --- a/google/cloud/bigquerycontrol/v2/internal/routine_rest_metadata_decorator.h +++ b/google/cloud/bigquerycontrol/v2/internal/routine_rest_metadata_decorator.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_ROUTINE_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_ROUTINE_REST_METADATA_DECORATOR_H +#include "google/cloud/bigquery/v2/routine.pb.h" #include "google/cloud/bigquerycontrol/v2/internal/routine_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/bigquerycontrol/v2/internal/routine_rest_stub.cc b/google/cloud/bigquerycontrol/v2/internal/routine_rest_stub.cc index 72352c8e1321f..c9ad589949846 100644 --- a/google/cloud/bigquerycontrol/v2/internal/routine_rest_stub.cc +++ b/google/cloud/bigquerycontrol/v2/internal/routine_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/bigquery/v2/routine.proto #include "google/cloud/bigquerycontrol/v2/internal/routine_rest_stub.h" +#include "google/cloud/bigquery/v2/routine.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/bigquerycontrol/v2/internal/routine_rest_stub.h b/google/cloud/bigquerycontrol/v2/internal/routine_rest_stub.h index 603ef30e5baf9..0570acb5a4ae8 100644 --- a/google/cloud/bigquerycontrol/v2/internal/routine_rest_stub.h +++ b/google/cloud/bigquerycontrol/v2/internal/routine_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_ROUTINE_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_ROUTINE_REST_STUB_H +#include "google/cloud/bigquery/v2/routine.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquerycontrol/v2/internal/routine_tracing_connection.cc b/google/cloud/bigquerycontrol/v2/internal/routine_tracing_connection.cc index f99fd3f60fa89..2473ccfcf97b7 100644 --- a/google/cloud/bigquerycontrol/v2/internal/routine_tracing_connection.cc +++ b/google/cloud/bigquerycontrol/v2/internal/routine_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace bigquerycontrol_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RoutineServiceTracingConnection::RoutineServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -76,16 +74,12 @@ RoutineServiceTracingConnection::ListRoutines( return internal::EndSpan(*span, child_->ListRoutines(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRoutineServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/bigquerycontrol/v2/internal/routine_tracing_connection.h b/google/cloud/bigquerycontrol/v2/internal/routine_tracing_connection.h index ba86a141ce091..43f00c2826ecb 100644 --- a/google/cloud/bigquerycontrol/v2/internal/routine_tracing_connection.h +++ b/google/cloud/bigquerycontrol/v2/internal/routine_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace bigquerycontrol_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RoutineServiceTracingConnection : public bigquerycontrol_v2::RoutineServiceConnection { public: @@ -61,8 +59,6 @@ class RoutineServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/bigquerycontrol/v2/internal/row_access_policy_option_defaults.cc b/google/cloud/bigquerycontrol/v2/internal/row_access_policy_option_defaults.cc index 7b48521e6a1d3..1e26994c770d8 100644 --- a/google/cloud/bigquerycontrol/v2/internal/row_access_policy_option_defaults.cc +++ b/google/cloud/bigquerycontrol/v2/internal/row_access_policy_option_defaults.cc @@ -43,7 +43,7 @@ Options RowAccessPolicyServiceDefaultOptions(Options options) { bigquerycontrol_v2::RowAccessPolicyServiceRetryPolicyOption>()) { options.set( bigquerycontrol_v2::RowAccessPolicyServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/bigquerycontrol/v2/internal/row_access_policy_rest_logging_decorator.h b/google/cloud/bigquerycontrol/v2/internal/row_access_policy_rest_logging_decorator.h index b54b416e26704..3dda5aca0f7eb 100644 --- a/google/cloud/bigquerycontrol/v2/internal/row_access_policy_rest_logging_decorator.h +++ b/google/cloud/bigquerycontrol/v2/internal/row_access_policy_rest_logging_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_ROW_ACCESS_POLICY_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_ROW_ACCESS_POLICY_REST_LOGGING_DECORATOR_H +#include "google/cloud/bigquery/v2/row_access_policy.pb.h" #include "google/cloud/bigquerycontrol/v2/internal/row_access_policy_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include #include #include #include diff --git a/google/cloud/bigquerycontrol/v2/internal/row_access_policy_rest_metadata_decorator.cc b/google/cloud/bigquerycontrol/v2/internal/row_access_policy_rest_metadata_decorator.cc index 1fa880f91f3c4..5229fae298713 100644 --- a/google/cloud/bigquerycontrol/v2/internal/row_access_policy_rest_metadata_decorator.cc +++ b/google/cloud/bigquerycontrol/v2/internal/row_access_policy_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/bigquery/v2/row_access_policy.proto #include "google/cloud/bigquerycontrol/v2/internal/row_access_policy_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/bigquerycontrol/v2/internal/row_access_policy_rest_metadata_decorator.h b/google/cloud/bigquerycontrol/v2/internal/row_access_policy_rest_metadata_decorator.h index 4b86362152ce0..3368a245ddc92 100644 --- a/google/cloud/bigquerycontrol/v2/internal/row_access_policy_rest_metadata_decorator.h +++ b/google/cloud/bigquerycontrol/v2/internal/row_access_policy_rest_metadata_decorator.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_ROW_ACCESS_POLICY_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_ROW_ACCESS_POLICY_REST_METADATA_DECORATOR_H +#include "google/cloud/bigquery/v2/row_access_policy.pb.h" #include "google/cloud/bigquerycontrol/v2/internal/row_access_policy_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/bigquerycontrol/v2/internal/row_access_policy_rest_stub.cc b/google/cloud/bigquerycontrol/v2/internal/row_access_policy_rest_stub.cc index ded2701fced02..bf5d12a223fba 100644 --- a/google/cloud/bigquerycontrol/v2/internal/row_access_policy_rest_stub.cc +++ b/google/cloud/bigquerycontrol/v2/internal/row_access_policy_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/bigquery/v2/row_access_policy.proto #include "google/cloud/bigquerycontrol/v2/internal/row_access_policy_rest_stub.h" +#include "google/cloud/bigquery/v2/row_access_policy.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/bigquerycontrol/v2/internal/row_access_policy_rest_stub.h b/google/cloud/bigquerycontrol/v2/internal/row_access_policy_rest_stub.h index 0dddc899a6749..789d7518c1835 100644 --- a/google/cloud/bigquerycontrol/v2/internal/row_access_policy_rest_stub.h +++ b/google/cloud/bigquerycontrol/v2/internal/row_access_policy_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_ROW_ACCESS_POLICY_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_ROW_ACCESS_POLICY_REST_STUB_H +#include "google/cloud/bigquery/v2/row_access_policy.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquerycontrol/v2/internal/row_access_policy_tracing_connection.cc b/google/cloud/bigquerycontrol/v2/internal/row_access_policy_tracing_connection.cc index 1cf3f5f289106..03ea8c5c150ae 100644 --- a/google/cloud/bigquerycontrol/v2/internal/row_access_policy_tracing_connection.cc +++ b/google/cloud/bigquerycontrol/v2/internal/row_access_policy_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace bigquerycontrol_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RowAccessPolicyServiceTracingConnection:: RowAccessPolicyServiceTracingConnection( std::shared_ptr @@ -98,18 +96,14 @@ Status RowAccessPolicyServiceTracingConnection::BatchDeleteRowAccessPolicies( child_->BatchDeleteRowAccessPolicies(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRowAccessPolicyServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/bigquerycontrol/v2/internal/row_access_policy_tracing_connection.h b/google/cloud/bigquerycontrol/v2/internal/row_access_policy_tracing_connection.h index 8d626efb1d3f1..d806aac91c459 100644 --- a/google/cloud/bigquerycontrol/v2/internal/row_access_policy_tracing_connection.h +++ b/google/cloud/bigquerycontrol/v2/internal/row_access_policy_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace bigquerycontrol_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RowAccessPolicyServiceTracingConnection : public bigquerycontrol_v2::RowAccessPolicyServiceConnection { public: @@ -70,8 +68,6 @@ class RowAccessPolicyServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/bigquerycontrol/v2/internal/table_option_defaults.cc b/google/cloud/bigquerycontrol/v2/internal/table_option_defaults.cc index 401bea12312ac..b46a3fa95c5e7 100644 --- a/google/cloud/bigquerycontrol/v2/internal/table_option_defaults.cc +++ b/google/cloud/bigquerycontrol/v2/internal/table_option_defaults.cc @@ -41,7 +41,7 @@ Options TableServiceDefaultOptions(Options options) { if (!options.has()) { options.set( bigquerycontrol_v2::TableServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/bigquerycontrol/v2/internal/table_rest_logging_decorator.h b/google/cloud/bigquerycontrol/v2/internal/table_rest_logging_decorator.h index 7b184514edb2e..71aa94654097d 100644 --- a/google/cloud/bigquerycontrol/v2/internal/table_rest_logging_decorator.h +++ b/google/cloud/bigquerycontrol/v2/internal/table_rest_logging_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_TABLE_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_TABLE_REST_LOGGING_DECORATOR_H +#include "google/cloud/bigquery/v2/table.pb.h" #include "google/cloud/bigquerycontrol/v2/internal/table_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include #include #include #include diff --git a/google/cloud/bigquerycontrol/v2/internal/table_rest_metadata_decorator.cc b/google/cloud/bigquerycontrol/v2/internal/table_rest_metadata_decorator.cc index 6d4270136ea1e..a8964e84a4dbf 100644 --- a/google/cloud/bigquerycontrol/v2/internal/table_rest_metadata_decorator.cc +++ b/google/cloud/bigquerycontrol/v2/internal/table_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/bigquery/v2/table.proto #include "google/cloud/bigquerycontrol/v2/internal/table_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/bigquerycontrol/v2/internal/table_rest_metadata_decorator.h b/google/cloud/bigquerycontrol/v2/internal/table_rest_metadata_decorator.h index 9a211d82c37aa..0f65a512be563 100644 --- a/google/cloud/bigquerycontrol/v2/internal/table_rest_metadata_decorator.h +++ b/google/cloud/bigquerycontrol/v2/internal/table_rest_metadata_decorator.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_TABLE_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_TABLE_REST_METADATA_DECORATOR_H +#include "google/cloud/bigquery/v2/table.pb.h" #include "google/cloud/bigquerycontrol/v2/internal/table_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/bigquerycontrol/v2/internal/table_rest_stub.cc b/google/cloud/bigquerycontrol/v2/internal/table_rest_stub.cc index 1651c276dfcd1..acdc81a8d5adb 100644 --- a/google/cloud/bigquerycontrol/v2/internal/table_rest_stub.cc +++ b/google/cloud/bigquerycontrol/v2/internal/table_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/bigquery/v2/table.proto #include "google/cloud/bigquerycontrol/v2/internal/table_rest_stub.h" +#include "google/cloud/bigquery/v2/table.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/bigquerycontrol/v2/internal/table_rest_stub.h b/google/cloud/bigquerycontrol/v2/internal/table_rest_stub.h index 96418d11764f1..1261b7c246a9f 100644 --- a/google/cloud/bigquerycontrol/v2/internal/table_rest_stub.h +++ b/google/cloud/bigquerycontrol/v2/internal/table_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_TABLE_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_INTERNAL_TABLE_REST_STUB_H +#include "google/cloud/bigquery/v2/table.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquerycontrol/v2/internal/table_tracing_connection.cc b/google/cloud/bigquerycontrol/v2/internal/table_tracing_connection.cc index 18013c77ed2d7..4d488cff65d25 100644 --- a/google/cloud/bigquerycontrol/v2/internal/table_tracing_connection.cc +++ b/google/cloud/bigquerycontrol/v2/internal/table_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace bigquerycontrol_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TableServiceTracingConnection::TableServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -89,16 +87,12 @@ TableServiceTracingConnection::ListTables( std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTableServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/bigquerycontrol/v2/internal/table_tracing_connection.h b/google/cloud/bigquerycontrol/v2/internal/table_tracing_connection.h index 6c1402e4ec595..91fa030e7bedd 100644 --- a/google/cloud/bigquerycontrol/v2/internal/table_tracing_connection.h +++ b/google/cloud/bigquerycontrol/v2/internal/table_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace bigquerycontrol_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TableServiceTracingConnection : public bigquerycontrol_v2::TableServiceConnection { public: @@ -64,8 +62,6 @@ class TableServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/bigquerycontrol/v2/job_connection.h b/google/cloud/bigquerycontrol/v2/job_connection.h index df5c6f314ae42..9fd0248aa1df1 100644 --- a/google/cloud/bigquerycontrol/v2/job_connection.h +++ b/google/cloud/bigquerycontrol/v2/job_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_JOB_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_JOB_CONNECTION_H +#include "google/cloud/bigquery/v2/job.pb.h" #include "google/cloud/bigquerycontrol/v2/internal/job_retry_traits.h" #include "google/cloud/bigquerycontrol/v2/job_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquerycontrol/v2/job_connection_idempotency_policy.h b/google/cloud/bigquerycontrol/v2/job_connection_idempotency_policy.h index da0e540de1446..d16aed54efac7 100644 --- a/google/cloud/bigquerycontrol/v2/job_connection_idempotency_policy.h +++ b/google/cloud/bigquerycontrol/v2/job_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_JOB_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_JOB_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/bigquery/v2/job.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquerycontrol/v2/model_connection.h b/google/cloud/bigquerycontrol/v2/model_connection.h index d005e455f1e78..673034c579ecc 100644 --- a/google/cloud/bigquerycontrol/v2/model_connection.h +++ b/google/cloud/bigquerycontrol/v2/model_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_MODEL_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_MODEL_CONNECTION_H +#include "google/cloud/bigquery/v2/model.pb.h" #include "google/cloud/bigquerycontrol/v2/internal/model_retry_traits.h" #include "google/cloud/bigquerycontrol/v2/model_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquerycontrol/v2/model_connection_idempotency_policy.h b/google/cloud/bigquerycontrol/v2/model_connection_idempotency_policy.h index 671763178a993..ec387f7302243 100644 --- a/google/cloud/bigquerycontrol/v2/model_connection_idempotency_policy.h +++ b/google/cloud/bigquerycontrol/v2/model_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_MODEL_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_MODEL_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/bigquery/v2/model.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquerycontrol/v2/project_connection.h b/google/cloud/bigquerycontrol/v2/project_connection.h index 072718c4f216a..f22264e9b3707 100644 --- a/google/cloud/bigquerycontrol/v2/project_connection.h +++ b/google/cloud/bigquerycontrol/v2/project_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_PROJECT_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_PROJECT_CONNECTION_H +#include "google/cloud/bigquery/v2/project.pb.h" #include "google/cloud/bigquerycontrol/v2/internal/project_retry_traits.h" #include "google/cloud/bigquerycontrol/v2/project_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -26,7 +27,6 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquerycontrol/v2/project_connection_idempotency_policy.h b/google/cloud/bigquerycontrol/v2/project_connection_idempotency_policy.h index b0a3371366648..15b635e0f0d4f 100644 --- a/google/cloud/bigquerycontrol/v2/project_connection_idempotency_policy.h +++ b/google/cloud/bigquerycontrol/v2/project_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_PROJECT_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_PROJECT_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/bigquery/v2/project.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquerycontrol/v2/routine_connection.h b/google/cloud/bigquerycontrol/v2/routine_connection.h index a262a224cfebb..792be56081bab 100644 --- a/google/cloud/bigquerycontrol/v2/routine_connection.h +++ b/google/cloud/bigquerycontrol/v2/routine_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_ROUTINE_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_ROUTINE_CONNECTION_H +#include "google/cloud/bigquery/v2/routine.pb.h" #include "google/cloud/bigquerycontrol/v2/internal/routine_retry_traits.h" #include "google/cloud/bigquerycontrol/v2/routine_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -26,7 +27,6 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquerycontrol/v2/routine_connection_idempotency_policy.h b/google/cloud/bigquerycontrol/v2/routine_connection_idempotency_policy.h index b4a25430c6671..32c119d2dff5a 100644 --- a/google/cloud/bigquerycontrol/v2/routine_connection_idempotency_policy.h +++ b/google/cloud/bigquerycontrol/v2/routine_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_ROUTINE_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_ROUTINE_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/bigquery/v2/routine.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquerycontrol/v2/row_access_policy_connection.h b/google/cloud/bigquerycontrol/v2/row_access_policy_connection.h index 2dab3bdbe6b6d..540cbfe560dc2 100644 --- a/google/cloud/bigquerycontrol/v2/row_access_policy_connection.h +++ b/google/cloud/bigquerycontrol/v2/row_access_policy_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_ROW_ACCESS_POLICY_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_ROW_ACCESS_POLICY_CONNECTION_H +#include "google/cloud/bigquery/v2/row_access_policy.pb.h" #include "google/cloud/bigquerycontrol/v2/internal/row_access_policy_retry_traits.h" #include "google/cloud/bigquerycontrol/v2/row_access_policy_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquerycontrol/v2/row_access_policy_connection_idempotency_policy.h b/google/cloud/bigquerycontrol/v2/row_access_policy_connection_idempotency_policy.h index 0b603e9044c88..7b6c3d8dac4c0 100644 --- a/google/cloud/bigquerycontrol/v2/row_access_policy_connection_idempotency_policy.h +++ b/google/cloud/bigquerycontrol/v2/row_access_policy_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_ROW_ACCESS_POLICY_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_ROW_ACCESS_POLICY_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/bigquery/v2/row_access_policy.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquerycontrol/v2/table_connection.h b/google/cloud/bigquerycontrol/v2/table_connection.h index b8b740ef8e3ef..c62d549441d1d 100644 --- a/google/cloud/bigquerycontrol/v2/table_connection.h +++ b/google/cloud/bigquerycontrol/v2/table_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_TABLE_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_TABLE_CONNECTION_H +#include "google/cloud/bigquery/v2/table.pb.h" #include "google/cloud/bigquerycontrol/v2/internal/table_retry_traits.h" #include "google/cloud/bigquerycontrol/v2/table_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigquerycontrol/v2/table_connection_idempotency_policy.h b/google/cloud/bigquerycontrol/v2/table_connection_idempotency_policy.h index c69ace1733ec6..e1bf6ec1ddef5 100644 --- a/google/cloud/bigquerycontrol/v2/table_connection_idempotency_policy.h +++ b/google/cloud/bigquerycontrol/v2/table_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_TABLE_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGQUERYCONTROL_V2_TABLE_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/bigquery/v2/table.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/bigtable/BUILD.bazel b/google/cloud/bigtable/BUILD.bazel index b48840d42db4d..ba0cf3e9189d5 100644 --- a/google/cloud/bigtable/BUILD.bazel +++ b/google/cloud/bigtable/BUILD.bazel @@ -54,19 +54,19 @@ cc_library( deps = [ "//:common", "//:grpc_utils", - "@com_google_absl//absl/strings:str_format", - "@com_google_googleapis//google/bigtable/admin/v2:admin_cc_grpc", - "@com_google_googleapis//google/bigtable/v2:bigtable_cc_grpc", - "@com_google_googleapis//google/longrunning:longrunning_cc_grpc", - "@com_google_googleapis//google/rpc:error_details_cc_proto", - "@com_github_google_crc32c//:crc32c", - "@com_google_absl//absl/strings:cord", - "@com_github_grpc_grpc//:grpc++", + "@abseil-cpp//absl/strings:str_format", + "@googleapis//google/bigtable/admin/v2:admin_cc_grpc", + "@googleapis//google/bigtable/v2:bigtable_cc_grpc", + "@googleapis//google/longrunning:longrunning_cc_grpc", + "@googleapis//google/rpc:error_details_cc_proto", + "@abseil-cpp//absl/strings:cord", + "@abseil-cpp//absl/crc:crc32c", + "@grpc//:grpc++", ] + select({ ":metrics_enabled": [ "//:opentelemetry", - "@io_opentelemetry_cpp//api", - "@io_opentelemetry_cpp//sdk/src/metrics", + "@opentelemetry-cpp//api", + "@opentelemetry-cpp//sdk/src/metrics", ], "//conditions:default": [], }), @@ -91,7 +91,7 @@ cc_library( ":google_cloud_cpp_bigtable", "//:common", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) @@ -100,7 +100,10 @@ cc_library( testonly = True, srcs = bigtable_client_testing_srcs, hdrs = bigtable_client_testing_hdrs, - visibility = ["//visibility:public"], + visibility = [ + ":__subpackages__", + "//:__pkg__", + ], deps = [ ":google_cloud_cpp_bigtable", ":google_cloud_cpp_bigtable_mocks", @@ -108,7 +111,7 @@ cc_library( "//:grpc_utils", "//google/cloud/testing_util:google_cloud_cpp_testing_grpc_private", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) @@ -129,7 +132,7 @@ cc_library( "//:grpc_utils", "//google/cloud/testing_util:google_cloud_cpp_testing_grpc_private", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) for test in bigtable_client_unit_tests] @@ -146,6 +149,6 @@ cc_test( "//:grpc_utils", "//google/cloud/testing_util:google_cloud_cpp_testing_grpc_private", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) diff --git a/google/cloud/bigtable/CMakeLists.txt b/google/cloud/bigtable/CMakeLists.txt index 48436804617f3..4449a71d74515 100644 --- a/google/cloud/bigtable/CMakeLists.txt +++ b/google/cloud/bigtable/CMakeLists.txt @@ -47,8 +47,7 @@ include(CTest) # Export the version information for Bazel. include(CreateBazelConfig) -find_package(opentelemetry-cpp CONFIG) -find_package(Crc32c) +find_package(opentelemetry-cpp CONFIG REQUIRED) # the client library add_library( @@ -90,6 +89,7 @@ add_library( admin/internal/bigtable_table_admin_auth_decorator.h admin/internal/bigtable_table_admin_connection_impl.cc admin/internal/bigtable_table_admin_connection_impl.h + admin/internal/bigtable_table_admin_connection_impl_bespoke.cc admin/internal/bigtable_table_admin_logging_decorator.cc admin/internal/bigtable_table_admin_logging_decorator.h admin/internal/bigtable_table_admin_metadata_decorator.cc @@ -105,11 +105,8 @@ add_library( admin/internal/bigtable_table_admin_tracing_connection.h admin/internal/bigtable_table_admin_tracing_stub.cc admin/internal/bigtable_table_admin_tracing_stub.h - admin_client.cc - admin_client.h app_profile_config.cc app_profile_config.h - async_row_reader.h bound_query.cc bound_query.h bytes.cc @@ -117,15 +114,11 @@ add_library( cell.h client.cc client.h - client_options.cc - client_options.h cluster_config.cc cluster_config.h cluster_list_responses.h column_family.h completion_queue.h - data_client.cc - data_client.h data_connection.cc data_connection.h expr.cc @@ -137,10 +130,6 @@ add_library( iam_policy.h idempotent_mutation_policy.cc idempotent_mutation_policy.h - instance_admin.cc - instance_admin.h - instance_admin_client.cc - instance_admin_client.h instance_config.cc instance_config.h instance_list_responses.h @@ -194,18 +183,9 @@ add_library( internal/default_row_reader.h internal/defaults.cc internal/defaults.h + internal/endpoint_options.h internal/google_bytes_traits.cc internal/google_bytes_traits.h - internal/legacy_async_bulk_apply.cc - internal/legacy_async_bulk_apply.h - internal/legacy_async_row_reader.cc - internal/legacy_async_row_reader.h - internal/legacy_async_row_sampler.cc - internal/legacy_async_row_sampler.h - internal/legacy_row_reader.cc - internal/legacy_row_reader.h - internal/logging_data_client.cc - internal/logging_data_client.h internal/logging_result_set_reader.cc internal/logging_result_set_reader.h internal/metrics.cc @@ -238,8 +218,6 @@ add_library( internal/traced_row_reader.h internal/tuple_utils.h internal/unary_client_utils.h - metadata_update_policy.cc - metadata_update_policy.h mutation_batcher.cc mutation_batcher.h mutation_branch.h @@ -276,8 +254,6 @@ add_library( sql_statement.h table.cc table.h - table_admin.cc - table_admin.h table_config.cc table_config.h table_resource.cc @@ -288,27 +264,21 @@ add_library( value.h version.cc version.h - version_info.h - wait_for_consistency.cc - wait_for_consistency.h) + version_info.h) target_link_libraries( google_cloud_cpp_bigtable PUBLIC absl::memory google-cloud-cpp::bigtable_protos google-cloud-cpp::common google-cloud-cpp::grpc_utils - Crc32c::crc32c gRPC::grpc++ gRPC::grpc protobuf::libprotobuf) -if (opentelemetry-cpp_FOUND) - target_compile_definitions( - google_cloud_cpp_bigtable - PRIVATE GOOGLE_CLOUD_CPP_BIGTABLE_WITH_OTEL_METRICS) - target_link_libraries(google_cloud_cpp_bigtable - PUBLIC google-cloud-cpp::opentelemetry) - set(EXTRA_MODULES "google_cloud_cpp_opentelemetry" "opentelemetry_metrics") -endif () +target_compile_definitions(google_cloud_cpp_bigtable + PRIVATE GOOGLE_CLOUD_CPP_BIGTABLE_WITH_OTEL_METRICS) +target_link_libraries(google_cloud_cpp_bigtable + PUBLIC google-cloud-cpp::opentelemetry) +set(EXTRA_MODULES "google_cloud_cpp_opentelemetry" "opentelemetry_metrics") google_cloud_cpp_add_common_options(google_cloud_cpp_bigtable) target_include_directories( google_cloud_cpp_bigtable @@ -354,9 +324,7 @@ google_cloud_cpp_add_pkgconfig( "google_cloud_cpp_grpc_utils" "google_cloud_cpp_common" "google_cloud_cpp_bigtable_protos" - ${EXTRA_MODULES} - LIBS - crc32c) + ${EXTRA_MODULES}) # Create and install the CMake configuration files. include(CMakePackageConfigHelpers) @@ -410,11 +378,8 @@ if (BUILD_TESTING) testing/cleanup_stale_resources.h testing/embedded_server_test_fixture.cc testing/embedded_server_test_fixture.h - testing/inprocess_data_client.cc - testing/inprocess_data_client.h testing/mock_async_failing_rpc_factory.h testing/mock_bigtable_stub.h - testing/mock_data_client.h testing/mock_mutate_rows_limiter.h testing/mock_mutate_rows_reader.h testing/mock_partial_result_set_reader.h @@ -425,9 +390,7 @@ if (BUILD_TESTING) testing/random_names.cc testing/random_names.h testing/table_integration_test.cc - testing/table_integration_test.h - testing/table_test_fixture.cc - testing/table_test_fixture.h) + testing/table_integration_test.h) target_link_libraries( bigtable_client_testing PUBLIC google-cloud-cpp::bigtable @@ -452,18 +415,15 @@ if (BUILD_TESTING) # List the unit tests, then setup the targets and dependencies. set(bigtable_client_unit_tests # cmake-format: sort - admin_client_test.cc app_profile_config_test.cc async_read_stream_test.cc bigtable_version_test.cc bound_query_test.cc bytes_test.cc cell_test.cc - client_options_test.cc client_test.cc cluster_config_test.cc column_family_test.cc - data_client_test.cc data_connection_test.cc expr_test.cc filters_test.cc @@ -471,8 +431,6 @@ if (BUILD_TESTING) iam_binding_test.cc iam_policy_test.cc idempotent_mutation_policy_test.cc - instance_admin_client_test.cc - instance_admin_test.cc instance_config_test.cc instance_resource_test.cc instance_update_config_test.cc @@ -492,12 +450,6 @@ if (BUILD_TESTING) internal/default_row_reader_test.cc internal/defaults_test.cc internal/google_bytes_traits_test.cc - internal/legacy_async_bulk_apply_test.cc - internal/legacy_async_row_reader_test.cc - internal/legacy_async_row_sampler_test.cc - internal/legacy_bulk_mutator_test.cc - internal/legacy_row_reader_test.cc - internal/logging_data_client_test.cc internal/logging_result_set_reader_test.cc internal/metrics_test.cc internal/mutate_rows_limiter_test.cc @@ -511,8 +463,6 @@ if (BUILD_TESTING) internal/retry_traits_test.cc internal/traced_row_reader_test.cc internal/tuple_utils_test.cc - legacy_table_test.cc - metadata_update_policy_test.cc mocks/mock_row_reader_test.cc mutation_batcher_test.cc mutations_test.cc @@ -528,22 +478,13 @@ if (BUILD_TESTING) rpc_backoff_policy_test.cc rpc_retry_policy_test.cc sql_statement_test.cc - table_admin_test.cc - table_apply_test.cc - table_bulk_apply_test.cc - table_check_and_mutate_row_test.cc table_config_test.cc - table_readmodifywriterow_test.cc - table_readrow_test.cc - table_readrows_test.cc table_resource_test.cc - table_sample_row_keys_test.cc table_test.cc testing/cleanup_stale_resources_test.cc testing/random_names_test.cc timestamp_test.cc - value_test.cc - wait_for_consistency_test.cc) + value_test.cc) # Export the list of unit tests so the Bazel BUILD file can pick it up. export_list_to_bazel("bigtable_client_unit_tests.bzl" diff --git a/google/cloud/bigtable/admin/bigtable_instance_admin_client.h b/google/cloud/bigtable/admin/bigtable_instance_admin_client.h index dbfb64ab01481..c8be52c0513be 100644 --- a/google/cloud/bigtable/admin/bigtable_instance_admin_client.h +++ b/google/cloud/bigtable/admin/bigtable_instance_admin_client.h @@ -28,7 +28,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/bigtable/admin/bigtable_instance_admin_connection.h b/google/cloud/bigtable/admin/bigtable_instance_admin_connection.h index 941f91fea1c50..34afef13a90b5 100644 --- a/google/cloud/bigtable/admin/bigtable_instance_admin_connection.h +++ b/google/cloud/bigtable/admin/bigtable_instance_admin_connection.h @@ -30,8 +30,8 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/bigtable/admin/v2/bigtable_instance_admin.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/bigtable/admin/bigtable_instance_admin_connection_idempotency_policy.h b/google/cloud/bigtable/admin/bigtable_instance_admin_connection_idempotency_policy.h index 7e43c82f5af91..28d36da00f188 100644 --- a/google/cloud/bigtable/admin/bigtable_instance_admin_connection_idempotency_policy.h +++ b/google/cloud/bigtable/admin/bigtable_instance_admin_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/bigtable/admin/v2/bigtable_instance_admin.grpc.pb.h" #include namespace google { diff --git a/google/cloud/bigtable/admin/bigtable_table_admin_client.cc b/google/cloud/bigtable/admin/bigtable_table_admin_client.cc index a30ce9aac2bca..347aa10bba977 100644 --- a/google/cloud/bigtable/admin/bigtable_table_admin_client.cc +++ b/google/cloud/bigtable/admin/bigtable_table_admin_client.cc @@ -821,6 +821,14 @@ BigtableTableAdminClient::AsyncCheckConsistency( return connection_->AsyncCheckConsistency(request); } +future> +BigtableTableAdminClient::WaitForConsistency( + google::bigtable::admin::v2::CheckConsistencyRequest const& request, + Options opts) { + internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_)); + return connection_->WaitForConsistency(request); +} + GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigtable_admin } // namespace cloud diff --git a/google/cloud/bigtable/admin/bigtable_table_admin_client.h b/google/cloud/bigtable/admin/bigtable_table_admin_client.h index 5c4926ffa55fa..b4b3e849d63fd 100644 --- a/google/cloud/bigtable/admin/bigtable_table_admin_client.h +++ b/google/cloud/bigtable/admin/bigtable_table_admin_client.h @@ -28,7 +28,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include @@ -2581,6 +2581,40 @@ class BigtableTableAdminClient { google::bigtable::admin::v2::CheckConsistencyRequest const& request, Options opts = {}); + // clang-format off + /// + /// Polls a table until it is consistent or the RetryPolicy is exhausted based + /// on a consistency token, that is, if replication has caught up based on the + /// provided conditions specified in the token and the check request. + /// + /// @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.bigtable.admin.v2.CheckConsistencyRequest]. + /// 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 the result of the RPC. The response message type + /// ([google.bigtable.admin.v2.CheckConsistencyResponse]) + /// is mapped to a C++ class using the [Protobuf mapping rules]. + /// If the request fails, the [`StatusOr`] contains the error details. + /// + /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/ + /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator + /// [`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.bigtable.admin.v2.CheckConsistencyRequest]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_table_admin.proto#L909} + /// [google.bigtable.admin.v2.CheckConsistencyResponse]: @googleapis_reference_link{google/bigtable/admin/v2/bigtable_table_admin.proto#L948} + /// + // clang-format on + future> + WaitForConsistency( + google::bigtable::admin::v2::CheckConsistencyRequest const& request, + Options opts = {}); + private: std::shared_ptr connection_; Options options_; diff --git a/google/cloud/bigtable/admin/bigtable_table_admin_connection.cc b/google/cloud/bigtable/admin/bigtable_table_admin_connection.cc index 8f6f803ee33f4..6413380c8ad91 100644 --- a/google/cloud/bigtable/admin/bigtable_table_admin_connection.cc +++ b/google/cloud/bigtable/admin/bigtable_table_admin_connection.cc @@ -382,6 +382,14 @@ BigtableTableAdminConnection::AsyncCheckConsistency( Status(StatusCode::kUnimplemented, "not implemented")); } +future> +BigtableTableAdminConnection::WaitForConsistency( + google::bigtable::admin::v2::CheckConsistencyRequest const&) { + return google::cloud::make_ready_future< + StatusOr>( + Status(StatusCode::kUnimplemented, "not implemented")); +} + std::shared_ptr MakeBigtableTableAdminConnection( Options options) { internal::CheckExpectedOptions -#include +#include "google/bigtable/admin/v2/bigtable_table_admin.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { @@ -359,6 +359,11 @@ class BigtableTableAdminConnection { StatusOr> AsyncCheckConsistency( google::bigtable::admin::v2::CheckConsistencyRequest const& request); + + virtual future< + StatusOr> + WaitForConsistency( + google::bigtable::admin::v2::CheckConsistencyRequest const& request); }; /** diff --git a/google/cloud/bigtable/admin/bigtable_table_admin_connection_idempotency_policy.h b/google/cloud/bigtable/admin/bigtable_table_admin_connection_idempotency_policy.h index 1d2a533a55490..0879c7f71922a 100644 --- a/google/cloud/bigtable/admin/bigtable_table_admin_connection_idempotency_policy.h +++ b/google/cloud/bigtable/admin/bigtable_table_admin_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/bigtable/admin/v2/bigtable_table_admin.grpc.pb.h" #include namespace google { diff --git a/google/cloud/bigtable/admin/internal/bigtable_instance_admin_auth_decorator.cc b/google/cloud/bigtable/admin/internal/bigtable_instance_admin_auth_decorator.cc index 52e165e995cf4..54d693e652a0f 100644 --- a/google/cloud/bigtable/admin/internal/bigtable_instance_admin_auth_decorator.cc +++ b/google/cloud/bigtable/admin/internal/bigtable_instance_admin_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/bigtable/admin/v2/bigtable_instance_admin.proto #include "google/cloud/bigtable/admin/internal/bigtable_instance_admin_auth_decorator.h" -#include +#include "google/bigtable/admin/v2/bigtable_instance_admin.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_admin_internal { @@ -543,3 +546,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigtable_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigtable/admin/internal/bigtable_instance_admin_auth_decorator.h b/google/cloud/bigtable/admin/internal/bigtable_instance_admin_auth_decorator.h index cf79e70e27ffe..bf2aa40d202c4 100644 --- a/google/cloud/bigtable/admin/internal/bigtable_instance_admin_auth_decorator.h +++ b/google/cloud/bigtable/admin/internal/bigtable_instance_admin_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/bigtable/admin/internal/bigtable_instance_admin_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_admin_internal { @@ -277,4 +280,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ADMIN_INTERNAL_BIGTABLE_INSTANCE_ADMIN_AUTH_DECORATOR_H diff --git a/google/cloud/bigtable/admin/internal/bigtable_instance_admin_connection_impl.h b/google/cloud/bigtable/admin/internal/bigtable_instance_admin_connection_impl.h index 0d8f66954e7e4..7e9cd4a9687c1 100644 --- a/google/cloud/bigtable/admin/internal/bigtable_instance_admin_connection_impl.h +++ b/google/cloud/bigtable/admin/internal/bigtable_instance_admin_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/bigtable/admin/internal/bigtable_instance_admin_logging_decorator.cc b/google/cloud/bigtable/admin/internal/bigtable_instance_admin_logging_decorator.cc index 27d02161e5404..af8e84da50bc0 100644 --- a/google/cloud/bigtable/admin/internal/bigtable_instance_admin_logging_decorator.cc +++ b/google/cloud/bigtable/admin/internal/bigtable_instance_admin_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/bigtable/admin/internal/bigtable_instance_admin_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/bigtable/admin/v2/bigtable_instance_admin.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_admin_internal { @@ -646,3 +649,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigtable_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigtable/admin/internal/bigtable_instance_admin_logging_decorator.h b/google/cloud/bigtable/admin/internal/bigtable_instance_admin_logging_decorator.h index 08e9be4a2c2a6..f0ecb065cddc2 100644 --- a/google/cloud/bigtable/admin/internal/bigtable_instance_admin_logging_decorator.h +++ b/google/cloud/bigtable/admin/internal/bigtable_instance_admin_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/bigtable/admin/internal/bigtable_instance_admin_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_admin_internal { @@ -277,4 +280,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ADMIN_INTERNAL_BIGTABLE_INSTANCE_ADMIN_LOGGING_DECORATOR_H diff --git a/google/cloud/bigtable/admin/internal/bigtable_instance_admin_metadata_decorator.cc b/google/cloud/bigtable/admin/internal/bigtable_instance_admin_metadata_decorator.cc index 91f7ce424ff58..4002681b1473c 100644 --- a/google/cloud/bigtable/admin/internal/bigtable_instance_admin_metadata_decorator.cc +++ b/google/cloud/bigtable/admin/internal/bigtable_instance_admin_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/bigtable/admin/internal/bigtable_instance_admin_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/bigtable/admin/v2/bigtable_instance_admin.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_admin_internal { @@ -491,3 +495,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigtable_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigtable/admin/internal/bigtable_instance_admin_metadata_decorator.h b/google/cloud/bigtable/admin/internal/bigtable_instance_admin_metadata_decorator.h index c3d3bd29ecef1..706869de43cb4 100644 --- a/google/cloud/bigtable/admin/internal/bigtable_instance_admin_metadata_decorator.h +++ b/google/cloud/bigtable/admin/internal/bigtable_instance_admin_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/bigtable/admin/internal/bigtable_instance_admin_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_admin_internal { @@ -283,4 +286,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ADMIN_INTERNAL_BIGTABLE_INSTANCE_ADMIN_METADATA_DECORATOR_H diff --git a/google/cloud/bigtable/admin/internal/bigtable_instance_admin_option_defaults.cc b/google/cloud/bigtable/admin/internal/bigtable_instance_admin_option_defaults.cc index eebc439197670..bc4a18c9331f8 100644 --- a/google/cloud/bigtable/admin/internal/bigtable_instance_admin_option_defaults.cc +++ b/google/cloud/bigtable/admin/internal/bigtable_instance_admin_option_defaults.cc @@ -43,7 +43,7 @@ Options BigtableInstanceAdminDefaultOptions(Options options) { if (!options.has()) { options.set( bigtable_admin::BigtableInstanceAdminLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/bigtable/admin/internal/bigtable_instance_admin_stub.cc b/google/cloud/bigtable/admin/internal/bigtable_instance_admin_stub.cc index 81e7674434ed0..ffe780500ac10 100644 --- a/google/cloud/bigtable/admin/internal/bigtable_instance_admin_stub.cc +++ b/google/cloud/bigtable/admin/internal/bigtable_instance_admin_stub.cc @@ -19,11 +19,14 @@ #include "google/cloud/bigtable/admin/internal/bigtable_instance_admin_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/bigtable/admin/v2/bigtable_instance_admin.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_admin_internal { @@ -630,3 +633,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigtable_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigtable/admin/internal/bigtable_instance_admin_stub.h b/google/cloud/bigtable/admin/internal/bigtable_instance_admin_stub.h index 1cb2eee76c896..2ea8ab2292fc6 100644 --- a/google/cloud/bigtable/admin/internal/bigtable_instance_admin_stub.h +++ b/google/cloud/bigtable/admin/internal/bigtable_instance_admin_stub.h @@ -24,11 +24,14 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/bigtable/admin/v2/bigtable_instance_admin.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_admin_internal { @@ -513,4 +516,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ADMIN_INTERNAL_BIGTABLE_INSTANCE_ADMIN_STUB_H diff --git a/google/cloud/bigtable/admin/internal/bigtable_instance_admin_stub_factory.cc b/google/cloud/bigtable/admin/internal/bigtable_instance_admin_stub_factory.cc index 3a1f4da4d0717..a3b69e8aaa349 100644 --- a/google/cloud/bigtable/admin/internal/bigtable_instance_admin_stub_factory.cc +++ b/google/cloud/bigtable/admin/internal/bigtable_instance_admin_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/bigtable/admin/v2/bigtable_instance_admin.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_admin_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigtable_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigtable/admin/internal/bigtable_instance_admin_stub_factory.h b/google/cloud/bigtable/admin/internal/bigtable_instance_admin_stub_factory.h index a9ec14b48bab7..c0044e333264c 100644 --- a/google/cloud/bigtable/admin/internal/bigtable_instance_admin_stub_factory.h +++ b/google/cloud/bigtable/admin/internal/bigtable_instance_admin_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_admin_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ADMIN_INTERNAL_BIGTABLE_INSTANCE_ADMIN_STUB_FACTORY_H diff --git a/google/cloud/bigtable/admin/internal/bigtable_instance_admin_tracing_connection.cc b/google/cloud/bigtable/admin/internal/bigtable_instance_admin_tracing_connection.cc index 522d0d8405e6a..c60d90ae21f10 100644 --- a/google/cloud/bigtable/admin/internal/bigtable_instance_admin_tracing_connection.cc +++ b/google/cloud/bigtable/admin/internal/bigtable_instance_admin_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace bigtable_admin_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - BigtableInstanceAdminTracingConnection::BigtableInstanceAdminTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -531,17 +529,13 @@ Status BigtableInstanceAdminTracingConnection::DeleteMaterializedView( return internal::EndSpan(*span, child_->DeleteMaterializedView(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeBigtableInstanceAdminTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/bigtable/admin/internal/bigtable_instance_admin_tracing_connection.h b/google/cloud/bigtable/admin/internal/bigtable_instance_admin_tracing_connection.h index ebdcd8ad91d94..6f0ab1e7b7b14 100644 --- a/google/cloud/bigtable/admin/internal/bigtable_instance_admin_tracing_connection.h +++ b/google/cloud/bigtable/admin/internal/bigtable_instance_admin_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace bigtable_admin_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class BigtableInstanceAdminTracingConnection : public bigtable_admin::BigtableInstanceAdminConnection { public: @@ -239,8 +237,6 @@ class BigtableInstanceAdminTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/bigtable/admin/internal/bigtable_instance_admin_tracing_stub.cc b/google/cloud/bigtable/admin/internal/bigtable_instance_admin_tracing_stub.cc index bff207bbefcec..057f022a94298 100644 --- a/google/cloud/bigtable/admin/internal/bigtable_instance_admin_tracing_stub.cc +++ b/google/cloud/bigtable/admin/internal/bigtable_instance_admin_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_admin_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - BigtableInstanceAdminTracingStub::BigtableInstanceAdminTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -586,18 +587,14 @@ future BigtableInstanceAdminTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeBigtableInstanceAdminTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigtable_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigtable/admin/internal/bigtable_instance_admin_tracing_stub.h b/google/cloud/bigtable/admin/internal/bigtable_instance_admin_tracing_stub.h index 254f1cd215815..19dd1039773c2 100644 --- a/google/cloud/bigtable/admin/internal/bigtable_instance_admin_tracing_stub.h +++ b/google/cloud/bigtable/admin/internal/bigtable_instance_admin_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_admin_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class BigtableInstanceAdminTracingStub : public BigtableInstanceAdminStub { public: ~BigtableInstanceAdminTracingStub() override = default; @@ -273,8 +274,6 @@ class BigtableInstanceAdminTracingStub : public BigtableInstanceAdminStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -289,4 +288,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ADMIN_INTERNAL_BIGTABLE_INSTANCE_ADMIN_TRACING_STUB_H diff --git a/google/cloud/bigtable/admin/internal/bigtable_table_admin_auth_decorator.cc b/google/cloud/bigtable/admin/internal/bigtable_table_admin_auth_decorator.cc index ed820ab706916..8d6b9b14e63ee 100644 --- a/google/cloud/bigtable/admin/internal/bigtable_table_admin_auth_decorator.cc +++ b/google/cloud/bigtable/admin/internal/bigtable_table_admin_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/bigtable/admin/v2/bigtable_table_admin.proto #include "google/cloud/bigtable/admin/internal/bigtable_table_admin_auth_decorator.h" -#include +#include "google/bigtable/admin/v2/bigtable_table_admin.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_admin_internal { @@ -529,3 +532,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigtable_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigtable/admin/internal/bigtable_table_admin_auth_decorator.h b/google/cloud/bigtable/admin/internal/bigtable_table_admin_auth_decorator.h index 5c1ebaf82b795..6d9bd7bc18291 100644 --- a/google/cloud/bigtable/admin/internal/bigtable_table_admin_auth_decorator.h +++ b/google/cloud/bigtable/admin/internal/bigtable_table_admin_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/bigtable/admin/internal/bigtable_table_admin_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_admin_internal { @@ -264,4 +267,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ADMIN_INTERNAL_BIGTABLE_TABLE_ADMIN_AUTH_DECORATOR_H diff --git a/google/cloud/bigtable/admin/internal/bigtable_table_admin_connection_impl.h b/google/cloud/bigtable/admin/internal/bigtable_table_admin_connection_impl.h index 27812af525d89..ecdddaa38bd66 100644 --- a/google/cloud/bigtable/admin/internal/bigtable_table_admin_connection_impl.h +++ b/google/cloud/bigtable/admin/internal/bigtable_table_admin_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { @@ -234,6 +234,10 @@ class BigtableTableAdminConnectionImpl google::bigtable::admin::v2::CheckConsistencyRequest const& request) override; + future> + WaitForConsistency(google::bigtable::admin::v2::CheckConsistencyRequest const& + request) override; + private: std::unique_ptr background_; std::shared_ptr stub_; diff --git a/google/cloud/bigtable/admin/internal/bigtable_table_admin_connection_impl_bespoke.cc b/google/cloud/bigtable/admin/internal/bigtable_table_admin_connection_impl_bespoke.cc new file mode 100644 index 0000000000000..138d4aab62045 --- /dev/null +++ b/google/cloud/bigtable/admin/internal/bigtable_table_admin_connection_impl_bespoke.cc @@ -0,0 +1,76 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "google/cloud/bigtable/admin/internal/bigtable_table_admin_connection_impl.h" +#include "google/cloud/common_options.h" +#include "google/cloud/internal/async_retry_loop.h" +#include +#include + +namespace google { +namespace cloud { +namespace bigtable_admin_internal { +GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN +namespace { + +std::unique_ptr retry_policy( + Options const& options) { + return options.get() + ->clone(); +} + +std::unique_ptr backoff_policy(Options const& options) { + return options.get() + ->clone(); +} + +std::unique_ptr +idempotency_policy(Options const& options) { + return options + .get< + bigtable_admin::BigtableTableAdminConnectionIdempotencyPolicyOption>() + ->clone(); +} + +} // namespace + +future> +BigtableTableAdminConnectionImpl::WaitForConsistency( + google::bigtable::admin::v2::CheckConsistencyRequest const& request) { + auto current = google::cloud::internal::SaveCurrentOptions(); + auto request_copy = request; + auto const idempotent = + idempotency_policy(*current)->CheckConsistency(request_copy); + auto retry = retry_policy(*current); + auto backoff = backoff_policy(*current); + auto attempt_predicate = + [](StatusOr const& + r) { return r.ok() && r->consistent(); }; + return google::cloud::internal::AsyncRetryLoop( + std::move(retry), std::move(backoff), idempotent, background_->cq(), + [stub = stub_]( + CompletionQueue& cq, std::shared_ptr context, + google::cloud::internal::ImmutableOptions options, + google::bigtable::admin::v2::CheckConsistencyRequest const& request) { + return stub->AsyncCheckConsistency(cq, std::move(context), + std::move(options), request); + }, + std::move(current), std::move(request_copy), __func__, + std::move(attempt_predicate)); +} + +GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END +} // namespace bigtable_admin_internal +} // namespace cloud +} // namespace google diff --git a/google/cloud/bigtable/admin/internal/bigtable_table_admin_logging_decorator.cc b/google/cloud/bigtable/admin/internal/bigtable_table_admin_logging_decorator.cc index 52e1715f91fd7..e4709542226eb 100644 --- a/google/cloud/bigtable/admin/internal/bigtable_table_admin_logging_decorator.cc +++ b/google/cloud/bigtable/admin/internal/bigtable_table_admin_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/bigtable/admin/internal/bigtable_table_admin_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/bigtable/admin/v2/bigtable_table_admin.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_admin_internal { @@ -624,3 +627,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigtable_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigtable/admin/internal/bigtable_table_admin_logging_decorator.h b/google/cloud/bigtable/admin/internal/bigtable_table_admin_logging_decorator.h index d47f13dd7e4c6..dc8491263a12a 100644 --- a/google/cloud/bigtable/admin/internal/bigtable_table_admin_logging_decorator.h +++ b/google/cloud/bigtable/admin/internal/bigtable_table_admin_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/bigtable/admin/internal/bigtable_table_admin_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_admin_internal { @@ -264,4 +267,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ADMIN_INTERNAL_BIGTABLE_TABLE_ADMIN_LOGGING_DECORATOR_H diff --git a/google/cloud/bigtable/admin/internal/bigtable_table_admin_metadata_decorator.cc b/google/cloud/bigtable/admin/internal/bigtable_table_admin_metadata_decorator.cc index da9d69c6725c0..e16646beb64b7 100644 --- a/google/cloud/bigtable/admin/internal/bigtable_table_admin_metadata_decorator.cc +++ b/google/cloud/bigtable/admin/internal/bigtable_table_admin_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/bigtable/admin/internal/bigtable_table_admin_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/bigtable/admin/v2/bigtable_table_admin.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_admin_internal { @@ -481,3 +485,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigtable_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigtable/admin/internal/bigtable_table_admin_metadata_decorator.h b/google/cloud/bigtable/admin/internal/bigtable_table_admin_metadata_decorator.h index b0ba622681699..179352ef41e70 100644 --- a/google/cloud/bigtable/admin/internal/bigtable_table_admin_metadata_decorator.h +++ b/google/cloud/bigtable/admin/internal/bigtable_table_admin_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/bigtable/admin/internal/bigtable_table_admin_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_admin_internal { @@ -270,4 +273,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ADMIN_INTERNAL_BIGTABLE_TABLE_ADMIN_METADATA_DECORATOR_H diff --git a/google/cloud/bigtable/admin/internal/bigtable_table_admin_option_defaults.cc b/google/cloud/bigtable/admin/internal/bigtable_table_admin_option_defaults.cc index 527c3301efcfb..9920b08555053 100644 --- a/google/cloud/bigtable/admin/internal/bigtable_table_admin_option_defaults.cc +++ b/google/cloud/bigtable/admin/internal/bigtable_table_admin_option_defaults.cc @@ -43,7 +43,7 @@ Options BigtableTableAdminDefaultOptions(Options options) { if (!options.has()) { options.set( bigtable_admin::BigtableTableAdminLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/bigtable/admin/internal/bigtable_table_admin_stub.cc b/google/cloud/bigtable/admin/internal/bigtable_table_admin_stub.cc index 5ee3d92b16d67..9a29abbde06f2 100644 --- a/google/cloud/bigtable/admin/internal/bigtable_table_admin_stub.cc +++ b/google/cloud/bigtable/admin/internal/bigtable_table_admin_stub.cc @@ -19,11 +19,14 @@ #include "google/cloud/bigtable/admin/internal/bigtable_table_admin_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/bigtable/admin/v2/bigtable_table_admin.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_admin_internal { @@ -615,3 +618,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigtable_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigtable/admin/internal/bigtable_table_admin_stub.h b/google/cloud/bigtable/admin/internal/bigtable_table_admin_stub.h index 728a5d8015d8a..b9f0ecda260e6 100644 --- a/google/cloud/bigtable/admin/internal/bigtable_table_admin_stub.h +++ b/google/cloud/bigtable/admin/internal/bigtable_table_admin_stub.h @@ -24,11 +24,14 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/bigtable/admin/v2/bigtable_table_admin.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_admin_internal { @@ -497,4 +500,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ADMIN_INTERNAL_BIGTABLE_TABLE_ADMIN_STUB_H diff --git a/google/cloud/bigtable/admin/internal/bigtable_table_admin_stub_factory.cc b/google/cloud/bigtable/admin/internal/bigtable_table_admin_stub_factory.cc index 68f1aa81b202b..65cc7cd957579 100644 --- a/google/cloud/bigtable/admin/internal/bigtable_table_admin_stub_factory.cc +++ b/google/cloud/bigtable/admin/internal/bigtable_table_admin_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/bigtable/admin/v2/bigtable_table_admin.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_admin_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigtable_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigtable/admin/internal/bigtable_table_admin_stub_factory.h b/google/cloud/bigtable/admin/internal/bigtable_table_admin_stub_factory.h index 241ed59432cb7..9310e1197e8eb 100644 --- a/google/cloud/bigtable/admin/internal/bigtable_table_admin_stub_factory.h +++ b/google/cloud/bigtable/admin/internal/bigtable_table_admin_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_admin_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ADMIN_INTERNAL_BIGTABLE_TABLE_ADMIN_STUB_FACTORY_H diff --git a/google/cloud/bigtable/admin/internal/bigtable_table_admin_tracing_connection.cc b/google/cloud/bigtable/admin/internal/bigtable_table_admin_tracing_connection.cc index 71f4e692e544a..bc23ff38a77c9 100644 --- a/google/cloud/bigtable/admin/internal/bigtable_table_admin_tracing_connection.cc +++ b/google/cloud/bigtable/admin/internal/bigtable_table_admin_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace bigtable_admin_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - BigtableTableAdminTracingConnection::BigtableTableAdminTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -501,17 +499,13 @@ BigtableTableAdminTracingConnection::AsyncCheckConsistency( child_->AsyncCheckConsistency(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeBigtableTableAdminTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/bigtable/admin/internal/bigtable_table_admin_tracing_connection.h b/google/cloud/bigtable/admin/internal/bigtable_table_admin_tracing_connection.h index e1eb0c009e39d..2003fb21682aa 100644 --- a/google/cloud/bigtable/admin/internal/bigtable_table_admin_tracing_connection.h +++ b/google/cloud/bigtable/admin/internal/bigtable_table_admin_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace bigtable_admin_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class BigtableTableAdminTracingConnection : public bigtable_admin::BigtableTableAdminConnection { public: @@ -226,8 +224,6 @@ class BigtableTableAdminTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/bigtable/admin/internal/bigtable_table_admin_tracing_stub.cc b/google/cloud/bigtable/admin/internal/bigtable_table_admin_tracing_stub.cc index f61e11495baa6..bf7738bbde04b 100644 --- a/google/cloud/bigtable/admin/internal/bigtable_table_admin_tracing_stub.cc +++ b/google/cloud/bigtable/admin/internal/bigtable_table_admin_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_admin_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - BigtableTableAdminTracingStub::BigtableTableAdminTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -561,18 +562,14 @@ future BigtableTableAdminTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeBigtableTableAdminTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigtable_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigtable/admin/internal/bigtable_table_admin_tracing_stub.h b/google/cloud/bigtable/admin/internal/bigtable_table_admin_tracing_stub.h index a2b19c0170d9d..e73bed236a934 100644 --- a/google/cloud/bigtable/admin/internal/bigtable_table_admin_tracing_stub.h +++ b/google/cloud/bigtable/admin/internal/bigtable_table_admin_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_admin_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class BigtableTableAdminTracingStub : public BigtableTableAdminStub { public: ~BigtableTableAdminTracingStub() override = default; @@ -260,8 +261,6 @@ class BigtableTableAdminTracingStub : public BigtableTableAdminStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -276,4 +275,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ADMIN_INTERNAL_BIGTABLE_TABLE_ADMIN_TRACING_STUB_H diff --git a/google/cloud/bigtable/admin_client.cc b/google/cloud/bigtable/admin_client.cc deleted file mode 100644 index cdc151945d6d7..0000000000000 --- a/google/cloud/bigtable/admin_client.cc +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2017 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/admin_client.h" -#include "google/cloud/bigtable/internal/defaults.h" - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -std::shared_ptr MakeAdminClient(std::string project, - Options options) { - auto params = bigtable_internal::AdminClientParams( - internal::DefaultTableAdminOptions(std::move(options))); - return std::shared_ptr( - new AdminClient(std::move(project), std::move(params))); -} - -std::shared_ptr CreateDefaultAdminClient(std::string project, - ClientOptions options) { - return MakeAdminClient(std::move(project), - internal::MakeOptions(std::move(options))); -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/admin_client.h b/google/cloud/bigtable/admin_client.h deleted file mode 100644 index 31ebc18855d7b..0000000000000 --- a/google/cloud/bigtable/admin_client.h +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2017 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ADMIN_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ADMIN_CLIENT_H - -#include "google/cloud/bigtable/admin/bigtable_table_admin_connection.h" -#include "google/cloud/bigtable/client_options.h" -#include "google/cloud/bigtable/internal/admin_client_params.h" -#include "google/cloud/bigtable/version.h" -#include "google/cloud/options.h" -#include -#include - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/** - * Creates a `bigtable_admin::BigtableTableAdminConnection` and a - * `CompletionQueue` for `bigtable::TableAdmin` to use. - * - * This class is used to initiate a connection to the Cloud Bigtable Table - * Admin service. It is maintained only for backwards compatibility. - * - * @note Please prefer using `bigtable_admin::BigtableTableAdminConnection` to - * configure `bigtable_admin::BigtableTableAdminClient`, instead of using - * this class to configure `bigtable::TableAdmin`. - */ -class AdminClient final { - public: - /// The project id that this AdminClient works on. - std::string const& project() { return project_; }; - - private: - friend class TableAdmin; - friend std::shared_ptr MakeAdminClient(std::string, Options); - - AdminClient(std::string project, bigtable_internal::AdminClientParams params) - : project_(std::move(project)), - cq_(params.options.get()), - background_threads_(std::move(params.background_threads)), - connection_(bigtable_admin::MakeBigtableTableAdminConnection( - std::move(params.options))) {} - - std::string project_; - CompletionQueue cq_; - std::shared_ptr background_threads_; - std::shared_ptr connection_; -}; - -/// Create a new table admin client configured via @p options. -std::shared_ptr MakeAdminClient(std::string project, - Options options = {}); - -/** - * Create a new table admin client configured via @p options. - * - * @deprecated use the `MakeAdminClient` method which accepts - * `google::cloud::Options` instead. - */ -GOOGLE_CLOUD_CPP_DEPRECATED("use `MakeAdminClient` instead") -std::shared_ptr CreateDefaultAdminClient(std::string project, - ClientOptions options); - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ADMIN_CLIENT_H diff --git a/google/cloud/bigtable/admin_client_test.cc b/google/cloud/bigtable/admin_client_test.cc deleted file mode 100644 index f9f0ccc617eb5..0000000000000 --- a/google/cloud/bigtable/admin_client_test.cc +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2017 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/admin_client.h" -#include - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -#include "google/cloud/internal/disable_deprecation_warnings.inc" - -TEST(AdminClientTest, CreateDefaultClient) { - auto admin_client = CreateDefaultAdminClient("test-project", {}); - ASSERT_TRUE(admin_client); - EXPECT_EQ("test-project", admin_client->project()); -} - -#include "google/cloud/internal/diagnostics_pop.inc" - -TEST(AdminClientTest, MakeClient) { - auto admin_client = MakeAdminClient("test-project"); - ASSERT_TRUE(admin_client); - EXPECT_EQ("test-project", admin_client->project()); -} - -} // namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/app_profile_config.h b/google/cloud/bigtable/app_profile_config.h index 0a7bb9031e34b..db256f2f12c46 100644 --- a/google/cloud/bigtable/app_profile_config.h +++ b/google/cloud/bigtable/app_profile_config.h @@ -16,7 +16,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_APP_PROFILE_CONFIG_H #include "google/cloud/bigtable/version.h" -#include +#include "google/bigtable/admin/v2/bigtable_instance_admin.pb.h" #include namespace google { diff --git a/google/cloud/bigtable/async_read_stream_test.cc b/google/cloud/bigtable/async_read_stream_test.cc index bcb9b4af40cd1..b6a9505315942 100644 --- a/google/cloud/bigtable/async_read_stream_test.cc +++ b/google/cloud/bigtable/async_read_stream_test.cc @@ -15,7 +15,7 @@ #include "google/cloud/bigtable/completion_queue.h" #include "google/cloud/bigtable/version.h" #include "google/cloud/testing_util/status_matchers.h" -#include +#include "google/bigtable/v2/bigtable.grpc.pb.h" #include #include diff --git a/google/cloud/bigtable/async_row_reader.h b/google/cloud/bigtable/async_row_reader.h deleted file mode 100644 index e899ad3c29439..0000000000000 --- a/google/cloud/bigtable/async_row_reader.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ASYNC_ROW_READER_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ASYNC_ROW_READER_H - -#include "google/cloud/bigtable/version.h" -#include - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/** - * @deprecated Please use `bigtable::RowReader::NO_ROWS_LIMIT` instead. - */ -template -class AsyncRowReader { - public: - /// Special value to be used as rows_limit indicating no limit. - GOOGLE_CLOUD_CPP_DEPRECATED( - "`AsyncRowReader<>::NO_ROWS_LIMIT` is deprecated. It is scheduled for " - "deletion on 2023-05-01. Please use `RowReader::NO_ROWS_LIMIT` instead.") - // NOLINTNEXTLINE(readability-identifier-naming) - static std::int64_t constexpr NO_ROWS_LIMIT = 0; -}; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ASYNC_ROW_READER_H diff --git a/google/cloud/bigtable/benchmarks/BUILD.bazel b/google/cloud/bigtable/benchmarks/BUILD.bazel index d38595bf6c969..2215e0a2f1f88 100644 --- a/google/cloud/bigtable/benchmarks/BUILD.bazel +++ b/google/cloud/bigtable/benchmarks/BUILD.bazel @@ -60,6 +60,6 @@ cc_library( "//:bigtable", "//:common", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) for test in bigtable_benchmarks_unit_tests] diff --git a/google/cloud/bigtable/benchmarks/benchmark.cc b/google/cloud/bigtable/benchmarks/benchmark.cc index 87e9baac9b657..d758bb6b09714 100644 --- a/google/cloud/bigtable/benchmarks/benchmark.cc +++ b/google/cloud/bigtable/benchmarks/benchmark.cc @@ -16,6 +16,7 @@ #include "google/cloud/bigtable/admin/bigtable_table_admin_client.h" #include "google/cloud/bigtable/benchmarks/random_mutation.h" #include "google/cloud/bigtable/resource_names.h" +#include "google/cloud/grpc_options.h" #include "google/cloud/internal/background_threads_impl.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/internal/make_status.h" diff --git a/google/cloud/bigtable/benchmarks/benchmark_options.cc b/google/cloud/bigtable/benchmarks/benchmark_options.cc index 7bb55f1ec367c..47da15650bf25 100644 --- a/google/cloud/bigtable/benchmarks/benchmark_options.cc +++ b/google/cloud/bigtable/benchmarks/benchmark_options.cc @@ -15,12 +15,12 @@ #include "google/cloud/bigtable/benchmarks/benchmark_options.h" #include "google/cloud/bigtable/testing/random_names.h" #include "google/cloud/bigtable/version.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/build_info.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/internal/random.h" #include "google/cloud/status_or.h" #include "google/cloud/testing_util/command_line_parsing.h" +#include "absl/strings/str_join.h" #include "absl/time/clock.h" #include "absl/time/time.h" #include diff --git a/google/cloud/bigtable/benchmarks/embedded_server.cc b/google/cloud/bigtable/benchmarks/embedded_server.cc index 758089c837876..8f415677488d1 100644 --- a/google/cloud/bigtable/benchmarks/embedded_server.cc +++ b/google/cloud/bigtable/benchmarks/embedded_server.cc @@ -15,8 +15,8 @@ #include "google/cloud/bigtable/benchmarks/embedded_server.h" #include "google/cloud/bigtable/benchmarks/constants.h" #include "google/cloud/bigtable/benchmarks/random_mutation.h" -#include -#include +#include "google/bigtable/admin/v2/bigtable_table_admin.grpc.pb.h" +#include "google/bigtable/v2/bigtable.grpc.pb.h" #include #include #include diff --git a/google/cloud/bigtable/benchmarks/embedded_server_test.cc b/google/cloud/bigtable/benchmarks/embedded_server_test.cc index 9f11bacf0f3a7..79c956d7f5a7f 100644 --- a/google/cloud/bigtable/benchmarks/embedded_server_test.cc +++ b/google/cloud/bigtable/benchmarks/embedded_server_test.cc @@ -16,6 +16,7 @@ #include "google/cloud/bigtable/admin/bigtable_table_admin_client.h" #include "google/cloud/bigtable/resource_names.h" #include "google/cloud/bigtable/table.h" +#include "google/cloud/grpc_options.h" #include "google/cloud/testing_util/status_matchers.h" #include #include diff --git a/google/cloud/bigtable/benchmarks/mutation_batcher_throughput_benchmark.cc b/google/cloud/bigtable/benchmarks/mutation_batcher_throughput_benchmark.cc index d02b8f1c90ddb..e5c01218a6ab0 100644 --- a/google/cloud/bigtable/benchmarks/mutation_batcher_throughput_benchmark.cc +++ b/google/cloud/bigtable/benchmarks/mutation_batcher_throughput_benchmark.cc @@ -18,6 +18,7 @@ #include "google/cloud/bigtable/resource_names.h" #include "google/cloud/bigtable/table.h" #include "google/cloud/bigtable/testing/random_names.h" +#include "google/cloud/grpc_options.h" #include "google/cloud/internal/background_threads_impl.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/internal/make_status.h" diff --git a/google/cloud/bigtable/benchmarks/mutation_batcher_throughput_options.cc b/google/cloud/bigtable/benchmarks/mutation_batcher_throughput_options.cc index 5734b3afba3e4..79bfd4ad9546c 100644 --- a/google/cloud/bigtable/benchmarks/mutation_batcher_throughput_options.cc +++ b/google/cloud/bigtable/benchmarks/mutation_batcher_throughput_options.cc @@ -13,10 +13,10 @@ // limitations under the License. #include "google/cloud/bigtable/benchmarks/mutation_batcher_throughput_options.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/status_or.h" #include "google/cloud/testing_util/command_line_parsing.h" +#include "absl/strings/str_join.h" #include namespace google { diff --git a/google/cloud/bigtable/bigtable_client_testing.bzl b/google/cloud/bigtable/bigtable_client_testing.bzl index 865460e3aead3..2146dbf028f1a 100644 --- a/google/cloud/bigtable/bigtable_client_testing.bzl +++ b/google/cloud/bigtable/bigtable_client_testing.bzl @@ -19,10 +19,8 @@ bigtable_client_testing_hdrs = [ "testing/cleanup_stale_resources.h", "testing/embedded_server_test_fixture.h", - "testing/inprocess_data_client.h", "testing/mock_async_failing_rpc_factory.h", "testing/mock_bigtable_stub.h", - "testing/mock_data_client.h", "testing/mock_mutate_rows_limiter.h", "testing/mock_mutate_rows_reader.h", "testing/mock_partial_result_set_reader.h", @@ -32,14 +30,11 @@ bigtable_client_testing_hdrs = [ "testing/mock_sample_row_keys_reader.h", "testing/random_names.h", "testing/table_integration_test.h", - "testing/table_test_fixture.h", ] bigtable_client_testing_srcs = [ "testing/cleanup_stale_resources.cc", "testing/embedded_server_test_fixture.cc", - "testing/inprocess_data_client.cc", "testing/random_names.cc", "testing/table_integration_test.cc", - "testing/table_test_fixture.cc", ] diff --git a/google/cloud/bigtable/bigtable_client_unit_tests.bzl b/google/cloud/bigtable/bigtable_client_unit_tests.bzl index c5dda043da0a4..6c95291b749a2 100644 --- a/google/cloud/bigtable/bigtable_client_unit_tests.bzl +++ b/google/cloud/bigtable/bigtable_client_unit_tests.bzl @@ -17,18 +17,15 @@ """Automatically generated unit tests list - DO NOT EDIT.""" bigtable_client_unit_tests = [ - "admin_client_test.cc", "app_profile_config_test.cc", "async_read_stream_test.cc", "bigtable_version_test.cc", "bound_query_test.cc", "bytes_test.cc", "cell_test.cc", - "client_options_test.cc", "client_test.cc", "cluster_config_test.cc", "column_family_test.cc", - "data_client_test.cc", "data_connection_test.cc", "expr_test.cc", "filters_test.cc", @@ -36,8 +33,6 @@ bigtable_client_unit_tests = [ "iam_binding_test.cc", "iam_policy_test.cc", "idempotent_mutation_policy_test.cc", - "instance_admin_client_test.cc", - "instance_admin_test.cc", "instance_config_test.cc", "instance_resource_test.cc", "instance_update_config_test.cc", @@ -57,12 +52,6 @@ bigtable_client_unit_tests = [ "internal/default_row_reader_test.cc", "internal/defaults_test.cc", "internal/google_bytes_traits_test.cc", - "internal/legacy_async_bulk_apply_test.cc", - "internal/legacy_async_row_reader_test.cc", - "internal/legacy_async_row_sampler_test.cc", - "internal/legacy_bulk_mutator_test.cc", - "internal/legacy_row_reader_test.cc", - "internal/logging_data_client_test.cc", "internal/logging_result_set_reader_test.cc", "internal/metrics_test.cc", "internal/mutate_rows_limiter_test.cc", @@ -76,8 +65,6 @@ bigtable_client_unit_tests = [ "internal/retry_traits_test.cc", "internal/traced_row_reader_test.cc", "internal/tuple_utils_test.cc", - "legacy_table_test.cc", - "metadata_update_policy_test.cc", "mocks/mock_row_reader_test.cc", "mutation_batcher_test.cc", "mutations_test.cc", @@ -93,20 +80,11 @@ bigtable_client_unit_tests = [ "rpc_backoff_policy_test.cc", "rpc_retry_policy_test.cc", "sql_statement_test.cc", - "table_admin_test.cc", - "table_apply_test.cc", - "table_bulk_apply_test.cc", - "table_check_and_mutate_row_test.cc", "table_config_test.cc", - "table_readmodifywriterow_test.cc", - "table_readrow_test.cc", - "table_readrows_test.cc", "table_resource_test.cc", - "table_sample_row_keys_test.cc", "table_test.cc", "testing/cleanup_stale_resources_test.cc", "testing/random_names_test.cc", "timestamp_test.cc", "value_test.cc", - "wait_for_consistency_test.cc", ] diff --git a/google/cloud/bigtable/bound_query.h b/google/cloud/bigtable/bound_query.h index 22d805d419f25..e3ad5978e3b5f 100644 --- a/google/cloud/bigtable/bound_query.h +++ b/google/cloud/bigtable/bound_query.h @@ -19,7 +19,7 @@ #include "google/cloud/bigtable/value.h" #include "google/cloud/bigtable/version.h" #include "google/cloud/completion_queue.h" -#include +#include "google/bigtable/v2/bigtable.pb.h" #include #include diff --git a/google/cloud/bigtable/ci/run_integration_tests_emulator_bazel.sh b/google/cloud/bigtable/ci/run_integration_tests_emulator_bazel.sh index 966435e0bb52e..ba218743f7e64 100755 --- a/google/cloud/bigtable/ci/run_integration_tests_emulator_bazel.sh +++ b/google/cloud/bigtable/ci/run_integration_tests_emulator_bazel.sh @@ -59,8 +59,8 @@ source module /google/cloud/bigtable/tools/run_emulator_utils.sh production_only_targets=( "//google/cloud/bigtable/examples:bigtable_table_admin_backup_snippets" "//google/cloud/bigtable/examples:table_admin_iam_policy_snippets" - "//google/cloud/bigtable/tests:admin_backup_integration_test" - "//google/cloud/bigtable/tests:admin_iam_policy_integration_test" + "//google/cloud/bigtable/tests:table_admin_backup_integration_test" + "//google/cloud/bigtable/tests:table_admin_iam_policy_integration_test" ) # Coverage builds are more subject to flakiness, as we must explicitly disable diff --git a/google/cloud/bigtable/client_options.cc b/google/cloud/bigtable/client_options.cc deleted file mode 100644 index 7bee3a22e4675..0000000000000 --- a/google/cloud/bigtable/client_options.cc +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2017 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and - -#include "google/cloud/bigtable/client_options.h" -#include "google/cloud/bigtable/internal/client_options_defaults.h" -#include "google/cloud/bigtable/internal/defaults.h" -#include "google/cloud/internal/background_threads_impl.h" -#include "google/cloud/internal/getenv.h" -#include "google/cloud/internal/user_agent_prefix.h" -#include "absl/strings/str_split.h" -#include -#include - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace internal { -Options&& MakeOptions(ClientOptions&& o) { - if (!o.connection_pool_name_.empty()) { - o.opts_ - .lookup()["cbt-c++/connection-pool-name"] = - std::move(o.connection_pool_name_); - } - return std::move(o.opts_); -} -} // namespace internal - -ClientOptions::ClientOptions() { opts_ = internal::DefaultOptions(); } - -ClientOptions::ClientOptions(Options opts) { - ::google::cloud::internal::CheckExpectedOptions< - ClientOptionList, CommonOptionList, GrpcOptionList>(opts, __func__); - opts_ = internal::DefaultOptions(std::move(opts)); -} - -ClientOptions::ClientOptions(std::shared_ptr creds) { - opts_ = internal::DefaultOptions( - Options{}.set(std::move(creds))); - - // This constructor ignores the emulator environment variables, which might be - // set by `internal::DefaultOptions()`. - opts_.set("bigtable.googleapis.com"); - opts_.set("bigtableadmin.googleapis.com"); - opts_.set("bigtableadmin.googleapis.com"); -} - -// NOLINTNEXTLINE(readability-identifier-naming) -ClientOptions& ClientOptions::set_connection_pool_size(std::size_t size) { - opts_.set(size == 0 - ? internal::DefaultConnectionPoolSize() - : static_cast(size)); - return *this; -} - -std::string ClientOptions::UserAgentPrefix() { - return google::cloud::internal::UserAgentPrefix(); -} - -ClientOptions& ClientOptions::DisableBackgroundThreads( - google::cloud::CompletionQueue const& cq) { - opts_.set(cq); - return *this; -} - -BackgroundThreadsFactory ClientOptions::background_threads_factory() const { - return google::cloud::internal::MakeBackgroundThreadsFactory(opts_); -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/client_options.h b/google/cloud/bigtable/client_options.h deleted file mode 100644 index 834ea1a162e53..0000000000000 --- a/google/cloud/bigtable/client_options.h +++ /dev/null @@ -1,734 +0,0 @@ -// Copyright 2017 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_CLIENT_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_CLIENT_OPTIONS_H - -#include "google/cloud/bigtable/options.h" -#include "google/cloud/bigtable/version.h" -#include "google/cloud/background_threads.h" -#include "google/cloud/common_options.h" -#include "google/cloud/completion_queue.h" -#include "google/cloud/grpc_options.h" -#include "google/cloud/internal/algorithm.h" -#include "google/cloud/internal/make_status.h" -#include "google/cloud/options.h" -#include "google/cloud/status.h" -#include "google/cloud/tracing_options.h" -#include "absl/strings/str_split.h" -#include -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -class ClientOptions; -namespace internal { -Options&& MakeOptions(ClientOptions&& o); -} // namespace internal - -/** - * Configuration options for the Bigtable Client. - * - * Applications typically configure the client class using: - * @code - * auto client = - * bigtable::Client(bigtable::ClientOptions().SetCredentials(...)); - * @endcode - * - * @deprecated Please use `google::cloud::Options` instead. - */ -class ClientOptions { - public: - /** - * Initialize the client options. - * - * Configure the client to connect to the Cloud Bigtable service, using the - * default options. - * - * @par Environment Variables - * If the `BIGTABLE_EMULATOR_HOST` environment variable is set, the default - * configuration changes in important ways: - * - * - The credentials are initialized to `grpc::InsecureCredentials()`. - * - Any client created with these objects will connect to the endpoint - * (typically just a `host:port` string) set in the environment variable. - * - * This makes it easy to test applications using the Cloud Bigtable Emulator. - * - * @see The Google Cloud Platform introduction to - * [application default - * credentials](https://cloud.google.com/docs/authentication/production) - * @see `grpc::GoogleDefaultCredentials` in the [grpc - * documentation](https://grpc.io/grpc/cpp/namespacegrpc.html) - * @see The [documentation](https://cloud.google.com/bigtable/docs/emulator) - * for the Cloud Bigtable Emulator. - * - * @deprecated Please use `google::cloud::Options` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED("use `google::cloud::Options` instead") - ClientOptions(); - - /** - * Initialize the client options. - * - * Expected options are any of the types in the following option lists. - * - * - `google::cloud::CommonOptionList` - * - `google::cloud::GrpcOptionList` - * - `google::cloud::bigtable::ClientOptionList` - * - * @note Unrecognized options will be ignored. To debug issues with options - * set `GOOGLE_CLOUD_CPP_ENABLE_CLOG=yes` in the environment and - * unexpected options will be logged. - * - * @param opts (optional) configuration options - * - * @deprecated Please use `google::cloud::Options` directly instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED("use `google::cloud::Options` directly instead") - explicit ClientOptions(Options opts); - - /** - * Connect to the production instance of Cloud Bigtable using @p creds. - * - * This constructor always connects to the production instance of Cloud - * Bigtable, and can be used when the application default credentials are - * not configured in the environment where the application is running. - * - * @param creds gRPC authentication credentials - * - * @deprecated Please configure `google::cloud::Options` with - * `google::cloud::GrpcCredentialOption` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` with `google::cloud::GrpcCredentialOption` " - "instead") - explicit ClientOptions(std::shared_ptr creds); - - /** - * Return the current endpoint for data RPCs. - * - * @deprecated Please configure `google::cloud::Options` with - * `google::cloud::EndpointOption` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` with `google::cloud::EndpointOption` " - "instead") - std::string const& data_endpoint() const { - return opts_.get(); - } - - /** - * Set the current endpoint for data RPCs. - * - * @deprecated Please configure `google::cloud::Options` with - * `google::cloud::EndpointOption` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` with `google::cloud::EndpointOption` " - "instead") - ClientOptions& set_data_endpoint(std::string endpoint) { - opts_.set(std::move(endpoint)); - return *this; - } - - /** - * Return the current endpoint for admin RPCs. - * - * @deprecated Please configure `google::cloud::Options` with - * `google::cloud::EndpointOption` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` with `google::cloud::EndpointOption` " - "instead") - std::string const& admin_endpoint() const { - return opts_.get(); - } - - /** - * Set the current endpoint for admin RPCs. - * - * @deprecated Please configure `google::cloud::Options` with - * `google::cloud::EndpointOption` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` with `google::cloud::EndpointOption` " - "instead") - ClientOptions& set_admin_endpoint(std::string endpoint) { - opts_.set(endpoint); - // These two endpoints are generally equivalent, but they may differ in - // some tests. - opts_.set(std::move(endpoint)); - return *this; - } - - /** - * Set the name of the connection pool. - * - * gRPC typically opens a single connection for each destination. To improve - * performance, the Cloud Bigtable C++ client can open multiple connections - * to a given destination, but these connections are shared by all threads - * in the application. Sometimes the application may want even more - * segregation, for example, the application may want to use a different pool - * for high-priority requests vs. lower priority ones. Using different names - * creates segregated pools. - * - * @deprecated Please configure `google::cloud::Options` with - * `google::cloud::GrpcChannelArgumentsOption` or - * `google::cloud::GrpcChannelArgumentsNativeOption` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` with " - "`google::cloud::GrpcChannelArgumentsOption` or " - "`google::cloud::GrpcChannelArgumentsNativeOption` instead") - ClientOptions& set_connection_pool_name(std::string name) { - connection_pool_name_ = std::move(name); - return *this; - } - - /** - * Return the name of the connection pool. - * - * @deprecated Please configure `google::cloud::Options` with - * `google::cloud::GrpcChannelArgumentsOption` or - * `google::cloud::GrpcChannelArgumentsNativeOption` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` with " - "`google::cloud::GrpcChannelArgumentsOption` or " - "`google::cloud::GrpcChannelArgumentsNativeOption` instead") - std::string const& connection_pool_name() const { - return connection_pool_name_; - } - - /** - * Set the size of the connection pool. - * - * Specifying 0 for @p size will set the size of the connection pool to - * default. - * - * @deprecated Please configure `google::cloud::Options` with - * `google::cloud::GrpcNumChannelsOption` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` with " - "`google::cloud::GrpcNumChannelsOption` instead") - ClientOptions& set_connection_pool_size(std::size_t size); - - /** - * Return the size of the connection pool. - * - * @deprecated Please configure `google::cloud::Options` with - * `google::cloud::GrpcNumChannelsOption` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` with " - "`google::cloud::GrpcNumChannelsOption` instead") - std::size_t connection_pool_size() const { - return opts_.get(); - } - - /** - * Return the current credentials. - * - * @deprecated Please configure `google::cloud::Options` with - * `google::cloud::GrpcCredentialOption` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` with " - "`google::cloud::GrpcCredentialOption` instead") - std::shared_ptr credentials() const { - return opts_.get(); - } - - /** - * Set the current credentials. - * - * @deprecated Please configure `google::cloud::Options` with - * `google::cloud::GrpcCredentialOption` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` with " - "`google::cloud::GrpcCredentialOption` instead") - ClientOptions& SetCredentials( - std::shared_ptr credentials) { - opts_.set(std::move(credentials)); - return *this; - } - - /** - * Access all the channel arguments. - * - * @deprecated Please configure `google::cloud::Options` with - * `google::cloud::GrpcChannelArgumentsOption` or - * `google::cloud::GrpcChannelArgumentsNativeOption` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` with " - "`google::cloud::GrpcChannelArgumentsOption` or " - "`google::cloud::GrpcChannelArgumentsNativeOption` instead") - grpc::ChannelArguments channel_arguments() const { - return ::google::cloud::internal::MakeChannelArguments(opts_); - } - - /** - * Set all the channel arguments. - * - * @deprecated Please configure `google::cloud::Options` with - * `google::cloud::GrpcChannelArgumentsNativeOption` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` with " - "`google::cloud::GrpcChannelArgumentsNativeOption` instead") - ClientOptions& set_channel_arguments( - grpc::ChannelArguments const& channel_arguments) { - opts_.set(channel_arguments); - return *this; - } - - /** - * Set compression algorithm for channel. - * - * Please see the docs for grpc::ChannelArguments::SetCompressionAlgorithm() - * on https://grpc.io/grpc/cpp/classgrpc_1_1_channel_arguments.html - * for more details. - * - * @deprecated Please configure `google::cloud::Options` with - * `google::cloud::GrpcChannelArgumentsNativeOption` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` with " - "`google::cloud::GrpcChannelArgumentsNativeOption` instead") - void SetCompressionAlgorithm(grpc_compression_algorithm algorithm) { - opts_.lookup().SetCompressionAlgorithm( - algorithm); - } - - /** - * Set the `grpclb` fallback timeout with the timestamp @p fallback_timeout - * for the channel. - * - * For example: - * - * @code - * bigtable::ClientOptions::SetGrpclbFallbackTimeout( - * std::chrono::milliseconds(5000)) - * bigtable::ClientOptions::SetGrpclbFallbackTimeout( - * std::chrono::seconds(5)) - * @endcode - * - * @tparam Rep a placeholder to match the Rep tparam for @p fallback_timeout, - * the semantics of this template parameter are documented in - * `std::chrono::duration<>` (in brief, the underlying arithmetic type - * used to store the number of ticks), for our purposes it is simply a - * formal parameter. - * @tparam Period a placeholder to match the Period tparam for @p - * fallback_timeout, the semantics of this template parameter are - * documented in `std::chrono::duration<>` (in brief, the length of the - * tick in seconds, expressed as a `std::ratio<>`), for our purposes it - * is simply a formal parameter. - * - * @see - * [std::chrono::duration<>](http://en.cppreference.com/w/cpp/chrono/duration) - * for more details. - * - * Please see the docs for - * `grpc::ChannelArguments::SetGrpclbFallbackTimeout()` on - * https://grpc.io/grpc/cpp/classgrpc_1_1_channel_arguments.html for more - * details. - * - * @deprecated Please configure `google::cloud::Options` with - * `google::cloud::GrpcChannelArgumentsNativeOption` instead. - */ - template - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` with " - "`google::cloud::GrpcChannelArgumentsNativeOption` instead") - google::cloud::Status SetGrpclbFallbackTimeout( - std::chrono::duration fallback_timeout) { - std::chrono::milliseconds ft_ms = - std::chrono::duration_cast(fallback_timeout); - - if (ft_ms.count() > std::numeric_limits::max()) { - return google::cloud::internal::OutOfRangeError( - "The supplied duration is larger than the " - "maximum value allowed by gRPC (INT_MAX)", - GCP_ERROR_INFO()); - } - auto fallback_timeout_ms = static_cast(ft_ms.count()); - opts_.lookup().SetGrpclbFallbackTimeout( - fallback_timeout_ms); - return google::cloud::Status(); - } - - /** - * Set the string to prepend to the user agent. - * - * Please see the docs for `grpc::ChannelArguments::SetUserAgentPrefix()` - * on https://grpc.io/grpc/cpp/classgrpc_1_1_channel_arguments.html - * for more details. - * - * @deprecated Please configure `google::cloud::Options` with - * `google::cloud::UserAgentProductsOption` or - * `google::cloud::GrpcChannelArgumentsNativeOption` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` with " - "`google::cloud::UserAgentProductsOption` " - "`google::cloud::GrpcChannelArgumentsNativeOption` instead") - void SetUserAgentPrefix(grpc::string const& user_agent_prefix) { - opts_.lookup().SetUserAgentPrefix( - user_agent_prefix); - } - - /** - * Set the buffer pool to be attached to the constructed channel. - * - * Please see the docs for `grpc::ChannelArguments::SetResourceQuota()` - * on https://grpc.io/grpc/cpp/classgrpc_1_1_channel_arguments.html - * for more details. - * - * @deprecated Please configure `google::cloud::Options` with - * `google::cloud::GrpcChannelArgumentsNativeOption` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` with " - "`google::cloud::GrpcChannelArgumentsNativeOption` instead") - void SetResourceQuota(grpc::ResourceQuota const& resource_quota) { - opts_.lookup().SetResourceQuota( - resource_quota); - } - - /** - * Set the max receive message size in bytes. -1 means unlimited. - * - * Please see the docs for - * `grpc::ChannelArguments::SetMaxReceiveMessageSize()` on - * https://grpc.io/grpc/cpp/classgrpc_1_1_channel_arguments.html for more - * details. - * - * @deprecated Please configure `google::cloud::Options` with - * `google::cloud::GrpcChannelArgumentsNativeOption` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` with " - "`google::cloud::GrpcChannelArgumentsNativeOption` instead") - void SetMaxReceiveMessageSize(int size) { - opts_.lookup().SetMaxReceiveMessageSize( - size); - } - - /** - * Set the max send message size in bytes. -1 means unlimited. - * - * Please see the docs for grpc::ChannelArguments::SetMaxSendMessageSize() - * on https://grpc.io/grpc/cpp/classgrpc_1_1_channel_arguments.html - * for more details. - * - * @deprecated Please configure `google::cloud::Options` with - * `google::cloud::GrpcChannelArgumentsNativeOption` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` with " - "`google::cloud::GrpcChannelArgumentsNativeOption` instead") - void SetMaxSendMessageSize(int size) { - opts_.lookup().SetMaxSendMessageSize( - size); - } - - /** - * Set LB policy name. - * - * Please see the docs for - * grpc::ChannelArguments::SetLoadBalancingPolicyName() - * on https://grpc.io/grpc/cpp/classgrpc_1_1_channel_arguments.html - * for more details. - * - * @deprecated Please configure `google::cloud::Options` with - * `google::cloud::GrpcChannelArgumentsNativeOption` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` with " - "`google::cloud::GrpcChannelArgumentsNativeOption` instead") - void SetLoadBalancingPolicyName(grpc::string const& lb_policy_name) { - opts_.lookup().SetLoadBalancingPolicyName( - lb_policy_name); - } - - /** - * Set service config in JSON form. - * - * Please see the docs for grpc::ChannelArguments::SetServiceConfigJSON() - * on https://grpc.io/grpc/cpp/classgrpc_1_1_channel_arguments.html - * for more details. - * - * @deprecated Please configure `google::cloud::Options` with - * `google::cloud::GrpcChannelArgumentsNativeOption` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` with " - "`google::cloud::GrpcChannelArgumentsNativeOption` instead") - void SetServiceConfigJSON(grpc::string const& service_config_json) { - opts_.lookup().SetServiceConfigJSON( - service_config_json); - } - - /** - * Set target name override for SSL host name checking. - * - * Please see the docs for grpc::ChannelArguments::SetSslTargetNameOverride() - * on https://grpc.io/grpc/cpp/classgrpc_1_1_channel_arguments.html - * for more details. - * - * @deprecated Please configure `google::cloud::Options` with - * `google::cloud::GrpcChannelArgumentsNativeOption` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` with " - "`google::cloud::GrpcChannelArgumentsNativeOption` instead") - void SetSslTargetNameOverride(grpc::string const& name) { - opts_.lookup().SetSslTargetNameOverride( - name); - } - - /// Return the user agent prefix used by the library. - GOOGLE_CLOUD_CPP_DEPRECATED("Not intended for use in application code") - static std::string UserAgentPrefix(); - - /** - * Return whether tracing is enabled for the given @p component. - * - * The C++ clients can log interesting events to help library and application - * developers troubleshoot problems. This flag returns true if tracing should - * be enabled by clients configured with this option. - * - * @deprecated Please configure `google::cloud::Options` with - * `google::cloud::LoggingComponentsOption` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` with " - "`google::cloud::LoggingComponentsOption` instead") - bool tracing_enabled(std::string const& component) const { - return google::cloud::internal::Contains( - opts_.get(), component); - } - - /** - * Enable tracing for @p component in clients configured with this object. - * - * @deprecated Please configure `google::cloud::Options` with - * `google::cloud::LoggingComponentsOption` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` with " - "`google::cloud::LoggingComponentsOption` instead") - ClientOptions& enable_tracing(std::string const& component) { - opts_.lookup().insert(component); - return *this; - } - - /** - * Disable tracing for @p component in clients configured with this object. - * - * @deprecated Please configure `google::cloud::Options` with - * `google::cloud::LoggingComponentsOption` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` with " - "`google::cloud::LoggingComponentsOption` instead") - ClientOptions& disable_tracing(std::string const& component) { - opts_.lookup().erase(component); - return *this; - } - - /** - * Return the options for use when tracing RPCs. - * - * @deprecated Please configure `google::cloud::Options` with - * `google::cloud::GrpcTracingOptionsOption` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` with " - "`google::cloud::GrpcTracingOptionsOption` instead") - TracingOptions const& tracing_options() const { - return opts_.get(); - } - - /** - * Maximum connection refresh period, as set via `set_max_conn_refresh_period` - * - * @deprecated Please configure `google::cloud::Options` with - * `bigtable::MinConnectionRefreshOption` and - * `bigtable::MaxConnectionRefreshOption` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` with `MinConnectionRefreshOption` and " - "`MaxConnectionRefreshOption` instead") - std::chrono::milliseconds max_conn_refresh_period() { - return opts_.get(); - } - - /** - * If set to a positive number, the client will refresh connections at random - * moments not more apart from each other than this duration. This is - * necessary to avoid all connections simultaneously expiring and causing - * latency spikes. - * - * If needed it changes max_conn_refresh_period() to preserve the invariant: - * - * @code - * assert(min_conn_refresh_period() <= max_conn_refresh_period()) - * @endcode - * - * @deprecated Please configure `google::cloud::Options` with - * `bigtable::MinConnectionRefreshOption` and - * `bigtable::MaxConnectionRefreshOption` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` with `MinConnectionRefreshOption` and " - "`MaxConnectionRefreshOption` instead") - ClientOptions& set_max_conn_refresh_period(std::chrono::milliseconds period) { - opts_.set(period); - auto& min_conn_refresh_period = opts_.lookup(); - min_conn_refresh_period = (std::min)(min_conn_refresh_period, period); - return *this; - } - - /** - * Minimum connection refresh period, as set via `set_min_conn_refresh_period` - * - * @deprecated Please configure `google::cloud::Options` with - * `bigtable::MinConnectionRefreshOption` and - * `bigtable::MaxConnectionRefreshOption` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` with `MinConnectionRefreshOption` and " - "`MaxConnectionRefreshOption` instead") - std::chrono::milliseconds min_conn_refresh_period() { - return opts_.get(); - } - - /** - * Configures the *minimum* connection refresh period. The library will wait - * at least this long before attempting any refresh operation. - * - * If needed it changes max_conn_refresh_period() to preserve the invariant: - * - * @code - * assert(min_conn_refresh_period() <= max_conn_refresh_period()) - * @endcode - * - * @deprecated Please configure `google::cloud::Options` with - * `bigtable::MinConnectionRefreshOption` and - * `bigtable::MaxConnectionRefreshOption` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` with `MinConnectionRefreshOption` and " - "`MaxConnectionRefreshOption` instead") - ClientOptions& set_min_conn_refresh_period(std::chrono::milliseconds period) { - opts_.set(period); - auto& max_conn_refresh_period = opts_.lookup(); - max_conn_refresh_period = (std::max)(max_conn_refresh_period, period); - return *this; - } - - /** - * Set the number of background threads. - * - * @note This value is not used if `DisableBackgroundThreads()` is called. - * - * @deprecated Please configure `google::cloud::Options` with - * `google::cloud::GrpcBackgroundThreadPoolSizeOption` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` with " - "`google::cloud::GrpcBackgroundThreadPoolSizeOption` instead") - ClientOptions& set_background_thread_pool_size(std::size_t s) { - opts_.set(s); - return *this; - } - - /** - * Return the number of background threads. - * - * @note This value is not used if `DisableBackgroundThreads()` is called. - * - * @deprecated Please configure `google::cloud::Options` with - * `google::cloud::GrpcBackgroundThreadPoolSizeOption` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` with " - "`google::cloud::GrpcBackgroundThreadPoolSizeOption` instead") - std::size_t background_thread_pool_size() const { - return opts_.get(); - } - - /** - * Configure the connection to use @p cq for all background work. - * - * Connections need to perform background work on behalf of the application. - * Normally they just create a background thread and a `CompletionQueue` for - * this work, but the application may need more fine-grained control of their - * threads. In this case the application can provide the `CompletionQueue` and - * it assumes responsibility for creating one or more threads blocked on - * `CompletionQueue::Run()`. - * - * @deprecated Please configure `google::cloud::Options` with - * `google::cloud::GrpcCompletionQueueOption` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` with " - "`google::cloud::GrpcCompletionQueueOption` instead") - ClientOptions& DisableBackgroundThreads( - google::cloud::CompletionQueue const& cq); - - /** - * Backwards compatibility alias - * - * @deprecated Consider using `google::cloud::BackgroundThreadsFactory` - * directly - */ - using BackgroundThreadsFactory = ::google::cloud::BackgroundThreadsFactory; - - /// @deprecated Not intended for applications to use. There is no alternative - /// implemented or planned. - GOOGLE_CLOUD_CPP_DEPRECATED( - "Not intended for applications to use. There is no alternative " - "implemented or planned") - BackgroundThreadsFactory background_threads_factory() const; - - private: - friend struct ClientOptionsTestTraits; - friend Options&& internal::MakeOptions(ClientOptions&&); - - /// Return the current endpoint for instance admin RPCs. - std::string const& instance_admin_endpoint() const { - return opts_.get(); - } - - std::string connection_pool_name_; - Options opts_; -}; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_CLIENT_OPTIONS_H diff --git a/google/cloud/bigtable/client_options_test.cc b/google/cloud/bigtable/client_options_test.cc deleted file mode 100644 index 80594490cc89d..0000000000000 --- a/google/cloud/bigtable/client_options_test.cc +++ /dev/null @@ -1,593 +0,0 @@ -// Copyright 2017 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/client_options.h" -#include "google/cloud/bigtable/internal/client_options_defaults.h" -#include "google/cloud/bigtable/options.h" -#include "google/cloud/grpc_options.h" -#include "google/cloud/internal/background_threads_impl.h" -#include "google/cloud/status.h" -#include "google/cloud/testing_util/scoped_environment.h" -#include "google/cloud/testing_util/status_matchers.h" -#include "absl/types/optional.h" -#include -#include -// ClientOptions is deprecated. We need to suppress the compiler warnings. -#include "google/cloud/internal/disable_deprecation_warnings.inc" - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -struct ClientOptionsTestTraits { - static std::string const& InstanceAdminEndpoint( - ClientOptions const& options) { - return options.instance_admin_endpoint(); - } -}; -namespace { -using ::google::cloud::internal::GetIntChannelArgument; -using ::google::cloud::internal::GetStringChannelArgument; -using ::google::cloud::testing_util::ScopedEnvironment; -using ::testing::HasSubstr; - -TEST(ClientOptionsTest, ClientOptionsDefaultSettings) { - ClientOptions client_options; - EXPECT_EQ("bigtable.googleapis.com", client_options.data_endpoint()); - EXPECT_EQ("bigtableadmin.googleapis.com", client_options.admin_endpoint()); - EXPECT_EQ(typeid(grpc::GoogleDefaultCredentials()), - typeid(client_options.credentials())); - - EXPECT_EQ("", client_options.connection_pool_name()); - // The number of connections should be >= 1, we "know" what the actual value - // is, but we do not want a change-detection-test. - EXPECT_LE(1UL, client_options.connection_pool_size()); - - auto args = client_options.channel_arguments(); - auto max_send = GetIntChannelArgument(args, GRPC_ARG_MAX_SEND_MESSAGE_LENGTH); - ASSERT_TRUE(max_send.has_value()); - EXPECT_EQ(BIGTABLE_CLIENT_DEFAULT_MAX_MESSAGE_LENGTH, max_send.value()); - auto max_recv = - GetIntChannelArgument(args, GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH); - ASSERT_TRUE(max_recv.has_value()); - EXPECT_EQ(BIGTABLE_CLIENT_DEFAULT_MAX_MESSAGE_LENGTH, max_recv.value()); - - // See `kDefaultKeepaliveTime` - auto time = GetIntChannelArgument(args, GRPC_ARG_KEEPALIVE_TIME_MS); - ASSERT_TRUE(time.has_value()); - EXPECT_EQ(30000, time.value()); - - // See `kDefaultKeepaliveTimeout` - auto timeout = GetIntChannelArgument(args, GRPC_ARG_KEEPALIVE_TIMEOUT_MS); - ASSERT_TRUE(timeout.has_value()); - EXPECT_EQ(10000, timeout.value()); -} - -TEST(ClientOptionsTest, OptionsConstructor) { - using ms = std::chrono::milliseconds; - using min = std::chrono::minutes; - auto channel_args = grpc::ChannelArguments(); - channel_args.SetString("test-key-1", "value-1"); - auto credentials = grpc::InsecureChannelCredentials(); - auto options = ClientOptions( - Options{} - .set("testdata.googleapis.com") - .set("testadmin.googleapis.com") - .set("testinstanceadmin.googleapis.com") - .set(credentials) - .set( - TracingOptions{}.SetOptions("single_line_mode=F")) - .set({"test-component"}) - .set(3) - .set(ms(100)) - .set(min(4)) - .set(5) - .set(channel_args) - .set({{"test-key-2", "value-2"}}) - .set({"test-prefix"})); - - EXPECT_EQ("testdata.googleapis.com", options.data_endpoint()); - EXPECT_EQ("testadmin.googleapis.com", options.admin_endpoint()); - EXPECT_EQ("testinstanceadmin.googleapis.com", - ClientOptionsTestTraits::InstanceAdminEndpoint(options)); - EXPECT_EQ(credentials, options.credentials()); - EXPECT_FALSE(options.tracing_options().single_line_mode()); - EXPECT_TRUE(options.tracing_enabled("test-component")); - EXPECT_EQ(3U, options.connection_pool_size()); - EXPECT_EQ(ms(100), options.min_conn_refresh_period()); - EXPECT_EQ(min(4), options.max_conn_refresh_period()); - EXPECT_EQ(5U, options.background_thread_pool_size()); - auto args = options.channel_arguments(); - auto key1 = GetStringChannelArgument(args, "test-key-1"); - ASSERT_TRUE(key1.has_value()); - EXPECT_EQ("value-1", key1.value()); - auto key2 = GetStringChannelArgument(args, "test-key-2"); - ASSERT_TRUE(key2.has_value()); - EXPECT_EQ("value-2", key2.value()); - auto s = GetStringChannelArgument(args, GRPC_ARG_PRIMARY_USER_AGENT_STRING); - ASSERT_TRUE(s.has_value()); - EXPECT_THAT(*s, HasSubstr("test-prefix")); -} - -TEST(ClientOptionsTest, CustomBackgroundThreadsOption) { - struct Fake : BackgroundThreads { - CompletionQueue cq() const override { return {}; } - }; - bool invoked = false; - auto factory = [&invoked] { - invoked = true; - return std::make_unique(); - }; - - auto options = - ClientOptions(Options{}.set(factory)); - - EXPECT_FALSE(invoked); - options.background_threads_factory()(); - EXPECT_TRUE(invoked); -} - -class ClientOptionsDefaultEndpointTest : public ::testing::Test { - public: - ClientOptionsDefaultEndpointTest() - : bigtable_emulator_host_("BIGTABLE_EMULATOR_HOST", - "testendpoint.googleapis.com"), - bigtable_instance_admin_emulator_host_( - "BIGTABLE_INSTANCE_ADMIN_EMULATOR_HOST", {}) {} - - protected: - static std::string GetInstanceAdminEndpoint(ClientOptions const& options) { - return ClientOptionsTestTraits::InstanceAdminEndpoint(options); - } - - ScopedEnvironment bigtable_emulator_host_; - ScopedEnvironment bigtable_instance_admin_emulator_host_; -}; - -TEST_F(ClientOptionsDefaultEndpointTest, Default) { - ClientOptions client_options; - EXPECT_EQ("testendpoint.googleapis.com", client_options.data_endpoint()); - EXPECT_EQ("testendpoint.googleapis.com", client_options.admin_endpoint()); - EXPECT_EQ("testendpoint.googleapis.com", - GetInstanceAdminEndpoint(client_options)); - - // Just check `MakeOptions()` for endpoints here. - auto opts = internal::MakeOptions(std::move(client_options)); - EXPECT_EQ("testendpoint.googleapis.com", opts.get()); - EXPECT_EQ("testendpoint.googleapis.com", opts.get()); - EXPECT_EQ("testendpoint.googleapis.com", - opts.get()); -} - -TEST_F(ClientOptionsDefaultEndpointTest, WithCredentials) { - auto credentials = grpc::GoogleDefaultCredentials(); - ClientOptions tested(credentials); - EXPECT_EQ("bigtable.googleapis.com", tested.data_endpoint()); - EXPECT_EQ("bigtableadmin.googleapis.com", tested.admin_endpoint()); - EXPECT_EQ(credentials.get(), tested.credentials().get()); -} - -TEST_F(ClientOptionsDefaultEndpointTest, DefaultNoEmulator) { - ScopedEnvironment bigtable_emulator_host("BIGTABLE_EMULATOR_HOST", {}); - - auto credentials = grpc::GoogleDefaultCredentials(); - ClientOptions tested(credentials); - EXPECT_EQ("bigtable.googleapis.com", tested.data_endpoint()); - EXPECT_EQ("bigtableadmin.googleapis.com", tested.admin_endpoint()); - EXPECT_EQ("bigtableadmin.googleapis.com", GetInstanceAdminEndpoint(tested)); -} - -TEST_F(ClientOptionsDefaultEndpointTest, SeparateEmulators) { - ScopedEnvironment bigtable_emulator_host("BIGTABLE_EMULATOR_HOST", - "emulator-host:8000"); - ScopedEnvironment bigtable_instance_admin_emulator_host( - "BIGTABLE_INSTANCE_ADMIN_EMULATOR_HOST", "instance-emulator-host:9000"); - ClientOptions actual; - EXPECT_EQ("emulator-host:8000", actual.data_endpoint()); - EXPECT_EQ("emulator-host:8000", actual.admin_endpoint()); - EXPECT_EQ("instance-emulator-host:9000", GetInstanceAdminEndpoint(actual)); -} - -TEST_F(ClientOptionsDefaultEndpointTest, DataNoEnv) { - ScopedEnvironment bigtable_emulator_host("BIGTABLE_EMULATOR_HOST", {}); - EXPECT_EQ("bigtable.googleapis.com", ClientOptions{}.data_endpoint()); -} - -TEST_F(ClientOptionsDefaultEndpointTest, AdminNoEnv) { - ScopedEnvironment bigtable_emulator_host("BIGTABLE_EMULATOR_HOST", {}); - EXPECT_EQ("bigtableadmin.googleapis.com", ClientOptions{}.admin_endpoint()); -} - -TEST_F(ClientOptionsDefaultEndpointTest, AdminEmulatorOverrides) { - ScopedEnvironment bigtable_emulator_host("BIGTABLE_EMULATOR_HOST", - "127.0.0.1:1234"); - EXPECT_EQ("127.0.0.1:1234", ClientOptions{}.admin_endpoint()); -} - -TEST_F(ClientOptionsDefaultEndpointTest, AdminInstanceAdminNoEffect) { - ScopedEnvironment bigtable_emulator_host("BIGTABLE_EMULATOR_HOST", {}); - ScopedEnvironment bigtable_instance_admin_emulator_host( - "BIGTABLE_INSTANCE_ADMIN_EMULATOR_HOST", "127.0.0.1:1234"); - EXPECT_EQ("bigtableadmin.googleapis.com", ClientOptions{}.admin_endpoint()); -} - -TEST_F(ClientOptionsDefaultEndpointTest, InstanceAdminNoEnv) { - ScopedEnvironment bigtable_emulator_host("BIGTABLE_EMULATOR_HOST", {}); - EXPECT_EQ("bigtableadmin.googleapis.com", - GetInstanceAdminEndpoint(ClientOptions())); -} - -TEST_F(ClientOptionsDefaultEndpointTest, InstanceAdminEmulatorOverrides) { - ScopedEnvironment bigtable_emulator_host("BIGTABLE_EMULATOR_HOST", - "127.0.0.1:1234"); - EXPECT_EQ("127.0.0.1:1234", GetInstanceAdminEndpoint(ClientOptions())); -} - -TEST_F(ClientOptionsDefaultEndpointTest, InstanceAdminInstanceAdminOverrides) { - ScopedEnvironment bigtable_emulator_host("BIGTABLE_EMULATOR_HOST", "unused"); - ScopedEnvironment bigtable_instance_admin_emulator_host( - "BIGTABLE_INSTANCE_ADMIN_EMULATOR_HOST", "127.0.0.1:1234"); - EXPECT_EQ("127.0.0.1:1234", GetInstanceAdminEndpoint(ClientOptions())); -} - -TEST(ClientOptionsTest, EditDataEndpoint) { - auto client_options = ClientOptions{}.set_data_endpoint("customendpoint.com"); - EXPECT_EQ("customendpoint.com", client_options.data_endpoint()); -} - -TEST(ClientOptionsTest, EditAdminEndpoint) { - auto client_options = - ClientOptions{}.set_admin_endpoint("customendpoint.com"); - EXPECT_EQ("customendpoint.com", client_options.admin_endpoint()); - EXPECT_EQ("customendpoint.com", - ClientOptionsTestTraits::InstanceAdminEndpoint(client_options)); -} - -TEST(ClientOptionsTest, EditCredentials) { - auto client_options = - ClientOptions{}.SetCredentials(grpc::InsecureChannelCredentials()); - EXPECT_EQ(typeid(grpc::InsecureChannelCredentials()), - typeid(client_options.credentials())); - - auto opts = internal::MakeOptions(std::move(client_options)); - EXPECT_EQ(typeid(grpc::InsecureChannelCredentials()), - typeid(opts.get())); -} - -TEST(ClientOptionsTest, EditConnectionPoolName) { - ClientOptions client_options; - auto& returned = client_options.set_connection_pool_name("foo"); - EXPECT_EQ(&returned, &client_options); - EXPECT_EQ("foo", returned.connection_pool_name()); - - auto opts = internal::MakeOptions(std::move(client_options)); - auto args = google::cloud::internal::MakeChannelArguments(opts); - auto name = GetStringChannelArgument(args, "cbt-c++/connection-pool-name"); - ASSERT_TRUE(name.has_value()); - EXPECT_EQ("foo", name); -} - -TEST(ClientOptionsTest, EditConnectionPoolSize) { - ClientOptions client_options; - auto& returned = client_options.set_connection_pool_size(42); - EXPECT_EQ(&returned, &client_options); - EXPECT_EQ(42UL, returned.connection_pool_size()); - - auto opts = internal::MakeOptions(std::move(client_options)); - EXPECT_EQ(42, opts.get()); -} - -TEST(ClientOptionsTest, ResetToDefaultConnectionPoolSize) { - ClientOptions client_options; - auto& returned = client_options.set_connection_pool_size(0); - EXPECT_EQ(&returned, &client_options); - // The number of connections should be >= 1, we "know" what the actual value - // is, but we do not want a change-detection-test. - EXPECT_LE(1UL, returned.connection_pool_size()); -} - -TEST(ClientOptionsTest, ConnectionPoolSizeDoesNotExceedMax) { - ClientOptions client_options; - auto& returned = client_options.set_connection_pool_size( - BIGTABLE_CLIENT_DEFAULT_CONNECTION_POOL_SIZE_MAX + 1); - EXPECT_EQ(&returned, &client_options); - // The number of connections should be >= 1, we "know" what the actual value - // is, but we do not want a change-detection-test. - EXPECT_LE(BIGTABLE_CLIENT_DEFAULT_CONNECTION_POOL_SIZE_MAX, - returned.connection_pool_size()); -} - -TEST(ClientOptionsTest, SetGrpclbFallbackTimeoutMS) { - // Test milliseconds are set properly to channel_arguments - ClientOptions client_options; - ASSERT_STATUS_OK( - client_options.SetGrpclbFallbackTimeout(std::chrono::milliseconds(5))); - - auto args = client_options.channel_arguments(); - auto actual = - GetIntChannelArgument(args, GRPC_ARG_GRPCLB_FALLBACK_TIMEOUT_MS); - ASSERT_TRUE(actual.has_value()); - EXPECT_EQ(*actual, 5); - - auto opts = internal::MakeOptions(std::move(client_options)); - args = google::cloud::internal::MakeChannelArguments(opts); - actual = GetIntChannelArgument(args, GRPC_ARG_GRPCLB_FALLBACK_TIMEOUT_MS); - ASSERT_TRUE(actual.has_value()); - EXPECT_EQ(*actual, 5); -} - -TEST(ClientOptionsTest, SetGrpclbFallbackTimeoutSec) { - // Test seconds are converted into milliseconds - ClientOptions client_options; - ASSERT_STATUS_OK( - client_options.SetGrpclbFallbackTimeout(std::chrono::seconds(5))); - - auto args = client_options.channel_arguments(); - auto actual = - GetIntChannelArgument(args, GRPC_ARG_GRPCLB_FALLBACK_TIMEOUT_MS); - ASSERT_TRUE(actual.has_value()); - EXPECT_EQ(*actual, 5000); - - auto opts = internal::MakeOptions(std::move(client_options)); - args = google::cloud::internal::MakeChannelArguments(opts); - actual = GetIntChannelArgument(args, GRPC_ARG_GRPCLB_FALLBACK_TIMEOUT_MS); - ASSERT_TRUE(actual.has_value()); - EXPECT_EQ(*actual, 5000); -} - -TEST(ClientOptionsTest, SetGrpclbFallbackTimeoutException) { - // Test if fallback_timeout exceeds int range and StatusCode - // matches kOutOfRange - ClientOptions client_options; - EXPECT_EQ( - client_options.SetGrpclbFallbackTimeout(std::chrono::hours(999)).code(), - google::cloud::StatusCode::kOutOfRange); -} - -TEST(ClientOptionsTest, SetCompressionAlgorithm) { - ClientOptions client_options; - client_options.SetCompressionAlgorithm(GRPC_COMPRESS_NONE); - - auto args = client_options.channel_arguments(); - auto actual = - GetIntChannelArgument(args, GRPC_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM); - ASSERT_TRUE(actual.has_value()); - EXPECT_EQ(*actual, GRPC_COMPRESS_NONE); - - auto opts = internal::MakeOptions(std::move(client_options)); - args = google::cloud::internal::MakeChannelArguments(opts); - actual = - GetIntChannelArgument(args, GRPC_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM); - ASSERT_TRUE(actual.has_value()); - EXPECT_EQ(*actual, GRPC_COMPRESS_NONE); -} - -TEST(ClientOptionsTest, SetLoadBalancingPolicyName) { - ClientOptions client_options; - client_options.SetLoadBalancingPolicyName("test-policy-name"); - - auto args = client_options.channel_arguments(); - auto actual = GetStringChannelArgument(args, GRPC_ARG_LB_POLICY_NAME); - ASSERT_TRUE(actual.has_value()); - EXPECT_EQ(*actual, "test-policy-name"); - - auto opts = internal::MakeOptions(std::move(client_options)); - args = google::cloud::internal::MakeChannelArguments(opts); - actual = GetStringChannelArgument(args, GRPC_ARG_LB_POLICY_NAME); - ASSERT_TRUE(actual.has_value()); - EXPECT_EQ(*actual, "test-policy-name"); -} - -TEST(ClientOptionsTest, SetServiceConfigJSON) { - ClientOptions client_options; - client_options.SetServiceConfigJSON("test-config"); - - auto args = client_options.channel_arguments(); - auto actual = GetStringChannelArgument(args, GRPC_ARG_SERVICE_CONFIG); - ASSERT_TRUE(actual.has_value()); - EXPECT_EQ(*actual, "test-config"); - - auto opts = internal::MakeOptions(std::move(client_options)); - args = google::cloud::internal::MakeChannelArguments(opts); - actual = GetStringChannelArgument(args, GRPC_ARG_SERVICE_CONFIG); - ASSERT_TRUE(actual.has_value()); - EXPECT_EQ(*actual, "test-config"); -} - -TEST(ClientOptionsTest, SetUserAgentPrefix) { - ClientOptions client_options; - client_options.SetUserAgentPrefix("test_prefix"); - - auto args = client_options.channel_arguments(); - auto actual = - GetStringChannelArgument(args, GRPC_ARG_PRIMARY_USER_AGENT_STRING); - ASSERT_TRUE(actual.has_value()); - EXPECT_THAT(*actual, HasSubstr("test_prefix")); - - auto opts = internal::MakeOptions(std::move(client_options)); - args = google::cloud::internal::MakeChannelArguments(opts); - actual = GetStringChannelArgument(args, GRPC_ARG_PRIMARY_USER_AGENT_STRING); - ASSERT_TRUE(actual.has_value()); - EXPECT_THAT(*actual, HasSubstr("test_prefix")); -} - -TEST(ClientOptionsTest, SetSslTargetNameOverride) { - ClientOptions client_options; - client_options.SetSslTargetNameOverride("test-name"); - - auto args = client_options.channel_arguments(); - auto actual = - GetStringChannelArgument(args, GRPC_SSL_TARGET_NAME_OVERRIDE_ARG); - ASSERT_TRUE(actual.has_value()); - EXPECT_EQ(*actual, "test-name"); - - auto opts = internal::MakeOptions(std::move(client_options)); - args = google::cloud::internal::MakeChannelArguments(opts); - actual = GetStringChannelArgument(args, GRPC_SSL_TARGET_NAME_OVERRIDE_ARG); - ASSERT_TRUE(actual.has_value()); - EXPECT_EQ(*actual, "test-name"); -} - -TEST(ClientOptionsTest, UserAgentPrefix) { - std::string const actual = ClientOptions::UserAgentPrefix(); - EXPECT_THAT(actual, HasSubstr("gl-cpp/")); -} - -TEST(ClientOptionsTest, RefreshPeriod) { - auto options = ClientOptions(); - EXPECT_LE(options.min_conn_refresh_period(), - options.max_conn_refresh_period()); - using ms = std::chrono::milliseconds; - - options.set_min_conn_refresh_period(ms(1000)); - EXPECT_EQ(1000, options.min_conn_refresh_period().count()); - - options.set_max_conn_refresh_period(ms(2000)); - EXPECT_EQ(2000, options.max_conn_refresh_period().count()); - - options.set_min_conn_refresh_period(ms(3000)); - EXPECT_EQ(3000, options.min_conn_refresh_period().count()); - EXPECT_EQ(3000, options.max_conn_refresh_period().count()); - - options.set_max_conn_refresh_period(ms(1500)); - EXPECT_EQ(1500, options.min_conn_refresh_period().count()); - EXPECT_EQ(1500, options.max_conn_refresh_period().count()); - - options.set_max_conn_refresh_period(ms(5000)); - EXPECT_EQ(1500, options.min_conn_refresh_period().count()); - EXPECT_EQ(5000, options.max_conn_refresh_period().count()); - - options.set_min_conn_refresh_period(ms(1000)); - EXPECT_EQ(1000, options.min_conn_refresh_period().count()); - EXPECT_EQ(5000, options.max_conn_refresh_period().count()); - - auto opts = internal::MakeOptions(std::move(options)); - EXPECT_EQ(1000, opts.get().count()); - EXPECT_EQ(5000, opts.get().count()); -} - -TEST(ClientOptionsTest, TracingComponents) { - ScopedEnvironment tracing("GOOGLE_CLOUD_CPP_ENABLE_TRACING", "foo,bar"); - auto options = ClientOptions(); - - // Check defaults - EXPECT_TRUE(options.tracing_enabled("foo")); - EXPECT_TRUE(options.tracing_enabled("bar")); - EXPECT_FALSE(options.tracing_enabled("baz")); - - // Edit components - options.enable_tracing("baz"); - EXPECT_TRUE(options.tracing_enabled("baz")); - options.disable_tracing("foo"); - EXPECT_FALSE(options.tracing_enabled("foo")); - - // Check `MakeOptions()` - auto opts = internal::MakeOptions(std::move(options)); - EXPECT_THAT(opts.get(), - testing::UnorderedElementsAre("bar", "baz")); -} - -TEST(ClientOptionsTest, DefaultTracingOptionsNoEnv) { - ScopedEnvironment tracing("GOOGLE_CLOUD_CPP_TRACING_OPTIONS", absl::nullopt); - - ClientOptions client_options; - auto tracing_options = client_options.tracing_options(); - EXPECT_EQ(TracingOptions(), tracing_options); - - auto opts = internal::MakeOptions(std::move(client_options)); - tracing_options = opts.get(); - EXPECT_EQ(TracingOptions(), tracing_options); -} - -TEST(ClientOptionsTest, DefaultTracingOptionsEnv) { - ScopedEnvironment tracing("GOOGLE_CLOUD_CPP_TRACING_OPTIONS", - "single_line_mode=F"); - - ClientOptions client_options; - auto tracing_options = client_options.tracing_options(); - EXPECT_FALSE(tracing_options.single_line_mode()); - - auto opts = internal::MakeOptions(std::move(client_options)); - tracing_options = opts.get(); - EXPECT_FALSE(tracing_options.single_line_mode()); -} - -TEST(ClientOptionsTest, BackgroundThreadPoolSize) { - using ThreadPool = - ::google::cloud::internal::AutomaticallyCreatedBackgroundThreads; - - auto options = ClientOptions(); - // Check that the default value is 0 or 1. Both values result in the - // BackgroundThreadsFactory creating a ThreadPool with a single thread in it. - EXPECT_GE(1U, options.background_thread_pool_size()); - - auto background = options.background_threads_factory()(); - auto* tp = dynamic_cast(background.get()); - ASSERT_NE(nullptr, tp); - EXPECT_EQ(1U, tp->pool_size()); - - options.set_background_thread_pool_size(5U); - EXPECT_EQ(5U, options.background_thread_pool_size()); - - background = options.background_threads_factory()(); - tp = dynamic_cast(background.get()); - ASSERT_NE(nullptr, tp); - EXPECT_EQ(5U, tp->pool_size()); - - auto opts = internal::MakeOptions(std::move(options)); - EXPECT_EQ(5U, opts.get()); - EXPECT_FALSE(opts.has()); -} - -TEST(ClientOptionsTest, CustomBackgroundThreads) { - auto check = [](CompletionQueue& cq, - std::unique_ptr background) { - using ms = std::chrono::milliseconds; - - // Schedule some work that cannot execute because there is no thread - // draining the completion queue. - promise p; - auto background_thread_id = p.get_future(); - background->cq().RunAsync( - [&p](CompletionQueue&) { p.set_value(std::this_thread::get_id()); }); - EXPECT_NE(std::future_status::ready, background_thread_id.wait_for(ms(10))); - - // Verify we can create our own threads to drain the completion queue. - std::thread t([&cq] { cq.Run(); }); - EXPECT_EQ(t.get_id(), background_thread_id.get()); - - cq.Shutdown(); - t.join(); - }; - - CompletionQueue cq; - auto client_options = ClientOptions().DisableBackgroundThreads(cq); - auto background = client_options.background_threads_factory()(); - - check(cq, std::move(background)); - - cq = CompletionQueue(); - client_options = ClientOptions().DisableBackgroundThreads(cq); - auto opts = internal::MakeOptions(std::move(client_options)); - background = - google::cloud::internal::MakeBackgroundThreadsFactory(std::move(opts))(); - - check(cq, std::move(background)); -} - -} // namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/cluster_config.h b/google/cloud/bigtable/cluster_config.h index 7902116895f4b..465f96725e161 100644 --- a/google/cloud/bigtable/cluster_config.h +++ b/google/cloud/bigtable/cluster_config.h @@ -16,7 +16,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_CLUSTER_CONFIG_H #include "google/cloud/bigtable/version.h" -#include +#include "google/bigtable/admin/v2/bigtable_instance_admin.pb.h" #include namespace google { diff --git a/google/cloud/bigtable/cluster_list_responses.h b/google/cloud/bigtable/cluster_list_responses.h index fad0e53e6c655..ad51ea6627955 100644 --- a/google/cloud/bigtable/cluster_list_responses.h +++ b/google/cloud/bigtable/cluster_list_responses.h @@ -16,7 +16,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_CLUSTER_LIST_RESPONSES_H #include "google/cloud/bigtable/version.h" -#include +#include "google/bigtable/admin/v2/bigtable_instance_admin.pb.h" #include #include diff --git a/google/cloud/bigtable/column_family.h b/google/cloud/bigtable/column_family.h index 76cb5e3a8c1cc..28c898df25139 100644 --- a/google/cloud/bigtable/column_family.h +++ b/google/cloud/bigtable/column_family.h @@ -17,8 +17,8 @@ #include "google/cloud/bigtable/version.h" #include "absl/meta/type_traits.h" -#include -#include +#include "google/bigtable/admin/v2/bigtable_table_admin.pb.h" +#include "google/bigtable/admin/v2/table.pb.h" #include #include #include diff --git a/google/cloud/bigtable/config.cmake.in b/google/cloud/bigtable/config.cmake.in index 08da71ca1ef59..132b672e71812 100644 --- a/google/cloud/bigtable/config.cmake.in +++ b/google/cloud/bigtable/config.cmake.in @@ -19,6 +19,5 @@ find_dependency(google_cloud_cpp_common) find_dependency(google_cloud_cpp_grpc_utils) find_dependency(google_cloud_cpp_opentelemetry) find_dependency(absl) -find_dependency(Crc32c) include("${CMAKE_CURRENT_LIST_DIR}/google_cloud_cpp_bigtable-targets.cmake") diff --git a/google/cloud/bigtable/data_client.cc b/google/cloud/bigtable/data_client.cc deleted file mode 100644 index 9932d24c541e7..0000000000000 --- a/google/cloud/bigtable/data_client.cc +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright 2017 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/data_client.h" -#include "google/cloud/bigtable/internal/common_client.h" -#include "google/cloud/bigtable/internal/logging_data_client.h" -#include "google/cloud/internal/log_wrapper.h" -#include "google/cloud/log.h" - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -namespace btproto = ::google::bigtable::v2; - -std::unique_ptr< - ::grpc::ClientAsyncReaderInterface> -// NOLINTNEXTLINE(performance-unnecessary-value-param) -DataClient::PrepareAsyncSampleRowKeys(grpc::ClientContext*, - btproto::SampleRowKeysRequest const&, - grpc::CompletionQueue*) { - return nullptr; -} - -namespace { - -// TODO(#8800) - remove after `DataClient` deprecation is complete -#include "google/cloud/internal/disable_deprecation_warnings.inc" - -/** - * Implement a simple DataClient. - * - * This implementation does not support multiple threads, or refresh - * authorization tokens. In other words, it is extremely bare bones. - */ -class DefaultDataClient : public DataClient { - public: - DefaultDataClient(std::string project, std::string instance, - Options options = {}) - : project_(std::move(project)), - instance_(std::move(instance)), - authority_(options.get()), - user_project_( - options.has() - ? absl::make_optional(options.get()) - : absl::nullopt), - impl_(std::move(options)) {} - - std::string const& project_id() const override { return project_; }; - std::string const& instance_id() const override { return instance_; }; - - std::shared_ptr Channel() override { return impl_.Channel(); } - void reset() override { impl_.reset(); } - - grpc::Status MutateRow(grpc::ClientContext* context, - btproto::MutateRowRequest const& request, - btproto::MutateRowResponse* response) override { - ApplyOptions(context); - return impl_.Stub()->MutateRow(context, request, response); - } - - std::unique_ptr< - grpc::ClientAsyncResponseReaderInterface> - AsyncMutateRow(grpc::ClientContext* context, - btproto::MutateRowRequest const& request, - grpc::CompletionQueue* cq) override { - ApplyOptions(context); - return impl_.Stub()->AsyncMutateRow(context, request, cq); - } - - grpc::Status CheckAndMutateRow( - grpc::ClientContext* context, - btproto::CheckAndMutateRowRequest const& request, - btproto::CheckAndMutateRowResponse* response) override { - ApplyOptions(context); - return impl_.Stub()->CheckAndMutateRow(context, request, response); - } - - std::unique_ptr> - AsyncCheckAndMutateRow(grpc::ClientContext* context, - btproto::CheckAndMutateRowRequest const& request, - grpc::CompletionQueue* cq) override { - ApplyOptions(context); - return impl_.Stub()->AsyncCheckAndMutateRow(context, request, cq); - } - - grpc::Status ReadModifyWriteRow( - grpc::ClientContext* context, - btproto::ReadModifyWriteRowRequest const& request, - btproto::ReadModifyWriteRowResponse* response) override { - ApplyOptions(context); - return impl_.Stub()->ReadModifyWriteRow(context, request, response); - } - - std::unique_ptr> - AsyncReadModifyWriteRow(grpc::ClientContext* context, - btproto::ReadModifyWriteRowRequest const& request, - grpc::CompletionQueue* cq) override { - ApplyOptions(context); - return impl_.Stub()->AsyncReadModifyWriteRow(context, request, cq); - } - - std::unique_ptr> - ReadRows(grpc::ClientContext* context, - btproto::ReadRowsRequest const& request) override { - ApplyOptions(context); - return impl_.Stub()->ReadRows(context, request); - } - - std::unique_ptr> - AsyncReadRows(grpc::ClientContext* context, - btproto::ReadRowsRequest const& request, - grpc::CompletionQueue* cq, void* tag) override { - ApplyOptions(context); - return impl_.Stub()->AsyncReadRows(context, request, cq, tag); - } - - std::unique_ptr<::grpc::ClientAsyncReaderInterface> - PrepareAsyncReadRows(grpc::ClientContext* context, - btproto::ReadRowsRequest const& request, - grpc::CompletionQueue* cq) override { - ApplyOptions(context); - return impl_.Stub()->PrepareAsyncReadRows(context, request, cq); - } - - std::unique_ptr> - SampleRowKeys(grpc::ClientContext* context, - btproto::SampleRowKeysRequest const& request) override { - ApplyOptions(context); - return impl_.Stub()->SampleRowKeys(context, request); - } - - std::unique_ptr< - ::grpc::ClientAsyncReaderInterface> - AsyncSampleRowKeys(grpc::ClientContext* context, - btproto::SampleRowKeysRequest const& request, - grpc::CompletionQueue* cq, void* tag) override { - ApplyOptions(context); - return impl_.Stub()->AsyncSampleRowKeys(context, request, cq, tag); - } - - std::unique_ptr< - ::grpc::ClientAsyncReaderInterface> - PrepareAsyncSampleRowKeys(grpc::ClientContext* context, - btproto::SampleRowKeysRequest const& request, - grpc::CompletionQueue* cq) override { - ApplyOptions(context); - return impl_.Stub()->PrepareAsyncSampleRowKeys(context, request, cq); - } - - std::unique_ptr> - MutateRows(grpc::ClientContext* context, - btproto::MutateRowsRequest const& request) override { - ApplyOptions(context); - return impl_.Stub()->MutateRows(context, request); - } - - std::unique_ptr< - ::grpc::ClientAsyncReaderInterface> - AsyncMutateRows(grpc::ClientContext* context, - btproto::MutateRowsRequest const& request, - grpc::CompletionQueue* cq, void* tag) override { - ApplyOptions(context); - return impl_.Stub()->AsyncMutateRows(context, request, cq, tag); - } - - std::unique_ptr< - ::grpc::ClientAsyncReaderInterface> - PrepareAsyncMutateRows(grpc::ClientContext* context, - btproto::MutateRowsRequest const& request, - grpc::CompletionQueue* cq) override { - ApplyOptions(context); - return impl_.Stub()->PrepareAsyncMutateRows(context, request, cq); - } - - private: - google::cloud::BackgroundThreadsFactory BackgroundThreadsFactory() override { - return impl_.BackgroundThreadsFactory(); - } - - void ApplyOptions(grpc::ClientContext* context) { - if (!authority_.empty()) context->set_authority(authority_); - if (user_project_) { - context->AddMetadata("x-goog-user-project", *user_project_); - } - } - - std::string project_; - std::string instance_; - std::string authority_; - absl::optional user_project_; - internal::CommonClient impl_; -}; - -// TODO(#8800) - remove after `DataClient` deprecation is complete -#include "google/cloud/internal/diagnostics_pop.inc" - -} // namespace - -std::shared_ptr MakeDataClient(std::string project_id, - std::string instance_id, - Options options) { - options = internal::DefaultDataOptions(std::move(options)); - bool tracing_enabled = google::cloud::internal::Contains( - options.get(), "rpc"); - auto tracing_options = options.get(); - - std::shared_ptr client = std::make_shared( - std::move(project_id), std::move(instance_id), std::move(options)); - if (tracing_enabled) { - GCP_LOG(INFO) << "Enabled logging for gRPC calls"; - client = std::make_shared( - std::move(client), std::move(tracing_options)); - } - return client; -} - -std::shared_ptr CreateDefaultDataClient(std::string project_id, - std::string instance_id, - ClientOptions options) { - return MakeDataClient(std::move(project_id), std::move(instance_id), - internal::MakeOptions(std::move(options))); -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/data_client.h b/google/cloud/bigtable/data_client.h deleted file mode 100644 index 99b8ce658bf97..0000000000000 --- a/google/cloud/bigtable/data_client.h +++ /dev/null @@ -1,235 +0,0 @@ -// Copyright 2017 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_DATA_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_DATA_CLIENT_H - -#include "google/cloud/bigtable/client_options.h" -#include "google/cloud/bigtable/completion_queue.h" -#include "google/cloud/bigtable/row.h" -#include "google/cloud/bigtable/version.h" -#include -#include - -namespace google { -namespace cloud { -// Forward declare some classes so we can be friends. -namespace bigtable_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -class BulkMutator; -class LegacyAsyncRowReader; -class LegacyRowReader; -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable_internal -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -class Table; -namespace internal { -class AsyncRetryBulkApply; -class LegacyAsyncRowSampler; -class LoggingDataClient; -} // namespace internal - -/** - * Connects to Cloud Bigtable's data manipulation APIs. - * - * This class is used by the Cloud Bigtable wrappers to access Cloud Bigtable. - * Multiple `bigtable::Table` objects may share a connection via a single - * `DataClient` object. The `DataClient` object is configured at construction - * time, this configuration includes the credentials, access endpoints, default - * timeouts, and other gRPC configuration options. This is an interface class - * because it is also used as a dependency injection point in some of the tests. - * - * @par Cost - * Applications should avoid unnecessarily creating new objects of type - * `DataClient`. Creating a new object of this type typically requires - * connecting to the Cloud Bigtable servers, and performing the authentication - * workflows with Google Cloud Platform. These operations can take many - * milliseconds, therefore applications should try to reuse the same - * `DataClient` instances when possible. - * - * @deprecated #google::cloud::bigtable::DataConnection is the preferred way to - * communicate with the Bigtable Data API. To migrate existing code, see - * @ref migrating-from-dataclient "Migrating from DataClient". - */ -class DataClient { - public: - virtual ~DataClient() = default; - - virtual std::string const& project_id() const = 0; - virtual std::string const& instance_id() const = 0; - - /** - * Return a new channel to handle admin operations. - * - * Intended to access rarely used services in the same endpoints as the - * Bigtable admin interfaces, for example, the google.longrunning.Operations. - * - * @deprecated This member function is scheduled for deletion and `DataClient` - * will be marked as `final`. Do not extend this class. Application - * developers who need to configure the gRPC Channel can pass any of the - * following options into `MakeDataClient(...)`: - * * `google::cloud::GrpcChannelArgumentsOption` - * * `google::cloud::GrpcChannelArgumentsNativeOption` - */ - GOOGLE_CLOUD_CPP_BIGTABLE_DATA_CLIENT_DEPRECATED("Channel()") - virtual std::shared_ptr Channel() = 0; - - /** - * Reset and create new Channels. - * - * @deprecated This member function is scheduled for deletion and `DataClient` - * will be marked as `final`. Do not extend this class. The client library - * will handle all interactions with the gRPC channels. - */ - GOOGLE_CLOUD_CPP_BIGTABLE_DATA_CLIENT_DEPRECATED("reset()") - virtual void reset() = 0; - - /** - * The thread factory this client was created with. - * - * @deprecated This member function is scheduled for deletion and `DataClient` - * will be marked as `final`. Do not extend this class. Application - * developers who need to configure the background threads can pass any - * of the following options into `MakeDataClient(...)`: - * * `google::cloud::GrpcBackgroundThreadPoolSizeOption` - * * `google::cloud::GrpcCompletionQueueOption` - * * `google::cloud::GrpcBackgroundThreadFactoryOption` - */ - virtual google::cloud::BackgroundThreadsFactory - BackgroundThreadsFactory() = 0; - - // The member functions of this class are not intended for general use by - // application developers (they are simply a dependency injection point). Make - // them protected, so the mock classes can override them, and then make the - // classes that do use them friends. - protected: - friend class Table; - friend class internal::AsyncRetryBulkApply; - friend class internal::LegacyAsyncRowSampler; - friend class bigtable_internal::BulkMutator; - friend class bigtable_internal::LegacyRowReader; - friend class bigtable_internal::LegacyAsyncRowReader; - friend class internal::LoggingDataClient; - - ///@{ - /// @name the `google.bigtable.v2.Bigtable` wrappers. - virtual grpc::Status MutateRow( - grpc::ClientContext* context, - google::bigtable::v2::MutateRowRequest const& request, - google::bigtable::v2::MutateRowResponse* response) = 0; - virtual std::unique_ptr> - AsyncMutateRow(grpc::ClientContext* context, - google::bigtable::v2::MutateRowRequest const& request, - grpc::CompletionQueue* cq) = 0; - virtual grpc::Status CheckAndMutateRow( - grpc::ClientContext* context, - google::bigtable::v2::CheckAndMutateRowRequest const& request, - google::bigtable::v2::CheckAndMutateRowResponse* response) = 0; - virtual std::unique_ptr> - AsyncCheckAndMutateRow( - grpc::ClientContext* context, - google::bigtable::v2::CheckAndMutateRowRequest const& request, - grpc::CompletionQueue* cq) = 0; - virtual grpc::Status ReadModifyWriteRow( - grpc::ClientContext* context, - google::bigtable::v2::ReadModifyWriteRowRequest const& request, - google::bigtable::v2::ReadModifyWriteRowResponse* response) = 0; - virtual std::unique_ptr> - AsyncReadModifyWriteRow( - grpc::ClientContext* context, - google::bigtable::v2::ReadModifyWriteRowRequest const& request, - grpc::CompletionQueue* cq) = 0; - virtual std::unique_ptr< - grpc::ClientReaderInterface> - ReadRows(grpc::ClientContext* context, - google::bigtable::v2::ReadRowsRequest const& request) = 0; - virtual std::unique_ptr< - grpc::ClientAsyncReaderInterface> - AsyncReadRows(grpc::ClientContext* context, - google::bigtable::v2::ReadRowsRequest const& request, - grpc::CompletionQueue* cq, void* tag) = 0; - virtual std::unique_ptr<::grpc::ClientAsyncReaderInterface< - google::bigtable::v2::ReadRowsResponse>> - PrepareAsyncReadRows(::grpc::ClientContext* context, - google::bigtable::v2::ReadRowsRequest const& request, - grpc::CompletionQueue* cq) = 0; - virtual std::unique_ptr< - grpc::ClientReaderInterface> - SampleRowKeys(grpc::ClientContext* context, - google::bigtable::v2::SampleRowKeysRequest const& request) = 0; - virtual std::unique_ptr<::grpc::ClientAsyncReaderInterface< - google::bigtable::v2::SampleRowKeysResponse>> - AsyncSampleRowKeys(grpc::ClientContext* context, - google::bigtable::v2::SampleRowKeysRequest const& request, - grpc::CompletionQueue* cq, void* tag) = 0; - virtual std::unique_ptr<::grpc::ClientAsyncReaderInterface< - google::bigtable::v2::SampleRowKeysResponse>> - PrepareAsyncSampleRowKeys( - grpc::ClientContext* context, - google::bigtable::v2::SampleRowKeysRequest const& request, - grpc::CompletionQueue* cq); - virtual std::unique_ptr< - grpc::ClientReaderInterface> - MutateRows(grpc::ClientContext* context, - google::bigtable::v2::MutateRowsRequest const& request) = 0; - virtual std::unique_ptr<::grpc::ClientAsyncReaderInterface< - google::bigtable::v2::MutateRowsResponse>> - AsyncMutateRows(::grpc::ClientContext* context, - google::bigtable::v2::MutateRowsRequest const& request, - grpc::CompletionQueue* cq, void* tag) = 0; - virtual std::unique_ptr<::grpc::ClientAsyncReaderInterface< - google::bigtable::v2::MutateRowsResponse>> - PrepareAsyncMutateRows(grpc::ClientContext* context, - google::bigtable::v2::MutateRowsRequest const& request, - grpc::CompletionQueue* cq) = 0; - ///@} -}; - -/// Create a new data client configured via @p options. -std::shared_ptr MakeDataClient(std::string project_id, - std::string instance_id, - Options options = {}); - -/** - * Create a new data client configured via @p options. - * - * @deprecated use the `MakeDataClient` method which accepts - * `google::cloud::Options` instead. - */ -GOOGLE_CLOUD_CPP_DEPRECATED("use `MakeDataClient` instead") -std::shared_ptr CreateDefaultDataClient(std::string project_id, - std::string instance_id, - ClientOptions options); - -/** - * Return the fully qualified instance name for the @p client. - * - * Compute the full path of the instance associated with the client, i.e., - * `projects/instances/project_id()>/instances/instance_id()>` - */ -inline std::string InstanceName(std::shared_ptr const& client) { - return "projects/" + client->project_id() + "/instances/" + - client->instance_id(); -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_DATA_CLIENT_H diff --git a/google/cloud/bigtable/data_client_test.cc b/google/cloud/bigtable/data_client_test.cc deleted file mode 100644 index 2fcc28caad549..0000000000000 --- a/google/cloud/bigtable/data_client_test.cc +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright 2017 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/data_client.h" -#include "google/cloud/bigtable/internal/logging_data_client.h" -#include "google/cloud/testing_util/scoped_environment.h" -#include - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -// TODO(#8800) - remove after `DataClient` deprecation is complete -#include "google/cloud/internal/disable_deprecation_warnings.inc" - -TEST(DataClientTest, Default) { - auto data_client = - CreateDefaultDataClient("test-project", "test-instance", - ClientOptions().set_connection_pool_size(1)); - ASSERT_TRUE(data_client); - EXPECT_EQ("test-project", data_client->project_id()); - EXPECT_EQ("test-instance", data_client->instance_id()); - - auto channel0 = data_client->Channel(); - EXPECT_TRUE(channel0); - - auto channel1 = data_client->Channel(); - EXPECT_EQ(channel0.get(), channel1.get()); - - data_client->reset(); - channel1 = data_client->Channel(); - EXPECT_TRUE(channel1); - EXPECT_NE(channel0.get(), channel1.get()); -} - -TEST(DataClientTest, MakeClient) { - auto data_client = MakeDataClient("test-project", "test-instance", - Options{}.set(1)); - ASSERT_TRUE(data_client); - EXPECT_EQ("test-project", data_client->project_id()); - EXPECT_EQ("test-instance", data_client->instance_id()); - - auto channel0 = data_client->Channel(); - EXPECT_TRUE(channel0); - - auto channel1 = data_client->Channel(); - EXPECT_EQ(channel0.get(), channel1.get()); - - data_client->reset(); - channel1 = data_client->Channel(); - EXPECT_TRUE(channel1); - EXPECT_NE(channel0.get(), channel1.get()); -} - -// TODO(#8800) - remove after `DataClient` deprecation is complete -#include "google/cloud/internal/diagnostics_pop.inc" - -TEST(DataClientTest, Logging) { - testing_util::ScopedEnvironment env("GOOGLE_CLOUD_CPP_ENABLE_TRACING", "rpc"); - - auto data_client = MakeDataClient("test-project", "test-instance"); - ASSERT_TRUE(data_client); - ASSERT_TRUE( - dynamic_cast(data_client.get())) - << "Should create LoggingDataClient"; -} - -} // namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/data_connection.h b/google/cloud/bigtable/data_connection.h index edfdc52e2a015..2ff911892880a 100644 --- a/google/cloud/bigtable/data_connection.h +++ b/google/cloud/bigtable/data_connection.h @@ -180,7 +180,6 @@ class DataConnection { * - `google::cloud::GrpcOptionList` * - `google::cloud::UnifiedCredentialsOptionList` * - `google::cloud::bigtable::AppProfileIdOption` - * - `google::cloud::bigtable::ClientOptionsList` * - `google::cloud::bigtable::DataPolicyOptionList` * * @note Unrecognized options will be ignored. To debug issues with options set diff --git a/google/cloud/bigtable/data_connection_test.cc b/google/cloud/bigtable/data_connection_test.cc index 2a428214bca96..e51d7f38819e8 100644 --- a/google/cloud/bigtable/data_connection_test.cc +++ b/google/cloud/bigtable/data_connection_test.cc @@ -54,7 +54,6 @@ TEST(MakeDataConnection, DefaultsOptions) { << "User supplied Options are overridden in MakeDataConnection()"; } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::DisableTracing; using ::google::cloud::testing_util::EnableTracing; using ::google::cloud::testing_util::SpanNamed; @@ -81,7 +80,6 @@ TEST(MakeDataConnection, TracingDisabled) { EXPECT_THAT(span_catcher->GetSpans(), IsEmpty()); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END diff --git a/google/cloud/bigtable/examples/BUILD.bazel b/google/cloud/bigtable/examples/BUILD.bazel index b913265c91f30..eb88603b9db78 100644 --- a/google/cloud/bigtable/examples/BUILD.bazel +++ b/google/cloud/bigtable/examples/BUILD.bazel @@ -31,8 +31,8 @@ cc_library( "//:grpc_utils", "//google/cloud/bigtable:bigtable_client_testing", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_google_googleapis//google/bigtable/admin/v2:admin_cc_grpc", - "@com_google_googleapis//google/bigtable/v2:bigtable_cc_grpc", + "@googleapis//google/bigtable/admin/v2:admin_cc_grpc", + "@googleapis//google/bigtable/v2:bigtable_cc_grpc", ], ) @@ -50,7 +50,7 @@ filtered_unit_tests = [test for test in bigtable_examples_unit_tests if not test "//:grpc_utils", "//google/cloud/bigtable:bigtable_client_testing", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) for test in filtered_unit_tests] @@ -60,7 +60,7 @@ cc_test( deps = [ "//google/cloud/bigtable:google_cloud_cpp_bigtable", "//google/cloud/bigtable:google_cloud_cpp_bigtable_mocks", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) diff --git a/google/cloud/bigtable/examples/bigtable_examples_common.cc b/google/cloud/bigtable/examples/bigtable_examples_common.cc index 06185b80fe6eb..27cc70c478250 100644 --- a/google/cloud/bigtable/examples/bigtable_examples_common.cc +++ b/google/cloud/bigtable/examples/bigtable_examples_common.cc @@ -13,8 +13,8 @@ // limitations under the License. #include "google/cloud/bigtable/examples/bigtable_examples_common.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/getenv.h" +#include "absl/strings/str_join.h" #include #include diff --git a/google/cloud/bigtable/examples/bigtable_instance_admin_snippets.cc b/google/cloud/bigtable/examples/bigtable_instance_admin_snippets.cc index 0f7984a08ad8b..33545d4437ddf 100644 --- a/google/cloud/bigtable/examples/bigtable_instance_admin_snippets.cc +++ b/google/cloud/bigtable/examples/bigtable_instance_admin_snippets.cc @@ -18,11 +18,12 @@ #include "google/cloud/bigtable/resource_names.h" #include "google/cloud/bigtable/testing/cleanup_stale_resources.h" #include "google/cloud/bigtable/testing/random_names.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/location.h" #include "google/cloud/log.h" #include "google/cloud/project.h" +#include "absl/strings/match.h" +#include "absl/strings/str_join.h" #include namespace { diff --git a/google/cloud/bigtable/examples/data_snippets.cc b/google/cloud/bigtable/examples/data_snippets.cc index 1b849dbd47a87..f261a2acdc796 100644 --- a/google/cloud/bigtable/examples/data_snippets.cc +++ b/google/cloud/bigtable/examples/data_snippets.cc @@ -17,6 +17,7 @@ #include "google/cloud/bigtable/resource_names.h" #include "google/cloud/bigtable/testing/cleanup_stale_resources.h" #include "google/cloud/bigtable/testing/random_names.h" +#include "google/cloud/grpc_options.h" //! [bigtable includes] #include "google/cloud/bigtable/client.h" #include "google/cloud/bigtable/table.h" diff --git a/google/cloud/bigtable/examples/table_admin_iam_policy_snippets.cc b/google/cloud/bigtable/examples/table_admin_iam_policy_snippets.cc index 64b40da058c17..c9620ab0776aa 100644 --- a/google/cloud/bigtable/examples/table_admin_iam_policy_snippets.cc +++ b/google/cloud/bigtable/examples/table_admin_iam_policy_snippets.cc @@ -18,9 +18,9 @@ #include "google/cloud/bigtable/resource_names.h" #include "google/cloud/bigtable/testing/cleanup_stale_resources.h" #include "google/cloud/bigtable/testing/random_names.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/log.h" +#include "absl/strings/str_join.h" #include namespace { diff --git a/google/cloud/bigtable/examples/table_admin_snippets.cc b/google/cloud/bigtable/examples/table_admin_snippets.cc index e3d2ae8b08a14..3f95b4b1fafd5 100644 --- a/google/cloud/bigtable/examples/table_admin_snippets.cc +++ b/google/cloud/bigtable/examples/table_admin_snippets.cc @@ -14,10 +14,8 @@ #include "google/cloud/bigtable/admin/bigtable_table_admin_client.h" #include "google/cloud/bigtable/examples/bigtable_examples_common.h" -#include "google/cloud/bigtable/table_admin.h" #include "google/cloud/bigtable/testing/cleanup_stale_resources.h" #include "google/cloud/bigtable/testing/random_names.h" -#include "google/cloud/bigtable/wait_for_consistency.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/log.h" #include @@ -624,7 +622,7 @@ void DropRowsByPrefix( } void WaitForConsistencyCheck( - google::cloud::bigtable_admin::BigtableTableAdminClient admin, + google::cloud::bigtable_admin::BigtableTableAdminClient const& admin, std::vector const& argv) { //! [wait for consistency check] namespace cbt = ::google::cloud::bigtable; @@ -633,30 +631,24 @@ void WaitForConsistencyCheck( using ::google::cloud::future; using ::google::cloud::Status; using ::google::cloud::StatusOr; - [](cbta::BigtableTableAdminClient admin, std::string const& project_id, + [](cbta::BigtableTableAdminClient const&, std::string const& project_id, std::string const& instance_id, std::string const& table_id) { + auto client = cbta::BigtableTableAdminClient( + cbta::MakeBigtableTableAdminConnection()); std::string table_name = cbt::TableName(project_id, instance_id, table_id); StatusOr - consistency_token = admin.GenerateConsistencyToken(table_name); + consistency_token = client.GenerateConsistencyToken(table_name); if (!consistency_token) { throw std::move(consistency_token).status(); } - // Start a thread to perform the background work. - CompletionQueue cq; - std::thread cq_runner([&cq] { cq.Run(); }); - - std::string token = consistency_token->consistency_token(); - future consistent_future = - cbta::AsyncWaitForConsistency(cq, admin, table_name, token); - - // Simplify the example by blocking until the operation is done. - Status status = consistent_future.get(); - if (!status.ok()) throw std::runtime_error(status.message()); + auto token = consistency_token->consistency_token(); + google::bigtable::admin::v2::CheckConsistencyRequest wait_request; + wait_request.set_name(table_name); + wait_request.set_consistency_token(token); + auto consistency_future = client.WaitForConsistency(wait_request); + auto consistency = consistency_future.get(); + if (!consistency) throw std::runtime_error(consistency.status().message()); std::cout << "Table is consistent with token " << token << "\n"; - - // Shutdown the work queue and join the background thread - cq.Shutdown(); - cq_runner.join(); } //! [wait for consistency check] (std::move(admin), argv.at(0), argv.at(1), argv.at(2)); diff --git a/google/cloud/bigtable/expr.h b/google/cloud/bigtable/expr.h index 17a072ab3fbfa..1804f47dd12db 100644 --- a/google/cloud/bigtable/expr.h +++ b/google/cloud/bigtable/expr.h @@ -16,7 +16,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_EXPR_H #include "google/cloud/bigtable/version.h" -#include +#include "google/type/expr.pb.h" #include namespace google { diff --git a/google/cloud/bigtable/filters.h b/google/cloud/bigtable/filters.h index ea3a4671947ab..5e93c549605cd 100644 --- a/google/cloud/bigtable/filters.h +++ b/google/cloud/bigtable/filters.h @@ -17,7 +17,7 @@ #include "google/cloud/bigtable/version.h" #include "absl/meta/type_traits.h" -#include +#include "google/bigtable/v2/data.pb.h" #include #include #include diff --git a/google/cloud/bigtable/google_cloud_cpp_bigtable.bzl b/google/cloud/bigtable/google_cloud_cpp_bigtable.bzl index c5d4f47beff0b..2ecc66c6fd37e 100644 --- a/google/cloud/bigtable/google_cloud_cpp_bigtable.bzl +++ b/google/cloud/bigtable/google_cloud_cpp_bigtable.bzl @@ -45,27 +45,21 @@ google_cloud_cpp_bigtable_hdrs = [ "admin/internal/bigtable_table_admin_stub_factory.h", "admin/internal/bigtable_table_admin_tracing_connection.h", "admin/internal/bigtable_table_admin_tracing_stub.h", - "admin_client.h", "app_profile_config.h", - "async_row_reader.h", "bound_query.h", "bytes.h", "cell.h", "client.h", - "client_options.h", "cluster_config.h", "cluster_list_responses.h", "column_family.h", "completion_queue.h", - "data_client.h", "data_connection.h", "expr.h", "filters.h", "iam_binding.h", "iam_policy.h", "idempotent_mutation_policy.h", - "instance_admin.h", - "instance_admin_client.h", "instance_config.h", "instance_list_responses.h", "instance_resource.h", @@ -95,12 +89,8 @@ google_cloud_cpp_bigtable_hdrs = [ "internal/data_tracing_connection.h", "internal/default_row_reader.h", "internal/defaults.h", + "internal/endpoint_options.h", "internal/google_bytes_traits.h", - "internal/legacy_async_bulk_apply.h", - "internal/legacy_async_row_reader.h", - "internal/legacy_async_row_sampler.h", - "internal/legacy_row_reader.h", - "internal/logging_data_client.h", "internal/logging_result_set_reader.h", "internal/metrics.h", "internal/mutate_rows_limiter.h", @@ -120,7 +110,6 @@ google_cloud_cpp_bigtable_hdrs = [ "internal/traced_row_reader.h", "internal/tuple_utils.h", "internal/unary_client_utils.h", - "metadata_update_policy.h", "mutation_batcher.h", "mutation_branch.h", "mutations.h", @@ -143,14 +132,12 @@ google_cloud_cpp_bigtable_hdrs = [ "rpc_retry_policy.h", "sql_statement.h", "table.h", - "table_admin.h", "table_config.h", "table_resource.h", "timestamp.h", "value.h", "version.h", "version_info.h", - "wait_for_consistency.h", ] google_cloud_cpp_bigtable_srcs = [ @@ -171,6 +158,7 @@ google_cloud_cpp_bigtable_srcs = [ "admin/internal/bigtable_instance_admin_tracing_stub.cc", "admin/internal/bigtable_table_admin_auth_decorator.cc", "admin/internal/bigtable_table_admin_connection_impl.cc", + "admin/internal/bigtable_table_admin_connection_impl_bespoke.cc", "admin/internal/bigtable_table_admin_logging_decorator.cc", "admin/internal/bigtable_table_admin_metadata_decorator.cc", "admin/internal/bigtable_table_admin_option_defaults.cc", @@ -178,21 +166,16 @@ google_cloud_cpp_bigtable_srcs = [ "admin/internal/bigtable_table_admin_stub_factory.cc", "admin/internal/bigtable_table_admin_tracing_connection.cc", "admin/internal/bigtable_table_admin_tracing_stub.cc", - "admin_client.cc", "app_profile_config.cc", "bound_query.cc", "bytes.cc", "client.cc", - "client_options.cc", "cluster_config.cc", - "data_client.cc", "data_connection.cc", "expr.cc", "iam_binding.cc", "iam_policy.cc", "idempotent_mutation_policy.cc", - "instance_admin.cc", - "instance_admin_client.cc", "instance_config.cc", "instance_resource.cc", "instance_update_config.cc", @@ -218,11 +201,6 @@ google_cloud_cpp_bigtable_srcs = [ "internal/default_row_reader.cc", "internal/defaults.cc", "internal/google_bytes_traits.cc", - "internal/legacy_async_bulk_apply.cc", - "internal/legacy_async_row_reader.cc", - "internal/legacy_async_row_sampler.cc", - "internal/legacy_row_reader.cc", - "internal/logging_data_client.cc", "internal/logging_result_set_reader.cc", "internal/metrics.cc", "internal/mutate_rows_limiter.cc", @@ -236,7 +214,6 @@ google_cloud_cpp_bigtable_srcs = [ "internal/readrowsparser.cc", "internal/retry_traits.cc", "internal/traced_row_reader.cc", - "metadata_update_policy.cc", "mutation_batcher.cc", "mutations.cc", "polling_policy.cc", @@ -251,11 +228,9 @@ google_cloud_cpp_bigtable_srcs = [ "rpc_retry_policy.cc", "sql_statement.cc", "table.cc", - "table_admin.cc", "table_config.cc", "table_resource.cc", "timestamp.cc", "value.cc", "version.cc", - "wait_for_consistency.cc", ] diff --git a/google/cloud/bigtable/iam_binding.h b/google/cloud/bigtable/iam_binding.h index e50af5eaf3224..4c61d14f1ccf2 100644 --- a/google/cloud/bigtable/iam_binding.h +++ b/google/cloud/bigtable/iam_binding.h @@ -16,7 +16,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_IAM_BINDING_H #include "google/cloud/bigtable/version.h" -#include +#include "google/bigtable/admin/v2/bigtable_instance_admin.pb.h" #include #include #include diff --git a/google/cloud/bigtable/instance_admin.cc b/google/cloud/bigtable/instance_admin.cc deleted file mode 100644 index b5a283c6355e2..0000000000000 --- a/google/cloud/bigtable/instance_admin.cc +++ /dev/null @@ -1,232 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/instance_admin.h" -#include "google/cloud/location.h" -#include -#include -#include - -namespace btadmin = ::google::bigtable::admin::v2; - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -static_assert(std::is_copy_assignable::value, - "bigtable::InstanceAdmin must be CopyAssignable"); - -StatusOr InstanceAdmin::ListInstances() { - google::cloud::internal::OptionsSpan span(options_); - InstanceList result; - - // Build the RPC request, try to minimize copying. - btadmin::ListInstancesRequest request; - request.set_parent(project_name()); - auto sor = connection_->ListInstances(request); - if (!sor) return std::move(sor).status(); - auto response = *std::move(sor); - auto& instances = *response.mutable_instances(); - std::move(instances.begin(), instances.end(), - std::back_inserter(result.instances)); - auto& failed_locations = *response.mutable_failed_locations(); - std::move(failed_locations.begin(), failed_locations.end(), - std::back_inserter(result.failed_locations)); - return result; -} - -future> InstanceAdmin::CreateInstance( - InstanceConfig instance_config) { - google::cloud::internal::OptionsSpan span(options_); - auto request = std::move(instance_config).as_proto(); - request.set_parent(project_name()); - for (auto& kv : *request.mutable_clusters()) { - kv.second.set_location( - Location(project_id(), kv.second.location()).FullName()); - } - return connection_->CreateInstance(request); -} - -future> InstanceAdmin::CreateCluster( - ClusterConfig cluster_config, std::string const& instance_id, - std::string const& cluster_id) { - google::cloud::internal::OptionsSpan span(options_); - auto cluster = std::move(cluster_config).as_proto(); - cluster.set_location(Location(project_id(), cluster.location()).FullName()); - btadmin::CreateClusterRequest request; - request.mutable_cluster()->Swap(&cluster); - request.set_parent(InstanceName(instance_id)); - request.set_cluster_id(cluster_id); - return connection_->CreateCluster(request); -} - -future> -InstanceAdmin::UpdateInstance(InstanceUpdateConfig instance_update_config) { - google::cloud::internal::OptionsSpan span(options_); - auto request = std::move(instance_update_config).as_proto(); - return connection_->PartialUpdateInstance(request); -} - -StatusOr InstanceAdmin::GetInstance( - std::string const& instance_id) { - google::cloud::internal::OptionsSpan span(options_); - btadmin::GetInstanceRequest request; - request.set_name(InstanceName(instance_id)); - return connection_->GetInstance(request); -} - -Status InstanceAdmin::DeleteInstance(std::string const& instance_id) { - google::cloud::internal::OptionsSpan span(options_); - btadmin::DeleteInstanceRequest request; - request.set_name(InstanceName(instance_id)); - return connection_->DeleteInstance(request); -} - -StatusOr InstanceAdmin::GetCluster( - std::string const& instance_id, std::string const& cluster_id) { - google::cloud::internal::OptionsSpan span(options_); - btadmin::GetClusterRequest request; - request.set_name(ClusterName(instance_id, cluster_id)); - return connection_->GetCluster(request); -} - -StatusOr InstanceAdmin::ListClusters() { - return ListClusters("-"); -} - -StatusOr InstanceAdmin::ListClusters( - std::string const& instance_id) { - google::cloud::internal::OptionsSpan span(options_); - ClusterList result; - - btadmin::ListClustersRequest request; - request.set_parent(InstanceName(instance_id)); - auto sor = connection_->ListClusters(request); - if (!sor) return std::move(sor).status(); - auto response = *std::move(sor); - auto& clusters = *response.mutable_clusters(); - std::move(clusters.begin(), clusters.end(), - std::back_inserter(result.clusters)); - auto& failed_locations = *response.mutable_failed_locations(); - std::move(failed_locations.begin(), failed_locations.end(), - std::back_inserter(result.failed_locations)); - return result; -} - -future> -InstanceAdmin::UpdateCluster(ClusterConfig cluster_config) { - google::cloud::internal::OptionsSpan span(options_); - auto request = std::move(cluster_config).as_proto(); - return connection_->UpdateCluster(request); -} - -Status InstanceAdmin::DeleteCluster(std::string const& instance_id, - std::string const& cluster_id) { - google::cloud::internal::OptionsSpan span(options_); - btadmin::DeleteClusterRequest request; - request.set_name(ClusterName(instance_id, cluster_id)); - return connection_->DeleteCluster(request); -} - -StatusOr InstanceAdmin::CreateAppProfile( - std::string const& instance_id, AppProfileConfig config) { - google::cloud::internal::OptionsSpan span(options_); - auto request = std::move(config).as_proto(); - request.set_parent(InstanceName(instance_id)); - return connection_->CreateAppProfile(request); -} - -StatusOr InstanceAdmin::GetAppProfile( - std::string const& instance_id, std::string const& profile_id) { - google::cloud::internal::OptionsSpan span(options_); - btadmin::GetAppProfileRequest request; - request.set_name(AppProfileName(instance_id, profile_id)); - return connection_->GetAppProfile(request); -} - -future> InstanceAdmin::UpdateAppProfile( - std::string const& instance_id, std::string const& profile_id, - AppProfileUpdateConfig config) { - google::cloud::internal::OptionsSpan span(options_); - auto request = std::move(config).as_proto(); - request.mutable_app_profile()->set_name( - AppProfileName(instance_id, profile_id)); - return connection_->UpdateAppProfile(request); -} - -StatusOr> InstanceAdmin::ListAppProfiles( - std::string const& instance_id) { - google::cloud::internal::OptionsSpan span(options_); - std::vector result; - - btadmin::ListAppProfilesRequest request; - request.set_parent(InstanceName(instance_id)); - auto sr = connection_->ListAppProfiles(request); - for (auto& ap : sr) { - if (!ap) return std::move(ap).status(); - result.emplace_back(*std::move(ap)); - } - return result; -} - -Status InstanceAdmin::DeleteAppProfile(std::string const& instance_id, - std::string const& profile_id, - bool ignore_warnings) { - google::cloud::internal::OptionsSpan span(options_); - btadmin::DeleteAppProfileRequest request; - request.set_name(AppProfileName(instance_id, profile_id)); - request.set_ignore_warnings(ignore_warnings); - return connection_->DeleteAppProfile(request); -} - -StatusOr InstanceAdmin::GetNativeIamPolicy( - std::string const& instance_id) { - google::cloud::internal::OptionsSpan span(options_); - google::iam::v1::GetIamPolicyRequest request; - request.set_resource(InstanceName(instance_id)); - return connection_->GetIamPolicy(request); -} - -StatusOr InstanceAdmin::SetIamPolicy( - std::string const& instance_id, google::iam::v1::Policy const& iam_policy) { - google::cloud::internal::OptionsSpan span(options_); - google::iam::v1::SetIamPolicyRequest request; - request.set_resource(InstanceName(instance_id)); - *request.mutable_policy() = iam_policy; - return connection_->SetIamPolicy(request); -} - -StatusOr> InstanceAdmin::TestIamPermissions( - std::string const& instance_id, - std::vector const& permissions) { - google::cloud::internal::OptionsSpan span(options_); - google::iam::v1::TestIamPermissionsRequest request; - request.set_resource(InstanceName(instance_id)); - for (auto const& permission : permissions) { - request.add_permissions(permission); - } - auto sor = connection_->TestIamPermissions(request); - if (!sor) return std::move(sor).status(); - auto response = *std::move(sor); - std::vector result; - auto& ps = *response.mutable_permissions(); - std::move(ps.begin(), ps.end(), std::back_inserter(result)); - return result; -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/instance_admin.h b/google/cloud/bigtable/instance_admin.h deleted file mode 100644 index e7f218261fd07..0000000000000 --- a/google/cloud/bigtable/instance_admin.h +++ /dev/null @@ -1,732 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INSTANCE_ADMIN_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INSTANCE_ADMIN_H - -#include "google/cloud/bigtable/admin/bigtable_instance_admin_connection.h" -#include "google/cloud/bigtable/admin/bigtable_instance_admin_options.h" -#include "google/cloud/bigtable/app_profile_config.h" -#include "google/cloud/bigtable/cluster_config.h" -#include "google/cloud/bigtable/cluster_list_responses.h" -#include "google/cloud/bigtable/completion_queue.h" -#include "google/cloud/bigtable/iam_policy.h" -#include "google/cloud/bigtable/instance_admin_client.h" -#include "google/cloud/bigtable/instance_config.h" -#include "google/cloud/bigtable/instance_list_responses.h" -#include "google/cloud/bigtable/instance_update_config.h" -#include "google/cloud/bigtable/internal/convert_policies.h" -#include "google/cloud/bigtable/polling_policy.h" -#include "google/cloud/bigtable/resource_names.h" -#include "google/cloud/bigtable/version.h" -#include "google/cloud/future.h" -#include "google/cloud/project.h" -#include "google/cloud/status_or.h" -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace bigtable_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -class InstanceAdminTester; -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable_internal -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/** - * Implements the APIs to administer Cloud Bigtable instances. - * - * @par Thread-safety - * Instances of this class created via copy-construction or copy-assignment - * share the underlying pool of connections. Access to these copies via multiple - * threads is guaranteed to work. Two threads operating concurrently on the same - * instance of this class is not guaranteed to work. - * - * @par Cost - * Creating a new object of type `InstanceAdmin` is comparable to creating a few - * objects of type `std::string` or a few objects of type - * `std::shared_ptr`. The class represents a shallow handle to a remote - * object. - * - * @par Error Handling - * This class uses `StatusOr` to report errors. When an operation fails to - * perform its work the returned `StatusOr` contains the error details. If - * the `ok()` member function in the `StatusOr` returns `true` then it - * contains the expected result. Operations that do not return a value simply - * return a `google::cloud::Status` indicating success or the details of the - * error Please consult the [`StatusOr` - * documentation](#google::cloud::StatusOr) for more details. - * - * @code - * namespace cbt = google::cloud::bigtable; - * namespace btadmin = google::bigtable::admin::v2; - * cbt::InstanceAdmin admin = ...; - * google::cloud::StatusOr instance = admin.GetInstance(...); - * - * if (!instance) { - * std::cerr << "Error fetching instance\n"; - * return; - * } - * - * // Use `instance` as a smart pointer here, e.g.: - * std::cout << "The full instance name is " << instance->name() << "\n"; - * @endcode - * - * In addition, the @ref index "main page" contains examples using `StatusOr` - * to handle errors. - * - * @par Retry, Backoff, and Idempotency Policies - * The library automatically retries requests that fail with transient errors, - * and uses [truncated exponential backoff][backoff-link] to backoff between - * retries. The default policies are to continue retrying for up to 10 minutes. - * On each transient failure the backoff period is doubled, starting with an - * initial backoff of 100 milliseconds. The backoff period growth is truncated - * at 60 seconds. The default idempotency policy is to only retry idempotent - * operations. Note that most operations that change state are **not** - * idempotent. - * - * The application can override these policies when constructing objects of this - * class. The documentation for the constructors show examples of this in - * action. - * - * [backoff-link]: https://cloud.google.com/storage/docs/exponential-backoff - * - * @see https://cloud.google.com/bigtable/ for an overview of Cloud Bigtable. - * - * @see https://cloud.google.com/bigtable/docs/overview for an overview of the - * Cloud Bigtable data model. - * - * @see https://cloud.google.com/bigtable/docs/instances-clusters-nodes for an - * introduction of the main APIs into Cloud Bigtable. - * - * @see https://cloud.google.com/bigtable/docs/reference/service-apis-overview - * for an overview of the underlying Cloud Bigtable API. - * - * @see #google::cloud::StatusOr for a description of the error reporting class - * used by this library. - * - * @see `LimitedTimeRetryPolicy` and `LimitedErrorCountRetryPolicy` for - * alternative retry policies. - * - * @see `ExponentialBackoffPolicy` to configure different parameters for the - * exponential backoff policy. - * - * @see `SafeIdempotentMutationPolicy` and `AlwaysRetryMutationPolicy` for - * alternative idempotency policies. - */ -class InstanceAdmin { - public: - explicit InstanceAdmin( - std::shared_ptr - connection, - std::string project) - : connection_(std::move(connection)), - project_id_(std::move(project)), - project_name_(Project(project_id_).FullName()), - retry_prototype_( - DefaultRPCRetryPolicy(internal::kBigtableInstanceAdminLimits)), - backoff_prototype_( - DefaultRPCBackoffPolicy(internal::kBigtableInstanceAdminLimits)), - polling_prototype_( - DefaultPollingPolicy(internal::kBigtableInstanceAdminLimits)), - options_(google::cloud::internal::MergeOptions( - bigtable_internal::MakeInstanceAdminOptions( - retry_prototype_, backoff_prototype_, polling_prototype_), - connection_->options())) {} - - /** - * @param client the interface to create grpc stubs, report errors, etc. - */ - // NOLINTNEXTLINE(performance-unnecessary-value-param) - explicit InstanceAdmin(std::shared_ptr client) - : InstanceAdmin(client->connection_, client->project()) {} - - /** - * Create a new InstanceAdmin using explicit policies to handle RPC errors. - * - * @param client the interface to create grpc stubs, report errors, etc. - * @param policies the set of policy overrides for this object. - * @tparam Policies the types of the policies to override, the types must - * derive from one of the following types: - * - `RPCBackoffPolicy` how to backoff from a failed RPC. Currently only - * `ExponentialBackoffPolicy` is implemented. You can also create your - * own policies that backoff using a different algorithm. - * - `RPCRetryPolicy` for how long to retry failed RPCs. Use - * `LimitedErrorCountRetryPolicy` to limit the number of failures - * allowed. Use `LimitedTimeRetryPolicy` to bound the time for any - * request. You can also create your own policies that combine time and - * error counts. - * - `PollingPolicy` for how long will the class wait for - * `google.longrunning.Operation` to complete. This class combines both - * the backoff policy for checking long running operations and the - * retry policy. - * - * @see GenericPollingPolicy, ExponentialBackoffPolicy, - * LimitedErrorCountRetryPolicy, LimitedTimeRetryPolicy. - */ - template - // NOLINTNEXTLINE(performance-unnecessary-value-param) - explicit InstanceAdmin(std::shared_ptr client, - Policies&&... policies) - : connection_(client->connection_), - project_id_(client->project()), - project_name_(Project(project_id_).FullName()), - retry_prototype_( - DefaultRPCRetryPolicy(internal::kBigtableInstanceAdminLimits)), - backoff_prototype_( - DefaultRPCBackoffPolicy(internal::kBigtableInstanceAdminLimits)), - polling_prototype_( - DefaultPollingPolicy(internal::kBigtableInstanceAdminLimits)) { - ChangePolicies(std::forward(policies)...); - options_ = google::cloud::internal::MergeOptions( - bigtable_internal::MakeInstanceAdminOptions( - retry_prototype_, backoff_prototype_, polling_prototype_), - connection_->options()); - } - - /// The full name (`projects/`) of the project. - std::string const& project_name() const { return project_name_; } - /// The project id, i.e., `project_name()` without the `projects/` prefix. - std::string const& project_id() const { return project_id_; } - - /** - * Returns an InstanceAdmin that reuses the connection and configuration of - * this InstanceAdmin, but with a different resource name. - */ - InstanceAdmin WithNewTarget(std::string project_id) const { - auto admin = *this; - admin.project_id_ = std::move(project_id); - admin.project_name_ = Project(admin.project_id_).FullName(); - return admin; - } - - /// Return the fully qualified name of the given instance_id. - std::string InstanceName(std::string const& instance_id) const { - return google::cloud::bigtable::InstanceName(project_id_, instance_id); - } - - /// Return the fully qualified name of the given cluster_id in give - /// instance_id. - std::string ClusterName(std::string const& instance_id, - std::string const& cluster_id) const { - return google::cloud::bigtable::ClusterName(project_id_, instance_id, - cluster_id); - } - - std::string AppProfileName(std::string const& instance_id, - std::string const& profile_id) const { - return google::cloud::bigtable::AppProfileName(project_id_, instance_id, - profile_id); - } - - /** - * Create a new instance of Cloud Bigtable. - * - * @warning Note that this is operation can take seconds or minutes to - * complete. The application may prefer to perform other work while waiting - * for this operation. - * - * @param instance_config a description of the new instance to be created. - * instance_id and a display_name parameters must be set in instance_config, - * - instance_id : must be between 6 and 33 characters. - * - display_name : must be between 4 and 30 characters. - * @return a future that becomes satisfied when (a) the operation has - * completed successfully, in which case it returns a proto with the - * Instance details, (b) the operation has failed, in which case the future - * contains an `google::cloud::Status` with the details of the failure, or - * (c) the state of the operation is unknown after the time allocated by the - * retry policies has expired, in which case the future contains the last - * error status. - * - * @par Idempotency - * This operation is always treated as non-idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet bigtable_instance_admin_snippets.cc create instance - */ - future> CreateInstance( - InstanceConfig instance_config); - - /** - * Create a new Cluster of Cloud Bigtable. - * - * @param cluster_config a description of the new cluster to be created. - * @param instance_id the id of the instance in the project - * @param cluster_id the id of the cluster in the project that needs to be - * created. It must be between 6 and 30 characters. - * - * @par Idempotency - * This operation is always treated as non-idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet bigtable_instance_admin_snippets.cc create cluster - */ - future> CreateCluster( - ClusterConfig cluster_config, std::string const& instance_id, - std::string const& cluster_id); - - /** - * Update an existing instance of Cloud Bigtable. - * - * @warning Note that this is operation can take seconds or minutes to - * complete. The application may prefer to perform other work while waiting - * for this operation. - * - * @param instance_update_config config with modified instance. - * @return a future that becomes satisfied when (a) the operation has - * completed successfully, in which case it returns a proto with the - * Instance details, (b) the operation has failed, in which case the future - * contains an exception (typically `bigtable::GrpcError`) with the details - * of the failure, or (c) the state of the operation is unknown after the - * time allocated by the retry policies has expired, in which case the - * future contains an exception of type `bigtable::PollTimeout`. - * - * @par Idempotency - * This operation is always treated as non-idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet bigtable_instance_admin_snippets.cc update instance - */ - future> UpdateInstance( - InstanceUpdateConfig instance_update_config); - - /** - * Obtain the list of instances in the project. - * - * @note In some circumstances Cloud Bigtable may be unable to obtain the full - * list of instances, typically because some transient failure has made - * specific zones unavailable. In this cases the service returns a separate - * list of `failed_locations` that represent the unavailable zones. - * Applications may want to retry the operation after the transient - * conditions have cleared. - * - * @par Idempotency - * This operation is read-only and therefore it is always idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet bigtable_instance_admin_snippets.cc list instances - */ - StatusOr ListInstances(); - - /** - * Return the details of @p instance_id. - * - * @par Idempotency - * This operation is read-only and therefore it is always idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet bigtable_instance_admin_snippets.cc get instance - */ - StatusOr GetInstance( - std::string const& instance_id); - - /** - * Deletes the instances in the project. - * - * @param instance_id the id of the instance in the project that needs to be - * deleted - * - * @par Idempotency - * This operation is always treated as non-idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet bigtable_instance_admin_snippets.cc delete instance - */ - Status DeleteInstance(std::string const& instance_id); - - /** - * Obtain the list of clusters in an instance. - * - * @note In some circumstances Cloud Bigtable may be unable to obtain the full - * list of clusters, typically because some transient failure has made - * specific zones unavailable. In this cases the service returns a separate - * list of `failed_locations` that represent the unavailable zones. - * Applications may want to retry the operation after the transient - * conditions have cleared. - * - * @par Idempotency - * This operation is read-only and therefore it is always idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet bigtable_instance_admin_snippets.cc list clusters - */ - StatusOr ListClusters(); - - /** - * Obtain the list of clusters in an instance. - * - * @note In some circumstances Cloud Bigtable may be unable to obtain the full - * list of clusters, typically because some transient failure has made - * specific zones unavailable. In this cases the service returns a separate - * list of `failed_locations` that represent the unavailable zones. - * Applications may want to retry the operation after the transient - * conditions have cleared. - * - * @par Idempotency - * This operation is read-only and therefore it is always idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet bigtable_instance_admin_snippets.cc list clusters - */ - StatusOr ListClusters(std::string const& instance_id); - - /** - * Update an existing cluster of Cloud Bigtable. - * - * @warning Note that this is operation can take seconds or minutes to - * complete. The application may prefer to perform other work while waiting - * for this operation. - * - * @param cluster_config cluster with updated values. - * @return a future that becomes satisfied when (a) the operation has - * completed successfully, in which case it returns a proto with the - * Instance details, (b) the operation has failed, in which case the future - * contains an exception (typically `bigtable::GrpcError`) with the details - * of the failure, or (c) the state of the operation is unknown after the - * time allocated by the retry policies has expired, in which case the - * future contains an exception of type `bigtable::PollTimeout`. - * - * @par Idempotency - * This operation is always treated as non-idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet bigtable_instance_admin_snippets.cc update cluster - */ - future> UpdateCluster( - ClusterConfig cluster_config); - - /** - * Deletes the specified cluster of an instance in the project. - * - * @param instance_id the id of the instance in the project - * @param cluster_id the id of the cluster in the project that needs to be - * deleted - * - * @par Idempotency - * This operation is always treated as non-idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet bigtable_instance_admin_snippets.cc delete cluster - */ - Status DeleteCluster(std::string const& instance_id, - std::string const& cluster_id); - - /** - * Gets the specified cluster of an instance in the project. - * - * @param instance_id the id of the instance in the project - * @param cluster_id the id of the cluster in the project that needs to be - * deleted - * @return a Cluster for given instance_id and cluster_id. - * - * @par Idempotency - * This operation is read-only and therefore it is always idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet bigtable_instance_admin_snippets.cc get cluster - */ - StatusOr GetCluster( - std::string const& instance_id, std::string const& cluster_id); - - /** - * Create a new application profile. - * - * @param instance_id the instance for the new application profile. - * @param config the configuration for the new application profile. - * @return The proto describing the new application profile. - * - * @par Idempotency - * This operation is always treated as non-idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Multi-cluster Routing Example - * @snippet bigtable_instance_admin_snippets.cc create app profile - * - * @par Single Cluster Routing Example - * @snippet bigtable_instance_admin_snippets.cc create app profile cluster - */ - StatusOr CreateAppProfile( - std::string const& instance_id, AppProfileConfig config); - - /** - * Fetch the detailed information about an existing application profile. - * - * @param instance_id the instance to look the profile in. - * @param profile_id the id of the profile within that instance. - * @return The proto describing the application profile. - * - * @par Idempotency - * This operation is read-only and therefore it is always idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet bigtable_instance_admin_snippets.cc get app profile - */ - StatusOr GetAppProfile( - std::string const& instance_id, std::string const& profile_id); - - /** - * Updates an existing application profile. - * - * @param instance_id the instance for the new application profile. - * @param profile_id the id (not the full name) of the profile to update. - * @param config the configuration for the new application profile. - * @return The proto describing the new application profile. - * - * @par Idempotency - * This operation is always treated as non-idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Change Description Example - * @snippet bigtable_instance_admin_snippets.cc update app profile description - * - * @par Change Routing to Any Cluster Example - * @snippet bigtable_instance_admin_snippets.cc update app profile routing any - * - * @par Change Routing to a Specific Cluster Example - * @snippet bigtable_instance_admin_snippets.cc update app profile routing - */ - future> UpdateAppProfile( - std::string const& instance_id, std::string const& profile_id, - AppProfileUpdateConfig config); - - /** - * List the application profiles in an instance. - * - * @param instance_id the instance to list the profiles for. - * @return a std::vector with the protos describing any profiles. - * - * @par Idempotency - * This operation is read-only and therefore it is always idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet bigtable_instance_admin_snippets.cc list app profiles - */ - StatusOr> - ListAppProfiles(std::string const& instance_id); - - /** - * Delete an existing application profile. - * - * @param instance_id the instance to look the profile in. - * @param profile_id the id of the profile within that instance. - * @param ignore_warnings if true, ignore safety checks when deleting the - * application profile. This value is to to `true` by default. Passing - * `false` causes this function to fail even when no operations are - * pending. - * - * @par Idempotency - * This operation is always treated as non-idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet bigtable_instance_admin_snippets.cc delete app profile - */ - Status DeleteAppProfile(std::string const& instance_id, - std::string const& profile_id, - bool ignore_warnings = true); - - /** - * Gets the native policy for @p instance_id. - * - * @param instance_id the instance to query. - * @return google::iam::v1::Policy the full IAM policy for the instance. - * - * @par Idempotency - * This operation is read-only and therefore it is always idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet bigtable_instance_admin_snippets.cc get native iam policy - */ - StatusOr GetNativeIamPolicy( - std::string const& instance_id); - - /** - * Sets the IAM policy for an instance. - * - * @param instance_id which instance to set the IAM policy for. - * @param iam_policy google::iam::v1::Policy object containing role and - * members. - * @return google::iam::v1::Policy the current IAM policy for the instance. - * - * @warning ETags are currently not used by Cloud Bigtable. - * - * @par Idempotency - * This operation is always treated as non-idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet bigtable_instance_admin_snippets.cc set native iam policy - */ - StatusOr SetIamPolicy( - std::string const& instance_id, - google::iam::v1::Policy const& iam_policy); - - /** - * Returns a permission set that the caller has on the specified instance. - * - * @param instance_id the ID of the instance to query. - * @param permissions set of permissions to check for the resource. - * - * @par Idempotency - * This operation is read-only and therefore it is always idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet bigtable_instance_admin_snippets.cc test iam permissions - * - * @see https://cloud.google.com/bigtable/docs/access-control for a list of - * valid permissions on Google Cloud Bigtable. - */ - StatusOr> TestIamPermissions( - std::string const& instance_id, - std::vector const& permissions); - - private: - friend class bigtable_internal::InstanceAdminTester; - - ///@{ - /// @name Helper functions to implement constructors with changed policies. - void ChangePolicy(RPCRetryPolicy const& policy) { - retry_prototype_ = policy.clone(); - } - - void ChangePolicy(RPCBackoffPolicy const& policy) { - backoff_prototype_ = policy.clone(); - } - - void ChangePolicy(PollingPolicy const& policy) { - polling_prototype_ = policy.clone(); - } - - template - void ChangePolicies(Policy&& policy, Policies&&... policies) { - ChangePolicy(policy); - ChangePolicies(std::forward(policies)...); - } - void ChangePolicies() {} - ///@} - - std::shared_ptr connection_; - std::string project_id_; - std::string project_name_; - ///@{ - /// These prototypes are only used as temporary storage during construction of - /// the class, where they are consolidated as common policies in `options_`. - std::shared_ptr retry_prototype_; - std::shared_ptr backoff_prototype_; - std::shared_ptr polling_prototype_; - ///} - Options options_; -}; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INSTANCE_ADMIN_H diff --git a/google/cloud/bigtable/instance_admin_client.cc b/google/cloud/bigtable/instance_admin_client.cc deleted file mode 100644 index d95811843a370..0000000000000 --- a/google/cloud/bigtable/instance_admin_client.cc +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/instance_admin_client.h" -#include "google/cloud/bigtable/internal/defaults.h" - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -std::shared_ptr MakeInstanceAdminClient( - std::string project, Options options) { - options = internal::DefaultInstanceAdminOptions(std::move(options)); - return std::shared_ptr( - new InstanceAdminClient(std::move(project), std::move(options))); -} - -std::shared_ptr CreateDefaultInstanceAdminClient( - std::string project, ClientOptions options) { - return MakeInstanceAdminClient(std::move(project), - internal::MakeOptions(std::move(options))); -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/instance_admin_client.h b/google/cloud/bigtable/instance_admin_client.h deleted file mode 100644 index 7bdf232416a50..0000000000000 --- a/google/cloud/bigtable/instance_admin_client.h +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INSTANCE_ADMIN_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INSTANCE_ADMIN_CLIENT_H - -#include "google/cloud/bigtable/admin/bigtable_instance_admin_connection.h" -#include "google/cloud/bigtable/client_options.h" -#include "google/cloud/bigtable/version.h" -#include -#include - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/** - * Creates a `bigtable_admin::BigtableInstanceAdminConnection` for - * `bigtable::InstanceAdmin` to use. - * - * This class is used to initiate a connection to the Cloud Bigtable Instance - * Admin service. It is maintained only for backwards compatibility. - * - * @deprecated Please use `bigtable_admin::BigtableInstanceAdminConnection` to - * configure `bigtable_admin::BigtableInstanceAdminClient`, instead of using - * this class to configure `bigtable::InstanceAdmin`. - */ -class InstanceAdminClient final { - public: - virtual ~InstanceAdminClient() = default; - - /// The project id that this AdminClient works on. - virtual std::string const& project() { return project_; } - - private: - friend class InstanceAdmin; - friend std::shared_ptr MakeInstanceAdminClient( - std::string, Options); - - InstanceAdminClient(std::string project, Options options) - : project_(std::move(project)), - connection_(bigtable_admin::MakeBigtableInstanceAdminConnection( - std::move(options))) {} - - std::string project_; - std::shared_ptr connection_; -}; - -/// Create a new instance admin client configured via @p options. -std::shared_ptr MakeInstanceAdminClient( - std::string project, Options options = {}); - -/** - * Create a new instance admin client configured via @p options. - * - * @deprecated use the `MakeInstanceAdminClient` method which accepts - * `google::cloud::Options` instead. - */ -GOOGLE_CLOUD_CPP_DEPRECATED("use `MakeInstanceAdminClient` instead") -std::shared_ptr CreateDefaultInstanceAdminClient( - std::string project, ClientOptions options); - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INSTANCE_ADMIN_CLIENT_H diff --git a/google/cloud/bigtable/instance_admin_client_test.cc b/google/cloud/bigtable/instance_admin_client_test.cc deleted file mode 100644 index 2d86e882d2965..0000000000000 --- a/google/cloud/bigtable/instance_admin_client_test.cc +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/instance_admin_client.h" -#include - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -#include "google/cloud/internal/disable_deprecation_warnings.inc" - -TEST(InstanceAdminClientTest, CreateDefaultClient) { - auto admin_client = CreateDefaultInstanceAdminClient("test-project", {}); - ASSERT_TRUE(admin_client); - EXPECT_EQ("test-project", admin_client->project()); -} - -#include "google/cloud/internal/diagnostics_pop.inc" - -TEST(InstanceAdminClientTest, MakeClient) { - auto admin_client = MakeInstanceAdminClient("test-project"); - ASSERT_TRUE(admin_client); - EXPECT_EQ("test-project", admin_client->project()); -} - -} // namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/instance_admin_test.cc b/google/cloud/bigtable/instance_admin_test.cc deleted file mode 100644 index a556750b81985..0000000000000 --- a/google/cloud/bigtable/instance_admin_test.cc +++ /dev/null @@ -1,693 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/instance_admin.h" -#include "google/cloud/bigtable/admin/mocks/mock_bigtable_instance_admin_connection.h" -#include "google/cloud/bigtable/testing/mock_policies.h" -#include "google/cloud/location.h" -#include "google/cloud/project.h" -#include "google/cloud/testing_util/status_matchers.h" -#include - -namespace google { -namespace cloud { -namespace bigtable_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -// Helper class for checking that the legacy API still functions correctly -class InstanceAdminTester { - public: - static std::shared_ptr - Connection(bigtable::InstanceAdmin const& admin) { - return admin.connection_; - } - - static ::google::cloud::Options Options( - bigtable::InstanceAdmin const& admin) { - return admin.options_; - } -}; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable_internal -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -namespace btadmin = ::google::bigtable::admin::v2; -namespace iamproto = ::google::iam::v1; - -using ::google::cloud::bigtable::testing::MockBackoffPolicy; -using ::google::cloud::bigtable::testing::MockPollingPolicy; -using ::google::cloud::bigtable::testing::MockRetryPolicy; -using ::google::cloud::bigtable_internal::InstanceAdminTester; -using ::google::cloud::testing_util::StatusIs; -using ::testing::An; -using ::testing::Contains; -using ::testing::ElementsAreArray; -using ::testing::NotNull; -using ::testing::Return; -using ::testing::UnorderedElementsAreArray; - -using MockConnection = - ::google::cloud::bigtable_admin_mocks::MockBigtableInstanceAdminConnection; - -auto const kProjectId = "the-project"; -auto const kInstanceId = "the-instance"; -auto const kClusterId = "the-cluster"; -auto const kProfileId = "the-profile"; -auto const kProjectName = "projects/the-project"; -auto const kInstanceName = "projects/the-project/instances/the-instance"; -auto const kClusterName = - "projects/the-project/instances/the-instance/clusters/the-cluster"; -auto const kProfileName = - "projects/the-project/instances/the-instance/appProfiles/the-profile"; - -std::string LocationName(std::string const& location) { - return Location(Project(kProjectId), location).FullName(); -} - -Status FailingStatus() { return Status(StatusCode::kPermissionDenied, "fail"); } - -struct TestOption { - using Type = int; -}; - -Options TestOptions() { - return Options{} - .set(grpc::InsecureChannelCredentials()) - .set(1); -} - -void CheckOptions(Options const& options) { - EXPECT_TRUE( - options.has()); - EXPECT_TRUE( - options.has()); - EXPECT_TRUE( - options.has()); - EXPECT_TRUE(options.has()); - EXPECT_TRUE(options.has()); - EXPECT_TRUE(options.has()); -} - -/// A fixture for the bigtable::InstanceAdmin tests. -class InstanceAdminTest : public ::testing::Test { - protected: - InstanceAdmin DefaultInstanceAdmin() { - EXPECT_CALL(*connection_, options()) - .WillRepeatedly(Return(Options{}.set(1))); - return InstanceAdmin(connection_, kProjectId); - } - - std::shared_ptr connection_ = - std::make_shared(); -}; - -TEST_F(InstanceAdminTest, Project) { - InstanceAdmin tested(MakeInstanceAdminClient(kProjectId, TestOptions())); - EXPECT_EQ(kProjectId, tested.project_id()); - EXPECT_EQ(kProjectName, tested.project_name()); -} - -TEST_F(InstanceAdminTest, CopyConstructor) { - auto source = InstanceAdmin(connection_, kProjectId); - std::string const& expected = source.project_id(); - // NOLINTNEXTLINE(performance-unnecessary-copy-initialization) - InstanceAdmin copy(source); - EXPECT_EQ(expected, copy.project_id()); -} - -TEST_F(InstanceAdminTest, MoveConstructor) { - auto source = InstanceAdmin(connection_, kProjectId); - std::string expected = source.project_id(); - InstanceAdmin copy(std::move(source)); - EXPECT_EQ(expected, copy.project_id()); -} - -TEST_F(InstanceAdminTest, CopyAssignment) { - std::shared_ptr other_client = - std::make_shared(); - - auto source = InstanceAdmin(connection_, kProjectId); - std::string const& expected = source.project_id(); - auto dest = InstanceAdmin(other_client, "other-project"); - EXPECT_NE(expected, dest.project_id()); - dest = source; - EXPECT_EQ(expected, dest.project_id()); -} - -TEST_F(InstanceAdminTest, MoveAssignment) { - std::shared_ptr other_client = - std::make_shared(); - - auto source = InstanceAdmin(connection_, kProjectId); - std::string expected = source.project_id(); - auto dest = InstanceAdmin(other_client, "other-project"); - EXPECT_NE(expected, dest.project_id()); - dest = std::move(source); - EXPECT_EQ(expected, dest.project_id()); -} - -TEST_F(InstanceAdminTest, WithNewTarget) { - auto admin = InstanceAdmin(connection_, kProjectId); - auto other_admin = admin.WithNewTarget("other-project"); - EXPECT_EQ(other_admin.project_id(), "other-project"); - EXPECT_EQ(other_admin.project_name(), Project("other-project").FullName()); -} - -TEST_F(InstanceAdminTest, LegacyConstructorSharesConnection) { - auto admin_client = MakeInstanceAdminClient("test-project", TestOptions()); - auto admin_1 = InstanceAdmin(admin_client); - auto admin_2 = InstanceAdmin(admin_client); - auto conn_1 = InstanceAdminTester::Connection(admin_1); - auto conn_2 = InstanceAdminTester::Connection(admin_2); - - EXPECT_EQ(conn_1, conn_2); - EXPECT_THAT(conn_1, NotNull()); -} - -TEST_F(InstanceAdminTest, LegacyConstructorDefaultsPolicies) { - auto admin_client = MakeInstanceAdminClient("test-project", TestOptions()); - auto admin = InstanceAdmin(std::move(admin_client)); - auto options = InstanceAdminTester::Options(admin); - CheckOptions(options); -} - -TEST_F(InstanceAdminTest, LegacyConstructorWithPolicies) { - // In this test, we make a series of simple calls to verify that the policies - // passed to the `InstanceAdmin` constructor are actually collected as - // `Options`. - // - // Upon construction of an InstanceAdmin, each policy is cloned twice: Once - // while processing the variadic parameters, once while converting from - // Bigtable policies to common policies. This should explain the nested mocks - // below. - - auto mock_r = std::make_shared(); - auto mock_b = std::make_shared(); - auto mock_p = std::make_shared(); - - EXPECT_CALL(*mock_r, clone).WillOnce([] { - auto clone_1 = std::make_unique(); - EXPECT_CALL(*clone_1, clone).WillOnce([] { - auto clone_2 = std::make_unique(); - EXPECT_CALL(*clone_2, OnFailure(An())); - return clone_2; - }); - return clone_1; - }); - - EXPECT_CALL(*mock_b, clone).WillOnce([] { - auto clone_1 = std::make_unique(); - EXPECT_CALL(*clone_1, clone).WillOnce([] { - auto clone_2 = std::make_unique(); - EXPECT_CALL(*clone_2, OnCompletion(An())); - return clone_2; - }); - return clone_1; - }); - - EXPECT_CALL(*mock_p, clone).WillOnce([] { - auto clone_1 = std::make_unique(); - EXPECT_CALL(*clone_1, clone).WillOnce([] { - auto clone_2 = std::make_unique(); - EXPECT_CALL(*clone_2, WaitPeriod); - return clone_2; - }); - return clone_1; - }); - - auto admin_client = MakeInstanceAdminClient("test-project", TestOptions()); - auto admin = - InstanceAdmin(std::move(admin_client), *mock_r, *mock_b, *mock_p); - auto options = InstanceAdminTester::Options(admin); - CheckOptions(options); - - auto const& common_retry = - options.get(); - (void)common_retry->OnFailure({}); - - auto const& common_backoff = - options.get(); - (void)common_backoff->OnCompletion(); - - auto const& common_polling = - options.get(); - (void)common_polling->WaitPeriod(); -} - -TEST_F(InstanceAdminTest, ListInstancesSuccess) { - auto tested = DefaultInstanceAdmin(); - std::vector const expected_names = { - InstanceName(kProjectId, "i0"), InstanceName(kProjectId, "i1")}; - std::vector const expected_fails = {"l0", "l1"}; - - EXPECT_CALL(*connection_, ListInstances) - .WillOnce([&expected_names, &expected_fails]( - btadmin::ListInstancesRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kProjectName, request.parent()); - - btadmin::ListInstancesResponse response; - for (auto const& name : expected_names) { - auto& instance = *response.add_instances(); - instance.set_name(name); - } - for (auto const& loc : expected_fails) { - *response.add_failed_locations() = loc; - } - return make_status_or(response); - }); - - auto actual = tested.ListInstances(); - ASSERT_STATUS_OK(actual); - std::vector actual_names; - std::transform(actual->instances.begin(), actual->instances.end(), - std::back_inserter(actual_names), - [](btadmin::Instance const& i) { return i.name(); }); - - EXPECT_THAT(actual_names, ElementsAreArray(expected_names)); - EXPECT_THAT(actual->failed_locations, ElementsAreArray(expected_fails)); -} - -TEST_F(InstanceAdminTest, ListInstancesFailure) { - auto tested = DefaultInstanceAdmin(); - - EXPECT_CALL(*connection_, ListInstances).WillOnce(Return(FailingStatus())); - - EXPECT_THAT(tested.ListInstances(), StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(InstanceAdminTest, CreateInstance) { - auto tested = DefaultInstanceAdmin(); - auto constexpr kDisplayName = "display name"; - std::vector const expected_location_names = {LocationName("l0"), - LocationName("l1")}; - std::map cluster_map = { - {"c0", ClusterConfig("l0", 3, btadmin::HDD)}, - {"c1", ClusterConfig("l1", 3, btadmin::HDD)}}; - auto config = InstanceConfig(kInstanceId, kDisplayName, cluster_map); - - EXPECT_CALL(*connection_, - CreateInstance(An())) - .WillOnce([&](btadmin::CreateInstanceRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kInstanceId, request.instance_id()); - EXPECT_EQ(kProjectName, request.parent()); - EXPECT_EQ(kDisplayName, request.instance().display_name()); - std::vector actual_location_names; - for (auto&& c : request.clusters()) { - actual_location_names.emplace_back(c.second.location()); - } - EXPECT_THAT(actual_location_names, - UnorderedElementsAreArray(expected_location_names)); - return make_ready_future>(FailingStatus()); - }); - - EXPECT_THAT(tested.CreateInstance(config).get(), - StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(InstanceAdminTest, CreateCluster) { - auto tested = DefaultInstanceAdmin(); - auto const location_name = LocationName("the-location"); - auto config = ClusterConfig("the-location", 3, btadmin::HDD); - - EXPECT_CALL(*connection_, - CreateCluster(An())) - .WillOnce([&](btadmin::CreateClusterRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kClusterId, request.cluster_id()); - EXPECT_EQ(kInstanceName, request.parent()); - EXPECT_EQ(location_name, request.cluster().location()); - EXPECT_EQ(3, request.cluster().serve_nodes()); - EXPECT_EQ(btadmin::HDD, request.cluster().default_storage_type()); - return make_ready_future>(FailingStatus()); - }); - - EXPECT_THAT(tested.CreateCluster(config, kInstanceId, kClusterId).get(), - StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(InstanceAdminTest, UpdateInstance) { - auto tested = DefaultInstanceAdmin(); - auto constexpr kDisplayName = "updated display name"; - InstanceUpdateConfig config({}); - config.set_display_name(kDisplayName); - - EXPECT_CALL( - *connection_, - PartialUpdateInstance(An())) - .WillOnce([&](btadmin::PartialUpdateInstanceRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kDisplayName, request.instance().display_name()); - EXPECT_THAT(request.update_mask().paths(), Contains("display_name")); - return make_ready_future>(FailingStatus()); - }); - - EXPECT_THAT(tested.UpdateInstance(config).get(), - StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(InstanceAdminTest, GetInstance) { - auto tested = DefaultInstanceAdmin(); - - EXPECT_CALL(*connection_, GetInstance) - .WillOnce([&](btadmin::GetInstanceRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kInstanceName, request.name()); - return FailingStatus(); - }); - - EXPECT_THAT(tested.GetInstance(kInstanceId), - StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(InstanceAdminTest, DeleteInstance) { - auto tested = DefaultInstanceAdmin(); - - EXPECT_CALL(*connection_, DeleteInstance) - .WillOnce([&](btadmin::DeleteInstanceRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kInstanceName, request.name()); - return Status(); - }); - - EXPECT_STATUS_OK(tested.DeleteInstance(kInstanceId)); -} - -TEST_F(InstanceAdminTest, GetCluster) { - auto tested = DefaultInstanceAdmin(); - - EXPECT_CALL(*connection_, GetCluster) - .WillOnce([&](btadmin::GetClusterRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kClusterName, request.name()); - return FailingStatus(); - }); - - EXPECT_THAT(tested.GetCluster(kInstanceId, kClusterId), - StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(InstanceAdminTest, ListClustersSuccess) { - auto tested = DefaultInstanceAdmin(); - std::vector const expected_names = { - ClusterName(kProjectId, kInstanceId, "c0"), - ClusterName(kProjectId, kInstanceId, "c1")}; - std::vector const expected_fails = {"l0", "l1"}; - - EXPECT_CALL(*connection_, ListClusters) - .WillOnce([&](btadmin::ListClustersRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kInstanceName, request.parent()); - - btadmin::ListClustersResponse response; - for (auto const& name : expected_names) { - auto& cluster = *response.add_clusters(); - cluster.set_name(name); - } - for (auto const& loc : expected_fails) { - *response.add_failed_locations() = loc; - } - return make_status_or(response); - }); - - auto actual = tested.ListClusters(kInstanceId); - ASSERT_STATUS_OK(actual); - std::vector actual_names; - std::transform(actual->clusters.begin(), actual->clusters.end(), - std::back_inserter(actual_names), - [](btadmin::Cluster const& c) { return c.name(); }); - - EXPECT_THAT(actual_names, ElementsAreArray(expected_names)); - EXPECT_THAT(actual->failed_locations, ElementsAreArray(expected_fails)); -} - -TEST_F(InstanceAdminTest, ListClustersFailure) { - auto tested = DefaultInstanceAdmin(); - - EXPECT_CALL(*connection_, ListClusters) - .WillOnce([&](btadmin::ListClustersRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - // Verify that calling `ListClusters` with no arguments sets the - // instance-id to "-" - auto const instance_name = InstanceName(kProjectId, "-"); - EXPECT_EQ(instance_name, request.parent()); - return FailingStatus(); - }); - - EXPECT_THAT(tested.ListClusters(), StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(InstanceAdminTest, UpdateCluster) { - auto tested = DefaultInstanceAdmin(); - auto const location_name = LocationName("the-location"); - btadmin::Cluster c; - c.set_name(kClusterName); - c.set_location(location_name); - c.set_serve_nodes(3); - c.set_default_storage_type(btadmin::HDD); - auto config = ClusterConfig(std::move(c)); - - EXPECT_CALL(*connection_, UpdateCluster(An())) - .WillOnce([&](btadmin::Cluster const& cluster) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kClusterName, cluster.name()); - EXPECT_EQ(location_name, cluster.location()); - EXPECT_EQ(3, cluster.serve_nodes()); - EXPECT_EQ(btadmin::HDD, cluster.default_storage_type()); - return make_ready_future>(FailingStatus()); - }); - - EXPECT_THAT(tested.UpdateCluster(config).get(), - StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(InstanceAdminTest, DeleteCluster) { - auto tested = DefaultInstanceAdmin(); - - EXPECT_CALL(*connection_, DeleteCluster) - .WillOnce([&](btadmin::DeleteClusterRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kClusterName, request.name()); - return Status(); - }); - - EXPECT_STATUS_OK(tested.DeleteCluster(kInstanceId, kClusterId)); -} - -TEST_F(InstanceAdminTest, CreateAppProfile) { - auto tested = DefaultInstanceAdmin(); - auto config = AppProfileConfig::MultiClusterUseAny(kProfileId); - - EXPECT_CALL(*connection_, CreateAppProfile) - .WillOnce([&](btadmin::CreateAppProfileRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kProfileId, request.app_profile_id()); - EXPECT_EQ(kInstanceName, request.parent()); - return FailingStatus(); - }); - - EXPECT_THAT(tested.CreateAppProfile(kInstanceId, config), - StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(InstanceAdminTest, GetAppProfile) { - auto tested = DefaultInstanceAdmin(); - - EXPECT_CALL(*connection_, GetAppProfile) - .WillOnce([&](btadmin::GetAppProfileRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kProfileName, request.name()); - return FailingStatus(); - }); - - EXPECT_THAT(tested.GetAppProfile(kInstanceId, kProfileId), - StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(InstanceAdminTest, UpdateAppProfile) { - auto tested = DefaultInstanceAdmin(); - auto constexpr kDescription = "description"; - auto config = AppProfileUpdateConfig().set_description(kDescription); - - EXPECT_CALL(*connection_, - UpdateAppProfile(An())) - .WillOnce([&](btadmin::UpdateAppProfileRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kProfileName, request.app_profile().name()); - EXPECT_EQ(kDescription, request.app_profile().description()); - return make_ready_future>( - FailingStatus()); - }); - - EXPECT_THAT(tested.UpdateAppProfile(kInstanceId, kProfileId, config).get(), - StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(InstanceAdminTest, ListAppProfilesSuccess) { - auto tested = DefaultInstanceAdmin(); - std::vector const expected_names = { - AppProfileName(kProjectId, kInstanceId, "p0"), - AppProfileName(kProjectId, kInstanceId, "p1")}; - - auto iter = expected_names.begin(); - EXPECT_CALL(*connection_, ListAppProfiles) - .WillOnce([&iter, &expected_names]( - btadmin::ListAppProfilesRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kInstanceName, request.parent()); - - using ::google::cloud::internal::MakeStreamRange; - using ::google::cloud::internal::StreamReader; - auto reader = [&iter, &expected_names]() - -> StreamReader::result_type { - if (iter != expected_names.end()) { - btadmin::AppProfile p; - p.set_name(*iter); - ++iter; - return p; - } - return Status(); - }; - return MakeStreamRange(std::move(reader)); - }); - - auto profiles = tested.ListAppProfiles(kInstanceId); - ASSERT_STATUS_OK(profiles); - std::vector names; - std::transform(profiles->begin(), profiles->end(), std::back_inserter(names), - [](btadmin::AppProfile const& p) { return p.name(); }); - - EXPECT_THAT(names, ElementsAreArray(expected_names)); -} - -TEST_F(InstanceAdminTest, ListAppProfilesFailure) { - auto tested = DefaultInstanceAdmin(); - - EXPECT_CALL(*connection_, ListAppProfiles) - .WillOnce([&](btadmin::ListAppProfilesRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kInstanceName, request.parent()); - - using ::google::cloud::internal::MakeStreamRange; - return MakeStreamRange( - [] { return FailingStatus(); }); - }); - - EXPECT_THAT(tested.ListAppProfiles(kInstanceId), - StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(InstanceAdminTest, DeleteAppProfile) { - auto tested = DefaultInstanceAdmin(); - - EXPECT_CALL(*connection_, DeleteAppProfile) - .WillOnce([&](btadmin::DeleteAppProfileRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kProfileName, request.name()); - EXPECT_EQ(true, request.ignore_warnings()); - return Status(); - }); - - EXPECT_STATUS_OK(tested.DeleteAppProfile(kInstanceId, kProfileId, true)); -} - -TEST_F(InstanceAdminTest, GetNativeIamPolicy) { - auto tested = DefaultInstanceAdmin(); - - EXPECT_CALL(*connection_, GetIamPolicy) - .WillOnce([&](iamproto::GetIamPolicyRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kInstanceName, request.resource()); - return FailingStatus(); - }); - - EXPECT_THAT(tested.GetNativeIamPolicy(kInstanceId), - StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(InstanceAdminTest, SetNativeIamPolicy) { - auto tested = DefaultInstanceAdmin(); - iamproto::Policy policy; - policy.set_etag("tag"); - policy.set_version(3); - - EXPECT_CALL(*connection_, SetIamPolicy) - .WillOnce([&](iamproto::SetIamPolicyRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kInstanceName, request.resource()); - EXPECT_EQ("tag", request.policy().etag()); - EXPECT_EQ(3, request.policy().version()); - return FailingStatus(); - }); - - EXPECT_THAT(tested.SetIamPolicy(kInstanceId, policy), - StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(InstanceAdminTest, TestIamPermissionsSuccess) { - auto tested = DefaultInstanceAdmin(); - std::vector const expected_permissions = {"writer", "reader"}; - std::vector const returned_permissions = {"reader"}; - - EXPECT_CALL(*connection_, TestIamPermissions) - .WillOnce([&](iamproto::TestIamPermissionsRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kInstanceName, request.resource()); - std::vector actual_permissions; - for (auto const& c : request.permissions()) { - actual_permissions.emplace_back(c); - } - EXPECT_THAT(actual_permissions, - UnorderedElementsAreArray(expected_permissions)); - - iamproto::TestIamPermissionsResponse r; - for (auto const& p : returned_permissions) r.add_permissions(p); - return r; - }); - - auto resp = tested.TestIamPermissions(kInstanceId, expected_permissions); - ASSERT_STATUS_OK(resp); - EXPECT_THAT(*resp, ElementsAreArray(returned_permissions)); -} - -TEST_F(InstanceAdminTest, TestIamPermissionsFailure) { - auto tested = DefaultInstanceAdmin(); - std::vector const expected_permissions = {"writer", "reader"}; - - EXPECT_CALL(*connection_, TestIamPermissions) - .WillOnce([&](iamproto::TestIamPermissionsRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kInstanceName, request.resource()); - std::vector actual_permissions; - for (auto const& c : request.permissions()) { - actual_permissions.emplace_back(c); - } - EXPECT_THAT(actual_permissions, - UnorderedElementsAreArray(expected_permissions)); - return FailingStatus(); - }); - - EXPECT_THAT(tested.TestIamPermissions(kInstanceId, expected_permissions), - StatusIs(StatusCode::kPermissionDenied)); -} - -} // namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/instance_config.h b/google/cloud/bigtable/instance_config.h index bf108661cd3d4..c564067e8c4e3 100644 --- a/google/cloud/bigtable/instance_config.h +++ b/google/cloud/bigtable/instance_config.h @@ -17,8 +17,8 @@ #include "google/cloud/bigtable/cluster_config.h" #include "google/cloud/bigtable/version.h" -#include -#include +#include "google/bigtable/admin/v2/bigtable_instance_admin.pb.h" +#include "google/bigtable/admin/v2/common.pb.h" #include #include diff --git a/google/cloud/bigtable/instance_list_responses.h b/google/cloud/bigtable/instance_list_responses.h index 3f098603de276..f06a3d1b3350d 100644 --- a/google/cloud/bigtable/instance_list_responses.h +++ b/google/cloud/bigtable/instance_list_responses.h @@ -16,7 +16,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INSTANCE_LIST_RESPONSES_H #include "google/cloud/bigtable/version.h" -#include +#include "google/bigtable/admin/v2/bigtable_instance_admin.pb.h" #include #include diff --git a/google/cloud/bigtable/instance_update_config.h b/google/cloud/bigtable/instance_update_config.h index 9bcc5f9f22cda..35fbac87b060c 100644 --- a/google/cloud/bigtable/instance_update_config.h +++ b/google/cloud/bigtable/instance_update_config.h @@ -18,8 +18,8 @@ #include "google/cloud/bigtable/cluster_config.h" #include "google/cloud/bigtable/version.h" #include "google/cloud/internal/algorithm.h" -#include -#include +#include "google/bigtable/admin/v2/bigtable_instance_admin.pb.h" +#include "google/bigtable/admin/v2/common.pb.h" #include #include diff --git a/google/cloud/bigtable/internal/async_bulk_apply.cc b/google/cloud/bigtable/internal/async_bulk_apply.cc index e19c3a0ffddfb..1039aa862b30b 100644 --- a/google/cloud/bigtable/internal/async_bulk_apply.cc +++ b/google/cloud/bigtable/internal/async_bulk_apply.cc @@ -14,6 +14,7 @@ #include "google/cloud/bigtable/internal/async_bulk_apply.h" #include "google/cloud/bigtable/internal/async_streaming_read.h" +#include "google/cloud/grpc_options.h" #include "google/cloud/internal/grpc_opentelemetry.h" #include "google/cloud/internal/retry_loop_helpers.h" diff --git a/google/cloud/bigtable/internal/async_bulk_apply_test.cc b/google/cloud/bigtable/internal/async_bulk_apply_test.cc index d8304717c466b..f860d202df592 100644 --- a/google/cloud/bigtable/internal/async_bulk_apply_test.cc +++ b/google/cloud/bigtable/internal/async_bulk_apply_test.cc @@ -16,6 +16,7 @@ #include "google/cloud/bigtable/internal/operation_context.h" #include "google/cloud/bigtable/testing/mock_bigtable_stub.h" #include "google/cloud/bigtable/testing/mock_mutate_rows_limiter.h" +#include "google/cloud/grpc_options.h" #include "google/cloud/internal/async_streaming_read_rpc_impl.h" #include "google/cloud/internal/background_threads_impl.h" #ifdef GOOGLE_CLOUD_CPP_BIGTABLE_WITH_OTEL_METRICS @@ -1119,7 +1120,6 @@ TEST_F(AsyncBulkApplyTest, BigtableCookie) { CheckFailedMutations(actual.get(), expected); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::EnableTracing; using ::google::cloud::testing_util::IsActive; using ::google::cloud::testing_util::SpanNamed; @@ -1191,7 +1191,6 @@ TEST_F(AsyncBulkApplyTest, CallSpanActiveThroughout) { auto overlay = opentelemetry::trace::Scope(internal::MakeSpan("overlay")); (void)f.get(); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END diff --git a/google/cloud/bigtable/internal/async_row_reader_test.cc b/google/cloud/bigtable/internal/async_row_reader_test.cc index 41dfec788c604..b742726626875 100644 --- a/google/cloud/bigtable/internal/async_row_reader_test.cc +++ b/google/cloud/bigtable/internal/async_row_reader_test.cc @@ -1733,7 +1733,6 @@ TEST_F(AsyncRowReaderTest, BigtableCookie) { std::make_shared()); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::EnableTracing; using ::google::cloud::testing_util::IsActive; using ::google::cloud::testing_util::SpanNamed; @@ -1811,7 +1810,6 @@ TEST_F(AsyncRowReaderTest, CallSpanActiveThroughout) { // Block until the async call has completed. p.get_future().get(); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigtable_internal diff --git a/google/cloud/bigtable/internal/async_row_sampler_test.cc b/google/cloud/bigtable/internal/async_row_sampler_test.cc index 5a88ade0c8f84..8593f32811c88 100644 --- a/google/cloud/bigtable/internal/async_row_sampler_test.cc +++ b/google/cloud/bigtable/internal/async_row_sampler_test.cc @@ -772,7 +772,6 @@ TEST_F(AsyncSampleRowKeysTest, BigtableCookie) { EXPECT_THAT(sor, StatusIs(StatusCode::kPermissionDenied, HasSubstr("fail"))); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::EnableTracing; using ::google::cloud::testing_util::IsActive; using ::google::cloud::testing_util::SpanNamed; @@ -838,7 +837,6 @@ TEST_F(AsyncSampleRowKeysTest, CallSpanActiveThroughout) { auto overlay = opentelemetry::trace::Scope(internal::MakeSpan("overlay")); (void)f.get(); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END diff --git a/google/cloud/bigtable/internal/bigtable_auth_decorator.cc b/google/cloud/bigtable/internal/bigtable_auth_decorator.cc index f81eb363768b5..19f04976bea39 100644 --- a/google/cloud/bigtable/internal/bigtable_auth_decorator.cc +++ b/google/cloud/bigtable/internal/bigtable_auth_decorator.cc @@ -18,10 +18,13 @@ #include "google/cloud/bigtable/internal/bigtable_auth_decorator.h" #include "google/cloud/internal/async_streaming_read_rpc_auth.h" -#include +#include "google/bigtable/v2/bigtable.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_internal { @@ -267,3 +270,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigtable_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigtable/internal/bigtable_auth_decorator.h b/google/cloud/bigtable/internal/bigtable_auth_decorator.h index 5b62a0e90630c..08cb2328cd4fa 100644 --- a/google/cloud/bigtable/internal/bigtable_auth_decorator.h +++ b/google/cloud/bigtable/internal/bigtable_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_internal { @@ -141,4 +144,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_BIGTABLE_AUTH_DECORATOR_H diff --git a/google/cloud/bigtable/internal/bigtable_logging_decorator.cc b/google/cloud/bigtable/internal/bigtable_logging_decorator.cc index a5fe8ed5a200e..f1119bb28c20e 100644 --- a/google/cloud/bigtable/internal/bigtable_logging_decorator.cc +++ b/google/cloud/bigtable/internal/bigtable_logging_decorator.cc @@ -21,12 +21,15 @@ #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/internal/streaming_read_rpc_logging.h" #include "google/cloud/status_or.h" -#include +#include "google/bigtable/v2/bigtable.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_internal { @@ -341,3 +344,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigtable_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigtable/internal/bigtable_logging_decorator.h b/google/cloud/bigtable/internal/bigtable_logging_decorator.h index 839c0016bed17..d9badbe7a8397 100644 --- a/google/cloud/bigtable/internal/bigtable_logging_decorator.h +++ b/google/cloud/bigtable/internal/bigtable_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_internal { @@ -142,4 +145,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_BIGTABLE_LOGGING_DECORATOR_H diff --git a/google/cloud/bigtable/internal/bigtable_metadata_decorator.cc b/google/cloud/bigtable/internal/bigtable_metadata_decorator.cc index 7736c6a92462c..60c974265a565 100644 --- a/google/cloud/bigtable/internal/bigtable_metadata_decorator.cc +++ b/google/cloud/bigtable/internal/bigtable_metadata_decorator.cc @@ -18,18 +18,21 @@ #include "google/cloud/bigtable/internal/bigtable_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/routing_matcher.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/bigtable/v2/bigtable.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_internal { @@ -750,3 +753,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigtable_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigtable/internal/bigtable_metadata_decorator.h b/google/cloud/bigtable/internal/bigtable_metadata_decorator.h index 259e966033309..62833cd40c71d 100644 --- a/google/cloud/bigtable/internal/bigtable_metadata_decorator.h +++ b/google/cloud/bigtable/internal/bigtable_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_internal { @@ -146,4 +149,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_BIGTABLE_METADATA_DECORATOR_H diff --git a/google/cloud/bigtable/internal/bigtable_round_robin_decorator.cc b/google/cloud/bigtable/internal/bigtable_round_robin_decorator.cc index 24e062f92f9b7..529f757131695 100644 --- a/google/cloud/bigtable/internal/bigtable_round_robin_decorator.cc +++ b/google/cloud/bigtable/internal/bigtable_round_robin_decorator.cc @@ -21,6 +21,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_internal { @@ -181,3 +184,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigtable_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigtable/internal/bigtable_round_robin_decorator.h b/google/cloud/bigtable/internal/bigtable_round_robin_decorator.h index 0b54dbb130d97..5b7c9e2206e85 100644 --- a/google/cloud/bigtable/internal/bigtable_round_robin_decorator.h +++ b/google/cloud/bigtable/internal/bigtable_round_robin_decorator.h @@ -25,6 +25,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_internal { @@ -142,4 +145,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_BIGTABLE_ROUND_ROBIN_DECORATOR_H diff --git a/google/cloud/bigtable/internal/bigtable_stub.cc b/google/cloud/bigtable/internal/bigtable_stub.cc index cb00ccb83ffe8..d8b313019507c 100644 --- a/google/cloud/bigtable/internal/bigtable_stub.cc +++ b/google/cloud/bigtable/internal/bigtable_stub.cc @@ -20,10 +20,13 @@ #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/internal/async_streaming_read_rpc_impl.h" #include "google/cloud/status_or.h" -#include +#include "google/bigtable/v2/bigtable.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_internal { @@ -267,3 +270,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigtable_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigtable/internal/bigtable_stub.h b/google/cloud/bigtable/internal/bigtable_stub.h index d9bc25f175d05..11fcb3cd985eb 100644 --- a/google/cloud/bigtable/internal/bigtable_stub.h +++ b/google/cloud/bigtable/internal/bigtable_stub.h @@ -26,10 +26,13 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/bigtable/v2/bigtable.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_internal { @@ -242,4 +245,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_BIGTABLE_STUB_H diff --git a/google/cloud/bigtable/internal/bigtable_stub_factory.cc b/google/cloud/bigtable/internal/bigtable_stub_factory.cc index 9d5add4a61c44..8f201cf522438 100644 --- a/google/cloud/bigtable/internal/bigtable_stub_factory.cc +++ b/google/cloud/bigtable/internal/bigtable_stub_factory.cc @@ -29,7 +29,7 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/log.h" -#include +#include "google/bigtable/v2/feature_flags.pb.h" #include namespace google { diff --git a/google/cloud/bigtable/internal/bigtable_stub_factory_test.cc b/google/cloud/bigtable/internal/bigtable_stub_factory_test.cc index d7b07d00cc171..a94e233fd2928 100644 --- a/google/cloud/bigtable/internal/bigtable_stub_factory_test.cc +++ b/google/cloud/bigtable/internal/bigtable_stub_factory_test.cc @@ -264,7 +264,6 @@ TEST(BigtableStubFactory, FeaturesFlags) { (void)stub->MutateRow(context, Options{}, {}); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::DisableTracing; using ::google::cloud::testing_util::EnableTracing; using ::google::cloud::testing_util::SpanNamed; @@ -335,7 +334,6 @@ TEST(BigtableStubFactory, TracingDisabled) { EXPECT_THAT(span_catcher->GetSpans(), IsEmpty()); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END diff --git a/google/cloud/bigtable/internal/bigtable_tracing_stub.cc b/google/cloud/bigtable/internal/bigtable_tracing_stub.cc index 2150cb22880ae..5e141b29e5621 100644 --- a/google/cloud/bigtable/internal/bigtable_tracing_stub.cc +++ b/google/cloud/bigtable/internal/bigtable_tracing_stub.cc @@ -23,13 +23,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - BigtableTracingStub::BigtableTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -262,18 +263,14 @@ BigtableTracingStub::AsyncPrepareQuery( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeBigtableTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigtable_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/bigtable/internal/bigtable_tracing_stub.h b/google/cloud/bigtable/internal/bigtable_tracing_stub.h index d006b380ca250..18f5eb2d3da27 100644 --- a/google/cloud/bigtable/internal/bigtable_tracing_stub.h +++ b/google/cloud/bigtable/internal/bigtable_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace bigtable_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class BigtableTracingStub : public BigtableStub { public: ~BigtableTracingStub() override = default; @@ -137,8 +138,6 @@ class BigtableTracingStub : public BigtableStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -153,4 +152,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_BIGTABLE_TRACING_STUB_H diff --git a/google/cloud/bigtable/internal/bulk_mutator.cc b/google/cloud/bigtable/internal/bulk_mutator.cc index 7203d23fbd14d..fad9d4342563a 100644 --- a/google/cloud/bigtable/internal/bulk_mutator.cc +++ b/google/cloud/bigtable/internal/bulk_mutator.cc @@ -15,6 +15,7 @@ #include "google/cloud/bigtable/internal/bulk_mutator.h" #include "google/cloud/bigtable/rpc_retry_policy.h" #include "google/cloud/bigtable/table.h" +#include "google/cloud/grpc_options.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/log.h" #include @@ -195,22 +196,6 @@ BulkMutator::BulkMutator(std::string const& app_profile_id, : state_(app_profile_id, table_name, idempotent_policy, std::move(mut)), operation_context_(std::move(operation_context)) {} -grpc::Status BulkMutator::MakeOneRequest(bigtable::DataClient& client, - grpc::ClientContext& client_context) { - // Send the request to the server. - auto const& mutations = state_.BeforeStart(); - auto stream = client.MutateRows(&client_context, mutations); - // Read the stream of responses. - btproto::MutateRowsResponse response; - while (stream->Read(&response)) { - state_.OnRead(std::move(response)); - } - // Handle any errors in the stream. - auto grpc_status = stream->Finish(); - state_.OnFinish(MakeStatusFromRpcError(grpc_status)); - return grpc_status; -} - Status BulkMutator::MakeOneRequest(BigtableStub& stub, MutateRowsLimiter& limiter, Options const& options) { diff --git a/google/cloud/bigtable/internal/bulk_mutator.h b/google/cloud/bigtable/internal/bulk_mutator.h index bd543dc6f0ccc..922c9caeab426 100644 --- a/google/cloud/bigtable/internal/bulk_mutator.h +++ b/google/cloud/bigtable/internal/bulk_mutator.h @@ -16,12 +16,12 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_BULK_MUTATOR_H #include "google/cloud/bigtable/completion_queue.h" -#include "google/cloud/bigtable/data_client.h" #include "google/cloud/bigtable/idempotent_mutation_policy.h" #include "google/cloud/bigtable/internal/bigtable_stub.h" #include "google/cloud/bigtable/internal/mutate_rows_limiter.h" #include "google/cloud/bigtable/internal/operation_context.h" #include "google/cloud/bigtable/version.h" +#include "google/cloud/idempotency.h" #include "google/cloud/internal/invoke_result.h" #include "google/cloud/status.h" #include @@ -89,7 +89,7 @@ class BulkMutatorState { * request provided by the application. */ int original_index; - Idempotency idempotency; + google::cloud::Idempotency idempotency; /// Set to `false` if the result is unknown. bool has_mutation_result; /** @@ -123,10 +123,6 @@ class BulkMutator { /// Return true if there are pending mutations in the mutator bool HasPendingMutations() const { return state_.HasPendingMutations(); } - /// Synchronously send one batch request to the given stub. - grpc::Status MakeOneRequest(bigtable::DataClient& client, - grpc::ClientContext& client_context); - /// Synchronously send one batch request to the given stub. Status MakeOneRequest(BigtableStub& stub, MutateRowsLimiter& limiter, Options const& options); diff --git a/google/cloud/bigtable/internal/bulk_mutator_test.cc b/google/cloud/bigtable/internal/bulk_mutator_test.cc index 7724da5f21501..e7bf9f7433e9d 100644 --- a/google/cloud/bigtable/internal/bulk_mutator_test.cc +++ b/google/cloud/bigtable/internal/bulk_mutator_test.cc @@ -14,6 +14,7 @@ #include "google/cloud/bigtable/internal/bulk_mutator.h" #include "google/cloud/bigtable/internal/operation_context.h" +#include "google/cloud/grpc_options.h" #ifdef GOOGLE_CLOUD_CPP_BIGTABLE_WITH_OTEL_METRICS #include "google/cloud/bigtable/internal/metrics.h" #include "google/cloud/testing_util/fake_clock.h" diff --git a/google/cloud/bigtable/internal/crc32c.cc b/google/cloud/bigtable/internal/crc32c.cc index 3210fdbefafdd..572c031e69f0c 100644 --- a/google/cloud/bigtable/internal/crc32c.cc +++ b/google/cloud/bigtable/internal/crc32c.cc @@ -14,13 +14,7 @@ #include "google/cloud/bigtable/internal/crc32c.h" #include "absl/base/config.h" -#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION >= 20230125 #include "absl/crc/crc32c.h" -#define GOOGLE_CLOUD_CPP_USE_ABSL_CRC32C 1 -#else -#define GOOGLE_CLOUD_CPP_USE_ABSL_CRC32C 0 -#endif // ABSL_LTS_RELEASE_VERSION -#include namespace google { namespace cloud { @@ -28,8 +22,8 @@ namespace bigtable_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN std::uint32_t ExtendCrc32c(std::uint32_t crc, absl::string_view data) { - return crc32c::Extend(crc, reinterpret_cast(data.data()), - data.size()); + return static_cast( + absl::ExtendCrc32c(absl::crc32c_t{crc}, data)); } std::uint32_t ExtendCrc32c(std::uint32_t crc, @@ -47,8 +41,6 @@ std::uint32_t ExtendCrc32c(std::uint32_t crc, absl::Cord const& data) { return crc; } -#if GOOGLE_CLOUD_CPP_USE_ABSL_CRC32C - std::uint32_t ExtendCrc32c(std::uint32_t crc, absl::string_view data, std::uint32_t data_crc) { return static_cast(absl::ConcatCrc32c( @@ -69,26 +61,6 @@ std::uint32_t ExtendCrc32c(std::uint32_t crc, absl::Cord const& data, absl::crc32c_t{crc}, absl::crc32c_t{data_crc}, data.size())); } -#else - -std::uint32_t ExtendCrc32c(std::uint32_t crc, absl::string_view data, - std::uint32_t /*data_crc*/) { - return ExtendCrc32c(crc, data); -} - -std::uint32_t ExtendCrc32c(std::uint32_t crc, - bigtable_internal::ConstBufferSequence const& data, - std::uint32_t /*data_crc*/) { - return ExtendCrc32c(crc, data); -} - -std::uint32_t ExtendCrc32c(std::uint32_t crc, absl::Cord const& data, - std::uint32_t /*data_crc*/) { - return ExtendCrc32c(crc, data); -} - -#endif // GOOGLE_CLOUD_CPP_USE_ABSL_CRC32C - GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigtable_internal } // namespace cloud diff --git a/google/cloud/bigtable/internal/data_tracing_connection.cc b/google/cloud/bigtable/internal/data_tracing_connection.cc index e7c4942135b62..d97f825eb4fde 100644 --- a/google/cloud/bigtable/internal/data_tracing_connection.cc +++ b/google/cloud/bigtable/internal/data_tracing_connection.cc @@ -21,7 +21,6 @@ namespace cloud { namespace bigtable_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY namespace { std::vector EndBulkApplySpan( @@ -215,15 +214,6 @@ std::shared_ptr MakeDataTracingConnection( return std::make_shared(std::move(conn)); } -#else - -std::shared_ptr MakeDataTracingConnection( - std::shared_ptr conn) { - return conn; -} - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigtable_internal } // namespace cloud diff --git a/google/cloud/bigtable/internal/data_tracing_connection_test.cc b/google/cloud/bigtable/internal/data_tracing_connection_test.cc index 5e9fadf777fc6..d60ef219b1a07 100644 --- a/google/cloud/bigtable/internal/data_tracing_connection_test.cc +++ b/google/cloud/bigtable/internal/data_tracing_connection_test.cc @@ -26,7 +26,6 @@ namespace bigtable_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN namespace { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::bigtable_mocks::MockDataConnection; using ::google::cloud::testing_util::InstallSpanCatcher; using ::google::cloud::testing_util::IsOkAndHolds; @@ -641,7 +640,6 @@ TEST(DataTracingConnection, AsyncReadRowFailure) { Not(SpanHasAttributes( OTelAttribute("gcloud.bigtable.row_found", _)))))); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END diff --git a/google/cloud/bigtable/internal/default_row_reader.cc b/google/cloud/bigtable/internal/default_row_reader.cc index 844bdace38dd2..7cb45dad72e67 100644 --- a/google/cloud/bigtable/internal/default_row_reader.cc +++ b/google/cloud/bigtable/internal/default_row_reader.cc @@ -15,6 +15,7 @@ #include "google/cloud/bigtable/internal/default_row_reader.h" #include "google/cloud/bigtable/table.h" #include "google/cloud/grpc_error_delegate.h" +#include "google/cloud/grpc_options.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/internal/retry_loop_helpers.h" diff --git a/google/cloud/bigtable/internal/default_row_reader.h b/google/cloud/bigtable/internal/default_row_reader.h index b0d48c8add3bd..5f83e9e4aebd5 100644 --- a/google/cloud/bigtable/internal/default_row_reader.h +++ b/google/cloud/bigtable/internal/default_row_reader.h @@ -20,7 +20,6 @@ #include "google/cloud/bigtable/internal/operation_context.h" #include "google/cloud/bigtable/internal/readrowsparser.h" #include "google/cloud/bigtable/internal/row_reader_impl.h" -#include "google/cloud/bigtable/metadata_update_policy.h" #include "google/cloud/bigtable/options.h" #include "google/cloud/bigtable/row.h" #include "google/cloud/bigtable/row_set.h" diff --git a/google/cloud/bigtable/internal/default_row_reader_test.cc b/google/cloud/bigtable/internal/default_row_reader_test.cc index bcbd97dfc077e..9c282ad0660cf 100644 --- a/google/cloud/bigtable/internal/default_row_reader_test.cc +++ b/google/cloud/bigtable/internal/default_row_reader_test.cc @@ -16,6 +16,7 @@ #include "google/cloud/bigtable/row_reader.h" #include "google/cloud/bigtable/testing/mock_bigtable_stub.h" #include "google/cloud/bigtable/testing/mock_policies.h" +#include "google/cloud/grpc_options.h" #include "google/cloud/internal/make_status.h" #ifdef GOOGLE_CLOUD_CPP_BIGTABLE_WITH_OTEL_METRICS #include "google/cloud/bigtable/internal/metrics.h" diff --git a/google/cloud/bigtable/internal/defaults.cc b/google/cloud/bigtable/internal/defaults.cc index c7c1cd041ea86..9544730158bda 100644 --- a/google/cloud/bigtable/internal/defaults.cc +++ b/google/cloud/bigtable/internal/defaults.cc @@ -126,20 +126,24 @@ int DefaultConnectionPoolSize() { } Options HandleUniverseDomain(Options opts) { - if (!opts.has()) { + if (!opts.has<::google::cloud::bigtable_internal::DataEndpointOption>()) { auto ep = google::cloud::internal::UniverseDomainEndpoint( "bigtable.googleapis.com", opts); - opts.set(std::move(ep)); + opts.set<::google::cloud::bigtable_internal::DataEndpointOption>( + std::move(ep)); } - if (!opts.has()) { + if (!opts.has<::google::cloud::bigtable_internal::AdminEndpointOption>()) { auto ep = google::cloud::internal::UniverseDomainEndpoint( "bigtableadmin.googleapis.com", opts); - opts.set(std::move(ep)); + opts.set<::google::cloud::bigtable_internal::AdminEndpointOption>( + std::move(ep)); } - if (!opts.has()) { + if (!opts.has< + ::google::cloud::bigtable_internal::InstanceAdminEndpointOption>()) { auto ep = google::cloud::internal::UniverseDomainEndpoint( "bigtableadmin.googleapis.com", opts); - opts.set(std::move(ep)); + opts.set<::google::cloud::bigtable_internal::InstanceAdminEndpointOption>( + std::move(ep)); } return opts; } @@ -153,14 +157,16 @@ Options DefaultOptions(Options opts) { if (opts.has()) { auto const& ep = opts.get(); - if (!opts.has()) { - opts.set(ep); + if (!opts.has<::google::cloud::bigtable_internal::DataEndpointOption>()) { + opts.set<::google::cloud::bigtable_internal::DataEndpointOption>(ep); } - if (!opts.has()) { - opts.set(ep); + if (!opts.has<::google::cloud::bigtable_internal::AdminEndpointOption>()) { + opts.set<::google::cloud::bigtable_internal::AdminEndpointOption>(ep); } - if (!opts.has()) { - opts.set(ep); + if (!opts.has<::google::cloud::bigtable_internal:: + InstanceAdminEndpointOption>()) { + opts.set<::google::cloud::bigtable_internal::InstanceAdminEndpointOption>( + ep); } } @@ -168,7 +174,7 @@ Options DefaultOptions(Options opts) { GetEnv("GOOGLE_CLOUD_ENABLE_DIRECT_PATH").value_or(""); if (absl::c_any_of(absl::StrSplit(direct_path, ','), [](absl::string_view v) { return v == "bigtable"; })) { - opts.set( + opts.set<::google::cloud::bigtable_internal::DataEndpointOption>( "google-c2p:///directpath-bigtable.googleapis.com") .set("directpath-bigtable.googleapis.com"); @@ -180,15 +186,18 @@ Options DefaultOptions(Options opts) { auto emulator = GetEnv("BIGTABLE_EMULATOR_HOST"); if (emulator) { - opts.set(*emulator); - opts.set(*emulator); - opts.set(*emulator); + opts.set<::google::cloud::bigtable_internal::DataEndpointOption>(*emulator); + opts.set<::google::cloud::bigtable_internal::AdminEndpointOption>( + *emulator); + opts.set<::google::cloud::bigtable_internal::InstanceAdminEndpointOption>( + *emulator); } auto instance_admin_emulator = GetEnv("BIGTABLE_INSTANCE_ADMIN_EMULATOR_HOST"); if (instance_admin_emulator) { - opts.set(*std::move(instance_admin_emulator)); + opts.set<::google::cloud::bigtable_internal::InstanceAdminEndpointOption>( + *std::move(instance_admin_emulator)); } // Handle `UniverseDomainOption`. Note that we have already addressed the @@ -285,17 +294,21 @@ Options DefaultDataOptions(Options opts) { "bigtable.googleapis.com", opts); opts.set(std::move(ep)); } - return opts.set(opts.get()); + return opts.set( + opts.get<::google::cloud::bigtable_internal::DataEndpointOption>()); } Options DefaultInstanceAdminOptions(Options opts) { opts = DefaultOptions(std::move(opts)); - return opts.set(opts.get()); + return opts.set( + opts.get< + ::google::cloud::bigtable_internal::InstanceAdminEndpointOption>()); } Options DefaultTableAdminOptions(Options opts) { opts = DefaultOptions(std::move(opts)); - return opts.set(opts.get()); + return opts.set( + opts.get<::google::cloud::bigtable_internal::AdminEndpointOption>()); } } // namespace internal diff --git a/google/cloud/bigtable/internal/defaults_test.cc b/google/cloud/bigtable/internal/defaults_test.cc index 19f666a323504..aa4e50948c53f 100644 --- a/google/cloud/bigtable/internal/defaults_test.cc +++ b/google/cloud/bigtable/internal/defaults_test.cc @@ -14,6 +14,7 @@ #include "google/cloud/bigtable/internal/defaults.h" #include "google/cloud/bigtable/internal/client_options_defaults.h" +#include "google/cloud/bigtable/internal/endpoint_options.h" #include "google/cloud/bigtable/options.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" @@ -53,10 +54,15 @@ TEST(OptionsTest, Defaults) { "BIGTABLE_INSTANCE_ADMIN_EMULATOR_HOST", absl::nullopt); auto opts = DefaultOptions(); - EXPECT_EQ("bigtable.googleapis.com", opts.get()); - EXPECT_EQ("bigtableadmin.googleapis.com", opts.get()); - EXPECT_EQ("bigtableadmin.googleapis.com", - opts.get()); + EXPECT_EQ("bigtable.googleapis.com", + opts.get<::google::cloud::bigtable_internal::DataEndpointOption>()); + EXPECT_EQ( + "bigtableadmin.googleapis.com", + opts.get<::google::cloud::bigtable_internal::AdminEndpointOption>()); + EXPECT_EQ( + "bigtableadmin.googleapis.com", + opts.get< + ::google::cloud::bigtable_internal::InstanceAdminEndpointOption>()); EXPECT_EQ(typeid(grpc::GoogleDefaultCredentials()), typeid(opts.get())); EXPECT_FALSE(opts.has()); @@ -94,9 +100,12 @@ TEST(OptionsTest, DefaultOptionsDoesNotOverride) { channel_args.SetString("test-key-1", "value-1"); auto opts = DefaultOptions( Options{} - .set("testdata.googleapis.com") - .set("testadmin.googleapis.com") - .set("testinstanceadmin.googleapis.com") + .set<::google::cloud::bigtable_internal::DataEndpointOption>( + "testdata.googleapis.com") + .set<::google::cloud::bigtable_internal::AdminEndpointOption>( + "testadmin.googleapis.com") + .set<::google::cloud::bigtable_internal::InstanceAdminEndpointOption>( + "testinstanceadmin.googleapis.com") .set(grpc::InsecureChannelCredentials()) .set( TracingOptions{}.SetOptions("single_line_mode=F")) @@ -107,10 +116,15 @@ TEST(OptionsTest, DefaultOptionsDoesNotOverride) { .set({{"test-key-2", "value-2"}}) .set({"test-prefix"})); - EXPECT_EQ("testdata.googleapis.com", opts.get()); - EXPECT_EQ("testadmin.googleapis.com", opts.get()); - EXPECT_EQ("testinstanceadmin.googleapis.com", - opts.get()); + EXPECT_EQ("testdata.googleapis.com", + opts.get<::google::cloud::bigtable_internal::DataEndpointOption>()); + EXPECT_EQ( + "testadmin.googleapis.com", + opts.get<::google::cloud::bigtable_internal::AdminEndpointOption>()); + EXPECT_EQ( + "testinstanceadmin.googleapis.com", + opts.get< + ::google::cloud::bigtable_internal::InstanceAdminEndpointOption>()); EXPECT_EQ(typeid(grpc::InsecureChannelCredentials()), typeid(opts.get())); EXPECT_FALSE(opts.get().single_line_mode()); @@ -134,29 +148,49 @@ TEST(OptionsTest, EndpointOptionSetsAll) { auto options = Options{}.set("endpoint-option"); options = DefaultOptions(std::move(options)); EXPECT_EQ("endpoint-option", options.get()); - EXPECT_EQ("endpoint-option", options.get()); - EXPECT_EQ("endpoint-option", options.get()); - EXPECT_EQ("endpoint-option", options.get()); + EXPECT_EQ( + "endpoint-option", + options.get<::google::cloud::bigtable_internal::DataEndpointOption>()); + EXPECT_EQ( + "endpoint-option", + options.get<::google::cloud::bigtable_internal::AdminEndpointOption>()); + EXPECT_EQ( + "endpoint-option", + options.get< + ::google::cloud::bigtable_internal::InstanceAdminEndpointOption>()); } TEST(OptionsTest, EndpointOptionOverridden) { - auto options = Options{} - .set("ignored") - .set("data") - .set("table-admin") - .set("instance-admin"); + auto options = + Options{} + .set("ignored") + .set<::google::cloud::bigtable_internal::DataEndpointOption>("data") + .set<::google::cloud::bigtable_internal::AdminEndpointOption>( + "table-admin") + .set<::google::cloud::bigtable_internal::InstanceAdminEndpointOption>( + "instance-admin"); options = DefaultOptions(std::move(options)); - EXPECT_EQ("data", options.get()); - EXPECT_EQ("table-admin", options.get()); - EXPECT_EQ("instance-admin", options.get()); + EXPECT_EQ( + "data", + options.get<::google::cloud::bigtable_internal::DataEndpointOption>()); + EXPECT_EQ( + "table-admin", + options.get<::google::cloud::bigtable_internal::AdminEndpointOption>()); + EXPECT_EQ( + "instance-admin", + options.get< + ::google::cloud::bigtable_internal::InstanceAdminEndpointOption>()); } TEST(OptionsTest, DefaultDataOptionsEndpoint) { auto options = Options{} - .set("data.googleapis.com") - .set("tableadmin.googleapis.com") - .set("instanceadmin.googleapis.com"); + .set<::google::cloud::bigtable_internal::DataEndpointOption>( + "data.googleapis.com") + .set<::google::cloud::bigtable_internal::AdminEndpointOption>( + "tableadmin.googleapis.com") + .set<::google::cloud::bigtable_internal::InstanceAdminEndpointOption>( + "instanceadmin.googleapis.com"); options = DefaultDataOptions(std::move(options)); EXPECT_EQ("data.googleapis.com", options.get()); @@ -168,9 +202,12 @@ TEST(OptionsTest, DefaultDataOptionsEndpoint) { TEST(OptionsTest, DefaultInstanceAdminOptions) { auto options = Options{} - .set("data.googleapis.com") - .set("tableadmin.googleapis.com") - .set("instanceadmin.googleapis.com"); + .set<::google::cloud::bigtable_internal::DataEndpointOption>( + "data.googleapis.com") + .set<::google::cloud::bigtable_internal::AdminEndpointOption>( + "tableadmin.googleapis.com") + .set<::google::cloud::bigtable_internal::InstanceAdminEndpointOption>( + "instanceadmin.googleapis.com"); options = DefaultInstanceAdminOptions(std::move(options)); EXPECT_EQ("instanceadmin.googleapis.com", options.get()); @@ -182,9 +219,12 @@ TEST(OptionsTest, DefaultInstanceAdminOptions) { TEST(OptionsTest, DefaultTableAdminOptions) { auto options = Options{} - .set("data.googleapis.com") - .set("tableadmin.googleapis.com") - .set("instanceadmin.googleapis.com"); + .set<::google::cloud::bigtable_internal::DataEndpointOption>( + "data.googleapis.com") + .set<::google::cloud::bigtable_internal::AdminEndpointOption>( + "tableadmin.googleapis.com") + .set<::google::cloud::bigtable_internal::InstanceAdminEndpointOption>( + "instanceadmin.googleapis.com"); options = DefaultTableAdminOptions(std::move(options)); EXPECT_EQ("tableadmin.googleapis.com", options.get()); @@ -285,9 +325,12 @@ TEST(OptionsTest, BigtableEndpointOptionsOverrideUniverseDomain) { auto options = Options{} .set("ud-option.net") - .set("data.googleapis.com") - .set("tableadmin.googleapis.com") - .set("instanceadmin.googleapis.com"); + .set<::google::cloud::bigtable_internal::DataEndpointOption>( + "data.googleapis.com") + .set<::google::cloud::bigtable_internal::AdminEndpointOption>( + "tableadmin.googleapis.com") + .set<::google::cloud::bigtable_internal::InstanceAdminEndpointOption>( + "instanceadmin.googleapis.com"); EXPECT_EQ(DefaultDataOptions(options).get(), "data.googleapis.com"); @@ -304,9 +347,11 @@ TEST(OptionsTest, BigtableEndpointEnvVarsOverrideUniverseDomain) { auto options = Options{} .set("ud-option.net") - .set("ignored-data.googleapis.com") - .set("ignored-tableadmin.googleapis.com") - .set( + .set<::google::cloud::bigtable_internal::DataEndpointOption>( + "ignored-data.googleapis.com") + .set<::google::cloud::bigtable_internal::AdminEndpointOption>( + "ignored-tableadmin.googleapis.com") + .set<::google::cloud::bigtable_internal::InstanceAdminEndpointOption>( "ignored-instanceadmin.googleapis.com") .set("ignored-endpoint.googleapis.com"); @@ -350,9 +395,15 @@ TEST(EndpointEnvTest, EmulatorEnvOnly) { ScopedEnvironment emulator("BIGTABLE_EMULATOR_HOST", "emulator-host:8000"); auto opts = DefaultOptions(); - EXPECT_EQ("emulator-host:8000", opts.get()); - EXPECT_EQ("emulator-host:8000", opts.get()); - EXPECT_EQ("emulator-host:8000", opts.get()); + EXPECT_EQ("emulator-host:8000", + opts.get<::google::cloud::bigtable_internal::DataEndpointOption>()); + EXPECT_EQ( + "emulator-host:8000", + opts.get<::google::cloud::bigtable_internal::AdminEndpointOption>()); + EXPECT_EQ( + "emulator-host:8000", + opts.get< + ::google::cloud::bigtable_internal::InstanceAdminEndpointOption>()); } TEST(EndpointEnvTest, InstanceEmulatorEnvOnly) { @@ -360,10 +411,15 @@ TEST(EndpointEnvTest, InstanceEmulatorEnvOnly) { "instance-emulator-host:9000"); auto opts = DefaultOptions(); - EXPECT_EQ("bigtable.googleapis.com", opts.get()); - EXPECT_EQ("bigtableadmin.googleapis.com", opts.get()); - EXPECT_EQ("instance-emulator-host:9000", - opts.get()); + EXPECT_EQ("bigtable.googleapis.com", + opts.get<::google::cloud::bigtable_internal::DataEndpointOption>()); + EXPECT_EQ( + "bigtableadmin.googleapis.com", + opts.get<::google::cloud::bigtable_internal::AdminEndpointOption>()); + EXPECT_EQ( + "instance-emulator-host:9000", + opts.get< + ::google::cloud::bigtable_internal::InstanceAdminEndpointOption>()); } TEST(EndpointEnvTest, InstanceEmulatorEnvOverridesOtherEnv) { @@ -372,10 +428,15 @@ TEST(EndpointEnvTest, InstanceEmulatorEnvOverridesOtherEnv) { "instance-emulator-host:9000"); auto opts = DefaultOptions(); - EXPECT_EQ("emulator-host:8000", opts.get()); - EXPECT_EQ("emulator-host:8000", opts.get()); - EXPECT_EQ("instance-emulator-host:9000", - opts.get()); + EXPECT_EQ("emulator-host:8000", + opts.get<::google::cloud::bigtable_internal::DataEndpointOption>()); + EXPECT_EQ( + "emulator-host:8000", + opts.get<::google::cloud::bigtable_internal::AdminEndpointOption>()); + EXPECT_EQ( + "instance-emulator-host:9000", + opts.get< + ::google::cloud::bigtable_internal::InstanceAdminEndpointOption>()); } TEST(EndpointEnvTest, EmulatorEnvOverridesUserOptions) { @@ -384,13 +445,22 @@ TEST(EndpointEnvTest, EmulatorEnvOverridesUserOptions) { auto opts = DefaultOptions( Options{} .set("ignored-any") - .set("ignored-data") - .set("ignored-admin") - .set("ignored-instance-admin")); - - EXPECT_EQ("emulator-host:8000", opts.get()); - EXPECT_EQ("emulator-host:8000", opts.get()); - EXPECT_EQ("emulator-host:8000", opts.get()); + .set<::google::cloud::bigtable_internal::DataEndpointOption>( + "ignored-data") + .set<::google::cloud::bigtable_internal::AdminEndpointOption>( + "ignored-admin") + .set<::google::cloud::bigtable_internal::InstanceAdminEndpointOption>( + "ignored-instance-admin")); + + EXPECT_EQ("emulator-host:8000", + opts.get<::google::cloud::bigtable_internal::DataEndpointOption>()); + EXPECT_EQ( + "emulator-host:8000", + opts.get<::google::cloud::bigtable_internal::AdminEndpointOption>()); + EXPECT_EQ( + "emulator-host:8000", + opts.get< + ::google::cloud::bigtable_internal::InstanceAdminEndpointOption>()); } TEST(EndpointEnvTest, InstanceEmulatorEnvOverridesUserOption) { @@ -400,10 +470,13 @@ TEST(EndpointEnvTest, InstanceEmulatorEnvOverridesUserOption) { auto opts = DefaultOptions( Options{} .set("ignored-any") - .set("ignored-instance-admin")); + .set<::google::cloud::bigtable_internal::InstanceAdminEndpointOption>( + "ignored-instance-admin")); - EXPECT_EQ("instance-emulator-host:9000", - opts.get()); + EXPECT_EQ( + "instance-emulator-host:9000", + opts.get< + ::google::cloud::bigtable_internal::InstanceAdminEndpointOption>()); } TEST(EndpointEnvTest, EmulatorEnvDefaultsToInsecureCredentials) { @@ -431,12 +504,16 @@ TEST(EndpointEnvTest, DirectPathEnabled) { auto opts = DefaultOptions(); EXPECT_EQ("google-c2p:///directpath-bigtable.googleapis.com", - opts.get()); + opts.get<::google::cloud::bigtable_internal::DataEndpointOption>()); EXPECT_EQ("directpath-bigtable.googleapis.com", opts.get()); // Admin endpoints are not affected. - EXPECT_EQ("bigtableadmin.googleapis.com", opts.get()); - EXPECT_EQ("bigtableadmin.googleapis.com", - opts.get()); + EXPECT_EQ( + "bigtableadmin.googleapis.com", + opts.get<::google::cloud::bigtable_internal::AdminEndpointOption>()); + EXPECT_EQ( + "bigtableadmin.googleapis.com", + opts.get< + ::google::cloud::bigtable_internal::InstanceAdminEndpointOption>()); EXPECT_EQ(1, opts.get()); } diff --git a/google/cloud/bigtable/internal/endpoint_options.h b/google/cloud/bigtable/internal/endpoint_options.h new file mode 100644 index 0000000000000..58c1185263dff --- /dev/null +++ b/google/cloud/bigtable/internal/endpoint_options.h @@ -0,0 +1,58 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_ENDPOINT_OPTIONS_H +#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_ENDPOINT_OPTIONS_H + +#include "google/cloud/version.h" +#include + +namespace google { +namespace cloud { +namespace bigtable_internal { +GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN + +/** + * The endpoint for data operations. + * + */ +struct DataEndpointOption { + using Type = std::string; +}; + +/** + * The endpoint for table admin operations. + * + */ +struct AdminEndpointOption { + using Type = std::string; +}; + +/** + * The endpoint for instance admin operations. + * + * In most scenarios this should have the same value as `AdminEndpointOption`. + * The most common exception is testing, where the emulator for instance admin + * operations may be different than the emulator for admin and data operations. + * */ +struct InstanceAdminEndpointOption { + using Type = std::string; +}; + +GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END +} // namespace bigtable_internal +} // namespace cloud +} // namespace google + +#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_ENDPOINT_OPTIONS_H diff --git a/google/cloud/bigtable/internal/legacy_async_bulk_apply.cc b/google/cloud/bigtable/internal/legacy_async_bulk_apply.cc deleted file mode 100644 index b4d2efa5da9a9..0000000000000 --- a/google/cloud/bigtable/internal/legacy_async_bulk_apply.cc +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/internal/legacy_async_bulk_apply.h" - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace internal { - -future> AsyncRetryBulkApply::Create( - CompletionQueue cq, std::unique_ptr rpc_retry_policy, - std::unique_ptr rpc_backoff_policy, - IdempotentMutationPolicy& idempotent_policy, - MetadataUpdatePolicy metadata_update_policy, - std::shared_ptr client, - std::string const& app_profile_id, std::string const& table_name, - BulkMutation mut) { - if (mut.empty()) return make_ready_future(std::vector{}); - - std::shared_ptr bulk_apply(new AsyncRetryBulkApply( - std::move(rpc_retry_policy), std::move(rpc_backoff_policy), - idempotent_policy, std::move(metadata_update_policy), std::move(client), - app_profile_id, table_name, std::move(mut))); - bulk_apply->StartIteration(std::move(cq)); - return bulk_apply->promise_.get_future(); -} - -AsyncRetryBulkApply::AsyncRetryBulkApply( - std::unique_ptr rpc_retry_policy, - std::unique_ptr rpc_backoff_policy, - IdempotentMutationPolicy& idempotent_policy, - MetadataUpdatePolicy metadata_update_policy, - std::shared_ptr client, - std::string const& app_profile_id, std::string const& table_name, - BulkMutation mut) - : rpc_retry_policy_(std::move(rpc_retry_policy)), - rpc_backoff_policy_(std::move(rpc_backoff_policy)), - metadata_update_policy_(std::move(metadata_update_policy)), - client_(std::move(client)), - state_(app_profile_id, table_name, idempotent_policy, std::move(mut)) {} - -void AsyncRetryBulkApply::StartIteration(CompletionQueue cq) { - auto context = std::make_unique(); - rpc_retry_policy_->Setup(*context); - rpc_backoff_policy_->Setup(*context); - metadata_update_policy_.Setup(*context); - auto& client = client_; - auto self = shared_from_this(); - cq.MakeStreamingReadRpc( - [client](grpc::ClientContext* context, - google::bigtable::v2::MutateRowsRequest const& request, - grpc::CompletionQueue* cq) { - return client->PrepareAsyncMutateRows(context, request, cq); - }, - state_.BeforeStart(), std::move(context), - [self, cq](google::bigtable::v2::MutateRowsResponse r) { - self->OnRead(std::move(r)); - return make_ready_future(true); - }, - [self, cq](Status const& s) { self->OnFinish(cq, s); }); -} - -void AsyncRetryBulkApply::OnRead( - google::bigtable::v2::MutateRowsResponse response) { - state_.OnRead(std::move(response)); -} - -void AsyncRetryBulkApply::OnFinish(CompletionQueue cq, Status const& status) { - state_.OnFinish(status); - if (!state_.HasPendingMutations() || !rpc_retry_policy_->OnFailure(status)) { - SetPromise(); - return; - } - - auto self = this->shared_from_this(); - cq.MakeRelativeTimer(rpc_backoff_policy_->OnCompletion(status)) - .then([self, cq](auto result) { - if (result.get()) { - self->StartIteration(std::move(cq)); - } else { - self->SetPromise(); - } - }); -} - -void AsyncRetryBulkApply::SetPromise() { - promise_.set_value(std::move(state_).OnRetryDone()); -} - -} // namespace internal -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/internal/legacy_async_bulk_apply.h b/google/cloud/bigtable/internal/legacy_async_bulk_apply.h deleted file mode 100644 index f53802f5c50f1..0000000000000 --- a/google/cloud/bigtable/internal/legacy_async_bulk_apply.h +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_LEGACY_ASYNC_BULK_APPLY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_LEGACY_ASYNC_BULK_APPLY_H - -#include "google/cloud/bigtable/completion_queue.h" -#include "google/cloud/bigtable/data_client.h" -#include "google/cloud/bigtable/idempotent_mutation_policy.h" -#include "google/cloud/bigtable/internal/async_retry_op.h" -#include "google/cloud/bigtable/internal/bulk_mutator.h" -#include "google/cloud/bigtable/version.h" -#include "google/cloud/internal/invoke_result.h" -#include -#include - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace internal { -/** - * Implement the retry loop for AsyncBulkApply. - * - * The retry loop for AsyncBulkApply() is fairly different from all the other - * retry loops: only those mutations that are idempotent and had a transient - * failure can be retried, and the result for each mutation arrives in a stream. - * This class implements that retry loop. - */ -class AsyncRetryBulkApply - : public std::enable_shared_from_this { - public: - static future> Create( - CompletionQueue cq, std::unique_ptr rpc_retry_policy, - std::unique_ptr rpc_backoff_policy, - IdempotentMutationPolicy& idempotent_policy, - MetadataUpdatePolicy metadata_update_policy, - std::shared_ptr client, - std::string const& app_profile_id, std::string const& table_name, - BulkMutation mut); - - private: - AsyncRetryBulkApply(std::unique_ptr rpc_retry_policy, - std::unique_ptr rpc_backoff_policy, - IdempotentMutationPolicy& idempotent_policy, - MetadataUpdatePolicy metadata_update_policy, - std::shared_ptr client, - std::string const& app_profile_id, - std::string const& table_name, BulkMutation mut); - - void StartIteration(CompletionQueue cq); - void OnRead(google::bigtable::v2::MutateRowsResponse response); - void OnFinish(CompletionQueue cq, google::cloud::Status const& status); - void SetPromise(); - - std::unique_ptr rpc_retry_policy_; - std::unique_ptr rpc_backoff_policy_; - MetadataUpdatePolicy metadata_update_policy_; - std::shared_ptr client_; - bigtable_internal::BulkMutatorState state_; - promise> promise_; -}; - -} // namespace internal -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_LEGACY_ASYNC_BULK_APPLY_H diff --git a/google/cloud/bigtable/internal/legacy_async_bulk_apply_test.cc b/google/cloud/bigtable/internal/legacy_async_bulk_apply_test.cc deleted file mode 100644 index 9c2e21f730758..0000000000000 --- a/google/cloud/bigtable/internal/legacy_async_bulk_apply_test.cc +++ /dev/null @@ -1,522 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/internal/legacy_async_bulk_apply.h" -#include "google/cloud/bigtable/testing/mock_mutate_rows_reader.h" -#include "google/cloud/bigtable/testing/mock_policies.h" -#include "google/cloud/bigtable/testing/table_test_fixture.h" -#include "google/cloud/future.h" -#include "google/cloud/internal/api_client_header.h" -#include "google/cloud/testing_util/chrono_literals.h" -#include "google/cloud/testing_util/fake_completion_queue_impl.h" -#include "google/cloud/testing_util/status_matchers.h" -#include "google/cloud/testing_util/validate_metadata.h" -#include -#include -#include - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -namespace btproto = ::google::bigtable::v2; - -using ::google::cloud::bigtable::testing::MockBackoffPolicy; -using ::google::cloud::bigtable::testing::MockClientAsyncReaderInterface; -using ::google::cloud::testing_util::chrono_literals::operator""_ms; -using ::google::cloud::testing_util::FakeCompletionQueueImpl; -using ::google::cloud::testing_util::StatusIs; - -class AsyncBulkApplyTest : public bigtable::testing::TableTestFixture { - protected: - AsyncBulkApplyTest() - : TableTestFixture( - CompletionQueue(std::make_shared())), - rpc_retry_policy_( - bigtable::DefaultRPCRetryPolicy(internal::kBigtableLimits)), - rpc_backoff_policy_(bigtable::DefaultRPCBackoffPolicy( - internal::kBigtableTableAdminLimits)), - idempotent_mutation_policy_( - bigtable::DefaultIdempotentMutationPolicy()), - metadata_update_policy_("my_table", MetadataParamTypes::NAME) {} - - void SimulateIteration() { - cq_impl_->SimulateCompletion(true); - // state == PROCESSING - cq_impl_->SimulateCompletion(true); - // state == PROCESSING, 1 read - cq_impl_->SimulateCompletion(false); - // state == FINISHING - cq_impl_->SimulateCompletion(true); - } - - std::shared_ptr rpc_retry_policy_; - std::shared_ptr rpc_backoff_policy_; - std::shared_ptr idempotent_mutation_policy_; - MetadataUpdatePolicy metadata_update_policy_; -}; - -std::vector StatusOnly(std::vector const& failures) { - std::vector v; - std::transform(failures.begin(), failures.end(), std::back_inserter(v), - [](FailedMutation const& f) { return f.status(); }); - return v; -} - -TEST_F(AsyncBulkApplyTest, NoMutations) { - bigtable::BulkMutation mut; - - auto bulk_apply_future = internal::AsyncRetryBulkApply::Create( - cq_, rpc_retry_policy_->clone(), rpc_backoff_policy_->clone(), - *idempotent_mutation_policy_, metadata_update_policy_, client_, - "my-app-profile", "my-table", std::move(mut)); - - ASSERT_EQ(0U, bulk_apply_future.get().size()); -} - -TEST_F(AsyncBulkApplyTest, Success) { - bigtable::BulkMutation mut{ - bigtable::SingleRowMutation("foo2", - {bigtable::SetCell("f", "c", 0_ms, "v2")}), - bigtable::SingleRowMutation("foo3", - {bigtable::SetCell("f", "c", 0_ms, "v3")}), - }; - - auto* reader = - new MockClientAsyncReaderInterface; - EXPECT_CALL(*reader, Read) - .WillOnce([](btproto::MutateRowsResponse* r, void*) { - auto& r1 = *r->add_entries(); - r1.set_index(0); - r1.mutable_status()->set_code(grpc::StatusCode::OK); - - auto& r2 = *r->add_entries(); - r2.set_index(1); - r2.mutable_status()->set_code(grpc::StatusCode::OK); - }) - .WillOnce([](btproto::MutateRowsResponse*, void*) {}); - - EXPECT_CALL(*reader, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status::OK; - }); - - EXPECT_CALL(*reader, StartCall).Times(1); - - EXPECT_CALL(*client_, PrepareAsyncMutateRows) - .WillOnce([reader](grpc::ClientContext*, - btproto::MutateRowsRequest const&, - grpc::CompletionQueue*) { - return std::unique_ptr< - MockClientAsyncReaderInterface>( - reader); - }) - .RetiresOnSaturation(); - - auto bulk_apply_future = internal::AsyncRetryBulkApply::Create( - cq_, rpc_retry_policy_->clone(), rpc_backoff_policy_->clone(), - *idempotent_mutation_policy_, metadata_update_policy_, client_, - "my-app-profile", "my-table", std::move(mut)); - - bulk_apply_future.then( - [](future> f) { f.get(); }); - - ASSERT_EQ(1U, cq_impl_->size()); - - SimulateIteration(); - - ASSERT_EQ(0U, cq_impl_->size()); -} - -TEST_F(AsyncBulkApplyTest, PartialSuccessRetry) { - bigtable::BulkMutation mut{ - bigtable::SingleRowMutation("foo2", - {bigtable::SetCell("f", "c", 0_ms, "v2")}), - bigtable::SingleRowMutation("foo3", - {bigtable::SetCell("f", "c", 0_ms, "v3")}), - }; - - auto* reader0 = - new MockClientAsyncReaderInterface; - auto* reader1 = - new MockClientAsyncReaderInterface; - - EXPECT_CALL(*reader0, Read) - .WillOnce([](btproto::MutateRowsResponse* r, void*) { - auto& r1 = *r->add_entries(); - r1.set_index(0); - r1.mutable_status()->set_code(grpc::StatusCode::OK); - }) - .WillOnce([](btproto::MutateRowsResponse*, void*) {}); - - EXPECT_CALL(*reader1, Read) - .WillOnce([](btproto::MutateRowsResponse* r, void*) { - auto& r1 = *r->add_entries(); - r1.set_index(0); - r1.mutable_status()->set_code(grpc::StatusCode::OK); - }) - .WillOnce([](btproto::MutateRowsResponse*, void*) {}); - - EXPECT_CALL(*reader0, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status::OK; - }); - - EXPECT_CALL(*reader1, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status::OK; - }); - - EXPECT_CALL(*reader0, StartCall).Times(1); - EXPECT_CALL(*reader1, StartCall).Times(1); - - EXPECT_CALL(*client_, PrepareAsyncMutateRows) - .WillOnce([reader0](grpc::ClientContext*, - btproto::MutateRowsRequest const&, - grpc::CompletionQueue*) { - return std::unique_ptr< - MockClientAsyncReaderInterface>( - reader0); - }) - .WillOnce([reader1](grpc::ClientContext*, - btproto::MutateRowsRequest const&, - grpc::CompletionQueue*) { - return std::unique_ptr< - MockClientAsyncReaderInterface>( - reader1); - }); - - auto bulk_apply_future = internal::AsyncRetryBulkApply::Create( - cq_, rpc_retry_policy_->clone(), rpc_backoff_policy_->clone(), - *idempotent_mutation_policy_, metadata_update_policy_, client_, - "my-app-profile", "my-table", std::move(mut)); - - SimulateIteration(); - // simulate the backoff timer - cq_impl_->SimulateCompletion(true); - - ASSERT_EQ(1U, cq_impl_->size()); - - SimulateIteration(); - - bulk_apply_future.get(); - - ASSERT_EQ(0U, cq_impl_->size()); - EXPECT_TRUE(cq_impl_->empty()); -} - -TEST_F(AsyncBulkApplyTest, DefaultFailureRetry) { - bigtable::BulkMutation mut{ - bigtable::SingleRowMutation("foo2", - {bigtable::SetCell("f", "c", 0_ms, "v2")}), - bigtable::SingleRowMutation("foo3", - {bigtable::SetCell("f", "c", 0_ms, "v3")}), - }; - - auto* reader0 = - new MockClientAsyncReaderInterface; - auto* reader1 = - new MockClientAsyncReaderInterface; - - EXPECT_CALL(*reader0, Read) - .WillOnce([](btproto::MutateRowsResponse* r, void*) { - auto& r1 = *r->add_entries(); - r1.set_index(0); - r1.mutable_status()->set_code(grpc::StatusCode::OK); - }) - .WillOnce([](btproto::MutateRowsResponse*, void*) {}); - - EXPECT_CALL(*reader1, Read) - .WillOnce([](btproto::MutateRowsResponse* r, void*) { - auto& r1 = *r->add_entries(); - r1.set_index(0); - r1.mutable_status()->set_code(grpc::StatusCode::OK); - - auto& r2 = *r->add_entries(); - r2.set_index(1); - r2.mutable_status()->set_code(grpc::StatusCode::OK); - }) - .WillOnce([](btproto::MutateRowsResponse*, void*) {}); - - EXPECT_CALL(*reader0, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status(grpc::StatusCode::UNAVAILABLE, ""); - }); - - EXPECT_CALL(*reader1, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status::OK; - }); - - EXPECT_CALL(*reader0, StartCall).Times(1); - EXPECT_CALL(*reader1, StartCall).Times(1); - - EXPECT_CALL(*client_, PrepareAsyncMutateRows) - .WillOnce([reader0](grpc::ClientContext*, - btproto::MutateRowsRequest const&, - grpc::CompletionQueue*) { - return std::unique_ptr< - MockClientAsyncReaderInterface>( - reader0); - }) - .WillOnce([reader1](grpc::ClientContext*, - btproto::MutateRowsRequest const&, - grpc::CompletionQueue*) { - return std::unique_ptr< - MockClientAsyncReaderInterface>( - reader1); - }); - - auto bulk_apply_future = internal::AsyncRetryBulkApply::Create( - cq_, rpc_retry_policy_->clone(), rpc_backoff_policy_->clone(), - *idempotent_mutation_policy_, metadata_update_policy_, client_, - "my-app-profile", "my-table", std::move(mut)); - - SimulateIteration(); - // simulate the backoff timer - cq_impl_->SimulateCompletion(true); - - ASSERT_EQ(1U, cq_impl_->size()); - - SimulateIteration(); - - bulk_apply_future.get(); - - ASSERT_EQ(0U, cq_impl_->size()); - - EXPECT_TRUE(cq_impl_->empty()); -} - -TEST_F(AsyncBulkApplyTest, TooManyFailures) { - bigtable::BulkMutation mut{ - bigtable::SingleRowMutation("foo2", - {bigtable::SetCell("f", "c", 0_ms, "v2")}), - bigtable::SingleRowMutation("foo3", - {bigtable::SetCell("f", "c", 0_ms, "v3")}), - }; - - // We give up on the 3rd error. - auto constexpr kErrorCount = 2; - - EXPECT_CALL(*client_, PrepareAsyncMutateRows) - .Times(kErrorCount + 1) - .WillRepeatedly([](grpc::ClientContext*, - btproto::MutateRowsRequest const&, - grpc::CompletionQueue*) { - auto reader = std::make_unique< - MockClientAsyncReaderInterface>(); - EXPECT_CALL(*reader, Read).Times(2); - EXPECT_CALL(*reader, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status(grpc::StatusCode::UNAVAILABLE, "try again"); - }); - EXPECT_CALL(*reader, StartCall); - return reader; - }); - - auto limited_retry_policy = LimitedErrorCountRetryPolicy(kErrorCount); - auto bulk_apply_future = internal::AsyncRetryBulkApply::Create( - cq_, limited_retry_policy.clone(), rpc_backoff_policy_->clone(), - *idempotent_mutation_policy_, metadata_update_policy_, client_, - "my-app-profile", "my-table", std::move(mut)); - - for (int retry = 0; retry < kErrorCount; ++retry) { - SimulateIteration(); - // simulate the backoff timer - cq_impl_->SimulateCompletion(true); - ASSERT_EQ(1U, cq_impl_->size()); - } - - SimulateIteration(); - - auto failures = StatusOnly(bulk_apply_future.get()); - EXPECT_THAT(failures, ElementsAre(StatusIs(StatusCode::kUnavailable), - StatusIs(StatusCode::kUnavailable))); - - ASSERT_EQ(0U, cq_impl_->size()); - EXPECT_TRUE(cq_impl_->empty()); -} - -TEST_F(AsyncBulkApplyTest, RetryPolicyUsedForOkStreamsWithFailedMutations) { - bigtable::BulkMutation mut{bigtable::SingleRowMutation( - "row", {bigtable::SetCell("f", "c", 0_ms, "v2")})}; - - // We give up on the 3rd error. - auto constexpr kErrorCount = 2; - - EXPECT_CALL(*client_, PrepareAsyncMutateRows) - .Times(kErrorCount + 1) - .WillRepeatedly([](grpc::ClientContext*, - btproto::MutateRowsRequest const&, - grpc::CompletionQueue*) { - auto reader = std::make_unique< - MockClientAsyncReaderInterface>(); - EXPECT_CALL(*reader, Read) - .WillOnce([](btproto::MutateRowsResponse* r, void*) { - auto& r1 = *r->add_entries(); - r1.set_index(0); - r1.mutable_status()->set_code(grpc::StatusCode::UNAVAILABLE); - }) - .WillOnce([](btproto::MutateRowsResponse*, void*) {}); - EXPECT_CALL(*reader, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status::OK; - }); - EXPECT_CALL(*reader, StartCall); - return reader; - }); - - auto limited_retry_policy = LimitedErrorCountRetryPolicy(kErrorCount); - auto bulk_apply_future = internal::AsyncRetryBulkApply::Create( - cq_, limited_retry_policy.clone(), rpc_backoff_policy_->clone(), - *idempotent_mutation_policy_, metadata_update_policy_, client_, - "my-app-profile", "my-table", std::move(mut)); - - for (int retry = 0; retry != kErrorCount; ++retry) { - SimulateIteration(); - // simulate the backoff timer - cq_impl_->SimulateCompletion(true); - ASSERT_EQ(1U, cq_impl_->size()); - } - - SimulateIteration(); - - auto failures = StatusOnly(bulk_apply_future.get()); - EXPECT_THAT(failures, ElementsAre(StatusIs(StatusCode::kUnavailable))); - - ASSERT_EQ(0U, cq_impl_->size()); - EXPECT_TRUE(cq_impl_->empty()); -} - -TEST_F(AsyncBulkApplyTest, UsesBackoffPolicy) { - bigtable::BulkMutation mut{ - bigtable::SingleRowMutation("foo2", - {bigtable::SetCell("f", "c", 0_ms, "v2")}), - bigtable::SingleRowMutation("foo3", - {bigtable::SetCell("f", "c", 0_ms, "v3")}), - }; - - auto grpc_error = grpc::Status(grpc::StatusCode::UNAVAILABLE, "try again"); - auto error = MakeStatusFromRpcError(grpc_error); - - std::unique_ptr mock(new MockBackoffPolicy); - EXPECT_CALL(*mock, Setup).Times(2); - EXPECT_CALL(*mock, OnCompletion(error)).WillOnce([](Status const&) { - return 10_ms; - }); - - EXPECT_CALL(*client_, PrepareAsyncMutateRows) - .WillOnce([grpc_error](grpc::ClientContext*, - btproto::MutateRowsRequest const&, - grpc::CompletionQueue*) { - auto reader = std::make_unique< - MockClientAsyncReaderInterface>(); - EXPECT_CALL(*reader, Read).Times(2); - EXPECT_CALL(*reader, Finish) - .WillOnce([grpc_error](grpc::Status* status, void*) { - *status = grpc_error; - }); - EXPECT_CALL(*reader, StartCall); - return reader; - }) - .WillOnce([](grpc::ClientContext*, btproto::MutateRowsRequest const&, - grpc::CompletionQueue*) { - auto reader = std::make_unique< - MockClientAsyncReaderInterface>(); - EXPECT_CALL(*reader, Read) - .WillOnce([](btproto::MutateRowsResponse* r, void*) { - auto& r1 = *r->add_entries(); - r1.set_index(0); - r1.mutable_status()->set_code(grpc::StatusCode::OK); - - auto& r2 = *r->add_entries(); - r2.set_index(1); - r2.mutable_status()->set_code(grpc::StatusCode::OK); - }) - .WillOnce([](btproto::MutateRowsResponse*, void*) {}); - EXPECT_CALL(*reader, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status::OK; - }); - EXPECT_CALL(*reader, StartCall); - return reader; - }); - - auto bulk_apply_future = internal::AsyncRetryBulkApply::Create( - cq_, rpc_retry_policy_->clone(), std::move(mock), - *idempotent_mutation_policy_, metadata_update_policy_, client_, - "my-app-profile", "my-table", std::move(mut)); - - SimulateIteration(); - // simulate the backoff timer - cq_impl_->SimulateCompletion(true); - - ASSERT_EQ(1U, cq_impl_->size()); - - SimulateIteration(); - - ASSERT_EQ(0U, cq_impl_->size()); -} - -TEST_F(AsyncBulkApplyTest, CancelDuringBackoff) { - bigtable::BulkMutation mut{ - bigtable::SingleRowMutation("foo2", - {bigtable::SetCell("f", "c", 0_ms, "v2")}), - bigtable::SingleRowMutation("foo3", - {bigtable::SetCell("f", "c", 0_ms, "v3")}), - }; - - auto grpc_error = grpc::Status(grpc::StatusCode::UNAVAILABLE, "try again"); - auto error = MakeStatusFromRpcError(grpc_error); - - std::unique_ptr mock(new MockBackoffPolicy); - EXPECT_CALL(*mock, Setup); - EXPECT_CALL(*mock, OnCompletion(error)).WillOnce([](Status const&) { - return 10_ms; - }); - - EXPECT_CALL(*client_, PrepareAsyncMutateRows) - .WillOnce([grpc_error](grpc::ClientContext*, - btproto::MutateRowsRequest const&, - grpc::CompletionQueue*) { - auto reader = std::make_unique< - MockClientAsyncReaderInterface>(); - EXPECT_CALL(*reader, Read).Times(2); - EXPECT_CALL(*reader, Finish) - .WillOnce([grpc_error](grpc::Status* status, void*) { - *status = grpc_error; - }); - EXPECT_CALL(*reader, StartCall); - return reader; - }); - - auto bulk_apply_future = internal::AsyncRetryBulkApply::Create( - cq_, rpc_retry_policy_->clone(), std::move(mock), - *idempotent_mutation_policy_, metadata_update_policy_, client_, - "my-app-profile", "my-table", std::move(mut)); - - SimulateIteration(); - ASSERT_EQ(1U, cq_impl_->size()); - - // cancel the pending operation. - bulk_apply_future.cancel(); - // simulate the backoff timer expiring. - cq_impl_->SimulateCompletion(false); - - ASSERT_EQ(0U, cq_impl_->size()); - - auto failures = StatusOnly(bulk_apply_future.get()); - EXPECT_THAT(failures, ElementsAre(StatusIs(StatusCode::kUnavailable), - StatusIs(StatusCode::kUnavailable))); -} - -} // namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/internal/legacy_async_row_reader.cc b/google/cloud/bigtable/internal/legacy_async_row_reader.cc deleted file mode 100644 index 80ce9973850d0..0000000000000 --- a/google/cloud/bigtable/internal/legacy_async_row_reader.cc +++ /dev/null @@ -1,281 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/internal/legacy_async_row_reader.h" -#include "google/cloud/bigtable/version.h" -#include "google/cloud/log.h" - -namespace google { -namespace cloud { -namespace bigtable_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -void LegacyAsyncRowReader::MakeRequest() { - status_ = Status(); - google::bigtable::v2::ReadRowsRequest request; - - request.set_app_profile_id(app_profile_id_); - request.set_table_name(table_name_); - auto row_set_proto = row_set_.as_proto(); - request.mutable_rows()->Swap(&row_set_proto); - - auto filter_proto = filter_.as_proto(); - request.mutable_filter()->Swap(&filter_proto); - - if (rows_limit_ != NO_ROWS_LIMIT) { - request.set_rows_limit(rows_limit_ - rows_count_); - } - parser_ = parser_factory_->Create(false); - - auto context = std::make_unique(); - rpc_retry_policy_->Setup(*context); - rpc_backoff_policy_->Setup(*context); - metadata_update_policy_.Setup(*context); - - auto& client = client_; - auto self = this->shared_from_this(); - cq_.MakeStreamingReadRpc( - [client](grpc::ClientContext* context, - google::bigtable::v2::ReadRowsRequest const& request, - grpc::CompletionQueue* cq) { - return client->PrepareAsyncReadRows(context, request, cq); - }, - request, std::move(context), - [self](google::bigtable::v2::ReadRowsResponse r) { - return self->OnDataReceived(std::move(r)); - }, - [self](Status s) { self->OnStreamFinished(std::move(s)); }); -} - -void LegacyAsyncRowReader::TryGiveRowToUser() { - // The user is likely to ask for more rows immediately after receiving a - // row, which means that this function will be called recursively. The depth - // of the recursion can be as deep as the size of ready_rows_, which might - // be significant and potentially lead to stack overflow. The way to - // overcome this is to always switch thread to a CompletionQueue thread. - // Switching thread for every row has a non-trivial cost, though. To find a - // good balance, we allow for recursion no deeper than 100 and achieve it by - // tracking the level in `recursion_level_`. - // - // The magic value 100 is arbitrary, but back-of-the-envelope calculation - // indicates it should cap this stack usage to below 100K. Default stack - // size is usually 1MB. - struct CountFrames { - explicit CountFrames(int& cntr) : cntr(++cntr) {} - ~CountFrames() { --cntr; } - int& cntr; - } counter(recursion_level_); - - if (ready_rows_.empty()) { - if (whole_op_finished_) { - // The scan is finished for good, there will be no more rows. - on_finish_(status_); - return; - } - if (!continue_reading_) { - GCP_LOG(FATAL) - << "No rows are ready and we can't continue reading. This is a bug, " - "please report it at " - "https://github.com/googleapis/google-cloud-cpp/issues/new"; - } - // No rows, but we can fetch some. - auto continue_reading = std::move(continue_reading_); - continue_reading_.reset(); - continue_reading->set_value(true); - return; - } - - // Yay! We have something to give to the user and they want it. - auto row = std::move(ready_rows_.front()); - ready_rows_.pop(); - - auto self = this->shared_from_this(); - bool const break_recursion = recursion_level_ >= 100; - on_row_(std::move(row)).then([self, break_recursion](future fut) { - bool should_cancel; -#if GOOGLE_CLOUD_CPP_HAVE_EXCEPTIONS - try { - should_cancel = !fut.get(); - } catch (std::exception& ex) { - self->Cancel( - std::string("future<> returned from the user callback threw an " - "exception: ") + - ex.what()); - return; - } catch (...) { - self->Cancel( - "future<> returned from the user callback threw an unknown " - "exception"); - return; - } -#else // GOOGLE_CLOUD_CPP_HAVE_EXCEPTIONS - should_cancel = !fut.get(); -#endif // GOOGLE_CLOUD_CPP_HAVE_EXCEPTIONS - if (should_cancel) { - self->Cancel("User cancelled"); - return; - } - if (break_recursion) { - self->cq_.RunAsync([self] { self->UserWantsRows(); }); - return; - } - self->UserWantsRows(); - }); -} - -future LegacyAsyncRowReader::OnDataReceived( - google::bigtable::v2::ReadRowsResponse response) { - // assert(!whole_op_finished_); - // assert(!continue_reading_); - // assert(status_.ok()); - status_ = ConsumeResponse(std::move(response)); - // We've processed the response. - // - // If there were errors (e.g. malformed response from the server), we should - // interrupt this stream. Interrupting it will yield lower layers calling - // `OnStreamFinished` with a status unrelated to the real reason, so we - // store the actual reason in status_ and proceed exactly the - // same way as if the stream was broken for other reasons. - // - // Even if status_ is not OK, we might have consumed some rows, - // but, don't give them to the user yet. We want to keep the invariant that - // either the user doesn't hold a `future<>` when we're fetching more rows. - // Retries (successful or not) will do it. Improving this behavior makes - // little sense because parser errors are very unexpected and probably not - // retryable anyway. - - if (status_.ok()) { - continue_reading_.emplace(promise()); - auto res = continue_reading_->get_future(); - TryGiveRowToUser(); - return res; - } - return make_ready_future(false); -} - -void LegacyAsyncRowReader::OnStreamFinished(Status status) { - // assert(!continue_reading_); - if (status_.ok()) { - status_ = std::move(status); - } - grpc::Status parser_status; - parser_->HandleEndOfStream(parser_status); - if (!parser_status.ok() && status_.ok()) { - // If there stream finished with an error ignore what the parser says. - status_ = MakeStatusFromRpcError(parser_status); - } - - // In the unlikely case when we have already reached the requested - // number of rows and still receive an error (the parser can throw - // an error at end of stream for example), there is no need to - // retry and we have no good value for rows_limit anyway. - if (rows_limit_ != NO_ROWS_LIMIT && rows_limit_ <= rows_count_) { - status_ = Status(); - } - - if (!last_read_row_key_.empty()) { - // We've returned some rows and need to make sure we don't - // request them again. - row_set_ = - row_set_.Intersect(bigtable::RowRange::Open(last_read_row_key_, "")); - } - - // If we receive an error, but the retryable set is empty, consider it a - // success. - if (row_set_.IsEmpty()) { - status_ = Status(); - } - - if (status_.ok()) { - // We've successfully finished the scan. - whole_op_finished_ = true; - TryGiveRowToUser(); - return; - } - - if (!rpc_retry_policy_->OnFailure(status_)) { - // Can't retry. - whole_op_finished_ = true; - TryGiveRowToUser(); - return; - } - auto self = this->shared_from_this(); - cq_.MakeRelativeTimer(rpc_backoff_policy_->OnCompletion(status_)) - .then( - [self]( - future> result) { - if (auto tp = result.get()) { - self->MakeRequest(); - } else { - self->whole_op_finished_ = true; - self->TryGiveRowToUser(); - } - }); -} - -void LegacyAsyncRowReader::Cancel(std::string const& reason) { - ready_rows_ = std::queue(); - auto continue_reading = std::move(continue_reading_); - continue_reading_.reset(); - Status status(StatusCode::kCancelled, reason); - if (!continue_reading) { - // If we're not in the middle of the stream fire some user callbacks, but - // also override the overall status. - // assert(whole_op_finished_); - status_ = std::move(status); - TryGiveRowToUser(); - return; - } - // If we are in the middle of the stream, cancel the stream. - status_ = std::move(status); - continue_reading->set_value(false); -} - -Status LegacyAsyncRowReader::DrainParser() { - grpc::Status status; - while (parser_->HasNext()) { - bigtable::Row parsed_row = parser_->Next(status); - if (!status.ok()) { - return MakeStatusFromRpcError(status); - } - ++rows_count_; - last_read_row_key_ = parsed_row.row_key(); - ready_rows_.emplace(std::move(parsed_row)); - } - return Status(); -} - -Status LegacyAsyncRowReader::ConsumeResponse( - google::bigtable::v2::ReadRowsResponse response) { - for (auto& chunk : *response.mutable_chunks()) { - grpc::Status status; - parser_->HandleChunk(std::move(chunk), status); - if (!status.ok()) { - return MakeStatusFromRpcError(status); - } - Status parser_status = DrainParser(); - if (!parser_status.ok()) { - return parser_status; - } - } - if (!response.last_scanned_row_key().empty()) { - last_read_row_key_ = std::move(*response.mutable_last_scanned_row_key()); - } - return Status(); -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable_internal -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/internal/legacy_async_row_reader.h b/google/cloud/bigtable/internal/legacy_async_row_reader.h deleted file mode 100644 index 0202f2ea1348d..0000000000000 --- a/google/cloud/bigtable/internal/legacy_async_row_reader.h +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_LEGACY_ASYNC_ROW_READER_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_LEGACY_ASYNC_ROW_READER_H - -#include "google/cloud/bigtable/completion_queue.h" -#include "google/cloud/bigtable/data_client.h" -#include "google/cloud/bigtable/filters.h" -#include "google/cloud/bigtable/internal/readrowsparser.h" -#include "google/cloud/bigtable/metadata_update_policy.h" -#include "google/cloud/bigtable/row.h" -#include "google/cloud/bigtable/row_set.h" -#include "google/cloud/bigtable/rpc_backoff_policy.h" -#include "google/cloud/bigtable/rpc_retry_policy.h" -#include "google/cloud/bigtable/version.h" -#include "google/cloud/future.h" -#include "google/cloud/grpc_error_delegate.h" -#include "google/cloud/optional.h" -#include "google/cloud/status_or.h" -#include "absl/types/optional.h" -#include -#include -#include - -namespace google { -namespace cloud { -namespace bigtable_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/** - * Objects of this class represent the state of reading rows via AsyncReadRows. - */ -class LegacyAsyncRowReader - : public std::enable_shared_from_this { - using RowFunctor = std::function(bigtable::Row)>; - using FinishFunctor = std::function; - - public: - /// Special value to be used as rows_limit indicating no limit. - // NOLINTNEXTLINE(readability-identifier-naming) - static std::int64_t constexpr NO_ROWS_LIMIT = 0; - // Callbacks keep pointers to these objects. - LegacyAsyncRowReader(LegacyAsyncRowReader&&) = delete; - LegacyAsyncRowReader(LegacyAsyncRowReader const&) = delete; - - static std::shared_ptr Create( - CompletionQueue cq, std::shared_ptr client, - std::string app_profile_id, std::string table_name, RowFunctor on_row, - FinishFunctor on_finish, bigtable::RowSet row_set, - std::int64_t rows_limit, bigtable::Filter filter, - std::unique_ptr rpc_retry_policy, - std::unique_ptr rpc_backoff_policy, - bigtable::MetadataUpdatePolicy metadata_update_policy, - std::unique_ptr - parser_factory) { - std::shared_ptr res(new LegacyAsyncRowReader( - std::move(cq), std::move(client), std::move(app_profile_id), - std::move(table_name), std::move(on_row), std::move(on_finish), - std::move(row_set), rows_limit, std::move(filter), - std::move(rpc_retry_policy), std::move(rpc_backoff_policy), - std::move(metadata_update_policy), std::move(parser_factory))); - res->MakeRequest(); - return res; - } - - private: - LegacyAsyncRowReader( - CompletionQueue cq, std::shared_ptr client, - std::string app_profile_id, std::string table_name, RowFunctor on_row, - FinishFunctor on_finish, bigtable::RowSet row_set, - std::int64_t rows_limit, bigtable::Filter filter, - std::unique_ptr rpc_retry_policy, - std::unique_ptr rpc_backoff_policy, - bigtable::MetadataUpdatePolicy metadata_update_policy, - std::unique_ptr parser_factory) - : cq_(std::move(cq)), - client_(std::move(client)), - app_profile_id_(std::move(app_profile_id)), - table_name_(std::move(table_name)), - on_row_(std::move(on_row)), - on_finish_(std::move(on_finish)), - row_set_(std::move(row_set)), - rows_limit_(rows_limit), - filter_(std::move(filter)), - rpc_retry_policy_(std::move(rpc_retry_policy)), - rpc_backoff_policy_(std::move(rpc_backoff_policy)), - metadata_update_policy_(std::move(metadata_update_policy)), - parser_factory_(std::move(parser_factory)) {} - - void MakeRequest(); - - /** - * Called when the user asks for more rows via satisfying the future returned - * from the row callback. - */ - void UserWantsRows() { TryGiveRowToUser(); } - - /** - * Attempt to call a user callback. - * - * If no rows are ready, this will not call the callback immediately and - * instead ask lower layers for more data. - */ - void TryGiveRowToUser(); - - /// Called when lower layers provide us with a response chunk. - future OnDataReceived(google::bigtable::v2::ReadRowsResponse response); - - /// Called when the whole stream finishes. - void OnStreamFinished(Status status); - - /// User satisfied the future returned from the row callback with false. - void Cancel(std::string const& reason); - - /// Process everything that is accumulated in the parser. - Status DrainParser(); - - /// Parse the data from the response. - Status ConsumeResponse(google::bigtable::v2::ReadRowsResponse response); - - std::mutex mu_; - CompletionQueue cq_; - std::shared_ptr client_; - std::string app_profile_id_; - std::string table_name_; - RowFunctor on_row_; - FinishFunctor on_finish_; - bigtable::RowSet row_set_; - std::int64_t rows_limit_; - bigtable::Filter filter_; - std::unique_ptr rpc_retry_policy_; - std::unique_ptr rpc_backoff_policy_; - bigtable::MetadataUpdatePolicy metadata_update_policy_; - std::unique_ptr parser_factory_; - std::unique_ptr parser_; - /// Number of rows read so far, used to set row_limit in retries. - std::int64_t rows_count_ = 0; - /// Holds the last read row key, for retries. - bigtable::RowKeyType last_read_row_key_; - /// The queue of rows which we already received but no one has asked for them. - std::queue ready_rows_; - /** - * The promise to the underlying stream to either continue reading or cancel. - * - * If the `absl::optional` is empty, it means that either the whole scan is - * finished or the underlying layers are already trying to fetch more data. - * - * If the `absl::optional` is not empty, the lower layers are waiting for this - * to be satisfied before they start fetching more data. - */ - absl::optional> continue_reading_; - /// The final status of the operation. - bool whole_op_finished_ = false; - /** - * The status of the last retry attempt_. - * - * It is reset to OK at the beginning of every retry. If an error is - * encountered (be it while parsing the response or on stream finish), it is - * stored here (unless a different error had already been stored). - */ - Status status_; - /// Tracks the level of recursion of TryGiveRowToUser - int recursion_level_ = 0; -}; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable_internal -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_LEGACY_ASYNC_ROW_READER_H diff --git a/google/cloud/bigtable/internal/legacy_async_row_reader_test.cc b/google/cloud/bigtable/internal/legacy_async_row_reader_test.cc deleted file mode 100644 index 83eef314300b0..0000000000000 --- a/google/cloud/bigtable/internal/legacy_async_row_reader_test.cc +++ /dev/null @@ -1,1159 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/table.h" -#include "google/cloud/bigtable/testing/mock_data_client.h" -#include "google/cloud/bigtable/testing/mock_read_rows_reader.h" -#include "google/cloud/bigtable/testing/mock_response_reader.h" -#include "google/cloud/bigtable/testing/table_test_fixture.h" -#include "google/cloud/internal/api_client_header.h" -#include "google/cloud/testing_util/chrono_literals.h" -#include "google/cloud/testing_util/fake_completion_queue_impl.h" -#include "google/cloud/testing_util/status_matchers.h" -#include "google/cloud/testing_util/validate_metadata.h" -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -namespace btproto = ::google::bigtable::v2; - -using ::google::cloud::bigtable::testing::MockClientAsyncReaderInterface; -using ::google::cloud::testing_util::ValidateMetadataFixture; -using ::google::cloud::testing_util::chrono_literals::operator""_ms; -using ::google::cloud::testing_util::FakeCompletionQueueImpl; -using ::testing::HasSubstr; -using ::testing::Values; -using ::testing::WithParamInterface; - -template -bool Unsatisfied(future const& fut) { - return std::future_status::timeout == fut.wait_for(1_ms); -} - -class TableAsyncReadRowsTest : public bigtable::testing::TableTestFixture { - protected: - TableAsyncReadRowsTest() - : TableTestFixture( - CompletionQueue(std::make_shared())), - stream_status_future_(stream_status_promise_.get_future()) {} - - MockClientAsyncReaderInterface& AddReader( - std::function request_expectations, - bool expect_a_read = true) { - readers_.emplace_back( - new MockClientAsyncReaderInterface); - reader_started_.push_back(false); - size_t idx = reader_started_.size() - 1; - auto& reader = LastReader(); - // We can't move request_expectations into the lambda because of lack of - // generalized lambda capture in C++11, so let's pass it by pointer. - auto request_expectations_ptr = - std::make_shared( - std::move(request_expectations)); - - EXPECT_CALL(*client_, PrepareAsyncReadRows) - .WillOnce([this, &reader, request_expectations_ptr]( - grpc::ClientContext* context, - btproto::ReadRowsRequest const& r, - grpc::CompletionQueue*) { - validate_metadata_fixture_.IsContextMDValid( - *context, "google.bigtable.v2.Bigtable.ReadRows", r, - google::cloud::internal::HandCraftedLibClientHeader()); - (*request_expectations_ptr)(r); - return std::unique_ptr< - MockClientAsyncReaderInterface>( - &reader); - }) - .RetiresOnSaturation(); - - EXPECT_CALL(reader, StartCall).WillOnce([idx, this](void*) { - reader_started_[idx] = true; - }); - if (expect_a_read) { - // The last call, to which we'll return ok==false. - EXPECT_CALL(reader, Read).WillOnce([](btproto::ReadRowsResponse*, void*) { - }); - } - return reader; - } - - MockClientAsyncReaderInterface& LastReader() { - return *readers_.back(); - } - - // Start Table::AsyncReadRows. - void ReadRows(int row_limit = RowReader::NO_ROWS_LIMIT) { - table_.AsyncReadRows( - [this](Row const& row) { - EXPECT_EQ(expected_rows_.front(), row.row_key()); - expected_rows_.pop(); - row_promises_.front().set_value(row.row_key()); - row_promises_.pop(); - auto ret = std::move(futures_from_user_cb_.front()); - futures_from_user_cb_.pop(); - return ret; - }, - [this](Status const& stream_status) { - stream_status_promise_.set_value(stream_status); - }, - RowSet(), row_limit, Filter::PassAllFilter()); - } - - /// Expect a row whose row key is equal to this function's argument. - template - void ExpectRow(T const& row) { - row_promises_.emplace(); - row_futures_.emplace_back(row_promises_.back().get_future()); - promises_from_user_cb_.emplace_back(); - futures_from_user_cb_.emplace(promises_from_user_cb_.back().get_future()); - expected_rows_.push(RowKeyType(row)); - } - - /// A wrapper around ExpectRow to expect many rows. - template - void ExpectRows(std::initializer_list const& rows) { - for (auto const& row : rows) { - ExpectRow(row); - } - } - - std::vector*> - readers_; - // Whether `Start()` was called on i-th retry attempt. - std::vector reader_started_; - std::queue> row_promises_; - /** - * Future at idx i corresponse to i-th expected row. It will be satisfied - * when the relevant `on_row` callback of AsyncReadRows is called. - */ - std::vector> row_futures_; - std::queue expected_rows_; - promise stream_status_promise_; - /// Future which will be satisfied with the status passed in on_finished. - future stream_status_future_; - /// I-th promise corresponds to the future returned from the ith on_row cb. - std::vector> promises_from_user_cb_; - std::queue> futures_from_user_cb_; - ValidateMetadataFixture validate_metadata_fixture_; -}; - -/// @test Verify that successfully reading a single row works. -TEST_F(TableAsyncReadRowsTest, SingleRow) { - auto& stream = AddReader([](btproto::ReadRowsRequest const&) {}); - - EXPECT_CALL(stream, Read) - .WillOnce([](btproto::ReadRowsResponse* r, void*) { - *r = bigtable::testing::ReadRowsResponseFromString( - R"( - chunks { - row_key: "r1" - family_name { value: "fam" } - qualifier { value: "col" } - timestamp_micros: 42000 - value: "value" - commit_row: true - })"); - }) - .RetiresOnSaturation(); - EXPECT_CALL(stream, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status::OK; - }); - - ExpectRow("r1"); - ReadRows(); - - EXPECT_TRUE(reader_started_[0]); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Finish Start() - - EXPECT_TRUE(Unsatisfied(row_futures_[0])); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Return data - auto row = row_futures_[0].get(); - - // Check that we're not asking for data unless someone is waiting for it. - ASSERT_EQ(0U, cq_impl_->size()); - promises_from_user_cb_[0].set_value(true); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(false); // Finish stream - ASSERT_EQ(1U, cq_impl_->size()); - EXPECT_TRUE(Unsatisfied(stream_status_future_)); - cq_impl_->SimulateCompletion(true); // Finish Finish() - - auto stream_status = stream_status_future_.get(); - ASSERT_STATUS_OK(stream_status); - ASSERT_EQ(0U, cq_impl_->size()); -} - -/// @test Like SingleRow, but the future returned from the cb is satisfied. -TEST_F(TableAsyncReadRowsTest, SingleRowInstantFinish) { - auto& stream = AddReader([](btproto::ReadRowsRequest const&) {}); - - EXPECT_CALL(stream, Read) - .WillOnce([](btproto::ReadRowsResponse* r, void*) { - *r = bigtable::testing::ReadRowsResponseFromString( - R"( - chunks { - row_key: "r1" - family_name { value: "fam" } - qualifier { value: "col" } - timestamp_micros: 42000 - value: "value" - commit_row: true - })"); - }) - .RetiresOnSaturation(); - EXPECT_CALL(stream, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status::OK; - }); - - ExpectRow("r1"); - promises_from_user_cb_[0].set_value(true); - ReadRows(); - - EXPECT_TRUE(reader_started_[0]); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Finish Start() - - EXPECT_TRUE(Unsatisfied(row_futures_[0])); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Return data - auto row = row_futures_[0].get(); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(false); // Finish stream - ASSERT_EQ(1U, cq_impl_->size()); - EXPECT_TRUE(Unsatisfied(stream_status_future_)); - cq_impl_->SimulateCompletion(true); // Finish Finish() - - auto stream_status = stream_status_future_.get(); - ASSERT_STATUS_OK(stream_status); - ASSERT_EQ(0U, cq_impl_->size()); -} - -/// @test Verify that reading 2 rows delivered in 2 responses works. -TEST_F(TableAsyncReadRowsTest, MultipleChunks) { - auto& stream = AddReader([](btproto::ReadRowsRequest const&) {}); - - EXPECT_CALL(stream, Read) - .WillOnce([](btproto::ReadRowsResponse* r, void*) { - *r = bigtable::testing::ReadRowsResponseFromString( - R"( - chunks { - row_key: "r1" - family_name { value: "fam" } - qualifier { value: "col" } - timestamp_micros: 42000 - value: "value" - commit_row: true - })"); - }) - .WillOnce([](btproto::ReadRowsResponse* r, void*) { - *r = bigtable::testing::ReadRowsResponseFromString( - R"( - chunks { - row_key: "r2" - family_name { value: "fam" } - qualifier { value: "col" } - timestamp_micros: 42000 - value: "value" - commit_row: true - })"); - }) - .RetiresOnSaturation(); - EXPECT_CALL(stream, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status::OK; - }); - - ExpectRow("r1"); - ExpectRow("r2"); - promises_from_user_cb_[1].set_value(true); - ReadRows(); - - EXPECT_TRUE(reader_started_[0]); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Finish Start() - - EXPECT_TRUE(Unsatisfied(row_futures_[0])); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Return data - row_futures_[0].get(); - - // Check that we're not asking for data unless someone is waiting for it. - ASSERT_EQ(0U, cq_impl_->size()); - promises_from_user_cb_[0].set_value(true); - - EXPECT_TRUE(Unsatisfied(row_futures_[1])); - cq_impl_->SimulateCompletion(true); // Return data - row_futures_[1].get(); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(false); // Finish stream - ASSERT_EQ(1U, cq_impl_->size()); - EXPECT_TRUE(Unsatisfied(stream_status_future_)); - cq_impl_->SimulateCompletion(true); // Finish Finish() - - auto stream_status = stream_status_future_.get(); - ASSERT_STATUS_OK(stream_status); - ASSERT_EQ(0U, cq_impl_->size()); -} - -/// @test Like MultipleChunks but the future returned from on_row is satisfied. -TEST_F(TableAsyncReadRowsTest, MultipleChunksImmediatelySatisfied) { - auto& stream = AddReader([](btproto::ReadRowsRequest const&) {}); - - EXPECT_CALL(stream, Read) - .WillOnce([](btproto::ReadRowsResponse* r, void*) { - *r = bigtable::testing::ReadRowsResponseFromString( - R"( - chunks { - row_key: "r1" - family_name { value: "fam" } - qualifier { value: "col" } - timestamp_micros: 42000 - value: "value" - commit_row: true - })"); - }) - .WillOnce([](btproto::ReadRowsResponse* r, void*) { - *r = bigtable::testing::ReadRowsResponseFromString( - R"( - chunks { - row_key: "r2" - family_name { value: "fam" } - qualifier { value: "col" } - timestamp_micros: 42000 - value: "value" - commit_row: true - })"); - }) - .RetiresOnSaturation(); - EXPECT_CALL(stream, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status::OK; - }); - - ExpectRow("r1"); - ExpectRow("r2"); - promises_from_user_cb_[0].set_value(true); - promises_from_user_cb_[1].set_value(true); - ReadRows(); - - EXPECT_TRUE(reader_started_[0]); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Finish Start() - - EXPECT_TRUE(Unsatisfied(row_futures_[0])); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Return data - row_futures_[0].get(); - - EXPECT_TRUE(Unsatisfied(row_futures_[1])); - cq_impl_->SimulateCompletion(true); // Return data - row_futures_[1].get(); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(false); // Finish stream - ASSERT_EQ(1U, cq_impl_->size()); - EXPECT_TRUE(Unsatisfied(stream_status_future_)); - cq_impl_->SimulateCompletion(true); // Finish Finish() - - auto stream_status = stream_status_future_.get(); - ASSERT_STATUS_OK(stream_status); - ASSERT_EQ(0U, cq_impl_->size()); -} - -/// @test Verify that a single row can span multiple responses. -TEST_F(TableAsyncReadRowsTest, ResponseInMultipleChunks) { - auto& stream = AddReader([](btproto::ReadRowsRequest const&) {}); - - EXPECT_CALL(stream, Read) - .WillOnce([](btproto::ReadRowsResponse* r, void*) { - *r = bigtable::testing::ReadRowsResponseFromString( - R"( - chunks { - row_key: "r1" - family_name { value: "fam" } - qualifier { value: "col" } - timestamp_micros: 42000 - value: "value" - commit_row: false - })"); - }) - .WillOnce([](btproto::ReadRowsResponse* r, void*) { - *r = bigtable::testing::ReadRowsResponseFromString( - R"( - chunks { - row_key: "r1" - family_name { value: "fam" } - qualifier { value: "col2" } - timestamp_micros: 42000 - value: "value" - commit_row: true - })"); - }) - .RetiresOnSaturation(); - EXPECT_CALL(stream, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status::OK; - }); - - ExpectRow("r1"); - promises_from_user_cb_[0].set_value(true); - ReadRows(); - EXPECT_TRUE(reader_started_[0]); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Finish Start() - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Return data - EXPECT_TRUE(Unsatisfied(row_futures_[0])); - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Return data - - row_futures_[0].get(); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(false); // Finish stream - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Finish Finish() - - auto stream_status = stream_status_future_.get(); - ASSERT_STATUS_OK(stream_status); - ASSERT_EQ(0U, cq_impl_->size()); -} - -/// @test Verify that parser fails if the stream finishes prematurely. -TEST_F(TableAsyncReadRowsTest, ParserEofFailsOnUnfinishedRow) { - auto& stream = AddReader([](btproto::ReadRowsRequest const&) {}); - - EXPECT_CALL(stream, Read) - .WillOnce([](btproto::ReadRowsResponse* r, void*) { - *r = bigtable::testing::ReadRowsResponseFromString( - // missing final commit - R"( - chunks { - row_key: "r1" - family_name { value: "fam" } - qualifier { value: "col" } - timestamp_micros: 42000 - value: "value" - commit_row: false - })"); - }) - .RetiresOnSaturation(); - EXPECT_CALL(stream, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status::OK; - }); - - ReadRows(); - - EXPECT_TRUE(reader_started_[0]); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Finish Start() - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Return data - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(false); // Finish stream - ASSERT_EQ(1U, cq_impl_->size()); - EXPECT_TRUE(Unsatisfied(stream_status_future_)); - cq_impl_->SimulateCompletion(true); // Finish Finish() - - ASSERT_FALSE(stream_status_future_.get().ok()); -} - -/// @test Check that we ignore HandleEndOfStream errors if enough rows were read -TEST_F(TableAsyncReadRowsTest, ParserEofDoesntFailsOnUnfinishedRowIfRowLimit) { - auto& stream = AddReader([](btproto::ReadRowsRequest const&) {}); - - EXPECT_CALL(stream, Read) - .WillOnce([](btproto::ReadRowsResponse* r, void*) { - *r = bigtable::testing::ReadRowsResponseFromString( - // missing final commit - R"( - chunks { - row_key: "r1" - family_name { value: "fam" } - qualifier { value: "col" } - timestamp_micros: 42000 - value: "value" - commit_row: true - } - chunks { - row_key: "r2" - family_name { value: "fam" } - qualifier { value: "col" } - timestamp_micros: 42000 - value: "value" - commit_row: false - })"); - }) - .RetiresOnSaturation(); - EXPECT_CALL(stream, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status::OK; - }); - - ExpectRow("r1"); - promises_from_user_cb_[0].set_value(true); - ReadRows(1); - - EXPECT_TRUE(reader_started_[0]); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Finish Start() - ASSERT_EQ(1U, cq_impl_->size()); - EXPECT_TRUE(Unsatisfied(row_futures_[0])); - cq_impl_->SimulateCompletion(true); // Return data - - row_futures_[0].get(); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(false); // Finish stream - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Finish Finish() - - auto stream_status = stream_status_future_.get(); - ASSERT_STATUS_OK(stream_status); - ASSERT_EQ(0U, cq_impl_->size()); -} - -/// @test Verify that permanent errors are not retried and properly passed. -TEST_F(TableAsyncReadRowsTest, PermanentFailure) { - auto& stream = AddReader([](btproto::ReadRowsRequest const&) {}); - - EXPECT_CALL(stream, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status(grpc::StatusCode::PERMISSION_DENIED, "noooo"); - }); - - ReadRows(); - EXPECT_TRUE(reader_started_[0]); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Finish Start() - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(false); // Finish stream - ASSERT_EQ(1U, cq_impl_->size()); - EXPECT_TRUE(Unsatisfied(stream_status_future_)); - cq_impl_->SimulateCompletion(true); // Finish Finish() - - auto stream_status = stream_status_future_.get(); - ASSERT_EQ(StatusCode::kPermissionDenied, stream_status.code()); -} - -/// @test Verify that transient errors are retried. -TEST_F(TableAsyncReadRowsTest, TransientErrorIsRetried) { - auto& stream2 = AddReader([](btproto::ReadRowsRequest const& req) { - // Verify that we're not asking for the same rows again. - EXPECT_TRUE(req.has_rows()); - auto const& rows = req.rows(); - EXPECT_EQ(1, rows.row_ranges_size()); - auto const& range = rows.row_ranges(0); - EXPECT_EQ("r1", range.start_key_open()); - }); - auto& stream1 = AddReader([](btproto::ReadRowsRequest const&) {}); - - // Make it a bit trickier by delivering the error while parsing second row. - EXPECT_CALL(stream1, Read) - .WillOnce([](btproto::ReadRowsResponse* r, void*) { - *r = bigtable::testing::ReadRowsResponseFromString( - R"( - chunks { - row_key: "r1" - family_name { value: "fam" } - qualifier { value: "col" } - timestamp_micros: 42000 - value: "value" - commit_row: true - } - chunks { - row_key: "r2" - family_name { value: "fam" } - qualifier { value: "col" } - timestamp_micros: 42000 - value: "value" - commit_row: false - })"); - }) - .RetiresOnSaturation(); - EXPECT_CALL(stream1, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status(grpc::StatusCode::UNAVAILABLE, "oh no"); - }); - - EXPECT_CALL(stream2, Read) - .WillOnce([](btproto::ReadRowsResponse* r, void*) { - *r = bigtable::testing::ReadRowsResponseFromString( - R"( - chunks { - row_key: "r2" - family_name { value: "fam" } - qualifier { value: "col" } - timestamp_micros: 42000 - value: "value" - commit_row: true - })"); - }) - .RetiresOnSaturation(); - EXPECT_CALL(stream2, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status::OK; - }); - - ExpectRows({"r1", "r2"}); - promises_from_user_cb_[0].set_value(true); - promises_from_user_cb_[1].set_value(true); - ReadRows(); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Finish Start() - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Return data - - row_futures_[0].get(); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(false); // Finish stream with failure - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Finish Finish() - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Finish timer - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Finish Start() - ASSERT_EQ(1U, cq_impl_->size()); - EXPECT_TRUE(Unsatisfied(row_futures_[1])); - cq_impl_->SimulateCompletion(true); // Return data - - row_futures_[1].get(); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(false); // Finish stream - ASSERT_EQ(1U, cq_impl_->size()); - EXPECT_TRUE(Unsatisfied(stream_status_future_)); - cq_impl_->SimulateCompletion(true); // Finish Finish() - - auto stream_status = stream_status_future_.get(); - ASSERT_STATUS_OK(stream_status); - ASSERT_EQ(0U, cq_impl_->size()); -} - -/// @test Verify that the last scanned row is respected. -TEST_F(TableAsyncReadRowsTest, LastScannedRowKeyIsRespected) { - auto& stream2 = AddReader([](btproto::ReadRowsRequest const& req) { - // The server has told that "r2" has been scanned. Our second request - // should use the range ("r2", ""]. This is what is under test. - EXPECT_TRUE(req.has_rows()); - auto const& rows = req.rows(); - EXPECT_EQ(1, rows.row_ranges_size()); - auto const& range = rows.row_ranges(0); - EXPECT_EQ("r2", range.start_key_open()); - }); - auto& stream1 = AddReader([](btproto::ReadRowsRequest const&) {}); - - EXPECT_CALL(stream1, Read) - .WillOnce([](btproto::ReadRowsResponse* r, void*) { - *r = bigtable::testing::ReadRowsResponseFromString( - R"( - chunks { - row_key: "r1" - family_name { value: "fam" } - qualifier { value: "col" } - timestamp_micros: 42000 - value: "value" - commit_row: true - })"); - }) - .WillOnce([](btproto::ReadRowsResponse* r, void*) { - std::cout << "Second Read for stream1 " << std::endl; - btproto::ReadRowsResponse resp; - resp.set_last_scanned_row_key("r2"); - *r = resp; - }) - .RetiresOnSaturation(); - EXPECT_CALL(stream1, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status(grpc::StatusCode::UNAVAILABLE, "retry"); - }); - - EXPECT_CALL(stream2, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status::OK; - }); - - ExpectRows({"r1", "r2", "r3"}); - promises_from_user_cb_[0].set_value(true); - ReadRows(); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Finish Start() - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Return "r1" - - row_futures_[0].get(); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Return last_scanned_row_key = "r2" - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(false); // Finish stream1 with failure - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Finish Finish() - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Finish timer - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Finish Start() - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(false); // Finish stream - ASSERT_EQ(1U, cq_impl_->size()); - EXPECT_TRUE(Unsatisfied(stream_status_future_)); - cq_impl_->SimulateCompletion(true); // Finish Finish() - - auto stream_status = stream_status_future_.get(); - ASSERT_STATUS_OK(stream_status); - ASSERT_EQ(0U, cq_impl_->size()); -} - -/// @test Verify proper handling of bogus responses from the service. -TEST_F(TableAsyncReadRowsTest, ParserFailure) { - auto& stream = AddReader([](btproto::ReadRowsRequest const&) {}); - - EXPECT_CALL(stream, Read) - .WillOnce([](btproto::ReadRowsResponse* r, void*) { - *r = bigtable::testing::ReadRowsResponseFromString( - // Row not in increasing order. - R"( - chunks { - row_key: "r2" - family_name { value: "fam" } - qualifier { value: "col" } - timestamp_micros: 42000 - value: "value" - commit_row: true - } - chunks { - row_key: "r1" - family_name { value: "fam" } - qualifier { value: "col" } - timestamp_micros: 42000 - value: "value" - commit_row: true - })"); - }) - .RetiresOnSaturation(); - EXPECT_CALL(stream, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status::OK; - }); - - ExpectRow("r2"); - promises_from_user_cb_[0].set_value(true); - ReadRows(); - - EXPECT_TRUE(reader_started_[0]); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Finish Start() - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Return data - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(false); // Finish placeholder Read() - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Finish Finish() - - row_futures_[0].get(); - - auto stream_status = stream_status_future_.get(); - ASSERT_EQ(StatusCode::kInternal, stream_status.code()); - ASSERT_EQ(0U, cq_impl_->size()); -} - -enum class CancelMode { - kFalseValue, -#if GOOGLE_CLOUD_CPP_HAVE_EXCEPTIONS - kStdExcept, - kOtherExcept, -#endif // GOOGLE_CLOUD_CPP_HAVE_EXCEPTIONS -}; - -/// @test Verify canceling the stream by satisfying the futures with false -class TableAsyncReadRowsCancelMidStreamTest - : public TableAsyncReadRowsTest, - public WithParamInterface {}; - -TEST_P(TableAsyncReadRowsCancelMidStreamTest, CancelMidStream) { - auto& stream = AddReader([](btproto::ReadRowsRequest const&) {}); - - EXPECT_CALL(stream, Read) - .WillOnce([](btproto::ReadRowsResponse* r, void*) { - *r = bigtable::testing::ReadRowsResponseFromString( - R"( - chunks { - row_key: "r1" - family_name { value: "fam" } - qualifier { value: "col" } - timestamp_micros: 42000 - value: "value" - commit_row: true - } - chunks { - row_key: "r2" - family_name { value: "fam" } - qualifier { value: "col" } - timestamp_micros: 42000 - value: "value" - commit_row: true - })"); - }) - .RetiresOnSaturation(); - EXPECT_CALL(stream, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status::OK; - }); - - ExpectRow("r1"); - ReadRows(); - - EXPECT_TRUE(reader_started_[0]); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Finish Start() - - EXPECT_TRUE(Unsatisfied(row_futures_[0])); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Return data - row_futures_[0].get(); - - // Check that we're not asking for data unless someone is waiting for it. - ASSERT_EQ(0U, cq_impl_->size()); - - switch (GetParam()) { - case CancelMode::kFalseValue: - promises_from_user_cb_[0].set_value(false); - break; -#if GOOGLE_CLOUD_CPP_HAVE_EXCEPTIONS - case CancelMode::kStdExcept: - try { - throw std::runtime_error("user threw std::exception"); - } catch (...) { - promises_from_user_cb_[0].set_exception(std::current_exception()); - } - break; - case CancelMode::kOtherExcept: - try { - throw 5; - } catch (...) { - promises_from_user_cb_[0].set_exception(std::current_exception()); - } - break; -#endif // GOOGLE_CLOUD_CPP_HAVE_EXCEPTIONS - } - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(false); // Finish stream - ASSERT_EQ(1U, cq_impl_->size()); - EXPECT_TRUE(Unsatisfied(stream_status_future_)); - cq_impl_->SimulateCompletion(true); // Finish Finish() - - auto stream_status = stream_status_future_.get(); - ASSERT_EQ(StatusCode::kCancelled, stream_status.code()); - switch (GetParam()) { - case CancelMode::kFalseValue: - ASSERT_THAT(stream_status.message(), HasSubstr("User cancelled")); - break; -#if GOOGLE_CLOUD_CPP_HAVE_EXCEPTIONS - case CancelMode::kStdExcept: - ASSERT_THAT(stream_status.message(), - HasSubstr("user threw std::exception")); - break; - case CancelMode::kOtherExcept: - ASSERT_THAT(stream_status.message(), HasSubstr("unknown exception")); - break; -#endif // GOOGLE_CLOUD_CPP_HAVE_EXCEPTIONS - } - - ASSERT_EQ(0U, cq_impl_->size()); -} - -#if GOOGLE_CLOUD_CPP_HAVE_EXCEPTIONS -INSTANTIATE_TEST_SUITE_P(CancelMidStream, TableAsyncReadRowsCancelMidStreamTest, - Values(CancelMode::kFalseValue, CancelMode::kStdExcept, - CancelMode::kOtherExcept)); -#else // GOOGLE_CLOUD_CPP_HAVE_EXCEPTIONS -INSTANTIATE_TEST_SUITE_P(CancelMidStream, TableAsyncReadRowsCancelMidStreamTest, - Values(CancelMode::kFalseValue)); -#endif // GOOGLE_CLOUD_CPP_HAVE_EXCEPTIONS - -/// @test Like CancelMidStream but after the underlying stream has finished. -TEST_F(TableAsyncReadRowsTest, CancelAfterStreamFinish) { - auto& stream = AddReader([](btproto::ReadRowsRequest const&) {}); - - // First two rows are going to be processed, but third will cause the parser - // to fail (row order violation). This will result in finishing the stream - // while still keeping the two processed rows for the user. - EXPECT_CALL(stream, Read) - .WillOnce([](btproto::ReadRowsResponse* r, void*) { - *r = bigtable::testing::ReadRowsResponseFromString( - R"( - chunks { - row_key: "r1" - family_name { value: "fam" } - qualifier { value: "col" } - timestamp_micros: 42000 - value: "value" - commit_row: true - } - chunks { - row_key: "r2" - family_name { value: "fam" } - qualifier { value: "col" } - timestamp_micros: 42000 - value: "value" - commit_row: true - } - chunks { - row_key: "r0" - family_name { value: "fam" } - qualifier { value: "col" } - timestamp_micros: 42000 - value: "value" - commit_row: true - })"); - }) - .RetiresOnSaturation(); - EXPECT_CALL(stream, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status::OK; - }); - - ExpectRow("r1"); - ReadRows(); - - EXPECT_TRUE(reader_started_[0]); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Finish Start() - - EXPECT_TRUE(Unsatisfied(row_futures_[0])); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Return data - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(false); // Finish stream - ASSERT_EQ(1U, cq_impl_->size()); - EXPECT_TRUE(Unsatisfied(row_futures_[0])); - EXPECT_TRUE(Unsatisfied(stream_status_future_)); - cq_impl_->SimulateCompletion(true); // Finish Finish() - ASSERT_EQ(0U, cq_impl_->size()); - - EXPECT_TRUE(Unsatisfied(stream_status_future_)); - auto row = row_futures_[0].get(); - - // Check that we're not asking for data unless someone is waiting for it. - ASSERT_EQ(0U, cq_impl_->size()); - promises_from_user_cb_[0].set_value(false); - - auto stream_status = stream_status_future_.get(); - ASSERT_FALSE(stream_status.ok()); - ASSERT_EQ(StatusCode::kCancelled, stream_status.code()); -} - -/// @test Verify that the recursion described in TryGiveRowToUser is bounded. -TEST_F(TableAsyncReadRowsTest, DeepStack) { - auto& stream = AddReader([](btproto::ReadRowsRequest const&) {}); - - auto large_response = bigtable::testing::ReadRowsResponseFromString( - R"( - chunks { - row_key: "000" - family_name { value: "fam" } - qualifier { value: "col" } - timestamp_micros: 42000 - value: "value" - commit_row: true - })"); - ExpectRow("000"); - for (int i = 1; i < 101; ++i) { - auto chunk = large_response.chunks(0); - std::stringstream s_idx; - s_idx << std::setfill('0') << std::setw(3) << i; - chunk.set_row_key(s_idx.str()); - ExpectRow(chunk.row_key()); - *large_response.add_chunks() = std::move(chunk); - } - - EXPECT_CALL(stream, Read) - .WillOnce([large_response](btproto::ReadRowsResponse* r, void*) { - *r = large_response; - }) - .RetiresOnSaturation(); - EXPECT_CALL(stream, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status::OK; - }); - - for (int i = 0; i < 101; ++i) { - promises_from_user_cb_[i].set_value(true); - } - ReadRows(); - - EXPECT_TRUE(reader_started_[0]); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Finish Start() - - EXPECT_TRUE(Unsatisfied(row_futures_[0])); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Return data - - for (int i = 0; i < 100; ++i) { - row_futures_[i].get(); - } - ASSERT_TRUE(Unsatisfied(row_futures_[100])); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // RunAsync - row_futures_[100].get(); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(false); // Finish stream - ASSERT_EQ(1U, cq_impl_->size()); - EXPECT_TRUE(Unsatisfied(stream_status_future_)); - cq_impl_->SimulateCompletion(true); // Finish Finish() - - auto stream_status = stream_status_future_.get(); - ASSERT_STATUS_OK(stream_status); - ASSERT_EQ(0U, cq_impl_->size()); -} - -TEST_F(TableAsyncReadRowsTest, ReadRowSuccess) { - auto& stream = AddReader([](btproto::ReadRowsRequest const&) {}); - - EXPECT_CALL(stream, Read) - .WillOnce([](btproto::ReadRowsResponse* r, void*) { - *r = bigtable::testing::ReadRowsResponseFromString( - R"( - chunks { - row_key: "000" - family_name { value: "fam" } - qualifier { value: "col" } - timestamp_micros: 42000 - value: "value" - commit_row: true - })"); - }) - .RetiresOnSaturation(); - EXPECT_CALL(stream, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status::OK; - }); - - auto row_future = table_.AsyncReadRow("000", Filter::PassAllFilter()); - - EXPECT_TRUE(reader_started_[0]); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Finish Start() - - EXPECT_TRUE(Unsatisfied(row_future)); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Return data - - // We return data only after the whole stream is finished. - ASSERT_TRUE(Unsatisfied(row_future)); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(false); // Finish stream - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Finish Finish() - - auto row = row_future.get(); - ASSERT_STATUS_OK(row); - ASSERT_TRUE(row->first); - ASSERT_EQ("000", row->second.row_key()); - - ASSERT_EQ(0U, cq_impl_->size()); -} - -TEST_F(TableAsyncReadRowsTest, ReadRowNotFound) { - auto& stream = AddReader([](btproto::ReadRowsRequest const&) {}); - - EXPECT_CALL(stream, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status::OK; - }); - - auto row_future = table_.AsyncReadRow("000", Filter::PassAllFilter()); - - EXPECT_TRUE(reader_started_[0]); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Finish Start() - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(false); // Finish stream - ASSERT_EQ(1U, cq_impl_->size()); - EXPECT_TRUE(Unsatisfied(row_future)); - - cq_impl_->SimulateCompletion(true); // Finish Finish() - - auto row = row_future.get(); - ASSERT_STATUS_OK(row); - ASSERT_FALSE(row->first); -} - -TEST_F(TableAsyncReadRowsTest, ReadRowError) { - auto& stream = AddReader([](btproto::ReadRowsRequest const&) {}); - - EXPECT_CALL(stream, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status(grpc::StatusCode::PERMISSION_DENIED, ""); - }); - - auto row_future = table_.AsyncReadRow("000", Filter::PassAllFilter()); - - EXPECT_TRUE(reader_started_[0]); - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); // Finish Start() - - ASSERT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(false); // Finish stream - ASSERT_EQ(1U, cq_impl_->size()); - EXPECT_TRUE(Unsatisfied(row_future)); - - cq_impl_->SimulateCompletion(true); // Finish Finish() - - auto row = row_future.get(); - ASSERT_FALSE(row); - ASSERT_EQ(StatusCode::kPermissionDenied, row.status().code()); -} - -} // namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/internal/legacy_async_row_sampler.cc b/google/cloud/bigtable/internal/legacy_async_row_sampler.cc deleted file mode 100644 index 9ed3f3065b620..0000000000000 --- a/google/cloud/bigtable/internal/legacy_async_row_sampler.cc +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/internal/legacy_async_row_sampler.h" -#include "google/cloud/grpc_error_delegate.h" -#include -#include -#include - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace internal { - -namespace btproto = ::google::bigtable::v2; - -future>> LegacyAsyncRowSampler::Create( - CompletionQueue cq, std::shared_ptr client, - std::unique_ptr rpc_retry_policy, - std::unique_ptr rpc_backoff_policy, - MetadataUpdatePolicy metadata_update_policy, std::string app_profile_id, - std::string table_name) { - std::shared_ptr sampler(new LegacyAsyncRowSampler( - std::move(cq), std::move(client), std::move(rpc_retry_policy), - std::move(rpc_backoff_policy), std::move(metadata_update_policy), - std::move(app_profile_id), std::move(table_name))); - sampler->StartIteration(); - return sampler->promise_.get_future(); -} - -LegacyAsyncRowSampler::LegacyAsyncRowSampler( - CompletionQueue cq, std::shared_ptr client, - std::unique_ptr rpc_retry_policy, - std::unique_ptr rpc_backoff_policy, - MetadataUpdatePolicy metadata_update_policy, std::string app_profile_id, - std::string table_name) - : cq_(std::move(cq)), - client_(std::move(client)), - rpc_retry_policy_(std::move(rpc_retry_policy)), - rpc_backoff_policy_(std::move(rpc_backoff_policy)), - metadata_update_policy_(std::move(metadata_update_policy)), - app_profile_id_(std::move(app_profile_id)), - table_name_(std::move(table_name)), - promise_([this] { keep_reading_ = false; }) {} - -void LegacyAsyncRowSampler::StartIteration() { - btproto::SampleRowKeysRequest request; - request.set_app_profile_id(app_profile_id_); - request.set_table_name(table_name_); - - auto context = std::make_unique(); - rpc_retry_policy_->Setup(*context); - rpc_backoff_policy_->Setup(*context); - metadata_update_policy_.Setup(*context); - - auto& client = client_; - auto self = this->shared_from_this(); - cq_.MakeStreamingReadRpc( - [client](grpc::ClientContext* context, - btproto::SampleRowKeysRequest const& request, - grpc::CompletionQueue* cq) { - return client->PrepareAsyncSampleRowKeys(context, request, cq); - }, - request, std::move(context), - [self](btproto::SampleRowKeysResponse response) { - return self->OnRead(std::move(response)); - }, - [self](Status const& status) { self->OnFinish(status); }); -} - -future LegacyAsyncRowSampler::OnRead( - btproto::SampleRowKeysResponse response) { - RowKeySample row_sample; - row_sample.offset_bytes = response.offset_bytes(); - row_sample.row_key = std::move(*response.mutable_row_key()); - samples_.emplace_back(std::move(row_sample)); - return make_ready_future(keep_reading_.load()); -} - -void LegacyAsyncRowSampler::OnFinish(Status const& status) { - if (status.ok()) { - promise_.set_value(std::move(samples_)); - return; - } - if (!rpc_retry_policy_->OnFailure(status)) { - promise_.set_value(status); - return; - } - - using TimerFuture = future>; - - samples_.clear(); - auto self = this->shared_from_this(); - auto delay = rpc_backoff_policy_->OnCompletion(std::move(status)); - cq_.MakeRelativeTimer(delay).then([self](TimerFuture result) { - if (result.get()) { - self->StartIteration(); - } else { - self->promise_.set_value( - Status(StatusCode::kCancelled, "call cancelled")); - } - }); -} - -} // namespace internal -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/internal/legacy_async_row_sampler.h b/google/cloud/bigtable/internal/legacy_async_row_sampler.h deleted file mode 100644 index 8627501afa627..0000000000000 --- a/google/cloud/bigtable/internal/legacy_async_row_sampler.h +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_LEGACY_ASYNC_ROW_SAMPLER_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_LEGACY_ASYNC_ROW_SAMPLER_H - -#include "google/cloud/bigtable/completion_queue.h" -#include "google/cloud/bigtable/data_client.h" -#include "google/cloud/bigtable/metadata_update_policy.h" -#include "google/cloud/bigtable/row_key_sample.h" -#include "google/cloud/bigtable/rpc_backoff_policy.h" -#include "google/cloud/bigtable/rpc_retry_policy.h" -#include "google/cloud/bigtable/version.h" -#include "google/cloud/future_generic.h" -#include "google/cloud/status.h" -#include "google/cloud/status_or.h" -#include -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace internal { - -/** - * Objects of this class represent the state of receiving row keys via - * AsyncSampleRows. - */ -class LegacyAsyncRowSampler - : public std::enable_shared_from_this { - public: - static future>> Create( - CompletionQueue cq, std::shared_ptr client, - std::unique_ptr rpc_retry_policy, - std::unique_ptr rpc_backoff_policy, - MetadataUpdatePolicy metadata_update_policy, std::string app_profile_id, - std::string table_name); - - private: - LegacyAsyncRowSampler(CompletionQueue cq, std::shared_ptr client, - std::unique_ptr rpc_retry_policy, - std::unique_ptr rpc_backoff_policy, - MetadataUpdatePolicy metadata_update_policy, - std::string app_profile_id, std::string table_name); - - void StartIteration(); - future OnRead(google::bigtable::v2::SampleRowKeysResponse response); - void OnFinish(Status const& status); - - CompletionQueue cq_; - std::shared_ptr client_; - std::unique_ptr rpc_retry_policy_; - std::unique_ptr rpc_backoff_policy_; - MetadataUpdatePolicy metadata_update_policy_; - std::string app_profile_id_; - std::string table_name_; - - std::atomic keep_reading_{true}; - std::vector samples_; - promise>> promise_; -}; - -} // namespace internal -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_LEGACY_ASYNC_ROW_SAMPLER_H diff --git a/google/cloud/bigtable/internal/legacy_async_row_sampler_test.cc b/google/cloud/bigtable/internal/legacy_async_row_sampler_test.cc deleted file mode 100644 index c048d81143a74..0000000000000 --- a/google/cloud/bigtable/internal/legacy_async_row_sampler_test.cc +++ /dev/null @@ -1,462 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/internal/legacy_async_row_sampler.h" -#include "google/cloud/bigtable/testing/mock_policies.h" -#include "google/cloud/bigtable/testing/mock_response_reader.h" -#include "google/cloud/bigtable/testing/table_test_fixture.h" -#include "google/cloud/testing_util/fake_completion_queue_impl.h" -#include "google/cloud/testing_util/status_matchers.h" -#include -#include -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -namespace btproto = ::google::bigtable::v2; - -using ::google::cloud::bigtable::testing::MockBackoffPolicy; -using ::google::cloud::bigtable::testing::MockClientAsyncReaderInterface; -using ::google::cloud::testing_util::FakeCompletionQueueImpl; -using ::google::cloud::testing_util::StatusIs; -using ::testing::ElementsAre; -using ::testing::HasSubstr; - -class AsyncSampleRowKeysTest : public bigtable::testing::TableTestFixture { - protected: - AsyncSampleRowKeysTest() - : TableTestFixture( - CompletionQueue(std::make_shared())), - rpc_retry_policy_( - bigtable::DefaultRPCRetryPolicy(internal::kBigtableLimits)), - metadata_update_policy_("my_table", MetadataParamTypes::NAME) {} - - std::shared_ptr rpc_retry_policy_; - MetadataUpdatePolicy metadata_update_policy_; -}; - -struct RowKeySampleVectors { - explicit RowKeySampleVectors(std::vector samples) { - row_keys.reserve(samples.size()); - offset_bytes.reserve(samples.size()); - for (auto& sample : samples) { - row_keys.emplace_back(std::move(sample.row_key)); - offset_bytes.emplace_back(std::move(sample.offset_bytes)); - } - } - - std::vector row_keys; - std::vector offset_bytes; -}; - -TEST_F(AsyncSampleRowKeysTest, Simple) { - EXPECT_CALL(*client_, PrepareAsyncSampleRowKeys) - .WillOnce([](grpc::ClientContext*, btproto::SampleRowKeysRequest const&, - grpc::CompletionQueue*) { - auto reader = std::make_unique< - MockClientAsyncReaderInterface>(); - EXPECT_CALL(*reader, StartCall); - EXPECT_CALL(*reader, Read) - .WillOnce([](btproto::SampleRowKeysResponse* r, void*) { - { - r->set_row_key("test1"); - r->set_offset_bytes(11); - } - }) - .WillOnce([](btproto::SampleRowKeysResponse* r, void*) { - { - r->set_row_key("test2"); - r->set_offset_bytes(22); - } - }) - .WillOnce([](btproto::SampleRowKeysResponse*, void*) {}); - - EXPECT_CALL(*reader, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status::OK; - }); - return reader; - }); - - auto samples_future = table_.AsyncSampleRows(); - - // Start() - cq_impl_->SimulateCompletion(true); - // Return response 1 - cq_impl_->SimulateCompletion(true); - // Return response 2 - cq_impl_->SimulateCompletion(true); - // End stream - cq_impl_->SimulateCompletion(false); - // Finish() - cq_impl_->SimulateCompletion(true); - - auto status = samples_future.get(); - ASSERT_STATUS_OK(status); - - auto samples = RowKeySampleVectors(status.value()); - EXPECT_THAT(samples.row_keys, ElementsAre("test1", "test2")); - EXPECT_THAT(samples.offset_bytes, ElementsAre(11, 22)); -} - -TEST_F(AsyncSampleRowKeysTest, Retry) { - EXPECT_CALL(*client_, PrepareAsyncSampleRowKeys) - .WillOnce([](grpc::ClientContext*, btproto::SampleRowKeysRequest const&, - grpc::CompletionQueue*) { - auto reader = std::make_unique< - MockClientAsyncReaderInterface>(); - EXPECT_CALL(*reader, StartCall); - EXPECT_CALL(*reader, Read) - .WillOnce([](btproto::SampleRowKeysResponse* r, void*) { - { - r->set_row_key("test1"); - r->set_offset_bytes(11); - } - }) - .WillOnce([](btproto::SampleRowKeysResponse*, void*) {}); - - EXPECT_CALL(*reader, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status(grpc::StatusCode::UNAVAILABLE, "try again"); - }); - return reader; - }) - .WillOnce([](grpc::ClientContext*, btproto::SampleRowKeysRequest const&, - grpc::CompletionQueue*) { - auto reader = std::make_unique< - MockClientAsyncReaderInterface>(); - EXPECT_CALL(*reader, StartCall); - EXPECT_CALL(*reader, Read) - .WillOnce([](btproto::SampleRowKeysResponse* r, void*) { - { - r->set_row_key("test2"); - r->set_offset_bytes(22); - } - }) - .WillOnce([](btproto::SampleRowKeysResponse*, void*) {}); - EXPECT_CALL(*reader, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status::OK; - }); - return reader; - }); - - auto samples_future = table_.AsyncSampleRows(); - - // Start() - cq_impl_->SimulateCompletion(true); - // Return response - cq_impl_->SimulateCompletion(true); - // End stream - cq_impl_->SimulateCompletion(false); - // Finish() - cq_impl_->SimulateCompletion(true); - // Simulate the backoff timer - cq_impl_->SimulateCompletion(true); - - ASSERT_EQ(1U, cq_impl_->size()); - - // Start() - cq_impl_->SimulateCompletion(true); - // Return response - cq_impl_->SimulateCompletion(true); - // End stream - cq_impl_->SimulateCompletion(false); - // Finish() - cq_impl_->SimulateCompletion(true); - - ASSERT_EQ(0U, cq_impl_->size()); - - auto status = samples_future.get(); - ASSERT_STATUS_OK(status); - - auto samples = RowKeySampleVectors(status.value()); - EXPECT_THAT(samples.row_keys, ElementsAre("test2")); - EXPECT_THAT(samples.offset_bytes, ElementsAre(22)); -} - -TEST_F(AsyncSampleRowKeysTest, TooManyFailures) { - // We give up on the 3rd error. - auto constexpr kErrorCount = 2; - Table custom_table(client_, "foo_table", - LimitedErrorCountRetryPolicy(kErrorCount)); - - EXPECT_CALL(*client_, PrepareAsyncSampleRowKeys) - .Times(kErrorCount + 1) - .WillRepeatedly([](grpc::ClientContext*, - btproto::SampleRowKeysRequest const&, - grpc::CompletionQueue*) { - auto reader = std::make_unique< - MockClientAsyncReaderInterface>(); - EXPECT_CALL(*reader, StartCall); - EXPECT_CALL(*reader, Read).Times(2); - EXPECT_CALL(*reader, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status(grpc::StatusCode::UNAVAILABLE, "try again"); - }); - return reader; - }); - - auto samples_future = custom_table.AsyncSampleRows(); - - for (int retry = 0; retry < kErrorCount; ++retry) { - // Start() - cq_impl_->SimulateCompletion(true); - // Return response - cq_impl_->SimulateCompletion(true); - // End stream - cq_impl_->SimulateCompletion(false); - // Finish() - cq_impl_->SimulateCompletion(true); - // Simulate the backoff timer - cq_impl_->SimulateCompletion(true); - - ASSERT_EQ(1U, cq_impl_->size()); - } - - // Start() - cq_impl_->SimulateCompletion(true); - // Return response - cq_impl_->SimulateCompletion(true); - // End stream - cq_impl_->SimulateCompletion(false); - // Finish() - cq_impl_->SimulateCompletion(true); - - auto status = samples_future.get(); - ASSERT_THAT(status, - StatusIs(StatusCode::kUnavailable, HasSubstr("try again"))); - - ASSERT_EQ(0U, cq_impl_->size()); -} - -TEST_F(AsyncSampleRowKeysTest, UsesBackoff) { - auto grpc_error = grpc::Status(grpc::StatusCode::UNAVAILABLE, "try again"); - auto error = MakeStatusFromRpcError(grpc_error); - - std::unique_ptr mock(new MockBackoffPolicy); - EXPECT_CALL(*mock, Setup).Times(2); - EXPECT_CALL(*mock, OnCompletion(error)); - - EXPECT_CALL(*client_, PrepareAsyncSampleRowKeys) - .WillOnce([grpc_error](grpc::ClientContext*, - btproto::SampleRowKeysRequest const&, - grpc::CompletionQueue*) { - auto reader = std::make_unique< - MockClientAsyncReaderInterface>(); - EXPECT_CALL(*reader, StartCall); - EXPECT_CALL(*reader, Read).Times(2); - EXPECT_CALL(*reader, Finish) - .WillOnce([grpc_error](grpc::Status* status, void*) { - *status = grpc_error; - }); - return reader; - }) - .WillOnce([](grpc::ClientContext*, btproto::SampleRowKeysRequest const&, - grpc::CompletionQueue*) { - auto reader = std::make_unique< - MockClientAsyncReaderInterface>(); - EXPECT_CALL(*reader, StartCall); - EXPECT_CALL(*reader, Read).Times(2); - EXPECT_CALL(*reader, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status::OK; - }); - return reader; - }); - - auto samples_future = internal::LegacyAsyncRowSampler::Create( - cq_, client_, rpc_retry_policy_->clone(), std::move(mock), - metadata_update_policy_, "my-app-profile", "my-table"); - - // Start() - cq_impl_->SimulateCompletion(true); - // Return response - cq_impl_->SimulateCompletion(true); - // End stream - cq_impl_->SimulateCompletion(false); - // Finish() - cq_impl_->SimulateCompletion(true); - // Simulate the backoff timer - cq_impl_->SimulateCompletion(true); - - ASSERT_EQ(1U, cq_impl_->size()); - - // Start() - cq_impl_->SimulateCompletion(true); - // Return response - cq_impl_->SimulateCompletion(true); - // End stream - cq_impl_->SimulateCompletion(false); - // Finish() - cq_impl_->SimulateCompletion(true); - - ASSERT_EQ(0U, cq_impl_->size()); -} - -TEST_F(AsyncSampleRowKeysTest, CancelDuringBackoff) { - auto grpc_error = grpc::Status(grpc::StatusCode::UNAVAILABLE, "try again"); - auto error = MakeStatusFromRpcError(grpc_error); - - std::unique_ptr mock(new MockBackoffPolicy); - EXPECT_CALL(*mock, Setup); - EXPECT_CALL(*mock, OnCompletion(error)); - - EXPECT_CALL(*client_, PrepareAsyncSampleRowKeys) - .WillOnce([grpc_error](grpc::ClientContext*, - btproto::SampleRowKeysRequest const&, - grpc::CompletionQueue*) { - auto reader = std::make_unique< - MockClientAsyncReaderInterface>(); - EXPECT_CALL(*reader, StartCall); - EXPECT_CALL(*reader, Read).Times(2); - EXPECT_CALL(*reader, Finish) - .WillOnce([grpc_error](grpc::Status* status, void*) { - *status = grpc_error; - }); - return reader; - }); - - auto samples_future = internal::LegacyAsyncRowSampler::Create( - cq_, client_, rpc_retry_policy_->clone(), std::move(mock), - metadata_update_policy_, "my-app-profile", "my-table"); - - // Start() - cq_impl_->SimulateCompletion(true); - // Return response - cq_impl_->SimulateCompletion(true); - // End stream - cq_impl_->SimulateCompletion(false); - // Finish() - cq_impl_->SimulateCompletion(true); - - ASSERT_EQ(1U, cq_impl_->size()); - - // Cancel the pending operation. - samples_future.cancel(); - // Simulate the backoff timer - cq_impl_->SimulateCompletion(false); - - ASSERT_EQ(0U, cq_impl_->size()); - - auto status = samples_future.get(); - ASSERT_THAT(status, - StatusIs(StatusCode::kCancelled, HasSubstr("call cancelled"))); -} - -TEST_F(AsyncSampleRowKeysTest, CancelAfterSuccess) { - EXPECT_CALL(*client_, PrepareAsyncSampleRowKeys) - .WillOnce([](grpc::ClientContext*, btproto::SampleRowKeysRequest const&, - grpc::CompletionQueue*) { - auto reader = std::make_unique< - MockClientAsyncReaderInterface>(); - EXPECT_CALL(*reader, StartCall); - EXPECT_CALL(*reader, Read) - .WillOnce([](btproto::SampleRowKeysResponse* r, void*) { - { - r->set_row_key("test1"); - r->set_offset_bytes(11); - } - }) - .WillOnce([](btproto::SampleRowKeysResponse*, void*) {}); - - EXPECT_CALL(*reader, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status::OK; - }); - return reader; - }); - - auto samples_future = table_.AsyncSampleRows(); - // samples_future.cancel(); - - // Start() - cq_impl_->SimulateCompletion(true); - // Return response - cq_impl_->SimulateCompletion(true); - - // Cancel the pending operation - samples_future.cancel(); - - // End stream - cq_impl_->SimulateCompletion(false); - // Finish() - cq_impl_->SimulateCompletion(true); - - auto status = samples_future.get(); - ASSERT_STATUS_OK(status); - - auto samples = RowKeySampleVectors(status.value()); - EXPECT_THAT(samples.row_keys, ElementsAre("test1")); - EXPECT_THAT(samples.offset_bytes, ElementsAre(11)); -} - -TEST_F(AsyncSampleRowKeysTest, CancelMidStream) { - EXPECT_CALL(*client_, PrepareAsyncSampleRowKeys) - .WillOnce([](grpc::ClientContext*, btproto::SampleRowKeysRequest const&, - grpc::CompletionQueue*) { - auto reader = std::make_unique< - MockClientAsyncReaderInterface>(); - EXPECT_CALL(*reader, StartCall); - EXPECT_CALL(*reader, Read) - .WillOnce([](btproto::SampleRowKeysResponse* r, void*) { - { - r->set_row_key("test1"); - r->set_offset_bytes(11); - } - }) - .WillOnce([](btproto::SampleRowKeysResponse* r, void*) { - { - r->set_row_key("test2"); - r->set_offset_bytes(22); - } - }) - .WillOnce([](btproto::SampleRowKeysResponse* r, void*) { - { - r->set_row_key("test3"); - r->set_offset_bytes(33); - } - }); - EXPECT_CALL(*reader, Finish).WillOnce([](grpc::Status* status, void*) { - *status = grpc::Status(grpc::StatusCode::CANCELLED, "User cancelled"); - }); - return reader; - }); - - auto samples_future = table_.AsyncSampleRows(); - - // Start() - cq_impl_->SimulateCompletion(true); - // Return response 1 - cq_impl_->SimulateCompletion(true); - // Cancel the pending operation - samples_future.cancel(); - // Return response 2 - cq_impl_->SimulateCompletion(true); - // Return response 3 - cq_impl_->SimulateCompletion(false); - // Finish() - cq_impl_->SimulateCompletion(true); - - auto status = samples_future.get(); - EXPECT_THAT(status, - StatusIs(StatusCode::kCancelled, HasSubstr("User cancelled"))); -} - -} // namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/internal/legacy_bulk_mutator_test.cc b/google/cloud/bigtable/internal/legacy_bulk_mutator_test.cc deleted file mode 100644 index 5674b8aff7390..0000000000000 --- a/google/cloud/bigtable/internal/legacy_bulk_mutator_test.cc +++ /dev/null @@ -1,496 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/internal/bulk_mutator.h" -#include "google/cloud/bigtable/testing/mock_data_client.h" -#include "google/cloud/bigtable/testing/mock_mutate_rows_reader.h" -#include "google/cloud/bigtable/testing/mock_response_reader.h" -#include "google/cloud/testing_util/chrono_literals.h" -#include "google/cloud/testing_util/fake_completion_queue_impl.h" - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -namespace btproto = ::google::bigtable::v2; -using ::testing::Return; -using ::google::cloud::testing_util::chrono_literals::operator""_ms; -using ::google::cloud::bigtable::testing::MockMutateRowsReader; - -auto constexpr kTableName = "projects/blah/instances/blah2/tables/table"; - -std::unique_ptr TestContext( - std::string const& app_profile_id = "") { - auto context = std::make_unique(); - bigtable_internal::MakeMetadataUpdatePolicy(kTableName, app_profile_id) - .Setup(*context); - return context; -} - -/// @test Verify that MultipleRowsMutator handles easy cases. -TEST(MultipleRowsMutatorTest, Simple) { - // In this test we create a Mutation for two rows, which succeeds in the - // first RPC request. First create the mutation. - BulkMutation mut( - SingleRowMutation("foo", {SetCell("fam", "col", 0_ms, "baz")}), - SingleRowMutation("bar", {SetCell("fam", "col", 0_ms, "qux")})); - - // Prepare the mocks. The mutator should issue a RPC which must return a - // stream of responses, we prepare the stream first because it is easier than - // to create one of the fly. - auto reader = std::make_unique( - "google.bigtable.v2.Bigtable.MutateRows"); - EXPECT_CALL(*reader, Read) - .WillOnce([](btproto::MutateRowsResponse* r) { - { - auto& e = *r->add_entries(); - e.set_index(0); - e.mutable_status()->set_code(grpc::StatusCode::OK); - } - { - auto& e = *r->add_entries(); - e.set_index(1); - e.mutable_status()->set_code(grpc::StatusCode::OK); - } - return true; - }) - .WillOnce(Return(false)); - EXPECT_CALL(*reader, Finish()).WillOnce(Return(grpc::Status::OK)); - - // Now prepare the client for the one request. - bigtable::testing::MockDataClient client; - EXPECT_CALL(client, MutateRows) - .WillOnce(reader.release()->MakeMockReturner()); - - auto policy = DefaultIdempotentMutationPolicy(); - bigtable_internal::BulkMutator mutator( - "", kTableName, *policy, std::move(mut), - std::make_shared()); - - EXPECT_TRUE(mutator.HasPendingMutations()); - auto context = TestContext(); - auto status = mutator.MakeOneRequest(client, *context); - EXPECT_TRUE(status.ok()); - auto failures = std::move(mutator).OnRetryDone(); - EXPECT_TRUE(failures.empty()); -} - -/// @test Verify that MultipleRowsMutator uses app_profile_id when set. -TEST(MultipleRowsMutatorTest, BulkApplyAppProfileId) { - namespace btproto = ::google::bigtable::v2; - - // In this test we create a Mutation for two rows, which succeeds in the - // first RPC request. First create the mutation. - BulkMutation mut( - SingleRowMutation("foo", {SetCell("fam", "col", 0_ms, "baz")}), - SingleRowMutation("bar", {SetCell("fam", "col", 0_ms, "qux")})); - - // Prepare the mocks. The mutator should issue a RPC which must return a - // stream of responses, we prepare the stream first because it is easier than - // to create one of the fly. - - // Now prepare the client for the one request. - std::string expected_id = "test-id"; - bigtable::testing::MockDataClient client; - EXPECT_CALL(client, MutateRows) - .WillOnce([expected_id](grpc::ClientContext*, - btproto::MutateRowsRequest const& req) { - auto reader = std::make_unique( - "google.bigtable.v2.Bigtable.MutateRows"); - EXPECT_CALL(*reader, Read) - .WillOnce([](btproto::MutateRowsResponse* r) { - { - auto& e = *r->add_entries(); - e.set_index(0); - e.mutable_status()->set_code(grpc::StatusCode::OK); - } - { - auto& e = *r->add_entries(); - e.set_index(1); - e.mutable_status()->set_code(grpc::StatusCode::OK); - } - return true; - }) - .WillOnce(Return(false)); - EXPECT_CALL(*reader, Finish()).WillOnce(Return(grpc::Status::OK)); - EXPECT_EQ(expected_id, req.app_profile_id()); - return reader; - }); - - auto policy = DefaultIdempotentMutationPolicy(); - bigtable_internal::BulkMutator mutator( - "test-id", kTableName, *policy, std::move(mut), - std::make_shared()); - - EXPECT_TRUE(mutator.HasPendingMutations()); - auto context = TestContext("test-id"); - auto status = mutator.MakeOneRequest(client, *context); - EXPECT_TRUE(status.ok()); - auto failures = std::move(mutator).OnRetryDone(); - EXPECT_TRUE(failures.empty()); -} - -/// @test Verify that MultipleRowsMutator retries partial failures. -TEST(MultipleRowsMutatorTest, RetryPartialFailure) { - // In this test we create a Mutation for two rows, one of which will fail. - // First create the mutation. - BulkMutation mut( - SingleRowMutation("foo", {SetCell("fam", "col", 0_ms, "baz")}), - SingleRowMutation("bar", {SetCell("fam", "col", 0_ms, "qux")})); - - // Prepare the mocks for the request. First create a stream response which - // indicates a partial failure. - - // Setup the client to response with r1 first, and r2 next. - bigtable::testing::MockDataClient client; - EXPECT_CALL(client, MutateRows) - .WillOnce( - [](grpc::ClientContext*, btproto::MutateRowsRequest const& req) { - EXPECT_EQ(kTableName, req.table_name()); - auto r1 = std::make_unique( - "google.bigtable.v2.Bigtable.MutateRows"); - EXPECT_CALL(*r1, Read) - .WillOnce([](btproto::MutateRowsResponse* r) { - // Simulate a partial (and recoverable) failure. - auto& e0 = *r->add_entries(); - e0.set_index(0); - e0.mutable_status()->set_code(grpc::StatusCode::UNAVAILABLE); - auto& e1 = *r->add_entries(); - e1.set_index(1); - e1.mutable_status()->set_code(grpc::StatusCode::OK); - return true; - }) - .WillOnce(Return(false)); - EXPECT_CALL(*r1, Finish).WillOnce(Return(grpc::Status::OK)); - return r1; - }) - .WillOnce( - [](grpc::ClientContext*, btproto::MutateRowsRequest const& req) { - EXPECT_EQ(kTableName, req.table_name()); - // Prepare a second stream response, because the client should retry - // after the partial failure. - auto r2 = std::make_unique( - "google.bigtable.v2.Bigtable.MutateRows"); - EXPECT_CALL(*r2, Read) - .WillOnce([](btproto::MutateRowsResponse* r) { - { - auto& e = *r->add_entries(); - e.set_index(0); - e.mutable_status()->set_code(grpc::StatusCode::OK); - } - return true; - }) - .WillOnce(Return(false)); - EXPECT_CALL(*r2, Finish).WillOnce(Return(grpc::Status::OK)); - return r2; - }); - - auto policy = DefaultIdempotentMutationPolicy(); - bigtable_internal::BulkMutator mutator( - "", kTableName, *policy, std::move(mut), - std::make_shared()); - - // This work will be in BulkApply(), but this is the test for BulkMutator in - // isolation, so call MakeOneRequest() twice, for the r1, and the r2 cases. - for (int i = 0; i != 2; ++i) { - EXPECT_TRUE(mutator.HasPendingMutations()); - auto context = TestContext(); - auto status = mutator.MakeOneRequest(client, *context); - EXPECT_TRUE(status.ok()); - } - auto failures = std::move(mutator).OnRetryDone(); - EXPECT_TRUE(failures.empty()); -} - -/// @test Verify that MultipleRowsMutator handles permanent failures. -TEST(MultipleRowsMutatorTest, PermanentFailure) { - // In this test we handle a recoverable and one unrecoverable failures. - // Create a bulk mutation with two SetCell() mutations. - BulkMutation mut( - SingleRowMutation("foo", {SetCell("fam", "col", 0_ms, "baz")}), - SingleRowMutation("bar", {SetCell("fam", "col", 0_ms, "qux")})); - - // Make the first RPC return one recoverable and one unrecoverable failures. - auto r1 = std::make_unique( - "google.bigtable.v2.Bigtable.MutateRows"); - EXPECT_CALL(*r1, Read) - .WillOnce([](btproto::MutateRowsResponse* r) { - // Simulate a partial failure, which is recoverable for this first - // element. - auto& e0 = *r->add_entries(); - e0.set_index(0); - e0.mutable_status()->set_code(grpc::StatusCode::UNAVAILABLE); - // Simulate an unrecoverable failure for the second element. - auto& e1 = *r->add_entries(); - e1.set_index(1); - e1.mutable_status()->set_code(grpc::StatusCode::OUT_OF_RANGE); - return true; - }) - .WillOnce(Return(false)); - EXPECT_CALL(*r1, Finish()).WillOnce(Return(grpc::Status::OK)); - - // The BulkMutator should issue a second request, which will return success - // for the remaining mutation. - auto r2 = std::make_unique( - "google.bigtable.v2.Bigtable.MutateRows"); - EXPECT_CALL(*r2, Read) - .WillOnce([](btproto::MutateRowsResponse* r) { - { - auto& e = *r->add_entries(); - e.set_index(0); - e.mutable_status()->set_code(grpc::StatusCode::OK); - } - return true; - }) - .WillOnce(Return(false)); - EXPECT_CALL(*r2, Finish()).WillOnce(Return(grpc::Status::OK)); - - bigtable::testing::MockDataClient client; - EXPECT_CALL(client, MutateRows) - .WillOnce(r1.release()->MakeMockReturner()) - .WillOnce(r2.release()->MakeMockReturner()); - - auto policy = DefaultIdempotentMutationPolicy(); - bigtable_internal::BulkMutator mutator( - "", kTableName, *policy, std::move(mut), - std::make_shared()); - - // This work will be in BulkApply(), but this is the test for BulkMutator in - // isolation, so call MakeOneRequest() twice, for the r1, and the r2 cases. - for (int i = 0; i != 2; ++i) { - EXPECT_TRUE(mutator.HasPendingMutations()); - auto context = TestContext(); - auto status = mutator.MakeOneRequest(client, *context); - EXPECT_TRUE(status.ok()); - } - auto failures = std::move(mutator).OnRetryDone(); - ASSERT_EQ(1UL, failures.size()); - EXPECT_EQ(1, failures[0].original_index()); - // EXPECT_EQ("bar", failures[0].mutation().row_key()); - EXPECT_EQ(google::cloud::StatusCode::kOutOfRange, - failures[0].status().code()); -} - -/// @test Verify that MultipleRowsMutator handles a stream with partial results -TEST(MultipleRowsMutatorTest, PartialStream) { - // We are going to test the case where the stream does not contain a response - // for all requests. Create a BulkMutation with two entries. - BulkMutation mut( - SingleRowMutation("foo", {SetCell("fam", "col", 0_ms, "baz")}), - SingleRowMutation("bar", {SetCell("fam", "col", 0_ms, "qux")})); - - // This will be the stream returned by the first request. It is missing - // information about one of the mutations. - auto r1 = std::make_unique( - "google.bigtable.v2.Bigtable.MutateRows"); - EXPECT_CALL(*r1, Read) - .WillOnce([](btproto::MutateRowsResponse* r) { - auto& e0 = *r->add_entries(); - e0.set_index(0); - e0.mutable_status()->set_code(grpc::StatusCode::OK); - return true; - }) - .WillOnce(Return(false)); - EXPECT_CALL(*r1, Finish()).WillOnce(Return(grpc::Status::OK)); - - // The BulkMutation should issue a second request, this is the stream returned - // by the second request, which indicates success for the missed mutation - // on r1. - auto r2 = std::make_unique( - "google.bigtable.v2.Bigtable.MutateRows"); - EXPECT_CALL(*r2, Read) - .WillOnce([](btproto::MutateRowsResponse* r) { - { - auto& e = *r->add_entries(); - e.set_index(0); - e.mutable_status()->set_code(grpc::StatusCode::OK); - } - return true; - }) - .WillOnce(Return(false)); - EXPECT_CALL(*r2, Finish()).WillOnce(Return(grpc::Status::OK)); - - bigtable::testing::MockDataClient client; - EXPECT_CALL(client, MutateRows) - .WillOnce(r1.release()->MakeMockReturner()) - .WillOnce(r2.release()->MakeMockReturner()); - - auto policy = DefaultIdempotentMutationPolicy(); - bigtable_internal::BulkMutator mutator( - "", kTableName, *policy, std::move(mut), - std::make_shared()); - - // This work will be in BulkApply(), but this is the test for BulkMutator in - // isolation, so call MakeOneRequest() twice: for the r1 and r2 cases. - for (int i = 0; i != 2; ++i) { - EXPECT_TRUE(mutator.HasPendingMutations()); - auto context = TestContext(); - auto status = mutator.MakeOneRequest(client, *context); - EXPECT_TRUE(status.ok()); - } - auto failures = std::move(mutator).OnRetryDone(); - EXPECT_TRUE(failures.empty()); -} - -/// @test Verify that MultipleRowsMutator only retries idempotent mutations -TEST(MultipleRowsMutatorTest, RetryOnlyIdempotent) { - // Create a BulkMutation with a non-idempotent mutation. - BulkMutation mut( - SingleRowMutation("foo", {SetCell("fam", "col", "baz")}), - SingleRowMutation("bar", {SetCell("fam", "col", 0_ms, "qux")}), - SingleRowMutation("baz", {SetCell("fam", "col", "v")}), - SingleRowMutation("bar", {SetCell("fam", "col", 0_ms, "qux")})); - - // We will setup the mock to return recoverable failures for idempotent - // mutations. - - // Verify that the second response has the right contents. It is easier (and - // more readable) to write these in a separate small lambda expression because - // ASSERT_EQ() has an embedded "return;" in it, which does not play well with - // the rest of the stuff here. - auto expect_r2 = [](btproto::MutateRowsRequest const& r) { - ASSERT_EQ(2, r.entries_size()); - EXPECT_EQ("bar", r.entries(0).row_key()); - }; - bigtable::testing::MockDataClient client; - EXPECT_CALL(client, MutateRows) - .WillOnce([](grpc::ClientContext*, btproto::MutateRowsRequest const& r) { - EXPECT_EQ(4, r.entries_size()); - auto r1 = std::make_unique( - "google.bigtable.v2.Bigtable.MutateRows"); - EXPECT_CALL(*r1, Read) - .WillOnce([](btproto::MutateRowsResponse* r) { - // Simulate recoverable failures for both elements. - auto& e0 = *r->add_entries(); - e0.set_index(0); - e0.mutable_status()->set_code(grpc::StatusCode::UNAVAILABLE); - auto& e1 = *r->add_entries(); - e1.set_index(1); - e1.mutable_status()->set_code(grpc::StatusCode::UNAVAILABLE); - return true; - }) - .WillOnce(Return(false)); - EXPECT_CALL(*r1, Finish).WillOnce(Return(grpc::Status::OK)); - return r1; - }) - .WillOnce([expect_r2](grpc::ClientContext*, - btproto::MutateRowsRequest const& r) { - expect_r2(r); - // The BulkMutator should issue a second request, with only the - // idempotent mutations, make the mocks return success for them. - auto r2 = std::make_unique( - "google.bigtable.v2.Bigtable.MutateRows"); - EXPECT_CALL(*r2, Read) - .WillOnce([](btproto::MutateRowsResponse* r) { - { - auto& e = *r->add_entries(); - e.set_index(0); - e.mutable_status()->set_code(grpc::StatusCode::OK); - } - return true; - }) - .WillOnce(Return(false)); - EXPECT_CALL(*r2, Finish).WillOnce(Return(grpc::Status::OK)); - - return r2; - }); - - auto policy = DefaultIdempotentMutationPolicy(); - bigtable_internal::BulkMutator mutator( - "", kTableName, *policy, std::move(mut), - std::make_shared()); - - // This work will be in BulkApply(), but this is the test for BulkMutator in - // isolation, so call MakeOneRequest() twice, for the r1, and the r2 cases. - for (int i = 0; i != 2; ++i) { - EXPECT_TRUE(mutator.HasPendingMutations()); - auto context = TestContext(); - auto status = mutator.MakeOneRequest(client, *context); - EXPECT_TRUE(status.ok()); - } - auto failures = std::move(mutator).OnRetryDone(); - ASSERT_EQ(3UL, failures.size()); - EXPECT_EQ(0, failures[0].original_index()); - // EXPECT_EQ("foo", failures[0].mutation().row_key()); - EXPECT_EQ(google::cloud::StatusCode::kUnavailable, - failures[0].status().code()); - - EXPECT_EQ(2, failures[1].original_index()); - // EXPECT_EQ("baz", failures[1].mutation().row_key()); - EXPECT_EQ(google::cloud::StatusCode::kInternal, failures[1].status().code()); - EXPECT_EQ(google::cloud::StatusCode::kInternal, failures[2].status().code()); -} - -TEST(MultipleRowsMutatorTest, UnconfirmedAreFailed) { - // Make sure that mutations which are not confirmed are reported as UNKNOWN - // with the proper index. - BulkMutation mut(SingleRowMutation("foo", {SetCell("fam", "col", "baz")}), - // this one will be unconfirmed - SingleRowMutation("bar", {SetCell("fam", "col", "qux")}), - SingleRowMutation("baz", {SetCell("fam", "col", "v")})); - - // We will setup the mock to return recoverable failures for idempotent - // mutations. - - // The BulkMutator should not issue a second request because the error is - // PERMISSION_DENIED (not retryable). - - bigtable::testing::MockDataClient client; - EXPECT_CALL(client, MutateRows) - .WillOnce([](grpc::ClientContext*, btproto::MutateRowsRequest const& r) { - EXPECT_EQ(3, r.entries_size()); - auto r1 = std::make_unique( - "google.bigtable.v2.Bigtable.MutateRows"); - EXPECT_CALL(*r1, Read) - .WillOnce([](btproto::MutateRowsResponse* r) { - auto& e0 = *r->add_entries(); - e0.set_index(0); - e0.mutable_status()->set_code(grpc::StatusCode::OK); - auto& e1 = *r->add_entries(); - e1.set_index(2); - e1.mutable_status()->set_code(grpc::StatusCode::OK); - return true; - }) - .WillOnce(Return(false)); - EXPECT_CALL(*r1, Finish) - .WillOnce( - Return(grpc::Status(grpc::StatusCode::PERMISSION_DENIED, ""))); - return r1; - }); - - auto policy = DefaultIdempotentMutationPolicy(); - bigtable_internal::BulkMutator mutator( - "", kTableName, *policy, std::move(mut), - std::make_shared()); - - EXPECT_TRUE(mutator.HasPendingMutations()); - auto context = TestContext(); - auto status = mutator.MakeOneRequest(client, *context); - EXPECT_FALSE(status.ok()); - - auto failures = std::move(mutator).OnRetryDone(); - ASSERT_EQ(1UL, failures.size()); - EXPECT_EQ(1, failures[0].original_index()); - // EXPECT_EQ("bar", failures[0].mutation().row_key()); - EXPECT_EQ(google::cloud::StatusCode::kPermissionDenied, - failures.front().status().code()); -} - -} // anonymous namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/internal/legacy_row_reader.cc b/google/cloud/bigtable/internal/legacy_row_reader.cc deleted file mode 100644 index 62eeafff9ca3e..0000000000000 --- a/google/cloud/bigtable/internal/legacy_row_reader.cc +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/internal/legacy_row_reader.h" -#include "google/cloud/bigtable/table.h" -#include "google/cloud/grpc_error_delegate.h" -#include "google/cloud/internal/throw_delegate.h" -#include "google/cloud/log.h" -#include - -namespace google { -namespace cloud { -namespace bigtable_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -LegacyRowReader::LegacyRowReader( - std::shared_ptr client, std::string table_name, - bigtable::RowSet row_set, std::int64_t rows_limit, bigtable::Filter filter, - std::unique_ptr retry_policy, - std::unique_ptr backoff_policy, - bigtable::MetadataUpdatePolicy metadata_update_policy, - std::unique_ptr parser_factory) - : LegacyRowReader(std::move(client), std::string(""), std::move(table_name), - std::move(row_set), rows_limit, std::move(filter), - std::move(retry_policy), std::move(backoff_policy), - std::move(metadata_update_policy), - std::move(parser_factory)) {} - -LegacyRowReader::LegacyRowReader( - std::shared_ptr client, std::string app_profile_id, - std::string table_name, bigtable::RowSet row_set, std::int64_t rows_limit, - bigtable::Filter filter, - std::unique_ptr retry_policy, - std::unique_ptr backoff_policy, - bigtable::MetadataUpdatePolicy metadata_update_policy, - std::unique_ptr parser_factory) - : client_(std::move(client)), - app_profile_id_(std::move(app_profile_id)), - table_name_(std::move(table_name)), - row_set_(std::move(row_set)), - rows_limit_(rows_limit), - filter_(std::move(filter)), - retry_policy_(std::move(retry_policy)), - backoff_policy_(std::move(backoff_policy)), - metadata_update_policy_(std::move(metadata_update_policy)), - parser_factory_(std::move(parser_factory)) {} - -void LegacyRowReader::MakeRequest() { - response_ = {}; - processed_chunks_count_ = 0; - - google::bigtable::v2::ReadRowsRequest request; - request.set_table_name(table_name_); - request.set_app_profile_id(app_profile_id_); - - auto row_set_proto = row_set_.as_proto(); - request.mutable_rows()->Swap(&row_set_proto); - - auto filter_proto = filter_.as_proto(); - request.mutable_filter()->Swap(&filter_proto); - - if (rows_limit_ != bigtable::RowReader::NO_ROWS_LIMIT) { - request.set_rows_limit(rows_limit_ - rows_count_); - } - - context_ = std::make_unique(); - retry_policy_->Setup(*context_); - backoff_policy_->Setup(*context_); - metadata_update_policy_.Setup(*context_); - stream_ = client_->ReadRows(context_.get(), request); - stream_is_open_ = true; - - parser_ = parser_factory_->Create(false); -} - -bool LegacyRowReader::NextChunk() { - ++processed_chunks_count_; - while (processed_chunks_count_ >= response_.chunks_size()) { - processed_chunks_count_ = 0; - bool response_is_valid = stream_->Read(&response_); - if (!response_is_valid) { - response_ = {}; - return false; - } - if (!response_.last_scanned_row_key().empty()) { - last_read_row_key_ = std::move(*response_.mutable_last_scanned_row_key()); - } - } - return true; -} - -absl::variant LegacyRowReader::Advance() { - if (operation_cancelled_) { - return Status(StatusCode::kCancelled, "Operation cancelled."); - } - while (true) { - auto variant = AdvanceOrFail(); - if (absl::holds_alternative(variant)) { - return absl::get(std::move(variant)); - } - - auto status = absl::get(std::move(variant)); - if (status.ok()) return Status{}; - - // In the unlikely case when we have already reached the requested - // number of rows and still receive an error (the parser can throw - // an error at end of stream for example), there is no need to - // retry and we have no good value for rows_limit anyway. - if (rows_limit_ != bigtable::RowReader::NO_ROWS_LIMIT && - rows_limit_ <= rows_count_) { - return Status{}; - } - - if (!last_read_row_key_.empty()) { - // We've returned some rows and need to make sure we don't - // request them again. - row_set_ = - row_set_.Intersect(bigtable::RowRange::Open(last_read_row_key_, "")); - } - - // If we receive an error, but the retryable set is empty, stop. - if (row_set_.IsEmpty()) return Status{}; - - if (!retry_policy_->OnFailure(status)) return status; - - auto delay = backoff_policy_->OnCompletion(status); - std::this_thread::sleep_for(delay); - - // If we reach this place, we failed and need to restart the call. - MakeRequest(); - } -} - -absl::variant LegacyRowReader::AdvanceOrFail() { - grpc::Status status; - if (!stream_) { - MakeRequest(); - } - while (!parser_->HasNext()) { - if (NextChunk()) { - parser_->HandleChunk( - std::move(*(response_.mutable_chunks(processed_chunks_count_))), - status); - if (!status.ok()) return MakeStatusFromRpcError(status); - continue; - } - - // Here, there are no more chunks to look at. Close the stream, - // finalize the parser and return OK with no rows unless something - // fails during cleanup. - stream_is_open_ = false; - status = stream_->Finish(); - if (!status.ok()) return MakeStatusFromRpcError(status); - parser_->HandleEndOfStream(status); - return MakeStatusFromRpcError(status); - } - - // We have a complete row in the parser. - bigtable::Row parsed_row = parser_->Next(status); - if (!status.ok()) return MakeStatusFromRpcError(status); - - ++rows_count_; - last_read_row_key_ = parsed_row.row_key(); - return parsed_row; -} - -void LegacyRowReader::Cancel() { - operation_cancelled_ = true; - if (!stream_is_open_) return; - context_->TryCancel(); - - // Also drain any data left unread - google::bigtable::v2::ReadRowsResponse response; - while (stream_->Read(&response)) { - } - - stream_is_open_ = false; - (void)stream_->Finish(); // ignore errors -} - -LegacyRowReader::~LegacyRowReader() { - // Make sure we don't leave open streams. - Cancel(); -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable_internal -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/internal/legacy_row_reader.h b/google/cloud/bigtable/internal/legacy_row_reader.h deleted file mode 100644 index f1522eeb95819..0000000000000 --- a/google/cloud/bigtable/internal/legacy_row_reader.h +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_LEGACY_ROW_READER_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_LEGACY_ROW_READER_H - -#include "google/cloud/bigtable/data_client.h" -#include "google/cloud/bigtable/filters.h" -#include "google/cloud/bigtable/internal/readrowsparser.h" -#include "google/cloud/bigtable/internal/row_reader_impl.h" -#include "google/cloud/bigtable/metadata_update_policy.h" -#include "google/cloud/bigtable/row.h" -#include "google/cloud/bigtable/row_set.h" -#include "google/cloud/bigtable/rpc_backoff_policy.h" -#include "google/cloud/bigtable/rpc_retry_policy.h" -#include "google/cloud/bigtable/version.h" -#include "absl/types/variant.h" -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace bigtable_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/** - * `RowReaderImpl` that interacts with the Bigtable service via `DataClient`. - */ -class LegacyRowReader : public RowReaderImpl { - public: - LegacyRowReader(std::shared_ptr client, - std::string table_name, bigtable::RowSet row_set, - std::int64_t rows_limit, bigtable::Filter filter, - std::unique_ptr retry_policy, - std::unique_ptr backoff_policy, - bigtable::MetadataUpdatePolicy metadata_update_policy, - std::unique_ptr - parser_factory); - - LegacyRowReader(std::shared_ptr client, - std::string app_profile_id, std::string table_name, - bigtable::RowSet row_set, std::int64_t rows_limit, - bigtable::Filter filter, - std::unique_ptr retry_policy, - std::unique_ptr backoff_policy, - bigtable::MetadataUpdatePolicy metadata_update_policy, - std::unique_ptr - parser_factory); - - ~LegacyRowReader() override; - - void Cancel() override; - - /** - * Read and parse the next row in the response. - * - * @param row receives the next row on success, and is reset on failure or if - * there are no more rows. - * - * This call possibly blocks waiting for data until a full row is available. - */ - absl::variant Advance() override; - - private: - /// Called by Advance(), does not handle retries. - absl::variant AdvanceOrFail(); - - /** - * Move the `processed_chunks_count_` index to the next chunk, - * reading data if needed. - * - * Returns false if no more chunks are available. - * - * This call is used internally by AdvanceOrFail to prepare data for - * parsing. When it returns true, the value of - * `response_.chunks(processed_chunks_count_)` is valid and holds - * the next chunk to parse. - */ - bool NextChunk(); - - /// Sends the ReadRows request to the stub. - void MakeRequest(); - - std::shared_ptr client_; - std::string app_profile_id_; - std::string table_name_; - bigtable::RowSet row_set_; - std::int64_t rows_limit_; - bigtable::Filter filter_; - std::unique_ptr retry_policy_; - std::unique_ptr backoff_policy_; - bigtable::MetadataUpdatePolicy metadata_update_policy_; - - std::unique_ptr context_; - - std::unique_ptr parser_factory_; - std::unique_ptr parser_; - std::unique_ptr< - grpc::ClientReaderInterface> - stream_; - bool stream_is_open_ = false; - bool operation_cancelled_ = false; - - /// The last received response, chunks are being parsed one by one from it. - google::bigtable::v2::ReadRowsResponse response_; - /// Number of chunks already parsed in response_. - int processed_chunks_count_ = 0; - - /// Number of rows read so far, used to set row_limit in retries. - std::int64_t rows_count_ = 0; - /// Holds the last read row key, for retries. - bigtable::RowKeyType last_read_row_key_; -}; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable_internal -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_LEGACY_ROW_READER_H diff --git a/google/cloud/bigtable/internal/legacy_row_reader_test.cc b/google/cloud/bigtable/internal/legacy_row_reader_test.cc deleted file mode 100644 index a3dea04f8d84b..0000000000000 --- a/google/cloud/bigtable/internal/legacy_row_reader_test.cc +++ /dev/null @@ -1,871 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/internal/legacy_row_reader.h" -#include "google/cloud/bigtable/row_reader.h" -#include "google/cloud/bigtable/testing/mock_policies.h" -#include "google/cloud/bigtable/testing/mock_read_rows_reader.h" -#include "google/cloud/bigtable/testing/table_test_fixture.h" -#include "google/cloud/internal/api_client_header.h" -#include "google/cloud/internal/throw_delegate.h" -#include "google/cloud/testing_util/scoped_log.h" -#include "google/cloud/testing_util/status_matchers.h" -#include "google/cloud/testing_util/validate_metadata.h" -#include -#include -#include - -namespace google { -namespace cloud { -namespace bigtable_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -using ::google::bigtable::v2::ReadRowsRequest; -using ::google::bigtable::v2::ReadRowsResponse_CellChunk; -using ::google::cloud::bigtable::Row; -using ::google::cloud::bigtable::testing::MockBackoffPolicy; -using ::google::cloud::bigtable::testing::MockReadRowsReader; -using ::google::cloud::bigtable::testing::MockRetryPolicy; -using ::google::cloud::testing_util::StatusIs; -using ::google::cloud::testing_util::ValidateMetadataFixture; -using ::testing::_; -using ::testing::An; -using ::testing::DoAll; -using ::testing::Eq; -using ::testing::Matcher; -using ::testing::NiceMock; -using ::testing::Property; -using ::testing::Return; -using ::testing::SetArgPointee; -using ::testing::SetArgReferee; - -class ReadRowsParserMock : public bigtable::internal::ReadRowsParser { - public: - explicit ReadRowsParserMock() : ReadRowsParser(false) {} - - MOCK_METHOD(void, HandleChunkHook, - (ReadRowsResponse_CellChunk chunk, grpc::Status& status)); - void HandleChunk(ReadRowsResponse_CellChunk chunk, - grpc::Status& status) override { - HandleChunkHook(chunk, status); - } - - MOCK_METHOD(void, HandleEndOfStreamHook, (grpc::Status & status)); - void HandleEndOfStream(grpc::Status& status) override { - HandleEndOfStreamHook(status); - } - - bool HasNext() const override { return !rows_.empty(); } - - Row Next(grpc::Status&) override { - Row row = rows_.front(); - rows_.pop_front(); - return row; - } - - void SetRows(std::initializer_list l) { - std::transform(l.begin(), l.end(), std::back_inserter(rows_), - [](std::string const& s) -> Row { - return Row(s, std::vector()); - }); - } - - private: - std::deque rows_; -}; - -// Returns a preconfigured set of parsers, so expectations can be set on each. -class ReadRowsParserMockFactory - : public bigtable::internal::ReadRowsParserFactory { - using ParserPtr = std::unique_ptr; - - public: - void AddParser(ParserPtr parser) { parsers_.emplace_back(std::move(parser)); } - - MOCK_METHOD(void, CreateHook, ()); - ParserPtr Create(bool reverse) override { - CreateHook(); - if (parsers_.empty()) { - return std::make_unique(reverse); - } - ParserPtr parser = std::move(parsers_.front()); - parsers_.pop_front(); - return parser; - } - - private: - std::deque parsers_; -}; - -// Match the number of expected row keys in a request in EXPECT_CALL -Matcher RequestWithRowKeysCount(int n) { - return Property( - &ReadRowsRequest::rows, - Property(&google::bigtable::v2::RowSet::row_keys_size, Eq(n))); -} - -// Match the row limit in a request -Matcher RequestWithRowsLimit(std::int64_t n) { - return Property(&ReadRowsRequest::rows_limit, Eq(n)); -} - -class LegacyRowReaderTest : public bigtable::testing::TableTestFixture { - public: - LegacyRowReaderTest() - : TableTestFixture(CompletionQueue{}), - retry_policy_(std::make_unique>()), - backoff_policy_(std::make_unique>()), - metadata_update_policy_(MakeMetadataUpdatePolicy(kTableName, "")), - parser_factory_( - std::make_unique>()) {} - - std::unique_ptr retry_policy_; - std::unique_ptr backoff_policy_; - bigtable::MetadataUpdatePolicy metadata_update_policy_; - std::unique_ptr> parser_factory_; -}; - -TEST_F(LegacyRowReaderTest, EmptyReaderHasNoRows) { - // wrapped in unique_ptr by ReadRows - auto* stream = new MockReadRowsReader("google.bigtable.v2.Bigtable.ReadRows"); - EXPECT_CALL(*stream, Read).WillOnce(Return(false)); - EXPECT_CALL(*stream, Finish).WillOnce(Return(grpc::Status::OK)); - EXPECT_CALL(*client_, ReadRows).WillOnce(stream->MakeMockReturner()); - - auto impl = std::make_shared( - client_, kTableName, bigtable::RowSet(), - bigtable::RowReader::NO_ROWS_LIMIT, bigtable::Filter::PassAllFilter(), - std::move(retry_policy_), std::move(backoff_policy_), - metadata_update_policy_, std::move(parser_factory_)); - auto reader = MakeRowReader(std::move(impl)); - - EXPECT_EQ(reader.begin(), reader.end()); -} - -TEST_F(LegacyRowReaderTest, ReadOneRow) { - // wrapped in unique_ptr by ReadRows - auto* stream = new MockReadRowsReader("google.bigtable.v2.Bigtable.ReadRows"); - auto parser = std::make_unique(); - parser->SetRows({"r1"}); - EXPECT_CALL(*parser, HandleEndOfStreamHook).Times(1); - { - ::testing::InSequence s; - EXPECT_CALL(*client_, ReadRows).WillOnce(stream->MakeMockReturner()); - EXPECT_CALL(*stream, Read).WillOnce(Return(true)); - EXPECT_CALL(*stream, Read).WillOnce(Return(false)); - EXPECT_CALL(*stream, Finish()).WillOnce(Return(grpc::Status::OK)); - } - - parser_factory_->AddParser(std::move(parser)); - auto impl = std::make_shared( - client_, kTableName, bigtable::RowSet(), - bigtable::RowReader::NO_ROWS_LIMIT, bigtable::Filter::PassAllFilter(), - std::move(retry_policy_), std::move(backoff_policy_), - metadata_update_policy_, std::move(parser_factory_)); - auto reader = MakeRowReader(std::move(impl)); - - auto it = reader.begin(); - EXPECT_NE(it, reader.end()); - ASSERT_STATUS_OK(*it); - EXPECT_EQ((*it)->row_key(), "r1"); - EXPECT_EQ(++it, reader.end()); -} - -TEST_F(LegacyRowReaderTest, ReadOneRowAppProfileId) { - // wrapped in unique_ptr by ReadRows - auto parser = std::make_unique(); - parser->SetRows({"r1"}); - EXPECT_CALL(*parser, HandleEndOfStreamHook).Times(1); - EXPECT_CALL(*client_, ReadRows) - .WillOnce([](grpc::ClientContext* context, ReadRowsRequest const& req) { - ValidateMetadataFixture fixture; - fixture.IsContextMDValid( - *context, "google.bigtable.v2.Bigtable.ReadRows", req, - google::cloud::internal::HandCraftedLibClientHeader()); - EXPECT_EQ("test-app-profile-id", req.app_profile_id()); - auto stream = std::make_unique( - "google.bigtable.v2.Bigtable.ReadRows"); - ::testing::InSequence s; - EXPECT_CALL(*stream, Read).WillOnce(Return(true)); - EXPECT_CALL(*stream, Read).WillOnce(Return(false)); - EXPECT_CALL(*stream, Finish).WillOnce(Return(grpc::Status::OK)); - return stream; - }); - - parser_factory_->AddParser(std::move(parser)); - auto impl = std::make_shared( - client_, "test-app-profile-id", kTableName, bigtable::RowSet(), - bigtable::RowReader::NO_ROWS_LIMIT, bigtable::Filter::PassAllFilter(), - std::move(retry_policy_), std::move(backoff_policy_), - MakeMetadataUpdatePolicy(kTableName, "test-app-profile-id"), - std::move(parser_factory_)); - auto reader = MakeRowReader(std::move(impl)); - - auto it = reader.begin(); - EXPECT_NE(it, reader.end()); - ASSERT_STATUS_OK(*it); - EXPECT_EQ((*it)->row_key(), "r1"); - EXPECT_EQ(++it, reader.end()); -} - -TEST_F(LegacyRowReaderTest, StreamIsDrained) { - // wrapped in unique_ptr by ReadRows - auto* stream = new MockReadRowsReader("google.bigtable.v2.Bigtable.ReadRows"); - auto parser = std::make_unique(); - parser->SetRows({"r1"}); - { - ::testing::InSequence s; - EXPECT_CALL(*client_, ReadRows).WillOnce(stream->MakeMockReturner()); - EXPECT_CALL(*stream, Read).WillOnce(Return(true)); - EXPECT_CALL(*stream, Read).WillOnce(Return(true)); - EXPECT_CALL(*stream, Read).WillOnce(Return(true)); - EXPECT_CALL(*stream, Read).WillOnce(Return(false)); - EXPECT_CALL(*stream, Finish()).WillOnce(Return(grpc::Status::OK)); - } - - parser_factory_->AddParser(std::move(parser)); - auto impl = std::make_shared( - client_, kTableName, bigtable::RowSet(), - bigtable::RowReader::NO_ROWS_LIMIT, bigtable::Filter::PassAllFilter(), - std::move(retry_policy_), std::move(backoff_policy_), - metadata_update_policy_, std::move(parser_factory_)); - auto reader = MakeRowReader(std::move(impl)); - - auto it = reader.begin(); - EXPECT_NE(it, reader.end()); - ASSERT_STATUS_OK(*it); - EXPECT_EQ((*it)->row_key(), "r1"); - EXPECT_NE(it, reader.end()); - // Do not finish the iteration. We still expect the stream to be finalized, - // and the previously setup expectations on the mock `stream` check that. -} - -TEST_F(LegacyRowReaderTest, RetryThenSuccess) { - // wrapped in unique_ptr by ReadRows - auto* stream = new MockReadRowsReader("google.bigtable.v2.Bigtable.ReadRows"); - auto parser = std::make_unique(); - parser->SetRows({"r1"}); - { - ::testing::InSequence s; - EXPECT_CALL(*client_, ReadRows).WillOnce(stream->MakeMockReturner()); - EXPECT_CALL(*stream, Read).WillOnce(Return(false)); - EXPECT_CALL(*stream, Finish()) - .WillOnce(Return(grpc::Status(grpc::StatusCode::INTERNAL, "retry"))); - - EXPECT_CALL(*retry_policy_, OnFailure(An())) - .WillOnce(Return(true)); - EXPECT_CALL(*backoff_policy_, OnCompletion(An())) - .WillOnce(Return(std::chrono::milliseconds(0))); - - // the stub will free it - auto* stream_retry = - new MockReadRowsReader("google.bigtable.v2.Bigtable.ReadRows"); - EXPECT_CALL(*client_, ReadRows).WillOnce(stream_retry->MakeMockReturner()); - EXPECT_CALL(*stream_retry, Read).WillOnce(Return(true)); - EXPECT_CALL(*stream_retry, Read).WillOnce(Return(false)); - EXPECT_CALL(*stream_retry, Finish()).WillOnce(Return(grpc::Status::OK)); - } - - parser_factory_->AddParser(std::move(parser)); - auto impl = std::make_shared( - client_, kTableName, bigtable::RowSet(), - bigtable::RowReader::NO_ROWS_LIMIT, bigtable::Filter::PassAllFilter(), - std::move(retry_policy_), std::move(backoff_policy_), - metadata_update_policy_, std::move(parser_factory_)); - auto reader = MakeRowReader(std::move(impl)); - - auto it = reader.begin(); - EXPECT_NE(it, reader.end()); - ASSERT_STATUS_OK(*it); - EXPECT_EQ((*it)->row_key(), "r1"); - EXPECT_EQ(++it, reader.end()); -} - -TEST_F(LegacyRowReaderTest, NoRetryOnPermanentError) { - // wrapped in unique_ptr by ReadRows - auto* stream = new MockReadRowsReader("google.bigtable.v2.Bigtable.ReadRows"); - auto parser = std::make_unique(); - { - ::testing::InSequence s; - EXPECT_CALL(*client_, ReadRows).WillOnce(stream->MakeMockReturner()); - EXPECT_CALL(*stream, Read).WillOnce(Return(false)); - EXPECT_CALL(*stream, Finish()) - .WillOnce(Return(grpc::Status(grpc::StatusCode::INTERNAL, "retry"))); - - EXPECT_CALL(*retry_policy_, OnFailure(An())) - .WillOnce(Return(false)); - EXPECT_CALL(*backoff_policy_, OnCompletion(An())).Times(0); - } - - parser_factory_->AddParser(std::move(parser)); - auto impl = std::make_shared( - client_, kTableName, bigtable::RowSet(), - bigtable::RowReader::NO_ROWS_LIMIT, bigtable::Filter::PassAllFilter(), - std::move(retry_policy_), std::move(backoff_policy_), - metadata_update_policy_, std::move(parser_factory_)); - auto reader = MakeRowReader(std::move(impl)); - - auto it = reader.begin(); - EXPECT_NE(it, reader.end()); - EXPECT_THAT(*it, StatusIs(StatusCode::kInternal)); - EXPECT_EQ(++it, reader.end()); -} - -TEST_F(LegacyRowReaderTest, RetrySkipsAlreadyReadRows) { - // wrapped in unique_ptr by ReadRows - auto* stream = new MockReadRowsReader("google.bigtable.v2.Bigtable.ReadRows"); - auto parser = std::make_unique(); - parser->SetRows({"r1"}); - { - ::testing::InSequence s; - // As a baseline, check we have two rows in the initial request - EXPECT_CALL(*client_, ReadRows(_, RequestWithRowKeysCount(2))) - .WillOnce(stream->MakeMockReturner()); - - EXPECT_CALL(*stream, Read).WillOnce(Return(true)); - EXPECT_CALL(*stream, Read).WillOnce(Return(false)); - EXPECT_CALL(*stream, Finish()) - .WillOnce(Return(grpc::Status(grpc::StatusCode::INTERNAL, "retry"))); - - EXPECT_CALL(*retry_policy_, OnFailure(An())) - .WillOnce(Return(true)); - EXPECT_CALL(*backoff_policy_, OnCompletion(An())) - .WillOnce(Return(std::chrono::milliseconds(0))); - - // the stub will free it - auto* stream_retry = - new MockReadRowsReader("google.bigtable.v2.Bigtable.ReadRows"); - // First row should be removed from the retried request, leaving one row - EXPECT_CALL(*client_, ReadRows(_, RequestWithRowKeysCount(1))) - .WillOnce(stream_retry->MakeMockReturner()); - EXPECT_CALL(*stream_retry, Read).WillOnce(Return(false)); - EXPECT_CALL(*stream_retry, Finish()).WillOnce(Return(grpc::Status::OK)); - } - - parser_factory_->AddParser(std::move(parser)); - auto impl = std::make_shared( - client_, kTableName, bigtable::RowSet("r1", "r2"), - bigtable::RowReader::NO_ROWS_LIMIT, bigtable::Filter::PassAllFilter(), - std::move(retry_policy_), std::move(backoff_policy_), - metadata_update_policy_, std::move(parser_factory_)); - auto reader = MakeRowReader(std::move(impl)); - - auto it = reader.begin(); - EXPECT_NE(it, reader.end()); - ASSERT_STATUS_OK(*it); - EXPECT_EQ((*it)->row_key(), "r1"); - EXPECT_EQ(++it, reader.end()); -} - -TEST_F(LegacyRowReaderTest, RetrySkipsAlreadyScannedRows) { - auto* stream = new MockReadRowsReader("google.bigtable.v2.Bigtable.ReadRows"); - auto parser = std::make_unique(); - parser->SetRows({"r1"}); - google::bigtable::v2::ReadRowsResponse response; - response.set_last_scanned_row_key("r2"); - { - ::testing::InSequence s; - // We start our call with 3 rows in the set: "r1", "r2", "r3". - EXPECT_CALL(*client_, ReadRows(_, RequestWithRowKeysCount(3))) - .WillOnce(stream->MakeMockReturner()); - - // The mock `parser` will return "r1". Next, simulate the server returning - // an empty chunk with `last_scanned_row_key` set to "r2". - EXPECT_CALL(*stream, Read) - .WillOnce(DoAll(SetArgPointee<0>(response), Return(true))); - - // The stream fails with a retry-able error - EXPECT_CALL(*stream, Read).WillOnce(Return(false)); - EXPECT_CALL(*stream, Finish()) - .WillOnce(Return(grpc::Status(grpc::StatusCode::INTERNAL, "retry"))); - - EXPECT_CALL(*retry_policy_, OnFailure(An())) - .WillOnce(Return(true)); - EXPECT_CALL(*backoff_policy_, OnCompletion(An())) - .WillOnce(Return(std::chrono::milliseconds(0))); - - auto* stream_retry = - new MockReadRowsReader("google.bigtable.v2.Bigtable.ReadRows"); - - // We retry the remaining rows. We have "r1" returned, but the service has - // also told us that "r2" was scanned. This means there is only one row - // remaining to read: "r3". - EXPECT_CALL(*client_, ReadRows(_, RequestWithRowKeysCount(1))) - .WillOnce(stream_retry->MakeMockReturner()); - - // End the stream to clean up the test - EXPECT_CALL(*stream_retry, Read).WillOnce(Return(false)); - EXPECT_CALL(*stream_retry, Finish()).WillOnce(Return(grpc::Status::OK)); - } - - parser_factory_->AddParser(std::move(parser)); - auto impl = std::make_shared( - client_, kTableName, bigtable::RowSet("r1", "r2", "r3"), - bigtable::RowReader::NO_ROWS_LIMIT, bigtable::Filter::PassAllFilter(), - std::move(retry_policy_), std::move(backoff_policy_), - metadata_update_policy_, std::move(parser_factory_)); - auto reader = MakeRowReader(std::move(impl)); - - auto it = reader.begin(); - EXPECT_NE(it, reader.end()); - ASSERT_STATUS_OK(*it); - EXPECT_EQ((*it)->row_key(), "r1"); - EXPECT_EQ(++it, reader.end()); -} - -TEST_F(LegacyRowReaderTest, FailedParseIsRetried) { - // wrapped in unique_ptr by ReadRows - auto* stream = new MockReadRowsReader("google.bigtable.v2.Bigtable.ReadRows"); - auto parser = std::make_unique(); - parser->SetRows({"r1"}); - auto response = bigtable::testing::ReadRowsResponseFromString("chunks {}"); - { - ::testing::InSequence s; - EXPECT_CALL(*client_, ReadRows).WillOnce(stream->MakeMockReturner()); - EXPECT_CALL(*stream, Read) - .WillOnce(DoAll(SetArgPointee<0>(response), Return(true))); - EXPECT_CALL(*parser, HandleChunkHook) - .WillOnce(SetArgReferee<1>( - grpc::Status(grpc::StatusCode::INTERNAL, "parser exception"))); - - EXPECT_CALL(*retry_policy_, OnFailure(An())) - .WillOnce(Return(true)); - EXPECT_CALL(*backoff_policy_, OnCompletion(An())) - .WillOnce(Return(std::chrono::milliseconds(0))); - - // the stub will free it - auto* stream_retry = - new MockReadRowsReader("google.bigtable.v2.Bigtable.ReadRows"); - EXPECT_CALL(*client_, ReadRows).WillOnce(stream_retry->MakeMockReturner()); - EXPECT_CALL(*stream_retry, Read).WillOnce(Return(true)); - EXPECT_CALL(*stream_retry, Read).WillOnce(Return(false)); - EXPECT_CALL(*stream_retry, Finish()).WillOnce(Return(grpc::Status::OK)); - } - - parser_factory_->AddParser(std::move(parser)); - auto impl = std::make_shared( - client_, kTableName, bigtable::RowSet(), - bigtable::RowReader::NO_ROWS_LIMIT, bigtable::Filter::PassAllFilter(), - std::move(retry_policy_), std::move(backoff_policy_), - metadata_update_policy_, std::move(parser_factory_)); - auto reader = MakeRowReader(std::move(impl)); - - auto it = reader.begin(); - EXPECT_NE(it, reader.end()); - ASSERT_STATUS_OK(*it); - EXPECT_EQ((*it)->row_key(), "r1"); - EXPECT_EQ(++it, reader.end()); -} - -TEST_F(LegacyRowReaderTest, FailedParseSkipsAlreadyReadRows) { - // wrapped in unique_ptr by ReadRows - auto* stream = new MockReadRowsReader("google.bigtable.v2.Bigtable.ReadRows"); - auto parser = std::make_unique(); - parser->SetRows({"r1"}); - { - ::testing::InSequence s; - // As a baseline, check we have two rows in the initial request - EXPECT_CALL(*client_, ReadRows(_, RequestWithRowKeysCount(2))) - .WillOnce(stream->MakeMockReturner()); - - EXPECT_CALL(*stream, Read).WillOnce(Return(true)); - EXPECT_CALL(*stream, Read).WillOnce(Return(false)); - EXPECT_CALL(*stream, Finish()).WillOnce(Return(grpc::Status::OK)); - EXPECT_CALL(*parser, HandleEndOfStreamHook) - .WillOnce(SetArgReferee<0>( - grpc::Status(grpc::StatusCode::INTERNAL, "InternalError"))); - - EXPECT_CALL(*retry_policy_, OnFailure(An())) - .WillOnce(Return(true)); - EXPECT_CALL(*backoff_policy_, OnCompletion(An())) - .WillOnce(Return(std::chrono::milliseconds(0))); - - // the stub will free it - auto* stream_retry = - new MockReadRowsReader("google.bigtable.v2.Bigtable.ReadRows"); - // First row should be removed from the retried request, leaving one row - EXPECT_CALL(*client_, ReadRows(_, RequestWithRowKeysCount(1))) - .WillOnce(stream_retry->MakeMockReturner()); - EXPECT_CALL(*stream_retry, Read).WillOnce(Return(false)); - EXPECT_CALL(*stream_retry, Finish()).WillOnce(Return(grpc::Status::OK)); - } - - parser_factory_->AddParser(std::move(parser)); - auto impl = std::make_shared( - client_, kTableName, bigtable::RowSet("r1", "r2"), - bigtable::RowReader::NO_ROWS_LIMIT, bigtable::Filter::PassAllFilter(), - std::move(retry_policy_), std::move(backoff_policy_), - metadata_update_policy_, std::move(parser_factory_)); - auto reader = MakeRowReader(std::move(impl)); - - auto it = reader.begin(); - EXPECT_NE(it, reader.end()); - ASSERT_STATUS_OK(*it); - EXPECT_EQ((*it)->row_key(), "r1"); - EXPECT_EQ(++it, reader.end()); -} - -TEST_F(LegacyRowReaderTest, FailedParseSkipsAlreadyScannedRows) { - auto* stream = new MockReadRowsReader("google.bigtable.v2.Bigtable.ReadRows"); - auto parser = std::make_unique(); - parser->SetRows({"r1"}); - google::bigtable::v2::ReadRowsResponse response; - response.set_last_scanned_row_key("r2"); - { - ::testing::InSequence s; - // We start our call with 3 rows in the set: "r1", "r2", "r3". - EXPECT_CALL(*client_, ReadRows(_, RequestWithRowKeysCount(3))) - .WillOnce(stream->MakeMockReturner()); - - // The mock `parser` will return "r1". Next, simulate the server returning - // an empty chunk with `last_scanned_row_key` set to "r2". - EXPECT_CALL(*stream, Read) - .WillOnce(DoAll(SetArgPointee<0>(response), Return(true))); - - // The stream fails with a retry-able error - EXPECT_CALL(*stream, Read).WillOnce(Return(false)); - EXPECT_CALL(*stream, Finish()).WillOnce(Return(grpc::Status::OK)); - EXPECT_CALL(*parser, HandleEndOfStreamHook) - .WillOnce(SetArgReferee<0>( - grpc::Status(grpc::StatusCode::INTERNAL, "InternalError"))); - - EXPECT_CALL(*retry_policy_, OnFailure(An())) - .WillOnce(Return(true)); - EXPECT_CALL(*backoff_policy_, OnCompletion(An())) - .WillOnce(Return(std::chrono::milliseconds(0))); - - auto* stream_retry = - new MockReadRowsReader("google.bigtable.v2.Bigtable.ReadRows"); - - // We retry the remaining rows. We have "r1" returned, but the service has - // also told us that "r2" was scanned. This means there is only one row - // remaining to read: "r3". - EXPECT_CALL(*client_, ReadRows(_, RequestWithRowKeysCount(1))) - .WillOnce(stream_retry->MakeMockReturner()); - - // End the stream to clean up the test - EXPECT_CALL(*stream_retry, Read).WillOnce(Return(false)); - EXPECT_CALL(*stream_retry, Finish()).WillOnce(Return(grpc::Status::OK)); - } - - parser_factory_->AddParser(std::move(parser)); - auto impl = std::make_shared( - client_, kTableName, bigtable::RowSet("r1", "r2", "r3"), - bigtable::RowReader::NO_ROWS_LIMIT, bigtable::Filter::PassAllFilter(), - std::move(retry_policy_), std::move(backoff_policy_), - metadata_update_policy_, std::move(parser_factory_)); - auto reader = MakeRowReader(std::move(impl)); - - auto it = reader.begin(); - EXPECT_NE(it, reader.end()); - ASSERT_STATUS_OK(*it); - EXPECT_EQ((*it)->row_key(), "r1"); - EXPECT_EQ(++it, reader.end()); -} - -TEST_F(LegacyRowReaderTest, FailedParseWithPermanentError) { - // wrapped in unique_ptr by ReadRows - auto* stream = new MockReadRowsReader("google.bigtable.v2.Bigtable.ReadRows"); - auto parser = std::make_unique(); - { - ::testing::InSequence s; - - EXPECT_CALL(*client_, ReadRows).WillOnce(stream->MakeMockReturner()); - EXPECT_CALL(*stream, Read).WillOnce(Return(false)); - EXPECT_CALL(*stream, Finish()).WillOnce(Return(grpc::Status::OK)); - EXPECT_CALL(*parser, HandleEndOfStreamHook) - .WillOnce(SetArgReferee<0>( - grpc::Status(grpc::StatusCode::INTERNAL, "InternalError"))); - EXPECT_CALL(*retry_policy_, OnFailure(An())) - .WillOnce(Return(false)); - EXPECT_CALL(*backoff_policy_, OnCompletion(An())).Times(0); - } - - parser_factory_->AddParser(std::move(parser)); - auto impl = std::make_shared( - client_, kTableName, bigtable::RowSet(), - bigtable::RowReader::NO_ROWS_LIMIT, bigtable::Filter::PassAllFilter(), - std::move(retry_policy_), std::move(backoff_policy_), - metadata_update_policy_, std::move(parser_factory_)); - auto reader = MakeRowReader(std::move(impl)); - - auto it = reader.begin(); - EXPECT_NE(it, reader.end()); - EXPECT_THAT(*it, StatusIs(StatusCode::kInternal)); - EXPECT_EQ(++it, reader.end()); -} - -TEST_F(LegacyRowReaderTest, NoRetryOnEmptyRowSet) { - // wrapped in unique_ptr by ReadRows - auto* stream = new MockReadRowsReader("google.bigtable.v2.Bigtable.ReadRows"); - auto parser = std::make_unique(); - parser->SetRows({"r2"}); - { - ::testing::InSequence s; - EXPECT_CALL(*client_, ReadRows).WillOnce(stream->MakeMockReturner()); - - EXPECT_CALL(*stream, Read).WillOnce(Return(true)); - EXPECT_CALL(*stream, Read).WillOnce(Return(false)); - EXPECT_CALL(*stream, Finish()) - .WillOnce(Return(grpc::Status(grpc::StatusCode::INTERNAL, - "this exception must be ignored"))); - - // Note there is no expectation of a new connection, because the - // set of rows to read should become empty after reading "r2" and - // intersecting the requested ["r1", "r2"] with ("r2", "") for the - // retry. - } - - parser_factory_->AddParser(std::move(parser)); - auto impl = std::make_shared( - client_, kTableName, - bigtable::RowSet(bigtable::RowRange::Closed("r1", "r2")), - bigtable::RowReader::NO_ROWS_LIMIT, bigtable::Filter::PassAllFilter(), - std::move(retry_policy_), std::move(backoff_policy_), - metadata_update_policy_, std::move(parser_factory_)); - auto reader = MakeRowReader(std::move(impl)); - - auto it = reader.begin(); - EXPECT_NE(it, reader.end()); - ASSERT_STATUS_OK(*it); - EXPECT_EQ((*it)->row_key(), "r2"); - EXPECT_EQ(++it, reader.end()); -} - -TEST_F(LegacyRowReaderTest, RowLimitIsSent) { - // wrapped in unique_ptr by ReadRows - auto* stream = new MockReadRowsReader("google.bigtable.v2.Bigtable.ReadRows"); - EXPECT_CALL(*client_, ReadRows(_, RequestWithRowsLimit(442))) - .WillOnce(stream->MakeMockReturner()); - EXPECT_CALL(*stream, Read).WillOnce(Return(false)); - EXPECT_CALL(*stream, Finish()).WillOnce(Return(grpc::Status::OK)); - - auto impl = std::make_shared( - client_, kTableName, bigtable::RowSet(), 442, - bigtable::Filter::PassAllFilter(), std::move(retry_policy_), - std::move(backoff_policy_), metadata_update_policy_, - std::move(parser_factory_)); - auto reader = MakeRowReader(std::move(impl)); - - auto it = reader.begin(); - EXPECT_EQ(it, reader.end()); -} - -TEST_F(LegacyRowReaderTest, RowLimitIsDecreasedOnRetry) { - // wrapped in unique_ptr by ReadRows - auto* stream = new MockReadRowsReader("google.bigtable.v2.Bigtable.ReadRows"); - auto parser = std::make_unique(); - parser->SetRows({"r1"}); - { - ::testing::InSequence s; - EXPECT_CALL(*client_, ReadRows(_, RequestWithRowsLimit(42))) - .WillOnce(stream->MakeMockReturner()); - - EXPECT_CALL(*stream, Read).WillOnce(Return(true)); - EXPECT_CALL(*stream, Read).WillOnce(Return(false)); - EXPECT_CALL(*stream, Finish()) - .WillOnce(Return(grpc::Status(grpc::StatusCode::INTERNAL, "retry"))); - - EXPECT_CALL(*retry_policy_, OnFailure(An())) - .WillOnce(Return(true)); - EXPECT_CALL(*backoff_policy_, OnCompletion(An())) - .WillOnce(Return(std::chrono::milliseconds(0))); - - // the stub will free it - auto* stream_retry = - new MockReadRowsReader("google.bigtable.v2.Bigtable.ReadRows"); - // 41 instead of 42 - EXPECT_CALL(*client_, ReadRows(_, RequestWithRowsLimit(41))) - .WillOnce(stream_retry->MakeMockReturner()); - EXPECT_CALL(*stream_retry, Read).WillOnce(Return(false)); - EXPECT_CALL(*stream_retry, Finish()).WillOnce(Return(grpc::Status::OK)); - } - - parser_factory_->AddParser(std::move(parser)); - auto impl = std::make_shared( - client_, kTableName, bigtable::RowSet(), 42, - bigtable::Filter::PassAllFilter(), std::move(retry_policy_), - std::move(backoff_policy_), metadata_update_policy_, - std::move(parser_factory_)); - auto reader = MakeRowReader(std::move(impl)); - - auto it = reader.begin(); - EXPECT_NE(it, reader.end()); - ASSERT_STATUS_OK(*it); - EXPECT_EQ((*it)->row_key(), "r1"); - EXPECT_EQ(++it, reader.end()); -} - -TEST_F(LegacyRowReaderTest, NoRetryIfRowLimitIsReached) { - // wrapped in unique_ptr by ReadRows - auto* stream = new MockReadRowsReader("google.bigtable.v2.Bigtable.ReadRows"); - auto parser = std::make_unique(); - parser->SetRows({"r1"}); - { - ::testing::InSequence s; - EXPECT_CALL(*client_, ReadRows(_, RequestWithRowsLimit(1))) - .WillOnce(stream->MakeMockReturner()); - - EXPECT_CALL(*stream, Read).WillOnce(Return(true)); - EXPECT_CALL(*stream, Read).WillOnce(Return(false)); - EXPECT_CALL(*stream, Finish()) - .WillOnce(Return(grpc::Status(grpc::StatusCode::INTERNAL, - "this exception must be ignored"))); - - // Note there is no expectation of a new connection, because the - // row limit reaches zero. - } - - parser_factory_->AddParser(std::move(parser)); - auto impl = std::make_shared( - client_, kTableName, bigtable::RowSet(), 1, - bigtable::Filter::PassAllFilter(), std::move(retry_policy_), - std::move(backoff_policy_), metadata_update_policy_, - std::move(parser_factory_)); - auto reader = MakeRowReader(std::move(impl)); - - auto it = reader.begin(); - EXPECT_NE(it, reader.end()); - ASSERT_STATUS_OK(*it); - EXPECT_EQ((*it)->row_key(), "r1"); - EXPECT_EQ(++it, reader.end()); -} - -TEST_F(LegacyRowReaderTest, CancelDrainsStream) { - auto parser = std::make_unique(); - parser->SetRows({"r1"}); - auto* stream = new MockReadRowsReader("google.bigtable.v2.Bigtable.ReadRows"); - { - ::testing::InSequence s; - EXPECT_CALL(*client_, ReadRows).WillOnce(stream->MakeMockReturner()); - EXPECT_CALL(*stream, Read).WillOnce(Return(true)); - EXPECT_CALL(*stream, Read).WillOnce(Return(true)); - EXPECT_CALL(*stream, Read).WillOnce(Return(true)); - EXPECT_CALL(*stream, Read).WillOnce(Return(false)); - EXPECT_CALL(*stream, Finish()).WillOnce(Return(grpc::Status::OK)); - } - - parser_factory_->AddParser(std::move(parser)); - auto impl = std::make_shared( - client_, kTableName, bigtable::RowSet(), - bigtable::RowReader::NO_ROWS_LIMIT, bigtable::Filter::PassAllFilter(), - std::move(retry_policy_), std::move(backoff_policy_), - metadata_update_policy_, std::move(parser_factory_)); - auto reader = MakeRowReader(std::move(impl)); - - auto it = reader.begin(); - EXPECT_NE(it, reader.end()); - ASSERT_STATUS_OK(*it); - EXPECT_EQ((*it)->row_key(), "r1"); - EXPECT_NE(it, reader.end()); - // Manually cancel the call. - reader.Cancel(); - it = reader.begin(); - EXPECT_NE(it, reader.end()); - EXPECT_THAT(*it, StatusIs(StatusCode::kCancelled)); - EXPECT_EQ(++it, reader.end()); -} - -TEST_F(LegacyRowReaderTest, CancelBeforeBegin) { - auto impl = std::make_shared( - client_, kTableName, bigtable::RowSet(), - bigtable::RowReader::NO_ROWS_LIMIT, bigtable::Filter::PassAllFilter(), - std::move(retry_policy_), std::move(backoff_policy_), - metadata_update_policy_, std::move(parser_factory_)); - auto reader = MakeRowReader(std::move(impl)); - - // Manually cancel the call before a stream was created. - reader.Cancel(); - reader.begin(); - - auto it = reader.begin(); - EXPECT_NE(it, reader.end()); - EXPECT_THAT(*it, StatusIs(StatusCode::kCancelled)); - EXPECT_EQ(++it, reader.end()); -} - -TEST_F(LegacyRowReaderTest, ConstructorDoesNotCallRpc) { - // The RowReader constructor/destructor by themselves should not - // invoke the RPC or create parsers (the latter restriction because - // parsers are per-connection and non-reusable). - EXPECT_CALL(*client_, ReadRows).Times(0); - EXPECT_CALL(*parser_factory_, CreateHook()).Times(0); - - auto impl = std::make_shared( - client_, kTableName, bigtable::RowSet(), - bigtable::RowReader::NO_ROWS_LIMIT, bigtable::Filter::PassAllFilter(), - std::move(retry_policy_), std::move(backoff_policy_), - metadata_update_policy_, std::move(parser_factory_)); - auto reader = MakeRowReader(std::move(impl)); -} - -TEST_F(LegacyRowReaderTest, RetryUsesNewContext) { - // Every retry should use a new ClientContext object. - // wrapped in unique_ptr by ReadRows - auto* stream = new MockReadRowsReader("google.bigtable.v2.Bigtable.ReadRows"); - auto parser = std::make_unique(); - parser->SetRows({"r1"}); - - void* previous_context = nullptr; - EXPECT_CALL(*retry_policy_, Setup) - .Times(2) - .WillRepeatedly([&previous_context](grpc::ClientContext& context) { - // This is a big hack, we want to make sure the context is new, - // but there is no easy way to check that, so we compare addresses. - EXPECT_NE(previous_context, &context); - previous_context = &context; - }); - - { - ::testing::InSequence s; - EXPECT_CALL(*client_, ReadRows).WillOnce(stream->MakeMockReturner()); - EXPECT_CALL(*stream, Read).WillOnce(Return(false)); - EXPECT_CALL(*stream, Finish()) - .WillOnce(Return(grpc::Status(grpc::StatusCode::INTERNAL, "retry"))); - - EXPECT_CALL(*retry_policy_, OnFailure(An())) - .WillOnce(Return(true)); - EXPECT_CALL(*backoff_policy_, OnCompletion(An())) - .WillOnce(Return(std::chrono::milliseconds(0))); - - // the stub will free it - auto* stream_retry = - new MockReadRowsReader("google.bigtable.v2.Bigtable.ReadRows"); - EXPECT_CALL(*client_, ReadRows).WillOnce(stream_retry->MakeMockReturner()); - EXPECT_CALL(*stream_retry, Read).WillOnce(Return(true)); - EXPECT_CALL(*stream_retry, Read).WillOnce(Return(false)); - EXPECT_CALL(*stream_retry, Finish()).WillOnce(Return(grpc::Status::OK)); - } - - parser_factory_->AddParser(std::move(parser)); - auto impl = std::make_shared( - client_, kTableName, bigtable::RowSet(), - bigtable::RowReader::NO_ROWS_LIMIT, bigtable::Filter::PassAllFilter(), - std::move(retry_policy_), std::move(backoff_policy_), - metadata_update_policy_, std::move(parser_factory_)); - auto reader = MakeRowReader(std::move(impl)); - - auto it = reader.begin(); - EXPECT_NE(it, reader.end()); - ASSERT_STATUS_OK(*it); - EXPECT_EQ((*it)->row_key(), "r1"); - EXPECT_EQ(++it, reader.end()); -} - -} // anonymous namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable_internal -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/internal/logging_data_client.cc b/google/cloud/bigtable/internal/logging_data_client.cc deleted file mode 100644 index 6ad103af673a9..0000000000000 --- a/google/cloud/bigtable/internal/logging_data_client.cc +++ /dev/null @@ -1,240 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/internal/logging_data_client.h" -#include "google/cloud/bigtable/internal/common_client.h" -#include "google/cloud/internal/debug_string_protobuf.h" -#include "google/cloud/internal/log_wrapper.h" -#include "google/cloud/log.h" -#include "google/cloud/tracing_options.h" -#include -#include - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace internal { -namespace { - -using ::google::cloud::internal::DebugString; -using ::google::cloud::internal::IsUniquePtr; - -template , - std::enable_if_t::value, int> = 0> -Result LogWrapper(Functor&& functor, grpc::ClientContext* context, - Request const& request, Response* response, char const* where, - TracingOptions const& options) { - GCP_LOG(DEBUG) << where << "() << " << DebugString(request, options); - auto status = functor(context, request, response); - if (!status.ok()) { - GCP_LOG(DEBUG) << where << "() >> status=" - << DebugString(MakeStatusFromRpcError(status), options); - } else { - GCP_LOG(DEBUG) << where - << "() >> response=" << DebugString(*response, options); - } - return status; -} - -template , - std::enable_if_t::value, int> = 0> -Result LogWrapper(Functor&& functor, grpc::ClientContext* context, - Request const& request, char const* where, - TracingOptions const& options) { - GCP_LOG(DEBUG) << where << "() << " << DebugString(request, options); - auto response = functor(context, request); - GCP_LOG(DEBUG) << where << "() >> " << (response ? "not null" : "null") - << " stream"; - return response; -} - -template < - typename Functor, typename Request, - typename Result = google::cloud::internal::invoke_result_t< - Functor, grpc::ClientContext*, Request const&, grpc::CompletionQueue*>, - std::enable_if_t::value, int> = 0> -Result LogWrapper(Functor&& functor, grpc::ClientContext* context, - Request const& request, grpc::CompletionQueue* cq, - char const* where, TracingOptions const& options) { - GCP_LOG(DEBUG) << where << "() << " << DebugString(request, options); - auto response = functor(context, request, cq); - GCP_LOG(DEBUG) << where << "() >> " << (response ? "not null" : "null") - << " async response reader"; - return response; -} - -} // namespace - -namespace btproto = ::google::bigtable::v2; - -grpc::Status LoggingDataClient::MutateRow( - grpc::ClientContext* context, btproto::MutateRowRequest const& request, - btproto::MutateRowResponse* response) { - return LogWrapper( - [this](grpc::ClientContext* context, - btproto::MutateRowRequest const& request, - btproto::MutateRowResponse* response) { - return child_->MutateRow(context, request, response); - }, - context, request, response, __func__, tracing_options_); -} - -std::unique_ptr< - grpc::ClientAsyncResponseReaderInterface> -LoggingDataClient::AsyncMutateRow(grpc::ClientContext* context, - btproto::MutateRowRequest const& request, - grpc::CompletionQueue* cq) { - return child_->AsyncMutateRow(context, request, cq); -} - -grpc::Status LoggingDataClient::CheckAndMutateRow( - grpc::ClientContext* context, - btproto::CheckAndMutateRowRequest const& request, - btproto::CheckAndMutateRowResponse* response) { - return LogWrapper( - [this](grpc::ClientContext* context, - btproto::CheckAndMutateRowRequest const& request, - btproto::CheckAndMutateRowResponse* response) { - return child_->CheckAndMutateRow(context, request, response); - }, - context, request, response, __func__, tracing_options_); -} - -std::unique_ptr> -LoggingDataClient::AsyncCheckAndMutateRow( - grpc::ClientContext* context, - google::bigtable::v2::CheckAndMutateRowRequest const& request, - grpc::CompletionQueue* cq) { - return child_->AsyncCheckAndMutateRow(context, request, cq); -} - -grpc::Status LoggingDataClient::ReadModifyWriteRow( - grpc::ClientContext* context, - btproto::ReadModifyWriteRowRequest const& request, - btproto::ReadModifyWriteRowResponse* response) { - return LogWrapper( - [this](grpc::ClientContext* context, - btproto::ReadModifyWriteRowRequest const& request, - btproto::ReadModifyWriteRowResponse* response) { - return child_->ReadModifyWriteRow(context, request, response); - }, - context, request, response, __func__, tracing_options_); -} - -std::unique_ptr> -LoggingDataClient::AsyncReadModifyWriteRow( - grpc::ClientContext* context, - google::bigtable::v2::ReadModifyWriteRowRequest const& request, - grpc::CompletionQueue* cq) { - return child_->AsyncReadModifyWriteRow(context, request, cq); -} - -std::unique_ptr> -LoggingDataClient::ReadRows(grpc::ClientContext* context, - btproto::ReadRowsRequest const& request) { - return LogWrapper( - [this](grpc::ClientContext* context, - btproto::ReadRowsRequest const& request) { - return child_->ReadRows(context, request); - }, - context, request, __func__, tracing_options_); -} - -std::unique_ptr> -LoggingDataClient::AsyncReadRows( - grpc::ClientContext* context, - google::bigtable::v2::ReadRowsRequest const& request, - grpc::CompletionQueue* cq, void* tag) { - return child_->AsyncReadRows(context, request, cq, tag); -} - -std::unique_ptr<::grpc::ClientAsyncReaderInterface< - ::google::bigtable::v2::ReadRowsResponse>> -LoggingDataClient::PrepareAsyncReadRows( - ::grpc::ClientContext* context, - ::google::bigtable::v2::ReadRowsRequest const& request, - ::grpc::CompletionQueue* cq) { - return child_->PrepareAsyncReadRows(context, request, cq); -} - -std::unique_ptr> -LoggingDataClient::SampleRowKeys(grpc::ClientContext* context, - btproto::SampleRowKeysRequest const& request) { - return LogWrapper( - [this](grpc::ClientContext* context, - btproto::SampleRowKeysRequest const& request) { - return child_->SampleRowKeys(context, request); - }, - context, request, __func__, tracing_options_); -} - -std::unique_ptr<::grpc::ClientAsyncReaderInterface< - ::google::bigtable::v2::SampleRowKeysResponse>> -LoggingDataClient::AsyncSampleRowKeys( - ::grpc::ClientContext* context, - ::google::bigtable::v2::SampleRowKeysRequest const& request, - ::grpc::CompletionQueue* cq, void* tag) { - return child_->AsyncSampleRowKeys(context, request, cq, tag); -} - -std::unique_ptr<::grpc::ClientAsyncReaderInterface< - ::google::bigtable::v2::SampleRowKeysResponse>> -LoggingDataClient::PrepareAsyncSampleRowKeys( - ::grpc::ClientContext* context, - ::google::bigtable::v2::SampleRowKeysRequest const& request, - ::grpc::CompletionQueue* cq) { - return child_->PrepareAsyncSampleRowKeys(context, request, cq); -} - -std::unique_ptr> -LoggingDataClient::MutateRows(grpc::ClientContext* context, - btproto::MutateRowsRequest const& request) { - return LogWrapper( - [this](grpc::ClientContext* context, - btproto::MutateRowsRequest const& request) { - return child_->MutateRows(context, request); - }, - context, request, __func__, tracing_options_); -} - -std::unique_ptr<::grpc::ClientAsyncReaderInterface< - ::google::bigtable::v2::MutateRowsResponse>> -LoggingDataClient::AsyncMutateRows( - ::grpc::ClientContext* context, - ::google::bigtable::v2::MutateRowsRequest const& request, - ::grpc::CompletionQueue* cq, void* tag) { - return child_->AsyncMutateRows(context, request, cq, tag); -} - -std::unique_ptr<::grpc::ClientAsyncReaderInterface< - ::google::bigtable::v2::MutateRowsResponse>> -LoggingDataClient::PrepareAsyncMutateRows( - ::grpc::ClientContext* context, - ::google::bigtable::v2::MutateRowsRequest const& request, - ::grpc::CompletionQueue* cq) { - return child_->PrepareAsyncMutateRows(context, request, cq); -} - -} // namespace internal -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/internal/logging_data_client.h b/google/cloud/bigtable/internal/logging_data_client.h deleted file mode 100644 index a31961cdebf22..0000000000000 --- a/google/cloud/bigtable/internal/logging_data_client.h +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_LOGGING_DATA_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_LOGGING_DATA_CLIENT_H - -#include "google/cloud/bigtable/data_client.h" -#include -#include -// TODO(#8800) - delete this class when deprecation is complete -#include "google/cloud/internal/disable_deprecation_warnings.inc" - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace internal { - -namespace btproto = ::google::bigtable::v2; - -/** - * Implement a logging DataClient. - * - * This implementation does not support multiple threads, or refresh - * authorization tokens. In other words, it is extremely bare bones. - */ -class LoggingDataClient : public DataClient { - public: - LoggingDataClient(std::shared_ptr child, - google::cloud::TracingOptions options) - : child_(std::move(child)), tracing_options_(std::move(options)) {} - - std::string const& project_id() const override { - return child_->project_id(); - } - - std::string const& instance_id() const override { - return child_->instance_id(); - } - - std::shared_ptr Channel() override { - return child_->Channel(); - } - - void reset() override { child_->reset(); } - - grpc::Status MutateRow(grpc::ClientContext* context, - btproto::MutateRowRequest const& request, - btproto::MutateRowResponse* response) override; - - std::unique_ptr< - grpc::ClientAsyncResponseReaderInterface> - AsyncMutateRow(grpc::ClientContext* context, - btproto::MutateRowRequest const& request, - grpc::CompletionQueue* cq) override; - - grpc::Status CheckAndMutateRow( - grpc::ClientContext* context, - btproto::CheckAndMutateRowRequest const& request, - btproto::CheckAndMutateRowResponse* response) override; - - std::unique_ptr> - AsyncCheckAndMutateRow( - grpc::ClientContext* context, - google::bigtable::v2::CheckAndMutateRowRequest const& request, - grpc::CompletionQueue* cq) override; - - grpc::Status ReadModifyWriteRow( - grpc::ClientContext* context, - btproto::ReadModifyWriteRowRequest const& request, - btproto::ReadModifyWriteRowResponse* response) override; - - std::unique_ptr> - AsyncReadModifyWriteRow( - grpc::ClientContext* context, - google::bigtable::v2::ReadModifyWriteRowRequest const& request, - grpc::CompletionQueue* cq) override; - - std::unique_ptr> - ReadRows(grpc::ClientContext* context, - btproto::ReadRowsRequest const& request) override; - - std::unique_ptr> - AsyncReadRows(grpc::ClientContext* context, - google::bigtable::v2::ReadRowsRequest const& request, - grpc::CompletionQueue* cq, void* tag) override; - - std::unique_ptr<::grpc::ClientAsyncReaderInterface< - ::google::bigtable::v2::ReadRowsResponse>> - PrepareAsyncReadRows(::grpc::ClientContext* context, - ::google::bigtable::v2::ReadRowsRequest const& request, - ::grpc::CompletionQueue* cq) override; - - std::unique_ptr> - SampleRowKeys(grpc::ClientContext* context, - btproto::SampleRowKeysRequest const& request) override; - - std::unique_ptr<::grpc::ClientAsyncReaderInterface< - ::google::bigtable::v2::SampleRowKeysResponse>> - AsyncSampleRowKeys( - ::grpc::ClientContext* context, - ::google::bigtable::v2::SampleRowKeysRequest const& request, - ::grpc::CompletionQueue* cq, void* tag) override; - std::unique_ptr<::grpc::ClientAsyncReaderInterface< - ::google::bigtable::v2::SampleRowKeysResponse>> - PrepareAsyncSampleRowKeys( - ::grpc::ClientContext* context, - ::google::bigtable::v2::SampleRowKeysRequest const& request, - ::grpc::CompletionQueue* cq) override; - - std::unique_ptr> - MutateRows(grpc::ClientContext* context, - btproto::MutateRowsRequest const& request) override; - - std::unique_ptr<::grpc::ClientAsyncReaderInterface< - ::google::bigtable::v2::MutateRowsResponse>> - AsyncMutateRows(::grpc::ClientContext* context, - ::google::bigtable::v2::MutateRowsRequest const& request, - ::grpc::CompletionQueue* cq, void* tag) override; - - std::unique_ptr<::grpc::ClientAsyncReaderInterface< - ::google::bigtable::v2::MutateRowsResponse>> - PrepareAsyncMutateRows( - ::grpc::ClientContext* context, - ::google::bigtable::v2::MutateRowsRequest const& request, - ::grpc::CompletionQueue* cq) override; - - private: - google::cloud::BackgroundThreadsFactory BackgroundThreadsFactory() override { - return child_->BackgroundThreadsFactory(); - } - - std::shared_ptr child_; - google::cloud::TracingOptions tracing_options_; -}; - -} // namespace internal -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google - -// TODO(#8800) - delete this class when deprecation is complete -#include "google/cloud/internal/diagnostics_pop.inc" - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_LOGGING_DATA_CLIENT_H diff --git a/google/cloud/bigtable/internal/logging_data_client_test.cc b/google/cloud/bigtable/internal/logging_data_client_test.cc deleted file mode 100644 index 23177906ab7fb..0000000000000 --- a/google/cloud/bigtable/internal/logging_data_client_test.cc +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/internal/logging_data_client.h" -#include "google/cloud/bigtable/data_client.h" -#include "google/cloud/bigtable/testing/mock_data_client.h" -#include "google/cloud/testing_util/scoped_log.h" -#include - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -using ::testing::Contains; -using ::testing::HasSubstr; -using ::testing::Return; - -namespace btproto = ::google::bigtable::v2; - -class LoggingDataClientTest : public ::testing::Test { - protected: - static Status TransientError() { - return Status(StatusCode::kUnavailable, "try-again"); - } - - testing_util::ScopedLog log_; -}; - -TEST_F(LoggingDataClientTest, MutateRow) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, MutateRow).WillOnce(Return(grpc::Status())); - - internal::LoggingDataClient stub( - mock, TracingOptions{}.SetOptions("single_line_mode")); - - grpc::ClientContext context; - btproto::MutateRowRequest request; - btproto::MutateRowResponse response; - - auto status = stub.MutateRow(&context, request, &response); - - EXPECT_TRUE(status.ok()); - EXPECT_THAT(log_.ExtractLines(), Contains(HasSubstr("MutateRow"))); -} - -TEST_F(LoggingDataClientTest, CheckAndMutateRow) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, CheckAndMutateRow).WillOnce(Return(grpc::Status())); - - internal::LoggingDataClient stub( - mock, TracingOptions{}.SetOptions("single_line_mode")); - - grpc::ClientContext context; - btproto::CheckAndMutateRowRequest request; - btproto::CheckAndMutateRowResponse response; - - auto status = stub.CheckAndMutateRow(&context, request, &response); - - EXPECT_TRUE(status.ok()); - EXPECT_THAT(log_.ExtractLines(), Contains(HasSubstr("CheckAndMutateRow"))); -} - -TEST_F(LoggingDataClientTest, ReadModifyWriteRow) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, ReadModifyWriteRow).WillOnce(Return(grpc::Status())); - - internal::LoggingDataClient stub( - mock, TracingOptions{}.SetOptions("single_line_mode")); - - grpc::ClientContext context; - btproto::ReadModifyWriteRowRequest request; - btproto::ReadModifyWriteRowResponse response; - - auto status = stub.ReadModifyWriteRow(&context, request, &response); - - EXPECT_TRUE(status.ok()); - EXPECT_THAT(log_.ExtractLines(), Contains(HasSubstr("ReadModifyWriteRow"))); -} - -TEST_F(LoggingDataClientTest, ReadRows) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, ReadRows) - .WillOnce([](grpc::ClientContext*, btproto::ReadRowsRequest const&) { - return std::unique_ptr< - grpc::ClientReaderInterface>{}; - }); - - internal::LoggingDataClient stub( - mock, TracingOptions{}.SetOptions("single_line_mode")); - - grpc::ClientContext context; - btproto::ReadRowsRequest request; - - stub.ReadRows(&context, request); - - EXPECT_THAT(log_.ExtractLines(), Contains(HasSubstr("ReadRows"))); -} - -TEST_F(LoggingDataClientTest, SampleRowKeys) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, SampleRowKeys) - .WillOnce([](grpc::ClientContext*, btproto::SampleRowKeysRequest const&) { - return std::unique_ptr< - grpc::ClientReaderInterface>{}; - }); - - internal::LoggingDataClient stub( - mock, TracingOptions{}.SetOptions("single_line_mode")); - - grpc::ClientContext context; - btproto::SampleRowKeysRequest request; - - stub.SampleRowKeys(&context, request); - - EXPECT_THAT(log_.ExtractLines(), Contains(HasSubstr("SampleRowKeys"))); -} - -TEST_F(LoggingDataClientTest, MutateRows) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, MutateRows) - .WillOnce([](grpc::ClientContext*, btproto::MutateRowsRequest const&) { - return std::unique_ptr< - grpc::ClientReaderInterface>{}; - }); - - internal::LoggingDataClient stub( - mock, TracingOptions{}.SetOptions("single_line_mode")); - - grpc::ClientContext context; - btproto::MutateRowsRequest request; - - stub.MutateRows(&context, request); - - EXPECT_THAT(log_.ExtractLines(), Contains(HasSubstr("MutateRows"))); -} - -} // namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/internal/metrics.h b/google/cloud/bigtable/internal/metrics.h index 33ee4d8af64e9..743e58ac50b54 100644 --- a/google/cloud/bigtable/internal/metrics.h +++ b/google/cloud/bigtable/internal/metrics.h @@ -20,7 +20,7 @@ #include "google/cloud/bigtable/internal/operation_context.h" #include "google/cloud/bigtable/version.h" #include "google/cloud/status.h" -#include +#include "google/bigtable/v2/response_params.pb.h" #include #include #include diff --git a/google/cloud/bigtable/internal/metrics_test.cc b/google/cloud/bigtable/internal/metrics_test.cc index 37702baaa4632..41a8bb17b5b58 100644 --- a/google/cloud/bigtable/internal/metrics_test.cc +++ b/google/cloud/bigtable/internal/metrics_test.cc @@ -142,6 +142,17 @@ class MockMeter : public opentelemetry::metrics::Meter { opentelemetry::nostd::string_view, opentelemetry::nostd::string_view), (noexcept, override)); + + MOCK_METHOD(uintptr_t, + RegisterCallback, // NOLINT(bugprone-exception-escape) + (opentelemetry::metrics::MultiObservableCallbackPtr, void*, + opentelemetry::nostd::span< + opentelemetry::metrics::ObservableInstrument*>), + (noexcept, override)); + + MOCK_METHOD(void, + DeregisterCallback, // NOLINT(bugprone-exception-escape) + (uintptr_t), (noexcept, override)); #endif MOCK_METHOD(opentelemetry::nostd::shared_ptr, diff --git a/google/cloud/bigtable/internal/mutate_rows_limiter.h b/google/cloud/bigtable/internal/mutate_rows_limiter.h index 8cbde6f084c32..e3f251d08f621 100644 --- a/google/cloud/bigtable/internal/mutate_rows_limiter.h +++ b/google/cloud/bigtable/internal/mutate_rows_limiter.h @@ -21,7 +21,7 @@ #include "google/cloud/internal/clock.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/bigtable/v2/bigtable.pb.h" #include #include #include diff --git a/google/cloud/bigtable/internal/mutate_rows_limiter_test.cc b/google/cloud/bigtable/internal/mutate_rows_limiter_test.cc index c8636759728fd..d392d00c3ef73 100644 --- a/google/cloud/bigtable/internal/mutate_rows_limiter_test.cc +++ b/google/cloud/bigtable/internal/mutate_rows_limiter_test.cc @@ -278,7 +278,6 @@ TEST(MakeMutateRowsLimiter, LoggingDisabled) { } } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::DisableTracing; using ::google::cloud::testing_util::EnableTracing; using ::google::cloud::testing_util::MockCompletionQueueImpl; @@ -353,7 +352,6 @@ TEST(MakeMutateRowsLimiter, TracingDisabledAsync) { EXPECT_THAT(span_catcher->GetSpans(), IsEmpty()); } } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END diff --git a/google/cloud/bigtable/internal/operation_context_factory.cc b/google/cloud/bigtable/internal/operation_context_factory.cc index 039cf185aa5ee..39f45fdc3069c 100644 --- a/google/cloud/bigtable/internal/operation_context_factory.cc +++ b/google/cloud/bigtable/internal/operation_context_factory.cc @@ -21,7 +21,7 @@ #include "google/cloud/opentelemetry/monitoring_exporter.h" #include "google/cloud/internal/algorithm.h" #include "absl/strings/str_split.h" -#include +#include "google/api/monitored_resource.pb.h" #include #include #include @@ -214,15 +214,15 @@ void MetricsOperationContextFactory::InitializeProvider( auto& labels = *resource.mutable_labels(); auto const& attributes = pda.attributes.GetAttributes(); labels[kProjectLabel] = - absl::get(attributes.find(kProjectLabel)->second); + std::get(attributes.find(kProjectLabel)->second); labels[kInstanceLabel] = - absl::get(attributes.find(kInstanceLabel)->second); + std::get(attributes.find(kInstanceLabel)->second); labels[kTableLabel] = - absl::get(attributes.find(kTableLabel)->second); + std::get(attributes.find(kTableLabel)->second); labels[kClusterLabel] = - absl::get(attributes.find(kClusterLabel)->second); + std::get(attributes.find(kClusterLabel)->second); labels[kZoneLabel] = - absl::get(attributes.find(kZoneLabel)->second); + std::get(attributes.find(kZoneLabel)->second); return std::make_pair(labels[kProjectLabel], resource); }; diff --git a/google/cloud/bigtable/internal/partial_result_set_reader.h b/google/cloud/bigtable/internal/partial_result_set_reader.h index fe40b6bb3b43c..6e911a092ab31 100644 --- a/google/cloud/bigtable/internal/partial_result_set_reader.h +++ b/google/cloud/bigtable/internal/partial_result_set_reader.h @@ -16,7 +16,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_PARTIAL_RESULT_SET_READER_H #include "google/cloud/status.h" -#include +#include "google/bigtable/v2/data.pb.h" #include namespace google { diff --git a/google/cloud/bigtable/internal/partial_result_set_source.cc b/google/cloud/bigtable/internal/partial_result_set_source.cc index 59a2b7954d3c4..31ed75081a792 100644 --- a/google/cloud/bigtable/internal/partial_result_set_source.cc +++ b/google/cloud/bigtable/internal/partial_result_set_source.cc @@ -15,10 +15,10 @@ #include "google/cloud/bigtable/internal/partial_result_set_source.h" #include "google/cloud/bigtable/internal/crc32c.h" #include "google/cloud/bigtable/options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/log.h" #include "absl/strings/cord.h" +#include "absl/strings/str_cat.h" #include "absl/types/optional.h" namespace google { diff --git a/google/cloud/bigtable/internal/partial_result_set_source.h b/google/cloud/bigtable/internal/partial_result_set_source.h index e3e46787c65a4..e7a70a5bf0440 100644 --- a/google/cloud/bigtable/internal/partial_result_set_source.h +++ b/google/cloud/bigtable/internal/partial_result_set_source.h @@ -24,10 +24,10 @@ #include "google/cloud/status.h" #include "google/cloud/status_or.h" #include "absl/types/optional.h" -#include +#include "google/bigtable/v2/bigtable.pb.h" +#include "google/protobuf/struct.pb.h" #include #include -#include #include #include #include diff --git a/google/cloud/bigtable/internal/partial_result_set_source_test.cc b/google/cloud/bigtable/internal/partial_result_set_source_test.cc index 4ca22a38111c5..7f7649d6373ad 100644 --- a/google/cloud/bigtable/internal/partial_result_set_source_test.cc +++ b/google/cloud/bigtable/internal/partial_result_set_source_test.cc @@ -27,7 +27,7 @@ #include "google/cloud/testing_util/is_proto_equal.h" #include "google/cloud/testing_util/status_matchers.h" #include "absl/strings/substitute.h" -#include +#include "google/bigtable/v2/data.pb.h" #include #include #include diff --git a/google/cloud/bigtable/internal/query_plan.cc b/google/cloud/bigtable/internal/query_plan.cc index 054f08b34cff0..02cbc7365f09c 100644 --- a/google/cloud/bigtable/internal/query_plan.cc +++ b/google/cloud/bigtable/internal/query_plan.cc @@ -15,7 +15,7 @@ #include "google/cloud/bigtable/internal/query_plan.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/time_utils.h" -#include +#include "google/bigtable/v2/data.pb.h" namespace google { namespace cloud { diff --git a/google/cloud/bigtable/internal/query_plan.h b/google/cloud/bigtable/internal/query_plan.h index f9a6fb418cdcd..04ee74509cf96 100644 --- a/google/cloud/bigtable/internal/query_plan.h +++ b/google/cloud/bigtable/internal/query_plan.h @@ -19,7 +19,7 @@ #include "google/cloud/bigtable/version.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/clock.h" -#include +#include "google/bigtable/v2/bigtable.pb.h" #include #include diff --git a/google/cloud/bigtable/internal/query_plan_test.cc b/google/cloud/bigtable/internal/query_plan_test.cc index af111163ac22b..104b7269046d8 100644 --- a/google/cloud/bigtable/internal/query_plan_test.cc +++ b/google/cloud/bigtable/internal/query_plan_test.cc @@ -20,7 +20,7 @@ #include "google/cloud/testing_util/is_proto_equal.h" #include "google/cloud/testing_util/status_matchers.h" #include "absl/synchronization/barrier.h" -#include +#include "google/bigtable/v2/data.pb.h" #include #include #include diff --git a/google/cloud/bigtable/internal/readrowsparser.h b/google/cloud/bigtable/internal/readrowsparser.h index b558153b7e408..e35d1fde2cbb1 100644 --- a/google/cloud/bigtable/internal/readrowsparser.h +++ b/google/cloud/bigtable/internal/readrowsparser.h @@ -18,7 +18,7 @@ #include "google/cloud/bigtable/cell.h" #include "google/cloud/bigtable/row.h" #include "google/cloud/bigtable/version.h" -#include +#include "google/bigtable/v2/bigtable.grpc.pb.h" #include #include diff --git a/google/cloud/bigtable/internal/retry_traits.cc b/google/cloud/bigtable/internal/retry_traits.cc index aeb811c544517..c075b508d9cf2 100644 --- a/google/cloud/bigtable/internal/retry_traits.cc +++ b/google/cloud/bigtable/internal/retry_traits.cc @@ -16,8 +16,8 @@ #include "google/cloud/internal/status_payload_keys.h" #include "google/cloud/status.h" #include "absl/strings/match.h" -#include -#include +#include "google/rpc/error_details.pb.h" +#include "google/rpc/status.pb.h" namespace google { namespace cloud { diff --git a/google/cloud/bigtable/internal/retry_traits_test.cc b/google/cloud/bigtable/internal/retry_traits_test.cc index 0125698293897..c58023c66c96b 100644 --- a/google/cloud/bigtable/internal/retry_traits_test.cc +++ b/google/cloud/bigtable/internal/retry_traits_test.cc @@ -15,8 +15,8 @@ #include "google/cloud/bigtable/internal/retry_traits.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/internal/status_payload_keys.h" -#include -#include +#include "google/rpc/error_details.pb.h" +#include "google/rpc/status.pb.h" #include namespace google { diff --git a/google/cloud/bigtable/internal/traced_row_reader.cc b/google/cloud/bigtable/internal/traced_row_reader.cc index 55397c63f17ff..07fbeb8b59929 100644 --- a/google/cloud/bigtable/internal/traced_row_reader.cc +++ b/google/cloud/bigtable/internal/traced_row_reader.cc @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/bigtable/internal/traced_row_reader.h" #include "google/cloud/internal/opentelemetry.h" @@ -72,4 +71,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigtable_internal } // namespace cloud } // namespace google -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/bigtable/internal/traced_row_reader.h b/google/cloud/bigtable/internal/traced_row_reader.h index a423214d6dd7e..c7221b3a46ca6 100644 --- a/google/cloud/bigtable/internal/traced_row_reader.h +++ b/google/cloud/bigtable/internal/traced_row_reader.h @@ -15,7 +15,6 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_TRACED_ROW_READER_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_TRACED_ROW_READER_H -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/bigtable/row_reader.h" namespace google { @@ -36,6 +35,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigtable_internal } // namespace cloud } // namespace google -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_INTERNAL_TRACED_ROW_READER_H diff --git a/google/cloud/bigtable/internal/traced_row_reader_test.cc b/google/cloud/bigtable/internal/traced_row_reader_test.cc index cad809b81496e..a10093febf9f0 100644 --- a/google/cloud/bigtable/internal/traced_row_reader_test.cc +++ b/google/cloud/bigtable/internal/traced_row_reader_test.cc @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/bigtable/internal/traced_row_reader.h" #include "google/cloud/bigtable/mocks/mock_row_reader.h" #include "google/cloud/internal/make_status.h" @@ -151,4 +150,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigtable_internal } // namespace cloud } // namespace google -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/bigtable/legacy_table_test.cc b/google/cloud/bigtable/legacy_table_test.cc deleted file mode 100644 index 7a5392d530945..0000000000000 --- a/google/cloud/bigtable/legacy_table_test.cc +++ /dev/null @@ -1,409 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/table.h" -#include "google/cloud/bigtable/testing/mock_async_failing_rpc_factory.h" -#include "google/cloud/bigtable/testing/table_test_fixture.h" -#include "google/cloud/internal/background_threads_impl.h" -#include "google/cloud/testing_util/fake_completion_queue_impl.h" - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -namespace btproto = ::google::bigtable::v2; -using ::google::cloud::testing_util::FakeCompletionQueueImpl; -using ::google::cloud::testing_util::StatusIs; -using ::testing::HasSubstr; -using ::testing::MockFunction; - -Options NonEmptyOptions() { - struct TestOption { - using Type = bool; - }; - return Options{}.set(true); -} - -/// Define types and functions used in the tests. -class TableTest : public ::google::cloud::bigtable::testing::TableTestFixture { - public: - TableTest() : TableTestFixture(CompletionQueue{}) {} -}; - -TEST_F(TableTest, ClientProjectId) { - EXPECT_EQ(kProjectId, client_->project_id()); -} - -TEST_F(TableTest, ClientInstanceId) { - EXPECT_EQ(kInstanceId, client_->instance_id()); -} - -TEST_F(TableTest, StandaloneInstanceName) { - EXPECT_EQ(kInstanceName, InstanceName(client_)); -} - -TEST_F(TableTest, StandaloneTableName) { - EXPECT_EQ(kTableName, TableName(client_, kTableId)); -} - -TEST_F(TableTest, TableName) { EXPECT_EQ(kTableName, table_.table_name()); } - -TEST_F(TableTest, WithNewTarget) { - Table table(client_, "original-profile", kTableId); - EXPECT_EQ(table.project_id(), kProjectId); - EXPECT_EQ(table.instance_id(), kInstanceId); - EXPECT_EQ(table.table_id(), kTableId); - EXPECT_EQ(table.table_name(), TableName(kProjectId, kInstanceId, kTableId)); - EXPECT_EQ(table.app_profile_id(), "original-profile"); - - std::string const other_project_id = "other-project"; - std::string const other_instance_id = "other-instance"; - std::string const other_table_id = "other-table"; - auto other_table = - table.WithNewTarget(other_project_id, other_instance_id, other_table_id); - - EXPECT_EQ(other_table.project_id(), other_project_id); - EXPECT_EQ(other_table.instance_id(), other_instance_id); - EXPECT_EQ(other_table.table_id(), other_table_id); - EXPECT_EQ(other_table.table_name(), - TableName(other_project_id, other_instance_id, other_table_id)); - EXPECT_EQ(other_table.app_profile_id(), "original-profile"); -} - -TEST_F(TableTest, WithNewTargetProfile) { - Table table(client_, "original-profile", kTableId); - EXPECT_EQ(table.project_id(), kProjectId); - EXPECT_EQ(table.instance_id(), kInstanceId); - EXPECT_EQ(table.table_id(), kTableId); - EXPECT_EQ(table.table_name(), TableName(kProjectId, kInstanceId, kTableId)); - EXPECT_EQ(table.app_profile_id(), "original-profile"); - - std::string const other_project_id = "other-project"; - std::string const other_instance_id = "other-instance"; - std::string const other_table_id = "other-table"; - std::string const other_profile_id = "other-profile"; - auto other_table = table.WithNewTarget(other_project_id, other_instance_id, - other_profile_id, other_table_id); - - EXPECT_EQ(other_table.project_id(), other_project_id); - EXPECT_EQ(other_table.instance_id(), other_instance_id); - EXPECT_EQ(other_table.table_id(), other_table_id); - EXPECT_EQ(other_table.table_name(), - TableName(other_project_id, other_instance_id, other_table_id)); - EXPECT_EQ(other_table.app_profile_id(), other_profile_id); -} - -TEST_F(TableTest, TableConstructor) { - std::string const other_table_id = "my-table"; - std::string const other_table_name = TableName(client_, other_table_id); - Table table(client_, other_table_id); - EXPECT_EQ(other_table_name, table.table_name()); -} - -TEST_F(TableTest, CopyConstructor) { - Table source(client_, "my-table"); - std::string const& expected = source.table_name(); - // NOLINTNEXTLINE(performance-unnecessary-copy-initialization) - Table copy(source); - EXPECT_EQ(expected, copy.table_name()); -} - -TEST_F(TableTest, MoveConstructor) { - Table source(client_, "my-table"); - std::string expected = source.table_name(); - Table copy(std::move(source)); - EXPECT_EQ(expected, copy.table_name()); -} - -TEST_F(TableTest, CopyAssignment) { - Table source(client_, "my-table"); - std::string const& expected = source.table_name(); - Table dest(client_, "another-table"); - dest = source; - EXPECT_EQ(expected, dest.table_name()); -} - -TEST_F(TableTest, MoveAssignment) { - Table source(client_, "my-table"); - std::string expected = source.table_name(); - Table dest(client_, "another-table"); - dest = std::move(source); - EXPECT_EQ(expected, dest.table_name()); -} - -TEST_F(TableTest, ChangeOnePolicy) { - Table table(client_, "some-table", AlwaysRetryMutationPolicy()); - EXPECT_EQ("", table.app_profile_id()); - EXPECT_THAT(table.table_name(), HasSubstr("some-table")); -} - -TEST_F(TableTest, ChangePolicies) { - Table table(client_, "some-table", AlwaysRetryMutationPolicy(), - LimitedErrorCountRetryPolicy(42)); - EXPECT_EQ("", table.app_profile_id()); - EXPECT_THAT(table.table_name(), HasSubstr("some-table")); -} - -TEST_F(TableTest, ConstructorWithAppProfileAndPolicies) { - Table table(client_, "test-profile-id", "some-table", - AlwaysRetryMutationPolicy(), LimitedErrorCountRetryPolicy(42)); - EXPECT_EQ("test-profile-id", table.app_profile_id()); - EXPECT_THAT(table.table_name(), HasSubstr("some-table")); -} - -std::string const kProjectId = "the-project"; -std::string const kInstanceId = "the-instance"; -std::string const kTableId = "the-table"; - -class ValidContextMdAsyncTest : public ::testing::Test { - public: - ValidContextMdAsyncTest() - : cq_impl_(new FakeCompletionQueueImpl), - cq_(cq_impl_), - client_(new ::google::cloud::bigtable::testing::MockDataClient( - Options{}.set(cq_))) { - EXPECT_CALL(*client_, project_id()) - .WillRepeatedly(::testing::ReturnRef(kProjectId)); - EXPECT_CALL(*client_, instance_id()) - .WillRepeatedly(::testing::ReturnRef(kInstanceId)); - table_ = std::make_unique(client_, kTableId); - } - - protected: - template - void FinishTest( - ::google::cloud::future> res_future) { - EXPECT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); - EXPECT_EQ(0U, cq_impl_->size()); - auto res = res_future.get(); - EXPECT_FALSE(res); - EXPECT_EQ(::google::cloud::StatusCode::kPermissionDenied, - res.status().code()); - } - - void FinishTest(::google::cloud::future res_future) { - EXPECT_EQ(1U, cq_impl_->size()); - cq_impl_->SimulateCompletion(true); - EXPECT_EQ(0U, cq_impl_->size()); - auto res = res_future.get(); - EXPECT_EQ(::google::cloud::StatusCode::kPermissionDenied, res.code()); - } - - std::shared_ptr cq_impl_; - CompletionQueue cq_; - std::shared_ptr client_; - std::unique_ptr
table_; -}; - -TEST_F(ValidContextMdAsyncTest, AsyncApply) { - testing::MockAsyncFailingRpcFactory - rpc_factory; - EXPECT_CALL(*client_, AsyncMutateRow) - .WillOnce(rpc_factory.Create( - R"""( - table_name: "projects/the-project/instances/the-instance/tables/the-table" - row_key: "row_key" - mutations: { delete_from_row { } } - )""", - "google.bigtable.v2.Bigtable.MutateRow")); - FinishTest(table_->AsyncApply(SingleRowMutation("row_key", DeleteFromRow()))); -} - -TEST_F(ValidContextMdAsyncTest, AsyncCheckAndMutateRow) { - testing::MockAsyncFailingRpcFactory - rpc_factory; - EXPECT_CALL(*client_, AsyncCheckAndMutateRow) - .WillOnce(rpc_factory.Create( - R"""( - table_name: "projects/the-project/instances/the-instance/tables/the-table" - row_key: "row_key" - true_mutations: { delete_from_row { } } - predicate_filter: { pass_all_filter: true } - )""", - "google.bigtable.v2.Bigtable.CheckAndMutateRow")); - FinishTest(table_->AsyncCheckAndMutateRow("row_key", Filter::PassAllFilter(), - {DeleteFromRow()}, {})); -} - -TEST_F(ValidContextMdAsyncTest, AsyncReadModifyWriteRow) { - testing::MockAsyncFailingRpcFactory - rpc_factory; - EXPECT_CALL(*client_, AsyncReadModifyWriteRow) - .WillOnce(rpc_factory.Create( - R"""( - table_name: "projects/the-project/instances/the-instance/tables/the-table" - row_key: "row_key" - rules: { - family_name: "fam" - column_qualifier: "counter" - increment_amount: 1 - } - rules: { - family_name: "fam" - column_qualifier: "list" - append_value: ";element" - } - )""", - "google.bigtable.v2.Bigtable.ReadModifyWriteRow")); - FinishTest(table_->AsyncReadModifyWriteRow( - "row_key", ReadModifyWriteRule::IncrementAmount("fam", "counter", 1), - ReadModifyWriteRule::AppendValue("fam", "list", ";element"))); -} - -TEST_F(TableTest, ApplyWithOptions) { - Table table(client_, kTableId); - auto status = table.Apply(SingleRowMutation("row"), NonEmptyOptions()); - EXPECT_THAT(status, StatusIs(StatusCode::kInvalidArgument)); -} - -TEST_F(TableTest, AsyncApplyWithOptions) { - Table table(client_, kTableId); - auto status = table.AsyncApply(SingleRowMutation("row"), NonEmptyOptions()); - EXPECT_THAT(status.get(), StatusIs(StatusCode::kInvalidArgument)); -} - -TEST_F(TableTest, BulkApplyWithOptions) { - Table table(client_, kTableId); - auto bulk = BulkMutation(SingleRowMutation("r1"), SingleRowMutation("r2")); - auto failed = table.BulkApply(bulk, NonEmptyOptions()); - ASSERT_EQ(2, failed.size()); - EXPECT_EQ(0, failed[0].original_index()); - EXPECT_THAT(failed[0].status(), StatusIs(StatusCode::kInvalidArgument)); - EXPECT_EQ(1, failed[1].original_index()); - EXPECT_THAT(failed[1].status(), StatusIs(StatusCode::kInvalidArgument)); -} - -TEST_F(TableTest, AsyncBulkApplyWithOptions) { - Table table(client_, kTableId); - auto bulk = BulkMutation(SingleRowMutation("r1"), SingleRowMutation("r2")); - auto failed = table.AsyncBulkApply(bulk, NonEmptyOptions()).get(); - ASSERT_EQ(2, failed.size()); - EXPECT_EQ(0, failed[0].original_index()); - EXPECT_THAT(failed[0].status(), StatusIs(StatusCode::kInvalidArgument)); - EXPECT_EQ(1, failed[1].original_index()); - EXPECT_THAT(failed[1].status(), StatusIs(StatusCode::kInvalidArgument)); -} - -TEST_F(TableTest, ReadRowsWithOptions) { - Table table(client_, kTableId); - auto reader = - table.ReadRows(RowSet(), Filter::PassAllFilter(), NonEmptyOptions()); - auto it = reader.begin(); - EXPECT_NE(it, reader.end()); - EXPECT_THAT(*it, StatusIs(StatusCode::kInvalidArgument)); - EXPECT_EQ(++it, reader.end()); -} - -TEST_F(TableTest, ReadRowsWithLimitWithOptions) { - Table table(client_, kTableId); - auto reader = - table.ReadRows(RowSet(), 1, Filter::PassAllFilter(), NonEmptyOptions()); - auto it = reader.begin(); - EXPECT_NE(it, reader.end()); - EXPECT_THAT(*it, StatusIs(StatusCode::kInvalidArgument)); - EXPECT_EQ(++it, reader.end()); -} - -TEST_F(TableTest, ReadRowWithOptions) { - Table table(client_, kTableId); - auto row = table.ReadRow("row", Filter::PassAllFilter(), NonEmptyOptions()); - EXPECT_THAT(row, StatusIs(StatusCode::kInvalidArgument)); -} - -TEST_F(TableTest, AsyncReadRowWithOptions) { - Table table(client_, kTableId); - auto row = - table.AsyncReadRow("row", Filter::PassAllFilter(), NonEmptyOptions()); - EXPECT_THAT(row.get(), StatusIs(StatusCode::kInvalidArgument)); -} - -TEST_F(TableTest, CheckAndMutateRowWithOptions) { - Table table(client_, kTableId); - auto branch = table.CheckAndMutateRow("row", Filter::PassAllFilter(), {}, {}, - NonEmptyOptions()); - EXPECT_THAT(branch, StatusIs(StatusCode::kInvalidArgument)); -} - -TEST_F(TableTest, AsyncCheckAndMutateRowWithOptions) { - Table table(client_, kTableId); - auto branch = table.AsyncCheckAndMutateRow("row", Filter::PassAllFilter(), {}, - {}, NonEmptyOptions()); - EXPECT_THAT(branch.get(), StatusIs(StatusCode::kInvalidArgument)); -} - -TEST_F(TableTest, SampleRowsWithOptions) { - Table table(client_, kTableId); - auto rows = table.SampleRows(NonEmptyOptions()); - EXPECT_THAT(rows, StatusIs(StatusCode::kInvalidArgument)); -} - -TEST_F(TableTest, AsyncSampleRowsWithOptions) { - Table table(client_, kTableId); - auto rows = table.AsyncSampleRows(NonEmptyOptions()); - EXPECT_THAT(rows.get(), StatusIs(StatusCode::kInvalidArgument)); -} - -TEST_F(TableTest, ReadModifyWriteRowWithOptions) { - Table table(client_, kTableId); - auto r = ReadModifyWriteRule::AppendValue("cf", "cq", "v"); - auto row = table.ReadModifyWriteRow("row", r, r, NonEmptyOptions(), r); - EXPECT_THAT(row, StatusIs(StatusCode::kInvalidArgument)); -} - -TEST_F(TableTest, AsyncReadModifyWriteRowWithOptions) { - Table table(client_, kTableId); - auto r = ReadModifyWriteRule::AppendValue("cf", "cq", "v"); - auto row = table.AsyncReadModifyWriteRow("row", r, r, NonEmptyOptions(), r); - EXPECT_THAT(row.get(), StatusIs(StatusCode::kInvalidArgument)); -} - -TEST_F(TableTest, AsyncReadRowsWithOptions) { - MockFunction(bigtable::Row const&)> on_row; - EXPECT_CALL(on_row, Call).Times(0); - - MockFunction on_finish; - EXPECT_CALL(on_finish, Call).WillOnce([](Status const& status) { - EXPECT_THAT(status, StatusIs(StatusCode::kInvalidArgument)); - }); - - Table table(client_, kTableId); - table.AsyncReadRows(on_row.AsStdFunction(), on_finish.AsStdFunction(), - RowSet(), Filter::PassAllFilter(), NonEmptyOptions()); -} - -TEST_F(TableTest, AsyncReadRowsWithLimitWithOptions) { - MockFunction(bigtable::Row const&)> on_row; - EXPECT_CALL(on_row, Call).Times(0); - - MockFunction on_finish; - EXPECT_CALL(on_finish, Call).WillOnce([](Status const& status) { - EXPECT_THAT(status, StatusIs(StatusCode::kInvalidArgument)); - }); - - Table table(client_, kTableId); - table.AsyncReadRows(on_row.AsStdFunction(), on_finish.AsStdFunction(), - RowSet(), 1, Filter::PassAllFilter(), NonEmptyOptions()); -} - -} // namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/metadata_update_policy.cc b/google/cloud/bigtable/metadata_update_policy.cc deleted file mode 100644 index 436ada1efe281..0000000000000 --- a/google/cloud/bigtable/metadata_update_policy.cc +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/metadata_update_policy.h" -#include "google/cloud/bigtable/version.h" -#include "google/cloud/internal/api_client_header.h" -#include "google/cloud/internal/url_encode.h" - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -// These we cannot change because they are part of the public API. -// NOLINTNEXTLINE(readability-identifier-naming) -MetadataParamTypes const MetadataParamTypes::PARENT("parent"); -// NOLINTNEXTLINE(readability-identifier-naming) -MetadataParamTypes const MetadataParamTypes::NAME("name"); -// NOLINTNEXTLINE(readability-identifier-naming) -MetadataParamTypes const MetadataParamTypes::RESOURCE("resource"); -// NOLINTNEXTLINE(readability-identifier-naming) -MetadataParamTypes const MetadataParamTypes::TABLE_NAME("table_name"); -// NOLINTNEXTLINE(readability-identifier-naming) -MetadataParamTypes const MetadataParamTypes::APP_PROFILE_NAME( - "app_profile.name"); -// NOLINTNEXTLINE(readability-identifier-naming) -MetadataParamTypes const MetadataParamTypes::INSTANCE_NAME("instance.name"); -// NOLINTNEXTLINE(readability-identifier-naming) -MetadataParamTypes const MetadataParamTypes::BACKUP_NAME("backup.name"); - -MetadataUpdatePolicy::MetadataUpdatePolicy( - std::string const& resource_name, - MetadataParamTypes const& metadata_param_type) - : value_(metadata_param_type.type() + '=' + resource_name), - api_client_header_(internal::HandCraftedLibClientHeader()) {} - -void MetadataUpdatePolicy::Setup(grpc::ClientContext& context) const { - context.AddMetadata(std::string("x-goog-request-params"), value()); - context.AddMetadata(std::string("x-goog-api-client"), api_client_header()); -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -namespace bigtable_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -bigtable::MetadataUpdatePolicy MakeMetadataUpdatePolicy( - std::string const& table_name, std::string const& app_profile_id) { - // The rule is the same for all RPCs in the Data API. We always include the - // table name. We append an app profile id only if one was provided. - return bigtable::MetadataUpdatePolicy( - internal::UrlEncode(table_name) + - (app_profile_id.empty() - ? "" - : "&app_profile_id=" + internal::UrlEncode(app_profile_id)), - bigtable::MetadataParamTypes::TABLE_NAME); -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable_internal -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/metadata_update_policy.h b/google/cloud/bigtable/metadata_update_policy.h deleted file mode 100644 index d556ecfae70a4..0000000000000 --- a/google/cloud/bigtable/metadata_update_policy.h +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_METADATA_UPDATE_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_METADATA_UPDATE_POLICY_H - -#include "google/cloud/bigtable/version.h" -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -/** - * Define the class for governing x-goog-request-params metadata value. - * - * The value of x-goog-request-params starts with one of the following suffix - * "parent=" : Operation in instance, e.g. TableAdmin::CreateTable. - * "table_name=" : table_id is known at the time of creation, e.g. - * Table::Apply. - * "name=" : this is used when table|_id is known only in the RPC call, e.g. - * TableAdmin::GetTable. - * "resource=" : this is used to set IAM policies for bigtable resource. - * - * The Setup function also adds x-goog-api-client header for analytics purpose. - */ -class MetadataParamTypes final { - public: - // NOLINTNEXTLINE(readability-identifier-naming) - static MetadataParamTypes const PARENT; - // NOLINTNEXTLINE(readability-identifier-naming) - static MetadataParamTypes const NAME; - // NOLINTNEXTLINE(readability-identifier-naming) - static MetadataParamTypes const RESOURCE; - // NOLINTNEXTLINE(readability-identifier-naming) - static MetadataParamTypes const TABLE_NAME; - // NOLINTNEXTLINE(readability-identifier-naming) - static MetadataParamTypes const APP_PROFILE_NAME; - // NOLINTNEXTLINE(readability-identifier-naming) - static MetadataParamTypes const INSTANCE_NAME; - // NOLINTNEXTLINE(readability-identifier-naming) - static MetadataParamTypes const BACKUP_NAME; - - std::string const& type() const { return type_; } - - private: - explicit MetadataParamTypes(std::string type) : type_(std::move(type)) {} - std::string type_; -}; - -inline bool operator==(MetadataParamTypes const& lhs, - MetadataParamTypes const& rhs) { - return lhs.type() == rhs.type(); -} - -inline bool operator!=(MetadataParamTypes const& lhs, - MetadataParamTypes const& rhs) { - return std::rel_ops::operator!=(lhs, rhs); -} - -/// MetadataUpdatePolicy holds supported metadata and setup ClientContext -class MetadataUpdatePolicy { - public: - /** - * Constructor with default metadata pair. - * - * @param resource_name hierarchical name of resource, including project id, - * instance id and/or table_id. - * @param metadata_param_type type to decide prefix for the value of - * x-goog-request-params - */ - MetadataUpdatePolicy(std::string const& resource_name, - MetadataParamTypes const& metadata_param_type); - - MetadataUpdatePolicy(MetadataUpdatePolicy&&) = default; - MetadataUpdatePolicy& operator=(MetadataUpdatePolicy&&) = default; - MetadataUpdatePolicy(MetadataUpdatePolicy const&) = default; - MetadataUpdatePolicy& operator=(MetadataUpdatePolicy const&) = default; - - // Update the ClientContext for the next call. - void Setup(grpc::ClientContext& context) const; - - std::string const& value() const { return value_; } - std::string const& api_client_header() const { return api_client_header_; } - - private: - std::string value_; - std::string api_client_header_; -}; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -namespace bigtable_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/** - * Returns a `MetadataUpdatePolicy` that implements the explicit routing - * specification in `bigtable.proto`. - */ -bigtable::MetadataUpdatePolicy MakeMetadataUpdatePolicy( - std::string const& table_name, std::string const& app_profile_id); - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable_internal -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_METADATA_UPDATE_POLICY_H diff --git a/google/cloud/bigtable/metadata_update_policy_test.cc b/google/cloud/bigtable/metadata_update_policy_test.cc deleted file mode 100644 index edc31787ff584..0000000000000 --- a/google/cloud/bigtable/metadata_update_policy_test.cc +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/metadata_update_policy.h" -#include "google/cloud/bigtable/row_set.h" -#include "google/cloud/bigtable/table.h" -#include "google/cloud/bigtable/testing/embedded_server_test_fixture.h" -#include "google/cloud/internal/url_encode.h" -#include -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -class MetadataUpdatePolicyTest : public testing::EmbeddedServerTestFixture {}; - -using ::testing::HasSubstr; - -TEST_F(MetadataUpdatePolicyTest, TableMetadata) { - grpc::string expected = - "table_name=" + google::cloud::internal::UrlEncode(kTableName); - auto reader = table_->ReadRows(RowSet("row1"), 1, Filter::PassAllFilter()); - // lets make the RPC call to send metadata - reader.begin(); - // Get metadata from embedded server - auto client_metadata = bigtable_service_.client_metadata(); - auto range = client_metadata.equal_range("x-goog-request-params"); - ASSERT_EQ(1, std::distance(range.first, range.second)); - EXPECT_EQ(expected, range.first->second); -} - -TEST_F(MetadataUpdatePolicyTest, TableWithNewTargetMetadata) { - std::string const other_project_id = "other-project"; - std::string const other_instance_id = "other-instance"; - std::string const other_table_id = "other-table"; - auto other_table = table_->WithNewTarget(other_project_id, other_instance_id, - other_table_id); - - grpc::string expected = - "table_name=" + google::cloud::internal::UrlEncode(TableName( - other_project_id, other_instance_id, other_table_id)); - auto reader = - other_table.ReadRows(RowSet("row1"), 1, Filter::PassAllFilter()); - // lets make the RPC call to send metadata - reader.begin(); - // Get metadata from embedded server - auto client_metadata = bigtable_service_.client_metadata(); - auto range = client_metadata.equal_range("x-goog-request-params"); - ASSERT_EQ(1, std::distance(range.first, range.second)); - EXPECT_EQ(expected, range.first->second); -} - -/// @test A cloning test for normal construction of metadata . -TEST_F(MetadataUpdatePolicyTest, SimpleDefault) { - auto const x_google_request_params = "parent=" + std::string(kInstanceName); - MetadataUpdatePolicy created(kInstanceName, MetadataParamTypes::PARENT); - EXPECT_EQ(x_google_request_params, created.value()); - EXPECT_THAT(created.api_client_header(), HasSubstr("gl-cpp/")); - EXPECT_THAT(created.api_client_header(), HasSubstr("gccl/")); - EXPECT_THAT(created.api_client_header(), - AnyOf(HasSubstr("-noex-"), HasSubstr("-ex-"))); -} - -TEST_F(MetadataUpdatePolicyTest, TableAppProfileMetadata) { - auto table = Table(data_client_, "profile", kTableId); - grpc::string expected = - "table_name=" + google::cloud::internal::UrlEncode(kTableName) + - "&app_profile_id=profile"; - auto reader = table.ReadRows(RowSet("row1"), 1, Filter::PassAllFilter()); - // lets make the RPC call to send metadata - reader.begin(); - // Get metadata from embedded server - auto client_metadata = bigtable_service_.client_metadata(); - auto range = client_metadata.equal_range("x-goog-request-params"); - ASSERT_EQ(1, std::distance(range.first, range.second)); - EXPECT_EQ(expected, range.first->second); -} - -/// @test A test for setting metadata when table is known. -TEST_F(MetadataUpdatePolicyTest, TableWithNewTargetAppProfileMetadata) { - auto table = - table_->WithNewTarget(kProjectId, kInstanceId, "profile", kTableId); - grpc::string expected = - "table_name=" + google::cloud::internal::UrlEncode(kTableName) + - "&app_profile_id=profile"; - auto reader = table.ReadRows(RowSet("row1"), 1, Filter::PassAllFilter()); - // lets make the RPC call to send metadata - reader.begin(); - // Get metadata from embedded server - auto client_metadata = bigtable_service_.client_metadata(); - auto range = client_metadata.equal_range("x-goog-request-params"); - ASSERT_EQ(1, std::distance(range.first, range.second)); - EXPECT_EQ(expected, range.first->second); -} - -TEST(MakeMetadataUpdatePolicyTest, AppProfileRouting) { - auto m = bigtable_internal::MakeMetadataUpdatePolicy("table", ""); - EXPECT_EQ(m.value(), "table_name=table"); - - m = bigtable_internal::MakeMetadataUpdatePolicy("table", "profile"); - EXPECT_EQ(m.value(), "table_name=table&app_profile_id=profile"); -} - -} // namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/mocks/mock_data_connection.h b/google/cloud/bigtable/mocks/mock_data_connection.h index a283af2c9e787..61f3d824a2005 100644 --- a/google/cloud/bigtable/mocks/mock_data_connection.h +++ b/google/cloud/bigtable/mocks/mock_data_connection.h @@ -16,6 +16,8 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_MOCKS_MOCK_DATA_CONNECTION_H #include "google/cloud/bigtable/data_connection.h" +#include "google/cloud/bigtable/options.h" +#include "google/cloud/options.h" #include "google/cloud/version.h" #include diff --git a/google/cloud/bigtable/mutation_batcher.h b/google/cloud/bigtable/mutation_batcher.h index f71b8a336e547..e3d0f5d652243 100644 --- a/google/cloud/bigtable/mutation_batcher.h +++ b/google/cloud/bigtable/mutation_batcher.h @@ -15,13 +15,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_MUTATION_BATCHER_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_MUTATION_BATCHER_H -#include "google/cloud/bigtable/client_options.h" #include "google/cloud/bigtable/completion_queue.h" #include "google/cloud/bigtable/mutations.h" #include "google/cloud/bigtable/table.h" #include "google/cloud/bigtable/version.h" #include "google/cloud/status.h" -#include +#include "google/bigtable/v2/bigtable.pb.h" #include #include #include diff --git a/google/cloud/bigtable/mutations.h b/google/cloud/bigtable/mutations.h index 0a1a3657d71b3..642fe4969e299 100644 --- a/google/cloud/bigtable/mutations.h +++ b/google/cloud/bigtable/mutations.h @@ -23,8 +23,8 @@ #include "google/cloud/status.h" #include "google/cloud/status_or.h" #include "absl/meta/type_traits.h" -#include -#include +#include "google/bigtable/v2/bigtable.pb.h" +#include "google/bigtable/v2/data.pb.h" #include #include #include diff --git a/google/cloud/bigtable/mutations_test.cc b/google/cloud/bigtable/mutations_test.cc index b368aa212e2ee..e131ad0d6ced0 100644 --- a/google/cloud/bigtable/mutations_test.cc +++ b/google/cloud/bigtable/mutations_test.cc @@ -16,7 +16,7 @@ #include "google/cloud/internal/big_endian.h" #include "google/cloud/testing_util/chrono_literals.h" #include "google/cloud/testing_util/status_matchers.h" -#include +#include "google/rpc/error_details.pb.h" #include namespace google { diff --git a/google/cloud/bigtable/options.h b/google/cloud/bigtable/options.h index 865d5c009547e..efc2d81ea607c 100644 --- a/google/cloud/bigtable/options.h +++ b/google/cloud/bigtable/options.h @@ -39,6 +39,7 @@ */ #include "google/cloud/bigtable/idempotent_mutation_policy.h" +#include "google/cloud/bigtable/internal/endpoint_options.h" #include "google/cloud/bigtable/retry_policy.h" #include "google/cloud/bigtable/rpc_retry_policy.h" #include "google/cloud/bigtable/version.h" @@ -99,37 +100,6 @@ struct ReverseScanOption { using Type = bool; }; -/** - * The endpoint for data operations. - * - * @deprecated Please use `google::cloud::EndpointOption` instead. - */ -struct DataEndpointOption { - using Type = std::string; -}; - -/** - * The endpoint for table admin operations. - * - * @deprecated Please use `google::cloud::EndpointOption` instead. - */ -struct AdminEndpointOption { - using Type = std::string; -}; - -/** - * The endpoint for instance admin operations. - * - * In most scenarios this should have the same value as `AdminEndpointOption`. - * The most common exception is testing, where the emulator for instance admin - * operations may be different than the emulator for admin and data operations. - * - * @deprecated Please use `google::cloud::EndpointOption` instead. - */ -struct InstanceAdminEndpointOption { - using Type = std::string; -}; - /** * Minimum time in ms to refresh connections. * @@ -207,9 +177,10 @@ struct QueryPlanRefreshFunctionRetryPolicyOption { /// The complete list of options accepted by `bigtable::*Client` using ClientOptionList = - OptionList; + OptionList<::google::cloud::bigtable_internal::DataEndpointOption, + ::google::cloud::bigtable_internal::AdminEndpointOption, + ::google::cloud::bigtable_internal::InstanceAdminEndpointOption, + MinConnectionRefreshOption, MaxConnectionRefreshOption>; /** * Option to configure the retry policy used by `Table`. diff --git a/google/cloud/bigtable/prepared_query.h b/google/cloud/bigtable/prepared_query.h index 88539fa7c07d4..382c33bc83683 100644 --- a/google/cloud/bigtable/prepared_query.h +++ b/google/cloud/bigtable/prepared_query.h @@ -21,7 +21,7 @@ #include "google/cloud/bigtable/value.h" #include "google/cloud/bigtable/version.h" #include "google/cloud/completion_queue.h" -#include +#include "google/bigtable/v2/bigtable.pb.h" #include #include diff --git a/google/cloud/bigtable/quickstart/.bazelrc b/google/cloud/bigtable/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/bigtable/quickstart/.bazelrc +++ b/google/cloud/bigtable/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/bigtable/quickstart/CMakeLists.txt b/google/cloud/bigtable/quickstart/CMakeLists.txt index b6584027c88a7..9d5cb3c94b00d 100644 --- a/google/cloud/bigtable/quickstart/CMakeLists.txt +++ b/google/cloud/bigtable/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # A minimal CMakeList.txt showing how to use the Cloud Bigtable C++ client # library in CMake-based projects. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-bigtable-quickstart CXX) find_package(google_cloud_cpp_bigtable REQUIRED) diff --git a/google/cloud/bigtable/read_modify_write_rule.h b/google/cloud/bigtable/read_modify_write_rule.h index 964eebd9af30d..ce782dc56286d 100644 --- a/google/cloud/bigtable/read_modify_write_rule.h +++ b/google/cloud/bigtable/read_modify_write_rule.h @@ -16,7 +16,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_READ_MODIFY_WRITE_RULE_H #include "google/cloud/bigtable/version.h" -#include +#include "google/bigtable/v2/data.pb.h" #include #include diff --git a/google/cloud/bigtable/resource_names.cc b/google/cloud/bigtable/resource_names.cc index 731ff4d65f3b9..35375cb344d2e 100644 --- a/google/cloud/bigtable/resource_names.cc +++ b/google/cloud/bigtable/resource_names.cc @@ -13,7 +13,7 @@ // limitations under the License. #include "google/cloud/bigtable/resource_names.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" +#include "absl/strings/str_cat.h" namespace google { namespace cloud { diff --git a/google/cloud/bigtable/row_key.h b/google/cloud/bigtable/row_key.h index 5b1871253f9b7..e008e243cb4d1 100644 --- a/google/cloud/bigtable/row_key.h +++ b/google/cloud/bigtable/row_key.h @@ -17,7 +17,7 @@ #include "google/cloud/bigtable/internal/google_bytes_traits.h" #include "google/cloud/bigtable/version.h" -#include +#include "google/bigtable/v2/data.pb.h" #include #include diff --git a/google/cloud/bigtable/row_range.h b/google/cloud/bigtable/row_range.h index e39ae676c3703..c948da47e419b 100644 --- a/google/cloud/bigtable/row_range.h +++ b/google/cloud/bigtable/row_range.h @@ -18,7 +18,7 @@ #include "google/cloud/bigtable/internal/prefix_range_end.h" #include "google/cloud/bigtable/row_key.h" #include "google/cloud/bigtable/version.h" -#include +#include "google/bigtable/v2/data.pb.h" #include #include diff --git a/google/cloud/bigtable/row_reader.cc b/google/cloud/bigtable/row_reader.cc index 3efcf408cdfb0..aeb5960655140 100644 --- a/google/cloud/bigtable/row_reader.cc +++ b/google/cloud/bigtable/row_reader.cc @@ -13,7 +13,6 @@ // limitations under the License. #include "google/cloud/bigtable/row_reader.h" -#include "google/cloud/bigtable/internal/legacy_row_reader.h" #include "google/cloud/bigtable/table.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/internal/throw_delegate.h" @@ -65,32 +64,6 @@ RowReader::RowReader() : RowReader( std::make_shared(Status{})) {} -RowReader::RowReader( - std::shared_ptr client, std::string table_name, RowSet row_set, - std::int64_t rows_limit, Filter filter, - std::unique_ptr retry_policy, - std::unique_ptr backoff_policy, - MetadataUpdatePolicy metadata_update_policy, - std::unique_ptr parser_factory) - : RowReader(std::make_shared( - std::move(client), std::move(table_name), std::move(row_set), - rows_limit, std::move(filter), std::move(retry_policy), - std::move(backoff_policy), std::move(metadata_update_policy), - std::move(parser_factory))) {} - -RowReader::RowReader( - std::shared_ptr client, std::string app_profile_id, - std::string table_name, RowSet row_set, std::int64_t rows_limit, - Filter filter, std::unique_ptr retry_policy, - std::unique_ptr backoff_policy, - MetadataUpdatePolicy metadata_update_policy, - std::unique_ptr parser_factory) - : RowReader(std::make_shared( - std::move(client), std::move(app_profile_id), std::move(table_name), - std::move(row_set), rows_limit, std::move(filter), - std::move(retry_policy), std::move(backoff_policy), - std::move(metadata_update_policy), std::move(parser_factory))) {} - std::int64_t constexpr RowReader::NO_ROWS_LIMIT; // The name must be all lowercase to work with range-for loops. diff --git a/google/cloud/bigtable/row_reader.h b/google/cloud/bigtable/row_reader.h index 11ba0d202eba9..180834a3eb566 100644 --- a/google/cloud/bigtable/row_reader.h +++ b/google/cloud/bigtable/row_reader.h @@ -15,11 +15,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ROW_READER_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_ROW_READER_H -#include "google/cloud/bigtable/data_client.h" #include "google/cloud/bigtable/filters.h" #include "google/cloud/bigtable/internal/readrowsparser.h" #include "google/cloud/bigtable/internal/row_reader_impl.h" -#include "google/cloud/bigtable/metadata_update_policy.h" #include "google/cloud/bigtable/row_set.h" #include "google/cloud/bigtable/rpc_backoff_policy.h" #include "google/cloud/bigtable/rpc_retry_policy.h" @@ -65,22 +63,6 @@ class RowReader { /// Default constructs an empty RowReader. RowReader(); - GOOGLE_CLOUD_CPP_BIGTABLE_ROW_READER_CTOR_DEPRECATED() - RowReader(std::shared_ptr client, std::string table_name, - RowSet row_set, std::int64_t rows_limit, Filter filter, - std::unique_ptr retry_policy, - std::unique_ptr backoff_policy, - MetadataUpdatePolicy metadata_update_policy, - std::unique_ptr parser_factory); - - GOOGLE_CLOUD_CPP_BIGTABLE_ROW_READER_CTOR_DEPRECATED() - RowReader(std::shared_ptr client, std::string app_profile_id, - std::string table_name, RowSet row_set, std::int64_t rows_limit, - Filter filter, std::unique_ptr retry_policy, - std::unique_ptr backoff_policy, - MetadataUpdatePolicy metadata_update_policy, - std::unique_ptr parser_factory); - // NOLINTNEXTLINE(performance-noexcept-move-constructor) RowReader(RowReader&&) = default; diff --git a/google/cloud/bigtable/row_reader_test.cc b/google/cloud/bigtable/row_reader_test.cc index b11f897d62362..1ab61568e94c3 100644 --- a/google/cloud/bigtable/row_reader_test.cc +++ b/google/cloud/bigtable/row_reader_test.cc @@ -90,7 +90,6 @@ TEST(RowReaderTest, OptionsSpan) { } } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::IsActive; TEST(RowReader, CallSpanActiveThroughout) { @@ -121,7 +120,6 @@ TEST(RowReader, CallSpanActiveThroughout) { EXPECT_STATUS_OK(row); } } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } // anonymous namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END diff --git a/google/cloud/bigtable/sql_statement.h b/google/cloud/bigtable/sql_statement.h index 0b184cddaeb79..30cd0cd438305 100644 --- a/google/cloud/bigtable/sql_statement.h +++ b/google/cloud/bigtable/sql_statement.h @@ -20,7 +20,7 @@ #include "google/cloud/bigtable/version.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/status_or.h" -#include +#include "google/bigtable/v2/bigtable.pb.h" #include #include #include diff --git a/google/cloud/bigtable/table.cc b/google/cloud/bigtable/table.cc index 14b96ef6715d3..68b7c8016f073 100644 --- a/google/cloud/bigtable/table.cc +++ b/google/cloud/bigtable/table.cc @@ -13,14 +13,6 @@ // limitations under the License. #include "google/cloud/bigtable/table.h" -#include "google/cloud/bigtable/internal/bulk_mutator.h" -#include "google/cloud/bigtable/internal/data_connection_impl.h" -#include "google/cloud/bigtable/internal/legacy_async_bulk_apply.h" -#include "google/cloud/bigtable/internal/legacy_async_row_sampler.h" -#include "google/cloud/bigtable/internal/legacy_row_reader.h" -#include "google/cloud/bigtable/internal/unary_client_utils.h" -#include "google/cloud/internal/async_retry_unary_rpc.h" -#include "google/cloud/internal/make_status.h" #include #include @@ -30,7 +22,6 @@ namespace cloud { namespace bigtable { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -using ::google::cloud::Idempotency; using ::google::cloud::internal::MergeOptions; using ::google::cloud::internal::OptionsSpan; @@ -44,175 +35,28 @@ void SetCommonTableOperationRequest(Request& request, } } // namespace -using ClientUtils = bigtable::internal::UnaryClientUtils; - static_assert(std::is_copy_assignable::value, "bigtable::Table must be CopyAssignable"); Status Table::Apply(SingleRowMutation mut, Options opts) { - if (connection_) { - OptionsSpan span(MergeOptions(std::move(opts), options_)); - return connection_->Apply(table_name_, std::move(mut)); - } - if (!google::cloud::internal::IsEmpty(opts)) { - return google::cloud::internal::InvalidArgumentError( - "Per-operation options only apply to `Table`s constructed " - "with a `DataConnection`.", - GCP_ERROR_INFO()); - } - - // Copy the policies in effect for this operation. Many policy classes change - // their state as the operation makes progress (or fails to make progress), so - // we need fresh instances. - auto rpc_policy = clone_rpc_retry_policy(); - auto backoff_policy = clone_rpc_backoff_policy(); - auto idempotent_policy = clone_idempotent_mutation_policy(); - - // Build the RPC request, try to minimize copying. - btproto::MutateRowRequest request; - SetCommonTableOperationRequest( - request, app_profile_id(), table_name_); - mut.MoveTo(request); - - bool const is_idempotent = - std::all_of(request.mutations().begin(), request.mutations().end(), - [&idempotent_policy](btproto::Mutation const& m) { - return idempotent_policy->is_idempotent(m); - }); - - btproto::MutateRowResponse response; - grpc::Status status; - while (true) { - grpc::ClientContext client_context; - rpc_policy->Setup(client_context); - backoff_policy->Setup(client_context); - metadata_update_policy_.Setup(client_context); - status = client_->MutateRow(&client_context, request, &response); - - if (status.ok()) { - return google::cloud::Status{}; - } - // It is up to the policy to terminate this loop, it could run - // forever, but that would be a bad policy (pun intended). - if (!rpc_policy->OnFailure(status) || !is_idempotent) { - return MakeStatusFromRpcError(status); - } - auto delay = backoff_policy->OnCompletion(status); - std::this_thread::sleep_for(delay); - } + OptionsSpan span(MergeOptions(std::move(opts), options_)); + return connection_->Apply(table_name_, std::move(mut)); } future Table::AsyncApply(SingleRowMutation mut, Options opts) { - if (connection_) { - OptionsSpan span(MergeOptions(std::move(opts), options_)); - return connection_->AsyncApply(table_name_, std::move(mut)); - } - if (!google::cloud::internal::IsEmpty(opts)) { - return make_ready_future(google::cloud::internal::InvalidArgumentError( - "Per-operation options only apply to `Table`s constructed " - "with a `DataConnection`.", - GCP_ERROR_INFO())); - } - - google::bigtable::v2::MutateRowRequest request; - SetCommonTableOperationRequest( - request, app_profile_id(), table_name_); - mut.MoveTo(request); - - // Determine if all the mutations are idempotent. The idempotency of the - // mutations won't change as the retry loop executes, so we can just compute - // it once and use a constant value for the loop. - auto idempotent_mutation_policy = clone_idempotent_mutation_policy(); - auto const is_idempotent = std::all_of( - request.mutations().begin(), request.mutations().end(), - [&idempotent_mutation_policy](google::bigtable::v2::Mutation const& m) { - return idempotent_mutation_policy->is_idempotent(m); - }); - - auto const idempotency = - is_idempotent ? Idempotency::kIdempotent : Idempotency::kNonIdempotent; - - auto cq = background_threads_->cq(); - auto& client = client_; - auto metadata_update_policy = clone_metadata_update_policy(); - return google::cloud::internal::StartRetryAsyncUnaryRpc( - cq, __func__, clone_rpc_retry_policy(), clone_rpc_backoff_policy(), - idempotency, - [client, metadata_update_policy]( - grpc::ClientContext* context, - google::bigtable::v2::MutateRowRequest const& request, - grpc::CompletionQueue* cq) { - metadata_update_policy.Setup(*context); - return client->AsyncMutateRow(context, request, cq); - }, - std::move(request)) - .then([](future> r) { - return r.get().status(); - }); + OptionsSpan span(MergeOptions(std::move(opts), options_)); + return connection_->AsyncApply(table_name_, std::move(mut)); } std::vector Table::BulkApply(BulkMutation mut, Options opts) { - if (connection_) { - OptionsSpan span(MergeOptions(std::move(opts), options_)); - return connection_->BulkApply(table_name_, std::move(mut)); - } - if (!google::cloud::internal::IsEmpty(opts)) { - return bigtable_internal::MakeFailedMutations( - google::cloud::internal::InvalidArgumentError( - "Per-operation options only apply to `Table`s constructed " - "with a `DataConnection`.", - GCP_ERROR_INFO()), - mut.size()); - } - - if (mut.empty()) return {}; - grpc::Status status; - - // Copy the policies in effect for this operation. Many policy classes change - // their state as the operation makes progress (or fails to make progress), so - // we need fresh instances. - auto backoff_policy = clone_rpc_backoff_policy(); - auto retry_policy = clone_rpc_retry_policy(); - auto idempotent_policy = clone_idempotent_mutation_policy(); - - bigtable_internal::BulkMutator mutator( - app_profile_id(), table_name_, *idempotent_policy, std::move(mut), - std::make_shared()); - while (true) { - grpc::ClientContext client_context; - backoff_policy->Setup(client_context); - retry_policy->Setup(client_context); - metadata_update_policy_.Setup(client_context); - status = mutator.MakeOneRequest(*client_, client_context); - if (!mutator.HasPendingMutations()) break; - if (!retry_policy->OnFailure(status)) break; - auto delay = backoff_policy->OnCompletion(status); - std::this_thread::sleep_for(delay); - } - return std::move(mutator).OnRetryDone(); + OptionsSpan span(MergeOptions(std::move(opts), options_)); + return connection_->BulkApply(table_name_, std::move(mut)); } future> Table::AsyncBulkApply(BulkMutation mut, Options opts) { - if (connection_) { - OptionsSpan span(MergeOptions(std::move(opts), options_)); - return connection_->AsyncBulkApply(table_name_, std::move(mut)); - } - if (!google::cloud::internal::IsEmpty(opts)) { - return make_ready_future(bigtable_internal::MakeFailedMutations( - google::cloud::internal::InvalidArgumentError( - "Per-operation options only apply to `Table`s constructed " - "with a `DataConnection`.", - GCP_ERROR_INFO()), - mut.size())); - } - - auto cq = background_threads_->cq(); - auto mutation_policy = clone_idempotent_mutation_policy(); - return internal::AsyncRetryBulkApply::Create( - cq, clone_rpc_retry_policy(), clone_rpc_backoff_policy(), - *mutation_policy, clone_metadata_update_policy(), client_, - app_profile_id(), table_name_, std::move(mut)); + OptionsSpan span(MergeOptions(std::move(opts), options_)); + return connection_->AsyncBulkApply(table_name_, std::move(mut)); } RowReader Table::ReadRows(RowSet row_set, Filter filter, Options opts) { @@ -222,162 +66,34 @@ RowReader Table::ReadRows(RowSet row_set, Filter filter, Options opts) { RowReader Table::ReadRows(RowSet row_set, std::int64_t rows_limit, Filter filter, Options opts) { - if (connection_) { - OptionsSpan span(MergeOptions(std::move(opts), options_)); - return connection_->ReadRows(table_name_, std::move(row_set), rows_limit, - std::move(filter)); - } - if (!google::cloud::internal::IsEmpty(opts)) { - return MakeRowReader( - std::make_shared( - google::cloud::internal::InvalidArgumentError( - "Per-operation options only apply to `Table`s constructed " - "with a `DataConnection`.", - GCP_ERROR_INFO()))); - } - - auto impl = std::make_shared( - client_, app_profile_id(), table_name_, std::move(row_set), rows_limit, - std::move(filter), clone_rpc_retry_policy(), clone_rpc_backoff_policy(), - metadata_update_policy_, - std::make_unique()); - return bigtable_internal::MakeRowReader(std::move(impl)); + OptionsSpan span(MergeOptions(std::move(opts), options_)); + return connection_->ReadRows(table_name_, std::move(row_set), rows_limit, + std::move(filter)); } StatusOr> Table::ReadRow(std::string row_key, Filter filter, Options opts) { - if (connection_) { - OptionsSpan span(MergeOptions(std::move(opts), options_)); - return connection_->ReadRow(table_name_, std::move(row_key), - std::move(filter)); - } - if (!google::cloud::internal::IsEmpty(opts)) { - return google::cloud::internal::InvalidArgumentError( - "Per-operation options only apply to `Table`s constructed " - "with a `DataConnection`.", - GCP_ERROR_INFO()); - } - - RowSet row_set(std::move(row_key)); - std::int64_t const rows_limit = 1; - RowReader reader = - ReadRows(std::move(row_set), rows_limit, std::move(filter)); - - auto it = reader.begin(); - if (it == reader.end()) { - return std::make_pair(false, Row("", {})); - } - if (!*it) { - return it->status(); - } - auto result = std::make_pair(true, std::move(**it)); - if (++it != reader.end()) { - return google::cloud::internal::InternalError( - "internal error - RowReader returned more than one row in ReadRow(, " - "GCP_ERROR_INFO())"); - } - return result; + OptionsSpan span(MergeOptions(std::move(opts), options_)); + return connection_->ReadRow(table_name_, std::move(row_key), + std::move(filter)); } StatusOr Table::CheckAndMutateRow( std::string row_key, Filter filter, std::vector true_mutations, std::vector false_mutations, Options opts) { - if (connection_) { - OptionsSpan span(MergeOptions(std::move(opts), options_)); - return connection_->CheckAndMutateRow( - table_name_, std::move(row_key), std::move(filter), - std::move(true_mutations), std::move(false_mutations)); - } - if (!google::cloud::internal::IsEmpty(opts)) { - return google::cloud::internal::InvalidArgumentError( - "Per-operation options only apply to `Table`s constructed " - "with a `DataConnection`.", - GCP_ERROR_INFO()); - } - - grpc::Status status; - btproto::CheckAndMutateRowRequest request; - request.set_row_key(std::move(row_key)); - SetCommonTableOperationRequest( - request, app_profile_id(), table_name_); - *request.mutable_predicate_filter() = std::move(filter).as_proto(); - for (auto& m : true_mutations) { - *request.add_true_mutations() = std::move(m.op); - } - for (auto& m : false_mutations) { - *request.add_false_mutations() = std::move(m.op); - } - auto const idempotency = idempotent_mutation_policy_->is_idempotent(request) - ? Idempotency::kIdempotent - : Idempotency::kNonIdempotent; - auto response = ClientUtils::MakeCall( - *client_, clone_rpc_retry_policy(), clone_rpc_backoff_policy(), - metadata_update_policy_, &DataClient::CheckAndMutateRow, request, - "Table::CheckAndMutateRow", status, idempotency); - - if (!status.ok()) { - return MakeStatusFromRpcError(status); - } - return response.predicate_matched() ? MutationBranch::kPredicateMatched - : MutationBranch::kPredicateNotMatched; + OptionsSpan span(MergeOptions(std::move(opts), options_)); + return connection_->CheckAndMutateRow( + table_name_, std::move(row_key), std::move(filter), + std::move(true_mutations), std::move(false_mutations)); } future> Table::AsyncCheckAndMutateRow( std::string row_key, Filter filter, std::vector true_mutations, std::vector false_mutations, Options opts) { - if (connection_) { - OptionsSpan span(MergeOptions(std::move(opts), options_)); - return connection_->AsyncCheckAndMutateRow( - table_name_, std::move(row_key), std::move(filter), - std::move(true_mutations), std::move(false_mutations)); - } - if (!google::cloud::internal::IsEmpty(opts)) { - return make_ready_future>( - google::cloud::internal::InvalidArgumentError( - "Per-operation options only apply to `Table`s constructed " - "with a `DataConnection`.", - GCP_ERROR_INFO())); - } - - btproto::CheckAndMutateRowRequest request; - request.set_row_key(std::move(row_key)); - SetCommonTableOperationRequest( - request, app_profile_id(), table_name_); - *request.mutable_predicate_filter() = std::move(filter).as_proto(); - for (auto& m : true_mutations) { - *request.add_true_mutations() = std::move(m.op); - } - for (auto& m : false_mutations) { - *request.add_false_mutations() = std::move(m.op); - } - auto const idempotency = idempotent_mutation_policy_->is_idempotent(request) - ? Idempotency::kIdempotent - : Idempotency::kNonIdempotent; - - auto cq = background_threads_->cq(); - auto& client = client_; - auto metadata_update_policy = clone_metadata_update_policy(); - return google::cloud::internal::StartRetryAsyncUnaryRpc( - cq, __func__, clone_rpc_retry_policy(), clone_rpc_backoff_policy(), - idempotency, - [client, metadata_update_policy]( - grpc::ClientContext* context, - btproto::CheckAndMutateRowRequest const& request, - grpc::CompletionQueue* cq) { - metadata_update_policy.Setup(*context); - return client->AsyncCheckAndMutateRow(context, request, cq); - }, - std::move(request)) - .then([](future> f) - -> StatusOr { - auto response = f.get(); - if (!response) { - return response.status(); - } - return response->predicate_matched() - ? MutationBranch::kPredicateMatched - : MutationBranch::kPredicateNotMatched; - }); + OptionsSpan span(MergeOptions(std::move(opts), options_)); + return connection_->AsyncCheckAndMutateRow( + table_name_, std::move(row_key), std::move(filter), + std::move(true_mutations), std::move(false_mutations)); } // Call the `google.bigtable.v2.Bigtable.SampleRowKeys` RPC until @@ -386,75 +102,14 @@ future> Table::AsyncCheckAndMutateRow( // policies in effect tell us to stop. Note that each retry must clear the // samples otherwise the result is an inconsistent set of sample row keys. StatusOr> Table::SampleRows(Options opts) { - if (connection_) { - OptionsSpan span(MergeOptions(std::move(opts), options_)); - return connection_->SampleRows(table_name_); - } - if (!google::cloud::internal::IsEmpty(opts)) { - return google::cloud::internal::InvalidArgumentError( - "Per-operation options only apply to `Table`s constructed " - "with a `DataConnection`.", - GCP_ERROR_INFO()); - } - - // Copy the policies in effect for this operation. - auto backoff_policy = clone_rpc_backoff_policy(); - auto retry_policy = clone_rpc_retry_policy(); - std::vector samples; - - // Build the RPC request for SampleRowKeys - btproto::SampleRowKeysRequest request; - btproto::SampleRowKeysResponse response; - SetCommonTableOperationRequest( - request, app_profile_id(), table_name_); - - while (true) { - grpc::ClientContext client_context; - backoff_policy->Setup(client_context); - retry_policy->Setup(client_context); - clone_metadata_update_policy().Setup(client_context); - - auto stream = client_->SampleRowKeys(&client_context, request); - while (stream->Read(&response)) { - bigtable::RowKeySample row_sample; - row_sample.offset_bytes = response.offset_bytes(); - row_sample.row_key = std::move(*response.mutable_row_key()); - samples.emplace_back(std::move(row_sample)); - } - auto status = stream->Finish(); - if (status.ok()) { - break; - } - if (!retry_policy->OnFailure(status)) { - return MakeStatusFromRpcError( - status.error_code(), - "Retry policy exhausted: " + status.error_message()); - } - samples.clear(); - auto delay = backoff_policy->OnCompletion(status); - std::this_thread::sleep_for(delay); - } - return samples; + OptionsSpan span(MergeOptions(std::move(opts), options_)); + return connection_->SampleRows(table_name_); } future>> Table::AsyncSampleRows( Options opts) { - if (connection_) { - OptionsSpan span(MergeOptions(std::move(opts), options_)); - return connection_->AsyncSampleRows(table_name_); - } - if (!google::cloud::internal::IsEmpty(opts)) { - return make_ready_future>>( - google::cloud::internal::InvalidArgumentError( - "Per-operation options only apply to `Table`s constructed " - "with a `DataConnection`.", - GCP_ERROR_INFO())); - } - - auto cq = background_threads_->cq(); - return internal::LegacyAsyncRowSampler::Create( - cq, client_, clone_rpc_retry_policy(), clone_rpc_backoff_policy(), - metadata_update_policy_, app_profile_id(), table_name_); + OptionsSpan span(MergeOptions(std::move(opts), options_)); + return connection_->AsyncSampleRows(table_name_); } StatusOr Table::ReadModifyWriteRowImpl( @@ -462,27 +117,8 @@ StatusOr Table::ReadModifyWriteRowImpl( SetCommonTableOperationRequest< ::google::bigtable::v2::ReadModifyWriteRowRequest>( request, app_profile_id(), table_name_); - if (connection_) { - OptionsSpan span(MergeOptions(std::move(opts), options_)); - return connection_->ReadModifyWriteRow(std::move(request)); - } - if (!google::cloud::internal::IsEmpty(opts)) { - return google::cloud::internal::InvalidArgumentError( - "Per-operation options only apply to `Table`s constructed " - "with a `DataConnection`.", - GCP_ERROR_INFO()); - } - - grpc::Status status; - auto response = ClientUtils::MakeNonIdempotentCall( - *(client_), clone_rpc_retry_policy(), clone_metadata_update_policy(), - &DataClient::ReadModifyWriteRow, request, "ReadModifyWriteRowRequest", - status); - if (!status.ok()) { - return MakeStatusFromRpcError(status); - } - return bigtable_internal::TransformReadModifyWriteRowResponse( - std::move(response)); + OptionsSpan span(MergeOptions(std::move(opts), options_)); + return connection_->ReadModifyWriteRow(std::move(request)); } future> Table::AsyncReadModifyWriteRowImpl( @@ -490,107 +126,16 @@ future> Table::AsyncReadModifyWriteRowImpl( SetCommonTableOperationRequest< ::google::bigtable::v2::ReadModifyWriteRowRequest>( request, app_profile_id(), table_name_); - if (connection_) { - OptionsSpan span(MergeOptions(std::move(opts), options_)); - return connection_->AsyncReadModifyWriteRow(std::move(request)); - } - if (!google::cloud::internal::IsEmpty(opts)) { - return make_ready_future>( - google::cloud::internal::InvalidArgumentError( - "Per-operation options only apply to `Table`s constructed " - "with a `DataConnection`.", - GCP_ERROR_INFO())); - } - - auto cq = background_threads_->cq(); - auto& client = client_; - auto metadata_update_policy = clone_metadata_update_policy(); - return google::cloud::internal::StartRetryAsyncUnaryRpc( - cq, __func__, clone_rpc_retry_policy(), clone_rpc_backoff_policy(), - Idempotency::kNonIdempotent, - [client, metadata_update_policy]( - grpc::ClientContext* context, - btproto::ReadModifyWriteRowRequest const& request, - grpc::CompletionQueue* cq) { - metadata_update_policy.Setup(*context); - return client->AsyncReadModifyWriteRow(context, request, cq); - }, - std::move(request)) - .then([](future> fut) - -> StatusOr { - auto result = fut.get(); - if (!result) return std::move(result).status(); - return bigtable_internal::TransformReadModifyWriteRowResponse( - *std::move(result)); - }); + OptionsSpan span(MergeOptions(std::move(opts), options_)); + return connection_->AsyncReadModifyWriteRow(std::move(request)); } future>> Table::AsyncReadRow(std::string row_key, Filter filter, Options opts) { - if (connection_) { - OptionsSpan span(MergeOptions(std::move(opts), options_)); - return connection_->AsyncReadRow(table_name_, std::move(row_key), - std::move(filter)); - } - if (!google::cloud::internal::IsEmpty(opts)) { - return make_ready_future>>( - google::cloud::internal::InvalidArgumentError( - "Per-operation options only apply to `Table`s constructed " - "with a `DataConnection`.", - GCP_ERROR_INFO())); - } - - class AsyncReadRowHandler { - public: - AsyncReadRowHandler() : row_("", {}) {} - - future>> GetFuture() { - return row_promise_.get_future(); - } - - future OnRow(Row row) { - // assert(!row_received_); - row_ = std::move(row); - row_received_ = true; - // Don't satisfy the promise before `OnStreamFinished`. - // - // The `CompletionQueue`, which this object holds a reference to, should - // not be shut down before `OnStreamFinished` is called. In order to make - // sure of that, satisying the `promise<>` is deferred until then - the - // user shouldn't shutdown the `CompletionQueue` before this whole - // operation is done. - return make_ready_future(false); - } - - void OnStreamFinished(Status status) { - if (row_received_) { - // If we got a row we don't need to care about the stream status. - row_promise_.set_value(std::make_pair(true, std::move(row_))); - return; - } - if (status.ok()) { - row_promise_.set_value(std::make_pair(false, Row("", {}))); - } else { - row_promise_.set_value(std::move(status)); - } - } - - private: - Row row_; - bool row_received_{}; - promise>> row_promise_; - }; - - RowSet row_set(std::move(row_key)); - std::int64_t const rows_limit = 1; - auto handler = std::make_shared(); - AsyncReadRows([handler](Row row) { return handler->OnRow(std::move(row)); }, - [handler](Status status) { - handler->OnStreamFinished(std::move(status)); - }, - std::move(row_set), rows_limit, std::move(filter)); - return handler->GetFuture(); + OptionsSpan span(MergeOptions(std::move(opts), options_)); + return connection_->AsyncReadRow(table_name_, std::move(row_key), + std::move(filter)); } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END diff --git a/google/cloud/bigtable/table.h b/google/cloud/bigtable/table.h index 00b16e69098ac..6539d08961b7b 100644 --- a/google/cloud/bigtable/table.h +++ b/google/cloud/bigtable/table.h @@ -16,12 +16,10 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_TABLE_H #include "google/cloud/bigtable/completion_queue.h" -#include "google/cloud/bigtable/data_client.h" #include "google/cloud/bigtable/data_connection.h" #include "google/cloud/bigtable/filters.h" #include "google/cloud/bigtable/idempotent_mutation_policy.h" #include "google/cloud/bigtable/internal/defaults.h" -#include "google/cloud/bigtable/internal/legacy_async_row_reader.h" #include "google/cloud/bigtable/mutation_branch.h" #include "google/cloud/bigtable/mutations.h" #include "google/cloud/bigtable/options.h" @@ -34,6 +32,7 @@ #include "google/cloud/bigtable/rpc_retry_policy.h" #include "google/cloud/bigtable/table_resource.h" #include "google/cloud/bigtable/version.h" +#include "google/cloud/background_threads.h" #include "google/cloud/future.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/internal/group_options.h" @@ -52,20 +51,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN class MutationBatcher; -/** - * Return the full table name. - * - * The full table name is: - * - * `projects//instances//tables/` - * - * Where the project id and instance id come from the @p client parameter. - */ -inline std::string TableName(std::shared_ptr const& client, - std::string const& table_id) { - return InstanceName(client) + "/tables/" + table_id; -} - /** * The main interface to interact with data in a Cloud Bigtable table. * @@ -209,10 +194,8 @@ class Table { : table_(std::move(tr)), table_name_(table_.FullName()), connection_(std::move(conn)), - options_(google::cloud::internal::MergeOptions(std::move(options), - connection_->options())), - metadata_update_policy_(bigtable_internal::MakeMetadataUpdatePolicy( - table_name_, app_profile_id())) {} + options_(google::cloud::internal::MergeOptions( + std::move(options), connection_->options())) {} std::string const& table_name() const { return table_name_; } std::string const& app_profile_id() const { @@ -238,8 +221,6 @@ class Table { table.table_ = TableResource(std::move(project_id), std::move(instance_id), std::move(table_id)); table.table_name_ = table.table_.FullName(); - table.metadata_update_policy_ = bigtable_internal::MakeMetadataUpdatePolicy( - table.table_name_, table.app_profile_id()); return table; } @@ -254,8 +235,6 @@ class Table { std::move(table_id)); table.table_name_ = table.table_.FullName(); table.options_.set(std::move(app_profile_id)); - table.metadata_update_policy_ = bigtable_internal::MakeMetadataUpdatePolicy( - table.table_name_, table.app_profile_id()); return table; } @@ -775,28 +754,11 @@ class Table { return (*on_finish_ptr)(std::move(status)); }; - if (connection_) { - google::cloud::internal::OptionsSpan span( - google::cloud::internal::MergeOptions(std::move(opts), options_)); - connection_->AsyncReadRows(table_name_, std::move(on_row_fn), - std::move(on_finish_fn), std::move(row_set), - rows_limit, std::move(filter)); - return; - } - if (!google::cloud::internal::IsEmpty(opts)) { - on_finish_fn(google::cloud::internal::InvalidArgumentError( - "Per-operation options only apply to `Table`s constructed " - "with a `DataConnection`.", - GCP_ERROR_INFO())); - return; - } - - bigtable_internal::LegacyAsyncRowReader::Create( - background_threads_->cq(), client_, app_profile_id(), table_name_, - std::move(on_row_fn), std::move(on_finish_fn), std::move(row_set), - rows_limit, std::move(filter), clone_rpc_retry_policy(), - clone_rpc_backoff_policy(), metadata_update_policy_, - std::make_unique()); + google::cloud::internal::OptionsSpan span( + google::cloud::internal::MergeOptions(std::move(opts), options_)); + connection_->AsyncReadRows(table_name_, std::move(on_row_fn), + std::move(on_finish_fn), std::move(row_set), + rows_limit, std::move(filter)); } /** @@ -830,176 +792,6 @@ class Table { Filter filter, Options opts = {}); - /** - * Constructor with default policies. - * - * @param client how to communicate with Cloud Bigtable, including - * credentials, the project id, and the instance id. - * @param table_id the table id within the instance defined by client. The - * full table name is `client->instance_name() + "/tables/" + table_id`. - * - * @deprecated #google::cloud::bigtable::DataConnection is the preferred way - * to communicate with the Bigtable Data API. To migrate existing code, - * see @ref migrating-from-dataclient "Migrating from DataClient". - */ - Table(std::shared_ptr client, std::string const& table_id) - : Table(std::move(client), std::string{}, table_id) {} - - /** - * Constructor with default policies. - * - * @param client how to communicate with Cloud Bigtable, including - * credentials, the project id, and the instance id. - * @param app_profile_id the app_profile_id needed for using the replication - * API. - * @param table_id the table id within the instance defined by client. The - * full table name is `client->instance_name() + "/tables/" + table_id`. - * - * @deprecated #google::cloud::bigtable::DataConnection is the preferred way - * to communicate with the Bigtable Data API. To migrate existing code, - * see @ref migrating-from-dataclient "Migrating from DataClient". - */ - Table(std::shared_ptr client, std::string app_profile_id, - std::string const& table_id) - : client_(std::move(client)), - table_(client_->project_id(), client_->instance_id(), table_id), - table_name_(table_.FullName()), - rpc_retry_policy_prototype_( - bigtable::DefaultRPCRetryPolicy(internal::kBigtableLimits)), - rpc_backoff_policy_prototype_( - bigtable::DefaultRPCBackoffPolicy(internal::kBigtableLimits)), - idempotent_mutation_policy_( - bigtable::DefaultIdempotentMutationPolicy()), - background_threads_(client_->BackgroundThreadsFactory()()), - options_(Options{}.set(std::move(app_profile_id))), - metadata_update_policy_(bigtable_internal::MakeMetadataUpdatePolicy( - table_name_, this->app_profile_id())) {} - - /** - * Constructor with explicit policies. - * - * The policies are passed by value, because this makes it easy for - * applications to create them. - * - * @par Example - * @code - * using namespace std::chrono_literals; // assuming C++14. - * auto client = bigtable::MakeClient(...); // details omitted - * bigtable::Table table(client, "my-table", - * // Allow up to 20 minutes to retry operations - * bigtable::LimitedTimeRetryPolicy(20min), - * // Start with 50 milliseconds backoff, grow - * // exponentially to 5 minutes. - * bigtable::ExponentialBackoffPolicy(50ms, 5min), - * // Only retry idempotent mutations. - * bigtable::SafeIdempotentMutationPolicy()); - * @endcode - * - * @param client how to communicate with Cloud Bigtable, including - * credentials, the project id, and the instance id. - * @param table_id the table id within the instance defined by client. The - * full table name is `client->instance_name() + "/tables/" + table_id`. - * @param policies the set of policy overrides for this object. - * @tparam Policies the types of the policies to override, the types must - * derive from one of the following types: - * - * - `IdempotentMutationPolicy` which mutations are retried. Use - * `SafeIdempotentMutationPolicy` to only retry idempotent operations, - * use `AlwaysRetryMutationPolicy` to retry all operations. Read the - * caveats in the class definition to understand the downsides of the - * latter. You can also create your own policies that decide which - * mutations to retry. - * - `RPCBackoffPolicy` how to backoff from a failed RPC. Currently only - * `ExponentialBackoffPolicy` is implemented. You can also create your - * own policies that backoff using a different algorithm. - * - `RPCRetryPolicy` for how long to retry failed RPCs. Use - * `LimitedErrorCountRetryPolicy` to limit the number of failures - * allowed. Use `LimitedTimeRetryPolicy` to bound the time for any - * request. You can also create your own policies that combine time and - * error counts. - * - * @see SafeIdempotentMutationPolicy, AlwaysRetryMutationPolicy, - * ExponentialBackoffPolicy, LimitedErrorCountRetryPolicy, - * LimitedTimeRetryPolicy. - * - * @deprecated #google::cloud::bigtable::DataConnection is the preferred way - * to communicate with the Bigtable Data API. To migrate existing code, - * see @ref migrating-from-dataclient "Migrating from DataClient". - */ - template ::value, int> = 0 - /// @endcond - > - Table(std::shared_ptr client, std::string const& table_id, - Policies&&... policies) - : Table(std::move(client), table_id) { - ChangePolicies(std::forward(policies)...); - } - - /** - * Constructor with explicit policies. - * - * The policies are passed by value, because this makes it easy for - * applications to create them. - * - * @par Example - * @code - * using namespace std::chrono_literals; // assuming C++14. - * auto client = bigtable::MakeClient(...); // details omitted - * bigtable::Table table(client, "app_id", "my-table", - * // Allow up to 20 minutes to retry operations - * bigtable::LimitedTimeRetryPolicy(20min), - * // Start with 50 milliseconds backoff, grow - * // exponentially to 5 minutes. - * bigtable::ExponentialBackoffPolicy(50ms, 5min), - * // Only retry idempotent mutations. - * bigtable::SafeIdempotentMutationPolicy()); - * @endcode - * - * @param client how to communicate with Cloud Bigtable, including - * credentials, the project id, and the instance id. - * @param app_profile_id the app_profile_id needed for using the replication - * API. - * @param table_id the table id within the instance defined by client. The - * full table name is `client->instance_name() + "/tables/" + table_id`. - * @param policies the set of policy overrides for this object. - * @tparam Policies the types of the policies to override, the types must - * derive from one of the following types: - * - `IdempotentMutationPolicy` which mutations are retried. Use - * `SafeIdempotentMutationPolicy` to only retry idempotent operations, - * use `AlwaysRetryMutationPolicy` to retry all operations. Read the - * caveats in the class definition to understand the downsides of the - * latter. You can also create your own policies that decide which - * mutations to retry. - * - `RPCBackoffPolicy` how to backoff from a failed RPC. Currently only - * `ExponentialBackoffPolicy` is implemented. You can also create your - * own policies that backoff using a different algorithm. - * - `RPCRetryPolicy` for how long to retry failed RPCs. Use - * `LimitedErrorCountRetryPolicy` to limit the number of failures - * allowed. Use `LimitedTimeRetryPolicy` to bound the time for any - * request. You can also create your own policies that combine time and - * error counts. - * - * @see SafeIdempotentMutationPolicy, AlwaysRetryMutationPolicy, - * ExponentialBackoffPolicy, LimitedErrorCountRetryPolicy, - * LimitedTimeRetryPolicy. - * - * @deprecated #google::cloud::bigtable::DataConnection is the preferred way - * to communicate with the Bigtable Data API. To migrate existing code, - * see @ref migrating-from-dataclient "Migrating from DataClient". - */ - template ::value, int> = 0 - /// @endcond - > - Table(std::shared_ptr client, std::string app_profile_id, - std::string const& table_id, Policies&&... policies) - : Table(std::move(client), std::move(app_profile_id), table_id) { - ChangePolicies(std::forward(policies)...); - } - private: /** * Send request ReadModifyWriteRowRequest to modify the row and get it back @@ -1035,10 +827,6 @@ class Table { return rpc_backoff_policy_prototype_->clone(); } - MetadataUpdatePolicy clone_metadata_update_policy() { - return metadata_update_policy_; - } - std::unique_ptr clone_idempotent_mutation_policy() { return idempotent_mutation_policy_->clone(); } @@ -1066,16 +854,13 @@ class Table { ///@} friend class MutationBatcher; - std::shared_ptr client_; TableResource table_; std::string table_name_; std::shared_ptr rpc_retry_policy_prototype_; std::shared_ptr rpc_backoff_policy_prototype_; std::shared_ptr idempotent_mutation_policy_; - std::shared_ptr background_threads_; std::shared_ptr connection_; Options options_; - MetadataUpdatePolicy metadata_update_policy_; }; GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END diff --git a/google/cloud/bigtable/table_admin.cc b/google/cloud/bigtable/table_admin.cc deleted file mode 100644 index 50686fb9f0452..0000000000000 --- a/google/cloud/bigtable/table_admin.cc +++ /dev/null @@ -1,349 +0,0 @@ -// Copyright 2017 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/table_admin.h" -#include "google/cloud/bigtable/admin/bigtable_table_admin_client.h" -#include "google/cloud/bigtable/wait_for_consistency.h" -#include "google/cloud/internal/time_utils.h" -#include -#include - -namespace btadmin = ::google::bigtable::admin::v2; - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -static_assert(std::is_copy_constructible::value, - "bigtable::TableAdmin must be constructible"); -static_assert(std::is_copy_assignable::value, - "bigtable::TableAdmin must be assignable"); - -// NOLINTNEXTLINE(readability-identifier-naming) -constexpr TableAdmin::TableView TableAdmin::ENCRYPTION_VIEW; -// NOLINTNEXTLINE(readability-identifier-naming) -constexpr TableAdmin::TableView TableAdmin::FULL; -// NOLINTNEXTLINE(readability-identifier-naming) -constexpr TableAdmin::TableView TableAdmin::NAME_ONLY; -// NOLINTNEXTLINE(readability-identifier-naming) -constexpr TableAdmin::TableView TableAdmin::REPLICATION_VIEW; -// NOLINTNEXTLINE(readability-identifier-naming) -constexpr TableAdmin::TableView TableAdmin::SCHEMA_VIEW; -// NOLINTNEXTLINE(readability-identifier-naming) -constexpr TableAdmin::TableView TableAdmin::VIEW_UNSPECIFIED; - -StatusOr TableAdmin::CreateTable(std::string table_id, - TableConfig config) { - google::cloud::internal::OptionsSpan span(options_); - auto request = std::move(config).as_proto(); - request.set_parent(instance_name()); - request.set_table_id(std::move(table_id)); - return connection_->CreateTable(request); -} - -StatusOr> TableAdmin::ListTables( - btadmin::Table::View view) { - google::cloud::internal::OptionsSpan span(options_); - std::vector result; - - btadmin::ListTablesRequest request; - request.set_parent(instance_name()); - request.set_view(view); - auto sr = connection_->ListTables(request); - for (auto& t : sr) { - if (!t) return std::move(t).status(); - result.emplace_back(*std::move(t)); - } - return result; -} - -StatusOr TableAdmin::GetTable(std::string const& table_id, - btadmin::Table::View view) { - google::cloud::internal::OptionsSpan span(options_); - btadmin::GetTableRequest request; - request.set_name(TableName(table_id)); - request.set_view(view); - return connection_->GetTable(request); -} - -Status TableAdmin::DeleteTable(std::string const& table_id) { - google::cloud::internal::OptionsSpan span(options_); - btadmin::DeleteTableRequest request; - request.set_name(TableName(table_id)); - return connection_->DeleteTable(request); -} - -btadmin::CreateBackupRequest TableAdmin::CreateBackupParams::AsProto( - std::string instance_name) const { - btadmin::CreateBackupRequest proto; - proto.set_parent(instance_name + "/clusters/" + cluster_id); - proto.set_backup_id(backup_id); - proto.mutable_backup()->set_source_table(std::move(instance_name) + - "/tables/" + table_name); - *proto.mutable_backup()->mutable_expire_time() = - google::cloud::internal::ToProtoTimestamp(expire_time); - return proto; -} - -StatusOr TableAdmin::CreateBackup( - CreateBackupParams const& params) { - google::cloud::internal::OptionsSpan span(options_); - auto request = params.AsProto(instance_name()); - return connection_->CreateBackup(request).get(); -} - -StatusOr TableAdmin::GetBackup(std::string const& cluster_id, - std::string const& backup_id) { - google::cloud::internal::OptionsSpan span(options_); - btadmin::GetBackupRequest request; - request.set_name(BackupName(cluster_id, backup_id)); - return connection_->GetBackup(request); -} - -btadmin::UpdateBackupRequest TableAdmin::UpdateBackupParams::AsProto( - std::string const& instance_name) const { - btadmin::UpdateBackupRequest proto; - proto.mutable_backup()->set_name(instance_name + "/clusters/" + cluster_id + - "/backups/" + backup_name); - *proto.mutable_backup()->mutable_expire_time() = - google::cloud::internal::ToProtoTimestamp(expire_time); - proto.mutable_update_mask()->add_paths("expire_time"); - return proto; -} - -StatusOr TableAdmin::UpdateBackup( - UpdateBackupParams const& params) { - google::cloud::internal::OptionsSpan span(options_); - btadmin::UpdateBackupRequest request = params.AsProto(instance_name()); - return connection_->UpdateBackup(request); -} - -Status TableAdmin::DeleteBackup(btadmin::Backup const& backup) { - google::cloud::internal::OptionsSpan span(options_); - btadmin::DeleteBackupRequest request; - request.set_name(backup.name()); - return connection_->DeleteBackup(request); -} - -Status TableAdmin::DeleteBackup(std::string const& cluster_id, - std::string const& backup_id) { - google::cloud::internal::OptionsSpan span(options_); - btadmin::DeleteBackupRequest request; - request.set_name(BackupName(cluster_id, backup_id)); - return connection_->DeleteBackup(request); -} - -btadmin::ListBackupsRequest TableAdmin::ListBackupsParams::AsProto( - std::string const& instance_name) const { - btadmin::ListBackupsRequest proto; - proto.set_parent(cluster_id ? instance_name + "/clusters/" + *cluster_id - : instance_name + "/clusters/-"); - if (filter) *proto.mutable_filter() = *filter; - if (order_by) *proto.mutable_order_by() = *order_by; - return proto; -} - -StatusOr> TableAdmin::ListBackups( - ListBackupsParams const& params) { - google::cloud::internal::OptionsSpan span(options_); - std::vector result; - - btadmin::ListBackupsRequest request = params.AsProto(instance_name()); - auto sr = connection_->ListBackups(request); - for (auto& b : sr) { - if (!b) return std::move(b).status(); - result.emplace_back(*std::move(b)); - } - return result; -} - -btadmin::RestoreTableRequest TableAdmin::RestoreTableParams::AsProto( - std::string const& instance_name) const { - btadmin::RestoreTableRequest proto; - proto.set_parent(instance_name); - proto.set_table_id(table_id); - proto.set_backup(instance_name + "/clusters/" + cluster_id + "/backups/" + - backup_id); - return proto; -} - -StatusOr TableAdmin::RestoreTable( - RestoreTableParams const& params) { - auto p = RestoreTableFromInstanceParams{ - params.table_id, BackupName(params.cluster_id, params.backup_id)}; - return RestoreTable(std::move(p)); -} - -btadmin::RestoreTableRequest AsProto( - std::string const& instance_name, - TableAdmin::RestoreTableFromInstanceParams p) { - btadmin::RestoreTableRequest proto; - proto.set_parent(instance_name); - proto.set_table_id(std::move(p.table_id)); - proto.set_backup(std::move(p.backup_name)); - return proto; -} - -StatusOr TableAdmin::RestoreTable( - RestoreTableFromInstanceParams params) { - google::cloud::internal::OptionsSpan span(options_); - auto request = AsProto(instance_name(), std::move(params)); - return connection_->RestoreTable(request).get(); -} - -StatusOr TableAdmin::ModifyColumnFamilies( - std::string const& table_id, - std::vector modifications) { - google::cloud::internal::OptionsSpan span(options_); - btadmin::ModifyColumnFamiliesRequest request; - request.set_name(TableName(table_id)); - for (auto& m : modifications) { - google::cloud::internal::OptionsSpan span(options_); - *request.add_modifications() = std::move(m).as_proto(); - } - return connection_->ModifyColumnFamilies(request); -} - -Status TableAdmin::DropRowsByPrefix(std::string const& table_id, - std::string row_key_prefix) { - google::cloud::internal::OptionsSpan span(options_); - btadmin::DropRowRangeRequest request; - request.set_name(TableName(table_id)); - request.set_row_key_prefix(std::move(row_key_prefix)); - return connection_->DropRowRange(request); -} - -future> TableAdmin::WaitForConsistency( - std::string const& table_id, std::string const& consistency_token) { - // We avoid lifetime issues due to ownership cycles, by holding the - // `BackgroundThreads` which run the `CompletionQueue` outside of the - // operation, in this class. If the `BackgroundThreads` running the - // `CompletionQueue` were instead owned by the Connection, we would have an - // ownership cycle. We have made this mistake before. See #7740 for more - // details. - auto client = bigtable_admin::BigtableTableAdminClient(connection_); - return bigtable_admin::AsyncWaitForConsistency(cq_, std::move(client), - TableName(table_id), - consistency_token, options_) - .then([](future f) -> StatusOr { - auto s = f.get(); - if (!s.ok()) return s; - return Consistency::kConsistent; - }); -} - -Status TableAdmin::DropAllRows(std::string const& table_id) { - google::cloud::internal::OptionsSpan span(options_); - btadmin::DropRowRangeRequest request; - request.set_name(TableName(table_id)); - request.set_delete_all_data_from_table(true); - return connection_->DropRowRange(request); -} - -StatusOr TableAdmin::GenerateConsistencyToken( - std::string const& table_id) { - google::cloud::internal::OptionsSpan span(options_); - btadmin::GenerateConsistencyTokenRequest request; - request.set_name(TableName(table_id)); - auto sor = connection_->GenerateConsistencyToken(request); - if (!sor) return std::move(sor).status(); - return std::move(*sor->mutable_consistency_token()); -} - -StatusOr TableAdmin::CheckConsistency( - std::string const& table_id, std::string const& consistency_token) { - google::cloud::internal::OptionsSpan span(options_); - btadmin::CheckConsistencyRequest request; - request.set_name(TableName(table_id)); - request.set_consistency_token(consistency_token); - auto sor = connection_->CheckConsistency(request); - if (!sor) return std::move(sor).status(); - return sor->consistent() ? Consistency::kConsistent - : Consistency::kInconsistent; -} - -StatusOr TableAdmin::GetIamPolicy( - std::string const& table_id) { - return GetIamPolicyImpl(TableName(table_id)); -} - -StatusOr TableAdmin::GetIamPolicy( - std::string const& cluster_id, std::string const& backup_id) { - return GetIamPolicyImpl(BackupName(cluster_id, backup_id)); -} - -StatusOr TableAdmin::GetIamPolicyImpl( - std::string resource) { - google::cloud::internal::OptionsSpan span(options_); - ::google::iam::v1::GetIamPolicyRequest request; - request.set_resource(std::move(resource)); - return connection_->GetIamPolicy(request); -} - -StatusOr TableAdmin::SetIamPolicy( - std::string const& table_id, google::iam::v1::Policy const& iam_policy) { - return SetIamPolicyImpl(TableName(table_id), iam_policy); -} - -StatusOr TableAdmin::SetIamPolicy( - std::string const& cluster_id, std::string const& backup_id, - google::iam::v1::Policy const& iam_policy) { - return SetIamPolicyImpl(BackupName(cluster_id, backup_id), iam_policy); -} - -StatusOr TableAdmin::SetIamPolicyImpl( - std::string resource, google::iam::v1::Policy const& iam_policy) { - google::cloud::internal::OptionsSpan span(options_); - ::google::iam::v1::SetIamPolicyRequest request; - request.set_resource(std::move(resource)); - *request.mutable_policy() = iam_policy; - return connection_->SetIamPolicy(request); -} - -StatusOr> TableAdmin::TestIamPermissions( - std::string const& table_id, std::vector const& permissions) { - return TestIamPermissionsImpl(TableName(table_id), permissions); -} - -StatusOr> TableAdmin::TestIamPermissions( - std::string const& cluster_id, std::string const& backup_id, - std::vector const& permissions) { - return TestIamPermissionsImpl(BackupName(cluster_id, backup_id), permissions); -} - -StatusOr> TableAdmin::TestIamPermissionsImpl( - std::string resource, std::vector const& permissions) { - google::cloud::internal::OptionsSpan span(options_); - ::google::iam::v1::TestIamPermissionsRequest request; - request.set_resource(std::move(resource)); - for (auto const& permission : permissions) { - request.add_permissions(permission); - } - auto sor = connection_->TestIamPermissions(request); - if (!sor) return std::move(sor).status(); - auto response = *std::move(sor); - std::vector result; - auto& ps = *response.mutable_permissions(); - std::move(ps.begin(), ps.end(), std::back_inserter(result)); - return result; -} - -std::string TableAdmin::InstanceName() const { - return google::cloud::bigtable::InstanceName(project_id_, instance_id_); -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/table_admin.h b/google/cloud/bigtable/table_admin.h deleted file mode 100644 index e68509fa25f57..0000000000000 --- a/google/cloud/bigtable/table_admin.h +++ /dev/null @@ -1,1137 +0,0 @@ -// Copyright 2017 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_TABLE_ADMIN_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_TABLE_ADMIN_H - -#include "google/cloud/bigtable/admin/bigtable_table_admin_connection.h" -#include "google/cloud/bigtable/admin_client.h" -#include "google/cloud/bigtable/column_family.h" -#include "google/cloud/bigtable/completion_queue.h" -#include "google/cloud/bigtable/iam_policy.h" -#include "google/cloud/bigtable/internal/convert_policies.h" -#include "google/cloud/bigtable/metadata_update_policy.h" -#include "google/cloud/bigtable/polling_policy.h" -#include "google/cloud/bigtable/resource_names.h" -#include "google/cloud/bigtable/table_config.h" -#include "google/cloud/bigtable/version.h" -#include "google/cloud/future.h" -#include "google/cloud/grpc_error_delegate.h" -#include "google/cloud/options.h" -#include "google/cloud/status_or.h" -#include "absl/types/optional.h" -#include -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace bigtable_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -class TableAdminTester; -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable_internal -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -/// The result of checking replication against a given token. -enum class Consistency { - /// Some of the mutations created before the consistency token have not been - /// received by all the table replicas. - kInconsistent, - /// All mutations created before the consistency token have been received by - /// all the table replicas. - kConsistent, -}; - -/** - * Implements the API to administer tables in a Cloud Bigtable instance. - * - * @par Thread-safety - * Instances of this class created via copy-construction or copy-assignment - * share the underlying pool of connections. Access to these copies via multiple - * threads is guaranteed to work. Two threads operating concurrently on the same - * instance of this class is not guaranteed to work. - * - * @par Cost - * Creating a new object of type `TableAdmin` is comparable to creating a few - * objects of type `std::string` or a few objects of type - * `std::shared_ptr`. The class represents a shallow handle to a remote - * object. - * - * @par Error Handling - * This class uses `StatusOr` to report errors. When an operation fails to - * perform its work the returned `StatusOr` contains the error details. If - * the `ok()` member function in the `StatusOr` returns `true` then it - * contains the expected result. Operations that do not return a value simply - * return a `google::cloud::Status` indicating success or the details of the - * error Please consult the [`StatusOr` - * documentation](#google::cloud::StatusOr) for more details. - * - * @code - * namespace cbt = google::cloud::bigtable; - * namespace btadmin = google::bigtable::admin::v2; - * cbt::TableAdmin admin = ...; - * google::cloud::StatusOr metadata = admin.GetTable(...); - * - * if (!metadata) { - * std::cerr << "Error fetching table metadata\n"; - * return; - * } - * - * // Use "metadata" as a smart pointer here, e.g.: - * std::cout << "The full table name is " << table->name() << " the table has " - * << table->column_families_size() << " column families\n"; - * @endcode - * - * In addition, the @ref index "main page" contains examples using `StatusOr` - * to handle errors. - * - * @par Retry, Backoff, and Idempotency Policies - * The library automatically retries requests that fail with transient errors, - * and uses [truncated exponential backoff][backoff-link] to backoff between - * retries. The default policies are to continue retrying for up to 10 minutes. - * On each transient failure the backoff period is doubled, starting with an - * initial backoff of 100 milliseconds. The backoff period growth is truncated - * at 60 seconds. The default idempotency policy is to only retry idempotent - * operations. Note that most operations that change state are **not** - * idempotent. - * - * The application can override these policies when constructing objects of this - * class. The documentation for the constructors show examples of this in - * action. - * - * [backoff-link]: https://cloud.google.com/storage/docs/exponential-backoff - * - * @par Equality - * `TableAdmin` objects will compare equal iff they were created with the - * same `DataClient` and target the same Instance resource. Note that - * `TableAdmin` objects can compare equal with different retry/backoff/polling - * policies. - * - * @see https://cloud.google.com/bigtable/ for an overview of Cloud Bigtable. - * - * @see https://cloud.google.com/bigtable/docs/overview for an overview of the - * Cloud Bigtable data model. - * - * @see https://cloud.google.com/bigtable/docs/instances-clusters-nodes for an - * introduction of the main APIs into Cloud Bigtable. - * - * @see https://cloud.google.com/bigtable/docs/reference/service-apis-overview - * for an overview of the underlying Cloud Bigtable API. - * - * @see #google::cloud::StatusOr for a description of the error reporting class - * used by this library. - * - * @see `LimitedTimeRetryPolicy` and `LimitedErrorCountRetryPolicy` for - * alternative retry policies. - * - * @see `ExponentialBackoffPolicy` to configure different parameters for the - * exponential backoff policy. - * - * @see `SafeIdempotentMutationPolicy` and `AlwaysRetryMutationPolicy` for - * alternative idempotency policies. - */ -class TableAdmin { - public: - /** - * @param client the interface to create grpc stubs, report errors, etc. - * @param instance_id the id of the instance, e.g., "my-instance", the full - * name (e.g. '/projects/my-project/instances/my-instance') is built using - * the project id in the @p client parameter. - */ - // NOLINTNEXTLINE(performance-unnecessary-value-param) - TableAdmin(std::shared_ptr client, std::string instance_id) - : connection_(client->connection_), - cq_(client->cq_), - background_threads_(client->background_threads_), - project_id_(client->project()), - instance_id_(std::move(instance_id)), - instance_name_(InstanceName()), - retry_prototype_( - DefaultRPCRetryPolicy(internal::kBigtableTableAdminLimits)), - backoff_prototype_( - DefaultRPCBackoffPolicy(internal::kBigtableTableAdminLimits)), - polling_prototype_( - DefaultPollingPolicy(internal::kBigtableTableAdminLimits)), - options_(google::cloud::internal::MergeOptions( - bigtable_internal::MakeTableAdminOptions( - retry_prototype_, backoff_prototype_, polling_prototype_), - connection_->options())) {} - - /** - * Create a new TableAdmin using explicit policies to handle RPC errors. - * - * @param client the interface to create grpc stubs, report errors, etc. - * @param instance_id the id of the instance, e.g., "my-instance", the full - * name (e.g. '/projects/my-project/instances/my-instance') is built using - * the project id in the @p client parameter. - * @param policies the set of policy overrides for this object. - * @tparam Policies the types of the policies to override, the types must - * derive from one of the following types: - * - `RPCBackoffPolicy` how to backoff from a failed RPC. Currently only - * `ExponentialBackoffPolicy` is implemented. You can also create your - * own policies that backoff using a different algorithm. - * - `RPCRetryPolicy` for how long to retry failed RPCs. Use - * `LimitedErrorCountRetryPolicy` to limit the number of failures - * allowed. Use `LimitedTimeRetryPolicy` to bound the time for any - * request. You can also create your own policies that combine time and - * error counts. - * - `PollingPolicy` for how long will the class wait for - * `google.longrunning.Operation` to complete. This class combines both - * the backoff policy for checking long running operations and the - * retry policy. - * - * @see GenericPollingPolicy, ExponentialBackoffPolicy, - * LimitedErrorCountRetryPolicy, LimitedTimeRetryPolicy. - */ - template - // NOLINTNEXTLINE(performance-unnecessary-value-param) - TableAdmin(std::shared_ptr client, std::string instance_id, - Policies&&... policies) - : connection_(client->connection_), - cq_(client->cq_), - background_threads_(client->background_threads_), - project_id_(client->project()), - instance_id_(std::move(instance_id)), - instance_name_(InstanceName()), - retry_prototype_( - DefaultRPCRetryPolicy(internal::kBigtableTableAdminLimits)), - backoff_prototype_( - DefaultRPCBackoffPolicy(internal::kBigtableTableAdminLimits)), - polling_prototype_( - DefaultPollingPolicy(internal::kBigtableTableAdminLimits)) { - ChangePolicies(std::forward(policies)...); - options_ = google::cloud::internal::MergeOptions( - bigtable_internal::MakeTableAdminOptions( - retry_prototype_, backoff_prototype_, polling_prototype_), - connection_->options()); - } - - TableAdmin(TableAdmin const&) = default; - TableAdmin& operator=(TableAdmin const&) = default; - - friend bool operator==(TableAdmin const& a, TableAdmin const& b) noexcept { - return a.connection_ == b.connection_ && - a.instance_name_ == b.instance_name_; - } - friend bool operator!=(TableAdmin const& a, TableAdmin const& b) noexcept { - return !(a == b); - } - - ///@{ - /// @name Convenience shorthands for the schema views. - using TableView = ::google::bigtable::admin::v2::Table::View; - /// Only populate 'name' and fields related to the table's encryption state. - static auto constexpr ENCRYPTION_VIEW = // NOLINT(readability-identifier-naming) - google::bigtable::admin::v2::Table::ENCRYPTION_VIEW; - /// Populate all the fields in the response. - static auto constexpr FULL = // NOLINT(readability-identifier-naming) - google::bigtable::admin::v2::Table::FULL; - /// Populate only the name in the responses. - static auto constexpr NAME_ONLY = // NOLINT(readability-identifier-naming) - google::bigtable::admin::v2::Table::NAME_ONLY; - /// Populate only the name and the fields related to the table replication - /// state. - static auto constexpr REPLICATION_VIEW = // NOLINT(readability-identifier-naming) - google::bigtable::admin::v2::Table::REPLICATION_VIEW; - /// Populate only the name and the fields related to the table schema. - static auto constexpr SCHEMA_VIEW = // NOLINT(readability-identifier-naming) - google::bigtable::admin::v2::Table::SCHEMA_VIEW; - /// Use the default view as defined for each function. - static auto constexpr VIEW_UNSPECIFIED = // NOLINT(readability-identifier-naming) - google::bigtable::admin::v2::Table::VIEW_UNSPECIFIED; - ///@} - - std::string const& project() const { return project_id_; } - std::string const& instance_id() const { return instance_id_; } - std::string const& instance_name() const { return instance_name_; } - - /** - * Returns a TableAdmin that reuses the connection and configuration of this - * TableAdmin, but with a different resource name. - */ - TableAdmin WithNewTarget(std::string project_id, - std::string instance_id) const { - auto table = *this; - table.project_id_ = std::move(project_id); - table.instance_id_ = std::move(instance_id); - table.instance_name_ = table.InstanceName(); - return table; - } - - /** - * Create a new table in the instance. - * - * @param table_id the name of the table relative to the instance managed by - * this object. The full table name is - * `projects//instances//tables/` - * where PROJECT_ID is obtained from the associated AdminClient and - * INSTANCE_ID is the instance_id() of this object. - * @param config the initial schema for the table. - * @return the attributes of the newly created table. Notice that the server - * only populates the table_name() field at this time. - * - * @par Idempotency - * This operation is always treated as non-idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet table_admin_snippets.cc create table - */ - StatusOr<::google::bigtable::admin::v2::Table> CreateTable( - std::string table_id, TableConfig config); - - /** - * Return all the tables in the instance. - * - * @param view define what information about the tables is retrieved. - * - `VIEW_UNSPECIFIED`: equivalent to `VIEW_SCHEMA`. - * - `NAME`: return only the name of the table. - * - `VIEW_SCHEMA`: return the name and the schema. - * - `FULL`: return all the information about the table. - * - * @par Idempotency - * This operation is read-only and therefore it is always idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet table_admin_snippets.cc list tables - */ - StatusOr> ListTables( - ::google::bigtable::admin::v2::Table::View view); - - /** - * Get information about a single table. - * - * @param table_id the id of the table within the instance associated with - * this object. The full name of the table is - * `this->instance_name() + "/tables/" + table_id` - * @param view describes how much information to get about the name. - * - VIEW_UNSPECIFIED: equivalent to VIEW_SCHEMA. - * - NAME: return only the name of the table. - * - VIEW_SCHEMA: return the name and the schema. - * - FULL: return all the information about the table. - * @return the information about the table or status. - * - * @par Idempotency - * This operation is read-only and therefore it is always idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet table_admin_snippets.cc get table - */ - StatusOr<::google::bigtable::admin::v2::Table> GetTable( - std::string const& table_id, TableView view = SCHEMA_VIEW); - - /** - * Delete a table. - * - * @param table_id the id of the table within the instance associated with - * this object. The full name of the table is - * `this->instance_name() + "/tables/" + table_id` - * - * @return status of the operation. - * - * @par Idempotency - * This operation is always treated as non-idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet table_admin_snippets.cc delete table - */ - Status DeleteTable(std::string const& table_id); - - /** - * Parameters for `CreateBackup`. - * - * @param cluster_id the name of the cluster relative to the instance managed - * by the `TableAdmin` object. The full cluster name is - * `projects//instances//clusters/` - * where PROJECT_ID is obtained from the associated AdminClient and - * INSTANCE_ID is the instance_id() of the `TableAdmin` object. - * @param backup_id the name of the backup relative to the cluster specified. - * The full backup name is - * `projects//instances//clusters//backups/` - * where PROJECT_ID is obtained from the associated AdminClient, - * INSTANCE_ID is the instance_id() of the `TableAdmin` object, and - * CLUSTER_ID is the cluster_id specified for this object. - * @param table_id the id of the table within the instance to be backed up. - * The full name of the table is - * `projects//instances//tables/` - * where PROJECT_ID is obtained from the associated AdminClient and - * INSTANCE_ID is the instance_id() of the `TableAdmin` object. - * @param expire_time the date and time when the created backup will expire. - */ - struct CreateBackupParams { - CreateBackupParams() = default; - CreateBackupParams(std::string cluster_id, std::string backup_id, - std::string table_id, - std::chrono::system_clock::time_point expire_time) - : cluster_id(std::move(cluster_id)), - backup_id(std::move(backup_id)), - table_name(std::move(table_id)), - expire_time(std::move(expire_time)) {} - - google::bigtable::admin::v2::CreateBackupRequest AsProto( - std::string instance_name) const; - - std::string cluster_id; - std::string backup_id; - std::string table_name; - std::chrono::system_clock::time_point expire_time; - }; - - /** - * Create a new backup of a table in the instance. - * - * @param params instance of `CreateBackupParams`. - * - * @par Idempotency - * This operation is always treated as non-idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet bigtable_table_admin_backup_snippets.cc create backup - */ - StatusOr CreateBackup( - CreateBackupParams const& params); - - /** - * Get information about a single backup. - * - * @param cluster_id the name of the cluster relative to the instance managed - * by the `TableAdmin` object. The full cluster name is - * `projects//instances//clusters/` - * where PROJECT_ID is obtained from the associated AdminClient and - * INSTANCE_ID is the instance_id() of the `TableAdmin` object. - * @param backup_id the name of the backup relative to the cluster specified. - * The full backup name is - * `projects//instances//clusters//backups/` - * where PROJECT_ID is obtained from the associated AdminClient, - * INSTANCE_ID is the instance_id() of the `TableAdmin` object, and - * CLUSTER_ID is the cluster_id previously specified. - * - * @par Idempotency - * This operation is read-only and therefore it is always idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet bigtable_table_admin_backup_snippets.cc get backup - */ - StatusOr GetBackup( - std::string const& cluster_id, std::string const& backup_id); - - /** - * Parameters for `UpdateBackup`. - * - * @param cluster_id the name of the cluster relative to the instance managed - * by the `TableAdmin` object. The full cluster name is - * `projects//instances//clusters/` - * where PROJECT_ID is obtained from the associated AdminClient and - * INSTANCE_ID is the instance_id() of the `TableAdmin` object. - * @param backup_id the name of the backup relative to the cluster specified. - * The full backup name is - * `projects//instances//clusters//backups/` - * where PROJECT_ID is obtained from the associated AdminClient, - * INSTANCE_ID is the instance_id() of the `TableAdmin` object, and - * CLUSTER_ID is the cluster_id specified for this object. - * @param expire_time the date and time when the created backup will expire. - */ - struct UpdateBackupParams { - UpdateBackupParams() = default; - UpdateBackupParams(std::string cluster_id, std::string backup_id, - std::chrono::system_clock::time_point expire_time) - : cluster_id(std::move(cluster_id)), - backup_name(std::move(backup_id)), - expire_time(std::move(expire_time)) {} - - google::bigtable::admin::v2::UpdateBackupRequest AsProto( - std::string const& instance_name) const; - - std::string cluster_id; - std::string backup_name; - std::chrono::system_clock::time_point expire_time; - }; - - /** - * Updates a backup of a table in the instance. - * - * @param params instance of `UpdateBackupParams`. - * - * @par Idempotency - * This operation is always treated as non-idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet bigtable_table_admin_backup_snippets.cc update backup - */ - StatusOr UpdateBackup( - UpdateBackupParams const& params); - - /** - * Delete a backup. - * - * @param cluster_id the name of the cluster relative to the instance managed - * by the `TableAdmin` object. The full cluster name is - * `projects//instances//clusters/` - * where PROJECT_ID is obtained from the associated AdminClient and - * INSTANCE_ID is the instance_id() of the `TableAdmin` object. - * @param backup_id the name of the backup relative to the cluster specified. - * The full backup name is - * `projects//instances//clusters//backups/` - * where PROJECT_ID is obtained from the associated AdminClient, - * INSTANCE_ID is the instance_id() of the `TableAdmin` object, and - * CLUSTER_ID is the cluster_id previously specified. - * - * @par Idempotency - * This operation is always treated as non-idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet bigtable_table_admin_backup_snippets.cc delete backup - */ - Status DeleteBackup(std::string const& cluster_id, - std::string const& backup_id); - - /** - * Delete a backup. - * - * @param backup typically returned by a call to `GetBackup` or `ListBackups`. - * - * @par Idempotency - * This operation is always treated as non-idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet bigtable_table_admin_backup_snippets.cc delete backup - */ - Status DeleteBackup(google::bigtable::admin::v2::Backup const& backup); - - /** - * Parameters for `ListBackups`. - */ - struct ListBackupsParams { - /** - * Sets the cluster_id. - * - * @param c the name of the cluster relative to the instance - * managed by the `TableAdmin` object. If no cluster_id is specified, - * the all backups in all clusters are listed. The full cluster name is - * `projects//instances//clusters/` - * where PROJECT_ID is obtained from the associated AdminClient and - * INSTANCE_ID is the instance_id() of the `TableAdmin` object. - */ - ListBackupsParams& set_cluster(std::string c) { - this->cluster_id = std::move(c); - return *this; - } - - /** - * Sets the filtering expression. - * - * @param f expression that filters backups listed in the response. - * The expression must specify the field name, a comparison operator, - * and the value that you want to use for filtering. The value must be a - * string, a number, or a boolean. The comparison operator must be - * <, >, <=, >=, !=, =, or :. Colon ‘:’ represents a HAS operator which - * is roughly synonymous with equality. Filter rules are case - * insensitive. - * - * The fields eligible for filtering are: - * * `name` - * * `table` - * * `state` - * * `start_time` (and values are of the format - * `YYYY-MM-DDTHH:MM:SSZ`) - * * `end_time` (and values are of the format `YYYY-MM-DDTHH:MM:SSZ`) - * * `expire_time` (and values are of the format - * `YYYY-MM-DDTHH:MM:SSZ`) - * * `size_bytes` - * - * To filter on multiple expressions, provide each separate expression - * within parentheses. By default, each expression is an AND expression. - * However, you can include AND, OR, and NOT expressions explicitly. - * - * Some examples of using filters are: - * * `name:"exact"` --> The backup's name is the string "exact". - * * `name:howl` --> The backup's name contains the string "howl". - * * `table:prod` --> The table's name contains the string "prod". - * * `state:CREATING` --> The backup is pending creation. - * * `state:READY` --> The backup is fully created and ready for use. - * * `(name:howl) AND (start_time < "2018-03-28T14:50:00Z")` - * --> The backup name contains the string "howl" and start_time - * of the backup is before `2018-03-28T14:50:00Z`. - * * `size_bytes > 10000000000` --> The backup's size is greater than - * 10GB - */ - ListBackupsParams& set_filter(std::string f) { - this->filter = std::move(f); - return *this; - } - - /** - * Sets the ordering expression. - * - * @param o expression for specifying the sort order of the results - * of the request. The string value should specify only one field in - * `google::bigtable::admin::v2::Backup`. - * The following field names are supported: - * * name - * * table - * * expire_time - * * start_time - * * end_time - * * size_bytes - * * state - * - * For example, "start_time". The default sorting order is ascending. - * Append the " desc" suffix to the field name to sort descending, e.g. - * "start_time desc". Redundant space characters in the syntax are - * insignificant. - * - * If order_by is empty, results will be sorted by `start_time` in - * descending order starting from the most recently created backup. - */ - ListBackupsParams& set_order_by(std::string o) { - this->order_by = std::move(o); - return *this; - } - - google::bigtable::admin::v2::ListBackupsRequest AsProto( - std::string const& instance_name) const; - - absl::optional cluster_id; - absl::optional filter; - absl::optional order_by; - }; - - /** - * Retrieves a list of backups. - * - * @param params instance of `ListBackupsParams`. - * - * @par Idempotency - * This operation is read-only and therefore it is always idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet bigtable_table_admin_backup_snippets.cc list backups - */ - StatusOr> ListBackups( - ListBackupsParams const& params); - - /** - * Parameters for `RestoreTable`. - * - * @param table_id the name of the table relative to the instance managed by - * this object. The full table name is - * `projects//instances//tables/` - * where PROJECT_ID is obtained from the associated AdminClient and - * INSTANCE_ID is the instance_id() of this object. - * @param cluster_id the name of the cluster relative to the instance managed - * by the `TableAdmin` object. The full cluster name is - * `projects//instances//clusters/` - * where PROJECT_ID is obtained from the associated AdminClient and - * INSTANCE_ID is the instance_id() of the `TableAdmin` object. - * @param backup_id the name of the backup relative to the cluster specified. - * The full backup name is - * `projects//instances//clusters//backups/` - * where PROJECT_ID is obtained from the associated AdminClient, - * INSTANCE_ID is the instance_id() of the `TableAdmin` object, and - * CLUSTER_ID is the cluster_id previously specified. - */ - struct RestoreTableParams { - RestoreTableParams() = default; - RestoreTableParams(std::string table_id, std::string cluster_id, - std::string backup_id) - : table_id(std::move(table_id)), - cluster_id(std::move(cluster_id)), - backup_id(std::move(backup_id)) {} - - /// @deprecated covert the parameters to a proto. - google::bigtable::admin::v2::RestoreTableRequest AsProto( - std::string const& instance_name) const; - - std::string table_id; - std::string cluster_id; - std::string backup_id; - }; - - /** - * Parameters for `RestoreTable`. - * - * @param table_id the name of the table relative to the instance managed by - * this object. The full table name is - * `projects//instances//tables/` - * where PROJECT_ID is obtained from the associated AdminClient and - * INSTANCE_ID is the instance_id() of this object. - * @param backup_name the full name of the backup used to restore @p table_id. - */ - struct RestoreTableFromInstanceParams { - std::string table_id; - std::string backup_name; - }; - - /** - * Restore a backup into a new table in the instance. - * - * @param params instance of `RestoreTableParams`. - * - * @par Idempotency - * This operation is always treated as non-idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet bigtable_table_admin_backup_snippets.cc restore table - */ - StatusOr RestoreTable( - RestoreTableParams const& params); - - /** - * Restore a backup into a new table in the instance. - * - * @param params instance of `RestoreTableFromInstanceParams`. - * - * @par Idempotency - * This operation is always treated as non-idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet bigtable_table_admin_backup_snippets.cc restore2 - */ - StatusOr RestoreTable( - RestoreTableFromInstanceParams params); - - /** - * Modify the schema for an existing table. - * - * @param table_id the id of the table within the instance associated with - * this object. The full name of the table is - * `this->instance_name() + "/tables/" + table_id` - * @param modifications the list of modifications to the schema. - * - * @par Idempotency - * This operation is always treated as non-idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet table_admin_snippets.cc modify table - */ - StatusOr<::google::bigtable::admin::v2::Table> ModifyColumnFamilies( - std::string const& table_id, - std::vector modifications); - - /** - * Delete all the rows that start with a given prefix. - * - * @param table_id the id of the table within the instance associated with - * this object. The full name of the table is - * `this->instance_name() + "/tables/" + table_id` - * @param row_key_prefix drop any rows that start with this prefix. - * - * @par Idempotency - * This operation is always treated as non-idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet table_admin_snippets.cc drop rows by prefix - */ - Status DropRowsByPrefix(std::string const& table_id, - std::string row_key_prefix); - - /** - * Generates consistency token for a table. - * - * @param table_id the id of the table for which we want to generate - * consistency token. - * @return the consistency token for table. - * - * @par Idempotency - * This operation is read-only and therefore it is always idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet table_admin_snippets.cc generate consistency token - */ - StatusOr GenerateConsistencyToken(std::string const& table_id); - - /** - * Checks consistency of a table. - * - * @param table_id the id of the table for which we want to check - * consistency. - * @param consistency_token the consistency token of the table. - * @return the consistency status for the table. - * - * @par Idempotency - * This operation is read-only and therefore it is always idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet table_admin_snippets.cc check consistency - */ - StatusOr CheckConsistency(std::string const& table_id, - std::string const& consistency_token); - - /** - * Checks consistency of a table with multiple calls using a separate thread - * - * @param table_id the id of the table for which we want to check - * consistency. - * @param consistency_token the consistency token of the table. - * @return the consistency status for the table. - * - * @par Idempotency - * This operation is read-only and therefore it is always idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet table_admin_snippets.cc wait for consistency check - */ - google::cloud::future> WaitForConsistency( - std::string const& table_id, std::string const& consistency_token); - - /** - * Delete all the rows in a table. - * - * @param table_id the id of the table within the instance associated with - * this object. The full name of the table is - * `this->instance_name() + "/tables/" + table_id` - * - * @par Idempotency - * This operation is always treated as non-idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet table_admin_snippets.cc drop all rows - */ - Status DropAllRows(std::string const& table_id); - - /** - * Gets the policy for @p table_id. - * - * @param table_id the table to query. - * @return google::iam::v1::Policy the full IAM policy for the table. - * - * @par Idempotency - * This operation is read-only and therefore it is always idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet table_admin_iam_policy_snippets.cc get iam policy - */ - StatusOr GetIamPolicy(std::string const& table_id); - - /** - * Gets the policy for @p backup_id. - * - * @param cluster_id the associated cluster that contains backup. - * - * @param backup_id the backup to query. - * @return google::iam::v1::Policy the full IAM policy for the backup. - * - * @par Idempotency - * This operation is read-only and therefore it is always idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet bigtable_table_admin_backup_snippets.cc get backup iam policy - */ - StatusOr GetIamPolicy(std::string const& cluster_id, - std::string const& backup_id); - - /** - * Sets the IAM policy for a table. - * - * This is the preferred way to overload `IamBindings`. This is more closely - * coupled to the underlying protocol, enable more actions and is more likely - * to tolerate future protocol changes. - * - * @param table_id which table to set the IAM policy for. - * @param iam_policy google::iam::v1::Policy object containing role and - * members. - * @return google::iam::v1::Policy the current IAM policy for the table. - * - * @warning ETags are currently not used by Cloud Bigtable. - * - * @par Idempotency - * This operation is always treated as non-idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet table_admin_iam_policy_snippets.cc set iam policy - */ - StatusOr SetIamPolicy( - std::string const& table_id, google::iam::v1::Policy const& iam_policy); - - /** - * Sets the IAM policy for a backup. - * - * This is the preferred way to overload `IamBindings`. This is more closely - * coupled to the underlying protocol, enable more actions and is more likely - * to tolerate future protocol changes. - * - * @param cluster_id which is the cluster containing the backup. - * @param backup_id which backup to set the IAM policy for. - * @param iam_policy google::iam::v1::Policy object containing role and - * members. - * @return google::iam::v1::Policy the current IAM policy for the table. - * - * @warning ETags are currently not used by Cloud Bigtable. - * - * @par Idempotency - * This operation is always treated as non-idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet bigtable_table_admin_backup_snippets.cc set backup iam policy - */ - StatusOr SetIamPolicy( - std::string const& cluster_id, std::string const& backup_id, - google::iam::v1::Policy const& iam_policy); - - /** - * Returns a permission set that the caller has on the specified table. - * - * @param table_id the ID of the table to query. - * @param permissions set of permissions to check for the resource. - * - * @par Idempotency - * This operation is read-only and therefore it is always idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet table_admin_iam_policy_snippets.cc test iam permissions - * - * @see https://cloud.google.com/bigtable/docs/access-control for a list of - * valid permissions on Google Cloud Bigtable. - */ - StatusOr> TestIamPermissions( - std::string const& table_id, std::vector const& permissions); - - /** - * Returns a permission set that the caller has on the specified backup. - * - * @param cluster_id the ID of the cluster that contains the backup. - * @param backup_id the ID of the backup to query. - * @param permissions set of permissions to check for the resource. - * - * @par Idempotency - * This operation is read-only and therefore it is always idempotent. - * - * @par Thread-safety - * Two threads concurrently calling this member function on the same instance - * of this class are **not** guaranteed to work. Consider copying the object - * and using different copies in each thread. - * - * @par Example - * @snippet table_admin_iam_policy_snippets.cc test iam permissions - * - * @see https://cloud.google.com/bigtable/docs/access-control for a list of - * valid permissions on Google Cloud Bigtable. - */ - StatusOr> TestIamPermissions( - std::string const& cluster_id, std::string const& backup_id, - std::vector const& permissions); - - /// Return the fully qualified name of a table in this object's instance. - std::string TableName(std::string const& table_id) const { - return google::cloud::bigtable::TableName(project_id_, instance_id_, - table_id); - } - - /// Return the fully qualified name of a Cluster. - std::string ClusterName(std::string const& cluster_id) const { - return google::cloud::bigtable::ClusterName(project_id_, instance_id_, - cluster_id); - } - - /// Return the fully qualified name of a Backup. - std::string BackupName(std::string const& cluster_id, - std::string const& backup_id) const { - return google::cloud::bigtable::BackupName(project_id_, instance_id_, - cluster_id, backup_id); - } - - private: - friend class bigtable_internal::TableAdminTester; - - explicit TableAdmin( - std::shared_ptr connection, - CompletionQueue cq, std::string project_id, std::string instance_id) - : connection_(std::move(connection)), - cq_(std::move(cq)), - project_id_(std::move(project_id)), - instance_id_(std::move(instance_id)), - instance_name_(InstanceName()), - retry_prototype_( - DefaultRPCRetryPolicy(internal::kBigtableTableAdminLimits)), - backoff_prototype_( - DefaultRPCBackoffPolicy(internal::kBigtableTableAdminLimits)), - polling_prototype_( - DefaultPollingPolicy(internal::kBigtableTableAdminLimits)), - options_(google::cloud::internal::MergeOptions( - bigtable_internal::MakeTableAdminOptions( - retry_prototype_, backoff_prototype_, polling_prototype_), - connection_->options())) {} - - ///@{ - /// @name Helper functions to implement constructors with changed policies. - void ChangePolicy(RPCRetryPolicy const& policy) { - retry_prototype_ = policy.clone(); - } - - void ChangePolicy(RPCBackoffPolicy const& policy) { - backoff_prototype_ = policy.clone(); - } - - void ChangePolicy(PollingPolicy const& policy) { - polling_prototype_ = policy.clone(); - } - - template - void ChangePolicies(Policy&& policy, Policies&&... policies) { - ChangePolicy(policy); - ChangePolicies(std::forward(policies)...); - } - void ChangePolicies() {} - ///@} - - /// Compute the fully qualified instance name. - std::string InstanceName() const; - - StatusOr GetIamPolicyImpl(std::string resource); - - StatusOr SetIamPolicyImpl( - std::string resource, google::iam::v1::Policy const& iam_policy); - - StatusOr> TestIamPermissionsImpl( - std::string resource, std::vector const& permissions); - - std::shared_ptr connection_; - CompletionQueue cq_; - std::shared_ptr background_threads_; - std::string project_id_; - std::string instance_id_; - std::string instance_name_; - ///@{ - /// These prototypes are only used as temporary storage during construction of - /// the class, where they are consolidated as common policies in `options_`. - std::shared_ptr retry_prototype_; - std::shared_ptr backoff_prototype_; - std::shared_ptr polling_prototype_; - ///@} - Options options_; -}; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_TABLE_ADMIN_H diff --git a/google/cloud/bigtable/table_admin_test.cc b/google/cloud/bigtable/table_admin_test.cc deleted file mode 100644 index b27134b6a102c..0000000000000 --- a/google/cloud/bigtable/table_admin_test.cc +++ /dev/null @@ -1,950 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/table_admin.h" -#include "google/cloud/bigtable/admin/bigtable_table_admin_connection.h" -#include "google/cloud/bigtable/admin/bigtable_table_admin_options.h" -#include "google/cloud/bigtable/admin/mocks/mock_bigtable_table_admin_connection.h" -#include "google/cloud/bigtable/testing/mock_policies.h" -#include "google/cloud/internal/background_threads_impl.h" -#include "google/cloud/internal/time_utils.h" -#include "google/cloud/testing_util/is_proto_equal.h" -#include "google/cloud/testing_util/status_matchers.h" -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace bigtable_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -// Helper class for checking that the legacy API still functions correctly -class TableAdminTester { - public: - static bigtable::TableAdmin MakeTestTableAdmin( - std::shared_ptr conn, - CompletionQueue cq, std::string const& kProjectId, - std::string const& kInstanceId) { - return bigtable::TableAdmin(std::move(conn), std::move(cq), kProjectId, - kInstanceId); - } - - static std::shared_ptr - Connection(bigtable::TableAdmin const& admin) { - return admin.connection_; - } - - static CompletionQueue CQ(bigtable::TableAdmin const& admin) { - return admin.cq_; - } - - static std::shared_ptr Threads( - bigtable::TableAdmin const& admin) { - return admin.background_threads_; - } - - static ::google::cloud::Options Options(bigtable::TableAdmin const& admin) { - return admin.options_; - } -}; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable_internal -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -namespace { - -namespace btadmin = ::google::bigtable::admin::v2; -namespace iamproto = ::google::iam::v1; - -using ::google::cloud::bigtable::testing::MockBackoffPolicy; -using ::google::cloud::bigtable::testing::MockPollingPolicy; -using ::google::cloud::bigtable::testing::MockRetryPolicy; -using ::google::cloud::bigtable_internal::TableAdminTester; -using ::google::cloud::internal::ToChronoTimePoint; -using ::google::cloud::testing_util::IsProtoEqual; -using ::google::cloud::testing_util::StatusIs; -using std::chrono::hours; -using ::testing::An; -using ::testing::ElementsAre; -using ::testing::ElementsAreArray; -using ::testing::IsNull; -using ::testing::NotNull; -using ::testing::Return; -using ::testing::UnorderedElementsAreArray; -using MockConnection = - ::google::cloud::bigtable_admin_mocks::MockBigtableTableAdminConnection; - -auto const* const kProjectId = "the-project"; -auto const* const kInstanceId = "the-instance"; -auto const* const kTableId = "the-table"; -auto const* const kClusterId = "the-cluster"; -auto const* const kBackupId = "the-backup"; -auto const* const kInstanceName = "projects/the-project/instances/the-instance"; -auto const* const kTableName = - "projects/the-project/instances/the-instance/tables/the-table"; -auto const* const kClusterName = - "projects/the-project/instances/the-instance/clusters/the-cluster"; -auto const* const kBackupName = - "projects/the-project/instances/the-instance/clusters/the-cluster/backups/" - "the-backup"; - -struct TestOption { - using Type = int; -}; - -Options TestOptions() { - return Options{} - .set(grpc::InsecureChannelCredentials()) - .set(1); -} - -Status FailingStatus() { return Status(StatusCode::kPermissionDenied, "fail"); } - -bool SameCQ(CompletionQueue const& a, CompletionQueue const& b) { - using ::google::cloud::internal::GetCompletionQueueImpl; - return GetCompletionQueueImpl(a) == GetCompletionQueueImpl(b); -} - -void CheckOptions(Options const& options) { - EXPECT_TRUE( - options.has()); - EXPECT_TRUE( - options.has()); - EXPECT_TRUE( - options.has()); - EXPECT_TRUE(options.has()); - EXPECT_TRUE(options.has()); - EXPECT_TRUE(options.has()); -} - -class TableAdminTest : public ::testing::Test { - protected: - TableAdmin DefaultTableAdmin() { - EXPECT_CALL(*connection_, options()) - .WillRepeatedly(Return(Options{}.set(1))); - return TableAdminTester::MakeTestTableAdmin(connection_, {}, kProjectId, - kInstanceId); - } - - std::shared_ptr connection_ = - std::make_shared(); -}; - -TEST_F(TableAdminTest, Equality) { - auto client1 = MakeAdminClient(kProjectId, TestOptions()); - auto client2 = MakeAdminClient(kProjectId, TestOptions()); - auto ta1 = TableAdmin(client1, "i1"); - auto ta2 = TableAdmin(client1, "i2"); - auto ta3 = TableAdmin(client2, "i1"); - EXPECT_NE(ta1, ta2); - EXPECT_NE(ta1, ta3); - EXPECT_NE(ta2, ta3); - - ta2 = ta1; - EXPECT_EQ(ta1, ta2); -} - -TEST_F(TableAdminTest, ResourceNames) { - auto admin = DefaultTableAdmin(); - EXPECT_EQ(kProjectId, admin.project()); - EXPECT_EQ(kInstanceId, admin.instance_id()); - EXPECT_EQ(kInstanceName, admin.instance_name()); -} - -TEST_F(TableAdminTest, WithNewTarget) { - auto admin = DefaultTableAdmin(); - auto other_admin = admin.WithNewTarget("other-project", "other-instance"); - EXPECT_EQ(other_admin.project(), "other-project"); - EXPECT_EQ(other_admin.instance_id(), "other-instance"); - EXPECT_EQ(other_admin.instance_name(), - InstanceName("other-project", "other-instance")); -} - -TEST_F(TableAdminTest, LegacyConstructorSharesConnection) { - auto admin_client = MakeAdminClient(kProjectId, TestOptions()); - auto admin_1 = TableAdmin(admin_client, kInstanceId); - auto admin_2 = TableAdmin(admin_client, kInstanceId); - auto conn_1 = TableAdminTester::Connection(admin_1); - auto conn_2 = TableAdminTester::Connection(admin_2); - - EXPECT_EQ(conn_1, conn_2); - EXPECT_THAT(conn_1, NotNull()); -} - -TEST_F(TableAdminTest, LegacyConstructorSetsCQ) { - auto admin_client = MakeAdminClient(kProjectId, TestOptions()); - auto admin = TableAdmin(admin_client, kInstanceId); - auto conn = TableAdminTester::Connection(admin); - ASSERT_TRUE(conn->options().has()); - auto conn_cq = conn->options().get(); - auto client_cq = TableAdminTester::CQ(admin); - - EXPECT_TRUE(SameCQ(conn_cq, client_cq)); - EXPECT_THAT(TableAdminTester::Threads(admin), NotNull()); -} - -TEST_F(TableAdminTest, LegacyConstructorSetsCustomCQ) { - CompletionQueue user_cq; - auto admin_client = MakeAdminClient( - kProjectId, TestOptions().set(user_cq)); - auto admin = TableAdmin(admin_client, kInstanceId); - auto conn = TableAdminTester::Connection(admin); - ASSERT_TRUE(conn->options().has()); - auto conn_cq = conn->options().get(); - auto client_cq = TableAdminTester::CQ(admin); - - EXPECT_TRUE(SameCQ(user_cq, client_cq)); - EXPECT_TRUE(SameCQ(conn_cq, client_cq)); - EXPECT_THAT(TableAdminTester::Threads(admin), IsNull()); -} - -TEST_F(TableAdminTest, LegacyConstructorDefaultsPolicies) { - auto admin_client = MakeAdminClient(kProjectId, TestOptions()); - auto admin = TableAdmin(std::move(admin_client), kInstanceId); - auto options = TableAdminTester::Options(admin); - CheckOptions(options); -} - -TEST_F(TableAdminTest, LegacyConstructorWithPolicies) { - // In this test, we make a series of simple calls to verify that the policies - // passed to the `TableAdmin` constructor are actually collected as - // `Options`. - // - // Upon construction of an TableAdmin, each policy is cloned twice: Once - // while processing the variadic parameters, once while converting from - // Bigtable policies to common policies. This should explain the nested mocks - // below. - - auto mock_r = std::make_shared(); - auto mock_b = std::make_shared(); - auto mock_p = std::make_shared(); - - EXPECT_CALL(*mock_r, clone).WillOnce([] { - auto clone_1 = std::make_unique(); - EXPECT_CALL(*clone_1, clone).WillOnce([] { - auto clone_2 = std::make_unique(); - EXPECT_CALL(*clone_2, OnFailure(An())); - return clone_2; - }); - return clone_1; - }); - - EXPECT_CALL(*mock_b, clone).WillOnce([] { - auto clone_1 = std::make_unique(); - EXPECT_CALL(*clone_1, clone).WillOnce([] { - auto clone_2 = std::make_unique(); - EXPECT_CALL(*clone_2, OnCompletion(An())); - return clone_2; - }); - return clone_1; - }); - - EXPECT_CALL(*mock_p, clone).WillOnce([] { - auto clone_1 = std::make_unique(); - EXPECT_CALL(*clone_1, clone).WillOnce([] { - auto clone_2 = std::make_unique(); - EXPECT_CALL(*clone_2, WaitPeriod); - return clone_2; - }); - return clone_1; - }); - - auto admin_client = MakeAdminClient(kProjectId, TestOptions()); - auto admin = TableAdmin(std::move(admin_client), kInstanceId, *mock_r, - *mock_b, *mock_p); - auto options = TableAdminTester::Options(admin); - CheckOptions(options); - - auto const& common_retry = - options.get(); - (void)common_retry->OnFailure({}); - - auto const& common_backoff = - options.get(); - (void)common_backoff->OnCompletion(); - - auto const& common_polling = - options.get(); - (void)common_polling->WaitPeriod(); -} - -TEST_F(TableAdminTest, CreateTable) { - auto admin = DefaultTableAdmin(); - std::string expected_request = R"pb( - parent: 'projects/the-project/instances/the-instance' - table_id: 'the-table' - table { - column_families { - key: 'f1' - value { gc_rule { max_num_versions: 1 } } - } - column_families { - key: 'f2' - value { gc_rule { max_age { seconds: 1 } } } - } - granularity: TIMESTAMP_GRANULARITY_UNSPECIFIED - } - initial_splits { key: 'a' } - initial_splits { key: 'c' } - initial_splits { key: 'p' } - )pb"; - - EXPECT_CALL(*connection_, CreateTable) - .WillOnce( - [&expected_request](btadmin::CreateTableRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - btadmin::CreateTableRequest expected; - EXPECT_TRUE(google::protobuf::TextFormat::ParseFromString( - expected_request, &expected)); - EXPECT_THAT(expected, IsProtoEqual(request)); - return FailingStatus(); - }); - - TableConfig config({{"f1", GcRule::MaxNumVersions(1)}, - {"f2", GcRule::MaxAge(std::chrono::seconds(1))}}, - {"a", "c", "p"}); - EXPECT_THAT(admin.CreateTable(kTableId, config), - StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(TableAdminTest, ListTablesSuccess) { - auto admin = DefaultTableAdmin(); - auto const expected_view = btadmin::Table::FULL; - std::vector const expected_names = { - TableName(kProjectId, kInstanceId, "t0"), - TableName(kProjectId, kInstanceId, "t1")}; - - auto iter = expected_names.begin(); - EXPECT_CALL(*connection_, ListTables) - .WillOnce([&iter, &expected_names, - expected_view](btadmin::ListTablesRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kInstanceName, request.parent()); - EXPECT_EQ(expected_view, request.view()); - - using ::google::cloud::internal::MakeStreamRange; - using ::google::cloud::internal::StreamReader; - auto reader = - [&iter, - &expected_names]() -> StreamReader::result_type { - if (iter != expected_names.end()) { - btadmin::Table t; - t.set_name(*iter); - ++iter; - return t; - } - return Status(); - }; - return MakeStreamRange(std::move(reader)); - }); - - auto tables = admin.ListTables(expected_view); - ASSERT_STATUS_OK(tables); - std::vector names; - std::transform(tables->begin(), tables->end(), std::back_inserter(names), - [](btadmin::Table const& t) { return t.name(); }); - - EXPECT_THAT(names, ElementsAreArray(expected_names)); -} - -TEST_F(TableAdminTest, ListTablesFailure) { - auto admin = DefaultTableAdmin(); - auto const expected_view = btadmin::Table::NAME_ONLY; - - EXPECT_CALL(*connection_, ListTables) - .WillOnce([&expected_view](btadmin::ListTablesRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kInstanceName, request.parent()); - EXPECT_EQ(expected_view, request.view()); - - using ::google::cloud::internal::MakeStreamRange; - return MakeStreamRange([] { return FailingStatus(); }); - }); - - EXPECT_THAT(admin.ListTables(expected_view), - StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(TableAdminTest, GetTable) { - auto admin = DefaultTableAdmin(); - auto const expected_view = btadmin::Table::NAME_ONLY; - - EXPECT_CALL(*connection_, GetTable) - .WillOnce([&expected_view](btadmin::GetTableRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kTableName, request.name()); - EXPECT_EQ(expected_view, request.view()); - return FailingStatus(); - }); - - EXPECT_THAT(admin.GetTable(kTableId, expected_view), - StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(TableAdminTest, DeleteTable) { - auto admin = DefaultTableAdmin(); - - EXPECT_CALL(*connection_, DeleteTable) - .WillOnce([](btadmin::DeleteTableRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kTableName, request.name()); - return FailingStatus(); - }); - - EXPECT_THAT(admin.DeleteTable(kTableId), - StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(TableAdminTest, CreateBackupParams) { - auto const expire_time = std::chrono::system_clock::now() + hours(24); - TableAdmin::CreateBackupParams params(kClusterId, kBackupId, kTableId, - expire_time); - - auto request = params.AsProto(kInstanceName); - EXPECT_EQ(kClusterName, request.parent()); - EXPECT_EQ(kBackupId, request.backup_id()); - EXPECT_EQ(kTableName, request.backup().source_table()); - EXPECT_EQ(expire_time, ToChronoTimePoint(request.backup().expire_time())); -} - -TEST_F(TableAdminTest, CreateBackup) { - auto const expire_time = std::chrono::system_clock::now() + hours(24); - auto admin = DefaultTableAdmin(); - - EXPECT_CALL(*connection_, - CreateBackup(An())) - .WillOnce([expire_time](btadmin::CreateBackupRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kClusterName, request.parent()); - EXPECT_EQ(kBackupId, request.backup_id()); - EXPECT_EQ(kTableName, request.backup().source_table()); - EXPECT_EQ(expire_time, - ToChronoTimePoint(request.backup().expire_time())); - return make_ready_future>(FailingStatus()); - }); - - TableAdmin::CreateBackupParams params(kClusterId, kBackupId, kTableId, - expire_time); - EXPECT_THAT(admin.CreateBackup(params), - StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(TableAdminTest, GetBackup) { - auto admin = DefaultTableAdmin(); - - EXPECT_CALL(*connection_, GetBackup) - .WillOnce([](btadmin::GetBackupRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kBackupName, request.name()); - return FailingStatus(); - }); - - EXPECT_THAT(admin.GetBackup(kClusterId, kBackupId), - StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(TableAdminTest, UpdateBackupParams) { - auto const expire_time = std::chrono::system_clock::now() + hours(24); - TableAdmin::UpdateBackupParams params(kClusterId, kBackupId, expire_time); - - auto request = params.AsProto(kInstanceName); - EXPECT_EQ(kBackupName, request.backup().name()); - EXPECT_EQ(expire_time, ToChronoTimePoint(request.backup().expire_time())); - EXPECT_THAT(request.update_mask().paths(), ElementsAre("expire_time")); -} - -TEST_F(TableAdminTest, UpdateBackup) { - auto const expire_time = std::chrono::system_clock::now() + hours(24); - auto admin = DefaultTableAdmin(); - - EXPECT_CALL(*connection_, UpdateBackup) - .WillOnce([expire_time](btadmin::UpdateBackupRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kBackupName, request.backup().name()); - EXPECT_EQ(expire_time, - ToChronoTimePoint(request.backup().expire_time())); - EXPECT_THAT(request.update_mask().paths(), ElementsAre("expire_time")); - return FailingStatus(); - }); - - TableAdmin::UpdateBackupParams params(kClusterId, kBackupId, expire_time); - EXPECT_THAT(admin.UpdateBackup(params), - StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(TableAdminTest, DeleteBackup) { - auto admin = DefaultTableAdmin(); - - EXPECT_CALL(*connection_, DeleteBackup) - .Times(2) - .WillRepeatedly([](btadmin::DeleteBackupRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kBackupName, request.name()); - return FailingStatus(); - }); - - btadmin::Backup b; - b.set_name(kBackupName); - EXPECT_THAT(admin.DeleteBackup(b), StatusIs(StatusCode::kPermissionDenied)); - - EXPECT_THAT(admin.DeleteBackup(kClusterId, kBackupId), - StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(TableAdminTest, ListBackupsParams) { - TableAdmin::ListBackupsParams params; - auto request = params.AsProto(kInstanceName); - EXPECT_EQ(request.parent(), ClusterName(kProjectId, kInstanceId, "-")); - - params.set_cluster(kClusterId).set_filter("state:READY").set_order_by("name"); - request = params.AsProto(kInstanceName); - EXPECT_EQ(request.parent(), kClusterName); - EXPECT_EQ(*request.mutable_filter(), "state:READY"); - EXPECT_EQ(*request.mutable_order_by(), "name"); -} - -TEST_F(TableAdminTest, ListBackupsSuccess) { - auto admin = DefaultTableAdmin(); - std::vector const expected_names = { - BackupName(kProjectId, kInstanceId, kClusterId, "b0"), - BackupName(kProjectId, kInstanceId, kClusterId, "b1")}; - - auto iter = expected_names.begin(); - EXPECT_CALL(*connection_, ListBackups) - .WillOnce([&iter, - &expected_names](btadmin::ListBackupsRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kClusterName, request.parent()); - - using ::google::cloud::internal::MakeStreamRange; - using ::google::cloud::internal::StreamReader; - auto reader = - [&iter, - &expected_names]() -> StreamReader::result_type { - if (iter != expected_names.end()) { - btadmin::Backup b; - b.set_name(*iter); - ++iter; - return b; - } - return Status(); - }; - return MakeStreamRange(std::move(reader)); - }); - - auto params = TableAdmin::ListBackupsParams().set_cluster(kClusterId); - auto backups = admin.ListBackups(params); - ASSERT_STATUS_OK(backups); - std::vector names; - std::transform(backups->begin(), backups->end(), std::back_inserter(names), - [](btadmin::Backup const& b) { return b.name(); }); - - EXPECT_THAT(names, ElementsAreArray(expected_names)); -} - -TEST_F(TableAdminTest, ListBackupsFailure) { - auto admin = DefaultTableAdmin(); - - EXPECT_CALL(*connection_, ListBackups) - .WillOnce([](btadmin::ListBackupsRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kClusterName, request.parent()); - - using ::google::cloud::internal::MakeStreamRange; - return MakeStreamRange([] { return FailingStatus(); }); - }); - - auto params = TableAdmin::ListBackupsParams().set_cluster(kClusterId); - EXPECT_THAT(admin.ListBackups(params), - StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(TableAdminTest, RestoreTableParams) { - TableAdmin::RestoreTableParams params(kTableId, kClusterId, kBackupId); - auto request = params.AsProto(kInstanceName); - EXPECT_EQ(kInstanceName, request.parent()); - EXPECT_EQ(kTableId, request.table_id()); - EXPECT_EQ(kBackupName, request.backup()); -} - -TEST_F(TableAdminTest, RestoreTable) { - auto admin = DefaultTableAdmin(); - - EXPECT_CALL(*connection_, - RestoreTable(An())) - .Times(2) - .WillRepeatedly([](btadmin::RestoreTableRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kInstanceName, request.parent()); - EXPECT_EQ(kTableId, request.table_id()); - EXPECT_EQ(kBackupName, request.backup()); - return make_ready_future>(FailingStatus()); - }); - - TableAdmin::RestoreTableParams params(kTableId, kClusterId, kBackupId); - EXPECT_THAT(admin.RestoreTable(params), - StatusIs(StatusCode::kPermissionDenied)); - - TableAdmin::RestoreTableFromInstanceParams instance_params; - instance_params.table_id = kTableId; - instance_params.backup_name = kBackupName; - EXPECT_THAT(admin.RestoreTable(instance_params), - StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(TableAdminTest, ModifyColumnFamilies) { - auto admin = DefaultTableAdmin(); - std::string expected_request = R"pb( - name: 'projects/the-project/instances/the-instance/tables/the-table' - modifications { - id: 'foo' - create { gc_rule { max_age { seconds: 172800 } } } - } - modifications { - id: 'bar' - update { gc_rule { max_age { seconds: 86400 } } } - } - )pb"; - - EXPECT_CALL(*connection_, ModifyColumnFamilies) - .WillOnce([&expected_request]( - btadmin::ModifyColumnFamiliesRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - btadmin::ModifyColumnFamiliesRequest expected; - EXPECT_TRUE(google::protobuf::TextFormat::ParseFromString( - expected_request, &expected)); - EXPECT_THAT(expected, IsProtoEqual(request)); - return FailingStatus(); - }); - - using M = ColumnFamilyModification; - std::vector mods = { - M::Create("foo", GcRule::MaxAge(hours(48))), - M::Update("bar", GcRule::MaxAge(hours(24)))}; - EXPECT_THAT(admin.ModifyColumnFamilies(kTableId, mods), - StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(TableAdminTest, DropRowsByPrefix) { - auto admin = DefaultTableAdmin(); - - EXPECT_CALL(*connection_, DropRowRange) - .WillOnce([](btadmin::DropRowRangeRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kTableName, request.name()); - EXPECT_EQ("prefix", request.row_key_prefix()); - return FailingStatus(); - }); - - EXPECT_THAT(admin.DropRowsByPrefix(kTableId, "prefix"), - StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(TableAdminTest, WaitForConsistencySuccess) { - auto admin = DefaultTableAdmin(); - - EXPECT_CALL(*connection_, AsyncCheckConsistency) - .WillOnce([](btadmin::CheckConsistencyRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kTableName, request.name()); - EXPECT_EQ("consistency-token", request.consistency_token()); - btadmin::CheckConsistencyResponse resp; - resp.set_consistent(true); - return make_ready_future(make_status_or(resp)); - }); - - auto consistent = - admin.WaitForConsistency(kTableId, "consistency-token").get(); - ASSERT_STATUS_OK(consistent); - EXPECT_EQ(*consistent, Consistency::kConsistent); -} - -TEST_F(TableAdminTest, WaitForConsistencyFailure) { - auto admin = DefaultTableAdmin(); - - EXPECT_CALL(*connection_, AsyncCheckConsistency) - .WillOnce([](btadmin::CheckConsistencyRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kTableName, request.name()); - EXPECT_EQ("consistency-token", request.consistency_token()); - return make_ready_future>( - FailingStatus()); - }); - - EXPECT_THAT(admin.WaitForConsistency(kTableId, "consistency-token").get(), - StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(TableAdminTest, DropAllRows) { - auto admin = DefaultTableAdmin(); - - EXPECT_CALL(*connection_, DropRowRange) - .WillOnce([](btadmin::DropRowRangeRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kTableName, request.name()); - EXPECT_TRUE(request.delete_all_data_from_table()); - return FailingStatus(); - }); - - EXPECT_THAT(admin.DropAllRows(kTableId), - StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(TableAdminTest, GenerateConsistencyTokenSuccess) { - auto admin = DefaultTableAdmin(); - - EXPECT_CALL(*connection_, GenerateConsistencyToken) - .WillOnce([](btadmin::GenerateConsistencyTokenRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kTableName, request.name()); - btadmin::GenerateConsistencyTokenResponse resp; - resp.set_consistency_token("consistency-token"); - return resp; - }); - - auto token = admin.GenerateConsistencyToken(kTableId); - ASSERT_STATUS_OK(token); - EXPECT_EQ(*token, "consistency-token"); -} - -TEST_F(TableAdminTest, GenerateConsistencyTokenFailure) { - auto admin = DefaultTableAdmin(); - - EXPECT_CALL(*connection_, GenerateConsistencyToken) - .WillOnce([](btadmin::GenerateConsistencyTokenRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kTableName, request.name()); - return FailingStatus(); - }); - - EXPECT_THAT(admin.GenerateConsistencyToken(kTableId), - StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(TableAdminTest, CheckConsistencySuccess) { - auto admin = DefaultTableAdmin(); - - EXPECT_CALL(*connection_, CheckConsistency) - .WillOnce([](btadmin::CheckConsistencyRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kTableName, request.name()); - EXPECT_EQ("consistency-token", request.consistency_token()); - btadmin::CheckConsistencyResponse resp; - resp.set_consistent(false); - return resp; - }) - .WillOnce([](btadmin::CheckConsistencyRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kTableName, request.name()); - EXPECT_EQ("consistency-token", request.consistency_token()); - btadmin::CheckConsistencyResponse resp; - resp.set_consistent(true); - return resp; - }); - - auto consistent = admin.CheckConsistency(kTableId, "consistency-token"); - ASSERT_STATUS_OK(consistent); - EXPECT_EQ(*consistent, Consistency::kInconsistent); - - consistent = admin.CheckConsistency(kTableId, "consistency-token"); - ASSERT_STATUS_OK(consistent); - EXPECT_EQ(*consistent, Consistency::kConsistent); -} - -TEST_F(TableAdminTest, CheckConsistencyFailure) { - auto admin = DefaultTableAdmin(); - - EXPECT_CALL(*connection_, CheckConsistency) - .WillOnce([](btadmin::CheckConsistencyRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kTableName, request.name()); - EXPECT_EQ("consistency-token", request.consistency_token()); - return FailingStatus(); - }); - - EXPECT_THAT(admin.CheckConsistency(kTableId, "consistency-token"), - StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(TableAdminTest, GetIamPolicyTable) { - auto admin = DefaultTableAdmin(); - - EXPECT_CALL(*connection_, GetIamPolicy) - .WillOnce([](iamproto::GetIamPolicyRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kTableName, request.resource()); - return FailingStatus(); - }); - - EXPECT_THAT(admin.GetIamPolicy(kTableId), - StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(TableAdminTest, GetIamPolicyBackup) { - auto admin = DefaultTableAdmin(); - - EXPECT_CALL(*connection_, GetIamPolicy) - .WillOnce([](iamproto::GetIamPolicyRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kBackupName, request.resource()); - return FailingStatus(); - }); - - EXPECT_THAT(admin.GetIamPolicy(kClusterId, kBackupId), - StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(TableAdminTest, SetIamPolicyTable) { - auto admin = DefaultTableAdmin(); - - EXPECT_CALL(*connection_, SetIamPolicy) - .WillOnce([](iamproto::SetIamPolicyRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kTableName, request.resource()); - EXPECT_EQ(3, request.policy().version()); - EXPECT_EQ("tag", request.policy().etag()); - return FailingStatus(); - }); - - iamproto::Policy p; - p.set_version(3); - p.set_etag("tag"); - EXPECT_THAT(admin.SetIamPolicy(kTableId, p), - StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(TableAdminTest, SetIamPolicyBackup) { - auto admin = DefaultTableAdmin(); - - EXPECT_CALL(*connection_, SetIamPolicy) - .WillOnce([](iamproto::SetIamPolicyRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kBackupName, request.resource()); - EXPECT_EQ(3, request.policy().version()); - EXPECT_EQ("tag", request.policy().etag()); - return FailingStatus(); - }); - - iamproto::Policy p; - p.set_version(3); - p.set_etag("tag"); - EXPECT_THAT(admin.SetIamPolicy(kClusterId, kBackupId, p), - StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(TableAdminTest, TestIamPermissionsTableSuccess) { - auto admin = DefaultTableAdmin(); - std::vector const expected_permissions = {"writer", "reader"}; - std::vector const returned_permissions = {"reader"}; - - EXPECT_CALL(*connection_, TestIamPermissions) - .WillOnce([&](iamproto::TestIamPermissionsRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kTableName, request.resource()); - std::vector actual_permissions; - for (auto const& c : request.permissions()) { - actual_permissions.emplace_back(c); - } - EXPECT_THAT(actual_permissions, - UnorderedElementsAreArray(expected_permissions)); - - iamproto::TestIamPermissionsResponse r; - for (auto const& p : returned_permissions) r.add_permissions(p); - return r; - }); - - auto resp = admin.TestIamPermissions(kTableId, expected_permissions); - ASSERT_STATUS_OK(resp); - EXPECT_THAT(*resp, ElementsAreArray(returned_permissions)); -} - -TEST_F(TableAdminTest, TestIamPermissionsTableFailure) { - auto admin = DefaultTableAdmin(); - std::vector const expected_permissions = {"writer", "reader"}; - - EXPECT_CALL(*connection_, TestIamPermissions) - .WillOnce([&](iamproto::TestIamPermissionsRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kTableName, request.resource()); - std::vector actual_permissions; - for (auto const& c : request.permissions()) { - actual_permissions.emplace_back(c); - } - EXPECT_THAT(actual_permissions, - UnorderedElementsAreArray(expected_permissions)); - return FailingStatus(); - }); - - EXPECT_THAT(admin.TestIamPermissions(kTableId, expected_permissions), - StatusIs(StatusCode::kPermissionDenied)); -} - -TEST_F(TableAdminTest, TestIamPermissionsBackupSuccess) { - auto admin = DefaultTableAdmin(); - std::vector const expected_permissions = {"writer", "reader"}; - std::vector const returned_permissions = {"reader"}; - - EXPECT_CALL(*connection_, TestIamPermissions) - .WillOnce([&](iamproto::TestIamPermissionsRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kBackupName, request.resource()); - std::vector actual_permissions; - for (auto const& c : request.permissions()) { - actual_permissions.emplace_back(c); - } - EXPECT_THAT(actual_permissions, - UnorderedElementsAreArray(expected_permissions)); - - iamproto::TestIamPermissionsResponse r; - for (auto const& p : returned_permissions) r.add_permissions(p); - return r; - }); - - auto resp = - admin.TestIamPermissions(kClusterId, kBackupId, expected_permissions); - ASSERT_STATUS_OK(resp); - EXPECT_THAT(*resp, ElementsAreArray(returned_permissions)); -} - -TEST_F(TableAdminTest, TestIamPermissionsBackupFailure) { - auto admin = DefaultTableAdmin(); - std::vector const expected_permissions = {"writer", "reader"}; - - EXPECT_CALL(*connection_, TestIamPermissions) - .WillOnce([&](iamproto::TestIamPermissionsRequest const& request) { - CheckOptions(google::cloud::internal::CurrentOptions()); - EXPECT_EQ(kBackupName, request.resource()); - std::vector actual_permissions; - for (auto const& c : request.permissions()) { - actual_permissions.emplace_back(c); - } - EXPECT_THAT(actual_permissions, - UnorderedElementsAreArray(expected_permissions)); - return FailingStatus(); - }); - - EXPECT_THAT( - admin.TestIamPermissions(kClusterId, kBackupId, expected_permissions), - StatusIs(StatusCode::kPermissionDenied)); -} - -} // namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/table_apply_test.cc b/google/cloud/bigtable/table_apply_test.cc deleted file mode 100644 index acbf38761b2c6..0000000000000 --- a/google/cloud/bigtable/table_apply_test.cc +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright 2017 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/table.h" -#include "google/cloud/bigtable/testing/table_test_fixture.h" -#include "google/cloud/internal/api_client_header.h" -#include "google/cloud/testing_util/chrono_literals.h" -#include "google/cloud/testing_util/status_matchers.h" -#include "google/cloud/testing_util/validate_metadata.h" - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -namespace bigtable = ::google::cloud::bigtable; -using ::google::cloud::testing_util::StatusIs; -using ::google::cloud::testing_util::ValidateMetadataFixture; -using ::google::cloud::testing_util::chrono_literals::operator""_ms; - -class TableApplyTest : public bigtable::testing::TableTestFixture { - protected: - TableApplyTest() : TableTestFixture(CompletionQueue{}) {} - - void IsContextMDValid(grpc::ClientContext& context, std::string const& method, - google::protobuf::Message const& request) { - return validate_metadata_fixture_.IsContextMDValid( - context, method, request, - google::cloud::internal::HandCraftedLibClientHeader()); - } - - std::function - CreateMutateRowMock(grpc::Status const& status) { - return [this, status](grpc::ClientContext* context, - google::bigtable::v2::MutateRowRequest const& request, - google::bigtable::v2::MutateRowResponse*) { - IsContextMDValid(*context, "google.bigtable.v2.Bigtable.MutateRow", - request); - return status; - }; - } - - private: - ValidateMetadataFixture validate_metadata_fixture_; -}; - -/// @test Verify that Table::Apply() works in a simplest case. -TEST_F(TableApplyTest, Simple) { - EXPECT_CALL(*client_, MutateRow) - .WillOnce(CreateMutateRowMock(grpc::Status::OK)); - - auto status = table_.Apply(bigtable::SingleRowMutation( - "bar", {bigtable::SetCell("fam", "col", 0_ms, "val")})); - ASSERT_STATUS_OK(status); -} - -/// @test Verify that Table::Apply() raises an exception on permanent failures. -TEST_F(TableApplyTest, Failure) { - EXPECT_CALL(*client_, MutateRow) - .WillRepeatedly(CreateMutateRowMock( - grpc::Status(grpc::StatusCode::FAILED_PRECONDITION, "uh-oh"))); - - auto status = table_.Apply(bigtable::SingleRowMutation( - "bar", {bigtable::SetCell("fam", "col", 0_ms, "val")})); - EXPECT_THAT(status, StatusIs(StatusCode::kFailedPrecondition)); -} - -/// @test Verify that Table::Apply() retries on partial failures. -TEST_F(TableApplyTest, Retry) { - EXPECT_CALL(*client_, MutateRow) - .WillOnce(CreateMutateRowMock( - grpc::Status(grpc::StatusCode::UNAVAILABLE, "try-again"))) - .WillOnce(CreateMutateRowMock( - grpc::Status(grpc::StatusCode::UNAVAILABLE, "try-again"))) - .WillOnce(CreateMutateRowMock( - grpc::Status(grpc::StatusCode::UNAVAILABLE, "try-again"))) - .WillOnce(CreateMutateRowMock((grpc::Status::OK))); - - auto status = table_.Apply(bigtable::SingleRowMutation( - "bar", {bigtable::SetCell("fam", "col", 0_ms, "val")})); - ASSERT_STATUS_OK(status); -} - -/// @test Verify that Table::Apply() retries only idempotent mutations. -TEST_F(TableApplyTest, RetryIdempotent) { - EXPECT_CALL(*client_, MutateRow) - .WillRepeatedly(CreateMutateRowMock( - grpc::Status(grpc::StatusCode::UNAVAILABLE, "try-again"))); - - auto status = table_.Apply(bigtable::SingleRowMutation( - "not-idempotent", {bigtable::SetCell("fam", "col", "val")})); - EXPECT_THAT(status, StatusIs(StatusCode::kUnavailable)); -} - -} // namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/table_bulk_apply_test.cc b/google/cloud/bigtable/table_bulk_apply_test.cc deleted file mode 100644 index d991309977d62..0000000000000 --- a/google/cloud/bigtable/table_bulk_apply_test.cc +++ /dev/null @@ -1,391 +0,0 @@ -// Copyright 2017 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/table.h" -#include "google/cloud/bigtable/testing/mock_mutate_rows_reader.h" -#include "google/cloud/bigtable/testing/mock_policies.h" -#include "google/cloud/bigtable/testing/table_test_fixture.h" -#include "google/cloud/testing_util/chrono_literals.h" -#include "google/cloud/testing_util/status_matchers.h" - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -namespace btproto = ::google::bigtable::v2; - -using ::google::cloud::bigtable::testing::MockBackoffPolicy; -using ::google::cloud::testing_util::IsOk; -using ::google::cloud::testing_util::chrono_literals::operator""_ms; -using ::google::cloud::testing_util::chrono_literals::operator""_us; -using ::testing::An; -using ::testing::Not; -using ::testing::Return; - -/// Define types and functions used in the tests. -class TableBulkApplyTest - : public ::google::cloud::bigtable::testing::TableTestFixture { - public: - TableBulkApplyTest() : TableTestFixture(CompletionQueue{}) {} -}; -using ::google::cloud::bigtable::testing::MockMutateRowsReader; - -TEST_F(TableBulkApplyTest, Empty) { - auto failures = table_.BulkApply(BulkMutation()); - EXPECT_TRUE(failures.empty()); -} - -/// @test Verify that Table::BulkApply() works in the easy case. -TEST_F(TableBulkApplyTest, Simple) { - auto reader = std::make_unique( - "google.bigtable.v2.Bigtable.MutateRows"); - EXPECT_CALL(*reader, Read) - .WillOnce([](btproto::MutateRowsResponse* r) { - { - auto& e = *r->add_entries(); - e.set_index(0); - e.mutable_status()->set_code(grpc::StatusCode::OK); - } - { - auto& e = *r->add_entries(); - e.set_index(1); - e.mutable_status()->set_code(grpc::StatusCode::OK); - } - return true; - }) - .WillOnce(Return(false)); - EXPECT_CALL(*reader, Finish()).WillOnce(Return(grpc::Status::OK)); - - EXPECT_CALL(*client_, MutateRows) - .WillOnce(reader.release()->MakeMockReturner()); - - auto failures = table_.BulkApply(BulkMutation( - SingleRowMutation("foo", {SetCell("fam", "col", 0_ms, "baz")}), - SingleRowMutation("bar", {SetCell("fam", "col", 0_ms, "qux")}))); - ASSERT_TRUE(failures.empty()); - SUCCEED(); -} - -/// @test Verify that Table::BulkApply() retries partial failures. -TEST_F(TableBulkApplyTest, RetryPartialFailure) { - auto r1 = std::make_unique( - "google.bigtable.v2.Bigtable.MutateRows"); - EXPECT_CALL(*r1, Read) - .WillOnce([](btproto::MutateRowsResponse* r) { - // Simulate a partial (recoverable) failure. - auto& e0 = *r->add_entries(); - e0.set_index(0); - e0.mutable_status()->set_code(grpc::StatusCode::UNAVAILABLE); - auto& e1 = *r->add_entries(); - e1.set_index(1); - e1.mutable_status()->set_code(grpc::StatusCode::OK); - return true; - }) - .WillOnce(Return(false)); - EXPECT_CALL(*r1, Finish()).WillOnce(Return(grpc::Status::OK)); - - auto r2 = std::make_unique( - "google.bigtable.v2.Bigtable.MutateRows"); - EXPECT_CALL(*r2, Read) - .WillOnce([](btproto::MutateRowsResponse* r) { - { - auto& e = *r->add_entries(); - e.set_index(0); - e.mutable_status()->set_code(grpc::StatusCode::OK); - } - return true; - }) - .WillOnce(Return(false)); - EXPECT_CALL(*r2, Finish()).WillOnce(Return(grpc::Status::OK)); - - EXPECT_CALL(*client_, MutateRows) - .WillOnce(r1.release()->MakeMockReturner()) - .WillOnce(r2.release()->MakeMockReturner()); - - auto failures = table_.BulkApply(BulkMutation( - SingleRowMutation("foo", {SetCell("fam", "col", 0_ms, "baz")}), - SingleRowMutation("bar", {SetCell("fam", "col", 0_ms, "qux")}))); - ASSERT_TRUE(failures.empty()); - SUCCEED(); -} - -/// @test Verify that Table::BulkApply() handles permanent failures. -TEST_F(TableBulkApplyTest, PermanentFailure) { - auto r1 = std::make_unique( - "google.bigtable.v2.Bigtable.MutateRows"); - EXPECT_CALL(*r1, Read) - .WillOnce([](btproto::MutateRowsResponse* r) { - { - auto& e = *r->add_entries(); - e.set_index(0); - e.mutable_status()->set_code(grpc::StatusCode::OK); - } - { - auto& e = *r->add_entries(); - e.set_index(1); - e.mutable_status()->set_code(grpc::StatusCode::OUT_OF_RANGE); - } - return true; - }) - .WillOnce(Return(false)); - EXPECT_CALL(*r1, Finish()).WillOnce(Return(grpc::Status::OK)); - - EXPECT_CALL(*client_, MutateRows).WillOnce(r1.release()->MakeMockReturner()); - - auto failures = table_.BulkApply(BulkMutation( - SingleRowMutation("foo", {SetCell("fam", "col", 0_ms, "baz")}), - SingleRowMutation("bar", {SetCell("fam", "col", 0_ms, "qux")}))); - EXPECT_FALSE(failures.empty()); -} - -/// @test Verify that Table::BulkApply() handles a terminated stream. -TEST_F(TableBulkApplyTest, CanceledStream) { - // Simulate a stream that returns one success and then terminates. We expect - // the BulkApply() operation to retry the request, because the mutation is in - // an undetermined state. Well, it should retry assuming it is idempotent, - // which happens to be the case in this test. - auto r1 = std::make_unique( - "google.bigtable.v2.Bigtable.MutateRows"); - EXPECT_CALL(*r1, Read) - .WillOnce([](btproto::MutateRowsResponse* r) { - { - auto& e = *r->add_entries(); - e.set_index(0); - e.mutable_status()->set_code(grpc::StatusCode::OK); - } - return true; - }) - .WillOnce(Return(false)); - EXPECT_CALL(*r1, Finish()).WillOnce(Return(grpc::Status::OK)); - - // Create a second stream returned by the mocks when the client retries. - auto r2 = std::make_unique( - "google.bigtable.v2.Bigtable.MutateRows"); - EXPECT_CALL(*r2, Read) - .WillOnce([](btproto::MutateRowsResponse* r) { - { - auto& e = *r->add_entries(); - e.set_index(0); - e.mutable_status()->set_code(grpc::StatusCode::OK); - } - return true; - }) - .WillOnce(Return(false)); - EXPECT_CALL(*r2, Finish()).WillOnce(Return(grpc::Status::OK)); - - EXPECT_CALL(*client_, MutateRows) - .WillOnce(r1.release()->MakeMockReturner()) - .WillOnce(r2.release()->MakeMockReturner()); - - auto failures = table_.BulkApply(BulkMutation( - SingleRowMutation("foo", {SetCell("fam", "col", 0_ms, "baz")}), - SingleRowMutation("bar", {SetCell("fam", "col", 0_ms, "qux")}))); - ASSERT_TRUE(failures.empty()); - SUCCEED(); -} - -/// @test Verify that Table::BulkApply() reports correctly on too many errors. -TEST_F(TableBulkApplyTest, TooManyFailures) { - // Create a table with specific policies so we can test the behavior - // without having to depend on timers expiring. In this case tolerate only - // 3 failures. - Table custom_table( - client_, "foo_table", - // Configure the Table to stop at 3 failures. - LimitedErrorCountRetryPolicy(2), - // Use much shorter backoff than the default to test faster. - ExponentialBackoffPolicy(10_us, 40_us)); - - // Setup the mocks to fail more than 3 times. - auto r1 = std::make_unique( - "google.bigtable.v2.Bigtable.MutateRows"); - EXPECT_CALL(*r1, Read) - .WillOnce([](btproto::MutateRowsResponse* r) { - { - auto& e = *r->add_entries(); - e.set_index(0); - e.mutable_status()->set_code(grpc::StatusCode::OK); - } - return true; - }) - .WillOnce(Return(false)); - EXPECT_CALL(*r1, Finish()) - .WillOnce(Return(grpc::Status(grpc::StatusCode::ABORTED, ""))); - - auto create_cancelled_stream = [&](grpc::ClientContext*, - btproto::MutateRowsRequest const&) { - auto stream = std::make_unique( - "google.bigtable.v2.Bigtable.MutateRows"); - EXPECT_CALL(*stream, Read).WillOnce(Return(false)); - EXPECT_CALL(*stream, Finish()) - .WillOnce(Return(grpc::Status(grpc::StatusCode::ABORTED, ""))); - return stream; - }; - - EXPECT_CALL(*client_, MutateRows) - .WillOnce(r1.release()->MakeMockReturner()) - .WillOnce(create_cancelled_stream) - .WillOnce(create_cancelled_stream); - - auto failures = custom_table.BulkApply(BulkMutation( - SingleRowMutation("foo", {SetCell("fam", "col", 0_ms, "baz")}), - SingleRowMutation("bar", {SetCell("fam", "col", 0_ms, "qux")}))); - EXPECT_FALSE(failures.empty()); - EXPECT_EQ(google::cloud::StatusCode::kAborted, - failures.front().status().code()); -} - -TEST_F(TableBulkApplyTest, RetryPolicyUsedForOkStreamWithFailedMutations) { - // Create a table with specific policies so we can test the behavior - // without having to depend on timers expiring. In this case tolerate only - // 3 failures. - Table custom_table( - client_, "foo_table", - // Configure the Table to stop at 3 failures. - LimitedErrorCountRetryPolicy(2), - // Use much shorter backoff than the default to test faster. - ExponentialBackoffPolicy(10_us, 40_us)); - - auto create_stream = [&](grpc::ClientContext*, - btproto::MutateRowsRequest const&) { - auto stream = std::make_unique( - "google.bigtable.v2.Bigtable.MutateRows"); - EXPECT_CALL(*stream, Read) - .WillOnce([](btproto::MutateRowsResponse* r) { - auto& e0 = *r->add_entries(); - e0.set_index(0); - e0.mutable_status()->set_code(grpc::StatusCode::UNAVAILABLE); - return true; - }) - .WillOnce(Return(false)); - EXPECT_CALL(*stream, Finish()).WillOnce(Return(grpc::Status::OK)); - return stream; - }; - - EXPECT_CALL(*client_, MutateRows).Times(3).WillRepeatedly(create_stream); - - auto failures = custom_table.BulkApply(BulkMutation( - SingleRowMutation("bar", {SetCell("fam", "col", 0_ms, "qux")}))); - EXPECT_FALSE(failures.empty()); - EXPECT_EQ(StatusCode::kUnavailable, failures.front().status().code()); -} - -/// @test Verify that Table::BulkApply() retries only idempotent mutations. -TEST_F(TableBulkApplyTest, RetryOnlyIdempotent) { - // We will send both idempotent and non-idempotent mutations. We prepare the - // mocks to return an empty stream in the first RPC request. That will force - // the client to only retry the idempotent mutations. - auto r1 = std::make_unique( - "google.bigtable.v2.Bigtable.MutateRows"); - EXPECT_CALL(*r1, Read).WillOnce(Return(false)); - EXPECT_CALL(*r1, Finish()).WillOnce(Return(grpc::Status::OK)); - - auto r2 = std::make_unique( - "google.bigtable.v2.Bigtable.MutateRows"); - EXPECT_CALL(*r2, Read) - .WillOnce([](btproto::MutateRowsResponse* r) { - { - auto& e = *r->add_entries(); - e.set_index(0); - e.mutable_status()->set_code(grpc::StatusCode::OK); - } - return true; - }) - .WillOnce(Return(false)); - EXPECT_CALL(*r2, Finish()).WillOnce(Return(grpc::Status::OK)); - - EXPECT_CALL(*client_, MutateRows) - .WillOnce(r1.release()->MakeMockReturner()) - .WillOnce(r2.release()->MakeMockReturner()); - - auto failures = table_.BulkApply(BulkMutation( - SingleRowMutation("is-idempotent", {SetCell("fam", "col", 0_ms, "qux")}), - SingleRowMutation("not-idempotent", {SetCell("fam", "col", "baz")}))); - EXPECT_EQ(1UL, failures.size()); - EXPECT_EQ(1, failures.front().original_index()); - EXPECT_THAT(failures.front().status(), Not(IsOk())); - EXPECT_FALSE(failures.empty()); -} - -/// @test Verify that Table::BulkApply() works when the RPC fails. -TEST_F(TableBulkApplyTest, FailedRPC) { - auto reader = std::make_unique( - "google.bigtable.v2.Bigtable.MutateRows"); - EXPECT_CALL(*reader, Read).WillOnce(Return(false)); - EXPECT_CALL(*reader, Finish()) - .WillOnce(Return(grpc::Status(grpc::StatusCode::FAILED_PRECONDITION, - "no such table"))); - - EXPECT_CALL(*client_, MutateRows) - .WillOnce(reader.release()->MakeMockReturner()); - - auto failures = table_.BulkApply(BulkMutation( - SingleRowMutation("foo", {SetCell("fam", "col", 0_ms, "baz")}), - SingleRowMutation("bar", {SetCell("fam", "col", 0_ms, "qux")}))); - EXPECT_EQ(2UL, failures.size()); - EXPECT_THAT(failures.front().status(), Not(IsOk())); - EXPECT_FALSE(failures.empty()); - EXPECT_EQ(google::cloud::StatusCode::kFailedPrecondition, - failures.front().status().code()); -} - -TEST_F(TableBulkApplyTest, NoSleepIfNoPendingMutations) { - auto reader = std::make_unique( - "google.bigtable.v2.Bigtable.MutateRows"); - EXPECT_CALL(*reader, Read) - .WillOnce([](btproto::MutateRowsResponse* r) { - { - auto& e = *r->add_entries(); - e.set_index(0); - e.mutable_status()->set_code(grpc::StatusCode::OK); - } - { - auto& e = *r->add_entries(); - e.set_index(1); - e.mutable_status()->set_code(grpc::StatusCode::PERMISSION_DENIED); - } - return true; - }) - .WillOnce(Return(false)); - EXPECT_CALL(*reader, Finish()).WillOnce(Return(grpc::Status::OK)); - - EXPECT_CALL(*client_, MutateRows) - .WillOnce(reader.release()->MakeMockReturner()); - - // The backoff policy is cloned once in the Table constructor, and once before - // the start of the `BulkApply` call. We set expectations on the second clone. - auto b1 = std::make_unique(); - EXPECT_CALL(*b1, clone).WillOnce([]() { - auto b2 = std::make_unique(); - EXPECT_CALL(*b2, clone).WillOnce([]() { - auto mock = std::make_unique(); - EXPECT_CALL(*mock, Setup).Times(1); - EXPECT_CALL(*mock, OnCompletion(An())).Times(0); - return mock; - }); - return b2; - }); - auto table = Table(client_, kTableId, std::move(*b1)); - (void)table.BulkApply(BulkMutation( - SingleRowMutation("foo", {SetCell("fam", "col", 0_ms, "baz")}), - SingleRowMutation("bar", {SetCell("fam", "col", 0_ms, "qux")}))); -} - -} // anonymous namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/table_check_and_mutate_row_test.cc b/google/cloud/bigtable/table_check_and_mutate_row_test.cc deleted file mode 100644 index df0f029de5e25..0000000000000 --- a/google/cloud/bigtable/table_check_and_mutate_row_test.cc +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/table.h" -#include "google/cloud/bigtable/testing/table_test_fixture.h" -#include "google/cloud/internal/api_client_header.h" -#include "google/cloud/testing_util/chrono_literals.h" -#include "google/cloud/testing_util/status_matchers.h" -#include "google/cloud/testing_util/validate_metadata.h" - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -using ::google::cloud::testing_util::ValidateMetadataFixture; -using ::google::cloud::testing_util::chrono_literals::operator""_ms; - -class TableCheckAndMutateRowTest : public bigtable::testing::TableTestFixture { - protected: - TableCheckAndMutateRowTest() : TableTestFixture(CompletionQueue{}) {} - - void IsContextMDValid(grpc::ClientContext& context, std::string const& method, - google::protobuf::Message const& request) { - return validate_metadata_fixture_.IsContextMDValid( - context, method, request, - google::cloud::internal::HandCraftedLibClientHeader()); - } - - std::function< - grpc::Status(grpc::ClientContext* context, - google::bigtable::v2::CheckAndMutateRowRequest const&, - google::bigtable::v2::CheckAndMutateRowResponse*)> - CreateCheckAndMutateMock(grpc::Status const& status) { - return [this, status]( - grpc::ClientContext* context, - google::bigtable::v2::CheckAndMutateRowRequest const& request, - google::bigtable::v2::CheckAndMutateRowResponse*) { - IsContextMDValid( - *context, "google.bigtable.v2.Bigtable.CheckAndMutateRow", request); - return status; - }; - } - - private: - ValidateMetadataFixture validate_metadata_fixture_; -}; - -/// @test Verify that Table::CheckAndMutateRow() works in a simplest case. -TEST_F(TableCheckAndMutateRowTest, Simple) { - EXPECT_CALL(*client_, CheckAndMutateRow) - .WillOnce(CreateCheckAndMutateMock(grpc::Status::OK)); - - auto mut = table_.CheckAndMutateRow( - "foo", bigtable::Filter::PassAllFilter(), - {bigtable::SetCell("fam", "col", 0_ms, "it was true")}, - {bigtable::SetCell("fam", "col", 0_ms, "it was false")}); - - ASSERT_STATUS_OK(mut); -} - -#if GOOGLE_CLOUD_CPP_HAVE_EXCEPTIONS -/// @test Verify that Table::CheckAndMutateRow() raises an on failures. -TEST_F(TableCheckAndMutateRowTest, Failure) { - EXPECT_CALL(*client_, CheckAndMutateRow) - .WillRepeatedly(CreateCheckAndMutateMock( - grpc::Status(grpc::StatusCode::UNAVAILABLE, "try-again"))); - - EXPECT_FALSE(table_.CheckAndMutateRow( - "foo", bigtable::Filter::PassAllFilter(), - {bigtable::SetCell("fam", "col", 0_ms, "it was true")}, - {bigtable::SetCell("fam", "col", 0_ms, "it was false")})); -} -#endif // GOOGLE_CLOUD_CPP_HAVE_EXCEPTIONS - -} // anonymous namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/table_config.h b/google/cloud/bigtable/table_config.h index 9216ca3798bbd..64ab811a3e6b7 100644 --- a/google/cloud/bigtable/table_config.h +++ b/google/cloud/bigtable/table_config.h @@ -17,7 +17,7 @@ #include "google/cloud/bigtable/column_family.h" #include "google/cloud/bigtable/version.h" -#include +#include "google/bigtable/admin/v2/bigtable_table_admin.pb.h" #include #include #include diff --git a/google/cloud/bigtable/table_readmodifywriterow_test.cc b/google/cloud/bigtable/table_readmodifywriterow_test.cc deleted file mode 100644 index 8bd0b22e2f2db..0000000000000 --- a/google/cloud/bigtable/table_readmodifywriterow_test.cc +++ /dev/null @@ -1,295 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/testing/table_test_fixture.h" -#include "google/cloud/internal/api_client_header.h" -#include "google/cloud/testing_util/is_proto_equal.h" -#include "google/cloud/testing_util/status_matchers.h" -#include "google/cloud/testing_util/validate_metadata.h" -#include -#include - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -namespace btproto = ::google::bigtable::v2; - -using ::google::cloud::testing_util::IsProtoEqual; -using ::google::cloud::testing_util::ValidateMetadataFixture; - -/// Define helper types and functions for this test. -class TableReadModifyWriteTest : public bigtable::testing::TableTestFixture { - public: - TableReadModifyWriteTest() : TableTestFixture(CompletionQueue{}) {} - - std::function - CreateRules(std::string const& expected_request_string, - std::string const& generated_response_string) { - return [this, expected_request_string, generated_response_string]( - grpc::ClientContext* context, - btproto::ReadModifyWriteRowRequest const& request, - btproto::ReadModifyWriteRowResponse* response) { - validate_metadata_fixture_.IsContextMDValid( - *context, "google.bigtable.v2.Bigtable.ReadModifyWriteRow", request, - google::cloud::internal::HandCraftedLibClientHeader()); - btproto::ReadModifyWriteRowRequest expected_request; - EXPECT_TRUE(::google::protobuf::TextFormat::ParseFromString( - expected_request_string, &expected_request)); - EXPECT_THAT(expected_request, IsProtoEqual(request)); - - EXPECT_TRUE(::google::protobuf::TextFormat::ParseFromString( - generated_response_string, response)); - - return grpc::Status::OK; - }; - } - - private: - ValidateMetadataFixture validate_metadata_fixture_; -}; - -TEST_F(TableReadModifyWriteTest, MultipleAppendValueTest) { - std::string const row_key = "row-key"; - std::string const family1 = "family1"; - std::string const column_id1 = "colid1"; - std::string const request_text = R"""( -table_name: "projects/foo-project/instances/bar-instance/tables/baz-table" -row_key: "row-key" -rules { - family_name: "family1" - column_qualifier: "colid1" - append_value: "value1" -} -rules { - family_name: "family1" - column_qualifier: "colid1" - append_value: "-value2" -} -)"""; - - std::string const response_text = R"""( -row { - key: "response-row-key" - families { - name: "response-family1" - columns { - qualifier: "response-colid1" - cells { - value: "value1-value2" - } - } - } -} -)"""; - - auto mock_read_modify_write_row = CreateRules(request_text, response_text); - - EXPECT_CALL(*client_, ReadModifyWriteRow) - .WillOnce(mock_read_modify_write_row); - - auto row = table_.ReadModifyWriteRow( - row_key, - bigtable::ReadModifyWriteRule::AppendValue(family1, column_id1, "value1"), - bigtable::ReadModifyWriteRule::AppendValue(family1, column_id1, - "-value2")); - - ASSERT_STATUS_OK(row); - EXPECT_EQ("response-row-key", row->row_key()); - EXPECT_EQ("response-family1", row->cells().at(0).family_name()); - EXPECT_EQ("response-colid1", row->cells().at(0).column_qualifier()); - EXPECT_EQ(1, (int)row->cells().size()); - EXPECT_EQ("value1-value2", row->cells().at(0).value()); -} - -TEST_F(TableReadModifyWriteTest, MultipleIncrementAmountTest) { - std::string const row_key = "row-key"; - std::string const family1 = "family1"; - std::string const family2 = "family2"; - std::string const column_id1 = "colid1"; - std::string const column_id2 = "colid2"; - std::string const request_text = R"""( - table_name: "projects/foo-project/instances/bar-instance/tables/baz-table" - row_key: "row-key" - rules { - family_name: "family1" - column_qualifier: "colid1" - increment_amount: 1000 - } - rules { - family_name: "family1" - column_qualifier: "colid2" - increment_amount: 200 - } - rules { - family_name: "family2" - column_qualifier: "colid2" - increment_amount: 400 - } - )"""; - - std::string const response_text = R"""( - row { - key: "response-row-key" - families { - name: "response-family1" - columns { - qualifier: "response-colid1" - cells { - value: "1200" - } - } - } - families { - name: "response-family2" - columns { - qualifier: "response-colid2" - cells { - value: "400" - } - } - } - } - )"""; - - auto mock_read_modify_write_row = CreateRules(request_text, response_text); - - EXPECT_CALL(*client_, ReadModifyWriteRow) - .WillOnce(mock_read_modify_write_row); - - auto row = table_.ReadModifyWriteRow( - row_key, - bigtable::ReadModifyWriteRule::IncrementAmount(family1, column_id1, 1000), - bigtable::ReadModifyWriteRule::IncrementAmount(family1, column_id2, 200), - bigtable::ReadModifyWriteRule::IncrementAmount(family2, column_id2, 400)); - - ASSERT_STATUS_OK(row); - EXPECT_EQ("response-row-key", row->row_key()); - EXPECT_EQ("response-family1", row->cells().at(0).family_name()); - EXPECT_EQ("response-colid1", row->cells().at(0).column_qualifier()); - EXPECT_EQ(2, (int)row->cells().size()); - EXPECT_EQ("1200", row->cells().at(0).value()); - - EXPECT_EQ("response-family2", row->cells().at(1).family_name()); - EXPECT_EQ("response-colid2", row->cells().at(1).column_qualifier()); - EXPECT_EQ("400", row->cells().at(1).value()); -} - -TEST_F(TableReadModifyWriteTest, MultipleMixedRuleTest) { - std::string const row_key = "row-key"; - std::string const family1 = "family1"; - std::string const family2 = "family2"; - std::string const column_id1 = "colid1"; - std::string const column_id2 = "colid2"; - std::string const request_text = R"""( - table_name: "projects/foo-project/instances/bar-instance/tables/baz-table" - row_key: "row-key" - rules { - family_name: "family1" - column_qualifier: "colid1" - increment_amount: 1000 - } - rules { - family_name: "family1" - column_qualifier: "colid2" - append_value: "value_string" - } - rules { - family_name: "family2" - column_qualifier: "colid2" - increment_amount: 400 - } - )"""; - - std::string const response_text = R"""( - row { - key: "response-row-key" - families { - name: "response-family1" - columns { - qualifier: "response-colid1" - cells { - value: "1200" - } - } - } - families { - name: "response-family2" - columns { - qualifier: "response-colid2" - cells { - value: "value_string" - } - } - } - } - )"""; - - auto mock_read_modify_write_row = CreateRules(request_text, response_text); - - EXPECT_CALL(*client_, ReadModifyWriteRow) - .WillOnce(mock_read_modify_write_row); - - auto row = table_.ReadModifyWriteRow( - row_key, - bigtable::ReadModifyWriteRule::IncrementAmount(family1, column_id1, 1000), - bigtable::ReadModifyWriteRule::AppendValue(family1, column_id2, - "value_string"), - bigtable::ReadModifyWriteRule::IncrementAmount(family2, column_id2, 400)); - - ASSERT_STATUS_OK(row); - EXPECT_EQ("response-row-key", row->row_key()); - EXPECT_EQ("response-family1", row->cells().at(0).family_name()); - EXPECT_EQ("response-colid1", row->cells().at(0).column_qualifier()); - EXPECT_EQ(2, (int)row->cells().size()); - EXPECT_EQ("1200", row->cells().at(0).value()); - - EXPECT_EQ("response-family2", row->cells().at(1).family_name()); - EXPECT_EQ("response-colid2", row->cells().at(1).column_qualifier()); - EXPECT_EQ("value_string", row->cells().at(1).value()); -} - -TEST_F(TableReadModifyWriteTest, UnrecoverableFailureTest) { - std::string const row_key = "row-key"; - std::string const family1 = "family1"; - std::string const column_id1 = "colid1"; - - EXPECT_CALL(*client_, ReadModifyWriteRow) - .WillRepeatedly( - [](grpc::ClientContext* context, - google::bigtable::v2::ReadModifyWriteRowRequest const& request, - google::bigtable::v2::ReadModifyWriteRowResponse*) { - ::google::cloud::testing_util::ValidateMetadataFixture fixture; - fixture.IsContextMDValid( - *context, "google.bigtable.v2.Bigtable.ReadModifyWriteRow", - request, google::cloud::internal::HandCraftedLibClientHeader()); - return grpc::Status(grpc::StatusCode::PERMISSION_DENIED, "uh oh"); - }); - - EXPECT_FALSE(table_.ReadModifyWriteRow( - row_key, - bigtable::ReadModifyWriteRule::AppendValue(family1, column_id1, "value1"), - bigtable::ReadModifyWriteRule::AppendValue(family1, column_id1, - "-value2"))); -} - -} // anonymous namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/table_readrow_test.cc b/google/cloud/bigtable/table_readrow_test.cc deleted file mode 100644 index f9478e030f833..0000000000000 --- a/google/cloud/bigtable/table_readrow_test.cc +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright 2017 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/table.h" -#include "google/cloud/bigtable/testing/mock_read_rows_reader.h" -#include "google/cloud/bigtable/testing/table_test_fixture.h" -#include "google/cloud/testing_util/status_matchers.h" - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -namespace btproto = ::google::bigtable::v2; -using ::google::cloud::bigtable::testing::MockReadRowsReader; -using ::google::cloud::testing_util::ValidateMetadataFixture; -using ::testing::Return; - -class TableReadRowTest : public bigtable::testing::TableTestFixture { - protected: - TableReadRowTest() : TableTestFixture(CompletionQueue{}) {} - - void IsContextMDValid(grpc::ClientContext& context, std::string const& method, - google::protobuf::Message const& request) { - return validate_metadata_fixture_.IsContextMDValid( - context, method, request, - google::cloud::internal::HandCraftedLibClientHeader()); - } - - private: - ValidateMetadataFixture validate_metadata_fixture_; -}; - -TEST_F(TableReadRowTest, ReadRowSimple) { - auto const response = bigtable::testing::ReadRowsResponseFromString(R"( - chunks { - row_key: "r1" - family_name { value: "fam" } - qualifier { value: "col" } - timestamp_micros: 42000 - value: "value" - commit_row: true - } -)"); - - EXPECT_CALL(*client_, ReadRows) - .WillOnce([&response, this](grpc::ClientContext* context, - btproto::ReadRowsRequest const& req) { - auto stream = std::make_unique( - "google.bigtable.v2.Bigtable.ReadRows"); - EXPECT_CALL(*stream, Read) - .WillOnce([response](btproto::ReadRowsResponse* r) { - *r = response; - return true; - }) - .WillOnce(Return(false)); - EXPECT_CALL(*stream, Finish).WillOnce(Return(grpc::Status::OK)); - - IsContextMDValid(*context, "google.bigtable.v2.Bigtable.ReadRows", req); - EXPECT_EQ(1, req.rows().row_keys_size()); - EXPECT_EQ("r1", req.rows().row_keys(0)); - EXPECT_EQ(1, req.rows_limit()); - EXPECT_EQ(table_.table_name(), req.table_name()); - return stream; - }); - - auto result = table_.ReadRow("r1", bigtable::Filter::PassAllFilter()); - ASSERT_STATUS_OK(result); - EXPECT_TRUE(std::get<0>(*result)); - auto row = std::get<1>(*result); - EXPECT_EQ("r1", row.row_key()); -} - -TEST_F(TableReadRowTest, ReadRowMissing) { - EXPECT_CALL(*client_, ReadRows) - .WillOnce([this](grpc::ClientContext* context, - btproto::ReadRowsRequest const& req) { - auto stream = std::make_unique( - "google.bigtable.v2.Bigtable.ReadRows"); - EXPECT_CALL(*stream, Read).WillOnce(Return(false)); - EXPECT_CALL(*stream, Finish).WillOnce(Return(grpc::Status::OK)); - - IsContextMDValid(*context, "google.bigtable.v2.Bigtable.ReadRows", req); - EXPECT_EQ(1, req.rows().row_keys_size()); - EXPECT_EQ("r1", req.rows().row_keys(0)); - EXPECT_EQ(1, req.rows_limit()); - EXPECT_EQ(table_.table_name(), req.table_name()); - return stream; - }); - - auto result = table_.ReadRow("r1", bigtable::Filter::PassAllFilter()); - ASSERT_STATUS_OK(result); - EXPECT_FALSE(std::get<0>(*result)); -} - -TEST_F(TableReadRowTest, UnrecoverableFailure) { - EXPECT_CALL(*client_, ReadRows) - .WillRepeatedly([this](grpc::ClientContext* context, - btproto::ReadRowsRequest const& request) { - auto stream = std::make_unique( - "google.bigtable.v2.Bigtable.ReadRows"); - EXPECT_CALL(*stream, Read).WillRepeatedly(Return(false)); - EXPECT_CALL(*stream, Finish) - .WillRepeatedly(Return( - grpc::Status(grpc::StatusCode::PERMISSION_DENIED, "uh oh"))); - - IsContextMDValid(*context, "google.bigtable.v2.Bigtable.ReadRows", - request); - return stream; - }); - - auto row = table_.ReadRow("r1", bigtable::Filter::PassAllFilter()); - EXPECT_FALSE(row); -} - -} // anonymous namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/table_readrows_test.cc b/google/cloud/bigtable/table_readrows_test.cc deleted file mode 100644 index 1b9427d47c303..0000000000000 --- a/google/cloud/bigtable/table_readrows_test.cc +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright 2017 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/table.h" -#include "google/cloud/bigtable/testing/mock_read_rows_reader.h" -#include "google/cloud/bigtable/testing/table_test_fixture.h" -#include "google/cloud/testing_util/status_matchers.h" - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -using ::google::cloud::bigtable::testing::MockReadRowsReader; -using ::testing::DoAll; -using ::testing::Return; -using ::testing::SetArgPointee; -using ::testing::WithoutArgs; - -class TableReadRowsTest : public bigtable::testing::TableTestFixture { - public: - TableReadRowsTest() : TableTestFixture(CompletionQueue{}) {} -}; - -TEST_F(TableReadRowsTest, ReadRowsCanReadOneRow) { - auto response = bigtable::testing::ReadRowsResponseFromString(R"( - chunks { - row_key: "r1" - family_name { value: "fam" } - qualifier { value: "qual" } - timestamp_micros: 42000 - value: "value" - commit_row: true - } - )"); - - // must be a new pointer, it is wrapped in unique_ptr by ReadRows - auto* stream = new MockReadRowsReader("google.bigtable.v2.Bigtable.ReadRows"); - EXPECT_CALL(*stream, Read) - .WillOnce(DoAll(SetArgPointee<0>(response), Return(true))) - .WillOnce(Return(false)); - EXPECT_CALL(*stream, Finish()).WillOnce(Return(grpc::Status::OK)); - EXPECT_CALL(*client_, ReadRows).WillOnce(stream->MakeMockReturner()); - - auto reader = - table_.ReadRows(bigtable::RowSet(), bigtable::Filter::PassAllFilter()); - - auto it = reader.begin(); - EXPECT_NE(it, reader.end()); - ASSERT_STATUS_OK(*it); - EXPECT_EQ((*it)->row_key(), "r1"); - EXPECT_EQ(++it, reader.end()); -} - -TEST_F(TableReadRowsTest, ReadRowsCanReadWithRetries) { - auto response = bigtable::testing::ReadRowsResponseFromString(R"( - chunks { - row_key: "r1" - family_name { value: "fam" } - qualifier { value: "qual" } - timestamp_micros: 42000 - value: "value" - commit_row: true - } - )"); - - auto response_retry = bigtable::testing::ReadRowsResponseFromString(R"( - chunks { - row_key: "r2" - family_name { value: "fam" } - qualifier { value: "qual" } - timestamp_micros: 42000 - value: "value" - commit_row: true - } - )"); - - // must be a new pointer, it is wrapped in unique_ptr by ReadRows - auto* stream = new MockReadRowsReader("google.bigtable.v2.Bigtable.ReadRows"); - auto* stream_retry = - new MockReadRowsReader("google.bigtable.v2.Bigtable.ReadRows"); - - EXPECT_CALL(*client_, ReadRows) - .WillOnce(stream->MakeMockReturner()) - .WillOnce(stream_retry->MakeMockReturner()); - - EXPECT_CALL(*stream, Read) - .WillOnce(DoAll(SetArgPointee<0>(response), Return(true))) - .WillOnce(Return(false)); - - EXPECT_CALL(*stream, Finish()) - .WillOnce( - Return(grpc::Status(grpc::StatusCode::UNAVAILABLE, "try-again"))); - - EXPECT_CALL(*stream_retry, Read) - .WillOnce(DoAll(SetArgPointee<0>(response_retry), Return(true))) - .WillOnce(Return(false)); - - EXPECT_CALL(*stream_retry, Finish()).WillOnce(Return(grpc::Status::OK)); - - auto reader = - table_.ReadRows(bigtable::RowSet(), bigtable::Filter::PassAllFilter()); - - auto it = reader.begin(); - EXPECT_NE(it, reader.end()); - ASSERT_STATUS_OK(*it); - EXPECT_EQ((*it)->row_key(), "r1"); - ++it; - EXPECT_NE(it, reader.end()); - ASSERT_STATUS_OK(*it); - EXPECT_EQ((*it)->row_key(), "r2"); - EXPECT_EQ(++it, reader.end()); -} - -TEST_F(TableReadRowsTest, ReadRowsThrowsWhenTooManyErrors) { - EXPECT_CALL(*client_, ReadRows).WillRepeatedly(WithoutArgs([] { - auto stream = std::make_unique( - "google.bigtable.v2.Bigtable.ReadRows"); - EXPECT_CALL(*stream, Read).WillOnce(Return(false)); - EXPECT_CALL(*stream, Finish()) - .WillOnce( - Return(grpc::Status(grpc::StatusCode::UNAVAILABLE, "broken"))); - return stream; - })); - - auto table = bigtable::Table( - client_, "table_id", bigtable::LimitedErrorCountRetryPolicy(3), - bigtable::ExponentialBackoffPolicy(std::chrono::seconds(0), - std::chrono::seconds(0)), - bigtable::SafeIdempotentMutationPolicy()); - auto reader = - table.ReadRows(bigtable::RowSet(), bigtable::Filter::PassAllFilter()); - - auto it = reader.begin(); - ASSERT_NE(reader.end(), it); - ASSERT_FALSE(*it); - ++it; - ASSERT_EQ(reader.end(), it); -} - -} // anonymous namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/table_sample_row_keys_test.cc b/google/cloud/bigtable/table_sample_row_keys_test.cc deleted file mode 100644 index 77cb019d3ee2f..0000000000000 --- a/google/cloud/bigtable/table_sample_row_keys_test.cc +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/table.h" -#include "google/cloud/bigtable/testing/mock_sample_row_keys_reader.h" -#include "google/cloud/bigtable/testing/table_test_fixture.h" -#include "google/cloud/testing_util/chrono_literals.h" -#include "google/cloud/testing_util/status_matchers.h" -#include - -namespace google { -namespace cloud { -namespace bigtable { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -using ::google::cloud::testing_util::chrono_literals::operator""_us; -using ::google::cloud::bigtable::testing::MockSampleRowKeysReader; -using ::testing::Return; -using ::testing::Unused; - -class TableSampleRowKeysTest - : public ::google::cloud::bigtable::testing::TableTestFixture { - public: - TableSampleRowKeysTest() : TableTestFixture(CompletionQueue{}) {} -}; - -/// @test Verify that Table::SampleRows() works. -TEST_F(TableSampleRowKeysTest, SampleRowKeysTest) { - namespace btproto = ::google::bigtable::v2; - - EXPECT_CALL(*client_, SampleRowKeys).WillOnce([](Unused, Unused) { - auto reader = std::make_unique( - "google.bigtable.v2.Bigtable.SampleRowKeys"); - EXPECT_CALL(*reader, Read) - .WillOnce([](btproto::SampleRowKeysResponse* r) { - { - r->set_row_key("test1"); - r->set_offset_bytes(11); - } - return true; - }) - .WillOnce(Return(false)); - EXPECT_CALL(*reader, Finish).WillOnce(Return(grpc::Status::OK)); - return reader; - }); - auto result = table_.SampleRows(); - ASSERT_STATUS_OK(result); - auto it = result->begin(); - EXPECT_NE(it, result->end()); - EXPECT_EQ(it->row_key, "test1"); - EXPECT_EQ(it->offset_bytes, 11); - EXPECT_EQ(++it, result->end()); -} - -/// @test Verify that Table::SampleRows() retries when unavailable. -TEST_F(TableSampleRowKeysTest, SampleRowKeysRetryTest) { - namespace btproto = ::google::bigtable::v2; - - EXPECT_CALL(*client_, SampleRowKeys) - .WillOnce([](Unused, Unused) { - auto reader = std::make_unique( - "google.bigtable.v2.Bigtable.SampleRowKeys"); - EXPECT_CALL(*reader, Read) - .WillOnce([](btproto::SampleRowKeysResponse* r) { - { - r->set_row_key("test1"); - r->set_offset_bytes(11); - } - return true; - }) - .WillOnce(Return(false)); - - EXPECT_CALL(*reader, Finish()) - .WillOnce(Return( - grpc::Status(grpc::StatusCode::UNAVAILABLE, "try-again"))); - return reader; - }) - .WillOnce([](Unused, Unused) { - auto reader_retry = std::make_unique( - "google.bigtable.v2.Bigtable.SampleRowKeys"); - EXPECT_CALL(*reader_retry, Read) - .WillOnce([](btproto::SampleRowKeysResponse* r) { - { - r->set_row_key("test2"); - r->set_offset_bytes(123); - } - return true; - }) - .WillOnce([](btproto::SampleRowKeysResponse* r) { - { - r->set_row_key("test3"); - r->set_offset_bytes(1234); - } - return true; - }) - .WillOnce(Return(false)); - - EXPECT_CALL(*reader_retry, Finish()).WillOnce(Return(grpc::Status::OK)); - return reader_retry; - }); - - auto results = table_.SampleRows(); - ASSERT_STATUS_OK(results); - - auto it = results->begin(); - EXPECT_NE(it, results->end()); - EXPECT_EQ("test2", it->row_key); - ++it; - EXPECT_NE(it, results->end()); - EXPECT_EQ("test3", it->row_key); - EXPECT_EQ(++it, results->end()); -} - -#if GOOGLE_CLOUD_CPP_HAVE_EXCEPTIONS -/// @test Verify that Table::SampleRows() reports correctly on too many errors. -TEST_F(TableSampleRowKeysTest, TooManyFailures) { - namespace btproto = ::google::bigtable::v2; - - // Create a table with specific policies so we can test the behavior - // without having to depend on timers expiring. In this case tolerate only - // 3 failures. - Table custom_table( - client_, "foo_table", - // Configure the Table to stop at 3 failures. - LimitedErrorCountRetryPolicy(2), - // Use much shorter backoff than the default to test faster. - ExponentialBackoffPolicy(10_us, 40_us), SafeIdempotentMutationPolicy()); - - // Setup the mocks to fail more than 3 times. - auto create_cancelled_stream = [](Unused, Unused) { - auto stream = std::make_unique( - "google.bigtable.v2.Bigtable.SampleRowKeys"); - EXPECT_CALL(*stream, Read).WillOnce(Return(false)); - EXPECT_CALL(*stream, Finish) - .WillOnce(Return(grpc::Status(grpc::StatusCode::ABORTED, ""))); - return stream; - }; - - EXPECT_CALL(*client_, SampleRowKeys) - .WillOnce([](Unused, Unused) { - auto r1 = std::make_unique( - "google.bigtable.v2.Bigtable.SampleRowKeys"); - EXPECT_CALL(*r1, Read) - .WillOnce([](btproto::SampleRowKeysResponse* r) { - { - r->set_row_key("test1"); - r->set_offset_bytes(11); - } - return true; - }) - .WillOnce(Return(false)); - EXPECT_CALL(*r1, Finish) - .WillOnce(Return(grpc::Status(grpc::StatusCode::ABORTED, ""))); - return r1; - }) - .WillOnce(create_cancelled_stream) - .WillOnce(create_cancelled_stream); - - EXPECT_FALSE(custom_table.SampleRows()); -} -#endif // GOOGLE_CLOUD_CPP_HAVE_EXCEPTIONS - -} // namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/table_test.cc b/google/cloud/bigtable/table_test.cc index 70c578b16fbdf..965e239e4481b 100644 --- a/google/cloud/bigtable/table_test.cc +++ b/google/cloud/bigtable/table_test.cc @@ -178,6 +178,55 @@ TEST(TableTest, AppProfileId) { EXPECT_EQ(kAppProfileId, table.app_profile_id()); } +TEST(TableTest, WithNewTarget) { + auto conn = std::make_shared(); + Table table(conn, TableResource(kProjectId, kInstanceId, kTableId), + Options{}.set(kAppProfileId)); + EXPECT_EQ(table.project_id(), kProjectId); + EXPECT_EQ(table.instance_id(), kInstanceId); + EXPECT_EQ(table.table_id(), kTableId); + EXPECT_EQ(table.table_name(), kTableName); + EXPECT_EQ(table.app_profile_id(), kAppProfileId); + + std::string const other_project_id = "other-project"; + std::string const other_instance_id = "other-instance"; + std::string const other_table_id = "other-table"; + auto other_table = + table.WithNewTarget(other_project_id, other_instance_id, other_table_id); + + EXPECT_EQ(other_table.project_id(), other_project_id); + EXPECT_EQ(other_table.instance_id(), other_instance_id); + EXPECT_EQ(other_table.table_id(), other_table_id); + EXPECT_EQ(other_table.table_name(), + TableName(other_project_id, other_instance_id, other_table_id)); + EXPECT_EQ(other_table.app_profile_id(), kAppProfileId); +} + +TEST(TableTest, WithNewTargetProfile) { + auto conn = std::make_shared(); + Table table(conn, TableResource(kProjectId, kInstanceId, kTableId), + Options{}.set(kAppProfileId)); + EXPECT_EQ(table.project_id(), kProjectId); + EXPECT_EQ(table.instance_id(), kInstanceId); + EXPECT_EQ(table.table_id(), kTableId); + EXPECT_EQ(table.table_name(), kTableName); + EXPECT_EQ(table.app_profile_id(), kAppProfileId); + + std::string const other_project_id = "other-project"; + std::string const other_instance_id = "other-instance"; + std::string const other_table_id = "other-table"; + std::string const other_profile_id = "other-profile"; + auto other_table = table.WithNewTarget(other_project_id, other_instance_id, + other_profile_id, other_table_id); + + EXPECT_EQ(other_table.project_id(), other_project_id); + EXPECT_EQ(other_table.instance_id(), other_instance_id); + EXPECT_EQ(other_table.table_id(), other_table_id); + EXPECT_EQ(other_table.table_name(), + TableName(other_project_id, other_instance_id, other_table_id)); + EXPECT_EQ(other_table.app_profile_id(), other_profile_id); +} + TEST(TableTest, Apply) { auto mock = std::make_shared(); EXPECT_CALL(*mock, Apply) diff --git a/google/cloud/bigtable/test_proxy/BUILD.bazel b/google/cloud/bigtable/test_proxy/BUILD.bazel index c3b6490e7da97..a2edf7ee5f91c 100644 --- a/google/cloud/bigtable/test_proxy/BUILD.bazel +++ b/google/cloud/bigtable/test_proxy/BUILD.bazel @@ -24,7 +24,7 @@ cc_library( hdrs = ["cbt_test_proxy.h"], deps = [ "//:bigtable", - "//protos:system_includes", + # "//protos:system_includes", "//protos/google/cloud/bigtable/test_proxy:test_proxy_cc_grpc", "//protos/google/cloud/bigtable/test_proxy:test_proxy_cc_proto", ], diff --git a/google/cloud/bigtable/test_proxy/cbt_test_proxy.cc b/google/cloud/bigtable/test_proxy/cbt_test_proxy.cc index 0a390eaee1528..601eca6e33f00 100644 --- a/google/cloud/bigtable/test_proxy/cbt_test_proxy.cc +++ b/google/cloud/bigtable/test_proxy/cbt_test_proxy.cc @@ -18,10 +18,10 @@ #include "google/cloud/bigtable/idempotent_mutation_policy.h" #include "google/cloud/bigtable/mutations.h" #include "google/cloud/bigtable/table.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/log.h" #include "google/cloud/status.h" +#include "absl/strings/str_cat.h" #include "absl/time/time.h" #include #include diff --git a/google/cloud/bigtable/test_proxy/cbt_test_proxy.h b/google/cloud/bigtable/test_proxy/cbt_test_proxy.h index 31295b29fdf52..6d3bc39fed60f 100644 --- a/google/cloud/bigtable/test_proxy/cbt_test_proxy.h +++ b/google/cloud/bigtable/test_proxy/cbt_test_proxy.h @@ -17,8 +17,9 @@ #include "google/cloud/bigtable/data_connection.h" #include "google/cloud/bigtable/table.h" +#include "google/cloud/grpc_options.h" #include "google/cloud/version.h" -#include +#include "protos/google/cloud/bigtable/test_proxy/test_proxy.grpc.pb.h" #include #include #include diff --git a/google/cloud/bigtable/test_proxy/cbt_test_proxy_main.cc b/google/cloud/bigtable/test_proxy/cbt_test_proxy_main.cc index 9572a8216a91f..e312b59ffff2b 100644 --- a/google/cloud/bigtable/test_proxy/cbt_test_proxy_main.cc +++ b/google/cloud/bigtable/test_proxy/cbt_test_proxy_main.cc @@ -15,8 +15,8 @@ // Runs the CloudBigtableTestProxy as a server. #include "google/cloud/bigtable/test_proxy/cbt_test_proxy.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/log.h" +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/bigtable/testing/embedded_server_test_fixture.cc b/google/cloud/bigtable/testing/embedded_server_test_fixture.cc index 5186db9eabcb1..3d8967ae186e3 100644 --- a/google/cloud/bigtable/testing/embedded_server_test_fixture.cc +++ b/google/cloud/bigtable/testing/embedded_server_test_fixture.cc @@ -13,7 +13,14 @@ // limitations under the License. #include "google/cloud/bigtable/testing/embedded_server_test_fixture.h" +#include "google/cloud/bigtable/internal/bigtable_metadata_decorator.h" +#include "google/cloud/bigtable/internal/bigtable_stub.h" +#include "google/cloud/bigtable/internal/data_connection_impl.h" +#include "google/cloud/bigtable/internal/mutate_rows_limiter.h" +#include "google/cloud/bigtable/options.h" +#include "google/cloud/bigtable/retry_policy.h" #include "google/cloud/grpc_error_delegate.h" +#include "google/cloud/internal/background_threads_impl.h" #include "google/cloud/internal/build_info.h" #include "google/cloud/internal/user_agent_prefix.h" #include @@ -53,9 +60,34 @@ void EmbeddedServerTestFixture::SetUp() { std::shared_ptr data_channel = server_->InProcessChannel(channel_arguments); - data_client_ = std::make_shared(kProjectId, kInstanceId, - std::move(data_channel)); - table_ = std::make_shared(data_client_, kTableId); + std::unique_ptr grpc_stub = + google::bigtable::v2::Bigtable::NewStub(data_channel); + std::shared_ptr stub = + std::make_shared( + std::make_shared( + std::move(grpc_stub)), + std::multimap{}, + google::cloud::internal::UserAgentPrefix()); + auto opts = + Options{} + .set( + google::cloud::bigtable::DataLimitedErrorCountRetryPolicy(7) + .clone()) + .set( + google::cloud::ExponentialBackoffPolicy( + /*initial_delay=*/std::chrono::milliseconds(200), + /*maximum_delay=*/std::chrono::seconds(45), + /*scaling=*/2.0) + .clone()); + data_connection_ = std::make_shared( + std::make_unique< + google::cloud::internal::AutomaticallyCreatedBackgroundThreads>(), + stub, std::make_shared(), + std::move(opts)); + + table_ = std::make_shared( + data_connection_, + bigtable::TableResource(kProjectId, kInstanceId, kTableId)); } void EmbeddedServerTestFixture::TearDown() { diff --git a/google/cloud/bigtable/testing/embedded_server_test_fixture.h b/google/cloud/bigtable/testing/embedded_server_test_fixture.h index 850da273b7991..85908653c1398 100644 --- a/google/cloud/bigtable/testing/embedded_server_test_fixture.h +++ b/google/cloud/bigtable/testing/embedded_server_test_fixture.h @@ -16,9 +16,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_TESTING_EMBEDDED_SERVER_TEST_FIXTURE_H #include "google/cloud/bigtable/table.h" -#include "google/cloud/bigtable/table_admin.h" -#include "google/cloud/bigtable/testing/inprocess_data_client.h" -#include +#include "google/bigtable/v2/bigtable.grpc.pb.h" #include #include #include @@ -79,7 +77,7 @@ class EmbeddedServerTestFixture : public ::testing::Test { std::string project_id_ = kProjectId; std::string instance_id_ = kInstanceId; - std::shared_ptr data_client_; + std::shared_ptr data_connection_; std::shared_ptr table_; std::thread wait_thread_; BigtableImpl bigtable_service_; diff --git a/google/cloud/bigtable/testing/inprocess_data_client.cc b/google/cloud/bigtable/testing/inprocess_data_client.cc deleted file mode 100644 index 2b40012ec8ae4..0000000000000 --- a/google/cloud/bigtable/testing/inprocess_data_client.cc +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/testing/inprocess_data_client.h" - -namespace google { -namespace cloud { -namespace bigtable { -namespace testing { - -namespace btproto = ::google::bigtable::v2; - -grpc::Status InProcessDataClient::MutateRow( - grpc::ClientContext* context, btproto::MutateRowRequest const& request, - btproto::MutateRowResponse* response) { - return Stub()->MutateRow(context, request, response); -} - -std::unique_ptr> -InProcessDataClient::AsyncMutateRow( - grpc::ClientContext* context, - google::bigtable::v2::MutateRowRequest const& request, - grpc::CompletionQueue* cq) { - auto result = Stub()->AsyncMutateRow(context, request, cq); - return std::unique_ptr>(result.release()); -} - -grpc::Status InProcessDataClient::CheckAndMutateRow( - grpc::ClientContext* context, - btproto::CheckAndMutateRowRequest const& request, - btproto::CheckAndMutateRowResponse* response) { - return Stub()->CheckAndMutateRow(context, request, response); -} - -std::unique_ptr> -InProcessDataClient::AsyncCheckAndMutateRow( - grpc::ClientContext* context, - google::bigtable::v2::CheckAndMutateRowRequest const& request, - grpc::CompletionQueue* cq) { - auto result = Stub()->AsyncCheckAndMutateRow(context, request, cq); - return std::unique_ptr>(result.release()); -} - -grpc::Status InProcessDataClient::ReadModifyWriteRow( - grpc::ClientContext* context, - btproto::ReadModifyWriteRowRequest const& request, - btproto::ReadModifyWriteRowResponse* response) { - return Stub()->ReadModifyWriteRow(context, request, response); -} - -std::unique_ptr> -InProcessDataClient::AsyncReadModifyWriteRow( - grpc::ClientContext* context, - google::bigtable::v2::ReadModifyWriteRowRequest const& request, - grpc::CompletionQueue* cq) { - auto result = Stub()->AsyncReadModifyWriteRow(context, request, cq); - return std::unique_ptr>(result.release()); -} - -std::unique_ptr> -InProcessDataClient::ReadRows(grpc::ClientContext* context, - btproto::ReadRowsRequest const& request) { - return Stub()->ReadRows(context, request); -} - -std::unique_ptr<::grpc::ClientAsyncReaderInterface> -InProcessDataClient::AsyncReadRows(::grpc::ClientContext* context, - btproto::ReadRowsRequest const& request, - ::grpc::CompletionQueue* cq, void* tag) { - return Stub()->AsyncReadRows(context, request, cq, tag); -} - -std::unique_ptr<::grpc::ClientAsyncReaderInterface< - ::google::bigtable::v2::ReadRowsResponse>> -InProcessDataClient::PrepareAsyncReadRows( - ::grpc::ClientContext* context, - ::google::bigtable::v2::ReadRowsRequest const& request, - ::grpc::CompletionQueue* cq) { - return Stub()->PrepareAsyncReadRows(context, request, cq); -} - -std::unique_ptr> -InProcessDataClient::SampleRowKeys( - grpc::ClientContext* context, - btproto::SampleRowKeysRequest const& request) { - return Stub()->SampleRowKeys(context, request); -} - -std::unique_ptr> -InProcessDataClient::MutateRows(grpc::ClientContext* context, - btproto::MutateRowsRequest const& request) { - return Stub()->MutateRows(context, request); -} - -std::unique_ptr<::grpc::ClientAsyncReaderInterface< - ::google::bigtable::v2::MutateRowsResponse>> -InProcessDataClient::AsyncMutateRows( - ::grpc::ClientContext* context, - ::google::bigtable::v2::MutateRowsRequest const& request, - ::grpc::CompletionQueue* cq, void* tag) { - return Stub()->AsyncMutateRows(context, request, cq, tag); -} - -std::unique_ptr<::grpc::ClientAsyncReaderInterface< - ::google::bigtable::v2::MutateRowsResponse>> -InProcessDataClient::PrepareAsyncMutateRows( - ::grpc::ClientContext* context, - ::google::bigtable::v2::MutateRowsRequest const& request, - ::grpc::CompletionQueue* cq) { - return Stub()->PrepareAsyncMutateRows(context, request, cq); -} - -std::unique_ptr<::grpc::ClientAsyncReaderInterface< - ::google::bigtable::v2::SampleRowKeysResponse>> -InProcessDataClient::AsyncSampleRowKeys( - ::grpc::ClientContext* context, - ::google::bigtable::v2::SampleRowKeysRequest const& request, - ::grpc::CompletionQueue* cq, void* tag) { - return Stub()->AsyncSampleRowKeys(context, request, cq, tag); -} - -std::unique_ptr<::grpc::ClientAsyncReaderInterface< - ::google::bigtable::v2::SampleRowKeysResponse>> -InProcessDataClient::PrepareAsyncSampleRowKeys( - ::grpc::ClientContext* context, - ::google::bigtable::v2::SampleRowKeysRequest const& request, - ::grpc::CompletionQueue* cq) { - return Stub()->PrepareAsyncSampleRowKeys(context, request, cq); -} - -} // namespace testing -} // namespace bigtable -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/testing/inprocess_data_client.h b/google/cloud/bigtable/testing/inprocess_data_client.h deleted file mode 100644 index fd122d2f96489..0000000000000 --- a/google/cloud/bigtable/testing/inprocess_data_client.h +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_TESTING_INPROCESS_DATA_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_TESTING_INPROCESS_DATA_CLIENT_H - -#include "google/cloud/bigtable/data_client.h" -#include -#include -// TODO(#8800) - delete this class when deprecation is complete -#include "google/cloud/internal/disable_deprecation_warnings.inc" - -namespace google { -namespace cloud { -namespace bigtable { -namespace testing { - -/** - * Connect to an embedded Cloud Bigtable server implementing the data - * manipulation APIs. - * - * This class is mainly for testing purpose, it enable use of a single embedded - * server for multiple test cases. This dataclient uses a pre-defined channel. - */ -class InProcessDataClient : public bigtable::DataClient { - public: - InProcessDataClient(std::string project, std::string instance, - std::shared_ptr channel) - : project_(std::move(project)), - instance_(std::move(instance)), - channel_(std::move(channel)) {} - - using BigtableStubPtr = - std::shared_ptr; - - std::string const& project_id() const override { return project_; } - std::string const& instance_id() const override { return instance_; } - std::shared_ptr Channel() override { return channel_; } - void reset() override {} - - std::unique_ptr Stub() { - return google::bigtable::v2::Bigtable::NewStub(Channel()); - } - - ///@{ - /// @name the google.bigtable.v2.Bigtable operations. - grpc::Status MutateRow( - grpc::ClientContext* context, - google::bigtable::v2::MutateRowRequest const& request, - google::bigtable::v2::MutateRowResponse* response) override; - std::unique_ptr> - AsyncMutateRow(grpc::ClientContext* context, - google::bigtable::v2::MutateRowRequest const& request, - grpc::CompletionQueue* cq) override; - grpc::Status CheckAndMutateRow( - grpc::ClientContext* context, - google::bigtable::v2::CheckAndMutateRowRequest const& request, - google::bigtable::v2::CheckAndMutateRowResponse* response) override; - std::unique_ptr> - AsyncCheckAndMutateRow( - grpc::ClientContext* context, - google::bigtable::v2::CheckAndMutateRowRequest const& request, - grpc::CompletionQueue* cq) override; - grpc::Status ReadModifyWriteRow( - grpc::ClientContext* context, - google::bigtable::v2::ReadModifyWriteRowRequest const& request, - google::bigtable::v2::ReadModifyWriteRowResponse* response) override; - std::unique_ptr> - AsyncReadModifyWriteRow( - grpc::ClientContext* context, - google::bigtable::v2::ReadModifyWriteRowRequest const& request, - grpc::CompletionQueue* cq) override; - std::unique_ptr< - grpc::ClientReaderInterface> - ReadRows(grpc::ClientContext* context, - google::bigtable::v2::ReadRowsRequest const& request) override; - std::unique_ptr<::grpc::ClientAsyncReaderInterface< - ::google::bigtable::v2::ReadRowsResponse>> - AsyncReadRows(::grpc::ClientContext* context, - ::google::bigtable::v2::ReadRowsRequest const& request, - ::grpc::CompletionQueue* cq, void* tag) override; - std::unique_ptr<::grpc::ClientAsyncReaderInterface< - ::google::bigtable::v2::ReadRowsResponse>> - PrepareAsyncReadRows(::grpc::ClientContext* context, - ::google::bigtable::v2::ReadRowsRequest const& request, - ::grpc::CompletionQueue* cq) override; - std::unique_ptr< - grpc::ClientReaderInterface> - SampleRowKeys( - grpc::ClientContext* context, - google::bigtable::v2::SampleRowKeysRequest const& request) override; - std::unique_ptr<::grpc::ClientAsyncReaderInterface< - ::google::bigtable::v2::SampleRowKeysResponse>> - AsyncSampleRowKeys( - ::grpc::ClientContext* context, - ::google::bigtable::v2::SampleRowKeysRequest const& request, - ::grpc::CompletionQueue* cq, void* tag) override; - std::unique_ptr<::grpc::ClientAsyncReaderInterface< - ::google::bigtable::v2::SampleRowKeysResponse>> - PrepareAsyncSampleRowKeys( - ::grpc::ClientContext* context, - ::google::bigtable::v2::SampleRowKeysRequest const& request, - ::grpc::CompletionQueue* cq) override; - std::unique_ptr< - grpc::ClientReaderInterface> - MutateRows(grpc::ClientContext* context, - google::bigtable::v2::MutateRowsRequest const& request) override; - - std::unique_ptr<::grpc::ClientAsyncReaderInterface< - ::google::bigtable::v2::MutateRowsResponse>> - AsyncMutateRows(::grpc::ClientContext* context, - ::google::bigtable::v2::MutateRowsRequest const& request, - ::grpc::CompletionQueue* cq, void* tag) override; - - std::unique_ptr<::grpc::ClientAsyncReaderInterface< - ::google::bigtable::v2::MutateRowsResponse>> - PrepareAsyncMutateRows( - ::grpc::ClientContext* context, - ::google::bigtable::v2::MutateRowsRequest const& request, - ::grpc::CompletionQueue* cq) override; - ///@} - - private: - google::cloud::BackgroundThreadsFactory BackgroundThreadsFactory() override { - return google::cloud::internal::MakeBackgroundThreadsFactory(); - } - - std::string project_; - std::string instance_; - std::shared_ptr channel_; -}; - -} // namespace testing -} // namespace bigtable -} // namespace cloud -} // namespace google - -// TODO(#8800) - delete this class when deprecation is complete -#include "google/cloud/internal/diagnostics_pop.inc" - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_TESTING_INPROCESS_DATA_CLIENT_H diff --git a/google/cloud/bigtable/testing/mock_data_client.h b/google/cloud/bigtable/testing/mock_data_client.h deleted file mode 100644 index 0a53659246428..0000000000000 --- a/google/cloud/bigtable/testing/mock_data_client.h +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright 2017 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_TESTING_MOCK_DATA_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_TESTING_MOCK_DATA_CLIENT_H - -#include "google/cloud/bigtable/table.h" -#include -#include -// TODO(#8800) - delete this class when deprecation is complete -#include "google/cloud/internal/disable_deprecation_warnings.inc" - -namespace google { -namespace cloud { -namespace bigtable { -namespace testing { - -class MockDataClient : public bigtable::DataClient { - public: - MockDataClient() = default; - - explicit MockDataClient(Options options) : options_(std::move(options)) {} - - /// @deprecated use constructor that takes `google::cloud::Options` - explicit MockDataClient(ClientOptions options) - : options_(internal::MakeOptions(std::move(options))) {} - - MOCK_METHOD(std::string const&, project_id, (), (const, override)); - MOCK_METHOD(std::string const&, instance_id, (), (const, override)); - MOCK_METHOD(std::shared_ptr, Channel, (), (override)); - MOCK_METHOD(void, reset, (), (override)); - - MOCK_METHOD(grpc::Status, MutateRow, - (grpc::ClientContext*, - google::bigtable::v2::MutateRowRequest const&, - google::bigtable::v2::MutateRowResponse*), - (override)); - MOCK_METHOD(std::unique_ptr>, - AsyncMutateRow, - (grpc::ClientContext*, - google::bigtable::v2::MutateRowRequest const&, - grpc::CompletionQueue*), - (override)); - MOCK_METHOD(grpc::Status, CheckAndMutateRow, - (grpc::ClientContext*, - google::bigtable::v2::CheckAndMutateRowRequest const&, - google::bigtable::v2::CheckAndMutateRowResponse*), - (override)); - MOCK_METHOD(std::unique_ptr>, - AsyncCheckAndMutateRow, - (grpc::ClientContext*, - google::bigtable::v2::CheckAndMutateRowRequest const&, - grpc::CompletionQueue*), - (override)); - MOCK_METHOD(grpc::Status, ReadModifyWriteRow, - (grpc::ClientContext*, - google::bigtable::v2::ReadModifyWriteRowRequest const&, - google::bigtable::v2::ReadModifyWriteRowResponse*), - (override)); - MOCK_METHOD(std::unique_ptr>, - AsyncReadModifyWriteRow, - (grpc::ClientContext*, - google::bigtable::v2::ReadModifyWriteRowRequest const&, - grpc::CompletionQueue*), - (override)); - MOCK_METHOD( - std::unique_ptr< - grpc::ClientReaderInterface>, - ReadRows, - (grpc::ClientContext*, google::bigtable::v2::ReadRowsRequest const&), - (override)); - MOCK_METHOD(std::unique_ptr>, - AsyncReadRows, - (grpc::ClientContext*, - google::bigtable::v2::ReadRowsRequest const&, - grpc::CompletionQueue*, void*), - (override)); - MOCK_METHOD(std::unique_ptr<::grpc::ClientAsyncReaderInterface< - ::google::bigtable::v2::ReadRowsResponse>>, - PrepareAsyncReadRows, - (::grpc::ClientContext*, - ::google::bigtable::v2::ReadRowsRequest const&, - ::grpc::CompletionQueue*), - (override)); - MOCK_METHOD(std::unique_ptr>, - SampleRowKeys, - (grpc::ClientContext*, - google::bigtable::v2::SampleRowKeysRequest const&), - (override)); - MOCK_METHOD(std::unique_ptr>, - AsyncSampleRowKeys, - (grpc::ClientContext*, - google::bigtable::v2::SampleRowKeysRequest const&, - grpc::CompletionQueue*, void*), - (override)); - MOCK_METHOD(std::unique_ptr>, - PrepareAsyncSampleRowKeys, - (grpc::ClientContext*, - google::bigtable::v2::SampleRowKeysRequest const&, - grpc::CompletionQueue*), - (override)); - MOCK_METHOD(std::unique_ptr>, - MutateRows, - (grpc::ClientContext*, - google::bigtable::v2::MutateRowsRequest const&), - (override)); - MOCK_METHOD(std::unique_ptr>, - AsyncMutateRows, - (grpc::ClientContext*, - google::bigtable::v2::MutateRowsRequest const&, - grpc::CompletionQueue*, void*), - (override)); - MOCK_METHOD(std::unique_ptr>, - PrepareAsyncMutateRows, - (grpc::ClientContext*, - google::bigtable::v2::MutateRowsRequest const&, - grpc::CompletionQueue*), - (override)); - - private: - google::cloud::BackgroundThreadsFactory BackgroundThreadsFactory() override { - return google::cloud::internal::MakeBackgroundThreadsFactory(options_); - } - - Options options_; -}; - -} // namespace testing -} // namespace bigtable -} // namespace cloud -} // namespace google - -// TODO(#8800) - delete this class when deprecation is complete -#include "google/cloud/internal/diagnostics_pop.inc" - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_TESTING_MOCK_DATA_CLIENT_H diff --git a/google/cloud/bigtable/testing/mock_mutate_rows_limiter.h b/google/cloud/bigtable/testing/mock_mutate_rows_limiter.h index c074cf3699cc5..b24c91c381b6d 100644 --- a/google/cloud/bigtable/testing/mock_mutate_rows_limiter.h +++ b/google/cloud/bigtable/testing/mock_mutate_rows_limiter.h @@ -16,7 +16,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_TESTING_MOCK_MUTATE_ROWS_LIMITER_H #include "google/cloud/bigtable/internal/mutate_rows_limiter.h" -#include +#include "google/bigtable/v2/bigtable.pb.h" #include namespace google { diff --git a/google/cloud/bigtable/testing/mock_mutate_rows_reader.h b/google/cloud/bigtable/testing/mock_mutate_rows_reader.h index f91b3cbe807c0..d48201616b17e 100644 --- a/google/cloud/bigtable/testing/mock_mutate_rows_reader.h +++ b/google/cloud/bigtable/testing/mock_mutate_rows_reader.h @@ -17,7 +17,7 @@ #include "google/cloud/bigtable/testing/mock_response_reader.h" #include "google/cloud/testing_util/mock_async_response_reader.h" -#include +#include "google/bigtable/v2/bigtable.pb.h" #include namespace google { diff --git a/google/cloud/bigtable/testing/mock_read_rows_reader.h b/google/cloud/bigtable/testing/mock_read_rows_reader.h index 3915ceb5abe0d..b97d258cc79ac 100644 --- a/google/cloud/bigtable/testing/mock_read_rows_reader.h +++ b/google/cloud/bigtable/testing/mock_read_rows_reader.h @@ -17,7 +17,7 @@ #include "google/cloud/bigtable/testing/mock_response_reader.h" #include "google/cloud/testing_util/mock_async_response_reader.h" -#include +#include "google/bigtable/v2/bigtable.grpc.pb.h" #include namespace google { diff --git a/google/cloud/bigtable/testing/mock_sample_row_keys_reader.h b/google/cloud/bigtable/testing/mock_sample_row_keys_reader.h index 334579441d58e..0488a48ced270 100644 --- a/google/cloud/bigtable/testing/mock_sample_row_keys_reader.h +++ b/google/cloud/bigtable/testing/mock_sample_row_keys_reader.h @@ -16,7 +16,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_TESTING_MOCK_SAMPLE_ROW_KEYS_READER_H #include "google/cloud/bigtable/testing/mock_response_reader.h" -#include +#include "google/bigtable/v2/bigtable.grpc.pb.h" #include namespace google { diff --git a/google/cloud/bigtable/testing/table_integration_test.cc b/google/cloud/bigtable/testing/table_integration_test.cc index d9f8156437f7b..6a09bacf62018 100644 --- a/google/cloud/bigtable/testing/table_integration_test.cc +++ b/google/cloud/bigtable/testing/table_integration_test.cc @@ -123,8 +123,6 @@ void TableAdminTestEnvironment::TearDown() { void TableIntegrationTest::SetUp() { data_connection_ = MakeDataConnection(); - data_client_ = bigtable::MakeDataClient(TableTestEnvironment::project_id(), - TableTestEnvironment::instance_id()); // In production, we cannot use `DropAllRows()` to cleanup the table because // the integration tests sometimes consume all the 'DropRowRangeGroup' quota. @@ -164,15 +162,11 @@ void TableIntegrationTest::SetUp() { } } -bigtable::Table TableIntegrationTest::GetTable( - std::string const& implementation) { - if (implementation == "with-data-connection") { - return Table(data_connection_, - TableResource(TableTestEnvironment::project_id(), - TableTestEnvironment::instance_id(), - TableTestEnvironment::table_id())); - } - return bigtable::Table(data_client_, TableTestEnvironment::table_id()); +bigtable::Table TableIntegrationTest::GetTable() { + return Table(data_connection_, + TableResource(TableTestEnvironment::project_id(), + TableTestEnvironment::instance_id(), + TableTestEnvironment::table_id())); } std::vector TableIntegrationTest::ReadRows( @@ -188,12 +182,6 @@ std::vector TableIntegrationTest::ReadRows( return result; } -std::vector TableIntegrationTest::ReadRows( - std::string const& table_name, bigtable::Filter filter) { - bigtable::Table table(data_client_, table_name); - return ReadRows(table, std::move(filter)); -} - std::vector TableIntegrationTest::ReadRows( bigtable::Table& table, std::int64_t rows_limit, bigtable::Filter filter) { auto reader = diff --git a/google/cloud/bigtable/testing/table_integration_test.h b/google/cloud/bigtable/testing/table_integration_test.h index 8c360b5374db1..ad2b076ad864c 100644 --- a/google/cloud/bigtable/testing/table_integration_test.h +++ b/google/cloud/bigtable/testing/table_integration_test.h @@ -17,7 +17,6 @@ #include "google/cloud/bigtable/admin/bigtable_table_admin_client.h" #include "google/cloud/bigtable/cell.h" -#include "google/cloud/bigtable/data_client.h" #include "google/cloud/bigtable/table.h" #include "google/cloud/internal/random.h" #include "google/cloud/testing_util/integration_test.h" @@ -94,19 +93,12 @@ class TableIntegrationTest : public ::google::cloud::testing_util::IntegrationTest { protected: void SetUp() override; - - /// Gets a Table object for the current test. - bigtable::Table GetTable( - std::string const& implementation = "with-data-client"); + bigtable::Table GetTable(); /// Return all the cells in @p table that pass @p filter. static std::vector ReadRows(bigtable::Table& table, bigtable::Filter filter); - /// Return all the cells in @p table that pass @p filter. - std::vector ReadRows(std::string const& table_name, - bigtable::Filter filter); - static std::vector ReadRows(bigtable::Table& table, std::int64_t rows_limit, bigtable::Filter filter); @@ -170,6 +162,16 @@ class TableIntegrationTest return names; } + static StatusOr> TableNames( + StreamRange& tables) { + std::vector names; + for (auto const& table : tables) { + if (!table) return table.status(); + names.push_back(table->name()); + } + return names; + } + static std::vector BackupNames( std::vector const& backups) { std::vector names(backups.size()); @@ -179,7 +181,6 @@ class TableIntegrationTest return names; } - std::shared_ptr data_client_; std::shared_ptr data_connection_; }; diff --git a/google/cloud/bigtable/testing/table_test_fixture.cc b/google/cloud/bigtable/testing/table_test_fixture.cc deleted file mode 100644 index 9491d9409b998..0000000000000 --- a/google/cloud/bigtable/testing/table_test_fixture.cc +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2017 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/testing/table_test_fixture.h" -#include "google/cloud/internal/background_threads_impl.h" -#include "google/cloud/internal/throw_delegate.h" -#include - -namespace google { -namespace cloud { -namespace bigtable { -namespace testing { - -char const TableTestFixture::kProjectId[] = "foo-project"; -char const TableTestFixture::kInstanceId[] = "bar-instance"; -char const TableTestFixture::kTableId[] = "baz-table"; - -// These are hardcoded, and not computed, because we want to test the -// computation. -char const TableTestFixture::kInstanceName[] = - "projects/foo-project/instances/bar-instance"; -char const TableTestFixture::kTableName[] = - "projects/foo-project/instances/bar-instance/tables/baz-table"; - -google::bigtable::v2::ReadRowsResponse ReadRowsResponseFromString( - std::string const& repr) { - google::bigtable::v2::ReadRowsResponse response; - if (!google::protobuf::TextFormat::ParseFromString(repr, &response)) { - google::cloud::internal::ThrowRuntimeError("Failed to parse " + repr); - } - return response; -} - -std::shared_ptr TableTestFixture::SetupMockClient() { - auto client = std::make_shared( - Options{}.set(cq_)); - EXPECT_CALL(*client, project_id()) - .WillRepeatedly(::testing::ReturnRef(project_id_)); - EXPECT_CALL(*client, instance_id()) - .WillRepeatedly(::testing::ReturnRef(instance_id_)); - return client; -} - -TableTestFixture::TableTestFixture(CompletionQueue const& cq) - : cq_impl_(std::dynamic_pointer_cast< - ::google::cloud::testing_util::FakeCompletionQueueImpl>( - google::cloud::internal::GetCompletionQueueImpl(cq))), - cq_(cq), - client_(SetupMockClient()) {} - -} // namespace testing -} // namespace bigtable -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/testing/table_test_fixture.h b/google/cloud/bigtable/testing/table_test_fixture.h deleted file mode 100644 index 72fd4c5924898..0000000000000 --- a/google/cloud/bigtable/testing/table_test_fixture.h +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2017 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_TESTING_TABLE_TEST_FIXTURE_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_TESTING_TABLE_TEST_FIXTURE_H - -#include "google/cloud/bigtable/table.h" -#include "google/cloud/bigtable/testing/mock_data_client.h" -#include "google/cloud/testing_util/fake_completion_queue_impl.h" -#include - -namespace google { -namespace cloud { -namespace bigtable { -namespace testing { - -/// Common fixture for the bigtable::Table tests. -class TableTestFixture : public ::testing::Test { - protected: - explicit TableTestFixture(CompletionQueue const& cq); - std::shared_ptr SetupMockClient(); - - static char const kProjectId[]; - static char const kInstanceId[]; - static char const kTableId[]; - static char const kInstanceName[]; - static char const kTableName[]; - - std::string project_id_ = kProjectId; - std::string instance_id_ = kInstanceId; - std::shared_ptr<::google::cloud::testing_util::FakeCompletionQueueImpl> - cq_impl_; - CompletionQueue cq_; - std::shared_ptr client_; - bigtable::Table table_ = bigtable::Table(client_, kTableId); -}; - -google::bigtable::v2::ReadRowsResponse ReadRowsResponseFromString( - std::string const& repr); - -} // namespace testing -} // namespace bigtable -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_TESTING_TABLE_TEST_FIXTURE_H diff --git a/google/cloud/bigtable/tests/BUILD.bazel b/google/cloud/bigtable/tests/BUILD.bazel index 72d44baed557d..c4974a2b00849 100644 --- a/google/cloud/bigtable/tests/BUILD.bazel +++ b/google/cloud/bigtable/tests/BUILD.bazel @@ -34,7 +34,7 @@ licenses(["notice"]) # Apache 2.0 "//:grpc_utils", "//google/cloud/bigtable:bigtable_client_testing", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) for test in bigtable_client_integration_tests] diff --git a/google/cloud/bigtable/tests/CMakeLists.txt b/google/cloud/bigtable/tests/CMakeLists.txt index 757872b6b1158..ff7c9e9eb8b04 100644 --- a/google/cloud/bigtable/tests/CMakeLists.txt +++ b/google/cloud/bigtable/tests/CMakeLists.txt @@ -18,14 +18,14 @@ # Bigtable emulator. set(bigtable_client_integration_tests # cmake-format: sort - admin_backup_integration_test.cc - admin_iam_policy_integration_test.cc - admin_integration_test.cc data_async_future_integration_test.cc data_integration_test.cc filters_integration_test.cc instance_admin_integration_test.cc mutations_integration_test.cc + table_admin_backup_integration_test.cc + table_admin_iam_policy_integration_test.cc + table_admin_integration_test.cc table_sample_rows_integration_test.cc) include(CreateBazelConfig) @@ -67,7 +67,8 @@ google_cloud_cpp_add_common_options(${target}) # We just know that these tests need to be run against production. set(bigtable_integration_tests_production # cmake-format: sort - admin_backup_integration_test.cc admin_iam_policy_integration_test.cc) + table_admin_backup_integration_test.cc + table_admin_iam_policy_integration_test.cc) foreach (fname ${bigtable_integration_tests_production}) google_cloud_cpp_set_target_name(target "bigtable" "${fname}") diff --git a/google/cloud/bigtable/tests/bigtable_client_integration_tests.bzl b/google/cloud/bigtable/tests/bigtable_client_integration_tests.bzl index ce7d2f550c98f..907e01e0933dc 100644 --- a/google/cloud/bigtable/tests/bigtable_client_integration_tests.bzl +++ b/google/cloud/bigtable/tests/bigtable_client_integration_tests.bzl @@ -17,13 +17,13 @@ """Automatically generated unit tests list - DO NOT EDIT.""" bigtable_client_integration_tests = [ - "admin_backup_integration_test.cc", - "admin_iam_policy_integration_test.cc", - "admin_integration_test.cc", "data_async_future_integration_test.cc", "data_integration_test.cc", "filters_integration_test.cc", "instance_admin_integration_test.cc", "mutations_integration_test.cc", + "table_admin_backup_integration_test.cc", + "table_admin_iam_policy_integration_test.cc", + "table_admin_integration_test.cc", "table_sample_rows_integration_test.cc", ] diff --git a/google/cloud/bigtable/tests/data_async_future_integration_test.cc b/google/cloud/bigtable/tests/data_async_future_integration_test.cc index c884c571e405b..56defb4862194 100644 --- a/google/cloud/bigtable/tests/data_async_future_integration_test.cc +++ b/google/cloud/bigtable/tests/data_async_future_integration_test.cc @@ -25,18 +25,12 @@ namespace { using ::google::cloud::bigtable::testing::TableIntegrationTest; using ::google::cloud::testing_util::chrono_literals::operator""_ms; -class DataAsyncIntegrationTest - : public TableIntegrationTest, - public ::testing::WithParamInterface {}; - -INSTANTIATE_TEST_SUITE_P(, DataAsyncIntegrationTest, - ::testing::Values("with-data-connection", - "with-data-client")); +class DataAsyncIntegrationTest : public TableIntegrationTest {}; std::string const kFamily = "family1"; -TEST_P(DataAsyncIntegrationTest, TableAsyncApply) { - auto table = GetTable(GetParam()); +TEST_F(DataAsyncIntegrationTest, TableAsyncApply) { + auto table = GetTable(); std::string const row_key = "key-000010"; std::vector created{{row_key, kFamily, "cc1", 1000, "v1000"}, @@ -67,8 +61,8 @@ TEST_P(DataAsyncIntegrationTest, TableAsyncApply) { CheckEqualUnordered(expected, actual); } -TEST_P(DataAsyncIntegrationTest, TableAsyncBulkApply) { - auto table = GetTable(GetParam()); +TEST_F(DataAsyncIntegrationTest, TableAsyncBulkApply) { + auto table = GetTable(); std::string const row_key1 = "key-000010"; std::string const row_key2 = "key-000020"; @@ -115,8 +109,8 @@ TEST_P(DataAsyncIntegrationTest, TableAsyncBulkApply) { CheckEqualUnordered(expected, actual); } -TEST_P(DataAsyncIntegrationTest, TableAsyncCheckAndMutateRowPass) { - auto table = GetTable(GetParam()); +TEST_F(DataAsyncIntegrationTest, TableAsyncCheckAndMutateRowPass) { + auto table = GetTable(); std::string const key = "row-key"; @@ -142,8 +136,8 @@ TEST_P(DataAsyncIntegrationTest, TableAsyncCheckAndMutateRowPass) { CheckEqualUnordered(expected, actual); } -TEST_P(DataAsyncIntegrationTest, TableAsyncCheckAndMutateRowFail) { - auto table = GetTable(GetParam()); +TEST_F(DataAsyncIntegrationTest, TableAsyncCheckAndMutateRowFail) { + auto table = GetTable(); std::string const key = "row-key"; @@ -169,8 +163,8 @@ TEST_P(DataAsyncIntegrationTest, TableAsyncCheckAndMutateRowFail) { CheckEqualUnordered(expected, actual); } -TEST_P(DataAsyncIntegrationTest, TableAsyncReadModifyWriteAppendValueTest) { - auto table = GetTable(GetParam()); +TEST_F(DataAsyncIntegrationTest, TableAsyncReadModifyWriteAppendValueTest) { + auto table = GetTable(); std::string const row_key1 = "row-key-1"; std::string const row_key2 = "row-key-2"; std::string const add_suffix1 = "-suffix"; @@ -225,8 +219,8 @@ TEST_P(DataAsyncIntegrationTest, TableAsyncReadModifyWriteAppendValueTest) { actual_cells_ignore_timestamp); } -TEST_P(DataAsyncIntegrationTest, TableAsyncReadRowsAllRows) { - auto table = GetTable(GetParam()); +TEST_F(DataAsyncIntegrationTest, TableAsyncReadRowsAllRows) { + auto table = GetTable(); std::string const row_key1 = "row-key-1"; std::string const row_key2 = "row-key-2"; @@ -264,8 +258,8 @@ TEST_P(DataAsyncIntegrationTest, TableAsyncReadRowsAllRows) { CheckEqualUnordered(created, actual); } -TEST_P(DataAsyncIntegrationTest, TableAsyncReadRowTest) { - auto table = GetTable(GetParam()); +TEST_F(DataAsyncIntegrationTest, TableAsyncReadRowTest) { + auto table = GetTable(); std::string const row_key1 = "row-key-1"; std::string const row_key2 = "row-key-2"; diff --git a/google/cloud/bigtable/tests/data_integration_test.cc b/google/cloud/bigtable/tests/data_integration_test.cc index 9a835f61176e3..2146f75342b85 100644 --- a/google/cloud/bigtable/tests/data_integration_test.cc +++ b/google/cloud/bigtable/tests/data_integration_test.cc @@ -17,12 +17,14 @@ #include "google/cloud/bigtable/options.h" #include "google/cloud/bigtable/retry_policy.h" #include "google/cloud/bigtable/testing/table_integration_test.h" +#include "google/cloud/grpc_options.h" #include "google/cloud/log.h" #include "google/cloud/testing_util/chrono_literals.h" #include "google/cloud/testing_util/scoped_environment.h" #include "google/cloud/testing_util/scoped_log.h" #include "google/cloud/testing_util/status_matchers.h" #include "absl/strings/str_format.h" +#include "absl/strings/str_split.h" #include namespace google { @@ -43,13 +45,7 @@ using ::testing::HasSubstr; using ::testing::UnorderedElementsAre; using ms = std::chrono::milliseconds; -class DataIntegrationTest : public TableIntegrationTest, - public ::testing::WithParamInterface { -}; - -INSTANTIATE_TEST_SUITE_P(, DataIntegrationTest, - ::testing::Values("with-data-connection", - "with-data-client")); +class DataIntegrationTest : public TableIntegrationTest {}; /// Use Table::Apply() to insert a single row. void Apply(Table& table, std::string const& row_key, @@ -90,8 +86,8 @@ std::string const kFamily2 = "family2"; std::string const kFamily3 = "family3"; std::string const kFamily4 = "family4"; -TEST_P(DataIntegrationTest, TableApply) { - auto table = GetTable(GetParam()); +TEST_F(DataIntegrationTest, TableApply) { + auto table = GetTable(); std::string const row_key = "row-key-1"; std::vector created{{row_key, kFamily4, "c0", 1000, "v1000"}, @@ -104,8 +100,8 @@ TEST_P(DataIntegrationTest, TableApply) { CheckEqualUnordered(expected, actual); } -TEST_P(DataIntegrationTest, TableBulkApply) { - auto table = GetTable(GetParam()); +TEST_F(DataIntegrationTest, TableBulkApply) { + auto table = GetTable(); std::vector created{{"row-key-1", kFamily4, "c0", 1000, "v1000"}, {"row-key-1", kFamily4, "c1", 2000, "v2000"}, @@ -129,9 +125,7 @@ TEST_P(DataIntegrationTest, TableBulkApply) { CheckEqualUnordered(expected, actual); } -TEST_P(DataIntegrationTest, TableBulkApplyThrottling) { - if (GetParam() == "with-data-client") GTEST_SKIP(); - +TEST_F(DataIntegrationTest, TableBulkApplyThrottling) { // Make a custom table with throttling enabled. auto table = Table(MakeDataConnection( @@ -158,9 +152,9 @@ TEST_P(DataIntegrationTest, TableBulkApplyThrottling) { CheckEqualUnordered({expected}, actual); } -TEST_P(DataIntegrationTest, TableSingleRow) { +TEST_F(DataIntegrationTest, TableSingleRow) { std::string const row_key = "row-key-1"; - auto table = GetTable(GetParam()); + auto table = GetTable(); auto mutation = SingleRowMutation(row_key, SetCell(kFamily4, "c1", 1_ms, "V1000"), @@ -175,8 +169,8 @@ TEST_P(DataIntegrationTest, TableSingleRow) { CheckEqualUnordered(expected, actual); } -TEST_P(DataIntegrationTest, TableReadRowTest) { - auto table = GetTable(GetParam()); +TEST_F(DataIntegrationTest, TableReadRowTest) { + auto table = GetTable(); std::string const row_key1 = "row-key-1"; std::string const row_key2 = "row-key-2"; @@ -192,8 +186,8 @@ TEST_P(DataIntegrationTest, TableReadRowTest) { CheckEqualUnordered(expected, actual); } -TEST_P(DataIntegrationTest, TableReadRowNotExistTest) { - auto table = GetTable(GetParam()); +TEST_F(DataIntegrationTest, TableReadRowNotExistTest) { + auto table = GetTable(); std::string const row_key1 = "row-key-1"; std::string const row_key2 = "row-key-2"; @@ -205,8 +199,8 @@ TEST_P(DataIntegrationTest, TableReadRowNotExistTest) { EXPECT_FALSE(row_cell->first); } -TEST_P(DataIntegrationTest, TableReadRowsAllRows) { - auto table = GetTable(GetParam()); +TEST_F(DataIntegrationTest, TableReadRowsAllRows) { + auto table = GetTable(); std::string const row_key1 = "row-key-1"; std::string const row_key2 = "row-key-2"; std::string const row_key3(1024, '3'); // a long key @@ -237,8 +231,8 @@ TEST_P(DataIntegrationTest, TableReadRowsAllRows) { CheckEqualUnordered(created, MoveCellsFromReader(read4)); } -TEST_P(DataIntegrationTest, TableReadRowsPartialRows) { - auto table = GetTable(GetParam()); +TEST_F(DataIntegrationTest, TableReadRowsPartialRows) { + auto table = GetTable(); std::string const row_key1 = "row-key-1"; std::string const row_key2 = "row-key-2"; std::string const row_key3 = "row-key-3"; @@ -279,11 +273,10 @@ TEST_P(DataIntegrationTest, TableReadRowsPartialRows) { } } -TEST_P(DataIntegrationTest, TableReadRowsReverseScan) { - if (GetParam() == "with-data-client") GTEST_SKIP(); +TEST_F(DataIntegrationTest, TableReadRowsReverseScan) { // The emulator does not yet support reverse scans. if (UsingCloudBigtableEmulator()) GTEST_SKIP(); - auto table = GetTable(GetParam()); + auto table = GetTable(); std::vector created{{"row-key-1", kFamily4, "c1", 1000, "a"}, {"row-key-1", kFamily4, "c2", 2000, "b"}, @@ -303,8 +296,8 @@ TEST_P(DataIntegrationTest, TableReadRowsReverseScan) { ElementsAre("row-key-3", "row-key-2", "row-key-1", "row-key-1")); } -TEST_P(DataIntegrationTest, TableReadRowsNoRows) { - auto table = GetTable(GetParam()); +TEST_F(DataIntegrationTest, TableReadRowsNoRows) { + auto table = GetTable(); std::string const row_key1 = "row-key-1"; std::string const row_key2 = "row-key-2"; std::string const row_key3 = "row-key-3"; @@ -329,8 +322,8 @@ TEST_P(DataIntegrationTest, TableReadRowsNoRows) { CheckEqualUnordered(expected, MoveCellsFromReader(read3)); } -TEST_P(DataIntegrationTest, TableReadRowsWrongTable) { - auto table = GetTable(GetParam()); +TEST_F(DataIntegrationTest, TableReadRowsWrongTable) { + auto table = GetTable(); auto other_table = table.WithNewTarget(table.project_id(), table.instance_id(), RandomTableId()); @@ -343,8 +336,8 @@ TEST_P(DataIntegrationTest, TableReadRowsWrongTable) { EXPECT_EQ(read1.end(), it); } -TEST_P(DataIntegrationTest, TableCheckAndMutateRowPass) { - auto table = GetTable(GetParam()); +TEST_F(DataIntegrationTest, TableCheckAndMutateRowPass) { + auto table = GetTable(); std::string const key = "row-key"; std::vector created{{key, kFamily4, "c1", 0, "v1000"}}; @@ -361,8 +354,8 @@ TEST_P(DataIntegrationTest, TableCheckAndMutateRowPass) { CheckEqualUnordered(expected, actual); } -TEST_P(DataIntegrationTest, TableCheckAndMutateRowFail) { - auto table = GetTable(GetParam()); +TEST_F(DataIntegrationTest, TableCheckAndMutateRowFail) { + auto table = GetTable(); std::string const key = "row-key"; std::vector created{{key, kFamily4, "c1", 0, "v1000"}}; @@ -379,8 +372,8 @@ TEST_P(DataIntegrationTest, TableCheckAndMutateRowFail) { CheckEqualUnordered(expected, actual); } -TEST_P(DataIntegrationTest, TableReadModifyWriteAppendValueTest) { - auto table = GetTable(GetParam()); +TEST_F(DataIntegrationTest, TableReadModifyWriteAppendValueTest) { + auto table = GetTable(); std::string const row_key1 = "row-key-1"; std::string const row_key2 = "row-key-2"; std::string const add_suffix1 = "-suffix"; @@ -415,8 +408,8 @@ TEST_P(DataIntegrationTest, TableReadModifyWriteAppendValueTest) { actual_cells_ignore_timestamp); } -TEST_P(DataIntegrationTest, TableReadModifyWriteRowIncrementAmountTest) { - auto table = GetTable(GetParam()); +TEST_F(DataIntegrationTest, TableReadModifyWriteRowIncrementAmountTest) { + auto table = GetTable(); std::string const key = "row-key"; // An initial; big-endian int64 number with value 0. @@ -442,8 +435,8 @@ TEST_P(DataIntegrationTest, TableReadModifyWriteRowIncrementAmountTest) { CheckEqualUnordered(expected_ignore_timestamp, actual_ignore_timestamp); } -TEST_P(DataIntegrationTest, TableReadModifyWriteRowMultipleTest) { - auto table = GetTable(GetParam()); +TEST_F(DataIntegrationTest, TableReadModifyWriteRowMultipleTest) { + auto table = GetTable(); std::string const key = "row-key"; std::string v1("\x00\x00\x00\x00\x00\x00\x00\x00", 8); @@ -486,8 +479,8 @@ TEST_P(DataIntegrationTest, TableReadModifyWriteRowMultipleTest) { CheckEqualUnordered(expected_ignore_timestamp, actual_ignore_timestamp); } -TEST_P(DataIntegrationTest, TableCellValueInt64Test) { - auto table = GetTable(GetParam()); +TEST_F(DataIntegrationTest, TableCellValueInt64Test) { + auto table = GetTable(); std::string const key = "row-key"; std::vector created{{key, kFamily1, "c1", 0, 42}, @@ -521,8 +514,8 @@ TEST_P(DataIntegrationTest, TableCellValueInt64Test) { CheckEqualUnordered(expected_ignore_timestamp, actual_ignore_timestamp); } -TEST_P(DataIntegrationTest, TableReadMultipleCellsBigValue) { - auto table = GetTable(GetParam()); +TEST_F(DataIntegrationTest, TableReadMultipleCellsBigValue) { + auto table = GetTable(); std::string const row_key = "row-key-1"; // cell vector contains 4 cells of 32 MiB each, or 128 MiB (without @@ -573,7 +566,7 @@ TEST_P(DataIntegrationTest, TableReadMultipleCellsBigValue) { CheckEqualUnordered(expected_ignore_timestamp, actual_ignore_timestamp); } -TEST_P(DataIntegrationTest, TableApplyWithLogging) { +TEST_F(DataIntegrationTest, TableApplyWithLogging) { // In our ci builds, we set GOOGLE_CLOUD_CPP_ENABLE_TRACING to log our tests, // by default. We should unset this variable and create a fresh client in // order to have a conclusive test. @@ -585,13 +578,9 @@ TEST_P(DataIntegrationTest, TableApplyWithLogging) { // Make a `Table` with an implementation that depends on the test's value // parameter. auto make_table = [&](Options const& options) { - if (GetParam() == "with-data-connection") { - auto conn = MakeDataConnection(options); - return Table(std::move(conn), - TableResource(project_id(), instance_id(), table_id)); - } - auto data_client = MakeDataClient(project_id(), instance_id(), options); - return Table(std::move(data_client), table_id); + auto conn = MakeDataConnection(options); + return Table(std::move(conn), + TableResource(project_id(), instance_id(), table_id)); }; std::string const row_key = "row-key-1"; @@ -610,7 +599,7 @@ TEST_P(DataIntegrationTest, TableApplyWithLogging) { EXPECT_THAT(log.ExtractLines(), Not(Contains(HasSubstr("MutateRow")))); } -TEST_P(DataIntegrationTest, ClientQueryColumnFamily) { +TEST_F(DataIntegrationTest, ClientQueryColumnFamily) { if (UsingCloudBigtableEmulator()) GTEST_SKIP(); auto const table_id = testing::TableTestEnvironment::table_id(); auto retry_policy_option = DataLimitedErrorCountRetryPolicy(0).clone(); @@ -676,7 +665,7 @@ TEST_P(DataIntegrationTest, ClientQueryColumnFamily) { {Bytes(column2), Bytes(value2)}})); } -TEST_P(DataIntegrationTest, ClientQueryColumnFamilyWithHistory) { +TEST_F(DataIntegrationTest, ClientQueryColumnFamilyWithHistory) { if (UsingCloudBigtableEmulator()) GTEST_SKIP(); auto const table_id = testing::TableTestEnvironment::table_id(); auto retry_policy_option = DataLimitedErrorCountRetryPolicy(0).clone(); @@ -820,76 +809,7 @@ TEST_P(DataIntegrationTest, ClientQueryColumnFamilyWithHistory) { column_2_value_old); } -// TODO(#8800) - remove after deprecation is complete -#include "google/cloud/internal/disable_deprecation_warnings.inc" - -TEST(ConnectionRefresh, Disabled) { - auto data_client = bigtable::MakeDataClient( - testing::TableTestEnvironment::project_id(), - testing::TableTestEnvironment::instance_id(), - Options{}.set(std::chrono::seconds(0))); - // In general, it is hard to show that something has *not* happened, at best - // we can show that its side-effects have not happened. In this case we want - // to show that the channels have not been refreshed. A side-effect of - // refreshing a channel is that it enters the `READY` state, so we check that - // this has not taken place and take that as evidence that no refresh has - // taken place. - // - // After the `CompletionQueue` argument is removed from the `Bigtable` API, we - // will have an option to provide a mock `CompletionQueue` to the `DataClient` - // for test purposes and verify that no timers are created, which will be a - // superior way to write this test. - std::this_thread::sleep_for(std::chrono::milliseconds(100)); - - for (int i = 0; i < internal::DefaultConnectionPoolSize(); ++i) { - auto channel = data_client->Channel(); - EXPECT_EQ(GRPC_CHANNEL_IDLE, channel->GetState(false)); - } - // Make sure things still work. - bigtable::Table table(data_client, testing::TableTestEnvironment::table_id()); - std::string const row_key = "row-key-1"; - std::vector created{{row_key, kFamily4, "c0", 1000, "v1000"}, - {row_key, kFamily4, "c1", 2000, "v2000"}}; - Apply(table, row_key, created); - // After performing some operations, some of the channels should be in ready - // state. - auto check_if_some_channel_is_ready = [&] { - for (int i = 0; i < internal::DefaultConnectionPoolSize(); ++i) { - if (data_client->Channel()->GetState(false) == GRPC_CHANNEL_READY) { - return true; - } - } - return false; - }; - EXPECT_TRUE(check_if_some_channel_is_ready()); -} - -TEST(ConnectionRefresh, Frequent) { - auto data_client = bigtable::MakeDataClient( - testing::TableTestEnvironment::project_id(), - testing::TableTestEnvironment::instance_id(), - Options{} - .set(std::chrono::milliseconds(100)) - .set(std::chrono::milliseconds(100))); - - for (;;) { - if (data_client->Channel()->GetState(false) == GRPC_CHANNEL_READY) { - // We've found a channel which changed its state from IDLE to READY, - // which means that our refreshing mechanism works. - break; - } - std::this_thread::sleep_for(std::chrono::milliseconds(10)); - } - - // Make sure things still work. - bigtable::Table table(data_client, testing::TableTestEnvironment::table_id()); - std::string const row_key = "row-key-1"; - std::vector created{{row_key, kFamily4, "c0", 1000, "v1000"}, - {row_key, kFamily4, "c1", 2000, "v2000"}}; - Apply(table, row_key, created); -} - -TEST_P(DataIntegrationTest, SingleColumnQuery) { +TEST_F(DataIntegrationTest, SingleColumnQuery) { if (UsingCloudBigtableEmulator()) GTEST_SKIP(); auto const table_id = testing::TableTestEnvironment::table_id(); auto retry_policy_option = DataLimitedErrorCountRetryPolicy(0).clone(); @@ -952,7 +872,7 @@ TEST_P(DataIntegrationTest, SingleColumnQuery) { EXPECT_EQ(*value, value1); } -TEST_P(DataIntegrationTest, SingleColumnQueryWithHistory) { +TEST_F(DataIntegrationTest, SingleColumnQueryWithHistory) { if (UsingCloudBigtableEmulator()) GTEST_SKIP(); auto const table_id = testing::TableTestEnvironment::table_id(); auto retry_policy_option = DataLimitedErrorCountRetryPolicy(0).clone(); @@ -1056,7 +976,7 @@ TEST_P(DataIntegrationTest, SingleColumnQueryWithHistory) { EXPECT_EQ(std::get<1>(entry1), value_old); } -TEST_P(DataIntegrationTest, MultiColumnQuery) { +TEST_F(DataIntegrationTest, MultiColumnQuery) { if (UsingCloudBigtableEmulator()) GTEST_SKIP(); auto const table_id = testing::TableTestEnvironment::table_id(); auto retry_policy_option = DataLimitedErrorCountRetryPolicy(0).clone(); @@ -1123,7 +1043,7 @@ TEST_P(DataIntegrationTest, MultiColumnQuery) { RowType("multi-column-query-row-2", "v21", "v22"))); } -TEST_P(DataIntegrationTest, QueryWithNulls) { +TEST_F(DataIntegrationTest, QueryWithNulls) { if (UsingCloudBigtableEmulator()) GTEST_SKIP(); auto const table_id = testing::TableTestEnvironment::table_id(); auto retry_policy_option = DataLimitedErrorCountRetryPolicy(0).clone(); @@ -1193,9 +1113,6 @@ TEST_P(DataIntegrationTest, QueryWithNulls) { std::make_tuple(row_key3, absl::optional(value3)))); } -// TODO(#8800) - remove after deprecation is complete -#include "google/cloud/internal/diagnostics_pop.inc" - } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigtable diff --git a/google/cloud/bigtable/tests/filters_integration_test.cc b/google/cloud/bigtable/tests/filters_integration_test.cc index aeea0834efb22..6f485da04b451 100644 --- a/google/cloud/bigtable/tests/filters_integration_test.cc +++ b/google/cloud/bigtable/tests/filters_integration_test.cc @@ -95,7 +95,7 @@ void CreateComplexRows(Table& table, std::string const& prefix) { }; TEST_F(FilterIntegrationTest, PassAll) { - auto table = GetTable("with-data-connection"); + auto table = GetTable(); std::string const row_key = "pass-all-row-key"; std::vector expected{ {row_key, "family1", "c", 0, "v-c-0-0"}, @@ -112,7 +112,7 @@ TEST_F(FilterIntegrationTest, PassAll) { } TEST_F(FilterIntegrationTest, BlockAll) { - auto table = GetTable("with-data-connection"); + auto table = GetTable(); std::string const row_key = "block-all-row-key"; std::vector created{ {row_key, "family1", "c", 0, "v-c-0-0"}, @@ -130,7 +130,7 @@ TEST_F(FilterIntegrationTest, BlockAll) { } TEST_F(FilterIntegrationTest, Latest) { - auto table = GetTable("with-data-connection"); + auto table = GetTable(); std::string const row_key = "latest-row-key"; std::vector created{ {row_key, "family1", "c", 0, "v-c-0-0"}, @@ -155,7 +155,7 @@ TEST_F(FilterIntegrationTest, Latest) { } TEST_F(FilterIntegrationTest, FamilyRegex) { - auto table = GetTable("with-data-connection"); + auto table = GetTable(); std::string const row_key = "family-regex-row-key"; std::vector created{ {row_key, "family1", "c2", 0, "bar"}, @@ -178,7 +178,7 @@ TEST_F(FilterIntegrationTest, FamilyRegex) { } TEST_F(FilterIntegrationTest, ColumnRegex) { - auto table = GetTable("with-data-connection"); + auto table = GetTable(); std::string const row_key = "column-regex-row-key"; std::vector created{ {row_key, "family1", "abc", 0, "bar"}, @@ -201,7 +201,7 @@ TEST_F(FilterIntegrationTest, ColumnRegex) { } TEST_F(FilterIntegrationTest, ColumnRange) { - auto table = GetTable("with-data-connection"); + auto table = GetTable(); std::string const row_key = "column-range-row-key"; std::vector created{ {row_key, "family1", "a00", 0, "bar"}, @@ -223,7 +223,7 @@ TEST_F(FilterIntegrationTest, ColumnRange) { } TEST_F(FilterIntegrationTest, TimestampRange) { - auto table = GetTable("with-data-connection"); + auto table = GetTable(); std::string const row_key = "timestamp-range-row-key"; std::vector created{ {row_key, "family1", "c0", 1000, "v1000"}, @@ -247,7 +247,7 @@ TEST_F(FilterIntegrationTest, TimestampRange) { } TEST_F(FilterIntegrationTest, RowKeysRegex) { - auto table = GetTable("with-data-connection"); + auto table = GetTable(); std::string const row_key = "row-key-regex-row-key"; std::vector created{ {row_key + "/abc0", "family1", "c0", 1000, "v1000"}, @@ -267,7 +267,7 @@ TEST_F(FilterIntegrationTest, RowKeysRegex) { } TEST_F(FilterIntegrationTest, ValueRegex) { - auto table = GetTable("with-data-connection"); + auto table = GetTable(); std::string const prefix = "value-regex-prefix"; std::vector created{ {prefix + "/abc0", "family1", "c0", 1000, "v1000"}, @@ -288,7 +288,7 @@ TEST_F(FilterIntegrationTest, ValueRegex) { } TEST_F(FilterIntegrationTest, ValueRange) { - auto table = GetTable("with-data-connection"); + auto table = GetTable(); std::string const prefix = "value-range-prefix"; std::vector created{ {prefix + "/abc0", "family1", "c0", 1000, "v1000"}, @@ -311,7 +311,7 @@ TEST_F(FilterIntegrationTest, ValueRange) { } TEST_F(FilterIntegrationTest, CellsRowLimit) { - auto table = GetTable("with-data-connection"); + auto table = GetTable(); std::string const prefix = "cell-row-limit-prefix"; ASSERT_NO_FATAL_FAILURE(CreateComplexRows(table, prefix)); @@ -332,7 +332,7 @@ TEST_F(FilterIntegrationTest, CellsRowLimit) { } TEST_F(FilterIntegrationTest, CellsRowOffset) { - auto table = GetTable("with-data-connection"); + auto table = GetTable(); std::string const prefix = "cell-row-offset-prefix"; ASSERT_NO_FATAL_FAILURE(CreateComplexRows(table, prefix)); @@ -353,7 +353,7 @@ TEST_F(FilterIntegrationTest, CellsRowOffset) { } TEST_F(FilterIntegrationTest, RowSample) { - auto table = GetTable("with-data-connection"); + auto table = GetTable(); std::string const prefix = "row-sample-prefix"; int constexpr kRowCount = 20000; @@ -408,7 +408,7 @@ TEST_F(FilterIntegrationTest, RowSample) { } TEST_F(FilterIntegrationTest, StripValueTransformer) { - auto table = GetTable("with-data-connection"); + auto table = GetTable(); std::string const prefix = "strip-value-transformer-prefix"; std::vector created{ {prefix + "/abc0", "family1", "c0", 1000, "v1000"}, @@ -433,7 +433,7 @@ TEST_F(FilterIntegrationTest, StripValueTransformer) { } TEST_F(FilterIntegrationTest, ApplyLabelTransformer) { - auto table = GetTable("with-data-connection"); + auto table = GetTable(); std::string const prefix = "apply-label-transformer-prefix"; std::vector created{ {prefix + "/abc0", "family1", "c0", 1000, "v1000"}, @@ -458,7 +458,7 @@ TEST_F(FilterIntegrationTest, ApplyLabelTransformer) { } TEST_F(FilterIntegrationTest, Condition) { - auto table = GetTable("with-data-connection"); + auto table = GetTable(); std::string const prefix = "condition-prefix"; std::vector created{ {prefix + "/abc0", "family1", "c0", 1000, "v1000"}, @@ -486,7 +486,7 @@ TEST_F(FilterIntegrationTest, Condition) { } TEST_F(FilterIntegrationTest, Chain) { - auto table = GetTable("with-data-connection"); + auto table = GetTable(); std::string const prefix = "chain-prefix"; std::vector created{ {prefix + "/abc0", "family1", "c0", 1000, "v1000"}, @@ -510,7 +510,7 @@ TEST_F(FilterIntegrationTest, Chain) { } TEST_F(FilterIntegrationTest, ChainFromRange) { - auto table = GetTable("with-data-connection"); + auto table = GetTable(); std::string const prefix = "chain-prefix"; std::vector created{ {prefix + "/abc0", "family1", "c0", 1000, "v1000"}, @@ -534,7 +534,7 @@ TEST_F(FilterIntegrationTest, ChainFromRange) { } TEST_F(FilterIntegrationTest, Interleave) { - auto table = GetTable("with-data-connection"); + auto table = GetTable(); std::string const prefix = "interleave-prefix"; std::vector created{ {prefix + "/abc0", "family1", "c0", 1000, "v1000"}, @@ -562,7 +562,7 @@ TEST_F(FilterIntegrationTest, Interleave) { } TEST_F(FilterIntegrationTest, InterleaveFromRange) { - auto table = GetTable("with-data-connection"); + auto table = GetTable(); std::string const prefix = "interleave-prefix"; std::vector created{ {prefix + "/abc0", "family1", "c0", 1000, "v1000"}, diff --git a/google/cloud/bigtable/tests/instance_admin_emulator.cc b/google/cloud/bigtable/tests/instance_admin_emulator.cc index 21f746c928382..40bde479f2cb8 100644 --- a/google/cloud/bigtable/tests/instance_admin_emulator.cc +++ b/google/cloud/bigtable/tests/instance_admin_emulator.cc @@ -14,8 +14,8 @@ #include "google/cloud/bigtable/internal/prefix_range_end.h" #include "absl/strings/match.h" -#include -#include +#include "google/bigtable/admin/v2/bigtable_instance_admin.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/bigtable/tests/instance_admin_integration_test.cc b/google/cloud/bigtable/tests/instance_admin_integration_test.cc index 20980eb782c04..052dd212ecfb6 100644 --- a/google/cloud/bigtable/tests/instance_admin_integration_test.cc +++ b/google/cloud/bigtable/tests/instance_admin_integration_test.cc @@ -12,13 +12,21 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "google/cloud/bigtable/instance_admin.h" +#include "google/cloud/bigtable/admin/bigtable_instance_admin_client.h" +#include "google/cloud/bigtable/app_profile_config.h" +#include "google/cloud/bigtable/iam_binding.h" +#include "google/cloud/bigtable/iam_policy.h" +#include "google/cloud/bigtable/instance_config.h" +#include "google/cloud/bigtable/instance_update_config.h" +#include "google/cloud/bigtable/resource_names.h" #include "google/cloud/bigtable/testing/random_names.h" +#include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/background_threads_impl.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/internal/random.h" #include "google/cloud/location.h" +#include "google/cloud/project.h" #include "google/cloud/status_or.h" #include "google/cloud/testing_util/integration_test.h" #include "google/cloud/testing_util/scoped_environment.h" @@ -63,30 +71,31 @@ class InstanceAdminIntegrationTest GetEnv("GOOGLE_CLOUD_CPP_BIGTABLE_TEST_SERVICE_ACCOUNT").value_or(""); ASSERT_FALSE(service_account_.empty()); - auto instance_admin_client = bigtable::MakeInstanceAdminClient(project_id_); instance_admin_ = - std::make_unique(instance_admin_client); + std::make_unique( + bigtable_admin::MakeBigtableInstanceAdminConnection()); } - std::string project_id_; std::string zone_a_; std::string zone_b_; std::string service_account_; - std::unique_ptr instance_admin_; + std::unique_ptr instance_admin_; google::cloud::internal::DefaultPRNG generator_ = google::cloud::internal::MakeDefaultPRNG(); }; -bool IsInstancePresent(std::vector const& instances, - std::string const& instance_name) { +bool IsInstancePresent( + google::protobuf::RepeatedPtrField const& instances, + std::string const& instance_name) { return google::cloud::internal::ContainsIf( instances, [&instance_name](btadmin::Instance const& i) { return i.name() == instance_name; }); } -bool IsClusterPresent(std::vector const& clusters, - std::string const& cluster_name) { +bool IsClusterPresent( + google::protobuf::RepeatedPtrField const& clusters, + std::string const& cluster_name) { return google::cloud::internal::ContainsIf( clusters, [&cluster_name](btadmin::Cluster const& i) { return i.name() == cluster_name; @@ -120,8 +129,13 @@ TEST_F(InstanceAdminIntegrationTest, ListAllClustersTest) { auto config_2 = IntegrationTestConfig( id_2, zone_b_, bigtable::InstanceConfig::PRODUCTION, 3); - auto instance_1_fut = instance_admin_->CreateInstance(config_1); - auto instance_2_fut = instance_admin_->CreateInstance(config_2); + auto create_request_1 = config_1.as_proto(); + create_request_1.set_parent(Project(project_id_).FullName()); + auto create_request_2 = config_2.as_proto(); + create_request_2.set_parent(Project(project_id_).FullName()); + + auto instance_1_fut = instance_admin_->CreateInstance(create_request_1); + auto instance_2_fut = instance_admin_->CreateInstance(create_request_2); // Wait for instance creation auto instance_1 = instance_1_fut.get(); @@ -132,16 +146,16 @@ TEST_F(InstanceAdminIntegrationTest, ListAllClustersTest) { EXPECT_EQ(instance_1->name(), name_1); EXPECT_EQ(instance_2->name(), name_2); - auto clusters = instance_admin_->ListClusters(); + auto clusters = instance_admin_->ListClusters(instance_1->name()); ASSERT_STATUS_OK(clusters); - for (auto const& cluster : clusters->clusters) { + for (auto const& cluster : clusters->clusters()) { EXPECT_NE(std::string::npos, - cluster.name().find(instance_admin_->project_name())); + cluster.name().find("projects/" + project_id_)); } - EXPECT_FALSE(clusters->clusters.empty()); + EXPECT_FALSE(clusters->clusters().empty()); - EXPECT_STATUS_OK(instance_admin_->DeleteInstance(id_1)); - EXPECT_STATUS_OK(instance_admin_->DeleteInstance(id_2)); + EXPECT_STATUS_OK(instance_admin_->DeleteInstance(name_1)); + EXPECT_STATUS_OK(instance_admin_->DeleteInstance(name_2)); } /// @test Verify that AppProfile CRUD operations work as expected. @@ -151,7 +165,9 @@ TEST_F(InstanceAdminIntegrationTest, CreateListGetDeleteAppProfile) { auto config = IntegrationTestConfig(instance_id, zone_a_, bigtable::InstanceConfig::PRODUCTION, 3); - auto instance_fut = instance_admin_->CreateInstance(config); + auto create_request = config.as_proto(); + create_request.set_parent(Project(project_id_).FullName()); + auto instance_fut = instance_admin_->CreateInstance(create_request); // Wait for instance creation auto instance = instance_fut.get(); ASSERT_STATUS_OK(instance); @@ -167,67 +183,83 @@ TEST_F(InstanceAdminIntegrationTest, CreateListGetDeleteAppProfile) { auto const name_2 = bigtable::AppProfileName(project_id_, instance_id, id_2); // Simplify writing the rest of the test. - auto profile_names = [](std::vector const& list) { - std::vector names(list.size()); - std::transform(list.begin(), list.end(), names.begin(), - [](btadmin::AppProfile const& x) { return x.name(); }); + auto profile_names = [](StreamRange& list) + -> StatusOr> { + std::vector names; + for (auto const& p : list) { + if (!p) return p.status(); + names.push_back(p->name()); + } return names; }; - auto profiles = instance_admin_->ListAppProfiles(instance_id); - ASSERT_STATUS_OK(profiles); - EXPECT_THAT(profile_names(*profiles), Not(Contains(name_1))); - EXPECT_THAT(profile_names(*profiles), Not(Contains(name_2))); - - auto profile_1 = instance_admin_->CreateAppProfile( - instance_id, bigtable::AppProfileConfig::MultiClusterUseAny(id_1)); + auto profiles = instance_admin_->ListAppProfiles(instance_name); + auto names = profile_names(profiles); + ASSERT_STATUS_OK(names); + EXPECT_THAT(*names, Not(Contains(name_1))); + EXPECT_THAT(*names, Not(Contains(name_2))); + + auto create_profile_request = + bigtable::AppProfileConfig::MultiClusterUseAny(id_1).as_proto(); + create_profile_request.set_parent(instance_name); + create_profile_request.set_app_profile_id(id_1); + auto profile_1 = instance_admin_->CreateAppProfile(create_profile_request); ASSERT_STATUS_OK(profile_1); EXPECT_EQ(profile_1->name(), name_1); - auto profile_2 = instance_admin_->CreateAppProfile( - instance_id, bigtable::AppProfileConfig::MultiClusterUseAny(id_2)); + create_profile_request = + bigtable::AppProfileConfig::MultiClusterUseAny(id_2).as_proto(); + create_profile_request.set_parent(instance_name); + create_profile_request.set_app_profile_id(id_2); + auto profile_2 = instance_admin_->CreateAppProfile(create_profile_request); ASSERT_STATUS_OK(profile_2); EXPECT_EQ(profile_2->name(), name_2); - profiles = instance_admin_->ListAppProfiles(instance_id); - ASSERT_STATUS_OK(profiles); - EXPECT_THAT(profile_names(*profiles), Contains(name_1).Times(1)); - EXPECT_THAT(profile_names(*profiles), Contains(name_2).Times(1)); + profiles = instance_admin_->ListAppProfiles(instance_name); + names = profile_names(profiles); + ASSERT_STATUS_OK(names); + EXPECT_THAT(*names, Contains(name_1).Times(1)); + EXPECT_THAT(*names, Contains(name_2).Times(1)); - profile_1 = instance_admin_->GetAppProfile(instance_id, id_1); + profile_1 = instance_admin_->GetAppProfile( + AppProfileName(project_id_, instance_id, id_1)); ASSERT_STATUS_OK(profile_1); EXPECT_EQ(profile_1->name(), name_1); - profile_2 = instance_admin_->GetAppProfile(instance_id, id_2); + profile_2 = instance_admin_->GetAppProfile( + AppProfileName(project_id_, instance_id, id_2)); ASSERT_STATUS_OK(profile_2); EXPECT_EQ(profile_2->name(), name_2); - profile_2 = - instance_admin_ - ->UpdateAppProfile(instance_id, id_2, - bigtable::AppProfileUpdateConfig().set_description( - "new description")) - .get(); + profile_2->set_description("new description"); + google::protobuf::FieldMask field_mask; + *field_mask.add_paths() = "description"; + profile_2 = instance_admin_->UpdateAppProfile(*profile_2, field_mask).get(); ASSERT_STATUS_OK(profile_2); EXPECT_EQ("new description", profile_2->description()); - profile_2 = instance_admin_->GetAppProfile(instance_id, id_2); + profile_2 = instance_admin_->GetAppProfile( + AppProfileName(project_id_, instance_id, id_2)); ASSERT_STATUS_OK(profile_2); EXPECT_EQ("new description", profile_2->description()); - ASSERT_STATUS_OK(instance_admin_->DeleteAppProfile(instance_id, id_1, true)); - profiles = instance_admin_->ListAppProfiles(instance_id); - ASSERT_STATUS_OK(profiles); - EXPECT_THAT(profile_names(*profiles), Not(Contains(name_1))); - EXPECT_THAT(profile_names(*profiles), Contains(name_2).Times(1)); - - ASSERT_STATUS_OK(instance_admin_->DeleteAppProfile(instance_id, id_2, true)); - profiles = instance_admin_->ListAppProfiles(instance_id); - ASSERT_STATUS_OK(profiles); - EXPECT_THAT(profile_names(*profiles), Not(Contains(name_1))); - EXPECT_THAT(profile_names(*profiles), Not(Contains(name_2))); - - ASSERT_STATUS_OK(instance_admin_->DeleteInstance(instance_id)); + ASSERT_STATUS_OK(instance_admin_->DeleteAppProfile( + AppProfileName(project_id_, instance_id, id_1), true)); + profiles = instance_admin_->ListAppProfiles(instance_name); + names = profile_names(profiles); + ASSERT_STATUS_OK(names); + EXPECT_THAT((*names), Not(Contains(name_1))); + EXPECT_THAT(*names, Contains(name_2).Times(1)); + + ASSERT_STATUS_OK(instance_admin_->DeleteAppProfile( + AppProfileName(project_id_, instance_id, id_2), true)); + profiles = instance_admin_->ListAppProfiles(instance_name); + names = profile_names(profiles); + ASSERT_STATUS_OK(names); + EXPECT_THAT(*names, Not(Contains(name_1))); + EXPECT_THAT(*names, Not(Contains(name_2))); + + ASSERT_STATUS_OK(instance_admin_->DeleteInstance(instance_name)); } /// @test Verify that Instance CRUD operations work as expected. @@ -237,24 +269,27 @@ TEST_F(InstanceAdminIntegrationTest, CreateListGetDeleteInstanceTest) { // Create instance auto config = IntegrationTestConfig(instance_id, zone_a_); - auto instance = instance_admin_->CreateInstance(config).get(); + auto create_request = config.as_proto(); + create_request.set_parent(Project(project_id_).FullName()); + auto instance = instance_admin_->CreateInstance(create_request).get(); ASSERT_STATUS_OK(instance); - auto const zone_a = Location(instance_admin_->project_name(), zone_a_); - auto const zone_b = Location(instance_admin_->project_name(), zone_b_); + auto project = google::cloud::Project(project_id_); + auto const zone_a = Location(project.FullName(), zone_a_); + auto const zone_b = Location(project.FullName(), zone_b_); // List instances - auto instances = instance_admin_->ListInstances(); + auto instances = instance_admin_->ListInstances(project.FullName()); ASSERT_STATUS_OK(instances); // If either zone_a_ or zone_b_ are in the list of failed locations then we // cannot proceed. ASSERT_THAT( - instances->failed_locations, + instances->failed_locations(), Not(AnyOf(Contains(zone_a.FullName()), Contains(zone_b.FullName())))); - EXPECT_TRUE(IsInstancePresent(instances->instances, instance->name())); + EXPECT_TRUE(IsInstancePresent(instances->instances(), instance->name())); // Get instance - instance = instance_admin_->GetInstance(instance_id); + instance = instance_admin_->GetInstance(instance_name); ASSERT_STATUS_OK(instance); EXPECT_EQ(instance->name(), instance_name); @@ -263,31 +298,33 @@ TEST_F(InstanceAdminIntegrationTest, CreateListGetDeleteInstanceTest) { auto const updated_display_name = instance_id.substr(0, 22) + " updated"; instance_update_config.set_display_name(updated_display_name); instance = - instance_admin_->UpdateInstance(std::move(instance_update_config)).get(); + instance_admin_->PartialUpdateInstance(instance_update_config.as_proto()) + .get(); ASSERT_STATUS_OK(instance); // Verify update - instance = instance_admin_->GetInstance(instance_id); + instance = instance_admin_->GetInstance(instance_name); ASSERT_STATUS_OK(instance); EXPECT_EQ(updated_display_name, instance->display_name()); // Delete instance - ASSERT_STATUS_OK(instance_admin_->DeleteInstance(instance_id)); + ASSERT_STATUS_OK(instance_admin_->DeleteInstance(instance_name)); // Verify delete - instances = instance_admin_->ListInstances(); + instances = instance_admin_->ListInstances(project.FullName()); ASSERT_STATUS_OK(instances); // If either zone_a_ or zone_b_ are in the list of failed locations then we // cannot proceed. ASSERT_THAT( - instances->failed_locations, + instances->failed_locations(), Not(AnyOf(Contains(zone_a.FullName()), Contains(zone_b.FullName())))); - EXPECT_FALSE(IsInstancePresent(instances->instances, instance_name)); + EXPECT_FALSE(IsInstancePresent(instances->instances(), instance_name)); } /// @test Verify that cluster CRUD operations work as expected. TEST_F(InstanceAdminIntegrationTest, CreateListGetDeleteClusterTest) { auto const instance_id = RandomInstanceId(generator_); + auto const instance_name = InstanceName(project_id_, instance_id); auto const cluster_id = instance_id + "-cl2"; auto const cluster_name = bigtable::ClusterName(project_id_, instance_id, cluster_id); @@ -295,25 +332,28 @@ TEST_F(InstanceAdminIntegrationTest, CreateListGetDeleteClusterTest) { // Create instance prerequisites for cluster operations auto config = IntegrationTestConfig(instance_id, zone_a_, bigtable::InstanceConfig::PRODUCTION, 3); - auto instance = instance_admin_->CreateInstance(config).get(); + auto create_request = config.as_proto(); + create_request.set_parent(Project(project_id_).FullName()); + auto instance = instance_admin_->CreateInstance(create_request).get(); ASSERT_STATUS_OK(instance); // Create cluster auto cluster_config = bigtable::ClusterConfig(zone_b_, 3, bigtable::ClusterConfig::HDD); auto cluster = - instance_admin_->CreateCluster(cluster_config, instance_id, cluster_id) + instance_admin_ + ->CreateCluster(instance_name, cluster_id, cluster_config.as_proto()) .get(); ASSERT_STATUS_OK(cluster); EXPECT_EQ(3, cluster->serve_nodes()); // Verify create - auto clusters = instance_admin_->ListClusters(instance_id); + auto clusters = instance_admin_->ListClusters(instance_name); ASSERT_STATUS_OK(clusters); - EXPECT_TRUE(IsClusterPresent(clusters->clusters, cluster->name())); + EXPECT_TRUE(IsClusterPresent(clusters->clusters(), cluster->name())); // Get cluster - cluster = instance_admin_->GetCluster(instance_id, cluster_id); + cluster = instance_admin_->GetCluster(cluster_name); ASSERT_STATUS_OK(cluster); EXPECT_EQ(cluster_name, cluster->name()); @@ -322,53 +362,57 @@ TEST_F(InstanceAdminIntegrationTest, CreateListGetDeleteClusterTest) { cluster->clear_state(); bigtable::ClusterConfig updated_cluster_config(std::move(*cluster)); cluster = - instance_admin_->UpdateCluster(std::move(updated_cluster_config)).get(); + instance_admin_->UpdateCluster(updated_cluster_config.as_proto()).get(); ASSERT_STATUS_OK(cluster); // Verify update - cluster = instance_admin_->GetCluster(instance_id, cluster_id); + cluster = instance_admin_->GetCluster(cluster_name); ASSERT_STATUS_OK(cluster); EXPECT_EQ(4, cluster->serve_nodes()); // Delete cluster - ASSERT_STATUS_OK(instance_admin_->DeleteCluster(instance_id, cluster_id)); + ASSERT_STATUS_OK(instance_admin_->DeleteCluster(cluster_name)); // Verify delete - clusters = instance_admin_->ListClusters(instance_id); + clusters = instance_admin_->ListClusters(instance_name); ASSERT_STATUS_OK(clusters); - EXPECT_FALSE(IsClusterPresent(clusters->clusters, cluster_name)); + EXPECT_FALSE(IsClusterPresent(clusters->clusters(), cluster_name)); // Delete instance - ASSERT_STATUS_OK(instance_admin_->DeleteInstance(instance_id)); + ASSERT_STATUS_OK(instance_admin_->DeleteInstance(instance_name)); } /// @test Verify that IAM Policy Native APIs work as expected. TEST_F(InstanceAdminIntegrationTest, SetGetTestIamNativeAPIsTest) { auto const instance_id = RandomInstanceId(generator_); + auto const instance_name = InstanceName(project_id_, instance_id); // create instance prerequisites for cluster operations auto config = IntegrationTestConfig(instance_id, zone_a_, bigtable::InstanceConfig::PRODUCTION, 3); - ASSERT_STATUS_OK(instance_admin_->CreateInstance(config).get()); + auto create_request = config.as_proto(); + create_request.set_parent(Project(project_id_).FullName()); + ASSERT_STATUS_OK(instance_admin_->CreateInstance(create_request).get()); auto iam_policy = bigtable::IamPolicy({bigtable::IamBinding( "roles/bigtable.reader", {"serviceAccount:" + service_account_})}); - auto initial_policy = instance_admin_->SetIamPolicy(instance_id, iam_policy); + auto initial_policy = + instance_admin_->SetIamPolicy(instance_name, iam_policy); ASSERT_STATUS_OK(initial_policy); - auto fetched_policy = instance_admin_->GetNativeIamPolicy(instance_id); + auto fetched_policy = instance_admin_->GetIamPolicy(instance_name); ASSERT_STATUS_OK(fetched_policy); EXPECT_EQ(initial_policy->version(), fetched_policy->version()); EXPECT_EQ(initial_policy->etag(), fetched_policy->etag()); auto permission_set = instance_admin_->TestIamPermissions( - instance_id, {"bigtable.tables.list", "bigtable.tables.delete"}); + instance_name, {"bigtable.tables.list", "bigtable.tables.delete"}); ASSERT_STATUS_OK(permission_set); - EXPECT_EQ(2, permission_set->size()); - EXPECT_STATUS_OK(instance_admin_->DeleteInstance(instance_id)); + EXPECT_EQ(2, permission_set->permissions().size()); + EXPECT_STATUS_OK(instance_admin_->DeleteInstance(instance_name)); } /// @test Verify that Instance CRUD operations with logging work as expected. @@ -382,32 +426,34 @@ TEST_F(InstanceAdminIntegrationTest, testing_util::ScopedLog log; auto const instance_id = RandomInstanceId(generator_); auto const instance_name = bigtable::InstanceName(project_id_, instance_id); - - auto instance_admin_client = bigtable::MakeInstanceAdminClient( - project_id_, Options{}.set({"rpc"})); + Project const project(project_id_); auto instance_admin = - std::make_unique(instance_admin_client); + std::make_unique( + bigtable_admin::MakeBigtableInstanceAdminConnection( + Options{}.set({"rpc"}))); - auto const zone_a = Location(instance_admin_->project_name(), zone_a_); - auto const zone_b = Location(instance_admin_->project_name(), zone_b_); + auto const zone_a = Location(project.FullName(), zone_a_); + auto const zone_b = Location(project.FullName(), zone_b_); // Create instance auto config = IntegrationTestConfig(instance_id, zone_a_); - auto instance = instance_admin->CreateInstance(config).get(); + auto create_request = config.as_proto(); + create_request.set_parent(project.FullName()); + auto instance = instance_admin->CreateInstance(create_request).get(); ASSERT_STATUS_OK(instance); // Verify create - auto instances = instance_admin->ListInstances(); + auto instances = instance_admin->ListInstances(project.FullName()); ASSERT_STATUS_OK(instances); // If either zone_a_ or zone_b_ are in the list of failed locations then we // cannot proceed. ASSERT_THAT( - instances->failed_locations, + instances->failed_locations(), Not(AnyOf(Contains(zone_a.FullName()), Contains(zone_b.FullName())))); - EXPECT_TRUE(IsInstancePresent(instances->instances, instance->name())); + EXPECT_TRUE(IsInstancePresent(instances->instances(), instance->name())); // Get instance - instance = instance_admin->GetInstance(instance_id); + instance = instance_admin->GetInstance(instance_name); ASSERT_STATUS_OK(instance); EXPECT_EQ(instance->name(), instance_name); @@ -416,26 +462,27 @@ TEST_F(InstanceAdminIntegrationTest, auto const updated_display_name = instance_id.substr(0, 22) + " updated"; instance_update_config.set_display_name(updated_display_name); instance = - instance_admin->UpdateInstance(std::move(instance_update_config)).get(); + instance_admin->PartialUpdateInstance(instance_update_config.as_proto()) + .get(); ASSERT_STATUS_OK(instance); // Verify update - instance = instance_admin->GetInstance(instance_id); + instance = instance_admin->GetInstance(instance_name); ASSERT_STATUS_OK(instance); EXPECT_EQ(updated_display_name, instance->display_name()); // Delete instance - ASSERT_STATUS_OK(instance_admin->DeleteInstance(instance_id)); + ASSERT_STATUS_OK(instance_admin->DeleteInstance(instance_name)); // Verify delete - instances = instance_admin->ListInstances(); + instances = instance_admin->ListInstances(project.FullName()); ASSERT_STATUS_OK(instances); // If either zone_a_ or zone_b_ are in the list of failed locations then we // cannot proceed. ASSERT_THAT( - instances->failed_locations, + instances->failed_locations(), Not(AnyOf(Contains(zone_a.FullName()), Contains(zone_b.FullName())))); - EXPECT_FALSE(IsInstancePresent(instances->instances, instance_name)); + EXPECT_FALSE(IsInstancePresent(instances->instances(), instance_name)); auto const log_lines = log.ExtractLines(); EXPECT_THAT(log_lines, Contains(HasSubstr("ListInstances"))); @@ -445,22 +492,28 @@ TEST_F(InstanceAdminIntegrationTest, EXPECT_THAT(log_lines, Contains(HasSubstr("DeleteInstance"))); // Verify that a normal client does not log. - auto no_logging_client = InstanceAdmin(MakeInstanceAdminClient(project_id_)); - (void)no_logging_client.ListInstances(); + auto no_logging_client = + std::make_unique( + bigtable_admin::MakeBigtableInstanceAdminConnection()); + (void)no_logging_client->ListInstances(project.FullName()); EXPECT_THAT(log.ExtractLines(), Not(Contains(HasSubstr("ListInstances")))); } TEST_F(InstanceAdminIntegrationTest, CustomWorkers) { CompletionQueue cq; - auto instance_admin_client = bigtable::MakeInstanceAdminClient( - project_id_, Options{}.set(cq)); instance_admin_ = - std::make_unique(instance_admin_client); + std::make_unique( + bigtable_admin::MakeBigtableInstanceAdminConnection( + Options{}.set(cq))); // CompletionQueue `cq` is not being `Run()`, so this should never finish. auto const instance_id = RandomInstanceId(generator_); - auto instance_fut = instance_admin_->CreateInstance(IntegrationTestConfig( - instance_id, zone_a_, bigtable::InstanceConfig::PRODUCTION, 3)); + auto create_request = + IntegrationTestConfig(instance_id, zone_a_, + bigtable::InstanceConfig::PRODUCTION, 3) + .as_proto(); + create_request.set_parent(Project(project_id_).FullName()); + auto instance_fut = instance_admin_->CreateInstance(create_request); EXPECT_EQ(std::future_status::timeout, instance_fut.wait_for(std::chrono::milliseconds(100))); @@ -468,13 +521,13 @@ TEST_F(InstanceAdminIntegrationTest, CustomWorkers) { std::thread t([cq]() mutable { cq.Run(); }); auto instance = instance_fut.get(); ASSERT_STATUS_OK(instance); - EXPECT_STATUS_OK(instance_admin_->DeleteInstance(instance_id)); + EXPECT_STATUS_OK( + instance_admin_->DeleteInstance(InstanceName(project_id_, instance_id))); cq.CancelAll(); cq.Shutdown(); t.join(); } - } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigtable diff --git a/google/cloud/bigtable/tests/mutations_integration_test.cc b/google/cloud/bigtable/tests/mutations_integration_test.cc index ccd9e7ad3c574..6efaf27f79a85 100644 --- a/google/cloud/bigtable/tests/mutations_integration_test.cc +++ b/google/cloud/bigtable/tests/mutations_integration_test.cc @@ -62,7 +62,7 @@ std::string const kColumnFamily3 = "family3"; * Cloud Bigtable */ TEST_F(MutationIntegrationTest, SetCellTest) { - auto table = GetTable("with-data-connection"); + auto table = GetTable(); // Create a vector of cells which will be inserted into bigtable std::string const row_key = "SetCellRowKey"; @@ -86,7 +86,7 @@ TEST_F(MutationIntegrationTest, SetCellTest) { * correctly inserted into Cloud Bigtable */ TEST_F(MutationIntegrationTest, SetCellNumericValueTest) { - auto table = GetTable("with-data-connection"); + auto table = GetTable(); // Create a vector of cells which will be inserted into bigtable std::string const row_key = "SetCellNumRowKey"; @@ -129,7 +129,7 @@ TEST_F(MutationIntegrationTest, SetCellNumericValueErrorTest) { * correctly inserted into Cloud Bigtable. */ TEST_F(MutationIntegrationTest, SetCellIgnoreTimestampTest) { - auto table = GetTable("with-data-connection"); + auto table = GetTable(); // Create a vector of cell which will be inserted into bigtable std::string const row_key = "SetCellRowKey"; @@ -167,7 +167,7 @@ TEST_F(MutationIntegrationTest, SetCellIgnoreTimestampTest) { * Bigtable. */ TEST_F(MutationIntegrationTest, DeleteFromColumnForTimestampRangeTest) { - auto table = GetTable("with-data-connection"); + auto table = GetTable(); // Create a vector of cell which will be inserted into bigtable std::string const row_key = "DeleteColumn-Key"; @@ -212,7 +212,7 @@ TEST_F(MutationIntegrationTest, DeleteFromColumnForTimestampRangeTest) { * We expect the server (and not the client library) to reject invalid ranges. */ TEST_F(MutationIntegrationTest, DeleteFromColumnForReversedTimestampRangeTest) { - auto table = GetTable("with-data-connection"); + auto table = GetTable(); // Create a vector of cell which will be inserted into bigtable std::string const key = "row"; @@ -245,7 +245,7 @@ TEST_F(MutationIntegrationTest, DeleteFromColumnForReversedTimestampRangeTest) { * We expect the server (and not the client library) to reject invalid ranges. */ TEST_F(MutationIntegrationTest, DeleteFromColumnForEmptyTimestampRangeTest) { - auto table = GetTable("with-data-connection"); + auto table = GetTable(); // Create a vector of cell which will be inserted into bigtable std::string const key = "row"; @@ -270,7 +270,7 @@ TEST_F(MutationIntegrationTest, DeleteFromColumnForEmptyTimestampRangeTest) { * is deleting all records only for that column_identifier. */ TEST_F(MutationIntegrationTest, DeleteFromColumnForAllTest) { - auto table = GetTable("with-data-connection"); + auto table = GetTable(); // Create a vector of cell which will be inserted into bigtable std::string const row_key = "DeleteColumnForAll-Key"; @@ -304,7 +304,7 @@ TEST_F(MutationIntegrationTest, DeleteFromColumnForAllTest) { * timestamp only. */ TEST_F(MutationIntegrationTest, DeleteFromColumnStartingFromTest) { - auto table = GetTable("with-data-connection"); + auto table = GetTable(); // Create a vector of cell which will be inserted into bigtable std::string const row_key = "DeleteColumnStartingFrom-Key"; @@ -341,7 +341,7 @@ TEST_F(MutationIntegrationTest, DeleteFromColumnStartingFromTest) { * timestamp only. end_timestamp is not inclusive. */ TEST_F(MutationIntegrationTest, DeleteFromColumnEndingAtTest) { - auto table = GetTable("with-data-connection"); + auto table = GetTable(); // Create a vector of cell which will be inserted into bigtable cloud std::string const row_key = "DeleteColumnEndingAt-Key"; @@ -379,7 +379,7 @@ TEST_F(MutationIntegrationTest, DeleteFromColumnEndingAtTest) { * records for that family only */ TEST_F(MutationIntegrationTest, DeleteFromFamilyTest) { - auto table = GetTable("with-data-connection"); + auto table = GetTable(); // Create a vector of cell which will be inserted into bigtable std::string const row_key = "DeleteFamily-Key"; @@ -411,7 +411,7 @@ TEST_F(MutationIntegrationTest, DeleteFromFamilyTest) { * records for that row only */ TEST_F(MutationIntegrationTest, DeleteFromRowTest) { - auto table = GetTable("with-data-connection"); + auto table = GetTable(); // Create a vector of cell which will be inserted into bigtable std::string const row_key1 = "DeleteRowKey1"; diff --git a/google/cloud/bigtable/tests/admin_backup_integration_test.cc b/google/cloud/bigtable/tests/table_admin_backup_integration_test.cc similarity index 55% rename from google/cloud/bigtable/tests/admin_backup_integration_test.cc rename to google/cloud/bigtable/tests/table_admin_backup_integration_test.cc index 98e663204ded1..be2795cbfe721 100644 --- a/google/cloud/bigtable/tests/admin_backup_integration_test.cc +++ b/google/cloud/bigtable/tests/table_admin_backup_integration_test.cc @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "google/cloud/bigtable/instance_admin.h" -#include "google/cloud/bigtable/table_admin.h" +#include "google/cloud/bigtable/admin/bigtable_instance_admin_client.h" +#include "google/cloud/bigtable/admin/bigtable_table_admin_client.h" #include "google/cloud/bigtable/testing/table_integration_test.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/internal/random.h" @@ -41,22 +41,17 @@ namespace bigtable = ::google::cloud::bigtable; class AdminBackupIntegrationTest : public bigtable::testing::TableIntegrationTest { protected: - std::unique_ptr table_admin_; - std::unique_ptr instance_admin_; - void SetUp() override { TableIntegrationTest::SetUp(); - - std::shared_ptr admin_client = - bigtable::MakeAdminClient( - bigtable::testing::TableTestEnvironment::project_id()); - table_admin_ = std::make_unique( - admin_client, bigtable::testing::TableTestEnvironment::instance_id()); - auto instance_admin_client = bigtable::MakeInstanceAdminClient( - bigtable::testing::TableTestEnvironment::project_id()); + table_admin_ = std::make_unique( + bigtable_admin::MakeBigtableTableAdminConnection()); instance_admin_ = - std::make_unique(instance_admin_client); + std::make_unique( + bigtable_admin::MakeBigtableInstanceAdminConnection()); } + + std::unique_ptr table_admin_; + std::unique_ptr instance_admin_; }; /// @test Verify that `bigtable::TableAdmin` Backup CRUD operations work as @@ -66,14 +61,16 @@ TEST_F(AdminBackupIntegrationTest, CreateListGetUpdateRestoreDeleteBackup) { auto const table_name = bigtable::TableName(project_id(), instance_id(), table_id); - auto clusters = instance_admin_->ListClusters(table_admin_->instance_id()); + auto clusters = instance_admin_->ListClusters( + bigtable::InstanceName(project_id(), instance_id())); ASSERT_STATUS_OK(clusters); - auto const cluster_name = clusters->clusters.begin()->name(); + auto const cluster_name = clusters->clusters().begin()->name(); auto const cluster_id = cluster_name.substr(cluster_name.rfind('/') + 1, cluster_name.size() - cluster_name.rfind('/')); auto const backup_id = RandomBackupId(); - auto const backup_name = cluster_name + "/backups/" + backup_id; + auto backup_name = + bigtable::BackupName(project_id(), instance_id(), cluster_id, backup_id); // Create backup // The proto documentation says backup expiration times are in "microseconds @@ -82,28 +79,42 @@ TEST_F(AdminBackupIntegrationTest, CreateListGetUpdateRestoreDeleteBackup) { auto expire_time = std::chrono::time_point_cast( std::chrono::system_clock::now() + std::chrono::hours(12)); - auto backup = table_admin_->CreateBackup( - {cluster_id, backup_id, table_id, expire_time}); + google::bigtable::admin::v2::Backup b; + *b.mutable_expire_time() = ToProtoTimestamp(expire_time); + auto backup = table_admin_ + ->CreateBackup(bigtable::ClusterName( + project_id(), instance_id(), cluster_id), + backup_id, b) + .get(); + ASSERT_STATUS_OK(backup); EXPECT_EQ(backup->name(), backup_name); // List backups to verify new backup has been created - auto backups = table_admin_->ListBackups({}); - ASSERT_STATUS_OK(backups); - EXPECT_THAT(BackupNames(*backups), Contains(backup_name)); + auto backups = table_admin_->ListBackups(table_name); + std::vector backups_list; + for (auto& b : backups) { + ASSERT_STATUS_OK(b); + backups_list.push_back(*b); + } + EXPECT_THAT(BackupNames(backups_list), Contains(backup_name)); // Get backup to verify create - backup = table_admin_->GetBackup(cluster_id, backup_id); + backup = table_admin_->GetBackup(backup_name); ASSERT_STATUS_OK(backup); EXPECT_EQ(backup->name(), backup_name); // Update backup expire_time += std::chrono::hours(12); - backup = table_admin_->UpdateBackup({cluster_id, backup_id, expire_time}); + google::bigtable::admin::v2::Backup update_backup = *backup; + *update_backup.mutable_expire_time() = ToProtoTimestamp(expire_time); + google::protobuf::FieldMask update_mask; + update_mask.add_paths("expire_time"); + backup = table_admin_->UpdateBackup(update_backup, update_mask); ASSERT_STATUS_OK(backup); // Verify the update - backup = table_admin_->GetBackup(cluster_id, backup_id); + backup = table_admin_->GetBackup(backup_name); ASSERT_STATUS_OK(backup); EXPECT_EQ(backup->name(), backup_name); EXPECT_THAT(backup->expire_time(), @@ -113,21 +124,37 @@ TEST_F(AdminBackupIntegrationTest, CreateListGetUpdateRestoreDeleteBackup) { EXPECT_STATUS_OK(table_admin_->DeleteTable(table_id)); // Verify the delete - auto tables = table_admin_->ListTables(btadmin::Table::NAME_ONLY); - ASSERT_STATUS_OK(tables); - EXPECT_THAT(TableNames(*tables), Not(Contains(table_name))); + google::bigtable::admin::v2::ListTablesRequest list_request; + list_request.set_parent(bigtable::InstanceName(project_id(), instance_id())); + list_request.set_view(btadmin::Table::NAME_ONLY); + auto tables = table_admin_->ListTables(list_request); + std::vector table_list; + for (auto& t : tables) { + ASSERT_STATUS_OK(t); + table_list.push_back(*t); + } + EXPECT_THAT(TableNames(table_list), Not(Contains(table_name))); // Restore table - auto table = table_admin_->RestoreTable({table_id, cluster_id, backup_id}); + google::bigtable::admin::v2::RestoreTableRequest restore_request; + restore_request.set_parent( + bigtable::InstanceName(project_id(), instance_id())); + restore_request.set_backup(backup_name); + restore_request.set_table_id(table_name); + auto table = table_admin_->RestoreTable(restore_request).get(); EXPECT_STATUS_OK(table); // Verify the restore - tables = table_admin_->ListTables(btadmin::Table::NAME_ONLY); - ASSERT_STATUS_OK(tables); - EXPECT_THAT(TableNames(*tables), Contains(table_name).Times(1)); + tables = table_admin_->ListTables(list_request); + table_list.clear(); + for (auto& t : tables) { + ASSERT_STATUS_OK(t); + table_list.push_back(*t); + } + EXPECT_THAT(TableNames(table_list), Contains(table_name).Times(1)); // Delete backup - EXPECT_STATUS_OK(table_admin_->DeleteBackup(cluster_id, backup_id)); + EXPECT_STATUS_OK(table_admin_->DeleteBackup(backup_name)); } } // namespace diff --git a/google/cloud/bigtable/tests/admin_iam_policy_integration_test.cc b/google/cloud/bigtable/tests/table_admin_iam_policy_integration_test.cc similarity index 76% rename from google/cloud/bigtable/tests/admin_iam_policy_integration_test.cc rename to google/cloud/bigtable/tests/table_admin_iam_policy_integration_test.cc index 9a0a531325226..fd7927804e961 100644 --- a/google/cloud/bigtable/tests/admin_iam_policy_integration_test.cc +++ b/google/cloud/bigtable/tests/table_admin_iam_policy_integration_test.cc @@ -12,8 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "google/cloud/bigtable/instance_admin.h" -#include "google/cloud/bigtable/table_admin.h" +#include "google/cloud/bigtable/admin/bigtable_table_admin_client.h" +#include "google/cloud/bigtable/iam_binding.h" +#include "google/cloud/bigtable/iam_policy.h" #include "google/cloud/bigtable/testing/table_integration_test.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/testing_util/chrono_literals.h" @@ -29,10 +30,6 @@ namespace { class AdminIAMPolicyIntegrationTest : public bigtable::testing::TableIntegrationTest { protected: - std::shared_ptr admin_client_; - std::unique_ptr table_admin_; - std::string service_account_; - void SetUp() override { TableIntegrationTest::SetUp(); @@ -41,34 +38,37 @@ class AdminIAMPolicyIntegrationTest .value_or(""); ASSERT_FALSE(service_account_.empty()); - admin_client_ = - MakeAdminClient(testing::TableTestEnvironment::project_id()); - table_admin_ = std::make_unique( - admin_client_, bigtable::testing::TableTestEnvironment::instance_id()); + table_admin_ = std::make_unique( + bigtable_admin::MakeBigtableTableAdminConnection()); } + + std::string service_account_; + std::unique_ptr table_admin_; }; /// @test Verify that IAM Policy APIs work as expected. TEST_F(AdminIAMPolicyIntegrationTest, SetGetTestIamAPIsTest) { auto const table_id = bigtable::testing::TableTestEnvironment::table_id(); + auto table_name = bigtable::TableName(project_id(), instance_id(), table_id); + auto iam_policy = bigtable::IamPolicy({bigtable::IamBinding( "roles/bigtable.reader", {"serviceAccount:" + service_account_})}); - auto initial_policy = table_admin_->SetIamPolicy(table_id, iam_policy); + auto initial_policy = table_admin_->SetIamPolicy(table_name, iam_policy); ASSERT_STATUS_OK(initial_policy); - auto fetched_policy = table_admin_->GetIamPolicy(table_id); + auto fetched_policy = table_admin_->GetIamPolicy(table_name); ASSERT_STATUS_OK(fetched_policy); EXPECT_EQ(initial_policy->version(), fetched_policy->version()); EXPECT_EQ(initial_policy->etag(), fetched_policy->etag()); auto permission_set = table_admin_->TestIamPermissions( - table_id, {"bigtable.tables.get", "bigtable.tables.readRows"}); + table_name, {"bigtable.tables.get", "bigtable.tables.readRows"}); ASSERT_STATUS_OK(permission_set); - EXPECT_EQ(2, permission_set->size()); + EXPECT_EQ(2, permission_set->permissions().size()); } } // namespace diff --git a/google/cloud/bigtable/tests/admin_integration_test.cc b/google/cloud/bigtable/tests/table_admin_integration_test.cc similarity index 57% rename from google/cloud/bigtable/tests/admin_integration_test.cc rename to google/cloud/bigtable/tests/table_admin_integration_test.cc index fd056d5382c2f..5fcb2a86468d0 100644 --- a/google/cloud/bigtable/tests/admin_integration_test.cc +++ b/google/cloud/bigtable/tests/table_admin_integration_test.cc @@ -12,9 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "google/cloud/bigtable/instance_admin.h" -#include "google/cloud/bigtable/table_admin.h" +#include "google/cloud/bigtable/admin/bigtable_instance_admin_client.h" +#include "google/cloud/bigtable/admin/bigtable_table_admin_client.h" +#include "google/cloud/bigtable/cluster_config.h" +#include "google/cloud/bigtable/instance_config.h" +#include "google/cloud/bigtable/table_config.h" #include "google/cloud/bigtable/testing/table_integration_test.h" +#include "google/cloud/common_options.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/internal/random.h" #include "google/cloud/testing_util/chrono_literals.h" @@ -38,53 +42,65 @@ using ::testing::Not; namespace btadmin = ::google::bigtable::admin::v2; -class AdminIntegrationTest : public bigtable::testing::TableIntegrationTest { +class TableAdminIntegrationTest + : public bigtable::testing::TableIntegrationTest { protected: - std::unique_ptr table_admin_; + std::unique_ptr table_admin_; void SetUp() override { TableIntegrationTest::SetUp(); - std::shared_ptr admin_client = - bigtable::MakeAdminClient( - bigtable::testing::TableTestEnvironment::project_id()); - table_admin_ = std::make_unique( - admin_client, bigtable::testing::TableTestEnvironment::instance_id()); + table_admin_ = std::make_unique( + bigtable_admin::MakeBigtableTableAdminConnection()); } }; -TEST_F(AdminIntegrationTest, TableListWithMultipleTables) { +TEST_F(TableAdminIntegrationTest, TableListWithMultipleTables) { std::vector ids; std::vector expected_tables; + auto instance_name = bigtable::InstanceName(project_id(), instance_id()); + // Create tables int constexpr kTableCount = 5; for (int index = 0; index < kTableCount; ++index) { std::string table_id = RandomTableId(); - EXPECT_STATUS_OK(table_admin_->CreateTable(table_id, {})); + EXPECT_STATUS_OK(table_admin_->CreateTable(instance_name, table_id, {})); ids.emplace_back(table_id); expected_tables.emplace_back( bigtable::TableName(project_id(), instance_id(), std::move(table_id))); } - auto tables = table_admin_->ListTables(btadmin::Table::NAME_ONLY); - ASSERT_STATUS_OK(tables); - EXPECT_THAT(TableNames(*tables), IsSupersetOf(expected_tables)); + google::bigtable::admin::v2::ListTablesRequest list_request; + list_request.set_parent(instance_name); + list_request.set_view(btadmin::Table::NAME_ONLY); + auto tables = table_admin_->ListTables(list_request); + std::vector table_list; + for (auto& t : tables) { + ASSERT_STATUS_OK(t); + table_list.push_back(*t); + } + EXPECT_THAT(TableNames(table_list), IsSupersetOf(expected_tables)); // Delete the tables so future tests have a clean slate. for (auto const& table_id : ids) { - EXPECT_STATUS_OK(table_admin_->DeleteTable(table_id)); + EXPECT_STATUS_OK(table_admin_->DeleteTable( + TableName(project_id(), instance_id(), table_id))); } // Verify the tables were deleted. - tables = table_admin_->ListTables(btadmin::Table::NAME_ONLY); - ASSERT_STATUS_OK(tables); - auto names = TableNames(*tables); + tables = table_admin_->ListTables(list_request); + table_list.clear(); + for (auto& t : tables) { + ASSERT_STATUS_OK(t); + table_list.push_back(*t); + } + auto names = TableNames(table_list); for (auto const& t : expected_tables) { EXPECT_THAT(names, Not(Contains(t))); } } -TEST_F(AdminIntegrationTest, DropRowsByPrefix) { +TEST_F(TableAdminIntegrationTest, DropRowsByPrefix) { auto table = GetTable(); // Create a vector of cell which will be inserted into bigtable @@ -109,14 +125,15 @@ TEST_F(AdminIntegrationTest, DropRowsByPrefix) { // Create records CreateCells(table, created_cells); // Delete all the records for a row - EXPECT_STATUS_OK(table_admin_->DropRowsByPrefix( - bigtable::testing::TableTestEnvironment::table_id(), row_key1_prefix)); + google::bigtable::admin::v2::DropRowRangeRequest drop_rows_by_prefix; + drop_rows_by_prefix.set_name(table.table_name()); + drop_rows_by_prefix.set_row_key_prefix(row_key1_prefix); + EXPECT_STATUS_OK(table_admin_->DropRowRange(drop_rows_by_prefix)); auto actual_cells = ReadRows(table, bigtable::Filter::PassAllFilter()); - CheckEqualUnordered(expected_cells, actual_cells); } -TEST_F(AdminIntegrationTest, DropAllRows) { +TEST_F(TableAdminIntegrationTest, DropAllRows) { auto table = GetTable(); // Create a vector of cell which will be inserted into bigtable @@ -133,19 +150,21 @@ TEST_F(AdminIntegrationTest, DropAllRows) { // Create records CreateCells(table, created_cells); // Delete all the records from a table - EXPECT_STATUS_OK(table_admin_->DropAllRows( - bigtable::testing::TableTestEnvironment::table_id())); + google::bigtable::admin::v2::DropRowRangeRequest drop_all_rows; + drop_all_rows.set_name(table.table_name()); + drop_all_rows.set_delete_all_data_from_table(true); + EXPECT_STATUS_OK(table_admin_->DropRowRange(drop_all_rows)); auto actual_cells = ReadRows(table, bigtable::Filter::PassAllFilter()); - ASSERT_TRUE(actual_cells.empty()); } /// @test Verify that `bigtable::TableAdmin` CRUD operations work as expected. -TEST_F(AdminIntegrationTest, CreateListGetDeleteTable) { +TEST_F(TableAdminIntegrationTest, CreateListGetDeleteTable) { using GC = bigtable::GcRule; auto const table_id = RandomTableId(); auto const table_name = bigtable::TableName(project_id(), instance_id(), table_id); + auto const instance_name = InstanceName(project_id(), instance_id()); // Create table config bigtable::TableConfig table_config( @@ -154,16 +173,28 @@ TEST_F(AdminIntegrationTest, CreateListGetDeleteTable) { {"a1000", "a2000", "b3000", "m5000"}); // Create table - ASSERT_STATUS_OK(table_admin_->CreateTable(table_id, table_config)); - bigtable::Table table(data_client_, table_id); + google::bigtable::admin::v2::CreateTableRequest create_request = + std::move(table_config).as_proto(); + create_request.set_parent(instance_name); + create_request.set_table_id(table_id); + ASSERT_STATUS_OK(table_admin_->CreateTable(create_request)); + bigtable::Table table(MakeDataConnection(), + TableResource(project_id(), instance_id(), table_id)); // List tables - auto tables = table_admin_->ListTables(btadmin::Table::NAME_ONLY); - ASSERT_STATUS_OK(tables); - EXPECT_THAT(TableNames(*tables), Contains(table_name)); + google::bigtable::admin::v2::ListTablesRequest list_request; + list_request.set_parent(instance_name); + list_request.set_view(btadmin::Table::NAME_ONLY); + auto tables = table_admin_->ListTables(list_request); + auto table_list = TableNames(tables); + ASSERT_STATUS_OK(table_list); + EXPECT_THAT(*table_list, Contains(table_name)); // Get table - auto table_detailed = table_admin_->GetTable(table_id, btadmin::Table::FULL); + google::bigtable::admin::v2::GetTableRequest get_request; + get_request.set_name(table_name); + get_request.set_view(btadmin::Table::FULL); + auto table_detailed = table_admin_->GetTable(get_request); ASSERT_STATUS_OK(table_detailed); // Verify new table was created @@ -184,15 +215,20 @@ TEST_F(AdminIntegrationTest, CreateListGetDeleteTable) { EXPECT_EQ(1, count_matching_families(*table_detailed, "foo")); // Update table - std::vector column_modification_list = { - bigtable::ColumnFamilyModification::Create( - "newfam", GC::Intersection(GC::MaxAge(std::chrono::hours(7 * 24)), - GC::MaxNumVersions(1))), - bigtable::ColumnFamilyModification::Update("fam", GC::MaxNumVersions(2)), - bigtable::ColumnFamilyModification::Drop("foo")}; + std::vector< + google::bigtable::admin::v2::ModifyColumnFamiliesRequest::Modification> + column_modification_list = { + bigtable::ColumnFamilyModification::Create( + "newfam", GC::Intersection(GC::MaxAge(std::chrono::hours(7 * 24)), + GC::MaxNumVersions(1))) + .as_proto(), + bigtable::ColumnFamilyModification::Update("fam", + GC::MaxNumVersions(2)) + .as_proto(), + bigtable::ColumnFamilyModification::Drop("foo").as_proto()}; auto table_modified = - table_admin_->ModifyColumnFamilies(table_id, column_modification_list); + table_admin_->ModifyColumnFamilies(table_name, column_modification_list); ASSERT_STATUS_OK(table_modified); EXPECT_EQ(1, count_matching_families(*table_modified, "fam")); EXPECT_EQ(0, count_matching_families(*table_modified, "foo")); @@ -202,17 +238,18 @@ TEST_F(AdminIntegrationTest, CreateListGetDeleteTable) { EXPECT_EQ(2, gc.intersection().rules_size()); // Delete table - EXPECT_STATUS_OK(table_admin_->DeleteTable(table_id)); + EXPECT_STATUS_OK(table_admin_->DeleteTable(table_name)); // List to verify it is no longer there - tables = table_admin_->ListTables(btadmin::Table::NAME_ONLY); - ASSERT_STATUS_OK(tables); - EXPECT_THAT(TableNames(*tables), Not(Contains(table_name))); + tables = table_admin_->ListTables(list_request); + table_list = TableNames(tables); + ASSERT_STATUS_OK(table_list); + EXPECT_THAT(*table_list, Not(Contains(table_name))); } /// @test Verify that `bigtable::TableAdmin` WaitForConsistencyCheck works as /// expected. -TEST_F(AdminIntegrationTest, WaitForConsistencyCheck) { +TEST_F(TableAdminIntegrationTest, WaitForConsistencyCheck) { // WaitForConsistencyCheck() only makes sense on a replicated table, we need // to create an instance with at least 2 clusters to test it. auto const id = bigtable::testing::TableTestEnvironment::RandomInstanceId(); @@ -220,11 +257,13 @@ TEST_F(AdminIntegrationTest, WaitForConsistencyCheck) { // Create a bigtable::InstanceAdmin and a bigtable::TableAdmin to create the // new instance and the new table. - auto instance_admin_client = bigtable::MakeInstanceAdminClient(project_id()); - bigtable::InstanceAdmin instance_admin(instance_admin_client); - - auto admin_client = bigtable::MakeAdminClient(project_id()); - bigtable::TableAdmin table_admin(admin_client, id); + auto instance_admin = + std::make_unique( + bigtable_admin::MakeBigtableInstanceAdminConnection()); + auto table_admin_connection = + bigtable_admin::MakeBigtableTableAdminConnection(); + auto table_admin = std::make_unique( + table_admin_connection); // The instance configuration is involved, it needs two clusters, which must // be production clusters (and therefore have at least 3 nodes each), and @@ -242,7 +281,9 @@ TEST_F(AdminIntegrationTest, WaitForConsistencyCheck) { {{id + "-c1", cluster_config_1}, {id + "-c2", cluster_config_2}}); // Create the new instance. - auto instance = instance_admin.CreateInstance(config).get(); + auto create_request = config.as_proto(); + create_request.set_parent(Project(project_id()).FullName()); + auto instance = instance_admin->CreateInstance(create_request).get(); ASSERT_STATUS_OK(instance); // The table is going to be very simple, just one column family. @@ -251,14 +292,16 @@ TEST_F(AdminIntegrationTest, WaitForConsistencyCheck) { {{family, bigtable::GcRule::MaxNumVersions(10)}}, {}); // Create the new table. - auto table_created = table_admin.CreateTable(random_table_id, table_config); + auto request = std::move(table_config).as_proto(); + request.set_parent(InstanceName(project_id(), id)); + request.set_table_id(random_table_id); + auto table_created = table_admin->CreateTable(request); ASSERT_STATUS_OK(table_created); // We need to mutate the data in the table and then wait for those mutations // to propagate to both clusters. First create a `bigtable::Table` object. auto table = Table(MakeDataConnection(), TableResource(project_id(), id, random_table_id)); - // Insert some cells into the table. std::string const row_key1 = "check-consistency-row1"; std::string const row_key2 = "check-consistency-row2"; @@ -273,24 +316,33 @@ TEST_F(AdminIntegrationTest, WaitForConsistencyCheck) { // Create a consistency token after modifying the table. auto consistency_token = - table_admin.GenerateConsistencyToken(random_table_id); + table_admin->GenerateConsistencyToken(table_created->name()); ASSERT_STATUS_OK(consistency_token); // Wait until all the mutations before the `consistency_token` have propagated // everywhere. - google::cloud::future> result = - table_admin.WaitForConsistency(random_table_id, *consistency_token); - auto is_consistent = result.get(); + // google::cloud::future> + // result = google::cloud::bigtable_admin::WaitForConsistency( + // table_admin_connection, table_created->name(), + // consistency_token->consistency_token()); + + google::bigtable::admin::v2::CheckConsistencyRequest wait_request; + wait_request.set_name(table_created->name()); + wait_request.set_consistency_token(consistency_token->consistency_token()); + future> + result = table_admin->WaitForConsistency(wait_request); + StatusOr + is_consistent = result.get(); ASSERT_STATUS_OK(is_consistent); - EXPECT_EQ(bigtable::Consistency::kConsistent, *is_consistent); + EXPECT_TRUE(is_consistent->consistent()); // Cleanup the table and the instance. - EXPECT_STATUS_OK(table_admin.DeleteTable(random_table_id)); - EXPECT_STATUS_OK(instance_admin.DeleteInstance(id)); + EXPECT_STATUS_OK(table_admin->DeleteTable(table_created->name())); + EXPECT_STATUS_OK(instance_admin->DeleteInstance(instance->name())); } /// @test Verify rpc logging for `bigtable::TableAdmin` -TEST_F(AdminIntegrationTest, CreateListGetDeleteTableWithLogging) { +TEST_F(TableAdminIntegrationTest, CreateListGetDeleteTableWithLogging) { using GC = bigtable::GcRule; // In our ci builds, we set GOOGLE_CLOUD_CPP_ENABLE_TRACING to log our tests, // by default. We should unset this variable and create a fresh client in @@ -299,16 +351,16 @@ TEST_F(AdminIntegrationTest, CreateListGetDeleteTableWithLogging) { absl::nullopt}; testing_util::ScopedLog log; + auto const instance_name = + bigtable::InstanceName(project_id(), instance_id()); + auto const table_id = RandomTableId(); auto const table_name = bigtable::TableName(project_id(), instance_id(), table_id); - std::shared_ptr admin_client = - bigtable::MakeAdminClient( - bigtable::testing::TableTestEnvironment::project_id(), - Options{}.set({"rpc"})); - auto table_admin = std::make_unique( - admin_client, bigtable::testing::TableTestEnvironment::instance_id()); + auto table_admin = std::make_unique( + bigtable_admin::MakeBigtableTableAdminConnection( + Options{}.set({"rpc"}))); // Create table config bigtable::TableConfig table_config( @@ -317,16 +369,30 @@ TEST_F(AdminIntegrationTest, CreateListGetDeleteTableWithLogging) { {"a1000", "a2000", "b3000", "m5000"}); // Create table - ASSERT_STATUS_OK(table_admin->CreateTable(table_id, table_config)); - bigtable::Table table(data_client_, table_id); + auto request = std::move(table_config).as_proto(); + request.set_parent(instance_name); + request.set_table_id(table_id); + ASSERT_STATUS_OK(table_admin->CreateTable(request)); + bigtable::Table table(MakeDataConnection(), + TableResource(project_id(), instance_id(), table_id)); // List tables - auto tables = table_admin->ListTables(btadmin::Table::NAME_ONLY); - ASSERT_STATUS_OK(tables); - EXPECT_THAT(TableNames(*tables), Contains(table_name)); + google::bigtable::admin::v2::ListTablesRequest list_request; + list_request.set_parent(instance_name); + list_request.set_view(btadmin::Table::NAME_ONLY); + auto tables = table_admin->ListTables(list_request); + std::vector table_list; + for (auto& t : tables) { + ASSERT_STATUS_OK(t); + table_list.push_back(*t); + } + EXPECT_THAT(TableNames(table_list), Contains(table_name)); // Get table - auto table_detailed = table_admin->GetTable(table_id, btadmin::Table::FULL); + google::bigtable::admin::v2::GetTableRequest get_request; + get_request.set_name(table_name); + get_request.set_view(btadmin::Table::FULL); + auto table_detailed = table_admin->GetTable(get_request); ASSERT_STATUS_OK(table_detailed); // Verify new table was created @@ -347,15 +413,20 @@ TEST_F(AdminIntegrationTest, CreateListGetDeleteTableWithLogging) { EXPECT_EQ(1, count_matching_families(*table_detailed, "foo")); // Update table - std::vector column_modification_list = { - bigtable::ColumnFamilyModification::Create( - "newfam", GC::Intersection(GC::MaxAge(std::chrono::hours(7 * 24)), - GC::MaxNumVersions(1))), - bigtable::ColumnFamilyModification::Update("fam", GC::MaxNumVersions(2)), - bigtable::ColumnFamilyModification::Drop("foo")}; + std::vector< + google::bigtable::admin::v2::ModifyColumnFamiliesRequest::Modification> + column_modification_list = { + bigtable::ColumnFamilyModification::Create( + "newfam", GC::Intersection(GC::MaxAge(std::chrono::hours(7 * 24)), + GC::MaxNumVersions(1))) + .as_proto(), + bigtable::ColumnFamilyModification::Update("fam", + GC::MaxNumVersions(2)) + .as_proto(), + bigtable::ColumnFamilyModification::Drop("foo").as_proto()}; auto table_modified = - table_admin->ModifyColumnFamilies(table_id, column_modification_list); + table_admin->ModifyColumnFamilies(table_name, column_modification_list); ASSERT_STATUS_OK(table_modified); EXPECT_EQ(1, count_matching_families(*table_modified, "fam")); EXPECT_EQ(0, count_matching_families(*table_modified, "foo")); @@ -365,12 +436,16 @@ TEST_F(AdminIntegrationTest, CreateListGetDeleteTableWithLogging) { EXPECT_EQ(2, gc.intersection().rules_size()); // Delete table - EXPECT_STATUS_OK(table_admin->DeleteTable(table_id)); + EXPECT_STATUS_OK(table_admin->DeleteTable(table_name)); // List to verify it is no longer there - tables = table_admin->ListTables(btadmin::Table::NAME_ONLY); - ASSERT_STATUS_OK(tables); - EXPECT_THAT(TableNames(*tables), Not(Contains(table_name))); + tables = table_admin->ListTables(list_request); + table_list.clear(); + for (auto& t : tables) { + ASSERT_STATUS_OK(t); + table_list.push_back(*t); + } + EXPECT_THAT(TableNames(table_list), Not(Contains(table_name))); auto const log_lines = log.ExtractLines(); EXPECT_THAT(log_lines, Contains(HasSubstr("CreateTable"))); @@ -380,9 +455,9 @@ TEST_F(AdminIntegrationTest, CreateListGetDeleteTableWithLogging) { EXPECT_THAT(log_lines, Contains(HasSubstr("DeleteTable"))); // Verify that a normal client does not log. - auto no_logging_client = - TableAdmin(MakeAdminClient(project_id()), instance_id()); - (void)no_logging_client.ListTables(btadmin::Table::NAME_ONLY); + auto no_logging_client = bigtable_admin::BigtableTableAdminClient( + bigtable_admin::MakeBigtableTableAdminConnection()); + (void)no_logging_client.ListTables(list_request); EXPECT_THAT(log.ExtractLines(), Not(Contains(HasSubstr("ListTables")))); } diff --git a/google/cloud/bigtable/tests/table_sample_rows_integration_test.cc b/google/cloud/bigtable/tests/table_sample_rows_integration_test.cc index bdb78871a410c..30388be60523a 100644 --- a/google/cloud/bigtable/tests/table_sample_rows_integration_test.cc +++ b/google/cloud/bigtable/tests/table_sample_rows_integration_test.cc @@ -12,12 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "google/cloud/bigtable/client_options.h" -#include "google/cloud/bigtable/data_client.h" #include "google/cloud/bigtable/mutations.h" #include "google/cloud/bigtable/row_key_sample.h" #include "google/cloud/bigtable/table.h" #include "google/cloud/bigtable/testing/table_integration_test.h" +#include "google/cloud/grpc_options.h" #include "google/cloud/testing_util/integration_test.h" #include "google/cloud/testing_util/status_matchers.h" #include @@ -38,12 +37,6 @@ namespace { using ::google::cloud::bigtable::testing::TableTestEnvironment; using ::testing::IsEmpty; -Table GetTable() { - return Table(MakeDataClient(TableTestEnvironment::project_id(), - TableTestEnvironment::instance_id()), - TableTestEnvironment::table_id()); -} - void VerifySamples(StatusOr> samples) { ASSERT_STATUS_OK(samples); @@ -135,21 +128,6 @@ TEST_F(SampleRowsIntegrationTest, AsyncWithDataConnection) { VerifySamples(fut.get()); }; -TEST_F(SampleRowsIntegrationTest, SyncWithDataClient) { - auto table = GetTable(); - VerifySamples(table.SampleRows()); -}; - -TEST_F(SampleRowsIntegrationTest, AsyncWithDataClient) { - auto table = GetTable(); - auto fut = table.AsyncSampleRows(); - - // Block until the asynchronous operation completes. This is not what one - // would do in a real application (the synchronous API is better in that - // case), but we need to wait before checking the results. - VerifySamples(fut.get()); -}; - } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace bigtable diff --git a/google/cloud/bigtable/timestamp.h b/google/cloud/bigtable/timestamp.h index 35cb92a7a0411..44b5068d9bcf9 100644 --- a/google/cloud/bigtable/timestamp.h +++ b/google/cloud/bigtable/timestamp.h @@ -18,7 +18,7 @@ #include "google/cloud/bigtable/version.h" #include "google/cloud/status_or.h" #include "absl/time/time.h" -#include +#include "google/protobuf/timestamp.pb.h" #include #include #include diff --git a/google/cloud/bigtable/timestamp_test.cc b/google/cloud/bigtable/timestamp_test.cc index 9f752ca9910ed..8671443ddb770 100644 --- a/google/cloud/bigtable/timestamp_test.cc +++ b/google/cloud/bigtable/timestamp_test.cc @@ -14,7 +14,7 @@ #include "google/cloud/bigtable/timestamp.h" #include "google/cloud/testing_util/status_matchers.h" -#include +#include "google/protobuf/timestamp.pb.h" #include #include #include diff --git a/google/cloud/bigtable/tools/run_emulator_utils.sh b/google/cloud/bigtable/tools/run_emulator_utils.sh index 807ae6efb41a9..dc91f71083889 100755 --- a/google/cloud/bigtable/tools/run_emulator_utils.sh +++ b/google/cloud/bigtable/tools/run_emulator_utils.sh @@ -25,12 +25,12 @@ INSTANCE_ADMIN_EMULATOR_PID=0 function kill_emulators() { io::log "Killing Bigtable Emulators..." echo -n "EMULATOR_PID=${EMULATOR_PID} " - kill "${EMULATOR_PID}" || echo -n "-" + kill -9 "${EMULATOR_PID}" || echo -n "-" echo -n "." wait "${EMULATOR_PID}" >/dev/null 2>&1 || echo -n "+" echo "." echo -n "INSTANCE_ADMIN_EMULATOR_PID=${INSTANCE_ADMIN_EMULATOR_PID} " - kill "${INSTANCE_ADMIN_EMULATOR_PID}" || echo -n "-" + kill -9 "${INSTANCE_ADMIN_EMULATOR_PID}" || echo -n "-" echo -n "." wait "${INSTANCE_ADMIN_EMULATOR_PID}" >/dev/null 2>&1 || echo -n "+" echo "." diff --git a/google/cloud/bigtable/value.cc b/google/cloud/bigtable/value.cc index 54eee891c70cf..b1ed1da4d4165 100644 --- a/google/cloud/bigtable/value.cc +++ b/google/cloud/bigtable/value.cc @@ -18,10 +18,10 @@ #include "absl/container/flat_hash_set.h" #include "absl/strings/cord.h" #include "absl/strings/substitute.h" -#include +#include "google/bigtable/v2/types.pb.h" +#include "google/type/date.pb.h" #include #include -#include #include namespace google { diff --git a/google/cloud/bigtable/value.h b/google/cloud/bigtable/value.h index 100b441ae3baf..70d3984221719 100644 --- a/google/cloud/bigtable/value.h +++ b/google/cloud/bigtable/value.h @@ -19,9 +19,9 @@ #include "google/cloud/internal/make_status.h" #include "google/cloud/status_or.h" #include "bytes.h" +#include "google/bigtable/v2/data.pb.h" +#include "google/bigtable/v2/types.pb.h" #include "timestamp.h" -#include -#include #include #include diff --git a/google/cloud/bigtable/value_test.cc b/google/cloud/bigtable/value_test.cc index 6cc7853633887..d18c36eed6089 100644 --- a/google/cloud/bigtable/value_test.cc +++ b/google/cloud/bigtable/value_test.cc @@ -19,8 +19,8 @@ #include "google/cloud/testing_util/status_matchers.h" #include "absl/strings/cord.h" #include "absl/strings/substitute.h" +#include "google/type/date.pb.h" #include -#include #include #include #include diff --git a/google/cloud/bigtable/version.h b/google/cloud/bigtable/version.h index a69dff7feea46..27eab2fc6b104 100644 --- a/google/cloud/bigtable/version.h +++ b/google/cloud/bigtable/version.h @@ -81,8 +81,6 @@ int constexpr version() { return google::cloud::version(); } std::string version_string(); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -// TODO(#7463) - remove backwards compatibility namespaces -namespace v1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace bigtable } // namespace cloud } // namespace google diff --git a/google/cloud/bigtable/wait_for_consistency.cc b/google/cloud/bigtable/wait_for_consistency.cc deleted file mode 100644 index 1b1d235e80c37..0000000000000 --- a/google/cloud/bigtable/wait_for_consistency.cc +++ /dev/null @@ -1,187 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/wait_for_consistency.h" -#include "google/cloud/bigtable/admin/bigtable_table_admin_options.h" -#include "google/cloud/bigtable/admin/internal/bigtable_table_admin_option_defaults.h" -#include "google/cloud/internal/make_status.h" -#include - -namespace google { -namespace cloud { -namespace bigtable_admin { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -// This class borrows heavily from `google::cloud::internal::AsyncRetryLoop` -class AsyncWaitForConsistencyImpl - : public std::enable_shared_from_this { - public: - AsyncWaitForConsistencyImpl(CompletionQueue cq, - BigtableTableAdminClient client, - std::string table_name, - std::string consistency_token, Options options) - : cq_(std::move(cq)), - client_(std::move(client)), - options_(bigtable_admin_internal::BigtableTableAdminDefaultOptions( - std::move(options))), - polling_policy_(options_.get()) { - request_.set_name(std::move(table_name)); - request_.set_consistency_token(std::move(consistency_token)); - } - - future Start() { - auto w = std::weak_ptr(shared_from_this()); - result_ = promise([w] { - if (auto self = w.lock()) self->Cancel(); - }); - - StartAttempt(); - return result_.get_future(); - } - - private: - using RespType = StatusOr; - using TimerResult = StatusOr; - - struct State { - bool cancelled; - std::uint_fast32_t operation; - }; - - State StartOperation() { - std::unique_lock lk(mu_); - if (!cancelled_) return State{false, ++operation_}; - return SetDoneWithCancel(std::move(lk)); - } - - State OnOperation() { - std::unique_lock lk(mu_); - if (!cancelled_) return State{false, operation_}; - return SetDoneWithCancel(std::move(lk)); - } - - void StartAttempt() { - auto self = this->shared_from_this(); - auto state = StartOperation(); - if (state.cancelled) return; - SetPending( - state.operation, - client_.AsyncCheckConsistency(request_, options_) - .then([self](future f) { self->OnAttempt(f.get()); })); - } - - void StartBackoff() { - auto self = this->shared_from_this(); - auto state = StartOperation(); - if (state.cancelled) return; - SetPending( - state.operation, - cq_.MakeRelativeTimer(polling_policy_->WaitPeriod()) - .then([self](future f) { self->OnBackoff(f.get()); })); - } - - void OnAttempt(RespType result) { - // A successful attempt, set the value and finish the loop. - if (result.ok() && result->consistent()) { - SetDone(Status()); - return; - } - auto status = std::move(result).status(); - if (!polling_policy_->OnFailure(status)) { - if (!status.ok()) return SetDone(std::move(status)); - return SetDone(internal::DeadlineExceededError( - "Polling loop terminated by polling policy", GCP_ERROR_INFO())); - } - StartBackoff(); - } - - void OnBackoff(TimerResult tp) { - auto state = OnOperation(); - // Check for the retry loop cancellation first. We want to report that - // status instead of the timer failure in that case. - if (state.cancelled) return; - if (!tp) { - // Some kind of error in the CompletionQueue, probably shutting down. - return SetDone(std::move(tp).status()); - } - StartAttempt(); - } - - void SetPending(std::uint_fast32_t operation, future op) { - std::unique_lock lk(mu_); - if (operation_ == operation) pending_operation_ = std::move(op); - if (cancelled_) return Cancel(std::move(lk)); - } - - void SetDone(Status value) { - std::unique_lock lk(mu_); - if (done_) return; - done_ = true; - lk.unlock(); - result_.set_value(std::move(value)); - } - - State SetDoneWithCancel(std::unique_lock lk) { - if (done_) return State{true, 0}; - done_ = true; - lk.unlock(); - result_.set_value( - internal::CancelledError("Operation cancelled", GCP_ERROR_INFO())); - return State{true, 0}; - } - - void Cancel() { return Cancel(std::unique_lock(mu_)); } - - void Cancel(std::unique_lock lk) { - cancelled_ = true; - future f = std::move(pending_operation_); - lk.unlock(); - f.cancel(); - } - - CompletionQueue cq_; - bigtable::admin::v2::CheckConsistencyRequest request_; - BigtableTableAdminClient client_; - Options options_; - std::shared_ptr polling_policy_; - promise result_; - - // Only the following variables require synchronization, as they coordinate - // the work between the retry loop (which would be lock-free) and the cancel - // requests (which need locks). - std::mutex mu_; - bool cancelled_ = false; - bool done_ = false; - std::uint_fast32_t operation_ = 0; - future pending_operation_; -}; - -} // namespace - -future AsyncWaitForConsistency(CompletionQueue cq, - BigtableTableAdminClient client, - std::string table_name, - std::string consistency_token, - Options options) { - auto loop = std::make_shared( - std::move(cq), std::move(client), std::move(table_name), - std::move(consistency_token), std::move(options)); - return loop->Start(); -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable_admin -} // namespace cloud -} // namespace google diff --git a/google/cloud/bigtable/wait_for_consistency.h b/google/cloud/bigtable/wait_for_consistency.h deleted file mode 100644 index 3deb77fa7c05d..0000000000000 --- a/google/cloud/bigtable/wait_for_consistency.h +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_WAIT_FOR_CONSISTENCY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_WAIT_FOR_CONSISTENCY_H - -#include "google/cloud/bigtable/admin/bigtable_table_admin_client.h" -#include "google/cloud/completion_queue.h" - -namespace google { -namespace cloud { -namespace bigtable_admin { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/** - * Polls until a table is consistent, or until the polling policy has expired. - * - * @param cq the completion queue that will execute the asynchronous - * calls. The application must ensure that one or more threads are - * blocked on `cq.Run()`. - * @param client the Table Admin client. - * @param table_name the fully qualified name of the table. Values are of the - * form: `projects/{project}/instances/{instance}/tables/{table}`. - * @param consistency_token the consistency token of the table. - * @param options (optional) configuration options. Users who wish to modify the - * default polling behavior can supply a custom polling policy with - * `BigtableTableAdminPollingPolicyOption`. Note that the client's polling - * policy is not used for this operation. - * @return the consistency status for the table. The status is OK if and only if - * the table is consistent. - */ -future AsyncWaitForConsistency(CompletionQueue cq, - BigtableTableAdminClient client, - std::string table_name, - std::string consistency_token, - Options options = {}); - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable_admin -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_WAIT_FOR_CONSISTENCY_H diff --git a/google/cloud/bigtable/wait_for_consistency_test.cc b/google/cloud/bigtable/wait_for_consistency_test.cc deleted file mode 100644 index 92ab58292d800..0000000000000 --- a/google/cloud/bigtable/wait_for_consistency_test.cc +++ /dev/null @@ -1,430 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/bigtable/wait_for_consistency.h" -#include "google/cloud/bigtable/admin/bigtable_table_admin_connection.h" -#include "google/cloud/bigtable/admin/bigtable_table_admin_options.h" -#include "google/cloud/bigtable/admin/mocks/mock_bigtable_table_admin_connection.h" -#include "google/cloud/bigtable/resource_names.h" -#include "google/cloud/internal/background_threads_impl.h" -#include "google/cloud/testing_util/async_sequencer.h" -#include "google/cloud/testing_util/mock_completion_queue_impl.h" -#include "google/cloud/testing_util/status_matchers.h" -#include -#include -#include - -namespace google { -namespace cloud { -namespace bigtable_admin { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -namespace btadmin = ::google::bigtable::admin::v2; -using MockConnection = - ::google::cloud::bigtable_admin_mocks::MockBigtableTableAdminConnection; -using RespType = StatusOr; -using TimerResult = StatusOr; -using ::google::cloud::testing_util::AsyncSequencer; -using ::google::cloud::testing_util::StatusIs; -using ::testing::HasSubstr; - -auto constexpr kLimitedErrorCount = 3; - -Options TestOptions() { - using us = std::chrono::microseconds; - auto retry = - BigtableTableAdminLimitedErrorCountRetryPolicy(kLimitedErrorCount); - auto backoff = ExponentialBackoffPolicy(us(1), us(5), 2.0); - auto polling = - GenericPollingPolicy( - retry.clone(), backoff.clone()); - - return Options{}.set(polling.clone()); -} - -RespType MakeResponse(bool consistent) { - btadmin::CheckConsistencyResponse r; - r.set_consistent(consistent); - return make_status_or(std::move(r)); -} - -TEST(AsyncWaitForConsistency, Simple) { - std::string const table_name = - bigtable::TableName("test-project", "test-instance", "test-table"); - std::string const token = "test-token"; - - CompletionQueue cq; - auto mock = std::make_shared(); - auto client = BigtableTableAdminClient(mock); - - EXPECT_CALL(*mock, AsyncCheckConsistency) - .WillOnce([&](btadmin::CheckConsistencyRequest const& request) { - EXPECT_EQ(request.name(), table_name); - EXPECT_EQ(request.consistency_token(), token); - return make_ready_future(MakeResponse(true)); - }); - - auto status = AsyncWaitForConsistency(cq, client, table_name, token).get(); - EXPECT_STATUS_OK(status); -} - -TEST(AsyncWaitForConsistency, NotConsistentThenSuccess) { - std::string const table_name = - bigtable::TableName("test-project", "test-instance", "test-table"); - std::string const token = "test-token"; - - internal::AutomaticallyCreatedBackgroundThreads background; - auto mock = std::make_shared(); - auto client = BigtableTableAdminClient(mock); - - EXPECT_CALL(*mock, AsyncCheckConsistency) - .WillOnce([&](btadmin::CheckConsistencyRequest const& request) { - EXPECT_EQ(request.name(), table_name); - EXPECT_EQ(request.consistency_token(), token); - return make_ready_future(MakeResponse(false)); - }) - .WillOnce([&](btadmin::CheckConsistencyRequest const& request) { - EXPECT_EQ(request.name(), table_name); - EXPECT_EQ(request.consistency_token(), token); - return make_ready_future(MakeResponse(true)); - }); - - auto status = AsyncWaitForConsistency(background.cq(), client, table_name, - token, TestOptions()) - .get(); - EXPECT_STATUS_OK(status); -} - -TEST(AsyncWaitForConsistency, PermanentFailure) { - std::string const table_name = - bigtable::TableName("test-project", "test-instance", "test-table"); - std::string const token = "test-token"; - - internal::AutomaticallyCreatedBackgroundThreads background; - auto mock = std::make_shared(); - auto client = BigtableTableAdminClient(mock); - - EXPECT_CALL(*mock, AsyncCheckConsistency) - .WillOnce([&](btadmin::CheckConsistencyRequest const& request) { - EXPECT_EQ(request.name(), table_name); - EXPECT_EQ(request.consistency_token(), token); - return make_ready_future( - Status(StatusCode::kPermissionDenied, "fail")); - }); - - auto status = AsyncWaitForConsistency(background.cq(), client, table_name, - token, TestOptions()) - .get(); - EXPECT_THAT(status, StatusIs(StatusCode::kPermissionDenied, "fail")); -} - -TEST(AsyncWaitForConsistency, TooManyTransientFailures) { - std::string const table_name = - bigtable::TableName("test-project", "test-instance", "test-table"); - std::string const token = "test-token"; - - internal::AutomaticallyCreatedBackgroundThreads background; - auto mock = std::make_shared(); - auto client = BigtableTableAdminClient(mock); - - EXPECT_CALL(*mock, AsyncCheckConsistency) - .Times(kLimitedErrorCount + 1) - .WillRepeatedly([&](btadmin::CheckConsistencyRequest const& request) { - EXPECT_EQ(request.name(), table_name); - EXPECT_EQ(request.consistency_token(), token); - return make_ready_future( - Status(StatusCode::kUnavailable, "try again")); - }); - - auto status = AsyncWaitForConsistency(background.cq(), client, table_name, - token, TestOptions()) - .get(); - EXPECT_THAT(status, - StatusIs(StatusCode::kUnavailable, HasSubstr("try again"))); -} - -TEST(AsyncWaitForConsistency, NeverConsistent) { - std::string const table_name = - bigtable::TableName("test-project", "test-instance", "test-table"); - std::string const token = "test-token"; - - internal::AutomaticallyCreatedBackgroundThreads background; - auto mock = std::make_shared(); - auto client = BigtableTableAdminClient(mock); - - EXPECT_CALL(*mock, AsyncCheckConsistency) - .Times(kLimitedErrorCount + 1) - .WillRepeatedly([&](btadmin::CheckConsistencyRequest const& request) { - EXPECT_EQ(request.name(), table_name); - EXPECT_EQ(request.consistency_token(), token); - return make_ready_future(MakeResponse(false)); - }); - - auto status = AsyncWaitForConsistency(background.cq(), client, table_name, - token, TestOptions()) - .get(); - EXPECT_THAT(status, StatusIs(StatusCode::kDeadlineExceeded, - HasSubstr("Polling loop terminated"))); -} - -TEST(AsyncWaitForConsistency, PassesOptionsToConnection) { - std::string const table_name = - bigtable::TableName("test-project", "test-instance", "test-table"); - std::string const token = "test-token"; - - struct TestOption { - using Type = std::string; - }; - - CompletionQueue cq; - auto mock = std::make_shared(); - auto client = BigtableTableAdminClient(mock); - - EXPECT_CALL(*mock, AsyncCheckConsistency) - .WillOnce([&](btadmin::CheckConsistencyRequest const& request) { - EXPECT_EQ(request.name(), table_name); - EXPECT_EQ(request.consistency_token(), token); - EXPECT_TRUE(internal::CurrentOptions().has()); - return make_ready_future(MakeResponse(true)); - }); - - EXPECT_FALSE(internal::CurrentOptions().has()); - auto status = AsyncWaitForConsistency(cq, client, table_name, token, - Options{}.set("value")) - .get(); - EXPECT_STATUS_OK(status); -} - -class AsyncWaitForConsistencyCancelTest : public ::testing::Test { - protected: - std::size_t RequestCancelCount() { return sequencer_.CancelCount("Request"); } - std::size_t TimerCancelCount() { return sequencer_.CancelCount("Timer"); } - - future SimulateRequest() { - return sequencer_.PushBack("Request").then( - [](future g) -> RespType { - auto status = g.get(); - if (!status.ok()) return status; - return MakeResponse(true); - }); - } - - future SimulateTimer(std::chrono::nanoseconds d) { - using std::chrono::system_clock; - auto tp = system_clock::now() + - std::chrono::duration_cast(d); - return sequencer_.PushBack("Timer").then( - [tp](future g) -> TimerResult { - auto status = g.get(); - if (!status.ok()) return status; - return tp; - }); - } - - promise WaitForRequest() { - auto p = sequencer_.PopFrontWithName(); - EXPECT_EQ("Request", p.second); - return std::move(p.first); - } - promise WaitForTimer() { - auto p = sequencer_.PopFrontWithName(); - EXPECT_THAT(p.second, "Timer"); - return std::move(p.first); - } - - std::shared_ptr - MakeMockCompletionQueue() { - auto mock = std::make_shared(); - EXPECT_CALL(*mock, MakeRelativeTimer) - .WillRepeatedly( - [this](std::chrono::nanoseconds d) { return SimulateTimer(d); }); - return mock; - } - - private: - AsyncSequencer sequencer_; -}; - -TEST_F(AsyncWaitForConsistencyCancelTest, CancelAndSuccess) { - std::string const table_name = - bigtable::TableName("test-project", "test-instance", "test-table"); - std::string const token = "test-token"; - auto const transient = Status(StatusCode::kUnavailable, "try-again"); - - auto mock_cq = MakeMockCompletionQueue(); - CompletionQueue cq(mock_cq); - auto mock = std::make_shared(); - auto client = BigtableTableAdminClient(mock); - - EXPECT_CALL(*mock, AsyncCheckConsistency) - .Times(2) - .WillRepeatedly([&](btadmin::CheckConsistencyRequest const& request) { - EXPECT_EQ(request.name(), table_name); - EXPECT_EQ(request.consistency_token(), token); - return SimulateRequest(); - }); - - auto actual = - AsyncWaitForConsistency(cq, client, table_name, token, TestOptions()); - - // First simulate a regular request that results in a transient failure. - auto p = WaitForRequest(); - p.set_value(transient); - // Then simulate the backoff timer expiring. - p = WaitForTimer(); - p.set_value(Status{}); - // Then another request that gets cancelled. - p = WaitForRequest(); - EXPECT_EQ(0, RequestCancelCount()); - EXPECT_EQ(0, TimerCancelCount()); - actual.cancel(); - EXPECT_EQ(1, RequestCancelCount()); - EXPECT_EQ(0, TimerCancelCount()); - p.set_value(Status{}); - auto value = actual.get(); - ASSERT_STATUS_OK(value); -} - -TEST_F(AsyncWaitForConsistencyCancelTest, CancelWithFailure) { - std::string const table_name = - bigtable::TableName("test-project", "test-instance", "test-table"); - std::string const token = "test-token"; - auto const transient = Status(StatusCode::kUnavailable, "try-again"); - - auto mock_cq = MakeMockCompletionQueue(); - CompletionQueue cq(mock_cq); - auto mock = std::make_shared(); - auto client = BigtableTableAdminClient(mock); - - EXPECT_CALL(*mock, AsyncCheckConsistency) - .Times(2) - .WillRepeatedly([&](btadmin::CheckConsistencyRequest const& request) { - EXPECT_EQ(request.name(), table_name); - EXPECT_EQ(request.consistency_token(), token); - return SimulateRequest(); - }); - - auto actual = - AsyncWaitForConsistency(cq, client, table_name, token, TestOptions()); - - // First simulate a regular request. - auto p = WaitForRequest(); - p.set_value(transient); - // Then simulate the backoff timer expiring. - p = WaitForTimer(); - p.set_value(Status{}); - // This triggers a second request, which is called and fails too - p = WaitForRequest(); - EXPECT_EQ(0, RequestCancelCount()); - EXPECT_EQ(0, TimerCancelCount()); - actual.cancel(); - EXPECT_EQ(1, RequestCancelCount()); - EXPECT_EQ(0, TimerCancelCount()); - p.set_value(transient); - auto value = actual.get(); - EXPECT_THAT(value, StatusIs(StatusCode::kCancelled, - HasSubstr("Operation cancelled"))); -} - -TEST_F(AsyncWaitForConsistencyCancelTest, CancelDuringTimer) { - std::string const table_name = - bigtable::TableName("test-project", "test-instance", "test-table"); - std::string const token = "test-token"; - auto const transient = Status(StatusCode::kUnavailable, "try-again"); - - auto mock_cq = MakeMockCompletionQueue(); - CompletionQueue cq(mock_cq); - auto mock = std::make_shared(); - auto client = BigtableTableAdminClient(mock); - - EXPECT_CALL(*mock, AsyncCheckConsistency) - .WillOnce([&](btadmin::CheckConsistencyRequest const& request) { - EXPECT_EQ(request.name(), table_name); - EXPECT_EQ(request.consistency_token(), token); - return SimulateRequest(); - }); - - auto actual = - AsyncWaitForConsistency(cq, client, table_name, token, TestOptions()); - - // First simulate a regular request. - auto p = WaitForRequest(); - p.set_value(transient); - - // Wait for the timer to be set - p = WaitForTimer(); - // At this point there is a timer in the completion queue, cancel the call and - // simulate a cancel for the timer. - EXPECT_EQ(0, RequestCancelCount()); - EXPECT_EQ(0, TimerCancelCount()); - actual.cancel(); - EXPECT_EQ(0, RequestCancelCount()); - EXPECT_EQ(1, TimerCancelCount()); - p.set_value(Status(StatusCode::kCancelled, "timer cancel")); - // the retry loop should *not* create any more calls, the value should be - // available immediately. - auto value = actual.get(); - EXPECT_THAT(value, StatusIs(StatusCode::kCancelled, - HasSubstr("Operation cancelled"))); -} - -TEST_F(AsyncWaitForConsistencyCancelTest, ShutdownDuringTimer) { - std::string const table_name = - bigtable::TableName("test-project", "test-instance", "test-table"); - std::string const token = "test-token"; - auto const transient = Status(StatusCode::kUnavailable, "try-again"); - - auto mock_cq = MakeMockCompletionQueue(); - CompletionQueue cq(mock_cq); - auto mock = std::make_shared(); - auto client = BigtableTableAdminClient(mock); - - EXPECT_CALL(*mock, AsyncCheckConsistency) - .WillOnce([&](btadmin::CheckConsistencyRequest const& request) { - EXPECT_EQ(request.name(), table_name); - EXPECT_EQ(request.consistency_token(), token); - return SimulateRequest(); - }); - - auto actual = - AsyncWaitForConsistency(cq, client, table_name, token, TestOptions()); - - // First simulate a regular request. - auto p = WaitForRequest(); - p.set_value(transient); - - // Wait for the timer to be set - p = WaitForTimer(); - - // At this point there is a timer in the completion queue, simulate a - // CancelAll() + Shutdown(). - EXPECT_CALL(*mock_cq, CancelAll).Times(1); - EXPECT_CALL(*mock_cq, Shutdown).Times(1); - cq.CancelAll(); - cq.Shutdown(); - p.set_value(Status(StatusCode::kCancelled, "timer cancelled")); - - // the retry loop should exit - auto value = actual.get(); - EXPECT_THAT(value, - StatusIs(StatusCode::kCancelled, HasSubstr("timer cancelled"))); -} - -} // namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace bigtable_admin -} // namespace cloud -} // namespace google diff --git a/google/cloud/billing/BUILD.bazel b/google/cloud/billing/BUILD.bazel index f5f10cc56d4dd..a738595faabcb 100644 --- a/google/cloud/billing/BUILD.bazel +++ b/google/cloud/billing/BUILD.bazel @@ -19,14 +19,13 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "budgets/v1/", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/billing/budgets/v1:budgets_cc_grpc", - "@com_google_googleapis//google/cloud/billing/v1:billing_cc_grpc", + "@googleapis//google/cloud/billing/budgets/v1:budgets_cc_grpc", + "@googleapis//google/cloud/billing/v1:billing_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/billing/CMakeLists.txt b/google/cloud/billing/CMakeLists.txt index 014d0885e573e..8ac700b8ff4ba 100644 --- a/google/cloud/billing/CMakeLists.txt +++ b/google/cloud/billing/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(billing "Cloud Billing Budget API" - SERVICE_DIRS "__EMPTY__" "budgets/v1/" "v1/") + SERVICE_DIRS "budgets/v1/" "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(billing_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/billing/budget_client.h b/google/cloud/billing/budget_client.h deleted file mode 100644 index 216e388a8ec26..0000000000000 --- a/google/cloud/billing/budget_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/billing/budgets/v1/budget_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_BUDGET_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_BUDGET_CLIENT_H - -#include "google/cloud/billing/budget_connection.h" -#include "google/cloud/billing/budgets/v1/budget_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in billing_budgets_v1 instead of the aliases defined in -/// this namespace. -namespace billing { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use billing_budgets_v1::BudgetServiceClient directly. -using ::google::cloud::billing_budgets_v1::BudgetServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace billing -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_BUDGET_CLIENT_H diff --git a/google/cloud/billing/budget_connection.h b/google/cloud/billing/budget_connection.h deleted file mode 100644 index 66958694a6c5f..0000000000000 --- a/google/cloud/billing/budget_connection.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/billing/budgets/v1/budget_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_BUDGET_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_BUDGET_CONNECTION_H - -#include "google/cloud/billing/budget_connection_idempotency_policy.h" -#include "google/cloud/billing/budgets/v1/budget_connection.h" - -namespace google { -namespace cloud { -namespace billing { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use billing_budgets_v1::MakeBudgetServiceConnection directly. -using ::google::cloud::billing_budgets_v1::MakeBudgetServiceConnection; - -/// @deprecated Use billing_budgets_v1::BudgetServiceConnection directly. -using ::google::cloud::billing_budgets_v1::BudgetServiceConnection; - -/// @deprecated Use -/// billing_budgets_v1::BudgetServiceLimitedErrorCountRetryPolicy directly. -using ::google::cloud::billing_budgets_v1:: - BudgetServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use billing_budgets_v1::BudgetServiceLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::billing_budgets_v1::BudgetServiceLimitedTimeRetryPolicy; - -/// @deprecated Use billing_budgets_v1::BudgetServiceRetryPolicy directly. -using ::google::cloud::billing_budgets_v1::BudgetServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace billing -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_BUDGET_CONNECTION_H diff --git a/google/cloud/billing/budget_connection_idempotency_policy.h b/google/cloud/billing/budget_connection_idempotency_policy.h deleted file mode 100644 index 79c37d9b2e6f1..0000000000000 --- a/google/cloud/billing/budget_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/billing/budgets/v1/budget_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_BUDGET_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_BUDGET_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/billing/budgets/v1/budget_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace billing { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// billing_budgets_v1::MakeDefaultBudgetServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::billing_budgets_v1:: - MakeDefaultBudgetServiceConnectionIdempotencyPolicy; - -/// @deprecated Use billing_budgets_v1::BudgetServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::billing_budgets_v1:: - BudgetServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace billing -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_BUDGET_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/billing/budget_options.h b/google/cloud/billing/budget_options.h deleted file mode 100644 index 8038768056d47..0000000000000 --- a/google/cloud/billing/budget_options.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/billing/budgets/v1/budget_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_BUDGET_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_BUDGET_OPTIONS_H - -#include "google/cloud/billing/budget_connection.h" -#include "google/cloud/billing/budget_connection_idempotency_policy.h" -#include "google/cloud/billing/budgets/v1/budget_options.h" - -namespace google { -namespace cloud { -namespace billing { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use billing_budgets_v1::BudgetServiceBackoffPolicyOption -/// directly. -using ::google::cloud::billing_budgets_v1::BudgetServiceBackoffPolicyOption; - -/// @deprecated Use -/// billing_budgets_v1::BudgetServiceConnectionIdempotencyPolicyOption directly. -using ::google::cloud::billing_budgets_v1:: - BudgetServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use billing_budgets_v1::BudgetServicePolicyOptionList directly. -using ::google::cloud::billing_budgets_v1::BudgetServicePolicyOptionList; - -/// @deprecated Use billing_budgets_v1::BudgetServiceRetryPolicyOption directly. -using ::google::cloud::billing_budgets_v1::BudgetServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace billing -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_BUDGET_OPTIONS_H diff --git a/google/cloud/billing/budgets/v1/budget_connection.h b/google/cloud/billing/budgets/v1/budget_connection.h index 043e149ecd36b..60ccefce4e0e9 100644 --- a/google/cloud/billing/budgets/v1/budget_connection.h +++ b/google/cloud/billing/budgets/v1/budget_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_BUDGETS_V1_BUDGET_CONNECTION_H #include "google/cloud/billing/budgets/v1/budget_connection_idempotency_policy.h" +#include "google/cloud/billing/budgets/v1/budget_service.pb.h" #include "google/cloud/billing/budgets/v1/internal/budget_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/billing/budgets/v1/budget_connection_idempotency_policy.h b/google/cloud/billing/budgets/v1/budget_connection_idempotency_policy.h index 5930d2f00ebf8..b52f4d91cc9e0 100644 --- a/google/cloud/billing/budgets/v1/budget_connection_idempotency_policy.h +++ b/google/cloud/billing/budgets/v1/budget_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_BUDGETS_V1_BUDGET_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_BUDGETS_V1_BUDGET_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/billing/budgets/v1/budget_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/billing/budgets/v1/internal/budget_auth_decorator.cc b/google/cloud/billing/budgets/v1/internal/budget_auth_decorator.cc index d8d9f3868b6e4..db9dc6eebfc60 100644 --- a/google/cloud/billing/budgets/v1/internal/budget_auth_decorator.cc +++ b/google/cloud/billing/budgets/v1/internal/budget_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/billing/budgets/v1/budget_service.proto #include "google/cloud/billing/budgets/v1/internal/budget_auth_decorator.h" -#include +#include "google/cloud/billing/budgets/v1/budget_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_budgets_v1_internal { @@ -79,3 +82,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace billing_budgets_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/billing/budgets/v1/internal/budget_auth_decorator.h b/google/cloud/billing/budgets/v1/internal/budget_auth_decorator.h index 3f420424cfe29..3576c96a3ca58 100644 --- a/google/cloud/billing/budgets/v1/internal/budget_auth_decorator.h +++ b/google/cloud/billing/budgets/v1/internal/budget_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_budgets_v1_internal { @@ -73,4 +76,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_BUDGETS_V1_INTERNAL_BUDGET_AUTH_DECORATOR_H diff --git a/google/cloud/billing/budgets/v1/internal/budget_logging_decorator.cc b/google/cloud/billing/budgets/v1/internal/budget_logging_decorator.cc index 03088ae08bdf7..cd6c990c3b84a 100644 --- a/google/cloud/billing/budgets/v1/internal/budget_logging_decorator.cc +++ b/google/cloud/billing/budgets/v1/internal/budget_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/billing/budgets/v1/budget_service.proto #include "google/cloud/billing/budgets/v1/internal/budget_logging_decorator.h" +#include "google/cloud/billing/budgets/v1/budget_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_budgets_v1_internal { @@ -103,3 +106,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace billing_budgets_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/billing/budgets/v1/internal/budget_logging_decorator.h b/google/cloud/billing/budgets/v1/internal/budget_logging_decorator.h index 8b7eb7c7ea39d..396199e88b854 100644 --- a/google/cloud/billing/budgets/v1/internal/budget_logging_decorator.h +++ b/google/cloud/billing/budgets/v1/internal/budget_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_budgets_v1_internal { @@ -73,4 +76,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_BUDGETS_V1_INTERNAL_BUDGET_LOGGING_DECORATOR_H diff --git a/google/cloud/billing/budgets/v1/internal/budget_metadata_decorator.cc b/google/cloud/billing/budgets/v1/internal/budget_metadata_decorator.cc index 71b804e70cfba..74defcef84cdd 100644 --- a/google/cloud/billing/budgets/v1/internal/budget_metadata_decorator.cc +++ b/google/cloud/billing/budgets/v1/internal/budget_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/billing/budgets/v1/budget_service.proto #include "google/cloud/billing/budgets/v1/internal/budget_metadata_decorator.h" +#include "google/cloud/billing/budgets/v1/budget_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_budgets_v1_internal { @@ -106,3 +110,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace billing_budgets_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/billing/budgets/v1/internal/budget_metadata_decorator.h b/google/cloud/billing/budgets/v1/internal/budget_metadata_decorator.h index dff5c3a61caf8..f2a9e1e578f62 100644 --- a/google/cloud/billing/budgets/v1/internal/budget_metadata_decorator.h +++ b/google/cloud/billing/budgets/v1/internal/budget_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_budgets_v1_internal { @@ -78,4 +81,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_BUDGETS_V1_INTERNAL_BUDGET_METADATA_DECORATOR_H diff --git a/google/cloud/billing/budgets/v1/internal/budget_option_defaults.cc b/google/cloud/billing/budgets/v1/internal/budget_option_defaults.cc index 8886e260354b9..9e22d32235b4f 100644 --- a/google/cloud/billing/budgets/v1/internal/budget_option_defaults.cc +++ b/google/cloud/billing/budgets/v1/internal/budget_option_defaults.cc @@ -42,7 +42,7 @@ Options BudgetServiceDefaultOptions(Options options) { if (!options.has()) { options.set( billing_budgets_v1::BudgetServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/billing/budgets/v1/internal/budget_stub.cc b/google/cloud/billing/budgets/v1/internal/budget_stub.cc index b99b6b7487a1b..8cc745902e341 100644 --- a/google/cloud/billing/budgets/v1/internal/budget_stub.cc +++ b/google/cloud/billing/budgets/v1/internal/budget_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/billing/budgets/v1/budget_service.proto #include "google/cloud/billing/budgets/v1/internal/budget_stub.h" +#include "google/cloud/billing/budgets/v1/budget_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_budgets_v1_internal { @@ -93,3 +96,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace billing_budgets_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/billing/budgets/v1/internal/budget_stub.h b/google/cloud/billing/budgets/v1/internal/budget_stub.h index acf344a7cf429..eb2e33722342d 100644 --- a/google/cloud/billing/budgets/v1/internal/budget_stub.h +++ b/google/cloud/billing/budgets/v1/internal/budget_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_BUDGETS_V1_INTERNAL_BUDGET_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_BUDGETS_V1_INTERNAL_BUDGET_STUB_H +#include "google/cloud/billing/budgets/v1/budget_service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_budgets_v1_internal { @@ -104,4 +107,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_BUDGETS_V1_INTERNAL_BUDGET_STUB_H diff --git a/google/cloud/billing/budgets/v1/internal/budget_stub_factory.cc b/google/cloud/billing/budgets/v1/internal/budget_stub_factory.cc index b06308ef63468..94bfee6707bea 100644 --- a/google/cloud/billing/budgets/v1/internal/budget_stub_factory.cc +++ b/google/cloud/billing/budgets/v1/internal/budget_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/billing/budgets/v1/budget_service.proto #include "google/cloud/billing/budgets/v1/internal/budget_stub_factory.h" +#include "google/cloud/billing/budgets/v1/budget_service.grpc.pb.h" #include "google/cloud/billing/budgets/v1/internal/budget_auth_decorator.h" #include "google/cloud/billing/budgets/v1/internal/budget_logging_decorator.h" #include "google/cloud/billing/budgets/v1/internal/budget_metadata_decorator.h" @@ -28,10 +29,12 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_budgets_v1_internal { @@ -69,3 +72,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace billing_budgets_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/billing/budgets/v1/internal/budget_stub_factory.h b/google/cloud/billing/budgets/v1/internal/budget_stub_factory.h index 94c53eb3e6b23..84b51b10a0120 100644 --- a/google/cloud/billing/budgets/v1/internal/budget_stub_factory.h +++ b/google/cloud/billing/budgets/v1/internal/budget_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_budgets_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_BUDGETS_V1_INTERNAL_BUDGET_STUB_FACTORY_H diff --git a/google/cloud/billing/budgets/v1/internal/budget_tracing_connection.cc b/google/cloud/billing/budgets/v1/internal/budget_tracing_connection.cc index fdd952f33222f..f8122667a4440 100644 --- a/google/cloud/billing/budgets/v1/internal/budget_tracing_connection.cc +++ b/google/cloud/billing/budgets/v1/internal/budget_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace billing_budgets_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - BudgetServiceTracingConnection::BudgetServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -80,16 +78,12 @@ Status BudgetServiceTracingConnection::DeleteBudget( return internal::EndSpan(*span, child_->DeleteBudget(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeBudgetServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/billing/budgets/v1/internal/budget_tracing_connection.h b/google/cloud/billing/budgets/v1/internal/budget_tracing_connection.h index 544be106f22e3..4b95e09584d3a 100644 --- a/google/cloud/billing/budgets/v1/internal/budget_tracing_connection.h +++ b/google/cloud/billing/budgets/v1/internal/budget_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace billing_budgets_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class BudgetServiceTracingConnection : public billing_budgets_v1::BudgetServiceConnection { public: @@ -63,8 +61,6 @@ class BudgetServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/billing/budgets/v1/internal/budget_tracing_stub.cc b/google/cloud/billing/budgets/v1/internal/budget_tracing_stub.cc index f5610b88a13f4..36aef213e49cd 100644 --- a/google/cloud/billing/budgets/v1/internal/budget_tracing_stub.cc +++ b/google/cloud/billing/budgets/v1/internal/budget_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_budgets_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - BudgetServiceTracingStub::BudgetServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -91,18 +92,14 @@ Status BudgetServiceTracingStub::DeleteBudget( child_->DeleteBudget(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeBudgetServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace billing_budgets_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/billing/budgets/v1/internal/budget_tracing_stub.h b/google/cloud/billing/budgets/v1/internal/budget_tracing_stub.h index 7517c9f52277d..3e479dacf8b3b 100644 --- a/google/cloud/billing/budgets/v1/internal/budget_tracing_stub.h +++ b/google/cloud/billing/budgets/v1/internal/budget_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_budgets_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class BudgetServiceTracingStub : public BudgetServiceStub { public: ~BudgetServiceTracingStub() override = default; @@ -69,8 +70,6 @@ class BudgetServiceTracingStub : public BudgetServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -85,4 +84,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_BUDGETS_V1_INTERNAL_BUDGET_TRACING_STUB_H diff --git a/google/cloud/billing/cloud_billing_client.h b/google/cloud/billing/cloud_billing_client.h deleted file mode 100644 index 39dea22fa0fb7..0000000000000 --- a/google/cloud/billing/cloud_billing_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/billing/v1/cloud_billing.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_CLOUD_BILLING_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_CLOUD_BILLING_CLIENT_H - -#include "google/cloud/billing/cloud_billing_connection.h" -#include "google/cloud/billing/v1/cloud_billing_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in billing_v1 instead of the aliases defined in -/// this namespace. -namespace billing { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use billing_v1::CloudBillingClient directly. -using ::google::cloud::billing_v1::CloudBillingClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace billing -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_CLOUD_BILLING_CLIENT_H diff --git a/google/cloud/billing/cloud_billing_connection.h b/google/cloud/billing/cloud_billing_connection.h deleted file mode 100644 index b0829a151de2c..0000000000000 --- a/google/cloud/billing/cloud_billing_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/billing/v1/cloud_billing.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_CLOUD_BILLING_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_CLOUD_BILLING_CONNECTION_H - -#include "google/cloud/billing/cloud_billing_connection_idempotency_policy.h" -#include "google/cloud/billing/v1/cloud_billing_connection.h" - -namespace google { -namespace cloud { -namespace billing { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use billing_v1::MakeCloudBillingConnection directly. -using ::google::cloud::billing_v1::MakeCloudBillingConnection; - -/// @deprecated Use billing_v1::CloudBillingConnection directly. -using ::google::cloud::billing_v1::CloudBillingConnection; - -/// @deprecated Use billing_v1::CloudBillingLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::billing_v1::CloudBillingLimitedErrorCountRetryPolicy; - -/// @deprecated Use billing_v1::CloudBillingLimitedTimeRetryPolicy directly. -using ::google::cloud::billing_v1::CloudBillingLimitedTimeRetryPolicy; - -/// @deprecated Use billing_v1::CloudBillingRetryPolicy directly. -using ::google::cloud::billing_v1::CloudBillingRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace billing -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_CLOUD_BILLING_CONNECTION_H diff --git a/google/cloud/billing/cloud_billing_connection_idempotency_policy.h b/google/cloud/billing/cloud_billing_connection_idempotency_policy.h deleted file mode 100644 index 8f3185afecc72..0000000000000 --- a/google/cloud/billing/cloud_billing_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/billing/v1/cloud_billing.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_CLOUD_BILLING_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_CLOUD_BILLING_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/billing/v1/cloud_billing_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace billing { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// billing_v1::MakeDefaultCloudBillingConnectionIdempotencyPolicy directly. -using ::google::cloud::billing_v1:: - MakeDefaultCloudBillingConnectionIdempotencyPolicy; - -/// @deprecated Use billing_v1::CloudBillingConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::billing_v1::CloudBillingConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace billing -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_CLOUD_BILLING_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/billing/cloud_billing_options.h b/google/cloud/billing/cloud_billing_options.h deleted file mode 100644 index fd9e31b43c77e..0000000000000 --- a/google/cloud/billing/cloud_billing_options.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/billing/v1/cloud_billing.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_CLOUD_BILLING_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_CLOUD_BILLING_OPTIONS_H - -#include "google/cloud/billing/cloud_billing_connection.h" -#include "google/cloud/billing/cloud_billing_connection_idempotency_policy.h" -#include "google/cloud/billing/v1/cloud_billing_options.h" - -namespace google { -namespace cloud { -namespace billing { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use billing_v1::CloudBillingBackoffPolicyOption directly. -using ::google::cloud::billing_v1::CloudBillingBackoffPolicyOption; - -/// @deprecated Use billing_v1::CloudBillingConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::billing_v1:: - CloudBillingConnectionIdempotencyPolicyOption; - -/// @deprecated Use billing_v1::CloudBillingPolicyOptionList directly. -using ::google::cloud::billing_v1::CloudBillingPolicyOptionList; - -/// @deprecated Use billing_v1::CloudBillingRetryPolicyOption directly. -using ::google::cloud::billing_v1::CloudBillingRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace billing -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_CLOUD_BILLING_OPTIONS_H diff --git a/google/cloud/billing/cloud_catalog_client.h b/google/cloud/billing/cloud_catalog_client.h deleted file mode 100644 index bc124b21808e8..0000000000000 --- a/google/cloud/billing/cloud_catalog_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/billing/v1/cloud_catalog.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_CLOUD_CATALOG_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_CLOUD_CATALOG_CLIENT_H - -#include "google/cloud/billing/cloud_catalog_connection.h" -#include "google/cloud/billing/v1/cloud_catalog_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in billing_v1 instead of the aliases defined in -/// this namespace. -namespace billing { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use billing_v1::CloudCatalogClient directly. -using ::google::cloud::billing_v1::CloudCatalogClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace billing -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_CLOUD_CATALOG_CLIENT_H diff --git a/google/cloud/billing/cloud_catalog_connection.h b/google/cloud/billing/cloud_catalog_connection.h deleted file mode 100644 index 649278f5d4f05..0000000000000 --- a/google/cloud/billing/cloud_catalog_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/billing/v1/cloud_catalog.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_CLOUD_CATALOG_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_CLOUD_CATALOG_CONNECTION_H - -#include "google/cloud/billing/cloud_catalog_connection_idempotency_policy.h" -#include "google/cloud/billing/v1/cloud_catalog_connection.h" - -namespace google { -namespace cloud { -namespace billing { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use billing_v1::MakeCloudCatalogConnection directly. -using ::google::cloud::billing_v1::MakeCloudCatalogConnection; - -/// @deprecated Use billing_v1::CloudCatalogConnection directly. -using ::google::cloud::billing_v1::CloudCatalogConnection; - -/// @deprecated Use billing_v1::CloudCatalogLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::billing_v1::CloudCatalogLimitedErrorCountRetryPolicy; - -/// @deprecated Use billing_v1::CloudCatalogLimitedTimeRetryPolicy directly. -using ::google::cloud::billing_v1::CloudCatalogLimitedTimeRetryPolicy; - -/// @deprecated Use billing_v1::CloudCatalogRetryPolicy directly. -using ::google::cloud::billing_v1::CloudCatalogRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace billing -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_CLOUD_CATALOG_CONNECTION_H diff --git a/google/cloud/billing/cloud_catalog_connection_idempotency_policy.h b/google/cloud/billing/cloud_catalog_connection_idempotency_policy.h deleted file mode 100644 index a3d6c4f493620..0000000000000 --- a/google/cloud/billing/cloud_catalog_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/billing/v1/cloud_catalog.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_CLOUD_CATALOG_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_CLOUD_CATALOG_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/billing/v1/cloud_catalog_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace billing { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// billing_v1::MakeDefaultCloudCatalogConnectionIdempotencyPolicy directly. -using ::google::cloud::billing_v1:: - MakeDefaultCloudCatalogConnectionIdempotencyPolicy; - -/// @deprecated Use billing_v1::CloudCatalogConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::billing_v1::CloudCatalogConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace billing -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_CLOUD_CATALOG_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/billing/cloud_catalog_options.h b/google/cloud/billing/cloud_catalog_options.h deleted file mode 100644 index 9a62295230c2b..0000000000000 --- a/google/cloud/billing/cloud_catalog_options.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/billing/v1/cloud_catalog.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_CLOUD_CATALOG_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_CLOUD_CATALOG_OPTIONS_H - -#include "google/cloud/billing/cloud_catalog_connection.h" -#include "google/cloud/billing/cloud_catalog_connection_idempotency_policy.h" -#include "google/cloud/billing/v1/cloud_catalog_options.h" - -namespace google { -namespace cloud { -namespace billing { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use billing_v1::CloudCatalogBackoffPolicyOption directly. -using ::google::cloud::billing_v1::CloudCatalogBackoffPolicyOption; - -/// @deprecated Use billing_v1::CloudCatalogConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::billing_v1:: - CloudCatalogConnectionIdempotencyPolicyOption; - -/// @deprecated Use billing_v1::CloudCatalogPolicyOptionList directly. -using ::google::cloud::billing_v1::CloudCatalogPolicyOptionList; - -/// @deprecated Use billing_v1::CloudCatalogRetryPolicyOption directly. -using ::google::cloud::billing_v1::CloudCatalogRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace billing -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_CLOUD_CATALOG_OPTIONS_H diff --git a/google/cloud/billing/mocks/mock_budget_connection.h b/google/cloud/billing/mocks/mock_budget_connection.h deleted file mode 100644 index fe60dacd761d3..0000000000000 --- a/google/cloud/billing/mocks/mock_budget_connection.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/billing/budgets/v1/budget_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_MOCKS_MOCK_BUDGET_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_MOCKS_MOCK_BUDGET_CONNECTION_H - -#include "google/cloud/billing/budget_connection.h" -#include "google/cloud/billing/budgets/v1/mocks/mock_budget_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in billing_budgets_v1_mocks instead of the aliases -/// defined in this namespace. -namespace billing_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use billing_budgets_v1_mocks::MockBudgetServiceConnection -/// directly. -using ::google::cloud::billing_budgets_v1_mocks::MockBudgetServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace billing_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_MOCKS_MOCK_BUDGET_CONNECTION_H diff --git a/google/cloud/billing/mocks/mock_cloud_billing_connection.h b/google/cloud/billing/mocks/mock_cloud_billing_connection.h deleted file mode 100644 index 0ae5e447d704a..0000000000000 --- a/google/cloud/billing/mocks/mock_cloud_billing_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/billing/v1/cloud_billing.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_MOCKS_MOCK_CLOUD_BILLING_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_MOCKS_MOCK_CLOUD_BILLING_CONNECTION_H - -#include "google/cloud/billing/cloud_billing_connection.h" -#include "google/cloud/billing/v1/mocks/mock_cloud_billing_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in billing_v1_mocks instead of the aliases -/// defined in this namespace. -namespace billing_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use billing_v1_mocks::MockCloudBillingConnection directly. -using ::google::cloud::billing_v1_mocks::MockCloudBillingConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace billing_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_MOCKS_MOCK_CLOUD_BILLING_CONNECTION_H diff --git a/google/cloud/billing/mocks/mock_cloud_catalog_connection.h b/google/cloud/billing/mocks/mock_cloud_catalog_connection.h deleted file mode 100644 index 92fdf1a580a28..0000000000000 --- a/google/cloud/billing/mocks/mock_cloud_catalog_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/billing/v1/cloud_catalog.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_MOCKS_MOCK_CLOUD_CATALOG_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_MOCKS_MOCK_CLOUD_CATALOG_CONNECTION_H - -#include "google/cloud/billing/cloud_catalog_connection.h" -#include "google/cloud/billing/v1/mocks/mock_cloud_catalog_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in billing_v1_mocks instead of the aliases -/// defined in this namespace. -namespace billing_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use billing_v1_mocks::MockCloudCatalogConnection directly. -using ::google::cloud::billing_v1_mocks::MockCloudCatalogConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace billing_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_MOCKS_MOCK_CLOUD_CATALOG_CONNECTION_H diff --git a/google/cloud/billing/quickstart/.bazelrc b/google/cloud/billing/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/billing/quickstart/.bazelrc +++ b/google/cloud/billing/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/billing/quickstart/CMakeLists.txt b/google/cloud/billing/quickstart/CMakeLists.txt index 5ef8ce68b09bf..ee84433c1352e 100644 --- a/google/cloud/billing/quickstart/CMakeLists.txt +++ b/google/cloud/billing/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Billing Budget API C++ client library # from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-billing-quickstart CXX) find_package(google_cloud_cpp_billing REQUIRED) diff --git a/google/cloud/billing/v1/cloud_billing_connection.h b/google/cloud/billing/v1/cloud_billing_connection.h index 99cbf66c45ac7..92aa0deccfa89 100644 --- a/google/cloud/billing/v1/cloud_billing_connection.h +++ b/google/cloud/billing/v1/cloud_billing_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_V1_CLOUD_BILLING_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_V1_CLOUD_BILLING_CONNECTION_H +#include "google/cloud/billing/v1/cloud_billing.pb.h" #include "google/cloud/billing/v1/cloud_billing_connection_idempotency_policy.h" #include "google/cloud/billing/v1/internal/cloud_billing_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/billing/v1/cloud_billing_connection_idempotency_policy.h b/google/cloud/billing/v1/cloud_billing_connection_idempotency_policy.h index 9eb734842d37d..aaf4f98af893e 100644 --- a/google/cloud/billing/v1/cloud_billing_connection_idempotency_policy.h +++ b/google/cloud/billing/v1/cloud_billing_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_V1_CLOUD_BILLING_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_V1_CLOUD_BILLING_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/billing/v1/cloud_billing.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/billing/v1/cloud_catalog_connection.h b/google/cloud/billing/v1/cloud_catalog_connection.h index 3f7af5098a5b4..585518d2c7bd7 100644 --- a/google/cloud/billing/v1/cloud_catalog_connection.h +++ b/google/cloud/billing/v1/cloud_catalog_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_V1_CLOUD_CATALOG_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_V1_CLOUD_CATALOG_CONNECTION_H +#include "google/cloud/billing/v1/cloud_catalog.pb.h" #include "google/cloud/billing/v1/cloud_catalog_connection_idempotency_policy.h" #include "google/cloud/billing/v1/internal/cloud_catalog_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/billing/v1/cloud_catalog_connection_idempotency_policy.h b/google/cloud/billing/v1/cloud_catalog_connection_idempotency_policy.h index dbdd33ab9bff7..14409cc176b94 100644 --- a/google/cloud/billing/v1/cloud_catalog_connection_idempotency_policy.h +++ b/google/cloud/billing/v1/cloud_catalog_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_V1_CLOUD_CATALOG_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_V1_CLOUD_CATALOG_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/billing/v1/cloud_catalog.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/billing/v1/internal/cloud_billing_auth_decorator.cc b/google/cloud/billing/v1/internal/cloud_billing_auth_decorator.cc index 947f22c6f7d62..569534d07fb4e 100644 --- a/google/cloud/billing/v1/internal/cloud_billing_auth_decorator.cc +++ b/google/cloud/billing/v1/internal/cloud_billing_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/billing/v1/cloud_billing.proto #include "google/cloud/billing/v1/internal/cloud_billing_auth_decorator.h" -#include +#include "google/cloud/billing/v1/cloud_billing.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_v1_internal { @@ -133,3 +136,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace billing_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/billing/v1/internal/cloud_billing_auth_decorator.h b/google/cloud/billing/v1/internal/cloud_billing_auth_decorator.h index 54b0ec3055580..32f3a62ce2d40 100644 --- a/google/cloud/billing/v1/internal/cloud_billing_auth_decorator.h +++ b/google/cloud/billing/v1/internal/cloud_billing_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_v1_internal { @@ -104,4 +107,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_V1_INTERNAL_CLOUD_BILLING_AUTH_DECORATOR_H diff --git a/google/cloud/billing/v1/internal/cloud_billing_logging_decorator.cc b/google/cloud/billing/v1/internal/cloud_billing_logging_decorator.cc index 4f9588e60fc33..f5fc7d6f6e394 100644 --- a/google/cloud/billing/v1/internal/cloud_billing_logging_decorator.cc +++ b/google/cloud/billing/v1/internal/cloud_billing_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/billing/v1/cloud_billing.proto #include "google/cloud/billing/v1/internal/cloud_billing_logging_decorator.h" +#include "google/cloud/billing/v1/cloud_billing.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_v1_internal { @@ -178,3 +181,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace billing_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/billing/v1/internal/cloud_billing_logging_decorator.h b/google/cloud/billing/v1/internal/cloud_billing_logging_decorator.h index 07c25e25bb8ad..3697a39b205d7 100644 --- a/google/cloud/billing/v1/internal/cloud_billing_logging_decorator.h +++ b/google/cloud/billing/v1/internal/cloud_billing_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_v1_internal { @@ -104,4 +107,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_V1_INTERNAL_CLOUD_BILLING_LOGGING_DECORATOR_H diff --git a/google/cloud/billing/v1/internal/cloud_billing_metadata_decorator.cc b/google/cloud/billing/v1/internal/cloud_billing_metadata_decorator.cc index fff950a9da849..97f4c0f23b388 100644 --- a/google/cloud/billing/v1/internal/cloud_billing_metadata_decorator.cc +++ b/google/cloud/billing/v1/internal/cloud_billing_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/billing/v1/cloud_billing.proto #include "google/cloud/billing/v1/internal/cloud_billing_metadata_decorator.h" +#include "google/cloud/billing/v1/cloud_billing.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_v1_internal { @@ -160,3 +164,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace billing_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/billing/v1/internal/cloud_billing_metadata_decorator.h b/google/cloud/billing/v1/internal/cloud_billing_metadata_decorator.h index dde8349a2a410..1c01d97e04b62 100644 --- a/google/cloud/billing/v1/internal/cloud_billing_metadata_decorator.h +++ b/google/cloud/billing/v1/internal/cloud_billing_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_v1_internal { @@ -109,4 +112,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_V1_INTERNAL_CLOUD_BILLING_METADATA_DECORATOR_H diff --git a/google/cloud/billing/v1/internal/cloud_billing_option_defaults.cc b/google/cloud/billing/v1/internal/cloud_billing_option_defaults.cc index 4cb0577a18d34..7deb03f78a4c7 100644 --- a/google/cloud/billing/v1/internal/cloud_billing_option_defaults.cc +++ b/google/cloud/billing/v1/internal/cloud_billing_option_defaults.cc @@ -41,7 +41,7 @@ Options CloudBillingDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - billing_v1::CloudBillingLimitedTimeRetryPolicy(std::chrono::minutes(30)) + billing_v1::CloudBillingLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/billing/v1/internal/cloud_billing_stub.cc b/google/cloud/billing/v1/internal/cloud_billing_stub.cc index 248dfd811e702..c3d1e2508384f 100644 --- a/google/cloud/billing/v1/internal/cloud_billing_stub.cc +++ b/google/cloud/billing/v1/internal/cloud_billing_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/billing/v1/cloud_billing.proto #include "google/cloud/billing/v1/internal/cloud_billing_stub.h" +#include "google/cloud/billing/v1/cloud_billing.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_v1_internal { @@ -167,3 +170,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace billing_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/billing/v1/internal/cloud_billing_stub.h b/google/cloud/billing/v1/internal/cloud_billing_stub.h index dede42151b0be..f8abe8bacbf7c 100644 --- a/google/cloud/billing/v1/internal/cloud_billing_stub.h +++ b/google/cloud/billing/v1/internal/cloud_billing_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_V1_INTERNAL_CLOUD_BILLING_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_V1_INTERNAL_CLOUD_BILLING_STUB_H +#include "google/cloud/billing/v1/cloud_billing.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_v1_internal { @@ -168,4 +171,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_V1_INTERNAL_CLOUD_BILLING_STUB_H diff --git a/google/cloud/billing/v1/internal/cloud_billing_stub_factory.cc b/google/cloud/billing/v1/internal/cloud_billing_stub_factory.cc index c8f32450994f7..3e8c6b09167fc 100644 --- a/google/cloud/billing/v1/internal/cloud_billing_stub_factory.cc +++ b/google/cloud/billing/v1/internal/cloud_billing_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/billing/v1/cloud_billing.proto #include "google/cloud/billing/v1/internal/cloud_billing_stub_factory.h" +#include "google/cloud/billing/v1/cloud_billing.grpc.pb.h" #include "google/cloud/billing/v1/internal/cloud_billing_auth_decorator.h" #include "google/cloud/billing/v1/internal/cloud_billing_logging_decorator.h" #include "google/cloud/billing/v1/internal/cloud_billing_metadata_decorator.h" @@ -28,10 +29,12 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_v1_internal { @@ -68,3 +71,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace billing_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/billing/v1/internal/cloud_billing_stub_factory.h b/google/cloud/billing/v1/internal/cloud_billing_stub_factory.h index 286c804b363a3..19fef8eae59cf 100644 --- a/google/cloud/billing/v1/internal/cloud_billing_stub_factory.h +++ b/google/cloud/billing/v1/internal/cloud_billing_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_V1_INTERNAL_CLOUD_BILLING_STUB_FACTORY_H diff --git a/google/cloud/billing/v1/internal/cloud_billing_tracing_connection.cc b/google/cloud/billing/v1/internal/cloud_billing_tracing_connection.cc index 8b3aaceb64844..edd63837ffdfc 100644 --- a/google/cloud/billing/v1/internal/cloud_billing_tracing_connection.cc +++ b/google/cloud/billing/v1/internal/cloud_billing_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace billing_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudBillingTracingConnection::CloudBillingTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -137,16 +135,12 @@ CloudBillingTracingConnection::MoveBillingAccount( return internal::EndSpan(*span, child_->MoveBillingAccount(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCloudBillingTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/billing/v1/internal/cloud_billing_tracing_connection.h b/google/cloud/billing/v1/internal/cloud_billing_tracing_connection.h index 90ce15035113e..377c71b1dd2c6 100644 --- a/google/cloud/billing/v1/internal/cloud_billing_tracing_connection.h +++ b/google/cloud/billing/v1/internal/cloud_billing_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace billing_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudBillingTracingConnection : public billing_v1::CloudBillingConnection { public: @@ -87,8 +85,6 @@ class CloudBillingTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/billing/v1/internal/cloud_billing_tracing_stub.cc b/google/cloud/billing/v1/internal/cloud_billing_tracing_stub.cc index 91e2d11358e61..e830cb0d1e228 100644 --- a/google/cloud/billing/v1/internal/cloud_billing_tracing_stub.cc +++ b/google/cloud/billing/v1/internal/cloud_billing_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudBillingTracingStub::CloudBillingTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -165,18 +166,14 @@ CloudBillingTracingStub::MoveBillingAccount( context, *span, child_->MoveBillingAccount(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCloudBillingTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace billing_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/billing/v1/internal/cloud_billing_tracing_stub.h b/google/cloud/billing/v1/internal/cloud_billing_tracing_stub.h index 74142097e8de2..b11c977c5c954 100644 --- a/google/cloud/billing/v1/internal/cloud_billing_tracing_stub.h +++ b/google/cloud/billing/v1/internal/cloud_billing_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudBillingTracingStub : public CloudBillingStub { public: ~CloudBillingTracingStub() override = default; @@ -100,8 +101,6 @@ class CloudBillingTracingStub : public CloudBillingStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -116,4 +115,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_V1_INTERNAL_CLOUD_BILLING_TRACING_STUB_H diff --git a/google/cloud/billing/v1/internal/cloud_catalog_auth_decorator.cc b/google/cloud/billing/v1/internal/cloud_catalog_auth_decorator.cc index 2ce708278f082..b63c094f17fbf 100644 --- a/google/cloud/billing/v1/internal/cloud_catalog_auth_decorator.cc +++ b/google/cloud/billing/v1/internal/cloud_catalog_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/billing/v1/cloud_catalog.proto #include "google/cloud/billing/v1/internal/cloud_catalog_auth_decorator.h" -#include +#include "google/cloud/billing/v1/cloud_catalog.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_v1_internal { @@ -53,3 +56,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace billing_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/billing/v1/internal/cloud_catalog_auth_decorator.h b/google/cloud/billing/v1/internal/cloud_catalog_auth_decorator.h index 6c0edeace0ef2..ebca0614d9099 100644 --- a/google/cloud/billing/v1/internal/cloud_catalog_auth_decorator.h +++ b/google/cloud/billing/v1/internal/cloud_catalog_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_v1_internal { @@ -56,4 +59,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_V1_INTERNAL_CLOUD_CATALOG_AUTH_DECORATOR_H diff --git a/google/cloud/billing/v1/internal/cloud_catalog_logging_decorator.cc b/google/cloud/billing/v1/internal/cloud_catalog_logging_decorator.cc index 8a6cac0644d8f..d7e534df440bf 100644 --- a/google/cloud/billing/v1/internal/cloud_catalog_logging_decorator.cc +++ b/google/cloud/billing/v1/internal/cloud_catalog_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/billing/v1/cloud_catalog.proto #include "google/cloud/billing/v1/internal/cloud_catalog_logging_decorator.h" +#include "google/cloud/billing/v1/cloud_catalog.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_v1_internal { @@ -63,3 +66,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace billing_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/billing/v1/internal/cloud_catalog_logging_decorator.h b/google/cloud/billing/v1/internal/cloud_catalog_logging_decorator.h index dcc3507973326..fe7c7ee734605 100644 --- a/google/cloud/billing/v1/internal/cloud_catalog_logging_decorator.h +++ b/google/cloud/billing/v1/internal/cloud_catalog_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_v1_internal { @@ -56,4 +59,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_V1_INTERNAL_CLOUD_CATALOG_LOGGING_DECORATOR_H diff --git a/google/cloud/billing/v1/internal/cloud_catalog_metadata_decorator.cc b/google/cloud/billing/v1/internal/cloud_catalog_metadata_decorator.cc index 1088faed8ef8a..42ef5ed069eb5 100644 --- a/google/cloud/billing/v1/internal/cloud_catalog_metadata_decorator.cc +++ b/google/cloud/billing/v1/internal/cloud_catalog_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/billing/v1/cloud_catalog.proto #include "google/cloud/billing/v1/internal/cloud_catalog_metadata_decorator.h" +#include "google/cloud/billing/v1/cloud_catalog.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_v1_internal { @@ -78,3 +82,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace billing_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/billing/v1/internal/cloud_catalog_metadata_decorator.h b/google/cloud/billing/v1/internal/cloud_catalog_metadata_decorator.h index dffe70676ecc1..2e303fc36face 100644 --- a/google/cloud/billing/v1/internal/cloud_catalog_metadata_decorator.h +++ b/google/cloud/billing/v1/internal/cloud_catalog_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_v1_internal { @@ -61,4 +64,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_V1_INTERNAL_CLOUD_CATALOG_METADATA_DECORATOR_H diff --git a/google/cloud/billing/v1/internal/cloud_catalog_option_defaults.cc b/google/cloud/billing/v1/internal/cloud_catalog_option_defaults.cc index 038644912c14c..0b098ad59b473 100644 --- a/google/cloud/billing/v1/internal/cloud_catalog_option_defaults.cc +++ b/google/cloud/billing/v1/internal/cloud_catalog_option_defaults.cc @@ -41,7 +41,7 @@ Options CloudCatalogDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - billing_v1::CloudCatalogLimitedTimeRetryPolicy(std::chrono::minutes(30)) + billing_v1::CloudCatalogLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/billing/v1/internal/cloud_catalog_stub.cc b/google/cloud/billing/v1/internal/cloud_catalog_stub.cc index 174186531adcf..17aeb38232190 100644 --- a/google/cloud/billing/v1/internal/cloud_catalog_stub.cc +++ b/google/cloud/billing/v1/internal/cloud_catalog_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/billing/v1/cloud_catalog.proto #include "google/cloud/billing/v1/internal/cloud_catalog_stub.h" +#include "google/cloud/billing/v1/cloud_catalog.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_v1_internal { @@ -58,3 +61,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace billing_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/billing/v1/internal/cloud_catalog_stub.h b/google/cloud/billing/v1/internal/cloud_catalog_stub.h index 252be6fd66e5a..816b5dc24dc08 100644 --- a/google/cloud/billing/v1/internal/cloud_catalog_stub.h +++ b/google/cloud/billing/v1/internal/cloud_catalog_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_V1_INTERNAL_CLOUD_CATALOG_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_V1_INTERNAL_CLOUD_CATALOG_STUB_H +#include "google/cloud/billing/v1/cloud_catalog.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_v1_internal { @@ -70,4 +73,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_V1_INTERNAL_CLOUD_CATALOG_STUB_H diff --git a/google/cloud/billing/v1/internal/cloud_catalog_stub_factory.cc b/google/cloud/billing/v1/internal/cloud_catalog_stub_factory.cc index 66c8c58ce9fc6..0f65d22f539f6 100644 --- a/google/cloud/billing/v1/internal/cloud_catalog_stub_factory.cc +++ b/google/cloud/billing/v1/internal/cloud_catalog_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/billing/v1/cloud_catalog.proto #include "google/cloud/billing/v1/internal/cloud_catalog_stub_factory.h" +#include "google/cloud/billing/v1/cloud_catalog.grpc.pb.h" #include "google/cloud/billing/v1/internal/cloud_catalog_auth_decorator.h" #include "google/cloud/billing/v1/internal/cloud_catalog_logging_decorator.h" #include "google/cloud/billing/v1/internal/cloud_catalog_metadata_decorator.h" @@ -28,10 +29,12 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_v1_internal { @@ -68,3 +71,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace billing_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/billing/v1/internal/cloud_catalog_stub_factory.h b/google/cloud/billing/v1/internal/cloud_catalog_stub_factory.h index 5f6aa5baeeaa7..bbc88674b5f4a 100644 --- a/google/cloud/billing/v1/internal/cloud_catalog_stub_factory.h +++ b/google/cloud/billing/v1/internal/cloud_catalog_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_V1_INTERNAL_CLOUD_CATALOG_STUB_FACTORY_H diff --git a/google/cloud/billing/v1/internal/cloud_catalog_tracing_connection.cc b/google/cloud/billing/v1/internal/cloud_catalog_tracing_connection.cc index 52f982f0183eb..d91c4fe6fa9a9 100644 --- a/google/cloud/billing/v1/internal/cloud_catalog_tracing_connection.cc +++ b/google/cloud/billing/v1/internal/cloud_catalog_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace billing_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudCatalogTracingConnection::CloudCatalogTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -55,16 +53,12 @@ CloudCatalogTracingConnection::ListSkus( std::move(span), std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCloudCatalogTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/billing/v1/internal/cloud_catalog_tracing_connection.h b/google/cloud/billing/v1/internal/cloud_catalog_tracing_connection.h index a0dbfe8f35928..56e1ea93386ab 100644 --- a/google/cloud/billing/v1/internal/cloud_catalog_tracing_connection.h +++ b/google/cloud/billing/v1/internal/cloud_catalog_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace billing_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudCatalogTracingConnection : public billing_v1::CloudCatalogConnection { public: @@ -50,8 +48,6 @@ class CloudCatalogTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/billing/v1/internal/cloud_catalog_tracing_stub.cc b/google/cloud/billing/v1/internal/cloud_catalog_tracing_stub.cc index 09b898d2f6f3e..64289fe6fd48e 100644 --- a/google/cloud/billing/v1/internal/cloud_catalog_tracing_stub.cc +++ b/google/cloud/billing/v1/internal/cloud_catalog_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudCatalogTracingStub::CloudCatalogTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -56,18 +57,14 @@ CloudCatalogTracingStub::ListSkus( child_->ListSkus(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCloudCatalogTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace billing_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/billing/v1/internal/cloud_catalog_tracing_stub.h b/google/cloud/billing/v1/internal/cloud_catalog_tracing_stub.h index e02ef50e343aa..ce93063587671 100644 --- a/google/cloud/billing/v1/internal/cloud_catalog_tracing_stub.h +++ b/google/cloud/billing/v1/internal/cloud_catalog_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace billing_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudCatalogTracingStub : public CloudCatalogStub { public: ~CloudCatalogTracingStub() override = default; @@ -52,8 +53,6 @@ class CloudCatalogTracingStub : public CloudCatalogStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -68,4 +67,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BILLING_V1_INTERNAL_CLOUD_CATALOG_TRACING_STUB_H diff --git a/google/cloud/binaryauthorization/BUILD.bazel b/google/cloud/binaryauthorization/BUILD.bazel index 98ae06be8651f..80cd3957897db 100644 --- a/google/cloud/binaryauthorization/BUILD.bazel +++ b/google/cloud/binaryauthorization/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/binaryauthorization/v1:binaryauthorization_cc_grpc", + "@googleapis//google/cloud/binaryauthorization/v1:binaryauthorization_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/binaryauthorization/CMakeLists.txt b/google/cloud/binaryauthorization/CMakeLists.txt index aeef19d1d6dbd..85806a39a59d8 100644 --- a/google/cloud/binaryauthorization/CMakeLists.txt +++ b/google/cloud/binaryauthorization/CMakeLists.txt @@ -18,7 +18,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library( binaryauthorization "Binary Authorization API" - SERVICE_DIRS "__EMPTY__" "v1/" + SERVICE_DIRS "v1/" SHARED_PROTO_DEPS "grafeas") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) diff --git a/google/cloud/binaryauthorization/binauthz_management_service_v1_client.h b/google/cloud/binaryauthorization/binauthz_management_service_v1_client.h deleted file mode 100644 index 9d047e61be7e4..0000000000000 --- a/google/cloud/binaryauthorization/binauthz_management_service_v1_client.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/binaryauthorization/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_BINAUTHZ_MANAGEMENT_SERVICE_V1_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_BINAUTHZ_MANAGEMENT_SERVICE_V1_CLIENT_H - -#include "google/cloud/binaryauthorization/binauthz_management_service_v1_connection.h" -#include "google/cloud/binaryauthorization/v1/binauthz_management_service_v1_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in binaryauthorization_v1 instead of the aliases defined -/// in this namespace. -namespace binaryauthorization { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use binaryauthorization_v1::BinauthzManagementServiceV1Client -/// directly. -using ::google::cloud::binaryauthorization_v1:: - BinauthzManagementServiceV1Client; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace binaryauthorization -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_BINAUTHZ_MANAGEMENT_SERVICE_V1_CLIENT_H diff --git a/google/cloud/binaryauthorization/binauthz_management_service_v1_connection.h b/google/cloud/binaryauthorization/binauthz_management_service_v1_connection.h deleted file mode 100644 index 96d6d8c7adb65..0000000000000 --- a/google/cloud/binaryauthorization/binauthz_management_service_v1_connection.h +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/binaryauthorization/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_BINAUTHZ_MANAGEMENT_SERVICE_V1_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_BINAUTHZ_MANAGEMENT_SERVICE_V1_CONNECTION_H - -#include "google/cloud/binaryauthorization/binauthz_management_service_v1_connection_idempotency_policy.h" -#include "google/cloud/binaryauthorization/v1/binauthz_management_service_v1_connection.h" - -namespace google { -namespace cloud { -namespace binaryauthorization { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// binaryauthorization_v1::MakeBinauthzManagementServiceV1Connection directly. -using ::google::cloud::binaryauthorization_v1:: - MakeBinauthzManagementServiceV1Connection; - -/// @deprecated Use -/// binaryauthorization_v1::BinauthzManagementServiceV1Connection directly. -using ::google::cloud::binaryauthorization_v1:: - BinauthzManagementServiceV1Connection; - -/// @deprecated Use -/// binaryauthorization_v1::BinauthzManagementServiceV1LimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::binaryauthorization_v1:: - BinauthzManagementServiceV1LimitedErrorCountRetryPolicy; - -/// @deprecated Use -/// binaryauthorization_v1::BinauthzManagementServiceV1LimitedTimeRetryPolicy -/// directly. -using ::google::cloud::binaryauthorization_v1:: - BinauthzManagementServiceV1LimitedTimeRetryPolicy; - -/// @deprecated Use -/// binaryauthorization_v1::BinauthzManagementServiceV1RetryPolicy directly. -using ::google::cloud::binaryauthorization_v1:: - BinauthzManagementServiceV1RetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace binaryauthorization -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_BINAUTHZ_MANAGEMENT_SERVICE_V1_CONNECTION_H diff --git a/google/cloud/binaryauthorization/binauthz_management_service_v1_connection_idempotency_policy.h b/google/cloud/binaryauthorization/binauthz_management_service_v1_connection_idempotency_policy.h deleted file mode 100644 index 96e1f03f331eb..0000000000000 --- a/google/cloud/binaryauthorization/binauthz_management_service_v1_connection_idempotency_policy.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/binaryauthorization/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_BINAUTHZ_MANAGEMENT_SERVICE_V1_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_BINAUTHZ_MANAGEMENT_SERVICE_V1_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/binaryauthorization/v1/binauthz_management_service_v1_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace binaryauthorization { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// binaryauthorization_v1::MakeDefaultBinauthzManagementServiceV1ConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::binaryauthorization_v1:: - MakeDefaultBinauthzManagementServiceV1ConnectionIdempotencyPolicy; - -/// @deprecated Use -/// binaryauthorization_v1::BinauthzManagementServiceV1ConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::binaryauthorization_v1:: - BinauthzManagementServiceV1ConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace binaryauthorization -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_BINAUTHZ_MANAGEMENT_SERVICE_V1_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/binaryauthorization/binauthz_management_service_v1_options.h b/google/cloud/binaryauthorization/binauthz_management_service_v1_options.h deleted file mode 100644 index bcba0e19d2889..0000000000000 --- a/google/cloud/binaryauthorization/binauthz_management_service_v1_options.h +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/binaryauthorization/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_BINAUTHZ_MANAGEMENT_SERVICE_V1_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_BINAUTHZ_MANAGEMENT_SERVICE_V1_OPTIONS_H - -#include "google/cloud/binaryauthorization/binauthz_management_service_v1_connection.h" -#include "google/cloud/binaryauthorization/binauthz_management_service_v1_connection_idempotency_policy.h" -#include "google/cloud/binaryauthorization/v1/binauthz_management_service_v1_options.h" - -namespace google { -namespace cloud { -namespace binaryauthorization { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// binaryauthorization_v1::BinauthzManagementServiceV1BackoffPolicyOption -/// directly. -using ::google::cloud::binaryauthorization_v1:: - BinauthzManagementServiceV1BackoffPolicyOption; - -/// @deprecated Use -/// binaryauthorization_v1::BinauthzManagementServiceV1ConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::binaryauthorization_v1:: - BinauthzManagementServiceV1ConnectionIdempotencyPolicyOption; - -/// @deprecated Use -/// binaryauthorization_v1::BinauthzManagementServiceV1PolicyOptionList -/// directly. -using ::google::cloud::binaryauthorization_v1:: - BinauthzManagementServiceV1PolicyOptionList; - -/// @deprecated Use -/// binaryauthorization_v1::BinauthzManagementServiceV1RetryPolicyOption -/// directly. -using ::google::cloud::binaryauthorization_v1:: - BinauthzManagementServiceV1RetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace binaryauthorization -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_BINAUTHZ_MANAGEMENT_SERVICE_V1_OPTIONS_H diff --git a/google/cloud/binaryauthorization/mocks/mock_binauthz_management_service_v1_connection.h b/google/cloud/binaryauthorization/mocks/mock_binauthz_management_service_v1_connection.h deleted file mode 100644 index f718cf397bb67..0000000000000 --- a/google/cloud/binaryauthorization/mocks/mock_binauthz_management_service_v1_connection.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/binaryauthorization/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_MOCKS_MOCK_BINAUTHZ_MANAGEMENT_SERVICE_V1_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_MOCKS_MOCK_BINAUTHZ_MANAGEMENT_SERVICE_V1_CONNECTION_H - -#include "google/cloud/binaryauthorization/binauthz_management_service_v1_connection.h" -#include "google/cloud/binaryauthorization/v1/mocks/mock_binauthz_management_service_v1_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in binaryauthorization_v1_mocks instead of the aliases -/// defined in this namespace. -namespace binaryauthorization_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// binaryauthorization_v1_mocks::MockBinauthzManagementServiceV1Connection -/// directly. -using ::google::cloud::binaryauthorization_v1_mocks:: - MockBinauthzManagementServiceV1Connection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace binaryauthorization_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_MOCKS_MOCK_BINAUTHZ_MANAGEMENT_SERVICE_V1_CONNECTION_H diff --git a/google/cloud/binaryauthorization/mocks/mock_system_policy_v1_connection.h b/google/cloud/binaryauthorization/mocks/mock_system_policy_v1_connection.h deleted file mode 100644 index 45b8202e6fb0a..0000000000000 --- a/google/cloud/binaryauthorization/mocks/mock_system_policy_v1_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/binaryauthorization/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_MOCKS_MOCK_SYSTEM_POLICY_V1_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_MOCKS_MOCK_SYSTEM_POLICY_V1_CONNECTION_H - -#include "google/cloud/binaryauthorization/system_policy_v1_connection.h" -#include "google/cloud/binaryauthorization/v1/mocks/mock_system_policy_v1_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in binaryauthorization_v1_mocks instead of the aliases -/// defined in this namespace. -namespace binaryauthorization_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use binaryauthorization_v1_mocks::MockSystemPolicyV1Connection -/// directly. -using ::google::cloud::binaryauthorization_v1_mocks:: - MockSystemPolicyV1Connection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace binaryauthorization_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_MOCKS_MOCK_SYSTEM_POLICY_V1_CONNECTION_H diff --git a/google/cloud/binaryauthorization/mocks/mock_validation_helper_v1_connection.h b/google/cloud/binaryauthorization/mocks/mock_validation_helper_v1_connection.h deleted file mode 100644 index be41ef3b89488..0000000000000 --- a/google/cloud/binaryauthorization/mocks/mock_validation_helper_v1_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/binaryauthorization/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_MOCKS_MOCK_VALIDATION_HELPER_V1_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_MOCKS_MOCK_VALIDATION_HELPER_V1_CONNECTION_H - -#include "google/cloud/binaryauthorization/v1/mocks/mock_validation_helper_v1_connection.h" -#include "google/cloud/binaryauthorization/validation_helper_v1_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in binaryauthorization_v1_mocks instead of the aliases -/// defined in this namespace. -namespace binaryauthorization_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// binaryauthorization_v1_mocks::MockValidationHelperV1Connection directly. -using ::google::cloud::binaryauthorization_v1_mocks:: - MockValidationHelperV1Connection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace binaryauthorization_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_MOCKS_MOCK_VALIDATION_HELPER_V1_CONNECTION_H diff --git a/google/cloud/binaryauthorization/quickstart/.bazelrc b/google/cloud/binaryauthorization/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/binaryauthorization/quickstart/.bazelrc +++ b/google/cloud/binaryauthorization/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/binaryauthorization/quickstart/CMakeLists.txt b/google/cloud/binaryauthorization/quickstart/CMakeLists.txt index db86481d43744..1476d4242cecb 100644 --- a/google/cloud/binaryauthorization/quickstart/CMakeLists.txt +++ b/google/cloud/binaryauthorization/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Binary Authorization API C++ client library # from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-binaryauthorization-quickstart CXX) find_package(google_cloud_cpp_binaryauthorization REQUIRED) diff --git a/google/cloud/binaryauthorization/system_policy_v1_client.h b/google/cloud/binaryauthorization/system_policy_v1_client.h deleted file mode 100644 index dae420e846a1f..0000000000000 --- a/google/cloud/binaryauthorization/system_policy_v1_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/binaryauthorization/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_SYSTEM_POLICY_V1_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_SYSTEM_POLICY_V1_CLIENT_H - -#include "google/cloud/binaryauthorization/system_policy_v1_connection.h" -#include "google/cloud/binaryauthorization/v1/system_policy_v1_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in binaryauthorization_v1 instead of the aliases defined -/// in this namespace. -namespace binaryauthorization { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use binaryauthorization_v1::SystemPolicyV1Client directly. -using ::google::cloud::binaryauthorization_v1::SystemPolicyV1Client; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace binaryauthorization -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_SYSTEM_POLICY_V1_CLIENT_H diff --git a/google/cloud/binaryauthorization/system_policy_v1_connection.h b/google/cloud/binaryauthorization/system_policy_v1_connection.h deleted file mode 100644 index 1ffe825b49b0a..0000000000000 --- a/google/cloud/binaryauthorization/system_policy_v1_connection.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/binaryauthorization/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_SYSTEM_POLICY_V1_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_SYSTEM_POLICY_V1_CONNECTION_H - -#include "google/cloud/binaryauthorization/system_policy_v1_connection_idempotency_policy.h" -#include "google/cloud/binaryauthorization/v1/system_policy_v1_connection.h" - -namespace google { -namespace cloud { -namespace binaryauthorization { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use binaryauthorization_v1::MakeSystemPolicyV1Connection -/// directly. -using ::google::cloud::binaryauthorization_v1::MakeSystemPolicyV1Connection; - -/// @deprecated Use binaryauthorization_v1::SystemPolicyV1Connection directly. -using ::google::cloud::binaryauthorization_v1::SystemPolicyV1Connection; - -/// @deprecated Use -/// binaryauthorization_v1::SystemPolicyV1LimitedErrorCountRetryPolicy directly. -using ::google::cloud::binaryauthorization_v1:: - SystemPolicyV1LimitedErrorCountRetryPolicy; - -/// @deprecated Use binaryauthorization_v1::SystemPolicyV1LimitedTimeRetryPolicy -/// directly. -using ::google::cloud::binaryauthorization_v1:: - SystemPolicyV1LimitedTimeRetryPolicy; - -/// @deprecated Use binaryauthorization_v1::SystemPolicyV1RetryPolicy directly. -using ::google::cloud::binaryauthorization_v1::SystemPolicyV1RetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace binaryauthorization -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_SYSTEM_POLICY_V1_CONNECTION_H diff --git a/google/cloud/binaryauthorization/system_policy_v1_connection_idempotency_policy.h b/google/cloud/binaryauthorization/system_policy_v1_connection_idempotency_policy.h deleted file mode 100644 index 9a7dadbabaf17..0000000000000 --- a/google/cloud/binaryauthorization/system_policy_v1_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/binaryauthorization/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_SYSTEM_POLICY_V1_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_SYSTEM_POLICY_V1_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/binaryauthorization/v1/system_policy_v1_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace binaryauthorization { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// binaryauthorization_v1::MakeDefaultSystemPolicyV1ConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::binaryauthorization_v1:: - MakeDefaultSystemPolicyV1ConnectionIdempotencyPolicy; - -/// @deprecated Use -/// binaryauthorization_v1::SystemPolicyV1ConnectionIdempotencyPolicy directly. -using ::google::cloud::binaryauthorization_v1:: - SystemPolicyV1ConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace binaryauthorization -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_SYSTEM_POLICY_V1_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/binaryauthorization/system_policy_v1_options.h b/google/cloud/binaryauthorization/system_policy_v1_options.h deleted file mode 100644 index 4c019adf2d0ae..0000000000000 --- a/google/cloud/binaryauthorization/system_policy_v1_options.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/binaryauthorization/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_SYSTEM_POLICY_V1_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_SYSTEM_POLICY_V1_OPTIONS_H - -#include "google/cloud/binaryauthorization/system_policy_v1_connection.h" -#include "google/cloud/binaryauthorization/system_policy_v1_connection_idempotency_policy.h" -#include "google/cloud/binaryauthorization/v1/system_policy_v1_options.h" - -namespace google { -namespace cloud { -namespace binaryauthorization { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use binaryauthorization_v1::SystemPolicyV1BackoffPolicyOption -/// directly. -using ::google::cloud::binaryauthorization_v1:: - SystemPolicyV1BackoffPolicyOption; - -/// @deprecated Use -/// binaryauthorization_v1::SystemPolicyV1ConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::binaryauthorization_v1:: - SystemPolicyV1ConnectionIdempotencyPolicyOption; - -/// @deprecated Use binaryauthorization_v1::SystemPolicyV1PolicyOptionList -/// directly. -using ::google::cloud::binaryauthorization_v1::SystemPolicyV1PolicyOptionList; - -/// @deprecated Use binaryauthorization_v1::SystemPolicyV1RetryPolicyOption -/// directly. -using ::google::cloud::binaryauthorization_v1::SystemPolicyV1RetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace binaryauthorization -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_SYSTEM_POLICY_V1_OPTIONS_H diff --git a/google/cloud/binaryauthorization/v1/binauthz_management_service_v1_connection.h b/google/cloud/binaryauthorization/v1/binauthz_management_service_v1_connection.h index db4fffc36869d..8e78321052a66 100644 --- a/google/cloud/binaryauthorization/v1/binauthz_management_service_v1_connection.h +++ b/google/cloud/binaryauthorization/v1/binauthz_management_service_v1_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/binaryauthorization/v1/binauthz_management_service_v1_connection_idempotency_policy.h" #include "google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_retry_traits.h" +#include "google/cloud/binaryauthorization/v1/service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/binaryauthorization/v1/binauthz_management_service_v1_connection_idempotency_policy.h b/google/cloud/binaryauthorization/v1/binauthz_management_service_v1_connection_idempotency_policy.h index 6de535ab49f6d..53129d39e015f 100644 --- a/google/cloud/binaryauthorization/v1/binauthz_management_service_v1_connection_idempotency_policy.h +++ b/google/cloud/binaryauthorization/v1/binauthz_management_service_v1_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_V1_BINAUTHZ_MANAGEMENT_SERVICE_V1_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_V1_BINAUTHZ_MANAGEMENT_SERVICE_V1_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/binaryauthorization/v1/service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_auth_decorator.cc b/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_auth_decorator.cc index 5a0fb4a58f4d6..5cec1fa1309f9 100644 --- a/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_auth_decorator.cc +++ b/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/binaryauthorization/v1/service.proto #include "google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_auth_decorator.h" -#include +#include "google/cloud/binaryauthorization/v1/service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { @@ -102,3 +105,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace binaryauthorization_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_auth_decorator.h b/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_auth_decorator.h index 32f712c4f487d..7aeb01dcf0b04 100644 --- a/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_auth_decorator.h +++ b/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { @@ -84,4 +87,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_V1_INTERNAL_BINAUTHZ_MANAGEMENT_SERVICE_V1_AUTH_DECORATOR_H diff --git a/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_logging_decorator.cc b/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_logging_decorator.cc index c89ff60ced7ca..c4920aeaca8fd 100644 --- a/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_logging_decorator.cc +++ b/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/binaryauthorization/v1/service.proto #include "google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_logging_decorator.h" +#include "google/cloud/binaryauthorization/v1/service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { @@ -137,3 +140,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace binaryauthorization_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_logging_decorator.h b/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_logging_decorator.h index 3527ea1af94b9..98c6e619a28ea 100644 --- a/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_logging_decorator.h +++ b/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { @@ -85,4 +88,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_V1_INTERNAL_BINAUTHZ_MANAGEMENT_SERVICE_V1_LOGGING_DECORATOR_H diff --git a/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_metadata_decorator.cc b/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_metadata_decorator.cc index c64fdf3b6a827..be5ef8c278396 100644 --- a/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_metadata_decorator.cc +++ b/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/binaryauthorization/v1/service.proto #include "google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_metadata_decorator.h" +#include "google/cloud/binaryauthorization/v1/service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { @@ -130,3 +134,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace binaryauthorization_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_metadata_decorator.h b/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_metadata_decorator.h index 739e845046bec..0373c6770b2b9 100644 --- a/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_metadata_decorator.h +++ b/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { @@ -91,4 +94,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_V1_INTERNAL_BINAUTHZ_MANAGEMENT_SERVICE_V1_METADATA_DECORATOR_H diff --git a/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_option_defaults.cc b/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_option_defaults.cc index 24c8467822196..6ef7df1496c66 100644 --- a/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_option_defaults.cc +++ b/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_option_defaults.cc @@ -46,7 +46,7 @@ Options BinauthzManagementServiceV1DefaultOptions(Options options) { binaryauthorization_v1::BinauthzManagementServiceV1RetryPolicyOption>( binaryauthorization_v1:: BinauthzManagementServiceV1LimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { @@ -122,3 +125,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace binaryauthorization_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_stub.h b/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_stub.h index 0d6e67acb4d2c..ae55db3a8aba0 100644 --- a/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_stub.h +++ b/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_V1_INTERNAL_BINAUTHZ_MANAGEMENT_SERVICE_V1_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_V1_INTERNAL_BINAUTHZ_MANAGEMENT_SERVICE_V1_STUB_H +#include "google/cloud/binaryauthorization/v1/service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { @@ -131,4 +134,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_V1_INTERNAL_BINAUTHZ_MANAGEMENT_SERVICE_V1_STUB_H diff --git a/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_stub_factory.cc b/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_stub_factory.cc index 1a4f3cccddfcb..79d8668ceb219 100644 --- a/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_stub_factory.cc +++ b/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_metadata_decorator.h" #include "google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_stub.h" #include "google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_tracing_stub.h" +#include "google/cloud/binaryauthorization/v1/service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace binaryauthorization_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_stub_factory.h b/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_stub_factory.h index fd310fb3f8ef1..871b1cd1a6696 100644 --- a/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_stub_factory.h +++ b/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_V1_INTERNAL_BINAUTHZ_MANAGEMENT_SERVICE_V1_STUB_FACTORY_H diff --git a/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_tracing_connection.cc b/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_tracing_connection.cc index cc59f42f07b8d..23ad8730b46f5 100644 --- a/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_tracing_connection.cc +++ b/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace binaryauthorization_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - BinauthzManagementServiceV1TracingConnection:: BinauthzManagementServiceV1TracingConnection( std::shared_ptr< @@ -112,19 +110,15 @@ Status BinauthzManagementServiceV1TracingConnection::DeleteAttestor( return internal::EndSpan(*span, child_->DeleteAttestor(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeBinauthzManagementServiceV1TracingConnection( std::shared_ptr< binaryauthorization_v1::BinauthzManagementServiceV1Connection> conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_tracing_connection.h b/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_tracing_connection.h index a9ad2fec3d959..8eacd82697a27 100644 --- a/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_tracing_connection.h +++ b/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace binaryauthorization_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class BinauthzManagementServiceV1TracingConnection : public binaryauthorization_v1::BinauthzManagementServiceV1Connection { public: @@ -75,8 +73,6 @@ class BinauthzManagementServiceV1TracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_tracing_stub.cc b/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_tracing_stub.cc index a33fcf18f0f1f..bccf6bce52c42 100644 --- a/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_tracing_stub.cc +++ b/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - BinauthzManagementServiceV1TracingStub::BinauthzManagementServiceV1TracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -127,20 +128,16 @@ Status BinauthzManagementServiceV1TracingStub::DeleteAttestor( child_->DeleteAttestor(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeBinauthzManagementServiceV1TracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared( std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace binaryauthorization_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_tracing_stub.h b/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_tracing_stub.h index 9308b97a182ff..186e27442b7d2 100644 --- a/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_tracing_stub.h +++ b/google/cloud/binaryauthorization/v1/internal/binauthz_management_service_v1_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class BinauthzManagementServiceV1TracingStub : public BinauthzManagementServiceV1Stub { public: @@ -82,8 +83,6 @@ class BinauthzManagementServiceV1TracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -99,4 +98,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_V1_INTERNAL_BINAUTHZ_MANAGEMENT_SERVICE_V1_TRACING_STUB_H diff --git a/google/cloud/binaryauthorization/v1/internal/system_policy_v1_auth_decorator.cc b/google/cloud/binaryauthorization/v1/internal/system_policy_v1_auth_decorator.cc index 30f12ff33e569..eab16198740a4 100644 --- a/google/cloud/binaryauthorization/v1/internal/system_policy_v1_auth_decorator.cc +++ b/google/cloud/binaryauthorization/v1/internal/system_policy_v1_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/binaryauthorization/v1/service.proto #include "google/cloud/binaryauthorization/v1/internal/system_policy_v1_auth_decorator.h" -#include +#include "google/cloud/binaryauthorization/v1/service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { @@ -45,3 +48,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace binaryauthorization_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/binaryauthorization/v1/internal/system_policy_v1_auth_decorator.h b/google/cloud/binaryauthorization/v1/internal/system_policy_v1_auth_decorator.h index da11f61554d32..b2212e9f7bbb9 100644 --- a/google/cloud/binaryauthorization/v1/internal/system_policy_v1_auth_decorator.h +++ b/google/cloud/binaryauthorization/v1/internal/system_policy_v1_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { @@ -53,4 +56,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_V1_INTERNAL_SYSTEM_POLICY_V1_AUTH_DECORATOR_H diff --git a/google/cloud/binaryauthorization/v1/internal/system_policy_v1_logging_decorator.cc b/google/cloud/binaryauthorization/v1/internal/system_policy_v1_logging_decorator.cc index 5894f55009339..26e627c1cb6c8 100644 --- a/google/cloud/binaryauthorization/v1/internal/system_policy_v1_logging_decorator.cc +++ b/google/cloud/binaryauthorization/v1/internal/system_policy_v1_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/binaryauthorization/v1/service.proto #include "google/cloud/binaryauthorization/v1/internal/system_policy_v1_logging_decorator.h" +#include "google/cloud/binaryauthorization/v1/service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { @@ -54,3 +57,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace binaryauthorization_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/binaryauthorization/v1/internal/system_policy_v1_logging_decorator.h b/google/cloud/binaryauthorization/v1/internal/system_policy_v1_logging_decorator.h index 3ac8115dc0d3e..b15a27e0e206d 100644 --- a/google/cloud/binaryauthorization/v1/internal/system_policy_v1_logging_decorator.h +++ b/google/cloud/binaryauthorization/v1/internal/system_policy_v1_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { @@ -53,4 +56,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_V1_INTERNAL_SYSTEM_POLICY_V1_LOGGING_DECORATOR_H diff --git a/google/cloud/binaryauthorization/v1/internal/system_policy_v1_metadata_decorator.cc b/google/cloud/binaryauthorization/v1/internal/system_policy_v1_metadata_decorator.cc index e513df392108b..9477d24cb59c4 100644 --- a/google/cloud/binaryauthorization/v1/internal/system_policy_v1_metadata_decorator.cc +++ b/google/cloud/binaryauthorization/v1/internal/system_policy_v1_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/binaryauthorization/v1/service.proto #include "google/cloud/binaryauthorization/v1/internal/system_policy_v1_metadata_decorator.h" +#include "google/cloud/binaryauthorization/v1/service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { @@ -71,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace binaryauthorization_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/binaryauthorization/v1/internal/system_policy_v1_metadata_decorator.h b/google/cloud/binaryauthorization/v1/internal/system_policy_v1_metadata_decorator.h index 5268acc1b39a5..8a4f619659025 100644 --- a/google/cloud/binaryauthorization/v1/internal/system_policy_v1_metadata_decorator.h +++ b/google/cloud/binaryauthorization/v1/internal/system_policy_v1_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { @@ -58,4 +61,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_V1_INTERNAL_SYSTEM_POLICY_V1_METADATA_DECORATOR_H diff --git a/google/cloud/binaryauthorization/v1/internal/system_policy_v1_option_defaults.cc b/google/cloud/binaryauthorization/v1/internal/system_policy_v1_option_defaults.cc index cef3f15ec9d51..8dd163afec4ee 100644 --- a/google/cloud/binaryauthorization/v1/internal/system_policy_v1_option_defaults.cc +++ b/google/cloud/binaryauthorization/v1/internal/system_policy_v1_option_defaults.cc @@ -42,7 +42,7 @@ Options SystemPolicyV1DefaultOptions(Options options) { if (!options.has()) { options.set( binaryauthorization_v1::SystemPolicyV1LimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/binaryauthorization/v1/internal/system_policy_v1_stub.cc b/google/cloud/binaryauthorization/v1/internal/system_policy_v1_stub.cc index cda15b789c980..104d4bc770c47 100644 --- a/google/cloud/binaryauthorization/v1/internal/system_policy_v1_stub.cc +++ b/google/cloud/binaryauthorization/v1/internal/system_policy_v1_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/binaryauthorization/v1/service.proto #include "google/cloud/binaryauthorization/v1/internal/system_policy_v1_stub.h" +#include "google/cloud/binaryauthorization/v1/service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { @@ -47,3 +50,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace binaryauthorization_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/binaryauthorization/v1/internal/system_policy_v1_stub.h b/google/cloud/binaryauthorization/v1/internal/system_policy_v1_stub.h index 3ba666a82994a..619a242d59092 100644 --- a/google/cloud/binaryauthorization/v1/internal/system_policy_v1_stub.h +++ b/google/cloud/binaryauthorization/v1/internal/system_policy_v1_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_V1_INTERNAL_SYSTEM_POLICY_V1_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_V1_INTERNAL_SYSTEM_POLICY_V1_STUB_H +#include "google/cloud/binaryauthorization/v1/service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { @@ -66,4 +69,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_V1_INTERNAL_SYSTEM_POLICY_V1_STUB_H diff --git a/google/cloud/binaryauthorization/v1/internal/system_policy_v1_stub_factory.cc b/google/cloud/binaryauthorization/v1/internal/system_policy_v1_stub_factory.cc index 24d40a05d35cc..f24964a0e6a95 100644 --- a/google/cloud/binaryauthorization/v1/internal/system_policy_v1_stub_factory.cc +++ b/google/cloud/binaryauthorization/v1/internal/system_policy_v1_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/binaryauthorization/v1/internal/system_policy_v1_metadata_decorator.h" #include "google/cloud/binaryauthorization/v1/internal/system_policy_v1_stub.h" #include "google/cloud/binaryauthorization/v1/internal/system_policy_v1_tracing_stub.h" +#include "google/cloud/binaryauthorization/v1/service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { @@ -69,3 +72,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace binaryauthorization_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/binaryauthorization/v1/internal/system_policy_v1_stub_factory.h b/google/cloud/binaryauthorization/v1/internal/system_policy_v1_stub_factory.h index 889b638fa3e67..04bc3315e7f12 100644 --- a/google/cloud/binaryauthorization/v1/internal/system_policy_v1_stub_factory.h +++ b/google/cloud/binaryauthorization/v1/internal/system_policy_v1_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_V1_INTERNAL_SYSTEM_POLICY_V1_STUB_FACTORY_H diff --git a/google/cloud/binaryauthorization/v1/internal/system_policy_v1_tracing_connection.cc b/google/cloud/binaryauthorization/v1/internal/system_policy_v1_tracing_connection.cc index f081bb4ffb886..940c616333e99 100644 --- a/google/cloud/binaryauthorization/v1/internal/system_policy_v1_tracing_connection.cc +++ b/google/cloud/binaryauthorization/v1/internal/system_policy_v1_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace binaryauthorization_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SystemPolicyV1TracingConnection::SystemPolicyV1TracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -42,16 +40,12 @@ SystemPolicyV1TracingConnection::GetSystemPolicy( return internal::EndSpan(*span, child_->GetSystemPolicy(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSystemPolicyV1TracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/binaryauthorization/v1/internal/system_policy_v1_tracing_connection.h b/google/cloud/binaryauthorization/v1/internal/system_policy_v1_tracing_connection.h index 20ba07a36aa5b..edfe713cb81aa 100644 --- a/google/cloud/binaryauthorization/v1/internal/system_policy_v1_tracing_connection.h +++ b/google/cloud/binaryauthorization/v1/internal/system_policy_v1_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace binaryauthorization_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SystemPolicyV1TracingConnection : public binaryauthorization_v1::SystemPolicyV1Connection { public: @@ -48,8 +46,6 @@ class SystemPolicyV1TracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/binaryauthorization/v1/internal/system_policy_v1_tracing_stub.cc b/google/cloud/binaryauthorization/v1/internal/system_policy_v1_tracing_stub.cc index 007288bf24fdf..87f59d2f4b212 100644 --- a/google/cloud/binaryauthorization/v1/internal/system_policy_v1_tracing_stub.cc +++ b/google/cloud/binaryauthorization/v1/internal/system_policy_v1_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SystemPolicyV1TracingStub::SystemPolicyV1TracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -45,18 +46,14 @@ SystemPolicyV1TracingStub::GetSystemPolicy( child_->GetSystemPolicy(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSystemPolicyV1TracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace binaryauthorization_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/binaryauthorization/v1/internal/system_policy_v1_tracing_stub.h b/google/cloud/binaryauthorization/v1/internal/system_policy_v1_tracing_stub.h index a01fb3b89a050..8ea2a74e3ed08 100644 --- a/google/cloud/binaryauthorization/v1/internal/system_policy_v1_tracing_stub.h +++ b/google/cloud/binaryauthorization/v1/internal/system_policy_v1_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SystemPolicyV1TracingStub : public SystemPolicyV1Stub { public: ~SystemPolicyV1TracingStub() override = default; @@ -49,8 +50,6 @@ class SystemPolicyV1TracingStub : public SystemPolicyV1Stub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -65,4 +64,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_V1_INTERNAL_SYSTEM_POLICY_V1_TRACING_STUB_H diff --git a/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_auth_decorator.cc b/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_auth_decorator.cc index c3408e3835ad4..6e83c2f618c74 100644 --- a/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_auth_decorator.cc +++ b/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/binaryauthorization/v1/service.proto #include "google/cloud/binaryauthorization/v1/internal/validation_helper_v1_auth_decorator.h" -#include +#include "google/cloud/binaryauthorization/v1/service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { @@ -46,3 +49,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace binaryauthorization_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_auth_decorator.h b/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_auth_decorator.h index 38f33b998fc24..9b872e5029feb 100644 --- a/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_auth_decorator.h +++ b/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { @@ -55,4 +58,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_V1_INTERNAL_VALIDATION_HELPER_V1_AUTH_DECORATOR_H diff --git a/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_logging_decorator.cc b/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_logging_decorator.cc index 1388971164b76..90490da70609e 100644 --- a/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_logging_decorator.cc +++ b/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/binaryauthorization/v1/service.proto #include "google/cloud/binaryauthorization/v1/internal/validation_helper_v1_logging_decorator.h" +#include "google/cloud/binaryauthorization/v1/service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { @@ -54,3 +57,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace binaryauthorization_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_logging_decorator.h b/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_logging_decorator.h index 84afb95b583dc..ad2187e999001 100644 --- a/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_logging_decorator.h +++ b/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { @@ -55,4 +58,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_V1_INTERNAL_VALIDATION_HELPER_V1_LOGGING_DECORATOR_H diff --git a/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_metadata_decorator.cc b/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_metadata_decorator.cc index 29fd64d567b0d..0a35e7a0a02f9 100644 --- a/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_metadata_decorator.cc +++ b/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/binaryauthorization/v1/service.proto #include "google/cloud/binaryauthorization/v1/internal/validation_helper_v1_metadata_decorator.h" +#include "google/cloud/binaryauthorization/v1/service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { @@ -73,3 +77,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace binaryauthorization_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_metadata_decorator.h b/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_metadata_decorator.h index d2c64c6a4f1e5..023ac6414bc6e 100644 --- a/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_metadata_decorator.h +++ b/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { @@ -61,4 +64,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_V1_INTERNAL_VALIDATION_HELPER_V1_METADATA_DECORATOR_H diff --git a/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_option_defaults.cc b/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_option_defaults.cc index 57d89640b2ce5..3e40f718ebfb4 100644 --- a/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_option_defaults.cc +++ b/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_option_defaults.cc @@ -43,7 +43,7 @@ Options ValidationHelperV1DefaultOptions(Options options) { binaryauthorization_v1::ValidationHelperV1RetryPolicyOption>()) { options.set( binaryauthorization_v1::ValidationHelperV1LimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_stub.cc b/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_stub.cc index 7692db5c1247f..85585c6928a3c 100644 --- a/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_stub.cc +++ b/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/binaryauthorization/v1/service.proto #include "google/cloud/binaryauthorization/v1/internal/validation_helper_v1_stub.h" +#include "google/cloud/binaryauthorization/v1/service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { @@ -50,3 +53,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace binaryauthorization_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_stub.h b/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_stub.h index 3247af5600c47..9418c677990bd 100644 --- a/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_stub.h +++ b/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_V1_INTERNAL_VALIDATION_HELPER_V1_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_V1_INTERNAL_VALIDATION_HELPER_V1_STUB_H +#include "google/cloud/binaryauthorization/v1/service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { @@ -69,4 +72,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_V1_INTERNAL_VALIDATION_HELPER_V1_STUB_H diff --git a/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_stub_factory.cc b/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_stub_factory.cc index 6ff64cc486480..e06e1b1ba35b5 100644 --- a/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_stub_factory.cc +++ b/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/binaryauthorization/v1/internal/validation_helper_v1_metadata_decorator.h" #include "google/cloud/binaryauthorization/v1/internal/validation_helper_v1_stub.h" #include "google/cloud/binaryauthorization/v1/internal/validation_helper_v1_tracing_stub.h" +#include "google/cloud/binaryauthorization/v1/service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace binaryauthorization_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_stub_factory.h b/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_stub_factory.h index fce0e9e5c9567..be9a3effd48bd 100644 --- a/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_stub_factory.h +++ b/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_V1_INTERNAL_VALIDATION_HELPER_V1_STUB_FACTORY_H diff --git a/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_tracing_connection.cc b/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_tracing_connection.cc index cc99eba3ea88f..cf407923ad86b 100644 --- a/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_tracing_connection.cc +++ b/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace binaryauthorization_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ValidationHelperV1TracingConnection::ValidationHelperV1TracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -45,18 +43,14 @@ ValidationHelperV1TracingConnection::ValidateAttestationOccurrence( child_->ValidateAttestationOccurrence(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeValidationHelperV1TracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_tracing_connection.h b/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_tracing_connection.h index e4a08a8b62c4d..153c64c675f5a 100644 --- a/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_tracing_connection.h +++ b/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace binaryauthorization_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ValidationHelperV1TracingConnection : public binaryauthorization_v1::ValidationHelperV1Connection { public: @@ -51,8 +49,6 @@ class ValidationHelperV1TracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_tracing_stub.cc b/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_tracing_stub.cc index 34f08592227b5..5472a72351cd6 100644 --- a/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_tracing_stub.cc +++ b/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ValidationHelperV1TracingStub::ValidationHelperV1TracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -48,18 +49,14 @@ ValidationHelperV1TracingStub::ValidateAttestationOccurrence( child_->ValidateAttestationOccurrence(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeValidationHelperV1TracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace binaryauthorization_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_tracing_stub.h b/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_tracing_stub.h index a08a423f4baf8..3371bf9a2ef3b 100644 --- a/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_tracing_stub.h +++ b/google/cloud/binaryauthorization/v1/internal/validation_helper_v1_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace binaryauthorization_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ValidationHelperV1TracingStub : public ValidationHelperV1Stub { public: ~ValidationHelperV1TracingStub() override = default; @@ -52,8 +53,6 @@ class ValidationHelperV1TracingStub : public ValidationHelperV1Stub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -68,4 +67,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_V1_INTERNAL_VALIDATION_HELPER_V1_TRACING_STUB_H diff --git a/google/cloud/binaryauthorization/v1/system_policy_v1_connection.h b/google/cloud/binaryauthorization/v1/system_policy_v1_connection.h index e290a300a0200..f8fa88c382e0a 100644 --- a/google/cloud/binaryauthorization/v1/system_policy_v1_connection.h +++ b/google/cloud/binaryauthorization/v1/system_policy_v1_connection.h @@ -20,13 +20,13 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_V1_SYSTEM_POLICY_V1_CONNECTION_H #include "google/cloud/binaryauthorization/v1/internal/system_policy_v1_retry_traits.h" +#include "google/cloud/binaryauthorization/v1/service.pb.h" #include "google/cloud/binaryauthorization/v1/system_policy_v1_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/binaryauthorization/v1/system_policy_v1_connection_idempotency_policy.h b/google/cloud/binaryauthorization/v1/system_policy_v1_connection_idempotency_policy.h index ec6a2cbd738d1..a4e44ff553580 100644 --- a/google/cloud/binaryauthorization/v1/system_policy_v1_connection_idempotency_policy.h +++ b/google/cloud/binaryauthorization/v1/system_policy_v1_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_V1_SYSTEM_POLICY_V1_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_V1_SYSTEM_POLICY_V1_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/binaryauthorization/v1/service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/binaryauthorization/v1/validation_helper_v1_connection.h b/google/cloud/binaryauthorization/v1/validation_helper_v1_connection.h index 2813a6ff98716..e38c4427628b5 100644 --- a/google/cloud/binaryauthorization/v1/validation_helper_v1_connection.h +++ b/google/cloud/binaryauthorization/v1/validation_helper_v1_connection.h @@ -20,13 +20,13 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_V1_VALIDATION_HELPER_V1_CONNECTION_H #include "google/cloud/binaryauthorization/v1/internal/validation_helper_v1_retry_traits.h" +#include "google/cloud/binaryauthorization/v1/service.pb.h" #include "google/cloud/binaryauthorization/v1/validation_helper_v1_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/binaryauthorization/v1/validation_helper_v1_connection_idempotency_policy.h b/google/cloud/binaryauthorization/v1/validation_helper_v1_connection_idempotency_policy.h index 2174521426d32..8a38cc674a625 100644 --- a/google/cloud/binaryauthorization/v1/validation_helper_v1_connection_idempotency_policy.h +++ b/google/cloud/binaryauthorization/v1/validation_helper_v1_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_V1_VALIDATION_HELPER_V1_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_V1_VALIDATION_HELPER_V1_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/binaryauthorization/v1/service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/binaryauthorization/validation_helper_v1_client.h b/google/cloud/binaryauthorization/validation_helper_v1_client.h deleted file mode 100644 index 6018b7a394276..0000000000000 --- a/google/cloud/binaryauthorization/validation_helper_v1_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/binaryauthorization/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_VALIDATION_HELPER_V1_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_VALIDATION_HELPER_V1_CLIENT_H - -#include "google/cloud/binaryauthorization/v1/validation_helper_v1_client.h" -#include "google/cloud/binaryauthorization/validation_helper_v1_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in binaryauthorization_v1 instead of the aliases defined -/// in this namespace. -namespace binaryauthorization { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use binaryauthorization_v1::ValidationHelperV1Client directly. -using ::google::cloud::binaryauthorization_v1::ValidationHelperV1Client; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace binaryauthorization -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_VALIDATION_HELPER_V1_CLIENT_H diff --git a/google/cloud/binaryauthorization/validation_helper_v1_connection.h b/google/cloud/binaryauthorization/validation_helper_v1_connection.h deleted file mode 100644 index fa5175d0ab4bf..0000000000000 --- a/google/cloud/binaryauthorization/validation_helper_v1_connection.h +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/binaryauthorization/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_VALIDATION_HELPER_V1_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_VALIDATION_HELPER_V1_CONNECTION_H - -#include "google/cloud/binaryauthorization/v1/validation_helper_v1_connection.h" -#include "google/cloud/binaryauthorization/validation_helper_v1_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace binaryauthorization { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use binaryauthorization_v1::MakeValidationHelperV1Connection -/// directly. -using ::google::cloud::binaryauthorization_v1::MakeValidationHelperV1Connection; - -/// @deprecated Use binaryauthorization_v1::ValidationHelperV1Connection -/// directly. -using ::google::cloud::binaryauthorization_v1::ValidationHelperV1Connection; - -/// @deprecated Use -/// binaryauthorization_v1::ValidationHelperV1LimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::binaryauthorization_v1:: - ValidationHelperV1LimitedErrorCountRetryPolicy; - -/// @deprecated Use -/// binaryauthorization_v1::ValidationHelperV1LimitedTimeRetryPolicy directly. -using ::google::cloud::binaryauthorization_v1:: - ValidationHelperV1LimitedTimeRetryPolicy; - -/// @deprecated Use binaryauthorization_v1::ValidationHelperV1RetryPolicy -/// directly. -using ::google::cloud::binaryauthorization_v1::ValidationHelperV1RetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace binaryauthorization -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_VALIDATION_HELPER_V1_CONNECTION_H diff --git a/google/cloud/binaryauthorization/validation_helper_v1_connection_idempotency_policy.h b/google/cloud/binaryauthorization/validation_helper_v1_connection_idempotency_policy.h deleted file mode 100644 index 8d5e61aec6049..0000000000000 --- a/google/cloud/binaryauthorization/validation_helper_v1_connection_idempotency_policy.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/binaryauthorization/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_VALIDATION_HELPER_V1_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_VALIDATION_HELPER_V1_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/binaryauthorization/v1/validation_helper_v1_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace binaryauthorization { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// binaryauthorization_v1::MakeDefaultValidationHelperV1ConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::binaryauthorization_v1:: - MakeDefaultValidationHelperV1ConnectionIdempotencyPolicy; - -/// @deprecated Use -/// binaryauthorization_v1::ValidationHelperV1ConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::binaryauthorization_v1:: - ValidationHelperV1ConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace binaryauthorization -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_VALIDATION_HELPER_V1_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/binaryauthorization/validation_helper_v1_options.h b/google/cloud/binaryauthorization/validation_helper_v1_options.h deleted file mode 100644 index 607889c06b354..0000000000000 --- a/google/cloud/binaryauthorization/validation_helper_v1_options.h +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/binaryauthorization/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_VALIDATION_HELPER_V1_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_VALIDATION_HELPER_V1_OPTIONS_H - -#include "google/cloud/binaryauthorization/v1/validation_helper_v1_options.h" -#include "google/cloud/binaryauthorization/validation_helper_v1_connection.h" -#include "google/cloud/binaryauthorization/validation_helper_v1_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace binaryauthorization { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// binaryauthorization_v1::ValidationHelperV1BackoffPolicyOption directly. -using ::google::cloud::binaryauthorization_v1:: - ValidationHelperV1BackoffPolicyOption; - -/// @deprecated Use -/// binaryauthorization_v1::ValidationHelperV1ConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::binaryauthorization_v1:: - ValidationHelperV1ConnectionIdempotencyPolicyOption; - -/// @deprecated Use binaryauthorization_v1::ValidationHelperV1PolicyOptionList -/// directly. -using ::google::cloud::binaryauthorization_v1:: - ValidationHelperV1PolicyOptionList; - -/// @deprecated Use binaryauthorization_v1::ValidationHelperV1RetryPolicyOption -/// directly. -using ::google::cloud::binaryauthorization_v1:: - ValidationHelperV1RetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace binaryauthorization -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BINARYAUTHORIZATION_VALIDATION_HELPER_V1_OPTIONS_H diff --git a/google/cloud/capture_build_info.bzl b/google/cloud/capture_build_info.bzl index b98926a025b17..31f94c0543e74 100644 --- a/google/cloud/capture_build_info.bzl +++ b/google/cloud/capture_build_info.bzl @@ -34,6 +34,7 @@ https://github.com/bazelbuild/rules_cc/blob/0d68932a68bcd6f332b14ccc561990586de2 load("@rules_cc//cc:action_names.bzl", "CPP_COMPILE_ACTION_NAME") load("@rules_cc//cc:toolchain_utils.bzl", "find_cpp_toolchain") +load("@rules_cc//cc/common:cc_common.bzl", "cc_common") def _capture_build_info_impl(ctx): toolchain = find_cpp_toolchain(ctx) diff --git a/google/cloud/certificatemanager/BUILD.bazel b/google/cloud/certificatemanager/BUILD.bazel index 9057ab9ec38a4..5b484034f4a4c 100644 --- a/google/cloud/certificatemanager/BUILD.bazel +++ b/google/cloud/certificatemanager/BUILD.bazel @@ -19,13 +19,12 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/certificatemanager/logging/v1:logging_cc_grpc", - "@com_google_googleapis//google/cloud/certificatemanager/v1:certificatemanager_cc_grpc", + "@googleapis//google/cloud/certificatemanager/logging/v1:logging_cc_grpc", + "@googleapis//google/cloud/certificatemanager/v1:certificatemanager_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/certificatemanager/CMakeLists.txt b/google/cloud/certificatemanager/CMakeLists.txt index c199c83f52646..5f77e0c1729a1 100644 --- a/google/cloud/certificatemanager/CMakeLists.txt +++ b/google/cloud/certificatemanager/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(certificatemanager "Certificate Manager API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(certificatemanager_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/certificatemanager/certificate_manager_client.h b/google/cloud/certificatemanager/certificate_manager_client.h deleted file mode 100644 index 382e403a78c7b..0000000000000 --- a/google/cloud/certificatemanager/certificate_manager_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/certificatemanager/v1/certificate_manager.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CERTIFICATEMANAGER_CERTIFICATE_MANAGER_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CERTIFICATEMANAGER_CERTIFICATE_MANAGER_CLIENT_H - -#include "google/cloud/certificatemanager/certificate_manager_connection.h" -#include "google/cloud/certificatemanager/v1/certificate_manager_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in certificatemanager_v1 instead of the aliases defined in -/// this namespace. -namespace certificatemanager { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use certificatemanager_v1::CertificateManagerClient directly. -using ::google::cloud::certificatemanager_v1::CertificateManagerClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace certificatemanager -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CERTIFICATEMANAGER_CERTIFICATE_MANAGER_CLIENT_H diff --git a/google/cloud/certificatemanager/certificate_manager_connection.h b/google/cloud/certificatemanager/certificate_manager_connection.h deleted file mode 100644 index 321a173ba2f6c..0000000000000 --- a/google/cloud/certificatemanager/certificate_manager_connection.h +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/certificatemanager/v1/certificate_manager.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CERTIFICATEMANAGER_CERTIFICATE_MANAGER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CERTIFICATEMANAGER_CERTIFICATE_MANAGER_CONNECTION_H - -#include "google/cloud/certificatemanager/certificate_manager_connection_idempotency_policy.h" -#include "google/cloud/certificatemanager/v1/certificate_manager_connection.h" - -namespace google { -namespace cloud { -namespace certificatemanager { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use certificatemanager_v1::MakeCertificateManagerConnection -/// directly. -using ::google::cloud::certificatemanager_v1::MakeCertificateManagerConnection; - -/// @deprecated Use certificatemanager_v1::CertificateManagerConnection -/// directly. -using ::google::cloud::certificatemanager_v1::CertificateManagerConnection; - -/// @deprecated Use -/// certificatemanager_v1::CertificateManagerLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::certificatemanager_v1:: - CertificateManagerLimitedErrorCountRetryPolicy; - -/// @deprecated Use -/// certificatemanager_v1::CertificateManagerLimitedTimeRetryPolicy directly. -using ::google::cloud::certificatemanager_v1:: - CertificateManagerLimitedTimeRetryPolicy; - -/// @deprecated Use certificatemanager_v1::CertificateManagerRetryPolicy -/// directly. -using ::google::cloud::certificatemanager_v1::CertificateManagerRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace certificatemanager -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CERTIFICATEMANAGER_CERTIFICATE_MANAGER_CONNECTION_H diff --git a/google/cloud/certificatemanager/certificate_manager_connection_idempotency_policy.h b/google/cloud/certificatemanager/certificate_manager_connection_idempotency_policy.h deleted file mode 100644 index a1c7eb7703244..0000000000000 --- a/google/cloud/certificatemanager/certificate_manager_connection_idempotency_policy.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/certificatemanager/v1/certificate_manager.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CERTIFICATEMANAGER_CERTIFICATE_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CERTIFICATEMANAGER_CERTIFICATE_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/certificatemanager/v1/certificate_manager_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace certificatemanager { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// certificatemanager_v1::MakeDefaultCertificateManagerConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::certificatemanager_v1:: - MakeDefaultCertificateManagerConnectionIdempotencyPolicy; - -/// @deprecated Use -/// certificatemanager_v1::CertificateManagerConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::certificatemanager_v1:: - CertificateManagerConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace certificatemanager -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CERTIFICATEMANAGER_CERTIFICATE_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/certificatemanager/certificate_manager_options.h b/google/cloud/certificatemanager/certificate_manager_options.h deleted file mode 100644 index e0f21b1771f10..0000000000000 --- a/google/cloud/certificatemanager/certificate_manager_options.h +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/certificatemanager/v1/certificate_manager.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CERTIFICATEMANAGER_CERTIFICATE_MANAGER_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CERTIFICATEMANAGER_CERTIFICATE_MANAGER_OPTIONS_H - -#include "google/cloud/certificatemanager/certificate_manager_connection.h" -#include "google/cloud/certificatemanager/certificate_manager_connection_idempotency_policy.h" -#include "google/cloud/certificatemanager/v1/certificate_manager_options.h" - -namespace google { -namespace cloud { -namespace certificatemanager { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use certificatemanager_v1::CertificateManagerPollingPolicyOption -/// directly. -using ::google::cloud::certificatemanager_v1:: - CertificateManagerPollingPolicyOption; - -/// @deprecated Use certificatemanager_v1::CertificateManagerBackoffPolicyOption -/// directly. -using ::google::cloud::certificatemanager_v1:: - CertificateManagerBackoffPolicyOption; - -/// @deprecated Use -/// certificatemanager_v1::CertificateManagerConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::certificatemanager_v1:: - CertificateManagerConnectionIdempotencyPolicyOption; - -/// @deprecated Use certificatemanager_v1::CertificateManagerPolicyOptionList -/// directly. -using ::google::cloud::certificatemanager_v1:: - CertificateManagerPolicyOptionList; - -/// @deprecated Use certificatemanager_v1::CertificateManagerRetryPolicyOption -/// directly. -using ::google::cloud::certificatemanager_v1:: - CertificateManagerRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace certificatemanager -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CERTIFICATEMANAGER_CERTIFICATE_MANAGER_OPTIONS_H diff --git a/google/cloud/certificatemanager/mocks/mock_certificate_manager_connection.h b/google/cloud/certificatemanager/mocks/mock_certificate_manager_connection.h deleted file mode 100644 index 89575a80fcbfc..0000000000000 --- a/google/cloud/certificatemanager/mocks/mock_certificate_manager_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/certificatemanager/v1/certificate_manager.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CERTIFICATEMANAGER_MOCKS_MOCK_CERTIFICATE_MANAGER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CERTIFICATEMANAGER_MOCKS_MOCK_CERTIFICATE_MANAGER_CONNECTION_H - -#include "google/cloud/certificatemanager/certificate_manager_connection.h" -#include "google/cloud/certificatemanager/v1/mocks/mock_certificate_manager_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in certificatemanager_v1_mocks instead of the aliases -/// defined in this namespace. -namespace certificatemanager_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// certificatemanager_v1_mocks::MockCertificateManagerConnection directly. -using ::google::cloud::certificatemanager_v1_mocks:: - MockCertificateManagerConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace certificatemanager_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CERTIFICATEMANAGER_MOCKS_MOCK_CERTIFICATE_MANAGER_CONNECTION_H diff --git a/google/cloud/certificatemanager/quickstart/.bazelrc b/google/cloud/certificatemanager/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/certificatemanager/quickstart/.bazelrc +++ b/google/cloud/certificatemanager/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/certificatemanager/quickstart/CMakeLists.txt b/google/cloud/certificatemanager/quickstart/CMakeLists.txt index 85592ce558fdb..438b2212c8ec8 100644 --- a/google/cloud/certificatemanager/quickstart/CMakeLists.txt +++ b/google/cloud/certificatemanager/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Certificate Manager API C++ client library from # a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-certificatemanager-quickstart CXX) find_package(google_cloud_cpp_certificatemanager REQUIRED) diff --git a/google/cloud/certificatemanager/v1/certificate_manager_client.h b/google/cloud/certificatemanager/v1/certificate_manager_client.h index d08c04067b979..3cdbc90ed13de 100644 --- a/google/cloud/certificatemanager/v1/certificate_manager_client.h +++ b/google/cloud/certificatemanager/v1/certificate_manager_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/certificatemanager/v1/certificate_manager_connection.h b/google/cloud/certificatemanager/v1/certificate_manager_connection.h index d6b66bd020403..56549a0f20458 100644 --- a/google/cloud/certificatemanager/v1/certificate_manager_connection.h +++ b/google/cloud/certificatemanager/v1/certificate_manager_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CERTIFICATEMANAGER_V1_CERTIFICATE_MANAGER_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CERTIFICATEMANAGER_V1_CERTIFICATE_MANAGER_CONNECTION_H +#include "google/cloud/certificatemanager/v1/certificate_manager.pb.h" #include "google/cloud/certificatemanager/v1/certificate_manager_connection_idempotency_policy.h" #include "google/cloud/certificatemanager/v1/internal/certificate_manager_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/certificatemanager/v1/certificate_manager_connection_idempotency_policy.h b/google/cloud/certificatemanager/v1/certificate_manager_connection_idempotency_policy.h index b1a745714b3b9..fee03fa9c58c2 100644 --- a/google/cloud/certificatemanager/v1/certificate_manager_connection_idempotency_policy.h +++ b/google/cloud/certificatemanager/v1/certificate_manager_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CERTIFICATEMANAGER_V1_CERTIFICATE_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CERTIFICATEMANAGER_V1_CERTIFICATE_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/certificatemanager/v1/certificate_manager.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/certificatemanager/v1/internal/certificate_manager_auth_decorator.cc b/google/cloud/certificatemanager/v1/internal/certificate_manager_auth_decorator.cc index a3bae677bca52..59c955f32d3ce 100644 --- a/google/cloud/certificatemanager/v1/internal/certificate_manager_auth_decorator.cc +++ b/google/cloud/certificatemanager/v1/internal/certificate_manager_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/certificatemanager/v1/certificate_manager.proto #include "google/cloud/certificatemanager/v1/internal/certificate_manager_auth_decorator.h" -#include +#include "google/cloud/certificatemanager/v1/certificate_manager.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace certificatemanager_v1_internal { @@ -770,3 +773,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace certificatemanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/certificatemanager/v1/internal/certificate_manager_auth_decorator.h b/google/cloud/certificatemanager/v1/internal/certificate_manager_auth_decorator.h index 1e5829314f6b0..2f9266d4b65fd 100644 --- a/google/cloud/certificatemanager/v1/internal/certificate_manager_auth_decorator.h +++ b/google/cloud/certificatemanager/v1/internal/certificate_manager_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/certificatemanager/v1/internal/certificate_manager_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace certificatemanager_v1_internal { @@ -366,4 +369,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CERTIFICATEMANAGER_V1_INTERNAL_CERTIFICATE_MANAGER_AUTH_DECORATOR_H diff --git a/google/cloud/certificatemanager/v1/internal/certificate_manager_connection_impl.h b/google/cloud/certificatemanager/v1/internal/certificate_manager_connection_impl.h index be19bdea8cc1e..2fa57ac738990 100644 --- a/google/cloud/certificatemanager/v1/internal/certificate_manager_connection_impl.h +++ b/google/cloud/certificatemanager/v1/internal/certificate_manager_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/certificatemanager/v1/internal/certificate_manager_logging_decorator.cc b/google/cloud/certificatemanager/v1/internal/certificate_manager_logging_decorator.cc index 591a5000c9575..f0a35ff266c4a 100644 --- a/google/cloud/certificatemanager/v1/internal/certificate_manager_logging_decorator.cc +++ b/google/cloud/certificatemanager/v1/internal/certificate_manager_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/certificatemanager/v1/certificate_manager.proto #include "google/cloud/certificatemanager/v1/internal/certificate_manager_logging_decorator.h" +#include "google/cloud/certificatemanager/v1/certificate_manager.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace certificatemanager_v1_internal { @@ -910,3 +913,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace certificatemanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/certificatemanager/v1/internal/certificate_manager_logging_decorator.h b/google/cloud/certificatemanager/v1/internal/certificate_manager_logging_decorator.h index 978cdfaca23d7..5c7129ff434de 100644 --- a/google/cloud/certificatemanager/v1/internal/certificate_manager_logging_decorator.h +++ b/google/cloud/certificatemanager/v1/internal/certificate_manager_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/certificatemanager/v1/internal/certificate_manager_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace certificatemanager_v1_internal { @@ -366,4 +369,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CERTIFICATEMANAGER_V1_INTERNAL_CERTIFICATE_MANAGER_LOGGING_DECORATOR_H diff --git a/google/cloud/certificatemanager/v1/internal/certificate_manager_metadata_decorator.cc b/google/cloud/certificatemanager/v1/internal/certificate_manager_metadata_decorator.cc index e09e52d21d8ea..bc6d2ccc46d4b 100644 --- a/google/cloud/certificatemanager/v1/internal/certificate_manager_metadata_decorator.cc +++ b/google/cloud/certificatemanager/v1/internal/certificate_manager_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/certificatemanager/v1/certificate_manager.proto #include "google/cloud/certificatemanager/v1/internal/certificate_manager_metadata_decorator.h" +#include "google/cloud/certificatemanager/v1/certificate_manager.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace certificatemanager_v1_internal { @@ -665,3 +669,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace certificatemanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/certificatemanager/v1/internal/certificate_manager_metadata_decorator.h b/google/cloud/certificatemanager/v1/internal/certificate_manager_metadata_decorator.h index 66ed5b7fa8870..b64be9a61b44e 100644 --- a/google/cloud/certificatemanager/v1/internal/certificate_manager_metadata_decorator.h +++ b/google/cloud/certificatemanager/v1/internal/certificate_manager_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/certificatemanager/v1/internal/certificate_manager_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace certificatemanager_v1_internal { @@ -372,4 +375,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CERTIFICATEMANAGER_V1_INTERNAL_CERTIFICATE_MANAGER_METADATA_DECORATOR_H diff --git a/google/cloud/certificatemanager/v1/internal/certificate_manager_option_defaults.cc b/google/cloud/certificatemanager/v1/internal/certificate_manager_option_defaults.cc index 200c757cd5a9c..de0cb9e9a1027 100644 --- a/google/cloud/certificatemanager/v1/internal/certificate_manager_option_defaults.cc +++ b/google/cloud/certificatemanager/v1/internal/certificate_manager_option_defaults.cc @@ -43,7 +43,7 @@ Options CertificateManagerDefaultOptions(Options options) { .has()) { options.set( certificatemanager_v1::CertificateManagerLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/certificatemanager/v1/internal/certificate_manager_stub.cc b/google/cloud/certificatemanager/v1/internal/certificate_manager_stub.cc index 1ab7bdb79ca68..4f21a455140b0 100644 --- a/google/cloud/certificatemanager/v1/internal/certificate_manager_stub.cc +++ b/google/cloud/certificatemanager/v1/internal/certificate_manager_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/certificatemanager/v1/certificate_manager.proto #include "google/cloud/certificatemanager/v1/internal/certificate_manager_stub.h" +#include "google/cloud/certificatemanager/v1/certificate_manager.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace certificatemanager_v1_internal { @@ -885,3 +888,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace certificatemanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/certificatemanager/v1/internal/certificate_manager_stub.h b/google/cloud/certificatemanager/v1/internal/certificate_manager_stub.h index c54fc642398be..ff9e6e6aa8b08 100644 --- a/google/cloud/certificatemanager/v1/internal/certificate_manager_stub.h +++ b/google/cloud/certificatemanager/v1/internal/certificate_manager_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CERTIFICATEMANAGER_V1_INTERNAL_CERTIFICATE_MANAGER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CERTIFICATEMANAGER_V1_INTERNAL_CERTIFICATE_MANAGER_STUB_H +#include "google/cloud/certificatemanager/v1/certificate_manager.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace certificatemanager_v1_internal { @@ -724,4 +727,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CERTIFICATEMANAGER_V1_INTERNAL_CERTIFICATE_MANAGER_STUB_H diff --git a/google/cloud/certificatemanager/v1/internal/certificate_manager_stub_factory.cc b/google/cloud/certificatemanager/v1/internal/certificate_manager_stub_factory.cc index 711ad31705ca6..6420993495c9e 100644 --- a/google/cloud/certificatemanager/v1/internal/certificate_manager_stub_factory.cc +++ b/google/cloud/certificatemanager/v1/internal/certificate_manager_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/certificatemanager/v1/certificate_manager.proto #include "google/cloud/certificatemanager/v1/internal/certificate_manager_stub_factory.h" +#include "google/cloud/certificatemanager/v1/certificate_manager.grpc.pb.h" #include "google/cloud/certificatemanager/v1/internal/certificate_manager_auth_decorator.h" #include "google/cloud/certificatemanager/v1/internal/certificate_manager_logging_decorator.h" #include "google/cloud/certificatemanager/v1/internal/certificate_manager_metadata_decorator.h" #include "google/cloud/certificatemanager/v1/internal/certificate_manager_stub.h" #include "google/cloud/certificatemanager/v1/internal/certificate_manager_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace certificatemanager_v1_internal { @@ -76,3 +79,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace certificatemanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/certificatemanager/v1/internal/certificate_manager_stub_factory.h b/google/cloud/certificatemanager/v1/internal/certificate_manager_stub_factory.h index e25aabe42327a..e7cefc50003b3 100644 --- a/google/cloud/certificatemanager/v1/internal/certificate_manager_stub_factory.h +++ b/google/cloud/certificatemanager/v1/internal/certificate_manager_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace certificatemanager_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CERTIFICATEMANAGER_V1_INTERNAL_CERTIFICATE_MANAGER_STUB_FACTORY_H diff --git a/google/cloud/certificatemanager/v1/internal/certificate_manager_tracing_connection.cc b/google/cloud/certificatemanager/v1/internal/certificate_manager_tracing_connection.cc index 831047687ff3a..366e217b8c76f 100644 --- a/google/cloud/certificatemanager/v1/internal/certificate_manager_tracing_connection.cc +++ b/google/cloud/certificatemanager/v1/internal/certificate_manager_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace certificatemanager_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CertificateManagerTracingConnection::CertificateManagerTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -817,17 +815,13 @@ Status CertificateManagerTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCertificateManagerTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/certificatemanager/v1/internal/certificate_manager_tracing_connection.h b/google/cloud/certificatemanager/v1/internal/certificate_manager_tracing_connection.h index 38c1b6e930f8d..ff2e442c5555a 100644 --- a/google/cloud/certificatemanager/v1/internal/certificate_manager_tracing_connection.h +++ b/google/cloud/certificatemanager/v1/internal/certificate_manager_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace certificatemanager_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CertificateManagerTracingConnection : public certificatemanager_v1::CertificateManagerConnection { public: @@ -349,8 +347,6 @@ class CertificateManagerTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/certificatemanager/v1/internal/certificate_manager_tracing_stub.cc b/google/cloud/certificatemanager/v1/internal/certificate_manager_tracing_stub.cc index 2c0ace27ebc16..e5dfd022cf012 100644 --- a/google/cloud/certificatemanager/v1/internal/certificate_manager_tracing_stub.cc +++ b/google/cloud/certificatemanager/v1/internal/certificate_manager_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace certificatemanager_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CertificateManagerTracingStub::CertificateManagerTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -842,18 +843,14 @@ future CertificateManagerTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCertificateManagerTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace certificatemanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/certificatemanager/v1/internal/certificate_manager_tracing_stub.h b/google/cloud/certificatemanager/v1/internal/certificate_manager_tracing_stub.h index fd2e5c3b1e866..1d2988f30a1b3 100644 --- a/google/cloud/certificatemanager/v1/internal/certificate_manager_tracing_stub.h +++ b/google/cloud/certificatemanager/v1/internal/certificate_manager_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace certificatemanager_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CertificateManagerTracingStub : public CertificateManagerStub { public: ~CertificateManagerTracingStub() override = default; @@ -362,8 +363,6 @@ class CertificateManagerTracingStub : public CertificateManagerStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -378,4 +377,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CERTIFICATEMANAGER_V1_INTERNAL_CERTIFICATE_MANAGER_TRACING_STUB_H diff --git a/google/cloud/channel/BUILD.bazel b/google/cloud/channel/BUILD.bazel index 54ba556ef942e..4e12837ea2115 100644 --- a/google/cloud/channel/BUILD.bazel +++ b/google/cloud/channel/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/channel/v1:channel_cc_grpc", + "@googleapis//google/cloud/channel/v1:channel_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/channel/CMakeLists.txt b/google/cloud/channel/CMakeLists.txt index 1dcd79c464eb7..1343b8229074c 100644 --- a/google/cloud/channel/CMakeLists.txt +++ b/google/cloud/channel/CMakeLists.txt @@ -30,7 +30,7 @@ endif () include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(channel "Cloud Channel API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") # The quickstart is too difficult to run successfully, hence, there is no # quickstart runner. diff --git a/google/cloud/channel/cloud_channel_client.h b/google/cloud/channel/cloud_channel_client.h deleted file mode 100644 index ba6d39ebf40ff..0000000000000 --- a/google/cloud/channel/cloud_channel_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_CLOUD_CHANNEL_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_CLOUD_CHANNEL_CLIENT_H - -#include "google/cloud/channel/cloud_channel_connection.h" -#include "google/cloud/channel/v1/cloud_channel_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in channel_v1 instead of the aliases defined in -/// this namespace. -namespace channel { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use channel_v1::CloudChannelServiceClient directly. -using ::google::cloud::channel_v1::CloudChannelServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace channel -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_CLOUD_CHANNEL_CLIENT_H diff --git a/google/cloud/channel/cloud_channel_connection.h b/google/cloud/channel/cloud_channel_connection.h deleted file mode 100644 index bf43fb3fb182c..0000000000000 --- a/google/cloud/channel/cloud_channel_connection.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_CLOUD_CHANNEL_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_CLOUD_CHANNEL_CONNECTION_H - -#include "google/cloud/channel/cloud_channel_connection_idempotency_policy.h" -#include "google/cloud/channel/v1/cloud_channel_connection.h" - -namespace google { -namespace cloud { -namespace channel { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use channel_v1::MakeCloudChannelServiceConnection directly. -using ::google::cloud::channel_v1::MakeCloudChannelServiceConnection; - -/// @deprecated Use channel_v1::CloudChannelServiceConnection directly. -using ::google::cloud::channel_v1::CloudChannelServiceConnection; - -/// @deprecated Use channel_v1::CloudChannelServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::channel_v1:: - CloudChannelServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use channel_v1::CloudChannelServiceLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::channel_v1::CloudChannelServiceLimitedTimeRetryPolicy; - -/// @deprecated Use channel_v1::CloudChannelServiceRetryPolicy directly. -using ::google::cloud::channel_v1::CloudChannelServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace channel -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_CLOUD_CHANNEL_CONNECTION_H diff --git a/google/cloud/channel/cloud_channel_connection_idempotency_policy.h b/google/cloud/channel/cloud_channel_connection_idempotency_policy.h deleted file mode 100644 index 1913b4f96f1a9..0000000000000 --- a/google/cloud/channel/cloud_channel_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_CLOUD_CHANNEL_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_CLOUD_CHANNEL_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/channel/v1/cloud_channel_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace channel { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// channel_v1::MakeDefaultCloudChannelServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::channel_v1:: - MakeDefaultCloudChannelServiceConnectionIdempotencyPolicy; - -/// @deprecated Use channel_v1::CloudChannelServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::channel_v1:: - CloudChannelServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace channel -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_CLOUD_CHANNEL_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/channel/cloud_channel_options.h b/google/cloud/channel/cloud_channel_options.h deleted file mode 100644 index 3c07d1a339ce0..0000000000000 --- a/google/cloud/channel/cloud_channel_options.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_CLOUD_CHANNEL_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_CLOUD_CHANNEL_OPTIONS_H - -#include "google/cloud/channel/cloud_channel_connection.h" -#include "google/cloud/channel/cloud_channel_connection_idempotency_policy.h" -#include "google/cloud/channel/v1/cloud_channel_options.h" - -namespace google { -namespace cloud { -namespace channel { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use channel_v1::CloudChannelServicePollingPolicyOption directly. -using ::google::cloud::channel_v1::CloudChannelServicePollingPolicyOption; - -/// @deprecated Use channel_v1::CloudChannelServiceBackoffPolicyOption directly. -using ::google::cloud::channel_v1::CloudChannelServiceBackoffPolicyOption; - -/// @deprecated Use -/// channel_v1::CloudChannelServiceConnectionIdempotencyPolicyOption directly. -using ::google::cloud::channel_v1:: - CloudChannelServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use channel_v1::CloudChannelServicePolicyOptionList directly. -using ::google::cloud::channel_v1::CloudChannelServicePolicyOptionList; - -/// @deprecated Use channel_v1::CloudChannelServiceRetryPolicyOption directly. -using ::google::cloud::channel_v1::CloudChannelServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace channel -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_CLOUD_CHANNEL_OPTIONS_H diff --git a/google/cloud/channel/doc/environment-variables.dox b/google/cloud/channel/doc/environment-variables.dox index 87279b5131706..e3aaf0e96a2ac 100644 --- a/google/cloud/channel/doc/environment-variables.dox +++ b/google/cloud/channel/doc/environment-variables.dox @@ -9,10 +9,6 @@ environment variables are convenient when troubleshooting problems. -- `GOOGLE_CLOUD_CPP_CLOUD_CHANNEL_REPORTS_SERVICE_ENDPOINT=...` overrides the - `EndpointOption` (which defaults to "cloudchannel.googleapis.com") - used by `MakeCloudChannelReportsServiceConnection()`. - - `GOOGLE_CLOUD_CPP_CLOUD_CHANNEL_SERVICE_ENDPOINT=...` overrides the `EndpointOption` (which defaults to "cloudchannel.googleapis.com") used by `MakeCloudChannelServiceConnection()`. diff --git a/google/cloud/channel/doc/main.dox b/google/cloud/channel/doc/main.dox index e26afd0f79404..6c2e718803565 100644 --- a/google/cloud/channel/doc/main.dox +++ b/google/cloud/channel/doc/main.dox @@ -22,18 +22,12 @@ which should give you a taste of the Cloud Channel API C++ client library API. ## Main classes -This library offers multiple `*Client` classes, which are listed below. Each one -of these classes exposes all the RPCs for a service as member functions of the -class. This library groups multiple services because they are part of the same -product or are often used together. A typical example may be the administrative -and data plane operations for a single product. - -The library also has other classes that provide helpers, configuration -parameters, and infrastructure to mock the `*Client` classes when testing your +The main class in this library is +[`channel_v1::CloudChannelServiceClient`](@ref google::cloud::channel_v1::CloudChannelServiceClient). All RPCs are exposed +as member functions of this class. Other classes provide helpers, configuration +parameters, and infrastructure to mock +[`channel_v1::CloudChannelServiceClient`](@ref google::cloud::channel_v1::CloudChannelServiceClient) when testing your application. - -- [\c channel_v1::CloudChannelServiceClient](@ref google::cloud::channel_v1::CloudChannelServiceClient) -- [\c channel_v1::CloudChannelReportsServiceClient](@ref google::cloud::channel_v1::CloudChannelReportsServiceClient) ## More Information diff --git a/google/cloud/channel/doc/override-authentication.dox b/google/cloud/channel/doc/override-authentication.dox index 99bb4a4ba99af..362da1179fa24 100644 --- a/google/cloud/channel/doc/override-authentication.dox +++ b/google/cloud/channel/doc/override-authentication.dox @@ -11,11 +11,6 @@ The following example shows how to explicitly load a service account key file: @snippet cloud_channel_client_samples.cc with-service-account -Follow these links to find examples for other \c *Client classes: - -- [\c channel_v1::CloudChannelServiceClient](@ref channel_v1::CloudChannelServiceClient-service-account-snippet) -- [\c channel_v1::CloudChannelReportsServiceClient](@ref channel_v1::CloudChannelReportsServiceClient-service-account-snippet) - Keep in mind that we chose this as an example because it is relatively easy to @@ -36,11 +31,5 @@ guide for more details. @snippet google/cloud/channel/v1/samples/cloud_channel_client_samples.cc with-service-account -*/ - -/*! @page channel_v1::CloudChannelReportsServiceClient-service-account-snippet Override channel_v1::CloudChannelReportsServiceClient Authentication Defaults - -@snippet google/cloud/channel/v1/samples/cloud_channel_reports_client_samples.cc with-service-account - */ // diff --git a/google/cloud/channel/doc/override-endpoint.dox b/google/cloud/channel/doc/override-endpoint.dox index 30253d1238885..dbccdff87a160 100644 --- a/google/cloud/channel/doc/override-endpoint.dox +++ b/google/cloud/channel/doc/override-endpoint.dox @@ -11,11 +11,6 @@ For example, this will override the default endpoint for `channel_v1::CloudChann @snippet cloud_channel_client_samples.cc set-client-endpoint -Follow these links to find examples for other \c *Client classes: - -- [\c channel_v1::CloudChannelServiceClient](@ref channel_v1::CloudChannelServiceClient-endpoint-snippet) -- [\c channel_v1::CloudChannelReportsServiceClient](@ref channel_v1::CloudChannelReportsServiceClient-endpoint-snippet) - */ @@ -26,11 +21,5 @@ Follow these links to find examples for other \c *Client classes: @snippet google/cloud/channel/v1/samples/cloud_channel_client_samples.cc set-client-endpoint -*/ - -/*! @page channel_v1::CloudChannelReportsServiceClient-endpoint-snippet Override channel_v1::CloudChannelReportsServiceClient Endpoint Configuration - -@snippet google/cloud/channel/v1/samples/cloud_channel_reports_client_samples.cc set-client-endpoint - */ // diff --git a/google/cloud/channel/doc/override-retry-policies.dox b/google/cloud/channel/doc/override-retry-policies.dox index 0b361974f26a9..2dc2fa9dc6066 100644 --- a/google/cloud/channel/doc/override-retry-policies.dox +++ b/google/cloud/channel/doc/override-retry-policies.dox @@ -80,11 +80,6 @@ This will override the polling policies for `channel_v1::CloudChannelServiceClie @snippet cloud_channel_client_samples.cc set-polling-policy -Follow these links to find examples for other \c *Client classes: - -- [\c channel_v1::CloudChannelServiceClient](@ref channel_v1::CloudChannelServiceClient-retry-snippet) -- [\c channel_v1::CloudChannelReportsServiceClient](@ref channel_v1::CloudChannelReportsServiceClient-retry-snippet) - @section channel-override-retry-more-information More Information @@ -109,17 +104,5 @@ Assuming you have created a custom idempotency policy. Such as: @snippet google/cloud/channel/v1/samples/cloud_channel_client_samples.cc custom-idempotency-policy -*/ - -/*! @page channel_v1::CloudChannelReportsServiceClient-retry-snippet Override channel_v1::CloudChannelReportsServiceClient Retry Policies - -This shows how to override the retry policies for channel_v1::CloudChannelReportsServiceClient: - -@snippet google/cloud/channel/v1/samples/cloud_channel_reports_client_samples.cc set-retry-policy - -Assuming you have created a custom idempotency policy. Such as: - -@snippet google/cloud/channel/v1/samples/cloud_channel_reports_client_samples.cc custom-idempotency-policy - */ // diff --git a/google/cloud/channel/doc/override-universe-domain.dox b/google/cloud/channel/doc/override-universe-domain.dox index 824898a382df8..0389701576c56 100644 --- a/google/cloud/channel/doc/override-universe-domain.dox +++ b/google/cloud/channel/doc/override-universe-domain.dox @@ -10,11 +10,6 @@ For example, this will override the default universe domain for `channel_v1::Clo @snippet cloud_channel_client_samples.cc set-client-universe-domain -Follow these links to find examples for other \c *Client classes: - -- [\c channel_v1::CloudChannelServiceClient](@ref channel_v1::CloudChannelServiceClient-universe-domain-snippet) -- [\c channel_v1::CloudChannelReportsServiceClient](@ref channel_v1::CloudChannelReportsServiceClient-universe-domain-snippet) - */ @@ -25,11 +20,5 @@ Follow these links to find examples for other \c *Client classes: @snippet google/cloud/channel/v1/samples/cloud_channel_client_samples.cc set-client-universe-domain -*/ - -/*! @page channel_v1::CloudChannelReportsServiceClient-universe-domain-snippet Override channel_v1::CloudChannelReportsServiceClient Universe Domain - -@snippet google/cloud/channel/v1/samples/cloud_channel_reports_client_samples.cc set-client-universe-domain - */ // diff --git a/google/cloud/channel/mocks/mock_cloud_channel_connection.h b/google/cloud/channel/mocks/mock_cloud_channel_connection.h deleted file mode 100644 index 4540650bf0b4c..0000000000000 --- a/google/cloud/channel/mocks/mock_cloud_channel_connection.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_MOCKS_MOCK_CLOUD_CHANNEL_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_MOCKS_MOCK_CLOUD_CHANNEL_CONNECTION_H - -#include "google/cloud/channel/cloud_channel_connection.h" -#include "google/cloud/channel/v1/mocks/mock_cloud_channel_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in channel_v1_mocks instead of the aliases -/// defined in this namespace. -namespace channel_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use channel_v1_mocks::MockCloudChannelServiceConnection -/// directly. -using ::google::cloud::channel_v1_mocks::MockCloudChannelServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace channel_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_MOCKS_MOCK_CLOUD_CHANNEL_CONNECTION_H diff --git a/google/cloud/channel/quickstart/.bazelrc b/google/cloud/channel/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/channel/quickstart/.bazelrc +++ b/google/cloud/channel/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/channel/quickstart/CMakeLists.txt b/google/cloud/channel/quickstart/CMakeLists.txt index e2a211fe548c2..493f9ed5cc126 100644 --- a/google/cloud/channel/quickstart/CMakeLists.txt +++ b/google/cloud/channel/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Channel API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-channel-quickstart CXX) find_package(google_cloud_cpp_channel REQUIRED) diff --git a/google/cloud/channel/v1/cloud_channel_client.h b/google/cloud/channel/v1/cloud_channel_client.h index c80d3cbe4720c..b02a5bd304bbc 100644 --- a/google/cloud/channel/v1/cloud_channel_client.h +++ b/google/cloud/channel/v1/cloud_channel_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/channel/v1/cloud_channel_connection.h b/google/cloud/channel/v1/cloud_channel_connection.h index 0ec28e6728247..c5cbedb009859 100644 --- a/google/cloud/channel/v1/cloud_channel_connection.h +++ b/google/cloud/channel/v1/cloud_channel_connection.h @@ -21,6 +21,8 @@ #include "google/cloud/channel/v1/cloud_channel_connection_idempotency_policy.h" #include "google/cloud/channel/v1/internal/cloud_channel_retry_traits.h" +#include "google/cloud/channel/v1/operations.pb.h" +#include "google/cloud/channel/v1/service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,9 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/channel/v1/cloud_channel_connection_idempotency_policy.h b/google/cloud/channel/v1/cloud_channel_connection_idempotency_policy.h index 62d4db160aa35..0e124e9158ccb 100644 --- a/google/cloud/channel/v1/cloud_channel_connection_idempotency_policy.h +++ b/google/cloud/channel/v1/cloud_channel_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_CLOUD_CHANNEL_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_CLOUD_CHANNEL_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/channel/v1/service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/channel/v1/cloud_channel_reports_client.cc b/google/cloud/channel/v1/cloud_channel_reports_client.cc deleted file mode 100644 index 48de414b35fb1..0000000000000 --- a/google/cloud/channel/v1/cloud_channel_reports_client.cc +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/reports_service.proto - -#include "google/cloud/channel/v1/cloud_channel_reports_client.h" -#include -#include - -namespace google { -namespace cloud { -namespace channel_v1 { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -CloudChannelReportsServiceClient::CloudChannelReportsServiceClient( - std::shared_ptr connection, - Options opts) - : connection_(std::move(connection)), - options_( - internal::MergeOptions(std::move(opts), connection_->options())) {} -CloudChannelReportsServiceClient::~CloudChannelReportsServiceClient() = default; - -future> -CloudChannelReportsServiceClient::RunReportJob( - google::cloud::channel::v1::RunReportJobRequest const& request, - Options opts) { - internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_)); - return connection_->RunReportJob(request); -} - -StatusOr -CloudChannelReportsServiceClient::RunReportJob( - NoAwaitTag, google::cloud::channel::v1::RunReportJobRequest const& request, - Options opts) { - internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_)); - return connection_->RunReportJob(NoAwaitTag{}, request); -} - -future> -CloudChannelReportsServiceClient::RunReportJob( - google::longrunning::Operation const& operation, Options opts) { - internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_)); - return connection_->RunReportJob(operation); -} - -StreamRange -CloudChannelReportsServiceClient::FetchReportResults( - std::string const& report_job, Options opts) { - internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_)); - google::cloud::channel::v1::FetchReportResultsRequest request; - request.set_report_job(report_job); - return connection_->FetchReportResults(request); -} - -StreamRange -CloudChannelReportsServiceClient::FetchReportResults( - google::cloud::channel::v1::FetchReportResultsRequest request, - Options opts) { - internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_)); - return connection_->FetchReportResults(std::move(request)); -} - -StreamRange -CloudChannelReportsServiceClient::ListReports(std::string const& parent, - Options opts) { - internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_)); - google::cloud::channel::v1::ListReportsRequest request; - request.set_parent(parent); - return connection_->ListReports(request); -} - -StreamRange -CloudChannelReportsServiceClient::ListReports( - google::cloud::channel::v1::ListReportsRequest request, Options opts) { - internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_)); - return connection_->ListReports(std::move(request)); -} - -StreamRange -CloudChannelReportsServiceClient::ListOperations(std::string const& name, - std::string const& filter, - Options opts) { - internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_)); - google::longrunning::ListOperationsRequest request; - request.set_name(name); - request.set_filter(filter); - return connection_->ListOperations(request); -} - -StreamRange -CloudChannelReportsServiceClient::ListOperations( - google::longrunning::ListOperationsRequest request, Options opts) { - internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_)); - return connection_->ListOperations(std::move(request)); -} - -StatusOr -CloudChannelReportsServiceClient::GetOperation(std::string const& name, - Options opts) { - internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_)); - google::longrunning::GetOperationRequest request; - request.set_name(name); - return connection_->GetOperation(request); -} - -StatusOr -CloudChannelReportsServiceClient::GetOperation( - google::longrunning::GetOperationRequest const& request, Options opts) { - internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_)); - return connection_->GetOperation(request); -} - -Status CloudChannelReportsServiceClient::DeleteOperation( - std::string const& name, Options opts) { - internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_)); - google::longrunning::DeleteOperationRequest request; - request.set_name(name); - return connection_->DeleteOperation(request); -} - -Status CloudChannelReportsServiceClient::DeleteOperation( - google::longrunning::DeleteOperationRequest const& request, Options opts) { - internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_)); - return connection_->DeleteOperation(request); -} - -Status CloudChannelReportsServiceClient::CancelOperation( - std::string const& name, Options opts) { - internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_)); - google::longrunning::CancelOperationRequest request; - request.set_name(name); - return connection_->CancelOperation(request); -} - -Status CloudChannelReportsServiceClient::CancelOperation( - google::longrunning::CancelOperationRequest const& request, Options opts) { - internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_)); - return connection_->CancelOperation(request); -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace channel_v1 -} // namespace cloud -} // namespace google diff --git a/google/cloud/channel/v1/cloud_channel_reports_client.h b/google/cloud/channel/v1/cloud_channel_reports_client.h deleted file mode 100644 index d349accf1a6fc..0000000000000 --- a/google/cloud/channel/v1/cloud_channel_reports_client.h +++ /dev/null @@ -1,673 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/reports_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_CLOUD_CHANNEL_REPORTS_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_CLOUD_CHANNEL_REPORTS_CLIENT_H - -#include "google/cloud/channel/v1/cloud_channel_reports_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 -#include -#include - -namespace google { -namespace cloud { -namespace channel_v1 { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// -/// CloudChannelReportsService lets Google Cloud resellers and -/// distributors retrieve and combine a variety of data in Cloud Channel for -/// multiple products (Google Cloud, Google Voice, and Google Workspace.) -/// -/// Deprecated: This service is being deprecated. Please use [Export Channel -/// Services data to -/// BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) -/// instead. -/// -/// @par Equality -/// -/// Instances of this class created via copy-construction or copy-assignment -/// always compare equal. Instances created with equal -/// `std::shared_ptr<*Connection>` objects compare equal. Objects that compare -/// equal share the same underlying resources. -/// -/// @par Performance -/// -/// Creating a new instance of this class is a relatively expensive operation, -/// new objects establish new connections to the service. In contrast, -/// copy-construction, move-construction, and the corresponding assignment -/// operations are relatively efficient as the copies share all underlying -/// resources. -/// -/// @par Thread Safety -/// -/// Concurrent access to different instances of this class, even if they compare -/// equal, is guaranteed to work. Two or more threads operating on the same -/// instance of this class is not guaranteed to work. Since copy-construction -/// and move-construction is a relatively efficient operation, consider using -/// such a copy when using this class from multiple threads. -/// -class GOOGLE_CLOUD_CPP_DEPRECATED( - "CloudChannelReportsService has been deprecated and will be turned down in " - "the future.") CloudChannelReportsServiceClient { - public: - explicit CloudChannelReportsServiceClient( - std::shared_ptr connection, - Options opts = {}); - ~CloudChannelReportsServiceClient(); - - ///@{ - /// @name Copy and move support - CloudChannelReportsServiceClient(CloudChannelReportsServiceClient const&) = - default; - CloudChannelReportsServiceClient& operator=( - CloudChannelReportsServiceClient const&) = default; - CloudChannelReportsServiceClient(CloudChannelReportsServiceClient&&) = - default; - CloudChannelReportsServiceClient& operator=( - CloudChannelReportsServiceClient&&) = default; - ///@} - - ///@{ - /// @name Equality - friend bool operator==(CloudChannelReportsServiceClient const& a, - CloudChannelReportsServiceClient const& b) { - return a.connection_ == b.connection_; - } - friend bool operator!=(CloudChannelReportsServiceClient const& a, - CloudChannelReportsServiceClient const& b) { - return !(a == b); - } - ///@} - - // clang-format off - /// - /// @deprecated This RPC is deprecated. - /// - /// Begins generation of data for a given report. The report - /// identifier is a UID (for example, `613bf59q`). - /// - /// Possible error codes: - /// - /// * PERMISSION_DENIED: The user doesn't have access to this report. - /// * INVALID_ARGUMENT: Required request parameters are missing - /// or invalid. - /// * NOT_FOUND: The report identifier was not found. - /// * INTERNAL: Any non-user error related to a technical issue - /// in the backend. Contact Cloud Channel support. - /// * UNKNOWN: Any non-user error related to a technical issue - /// in the backend. Contact Cloud Channel support. - /// - /// Return value: - /// The ID of a long-running operation. - /// - /// To get the results of the operation, call the GetOperation method of - /// CloudChannelOperationsService. The Operation metadata contains an - /// instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. - /// - /// To get the results of report generation, call - /// [CloudChannelReportsService.FetchReportResults][google.cloud.channel.v1.CloudChannelReportsService.FetchReportResults] - /// with the - /// [RunReportJobResponse.report_job][google.cloud.channel.v1.RunReportJobResponse.report_job]. - /// - /// Deprecated: Please use [Export Channel Services data to - /// BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) - /// instead. - /// - /// @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.channel.v1.RunReportJobRequest]. - /// 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.channel.v1.RunReportJobResponse] 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.channel.v1.CloudChannelReportsService.FetchReportResults]: @googleapis_reference_link{google/cloud/channel/v1/reports_service.proto#L97} - /// [google.cloud.channel.v1.OperationMetadata]: @googleapis_reference_link{google/cloud/channel/v1/operations.proto#L26} - /// [google.cloud.channel.v1.RunReportJobRequest]: @googleapis_reference_link{google/cloud/channel/v1/reports_service.proto#L124} - /// [google.cloud.channel.v1.RunReportJobResponse]: @googleapis_reference_link{google/cloud/channel/v1/reports_service.proto#L163} - /// [google.cloud.channel.v1.RunReportJobResponse.report_job]: @googleapis_reference_link{google/cloud/channel/v1/reports_service.proto#L169} - /// - // clang-format on - GOOGLE_CLOUD_CPP_DEPRECATED("This RPC is deprecated.") - future> - RunReportJob(google::cloud::channel::v1::RunReportJobRequest const& request, - Options opts = {}); - - // clang-format off - /// - /// @deprecated This RPC is deprecated. - /// - /// @copybrief RunReportJob - /// - /// 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 - GOOGLE_CLOUD_CPP_DEPRECATED("This RPC is deprecated.") - StatusOr RunReportJob( - NoAwaitTag, - google::cloud::channel::v1::RunReportJobRequest const& request, - Options opts = {}); - - // clang-format off - /// - /// @deprecated This RPC is deprecated. - /// - /// @copybrief RunReportJob - /// - /// 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 - GOOGLE_CLOUD_CPP_DEPRECATED("This RPC is deprecated.") - future> - RunReportJob(google::longrunning::Operation const& operation, - Options opts = {}); - - // clang-format off - /// - /// @deprecated This RPC is deprecated. - /// - /// Retrieves data generated by - /// [CloudChannelReportsService.RunReportJob][google.cloud.channel.v1.CloudChannelReportsService.RunReportJob]. - /// - /// Deprecated: Please use [Export Channel Services data to - /// BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) - /// instead. - /// - /// @param report_job Required. The report job created by - /// [CloudChannelReportsService.RunReportJob][google.cloud.channel.v1.CloudChannelReportsService.RunReportJob]. - /// Report_job uses the format: - /// accounts/{account_id}/reportJobs/{report_job_id} - /// @param opts Optional. Override the class-level options, such as retry and - /// backoff policies. - /// @return a [StreamRange](@ref google::cloud::StreamRange) - /// to iterate of the results. See the documentation of this type for - /// details. In brief, this class has `begin()` and `end()` member - /// functions returning a iterator class meeting the - /// [input iterator requirements]. The value type for this iterator is a - /// [`StatusOr`] as the iteration may fail even after some values are - /// retrieved successfully, for example, if there is a network disconnect. - /// An empty set of results does not indicate an error, it indicates - /// that there are no resources meeting the request criteria. - /// On a successful iteration the `StatusOr` contains elements of type - /// [google.cloud.channel.v1.Row], or rather, - /// the C++ class generated by Protobuf from that type. Please consult the - /// Protobuf documentation for details on 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 - /// [`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.channel.v1.CloudChannelReportsService.RunReportJob]: @googleapis_reference_link{google/cloud/channel/v1/reports_service.proto#L79} - /// [google.cloud.channel.v1.FetchReportResultsRequest]: @googleapis_reference_link{google/cloud/channel/v1/reports_service.proto#L179} - /// [google.cloud.channel.v1.Row]: @googleapis_reference_link{google/cloud/channel/v1/reports_service.proto#L399} - /// - // clang-format on - GOOGLE_CLOUD_CPP_DEPRECATED("This RPC is deprecated.") - StreamRange FetchReportResults( - std::string const& report_job, Options opts = {}); - - // clang-format off - /// - /// @deprecated This RPC is deprecated. - /// - /// Retrieves data generated by - /// [CloudChannelReportsService.RunReportJob][google.cloud.channel.v1.CloudChannelReportsService.RunReportJob]. - /// - /// Deprecated: Please use [Export Channel Services data to - /// BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) - /// instead. - /// - /// @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.channel.v1.FetchReportResultsRequest]. - /// 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 [StreamRange](@ref google::cloud::StreamRange) - /// to iterate of the results. See the documentation of this type for - /// details. In brief, this class has `begin()` and `end()` member - /// functions returning a iterator class meeting the - /// [input iterator requirements]. The value type for this iterator is a - /// [`StatusOr`] as the iteration may fail even after some values are - /// retrieved successfully, for example, if there is a network disconnect. - /// An empty set of results does not indicate an error, it indicates - /// that there are no resources meeting the request criteria. - /// On a successful iteration the `StatusOr` contains elements of type - /// [google.cloud.channel.v1.Row], or rather, - /// the C++ class generated by Protobuf from that type. Please consult the - /// Protobuf documentation for details on 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 - /// [`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.channel.v1.CloudChannelReportsService.RunReportJob]: @googleapis_reference_link{google/cloud/channel/v1/reports_service.proto#L79} - /// [google.cloud.channel.v1.FetchReportResultsRequest]: @googleapis_reference_link{google/cloud/channel/v1/reports_service.proto#L179} - /// [google.cloud.channel.v1.Row]: @googleapis_reference_link{google/cloud/channel/v1/reports_service.proto#L399} - /// - // clang-format on - GOOGLE_CLOUD_CPP_DEPRECATED("This RPC is deprecated.") - StreamRange FetchReportResults( - google::cloud::channel::v1::FetchReportResultsRequest request, - Options opts = {}); - - // clang-format off - /// - /// @deprecated This RPC is deprecated. - /// - /// Lists the reports that RunReportJob can run. These reports include an ID, - /// a description, and the list of columns that will be in the result. - /// - /// Deprecated: Please use [Export Channel Services data to - /// BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) - /// instead. - /// - /// @param parent Required. The resource name of the partner account to list available - /// reports for. Parent uses the format: accounts/{account_id} - /// @param opts Optional. Override the class-level options, such as retry and - /// backoff policies. - /// @return a [StreamRange](@ref google::cloud::StreamRange) - /// to iterate of the results. See the documentation of this type for - /// details. In brief, this class has `begin()` and `end()` member - /// functions returning a iterator class meeting the - /// [input iterator requirements]. The value type for this iterator is a - /// [`StatusOr`] as the iteration may fail even after some values are - /// retrieved successfully, for example, if there is a network disconnect. - /// An empty set of results does not indicate an error, it indicates - /// that there are no resources meeting the request criteria. - /// On a successful iteration the `StatusOr` contains elements of type - /// [google.cloud.channel.v1.Report], or rather, - /// the C++ class generated by Protobuf from that type. Please consult the - /// Protobuf documentation for details on 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 - /// [`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.channel.v1.ListReportsRequest]: @googleapis_reference_link{google/cloud/channel/v1/reports_service.proto#L236} - /// [google.cloud.channel.v1.Report]: @googleapis_reference_link{google/cloud/channel/v1/reports_service.proto#L474} - /// - // clang-format on - GOOGLE_CLOUD_CPP_DEPRECATED("This RPC is deprecated.") - StreamRange ListReports( - std::string const& parent, Options opts = {}); - - // clang-format off - /// - /// @deprecated This RPC is deprecated. - /// - /// Lists the reports that RunReportJob can run. These reports include an ID, - /// a description, and the list of columns that will be in the result. - /// - /// Deprecated: Please use [Export Channel Services data to - /// BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) - /// instead. - /// - /// @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.channel.v1.ListReportsRequest]. - /// 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 [StreamRange](@ref google::cloud::StreamRange) - /// to iterate of the results. See the documentation of this type for - /// details. In brief, this class has `begin()` and `end()` member - /// functions returning a iterator class meeting the - /// [input iterator requirements]. The value type for this iterator is a - /// [`StatusOr`] as the iteration may fail even after some values are - /// retrieved successfully, for example, if there is a network disconnect. - /// An empty set of results does not indicate an error, it indicates - /// that there are no resources meeting the request criteria. - /// On a successful iteration the `StatusOr` contains elements of type - /// [google.cloud.channel.v1.Report], or rather, - /// the C++ class generated by Protobuf from that type. Please consult the - /// Protobuf documentation for details on 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 - /// [`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.channel.v1.ListReportsRequest]: @googleapis_reference_link{google/cloud/channel/v1/reports_service.proto#L236} - /// [google.cloud.channel.v1.Report]: @googleapis_reference_link{google/cloud/channel/v1/reports_service.proto#L474} - /// - // clang-format on - GOOGLE_CLOUD_CPP_DEPRECATED("This RPC is deprecated.") - StreamRange ListReports( - google::cloud::channel::v1::ListReportsRequest request, - Options opts = {}); - - // clang-format off - /// - /// Lists operations that match the specified filter in the request. If the - /// server doesn't support this method, it returns `UNIMPLEMENTED`. - /// - /// @param name The name of the operation's parent resource. - /// @param filter The standard list filter. - /// @param opts Optional. Override the class-level options, such as retry and - /// backoff policies. - /// @return a [StreamRange](@ref google::cloud::StreamRange) - /// to iterate of the results. See the documentation of this type for - /// details. In brief, this class has `begin()` and `end()` member - /// functions returning a iterator class meeting the - /// [input iterator requirements]. The value type for this iterator is a - /// [`StatusOr`] as the iteration may fail even after some values are - /// retrieved successfully, for example, if there is a network disconnect. - /// An empty set of results does not indicate an error, it indicates - /// that there are no resources meeting the request criteria. - /// On a successful iteration the `StatusOr` contains elements of type - /// [google.longrunning.Operation], or rather, - /// the C++ class generated by Protobuf from that type. Please consult the - /// Protobuf documentation for details on 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 - /// [`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.longrunning.ListOperationsRequest]: @googleapis_reference_link{google/longrunning/operations.proto#L167} - /// [google.longrunning.Operation]: @googleapis_reference_link{google/longrunning/operations.proto#L121} - /// - // clang-format on - StreamRange ListOperations( - std::string const& name, std::string const& filter, Options opts = {}); - - // clang-format off - /// - /// Lists operations that match the specified filter in the request. If the - /// server doesn't support this method, it returns `UNIMPLEMENTED`. - /// - /// @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.longrunning.ListOperationsRequest]. - /// 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 [StreamRange](@ref google::cloud::StreamRange) - /// to iterate of the results. See the documentation of this type for - /// details. In brief, this class has `begin()` and `end()` member - /// functions returning a iterator class meeting the - /// [input iterator requirements]. The value type for this iterator is a - /// [`StatusOr`] as the iteration may fail even after some values are - /// retrieved successfully, for example, if there is a network disconnect. - /// An empty set of results does not indicate an error, it indicates - /// that there are no resources meeting the request criteria. - /// On a successful iteration the `StatusOr` contains elements of type - /// [google.longrunning.Operation], or rather, - /// the C++ class generated by Protobuf from that type. Please consult the - /// Protobuf documentation for details on 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 - /// [`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.longrunning.ListOperationsRequest]: @googleapis_reference_link{google/longrunning/operations.proto#L167} - /// [google.longrunning.Operation]: @googleapis_reference_link{google/longrunning/operations.proto#L121} - /// - // clang-format on - StreamRange ListOperations( - google::longrunning::ListOperationsRequest request, Options opts = {}); - - // clang-format off - /// - /// Gets the latest state of a long-running operation. Clients can use this - /// method to poll the operation result at intervals as recommended by the API - /// service. - /// - /// @param name The name of the operation resource. - /// @param opts Optional. Override the class-level options, such as retry and - /// backoff policies. - /// @return the result of the RPC. The response message type - /// ([google.longrunning.Operation]) - /// is mapped to a C++ class using the [Protobuf mapping rules]. - /// If the request fails, the [`StatusOr`] contains the error details. - /// - /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/ - /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator - /// [`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.longrunning.GetOperationRequest]: @googleapis_reference_link{google/longrunning/operations.proto#L160} - /// [google.longrunning.Operation]: @googleapis_reference_link{google/longrunning/operations.proto#L121} - /// - // clang-format on - StatusOr GetOperation(std::string const& name, - Options opts = {}); - - // clang-format off - /// - /// Gets the latest state of a long-running operation. Clients can use this - /// method to poll the operation result at intervals as recommended by the API - /// service. - /// - /// @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.longrunning.GetOperationRequest]. - /// 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 the result of the RPC. The response message type - /// ([google.longrunning.Operation]) - /// is mapped to a C++ class using the [Protobuf mapping rules]. - /// If the request fails, the [`StatusOr`] contains the error details. - /// - /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/ - /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator - /// [`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.longrunning.GetOperationRequest]: @googleapis_reference_link{google/longrunning/operations.proto#L160} - /// [google.longrunning.Operation]: @googleapis_reference_link{google/longrunning/operations.proto#L121} - /// - // clang-format on - StatusOr GetOperation( - google::longrunning::GetOperationRequest const& request, - Options opts = {}); - - // clang-format off - /// - /// Deletes a long-running operation. This method indicates that the client is - /// no longer interested in the operation result. It does not cancel the - /// operation. If the server doesn't support this method, it returns - /// `google.rpc.Code.UNIMPLEMENTED`. - /// - /// @param name The name of the operation resource to be deleted. - /// @param opts Optional. Override the class-level options, such as retry and - /// backoff policies. - /// @return a [`Status`] object. If the request failed, the - /// status contains the details of the failure. - /// - /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/ - /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator - /// [`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.longrunning.DeleteOperationRequest]: @googleapis_reference_link{google/longrunning/operations.proto#L219} - /// - // clang-format on - Status DeleteOperation(std::string const& name, Options opts = {}); - - // clang-format off - /// - /// Deletes a long-running operation. This method indicates that the client is - /// no longer interested in the operation result. It does not cancel the - /// operation. If the server doesn't support this method, it returns - /// `google.rpc.Code.UNIMPLEMENTED`. - /// - /// @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.longrunning.DeleteOperationRequest]. - /// 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 [`Status`] object. If the request failed, the - /// status contains the details of the failure. - /// - /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/ - /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator - /// [`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.longrunning.DeleteOperationRequest]: @googleapis_reference_link{google/longrunning/operations.proto#L219} - /// - // clang-format on - Status DeleteOperation( - google::longrunning::DeleteOperationRequest const& request, - Options opts = {}); - - // clang-format off - /// - /// Starts asynchronous cancellation on a long-running operation. The server - /// makes a best effort to cancel the operation, but success is not - /// guaranteed. If the server doesn't support this method, it returns - /// `google.rpc.Code.UNIMPLEMENTED`. Clients can use - /// [Operations.GetOperation][google.longrunning.Operations.GetOperation] or - /// other methods to check whether the cancellation succeeded or whether the - /// operation completed despite cancellation. On successful cancellation, - /// the operation is not deleted; instead, it becomes an operation with - /// an [Operation.error][google.longrunning.Operation.error] value with a - /// [google.rpc.Status.code][google.rpc.Status.code] of `1`, corresponding to - /// `Code.CANCELLED`. - /// - /// @param name The name of the operation resource to be cancelled. - /// @param opts Optional. Override the class-level options, such as retry and - /// backoff policies. - /// @return a [`Status`] object. If the request failed, the - /// status contains the details of the failure. - /// - /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/ - /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator - /// [`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.longrunning.CancelOperationRequest]: @googleapis_reference_link{google/longrunning/operations.proto#L212} - /// [google.longrunning.Operation.error]: @googleapis_reference_link{google/longrunning/operations.proto#L144} - /// [google.longrunning.Operations.GetOperation]: @googleapis_reference_link{google/longrunning/operations.proto#L70} - /// [google.rpc.Status.code]: @googleapis_reference_link{google/rpc/status.proto#L38} - /// - // clang-format on - Status CancelOperation(std::string const& name, Options opts = {}); - - // clang-format off - /// - /// Starts asynchronous cancellation on a long-running operation. The server - /// makes a best effort to cancel the operation, but success is not - /// guaranteed. If the server doesn't support this method, it returns - /// `google.rpc.Code.UNIMPLEMENTED`. Clients can use - /// [Operations.GetOperation][google.longrunning.Operations.GetOperation] or - /// other methods to check whether the cancellation succeeded or whether the - /// operation completed despite cancellation. On successful cancellation, - /// the operation is not deleted; instead, it becomes an operation with - /// an [Operation.error][google.longrunning.Operation.error] value with a - /// [google.rpc.Status.code][google.rpc.Status.code] of `1`, corresponding to - /// `Code.CANCELLED`. - /// - /// @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.longrunning.CancelOperationRequest]. - /// 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 [`Status`] object. If the request failed, the - /// status contains the details of the failure. - /// - /// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/ - /// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator - /// [`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.longrunning.CancelOperationRequest]: @googleapis_reference_link{google/longrunning/operations.proto#L212} - /// [google.longrunning.Operation.error]: @googleapis_reference_link{google/longrunning/operations.proto#L144} - /// [google.longrunning.Operations.GetOperation]: @googleapis_reference_link{google/longrunning/operations.proto#L70} - /// [google.rpc.Status.code]: @googleapis_reference_link{google/rpc/status.proto#L38} - /// - // clang-format on - Status CancelOperation( - google::longrunning::CancelOperationRequest const& request, - Options opts = {}); - - private: - std::shared_ptr connection_; - Options options_; -}; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace channel_v1 -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_CLOUD_CHANNEL_REPORTS_CLIENT_H diff --git a/google/cloud/channel/v1/cloud_channel_reports_connection.cc b/google/cloud/channel/v1/cloud_channel_reports_connection.cc deleted file mode 100644 index dc14ad37ba0ee..0000000000000 --- a/google/cloud/channel/v1/cloud_channel_reports_connection.cc +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/reports_service.proto - -#include "google/cloud/channel/v1/cloud_channel_reports_connection.h" -#include "google/cloud/channel/v1/cloud_channel_reports_options.h" -#include "google/cloud/channel/v1/internal/cloud_channel_reports_connection_impl.h" -#include "google/cloud/channel/v1/internal/cloud_channel_reports_option_defaults.h" -#include "google/cloud/channel/v1/internal/cloud_channel_reports_stub_factory.h" -#include "google/cloud/channel/v1/internal/cloud_channel_reports_tracing_connection.h" -#include "google/cloud/background_threads.h" -#include "google/cloud/common_options.h" -#include "google/cloud/credentials.h" -#include "google/cloud/grpc_options.h" -#include "google/cloud/internal/pagination_range.h" -#include "google/cloud/internal/unified_grpc_credentials.h" -#include -#include - -namespace google { -namespace cloud { -namespace channel_v1 { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -CloudChannelReportsServiceConnection::~CloudChannelReportsServiceConnection() = - default; - -future> -CloudChannelReportsServiceConnection::RunReportJob( - google::cloud::channel::v1::RunReportJobRequest const&) { - return google::cloud::make_ready_future< - StatusOr>( - Status(StatusCode::kUnimplemented, "not implemented")); -} - -StatusOr -CloudChannelReportsServiceConnection::RunReportJob( - NoAwaitTag, google::cloud::channel::v1::RunReportJobRequest const&) { - return StatusOr( - Status(StatusCode::kUnimplemented, "not implemented")); -} - -future> -CloudChannelReportsServiceConnection::RunReportJob( - google::longrunning::Operation const&) { - return google::cloud::make_ready_future< - StatusOr>( - Status(StatusCode::kUnimplemented, "not implemented")); -} - -StreamRange -CloudChannelReportsServiceConnection::FetchReportResults( - google::cloud::channel::v1:: - FetchReportResultsRequest) { // NOLINT(performance-unnecessary-value-param) - return google::cloud::internal::MakeUnimplementedPaginationRange< - StreamRange>(); -} - -StreamRange -CloudChannelReportsServiceConnection::ListReports( - google::cloud::channel::v1:: - ListReportsRequest) { // NOLINT(performance-unnecessary-value-param) - return google::cloud::internal::MakeUnimplementedPaginationRange< - StreamRange>(); -} - -StreamRange -CloudChannelReportsServiceConnection::ListOperations( - google::longrunning:: - ListOperationsRequest) { // NOLINT(performance-unnecessary-value-param) - return google::cloud::internal::MakeUnimplementedPaginationRange< - StreamRange>(); -} - -StatusOr -CloudChannelReportsServiceConnection::GetOperation( - google::longrunning::GetOperationRequest const&) { - return Status(StatusCode::kUnimplemented, "not implemented"); -} - -Status CloudChannelReportsServiceConnection::DeleteOperation( - google::longrunning::DeleteOperationRequest const&) { - return Status(StatusCode::kUnimplemented, "not implemented"); -} - -Status CloudChannelReportsServiceConnection::CancelOperation( - google::longrunning::CancelOperationRequest const&) { - return Status(StatusCode::kUnimplemented, "not implemented"); -} - -std::shared_ptr -MakeCloudChannelReportsServiceConnection(Options options) { - internal::CheckExpectedOptions( - options, __func__); - options = channel_v1_internal::CloudChannelReportsServiceDefaultOptions( - std::move(options)); - auto background = internal::MakeBackgroundThreadsFactory(options)(); - auto auth = internal::CreateAuthenticationStrategy(background->cq(), options); - auto stub = channel_v1_internal::CreateDefaultCloudChannelReportsServiceStub( - std::move(auth), options); - return channel_v1_internal::MakeCloudChannelReportsServiceTracingConnection( - std::make_shared< - channel_v1_internal::CloudChannelReportsServiceConnectionImpl>( - std::move(background), std::move(stub), std::move(options))); -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace channel_v1 -} // namespace cloud -} // namespace google diff --git a/google/cloud/channel/v1/cloud_channel_reports_connection.h b/google/cloud/channel/v1/cloud_channel_reports_connection.h deleted file mode 100644 index 9c887fd5acf50..0000000000000 --- a/google/cloud/channel/v1/cloud_channel_reports_connection.h +++ /dev/null @@ -1,267 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/reports_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_CLOUD_CHANNEL_REPORTS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_CLOUD_CHANNEL_REPORTS_CONNECTION_H - -#include "google/cloud/channel/v1/cloud_channel_reports_connection_idempotency_policy.h" -#include "google/cloud/channel/v1/internal/cloud_channel_reports_retry_traits.h" -#include "google/cloud/backoff_policy.h" -#include "google/cloud/future.h" -#include "google/cloud/internal/retry_policy_impl.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/stream_range.h" -#include "google/cloud/version.h" -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace channel_v1 { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// The retry policy for `CloudChannelReportsServiceConnection`. -class CloudChannelReportsServiceRetryPolicy - : public ::google::cloud::RetryPolicy { - public: - /// Creates a new instance of the policy, reset to the initial state. - virtual std::unique_ptr clone() - const = 0; -}; - -/** - * A retry policy for `CloudChannelReportsServiceConnection` based on counting - * errors. - * - * This policy stops retrying if: - * - An RPC returns a non-transient error. - * - More than a prescribed number of transient failures is detected. - * - * In this class the following status codes are treated as transient errors: - * - [`kUnavailable`](@ref google::cloud::StatusCode) - */ -class CloudChannelReportsServiceLimitedErrorCountRetryPolicy - : public CloudChannelReportsServiceRetryPolicy { - public: - /** - * Create an instance that tolerates up to @p maximum_failures transient - * errors. - * - * @note Disable the retry loop by providing an instance of this policy with - * @p maximum_failures == 0. - */ - explicit CloudChannelReportsServiceLimitedErrorCountRetryPolicy( - int maximum_failures) - : impl_(maximum_failures) {} - - CloudChannelReportsServiceLimitedErrorCountRetryPolicy( - CloudChannelReportsServiceLimitedErrorCountRetryPolicy&& rhs) noexcept - : CloudChannelReportsServiceLimitedErrorCountRetryPolicy( - rhs.maximum_failures()) {} - CloudChannelReportsServiceLimitedErrorCountRetryPolicy( - CloudChannelReportsServiceLimitedErrorCountRetryPolicy const& - rhs) noexcept - : CloudChannelReportsServiceLimitedErrorCountRetryPolicy( - rhs.maximum_failures()) {} - - int maximum_failures() const { return impl_.maximum_failures(); } - - bool OnFailure(Status const& status) override { - return impl_.OnFailure(status); - } - bool IsExhausted() const override { return impl_.IsExhausted(); } - bool IsPermanentFailure(Status const& status) const override { - return impl_.IsPermanentFailure(status); - } - std::unique_ptr clone() - const override { - return std::make_unique< - CloudChannelReportsServiceLimitedErrorCountRetryPolicy>( - maximum_failures()); - } - - // This is provided only for backwards compatibility. - using BaseType = CloudChannelReportsServiceRetryPolicy; - - private: - google::cloud::internal::LimitedErrorCountRetryPolicy< - channel_v1_internal::CloudChannelReportsServiceRetryTraits> - impl_; -}; - -/** - * A retry policy for `CloudChannelReportsServiceConnection` based on elapsed - * time. - * - * This policy stops retrying if: - * - An RPC returns a non-transient error. - * - The elapsed time in the retry loop exceeds a prescribed duration. - * - * In this class the following status codes are treated as transient errors: - * - [`kUnavailable`](@ref google::cloud::StatusCode) - */ -class CloudChannelReportsServiceLimitedTimeRetryPolicy - : public CloudChannelReportsServiceRetryPolicy { - public: - /** - * Constructor given a `std::chrono::duration<>` object. - * - * @tparam DurationRep a placeholder to match the `Rep` tparam for @p - * duration's type. The semantics of this template parameter are - * documented in `std::chrono::duration<>`. In brief, the underlying - * arithmetic type used to store the number of ticks. For our purposes it - * is simply a formal parameter. - * @tparam DurationPeriod a placeholder to match the `Period` tparam for @p - * duration's type. The semantics of this template parameter are - * documented in `std::chrono::duration<>`. In brief, the length of the - * tick in seconds, expressed as a `std::ratio<>`. For our purposes it is - * simply a formal parameter. - * @param maximum_duration the maximum time allowed before the policy expires. - * While the application can express this time in any units they desire, - * the class truncates to milliseconds. - * - * @see https://en.cppreference.com/w/cpp/chrono/duration for more information - * about `std::chrono::duration`. - */ - template - explicit CloudChannelReportsServiceLimitedTimeRetryPolicy( - std::chrono::duration maximum_duration) - : impl_(maximum_duration) {} - - CloudChannelReportsServiceLimitedTimeRetryPolicy( - CloudChannelReportsServiceLimitedTimeRetryPolicy&& rhs) noexcept - : CloudChannelReportsServiceLimitedTimeRetryPolicy( - rhs.maximum_duration()) {} - CloudChannelReportsServiceLimitedTimeRetryPolicy( - CloudChannelReportsServiceLimitedTimeRetryPolicy const& rhs) noexcept - : CloudChannelReportsServiceLimitedTimeRetryPolicy( - rhs.maximum_duration()) {} - - std::chrono::milliseconds maximum_duration() const { - return impl_.maximum_duration(); - } - - bool OnFailure(Status const& status) override { - return impl_.OnFailure(status); - } - bool IsExhausted() const override { return impl_.IsExhausted(); } - bool IsPermanentFailure(Status const& status) const override { - return impl_.IsPermanentFailure(status); - } - std::unique_ptr clone() - const override { - return std::make_unique( - maximum_duration()); - } - - // This is provided only for backwards compatibility. - using BaseType = CloudChannelReportsServiceRetryPolicy; - - private: - google::cloud::internal::LimitedTimeRetryPolicy< - channel_v1_internal::CloudChannelReportsServiceRetryTraits> - impl_; -}; - -/** - * The `CloudChannelReportsServiceConnection` object for - * `CloudChannelReportsServiceClient`. - * - * This interface defines virtual methods for each of the user-facing overload - * sets in `CloudChannelReportsServiceClient`. This allows users to inject - * custom behavior (e.g., with a Google Mock object) when writing tests that use - * objects of type `CloudChannelReportsServiceClient`. - * - * To create a concrete instance, see - * `MakeCloudChannelReportsServiceConnection()`. - * - * For mocking, see - * `channel_v1_mocks::MockCloudChannelReportsServiceConnection`. - */ -class CloudChannelReportsServiceConnection { - public: - virtual ~CloudChannelReportsServiceConnection() = 0; - - virtual Options options() { return Options{}; } - - virtual future> - RunReportJob(google::cloud::channel::v1::RunReportJobRequest const& request); - - virtual StatusOr RunReportJob( - NoAwaitTag, - google::cloud::channel::v1::RunReportJobRequest const& request); - - virtual future> - RunReportJob(google::longrunning::Operation const& operation); - - virtual StreamRange FetchReportResults( - google::cloud::channel::v1::FetchReportResultsRequest request); - - virtual StreamRange ListReports( - google::cloud::channel::v1::ListReportsRequest request); - - virtual StreamRange ListOperations( - google::longrunning::ListOperationsRequest request); - - virtual StatusOr GetOperation( - google::longrunning::GetOperationRequest const& request); - - virtual Status DeleteOperation( - google::longrunning::DeleteOperationRequest const& request); - - virtual Status CancelOperation( - google::longrunning::CancelOperationRequest const& request); -}; - -/** - * A factory function to construct an object of type - * `CloudChannelReportsServiceConnection`. - * - * The returned connection object should not be used directly; instead it - * should be passed as an argument to the constructor of - * CloudChannelReportsServiceClient. - * - * The optional @p options argument may be used to configure aspects of the - * returned `CloudChannelReportsServiceConnection`. Expected options are any of - * the types in the following option lists: - * - * - `google::cloud::CommonOptionList` - * - `google::cloud::GrpcOptionList` - * - `google::cloud::UnifiedCredentialsOptionList` - * - `google::cloud::channel_v1::CloudChannelReportsServicePolicyOptionList` - * - * @note Unexpected options will be ignored. To log unexpected options instead, - * set `GOOGLE_CLOUD_CPP_ENABLE_CLOG=yes` in the environment. - * - * @param options (optional) Configure the - * `CloudChannelReportsServiceConnection` created by this function. - */ -std::shared_ptr -MakeCloudChannelReportsServiceConnection(Options options = {}); - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace channel_v1 -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_CLOUD_CHANNEL_REPORTS_CONNECTION_H diff --git a/google/cloud/channel/v1/cloud_channel_reports_connection_idempotency_policy.cc b/google/cloud/channel/v1/cloud_channel_reports_connection_idempotency_policy.cc deleted file mode 100644 index a7d2ad092e2c8..0000000000000 --- a/google/cloud/channel/v1/cloud_channel_reports_connection_idempotency_policy.cc +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/reports_service.proto - -#include "google/cloud/channel/v1/cloud_channel_reports_connection_idempotency_policy.h" -#include - -namespace google { -namespace cloud { -namespace channel_v1 { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -using ::google::cloud::Idempotency; - -CloudChannelReportsServiceConnectionIdempotencyPolicy:: - ~CloudChannelReportsServiceConnectionIdempotencyPolicy() = default; - -std::unique_ptr -CloudChannelReportsServiceConnectionIdempotencyPolicy::clone() const { - return std::make_unique< - CloudChannelReportsServiceConnectionIdempotencyPolicy>(*this); -} - -Idempotency CloudChannelReportsServiceConnectionIdempotencyPolicy::RunReportJob( - google::cloud::channel::v1::RunReportJobRequest const&) { - return Idempotency::kNonIdempotent; -} - -Idempotency -CloudChannelReportsServiceConnectionIdempotencyPolicy::FetchReportResults( - google::cloud::channel::v1::FetchReportResultsRequest) { // NOLINT - return Idempotency::kNonIdempotent; -} - -Idempotency CloudChannelReportsServiceConnectionIdempotencyPolicy::ListReports( - google::cloud::channel::v1::ListReportsRequest) { // NOLINT - return Idempotency::kIdempotent; -} - -Idempotency -CloudChannelReportsServiceConnectionIdempotencyPolicy::ListOperations( - google::longrunning::ListOperationsRequest) { // NOLINT - return Idempotency::kIdempotent; -} - -Idempotency CloudChannelReportsServiceConnectionIdempotencyPolicy::GetOperation( - google::longrunning::GetOperationRequest const&) { - return Idempotency::kIdempotent; -} - -Idempotency -CloudChannelReportsServiceConnectionIdempotencyPolicy::DeleteOperation( - google::longrunning::DeleteOperationRequest const&) { - return Idempotency::kNonIdempotent; -} - -Idempotency -CloudChannelReportsServiceConnectionIdempotencyPolicy::CancelOperation( - google::longrunning::CancelOperationRequest const&) { - return Idempotency::kNonIdempotent; -} - -std::unique_ptr -MakeDefaultCloudChannelReportsServiceConnectionIdempotencyPolicy() { - return std::make_unique< - CloudChannelReportsServiceConnectionIdempotencyPolicy>(); -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace channel_v1 -} // namespace cloud -} // namespace google diff --git a/google/cloud/channel/v1/cloud_channel_reports_connection_idempotency_policy.h b/google/cloud/channel/v1/cloud_channel_reports_connection_idempotency_policy.h deleted file mode 100644 index a6a7424863161..0000000000000 --- a/google/cloud/channel/v1/cloud_channel_reports_connection_idempotency_policy.h +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/reports_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_CLOUD_CHANNEL_REPORTS_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_CLOUD_CHANNEL_REPORTS_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/idempotency.h" -#include "google/cloud/version.h" -#include -#include -#include - -namespace google { -namespace cloud { -namespace channel_v1 { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -class CloudChannelReportsServiceConnectionIdempotencyPolicy { - public: - virtual ~CloudChannelReportsServiceConnectionIdempotencyPolicy(); - - /// Create a new copy of this object. - virtual std::unique_ptr - clone() const; - - virtual google::cloud::Idempotency RunReportJob( - google::cloud::channel::v1::RunReportJobRequest const& request); - - virtual google::cloud::Idempotency FetchReportResults( - google::cloud::channel::v1::FetchReportResultsRequest request); - - virtual google::cloud::Idempotency ListReports( - google::cloud::channel::v1::ListReportsRequest request); - - virtual google::cloud::Idempotency ListOperations( - google::longrunning::ListOperationsRequest request); - - virtual google::cloud::Idempotency GetOperation( - google::longrunning::GetOperationRequest const& request); - - virtual google::cloud::Idempotency DeleteOperation( - google::longrunning::DeleteOperationRequest const& request); - - virtual google::cloud::Idempotency CancelOperation( - google::longrunning::CancelOperationRequest const& request); -}; - -std::unique_ptr -MakeDefaultCloudChannelReportsServiceConnectionIdempotencyPolicy(); - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace channel_v1 -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_CLOUD_CHANNEL_REPORTS_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/channel/v1/cloud_channel_reports_options.h b/google/cloud/channel/v1/cloud_channel_reports_options.h deleted file mode 100644 index 7bd68ee312f06..0000000000000 --- a/google/cloud/channel/v1/cloud_channel_reports_options.h +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/reports_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_CLOUD_CHANNEL_REPORTS_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_CLOUD_CHANNEL_REPORTS_OPTIONS_H - -#include "google/cloud/channel/v1/cloud_channel_reports_connection.h" -#include "google/cloud/channel/v1/cloud_channel_reports_connection_idempotency_policy.h" -#include "google/cloud/backoff_policy.h" -#include "google/cloud/options.h" -#include "google/cloud/version.h" -#include - -namespace google { -namespace cloud { -namespace channel_v1 { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/** - * Use with `google::cloud::Options` to configure the retry policy. - * - * @ingroup google-cloud-channel-options - */ -struct CloudChannelReportsServiceRetryPolicyOption { - using Type = std::shared_ptr; -}; - -/** - * Use with `google::cloud::Options` to configure the backoff policy. - * - * @ingroup google-cloud-channel-options - */ -struct CloudChannelReportsServiceBackoffPolicyOption { - using Type = std::shared_ptr; -}; - -/** - * Use with `google::cloud::Options` to configure which operations are retried. - * - * @ingroup google-cloud-channel-options - */ -struct CloudChannelReportsServiceConnectionIdempotencyPolicyOption { - using Type = - std::shared_ptr; -}; - -/** - * Use with `google::cloud::Options` to configure the long-running operations - * polling policy. - * - * @ingroup google-cloud-channel-options - */ -struct CloudChannelReportsServicePollingPolicyOption { - using Type = std::shared_ptr; -}; - -/** - * The options applicable to CloudChannelReportsService. - * - * @ingroup google-cloud-channel-options - */ -using CloudChannelReportsServicePolicyOptionList = - OptionList; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace channel_v1 -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_CLOUD_CHANNEL_REPORTS_OPTIONS_H diff --git a/google/cloud/channel/v1/internal/cloud_channel_auth_decorator.cc b/google/cloud/channel/v1/internal/cloud_channel_auth_decorator.cc index 4a0cc61e80317..c704aee422511 100644 --- a/google/cloud/channel/v1/internal/cloud_channel_auth_decorator.cc +++ b/google/cloud/channel/v1/internal/cloud_channel_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/channel/v1/service.proto #include "google/cloud/channel/v1/internal/cloud_channel_auth_decorator.h" -#include +#include "google/cloud/channel/v1/service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace channel_v1_internal { @@ -778,3 +781,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace channel_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/channel/v1/internal/cloud_channel_auth_decorator.h b/google/cloud/channel/v1/internal/cloud_channel_auth_decorator.h index aee4d6b999693..7aaa5cc4879d4 100644 --- a/google/cloud/channel/v1/internal/cloud_channel_auth_decorator.h +++ b/google/cloud/channel/v1/internal/cloud_channel_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/channel/v1/internal/cloud_channel_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace channel_v1_internal { @@ -413,4 +416,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_AUTH_DECORATOR_H diff --git a/google/cloud/channel/v1/internal/cloud_channel_connection_impl.h b/google/cloud/channel/v1/internal/cloud_channel_connection_impl.h index ead015cc32d79..85f902b90b18a 100644 --- a/google/cloud/channel/v1/internal/cloud_channel_connection_impl.h +++ b/google/cloud/channel/v1/internal/cloud_channel_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/channel/v1/internal/cloud_channel_logging_decorator.cc b/google/cloud/channel/v1/internal/cloud_channel_logging_decorator.cc index 9588713bda69c..47d7c2184eca0 100644 --- a/google/cloud/channel/v1/internal/cloud_channel_logging_decorator.cc +++ b/google/cloud/channel/v1/internal/cloud_channel_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/channel/v1/service.proto #include "google/cloud/channel/v1/internal/cloud_channel_logging_decorator.h" +#include "google/cloud/channel/v1/service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace channel_v1_internal { @@ -977,3 +980,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace channel_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/channel/v1/internal/cloud_channel_logging_decorator.h b/google/cloud/channel/v1/internal/cloud_channel_logging_decorator.h index 7aa2607885ef5..be0abf0a86dad 100644 --- a/google/cloud/channel/v1/internal/cloud_channel_logging_decorator.h +++ b/google/cloud/channel/v1/internal/cloud_channel_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/channel/v1/internal/cloud_channel_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace channel_v1_internal { @@ -413,4 +416,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_LOGGING_DECORATOR_H diff --git a/google/cloud/channel/v1/internal/cloud_channel_metadata_decorator.cc b/google/cloud/channel/v1/internal/cloud_channel_metadata_decorator.cc index 2e7206be445c1..b271195dc3e5f 100644 --- a/google/cloud/channel/v1/internal/cloud_channel_metadata_decorator.cc +++ b/google/cloud/channel/v1/internal/cloud_channel_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/channel/v1/service.proto #include "google/cloud/channel/v1/internal/cloud_channel_metadata_decorator.h" +#include "google/cloud/channel/v1/service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace channel_v1_internal { @@ -716,3 +720,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace channel_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/channel/v1/internal/cloud_channel_metadata_decorator.h b/google/cloud/channel/v1/internal/cloud_channel_metadata_decorator.h index d78046e855f1e..36cae2276620c 100644 --- a/google/cloud/channel/v1/internal/cloud_channel_metadata_decorator.h +++ b/google/cloud/channel/v1/internal/cloud_channel_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/channel/v1/internal/cloud_channel_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace channel_v1_internal { @@ -419,4 +422,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_METADATA_DECORATOR_H diff --git a/google/cloud/channel/v1/internal/cloud_channel_option_defaults.cc b/google/cloud/channel/v1/internal/cloud_channel_option_defaults.cc index 3eddedba1ac0b..fbe71c25fbcf6 100644 --- a/google/cloud/channel/v1/internal/cloud_channel_option_defaults.cc +++ b/google/cloud/channel/v1/internal/cloud_channel_option_defaults.cc @@ -42,7 +42,7 @@ Options CloudChannelServiceDefaultOptions(Options options) { if (!options.has()) { options.set( channel_v1::CloudChannelServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/channel/v1/internal/cloud_channel_reports_auth_decorator.cc b/google/cloud/channel/v1/internal/cloud_channel_reports_auth_decorator.cc deleted file mode 100644 index de6c83addd0f7..0000000000000 --- a/google/cloud/channel/v1/internal/cloud_channel_reports_auth_decorator.cc +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/reports_service.proto - -#include "google/cloud/channel/v1/internal/cloud_channel_reports_auth_decorator.h" -#include -#include -#include - -namespace google { -namespace cloud { -namespace channel_v1_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -CloudChannelReportsServiceAuth::CloudChannelReportsServiceAuth( - std::shared_ptr auth, - std::shared_ptr child) - : auth_(std::move(auth)), child_(std::move(child)) {} - -future> -CloudChannelReportsServiceAuth::AsyncRunReportJob( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::cloud::channel::v1::RunReportJobRequest const& request) { - using ReturnType = StatusOr; - return auth_->AsyncConfigureContext(std::move(context)) - .then([cq, child = child_, options = std::move(options), - request](future>> - f) mutable { - auto context = f.get(); - if (!context) { - return make_ready_future(ReturnType(std::move(context).status())); - } - return child->AsyncRunReportJob(cq, *std::move(context), - std::move(options), request); - }); -} - -StatusOr -CloudChannelReportsServiceAuth::RunReportJob( - grpc::ClientContext& context, Options options, - google::cloud::channel::v1::RunReportJobRequest const& request) { - auto status = auth_->ConfigureContext(context); - if (!status.ok()) return status; - return child_->RunReportJob(context, options, request); -} - -StatusOr -CloudChannelReportsServiceAuth::FetchReportResults( - grpc::ClientContext& context, Options const& options, - google::cloud::channel::v1::FetchReportResultsRequest const& request) { - auto status = auth_->ConfigureContext(context); - if (!status.ok()) return status; - return child_->FetchReportResults(context, options, request); -} - -StatusOr -CloudChannelReportsServiceAuth::ListReports( - grpc::ClientContext& context, Options const& options, - google::cloud::channel::v1::ListReportsRequest const& request) { - auto status = auth_->ConfigureContext(context); - if (!status.ok()) return status; - return child_->ListReports(context, options, request); -} - -StatusOr -CloudChannelReportsServiceAuth::ListOperations( - grpc::ClientContext& context, Options const& options, - google::longrunning::ListOperationsRequest const& request) { - auto status = auth_->ConfigureContext(context); - if (!status.ok()) return status; - return child_->ListOperations(context, options, request); -} - -StatusOr -CloudChannelReportsServiceAuth::GetOperation( - grpc::ClientContext& context, Options const& options, - google::longrunning::GetOperationRequest const& request) { - auto status = auth_->ConfigureContext(context); - if (!status.ok()) return status; - return child_->GetOperation(context, options, request); -} - -Status CloudChannelReportsServiceAuth::DeleteOperation( - grpc::ClientContext& context, Options const& options, - google::longrunning::DeleteOperationRequest const& request) { - auto status = auth_->ConfigureContext(context); - if (!status.ok()) return status; - return child_->DeleteOperation(context, options, request); -} - -Status CloudChannelReportsServiceAuth::CancelOperation( - grpc::ClientContext& context, Options const& options, - google::longrunning::CancelOperationRequest const& request) { - auto status = auth_->ConfigureContext(context); - if (!status.ok()) return status; - return child_->CancelOperation(context, options, request); -} - -future> -CloudChannelReportsServiceAuth::AsyncGetOperation( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::longrunning::GetOperationRequest const& request) { - using ReturnType = StatusOr; - return auth_->AsyncConfigureContext(std::move(context)) - .then([cq, child = child_, options = std::move(options), - request](future>> - f) mutable { - auto context = f.get(); - if (!context) { - return make_ready_future(ReturnType(std::move(context).status())); - } - return child->AsyncGetOperation(cq, *std::move(context), - std::move(options), request); - }); -} - -future CloudChannelReportsServiceAuth::AsyncCancelOperation( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::longrunning::CancelOperationRequest const& request) { - return auth_->AsyncConfigureContext(std::move(context)) - .then([cq, child = child_, options = std::move(options), - request](future>> - f) mutable { - auto context = f.get(); - if (!context) return make_ready_future(std::move(context).status()); - return child->AsyncCancelOperation(cq, *std::move(context), - std::move(options), request); - }); -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace channel_v1_internal -} // namespace cloud -} // namespace google diff --git a/google/cloud/channel/v1/internal/cloud_channel_reports_auth_decorator.h b/google/cloud/channel/v1/internal/cloud_channel_reports_auth_decorator.h deleted file mode 100644 index e85a1f1fa6850..0000000000000 --- a/google/cloud/channel/v1/internal/cloud_channel_reports_auth_decorator.h +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/reports_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_REPORTS_AUTH_DECORATOR_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_REPORTS_AUTH_DECORATOR_H - -#include "google/cloud/channel/v1/internal/cloud_channel_reports_stub.h" -#include "google/cloud/internal/unified_grpc_credentials.h" -#include "google/cloud/version.h" -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace channel_v1_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -class CloudChannelReportsServiceAuth : public CloudChannelReportsServiceStub { - public: - ~CloudChannelReportsServiceAuth() override = default; - CloudChannelReportsServiceAuth( - std::shared_ptr auth, - std::shared_ptr child); - - future> AsyncRunReportJob( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::cloud::channel::v1::RunReportJobRequest const& request) override; - - StatusOr RunReportJob( - grpc::ClientContext& context, Options options, - google::cloud::channel::v1::RunReportJobRequest const& request) override; - - StatusOr - FetchReportResults( - grpc::ClientContext& context, Options const& options, - google::cloud::channel::v1::FetchReportResultsRequest const& request) - override; - - StatusOr ListReports( - grpc::ClientContext& context, Options const& options, - google::cloud::channel::v1::ListReportsRequest const& request) override; - - StatusOr ListOperations( - grpc::ClientContext& context, Options const& options, - google::longrunning::ListOperationsRequest const& request) override; - - StatusOr GetOperation( - grpc::ClientContext& context, Options const& options, - google::longrunning::GetOperationRequest const& request) override; - - Status DeleteOperation( - grpc::ClientContext& context, Options const& options, - google::longrunning::DeleteOperationRequest const& request) override; - - Status CancelOperation( - grpc::ClientContext& context, Options const& options, - google::longrunning::CancelOperationRequest const& request) override; - - future> AsyncGetOperation( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::longrunning::GetOperationRequest const& request) override; - - future AsyncCancelOperation( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::longrunning::CancelOperationRequest const& request) override; - - private: - std::shared_ptr auth_; - std::shared_ptr child_; -}; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace channel_v1_internal -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_REPORTS_AUTH_DECORATOR_H diff --git a/google/cloud/channel/v1/internal/cloud_channel_reports_connection_impl.cc b/google/cloud/channel/v1/internal/cloud_channel_reports_connection_impl.cc deleted file mode 100644 index cc83bc433b1bf..0000000000000 --- a/google/cloud/channel/v1/internal/cloud_channel_reports_connection_impl.cc +++ /dev/null @@ -1,314 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/reports_service.proto - -#include "google/cloud/channel/v1/internal/cloud_channel_reports_connection_impl.h" -#include "google/cloud/channel/v1/internal/cloud_channel_reports_option_defaults.h" -#include "google/cloud/background_threads.h" -#include "google/cloud/common_options.h" -#include "google/cloud/grpc_options.h" -#include "google/cloud/internal/async_long_running_operation.h" -#include "google/cloud/internal/pagination_range.h" -#include "google/cloud/internal/retry_loop.h" -#include -#include - -namespace google { -namespace cloud { -namespace channel_v1_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -std::unique_ptr retry_policy( - Options const& options) { - return options.get() - ->clone(); -} - -std::unique_ptr backoff_policy(Options const& options) { - return options - .get() - ->clone(); -} - -std::unique_ptr< - channel_v1::CloudChannelReportsServiceConnectionIdempotencyPolicy> -idempotency_policy(Options const& options) { - return options - .get() - ->clone(); -} - -std::unique_ptr polling_policy(Options const& options) { - return options - .get() - ->clone(); -} - -} // namespace - -CloudChannelReportsServiceConnectionImpl:: - CloudChannelReportsServiceConnectionImpl( - std::unique_ptr background, - std::shared_ptr - stub, - Options options) - : background_(std::move(background)), - stub_(std::move(stub)), - options_(internal::MergeOptions( - std::move(options), - CloudChannelReportsServiceConnection::options())) {} - -future> -CloudChannelReportsServiceConnectionImpl::RunReportJob( - google::cloud::channel::v1::RunReportJobRequest const& request) { - auto current = google::cloud::internal::SaveCurrentOptions(); - auto request_copy = request; - auto const idempotent = - idempotency_policy(*current)->RunReportJob(request_copy); - return google::cloud::internal::AsyncLongRunningOperation< - google::cloud::channel::v1::RunReportJobResponse>( - background_->cq(), current, std::move(request_copy), - [stub = stub_]( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::cloud::channel::v1::RunReportJobRequest const& request) { - return stub->AsyncRunReportJob(cq, std::move(context), - std::move(options), request); - }, - [stub = stub_](google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::longrunning::GetOperationRequest const& request) { - return stub->AsyncGetOperation(cq, std::move(context), - std::move(options), request); - }, - [stub = stub_]( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::longrunning::CancelOperationRequest const& request) { - return stub->AsyncCancelOperation(cq, std::move(context), - std::move(options), request); - }, - &google::cloud::internal::ExtractLongRunningResultResponse< - google::cloud::channel::v1::RunReportJobResponse>, - retry_policy(*current), backoff_policy(*current), idempotent, - polling_policy(*current), __func__); -} - -StatusOr -CloudChannelReportsServiceConnectionImpl::RunReportJob( - NoAwaitTag, - google::cloud::channel::v1::RunReportJobRequest const& request) { - auto current = google::cloud::internal::SaveCurrentOptions(); - return google::cloud::internal::RetryLoop( - retry_policy(*current), backoff_policy(*current), - idempotency_policy(*current)->RunReportJob(request), - [this](grpc::ClientContext& context, Options const& options, - google::cloud::channel::v1::RunReportJobRequest const& request) { - return stub_->RunReportJob(context, options, request); - }, - *current, request, __func__); -} - -future> -CloudChannelReportsServiceConnectionImpl::RunReportJob( - google::longrunning::Operation const& operation) { - auto current = google::cloud::internal::SaveCurrentOptions(); - if (!operation.metadata() - .Is()) { - return make_ready_future< - StatusOr>( - internal::InvalidArgumentError( - "operation does not correspond to RunReportJob", - GCP_ERROR_INFO().WithMetadata("operation", - operation.metadata().DebugString()))); - } - - return google::cloud::internal::AsyncAwaitLongRunningOperation< - google::cloud::channel::v1::RunReportJobResponse>( - background_->cq(), current, operation, - [stub = stub_](google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::longrunning::GetOperationRequest const& request) { - return stub->AsyncGetOperation(cq, std::move(context), - std::move(options), request); - }, - [stub = stub_]( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::longrunning::CancelOperationRequest const& request) { - return stub->AsyncCancelOperation(cq, std::move(context), - std::move(options), request); - }, - &google::cloud::internal::ExtractLongRunningResultResponse< - google::cloud::channel::v1::RunReportJobResponse>, - polling_policy(*current), __func__); -} - -StreamRange -CloudChannelReportsServiceConnectionImpl::FetchReportResults( - google::cloud::channel::v1::FetchReportResultsRequest request) { - request.clear_page_token(); - auto current = google::cloud::internal::SaveCurrentOptions(); - auto idempotency = idempotency_policy(*current)->FetchReportResults(request); - char const* function_name = __func__; - return google::cloud::internal::MakePaginationRange< - StreamRange>( - current, std::move(request), - [idempotency, function_name, stub = stub_, - retry = - std::shared_ptr( - retry_policy(*current)), - backoff = std::shared_ptr(backoff_policy(*current))]( - Options const& options, - google::cloud::channel::v1::FetchReportResultsRequest const& r) { - return google::cloud::internal::RetryLoop( - retry->clone(), backoff->clone(), idempotency, - [stub](grpc::ClientContext& context, Options const& options, - google::cloud::channel::v1::FetchReportResultsRequest const& - request) { - return stub->FetchReportResults(context, options, request); - }, - options, r, function_name); - }, - [](google::cloud::channel::v1::FetchReportResultsResponse r) { - std::vector result(r.rows().size()); - auto& messages = *r.mutable_rows(); - std::move(messages.begin(), messages.end(), result.begin()); - return result; - }); -} - -StreamRange -CloudChannelReportsServiceConnectionImpl::ListReports( - google::cloud::channel::v1::ListReportsRequest request) { - request.clear_page_token(); - auto current = google::cloud::internal::SaveCurrentOptions(); - auto idempotency = idempotency_policy(*current)->ListReports(request); - char const* function_name = __func__; - return google::cloud::internal::MakePaginationRange< - StreamRange>( - current, std::move(request), - [idempotency, function_name, stub = stub_, - retry = - std::shared_ptr( - retry_policy(*current)), - backoff = std::shared_ptr(backoff_policy(*current))]( - Options const& options, - google::cloud::channel::v1::ListReportsRequest const& r) { - return google::cloud::internal::RetryLoop( - retry->clone(), backoff->clone(), idempotency, - [stub]( - grpc::ClientContext& context, Options const& options, - google::cloud::channel::v1::ListReportsRequest const& request) { - return stub->ListReports(context, options, request); - }, - options, r, function_name); - }, - [](google::cloud::channel::v1::ListReportsResponse r) { - std::vector result( - r.reports().size()); - auto& messages = *r.mutable_reports(); - std::move(messages.begin(), messages.end(), result.begin()); - return result; - }); -} - -StreamRange -CloudChannelReportsServiceConnectionImpl::ListOperations( - google::longrunning::ListOperationsRequest request) { - request.clear_page_token(); - auto current = google::cloud::internal::SaveCurrentOptions(); - auto idempotency = idempotency_policy(*current)->ListOperations(request); - char const* function_name = __func__; - return google::cloud::internal::MakePaginationRange< - StreamRange>( - current, std::move(request), - [idempotency, function_name, stub = stub_, - retry = - std::shared_ptr( - retry_policy(*current)), - backoff = std::shared_ptr(backoff_policy(*current))]( - Options const& options, - google::longrunning::ListOperationsRequest const& r) { - return google::cloud::internal::RetryLoop( - retry->clone(), backoff->clone(), idempotency, - [stub](grpc::ClientContext& context, Options const& options, - google::longrunning::ListOperationsRequest const& request) { - return stub->ListOperations(context, options, request); - }, - options, r, function_name); - }, - [](google::longrunning::ListOperationsResponse r) { - std::vector result( - r.operations().size()); - auto& messages = *r.mutable_operations(); - std::move(messages.begin(), messages.end(), result.begin()); - return result; - }); -} - -StatusOr -CloudChannelReportsServiceConnectionImpl::GetOperation( - google::longrunning::GetOperationRequest const& request) { - auto current = google::cloud::internal::SaveCurrentOptions(); - return google::cloud::internal::RetryLoop( - retry_policy(*current), backoff_policy(*current), - idempotency_policy(*current)->GetOperation(request), - [this](grpc::ClientContext& context, Options const& options, - google::longrunning::GetOperationRequest const& request) { - return stub_->GetOperation(context, options, request); - }, - *current, request, __func__); -} - -Status CloudChannelReportsServiceConnectionImpl::DeleteOperation( - google::longrunning::DeleteOperationRequest const& request) { - auto current = google::cloud::internal::SaveCurrentOptions(); - return google::cloud::internal::RetryLoop( - retry_policy(*current), backoff_policy(*current), - idempotency_policy(*current)->DeleteOperation(request), - [this](grpc::ClientContext& context, Options const& options, - google::longrunning::DeleteOperationRequest const& request) { - return stub_->DeleteOperation(context, options, request); - }, - *current, request, __func__); -} - -Status CloudChannelReportsServiceConnectionImpl::CancelOperation( - google::longrunning::CancelOperationRequest const& request) { - auto current = google::cloud::internal::SaveCurrentOptions(); - return google::cloud::internal::RetryLoop( - retry_policy(*current), backoff_policy(*current), - idempotency_policy(*current)->CancelOperation(request), - [this](grpc::ClientContext& context, Options const& options, - google::longrunning::CancelOperationRequest const& request) { - return stub_->CancelOperation(context, options, request); - }, - *current, request, __func__); -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace channel_v1_internal -} // namespace cloud -} // namespace google diff --git a/google/cloud/channel/v1/internal/cloud_channel_reports_connection_impl.h b/google/cloud/channel/v1/internal/cloud_channel_reports_connection_impl.h deleted file mode 100644 index bcbb394c2a822..0000000000000 --- a/google/cloud/channel/v1/internal/cloud_channel_reports_connection_impl.h +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/reports_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_REPORTS_CONNECTION_IMPL_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_REPORTS_CONNECTION_IMPL_H - -#include "google/cloud/channel/v1/cloud_channel_reports_connection.h" -#include "google/cloud/channel/v1/cloud_channel_reports_connection_idempotency_policy.h" -#include "google/cloud/channel/v1/cloud_channel_reports_options.h" -#include "google/cloud/channel/v1/internal/cloud_channel_reports_retry_traits.h" -#include "google/cloud/channel/v1/internal/cloud_channel_reports_stub.h" -#include "google/cloud/background_threads.h" -#include "google/cloud/backoff_policy.h" -#include "google/cloud/future.h" -#include "google/cloud/options.h" -#include "google/cloud/polling_policy.h" -#include "google/cloud/status_or.h" -#include "google/cloud/stream_range.h" -#include "google/cloud/version.h" -#include -#include - -namespace google { -namespace cloud { -namespace channel_v1_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -class CloudChannelReportsServiceConnectionImpl - : public channel_v1::CloudChannelReportsServiceConnection { - public: - ~CloudChannelReportsServiceConnectionImpl() override = default; - - CloudChannelReportsServiceConnectionImpl( - std::unique_ptr background, - std::shared_ptr stub, - Options options); - - Options options() override { return options_; } - - future> - RunReportJob( - google::cloud::channel::v1::RunReportJobRequest const& request) override; - - StatusOr RunReportJob( - NoAwaitTag, - google::cloud::channel::v1::RunReportJobRequest const& request) override; - - future> - RunReportJob(google::longrunning::Operation const& operation) override; - - StreamRange FetchReportResults( - google::cloud::channel::v1::FetchReportResultsRequest request) override; - - StreamRange ListReports( - google::cloud::channel::v1::ListReportsRequest request) override; - - StreamRange ListOperations( - google::longrunning::ListOperationsRequest request) override; - - StatusOr GetOperation( - google::longrunning::GetOperationRequest const& request) override; - - Status DeleteOperation( - google::longrunning::DeleteOperationRequest const& request) override; - - Status CancelOperation( - google::longrunning::CancelOperationRequest const& request) override; - - private: - std::unique_ptr background_; - std::shared_ptr stub_; - Options options_; -}; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace channel_v1_internal -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_REPORTS_CONNECTION_IMPL_H diff --git a/google/cloud/channel/v1/internal/cloud_channel_reports_logging_decorator.cc b/google/cloud/channel/v1/internal/cloud_channel_reports_logging_decorator.cc deleted file mode 100644 index ae543652e5b16..0000000000000 --- a/google/cloud/channel/v1/internal/cloud_channel_reports_logging_decorator.cc +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/reports_service.proto - -#include "google/cloud/channel/v1/internal/cloud_channel_reports_logging_decorator.h" -#include "google/cloud/internal/log_wrapper.h" -#include "google/cloud/status_or.h" -#include -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace channel_v1_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -CloudChannelReportsServiceLogging::CloudChannelReportsServiceLogging( - std::shared_ptr child, - TracingOptions tracing_options, std::set const&) - : child_(std::move(child)), tracing_options_(std::move(tracing_options)) {} - -future> -CloudChannelReportsServiceLogging::AsyncRunReportJob( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::cloud::channel::v1::RunReportJobRequest const& request) { - return google::cloud::internal::LogWrapper( - [this](google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::cloud::channel::v1::RunReportJobRequest const& request) { - return child_->AsyncRunReportJob(cq, std::move(context), - std::move(options), request); - }, - cq, std::move(context), std::move(options), request, __func__, - tracing_options_); -} - -StatusOr -CloudChannelReportsServiceLogging::RunReportJob( - grpc::ClientContext& context, Options options, - google::cloud::channel::v1::RunReportJobRequest const& request) { - return google::cloud::internal::LogWrapper( - [this](grpc::ClientContext& context, Options const& options, - google::cloud::channel::v1::RunReportJobRequest const& request) { - return child_->RunReportJob(context, options, request); - }, - context, options, request, __func__, tracing_options_); -} - -StatusOr -CloudChannelReportsServiceLogging::FetchReportResults( - grpc::ClientContext& context, Options const& options, - google::cloud::channel::v1::FetchReportResultsRequest const& request) { - return google::cloud::internal::LogWrapper( - [this](grpc::ClientContext& context, Options const& options, - google::cloud::channel::v1::FetchReportResultsRequest const& - request) { - return child_->FetchReportResults(context, options, request); - }, - context, options, request, __func__, tracing_options_); -} - -StatusOr -CloudChannelReportsServiceLogging::ListReports( - grpc::ClientContext& context, Options const& options, - google::cloud::channel::v1::ListReportsRequest const& request) { - return google::cloud::internal::LogWrapper( - [this](grpc::ClientContext& context, Options const& options, - google::cloud::channel::v1::ListReportsRequest const& request) { - return child_->ListReports(context, options, request); - }, - context, options, request, __func__, tracing_options_); -} - -StatusOr -CloudChannelReportsServiceLogging::ListOperations( - grpc::ClientContext& context, Options const& options, - google::longrunning::ListOperationsRequest const& request) { - return google::cloud::internal::LogWrapper( - [this](grpc::ClientContext& context, Options const& options, - google::longrunning::ListOperationsRequest const& request) { - return child_->ListOperations(context, options, request); - }, - context, options, request, __func__, tracing_options_); -} - -StatusOr -CloudChannelReportsServiceLogging::GetOperation( - grpc::ClientContext& context, Options const& options, - google::longrunning::GetOperationRequest const& request) { - return google::cloud::internal::LogWrapper( - [this](grpc::ClientContext& context, Options const& options, - google::longrunning::GetOperationRequest const& request) { - return child_->GetOperation(context, options, request); - }, - context, options, request, __func__, tracing_options_); -} - -Status CloudChannelReportsServiceLogging::DeleteOperation( - grpc::ClientContext& context, Options const& options, - google::longrunning::DeleteOperationRequest const& request) { - return google::cloud::internal::LogWrapper( - [this](grpc::ClientContext& context, Options const& options, - google::longrunning::DeleteOperationRequest const& request) { - return child_->DeleteOperation(context, options, request); - }, - context, options, request, __func__, tracing_options_); -} - -Status CloudChannelReportsServiceLogging::CancelOperation( - grpc::ClientContext& context, Options const& options, - google::longrunning::CancelOperationRequest const& request) { - return google::cloud::internal::LogWrapper( - [this](grpc::ClientContext& context, Options const& options, - google::longrunning::CancelOperationRequest const& request) { - return child_->CancelOperation(context, options, request); - }, - context, options, request, __func__, tracing_options_); -} - -future> -CloudChannelReportsServiceLogging::AsyncGetOperation( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::longrunning::GetOperationRequest const& request) { - return google::cloud::internal::LogWrapper( - [this](google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::longrunning::GetOperationRequest const& request) { - return child_->AsyncGetOperation(cq, std::move(context), - std::move(options), request); - }, - cq, std::move(context), std::move(options), request, __func__, - tracing_options_); -} - -future CloudChannelReportsServiceLogging::AsyncCancelOperation( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::longrunning::CancelOperationRequest const& request) { - return google::cloud::internal::LogWrapper( - [this](google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::longrunning::CancelOperationRequest const& request) { - return child_->AsyncCancelOperation(cq, std::move(context), - std::move(options), request); - }, - cq, std::move(context), std::move(options), request, __func__, - tracing_options_); -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace channel_v1_internal -} // namespace cloud -} // namespace google diff --git a/google/cloud/channel/v1/internal/cloud_channel_reports_logging_decorator.h b/google/cloud/channel/v1/internal/cloud_channel_reports_logging_decorator.h deleted file mode 100644 index 3f684aee67146..0000000000000 --- a/google/cloud/channel/v1/internal/cloud_channel_reports_logging_decorator.h +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/reports_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_REPORTS_LOGGING_DECORATOR_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_REPORTS_LOGGING_DECORATOR_H - -#include "google/cloud/channel/v1/internal/cloud_channel_reports_stub.h" -#include "google/cloud/tracing_options.h" -#include "google/cloud/version.h" -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace channel_v1_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -class CloudChannelReportsServiceLogging - : public CloudChannelReportsServiceStub { - public: - ~CloudChannelReportsServiceLogging() override = default; - CloudChannelReportsServiceLogging( - std::shared_ptr child, - TracingOptions tracing_options, std::set const& components); - - future> AsyncRunReportJob( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::cloud::channel::v1::RunReportJobRequest const& request) override; - - StatusOr RunReportJob( - grpc::ClientContext& context, Options options, - google::cloud::channel::v1::RunReportJobRequest const& request) override; - - StatusOr - FetchReportResults( - grpc::ClientContext& context, Options const& options, - google::cloud::channel::v1::FetchReportResultsRequest const& request) - override; - - StatusOr ListReports( - grpc::ClientContext& context, Options const& options, - google::cloud::channel::v1::ListReportsRequest const& request) override; - - StatusOr ListOperations( - grpc::ClientContext& context, Options const& options, - google::longrunning::ListOperationsRequest const& request) override; - - StatusOr GetOperation( - grpc::ClientContext& context, Options const& options, - google::longrunning::GetOperationRequest const& request) override; - - Status DeleteOperation( - grpc::ClientContext& context, Options const& options, - google::longrunning::DeleteOperationRequest const& request) override; - - Status CancelOperation( - grpc::ClientContext& context, Options const& options, - google::longrunning::CancelOperationRequest const& request) override; - - future> AsyncGetOperation( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::longrunning::GetOperationRequest const& request) override; - - future AsyncCancelOperation( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::longrunning::CancelOperationRequest const& request) override; - - private: - std::shared_ptr child_; - TracingOptions tracing_options_; -}; // CloudChannelReportsServiceLogging - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace channel_v1_internal -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_REPORTS_LOGGING_DECORATOR_H diff --git a/google/cloud/channel/v1/internal/cloud_channel_reports_metadata_decorator.cc b/google/cloud/channel/v1/internal/cloud_channel_reports_metadata_decorator.cc deleted file mode 100644 index bc044f97300f5..0000000000000 --- a/google/cloud/channel/v1/internal/cloud_channel_reports_metadata_decorator.cc +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/reports_service.proto - -#include "google/cloud/channel/v1/internal/cloud_channel_reports_metadata_decorator.h" -#include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/api_client_header.h" -#include "google/cloud/internal/url_encode.h" -#include "google/cloud/status_or.h" -#include -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace channel_v1_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -CloudChannelReportsServiceMetadata::CloudChannelReportsServiceMetadata( - std::shared_ptr child, - std::multimap fixed_metadata, - std::string api_client_header) - : child_(std::move(child)), - fixed_metadata_(std::move(fixed_metadata)), - api_client_header_( - api_client_header.empty() - ? google::cloud::internal::GeneratedLibClientHeader() - : std::move(api_client_header)) {} - -future> -CloudChannelReportsServiceMetadata::AsyncRunReportJob( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::cloud::channel::v1::RunReportJobRequest const& request) { - SetMetadata(*context, *options, - absl::StrCat("name=", internal::UrlEncode(request.name()))); - return child_->AsyncRunReportJob(cq, std::move(context), std::move(options), - request); -} - -StatusOr -CloudChannelReportsServiceMetadata::RunReportJob( - grpc::ClientContext& context, Options options, - google::cloud::channel::v1::RunReportJobRequest const& request) { - SetMetadata(context, options, - absl::StrCat("name=", internal::UrlEncode(request.name()))); - return child_->RunReportJob(context, options, request); -} - -StatusOr -CloudChannelReportsServiceMetadata::FetchReportResults( - grpc::ClientContext& context, Options const& options, - google::cloud::channel::v1::FetchReportResultsRequest const& request) { - SetMetadata( - context, options, - absl::StrCat("report_job=", internal::UrlEncode(request.report_job()))); - return child_->FetchReportResults(context, options, request); -} - -StatusOr -CloudChannelReportsServiceMetadata::ListReports( - grpc::ClientContext& context, Options const& options, - google::cloud::channel::v1::ListReportsRequest const& request) { - SetMetadata(context, options, - absl::StrCat("parent=", internal::UrlEncode(request.parent()))); - return child_->ListReports(context, options, request); -} - -StatusOr -CloudChannelReportsServiceMetadata::ListOperations( - grpc::ClientContext& context, Options const& options, - google::longrunning::ListOperationsRequest const& request) { - SetMetadata(context, options, - absl::StrCat("name=", internal::UrlEncode(request.name()))); - return child_->ListOperations(context, options, request); -} - -StatusOr -CloudChannelReportsServiceMetadata::GetOperation( - grpc::ClientContext& context, Options const& options, - google::longrunning::GetOperationRequest const& request) { - SetMetadata(context, options, - absl::StrCat("name=", internal::UrlEncode(request.name()))); - return child_->GetOperation(context, options, request); -} - -Status CloudChannelReportsServiceMetadata::DeleteOperation( - grpc::ClientContext& context, Options const& options, - google::longrunning::DeleteOperationRequest const& request) { - SetMetadata(context, options, - absl::StrCat("name=", internal::UrlEncode(request.name()))); - return child_->DeleteOperation(context, options, request); -} - -Status CloudChannelReportsServiceMetadata::CancelOperation( - grpc::ClientContext& context, Options const& options, - google::longrunning::CancelOperationRequest const& request) { - SetMetadata(context, options, - absl::StrCat("name=", internal::UrlEncode(request.name()))); - return child_->CancelOperation(context, options, request); -} - -future> -CloudChannelReportsServiceMetadata::AsyncGetOperation( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::longrunning::GetOperationRequest const& request) { - SetMetadata(*context, *options, - absl::StrCat("name=", internal::UrlEncode(request.name()))); - return child_->AsyncGetOperation(cq, std::move(context), std::move(options), - request); -} - -future CloudChannelReportsServiceMetadata::AsyncCancelOperation( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::longrunning::CancelOperationRequest const& request) { - SetMetadata(*context, *options, - absl::StrCat("name=", internal::UrlEncode(request.name()))); - return child_->AsyncCancelOperation(cq, std::move(context), - std::move(options), request); -} - -void CloudChannelReportsServiceMetadata::SetMetadata( - grpc::ClientContext& context, Options const& options, - std::string const& request_params) { - context.AddMetadata("x-goog-request-params", request_params); - SetMetadata(context, options); -} - -void CloudChannelReportsServiceMetadata::SetMetadata( - grpc::ClientContext& context, Options const& options) { - google::cloud::internal::SetMetadata(context, options, fixed_metadata_, - api_client_header_); -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace channel_v1_internal -} // namespace cloud -} // namespace google diff --git a/google/cloud/channel/v1/internal/cloud_channel_reports_metadata_decorator.h b/google/cloud/channel/v1/internal/cloud_channel_reports_metadata_decorator.h deleted file mode 100644 index f5dcf7a0088e1..0000000000000 --- a/google/cloud/channel/v1/internal/cloud_channel_reports_metadata_decorator.h +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/reports_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_REPORTS_METADATA_DECORATOR_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_REPORTS_METADATA_DECORATOR_H - -#include "google/cloud/channel/v1/internal/cloud_channel_reports_stub.h" -#include "google/cloud/options.h" -#include "google/cloud/version.h" -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace channel_v1_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -class CloudChannelReportsServiceMetadata - : public CloudChannelReportsServiceStub { - public: - ~CloudChannelReportsServiceMetadata() override = default; - CloudChannelReportsServiceMetadata( - std::shared_ptr child, - std::multimap fixed_metadata, - std::string api_client_header = ""); - - future> AsyncRunReportJob( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::cloud::channel::v1::RunReportJobRequest const& request) override; - - StatusOr RunReportJob( - grpc::ClientContext& context, Options options, - google::cloud::channel::v1::RunReportJobRequest const& request) override; - - StatusOr - FetchReportResults( - grpc::ClientContext& context, Options const& options, - google::cloud::channel::v1::FetchReportResultsRequest const& request) - override; - - StatusOr ListReports( - grpc::ClientContext& context, Options const& options, - google::cloud::channel::v1::ListReportsRequest const& request) override; - - StatusOr ListOperations( - grpc::ClientContext& context, Options const& options, - google::longrunning::ListOperationsRequest const& request) override; - - StatusOr GetOperation( - grpc::ClientContext& context, Options const& options, - google::longrunning::GetOperationRequest const& request) override; - - Status DeleteOperation( - grpc::ClientContext& context, Options const& options, - google::longrunning::DeleteOperationRequest const& request) override; - - Status CancelOperation( - grpc::ClientContext& context, Options const& options, - google::longrunning::CancelOperationRequest const& request) override; - - future> AsyncGetOperation( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::longrunning::GetOperationRequest const& request) override; - - future AsyncCancelOperation( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::longrunning::CancelOperationRequest const& request) override; - - private: - void SetMetadata(grpc::ClientContext& context, Options const& options, - std::string const& request_params); - void SetMetadata(grpc::ClientContext& context, Options const& options); - - std::shared_ptr child_; - std::multimap fixed_metadata_; - std::string api_client_header_; -}; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace channel_v1_internal -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_REPORTS_METADATA_DECORATOR_H diff --git a/google/cloud/channel/v1/internal/cloud_channel_reports_option_defaults.cc b/google/cloud/channel/v1/internal/cloud_channel_reports_option_defaults.cc deleted file mode 100644 index c868bafb49bcc..0000000000000 --- a/google/cloud/channel/v1/internal/cloud_channel_reports_option_defaults.cc +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/reports_service.proto - -#include "google/cloud/channel/v1/internal/cloud_channel_reports_option_defaults.h" -#include "google/cloud/channel/v1/cloud_channel_reports_connection.h" -#include "google/cloud/channel/v1/cloud_channel_reports_options.h" -#include "google/cloud/internal/populate_common_options.h" -#include "google/cloud/internal/populate_grpc_options.h" -#include -#include - -namespace google { -namespace cloud { -namespace channel_v1_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -namespace { -auto constexpr kBackoffScaling = 2.0; -} // namespace - -Options CloudChannelReportsServiceDefaultOptions(Options options) { - options = internal::PopulateCommonOptions( - std::move(options), - "GOOGLE_CLOUD_CPP_CLOUD_CHANNEL_REPORTS_SERVICE_ENDPOINT", "", - "GOOGLE_CLOUD_CPP_CLOUD_CHANNEL_REPORTS_SERVICE_AUTHORITY", - "cloudchannel.googleapis.com"); - options = internal::PopulateGrpcOptions(std::move(options)); - if (!options.has()) { - options.set( - channel_v1::CloudChannelReportsServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) - .clone()); - } - if (!options - .has()) { - options.set( - ExponentialBackoffPolicy( - std::chrono::seconds(0), std::chrono::seconds(1), - std::chrono::minutes(5), kBackoffScaling, kBackoffScaling) - .clone()); - } - if (!options - .has()) { - options.set( - GenericPollingPolicy< - channel_v1::CloudChannelReportsServiceRetryPolicyOption::Type, - channel_v1::CloudChannelReportsServiceBackoffPolicyOption::Type>( - options - .get() - ->clone(), - ExponentialBackoffPolicy(std::chrono::seconds(1), - std::chrono::minutes(5), kBackoffScaling) - .clone()) - .clone()); - } - if (!options.has< - channel_v1:: - CloudChannelReportsServiceConnectionIdempotencyPolicyOption>()) { - options.set< - channel_v1:: - CloudChannelReportsServiceConnectionIdempotencyPolicyOption>( - channel_v1:: - MakeDefaultCloudChannelReportsServiceConnectionIdempotencyPolicy()); - } - - return options; -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace channel_v1_internal -} // namespace cloud -} // namespace google diff --git a/google/cloud/channel/v1/internal/cloud_channel_reports_option_defaults.h b/google/cloud/channel/v1/internal/cloud_channel_reports_option_defaults.h deleted file mode 100644 index 10223a941de77..0000000000000 --- a/google/cloud/channel/v1/internal/cloud_channel_reports_option_defaults.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/reports_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_REPORTS_OPTION_DEFAULTS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_REPORTS_OPTION_DEFAULTS_H - -#include "google/cloud/options.h" -#include "google/cloud/version.h" - -namespace google { -namespace cloud { -namespace channel_v1_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -Options CloudChannelReportsServiceDefaultOptions(Options options); - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace channel_v1_internal -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_REPORTS_OPTION_DEFAULTS_H diff --git a/google/cloud/channel/v1/internal/cloud_channel_reports_retry_traits.h b/google/cloud/channel/v1/internal/cloud_channel_reports_retry_traits.h deleted file mode 100644 index 50ca7f3779b6c..0000000000000 --- a/google/cloud/channel/v1/internal/cloud_channel_reports_retry_traits.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/reports_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_REPORTS_RETRY_TRAITS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_REPORTS_RETRY_TRAITS_H - -#include "google/cloud/status.h" -#include "google/cloud/version.h" - -namespace google { -namespace cloud { -namespace channel_v1_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// Define the gRPC status code semantics for retrying requests. -struct CloudChannelReportsServiceRetryTraits { - static bool IsPermanentFailure(google::cloud::Status const& status) { - return status.code() != StatusCode::kOk && - status.code() != StatusCode::kUnavailable; - } -}; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace channel_v1_internal -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_REPORTS_RETRY_TRAITS_H diff --git a/google/cloud/channel/v1/internal/cloud_channel_reports_sources.cc b/google/cloud/channel/v1/internal/cloud_channel_reports_sources.cc deleted file mode 100644 index 6a7a46f323f2b..0000000000000 --- a/google/cloud/channel/v1/internal/cloud_channel_reports_sources.cc +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/reports_service.proto - -// NOLINTBEGIN(bugprone-suspicious-include) -#include "google/cloud/channel/v1/cloud_channel_reports_client.cc" -#include "google/cloud/channel/v1/cloud_channel_reports_connection.cc" -#include "google/cloud/channel/v1/cloud_channel_reports_connection_idempotency_policy.cc" -#include "google/cloud/channel/v1/internal/cloud_channel_reports_auth_decorator.cc" -#include "google/cloud/channel/v1/internal/cloud_channel_reports_connection_impl.cc" -#include "google/cloud/channel/v1/internal/cloud_channel_reports_logging_decorator.cc" -#include "google/cloud/channel/v1/internal/cloud_channel_reports_metadata_decorator.cc" -#include "google/cloud/channel/v1/internal/cloud_channel_reports_option_defaults.cc" -#include "google/cloud/channel/v1/internal/cloud_channel_reports_stub.cc" -#include "google/cloud/channel/v1/internal/cloud_channel_reports_stub_factory.cc" -#include "google/cloud/channel/v1/internal/cloud_channel_reports_tracing_connection.cc" -#include "google/cloud/channel/v1/internal/cloud_channel_reports_tracing_stub.cc" -// NOLINTEND(bugprone-suspicious-include) diff --git a/google/cloud/channel/v1/internal/cloud_channel_reports_stub.cc b/google/cloud/channel/v1/internal/cloud_channel_reports_stub.cc deleted file mode 100644 index aa567a8d3a89f..0000000000000 --- a/google/cloud/channel/v1/internal/cloud_channel_reports_stub.cc +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/reports_service.proto - -#include "google/cloud/channel/v1/internal/cloud_channel_reports_stub.h" -#include "google/cloud/grpc_error_delegate.h" -#include "google/cloud/status_or.h" -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace channel_v1_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -CloudChannelReportsServiceStub::~CloudChannelReportsServiceStub() = default; - -future> -DefaultCloudChannelReportsServiceStub::AsyncRunReportJob( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions, - google::cloud::channel::v1::RunReportJobRequest const& request) { - return internal::MakeUnaryRpcImpl< - google::cloud::channel::v1::RunReportJobRequest, - google::longrunning::Operation>( - cq, - [this](grpc::ClientContext* context, - google::cloud::channel::v1::RunReportJobRequest const& request, - grpc::CompletionQueue* cq) { - return grpc_stub_->AsyncRunReportJob(context, request, cq); - }, - request, std::move(context)); -} - -StatusOr -DefaultCloudChannelReportsServiceStub::RunReportJob( - grpc::ClientContext& context, Options, - google::cloud::channel::v1::RunReportJobRequest const& request) { - google::longrunning::Operation response; - auto status = grpc_stub_->RunReportJob(&context, request, &response); - if (!status.ok()) { - return google::cloud::MakeStatusFromRpcError(status); - } - return response; -} - -StatusOr -DefaultCloudChannelReportsServiceStub::FetchReportResults( - grpc::ClientContext& context, Options const&, - google::cloud::channel::v1::FetchReportResultsRequest const& request) { - google::cloud::channel::v1::FetchReportResultsResponse response; - auto status = grpc_stub_->FetchReportResults(&context, request, &response); - if (!status.ok()) { - return google::cloud::MakeStatusFromRpcError(status); - } - return response; -} - -StatusOr -DefaultCloudChannelReportsServiceStub::ListReports( - grpc::ClientContext& context, Options const&, - google::cloud::channel::v1::ListReportsRequest const& request) { - google::cloud::channel::v1::ListReportsResponse response; - auto status = grpc_stub_->ListReports(&context, request, &response); - if (!status.ok()) { - return google::cloud::MakeStatusFromRpcError(status); - } - return response; -} - -StatusOr -DefaultCloudChannelReportsServiceStub::ListOperations( - grpc::ClientContext& context, Options const&, - google::longrunning::ListOperationsRequest const& request) { - google::longrunning::ListOperationsResponse response; - auto status = operations_stub_->ListOperations(&context, request, &response); - if (!status.ok()) { - return google::cloud::MakeStatusFromRpcError(status); - } - return response; -} - -StatusOr -DefaultCloudChannelReportsServiceStub::GetOperation( - grpc::ClientContext& context, Options const&, - google::longrunning::GetOperationRequest const& request) { - google::longrunning::Operation response; - auto status = operations_stub_->GetOperation(&context, request, &response); - if (!status.ok()) { - return google::cloud::MakeStatusFromRpcError(status); - } - return response; -} - -Status DefaultCloudChannelReportsServiceStub::DeleteOperation( - grpc::ClientContext& context, Options const&, - google::longrunning::DeleteOperationRequest const& request) { - google::protobuf::Empty response; - auto status = operations_stub_->DeleteOperation(&context, request, &response); - if (!status.ok()) { - return google::cloud::MakeStatusFromRpcError(status); - } - return google::cloud::Status(); -} - -Status DefaultCloudChannelReportsServiceStub::CancelOperation( - grpc::ClientContext& context, Options const&, - google::longrunning::CancelOperationRequest const& request) { - google::protobuf::Empty response; - auto status = operations_stub_->CancelOperation(&context, request, &response); - if (!status.ok()) { - return google::cloud::MakeStatusFromRpcError(status); - } - return google::cloud::Status(); -} - -future> -DefaultCloudChannelReportsServiceStub::AsyncGetOperation( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - // NOLINTNEXTLINE(performance-unnecessary-value-param) - google::cloud::internal::ImmutableOptions, - google::longrunning::GetOperationRequest const& request) { - return internal::MakeUnaryRpcImpl( - cq, - [this](grpc::ClientContext* context, - google::longrunning::GetOperationRequest const& request, - grpc::CompletionQueue* cq) { - return operations_stub_->AsyncGetOperation(context, request, cq); - }, - request, std::move(context)); -} - -future DefaultCloudChannelReportsServiceStub::AsyncCancelOperation( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - // NOLINTNEXTLINE(performance-unnecessary-value-param) - google::cloud::internal::ImmutableOptions, - google::longrunning::CancelOperationRequest const& request) { - return internal::MakeUnaryRpcImpl( - cq, - [this](grpc::ClientContext* context, - google::longrunning::CancelOperationRequest const& request, - grpc::CompletionQueue* cq) { - return operations_stub_->AsyncCancelOperation(context, request, - cq); - }, - request, std::move(context)) - .then([](future> f) { - return f.get().status(); - }); -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace channel_v1_internal -} // namespace cloud -} // namespace google diff --git a/google/cloud/channel/v1/internal/cloud_channel_reports_stub.h b/google/cloud/channel/v1/internal/cloud_channel_reports_stub.h deleted file mode 100644 index 3f9f864a9b297..0000000000000 --- a/google/cloud/channel/v1/internal/cloud_channel_reports_stub.h +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/reports_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_REPORTS_STUB_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_REPORTS_STUB_H - -#include "google/cloud/completion_queue.h" -#include "google/cloud/future.h" -#include "google/cloud/options.h" -#include "google/cloud/status_or.h" -#include "google/cloud/version.h" -#include -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace channel_v1_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -class CloudChannelReportsServiceStub { - public: - virtual ~CloudChannelReportsServiceStub() = 0; - - virtual future> AsyncRunReportJob( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::cloud::channel::v1::RunReportJobRequest const& request) = 0; - - virtual StatusOr RunReportJob( - grpc::ClientContext& context, Options options, - google::cloud::channel::v1::RunReportJobRequest const& request) = 0; - - virtual StatusOr - FetchReportResults( - grpc::ClientContext& context, Options const& options, - google::cloud::channel::v1::FetchReportResultsRequest const& request) = 0; - - virtual StatusOr ListReports( - grpc::ClientContext& context, Options const& options, - google::cloud::channel::v1::ListReportsRequest const& request) = 0; - - virtual StatusOr ListOperations( - grpc::ClientContext& context, Options const& options, - google::longrunning::ListOperationsRequest const& request) = 0; - - virtual StatusOr GetOperation( - grpc::ClientContext& context, Options const& options, - google::longrunning::GetOperationRequest const& request) = 0; - - virtual Status DeleteOperation( - grpc::ClientContext& context, Options const& options, - google::longrunning::DeleteOperationRequest const& request) = 0; - - virtual Status CancelOperation( - grpc::ClientContext& context, Options const& options, - google::longrunning::CancelOperationRequest const& request) = 0; - - virtual future> AsyncGetOperation( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::longrunning::GetOperationRequest const& request) = 0; - - virtual future AsyncCancelOperation( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::longrunning::CancelOperationRequest const& request) = 0; -}; - -class DefaultCloudChannelReportsServiceStub - : public CloudChannelReportsServiceStub { - public: - DefaultCloudChannelReportsServiceStub( - std::unique_ptr< - google::cloud::channel::v1::CloudChannelReportsService::StubInterface> - grpc_stub, - std::unique_ptr - operations_stub) - : grpc_stub_(std::move(grpc_stub)), - operations_stub_(std::move(operations_stub)) {} - - future> AsyncRunReportJob( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::cloud::channel::v1::RunReportJobRequest const& request) override; - - StatusOr RunReportJob( - grpc::ClientContext& context, Options options, - google::cloud::channel::v1::RunReportJobRequest const& request) override; - - StatusOr - FetchReportResults( - grpc::ClientContext& context, Options const& options, - google::cloud::channel::v1::FetchReportResultsRequest const& request) - override; - - StatusOr ListReports( - grpc::ClientContext& context, Options const& options, - google::cloud::channel::v1::ListReportsRequest const& request) override; - - StatusOr ListOperations( - grpc::ClientContext& context, Options const& options, - google::longrunning::ListOperationsRequest const& request) override; - - StatusOr GetOperation( - grpc::ClientContext& context, Options const& options, - google::longrunning::GetOperationRequest const& request) override; - - Status DeleteOperation( - grpc::ClientContext& context, Options const& options, - google::longrunning::DeleteOperationRequest const& request) override; - - Status CancelOperation( - grpc::ClientContext& context, Options const& options, - google::longrunning::CancelOperationRequest const& request) override; - - future> AsyncGetOperation( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::longrunning::GetOperationRequest const& request) override; - - future AsyncCancelOperation( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::longrunning::CancelOperationRequest const& request) override; - - private: - std::unique_ptr< - google::cloud::channel::v1::CloudChannelReportsService::StubInterface> - grpc_stub_; - std::unique_ptr - operations_stub_; -}; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace channel_v1_internal -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_REPORTS_STUB_H diff --git a/google/cloud/channel/v1/internal/cloud_channel_reports_stub_factory.cc b/google/cloud/channel/v1/internal/cloud_channel_reports_stub_factory.cc deleted file mode 100644 index c9d47efa3b930..0000000000000 --- a/google/cloud/channel/v1/internal/cloud_channel_reports_stub_factory.cc +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/reports_service.proto - -#include "google/cloud/channel/v1/internal/cloud_channel_reports_stub_factory.h" -#include "google/cloud/channel/v1/internal/cloud_channel_reports_auth_decorator.h" -#include "google/cloud/channel/v1/internal/cloud_channel_reports_logging_decorator.h" -#include "google/cloud/channel/v1/internal/cloud_channel_reports_metadata_decorator.h" -#include "google/cloud/channel/v1/internal/cloud_channel_reports_stub.h" -#include "google/cloud/channel/v1/internal/cloud_channel_reports_tracing_stub.h" -#include "google/cloud/common_options.h" -#include "google/cloud/grpc_options.h" -#include "google/cloud/internal/algorithm.h" -#include "google/cloud/internal/opentelemetry.h" -#include "google/cloud/log.h" -#include "google/cloud/options.h" -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace channel_v1_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -std::shared_ptr -CreateDefaultCloudChannelReportsServiceStub( - std::shared_ptr auth, - Options const& options) { - auto channel = auth->CreateChannel(options.get(), - internal::MakeChannelArguments(options)); - auto service_grpc_stub = - google::cloud::channel::v1::CloudChannelReportsService::NewStub(channel); - std::shared_ptr stub = - std::make_shared( - std::move(service_grpc_stub), - google::longrunning::Operations::NewStub(channel)); - - if (auth->RequiresConfigureContext()) { - stub = std::make_shared(std::move(auth), - std::move(stub)); - } - stub = std::make_shared( - std::move(stub), std::multimap{}); - if (internal::Contains(options.get(), "rpc")) { - GCP_LOG(INFO) << "Enabled logging for gRPC calls"; - stub = std::make_shared( - std::move(stub), options.get(), - options.get()); - } - if (internal::TracingEnabled(options)) { - stub = MakeCloudChannelReportsServiceTracingStub(std::move(stub)); - } - return stub; -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace channel_v1_internal -} // namespace cloud -} // namespace google diff --git a/google/cloud/channel/v1/internal/cloud_channel_reports_stub_factory.h b/google/cloud/channel/v1/internal/cloud_channel_reports_stub_factory.h deleted file mode 100644 index 56dce648fbd5f..0000000000000 --- a/google/cloud/channel/v1/internal/cloud_channel_reports_stub_factory.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/reports_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_REPORTS_STUB_FACTORY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_REPORTS_STUB_FACTORY_H - -#include "google/cloud/channel/v1/internal/cloud_channel_reports_stub.h" -#include "google/cloud/internal/unified_grpc_credentials.h" -#include "google/cloud/options.h" -#include "google/cloud/version.h" -#include - -namespace google { -namespace cloud { -namespace channel_v1_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -std::shared_ptr -CreateDefaultCloudChannelReportsServiceStub( - std::shared_ptr auth, - Options const& options); - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace channel_v1_internal -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_REPORTS_STUB_FACTORY_H diff --git a/google/cloud/channel/v1/internal/cloud_channel_reports_tracing_connection.cc b/google/cloud/channel/v1/internal/cloud_channel_reports_tracing_connection.cc deleted file mode 100644 index b81bc97be669e..0000000000000 --- a/google/cloud/channel/v1/internal/cloud_channel_reports_tracing_connection.cc +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/reports_service.proto - -#include "google/cloud/channel/v1/internal/cloud_channel_reports_tracing_connection.h" -#include "google/cloud/internal/opentelemetry.h" -#include "google/cloud/internal/traced_stream_range.h" -#include -#include - -namespace google { -namespace cloud { -namespace channel_v1_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - -CloudChannelReportsServiceTracingConnection:: - CloudChannelReportsServiceTracingConnection( - std::shared_ptr child) - : child_(std::move(child)) {} - -future> -CloudChannelReportsServiceTracingConnection::RunReportJob( - google::cloud::channel::v1::RunReportJobRequest const& request) { - auto span = internal::MakeSpan( - "channel_v1::CloudChannelReportsServiceConnection::RunReportJob"); - internal::OTelScope scope(span); - return internal::EndSpan(std::move(span), child_->RunReportJob(request)); -} - -StatusOr -CloudChannelReportsServiceTracingConnection::RunReportJob( - NoAwaitTag, - google::cloud::channel::v1::RunReportJobRequest const& request) { - auto span = internal::MakeSpan( - "channel_v1::CloudChannelReportsServiceConnection::RunReportJob"); - opentelemetry::trace::Scope scope(span); - return internal::EndSpan(*span, child_->RunReportJob(NoAwaitTag{}, request)); -} - -future> -CloudChannelReportsServiceTracingConnection::RunReportJob( - google::longrunning::Operation const& operation) { - auto span = internal::MakeSpan( - "channel_v1::CloudChannelReportsServiceConnection::RunReportJob"); - internal::OTelScope scope(span); - return internal::EndSpan(std::move(span), child_->RunReportJob(operation)); -} - -StreamRange -CloudChannelReportsServiceTracingConnection::FetchReportResults( - google::cloud::channel::v1::FetchReportResultsRequest request) { - auto span = internal::MakeSpan( - "channel_v1::CloudChannelReportsServiceConnection::FetchReportResults"); - internal::OTelScope scope(span); - auto sr = child_->FetchReportResults(std::move(request)); - return internal::MakeTracedStreamRange( - std::move(span), std::move(sr)); -} - -StreamRange -CloudChannelReportsServiceTracingConnection::ListReports( - google::cloud::channel::v1::ListReportsRequest request) { - auto span = internal::MakeSpan( - "channel_v1::CloudChannelReportsServiceConnection::ListReports"); - internal::OTelScope scope(span); - auto sr = child_->ListReports(std::move(request)); - return internal::MakeTracedStreamRange( - std::move(span), std::move(sr)); -} - -StreamRange -CloudChannelReportsServiceTracingConnection::ListOperations( - google::longrunning::ListOperationsRequest request) { - auto span = internal::MakeSpan( - "channel_v1::CloudChannelReportsServiceConnection::ListOperations"); - internal::OTelScope scope(span); - auto sr = child_->ListOperations(std::move(request)); - return internal::MakeTracedStreamRange( - std::move(span), std::move(sr)); -} - -StatusOr -CloudChannelReportsServiceTracingConnection::GetOperation( - google::longrunning::GetOperationRequest const& request) { - auto span = internal::MakeSpan( - "channel_v1::CloudChannelReportsServiceConnection::GetOperation"); - auto scope = opentelemetry::trace::Scope(span); - return internal::EndSpan(*span, child_->GetOperation(request)); -} - -Status CloudChannelReportsServiceTracingConnection::DeleteOperation( - google::longrunning::DeleteOperationRequest const& request) { - auto span = internal::MakeSpan( - "channel_v1::CloudChannelReportsServiceConnection::DeleteOperation"); - auto scope = opentelemetry::trace::Scope(span); - return internal::EndSpan(*span, child_->DeleteOperation(request)); -} - -Status CloudChannelReportsServiceTracingConnection::CancelOperation( - google::longrunning::CancelOperationRequest const& request) { - auto span = internal::MakeSpan( - "channel_v1::CloudChannelReportsServiceConnection::CancelOperation"); - auto scope = opentelemetry::trace::Scope(span); - return internal::EndSpan(*span, child_->CancelOperation(request)); -} - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - -std::shared_ptr -MakeCloudChannelReportsServiceTracingConnection( - std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - if (internal::TracingEnabled(conn->options())) { - conn = std::make_shared( - std::move(conn)); - } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - return conn; -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace channel_v1_internal -} // namespace cloud -} // namespace google diff --git a/google/cloud/channel/v1/internal/cloud_channel_reports_tracing_connection.h b/google/cloud/channel/v1/internal/cloud_channel_reports_tracing_connection.h deleted file mode 100644 index 1e76d8af0e401..0000000000000 --- a/google/cloud/channel/v1/internal/cloud_channel_reports_tracing_connection.h +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/reports_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_REPORTS_TRACING_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_REPORTS_TRACING_CONNECTION_H - -#include "google/cloud/channel/v1/cloud_channel_reports_connection.h" -#include "google/cloud/version.h" -#include - -namespace google { -namespace cloud { -namespace channel_v1_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - -class CloudChannelReportsServiceTracingConnection - : public channel_v1::CloudChannelReportsServiceConnection { - public: - ~CloudChannelReportsServiceTracingConnection() override = default; - - explicit CloudChannelReportsServiceTracingConnection( - std::shared_ptr child); - - Options options() override { return child_->options(); } - - future> - RunReportJob( - google::cloud::channel::v1::RunReportJobRequest const& request) override; - - StatusOr RunReportJob( - NoAwaitTag, - google::cloud::channel::v1::RunReportJobRequest const& request) override; - - future> - RunReportJob(google::longrunning::Operation const& operation) override; - - StreamRange FetchReportResults( - google::cloud::channel::v1::FetchReportResultsRequest request) override; - - StreamRange ListReports( - google::cloud::channel::v1::ListReportsRequest request) override; - - StreamRange ListOperations( - google::longrunning::ListOperationsRequest request) override; - - StatusOr GetOperation( - google::longrunning::GetOperationRequest const& request) override; - - Status DeleteOperation( - google::longrunning::DeleteOperationRequest const& request) override; - - Status CancelOperation( - google::longrunning::CancelOperationRequest const& request) override; - - private: - std::shared_ptr child_; -}; - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - -/** - * Conditionally applies the tracing decorator to the given connection. - * - * The connection is only decorated if tracing is enabled (as determined by the - * connection's options). - */ -std::shared_ptr -MakeCloudChannelReportsServiceTracingConnection( - std::shared_ptr conn); - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace channel_v1_internal -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_REPORTS_TRACING_CONNECTION_H diff --git a/google/cloud/channel/v1/internal/cloud_channel_reports_tracing_stub.cc b/google/cloud/channel/v1/internal/cloud_channel_reports_tracing_stub.cc deleted file mode 100644 index ce153912ae552..0000000000000 --- a/google/cloud/channel/v1/internal/cloud_channel_reports_tracing_stub.cc +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/reports_service.proto - -#include "google/cloud/channel/v1/internal/cloud_channel_reports_tracing_stub.h" -#include "google/cloud/internal/grpc_opentelemetry.h" -#include -#include - -namespace google { -namespace cloud { -namespace channel_v1_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - -CloudChannelReportsServiceTracingStub::CloudChannelReportsServiceTracingStub( - std::shared_ptr child) - : child_(std::move(child)), propagator_(internal::MakePropagator()) {} - -future> -CloudChannelReportsServiceTracingStub::AsyncRunReportJob( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::cloud::channel::v1::RunReportJobRequest const& request) { - auto span = internal::MakeSpanGrpc( - "google.cloud.channel.v1.CloudChannelReportsService", "RunReportJob"); - internal::OTelScope scope(span); - internal::InjectTraceContext(*context, *propagator_); - auto f = child_->AsyncRunReportJob(cq, context, std::move(options), request); - return internal::EndSpan(std::move(context), std::move(span), std::move(f)); -} - -StatusOr -CloudChannelReportsServiceTracingStub::RunReportJob( - grpc::ClientContext& context, Options options, - google::cloud::channel::v1::RunReportJobRequest const& request) { - auto span = internal::MakeSpanGrpc( - "google.cloud.channel.v1.CloudChannelReportsService", "RunReportJob"); - auto scope = opentelemetry::trace::Scope(span); - internal::InjectTraceContext(context, *propagator_); - return internal::EndSpan(context, *span, - child_->RunReportJob(context, options, request)); -} - -StatusOr -CloudChannelReportsServiceTracingStub::FetchReportResults( - grpc::ClientContext& context, Options const& options, - google::cloud::channel::v1::FetchReportResultsRequest const& request) { - auto span = internal::MakeSpanGrpc( - "google.cloud.channel.v1.CloudChannelReportsService", - "FetchReportResults"); - auto scope = opentelemetry::trace::Scope(span); - internal::InjectTraceContext(context, *propagator_); - return internal::EndSpan( - context, *span, child_->FetchReportResults(context, options, request)); -} - -StatusOr -CloudChannelReportsServiceTracingStub::ListReports( - grpc::ClientContext& context, Options const& options, - google::cloud::channel::v1::ListReportsRequest const& request) { - auto span = internal::MakeSpanGrpc( - "google.cloud.channel.v1.CloudChannelReportsService", "ListReports"); - auto scope = opentelemetry::trace::Scope(span); - internal::InjectTraceContext(context, *propagator_); - return internal::EndSpan(context, *span, - child_->ListReports(context, options, request)); -} - -StatusOr -CloudChannelReportsServiceTracingStub::ListOperations( - grpc::ClientContext& context, Options const& options, - google::longrunning::ListOperationsRequest const& request) { - auto span = internal::MakeSpanGrpc( - "google.cloud.channel.v1.CloudChannelReportsService", "ListOperations"); - auto scope = opentelemetry::trace::Scope(span); - internal::InjectTraceContext(context, *propagator_); - return internal::EndSpan(context, *span, - child_->ListOperations(context, options, request)); -} - -StatusOr -CloudChannelReportsServiceTracingStub::GetOperation( - grpc::ClientContext& context, Options const& options, - google::longrunning::GetOperationRequest const& request) { - auto span = internal::MakeSpanGrpc( - "google.cloud.channel.v1.CloudChannelReportsService", "GetOperation"); - auto scope = opentelemetry::trace::Scope(span); - internal::InjectTraceContext(context, *propagator_); - return internal::EndSpan(context, *span, - child_->GetOperation(context, options, request)); -} - -Status CloudChannelReportsServiceTracingStub::DeleteOperation( - grpc::ClientContext& context, Options const& options, - google::longrunning::DeleteOperationRequest const& request) { - auto span = internal::MakeSpanGrpc( - "google.cloud.channel.v1.CloudChannelReportsService", "DeleteOperation"); - auto scope = opentelemetry::trace::Scope(span); - internal::InjectTraceContext(context, *propagator_); - return internal::EndSpan(context, *span, - child_->DeleteOperation(context, options, request)); -} - -Status CloudChannelReportsServiceTracingStub::CancelOperation( - grpc::ClientContext& context, Options const& options, - google::longrunning::CancelOperationRequest const& request) { - auto span = internal::MakeSpanGrpc( - "google.cloud.channel.v1.CloudChannelReportsService", "CancelOperation"); - auto scope = opentelemetry::trace::Scope(span); - internal::InjectTraceContext(context, *propagator_); - return internal::EndSpan(context, *span, - child_->CancelOperation(context, options, request)); -} - -future> -CloudChannelReportsServiceTracingStub::AsyncGetOperation( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::longrunning::GetOperationRequest const& request) { - auto span = - internal::MakeSpanGrpc("google.longrunning.Operations", "GetOperation"); - internal::OTelScope scope(span); - internal::InjectTraceContext(*context, *propagator_); - auto f = child_->AsyncGetOperation(cq, context, std::move(options), request); - return internal::EndSpan(std::move(context), std::move(span), std::move(f)); -} - -future CloudChannelReportsServiceTracingStub::AsyncCancelOperation( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::longrunning::CancelOperationRequest const& request) { - auto span = internal::MakeSpanGrpc("google.longrunning.Operations", - "CancelOperation"); - internal::OTelScope scope(span); - internal::InjectTraceContext(*context, *propagator_); - auto f = - child_->AsyncCancelOperation(cq, context, std::move(options), request); - return internal::EndSpan(std::move(context), std::move(span), std::move(f)); -} - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - -std::shared_ptr -MakeCloudChannelReportsServiceTracingStub( - std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - return std::make_shared( - std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace channel_v1_internal -} // namespace cloud -} // namespace google diff --git a/google/cloud/channel/v1/internal/cloud_channel_reports_tracing_stub.h b/google/cloud/channel/v1/internal/cloud_channel_reports_tracing_stub.h deleted file mode 100644 index 14bf63f41bc3e..0000000000000 --- a/google/cloud/channel/v1/internal/cloud_channel_reports_tracing_stub.h +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/reports_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_REPORTS_TRACING_STUB_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_REPORTS_TRACING_STUB_H - -#include "google/cloud/channel/v1/internal/cloud_channel_reports_stub.h" -#include "google/cloud/internal/trace_propagator.h" -#include "google/cloud/options.h" -#include "google/cloud/version.h" -#include - -namespace google { -namespace cloud { -namespace channel_v1_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - -class CloudChannelReportsServiceTracingStub - : public CloudChannelReportsServiceStub { - public: - ~CloudChannelReportsServiceTracingStub() override = default; - - explicit CloudChannelReportsServiceTracingStub( - std::shared_ptr child); - - future> AsyncRunReportJob( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::cloud::channel::v1::RunReportJobRequest const& request) override; - - StatusOr RunReportJob( - grpc::ClientContext& context, Options options, - google::cloud::channel::v1::RunReportJobRequest const& request) override; - - StatusOr - FetchReportResults( - grpc::ClientContext& context, Options const& options, - google::cloud::channel::v1::FetchReportResultsRequest const& request) - override; - - StatusOr ListReports( - grpc::ClientContext& context, Options const& options, - google::cloud::channel::v1::ListReportsRequest const& request) override; - - StatusOr ListOperations( - grpc::ClientContext& context, Options const& options, - google::longrunning::ListOperationsRequest const& request) override; - - StatusOr GetOperation( - grpc::ClientContext& context, Options const& options, - google::longrunning::GetOperationRequest const& request) override; - - Status DeleteOperation( - grpc::ClientContext& context, Options const& options, - google::longrunning::DeleteOperationRequest const& request) override; - - Status CancelOperation( - grpc::ClientContext& context, Options const& options, - google::longrunning::CancelOperationRequest const& request) override; - - future> AsyncGetOperation( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::longrunning::GetOperationRequest const& request) override; - - future AsyncCancelOperation( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions options, - google::longrunning::CancelOperationRequest const& request) override; - - private: - std::shared_ptr child_; - std::shared_ptr - propagator_; -}; - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - -/** - * Applies the tracing decorator to the given stub. - * - * The stub is only decorated if the library has been compiled with - * OpenTelemetry. - */ -std::shared_ptr -MakeCloudChannelReportsServiceTracingStub( - std::shared_ptr stub); - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace channel_v1_internal -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_REPORTS_TRACING_STUB_H diff --git a/google/cloud/channel/v1/internal/cloud_channel_stub.cc b/google/cloud/channel/v1/internal/cloud_channel_stub.cc index 0ad92f342fa49..068c98c5e6ef8 100644 --- a/google/cloud/channel/v1/internal/cloud_channel_stub.cc +++ b/google/cloud/channel/v1/internal/cloud_channel_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/channel/v1/service.proto #include "google/cloud/channel/v1/internal/cloud_channel_stub.h" +#include "google/cloud/channel/v1/service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace channel_v1_internal { @@ -951,3 +954,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace channel_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/channel/v1/internal/cloud_channel_stub.h b/google/cloud/channel/v1/internal/cloud_channel_stub.h index 6b7bb835f04a8..72bd05332e220 100644 --- a/google/cloud/channel/v1/internal/cloud_channel_stub.h +++ b/google/cloud/channel/v1/internal/cloud_channel_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_STUB_H +#include "google/cloud/channel/v1/operations.pb.h" +#include "google/cloud/channel/v1/service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace channel_v1_internal { @@ -792,4 +795,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_STUB_H diff --git a/google/cloud/channel/v1/internal/cloud_channel_stub_factory.cc b/google/cloud/channel/v1/internal/cloud_channel_stub_factory.cc index 88a5583af633a..21efbbb0bfc14 100644 --- a/google/cloud/channel/v1/internal/cloud_channel_stub_factory.cc +++ b/google/cloud/channel/v1/internal/cloud_channel_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/channel/v1/internal/cloud_channel_metadata_decorator.h" #include "google/cloud/channel/v1/internal/cloud_channel_stub.h" #include "google/cloud/channel/v1/internal/cloud_channel_tracing_stub.h" +#include "google/cloud/channel/v1/service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace channel_v1_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace channel_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/channel/v1/internal/cloud_channel_stub_factory.h b/google/cloud/channel/v1/internal/cloud_channel_stub_factory.h index a1c45ad9cdc0e..7322b629edd76 100644 --- a/google/cloud/channel/v1/internal/cloud_channel_stub_factory.h +++ b/google/cloud/channel/v1/internal/cloud_channel_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace channel_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_STUB_FACTORY_H diff --git a/google/cloud/channel/v1/internal/cloud_channel_tracing_connection.cc b/google/cloud/channel/v1/internal/cloud_channel_tracing_connection.cc index 672ae3d06a808..1627d8fedb6fe 100644 --- a/google/cloud/channel/v1/internal/cloud_channel_tracing_connection.cc +++ b/google/cloud/channel/v1/internal/cloud_channel_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace channel_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudChannelServiceTracingConnection::CloudChannelServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -819,17 +817,13 @@ Status CloudChannelServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCloudChannelServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/channel/v1/internal/cloud_channel_tracing_connection.h b/google/cloud/channel/v1/internal/cloud_channel_tracing_connection.h index 6d26fbb179696..3b50746e24413 100644 --- a/google/cloud/channel/v1/internal/cloud_channel_tracing_connection.h +++ b/google/cloud/channel/v1/internal/cloud_channel_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace channel_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudChannelServiceTracingConnection : public channel_v1::CloudChannelServiceConnection { public: @@ -350,8 +348,6 @@ class CloudChannelServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/channel/v1/internal/cloud_channel_tracing_stub.cc b/google/cloud/channel/v1/internal/cloud_channel_tracing_stub.cc index 02c87a30d0370..ae26a6968a698 100644 --- a/google/cloud/channel/v1/internal/cloud_channel_tracing_stub.cc +++ b/google/cloud/channel/v1/internal/cloud_channel_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace channel_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudChannelServiceTracingStub::CloudChannelServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -909,18 +910,14 @@ future CloudChannelServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCloudChannelServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace channel_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/channel/v1/internal/cloud_channel_tracing_stub.h b/google/cloud/channel/v1/internal/cloud_channel_tracing_stub.h index 3842087878f33..2063682ea12f5 100644 --- a/google/cloud/channel/v1/internal/cloud_channel_tracing_stub.h +++ b/google/cloud/channel/v1/internal/cloud_channel_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace channel_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudChannelServiceTracingStub : public CloudChannelServiceStub { public: ~CloudChannelServiceTracingStub() override = default; @@ -409,8 +410,6 @@ class CloudChannelServiceTracingStub : public CloudChannelServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -425,4 +424,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_INTERNAL_CLOUD_CHANNEL_TRACING_STUB_H diff --git a/google/cloud/channel/v1/mocks/mock_cloud_channel_reports_connection.h b/google/cloud/channel/v1/mocks/mock_cloud_channel_reports_connection.h deleted file mode 100644 index 7e371da033dc3..0000000000000 --- a/google/cloud/channel/v1/mocks/mock_cloud_channel_reports_connection.h +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/reports_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_MOCKS_MOCK_CLOUD_CHANNEL_REPORTS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_MOCKS_MOCK_CLOUD_CHANNEL_REPORTS_CONNECTION_H - -#include "google/cloud/channel/v1/cloud_channel_reports_connection.h" -#include - -namespace google { -namespace cloud { -namespace channel_v1_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/** - * A class to mock `CloudChannelReportsServiceConnection`. - * - * Application developers may want to test their code with simulated responses, - * including errors, from an object of type `CloudChannelReportsServiceClient`. - * To do so, construct an object of type `CloudChannelReportsServiceClient` with - * an instance of this class. Then use the Google Test framework functions to - * program the behavior of this mock. - * - * @see [This example][bq-mock] for how to test your application with GoogleTest. - * While the example showcases types from the BigQuery library, the underlying - * principles apply for any pair of `*Client` and `*Connection`. - * - * [bq-mock]: @cloud_cpp_docs_link{bigquery,bigquery-read-mock} - */ -class MockCloudChannelReportsServiceConnection - : public channel_v1::CloudChannelReportsServiceConnection { - public: - MOCK_METHOD(Options, options, (), (override)); - - /// To disambiguate calls, use: - /// - /// @code - /// using ::testing::_; - /// using ::testing::Matcher; - /// EXPECT_CALL(*mock, - /// RunReportJob(Matcher(_))) - /// @endcode - MOCK_METHOD( - future>, - RunReportJob, - (google::cloud::channel::v1::RunReportJobRequest const& request), - (override)); - - /// To disambiguate calls, use: - /// - /// @code - /// using ::testing::_; - /// EXPECT_CALL(*mock, RunReportJob(_, _)) - /// @endcode - MOCK_METHOD(StatusOr, RunReportJob, - (NoAwaitTag, - google::cloud::channel::v1::RunReportJobRequest const& request), - (override)); - - /// To disambiguate calls, use: - /// - /// @code - /// using ::testing::_; - /// using ::testing::Matcher; - /// EXPECT_CALL(*mock, RunReportJob(Matcher(_))) - /// @endcode - MOCK_METHOD( - future>, - RunReportJob, (google::longrunning::Operation const& operation), - (override)); - - MOCK_METHOD((StreamRange), - FetchReportResults, - (google::cloud::channel::v1::FetchReportResultsRequest request), - (override)); - - MOCK_METHOD((StreamRange), ListReports, - (google::cloud::channel::v1::ListReportsRequest request), - (override)); - - MOCK_METHOD((StreamRange), ListOperations, - (google::longrunning::ListOperationsRequest request), (override)); - - MOCK_METHOD(StatusOr, GetOperation, - (google::longrunning::GetOperationRequest const& request), - (override)); - - MOCK_METHOD(Status, DeleteOperation, - (google::longrunning::DeleteOperationRequest const& request), - (override)); - - MOCK_METHOD(Status, CancelOperation, - (google::longrunning::CancelOperationRequest const& request), - (override)); -}; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace channel_v1_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHANNEL_V1_MOCKS_MOCK_CLOUD_CHANNEL_REPORTS_CONNECTION_H diff --git a/google/cloud/channel/v1/samples/cloud_channel_reports_client_samples.cc b/google/cloud/channel/v1/samples/cloud_channel_reports_client_samples.cc deleted file mode 100644 index 32ff801201d3a..0000000000000 --- a/google/cloud/channel/v1/samples/cloud_channel_reports_client_samples.cc +++ /dev/null @@ -1,240 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/channel/v1/reports_service.proto - -#include "google/cloud/channel/v1/cloud_channel_reports_client.h" -#include "google/cloud/channel/v1/cloud_channel_reports_connection_idempotency_policy.h" -#include "google/cloud/channel/v1/cloud_channel_reports_options.h" -#include "google/cloud/common_options.h" -#include "google/cloud/credentials.h" -#include "google/cloud/internal/getenv.h" -#include "google/cloud/polling_policy.h" -#include "google/cloud/testing_util/example_driver.h" -#include "google/cloud/universe_domain.h" -#include -#include -#include -#include - -// clang-format off -// main-dox-marker: channel_v1::CloudChannelReportsServiceClient -// lro-marker: true -// clang-format on -namespace { - -void SetClientEndpoint(std::vector const& argv) { - if (!argv.empty()) { - throw google::cloud::testing_util::Usage{"set-client-endpoint"}; - } - //! [set-client-endpoint] - // This configuration is common with Private Google Access: - // https://cloud.google.com/vpc/docs/private-google-access - auto options = google::cloud::Options{}.set( - "private.googleapis.com"); - auto vpc_client = google::cloud::channel_v1::CloudChannelReportsServiceClient( - google::cloud::channel_v1::MakeCloudChannelReportsServiceConnection( - options)); - //! [set-client-endpoint] -} - -void SetClientUniverseDomain(std::vector const& argv) { - if (!argv.empty()) { - throw google::cloud::testing_util::Usage{"set-client-universe-domain"}; - } - //! [set-client-universe-domain] - google::cloud::Options options; - - // AddUniverseDomainOption interrogates the UnifiedCredentialsOption, if set, - // in the provided Options for the Universe Domain associated with the - // credentials and adds it to the set of Options. - // If no UnifiedCredentialsOption is set, GoogleDefaultCredentials are used. - auto ud_options = google::cloud::AddUniverseDomainOption(std::move(options)); - - if (!ud_options.ok()) throw std::move(ud_options).status(); - auto ud_client = google::cloud::channel_v1::CloudChannelReportsServiceClient( - google::cloud::channel_v1::MakeCloudChannelReportsServiceConnection( - *ud_options)); - //! [set-client-universe-domain] -} - -//! [custom-idempotency-policy] -class CustomIdempotencyPolicy - : public google::cloud::channel_v1:: - CloudChannelReportsServiceConnectionIdempotencyPolicy { - public: - ~CustomIdempotencyPolicy() override = default; - std::unique_ptr - clone() const override { - return std::make_unique(*this); - } - // Override inherited functions to define as needed. -}; -//! [custom-idempotency-policy] - -void SetRetryPolicy(std::vector const& argv) { - if (!argv.empty()) { - throw google::cloud::testing_util::Usage{"set-client-retry-policy"}; - } - //! [set-retry-policy] - auto options = - google::cloud::Options{} - .set( - CustomIdempotencyPolicy().clone()) - .set( - google::cloud::channel_v1:: - CloudChannelReportsServiceLimitedErrorCountRetryPolicy(3) - .clone()) - .set( - google::cloud::ExponentialBackoffPolicy( - /*initial_delay=*/std::chrono::milliseconds(200), - /*maximum_delay=*/std::chrono::seconds(45), - /*scaling=*/2.0) - .clone()); - auto connection = - google::cloud::channel_v1::MakeCloudChannelReportsServiceConnection( - options); - - // c1 and c2 share the same retry policies - auto c1 = - google::cloud::channel_v1::CloudChannelReportsServiceClient(connection); - auto c2 = - google::cloud::channel_v1::CloudChannelReportsServiceClient(connection); - - // You can override any of the policies in a new client. This new client - // will share the policies from c1 (or c2) *except* for the retry policy. - auto c3 = google::cloud::channel_v1::CloudChannelReportsServiceClient( - connection, google::cloud::Options{} - .set( - google::cloud::channel_v1:: - CloudChannelReportsServiceLimitedTimeRetryPolicy( - std::chrono::minutes(5)) - .clone())); - - // You can also override the policies in a single call: - // c3.SomeRpc(..., google::cloud::Options{} - // .set( - // google::cloud::channel_v1::CloudChannelReportsServiceLimitedErrorCountRetryPolicy(10).clone())); - //! [set-retry-policy] -} - -void SetPollingPolicy(std::vector const& argv) { - if (!argv.empty()) { - throw google::cloud::testing_util::Usage{"set-client-policy-policy"}; - } - //! [set-polling-policy] - - // The polling policy controls how the client waits for long-running - // operations. `GenericPollingPolicy<>` combines existing policies. - // In this case, keep polling until the operation completes (with success - // or error) or 45 minutes, whichever happens first. Initially pause for - // 10 seconds between polling requests, increasing the pause by a factor - // of 4 until it becomes 2 minutes. - auto options = - google::cloud::Options{} - .set( - google::cloud::GenericPollingPolicy< - google::cloud::channel_v1:: - CloudChannelReportsServiceRetryPolicyOption::Type, - google::cloud::channel_v1:: - CloudChannelReportsServiceBackoffPolicyOption::Type>( - google::cloud::channel_v1:: - CloudChannelReportsServiceLimitedTimeRetryPolicy( - /*maximum_duration=*/std::chrono::minutes(45)) - .clone(), - google::cloud::ExponentialBackoffPolicy( - /*initial_delay=*/std::chrono::seconds(10), - /*maximum_delay=*/std::chrono::minutes(2), - /*scaling=*/4.0) - .clone()) - .clone()); - - auto connection = - google::cloud::channel_v1::MakeCloudChannelReportsServiceConnection( - options); - - // c1 and c2 share the same polling policies. - auto c1 = - google::cloud::channel_v1::CloudChannelReportsServiceClient(connection); - auto c2 = - google::cloud::channel_v1::CloudChannelReportsServiceClient(connection); - //! [set-polling-policy] -} - -void WithServiceAccount(std::vector const& argv) { - if (argv.size() != 1 || argv[0] == "--help") { - throw google::cloud::testing_util::Usage{"with-service-account "}; - } - //! [with-service-account] - [](std::string const& keyfile) { - auto is = std::ifstream(keyfile); - is.exceptions(std::ios::badbit); // Minimal error handling in examples - auto contents = std::string(std::istreambuf_iterator(is.rdbuf()), {}); - auto options = - google::cloud::Options{}.set( - google::cloud::MakeServiceAccountCredentials(contents)); - return google::cloud::channel_v1::CloudChannelReportsServiceClient( - google::cloud::channel_v1::MakeCloudChannelReportsServiceConnection( - options)); - } - //! [with-service-account] - (argv.at(0)); -} - -void AutoRun(std::vector const& argv) { - namespace examples = ::google::cloud::testing_util; - using ::google::cloud::internal::GetEnv; - if (!argv.empty()) throw examples::Usage{"auto"}; - examples::CheckEnvironmentVariablesAreSet( - {"GOOGLE_CLOUD_CPP_TEST_SERVICE_ACCOUNT_KEYFILE"}); - auto const keyfile = - GetEnv("GOOGLE_CLOUD_CPP_TEST_SERVICE_ACCOUNT_KEYFILE").value(); - - std::cout << "\nRunning SetClientEndpoint() example" << std::endl; - SetClientEndpoint({}); - - std::cout << "\nRunning SetRetryPolicy() example" << std::endl; - SetRetryPolicy({}); - - std::cout << "\nRunning SetPollingPolicy() example" << std::endl; - SetPollingPolicy({}); - - std::cout << "\nRunning WithServiceAccount() example" << std::endl; - WithServiceAccount({keyfile}); - - std::cout << "\nRunning SetClientUniverseDomain() example" << std::endl; - SetClientUniverseDomain({}); -} - -} // namespace - -int main(int argc, char* argv[]) { // NOLINT(bugprone-exception-escape) - google::cloud::testing_util::Example example({ - {"set-client-endpoint", SetClientEndpoint}, - {"set-retry-policy", SetRetryPolicy}, - {"set-polling-policy", SetPollingPolicy}, - {"with-service-account", WithServiceAccount}, - {"set-client-universe-domain", SetClientUniverseDomain}, - {"auto", AutoRun}, - }); - return example.Run(argc, argv); -} diff --git a/google/cloud/chronicle/BUILD.bazel b/google/cloud/chronicle/BUILD.bazel index cb61c2ee5b520..e74ae0ccf533e 100644 --- a/google/cloud/chronicle/BUILD.bazel +++ b/google/cloud/chronicle/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/chronicle/v1:chronicle_cc_grpc", + "@googleapis//google/cloud/chronicle/v1:chronicle_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/chronicle/quickstart/CMakeLists.txt b/google/cloud/chronicle/quickstart/CMakeLists.txt index 62835fae8fa36..9aba02742583a 100644 --- a/google/cloud/chronicle/quickstart/CMakeLists.txt +++ b/google/cloud/chronicle/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Chronicle API C++ client library from a larger # CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-chronicle-quickstart CXX) find_package(google_cloud_cpp_chronicle REQUIRED) diff --git a/google/cloud/chronicle/v1/data_access_control_connection.h b/google/cloud/chronicle/v1/data_access_control_connection.h index 1f8e5fceec5f2..bd79ba6a5ae6a 100644 --- a/google/cloud/chronicle/v1/data_access_control_connection.h +++ b/google/cloud/chronicle/v1/data_access_control_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_DATA_ACCESS_CONTROL_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_DATA_ACCESS_CONTROL_CONNECTION_H +#include "google/cloud/chronicle/v1/data_access_control.pb.h" #include "google/cloud/chronicle/v1/data_access_control_connection_idempotency_policy.h" #include "google/cloud/chronicle/v1/internal/data_access_control_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/chronicle/v1/data_access_control_connection_idempotency_policy.h b/google/cloud/chronicle/v1/data_access_control_connection_idempotency_policy.h index d301a6e432278..b23edf91309e4 100644 --- a/google/cloud/chronicle/v1/data_access_control_connection_idempotency_policy.h +++ b/google/cloud/chronicle/v1/data_access_control_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_DATA_ACCESS_CONTROL_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_DATA_ACCESS_CONTROL_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/chronicle/v1/data_access_control.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/chronicle/v1/entity_connection.h b/google/cloud/chronicle/v1/entity_connection.h index 60dcb4b15c634..e74f0b148449f 100644 --- a/google/cloud/chronicle/v1/entity_connection.h +++ b/google/cloud/chronicle/v1/entity_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_ENTITY_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_ENTITY_CONNECTION_H +#include "google/cloud/chronicle/v1/entity.pb.h" #include "google/cloud/chronicle/v1/entity_connection_idempotency_policy.h" #include "google/cloud/chronicle/v1/internal/entity_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/chronicle/v1/entity_connection_idempotency_policy.h b/google/cloud/chronicle/v1/entity_connection_idempotency_policy.h index 36a2e36918dee..41c9f279cc395 100644 --- a/google/cloud/chronicle/v1/entity_connection_idempotency_policy.h +++ b/google/cloud/chronicle/v1/entity_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_ENTITY_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_ENTITY_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/chronicle/v1/entity.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/chronicle/v1/instance_connection.h b/google/cloud/chronicle/v1/instance_connection.h index 1ebbffab66389..da080a9fff4a9 100644 --- a/google/cloud/chronicle/v1/instance_connection.h +++ b/google/cloud/chronicle/v1/instance_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INSTANCE_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INSTANCE_CONNECTION_H +#include "google/cloud/chronicle/v1/instance.pb.h" #include "google/cloud/chronicle/v1/instance_connection_idempotency_policy.h" #include "google/cloud/chronicle/v1/internal/instance_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/chronicle/v1/instance_connection_idempotency_policy.h b/google/cloud/chronicle/v1/instance_connection_idempotency_policy.h index 9f9d1b51b0074..ee33464c1ed63 100644 --- a/google/cloud/chronicle/v1/instance_connection_idempotency_policy.h +++ b/google/cloud/chronicle/v1/instance_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INSTANCE_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INSTANCE_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/chronicle/v1/instance.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/chronicle/v1/internal/data_access_control_auth_decorator.cc b/google/cloud/chronicle/v1/internal/data_access_control_auth_decorator.cc index 0883a28a57a98..bac3978f6ac6f 100644 --- a/google/cloud/chronicle/v1/internal/data_access_control_auth_decorator.cc +++ b/google/cloud/chronicle/v1/internal/data_access_control_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/chronicle/v1/data_access_control.proto #include "google/cloud/chronicle/v1/internal/data_access_control_auth_decorator.h" -#include +#include "google/cloud/chronicle/v1/data_access_control.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -157,3 +160,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace chronicle_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/chronicle/v1/internal/data_access_control_auth_decorator.h b/google/cloud/chronicle/v1/internal/data_access_control_auth_decorator.h index bbed015020215..0e15f07e0c326 100644 --- a/google/cloud/chronicle/v1/internal/data_access_control_auth_decorator.h +++ b/google/cloud/chronicle/v1/internal/data_access_control_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -116,4 +119,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_DATA_ACCESS_CONTROL_AUTH_DECORATOR_H diff --git a/google/cloud/chronicle/v1/internal/data_access_control_logging_decorator.cc b/google/cloud/chronicle/v1/internal/data_access_control_logging_decorator.cc index b8171aa291fe9..1ac26ac3a5ee0 100644 --- a/google/cloud/chronicle/v1/internal/data_access_control_logging_decorator.cc +++ b/google/cloud/chronicle/v1/internal/data_access_control_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/chronicle/v1/data_access_control.proto #include "google/cloud/chronicle/v1/internal/data_access_control_logging_decorator.h" +#include "google/cloud/chronicle/v1/data_access_control.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -213,3 +216,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace chronicle_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/chronicle/v1/internal/data_access_control_logging_decorator.h b/google/cloud/chronicle/v1/internal/data_access_control_logging_decorator.h index d2ae16a199faf..c49f198192778 100644 --- a/google/cloud/chronicle/v1/internal/data_access_control_logging_decorator.h +++ b/google/cloud/chronicle/v1/internal/data_access_control_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -116,4 +119,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_DATA_ACCESS_CONTROL_LOGGING_DECORATOR_H diff --git a/google/cloud/chronicle/v1/internal/data_access_control_metadata_decorator.cc b/google/cloud/chronicle/v1/internal/data_access_control_metadata_decorator.cc index f474a24eeda5a..0e8e75b40cc55 100644 --- a/google/cloud/chronicle/v1/internal/data_access_control_metadata_decorator.cc +++ b/google/cloud/chronicle/v1/internal/data_access_control_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/chronicle/v1/data_access_control.proto #include "google/cloud/chronicle/v1/internal/data_access_control_metadata_decorator.h" +#include "google/cloud/chronicle/v1/data_access_control.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -187,3 +191,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace chronicle_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/chronicle/v1/internal/data_access_control_metadata_decorator.h b/google/cloud/chronicle/v1/internal/data_access_control_metadata_decorator.h index c82e095c51ef2..34c1d175f538b 100644 --- a/google/cloud/chronicle/v1/internal/data_access_control_metadata_decorator.h +++ b/google/cloud/chronicle/v1/internal/data_access_control_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -122,4 +125,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_DATA_ACCESS_CONTROL_METADATA_DECORATOR_H diff --git a/google/cloud/chronicle/v1/internal/data_access_control_option_defaults.cc b/google/cloud/chronicle/v1/internal/data_access_control_option_defaults.cc index a3b6534c5e28d..bdbe430ac0839 100644 --- a/google/cloud/chronicle/v1/internal/data_access_control_option_defaults.cc +++ b/google/cloud/chronicle/v1/internal/data_access_control_option_defaults.cc @@ -43,7 +43,7 @@ Options DataAccessControlServiceDefaultOptions(Options options) { if (!options.has()) { options.set( chronicle_v1::DataAccessControlServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/chronicle/v1/internal/data_access_control_stub.cc b/google/cloud/chronicle/v1/internal/data_access_control_stub.cc index b9bbb92ae2bd7..8728ac743c8e0 100644 --- a/google/cloud/chronicle/v1/internal/data_access_control_stub.cc +++ b/google/cloud/chronicle/v1/internal/data_access_control_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/chronicle/v1/data_access_control.proto #include "google/cloud/chronicle/v1/internal/data_access_control_stub.h" +#include "google/cloud/chronicle/v1/data_access_control.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -198,3 +201,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace chronicle_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/chronicle/v1/internal/data_access_control_stub.h b/google/cloud/chronicle/v1/internal/data_access_control_stub.h index c712cc8bef942..95527ea25d850 100644 --- a/google/cloud/chronicle/v1/internal/data_access_control_stub.h +++ b/google/cloud/chronicle/v1/internal/data_access_control_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_DATA_ACCESS_CONTROL_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_DATA_ACCESS_CONTROL_STUB_H +#include "google/cloud/chronicle/v1/data_access_control.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -204,4 +207,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_DATA_ACCESS_CONTROL_STUB_H diff --git a/google/cloud/chronicle/v1/internal/data_access_control_stub_factory.cc b/google/cloud/chronicle/v1/internal/data_access_control_stub_factory.cc index 88767096de9f4..0b19371ae4776 100644 --- a/google/cloud/chronicle/v1/internal/data_access_control_stub_factory.cc +++ b/google/cloud/chronicle/v1/internal/data_access_control_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/chronicle/v1/data_access_control.proto #include "google/cloud/chronicle/v1/internal/data_access_control_stub_factory.h" +#include "google/cloud/chronicle/v1/data_access_control.grpc.pb.h" #include "google/cloud/chronicle/v1/internal/data_access_control_auth_decorator.h" #include "google/cloud/chronicle/v1/internal/data_access_control_logging_decorator.h" #include "google/cloud/chronicle/v1/internal/data_access_control_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -74,3 +77,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace chronicle_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/chronicle/v1/internal/data_access_control_stub_factory.h b/google/cloud/chronicle/v1/internal/data_access_control_stub_factory.h index 15e79df9a32f6..e42ba55a2aa6c 100644 --- a/google/cloud/chronicle/v1/internal/data_access_control_stub_factory.h +++ b/google/cloud/chronicle/v1/internal/data_access_control_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_DATA_ACCESS_CONTROL_STUB_FACTORY_H diff --git a/google/cloud/chronicle/v1/internal/data_access_control_tracing_connection.cc b/google/cloud/chronicle/v1/internal/data_access_control_tracing_connection.cc index 01acaa41bdb5c..6e3880499aafd 100644 --- a/google/cloud/chronicle/v1/internal/data_access_control_tracing_connection.cc +++ b/google/cloud/chronicle/v1/internal/data_access_control_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace chronicle_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DataAccessControlServiceTracingConnection:: DataAccessControlServiceTracingConnection( std::shared_ptr child) @@ -170,17 +168,13 @@ Status DataAccessControlServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDataAccessControlServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/chronicle/v1/internal/data_access_control_tracing_connection.h b/google/cloud/chronicle/v1/internal/data_access_control_tracing_connection.h index 6e0eb2b21f97e..664a0ccc56d03 100644 --- a/google/cloud/chronicle/v1/internal/data_access_control_tracing_connection.h +++ b/google/cloud/chronicle/v1/internal/data_access_control_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace chronicle_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DataAccessControlServiceTracingConnection : public chronicle_v1::DataAccessControlServiceConnection { public: @@ -96,8 +94,6 @@ class DataAccessControlServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/chronicle/v1/internal/data_access_control_tracing_stub.cc b/google/cloud/chronicle/v1/internal/data_access_control_tracing_stub.cc index 53c62ace43d35..408f1d56af9ff 100644 --- a/google/cloud/chronicle/v1/internal/data_access_control_tracing_stub.cc +++ b/google/cloud/chronicle/v1/internal/data_access_control_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DataAccessControlServiceTracingStub::DataAccessControlServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -206,19 +207,15 @@ Status DataAccessControlServiceTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDataAccessControlServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace chronicle_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/chronicle/v1/internal/data_access_control_tracing_stub.h b/google/cloud/chronicle/v1/internal/data_access_control_tracing_stub.h index 522314e6a8301..db5f6520a2f78 100644 --- a/google/cloud/chronicle/v1/internal/data_access_control_tracing_stub.h +++ b/google/cloud/chronicle/v1/internal/data_access_control_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DataAccessControlServiceTracingStub : public DataAccessControlServiceStub { public: @@ -114,8 +115,6 @@ class DataAccessControlServiceTracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -131,4 +130,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_DATA_ACCESS_CONTROL_TRACING_STUB_H diff --git a/google/cloud/chronicle/v1/internal/entity_auth_decorator.cc b/google/cloud/chronicle/v1/internal/entity_auth_decorator.cc index cbb71885cb326..e2b91d5fa2e6f 100644 --- a/google/cloud/chronicle/v1/internal/entity_auth_decorator.cc +++ b/google/cloud/chronicle/v1/internal/entity_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/chronicle/v1/entity.proto #include "google/cloud/chronicle/v1/internal/entity_auth_decorator.h" -#include +#include "google/cloud/chronicle/v1/entity.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -112,3 +115,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace chronicle_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/chronicle/v1/internal/entity_auth_decorator.h b/google/cloud/chronicle/v1/internal/entity_auth_decorator.h index 82f2770584b1c..abada2a8b909a 100644 --- a/google/cloud/chronicle/v1/internal/entity_auth_decorator.h +++ b/google/cloud/chronicle/v1/internal/entity_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -89,4 +92,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_ENTITY_AUTH_DECORATOR_H diff --git a/google/cloud/chronicle/v1/internal/entity_logging_decorator.cc b/google/cloud/chronicle/v1/internal/entity_logging_decorator.cc index a6d1eb0439248..9e0dfcf85d675 100644 --- a/google/cloud/chronicle/v1/internal/entity_logging_decorator.cc +++ b/google/cloud/chronicle/v1/internal/entity_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/chronicle/v1/entity.proto #include "google/cloud/chronicle/v1/internal/entity_logging_decorator.h" +#include "google/cloud/chronicle/v1/entity.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -147,3 +150,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace chronicle_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/chronicle/v1/internal/entity_logging_decorator.h b/google/cloud/chronicle/v1/internal/entity_logging_decorator.h index 75eb817c65b76..6164aa5d5a3fd 100644 --- a/google/cloud/chronicle/v1/internal/entity_logging_decorator.h +++ b/google/cloud/chronicle/v1/internal/entity_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -89,4 +92,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_ENTITY_LOGGING_DECORATOR_H diff --git a/google/cloud/chronicle/v1/internal/entity_metadata_decorator.cc b/google/cloud/chronicle/v1/internal/entity_metadata_decorator.cc index 1a2e50788c3b9..74746658ea652 100644 --- a/google/cloud/chronicle/v1/internal/entity_metadata_decorator.cc +++ b/google/cloud/chronicle/v1/internal/entity_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/chronicle/v1/entity.proto #include "google/cloud/chronicle/v1/internal/entity_metadata_decorator.h" +#include "google/cloud/chronicle/v1/entity.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -139,3 +143,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace chronicle_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/chronicle/v1/internal/entity_metadata_decorator.h b/google/cloud/chronicle/v1/internal/entity_metadata_decorator.h index 40de837462046..dfb1fb438f507 100644 --- a/google/cloud/chronicle/v1/internal/entity_metadata_decorator.h +++ b/google/cloud/chronicle/v1/internal/entity_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -94,4 +97,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_ENTITY_METADATA_DECORATOR_H diff --git a/google/cloud/chronicle/v1/internal/entity_option_defaults.cc b/google/cloud/chronicle/v1/internal/entity_option_defaults.cc index bfe30047c2e23..b1d3b77850360 100644 --- a/google/cloud/chronicle/v1/internal/entity_option_defaults.cc +++ b/google/cloud/chronicle/v1/internal/entity_option_defaults.cc @@ -41,7 +41,7 @@ Options EntityServiceDefaultOptions(Options options) { if (!options.has()) { options.set( chronicle_v1::EntityServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/chronicle/v1/internal/entity_stub.cc b/google/cloud/chronicle/v1/internal/entity_stub.cc index cd7d6190cfe11..f1c881b59776c 100644 --- a/google/cloud/chronicle/v1/internal/entity_stub.cc +++ b/google/cloud/chronicle/v1/internal/entity_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/chronicle/v1/entity.proto #include "google/cloud/chronicle/v1/internal/entity_stub.h" +#include "google/cloud/chronicle/v1/entity.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -138,3 +141,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace chronicle_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/chronicle/v1/internal/entity_stub.h b/google/cloud/chronicle/v1/internal/entity_stub.h index 1a404d8cea01f..5b91769605bda 100644 --- a/google/cloud/chronicle/v1/internal/entity_stub.h +++ b/google/cloud/chronicle/v1/internal/entity_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_ENTITY_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_ENTITY_STUB_H +#include "google/cloud/chronicle/v1/entity.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -138,4 +141,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_ENTITY_STUB_H diff --git a/google/cloud/chronicle/v1/internal/entity_stub_factory.cc b/google/cloud/chronicle/v1/internal/entity_stub_factory.cc index 1eb8e5bc733ed..1a7dad1522cab 100644 --- a/google/cloud/chronicle/v1/internal/entity_stub_factory.cc +++ b/google/cloud/chronicle/v1/internal/entity_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/chronicle/v1/entity.proto #include "google/cloud/chronicle/v1/internal/entity_stub_factory.h" +#include "google/cloud/chronicle/v1/entity.grpc.pb.h" #include "google/cloud/chronicle/v1/internal/entity_auth_decorator.h" #include "google/cloud/chronicle/v1/internal/entity_logging_decorator.h" #include "google/cloud/chronicle/v1/internal/entity_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace chronicle_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/chronicle/v1/internal/entity_stub_factory.h b/google/cloud/chronicle/v1/internal/entity_stub_factory.h index d0b59753d29c0..69591fb81bff8 100644 --- a/google/cloud/chronicle/v1/internal/entity_stub_factory.h +++ b/google/cloud/chronicle/v1/internal/entity_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_ENTITY_STUB_FACTORY_H diff --git a/google/cloud/chronicle/v1/internal/entity_tracing_connection.cc b/google/cloud/chronicle/v1/internal/entity_tracing_connection.cc index 2c5ab9df0177c..22f71bcea1295 100644 --- a/google/cloud/chronicle/v1/internal/entity_tracing_connection.cc +++ b/google/cloud/chronicle/v1/internal/entity_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace chronicle_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - EntityServiceTracingConnection::EntityServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -115,16 +113,12 @@ Status EntityServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeEntityServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/chronicle/v1/internal/entity_tracing_connection.h b/google/cloud/chronicle/v1/internal/entity_tracing_connection.h index 47cc97ae44925..cc4ca4e810be3 100644 --- a/google/cloud/chronicle/v1/internal/entity_tracing_connection.h +++ b/google/cloud/chronicle/v1/internal/entity_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace chronicle_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class EntityServiceTracingConnection : public chronicle_v1::EntityServiceConnection { public: @@ -75,8 +73,6 @@ class EntityServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/chronicle/v1/internal/entity_tracing_stub.cc b/google/cloud/chronicle/v1/internal/entity_tracing_stub.cc index adf91a5bba8d2..feaea0664bc90 100644 --- a/google/cloud/chronicle/v1/internal/entity_tracing_stub.cc +++ b/google/cloud/chronicle/v1/internal/entity_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - EntityServiceTracingStub::EntityServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -136,18 +137,14 @@ Status EntityServiceTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeEntityServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace chronicle_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/chronicle/v1/internal/entity_tracing_stub.h b/google/cloud/chronicle/v1/internal/entity_tracing_stub.h index 2aba006cc1652..a71ce99927c71 100644 --- a/google/cloud/chronicle/v1/internal/entity_tracing_stub.h +++ b/google/cloud/chronicle/v1/internal/entity_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class EntityServiceTracingStub : public EntityServiceStub { public: ~EntityServiceTracingStub() override = default; @@ -85,8 +86,6 @@ class EntityServiceTracingStub : public EntityServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -101,4 +100,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_ENTITY_TRACING_STUB_H diff --git a/google/cloud/chronicle/v1/internal/instance_auth_decorator.cc b/google/cloud/chronicle/v1/internal/instance_auth_decorator.cc index 5539c5be18f62..89c6e234701a9 100644 --- a/google/cloud/chronicle/v1/internal/instance_auth_decorator.cc +++ b/google/cloud/chronicle/v1/internal/instance_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/chronicle/v1/instance.proto #include "google/cloud/chronicle/v1/internal/instance_auth_decorator.h" -#include +#include "google/cloud/chronicle/v1/instance.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -77,3 +80,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace chronicle_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/chronicle/v1/internal/instance_auth_decorator.h b/google/cloud/chronicle/v1/internal/instance_auth_decorator.h index 75050feb4ef84..23c30d4b181ac 100644 --- a/google/cloud/chronicle/v1/internal/instance_auth_decorator.h +++ b/google/cloud/chronicle/v1/internal/instance_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -68,4 +71,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_INSTANCE_AUTH_DECORATOR_H diff --git a/google/cloud/chronicle/v1/internal/instance_logging_decorator.cc b/google/cloud/chronicle/v1/internal/instance_logging_decorator.cc index 3e25154707887..6b6ffa3b7163c 100644 --- a/google/cloud/chronicle/v1/internal/instance_logging_decorator.cc +++ b/google/cloud/chronicle/v1/internal/instance_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/chronicle/v1/instance.proto #include "google/cloud/chronicle/v1/internal/instance_logging_decorator.h" +#include "google/cloud/chronicle/v1/instance.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -96,3 +99,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace chronicle_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/chronicle/v1/internal/instance_logging_decorator.h b/google/cloud/chronicle/v1/internal/instance_logging_decorator.h index 3544308629197..bada53eeeb1ed 100644 --- a/google/cloud/chronicle/v1/internal/instance_logging_decorator.h +++ b/google/cloud/chronicle/v1/internal/instance_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -68,4 +71,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_INSTANCE_LOGGING_DECORATOR_H diff --git a/google/cloud/chronicle/v1/internal/instance_metadata_decorator.cc b/google/cloud/chronicle/v1/internal/instance_metadata_decorator.cc index 7c123955e7f0b..1263990a96f72 100644 --- a/google/cloud/chronicle/v1/internal/instance_metadata_decorator.cc +++ b/google/cloud/chronicle/v1/internal/instance_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/chronicle/v1/instance.proto #include "google/cloud/chronicle/v1/internal/instance_metadata_decorator.h" +#include "google/cloud/chronicle/v1/instance.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -103,3 +107,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace chronicle_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/chronicle/v1/internal/instance_metadata_decorator.h b/google/cloud/chronicle/v1/internal/instance_metadata_decorator.h index e1ed3e859b907..576800a54bd87 100644 --- a/google/cloud/chronicle/v1/internal/instance_metadata_decorator.h +++ b/google/cloud/chronicle/v1/internal/instance_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -74,4 +77,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_INSTANCE_METADATA_DECORATOR_H diff --git a/google/cloud/chronicle/v1/internal/instance_option_defaults.cc b/google/cloud/chronicle/v1/internal/instance_option_defaults.cc index 6aa886ee6c0fc..7e71e8daa0e7c 100644 --- a/google/cloud/chronicle/v1/internal/instance_option_defaults.cc +++ b/google/cloud/chronicle/v1/internal/instance_option_defaults.cc @@ -42,7 +42,7 @@ Options InstanceServiceDefaultOptions(Options options) { if (!options.has()) { options.set( chronicle_v1::InstanceServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/chronicle/v1/internal/instance_stub.cc b/google/cloud/chronicle/v1/internal/instance_stub.cc index 2f40ff4484566..ee3cac403090b 100644 --- a/google/cloud/chronicle/v1/internal/instance_stub.cc +++ b/google/cloud/chronicle/v1/internal/instance_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/chronicle/v1/instance.proto #include "google/cloud/chronicle/v1/internal/instance_stub.h" +#include "google/cloud/chronicle/v1/instance.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -92,3 +95,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace chronicle_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/chronicle/v1/internal/instance_stub.h b/google/cloud/chronicle/v1/internal/instance_stub.h index e434675f51dab..68b8bde4dd8bf 100644 --- a/google/cloud/chronicle/v1/internal/instance_stub.h +++ b/google/cloud/chronicle/v1/internal/instance_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_INSTANCE_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_INSTANCE_STUB_H +#include "google/cloud/chronicle/v1/instance.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -100,4 +103,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_INSTANCE_STUB_H diff --git a/google/cloud/chronicle/v1/internal/instance_stub_factory.cc b/google/cloud/chronicle/v1/internal/instance_stub_factory.cc index f4398575b0ff4..92ca8e0dde6fb 100644 --- a/google/cloud/chronicle/v1/internal/instance_stub_factory.cc +++ b/google/cloud/chronicle/v1/internal/instance_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/chronicle/v1/instance.proto #include "google/cloud/chronicle/v1/internal/instance_stub_factory.h" +#include "google/cloud/chronicle/v1/instance.grpc.pb.h" #include "google/cloud/chronicle/v1/internal/instance_auth_decorator.h" #include "google/cloud/chronicle/v1/internal/instance_logging_decorator.h" #include "google/cloud/chronicle/v1/internal/instance_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace chronicle_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/chronicle/v1/internal/instance_stub_factory.h b/google/cloud/chronicle/v1/internal/instance_stub_factory.h index 649b57ab36c78..d3a8cd97753fe 100644 --- a/google/cloud/chronicle/v1/internal/instance_stub_factory.h +++ b/google/cloud/chronicle/v1/internal/instance_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_INSTANCE_STUB_FACTORY_H diff --git a/google/cloud/chronicle/v1/internal/instance_tracing_connection.cc b/google/cloud/chronicle/v1/internal/instance_tracing_connection.cc index a1c834c5919d8..b8f12aa568096 100644 --- a/google/cloud/chronicle/v1/internal/instance_tracing_connection.cc +++ b/google/cloud/chronicle/v1/internal/instance_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace chronicle_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - InstanceServiceTracingConnection::InstanceServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -78,16 +76,12 @@ Status InstanceServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeInstanceServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/chronicle/v1/internal/instance_tracing_connection.h b/google/cloud/chronicle/v1/internal/instance_tracing_connection.h index 0337e5b5c4585..51827ff014df9 100644 --- a/google/cloud/chronicle/v1/internal/instance_tracing_connection.h +++ b/google/cloud/chronicle/v1/internal/instance_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace chronicle_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class InstanceServiceTracingConnection : public chronicle_v1::InstanceServiceConnection { public: @@ -59,8 +57,6 @@ class InstanceServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/chronicle/v1/internal/instance_tracing_stub.cc b/google/cloud/chronicle/v1/internal/instance_tracing_stub.cc index 3bc224e248793..6b46144500027 100644 --- a/google/cloud/chronicle/v1/internal/instance_tracing_stub.cc +++ b/google/cloud/chronicle/v1/internal/instance_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - InstanceServiceTracingStub::InstanceServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -90,18 +91,14 @@ Status InstanceServiceTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeInstanceServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace chronicle_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/chronicle/v1/internal/instance_tracing_stub.h b/google/cloud/chronicle/v1/internal/instance_tracing_stub.h index 106a8ec4e342e..27d3c0ba72350 100644 --- a/google/cloud/chronicle/v1/internal/instance_tracing_stub.h +++ b/google/cloud/chronicle/v1/internal/instance_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class InstanceServiceTracingStub : public InstanceServiceStub { public: ~InstanceServiceTracingStub() override = default; @@ -65,8 +66,6 @@ class InstanceServiceTracingStub : public InstanceServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -81,4 +80,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_INSTANCE_TRACING_STUB_H diff --git a/google/cloud/chronicle/v1/internal/reference_list_auth_decorator.cc b/google/cloud/chronicle/v1/internal/reference_list_auth_decorator.cc index 0b846f6b538bd..314e7cc127856 100644 --- a/google/cloud/chronicle/v1/internal/reference_list_auth_decorator.cc +++ b/google/cloud/chronicle/v1/internal/reference_list_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/chronicle/v1/reference_list.proto #include "google/cloud/chronicle/v1/internal/reference_list_auth_decorator.h" -#include +#include "google/cloud/chronicle/v1/reference_list.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -104,3 +107,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace chronicle_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/chronicle/v1/internal/reference_list_auth_decorator.h b/google/cloud/chronicle/v1/internal/reference_list_auth_decorator.h index 75f5cfbdc1821..9e38614873d1b 100644 --- a/google/cloud/chronicle/v1/internal/reference_list_auth_decorator.h +++ b/google/cloud/chronicle/v1/internal/reference_list_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -85,4 +88,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_REFERENCE_LIST_AUTH_DECORATOR_H diff --git a/google/cloud/chronicle/v1/internal/reference_list_logging_decorator.cc b/google/cloud/chronicle/v1/internal/reference_list_logging_decorator.cc index abe604a50514a..1fb8101e8b41b 100644 --- a/google/cloud/chronicle/v1/internal/reference_list_logging_decorator.cc +++ b/google/cloud/chronicle/v1/internal/reference_list_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/chronicle/v1/reference_list.proto #include "google/cloud/chronicle/v1/internal/reference_list_logging_decorator.h" +#include "google/cloud/chronicle/v1/reference_list.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -137,3 +140,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace chronicle_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/chronicle/v1/internal/reference_list_logging_decorator.h b/google/cloud/chronicle/v1/internal/reference_list_logging_decorator.h index bbd2c197f3aa1..72efdecae6fe9 100644 --- a/google/cloud/chronicle/v1/internal/reference_list_logging_decorator.h +++ b/google/cloud/chronicle/v1/internal/reference_list_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -85,4 +88,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_REFERENCE_LIST_LOGGING_DECORATOR_H diff --git a/google/cloud/chronicle/v1/internal/reference_list_metadata_decorator.cc b/google/cloud/chronicle/v1/internal/reference_list_metadata_decorator.cc index e9c53e44abb33..a5cb76a1d4e41 100644 --- a/google/cloud/chronicle/v1/internal/reference_list_metadata_decorator.cc +++ b/google/cloud/chronicle/v1/internal/reference_list_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/chronicle/v1/reference_list.proto #include "google/cloud/chronicle/v1/internal/reference_list_metadata_decorator.h" +#include "google/cloud/chronicle/v1/reference_list.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -133,3 +137,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace chronicle_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/chronicle/v1/internal/reference_list_metadata_decorator.h b/google/cloud/chronicle/v1/internal/reference_list_metadata_decorator.h index 91febd2f340eb..edc9a3cb6ec2f 100644 --- a/google/cloud/chronicle/v1/internal/reference_list_metadata_decorator.h +++ b/google/cloud/chronicle/v1/internal/reference_list_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -91,4 +94,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_REFERENCE_LIST_METADATA_DECORATOR_H diff --git a/google/cloud/chronicle/v1/internal/reference_list_option_defaults.cc b/google/cloud/chronicle/v1/internal/reference_list_option_defaults.cc index 423b0501e90c2..fb3d0e4f0d619 100644 --- a/google/cloud/chronicle/v1/internal/reference_list_option_defaults.cc +++ b/google/cloud/chronicle/v1/internal/reference_list_option_defaults.cc @@ -42,7 +42,7 @@ Options ReferenceListServiceDefaultOptions(Options options) { if (!options.has()) { options.set( chronicle_v1::ReferenceListServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/chronicle/v1/internal/reference_list_stub.cc b/google/cloud/chronicle/v1/internal/reference_list_stub.cc index 4a2e266bd3bdd..907675b05c8de 100644 --- a/google/cloud/chronicle/v1/internal/reference_list_stub.cc +++ b/google/cloud/chronicle/v1/internal/reference_list_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/chronicle/v1/reference_list.proto #include "google/cloud/chronicle/v1/internal/reference_list_stub.h" +#include "google/cloud/chronicle/v1/reference_list.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -128,3 +131,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace chronicle_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/chronicle/v1/internal/reference_list_stub.h b/google/cloud/chronicle/v1/internal/reference_list_stub.h index 2497249414676..a8b63fbcae893 100644 --- a/google/cloud/chronicle/v1/internal/reference_list_stub.h +++ b/google/cloud/chronicle/v1/internal/reference_list_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_REFERENCE_LIST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_REFERENCE_LIST_STUB_H +#include "google/cloud/chronicle/v1/reference_list.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -137,4 +140,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_REFERENCE_LIST_STUB_H diff --git a/google/cloud/chronicle/v1/internal/reference_list_stub_factory.cc b/google/cloud/chronicle/v1/internal/reference_list_stub_factory.cc index 52e5210f62b04..93035c170781b 100644 --- a/google/cloud/chronicle/v1/internal/reference_list_stub_factory.cc +++ b/google/cloud/chronicle/v1/internal/reference_list_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/chronicle/v1/internal/reference_list_metadata_decorator.h" #include "google/cloud/chronicle/v1/internal/reference_list_stub.h" #include "google/cloud/chronicle/v1/internal/reference_list_tracing_stub.h" +#include "google/cloud/chronicle/v1/reference_list.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace chronicle_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/chronicle/v1/internal/reference_list_stub_factory.h b/google/cloud/chronicle/v1/internal/reference_list_stub_factory.h index d23b3f967a991..8a72abec0f3d4 100644 --- a/google/cloud/chronicle/v1/internal/reference_list_stub_factory.h +++ b/google/cloud/chronicle/v1/internal/reference_list_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_REFERENCE_LIST_STUB_FACTORY_H diff --git a/google/cloud/chronicle/v1/internal/reference_list_tracing_connection.cc b/google/cloud/chronicle/v1/internal/reference_list_tracing_connection.cc index b13725bf0eb8f..3959b926b0ae4 100644 --- a/google/cloud/chronicle/v1/internal/reference_list_tracing_connection.cc +++ b/google/cloud/chronicle/v1/internal/reference_list_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace chronicle_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ReferenceListServiceTracingConnection::ReferenceListServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -108,17 +106,13 @@ Status ReferenceListServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeReferenceListServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/chronicle/v1/internal/reference_list_tracing_connection.h b/google/cloud/chronicle/v1/internal/reference_list_tracing_connection.h index caa10fec97bc4..b973808cb3902 100644 --- a/google/cloud/chronicle/v1/internal/reference_list_tracing_connection.h +++ b/google/cloud/chronicle/v1/internal/reference_list_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace chronicle_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ReferenceListServiceTracingConnection : public chronicle_v1::ReferenceListServiceConnection { public: @@ -71,8 +69,6 @@ class ReferenceListServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/chronicle/v1/internal/reference_list_tracing_stub.cc b/google/cloud/chronicle/v1/internal/reference_list_tracing_stub.cc index 0d42dfc86bbae..f6910cc114f6e 100644 --- a/google/cloud/chronicle/v1/internal/reference_list_tracing_stub.cc +++ b/google/cloud/chronicle/v1/internal/reference_list_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ReferenceListServiceTracingStub::ReferenceListServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -126,18 +127,14 @@ Status ReferenceListServiceTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeReferenceListServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace chronicle_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/chronicle/v1/internal/reference_list_tracing_stub.h b/google/cloud/chronicle/v1/internal/reference_list_tracing_stub.h index f825e660f8e88..82a6d0c8500cc 100644 --- a/google/cloud/chronicle/v1/internal/reference_list_tracing_stub.h +++ b/google/cloud/chronicle/v1/internal/reference_list_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ReferenceListServiceTracingStub : public ReferenceListServiceStub { public: ~ReferenceListServiceTracingStub() override = default; @@ -82,8 +83,6 @@ class ReferenceListServiceTracingStub : public ReferenceListServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -98,4 +97,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_REFERENCE_LIST_TRACING_STUB_H diff --git a/google/cloud/chronicle/v1/internal/rule_auth_decorator.cc b/google/cloud/chronicle/v1/internal/rule_auth_decorator.cc index c78084a277d8b..d2a8afd039dda 100644 --- a/google/cloud/chronicle/v1/internal/rule_auth_decorator.cc +++ b/google/cloud/chronicle/v1/internal/rule_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/chronicle/v1/rule.proto #include "google/cloud/chronicle/v1/internal/rule_auth_decorator.h" -#include +#include "google/cloud/chronicle/v1/rule.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -226,3 +229,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace chronicle_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/chronicle/v1/internal/rule_auth_decorator.h b/google/cloud/chronicle/v1/internal/rule_auth_decorator.h index 143dc06330f98..f0647c468d154 100644 --- a/google/cloud/chronicle/v1/internal/rule_auth_decorator.h +++ b/google/cloud/chronicle/v1/internal/rule_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/chronicle/v1/internal/rule_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -141,4 +144,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_RULE_AUTH_DECORATOR_H diff --git a/google/cloud/chronicle/v1/internal/rule_connection_impl.h b/google/cloud/chronicle/v1/internal/rule_connection_impl.h index dd57661095737..f4ac4846aeb69 100644 --- a/google/cloud/chronicle/v1/internal/rule_connection_impl.h +++ b/google/cloud/chronicle/v1/internal/rule_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/chronicle/v1/internal/rule_logging_decorator.cc b/google/cloud/chronicle/v1/internal/rule_logging_decorator.cc index bd6fc3621d389..afbd8688a2e23 100644 --- a/google/cloud/chronicle/v1/internal/rule_logging_decorator.cc +++ b/google/cloud/chronicle/v1/internal/rule_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/chronicle/v1/rule.proto #include "google/cloud/chronicle/v1/internal/rule_logging_decorator.h" +#include "google/cloud/chronicle/v1/rule.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -283,3 +286,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace chronicle_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/chronicle/v1/internal/rule_logging_decorator.h b/google/cloud/chronicle/v1/internal/rule_logging_decorator.h index ce752da559723..616288ff0e884 100644 --- a/google/cloud/chronicle/v1/internal/rule_logging_decorator.h +++ b/google/cloud/chronicle/v1/internal/rule_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/chronicle/v1/internal/rule_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -141,4 +144,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_RULE_LOGGING_DECORATOR_H diff --git a/google/cloud/chronicle/v1/internal/rule_metadata_decorator.cc b/google/cloud/chronicle/v1/internal/rule_metadata_decorator.cc index 05fb39870b36b..1cc53c47744c7 100644 --- a/google/cloud/chronicle/v1/internal/rule_metadata_decorator.cc +++ b/google/cloud/chronicle/v1/internal/rule_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/chronicle/v1/rule.proto #include "google/cloud/chronicle/v1/internal/rule_metadata_decorator.h" +#include "google/cloud/chronicle/v1/rule.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -235,3 +239,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace chronicle_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/chronicle/v1/internal/rule_metadata_decorator.h b/google/cloud/chronicle/v1/internal/rule_metadata_decorator.h index faf93bf4ebcdc..64f51b16327b2 100644 --- a/google/cloud/chronicle/v1/internal/rule_metadata_decorator.h +++ b/google/cloud/chronicle/v1/internal/rule_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/chronicle/v1/internal/rule_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -146,4 +149,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_RULE_METADATA_DECORATOR_H diff --git a/google/cloud/chronicle/v1/internal/rule_option_defaults.cc b/google/cloud/chronicle/v1/internal/rule_option_defaults.cc index 1d90bf1cdff61..7617fcaf88979 100644 --- a/google/cloud/chronicle/v1/internal/rule_option_defaults.cc +++ b/google/cloud/chronicle/v1/internal/rule_option_defaults.cc @@ -41,7 +41,7 @@ Options RuleServiceDefaultOptions(Options options) { if (!options.has()) { options.set( chronicle_v1::RuleServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/chronicle/v1/internal/rule_stub.cc b/google/cloud/chronicle/v1/internal/rule_stub.cc index 2f803b3d564c1..dd039996109c8 100644 --- a/google/cloud/chronicle/v1/internal/rule_stub.cc +++ b/google/cloud/chronicle/v1/internal/rule_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/chronicle/v1/rule.proto #include "google/cloud/chronicle/v1/internal/rule_stub.h" +#include "google/cloud/chronicle/v1/rule.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -278,3 +281,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace chronicle_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/chronicle/v1/internal/rule_stub.h b/google/cloud/chronicle/v1/internal/rule_stub.h index 7b11cf8b99e27..4996d9f1a8337 100644 --- a/google/cloud/chronicle/v1/internal/rule_stub.h +++ b/google/cloud/chronicle/v1/internal/rule_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_RULE_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_RULE_STUB_H +#include "google/cloud/chronicle/v1/rule.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -244,4 +247,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_RULE_STUB_H diff --git a/google/cloud/chronicle/v1/internal/rule_stub_factory.cc b/google/cloud/chronicle/v1/internal/rule_stub_factory.cc index bc6865e1a72c9..43e25de55b02c 100644 --- a/google/cloud/chronicle/v1/internal/rule_stub_factory.cc +++ b/google/cloud/chronicle/v1/internal/rule_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/chronicle/v1/internal/rule_metadata_decorator.h" #include "google/cloud/chronicle/v1/internal/rule_stub.h" #include "google/cloud/chronicle/v1/internal/rule_tracing_stub.h" +#include "google/cloud/chronicle/v1/rule.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace chronicle_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/chronicle/v1/internal/rule_stub_factory.h b/google/cloud/chronicle/v1/internal/rule_stub_factory.h index 11288e0101520..9e3865c7d999a 100644 --- a/google/cloud/chronicle/v1/internal/rule_stub_factory.h +++ b/google/cloud/chronicle/v1/internal/rule_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_RULE_STUB_FACTORY_H diff --git a/google/cloud/chronicle/v1/internal/rule_tracing_connection.cc b/google/cloud/chronicle/v1/internal/rule_tracing_connection.cc index 4228c83a06ad0..24e81551bf57d 100644 --- a/google/cloud/chronicle/v1/internal/rule_tracing_connection.cc +++ b/google/cloud/chronicle/v1/internal/rule_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace chronicle_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RuleServiceTracingConnection::RuleServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -205,16 +203,12 @@ Status RuleServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRuleServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/chronicle/v1/internal/rule_tracing_connection.h b/google/cloud/chronicle/v1/internal/rule_tracing_connection.h index 6014919b587c1..00f9e9410d162 100644 --- a/google/cloud/chronicle/v1/internal/rule_tracing_connection.h +++ b/google/cloud/chronicle/v1/internal/rule_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace chronicle_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RuleServiceTracingConnection : public chronicle_v1::RuleServiceConnection { public: @@ -105,8 +103,6 @@ class RuleServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/chronicle/v1/internal/rule_tracing_stub.cc b/google/cloud/chronicle/v1/internal/rule_tracing_stub.cc index 4801020c0913f..62c740843f18f 100644 --- a/google/cloud/chronicle/v1/internal/rule_tracing_stub.cc +++ b/google/cloud/chronicle/v1/internal/rule_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RuleServiceTracingStub::RuleServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -260,18 +261,14 @@ future RuleServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRuleServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace chronicle_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/chronicle/v1/internal/rule_tracing_stub.h b/google/cloud/chronicle/v1/internal/rule_tracing_stub.h index 99b938f41d0c5..c9b96ab03574b 100644 --- a/google/cloud/chronicle/v1/internal/rule_tracing_stub.h +++ b/google/cloud/chronicle/v1/internal/rule_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace chronicle_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RuleServiceTracingStub : public RuleServiceStub { public: ~RuleServiceTracingStub() override = default; @@ -136,8 +137,6 @@ class RuleServiceTracingStub : public RuleServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -152,4 +151,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_INTERNAL_RULE_TRACING_STUB_H diff --git a/google/cloud/chronicle/v1/reference_list_connection.h b/google/cloud/chronicle/v1/reference_list_connection.h index 52e14bf459435..d90768d5d597f 100644 --- a/google/cloud/chronicle/v1/reference_list_connection.h +++ b/google/cloud/chronicle/v1/reference_list_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_REFERENCE_LIST_CONNECTION_H #include "google/cloud/chronicle/v1/internal/reference_list_retry_traits.h" +#include "google/cloud/chronicle/v1/reference_list.pb.h" #include "google/cloud/chronicle/v1/reference_list_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/chronicle/v1/reference_list_connection_idempotency_policy.h b/google/cloud/chronicle/v1/reference_list_connection_idempotency_policy.h index 4293d09352eb5..821453a3682e8 100644 --- a/google/cloud/chronicle/v1/reference_list_connection_idempotency_policy.h +++ b/google/cloud/chronicle/v1/reference_list_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_REFERENCE_LIST_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_REFERENCE_LIST_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/chronicle/v1/reference_list.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/chronicle/v1/rule_client.h b/google/cloud/chronicle/v1/rule_client.h index c6c572b01f8ec..bad9d11c0307d 100644 --- a/google/cloud/chronicle/v1/rule_client.h +++ b/google/cloud/chronicle/v1/rule_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/chronicle/v1/rule_connection.h b/google/cloud/chronicle/v1/rule_connection.h index ed412847f655b..653908b764fb9 100644 --- a/google/cloud/chronicle/v1/rule_connection.h +++ b/google/cloud/chronicle/v1/rule_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_RULE_CONNECTION_H #include "google/cloud/chronicle/v1/internal/rule_retry_traits.h" +#include "google/cloud/chronicle/v1/rule.pb.h" #include "google/cloud/chronicle/v1/rule_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/chronicle/v1/rule_connection_idempotency_policy.h b/google/cloud/chronicle/v1/rule_connection_idempotency_policy.h index 06a1eb59d3ffa..287fdd6ed8cba 100644 --- a/google/cloud/chronicle/v1/rule_connection_idempotency_policy.h +++ b/google/cloud/chronicle/v1/rule_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_RULE_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CHRONICLE_V1_RULE_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/chronicle/v1/rule.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/cloudbuild/BUILD.bazel b/google/cloud/cloudbuild/BUILD.bazel index 6f4e41867eaaa..feb32e7596cc3 100644 --- a/google/cloud/cloudbuild/BUILD.bazel +++ b/google/cloud/cloudbuild/BUILD.bazel @@ -19,14 +19,13 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", "v2/", ] googleapis_deps = [ - "@com_google_googleapis//google/devtools/cloudbuild/v1:cloudbuild_cc_grpc", - "@com_google_googleapis//google/devtools/cloudbuild/v2:cloudbuild_cc_grpc", + "@googleapis//google/devtools/cloudbuild/v1:cloudbuild_cc_grpc", + "@googleapis//google/devtools/cloudbuild/v2:cloudbuild_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/cloudbuild/CMakeLists.txt b/google/cloud/cloudbuild/CMakeLists.txt index 092f04447428e..41283f601ce7a 100644 --- a/google/cloud/cloudbuild/CMakeLists.txt +++ b/google/cloud/cloudbuild/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(cloudbuild "Cloud Build API" - SERVICE_DIRS "__EMPTY__" "v1/" "v2/") + SERVICE_DIRS "v1/" "v2/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(cloudbuild_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/cloudbuild/cloud_build_client.h b/google/cloud/cloudbuild/cloud_build_client.h deleted file mode 100644 index 78d7e12c027e0..0000000000000 --- a/google/cloud/cloudbuild/cloud_build_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/devtools/cloudbuild/v1/cloudbuild.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDBUILD_CLOUD_BUILD_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDBUILD_CLOUD_BUILD_CLIENT_H - -#include "google/cloud/cloudbuild/cloud_build_connection.h" -#include "google/cloud/cloudbuild/v1/cloud_build_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in cloudbuild_v1 instead of the aliases defined in -/// this namespace. -namespace cloudbuild { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use cloudbuild_v1::CloudBuildClient directly. -using ::google::cloud::cloudbuild_v1::CloudBuildClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace cloudbuild -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDBUILD_CLOUD_BUILD_CLIENT_H diff --git a/google/cloud/cloudbuild/cloud_build_connection.h b/google/cloud/cloudbuild/cloud_build_connection.h deleted file mode 100644 index cd8380d8a59a1..0000000000000 --- a/google/cloud/cloudbuild/cloud_build_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/devtools/cloudbuild/v1/cloudbuild.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDBUILD_CLOUD_BUILD_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDBUILD_CLOUD_BUILD_CONNECTION_H - -#include "google/cloud/cloudbuild/cloud_build_connection_idempotency_policy.h" -#include "google/cloud/cloudbuild/v1/cloud_build_connection.h" - -namespace google { -namespace cloud { -namespace cloudbuild { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use cloudbuild_v1::MakeCloudBuildConnection directly. -using ::google::cloud::cloudbuild_v1::MakeCloudBuildConnection; - -/// @deprecated Use cloudbuild_v1::CloudBuildConnection directly. -using ::google::cloud::cloudbuild_v1::CloudBuildConnection; - -/// @deprecated Use cloudbuild_v1::CloudBuildLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::cloudbuild_v1::CloudBuildLimitedErrorCountRetryPolicy; - -/// @deprecated Use cloudbuild_v1::CloudBuildLimitedTimeRetryPolicy directly. -using ::google::cloud::cloudbuild_v1::CloudBuildLimitedTimeRetryPolicy; - -/// @deprecated Use cloudbuild_v1::CloudBuildRetryPolicy directly. -using ::google::cloud::cloudbuild_v1::CloudBuildRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace cloudbuild -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDBUILD_CLOUD_BUILD_CONNECTION_H diff --git a/google/cloud/cloudbuild/cloud_build_connection_idempotency_policy.h b/google/cloud/cloudbuild/cloud_build_connection_idempotency_policy.h deleted file mode 100644 index 0e1647882fc7b..0000000000000 --- a/google/cloud/cloudbuild/cloud_build_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/devtools/cloudbuild/v1/cloudbuild.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDBUILD_CLOUD_BUILD_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDBUILD_CLOUD_BUILD_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/cloudbuild/v1/cloud_build_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace cloudbuild { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// cloudbuild_v1::MakeDefaultCloudBuildConnectionIdempotencyPolicy directly. -using ::google::cloud::cloudbuild_v1:: - MakeDefaultCloudBuildConnectionIdempotencyPolicy; - -/// @deprecated Use cloudbuild_v1::CloudBuildConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::cloudbuild_v1::CloudBuildConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace cloudbuild -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDBUILD_CLOUD_BUILD_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/cloudbuild/cloud_build_options.h b/google/cloud/cloudbuild/cloud_build_options.h deleted file mode 100644 index 3c28f4ea7a1d9..0000000000000 --- a/google/cloud/cloudbuild/cloud_build_options.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/devtools/cloudbuild/v1/cloudbuild.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDBUILD_CLOUD_BUILD_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDBUILD_CLOUD_BUILD_OPTIONS_H - -#include "google/cloud/cloudbuild/cloud_build_connection.h" -#include "google/cloud/cloudbuild/cloud_build_connection_idempotency_policy.h" -#include "google/cloud/cloudbuild/v1/cloud_build_options.h" - -namespace google { -namespace cloud { -namespace cloudbuild { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use cloudbuild_v1::CloudBuildPollingPolicyOption directly. -using ::google::cloud::cloudbuild_v1::CloudBuildPollingPolicyOption; - -/// @deprecated Use cloudbuild_v1::CloudBuildBackoffPolicyOption directly. -using ::google::cloud::cloudbuild_v1::CloudBuildBackoffPolicyOption; - -/// @deprecated Use cloudbuild_v1::CloudBuildConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::cloudbuild_v1:: - CloudBuildConnectionIdempotencyPolicyOption; - -/// @deprecated Use cloudbuild_v1::CloudBuildPolicyOptionList directly. -using ::google::cloud::cloudbuild_v1::CloudBuildPolicyOptionList; - -/// @deprecated Use cloudbuild_v1::CloudBuildRetryPolicyOption directly. -using ::google::cloud::cloudbuild_v1::CloudBuildRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace cloudbuild -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDBUILD_CLOUD_BUILD_OPTIONS_H diff --git a/google/cloud/cloudbuild/mocks/mock_cloud_build_connection.h b/google/cloud/cloudbuild/mocks/mock_cloud_build_connection.h deleted file mode 100644 index e0d2063cf4807..0000000000000 --- a/google/cloud/cloudbuild/mocks/mock_cloud_build_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/devtools/cloudbuild/v1/cloudbuild.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDBUILD_MOCKS_MOCK_CLOUD_BUILD_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDBUILD_MOCKS_MOCK_CLOUD_BUILD_CONNECTION_H - -#include "google/cloud/cloudbuild/cloud_build_connection.h" -#include "google/cloud/cloudbuild/v1/mocks/mock_cloud_build_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in cloudbuild_v1_mocks instead of the aliases -/// defined in this namespace. -namespace cloudbuild_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use cloudbuild_v1_mocks::MockCloudBuildConnection directly. -using ::google::cloud::cloudbuild_v1_mocks::MockCloudBuildConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace cloudbuild_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDBUILD_MOCKS_MOCK_CLOUD_BUILD_CONNECTION_H diff --git a/google/cloud/cloudbuild/quickstart/.bazelrc b/google/cloud/cloudbuild/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/cloudbuild/quickstart/.bazelrc +++ b/google/cloud/cloudbuild/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/cloudbuild/quickstart/CMakeLists.txt b/google/cloud/cloudbuild/quickstart/CMakeLists.txt index e8856a775a27f..6d1c145832e49 100644 --- a/google/cloud/cloudbuild/quickstart/CMakeLists.txt +++ b/google/cloud/cloudbuild/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Build API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-cloudbuild-quickstart CXX) find_package(google_cloud_cpp_cloudbuild REQUIRED) diff --git a/google/cloud/cloudbuild/v1/cloud_build_client.h b/google/cloud/cloudbuild/v1/cloud_build_client.h index 52906b7445f19..ddcd57c8c76ca 100644 --- a/google/cloud/cloudbuild/v1/cloud_build_client.h +++ b/google/cloud/cloudbuild/v1/cloud_build_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/cloudbuild/v1/cloud_build_connection.h b/google/cloud/cloudbuild/v1/cloud_build_connection.h index 18d9eff75627f..3f112924e1363 100644 --- a/google/cloud/cloudbuild/v1/cloud_build_connection.h +++ b/google/cloud/cloudbuild/v1/cloud_build_connection.h @@ -30,8 +30,8 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/devtools/cloudbuild/v1/cloudbuild.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/cloudbuild/v1/cloud_build_connection_idempotency_policy.h b/google/cloud/cloudbuild/v1/cloud_build_connection_idempotency_policy.h index 5c7129afbfc58..b88d73db53fd6 100644 --- a/google/cloud/cloudbuild/v1/cloud_build_connection_idempotency_policy.h +++ b/google/cloud/cloudbuild/v1/cloud_build_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/devtools/cloudbuild/v1/cloudbuild.grpc.pb.h" #include namespace google { diff --git a/google/cloud/cloudbuild/v1/internal/cloud_build_auth_decorator.cc b/google/cloud/cloudbuild/v1/internal/cloud_build_auth_decorator.cc index 9aa458c6ab286..35c70a4a8eb9e 100644 --- a/google/cloud/cloudbuild/v1/internal/cloud_build_auth_decorator.cc +++ b/google/cloud/cloudbuild/v1/internal/cloud_build_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/devtools/cloudbuild/v1/cloudbuild.proto #include "google/cloud/cloudbuild/v1/internal/cloud_build_auth_decorator.h" -#include +#include "google/devtools/cloudbuild/v1/cloudbuild.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudbuild_v1_internal { @@ -377,3 +380,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudbuild_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudbuild/v1/internal/cloud_build_auth_decorator.h b/google/cloud/cloudbuild/v1/internal/cloud_build_auth_decorator.h index b7acdb2835a13..652c7cf6035da 100644 --- a/google/cloud/cloudbuild/v1/internal/cloud_build_auth_decorator.h +++ b/google/cloud/cloudbuild/v1/internal/cloud_build_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/cloudbuild/v1/internal/cloud_build_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudbuild_v1_internal { @@ -209,4 +212,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDBUILD_V1_INTERNAL_CLOUD_BUILD_AUTH_DECORATOR_H diff --git a/google/cloud/cloudbuild/v1/internal/cloud_build_connection_impl.h b/google/cloud/cloudbuild/v1/internal/cloud_build_connection_impl.h index d4f74776629ca..b19634b925c16 100644 --- a/google/cloud/cloudbuild/v1/internal/cloud_build_connection_impl.h +++ b/google/cloud/cloudbuild/v1/internal/cloud_build_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/cloudbuild/v1/internal/cloud_build_logging_decorator.cc b/google/cloud/cloudbuild/v1/internal/cloud_build_logging_decorator.cc index 606744afef08d..0e73d82306ea7 100644 --- a/google/cloud/cloudbuild/v1/internal/cloud_build_logging_decorator.cc +++ b/google/cloud/cloudbuild/v1/internal/cloud_build_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/cloudbuild/v1/internal/cloud_build_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/devtools/cloudbuild/v1/cloudbuild.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudbuild_v1_internal { @@ -450,3 +453,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudbuild_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudbuild/v1/internal/cloud_build_logging_decorator.h b/google/cloud/cloudbuild/v1/internal/cloud_build_logging_decorator.h index cd3c045d183a7..f6558a441054d 100644 --- a/google/cloud/cloudbuild/v1/internal/cloud_build_logging_decorator.h +++ b/google/cloud/cloudbuild/v1/internal/cloud_build_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/cloudbuild/v1/internal/cloud_build_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudbuild_v1_internal { @@ -209,4 +212,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDBUILD_V1_INTERNAL_CLOUD_BUILD_LOGGING_DECORATOR_H diff --git a/google/cloud/cloudbuild/v1/internal/cloud_build_metadata_decorator.cc b/google/cloud/cloudbuild/v1/internal/cloud_build_metadata_decorator.cc index 12f94aa083435..855e0cfe17377 100644 --- a/google/cloud/cloudbuild/v1/internal/cloud_build_metadata_decorator.cc +++ b/google/cloud/cloudbuild/v1/internal/cloud_build_metadata_decorator.cc @@ -18,18 +18,21 @@ #include "google/cloud/cloudbuild/v1/internal/cloud_build_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/routing_matcher.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/devtools/cloudbuild/v1/cloudbuild.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudbuild_v1_internal { @@ -826,3 +829,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudbuild_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudbuild/v1/internal/cloud_build_metadata_decorator.h b/google/cloud/cloudbuild/v1/internal/cloud_build_metadata_decorator.h index 5b3bfdcf65cb1..5fe745222c33c 100644 --- a/google/cloud/cloudbuild/v1/internal/cloud_build_metadata_decorator.h +++ b/google/cloud/cloudbuild/v1/internal/cloud_build_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/cloudbuild/v1/internal/cloud_build_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudbuild_v1_internal { @@ -214,4 +217,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDBUILD_V1_INTERNAL_CLOUD_BUILD_METADATA_DECORATOR_H diff --git a/google/cloud/cloudbuild/v1/internal/cloud_build_option_defaults.cc b/google/cloud/cloudbuild/v1/internal/cloud_build_option_defaults.cc index e1e4df26ba586..7b5b1d41fb60b 100644 --- a/google/cloud/cloudbuild/v1/internal/cloud_build_option_defaults.cc +++ b/google/cloud/cloudbuild/v1/internal/cloud_build_option_defaults.cc @@ -41,7 +41,7 @@ Options CloudBuildDefaultOptions(Options options) { if (!options.has()) { options.set( cloudbuild_v1::CloudBuildLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/cloudbuild/v1/internal/cloud_build_stub.cc b/google/cloud/cloudbuild/v1/internal/cloud_build_stub.cc index 03cca5c99d1ed..167ea36d9485c 100644 --- a/google/cloud/cloudbuild/v1/internal/cloud_build_stub.cc +++ b/google/cloud/cloudbuild/v1/internal/cloud_build_stub.cc @@ -19,11 +19,14 @@ #include "google/cloud/cloudbuild/v1/internal/cloud_build_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/devtools/cloudbuild/v1/cloudbuild.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudbuild_v1_internal { @@ -435,3 +438,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudbuild_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudbuild/v1/internal/cloud_build_stub.h b/google/cloud/cloudbuild/v1/internal/cloud_build_stub.h index 1d2a9433cbbd0..8eacdc4f25c08 100644 --- a/google/cloud/cloudbuild/v1/internal/cloud_build_stub.h +++ b/google/cloud/cloudbuild/v1/internal/cloud_build_stub.h @@ -24,11 +24,14 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/devtools/cloudbuild/v1/cloudbuild.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudbuild_v1_internal { @@ -381,4 +384,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDBUILD_V1_INTERNAL_CLOUD_BUILD_STUB_H diff --git a/google/cloud/cloudbuild/v1/internal/cloud_build_stub_factory.cc b/google/cloud/cloudbuild/v1/internal/cloud_build_stub_factory.cc index 328b5a4490a5a..fa3ef7121bb23 100644 --- a/google/cloud/cloudbuild/v1/internal/cloud_build_stub_factory.cc +++ b/google/cloud/cloudbuild/v1/internal/cloud_build_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/devtools/cloudbuild/v1/cloudbuild.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudbuild_v1_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudbuild_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudbuild/v1/internal/cloud_build_stub_factory.h b/google/cloud/cloudbuild/v1/internal/cloud_build_stub_factory.h index 79aa8ee8d37d1..f8995c034edfc 100644 --- a/google/cloud/cloudbuild/v1/internal/cloud_build_stub_factory.h +++ b/google/cloud/cloudbuild/v1/internal/cloud_build_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudbuild_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDBUILD_V1_INTERNAL_CLOUD_BUILD_STUB_FACTORY_H diff --git a/google/cloud/cloudbuild/v1/internal/cloud_build_tracing_connection.cc b/google/cloud/cloudbuild/v1/internal/cloud_build_tracing_connection.cc index 5a29e0adc3c25..cb4da7e6e5509 100644 --- a/google/cloud/cloudbuild/v1/internal/cloud_build_tracing_connection.cc +++ b/google/cloud/cloudbuild/v1/internal/cloud_build_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace cloudbuild_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudBuildTracingConnection::CloudBuildTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -358,16 +356,12 @@ CloudBuildTracingConnection::GetDefaultServiceAccount( return internal::EndSpan(*span, child_->GetDefaultServiceAccount(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCloudBuildTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/cloudbuild/v1/internal/cloud_build_tracing_connection.h b/google/cloud/cloudbuild/v1/internal/cloud_build_tracing_connection.h index aa869ff6da9cf..2c84b90a1d779 100644 --- a/google/cloud/cloudbuild/v1/internal/cloud_build_tracing_connection.h +++ b/google/cloud/cloudbuild/v1/internal/cloud_build_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace cloudbuild_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudBuildTracingConnection : public cloudbuild_v1::CloudBuildConnection { public: ~CloudBuildTracingConnection() override = default; @@ -181,8 +179,6 @@ class CloudBuildTracingConnection : public cloudbuild_v1::CloudBuildConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/cloudbuild/v1/internal/cloud_build_tracing_stub.cc b/google/cloud/cloudbuild/v1/internal/cloud_build_tracing_stub.cc index f2c96b12e436d..f192c08b4ec64 100644 --- a/google/cloud/cloudbuild/v1/internal/cloud_build_tracing_stub.cc +++ b/google/cloud/cloudbuild/v1/internal/cloud_build_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudbuild_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudBuildTracingStub::CloudBuildTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -391,18 +392,14 @@ future CloudBuildTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCloudBuildTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudbuild_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudbuild/v1/internal/cloud_build_tracing_stub.h b/google/cloud/cloudbuild/v1/internal/cloud_build_tracing_stub.h index f666b99db0bc6..bad0fed4df4d9 100644 --- a/google/cloud/cloudbuild/v1/internal/cloud_build_tracing_stub.h +++ b/google/cloud/cloudbuild/v1/internal/cloud_build_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudbuild_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudBuildTracingStub : public CloudBuildStub { public: ~CloudBuildTracingStub() override = default; @@ -204,8 +205,6 @@ class CloudBuildTracingStub : public CloudBuildStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -220,4 +219,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDBUILD_V1_INTERNAL_CLOUD_BUILD_TRACING_STUB_H diff --git a/google/cloud/cloudbuild/v2/internal/repository_manager_auth_decorator.cc b/google/cloud/cloudbuild/v2/internal/repository_manager_auth_decorator.cc index 9e138c0b78e32..00efdbbc19af0 100644 --- a/google/cloud/cloudbuild/v2/internal/repository_manager_auth_decorator.cc +++ b/google/cloud/cloudbuild/v2/internal/repository_manager_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/devtools/cloudbuild/v2/repositories.proto #include "google/cloud/cloudbuild/v2/internal/repository_manager_auth_decorator.h" -#include +#include "google/devtools/cloudbuild/v2/repositories.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudbuild_v2_internal { @@ -362,3 +365,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudbuild_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudbuild/v2/internal/repository_manager_auth_decorator.h b/google/cloud/cloudbuild/v2/internal/repository_manager_auth_decorator.h index 6e6c9f24314cc..fcbdd395c3e22 100644 --- a/google/cloud/cloudbuild/v2/internal/repository_manager_auth_decorator.h +++ b/google/cloud/cloudbuild/v2/internal/repository_manager_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/cloudbuild/v2/internal/repository_manager_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudbuild_v2_internal { @@ -197,4 +200,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDBUILD_V2_INTERNAL_REPOSITORY_MANAGER_AUTH_DECORATOR_H diff --git a/google/cloud/cloudbuild/v2/internal/repository_manager_connection_impl.h b/google/cloud/cloudbuild/v2/internal/repository_manager_connection_impl.h index 5e52aa52ac165..a519b8b044698 100644 --- a/google/cloud/cloudbuild/v2/internal/repository_manager_connection_impl.h +++ b/google/cloud/cloudbuild/v2/internal/repository_manager_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/cloudbuild/v2/internal/repository_manager_logging_decorator.cc b/google/cloud/cloudbuild/v2/internal/repository_manager_logging_decorator.cc index 02145614dd495..508530de87c80 100644 --- a/google/cloud/cloudbuild/v2/internal/repository_manager_logging_decorator.cc +++ b/google/cloud/cloudbuild/v2/internal/repository_manager_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/cloudbuild/v2/internal/repository_manager_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/devtools/cloudbuild/v2/repositories.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudbuild_v2_internal { @@ -430,3 +433,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudbuild_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudbuild/v2/internal/repository_manager_logging_decorator.h b/google/cloud/cloudbuild/v2/internal/repository_manager_logging_decorator.h index ebed4bf03e31c..f7c77122df790 100644 --- a/google/cloud/cloudbuild/v2/internal/repository_manager_logging_decorator.h +++ b/google/cloud/cloudbuild/v2/internal/repository_manager_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/cloudbuild/v2/internal/repository_manager_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudbuild_v2_internal { @@ -197,4 +200,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDBUILD_V2_INTERNAL_REPOSITORY_MANAGER_LOGGING_DECORATOR_H diff --git a/google/cloud/cloudbuild/v2/internal/repository_manager_metadata_decorator.cc b/google/cloud/cloudbuild/v2/internal/repository_manager_metadata_decorator.cc index c41d0353f572d..589102ca78da3 100644 --- a/google/cloud/cloudbuild/v2/internal/repository_manager_metadata_decorator.cc +++ b/google/cloud/cloudbuild/v2/internal/repository_manager_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/cloudbuild/v2/internal/repository_manager_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/devtools/cloudbuild/v2/repositories.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudbuild_v2_internal { @@ -337,3 +341,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudbuild_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudbuild/v2/internal/repository_manager_metadata_decorator.h b/google/cloud/cloudbuild/v2/internal/repository_manager_metadata_decorator.h index e5fc51ee14216..7b7347ca108db 100644 --- a/google/cloud/cloudbuild/v2/internal/repository_manager_metadata_decorator.h +++ b/google/cloud/cloudbuild/v2/internal/repository_manager_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/cloudbuild/v2/internal/repository_manager_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudbuild_v2_internal { @@ -203,4 +206,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDBUILD_V2_INTERNAL_REPOSITORY_MANAGER_METADATA_DECORATOR_H diff --git a/google/cloud/cloudbuild/v2/internal/repository_manager_option_defaults.cc b/google/cloud/cloudbuild/v2/internal/repository_manager_option_defaults.cc index f7d18b8a3be0b..7633e8d235ed2 100644 --- a/google/cloud/cloudbuild/v2/internal/repository_manager_option_defaults.cc +++ b/google/cloud/cloudbuild/v2/internal/repository_manager_option_defaults.cc @@ -42,7 +42,7 @@ Options RepositoryManagerDefaultOptions(Options options) { if (!options.has()) { options.set( cloudbuild_v2::RepositoryManagerLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/cloudbuild/v2/internal/repository_manager_stub.cc b/google/cloud/cloudbuild/v2/internal/repository_manager_stub.cc index 443fdc9416b0f..5f45b9c2ac93b 100644 --- a/google/cloud/cloudbuild/v2/internal/repository_manager_stub.cc +++ b/google/cloud/cloudbuild/v2/internal/repository_manager_stub.cc @@ -19,11 +19,14 @@ #include "google/cloud/cloudbuild/v2/internal/repository_manager_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/devtools/cloudbuild/v2/repositories.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudbuild_v2_internal { @@ -420,3 +423,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudbuild_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudbuild/v2/internal/repository_manager_stub.h b/google/cloud/cloudbuild/v2/internal/repository_manager_stub.h index 40ad0f305d4a2..5f55f3594cbb8 100644 --- a/google/cloud/cloudbuild/v2/internal/repository_manager_stub.h +++ b/google/cloud/cloudbuild/v2/internal/repository_manager_stub.h @@ -24,13 +24,16 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/devtools/cloudbuild/v2/cloudbuild.pb.h" +#include "google/devtools/cloudbuild/v2/repositories.grpc.pb.h" +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudbuild_v2_internal { @@ -373,4 +376,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDBUILD_V2_INTERNAL_REPOSITORY_MANAGER_STUB_H diff --git a/google/cloud/cloudbuild/v2/internal/repository_manager_stub_factory.cc b/google/cloud/cloudbuild/v2/internal/repository_manager_stub_factory.cc index 22e79cb252be1..adf8a0f51c1d0 100644 --- a/google/cloud/cloudbuild/v2/internal/repository_manager_stub_factory.cc +++ b/google/cloud/cloudbuild/v2/internal/repository_manager_stub_factory.cc @@ -28,12 +28,15 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/devtools/cloudbuild/v2/repositories.grpc.pb.h" +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudbuild_v2_internal { @@ -74,3 +77,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudbuild_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudbuild/v2/internal/repository_manager_stub_factory.h b/google/cloud/cloudbuild/v2/internal/repository_manager_stub_factory.h index 290c54b36c9a5..725d75db58df8 100644 --- a/google/cloud/cloudbuild/v2/internal/repository_manager_stub_factory.h +++ b/google/cloud/cloudbuild/v2/internal/repository_manager_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudbuild_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDBUILD_V2_INTERNAL_REPOSITORY_MANAGER_STUB_FACTORY_H diff --git a/google/cloud/cloudbuild/v2/internal/repository_manager_tracing_connection.cc b/google/cloud/cloudbuild/v2/internal/repository_manager_tracing_connection.cc index 8baa92ccfb81b..40c3889f92d5f 100644 --- a/google/cloud/cloudbuild/v2/internal/repository_manager_tracing_connection.cc +++ b/google/cloud/cloudbuild/v2/internal/repository_manager_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace cloudbuild_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RepositoryManagerTracingConnection::RepositoryManagerTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -345,17 +343,13 @@ Status RepositoryManagerTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRepositoryManagerTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/cloudbuild/v2/internal/repository_manager_tracing_connection.h b/google/cloud/cloudbuild/v2/internal/repository_manager_tracing_connection.h index 30ce486e4f321..615b82f55ad67 100644 --- a/google/cloud/cloudbuild/v2/internal/repository_manager_tracing_connection.h +++ b/google/cloud/cloudbuild/v2/internal/repository_manager_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace cloudbuild_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RepositoryManagerTracingConnection : public cloudbuild_v2::RepositoryManagerConnection { public: @@ -174,8 +172,6 @@ class RepositoryManagerTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/cloudbuild/v2/internal/repository_manager_tracing_stub.cc b/google/cloud/cloudbuild/v2/internal/repository_manager_tracing_stub.cc index 0c659197212db..7aedbc6f30d1b 100644 --- a/google/cloud/cloudbuild/v2/internal/repository_manager_tracing_stub.cc +++ b/google/cloud/cloudbuild/v2/internal/repository_manager_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudbuild_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RepositoryManagerTracingStub::RepositoryManagerTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -384,18 +385,14 @@ future RepositoryManagerTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRepositoryManagerTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudbuild_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudbuild/v2/internal/repository_manager_tracing_stub.h b/google/cloud/cloudbuild/v2/internal/repository_manager_tracing_stub.h index 4d59563cee158..cf25c49958d24 100644 --- a/google/cloud/cloudbuild/v2/internal/repository_manager_tracing_stub.h +++ b/google/cloud/cloudbuild/v2/internal/repository_manager_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudbuild_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RepositoryManagerTracingStub : public RepositoryManagerStub { public: ~RepositoryManagerTracingStub() override = default; @@ -193,8 +194,6 @@ class RepositoryManagerTracingStub : public RepositoryManagerStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -209,4 +208,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDBUILD_V2_INTERNAL_REPOSITORY_MANAGER_TRACING_STUB_H diff --git a/google/cloud/cloudbuild/v2/repository_manager_client.h b/google/cloud/cloudbuild/v2/repository_manager_client.h index 7f1258dd24de4..cc4d523806d0b 100644 --- a/google/cloud/cloudbuild/v2/repository_manager_client.h +++ b/google/cloud/cloudbuild/v2/repository_manager_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/cloudbuild/v2/repository_manager_connection.h b/google/cloud/cloudbuild/v2/repository_manager_connection.h index e5ad0d319a22f..2df6d6c23b599 100644 --- a/google/cloud/cloudbuild/v2/repository_manager_connection.h +++ b/google/cloud/cloudbuild/v2/repository_manager_connection.h @@ -30,9 +30,9 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/devtools/cloudbuild/v2/cloudbuild.pb.h" +#include "google/devtools/cloudbuild/v2/repositories.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/cloudbuild/v2/repository_manager_connection_idempotency_policy.h b/google/cloud/cloudbuild/v2/repository_manager_connection_idempotency_policy.h index 5a49d8264f8be..351405a52bee7 100644 --- a/google/cloud/cloudbuild/v2/repository_manager_connection_idempotency_policy.h +++ b/google/cloud/cloudbuild/v2/repository_manager_connection_idempotency_policy.h @@ -21,9 +21,9 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/devtools/cloudbuild/v2/repositories.grpc.pb.h" +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/cloudcontrolspartner/BUILD.bazel b/google/cloud/cloudcontrolspartner/BUILD.bazel index 0471dc9d7e7d9..6a020af37eb0d 100644 --- a/google/cloud/cloudcontrolspartner/BUILD.bazel +++ b/google/cloud/cloudcontrolspartner/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/cloudcontrolspartner/v1:cloudcontrolspartner_cc_grpc", + "@googleapis//google/cloud/cloudcontrolspartner/v1:cloudcontrolspartner_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/cloudcontrolspartner/quickstart/.bazelrc b/google/cloud/cloudcontrolspartner/quickstart/.bazelrc index 15d5c055db074..343e7f623d628 100644 --- a/google/cloud/cloudcontrolspartner/quickstart/.bazelrc +++ b/google/cloud/cloudcontrolspartner/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/cloudcontrolspartner/quickstart/CMakeLists.txt b/google/cloud/cloudcontrolspartner/quickstart/CMakeLists.txt index 24b0740ed62d6..2ad4e2b8d9682 100644 --- a/google/cloud/cloudcontrolspartner/quickstart/CMakeLists.txt +++ b/google/cloud/cloudcontrolspartner/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Controls Partner API C++ client library # from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-cloudcontrolspartner-quickstart CXX) find_package(google_cloud_cpp_cloudcontrolspartner REQUIRED) diff --git a/google/cloud/cloudcontrolspartner/v1/cloud_controls_partner_core_connection.h b/google/cloud/cloudcontrolspartner/v1/cloud_controls_partner_core_connection.h index 91640272acde1..a0842ad5bb7a9 100644 --- a/google/cloud/cloudcontrolspartner/v1/cloud_controls_partner_core_connection.h +++ b/google/cloud/cloudcontrolspartner/v1/cloud_controls_partner_core_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDCONTROLSPARTNER_V1_CLOUD_CONTROLS_PARTNER_CORE_CONNECTION_H #include "google/cloud/cloudcontrolspartner/v1/cloud_controls_partner_core_connection_idempotency_policy.h" +#include "google/cloud/cloudcontrolspartner/v1/core.pb.h" #include "google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/cloudcontrolspartner/v1/cloud_controls_partner_core_connection_idempotency_policy.h b/google/cloud/cloudcontrolspartner/v1/cloud_controls_partner_core_connection_idempotency_policy.h index 4af283a696ccf..6903111c20944 100644 --- a/google/cloud/cloudcontrolspartner/v1/cloud_controls_partner_core_connection_idempotency_policy.h +++ b/google/cloud/cloudcontrolspartner/v1/cloud_controls_partner_core_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDCONTROLSPARTNER_V1_CLOUD_CONTROLS_PARTNER_CORE_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDCONTROLSPARTNER_V1_CLOUD_CONTROLS_PARTNER_CORE_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/cloudcontrolspartner/v1/core.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/cloudcontrolspartner/v1/cloud_controls_partner_monitoring_connection.h b/google/cloud/cloudcontrolspartner/v1/cloud_controls_partner_monitoring_connection.h index 1189f591d077c..3c2a362bf8201 100644 --- a/google/cloud/cloudcontrolspartner/v1/cloud_controls_partner_monitoring_connection.h +++ b/google/cloud/cloudcontrolspartner/v1/cloud_controls_partner_monitoring_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/cloudcontrolspartner/v1/cloud_controls_partner_monitoring_connection_idempotency_policy.h" #include "google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_retry_traits.h" +#include "google/cloud/cloudcontrolspartner/v1/monitoring.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/cloudcontrolspartner/v1/cloud_controls_partner_monitoring_connection_idempotency_policy.h b/google/cloud/cloudcontrolspartner/v1/cloud_controls_partner_monitoring_connection_idempotency_policy.h index 2779ee4069c37..165b3969e6f49 100644 --- a/google/cloud/cloudcontrolspartner/v1/cloud_controls_partner_monitoring_connection_idempotency_policy.h +++ b/google/cloud/cloudcontrolspartner/v1/cloud_controls_partner_monitoring_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDCONTROLSPARTNER_V1_CLOUD_CONTROLS_PARTNER_MONITORING_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDCONTROLSPARTNER_V1_CLOUD_CONTROLS_PARTNER_MONITORING_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/cloudcontrolspartner/v1/monitoring.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_auth_decorator.cc b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_auth_decorator.cc index cb2e4b5a7a60e..9b827a95ae6ed 100644 --- a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_auth_decorator.cc +++ b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/cloudcontrolspartner/v1/core.proto #include "google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_auth_decorator.h" -#include +#include "google/cloud/cloudcontrolspartner/v1/core.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudcontrolspartner_v1_internal { @@ -144,3 +147,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudcontrolspartner_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_auth_decorator.h b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_auth_decorator.h index 7e2fa38302a29..881a75217a987 100644 --- a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_auth_decorator.h +++ b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudcontrolspartner_v1_internal { @@ -109,4 +112,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDCONTROLSPARTNER_V1_INTERNAL_CLOUD_CONTROLS_PARTNER_CORE_AUTH_DECORATOR_H diff --git a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_logging_decorator.cc b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_logging_decorator.cc index c8146d10cdd73..6fd8e93afff06 100644 --- a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_logging_decorator.cc +++ b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/cloudcontrolspartner/v1/core.proto #include "google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_logging_decorator.h" +#include "google/cloud/cloudcontrolspartner/v1/core.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudcontrolspartner_v1_internal { @@ -197,3 +200,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudcontrolspartner_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_logging_decorator.h b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_logging_decorator.h index b06d356d45234..32fece7a8052e 100644 --- a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_logging_decorator.h +++ b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudcontrolspartner_v1_internal { @@ -109,4 +112,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDCONTROLSPARTNER_V1_INTERNAL_CLOUD_CONTROLS_PARTNER_CORE_LOGGING_DECORATOR_H diff --git a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_metadata_decorator.cc b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_metadata_decorator.cc index 7a9866acd5add..5ca3ce29a3d75 100644 --- a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_metadata_decorator.cc +++ b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/cloudcontrolspartner/v1/core.proto #include "google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_metadata_decorator.h" +#include "google/cloud/cloudcontrolspartner/v1/core.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudcontrolspartner_v1_internal { @@ -171,3 +175,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudcontrolspartner_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_metadata_decorator.h b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_metadata_decorator.h index 1cb5f3382e1cd..d800e72adac47 100644 --- a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_metadata_decorator.h +++ b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudcontrolspartner_v1_internal { @@ -115,4 +118,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDCONTROLSPARTNER_V1_INTERNAL_CLOUD_CONTROLS_PARTNER_CORE_METADATA_DECORATOR_H diff --git a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_option_defaults.cc b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_option_defaults.cc index f1584af6ac231..790d224e56391 100644 --- a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_option_defaults.cc +++ b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_option_defaults.cc @@ -45,7 +45,7 @@ Options CloudControlsPartnerCoreDefaultOptions(Options options) { options.set< cloudcontrolspartner_v1::CloudControlsPartnerCoreRetryPolicyOption>( cloudcontrolspartner_v1::CloudControlsPartnerCoreLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudcontrolspartner_v1_internal { @@ -178,3 +181,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudcontrolspartner_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_stub.h b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_stub.h index fea018eeb0bf7..2f2208da62296 100644 --- a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_stub.h +++ b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDCONTROLSPARTNER_V1_INTERNAL_CLOUD_CONTROLS_PARTNER_CORE_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDCONTROLSPARTNER_V1_INTERNAL_CLOUD_CONTROLS_PARTNER_CORE_STUB_H +#include "google/cloud/cloudcontrolspartner/v1/core.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudcontrolspartner_v1_internal { @@ -181,4 +184,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDCONTROLSPARTNER_V1_INTERNAL_CLOUD_CONTROLS_PARTNER_CORE_STUB_H diff --git a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_stub_factory.cc b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_stub_factory.cc index a7769c2443774..d3c6b1ad31420 100644 --- a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_stub_factory.cc +++ b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/cloudcontrolspartner/v1/core.proto #include "google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_stub_factory.h" +#include "google/cloud/cloudcontrolspartner/v1/core.grpc.pb.h" #include "google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_auth_decorator.h" #include "google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_logging_decorator.h" #include "google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_metadata_decorator.h" @@ -28,10 +29,12 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudcontrolspartner_v1_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudcontrolspartner_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_stub_factory.h b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_stub_factory.h index 6b7235e788bbb..ed830aba5a24e 100644 --- a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_stub_factory.h +++ b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudcontrolspartner_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDCONTROLSPARTNER_V1_INTERNAL_CLOUD_CONTROLS_PARTNER_CORE_STUB_FACTORY_H diff --git a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_tracing_connection.cc b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_tracing_connection.cc index 3ca1c06f34c82..5c28d0841bbb6 100644 --- a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_tracing_connection.cc +++ b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace cloudcontrolspartner_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudControlsPartnerCoreTracingConnection:: CloudControlsPartnerCoreTracingConnection( std::shared_ptr< @@ -162,18 +160,14 @@ Status CloudControlsPartnerCoreTracingConnection::DeleteCustomer( return internal::EndSpan(*span, child_->DeleteCustomer(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCloudControlsPartnerCoreTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_tracing_connection.h b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_tracing_connection.h index 73a380a83b226..e6e39ab34e386 100644 --- a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_tracing_connection.h +++ b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace cloudcontrolspartner_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudControlsPartnerCoreTracingConnection : public cloudcontrolspartner_v1::CloudControlsPartnerCoreConnection { public: @@ -94,8 +92,6 @@ class CloudControlsPartnerCoreTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_tracing_stub.cc b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_tracing_stub.cc index 20ec1742f85af..c3d058793f0ba 100644 --- a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_tracing_stub.cc +++ b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudcontrolspartner_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudControlsPartnerCoreTracingStub::CloudControlsPartnerCoreTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -186,19 +187,15 @@ Status CloudControlsPartnerCoreTracingStub::DeleteCustomer( child_->DeleteCustomer(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCloudControlsPartnerCoreTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudcontrolspartner_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_tracing_stub.h b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_tracing_stub.h index 21623dfd3d980..20a0ea5885a56 100644 --- a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_tracing_stub.h +++ b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_core_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudcontrolspartner_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudControlsPartnerCoreTracingStub : public CloudControlsPartnerCoreStub { public: @@ -107,8 +108,6 @@ class CloudControlsPartnerCoreTracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -124,4 +123,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDCONTROLSPARTNER_V1_INTERNAL_CLOUD_CONTROLS_PARTNER_CORE_TRACING_STUB_H diff --git a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_auth_decorator.cc b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_auth_decorator.cc index 5fd5020ad7873..edeeedac2e7d2 100644 --- a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_auth_decorator.cc +++ b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/cloudcontrolspartner/v1/monitoring.proto #include "google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_auth_decorator.h" -#include +#include "google/cloud/cloudcontrolspartner/v1/monitoring.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudcontrolspartner_v1_internal { @@ -55,3 +58,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudcontrolspartner_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_auth_decorator.h b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_auth_decorator.h index 9298293652631..bd2050474e464 100644 --- a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_auth_decorator.h +++ b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudcontrolspartner_v1_internal { @@ -60,4 +63,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDCONTROLSPARTNER_V1_INTERNAL_CLOUD_CONTROLS_PARTNER_MONITORING_AUTH_DECORATOR_H diff --git a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_logging_decorator.cc b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_logging_decorator.cc index 72241c42dbb8d..c96e3cd7765d0 100644 --- a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_logging_decorator.cc +++ b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/cloudcontrolspartner/v1/monitoring.proto #include "google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_logging_decorator.h" +#include "google/cloud/cloudcontrolspartner/v1/monitoring.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudcontrolspartner_v1_internal { @@ -68,3 +71,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudcontrolspartner_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_logging_decorator.h b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_logging_decorator.h index 03333779aedb3..9e8206b598cdd 100644 --- a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_logging_decorator.h +++ b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudcontrolspartner_v1_internal { @@ -60,4 +63,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDCONTROLSPARTNER_V1_INTERNAL_CLOUD_CONTROLS_PARTNER_MONITORING_LOGGING_DECORATOR_H diff --git a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_metadata_decorator.cc b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_metadata_decorator.cc index 3aae0753c892c..89c818ea7d1a1 100644 --- a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_metadata_decorator.cc +++ b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/cloudcontrolspartner/v1/monitoring.proto #include "google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_metadata_decorator.h" +#include "google/cloud/cloudcontrolspartner/v1/monitoring.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudcontrolspartner_v1_internal { @@ -81,3 +85,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudcontrolspartner_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_metadata_decorator.h b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_metadata_decorator.h index 62c20a5f9228a..311847c880623 100644 --- a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_metadata_decorator.h +++ b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudcontrolspartner_v1_internal { @@ -66,4 +69,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDCONTROLSPARTNER_V1_INTERNAL_CLOUD_CONTROLS_PARTNER_MONITORING_METADATA_DECORATOR_H diff --git a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_option_defaults.cc b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_option_defaults.cc index dd1d8d2e8d397..95f41dc8714bf 100644 --- a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_option_defaults.cc +++ b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_option_defaults.cc @@ -46,7 +46,7 @@ Options CloudControlsPartnerMonitoringDefaultOptions(Options options) { CloudControlsPartnerMonitoringRetryPolicyOption>( cloudcontrolspartner_v1:: CloudControlsPartnerMonitoringLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudcontrolspartner_v1_internal { @@ -61,3 +64,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudcontrolspartner_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_stub.h b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_stub.h index e1020dee7b163..d2953a12a6d7a 100644 --- a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_stub.h +++ b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDCONTROLSPARTNER_V1_INTERNAL_CLOUD_CONTROLS_PARTNER_MONITORING_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDCONTROLSPARTNER_V1_INTERNAL_CLOUD_CONTROLS_PARTNER_MONITORING_STUB_H +#include "google/cloud/cloudcontrolspartner/v1/monitoring.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudcontrolspartner_v1_internal { @@ -80,4 +83,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDCONTROLSPARTNER_V1_INTERNAL_CLOUD_CONTROLS_PARTNER_MONITORING_STUB_H diff --git a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_stub_factory.cc b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_stub_factory.cc index 7f5e7d4dc1b08..cbf8070584488 100644 --- a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_stub_factory.cc +++ b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_metadata_decorator.h" #include "google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_stub.h" #include "google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_tracing_stub.h" +#include "google/cloud/cloudcontrolspartner/v1/monitoring.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudcontrolspartner_v1_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudcontrolspartner_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_stub_factory.h b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_stub_factory.h index 5623fd8ddd8f6..8c47395f1e6f8 100644 --- a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_stub_factory.h +++ b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudcontrolspartner_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDCONTROLSPARTNER_V1_INTERNAL_CLOUD_CONTROLS_PARTNER_MONITORING_STUB_FACTORY_H diff --git a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_tracing_connection.cc b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_tracing_connection.cc index 64c1eb6fd7c6a..bdb57665b79a4 100644 --- a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_tracing_connection.cc +++ b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace cloudcontrolspartner_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudControlsPartnerMonitoringTracingConnection:: CloudControlsPartnerMonitoringTracingConnection( std::shared_ptr< @@ -60,20 +58,16 @@ CloudControlsPartnerMonitoringTracingConnection::GetViolation( return internal::EndSpan(*span, child_->GetViolation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr< cloudcontrolspartner_v1::CloudControlsPartnerMonitoringConnection> MakeCloudControlsPartnerMonitoringTracingConnection( std::shared_ptr< cloudcontrolspartner_v1::CloudControlsPartnerMonitoringConnection> conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_tracing_connection.h b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_tracing_connection.h index 74459492a29a8..c5caecc2262ad 100644 --- a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_tracing_connection.h +++ b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace cloudcontrolspartner_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudControlsPartnerMonitoringTracingConnection : public cloudcontrolspartner_v1::CloudControlsPartnerMonitoringConnection { public: @@ -56,8 +54,6 @@ class CloudControlsPartnerMonitoringTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_tracing_stub.cc b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_tracing_stub.cc index 5aa5eb9ea3911..367c73d5a13df 100644 --- a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_tracing_stub.cc +++ b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudcontrolspartner_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudControlsPartnerMonitoringTracingStub:: CloudControlsPartnerMonitoringTracingStub( std::shared_ptr child) @@ -61,20 +62,16 @@ CloudControlsPartnerMonitoringTracingStub::GetViolation( child_->GetViolation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCloudControlsPartnerMonitoringTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared( std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudcontrolspartner_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_tracing_stub.h b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_tracing_stub.h index 5b49beaa4b5bb..2cf6eeecbfd57 100644 --- a/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_tracing_stub.h +++ b/google/cloud/cloudcontrolspartner/v1/internal/cloud_controls_partner_monitoring_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudcontrolspartner_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudControlsPartnerMonitoringTracingStub : public CloudControlsPartnerMonitoringStub { public: @@ -57,8 +58,6 @@ class CloudControlsPartnerMonitoringTracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -74,4 +73,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDCONTROLSPARTNER_V1_INTERNAL_CLOUD_CONTROLS_PARTNER_MONITORING_TRACING_STUB_H diff --git a/google/cloud/cloudquotas/BUILD.bazel b/google/cloud/cloudquotas/BUILD.bazel index 7929be1bd3354..c5960f7fe9a56 100644 --- a/google/cloud/cloudquotas/BUILD.bazel +++ b/google/cloud/cloudquotas/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/api/cloudquotas/v1:cloudquotas_cc_grpc", + "@googleapis//google/api/cloudquotas/v1:cloudquotas_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/cloudquotas/CMakeLists.txt b/google/cloud/cloudquotas/CMakeLists.txt index d80fe662aff6d..95de9c1540d16 100644 --- a/google/cloud/cloudquotas/CMakeLists.txt +++ b/google/cloud/cloudquotas/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(cloudquotas "Cloud Quotas API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(cloudquotas_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/cloudquotas/quickstart/.bazelrc b/google/cloud/cloudquotas/quickstart/.bazelrc index 15d5c055db074..343e7f623d628 100644 --- a/google/cloud/cloudquotas/quickstart/.bazelrc +++ b/google/cloud/cloudquotas/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/cloudquotas/quickstart/CMakeLists.txt b/google/cloud/cloudquotas/quickstart/CMakeLists.txt index 3b1aa9a07fb31..830fb3b016bc5 100644 --- a/google/cloud/cloudquotas/quickstart/CMakeLists.txt +++ b/google/cloud/cloudquotas/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Quotas API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-cloudquotas-quickstart CXX) find_package(google_cloud_cpp_cloudquotas REQUIRED) diff --git a/google/cloud/cloudquotas/v1/cloud_quotas_connection.h b/google/cloud/cloudquotas/v1/cloud_quotas_connection.h index 917d43bd1c271..efaf3c13b7cf9 100644 --- a/google/cloud/cloudquotas/v1/cloud_quotas_connection.h +++ b/google/cloud/cloudquotas/v1/cloud_quotas_connection.h @@ -27,7 +27,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/api/cloudquotas/v1/cloudquotas.pb.h" #include namespace google { diff --git a/google/cloud/cloudquotas/v1/cloud_quotas_connection_idempotency_policy.h b/google/cloud/cloudquotas/v1/cloud_quotas_connection_idempotency_policy.h index 95dd038997a5e..a4960d69bffd4 100644 --- a/google/cloud/cloudquotas/v1/cloud_quotas_connection_idempotency_policy.h +++ b/google/cloud/cloudquotas/v1/cloud_quotas_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/api/cloudquotas/v1/cloudquotas.grpc.pb.h" #include namespace google { diff --git a/google/cloud/cloudquotas/v1/internal/cloud_quotas_auth_decorator.cc b/google/cloud/cloudquotas/v1/internal/cloud_quotas_auth_decorator.cc index c1519f89e0f5e..12c7f8c71f48d 100644 --- a/google/cloud/cloudquotas/v1/internal/cloud_quotas_auth_decorator.cc +++ b/google/cloud/cloudquotas/v1/internal/cloud_quotas_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/api/cloudquotas/v1/cloudquotas.proto #include "google/cloud/cloudquotas/v1/internal/cloud_quotas_auth_decorator.h" -#include +#include "google/api/cloudquotas/v1/cloudquotas.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudquotas_v1_internal { @@ -88,3 +91,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudquotas_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudquotas/v1/internal/cloud_quotas_auth_decorator.h b/google/cloud/cloudquotas/v1/internal/cloud_quotas_auth_decorator.h index 41cac82933268..6eb9e264a4d5f 100644 --- a/google/cloud/cloudquotas/v1/internal/cloud_quotas_auth_decorator.h +++ b/google/cloud/cloudquotas/v1/internal/cloud_quotas_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudquotas_v1_internal { @@ -79,4 +82,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDQUOTAS_V1_INTERNAL_CLOUD_QUOTAS_AUTH_DECORATOR_H diff --git a/google/cloud/cloudquotas/v1/internal/cloud_quotas_logging_decorator.cc b/google/cloud/cloudquotas/v1/internal/cloud_quotas_logging_decorator.cc index 7c5f62a0ae59f..913dd7ef0e260 100644 --- a/google/cloud/cloudquotas/v1/internal/cloud_quotas_logging_decorator.cc +++ b/google/cloud/cloudquotas/v1/internal/cloud_quotas_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/cloudquotas/v1/internal/cloud_quotas_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/api/cloudquotas/v1/cloudquotas.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudquotas_v1_internal { @@ -116,3 +119,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudquotas_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudquotas/v1/internal/cloud_quotas_logging_decorator.h b/google/cloud/cloudquotas/v1/internal/cloud_quotas_logging_decorator.h index 9efc5cf31e215..b148071fae44d 100644 --- a/google/cloud/cloudquotas/v1/internal/cloud_quotas_logging_decorator.h +++ b/google/cloud/cloudquotas/v1/internal/cloud_quotas_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudquotas_v1_internal { @@ -79,4 +82,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDQUOTAS_V1_INTERNAL_CLOUD_QUOTAS_LOGGING_DECORATOR_H diff --git a/google/cloud/cloudquotas/v1/internal/cloud_quotas_metadata_decorator.cc b/google/cloud/cloudquotas/v1/internal/cloud_quotas_metadata_decorator.cc index 7919f263cb7a6..2b8691f27d8d2 100644 --- a/google/cloud/cloudquotas/v1/internal/cloud_quotas_metadata_decorator.cc +++ b/google/cloud/cloudquotas/v1/internal/cloud_quotas_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/cloudquotas/v1/internal/cloud_quotas_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/api/cloudquotas/v1/cloudquotas.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudquotas_v1_internal { @@ -117,3 +121,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudquotas_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudquotas/v1/internal/cloud_quotas_metadata_decorator.h b/google/cloud/cloudquotas/v1/internal/cloud_quotas_metadata_decorator.h index c93f58dfb9701..efea75d7d5a61 100644 --- a/google/cloud/cloudquotas/v1/internal/cloud_quotas_metadata_decorator.h +++ b/google/cloud/cloudquotas/v1/internal/cloud_quotas_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudquotas_v1_internal { @@ -84,4 +87,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDQUOTAS_V1_INTERNAL_CLOUD_QUOTAS_METADATA_DECORATOR_H diff --git a/google/cloud/cloudquotas/v1/internal/cloud_quotas_option_defaults.cc b/google/cloud/cloudquotas/v1/internal/cloud_quotas_option_defaults.cc index f5fa43eb2f075..141661fe14420 100644 --- a/google/cloud/cloudquotas/v1/internal/cloud_quotas_option_defaults.cc +++ b/google/cloud/cloudquotas/v1/internal/cloud_quotas_option_defaults.cc @@ -41,7 +41,7 @@ Options CloudQuotasDefaultOptions(Options options) { if (!options.has()) { options.set( cloudquotas_v1::CloudQuotasLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/cloudquotas/v1/internal/cloud_quotas_stub.cc b/google/cloud/cloudquotas/v1/internal/cloud_quotas_stub.cc index b104fa391eac8..576ec92ba8b65 100644 --- a/google/cloud/cloudquotas/v1/internal/cloud_quotas_stub.cc +++ b/google/cloud/cloudquotas/v1/internal/cloud_quotas_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/cloudquotas/v1/internal/cloud_quotas_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "google/api/cloudquotas/v1/cloudquotas.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudquotas_v1_internal { @@ -106,3 +109,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudquotas_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudquotas/v1/internal/cloud_quotas_stub.h b/google/cloud/cloudquotas/v1/internal/cloud_quotas_stub.h index 4abf7e9fbfc3c..e571d8bc2f1ec 100644 --- a/google/cloud/cloudquotas/v1/internal/cloud_quotas_stub.h +++ b/google/cloud/cloudquotas/v1/internal/cloud_quotas_stub.h @@ -22,10 +22,13 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/api/cloudquotas/v1/cloudquotas.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudquotas_v1_internal { @@ -117,4 +120,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDQUOTAS_V1_INTERNAL_CLOUD_QUOTAS_STUB_H diff --git a/google/cloud/cloudquotas/v1/internal/cloud_quotas_stub_factory.cc b/google/cloud/cloudquotas/v1/internal/cloud_quotas_stub_factory.cc index 422ee6ec9421a..68af3777c3662 100644 --- a/google/cloud/cloudquotas/v1/internal/cloud_quotas_stub_factory.cc +++ b/google/cloud/cloudquotas/v1/internal/cloud_quotas_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/api/cloudquotas/v1/cloudquotas.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudquotas_v1_internal { @@ -68,3 +71,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudquotas_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudquotas/v1/internal/cloud_quotas_stub_factory.h b/google/cloud/cloudquotas/v1/internal/cloud_quotas_stub_factory.h index 26fccec5bceec..f47f208ef02ef 100644 --- a/google/cloud/cloudquotas/v1/internal/cloud_quotas_stub_factory.h +++ b/google/cloud/cloudquotas/v1/internal/cloud_quotas_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudquotas_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDQUOTAS_V1_INTERNAL_CLOUD_QUOTAS_STUB_FACTORY_H diff --git a/google/cloud/cloudquotas/v1/internal/cloud_quotas_tracing_connection.cc b/google/cloud/cloudquotas/v1/internal/cloud_quotas_tracing_connection.cc index eda0ac4a1374b..eaf1cb269aee0 100644 --- a/google/cloud/cloudquotas/v1/internal/cloud_quotas_tracing_connection.cc +++ b/google/cloud/cloudquotas/v1/internal/cloud_quotas_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace cloudquotas_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudQuotasTracingConnection::CloudQuotasTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -92,16 +90,12 @@ CloudQuotasTracingConnection::UpdateQuotaPreference( return internal::EndSpan(*span, child_->UpdateQuotaPreference(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCloudQuotasTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/cloudquotas/v1/internal/cloud_quotas_tracing_connection.h b/google/cloud/cloudquotas/v1/internal/cloud_quotas_tracing_connection.h index 7ea809272ef85..7e08fd89ede5e 100644 --- a/google/cloud/cloudquotas/v1/internal/cloud_quotas_tracing_connection.h +++ b/google/cloud/cloudquotas/v1/internal/cloud_quotas_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace cloudquotas_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudQuotasTracingConnection : public cloudquotas_v1::CloudQuotasConnection { public: @@ -67,8 +65,6 @@ class CloudQuotasTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/cloudquotas/v1/internal/cloud_quotas_tracing_stub.cc b/google/cloud/cloudquotas/v1/internal/cloud_quotas_tracing_stub.cc index e54613bdd9431..00f48fc22be00 100644 --- a/google/cloud/cloudquotas/v1/internal/cloud_quotas_tracing_stub.cc +++ b/google/cloud/cloudquotas/v1/internal/cloud_quotas_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudquotas_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudQuotasTracingStub::CloudQuotasTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -104,18 +105,14 @@ CloudQuotasTracingStub::UpdateQuotaPreference( context, *span, child_->UpdateQuotaPreference(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCloudQuotasTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudquotas_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudquotas/v1/internal/cloud_quotas_tracing_stub.h b/google/cloud/cloudquotas/v1/internal/cloud_quotas_tracing_stub.h index f401ea10b2c7e..c0c34afb022e6 100644 --- a/google/cloud/cloudquotas/v1/internal/cloud_quotas_tracing_stub.h +++ b/google/cloud/cloudquotas/v1/internal/cloud_quotas_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudquotas_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudQuotasTracingStub : public CloudQuotasStub { public: ~CloudQuotasTracingStub() override = default; @@ -75,8 +76,6 @@ class CloudQuotasTracingStub : public CloudQuotasStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -91,4 +90,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDQUOTAS_V1_INTERNAL_CLOUD_QUOTAS_TRACING_STUB_H diff --git a/google/cloud/cloudsecuritycompliance/BUILD.bazel b/google/cloud/cloudsecuritycompliance/BUILD.bazel index b28ec4f51d6ce..7941ef2a97956 100644 --- a/google/cloud/cloudsecuritycompliance/BUILD.bazel +++ b/google/cloud/cloudsecuritycompliance/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/cloudsecuritycompliance/v1:cloudsecuritycompliance_cc_grpc", + "@googleapis//google/cloud/cloudsecuritycompliance/v1:cloudsecuritycompliance_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/cloudsecuritycompliance/quickstart/CMakeLists.txt b/google/cloud/cloudsecuritycompliance/quickstart/CMakeLists.txt index fb5a2b6f561e0..596ac7dc6adc6 100644 --- a/google/cloud/cloudsecuritycompliance/quickstart/CMakeLists.txt +++ b/google/cloud/cloudsecuritycompliance/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Security Compliance API C++ client # library from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-cloudsecuritycompliance-quickstart CXX) find_package(google_cloud_cpp_cloudsecuritycompliance REQUIRED) diff --git a/google/cloud/cloudsecuritycompliance/v1/config_connection.h b/google/cloud/cloudsecuritycompliance/v1/config_connection.h index f022b6c558367..a32f579853584 100644 --- a/google/cloud/cloudsecuritycompliance/v1/config_connection.h +++ b/google/cloud/cloudsecuritycompliance/v1/config_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDSECURITYCOMPLIANCE_V1_CONFIG_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDSECURITYCOMPLIANCE_V1_CONFIG_CONNECTION_H +#include "google/cloud/cloudsecuritycompliance/v1/config.pb.h" #include "google/cloud/cloudsecuritycompliance/v1/config_connection_idempotency_policy.h" #include "google/cloud/cloudsecuritycompliance/v1/internal/config_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/cloudsecuritycompliance/v1/config_connection_idempotency_policy.h b/google/cloud/cloudsecuritycompliance/v1/config_connection_idempotency_policy.h index b4a9e65df5ea3..92fa468039262 100644 --- a/google/cloud/cloudsecuritycompliance/v1/config_connection_idempotency_policy.h +++ b/google/cloud/cloudsecuritycompliance/v1/config_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDSECURITYCOMPLIANCE_V1_CONFIG_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDSECURITYCOMPLIANCE_V1_CONFIG_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/cloudsecuritycompliance/v1/config.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/cloudsecuritycompliance/v1/deployment_client.h b/google/cloud/cloudsecuritycompliance/v1/deployment_client.h index c1c31ef98dd49..7c3c2ca173650 100644 --- a/google/cloud/cloudsecuritycompliance/v1/deployment_client.h +++ b/google/cloud/cloudsecuritycompliance/v1/deployment_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/cloudsecuritycompliance/v1/deployment_connection.h b/google/cloud/cloudsecuritycompliance/v1/deployment_connection.h index 21eff2cbd974a..71f94e4837bfc 100644 --- a/google/cloud/cloudsecuritycompliance/v1/deployment_connection.h +++ b/google/cloud/cloudsecuritycompliance/v1/deployment_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDSECURITYCOMPLIANCE_V1_DEPLOYMENT_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDSECURITYCOMPLIANCE_V1_DEPLOYMENT_CONNECTION_H +#include "google/cloud/cloudsecuritycompliance/v1/deployment.pb.h" #include "google/cloud/cloudsecuritycompliance/v1/deployment_connection_idempotency_policy.h" #include "google/cloud/cloudsecuritycompliance/v1/internal/deployment_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/cloudsecuritycompliance/v1/deployment_connection_idempotency_policy.h b/google/cloud/cloudsecuritycompliance/v1/deployment_connection_idempotency_policy.h index 7244ee72d7051..cd588d672dc0d 100644 --- a/google/cloud/cloudsecuritycompliance/v1/deployment_connection_idempotency_policy.h +++ b/google/cloud/cloudsecuritycompliance/v1/deployment_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDSECURITYCOMPLIANCE_V1_DEPLOYMENT_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDSECURITYCOMPLIANCE_V1_DEPLOYMENT_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/cloudsecuritycompliance/v1/deployment.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/cloudsecuritycompliance/v1/internal/config_auth_decorator.cc b/google/cloud/cloudsecuritycompliance/v1/internal/config_auth_decorator.cc index 98a7284432885..88abc6338fcd0 100644 --- a/google/cloud/cloudsecuritycompliance/v1/internal/config_auth_decorator.cc +++ b/google/cloud/cloudsecuritycompliance/v1/internal/config_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/cloudsecuritycompliance/v1/config.proto #include "google/cloud/cloudsecuritycompliance/v1/internal/config_auth_decorator.h" -#include +#include "google/cloud/cloudsecuritycompliance/v1/config.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudsecuritycompliance_v1_internal { @@ -183,3 +186,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudsecuritycompliance_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudsecuritycompliance/v1/internal/config_auth_decorator.h b/google/cloud/cloudsecuritycompliance/v1/internal/config_auth_decorator.h index 94271389027e2..4ae7a6fd0b384 100644 --- a/google/cloud/cloudsecuritycompliance/v1/internal/config_auth_decorator.h +++ b/google/cloud/cloudsecuritycompliance/v1/internal/config_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudsecuritycompliance_v1_internal { @@ -127,4 +130,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDSECURITYCOMPLIANCE_V1_INTERNAL_CONFIG_AUTH_DECORATOR_H diff --git a/google/cloud/cloudsecuritycompliance/v1/internal/config_logging_decorator.cc b/google/cloud/cloudsecuritycompliance/v1/internal/config_logging_decorator.cc index 6849f22f61f79..6d39669ccbc58 100644 --- a/google/cloud/cloudsecuritycompliance/v1/internal/config_logging_decorator.cc +++ b/google/cloud/cloudsecuritycompliance/v1/internal/config_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/cloudsecuritycompliance/v1/config.proto #include "google/cloud/cloudsecuritycompliance/v1/internal/config_logging_decorator.h" +#include "google/cloud/cloudsecuritycompliance/v1/config.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudsecuritycompliance_v1_internal { @@ -246,3 +249,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudsecuritycompliance_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudsecuritycompliance/v1/internal/config_logging_decorator.h b/google/cloud/cloudsecuritycompliance/v1/internal/config_logging_decorator.h index e2d4b1b6810c9..f25adbe7050de 100644 --- a/google/cloud/cloudsecuritycompliance/v1/internal/config_logging_decorator.h +++ b/google/cloud/cloudsecuritycompliance/v1/internal/config_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudsecuritycompliance_v1_internal { @@ -127,4 +130,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDSECURITYCOMPLIANCE_V1_INTERNAL_CONFIG_LOGGING_DECORATOR_H diff --git a/google/cloud/cloudsecuritycompliance/v1/internal/config_metadata_decorator.cc b/google/cloud/cloudsecuritycompliance/v1/internal/config_metadata_decorator.cc index e81e290d578ff..1433d42f2b7b0 100644 --- a/google/cloud/cloudsecuritycompliance/v1/internal/config_metadata_decorator.cc +++ b/google/cloud/cloudsecuritycompliance/v1/internal/config_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/cloudsecuritycompliance/v1/config.proto #include "google/cloud/cloudsecuritycompliance/v1/internal/config_metadata_decorator.h" +#include "google/cloud/cloudsecuritycompliance/v1/config.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudsecuritycompliance_v1_internal { @@ -212,3 +216,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudsecuritycompliance_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudsecuritycompliance/v1/internal/config_metadata_decorator.h b/google/cloud/cloudsecuritycompliance/v1/internal/config_metadata_decorator.h index 377fa220b19d7..5390a7fd96aae 100644 --- a/google/cloud/cloudsecuritycompliance/v1/internal/config_metadata_decorator.h +++ b/google/cloud/cloudsecuritycompliance/v1/internal/config_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudsecuritycompliance_v1_internal { @@ -132,4 +135,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDSECURITYCOMPLIANCE_V1_INTERNAL_CONFIG_METADATA_DECORATOR_H diff --git a/google/cloud/cloudsecuritycompliance/v1/internal/config_option_defaults.cc b/google/cloud/cloudsecuritycompliance/v1/internal/config_option_defaults.cc index deac9cf3e3a21..261472fa914e4 100644 --- a/google/cloud/cloudsecuritycompliance/v1/internal/config_option_defaults.cc +++ b/google/cloud/cloudsecuritycompliance/v1/internal/config_option_defaults.cc @@ -42,7 +42,7 @@ Options ConfigDefaultOptions(Options options) { if (!options.has()) { options.set( cloudsecuritycompliance_v1::ConfigLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/cloudsecuritycompliance/v1/internal/config_stub.cc b/google/cloud/cloudsecuritycompliance/v1/internal/config_stub.cc index f73ef34de1e36..a28a3736bed07 100644 --- a/google/cloud/cloudsecuritycompliance/v1/internal/config_stub.cc +++ b/google/cloud/cloudsecuritycompliance/v1/internal/config_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/cloudsecuritycompliance/v1/config.proto #include "google/cloud/cloudsecuritycompliance/v1/internal/config_stub.h" +#include "google/cloud/cloudsecuritycompliance/v1/config.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudsecuritycompliance_v1_internal { @@ -231,3 +234,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudsecuritycompliance_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudsecuritycompliance/v1/internal/config_stub.h b/google/cloud/cloudsecuritycompliance/v1/internal/config_stub.h index 1307478c4d341..95da7771f34a7 100644 --- a/google/cloud/cloudsecuritycompliance/v1/internal/config_stub.h +++ b/google/cloud/cloudsecuritycompliance/v1/internal/config_stub.h @@ -19,15 +19,18 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDSECURITYCOMPLIANCE_V1_INTERNAL_CONFIG_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDSECURITYCOMPLIANCE_V1_INTERNAL_CONFIG_STUB_H +#include "google/cloud/cloudsecuritycompliance/v1/config.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudsecuritycompliance_v1_internal { @@ -228,4 +231,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDSECURITYCOMPLIANCE_V1_INTERNAL_CONFIG_STUB_H diff --git a/google/cloud/cloudsecuritycompliance/v1/internal/config_stub_factory.cc b/google/cloud/cloudsecuritycompliance/v1/internal/config_stub_factory.cc index 5c513355b7010..69da477d228a7 100644 --- a/google/cloud/cloudsecuritycompliance/v1/internal/config_stub_factory.cc +++ b/google/cloud/cloudsecuritycompliance/v1/internal/config_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/cloudsecuritycompliance/v1/config.proto #include "google/cloud/cloudsecuritycompliance/v1/internal/config_stub_factory.h" +#include "google/cloud/cloudsecuritycompliance/v1/config.grpc.pb.h" #include "google/cloud/cloudsecuritycompliance/v1/internal/config_auth_decorator.h" #include "google/cloud/cloudsecuritycompliance/v1/internal/config_logging_decorator.h" #include "google/cloud/cloudsecuritycompliance/v1/internal/config_metadata_decorator.h" #include "google/cloud/cloudsecuritycompliance/v1/internal/config_stub.h" #include "google/cloud/cloudsecuritycompliance/v1/internal/config_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudsecuritycompliance_v1_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudsecuritycompliance_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudsecuritycompliance/v1/internal/config_stub_factory.h b/google/cloud/cloudsecuritycompliance/v1/internal/config_stub_factory.h index 7f818f74ad38b..2276228357928 100644 --- a/google/cloud/cloudsecuritycompliance/v1/internal/config_stub_factory.h +++ b/google/cloud/cloudsecuritycompliance/v1/internal/config_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudsecuritycompliance_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDSECURITYCOMPLIANCE_V1_INTERNAL_CONFIG_STUB_FACTORY_H diff --git a/google/cloud/cloudsecuritycompliance/v1/internal/config_tracing_connection.cc b/google/cloud/cloudsecuritycompliance/v1/internal/config_tracing_connection.cc index a8e43b8a54d5c..7d34da1fa9df4 100644 --- a/google/cloud/cloudsecuritycompliance/v1/internal/config_tracing_connection.cc +++ b/google/cloud/cloudsecuritycompliance/v1/internal/config_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace cloudsecuritycompliance_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ConfigTracingConnection::ConfigTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -191,16 +189,12 @@ Status ConfigTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeConfigTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/cloudsecuritycompliance/v1/internal/config_tracing_connection.h b/google/cloud/cloudsecuritycompliance/v1/internal/config_tracing_connection.h index 0e1e4476d0274..fb0c2adba5983 100644 --- a/google/cloud/cloudsecuritycompliance/v1/internal/config_tracing_connection.h +++ b/google/cloud/cloudsecuritycompliance/v1/internal/config_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace cloudsecuritycompliance_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ConfigTracingConnection : public cloudsecuritycompliance_v1::ConfigConnection { public: @@ -107,8 +105,6 @@ class ConfigTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/cloudsecuritycompliance/v1/internal/config_tracing_stub.cc b/google/cloud/cloudsecuritycompliance/v1/internal/config_tracing_stub.cc index eee6450de15ea..d83e9b2c00bb2 100644 --- a/google/cloud/cloudsecuritycompliance/v1/internal/config_tracing_stub.cc +++ b/google/cloud/cloudsecuritycompliance/v1/internal/config_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudsecuritycompliance_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ConfigTracingStub::ConfigTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -227,18 +228,14 @@ Status ConfigTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeConfigTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudsecuritycompliance_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudsecuritycompliance/v1/internal/config_tracing_stub.h b/google/cloud/cloudsecuritycompliance/v1/internal/config_tracing_stub.h index 7a5c7e63bdd3d..7e6e9bc7ee0f3 100644 --- a/google/cloud/cloudsecuritycompliance/v1/internal/config_tracing_stub.h +++ b/google/cloud/cloudsecuritycompliance/v1/internal/config_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudsecuritycompliance_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ConfigTracingStub : public ConfigStub { public: ~ConfigTracingStub() override = default; @@ -123,8 +124,6 @@ class ConfigTracingStub : public ConfigStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -139,4 +138,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDSECURITYCOMPLIANCE_V1_INTERNAL_CONFIG_TRACING_STUB_H diff --git a/google/cloud/cloudsecuritycompliance/v1/internal/deployment_auth_decorator.cc b/google/cloud/cloudsecuritycompliance/v1/internal/deployment_auth_decorator.cc index 8052c7c8622cf..c574ee5fa7570 100644 --- a/google/cloud/cloudsecuritycompliance/v1/internal/deployment_auth_decorator.cc +++ b/google/cloud/cloudsecuritycompliance/v1/internal/deployment_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/cloudsecuritycompliance/v1/deployment.proto #include "google/cloud/cloudsecuritycompliance/v1/internal/deployment_auth_decorator.h" -#include +#include "google/cloud/cloudsecuritycompliance/v1/deployment.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudsecuritycompliance_v1_internal { @@ -225,3 +228,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudsecuritycompliance_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudsecuritycompliance/v1/internal/deployment_auth_decorator.h b/google/cloud/cloudsecuritycompliance/v1/internal/deployment_auth_decorator.h index ef3a51305777e..80e21aeaebc07 100644 --- a/google/cloud/cloudsecuritycompliance/v1/internal/deployment_auth_decorator.h +++ b/google/cloud/cloudsecuritycompliance/v1/internal/deployment_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/cloudsecuritycompliance/v1/internal/deployment_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudsecuritycompliance_v1_internal { @@ -137,4 +140,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDSECURITYCOMPLIANCE_V1_INTERNAL_DEPLOYMENT_AUTH_DECORATOR_H diff --git a/google/cloud/cloudsecuritycompliance/v1/internal/deployment_connection_impl.h b/google/cloud/cloudsecuritycompliance/v1/internal/deployment_connection_impl.h index 546036f6432a8..1b88dea1c6df7 100644 --- a/google/cloud/cloudsecuritycompliance/v1/internal/deployment_connection_impl.h +++ b/google/cloud/cloudsecuritycompliance/v1/internal/deployment_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/cloudsecuritycompliance/v1/internal/deployment_logging_decorator.cc b/google/cloud/cloudsecuritycompliance/v1/internal/deployment_logging_decorator.cc index 6b123abd3da72..09ca14fd521b4 100644 --- a/google/cloud/cloudsecuritycompliance/v1/internal/deployment_logging_decorator.cc +++ b/google/cloud/cloudsecuritycompliance/v1/internal/deployment_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/cloudsecuritycompliance/v1/deployment.proto #include "google/cloud/cloudsecuritycompliance/v1/internal/deployment_logging_decorator.h" +#include "google/cloud/cloudsecuritycompliance/v1/deployment.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudsecuritycompliance_v1_internal { @@ -268,3 +271,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudsecuritycompliance_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudsecuritycompliance/v1/internal/deployment_logging_decorator.h b/google/cloud/cloudsecuritycompliance/v1/internal/deployment_logging_decorator.h index b45f74f218c31..2a66763abb2e3 100644 --- a/google/cloud/cloudsecuritycompliance/v1/internal/deployment_logging_decorator.h +++ b/google/cloud/cloudsecuritycompliance/v1/internal/deployment_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/cloudsecuritycompliance/v1/internal/deployment_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudsecuritycompliance_v1_internal { @@ -137,4 +140,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDSECURITYCOMPLIANCE_V1_INTERNAL_DEPLOYMENT_LOGGING_DECORATOR_H diff --git a/google/cloud/cloudsecuritycompliance/v1/internal/deployment_metadata_decorator.cc b/google/cloud/cloudsecuritycompliance/v1/internal/deployment_metadata_decorator.cc index e63f9893108c6..1adae9892c2c4 100644 --- a/google/cloud/cloudsecuritycompliance/v1/internal/deployment_metadata_decorator.cc +++ b/google/cloud/cloudsecuritycompliance/v1/internal/deployment_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/cloudsecuritycompliance/v1/deployment.proto #include "google/cloud/cloudsecuritycompliance/v1/internal/deployment_metadata_decorator.h" +#include "google/cloud/cloudsecuritycompliance/v1/deployment.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudsecuritycompliance_v1_internal { @@ -222,3 +226,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudsecuritycompliance_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudsecuritycompliance/v1/internal/deployment_metadata_decorator.h b/google/cloud/cloudsecuritycompliance/v1/internal/deployment_metadata_decorator.h index 36cb3b8c9287a..e58f1bec24fd5 100644 --- a/google/cloud/cloudsecuritycompliance/v1/internal/deployment_metadata_decorator.h +++ b/google/cloud/cloudsecuritycompliance/v1/internal/deployment_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/cloudsecuritycompliance/v1/internal/deployment_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudsecuritycompliance_v1_internal { @@ -142,4 +145,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDSECURITYCOMPLIANCE_V1_INTERNAL_DEPLOYMENT_METADATA_DECORATOR_H diff --git a/google/cloud/cloudsecuritycompliance/v1/internal/deployment_option_defaults.cc b/google/cloud/cloudsecuritycompliance/v1/internal/deployment_option_defaults.cc index 712e23ae7da3c..94ba05e81788a 100644 --- a/google/cloud/cloudsecuritycompliance/v1/internal/deployment_option_defaults.cc +++ b/google/cloud/cloudsecuritycompliance/v1/internal/deployment_option_defaults.cc @@ -42,7 +42,7 @@ Options DeploymentDefaultOptions(Options options) { if (!options.has()) { options.set( cloudsecuritycompliance_v1::DeploymentLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/cloudsecuritycompliance/v1/internal/deployment_stub.cc b/google/cloud/cloudsecuritycompliance/v1/internal/deployment_stub.cc index 06db4eb09d964..b1b8d336f2170 100644 --- a/google/cloud/cloudsecuritycompliance/v1/internal/deployment_stub.cc +++ b/google/cloud/cloudsecuritycompliance/v1/internal/deployment_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/cloudsecuritycompliance/v1/deployment.proto #include "google/cloud/cloudsecuritycompliance/v1/internal/deployment_stub.h" +#include "google/cloud/cloudsecuritycompliance/v1/deployment.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudsecuritycompliance_v1_internal { @@ -270,3 +273,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudsecuritycompliance_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudsecuritycompliance/v1/internal/deployment_stub.h b/google/cloud/cloudsecuritycompliance/v1/internal/deployment_stub.h index d9078cc571e05..d2d1e6253cbd4 100644 --- a/google/cloud/cloudsecuritycompliance/v1/internal/deployment_stub.h +++ b/google/cloud/cloudsecuritycompliance/v1/internal/deployment_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDSECURITYCOMPLIANCE_V1_INTERNAL_DEPLOYMENT_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDSECURITYCOMPLIANCE_V1_INTERNAL_DEPLOYMENT_STUB_H +#include "google/cloud/cloudsecuritycompliance/v1/deployment.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudsecuritycompliance_v1_internal { @@ -247,4 +250,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDSECURITYCOMPLIANCE_V1_INTERNAL_DEPLOYMENT_STUB_H diff --git a/google/cloud/cloudsecuritycompliance/v1/internal/deployment_stub_factory.cc b/google/cloud/cloudsecuritycompliance/v1/internal/deployment_stub_factory.cc index 62a23594d5751..26f57bbe06815 100644 --- a/google/cloud/cloudsecuritycompliance/v1/internal/deployment_stub_factory.cc +++ b/google/cloud/cloudsecuritycompliance/v1/internal/deployment_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/cloudsecuritycompliance/v1/deployment.proto #include "google/cloud/cloudsecuritycompliance/v1/internal/deployment_stub_factory.h" +#include "google/cloud/cloudsecuritycompliance/v1/deployment.grpc.pb.h" #include "google/cloud/cloudsecuritycompliance/v1/internal/deployment_auth_decorator.h" #include "google/cloud/cloudsecuritycompliance/v1/internal/deployment_logging_decorator.h" #include "google/cloud/cloudsecuritycompliance/v1/internal/deployment_metadata_decorator.h" #include "google/cloud/cloudsecuritycompliance/v1/internal/deployment_stub.h" #include "google/cloud/cloudsecuritycompliance/v1/internal/deployment_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudsecuritycompliance_v1_internal { @@ -74,3 +77,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudsecuritycompliance_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudsecuritycompliance/v1/internal/deployment_stub_factory.h b/google/cloud/cloudsecuritycompliance/v1/internal/deployment_stub_factory.h index 5b32876f813c0..460c8a87eebaf 100644 --- a/google/cloud/cloudsecuritycompliance/v1/internal/deployment_stub_factory.h +++ b/google/cloud/cloudsecuritycompliance/v1/internal/deployment_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudsecuritycompliance_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDSECURITYCOMPLIANCE_V1_INTERNAL_DEPLOYMENT_STUB_FACTORY_H diff --git a/google/cloud/cloudsecuritycompliance/v1/internal/deployment_tracing_connection.cc b/google/cloud/cloudsecuritycompliance/v1/internal/deployment_tracing_connection.cc index 5a1f123d62546..53f06497763cb 100644 --- a/google/cloud/cloudsecuritycompliance/v1/internal/deployment_tracing_connection.cc +++ b/google/cloud/cloudsecuritycompliance/v1/internal/deployment_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace cloudsecuritycompliance_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DeploymentTracingConnection::DeploymentTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -211,16 +209,12 @@ Status DeploymentTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDeploymentTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/cloudsecuritycompliance/v1/internal/deployment_tracing_connection.h b/google/cloud/cloudsecuritycompliance/v1/internal/deployment_tracing_connection.h index 5d27fee5b3fbf..1792bc99685e7 100644 --- a/google/cloud/cloudsecuritycompliance/v1/internal/deployment_tracing_connection.h +++ b/google/cloud/cloudsecuritycompliance/v1/internal/deployment_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace cloudsecuritycompliance_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DeploymentTracingConnection : public cloudsecuritycompliance_v1::DeploymentConnection { public: @@ -113,8 +111,6 @@ class DeploymentTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/cloudsecuritycompliance/v1/internal/deployment_tracing_stub.cc b/google/cloud/cloudsecuritycompliance/v1/internal/deployment_tracing_stub.cc index 08a3d5fbc5b61..0692331588484 100644 --- a/google/cloud/cloudsecuritycompliance/v1/internal/deployment_tracing_stub.cc +++ b/google/cloud/cloudsecuritycompliance/v1/internal/deployment_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudsecuritycompliance_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DeploymentTracingStub::DeploymentTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -254,18 +255,14 @@ future DeploymentTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDeploymentTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloudsecuritycompliance_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/cloudsecuritycompliance/v1/internal/deployment_tracing_stub.h b/google/cloud/cloudsecuritycompliance/v1/internal/deployment_tracing_stub.h index 2801c15b62a2d..5972adaa08a85 100644 --- a/google/cloud/cloudsecuritycompliance/v1/internal/deployment_tracing_stub.h +++ b/google/cloud/cloudsecuritycompliance/v1/internal/deployment_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace cloudsecuritycompliance_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DeploymentTracingStub : public DeploymentStub { public: ~DeploymentTracingStub() override = default; @@ -132,8 +133,6 @@ class DeploymentTracingStub : public DeploymentStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -148,4 +147,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CLOUDSECURITYCOMPLIANCE_V1_INTERNAL_DEPLOYMENT_TRACING_STUB_H diff --git a/google/cloud/commerce/BUILD.bazel b/google/cloud/commerce/BUILD.bazel index 3f6c419fd9dee..90e894cc5492b 100644 --- a/google/cloud/commerce/BUILD.bazel +++ b/google/cloud/commerce/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["consumer/procurement/v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/commerce/consumer/procurement/v1:procurement_cc_grpc", + "@googleapis//google/cloud/commerce/consumer/procurement/v1:procurement_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/commerce/consumer/procurement/v1/consumer_procurement_client.h b/google/cloud/commerce/consumer/procurement/v1/consumer_procurement_client.h index 69e5e3c2a77c5..fd7711d77fa8f 100644 --- a/google/cloud/commerce/consumer/procurement/v1/consumer_procurement_client.h +++ b/google/cloud/commerce/consumer/procurement/v1/consumer_procurement_client.h @@ -27,7 +27,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/commerce/consumer/procurement/v1/consumer_procurement_connection.h b/google/cloud/commerce/consumer/procurement/v1/consumer_procurement_connection.h index 7d44e9f282bea..9780ce3871a8f 100644 --- a/google/cloud/commerce/consumer/procurement/v1/consumer_procurement_connection.h +++ b/google/cloud/commerce/consumer/procurement/v1/consumer_procurement_connection.h @@ -22,6 +22,7 @@ #include "google/cloud/commerce/consumer/procurement/v1/consumer_procurement_connection_idempotency_policy.h" #include "google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_retry_traits.h" +#include "google/cloud/commerce/consumer/procurement/v1/procurement_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -31,8 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/commerce/consumer/procurement/v1/consumer_procurement_connection_idempotency_policy.h b/google/cloud/commerce/consumer/procurement/v1/consumer_procurement_connection_idempotency_policy.h index 45a5553bb45cd..8a58ec4dfad26 100644 --- a/google/cloud/commerce/consumer/procurement/v1/consumer_procurement_connection_idempotency_policy.h +++ b/google/cloud/commerce/consumer/procurement/v1/consumer_procurement_connection_idempotency_policy.h @@ -20,10 +20,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMMERCE_CONSUMER_PROCUREMENT_V1_CONSUMER_PROCUREMENT_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMMERCE_CONSUMER_PROCUREMENT_V1_CONSUMER_PROCUREMENT_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/commerce/consumer/procurement/v1/procurement_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_auth_decorator.cc b/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_auth_decorator.cc index f3bbcdd155d1a..ea03dc4d1fda8 100644 --- a/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_auth_decorator.cc +++ b/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_auth_decorator.cc @@ -18,10 +18,13 @@ // google/cloud/commerce/consumer/procurement/v1/procurement_service.proto #include "google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_auth_decorator.h" -#include +#include "google/cloud/commerce/consumer/procurement/v1/procurement_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace commerce_consumer_procurement_v1_internal { @@ -194,3 +197,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace commerce_consumer_procurement_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_auth_decorator.h b/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_auth_decorator.h index 2cea83a32e97b..44f5526251d68 100644 --- a/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_auth_decorator.h +++ b/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_auth_decorator.h @@ -23,11 +23,14 @@ #include "google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace commerce_consumer_procurement_v1_internal { @@ -113,4 +116,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMMERCE_CONSUMER_PROCUREMENT_V1_INTERNAL_CONSUMER_PROCUREMENT_AUTH_DECORATOR_H diff --git a/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_connection_impl.h b/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_connection_impl.h index f90aa44cde680..aa9761f35bfaa 100644 --- a/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_connection_impl.h +++ b/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_connection_impl.h @@ -33,7 +33,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_logging_decorator.cc b/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_logging_decorator.cc index f4112ba4f7e03..12de786591e9d 100644 --- a/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_logging_decorator.cc +++ b/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_logging_decorator.cc @@ -18,14 +18,17 @@ // google/cloud/commerce/consumer/procurement/v1/procurement_service.proto #include "google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_logging_decorator.h" +#include "google/cloud/commerce/consumer/procurement/v1/procurement_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace commerce_consumer_procurement_v1_internal { @@ -217,3 +220,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace commerce_consumer_procurement_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_logging_decorator.h b/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_logging_decorator.h index fade59ebe8d23..b160fbca6ddde 100644 --- a/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_logging_decorator.h +++ b/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_logging_decorator.h @@ -23,11 +23,14 @@ #include "google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace commerce_consumer_procurement_v1_internal { @@ -114,4 +117,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMMERCE_CONSUMER_PROCUREMENT_V1_INTERNAL_CONSUMER_PROCUREMENT_LOGGING_DECORATOR_H diff --git a/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_metadata_decorator.cc b/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_metadata_decorator.cc index f2ebe935ebbd5..14f856e60a745 100644 --- a/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_metadata_decorator.cc +++ b/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_metadata_decorator.cc @@ -18,17 +18,21 @@ // google/cloud/commerce/consumer/procurement/v1/procurement_service.proto #include "google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_metadata_decorator.h" +#include "google/cloud/commerce/consumer/procurement/v1/procurement_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace commerce_consumer_procurement_v1_internal { @@ -183,3 +187,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace commerce_consumer_procurement_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_metadata_decorator.h b/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_metadata_decorator.h index b96fadbe17a51..668c094f88543 100644 --- a/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_metadata_decorator.h +++ b/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_metadata_decorator.h @@ -23,11 +23,14 @@ #include "google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace commerce_consumer_procurement_v1_internal { @@ -120,4 +123,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMMERCE_CONSUMER_PROCUREMENT_V1_INTERNAL_CONSUMER_PROCUREMENT_METADATA_DECORATOR_H diff --git a/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_option_defaults.cc b/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_option_defaults.cc index 5f4d354b2d219..9c9ccdd3139c4 100644 --- a/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_option_defaults.cc +++ b/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_option_defaults.cc @@ -47,7 +47,7 @@ Options ConsumerProcurementServiceDefaultOptions(Options options) { ConsumerProcurementServiceRetryPolicyOption>( commerce_consumer_procurement_v1:: ConsumerProcurementServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace commerce_consumer_procurement_v1_internal { @@ -213,3 +216,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace commerce_consumer_procurement_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_stub.h b/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_stub.h index 9fe9b058d6397..9844d3bf56b96 100644 --- a/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_stub.h +++ b/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_stub.h @@ -20,16 +20,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMMERCE_CONSUMER_PROCUREMENT_V1_INTERNAL_CONSUMER_PROCUREMENT_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMMERCE_CONSUMER_PROCUREMENT_V1_INTERNAL_CONSUMER_PROCUREMENT_STUB_H +#include "google/cloud/commerce/consumer/procurement/v1/procurement_service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace commerce_consumer_procurement_v1_internal { @@ -192,4 +195,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMMERCE_CONSUMER_PROCUREMENT_V1_INTERNAL_CONSUMER_PROCUREMENT_STUB_H diff --git a/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_stub_factory.cc b/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_stub_factory.cc index 4d153314b72c2..1337c400a4a57 100644 --- a/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_stub_factory.cc +++ b/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_stub_factory.cc @@ -23,17 +23,20 @@ #include "google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_metadata_decorator.h" #include "google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_stub.h" #include "google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_tracing_stub.h" +#include "google/cloud/commerce/consumer/procurement/v1/procurement_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace commerce_consumer_procurement_v1_internal { @@ -74,3 +77,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace commerce_consumer_procurement_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_stub_factory.h b/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_stub_factory.h index 58011a048ef98..2c465a5940215 100644 --- a/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_stub_factory.h +++ b/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_stub_factory.h @@ -26,6 +26,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace commerce_consumer_procurement_v1_internal { @@ -41,4 +44,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMMERCE_CONSUMER_PROCUREMENT_V1_INTERNAL_CONSUMER_PROCUREMENT_STUB_FACTORY_H diff --git a/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_tracing_connection.cc b/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_tracing_connection.cc index 49398380b8a2e..8afff2029f9e7 100644 --- a/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_tracing_connection.cc +++ b/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace commerce_consumer_procurement_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ConsumerProcurementServiceTracingConnection:: ConsumerProcurementServiceTracingConnection( std::shared_ptrGetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr< commerce_consumer_procurement_v1::ConsumerProcurementServiceConnection> MakeConsumerProcurementServiceTracingConnection( std::shared_ptr< commerce_consumer_procurement_v1::ConsumerProcurementServiceConnection> conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_tracing_connection.h b/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_tracing_connection.h index 602e0f14fb302..076064fda4f1a 100644 --- a/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_tracing_connection.h +++ b/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace commerce_consumer_procurement_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ConsumerProcurementServiceTracingConnection : public commerce_consumer_procurement_v1:: ConsumerProcurementServiceConnection { @@ -95,8 +93,6 @@ class ConsumerProcurementServiceTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_tracing_stub.cc b/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_tracing_stub.cc index a689dedf84605..917c166bbd782 100644 --- a/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_tracing_stub.cc +++ b/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_tracing_stub.cc @@ -22,13 +22,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace commerce_consumer_procurement_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ConsumerProcurementServiceTracingStub::ConsumerProcurementServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -201,20 +202,16 @@ future ConsumerProcurementServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeConsumerProcurementServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared( std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace commerce_consumer_procurement_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_tracing_stub.h b/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_tracing_stub.h index 18e3cf2a8744c..8fbb3d4eba596 100644 --- a/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_tracing_stub.h +++ b/google/cloud/commerce/consumer/procurement/v1/internal/consumer_procurement_tracing_stub.h @@ -26,13 +26,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace commerce_consumer_procurement_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ConsumerProcurementServiceTracingStub : public ConsumerProcurementServiceStub { public: @@ -110,8 +111,6 @@ class ConsumerProcurementServiceTracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -127,4 +126,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMMERCE_CONSUMER_PROCUREMENT_V1_INTERNAL_CONSUMER_PROCUREMENT_TRACING_STUB_H diff --git a/google/cloud/commerce/quickstart/.bazelrc b/google/cloud/commerce/quickstart/.bazelrc index 6777c6b4c95de..ec27511a60add 100644 --- a/google/cloud/commerce/quickstart/.bazelrc +++ b/google/cloud/commerce/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/commerce/quickstart/CMakeLists.txt b/google/cloud/commerce/quickstart/CMakeLists.txt index e9cb7c0280ce4..f94daef0c5337 100644 --- a/google/cloud/commerce/quickstart/CMakeLists.txt +++ b/google/cloud/commerce/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Commerce Consumer Procurement API C++ # client library from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-commerce-quickstart CXX) find_package(google_cloud_cpp_commerce REQUIRED) diff --git a/google/cloud/completion_queue_test.cc b/google/cloud/completion_queue_test.cc index 62e5bcdaa3287..6348e00089f05 100644 --- a/google/cloud/completion_queue_test.cc +++ b/google/cloud/completion_queue_test.cc @@ -20,8 +20,8 @@ #include "google/cloud/testing_util/fake_completion_queue_impl.h" #include "google/cloud/testing_util/mock_async_response_reader.h" #include "google/cloud/testing_util/status_matchers.h" -#include -#include +#include "google/protobuf/duration.pb.h" +#include "google/protobuf/timestamp.pb.h" #include #include #include diff --git a/google/cloud/composer/BUILD.bazel b/google/cloud/composer/BUILD.bazel index 3e4dab0ac399b..c55718ad0934c 100644 --- a/google/cloud/composer/BUILD.bazel +++ b/google/cloud/composer/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/orchestration/airflow/service/v1:service_cc_grpc", + "@googleapis//google/cloud/orchestration/airflow/service/v1:service_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/composer/CMakeLists.txt b/google/cloud/composer/CMakeLists.txt index 05a373cc88c5d..7c82919446123 100644 --- a/google/cloud/composer/CMakeLists.txt +++ b/google/cloud/composer/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(composer "Cloud Composer API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(composer_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/composer/environments_client.h b/google/cloud/composer/environments_client.h deleted file mode 100644 index f8b5505e24e85..0000000000000 --- a/google/cloud/composer/environments_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/orchestration/airflow/service/v1/environments.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_ENVIRONMENTS_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_ENVIRONMENTS_CLIENT_H - -#include "google/cloud/composer/environments_connection.h" -#include "google/cloud/composer/v1/environments_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in composer_v1 instead of the aliases defined in -/// this namespace. -namespace composer { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use composer_v1::EnvironmentsClient directly. -using ::google::cloud::composer_v1::EnvironmentsClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace composer -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_ENVIRONMENTS_CLIENT_H diff --git a/google/cloud/composer/environments_connection.h b/google/cloud/composer/environments_connection.h deleted file mode 100644 index c9183ed955800..0000000000000 --- a/google/cloud/composer/environments_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/orchestration/airflow/service/v1/environments.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_ENVIRONMENTS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_ENVIRONMENTS_CONNECTION_H - -#include "google/cloud/composer/environments_connection_idempotency_policy.h" -#include "google/cloud/composer/v1/environments_connection.h" - -namespace google { -namespace cloud { -namespace composer { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use composer_v1::MakeEnvironmentsConnection directly. -using ::google::cloud::composer_v1::MakeEnvironmentsConnection; - -/// @deprecated Use composer_v1::EnvironmentsConnection directly. -using ::google::cloud::composer_v1::EnvironmentsConnection; - -/// @deprecated Use composer_v1::EnvironmentsLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::composer_v1::EnvironmentsLimitedErrorCountRetryPolicy; - -/// @deprecated Use composer_v1::EnvironmentsLimitedTimeRetryPolicy directly. -using ::google::cloud::composer_v1::EnvironmentsLimitedTimeRetryPolicy; - -/// @deprecated Use composer_v1::EnvironmentsRetryPolicy directly. -using ::google::cloud::composer_v1::EnvironmentsRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace composer -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_ENVIRONMENTS_CONNECTION_H diff --git a/google/cloud/composer/environments_connection_idempotency_policy.h b/google/cloud/composer/environments_connection_idempotency_policy.h deleted file mode 100644 index fa242f6dfc11a..0000000000000 --- a/google/cloud/composer/environments_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/orchestration/airflow/service/v1/environments.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_ENVIRONMENTS_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_ENVIRONMENTS_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/composer/v1/environments_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace composer { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// composer_v1::MakeDefaultEnvironmentsConnectionIdempotencyPolicy directly. -using ::google::cloud::composer_v1:: - MakeDefaultEnvironmentsConnectionIdempotencyPolicy; - -/// @deprecated Use composer_v1::EnvironmentsConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::composer_v1::EnvironmentsConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace composer -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_ENVIRONMENTS_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/composer/environments_options.h b/google/cloud/composer/environments_options.h deleted file mode 100644 index 2e3b9ac49a6f8..0000000000000 --- a/google/cloud/composer/environments_options.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/orchestration/airflow/service/v1/environments.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_ENVIRONMENTS_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_ENVIRONMENTS_OPTIONS_H - -#include "google/cloud/composer/environments_connection.h" -#include "google/cloud/composer/environments_connection_idempotency_policy.h" -#include "google/cloud/composer/v1/environments_options.h" - -namespace google { -namespace cloud { -namespace composer { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use composer_v1::EnvironmentsPollingPolicyOption directly. -using ::google::cloud::composer_v1::EnvironmentsPollingPolicyOption; - -/// @deprecated Use composer_v1::EnvironmentsBackoffPolicyOption directly. -using ::google::cloud::composer_v1::EnvironmentsBackoffPolicyOption; - -/// @deprecated Use composer_v1::EnvironmentsConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::composer_v1:: - EnvironmentsConnectionIdempotencyPolicyOption; - -/// @deprecated Use composer_v1::EnvironmentsPolicyOptionList directly. -using ::google::cloud::composer_v1::EnvironmentsPolicyOptionList; - -/// @deprecated Use composer_v1::EnvironmentsRetryPolicyOption directly. -using ::google::cloud::composer_v1::EnvironmentsRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace composer -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_ENVIRONMENTS_OPTIONS_H diff --git a/google/cloud/composer/image_versions_client.h b/google/cloud/composer/image_versions_client.h deleted file mode 100644 index f3d03214ea0ab..0000000000000 --- a/google/cloud/composer/image_versions_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/orchestration/airflow/service/v1/image_versions.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_IMAGE_VERSIONS_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_IMAGE_VERSIONS_CLIENT_H - -#include "google/cloud/composer/image_versions_connection.h" -#include "google/cloud/composer/v1/image_versions_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in composer_v1 instead of the aliases defined in -/// this namespace. -namespace composer { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use composer_v1::ImageVersionsClient directly. -using ::google::cloud::composer_v1::ImageVersionsClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace composer -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_IMAGE_VERSIONS_CLIENT_H diff --git a/google/cloud/composer/image_versions_connection.h b/google/cloud/composer/image_versions_connection.h deleted file mode 100644 index 843ad599a1473..0000000000000 --- a/google/cloud/composer/image_versions_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/orchestration/airflow/service/v1/image_versions.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_IMAGE_VERSIONS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_IMAGE_VERSIONS_CONNECTION_H - -#include "google/cloud/composer/image_versions_connection_idempotency_policy.h" -#include "google/cloud/composer/v1/image_versions_connection.h" - -namespace google { -namespace cloud { -namespace composer { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use composer_v1::MakeImageVersionsConnection directly. -using ::google::cloud::composer_v1::MakeImageVersionsConnection; - -/// @deprecated Use composer_v1::ImageVersionsConnection directly. -using ::google::cloud::composer_v1::ImageVersionsConnection; - -/// @deprecated Use composer_v1::ImageVersionsLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::composer_v1::ImageVersionsLimitedErrorCountRetryPolicy; - -/// @deprecated Use composer_v1::ImageVersionsLimitedTimeRetryPolicy directly. -using ::google::cloud::composer_v1::ImageVersionsLimitedTimeRetryPolicy; - -/// @deprecated Use composer_v1::ImageVersionsRetryPolicy directly. -using ::google::cloud::composer_v1::ImageVersionsRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace composer -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_IMAGE_VERSIONS_CONNECTION_H diff --git a/google/cloud/composer/image_versions_connection_idempotency_policy.h b/google/cloud/composer/image_versions_connection_idempotency_policy.h deleted file mode 100644 index 759574c080acb..0000000000000 --- a/google/cloud/composer/image_versions_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/orchestration/airflow/service/v1/image_versions.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_IMAGE_VERSIONS_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_IMAGE_VERSIONS_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/composer/v1/image_versions_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace composer { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// composer_v1::MakeDefaultImageVersionsConnectionIdempotencyPolicy directly. -using ::google::cloud::composer_v1:: - MakeDefaultImageVersionsConnectionIdempotencyPolicy; - -/// @deprecated Use composer_v1::ImageVersionsConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::composer_v1::ImageVersionsConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace composer -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_IMAGE_VERSIONS_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/composer/image_versions_options.h b/google/cloud/composer/image_versions_options.h deleted file mode 100644 index 5453676d3a01b..0000000000000 --- a/google/cloud/composer/image_versions_options.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/orchestration/airflow/service/v1/image_versions.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_IMAGE_VERSIONS_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_IMAGE_VERSIONS_OPTIONS_H - -#include "google/cloud/composer/image_versions_connection.h" -#include "google/cloud/composer/image_versions_connection_idempotency_policy.h" -#include "google/cloud/composer/v1/image_versions_options.h" - -namespace google { -namespace cloud { -namespace composer { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use composer_v1::ImageVersionsBackoffPolicyOption directly. -using ::google::cloud::composer_v1::ImageVersionsBackoffPolicyOption; - -/// @deprecated Use composer_v1::ImageVersionsConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::composer_v1:: - ImageVersionsConnectionIdempotencyPolicyOption; - -/// @deprecated Use composer_v1::ImageVersionsPolicyOptionList directly. -using ::google::cloud::composer_v1::ImageVersionsPolicyOptionList; - -/// @deprecated Use composer_v1::ImageVersionsRetryPolicyOption directly. -using ::google::cloud::composer_v1::ImageVersionsRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace composer -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_IMAGE_VERSIONS_OPTIONS_H diff --git a/google/cloud/composer/mocks/mock_environments_connection.h b/google/cloud/composer/mocks/mock_environments_connection.h deleted file mode 100644 index 17e1dba9d6cfe..0000000000000 --- a/google/cloud/composer/mocks/mock_environments_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/orchestration/airflow/service/v1/environments.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_MOCKS_MOCK_ENVIRONMENTS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_MOCKS_MOCK_ENVIRONMENTS_CONNECTION_H - -#include "google/cloud/composer/environments_connection.h" -#include "google/cloud/composer/v1/mocks/mock_environments_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in composer_v1_mocks instead of the aliases -/// defined in this namespace. -namespace composer_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use composer_v1_mocks::MockEnvironmentsConnection directly. -using ::google::cloud::composer_v1_mocks::MockEnvironmentsConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace composer_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_MOCKS_MOCK_ENVIRONMENTS_CONNECTION_H diff --git a/google/cloud/composer/mocks/mock_image_versions_connection.h b/google/cloud/composer/mocks/mock_image_versions_connection.h deleted file mode 100644 index c50f742e9d40b..0000000000000 --- a/google/cloud/composer/mocks/mock_image_versions_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/orchestration/airflow/service/v1/image_versions.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_MOCKS_MOCK_IMAGE_VERSIONS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_MOCKS_MOCK_IMAGE_VERSIONS_CONNECTION_H - -#include "google/cloud/composer/image_versions_connection.h" -#include "google/cloud/composer/v1/mocks/mock_image_versions_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in composer_v1_mocks instead of the aliases -/// defined in this namespace. -namespace composer_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use composer_v1_mocks::MockImageVersionsConnection directly. -using ::google::cloud::composer_v1_mocks::MockImageVersionsConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace composer_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_MOCKS_MOCK_IMAGE_VERSIONS_CONNECTION_H diff --git a/google/cloud/composer/quickstart/.bazelrc b/google/cloud/composer/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/composer/quickstart/.bazelrc +++ b/google/cloud/composer/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/composer/quickstart/CMakeLists.txt b/google/cloud/composer/quickstart/CMakeLists.txt index e9b99b7707151..a66281759a771 100644 --- a/google/cloud/composer/quickstart/CMakeLists.txt +++ b/google/cloud/composer/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Composer API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-composer-quickstart CXX) find_package(google_cloud_cpp_composer REQUIRED) diff --git a/google/cloud/composer/v1/environments_client.h b/google/cloud/composer/v1/environments_client.h index a4490c060e50e..8be63abe764e4 100644 --- a/google/cloud/composer/v1/environments_client.h +++ b/google/cloud/composer/v1/environments_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/composer/v1/environments_connection.h b/google/cloud/composer/v1/environments_connection.h index b692dba2e035c..815253430e639 100644 --- a/google/cloud/composer/v1/environments_connection.h +++ b/google/cloud/composer/v1/environments_connection.h @@ -21,6 +21,8 @@ #include "google/cloud/composer/v1/environments_connection_idempotency_policy.h" #include "google/cloud/composer/v1/internal/environments_retry_traits.h" +#include "google/cloud/orchestration/airflow/service/v1/environments.pb.h" +#include "google/cloud/orchestration/airflow/service/v1/operations.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,9 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/composer/v1/environments_connection_idempotency_policy.h b/google/cloud/composer/v1/environments_connection_idempotency_policy.h index 7a991ae78c9e3..a38fffd58a2e3 100644 --- a/google/cloud/composer/v1/environments_connection_idempotency_policy.h +++ b/google/cloud/composer/v1/environments_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_V1_ENVIRONMENTS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_V1_ENVIRONMENTS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/orchestration/airflow/service/v1/environments.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/composer/v1/image_versions_connection.h b/google/cloud/composer/v1/image_versions_connection.h index 6c02af64bee2f..d6f812584cf04 100644 --- a/google/cloud/composer/v1/image_versions_connection.h +++ b/google/cloud/composer/v1/image_versions_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/composer/v1/image_versions_connection_idempotency_policy.h" #include "google/cloud/composer/v1/internal/image_versions_retry_traits.h" +#include "google/cloud/orchestration/airflow/service/v1/image_versions.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/composer/v1/image_versions_connection_idempotency_policy.h b/google/cloud/composer/v1/image_versions_connection_idempotency_policy.h index 0a29d323989e6..51e964fb024ca 100644 --- a/google/cloud/composer/v1/image_versions_connection_idempotency_policy.h +++ b/google/cloud/composer/v1/image_versions_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_V1_IMAGE_VERSIONS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_V1_IMAGE_VERSIONS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/orchestration/airflow/service/v1/image_versions.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/composer/v1/internal/environments_auth_decorator.cc b/google/cloud/composer/v1/internal/environments_auth_decorator.cc index fa67e9f88f605..91ec4bb4a4538 100644 --- a/google/cloud/composer/v1/internal/environments_auth_decorator.cc +++ b/google/cloud/composer/v1/internal/environments_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/orchestration/airflow/service/v1/environments.proto #include "google/cloud/composer/v1/internal/environments_auth_decorator.h" -#include +#include "google/cloud/orchestration/airflow/service/v1/environments.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace composer_v1_internal { @@ -488,3 +491,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace composer_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/composer/v1/internal/environments_auth_decorator.h b/google/cloud/composer/v1/internal/environments_auth_decorator.h index 9a7451248f49a..9588314169463 100644 --- a/google/cloud/composer/v1/internal/environments_auth_decorator.h +++ b/google/cloud/composer/v1/internal/environments_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/composer/v1/internal/environments_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace composer_v1_internal { @@ -266,4 +269,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_V1_INTERNAL_ENVIRONMENTS_AUTH_DECORATOR_H diff --git a/google/cloud/composer/v1/internal/environments_connection_impl.h b/google/cloud/composer/v1/internal/environments_connection_impl.h index dd47cb264a1d3..4ef3aad8253d3 100644 --- a/google/cloud/composer/v1/internal/environments_connection_impl.h +++ b/google/cloud/composer/v1/internal/environments_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/composer/v1/internal/environments_logging_decorator.cc b/google/cloud/composer/v1/internal/environments_logging_decorator.cc index 11f10516141ae..4c3a023e3bebf 100644 --- a/google/cloud/composer/v1/internal/environments_logging_decorator.cc +++ b/google/cloud/composer/v1/internal/environments_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/orchestration/airflow/service/v1/environments.proto #include "google/cloud/composer/v1/internal/environments_logging_decorator.h" +#include "google/cloud/orchestration/airflow/service/v1/environments.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace composer_v1_internal { @@ -589,3 +592,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace composer_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/composer/v1/internal/environments_logging_decorator.h b/google/cloud/composer/v1/internal/environments_logging_decorator.h index 6c5074fed6957..575db71e7f21c 100644 --- a/google/cloud/composer/v1/internal/environments_logging_decorator.h +++ b/google/cloud/composer/v1/internal/environments_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/composer/v1/internal/environments_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace composer_v1_internal { @@ -266,4 +269,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_V1_INTERNAL_ENVIRONMENTS_LOGGING_DECORATOR_H diff --git a/google/cloud/composer/v1/internal/environments_metadata_decorator.cc b/google/cloud/composer/v1/internal/environments_metadata_decorator.cc index 47c09d914c151..fc6b78b4ff276 100644 --- a/google/cloud/composer/v1/internal/environments_metadata_decorator.cc +++ b/google/cloud/composer/v1/internal/environments_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/orchestration/airflow/service/v1/environments.proto #include "google/cloud/composer/v1/internal/environments_metadata_decorator.h" +#include "google/cloud/orchestration/airflow/service/v1/environments.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace composer_v1_internal { @@ -464,3 +468,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace composer_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/composer/v1/internal/environments_metadata_decorator.h b/google/cloud/composer/v1/internal/environments_metadata_decorator.h index fb1ced4893c03..95c66ed7c8664 100644 --- a/google/cloud/composer/v1/internal/environments_metadata_decorator.h +++ b/google/cloud/composer/v1/internal/environments_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/composer/v1/internal/environments_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace composer_v1_internal { @@ -271,4 +274,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_V1_INTERNAL_ENVIRONMENTS_METADATA_DECORATOR_H diff --git a/google/cloud/composer/v1/internal/environments_option_defaults.cc b/google/cloud/composer/v1/internal/environments_option_defaults.cc index e9ed95daba5c9..6fbb132acc7c3 100644 --- a/google/cloud/composer/v1/internal/environments_option_defaults.cc +++ b/google/cloud/composer/v1/internal/environments_option_defaults.cc @@ -41,7 +41,7 @@ Options EnvironmentsDefaultOptions(Options options) { if (!options.has()) { options.set( composer_v1::EnvironmentsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/composer/v1/internal/environments_stub.cc b/google/cloud/composer/v1/internal/environments_stub.cc index 7ebdb01c2a4ff..3bafe9504d8a6 100644 --- a/google/cloud/composer/v1/internal/environments_stub.cc +++ b/google/cloud/composer/v1/internal/environments_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/orchestration/airflow/service/v1/environments.proto #include "google/cloud/composer/v1/internal/environments_stub.h" +#include "google/cloud/orchestration/airflow/service/v1/environments.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace composer_v1_internal { @@ -594,3 +597,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace composer_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/composer/v1/internal/environments_stub.h b/google/cloud/composer/v1/internal/environments_stub.h index 4820fafa5acec..2daa939116dda 100644 --- a/google/cloud/composer/v1/internal/environments_stub.h +++ b/google/cloud/composer/v1/internal/environments_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_V1_INTERNAL_ENVIRONMENTS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_V1_INTERNAL_ENVIRONMENTS_STUB_H +#include "google/cloud/orchestration/airflow/service/v1/environments.grpc.pb.h" +#include "google/cloud/orchestration/airflow/service/v1/operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace composer_v1_internal { @@ -497,4 +500,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_V1_INTERNAL_ENVIRONMENTS_STUB_H diff --git a/google/cloud/composer/v1/internal/environments_stub_factory.cc b/google/cloud/composer/v1/internal/environments_stub_factory.cc index 78409e6ece640..023ee94433394 100644 --- a/google/cloud/composer/v1/internal/environments_stub_factory.cc +++ b/google/cloud/composer/v1/internal/environments_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/composer/v1/internal/environments_metadata_decorator.h" #include "google/cloud/composer/v1/internal/environments_stub.h" #include "google/cloud/composer/v1/internal/environments_tracing_stub.h" +#include "google/cloud/orchestration/airflow/service/v1/environments.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace composer_v1_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace composer_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/composer/v1/internal/environments_stub_factory.h b/google/cloud/composer/v1/internal/environments_stub_factory.h index 719ebaa202ba4..48e5845122e21 100644 --- a/google/cloud/composer/v1/internal/environments_stub_factory.h +++ b/google/cloud/composer/v1/internal/environments_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace composer_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_V1_INTERNAL_ENVIRONMENTS_STUB_FACTORY_H diff --git a/google/cloud/composer/v1/internal/environments_tracing_connection.cc b/google/cloud/composer/v1/internal/environments_tracing_connection.cc index 41770c57548db..a7c6a973864f6 100644 --- a/google/cloud/composer/v1/internal/environments_tracing_connection.cc +++ b/google/cloud/composer/v1/internal/environments_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace composer_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - EnvironmentsTracingConnection::EnvironmentsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -483,16 +481,12 @@ Status EnvironmentsTracingConnection::DeleteOperation( return internal::EndSpan(*span, child_->DeleteOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeEnvironmentsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/composer/v1/internal/environments_tracing_connection.h b/google/cloud/composer/v1/internal/environments_tracing_connection.h index fdcf998ab7968..f3139bee00d10 100644 --- a/google/cloud/composer/v1/internal/environments_tracing_connection.h +++ b/google/cloud/composer/v1/internal/environments_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace composer_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class EnvironmentsTracingConnection : public composer_v1::EnvironmentsConnection { public: @@ -236,8 +234,6 @@ class EnvironmentsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/composer/v1/internal/environments_tracing_stub.cc b/google/cloud/composer/v1/internal/environments_tracing_stub.cc index 3b53fe08c1d4f..12439a72ad956 100644 --- a/google/cloud/composer/v1/internal/environments_tracing_stub.cc +++ b/google/cloud/composer/v1/internal/environments_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace composer_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - EnvironmentsTracingStub::EnvironmentsTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -569,18 +570,14 @@ future EnvironmentsTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeEnvironmentsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace composer_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/composer/v1/internal/environments_tracing_stub.h b/google/cloud/composer/v1/internal/environments_tracing_stub.h index 544effd2789d6..c6d7e4f9d459f 100644 --- a/google/cloud/composer/v1/internal/environments_tracing_stub.h +++ b/google/cloud/composer/v1/internal/environments_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace composer_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class EnvironmentsTracingStub : public EnvironmentsStub { public: ~EnvironmentsTracingStub() override = default; @@ -261,8 +262,6 @@ class EnvironmentsTracingStub : public EnvironmentsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -277,4 +276,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_V1_INTERNAL_ENVIRONMENTS_TRACING_STUB_H diff --git a/google/cloud/composer/v1/internal/image_versions_auth_decorator.cc b/google/cloud/composer/v1/internal/image_versions_auth_decorator.cc index ce5812957630f..a43fc3e3e4925 100644 --- a/google/cloud/composer/v1/internal/image_versions_auth_decorator.cc +++ b/google/cloud/composer/v1/internal/image_versions_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/orchestration/airflow/service/v1/image_versions.proto #include "google/cloud/composer/v1/internal/image_versions_auth_decorator.h" -#include +#include "google/cloud/orchestration/airflow/service/v1/image_versions.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace composer_v1_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace composer_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/composer/v1/internal/image_versions_auth_decorator.h b/google/cloud/composer/v1/internal/image_versions_auth_decorator.h index eac4ee7a52ff4..f1cc8308ee868 100644 --- a/google/cloud/composer/v1/internal/image_versions_auth_decorator.h +++ b/google/cloud/composer/v1/internal/image_versions_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace composer_v1_internal { @@ -66,4 +69,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_V1_INTERNAL_IMAGE_VERSIONS_AUTH_DECORATOR_H diff --git a/google/cloud/composer/v1/internal/image_versions_logging_decorator.cc b/google/cloud/composer/v1/internal/image_versions_logging_decorator.cc index 8f09a5ab1c34a..65410d13c8f61 100644 --- a/google/cloud/composer/v1/internal/image_versions_logging_decorator.cc +++ b/google/cloud/composer/v1/internal/image_versions_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/orchestration/airflow/service/v1/image_versions.proto #include "google/cloud/composer/v1/internal/image_versions_logging_decorator.h" +#include "google/cloud/orchestration/airflow/service/v1/image_versions.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace composer_v1_internal { @@ -88,3 +91,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace composer_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/composer/v1/internal/image_versions_logging_decorator.h b/google/cloud/composer/v1/internal/image_versions_logging_decorator.h index 36a3e04bde0ff..b4a489999b0e0 100644 --- a/google/cloud/composer/v1/internal/image_versions_logging_decorator.h +++ b/google/cloud/composer/v1/internal/image_versions_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace composer_v1_internal { @@ -66,4 +69,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_V1_INTERNAL_IMAGE_VERSIONS_LOGGING_DECORATOR_H diff --git a/google/cloud/composer/v1/internal/image_versions_metadata_decorator.cc b/google/cloud/composer/v1/internal/image_versions_metadata_decorator.cc index f8154d23d6c9c..71f00431819dc 100644 --- a/google/cloud/composer/v1/internal/image_versions_metadata_decorator.cc +++ b/google/cloud/composer/v1/internal/image_versions_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/orchestration/airflow/service/v1/image_versions.proto #include "google/cloud/composer/v1/internal/image_versions_metadata_decorator.h" +#include "google/cloud/orchestration/airflow/service/v1/image_versions.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace composer_v1_internal { @@ -97,3 +101,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace composer_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/composer/v1/internal/image_versions_metadata_decorator.h b/google/cloud/composer/v1/internal/image_versions_metadata_decorator.h index 515721d280981..4c41e417e6401 100644 --- a/google/cloud/composer/v1/internal/image_versions_metadata_decorator.h +++ b/google/cloud/composer/v1/internal/image_versions_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace composer_v1_internal { @@ -71,4 +74,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_V1_INTERNAL_IMAGE_VERSIONS_METADATA_DECORATOR_H diff --git a/google/cloud/composer/v1/internal/image_versions_option_defaults.cc b/google/cloud/composer/v1/internal/image_versions_option_defaults.cc index 33f9e36be3c61..30b4f6d0d5f0e 100644 --- a/google/cloud/composer/v1/internal/image_versions_option_defaults.cc +++ b/google/cloud/composer/v1/internal/image_versions_option_defaults.cc @@ -41,7 +41,7 @@ Options ImageVersionsDefaultOptions(Options options) { if (!options.has()) { options.set( composer_v1::ImageVersionsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/composer/v1/internal/image_versions_stub.cc b/google/cloud/composer/v1/internal/image_versions_stub.cc index 51bed33d3b5c9..c4714b8c373aa 100644 --- a/google/cloud/composer/v1/internal/image_versions_stub.cc +++ b/google/cloud/composer/v1/internal/image_versions_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/orchestration/airflow/service/v1/image_versions.proto #include "google/cloud/composer/v1/internal/image_versions_stub.h" +#include "google/cloud/orchestration/airflow/service/v1/image_versions.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace composer_v1_internal { @@ -83,3 +86,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace composer_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/composer/v1/internal/image_versions_stub.h b/google/cloud/composer/v1/internal/image_versions_stub.h index 223e1c941dc08..302ea51e2313b 100644 --- a/google/cloud/composer/v1/internal/image_versions_stub.h +++ b/google/cloud/composer/v1/internal/image_versions_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_V1_INTERNAL_IMAGE_VERSIONS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_V1_INTERNAL_IMAGE_VERSIONS_STUB_H +#include "google/cloud/orchestration/airflow/service/v1/image_versions.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace composer_v1_internal { @@ -97,4 +100,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_V1_INTERNAL_IMAGE_VERSIONS_STUB_H diff --git a/google/cloud/composer/v1/internal/image_versions_stub_factory.cc b/google/cloud/composer/v1/internal/image_versions_stub_factory.cc index ae10e6b4f1686..b26eb3f9a6af3 100644 --- a/google/cloud/composer/v1/internal/image_versions_stub_factory.cc +++ b/google/cloud/composer/v1/internal/image_versions_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/composer/v1/internal/image_versions_metadata_decorator.h" #include "google/cloud/composer/v1/internal/image_versions_stub.h" #include "google/cloud/composer/v1/internal/image_versions_tracing_stub.h" +#include "google/cloud/orchestration/airflow/service/v1/image_versions.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace composer_v1_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace composer_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/composer/v1/internal/image_versions_stub_factory.h b/google/cloud/composer/v1/internal/image_versions_stub_factory.h index 28413b5b9199f..7a6fbed8a3c37 100644 --- a/google/cloud/composer/v1/internal/image_versions_stub_factory.h +++ b/google/cloud/composer/v1/internal/image_versions_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace composer_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_V1_INTERNAL_IMAGE_VERSIONS_STUB_FACTORY_H diff --git a/google/cloud/composer/v1/internal/image_versions_tracing_connection.cc b/google/cloud/composer/v1/internal/image_versions_tracing_connection.cc index 0504b56bb9c47..87faaaf077095 100644 --- a/google/cloud/composer/v1/internal/image_versions_tracing_connection.cc +++ b/google/cloud/composer/v1/internal/image_versions_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace composer_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ImageVersionsTracingConnection::ImageVersionsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -74,16 +72,12 @@ Status ImageVersionsTracingConnection::DeleteOperation( return internal::EndSpan(*span, child_->DeleteOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeImageVersionsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/composer/v1/internal/image_versions_tracing_connection.h b/google/cloud/composer/v1/internal/image_versions_tracing_connection.h index 7d9ba32e726fa..785234d4817b1 100644 --- a/google/cloud/composer/v1/internal/image_versions_tracing_connection.h +++ b/google/cloud/composer/v1/internal/image_versions_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace composer_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ImageVersionsTracingConnection : public composer_v1::ImageVersionsConnection { public: @@ -57,8 +55,6 @@ class ImageVersionsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/composer/v1/internal/image_versions_tracing_stub.cc b/google/cloud/composer/v1/internal/image_versions_tracing_stub.cc index 38a13f6c82d31..7d61192cb0ecd 100644 --- a/google/cloud/composer/v1/internal/image_versions_tracing_stub.cc +++ b/google/cloud/composer/v1/internal/image_versions_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace composer_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ImageVersionsTracingStub::ImageVersionsTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -84,18 +85,14 @@ Status ImageVersionsTracingStub::DeleteOperation( child_->DeleteOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeImageVersionsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace composer_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/composer/v1/internal/image_versions_tracing_stub.h b/google/cloud/composer/v1/internal/image_versions_tracing_stub.h index 4a9247bf952d4..91e04ed586ad3 100644 --- a/google/cloud/composer/v1/internal/image_versions_tracing_stub.h +++ b/google/cloud/composer/v1/internal/image_versions_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace composer_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ImageVersionsTracingStub : public ImageVersionsStub { public: ~ImageVersionsTracingStub() override = default; @@ -62,8 +63,6 @@ class ImageVersionsTracingStub : public ImageVersionsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -78,4 +77,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPOSER_V1_INTERNAL_IMAGE_VERSIONS_TRACING_STUB_H diff --git a/google/cloud/compute/accelerator_types/v1/accelerator_types_connection.h b/google/cloud/compute/accelerator_types/v1/accelerator_types_connection.h index a02435242f742..baa321fb1c489 100644 --- a/google/cloud/compute/accelerator_types/v1/accelerator_types_connection.h +++ b/google/cloud/compute/accelerator_types/v1/accelerator_types_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ACCELERATOR_TYPES_V1_ACCELERATOR_TYPES_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ACCELERATOR_TYPES_V1_ACCELERATOR_TYPES_CONNECTION_H +#include "google/cloud/compute/accelerator_types/v1/accelerator_types.pb.h" #include "google/cloud/compute/accelerator_types/v1/accelerator_types_connection_idempotency_policy.h" #include "google/cloud/compute/accelerator_types/v1/internal/accelerator_types_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/accelerator_types/v1/accelerator_types_connection_idempotency_policy.h b/google/cloud/compute/accelerator_types/v1/accelerator_types_connection_idempotency_policy.h index 169e70d49587f..76776511d6c2c 100644 --- a/google/cloud/compute/accelerator_types/v1/accelerator_types_connection_idempotency_policy.h +++ b/google/cloud/compute/accelerator_types/v1/accelerator_types_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ACCELERATOR_TYPES_V1_ACCELERATOR_TYPES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ACCELERATOR_TYPES_V1_ACCELERATOR_TYPES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/accelerator_types/v1/accelerator_types.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/accelerator_types/v1/accelerator_types_proto_export.h b/google/cloud/compute/accelerator_types/v1/accelerator_types_proto_export.h index 5c1054ef5e0b3..ffb487ab234e8 100644 --- a/google/cloud/compute/accelerator_types/v1/accelerator_types_proto_export.h +++ b/google/cloud/compute/accelerator_types/v1/accelerator_types_proto_export.h @@ -26,8 +26,8 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ACCELERATOR_TYPES_V1_ACCELERATOR_TYPES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include +#include "google/cloud/compute/v1/internal/common_002.pb.h" +#include "google/cloud/compute/v1/internal/common_023.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ACCELERATOR_TYPES_V1_ACCELERATOR_TYPES_PROTO_EXPORT_H diff --git a/google/cloud/compute/accelerator_types/v1/internal/accelerator_types_option_defaults.cc b/google/cloud/compute/accelerator_types/v1/internal/accelerator_types_option_defaults.cc index 17cc1ba257c6e..e3aad639ce22b 100644 --- a/google/cloud/compute/accelerator_types/v1/internal/accelerator_types_option_defaults.cc +++ b/google/cloud/compute/accelerator_types/v1/internal/accelerator_types_option_defaults.cc @@ -43,7 +43,7 @@ Options AcceleratorTypesDefaultOptions(Options options) { options.set< compute_accelerator_types_v1::AcceleratorTypesRetryPolicyOption>( compute_accelerator_types_v1::AcceleratorTypesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include #include #include diff --git a/google/cloud/compute/accelerator_types/v1/internal/accelerator_types_rest_metadata_decorator.cc b/google/cloud/compute/accelerator_types/v1/internal/accelerator_types_rest_metadata_decorator.cc index 2798bbca24632..56492df9a34aa 100644 --- a/google/cloud/compute/accelerator_types/v1/internal/accelerator_types_rest_metadata_decorator.cc +++ b/google/cloud/compute/accelerator_types/v1/internal/accelerator_types_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/accelerator_types/v1/accelerator_types.proto #include "google/cloud/compute/accelerator_types/v1/internal/accelerator_types_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/accelerator_types/v1/internal/accelerator_types_rest_metadata_decorator.h b/google/cloud/compute/accelerator_types/v1/internal/accelerator_types_rest_metadata_decorator.h index 0af9dc0e03e87..ad1979aa85a56 100644 --- a/google/cloud/compute/accelerator_types/v1/internal/accelerator_types_rest_metadata_decorator.h +++ b/google/cloud/compute/accelerator_types/v1/internal/accelerator_types_rest_metadata_decorator.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ACCELERATOR_TYPES_V1_INTERNAL_ACCELERATOR_TYPES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ACCELERATOR_TYPES_V1_INTERNAL_ACCELERATOR_TYPES_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/accelerator_types/v1/accelerator_types.pb.h" #include "google/cloud/compute/accelerator_types/v1/internal/accelerator_types_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/compute/accelerator_types/v1/internal/accelerator_types_rest_stub.cc b/google/cloud/compute/accelerator_types/v1/internal/accelerator_types_rest_stub.cc index cb35d61928d96..6ddf3087b8c45 100644 --- a/google/cloud/compute/accelerator_types/v1/internal/accelerator_types_rest_stub.cc +++ b/google/cloud/compute/accelerator_types/v1/internal/accelerator_types_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/compute/accelerator_types/v1/accelerator_types.proto #include "google/cloud/compute/accelerator_types/v1/internal/accelerator_types_rest_stub.h" +#include "google/cloud/compute/accelerator_types/v1/accelerator_types.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/accelerator_types/v1/internal/accelerator_types_rest_stub.h b/google/cloud/compute/accelerator_types/v1/internal/accelerator_types_rest_stub.h index de14eca3de9b9..bb6bf99d87600 100644 --- a/google/cloud/compute/accelerator_types/v1/internal/accelerator_types_rest_stub.h +++ b/google/cloud/compute/accelerator_types/v1/internal/accelerator_types_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ACCELERATOR_TYPES_V1_INTERNAL_ACCELERATOR_TYPES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ACCELERATOR_TYPES_V1_INTERNAL_ACCELERATOR_TYPES_REST_STUB_H +#include "google/cloud/compute/accelerator_types/v1/accelerator_types.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/accelerator_types/v1/internal/accelerator_types_tracing_connection.cc b/google/cloud/compute/accelerator_types/v1/internal/accelerator_types_tracing_connection.cc index 9e12c42890b70..2a14a9a84865a 100644 --- a/google/cloud/compute/accelerator_types/v1/internal/accelerator_types_tracing_connection.cc +++ b/google/cloud/compute/accelerator_types/v1/internal/accelerator_types_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_accelerator_types_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AcceleratorTypesTracingConnection::AcceleratorTypesTracingConnection( std::shared_ptr child) @@ -75,17 +73,13 @@ AcceleratorTypesTracingConnection::ListAcceleratorTypes( std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAcceleratorTypesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/accelerator_types/v1/internal/accelerator_types_tracing_connection.h b/google/cloud/compute/accelerator_types/v1/internal/accelerator_types_tracing_connection.h index a7fe4718e407d..9e59a9bd0dae9 100644 --- a/google/cloud/compute/accelerator_types/v1/internal/accelerator_types_tracing_connection.h +++ b/google/cloud/compute/accelerator_types/v1/internal/accelerator_types_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_accelerator_types_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AcceleratorTypesTracingConnection : public compute_accelerator_types_v1::AcceleratorTypesConnection { public: @@ -60,8 +58,6 @@ class AcceleratorTypesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/addresses/v1/addresses_connection.h b/google/cloud/compute/addresses/v1/addresses_connection.h index 1974fb2c4941e..e06856afb8acc 100644 --- a/google/cloud/compute/addresses/v1/addresses_connection.h +++ b/google/cloud/compute/addresses/v1/addresses_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ADDRESSES_V1_ADDRESSES_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ADDRESSES_V1_ADDRESSES_CONNECTION_H +#include "google/cloud/compute/addresses/v1/addresses.pb.h" #include "google/cloud/compute/addresses/v1/addresses_connection_idempotency_policy.h" #include "google/cloud/compute/addresses/v1/internal/addresses_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/addresses/v1/addresses_connection_idempotency_policy.h b/google/cloud/compute/addresses/v1/addresses_connection_idempotency_policy.h index b096072bf54a2..c4449b9e64435 100644 --- a/google/cloud/compute/addresses/v1/addresses_connection_idempotency_policy.h +++ b/google/cloud/compute/addresses/v1/addresses_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ADDRESSES_V1_ADDRESSES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ADDRESSES_V1_ADDRESSES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/addresses/v1/addresses.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/addresses/v1/addresses_proto_export.h b/google/cloud/compute/addresses/v1/addresses_proto_export.h index 6a9828f83cfb1..7ccf3339454b3 100644 --- a/google/cloud/compute/addresses/v1/addresses_proto_export.h +++ b/google/cloud/compute/addresses/v1/addresses_proto_export.h @@ -26,10 +26,10 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ADDRESSES_V1_ADDRESSES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_004.pb.h" +#include "google/cloud/compute/v1/internal/common_005.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_107.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ADDRESSES_V1_ADDRESSES_PROTO_EXPORT_H diff --git a/google/cloud/compute/addresses/v1/internal/addresses_option_defaults.cc b/google/cloud/compute/addresses/v1/internal/addresses_option_defaults.cc index 1abf1e42ebadd..1db2c737f7dcb 100644 --- a/google/cloud/compute/addresses/v1/internal/addresses_option_defaults.cc +++ b/google/cloud/compute/addresses/v1/internal/addresses_option_defaults.cc @@ -41,7 +41,7 @@ Options AddressesDefaultOptions(Options options) { if (!options.has()) { options.set( compute_addresses_v1::AddressesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/compute/addresses/v1/internal/addresses_rest_connection_impl.h b/google/cloud/compute/addresses/v1/internal/addresses_rest_connection_impl.h index 9a9776badd979..4375ec5e5f1ce 100644 --- a/google/cloud/compute/addresses/v1/internal/addresses_rest_connection_impl.h +++ b/google/cloud/compute/addresses/v1/internal/addresses_rest_connection_impl.h @@ -24,13 +24,13 @@ #include "google/cloud/compute/addresses/v1/addresses_options.h" #include "google/cloud/compute/addresses/v1/internal/addresses_rest_stub.h" #include "google/cloud/compute/addresses/v1/internal/addresses_retry_traits.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/background_threads.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/addresses/v1/internal/addresses_rest_logging_decorator.h b/google/cloud/compute/addresses/v1/internal/addresses_rest_logging_decorator.h index d926900d6017d..ec6b11bbb8a95 100644 --- a/google/cloud/compute/addresses/v1/internal/addresses_rest_logging_decorator.h +++ b/google/cloud/compute/addresses/v1/internal/addresses_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ADDRESSES_V1_INTERNAL_ADDRESSES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ADDRESSES_V1_INTERNAL_ADDRESSES_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/addresses/v1/addresses.pb.h" #include "google/cloud/compute/addresses/v1/internal/addresses_rest_stub.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/addresses/v1/internal/addresses_rest_metadata_decorator.cc b/google/cloud/compute/addresses/v1/internal/addresses_rest_metadata_decorator.cc index 3b267755d1573..98fdcca0785f6 100644 --- a/google/cloud/compute/addresses/v1/internal/addresses_rest_metadata_decorator.cc +++ b/google/cloud/compute/addresses/v1/internal/addresses_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/addresses/v1/addresses.proto #include "google/cloud/compute/addresses/v1/internal/addresses_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/addresses/v1/internal/addresses_rest_metadata_decorator.h b/google/cloud/compute/addresses/v1/internal/addresses_rest_metadata_decorator.h index 0d8baa6fdad03..14d1d54796646 100644 --- a/google/cloud/compute/addresses/v1/internal/addresses_rest_metadata_decorator.h +++ b/google/cloud/compute/addresses/v1/internal/addresses_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ADDRESSES_V1_INTERNAL_ADDRESSES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ADDRESSES_V1_INTERNAL_ADDRESSES_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/addresses/v1/addresses.pb.h" #include "google/cloud/compute/addresses/v1/internal/addresses_rest_stub.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/addresses/v1/internal/addresses_rest_stub.cc b/google/cloud/compute/addresses/v1/internal/addresses_rest_stub.cc index 92d57a920feeb..0ba9642434deb 100644 --- a/google/cloud/compute/addresses/v1/internal/addresses_rest_stub.cc +++ b/google/cloud/compute/addresses/v1/internal/addresses_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/addresses/v1/addresses.proto #include "google/cloud/compute/addresses/v1/internal/addresses_rest_stub.h" +#include "google/cloud/compute/addresses/v1/addresses.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/addresses/v1/internal/addresses_rest_stub.h b/google/cloud/compute/addresses/v1/internal/addresses_rest_stub.h index 800535c718d76..4918d07bcd167 100644 --- a/google/cloud/compute/addresses/v1/internal/addresses_rest_stub.h +++ b/google/cloud/compute/addresses/v1/internal/addresses_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ADDRESSES_V1_INTERNAL_ADDRESSES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ADDRESSES_V1_INTERNAL_ADDRESSES_REST_STUB_H +#include "google/cloud/compute/addresses/v1/addresses.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/addresses/v1/internal/addresses_tracing_connection.cc b/google/cloud/compute/addresses/v1/internal/addresses_tracing_connection.cc index 87795dcde9ef2..42f2867024dfd 100644 --- a/google/cloud/compute/addresses/v1/internal/addresses_tracing_connection.cc +++ b/google/cloud/compute/addresses/v1/internal/addresses_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_addresses_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AddressesTracingConnection::AddressesTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -186,16 +184,12 @@ AddressesTracingConnection::SetLabels( return internal::EndSpan(std::move(span), child_->SetLabels(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAddressesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/addresses/v1/internal/addresses_tracing_connection.h b/google/cloud/compute/addresses/v1/internal/addresses_tracing_connection.h index 619106dda7aae..e2b12ab96f45d 100644 --- a/google/cloud/compute/addresses/v1/internal/addresses_tracing_connection.h +++ b/google/cloud/compute/addresses/v1/internal/addresses_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_addresses_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AddressesTracingConnection : public compute_addresses_v1::AddressesConnection { public: @@ -106,8 +104,6 @@ class AddressesTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/autoscalers/v1/autoscalers_connection.h b/google/cloud/compute/autoscalers/v1/autoscalers_connection.h index 8463b2ee34219..6a596effbd0bf 100644 --- a/google/cloud/compute/autoscalers/v1/autoscalers_connection.h +++ b/google/cloud/compute/autoscalers/v1/autoscalers_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_AUTOSCALERS_V1_AUTOSCALERS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_AUTOSCALERS_V1_AUTOSCALERS_CONNECTION_H +#include "google/cloud/compute/autoscalers/v1/autoscalers.pb.h" #include "google/cloud/compute/autoscalers/v1/autoscalers_connection_idempotency_policy.h" #include "google/cloud/compute/autoscalers/v1/internal/autoscalers_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/autoscalers/v1/autoscalers_connection_idempotency_policy.h b/google/cloud/compute/autoscalers/v1/autoscalers_connection_idempotency_policy.h index 541f876f06ad6..7369d904468dc 100644 --- a/google/cloud/compute/autoscalers/v1/autoscalers_connection_idempotency_policy.h +++ b/google/cloud/compute/autoscalers/v1/autoscalers_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_AUTOSCALERS_V1_AUTOSCALERS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_AUTOSCALERS_V1_AUTOSCALERS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/autoscalers/v1/autoscalers.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/autoscalers/v1/autoscalers_proto_export.h b/google/cloud/compute/autoscalers/v1/autoscalers_proto_export.h index 1bfdc49b59491..16ac4b159f05c 100644 --- a/google/cloud/compute/autoscalers/v1/autoscalers_proto_export.h +++ b/google/cloud/compute/autoscalers/v1/autoscalers_proto_export.h @@ -26,10 +26,10 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_AUTOSCALERS_V1_AUTOSCALERS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_008.pb.h" +#include "google/cloud/compute/v1/internal/common_009.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_040.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_AUTOSCALERS_V1_AUTOSCALERS_PROTO_EXPORT_H diff --git a/google/cloud/compute/autoscalers/v1/internal/autoscalers_option_defaults.cc b/google/cloud/compute/autoscalers/v1/internal/autoscalers_option_defaults.cc index f7500d29d868c..2a9f54fa6bd0b 100644 --- a/google/cloud/compute/autoscalers/v1/internal/autoscalers_option_defaults.cc +++ b/google/cloud/compute/autoscalers/v1/internal/autoscalers_option_defaults.cc @@ -41,7 +41,7 @@ Options AutoscalersDefaultOptions(Options options) { if (!options.has()) { options.set( compute_autoscalers_v1::AutoscalersLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/compute/autoscalers/v1/internal/autoscalers_rest_connection_impl.h b/google/cloud/compute/autoscalers/v1/internal/autoscalers_rest_connection_impl.h index 08435b52b39a6..fe60e6d32f5ac 100644 --- a/google/cloud/compute/autoscalers/v1/internal/autoscalers_rest_connection_impl.h +++ b/google/cloud/compute/autoscalers/v1/internal/autoscalers_rest_connection_impl.h @@ -24,13 +24,13 @@ #include "google/cloud/compute/autoscalers/v1/autoscalers_options.h" #include "google/cloud/compute/autoscalers/v1/internal/autoscalers_rest_stub.h" #include "google/cloud/compute/autoscalers/v1/internal/autoscalers_retry_traits.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/background_threads.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/autoscalers/v1/internal/autoscalers_rest_logging_decorator.h b/google/cloud/compute/autoscalers/v1/internal/autoscalers_rest_logging_decorator.h index ea187e5777b84..5b814a57e5cdb 100644 --- a/google/cloud/compute/autoscalers/v1/internal/autoscalers_rest_logging_decorator.h +++ b/google/cloud/compute/autoscalers/v1/internal/autoscalers_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_AUTOSCALERS_V1_INTERNAL_AUTOSCALERS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_AUTOSCALERS_V1_INTERNAL_AUTOSCALERS_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/autoscalers/v1/autoscalers.pb.h" #include "google/cloud/compute/autoscalers/v1/internal/autoscalers_rest_stub.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/autoscalers/v1/internal/autoscalers_rest_metadata_decorator.cc b/google/cloud/compute/autoscalers/v1/internal/autoscalers_rest_metadata_decorator.cc index eb83fb6db6af8..5529940ed838f 100644 --- a/google/cloud/compute/autoscalers/v1/internal/autoscalers_rest_metadata_decorator.cc +++ b/google/cloud/compute/autoscalers/v1/internal/autoscalers_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/autoscalers/v1/autoscalers.proto #include "google/cloud/compute/autoscalers/v1/internal/autoscalers_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/autoscalers/v1/internal/autoscalers_rest_metadata_decorator.h b/google/cloud/compute/autoscalers/v1/internal/autoscalers_rest_metadata_decorator.h index f49e2d866cace..d748627b19c48 100644 --- a/google/cloud/compute/autoscalers/v1/internal/autoscalers_rest_metadata_decorator.h +++ b/google/cloud/compute/autoscalers/v1/internal/autoscalers_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_AUTOSCALERS_V1_INTERNAL_AUTOSCALERS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_AUTOSCALERS_V1_INTERNAL_AUTOSCALERS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/autoscalers/v1/autoscalers.pb.h" #include "google/cloud/compute/autoscalers/v1/internal/autoscalers_rest_stub.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/autoscalers/v1/internal/autoscalers_rest_stub.cc b/google/cloud/compute/autoscalers/v1/internal/autoscalers_rest_stub.cc index 06ce3a1edbe09..7f13490b072d9 100644 --- a/google/cloud/compute/autoscalers/v1/internal/autoscalers_rest_stub.cc +++ b/google/cloud/compute/autoscalers/v1/internal/autoscalers_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/autoscalers/v1/autoscalers.proto #include "google/cloud/compute/autoscalers/v1/internal/autoscalers_rest_stub.h" +#include "google/cloud/compute/autoscalers/v1/autoscalers.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/autoscalers/v1/internal/autoscalers_rest_stub.h b/google/cloud/compute/autoscalers/v1/internal/autoscalers_rest_stub.h index 4ee705eddb9d9..c6569984ee812 100644 --- a/google/cloud/compute/autoscalers/v1/internal/autoscalers_rest_stub.h +++ b/google/cloud/compute/autoscalers/v1/internal/autoscalers_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_AUTOSCALERS_V1_INTERNAL_AUTOSCALERS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_AUTOSCALERS_V1_INTERNAL_AUTOSCALERS_REST_STUB_H +#include "google/cloud/compute/autoscalers/v1/autoscalers.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/autoscalers/v1/internal/autoscalers_tracing_connection.cc b/google/cloud/compute/autoscalers/v1/internal/autoscalers_tracing_connection.cc index 59383608f5a7d..63e0aa9602558 100644 --- a/google/cloud/compute/autoscalers/v1/internal/autoscalers_tracing_connection.cc +++ b/google/cloud/compute/autoscalers/v1/internal/autoscalers_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_autoscalers_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AutoscalersTracingConnection::AutoscalersTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -198,16 +196,12 @@ AutoscalersTracingConnection::UpdateAutoscaler( child_->UpdateAutoscaler(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAutoscalersTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/autoscalers/v1/internal/autoscalers_tracing_connection.h b/google/cloud/compute/autoscalers/v1/internal/autoscalers_tracing_connection.h index 16af91862c042..7b1847d4cb931 100644 --- a/google/cloud/compute/autoscalers/v1/internal/autoscalers_tracing_connection.h +++ b/google/cloud/compute/autoscalers/v1/internal/autoscalers_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_autoscalers_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AutoscalersTracingConnection : public compute_autoscalers_v1::AutoscalersConnection { public: @@ -102,8 +100,6 @@ class AutoscalersTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/backend_buckets/v1/backend_buckets_connection.h b/google/cloud/compute/backend_buckets/v1/backend_buckets_connection.h index de280f2c81bff..2ab9fe847ef94 100644 --- a/google/cloud/compute/backend_buckets/v1/backend_buckets_connection.h +++ b/google/cloud/compute/backend_buckets/v1/backend_buckets_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_BACKEND_BUCKETS_V1_BACKEND_BUCKETS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_BACKEND_BUCKETS_V1_BACKEND_BUCKETS_CONNECTION_H +#include "google/cloud/compute/backend_buckets/v1/backend_buckets.pb.h" #include "google/cloud/compute/backend_buckets/v1/backend_buckets_connection_idempotency_policy.h" #include "google/cloud/compute/backend_buckets/v1/internal/backend_buckets_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/backend_buckets/v1/backend_buckets_connection_idempotency_policy.h b/google/cloud/compute/backend_buckets/v1/backend_buckets_connection_idempotency_policy.h index b5440de631fc5..3599e6ad76d4f 100644 --- a/google/cloud/compute/backend_buckets/v1/backend_buckets_connection_idempotency_policy.h +++ b/google/cloud/compute/backend_buckets/v1/backend_buckets_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_BACKEND_BUCKETS_V1_BACKEND_BUCKETS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_BACKEND_BUCKETS_V1_BACKEND_BUCKETS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/backend_buckets/v1/backend_buckets.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/backend_buckets/v1/backend_buckets_proto_export.h b/google/cloud/compute/backend_buckets/v1/backend_buckets_proto_export.h index 971b25fd59947..3e8399bd2ecec 100644 --- a/google/cloud/compute/backend_buckets/v1/backend_buckets_proto_export.h +++ b/google/cloud/compute/backend_buckets/v1/backend_buckets_proto_export.h @@ -26,14 +26,14 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_BACKEND_BUCKETS_V1_BACKEND_BUCKETS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_007.pb.h" +#include "google/cloud/compute/v1/internal/common_010.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_031.pb.h" +#include "google/cloud/compute/v1/internal/common_047.pb.h" +#include "google/cloud/compute/v1/internal/common_118.pb.h" +#include "google/cloud/compute/v1/internal/common_121.pb.h" +#include "google/cloud/compute/v1/internal/common_145.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_BACKEND_BUCKETS_V1_BACKEND_BUCKETS_PROTO_EXPORT_H diff --git a/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_option_defaults.cc b/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_option_defaults.cc index 00439c6f37844..b75d274484ad1 100644 --- a/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_option_defaults.cc +++ b/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_option_defaults.cc @@ -42,7 +42,7 @@ Options BackendBucketsDefaultOptions(Options options) { compute_backend_buckets_v1::BackendBucketsRetryPolicyOption>()) { options.set( compute_backend_buckets_v1::BackendBucketsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_rest_connection_impl.h b/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_rest_connection_impl.h index 32c81f56546d8..a714e33c7b09a 100644 --- a/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_rest_connection_impl.h +++ b/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_rest_connection_impl.h @@ -24,13 +24,13 @@ #include "google/cloud/compute/backend_buckets/v1/backend_buckets_options.h" #include "google/cloud/compute/backend_buckets/v1/internal/backend_buckets_rest_stub.h" #include "google/cloud/compute/backend_buckets/v1/internal/backend_buckets_retry_traits.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/background_threads.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_rest_logging_decorator.h b/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_rest_logging_decorator.h index cedc30fa2bc85..68ab2f27e797b 100644 --- a/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_rest_logging_decorator.h +++ b/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_BACKEND_BUCKETS_V1_INTERNAL_BACKEND_BUCKETS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_BACKEND_BUCKETS_V1_INTERNAL_BACKEND_BUCKETS_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/backend_buckets/v1/backend_buckets.pb.h" #include "google/cloud/compute/backend_buckets/v1/internal/backend_buckets_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_rest_metadata_decorator.cc b/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_rest_metadata_decorator.cc index 7b75d94b33f1f..b5541093271aa 100644 --- a/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_rest_metadata_decorator.cc +++ b/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/backend_buckets/v1/backend_buckets.proto #include "google/cloud/compute/backend_buckets/v1/internal/backend_buckets_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_rest_metadata_decorator.h b/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_rest_metadata_decorator.h index 90d674531e5c8..660359ad74c88 100644 --- a/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_rest_metadata_decorator.h +++ b/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_BACKEND_BUCKETS_V1_INTERNAL_BACKEND_BUCKETS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_BACKEND_BUCKETS_V1_INTERNAL_BACKEND_BUCKETS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/backend_buckets/v1/backend_buckets.pb.h" #include "google/cloud/compute/backend_buckets/v1/internal/backend_buckets_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_rest_stub.cc b/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_rest_stub.cc index ec0e898ee48d1..cdc795a8900c4 100644 --- a/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_rest_stub.cc +++ b/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/backend_buckets/v1/backend_buckets.proto #include "google/cloud/compute/backend_buckets/v1/internal/backend_buckets_rest_stub.h" +#include "google/cloud/compute/backend_buckets/v1/backend_buckets.pb.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_rest_stub.h b/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_rest_stub.h index a2dec92e271a8..d607a319a6ef2 100644 --- a/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_rest_stub.h +++ b/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_BACKEND_BUCKETS_V1_INTERNAL_BACKEND_BUCKETS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_BACKEND_BUCKETS_V1_INTERNAL_BACKEND_BUCKETS_REST_STUB_H +#include "google/cloud/compute/backend_buckets/v1/backend_buckets.pb.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_tracing_connection.cc b/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_tracing_connection.cc index 4d1d8b24c2e15..6d9fce1a05ff4 100644 --- a/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_tracing_connection.cc +++ b/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_backend_buckets_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - BackendBucketsTracingConnection::BackendBucketsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -328,17 +326,13 @@ BackendBucketsTracingConnection::UpdateBackendBucket( child_->UpdateBackendBucket(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeBackendBucketsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_tracing_connection.h b/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_tracing_connection.h index 3bf2a13a3f03c..e74d0931b01e1 100644 --- a/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_tracing_connection.h +++ b/google/cloud/compute/backend_buckets/v1/internal/backend_buckets_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_backend_buckets_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class BackendBucketsTracingConnection : public compute_backend_buckets_v1::BackendBucketsConnection { public: @@ -149,8 +147,6 @@ class BackendBucketsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/backend_services/v1/backend_services_connection.h b/google/cloud/compute/backend_services/v1/backend_services_connection.h index 1e1462ff71061..734e2a613b550 100644 --- a/google/cloud/compute/backend_services/v1/backend_services_connection.h +++ b/google/cloud/compute/backend_services/v1/backend_services_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_BACKEND_SERVICES_V1_BACKEND_SERVICES_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_BACKEND_SERVICES_V1_BACKEND_SERVICES_CONNECTION_H +#include "google/cloud/compute/backend_services/v1/backend_services.pb.h" #include "google/cloud/compute/backend_services/v1/backend_services_connection_idempotency_policy.h" #include "google/cloud/compute/backend_services/v1/internal/backend_services_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/backend_services/v1/backend_services_connection_idempotency_policy.h b/google/cloud/compute/backend_services/v1/backend_services_connection_idempotency_policy.h index 2ae879dfde6e7..dbac8ebc9db2c 100644 --- a/google/cloud/compute/backend_services/v1/backend_services_connection_idempotency_policy.h +++ b/google/cloud/compute/backend_services/v1/backend_services_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_BACKEND_SERVICES_V1_BACKEND_SERVICES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_BACKEND_SERVICES_V1_BACKEND_SERVICES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/backend_services/v1/backend_services.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/backend_services/v1/backend_services_proto_export.h b/google/cloud/compute/backend_services/v1/backend_services_proto_export.h index 5726bee61e467..e6336f1942e21 100644 --- a/google/cloud/compute/backend_services/v1/backend_services_proto_export.h +++ b/google/cloud/compute/backend_services/v1/backend_services_proto_export.h @@ -26,17 +26,17 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_BACKEND_SERVICES_V1_BACKEND_SERVICES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_000.pb.h" +#include "google/cloud/compute/v1/internal/common_007.pb.h" +#include "google/cloud/compute/v1/internal/common_011.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_029.pb.h" +#include "google/cloud/compute/v1/internal/common_031.pb.h" +#include "google/cloud/compute/v1/internal/common_047.pb.h" +#include "google/cloud/compute/v1/internal/common_052.pb.h" +#include "google/cloud/compute/v1/internal/common_118.pb.h" +#include "google/cloud/compute/v1/internal/common_121.pb.h" +#include "google/cloud/compute/v1/internal/common_145.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_BACKEND_SERVICES_V1_BACKEND_SERVICES_PROTO_EXPORT_H diff --git a/google/cloud/compute/backend_services/v1/internal/backend_services_option_defaults.cc b/google/cloud/compute/backend_services/v1/internal/backend_services_option_defaults.cc index 2b2b39a3b8741..7f484be5a1d03 100644 --- a/google/cloud/compute/backend_services/v1/internal/backend_services_option_defaults.cc +++ b/google/cloud/compute/backend_services/v1/internal/backend_services_option_defaults.cc @@ -42,7 +42,7 @@ Options BackendServicesDefaultOptions(Options options) { compute_backend_services_v1::BackendServicesRetryPolicyOption>()) { options.set( compute_backend_services_v1::BackendServicesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/compute/backend_services/v1/internal/backend_services_rest_connection_impl.h b/google/cloud/compute/backend_services/v1/internal/backend_services_rest_connection_impl.h index d2f314f1ee081..c24e2e3dae62d 100644 --- a/google/cloud/compute/backend_services/v1/internal/backend_services_rest_connection_impl.h +++ b/google/cloud/compute/backend_services/v1/internal/backend_services_rest_connection_impl.h @@ -24,13 +24,13 @@ #include "google/cloud/compute/backend_services/v1/backend_services_options.h" #include "google/cloud/compute/backend_services/v1/internal/backend_services_rest_stub.h" #include "google/cloud/compute/backend_services/v1/internal/backend_services_retry_traits.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/background_threads.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/backend_services/v1/internal/backend_services_rest_logging_decorator.h b/google/cloud/compute/backend_services/v1/internal/backend_services_rest_logging_decorator.h index 76494fe13de37..92471d616240b 100644 --- a/google/cloud/compute/backend_services/v1/internal/backend_services_rest_logging_decorator.h +++ b/google/cloud/compute/backend_services/v1/internal/backend_services_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_BACKEND_SERVICES_V1_INTERNAL_BACKEND_SERVICES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_BACKEND_SERVICES_V1_INTERNAL_BACKEND_SERVICES_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/backend_services/v1/backend_services.pb.h" #include "google/cloud/compute/backend_services/v1/internal/backend_services_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/backend_services/v1/internal/backend_services_rest_metadata_decorator.cc b/google/cloud/compute/backend_services/v1/internal/backend_services_rest_metadata_decorator.cc index d9a5d55237da4..cd3e8bbb8a069 100644 --- a/google/cloud/compute/backend_services/v1/internal/backend_services_rest_metadata_decorator.cc +++ b/google/cloud/compute/backend_services/v1/internal/backend_services_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/backend_services/v1/backend_services.proto #include "google/cloud/compute/backend_services/v1/internal/backend_services_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/backend_services/v1/internal/backend_services_rest_metadata_decorator.h b/google/cloud/compute/backend_services/v1/internal/backend_services_rest_metadata_decorator.h index 70e437f1e1175..cc6816c86b0a9 100644 --- a/google/cloud/compute/backend_services/v1/internal/backend_services_rest_metadata_decorator.h +++ b/google/cloud/compute/backend_services/v1/internal/backend_services_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_BACKEND_SERVICES_V1_INTERNAL_BACKEND_SERVICES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_BACKEND_SERVICES_V1_INTERNAL_BACKEND_SERVICES_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/backend_services/v1/backend_services.pb.h" #include "google/cloud/compute/backend_services/v1/internal/backend_services_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/backend_services/v1/internal/backend_services_rest_stub.cc b/google/cloud/compute/backend_services/v1/internal/backend_services_rest_stub.cc index 1e5d454624be5..63c7c257fad2d 100644 --- a/google/cloud/compute/backend_services/v1/internal/backend_services_rest_stub.cc +++ b/google/cloud/compute/backend_services/v1/internal/backend_services_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/backend_services/v1/backend_services.proto #include "google/cloud/compute/backend_services/v1/internal/backend_services_rest_stub.h" +#include "google/cloud/compute/backend_services/v1/backend_services.pb.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/backend_services/v1/internal/backend_services_rest_stub.h b/google/cloud/compute/backend_services/v1/internal/backend_services_rest_stub.h index 38fb4362043b4..de1f44a8bebd0 100644 --- a/google/cloud/compute/backend_services/v1/internal/backend_services_rest_stub.h +++ b/google/cloud/compute/backend_services/v1/internal/backend_services_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_BACKEND_SERVICES_V1_INTERNAL_BACKEND_SERVICES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_BACKEND_SERVICES_V1_INTERNAL_BACKEND_SERVICES_REST_STUB_H +#include "google/cloud/compute/backend_services/v1/backend_services.pb.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/backend_services/v1/internal/backend_services_tracing_connection.cc b/google/cloud/compute/backend_services/v1/internal/backend_services_tracing_connection.cc index a11a6cf8741be..dcb5076fc6566 100644 --- a/google/cloud/compute/backend_services/v1/internal/backend_services_tracing_connection.cc +++ b/google/cloud/compute/backend_services/v1/internal/backend_services_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_backend_services_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - BackendServicesTracingConnection::BackendServicesTracingConnection( std::shared_ptr child) @@ -405,17 +403,13 @@ BackendServicesTracingConnection::UpdateBackendService( child_->UpdateBackendService(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeBackendServicesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/backend_services/v1/internal/backend_services_tracing_connection.h b/google/cloud/compute/backend_services/v1/internal/backend_services_tracing_connection.h index 6700e43d634aa..dbe1cc35cd8f0 100644 --- a/google/cloud/compute/backend_services/v1/internal/backend_services_tracing_connection.h +++ b/google/cloud/compute/backend_services/v1/internal/backend_services_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_backend_services_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class BackendServicesTracingConnection : public compute_backend_services_v1::BackendServicesConnection { public: @@ -177,8 +175,6 @@ class BackendServicesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/compute_library.bzl b/google/cloud/compute/compute_library.bzl index 014e2840bfee1..d0afcb0e16f14 100644 --- a/google/cloud/compute/compute_library.bzl +++ b/google/cloud/compute/compute_library.bzl @@ -63,7 +63,7 @@ def compute_library(service_dir, inner_deps = []): visibility = ["//:__pkg__"], deps = [ ":google_cloud_cpp_compute_" + service, - "@com_google_googletest//:gtest", + "@googletest//:gtest", ], ) @@ -77,7 +77,7 @@ def compute_library(service_dir, inner_deps = []): "//:grpc_utils", "//google/cloud:google_cloud_cpp_rest_internal", "//google/cloud:google_cloud_cpp_rest_protobuf_internal", - "//protos:system_includes", + # "//protos:system_includes", "//protos/google/cloud/compute:cc_proto", ] + inner_deps, ) diff --git a/google/cloud/compute/disk_types/v1/disk_types_connection.h b/google/cloud/compute/disk_types/v1/disk_types_connection.h index 0b29ddc91dafd..88c31a59cd78f 100644 --- a/google/cloud/compute/disk_types/v1/disk_types_connection.h +++ b/google/cloud/compute/disk_types/v1/disk_types_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_DISK_TYPES_V1_DISK_TYPES_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_DISK_TYPES_V1_DISK_TYPES_CONNECTION_H +#include "google/cloud/compute/disk_types/v1/disk_types.pb.h" #include "google/cloud/compute/disk_types/v1/disk_types_connection_idempotency_policy.h" #include "google/cloud/compute/disk_types/v1/internal/disk_types_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/disk_types/v1/disk_types_connection_idempotency_policy.h b/google/cloud/compute/disk_types/v1/disk_types_connection_idempotency_policy.h index 1aa25525eec82..6f4963641deba 100644 --- a/google/cloud/compute/disk_types/v1/disk_types_connection_idempotency_policy.h +++ b/google/cloud/compute/disk_types/v1/disk_types_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_DISK_TYPES_V1_DISK_TYPES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_DISK_TYPES_V1_DISK_TYPES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/disk_types/v1/disk_types.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/disk_types/v1/disk_types_proto_export.h b/google/cloud/compute/disk_types/v1/disk_types_proto_export.h index 2a80c4c51d3b6..4e6922ebcda89 100644 --- a/google/cloud/compute/disk_types/v1/disk_types_proto_export.h +++ b/google/cloud/compute/disk_types/v1/disk_types_proto_export.h @@ -26,9 +26,9 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_DISK_TYPES_V1_DISK_TYPES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_023.pb.h" +#include "google/cloud/compute/v1/internal/common_026.pb.h" +#include "google/cloud/compute/v1/internal/common_027.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_DISK_TYPES_V1_DISK_TYPES_PROTO_EXPORT_H diff --git a/google/cloud/compute/disk_types/v1/internal/disk_types_option_defaults.cc b/google/cloud/compute/disk_types/v1/internal/disk_types_option_defaults.cc index bcdbd75a2d149..8e5135ec9fcc0 100644 --- a/google/cloud/compute/disk_types/v1/internal/disk_types_option_defaults.cc +++ b/google/cloud/compute/disk_types/v1/internal/disk_types_option_defaults.cc @@ -41,7 +41,7 @@ Options DiskTypesDefaultOptions(Options options) { if (!options.has()) { options.set( compute_disk_types_v1::DiskTypesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/compute/disk_types/v1/internal/disk_types_rest_logging_decorator.h b/google/cloud/compute/disk_types/v1/internal/disk_types_rest_logging_decorator.h index 0e9236358aa29..262c05cba1b46 100644 --- a/google/cloud/compute/disk_types/v1/internal/disk_types_rest_logging_decorator.h +++ b/google/cloud/compute/disk_types/v1/internal/disk_types_rest_logging_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_DISK_TYPES_V1_INTERNAL_DISK_TYPES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_DISK_TYPES_V1_INTERNAL_DISK_TYPES_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/disk_types/v1/disk_types.pb.h" #include "google/cloud/compute/disk_types/v1/internal/disk_types_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include #include #include #include diff --git a/google/cloud/compute/disk_types/v1/internal/disk_types_rest_metadata_decorator.cc b/google/cloud/compute/disk_types/v1/internal/disk_types_rest_metadata_decorator.cc index 21313ab7689ac..7721d69917c6c 100644 --- a/google/cloud/compute/disk_types/v1/internal/disk_types_rest_metadata_decorator.cc +++ b/google/cloud/compute/disk_types/v1/internal/disk_types_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/disk_types/v1/disk_types.proto #include "google/cloud/compute/disk_types/v1/internal/disk_types_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/disk_types/v1/internal/disk_types_rest_metadata_decorator.h b/google/cloud/compute/disk_types/v1/internal/disk_types_rest_metadata_decorator.h index c6be52a27cd1b..f49bba68ad66e 100644 --- a/google/cloud/compute/disk_types/v1/internal/disk_types_rest_metadata_decorator.h +++ b/google/cloud/compute/disk_types/v1/internal/disk_types_rest_metadata_decorator.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_DISK_TYPES_V1_INTERNAL_DISK_TYPES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_DISK_TYPES_V1_INTERNAL_DISK_TYPES_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/disk_types/v1/disk_types.pb.h" #include "google/cloud/compute/disk_types/v1/internal/disk_types_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/compute/disk_types/v1/internal/disk_types_rest_stub.cc b/google/cloud/compute/disk_types/v1/internal/disk_types_rest_stub.cc index 5681155a14f3a..ae54b14bae63b 100644 --- a/google/cloud/compute/disk_types/v1/internal/disk_types_rest_stub.cc +++ b/google/cloud/compute/disk_types/v1/internal/disk_types_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/compute/disk_types/v1/disk_types.proto #include "google/cloud/compute/disk_types/v1/internal/disk_types_rest_stub.h" +#include "google/cloud/compute/disk_types/v1/disk_types.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/disk_types/v1/internal/disk_types_rest_stub.h b/google/cloud/compute/disk_types/v1/internal/disk_types_rest_stub.h index 96af6442c4479..78ab00742378b 100644 --- a/google/cloud/compute/disk_types/v1/internal/disk_types_rest_stub.h +++ b/google/cloud/compute/disk_types/v1/internal/disk_types_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_DISK_TYPES_V1_INTERNAL_DISK_TYPES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_DISK_TYPES_V1_INTERNAL_DISK_TYPES_REST_STUB_H +#include "google/cloud/compute/disk_types/v1/disk_types.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/disk_types/v1/internal/disk_types_tracing_connection.cc b/google/cloud/compute/disk_types/v1/internal/disk_types_tracing_connection.cc index 532c61af3a982..b4b9b840a1398 100644 --- a/google/cloud/compute/disk_types/v1/internal/disk_types_tracing_connection.cc +++ b/google/cloud/compute/disk_types/v1/internal/disk_types_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_disk_types_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DiskTypesTracingConnection::DiskTypesTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -69,16 +67,12 @@ DiskTypesTracingConnection::ListDiskTypes( std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDiskTypesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/disk_types/v1/internal/disk_types_tracing_connection.h b/google/cloud/compute/disk_types/v1/internal/disk_types_tracing_connection.h index cf1c117ae461c..6a0ac70153730 100644 --- a/google/cloud/compute/disk_types/v1/internal/disk_types_tracing_connection.h +++ b/google/cloud/compute/disk_types/v1/internal/disk_types_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_disk_types_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DiskTypesTracingConnection : public compute_disk_types_v1::DiskTypesConnection { public: @@ -57,8 +55,6 @@ class DiskTypesTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/disks/v1/disks_connection.h b/google/cloud/compute/disks/v1/disks_connection.h index 52e4036d8e657..199caa3e494e2 100644 --- a/google/cloud/compute/disks/v1/disks_connection.h +++ b/google/cloud/compute/disks/v1/disks_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_DISKS_V1_DISKS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_DISKS_V1_DISKS_CONNECTION_H +#include "google/cloud/compute/disks/v1/disks.pb.h" #include "google/cloud/compute/disks/v1/disks_connection_idempotency_policy.h" #include "google/cloud/compute/disks/v1/internal/disks_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/disks/v1/disks_connection_idempotency_policy.h b/google/cloud/compute/disks/v1/disks_connection_idempotency_policy.h index e340a7e299230..d22799ceb8c5c 100644 --- a/google/cloud/compute/disks/v1/disks_connection_idempotency_policy.h +++ b/google/cloud/compute/disks/v1/disks_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_DISKS_V1_DISKS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_DISKS_V1_DISKS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/disks/v1/disks.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/disks/v1/disks_proto_export.h b/google/cloud/compute/disks/v1/disks_proto_export.h index 50f3a7178a2a0..4a9a5c623c90b 100644 --- a/google/cloud/compute/disks/v1/disks_proto_export.h +++ b/google/cloud/compute/disks/v1/disks_proto_export.h @@ -26,16 +26,16 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_DISKS_V1_DISKS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_007.pb.h" +#include "google/cloud/compute/v1/internal/common_014.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_017.pb.h" +#include "google/cloud/compute/v1/internal/common_021.pb.h" +#include "google/cloud/compute/v1/internal/common_031.pb.h" +#include "google/cloud/compute/v1/internal/common_122.pb.h" +#include "google/cloud/compute/v1/internal/common_145.pb.h" +#include "google/cloud/compute/v1/internal/common_151.pb.h" +#include "google/cloud/compute/v1/internal/common_152.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_DISKS_V1_DISKS_PROTO_EXPORT_H diff --git a/google/cloud/compute/disks/v1/internal/disks_option_defaults.cc b/google/cloud/compute/disks/v1/internal/disks_option_defaults.cc index c44587cd299d7..fa5640021201d 100644 --- a/google/cloud/compute/disks/v1/internal/disks_option_defaults.cc +++ b/google/cloud/compute/disks/v1/internal/disks_option_defaults.cc @@ -40,7 +40,7 @@ Options DisksDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - compute_disks_v1::DisksLimitedTimeRetryPolicy(std::chrono::minutes(30)) + compute_disks_v1::DisksLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/compute/disks/v1/internal/disks_rest_connection_impl.h b/google/cloud/compute/disks/v1/internal/disks_rest_connection_impl.h index 867340946d65c..d1b4c98defb06 100644 --- a/google/cloud/compute/disks/v1/internal/disks_rest_connection_impl.h +++ b/google/cloud/compute/disks/v1/internal/disks_rest_connection_impl.h @@ -24,13 +24,13 @@ #include "google/cloud/compute/disks/v1/disks_options.h" #include "google/cloud/compute/disks/v1/internal/disks_rest_stub.h" #include "google/cloud/compute/disks/v1/internal/disks_retry_traits.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/background_threads.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/disks/v1/internal/disks_rest_logging_decorator.h b/google/cloud/compute/disks/v1/internal/disks_rest_logging_decorator.h index 347ca0b28687b..5d71c35f8bb9c 100644 --- a/google/cloud/compute/disks/v1/internal/disks_rest_logging_decorator.h +++ b/google/cloud/compute/disks/v1/internal/disks_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_DISKS_V1_INTERNAL_DISKS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_DISKS_V1_INTERNAL_DISKS_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/disks/v1/disks.pb.h" #include "google/cloud/compute/disks/v1/internal/disks_rest_stub.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/disks/v1/internal/disks_rest_metadata_decorator.cc b/google/cloud/compute/disks/v1/internal/disks_rest_metadata_decorator.cc index 807de2f35a467..8a54cf4cb66ff 100644 --- a/google/cloud/compute/disks/v1/internal/disks_rest_metadata_decorator.cc +++ b/google/cloud/compute/disks/v1/internal/disks_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/disks/v1/disks.proto #include "google/cloud/compute/disks/v1/internal/disks_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/disks/v1/internal/disks_rest_metadata_decorator.h b/google/cloud/compute/disks/v1/internal/disks_rest_metadata_decorator.h index 807c5881b0b15..7557be5a73ddb 100644 --- a/google/cloud/compute/disks/v1/internal/disks_rest_metadata_decorator.h +++ b/google/cloud/compute/disks/v1/internal/disks_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_DISKS_V1_INTERNAL_DISKS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_DISKS_V1_INTERNAL_DISKS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/disks/v1/disks.pb.h" #include "google/cloud/compute/disks/v1/internal/disks_rest_stub.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/disks/v1/internal/disks_rest_stub.cc b/google/cloud/compute/disks/v1/internal/disks_rest_stub.cc index f7ef6066e38e1..4b5ae808fff2b 100644 --- a/google/cloud/compute/disks/v1/internal/disks_rest_stub.cc +++ b/google/cloud/compute/disks/v1/internal/disks_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/disks/v1/disks.proto #include "google/cloud/compute/disks/v1/internal/disks_rest_stub.h" +#include "google/cloud/compute/disks/v1/disks.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/disks/v1/internal/disks_rest_stub.h b/google/cloud/compute/disks/v1/internal/disks_rest_stub.h index 226ec07a61fcc..f9123b9a39534 100644 --- a/google/cloud/compute/disks/v1/internal/disks_rest_stub.h +++ b/google/cloud/compute/disks/v1/internal/disks_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_DISKS_V1_INTERNAL_DISKS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_DISKS_V1_INTERNAL_DISKS_REST_STUB_H +#include "google/cloud/compute/disks/v1/disks.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/disks/v1/internal/disks_tracing_connection.cc b/google/cloud/compute/disks/v1/internal/disks_tracing_connection.cc index 4071184a022ab..271ce8de2d4fd 100644 --- a/google/cloud/compute/disks/v1/internal/disks_tracing_connection.cc +++ b/google/cloud/compute/disks/v1/internal/disks_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_disks_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DisksTracingConnection::DisksTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -485,15 +483,11 @@ DisksTracingConnection::UpdateDisk( return internal::EndSpan(std::move(span), child_->UpdateDisk(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDisksTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/disks/v1/internal/disks_tracing_connection.h b/google/cloud/compute/disks/v1/internal/disks_tracing_connection.h index d3b50df9aa47a..8cf191957cde5 100644 --- a/google/cloud/compute/disks/v1/internal/disks_tracing_connection.h +++ b/google/cloud/compute/disks/v1/internal/disks_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_disks_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DisksTracingConnection : public compute_disks_v1::DisksConnection { public: ~DisksTracingConnection() override = default; @@ -234,8 +232,6 @@ class DisksTracingConnection : public compute_disks_v1::DisksConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/external_vpn_gateways/v1/external_vpn_gateways_connection.h b/google/cloud/compute/external_vpn_gateways/v1/external_vpn_gateways_connection.h index 25fee098fcbab..ee21aacbdd402 100644 --- a/google/cloud/compute/external_vpn_gateways/v1/external_vpn_gateways_connection.h +++ b/google/cloud/compute/external_vpn_gateways/v1/external_vpn_gateways_connection.h @@ -20,6 +20,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_EXTERNAL_VPN_GATEWAYS_V1_EXTERNAL_VPN_GATEWAYS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_EXTERNAL_VPN_GATEWAYS_V1_EXTERNAL_VPN_GATEWAYS_CONNECTION_H +#include "google/cloud/compute/external_vpn_gateways/v1/external_vpn_gateways.pb.h" #include "google/cloud/compute/external_vpn_gateways/v1/external_vpn_gateways_connection_idempotency_policy.h" #include "google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -31,7 +32,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/external_vpn_gateways/v1/external_vpn_gateways_connection_idempotency_policy.h b/google/cloud/compute/external_vpn_gateways/v1/external_vpn_gateways_connection_idempotency_policy.h index f1967ce875fe2..5a2b0270d6e34 100644 --- a/google/cloud/compute/external_vpn_gateways/v1/external_vpn_gateways_connection_idempotency_policy.h +++ b/google/cloud/compute/external_vpn_gateways/v1/external_vpn_gateways_connection_idempotency_policy.h @@ -20,9 +20,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_EXTERNAL_VPN_GATEWAYS_V1_EXTERNAL_VPN_GATEWAYS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_EXTERNAL_VPN_GATEWAYS_V1_EXTERNAL_VPN_GATEWAYS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/external_vpn_gateways/v1/external_vpn_gateways.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/external_vpn_gateways/v1/external_vpn_gateways_proto_export.h b/google/cloud/compute/external_vpn_gateways/v1/external_vpn_gateways_proto_export.h index 6cf1145ffbbf7..9e6083481dbe9 100644 --- a/google/cloud/compute/external_vpn_gateways/v1/external_vpn_gateways_proto_export.h +++ b/google/cloud/compute/external_vpn_gateways/v1/external_vpn_gateways_proto_export.h @@ -26,10 +26,10 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_EXTERNAL_VPN_GATEWAYS_V1_EXTERNAL_VPN_GATEWAYS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_032.pb.h" +#include "google/cloud/compute/v1/internal/common_046.pb.h" +#include "google/cloud/compute/v1/internal/common_145.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_EXTERNAL_VPN_GATEWAYS_V1_EXTERNAL_VPN_GATEWAYS_PROTO_EXPORT_H diff --git a/google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_option_defaults.cc b/google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_option_defaults.cc index df18d0c4243f9..f73ac32dc6a1d 100644 --- a/google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_option_defaults.cc +++ b/google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_option_defaults.cc @@ -45,7 +45,7 @@ Options ExternalVpnGatewaysDefaultOptions(Options options) { options.set< compute_external_vpn_gateways_v1::ExternalVpnGatewaysRetryPolicyOption>( compute_external_vpn_gateways_v1:: - ExternalVpnGatewaysLimitedTimeRetryPolicy(std::chrono::minutes(30)) + ExternalVpnGatewaysLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_rest_logging_decorator.h b/google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_rest_logging_decorator.h index 6eec805689074..c6f19affdcf31 100644 --- a/google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_rest_logging_decorator.h +++ b/google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_rest_logging_decorator.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_EXTERNAL_VPN_GATEWAYS_V1_INTERNAL_EXTERNAL_VPN_GATEWAYS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_EXTERNAL_VPN_GATEWAYS_V1_INTERNAL_EXTERNAL_VPN_GATEWAYS_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/external_vpn_gateways/v1/external_vpn_gateways.pb.h" #include "google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_rest_metadata_decorator.cc b/google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_rest_metadata_decorator.cc index 18f59fdd7b78d..18705296f995e 100644 --- a/google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_rest_metadata_decorator.cc +++ b/google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_rest_metadata_decorator.cc @@ -18,10 +18,10 @@ // google/cloud/compute/external_vpn_gateways/v1/external_vpn_gateways.proto #include "google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_rest_metadata_decorator.h b/google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_rest_metadata_decorator.h index 74232cb3ba24b..7f91f66d1cedf 100644 --- a/google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_rest_metadata_decorator.h +++ b/google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_rest_metadata_decorator.h @@ -20,12 +20,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_EXTERNAL_VPN_GATEWAYS_V1_INTERNAL_EXTERNAL_VPN_GATEWAYS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_EXTERNAL_VPN_GATEWAYS_V1_INTERNAL_EXTERNAL_VPN_GATEWAYS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/external_vpn_gateways/v1/external_vpn_gateways.pb.h" #include "google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_rest_stub.cc b/google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_rest_stub.cc index f1952a748cc82..2b9c051250f1e 100644 --- a/google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_rest_stub.cc +++ b/google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_rest_stub.cc @@ -18,12 +18,12 @@ // google/cloud/compute/external_vpn_gateways/v1/external_vpn_gateways.proto #include "google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_rest_stub.h" +#include "google/cloud/compute/external_vpn_gateways/v1/external_vpn_gateways.pb.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_rest_stub.h b/google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_rest_stub.h index 8f91716039ae8..bf5735559b65f 100644 --- a/google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_rest_stub.h +++ b/google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_rest_stub.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_EXTERNAL_VPN_GATEWAYS_V1_INTERNAL_EXTERNAL_VPN_GATEWAYS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_EXTERNAL_VPN_GATEWAYS_V1_INTERNAL_EXTERNAL_VPN_GATEWAYS_REST_STUB_H +#include "google/cloud/compute/external_vpn_gateways/v1/external_vpn_gateways.pb.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_tracing_connection.cc b/google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_tracing_connection.cc index 9ee9175f72537..dbc58fa77c5ed 100644 --- a/google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_tracing_connection.cc +++ b/google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace compute_external_vpn_gateways_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ExternalVpnGatewaysTracingConnection::ExternalVpnGatewaysTracingConnection( std::shared_ptr< compute_external_vpn_gateways_v1::ExternalVpnGatewaysConnection> @@ -174,19 +172,15 @@ ExternalVpnGatewaysTracingConnection::TestIamPermissions( return internal::EndSpan(*span, child_->TestIamPermissions(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeExternalVpnGatewaysTracingConnection( std::shared_ptr< compute_external_vpn_gateways_v1::ExternalVpnGatewaysConnection> conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_tracing_connection.h b/google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_tracing_connection.h index 7b86c59bea8b1..3b9214435f3ac 100644 --- a/google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_tracing_connection.h +++ b/google/cloud/compute/external_vpn_gateways/v1/internal/external_vpn_gateways_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace compute_external_vpn_gateways_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ExternalVpnGatewaysTracingConnection : public compute_external_vpn_gateways_v1::ExternalVpnGatewaysConnection { public: @@ -100,8 +98,6 @@ class ExternalVpnGatewaysTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/firewall_policies/v1/firewall_policies_connection.h b/google/cloud/compute/firewall_policies/v1/firewall_policies_connection.h index 0ad9456907c97..e97f912574edd 100644 --- a/google/cloud/compute/firewall_policies/v1/firewall_policies_connection.h +++ b/google/cloud/compute/firewall_policies/v1/firewall_policies_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FIREWALL_POLICIES_V1_FIREWALL_POLICIES_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FIREWALL_POLICIES_V1_FIREWALL_POLICIES_CONNECTION_H +#include "google/cloud/compute/firewall_policies/v1/firewall_policies.pb.h" #include "google/cloud/compute/firewall_policies/v1/firewall_policies_connection_idempotency_policy.h" #include "google/cloud/compute/firewall_policies/v1/internal/firewall_policies_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/firewall_policies/v1/firewall_policies_connection_idempotency_policy.h b/google/cloud/compute/firewall_policies/v1/firewall_policies_connection_idempotency_policy.h index f4b0a15c99be1..62cecaf282207 100644 --- a/google/cloud/compute/firewall_policies/v1/firewall_policies_connection_idempotency_policy.h +++ b/google/cloud/compute/firewall_policies/v1/firewall_policies_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FIREWALL_POLICIES_V1_FIREWALL_POLICIES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FIREWALL_POLICIES_V1_FIREWALL_POLICIES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/firewall_policies/v1/firewall_policies.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/firewall_policies/v1/firewall_policies_proto_export.h b/google/cloud/compute/firewall_policies/v1/firewall_policies_proto_export.h index 5af3fdcf13552..bcd7cd1c3dc5d 100644 --- a/google/cloud/compute/firewall_policies/v1/firewall_policies_proto_export.h +++ b/google/cloud/compute/firewall_policies/v1/firewall_policies_proto_export.h @@ -26,13 +26,13 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FIREWALL_POLICIES_V1_FIREWALL_POLICIES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_007.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_031.pb.h" +#include "google/cloud/compute/v1/internal/common_036.pb.h" +#include "google/cloud/compute/v1/internal/common_038.pb.h" +#include "google/cloud/compute/v1/internal/common_039.pb.h" +#include "google/cloud/compute/v1/internal/common_145.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FIREWALL_POLICIES_V1_FIREWALL_POLICIES_PROTO_EXPORT_H diff --git a/google/cloud/compute/firewall_policies/v1/internal/firewall_policies_option_defaults.cc b/google/cloud/compute/firewall_policies/v1/internal/firewall_policies_option_defaults.cc index 91da7b8526262..6ae7bdfd6777d 100644 --- a/google/cloud/compute/firewall_policies/v1/internal/firewall_policies_option_defaults.cc +++ b/google/cloud/compute/firewall_policies/v1/internal/firewall_policies_option_defaults.cc @@ -43,7 +43,7 @@ Options FirewallPoliciesDefaultOptions(Options options) { options.set< compute_firewall_policies_v1::FirewallPoliciesRetryPolicyOption>( compute_firewall_policies_v1::FirewallPoliciesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/firewall_policies/v1/internal/firewall_policies_rest_logging_decorator.h b/google/cloud/compute/firewall_policies/v1/internal/firewall_policies_rest_logging_decorator.h index f90a26b7b7882..f12035b374ea1 100644 --- a/google/cloud/compute/firewall_policies/v1/internal/firewall_policies_rest_logging_decorator.h +++ b/google/cloud/compute/firewall_policies/v1/internal/firewall_policies_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FIREWALL_POLICIES_V1_INTERNAL_FIREWALL_POLICIES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FIREWALL_POLICIES_V1_INTERNAL_FIREWALL_POLICIES_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/firewall_policies/v1/firewall_policies.pb.h" #include "google/cloud/compute/firewall_policies/v1/internal/firewall_policies_rest_stub.h" +#include "google/cloud/compute/global_organization_operations/v1/global_organization_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/firewall_policies/v1/internal/firewall_policies_rest_metadata_decorator.cc b/google/cloud/compute/firewall_policies/v1/internal/firewall_policies_rest_metadata_decorator.cc index e9fe00ab2cd04..d52826a7f143e 100644 --- a/google/cloud/compute/firewall_policies/v1/internal/firewall_policies_rest_metadata_decorator.cc +++ b/google/cloud/compute/firewall_policies/v1/internal/firewall_policies_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/firewall_policies/v1/firewall_policies.proto #include "google/cloud/compute/firewall_policies/v1/internal/firewall_policies_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/firewall_policies/v1/internal/firewall_policies_rest_metadata_decorator.h b/google/cloud/compute/firewall_policies/v1/internal/firewall_policies_rest_metadata_decorator.h index 999ee0e3c8404..6bb29eb60dbfa 100644 --- a/google/cloud/compute/firewall_policies/v1/internal/firewall_policies_rest_metadata_decorator.h +++ b/google/cloud/compute/firewall_policies/v1/internal/firewall_policies_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FIREWALL_POLICIES_V1_INTERNAL_FIREWALL_POLICIES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FIREWALL_POLICIES_V1_INTERNAL_FIREWALL_POLICIES_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/firewall_policies/v1/firewall_policies.pb.h" #include "google/cloud/compute/firewall_policies/v1/internal/firewall_policies_rest_stub.h" +#include "google/cloud/compute/global_organization_operations/v1/global_organization_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/firewall_policies/v1/internal/firewall_policies_rest_stub.cc b/google/cloud/compute/firewall_policies/v1/internal/firewall_policies_rest_stub.cc index 7cd537c35e2cc..f94c01a8b1cc2 100644 --- a/google/cloud/compute/firewall_policies/v1/internal/firewall_policies_rest_stub.cc +++ b/google/cloud/compute/firewall_policies/v1/internal/firewall_policies_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/firewall_policies/v1/firewall_policies.proto #include "google/cloud/compute/firewall_policies/v1/internal/firewall_policies_rest_stub.h" +#include "google/cloud/compute/firewall_policies/v1/firewall_policies.pb.h" +#include "google/cloud/compute/global_organization_operations/v1/global_organization_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/firewall_policies/v1/internal/firewall_policies_rest_stub.h b/google/cloud/compute/firewall_policies/v1/internal/firewall_policies_rest_stub.h index bba276c555118..d9de6b7cd4e55 100644 --- a/google/cloud/compute/firewall_policies/v1/internal/firewall_policies_rest_stub.h +++ b/google/cloud/compute/firewall_policies/v1/internal/firewall_policies_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FIREWALL_POLICIES_V1_INTERNAL_FIREWALL_POLICIES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FIREWALL_POLICIES_V1_INTERNAL_FIREWALL_POLICIES_REST_STUB_H +#include "google/cloud/compute/firewall_policies/v1/firewall_policies.pb.h" +#include "google/cloud/compute/global_organization_operations/v1/global_organization_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/firewall_policies/v1/internal/firewall_policies_tracing_connection.cc b/google/cloud/compute/firewall_policies/v1/internal/firewall_policies_tracing_connection.cc index d0843e5275cb0..4e4ac7975244e 100644 --- a/google/cloud/compute/firewall_policies/v1/internal/firewall_policies_tracing_connection.cc +++ b/google/cloud/compute/firewall_policies/v1/internal/firewall_policies_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_firewall_policies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - FirewallPoliciesTracingConnection::FirewallPoliciesTracingConnection( std::shared_ptr child) @@ -445,17 +443,13 @@ FirewallPoliciesTracingConnection::TestIamPermissions( return internal::EndSpan(*span, child_->TestIamPermissions(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeFirewallPoliciesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/firewall_policies/v1/internal/firewall_policies_tracing_connection.h b/google/cloud/compute/firewall_policies/v1/internal/firewall_policies_tracing_connection.h index 60a9a77c599b4..d45a78edc3890 100644 --- a/google/cloud/compute/firewall_policies/v1/internal/firewall_policies_tracing_connection.h +++ b/google/cloud/compute/firewall_policies/v1/internal/firewall_policies_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_firewall_policies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class FirewallPoliciesTracingConnection : public compute_firewall_policies_v1::FirewallPoliciesConnection { public: @@ -195,8 +193,6 @@ class FirewallPoliciesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/firewalls/v1/firewalls_connection.h b/google/cloud/compute/firewalls/v1/firewalls_connection.h index d686a7390a33c..306f907e634a3 100644 --- a/google/cloud/compute/firewalls/v1/firewalls_connection.h +++ b/google/cloud/compute/firewalls/v1/firewalls_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FIREWALLS_V1_FIREWALLS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FIREWALLS_V1_FIREWALLS_CONNECTION_H +#include "google/cloud/compute/firewalls/v1/firewalls.pb.h" #include "google/cloud/compute/firewalls/v1/firewalls_connection_idempotency_policy.h" #include "google/cloud/compute/firewalls/v1/internal/firewalls_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/firewalls/v1/firewalls_connection_idempotency_policy.h b/google/cloud/compute/firewalls/v1/firewalls_connection_idempotency_policy.h index 664b20510f22c..57a9d5014eaf0 100644 --- a/google/cloud/compute/firewalls/v1/firewalls_connection_idempotency_policy.h +++ b/google/cloud/compute/firewalls/v1/firewalls_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FIREWALLS_V1_FIREWALLS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FIREWALLS_V1_FIREWALLS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/firewalls/v1/firewalls.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/firewalls/v1/firewalls_proto_export.h b/google/cloud/compute/firewalls/v1/firewalls_proto_export.h index d6fcd239f3fbe..7a630bcdc8e4a 100644 --- a/google/cloud/compute/firewalls/v1/firewalls_proto_export.h +++ b/google/cloud/compute/firewalls/v1/firewalls_proto_export.h @@ -26,9 +26,9 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FIREWALLS_V1_FIREWALLS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_034.pb.h" +#include "google/cloud/compute/v1/internal/common_035.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FIREWALLS_V1_FIREWALLS_PROTO_EXPORT_H diff --git a/google/cloud/compute/firewalls/v1/internal/firewalls_option_defaults.cc b/google/cloud/compute/firewalls/v1/internal/firewalls_option_defaults.cc index fa0789b1a7b29..aa07e31f909f3 100644 --- a/google/cloud/compute/firewalls/v1/internal/firewalls_option_defaults.cc +++ b/google/cloud/compute/firewalls/v1/internal/firewalls_option_defaults.cc @@ -41,7 +41,7 @@ Options FirewallsDefaultOptions(Options options) { if (!options.has()) { options.set( compute_firewalls_v1::FirewallsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/compute/firewalls/v1/internal/firewalls_rest_connection_impl.h b/google/cloud/compute/firewalls/v1/internal/firewalls_rest_connection_impl.h index 843f62cca0b09..ee060f3e03447 100644 --- a/google/cloud/compute/firewalls/v1/internal/firewalls_rest_connection_impl.h +++ b/google/cloud/compute/firewalls/v1/internal/firewalls_rest_connection_impl.h @@ -24,13 +24,13 @@ #include "google/cloud/compute/firewalls/v1/firewalls_options.h" #include "google/cloud/compute/firewalls/v1/internal/firewalls_rest_stub.h" #include "google/cloud/compute/firewalls/v1/internal/firewalls_retry_traits.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/background_threads.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/firewalls/v1/internal/firewalls_rest_logging_decorator.h b/google/cloud/compute/firewalls/v1/internal/firewalls_rest_logging_decorator.h index 0c4c801d4ccbd..b89384fe97444 100644 --- a/google/cloud/compute/firewalls/v1/internal/firewalls_rest_logging_decorator.h +++ b/google/cloud/compute/firewalls/v1/internal/firewalls_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FIREWALLS_V1_INTERNAL_FIREWALLS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FIREWALLS_V1_INTERNAL_FIREWALLS_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/firewalls/v1/firewalls.pb.h" #include "google/cloud/compute/firewalls/v1/internal/firewalls_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/firewalls/v1/internal/firewalls_rest_metadata_decorator.cc b/google/cloud/compute/firewalls/v1/internal/firewalls_rest_metadata_decorator.cc index d6080494489e3..ac2ca5fecbc44 100644 --- a/google/cloud/compute/firewalls/v1/internal/firewalls_rest_metadata_decorator.cc +++ b/google/cloud/compute/firewalls/v1/internal/firewalls_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/firewalls/v1/firewalls.proto #include "google/cloud/compute/firewalls/v1/internal/firewalls_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/firewalls/v1/internal/firewalls_rest_metadata_decorator.h b/google/cloud/compute/firewalls/v1/internal/firewalls_rest_metadata_decorator.h index f78426ee1106f..92373eb1203f9 100644 --- a/google/cloud/compute/firewalls/v1/internal/firewalls_rest_metadata_decorator.h +++ b/google/cloud/compute/firewalls/v1/internal/firewalls_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FIREWALLS_V1_INTERNAL_FIREWALLS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FIREWALLS_V1_INTERNAL_FIREWALLS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/firewalls/v1/firewalls.pb.h" #include "google/cloud/compute/firewalls/v1/internal/firewalls_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/firewalls/v1/internal/firewalls_rest_stub.cc b/google/cloud/compute/firewalls/v1/internal/firewalls_rest_stub.cc index b73f2d2ff33ce..49f4effd50b5c 100644 --- a/google/cloud/compute/firewalls/v1/internal/firewalls_rest_stub.cc +++ b/google/cloud/compute/firewalls/v1/internal/firewalls_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/firewalls/v1/firewalls.proto #include "google/cloud/compute/firewalls/v1/internal/firewalls_rest_stub.h" +#include "google/cloud/compute/firewalls/v1/firewalls.pb.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/firewalls/v1/internal/firewalls_rest_stub.h b/google/cloud/compute/firewalls/v1/internal/firewalls_rest_stub.h index 82b7b51e8d2a1..25405c2ca0d1f 100644 --- a/google/cloud/compute/firewalls/v1/internal/firewalls_rest_stub.h +++ b/google/cloud/compute/firewalls/v1/internal/firewalls_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FIREWALLS_V1_INTERNAL_FIREWALLS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FIREWALLS_V1_INTERNAL_FIREWALLS_REST_STUB_H +#include "google/cloud/compute/firewalls/v1/firewalls.pb.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/firewalls/v1/internal/firewalls_tracing_connection.cc b/google/cloud/compute/firewalls/v1/internal/firewalls_tracing_connection.cc index 3de8471ef6d88..98fc7e257429f 100644 --- a/google/cloud/compute/firewalls/v1/internal/firewalls_tracing_connection.cc +++ b/google/cloud/compute/firewalls/v1/internal/firewalls_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_firewalls_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - FirewallsTracingConnection::FirewallsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -178,16 +176,12 @@ FirewallsTracingConnection::UpdateFirewall( return internal::EndSpan(std::move(span), child_->UpdateFirewall(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeFirewallsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/firewalls/v1/internal/firewalls_tracing_connection.h b/google/cloud/compute/firewalls/v1/internal/firewalls_tracing_connection.h index 5dd274ecdabad..d002d9ee7d3e4 100644 --- a/google/cloud/compute/firewalls/v1/internal/firewalls_tracing_connection.h +++ b/google/cloud/compute/firewalls/v1/internal/firewalls_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_firewalls_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class FirewallsTracingConnection : public compute_firewalls_v1::FirewallsConnection { public: @@ -100,8 +98,6 @@ class FirewallsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/forwarding_rules/v1/forwarding_rules_connection.h b/google/cloud/compute/forwarding_rules/v1/forwarding_rules_connection.h index 916e1237698c3..a1e833bb376a1 100644 --- a/google/cloud/compute/forwarding_rules/v1/forwarding_rules_connection.h +++ b/google/cloud/compute/forwarding_rules/v1/forwarding_rules_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FORWARDING_RULES_V1_FORWARDING_RULES_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FORWARDING_RULES_V1_FORWARDING_RULES_CONNECTION_H +#include "google/cloud/compute/forwarding_rules/v1/forwarding_rules.pb.h" #include "google/cloud/compute/forwarding_rules/v1/forwarding_rules_connection_idempotency_policy.h" #include "google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/forwarding_rules/v1/forwarding_rules_connection_idempotency_policy.h b/google/cloud/compute/forwarding_rules/v1/forwarding_rules_connection_idempotency_policy.h index 405c7b1026318..1a835c08eead2 100644 --- a/google/cloud/compute/forwarding_rules/v1/forwarding_rules_connection_idempotency_policy.h +++ b/google/cloud/compute/forwarding_rules/v1/forwarding_rules_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FORWARDING_RULES_V1_FORWARDING_RULES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FORWARDING_RULES_V1_FORWARDING_RULES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/forwarding_rules/v1/forwarding_rules.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/forwarding_rules/v1/forwarding_rules_proto_export.h b/google/cloud/compute/forwarding_rules/v1/forwarding_rules_proto_export.h index 31d4d9aefd639..61a7f37821cf3 100644 --- a/google/cloud/compute/forwarding_rules/v1/forwarding_rules_proto_export.h +++ b/google/cloud/compute/forwarding_rules/v1/forwarding_rules_proto_export.h @@ -26,12 +26,12 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FORWARDING_RULES_V1_FORWARDING_RULES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_041.pb.h" +#include "google/cloud/compute/v1/internal/common_042.pb.h" +#include "google/cloud/compute/v1/internal/common_082.pb.h" +#include "google/cloud/compute/v1/internal/common_107.pb.h" +#include "google/cloud/compute/v1/internal/common_140.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FORWARDING_RULES_V1_FORWARDING_RULES_PROTO_EXPORT_H diff --git a/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_option_defaults.cc b/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_option_defaults.cc index 00477aaec5507..bc958512e7caa 100644 --- a/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_option_defaults.cc +++ b/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_option_defaults.cc @@ -42,7 +42,7 @@ Options ForwardingRulesDefaultOptions(Options options) { compute_forwarding_rules_v1::ForwardingRulesRetryPolicyOption>()) { options.set( compute_forwarding_rules_v1::ForwardingRulesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_rest_connection_impl.h b/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_rest_connection_impl.h index 6cc9c9e198436..4a51bd342ad36 100644 --- a/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_rest_connection_impl.h +++ b/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_rest_connection_impl.h @@ -24,13 +24,13 @@ #include "google/cloud/compute/forwarding_rules/v1/forwarding_rules_options.h" #include "google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_rest_stub.h" #include "google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_retry_traits.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/background_threads.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_rest_logging_decorator.h b/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_rest_logging_decorator.h index ddb6272802446..33ef656c88dad 100644 --- a/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_rest_logging_decorator.h +++ b/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FORWARDING_RULES_V1_INTERNAL_FORWARDING_RULES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FORWARDING_RULES_V1_INTERNAL_FORWARDING_RULES_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/forwarding_rules/v1/forwarding_rules.pb.h" #include "google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_rest_stub.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_rest_metadata_decorator.cc b/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_rest_metadata_decorator.cc index eae05e9c57f47..2824c7ee479c5 100644 --- a/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_rest_metadata_decorator.cc +++ b/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/forwarding_rules/v1/forwarding_rules.proto #include "google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_rest_metadata_decorator.h b/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_rest_metadata_decorator.h index d1fea6b7b4ceb..65b98747489b1 100644 --- a/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_rest_metadata_decorator.h +++ b/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FORWARDING_RULES_V1_INTERNAL_FORWARDING_RULES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FORWARDING_RULES_V1_INTERNAL_FORWARDING_RULES_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/forwarding_rules/v1/forwarding_rules.pb.h" #include "google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_rest_stub.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_rest_stub.cc b/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_rest_stub.cc index e0c5917e2ce89..1a10a95c99e4c 100644 --- a/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_rest_stub.cc +++ b/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/forwarding_rules/v1/forwarding_rules.proto #include "google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_rest_stub.h" +#include "google/cloud/compute/forwarding_rules/v1/forwarding_rules.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_rest_stub.h b/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_rest_stub.h index f806ae1681a88..0d40ad443b4fd 100644 --- a/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_rest_stub.h +++ b/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FORWARDING_RULES_V1_INTERNAL_FORWARDING_RULES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_FORWARDING_RULES_V1_INTERNAL_FORWARDING_RULES_REST_STUB_H +#include "google/cloud/compute/forwarding_rules/v1/forwarding_rules.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_tracing_connection.cc b/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_tracing_connection.cc index 626f5961cf85a..3cee62888d2fd 100644 --- a/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_tracing_connection.cc +++ b/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_forwarding_rules_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ForwardingRulesTracingConnection::ForwardingRulesTracingConnection( std::shared_ptr child) @@ -239,17 +237,13 @@ ForwardingRulesTracingConnection::SetTarget( return internal::EndSpan(std::move(span), child_->SetTarget(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeForwardingRulesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_tracing_connection.h b/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_tracing_connection.h index a885541afb5cd..d78ed59f062c7 100644 --- a/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_tracing_connection.h +++ b/google/cloud/compute/forwarding_rules/v1/internal/forwarding_rules_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_forwarding_rules_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ForwardingRulesTracingConnection : public compute_forwarding_rules_v1::ForwardingRulesConnection { public: @@ -120,8 +118,6 @@ class ForwardingRulesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/global_addresses/v1/global_addresses_connection.h b/google/cloud/compute/global_addresses/v1/global_addresses_connection.h index 36af8d2e1aa68..6821a8893b501 100644 --- a/google/cloud/compute/global_addresses/v1/global_addresses_connection.h +++ b/google/cloud/compute/global_addresses/v1/global_addresses_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_ADDRESSES_V1_GLOBAL_ADDRESSES_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_ADDRESSES_V1_GLOBAL_ADDRESSES_CONNECTION_H +#include "google/cloud/compute/global_addresses/v1/global_addresses.pb.h" #include "google/cloud/compute/global_addresses/v1/global_addresses_connection_idempotency_policy.h" #include "google/cloud/compute/global_addresses/v1/internal/global_addresses_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/global_addresses/v1/global_addresses_connection_idempotency_policy.h b/google/cloud/compute/global_addresses/v1/global_addresses_connection_idempotency_policy.h index 05ac635ead64c..9dd39bbc3f342 100644 --- a/google/cloud/compute/global_addresses/v1/global_addresses_connection_idempotency_policy.h +++ b/google/cloud/compute/global_addresses/v1/global_addresses_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_ADDRESSES_V1_GLOBAL_ADDRESSES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_ADDRESSES_V1_GLOBAL_ADDRESSES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/global_addresses/v1/global_addresses.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/global_addresses/v1/global_addresses_proto_export.h b/google/cloud/compute/global_addresses/v1/global_addresses_proto_export.h index 2b6e035d75b88..b0644b347d78c 100644 --- a/google/cloud/compute/global_addresses/v1/global_addresses_proto_export.h +++ b/google/cloud/compute/global_addresses/v1/global_addresses_proto_export.h @@ -26,10 +26,10 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_ADDRESSES_V1_GLOBAL_ADDRESSES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_004.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_044.pb.h" +#include "google/cloud/compute/v1/internal/common_046.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_ADDRESSES_V1_GLOBAL_ADDRESSES_PROTO_EXPORT_H diff --git a/google/cloud/compute/global_addresses/v1/internal/global_addresses_option_defaults.cc b/google/cloud/compute/global_addresses/v1/internal/global_addresses_option_defaults.cc index ae1fe864566c7..83560bdd50298 100644 --- a/google/cloud/compute/global_addresses/v1/internal/global_addresses_option_defaults.cc +++ b/google/cloud/compute/global_addresses/v1/internal/global_addresses_option_defaults.cc @@ -42,7 +42,7 @@ Options GlobalAddressesDefaultOptions(Options options) { compute_global_addresses_v1::GlobalAddressesRetryPolicyOption>()) { options.set( compute_global_addresses_v1::GlobalAddressesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/compute/global_addresses/v1/internal/global_addresses_rest_connection_impl.h b/google/cloud/compute/global_addresses/v1/internal/global_addresses_rest_connection_impl.h index 9dcebe11efcd4..c4728b4212c91 100644 --- a/google/cloud/compute/global_addresses/v1/internal/global_addresses_rest_connection_impl.h +++ b/google/cloud/compute/global_addresses/v1/internal/global_addresses_rest_connection_impl.h @@ -24,13 +24,13 @@ #include "google/cloud/compute/global_addresses/v1/global_addresses_options.h" #include "google/cloud/compute/global_addresses/v1/internal/global_addresses_rest_stub.h" #include "google/cloud/compute/global_addresses/v1/internal/global_addresses_retry_traits.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/background_threads.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/global_addresses/v1/internal/global_addresses_rest_logging_decorator.h b/google/cloud/compute/global_addresses/v1/internal/global_addresses_rest_logging_decorator.h index 8f746c9b5fbf7..d5ba84324f16b 100644 --- a/google/cloud/compute/global_addresses/v1/internal/global_addresses_rest_logging_decorator.h +++ b/google/cloud/compute/global_addresses/v1/internal/global_addresses_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_ADDRESSES_V1_INTERNAL_GLOBAL_ADDRESSES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_ADDRESSES_V1_INTERNAL_GLOBAL_ADDRESSES_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/global_addresses/v1/global_addresses.pb.h" #include "google/cloud/compute/global_addresses/v1/internal/global_addresses_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/global_addresses/v1/internal/global_addresses_rest_metadata_decorator.cc b/google/cloud/compute/global_addresses/v1/internal/global_addresses_rest_metadata_decorator.cc index 582241dcfbb79..e22bf20cf3676 100644 --- a/google/cloud/compute/global_addresses/v1/internal/global_addresses_rest_metadata_decorator.cc +++ b/google/cloud/compute/global_addresses/v1/internal/global_addresses_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/global_addresses/v1/global_addresses.proto #include "google/cloud/compute/global_addresses/v1/internal/global_addresses_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/global_addresses/v1/internal/global_addresses_rest_metadata_decorator.h b/google/cloud/compute/global_addresses/v1/internal/global_addresses_rest_metadata_decorator.h index 3e7abe2d3cb82..1aa0271e26443 100644 --- a/google/cloud/compute/global_addresses/v1/internal/global_addresses_rest_metadata_decorator.h +++ b/google/cloud/compute/global_addresses/v1/internal/global_addresses_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_ADDRESSES_V1_INTERNAL_GLOBAL_ADDRESSES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_ADDRESSES_V1_INTERNAL_GLOBAL_ADDRESSES_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/global_addresses/v1/global_addresses.pb.h" #include "google/cloud/compute/global_addresses/v1/internal/global_addresses_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/global_addresses/v1/internal/global_addresses_rest_stub.cc b/google/cloud/compute/global_addresses/v1/internal/global_addresses_rest_stub.cc index aec352a15c1ea..731ebc3898ffd 100644 --- a/google/cloud/compute/global_addresses/v1/internal/global_addresses_rest_stub.cc +++ b/google/cloud/compute/global_addresses/v1/internal/global_addresses_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/global_addresses/v1/global_addresses.proto #include "google/cloud/compute/global_addresses/v1/internal/global_addresses_rest_stub.h" +#include "google/cloud/compute/global_addresses/v1/global_addresses.pb.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/global_addresses/v1/internal/global_addresses_rest_stub.h b/google/cloud/compute/global_addresses/v1/internal/global_addresses_rest_stub.h index 29d639968d48f..f1f1a4cbff8d1 100644 --- a/google/cloud/compute/global_addresses/v1/internal/global_addresses_rest_stub.h +++ b/google/cloud/compute/global_addresses/v1/internal/global_addresses_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_ADDRESSES_V1_INTERNAL_GLOBAL_ADDRESSES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_ADDRESSES_V1_INTERNAL_GLOBAL_ADDRESSES_REST_STUB_H +#include "google/cloud/compute/global_addresses/v1/global_addresses.pb.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/global_addresses/v1/internal/global_addresses_tracing_connection.cc b/google/cloud/compute/global_addresses/v1/internal/global_addresses_tracing_connection.cc index 43ce077775d21..34b6c4c69b648 100644 --- a/google/cloud/compute/global_addresses/v1/internal/global_addresses_tracing_connection.cc +++ b/google/cloud/compute/global_addresses/v1/internal/global_addresses_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_global_addresses_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GlobalAddressesTracingConnection::GlobalAddressesTracingConnection( std::shared_ptr child) @@ -175,17 +173,13 @@ GlobalAddressesTracingConnection::SetLabels( return internal::EndSpan(std::move(span), child_->SetLabels(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeGlobalAddressesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/global_addresses/v1/internal/global_addresses_tracing_connection.h b/google/cloud/compute/global_addresses/v1/internal/global_addresses_tracing_connection.h index c37b2c276a4e0..9ee4fa21ee56b 100644 --- a/google/cloud/compute/global_addresses/v1/internal/global_addresses_tracing_connection.h +++ b/google/cloud/compute/global_addresses/v1/internal/global_addresses_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_global_addresses_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class GlobalAddressesTracingConnection : public compute_global_addresses_v1::GlobalAddressesConnection { public: @@ -100,8 +98,6 @@ class GlobalAddressesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/global_forwarding_rules/v1/global_forwarding_rules_connection.h b/google/cloud/compute/global_forwarding_rules/v1/global_forwarding_rules_connection.h index d474a3e7a2b53..52f0a05ea09b3 100644 --- a/google/cloud/compute/global_forwarding_rules/v1/global_forwarding_rules_connection.h +++ b/google/cloud/compute/global_forwarding_rules/v1/global_forwarding_rules_connection.h @@ -20,6 +20,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_FORWARDING_RULES_V1_GLOBAL_FORWARDING_RULES_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_FORWARDING_RULES_V1_GLOBAL_FORWARDING_RULES_CONNECTION_H +#include "google/cloud/compute/global_forwarding_rules/v1/global_forwarding_rules.pb.h" #include "google/cloud/compute/global_forwarding_rules/v1/global_forwarding_rules_connection_idempotency_policy.h" #include "google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -31,7 +32,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/global_forwarding_rules/v1/global_forwarding_rules_connection_idempotency_policy.h b/google/cloud/compute/global_forwarding_rules/v1/global_forwarding_rules_connection_idempotency_policy.h index 9638038e19b43..0213beb4d3e29 100644 --- a/google/cloud/compute/global_forwarding_rules/v1/global_forwarding_rules_connection_idempotency_policy.h +++ b/google/cloud/compute/global_forwarding_rules/v1/global_forwarding_rules_connection_idempotency_policy.h @@ -20,9 +20,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_FORWARDING_RULES_V1_GLOBAL_FORWARDING_RULES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_FORWARDING_RULES_V1_GLOBAL_FORWARDING_RULES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/global_forwarding_rules/v1/global_forwarding_rules.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/global_forwarding_rules/v1/global_forwarding_rules_proto_export.h b/google/cloud/compute/global_forwarding_rules/v1/global_forwarding_rules_proto_export.h index 5a0ab360334a7..c09990225c10b 100644 --- a/google/cloud/compute/global_forwarding_rules/v1/global_forwarding_rules_proto_export.h +++ b/google/cloud/compute/global_forwarding_rules/v1/global_forwarding_rules_proto_export.h @@ -26,11 +26,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_FORWARDING_RULES_V1_GLOBAL_FORWARDING_RULES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_041.pb.h" +#include "google/cloud/compute/v1/internal/common_046.pb.h" +#include "google/cloud/compute/v1/internal/common_082.pb.h" +#include "google/cloud/compute/v1/internal/common_140.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_FORWARDING_RULES_V1_GLOBAL_FORWARDING_RULES_PROTO_EXPORT_H diff --git a/google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_option_defaults.cc b/google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_option_defaults.cc index a79ab5851dc51..5f7142d29ca8d 100644 --- a/google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_option_defaults.cc +++ b/google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_option_defaults.cc @@ -46,7 +46,7 @@ Options GlobalForwardingRulesDefaultOptions(Options options) { GlobalForwardingRulesRetryPolicyOption>( compute_global_forwarding_rules_v1:: GlobalForwardingRulesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_rest_logging_decorator.h b/google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_rest_logging_decorator.h index b394d85c984cf..5062878f48f4e 100644 --- a/google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_rest_logging_decorator.h +++ b/google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_rest_logging_decorator.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_FORWARDING_RULES_V1_INTERNAL_GLOBAL_FORWARDING_RULES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_FORWARDING_RULES_V1_INTERNAL_GLOBAL_FORWARDING_RULES_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/global_forwarding_rules/v1/global_forwarding_rules.pb.h" #include "google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_rest_metadata_decorator.cc b/google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_rest_metadata_decorator.cc index 26638bce4726a..088f4a1d1e44a 100644 --- a/google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_rest_metadata_decorator.cc +++ b/google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_rest_metadata_decorator.cc @@ -18,10 +18,10 @@ // google/cloud/compute/global_forwarding_rules/v1/global_forwarding_rules.proto #include "google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_rest_metadata_decorator.h b/google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_rest_metadata_decorator.h index c6189a6195fba..d16c3cdf4e844 100644 --- a/google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_rest_metadata_decorator.h +++ b/google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_rest_metadata_decorator.h @@ -20,12 +20,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_FORWARDING_RULES_V1_INTERNAL_GLOBAL_FORWARDING_RULES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_FORWARDING_RULES_V1_INTERNAL_GLOBAL_FORWARDING_RULES_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/global_forwarding_rules/v1/global_forwarding_rules.pb.h" #include "google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_rest_stub.cc b/google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_rest_stub.cc index 0f6bb7bf7cef2..41cecffb11fd7 100644 --- a/google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_rest_stub.cc +++ b/google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_rest_stub.cc @@ -18,12 +18,12 @@ // google/cloud/compute/global_forwarding_rules/v1/global_forwarding_rules.proto #include "google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_rest_stub.h" +#include "google/cloud/compute/global_forwarding_rules/v1/global_forwarding_rules.pb.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_rest_stub.h b/google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_rest_stub.h index 0a7bd54efad4c..6fd78e018d521 100644 --- a/google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_rest_stub.h +++ b/google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_rest_stub.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_FORWARDING_RULES_V1_INTERNAL_GLOBAL_FORWARDING_RULES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_FORWARDING_RULES_V1_INTERNAL_GLOBAL_FORWARDING_RULES_REST_STUB_H +#include "google/cloud/compute/global_forwarding_rules/v1/global_forwarding_rules.pb.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_tracing_connection.cc b/google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_tracing_connection.cc index c1518bc87afa3..97edea702f291 100644 --- a/google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_tracing_connection.cc +++ b/google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace compute_global_forwarding_rules_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GlobalForwardingRulesTracingConnection::GlobalForwardingRulesTracingConnection( std::shared_ptr< compute_global_forwarding_rules_v1::GlobalForwardingRulesConnection> @@ -230,20 +228,16 @@ GlobalForwardingRulesTracingConnection::SetTarget( return internal::EndSpan(std::move(span), child_->SetTarget(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr< compute_global_forwarding_rules_v1::GlobalForwardingRulesConnection> MakeGlobalForwardingRulesTracingConnection( std::shared_ptr< compute_global_forwarding_rules_v1::GlobalForwardingRulesConnection> conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_tracing_connection.h b/google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_tracing_connection.h index 9f1f84a8948ee..4380dc1a6fa56 100644 --- a/google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_tracing_connection.h +++ b/google/cloud/compute/global_forwarding_rules/v1/internal/global_forwarding_rules_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace compute_global_forwarding_rules_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class GlobalForwardingRulesTracingConnection : public compute_global_forwarding_rules_v1:: GlobalForwardingRulesConnection { @@ -119,8 +117,6 @@ class GlobalForwardingRulesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/global_network_endpoint_groups/v1/global_network_endpoint_groups_connection.h b/google/cloud/compute/global_network_endpoint_groups/v1/global_network_endpoint_groups_connection.h index c040c4b929b09..919057308d41c 100644 --- a/google/cloud/compute/global_network_endpoint_groups/v1/global_network_endpoint_groups_connection.h +++ b/google/cloud/compute/global_network_endpoint_groups/v1/global_network_endpoint_groups_connection.h @@ -20,6 +20,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_NETWORK_ENDPOINT_GROUPS_V1_GLOBAL_NETWORK_ENDPOINT_GROUPS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_NETWORK_ENDPOINT_GROUPS_V1_GLOBAL_NETWORK_ENDPOINT_GROUPS_CONNECTION_H +#include "google/cloud/compute/global_network_endpoint_groups/v1/global_network_endpoint_groups.pb.h" #include "google/cloud/compute/global_network_endpoint_groups/v1/global_network_endpoint_groups_connection_idempotency_policy.h" #include "google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -31,7 +32,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/global_network_endpoint_groups/v1/global_network_endpoint_groups_connection_idempotency_policy.h b/google/cloud/compute/global_network_endpoint_groups/v1/global_network_endpoint_groups_connection_idempotency_policy.h index 58992201b2b80..81906b6d238a9 100644 --- a/google/cloud/compute/global_network_endpoint_groups/v1/global_network_endpoint_groups_connection_idempotency_policy.h +++ b/google/cloud/compute/global_network_endpoint_groups/v1/global_network_endpoint_groups_connection_idempotency_policy.h @@ -20,9 +20,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_NETWORK_ENDPOINT_GROUPS_V1_GLOBAL_NETWORK_ENDPOINT_GROUPS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_NETWORK_ENDPOINT_GROUPS_V1_GLOBAL_NETWORK_ENDPOINT_GROUPS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/global_network_endpoint_groups/v1/global_network_endpoint_groups.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/global_network_endpoint_groups/v1/global_network_endpoint_groups_proto_export.h b/google/cloud/compute/global_network_endpoint_groups/v1/global_network_endpoint_groups_proto_export.h index 3a78587fd7ce8..85c0a2ff64177 100644 --- a/google/cloud/compute/global_network_endpoint_groups/v1/global_network_endpoint_groups_proto_export.h +++ b/google/cloud/compute/global_network_endpoint_groups/v1/global_network_endpoint_groups_proto_export.h @@ -26,10 +26,10 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_NETWORK_ENDPOINT_GROUPS_V1_GLOBAL_NETWORK_ENDPOINT_GROUPS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_012.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_045.pb.h" +#include "google/cloud/compute/v1/internal/common_049.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_NETWORK_ENDPOINT_GROUPS_V1_GLOBAL_NETWORK_ENDPOINT_GROUPS_PROTO_EXPORT_H diff --git a/google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_option_defaults.cc b/google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_option_defaults.cc index 517cc47bd7a8b..a5207875a16c4 100644 --- a/google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_option_defaults.cc +++ b/google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_option_defaults.cc @@ -47,7 +47,7 @@ Options GlobalNetworkEndpointGroupsDefaultOptions(Options options) { GlobalNetworkEndpointGroupsRetryPolicyOption>( compute_global_network_endpoint_groups_v1:: GlobalNetworkEndpointGroupsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_rest_logging_decorator.h b/google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_rest_logging_decorator.h index df034ecdbcc1d..e9348ed5e4351 100644 --- a/google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_rest_logging_decorator.h +++ b/google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_rest_logging_decorator.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_NETWORK_ENDPOINT_GROUPS_V1_INTERNAL_GLOBAL_NETWORK_ENDPOINT_GROUPS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_NETWORK_ENDPOINT_GROUPS_V1_INTERNAL_GLOBAL_NETWORK_ENDPOINT_GROUPS_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/global_network_endpoint_groups/v1/global_network_endpoint_groups.pb.h" #include "google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_rest_metadata_decorator.cc b/google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_rest_metadata_decorator.cc index 1f831f6a68bb5..548c530f858fd 100644 --- a/google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_rest_metadata_decorator.cc +++ b/google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_rest_metadata_decorator.cc @@ -18,10 +18,10 @@ // google/cloud/compute/global_network_endpoint_groups/v1/global_network_endpoint_groups.proto #include "google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_rest_metadata_decorator.h b/google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_rest_metadata_decorator.h index f9f27c66d3339..62ac23ede3332 100644 --- a/google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_rest_metadata_decorator.h +++ b/google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_rest_metadata_decorator.h @@ -20,12 +20,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_NETWORK_ENDPOINT_GROUPS_V1_INTERNAL_GLOBAL_NETWORK_ENDPOINT_GROUPS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_NETWORK_ENDPOINT_GROUPS_V1_INTERNAL_GLOBAL_NETWORK_ENDPOINT_GROUPS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/global_network_endpoint_groups/v1/global_network_endpoint_groups.pb.h" #include "google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_rest_stub.cc b/google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_rest_stub.cc index 7a9d0a7f5d0e5..8ed5d61da2288 100644 --- a/google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_rest_stub.cc +++ b/google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_rest_stub.cc @@ -18,12 +18,12 @@ // google/cloud/compute/global_network_endpoint_groups/v1/global_network_endpoint_groups.proto #include "google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_rest_stub.h" +#include "google/cloud/compute/global_network_endpoint_groups/v1/global_network_endpoint_groups.pb.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_rest_stub.h b/google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_rest_stub.h index a0d086cbc808b..54bf65b56f883 100644 --- a/google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_rest_stub.h +++ b/google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_rest_stub.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_NETWORK_ENDPOINT_GROUPS_V1_INTERNAL_GLOBAL_NETWORK_ENDPOINT_GROUPS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_NETWORK_ENDPOINT_GROUPS_V1_INTERNAL_GLOBAL_NETWORK_ENDPOINT_GROUPS_REST_STUB_H +#include "google/cloud/compute/global_network_endpoint_groups/v1/global_network_endpoint_groups.pb.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_tracing_connection.cc b/google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_tracing_connection.cc index 395ecd76fe812..0d1ca9230a3a0 100644 --- a/google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_tracing_connection.cc +++ b/google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace compute_global_network_endpoint_groups_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GlobalNetworkEndpointGroupsTracingConnection:: GlobalNetworkEndpointGroupsTracingConnection( std::shared_ptr MakeGlobalNetworkEndpointGroupsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_tracing_connection.h b/google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_tracing_connection.h index d9cb04e416891..b5cf80e70d826 100644 --- a/google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_tracing_connection.h +++ b/google/cloud/compute/global_network_endpoint_groups/v1/internal/global_network_endpoint_groups_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace compute_global_network_endpoint_groups_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class GlobalNetworkEndpointGroupsTracingConnection : public compute_global_network_endpoint_groups_v1:: GlobalNetworkEndpointGroupsConnection { @@ -123,8 +121,6 @@ class GlobalNetworkEndpointGroupsTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/global_operations/v1/global_operations_connection.h b/google/cloud/compute/global_operations/v1/global_operations_connection.h index bb1fa3207966f..7b37e9c128b40 100644 --- a/google/cloud/compute/global_operations/v1/global_operations_connection.h +++ b/google/cloud/compute/global_operations/v1/global_operations_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_OPERATIONS_V1_GLOBAL_OPERATIONS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_OPERATIONS_V1_GLOBAL_OPERATIONS_CONNECTION_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/global_operations/v1/global_operations_connection_idempotency_policy.h" #include "google/cloud/compute/global_operations/v1/internal/global_operations_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/global_operations/v1/global_operations_connection_idempotency_policy.h b/google/cloud/compute/global_operations/v1/global_operations_connection_idempotency_policy.h index 1456bd7a638c1..eb9db1c7005f8 100644 --- a/google/cloud/compute/global_operations/v1/global_operations_connection_idempotency_policy.h +++ b/google/cloud/compute/global_operations/v1/global_operations_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_OPERATIONS_V1_GLOBAL_OPERATIONS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_OPERATIONS_V1_GLOBAL_OPERATIONS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/global_operations/v1/global_operations_proto_export.h b/google/cloud/compute/global_operations/v1/global_operations_proto_export.h index 948edb0e600d5..a852292680565 100644 --- a/google/cloud/compute/global_operations/v1/global_operations_proto_export.h +++ b/google/cloud/compute/global_operations/v1/global_operations_proto_export.h @@ -26,9 +26,9 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_OPERATIONS_V1_GLOBAL_OPERATIONS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_091.pb.h" +#include "google/cloud/compute/v1/internal/common_092.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_OPERATIONS_V1_GLOBAL_OPERATIONS_PROTO_EXPORT_H diff --git a/google/cloud/compute/global_operations/v1/internal/global_operations_option_defaults.cc b/google/cloud/compute/global_operations/v1/internal/global_operations_option_defaults.cc index 63fc80a6e1705..12cadf4a038c7 100644 --- a/google/cloud/compute/global_operations/v1/internal/global_operations_option_defaults.cc +++ b/google/cloud/compute/global_operations/v1/internal/global_operations_option_defaults.cc @@ -43,7 +43,7 @@ Options GlobalOperationsDefaultOptions(Options options) { options.set< compute_global_operations_v1::GlobalOperationsRetryPolicyOption>( compute_global_operations_v1::GlobalOperationsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include #include #include diff --git a/google/cloud/compute/global_operations/v1/internal/global_operations_rest_metadata_decorator.cc b/google/cloud/compute/global_operations/v1/internal/global_operations_rest_metadata_decorator.cc index b973f74e831c0..2e0d6ee8c111e 100644 --- a/google/cloud/compute/global_operations/v1/internal/global_operations_rest_metadata_decorator.cc +++ b/google/cloud/compute/global_operations/v1/internal/global_operations_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/global_operations/v1/global_operations.proto #include "google/cloud/compute/global_operations/v1/internal/global_operations_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/global_operations/v1/internal/global_operations_rest_metadata_decorator.h b/google/cloud/compute/global_operations/v1/internal/global_operations_rest_metadata_decorator.h index 2f4d226ed34a0..c691a96c4b976 100644 --- a/google/cloud/compute/global_operations/v1/internal/global_operations_rest_metadata_decorator.h +++ b/google/cloud/compute/global_operations/v1/internal/global_operations_rest_metadata_decorator.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_OPERATIONS_V1_INTERNAL_GLOBAL_OPERATIONS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_OPERATIONS_V1_INTERNAL_GLOBAL_OPERATIONS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/global_operations/v1/internal/global_operations_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/compute/global_operations/v1/internal/global_operations_rest_stub.cc b/google/cloud/compute/global_operations/v1/internal/global_operations_rest_stub.cc index 7053cc0447708..148dae3314979 100644 --- a/google/cloud/compute/global_operations/v1/internal/global_operations_rest_stub.cc +++ b/google/cloud/compute/global_operations/v1/internal/global_operations_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/compute/global_operations/v1/global_operations.proto #include "google/cloud/compute/global_operations/v1/internal/global_operations_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/global_operations/v1/internal/global_operations_rest_stub.h b/google/cloud/compute/global_operations/v1/internal/global_operations_rest_stub.h index 63ca4d5701179..99fa038c34624 100644 --- a/google/cloud/compute/global_operations/v1/internal/global_operations_rest_stub.h +++ b/google/cloud/compute/global_operations/v1/internal/global_operations_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_OPERATIONS_V1_INTERNAL_GLOBAL_OPERATIONS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_OPERATIONS_V1_INTERNAL_GLOBAL_OPERATIONS_REST_STUB_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/global_operations/v1/internal/global_operations_tracing_connection.cc b/google/cloud/compute/global_operations/v1/internal/global_operations_tracing_connection.cc index 4531311a30dd5..880f012c46728 100644 --- a/google/cloud/compute/global_operations/v1/internal/global_operations_tracing_connection.cc +++ b/google/cloud/compute/global_operations/v1/internal/global_operations_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_global_operations_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GlobalOperationsTracingConnection::GlobalOperationsTracingConnection( std::shared_ptr child) @@ -93,17 +91,13 @@ GlobalOperationsTracingConnection::Wait( return internal::EndSpan(*span, child_->Wait(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeGlobalOperationsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/global_operations/v1/internal/global_operations_tracing_connection.h b/google/cloud/compute/global_operations/v1/internal/global_operations_tracing_connection.h index 6d34354421f18..c214ebdea70fd 100644 --- a/google/cloud/compute/global_operations/v1/internal/global_operations_tracing_connection.h +++ b/google/cloud/compute/global_operations/v1/internal/global_operations_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_global_operations_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class GlobalOperationsTracingConnection : public compute_global_operations_v1::GlobalOperationsConnection { public: @@ -67,8 +65,6 @@ class GlobalOperationsTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/global_organization_operations/v1/global_organization_operations_connection.h b/google/cloud/compute/global_organization_operations/v1/global_organization_operations_connection.h index 6abcdf536143c..8d0853fbcae26 100644 --- a/google/cloud/compute/global_organization_operations/v1/global_organization_operations_connection.h +++ b/google/cloud/compute/global_organization_operations/v1/global_organization_operations_connection.h @@ -20,6 +20,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_ORGANIZATION_OPERATIONS_V1_GLOBAL_ORGANIZATION_OPERATIONS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_ORGANIZATION_OPERATIONS_V1_GLOBAL_ORGANIZATION_OPERATIONS_CONNECTION_H +#include "google/cloud/compute/global_organization_operations/v1/global_organization_operations.pb.h" #include "google/cloud/compute/global_organization_operations/v1/global_organization_operations_connection_idempotency_policy.h" #include "google/cloud/compute/global_organization_operations/v1/internal/global_organization_operations_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -28,7 +29,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/global_organization_operations/v1/global_organization_operations_connection_idempotency_policy.h b/google/cloud/compute/global_organization_operations/v1/global_organization_operations_connection_idempotency_policy.h index f570f75b64a04..85f7e1e71c11a 100644 --- a/google/cloud/compute/global_organization_operations/v1/global_organization_operations_connection_idempotency_policy.h +++ b/google/cloud/compute/global_organization_operations/v1/global_organization_operations_connection_idempotency_policy.h @@ -20,9 +20,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_ORGANIZATION_OPERATIONS_V1_GLOBAL_ORGANIZATION_OPERATIONS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_ORGANIZATION_OPERATIONS_V1_GLOBAL_ORGANIZATION_OPERATIONS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/global_organization_operations/v1/global_organization_operations.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/global_organization_operations/v1/global_organization_operations_proto_export.h b/google/cloud/compute/global_organization_operations/v1/global_organization_operations_proto_export.h index 9cfc65b086722..dabfdd3777981 100644 --- a/google/cloud/compute/global_organization_operations/v1/global_organization_operations_proto_export.h +++ b/google/cloud/compute/global_organization_operations/v1/global_organization_operations_proto_export.h @@ -26,8 +26,8 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_ORGANIZATION_OPERATIONS_V1_GLOBAL_ORGANIZATION_OPERATIONS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_092.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_ORGANIZATION_OPERATIONS_V1_GLOBAL_ORGANIZATION_OPERATIONS_PROTO_EXPORT_H diff --git a/google/cloud/compute/global_organization_operations/v1/internal/global_organization_operations_option_defaults.cc b/google/cloud/compute/global_organization_operations/v1/internal/global_organization_operations_option_defaults.cc index 80a39ac5c40ad..f6a36af6b5fff 100644 --- a/google/cloud/compute/global_organization_operations/v1/internal/global_organization_operations_option_defaults.cc +++ b/google/cloud/compute/global_organization_operations/v1/internal/global_organization_operations_option_defaults.cc @@ -47,7 +47,7 @@ Options GlobalOrganizationOperationsDefaultOptions(Options options) { GlobalOrganizationOperationsRetryPolicyOption>( compute_global_organization_operations_v1:: GlobalOrganizationOperationsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include #include #include diff --git a/google/cloud/compute/global_organization_operations/v1/internal/global_organization_operations_rest_metadata_decorator.cc b/google/cloud/compute/global_organization_operations/v1/internal/global_organization_operations_rest_metadata_decorator.cc index c53a9abd19663..ea3d8e0a0a694 100644 --- a/google/cloud/compute/global_organization_operations/v1/internal/global_organization_operations_rest_metadata_decorator.cc +++ b/google/cloud/compute/global_organization_operations/v1/internal/global_organization_operations_rest_metadata_decorator.cc @@ -18,10 +18,10 @@ // google/cloud/compute/global_organization_operations/v1/global_organization_operations.proto #include "google/cloud/compute/global_organization_operations/v1/internal/global_organization_operations_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/global_organization_operations/v1/internal/global_organization_operations_rest_metadata_decorator.h b/google/cloud/compute/global_organization_operations/v1/internal/global_organization_operations_rest_metadata_decorator.h index 7706b415dfdec..ea8cc7448a2e3 100644 --- a/google/cloud/compute/global_organization_operations/v1/internal/global_organization_operations_rest_metadata_decorator.h +++ b/google/cloud/compute/global_organization_operations/v1/internal/global_organization_operations_rest_metadata_decorator.h @@ -20,11 +20,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_ORGANIZATION_OPERATIONS_V1_INTERNAL_GLOBAL_ORGANIZATION_OPERATIONS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_ORGANIZATION_OPERATIONS_V1_INTERNAL_GLOBAL_ORGANIZATION_OPERATIONS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/global_organization_operations/v1/global_organization_operations.pb.h" #include "google/cloud/compute/global_organization_operations/v1/internal/global_organization_operations_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/compute/global_organization_operations/v1/internal/global_organization_operations_rest_stub.cc b/google/cloud/compute/global_organization_operations/v1/internal/global_organization_operations_rest_stub.cc index 6aa5cfdb5a12f..43edc23418fd3 100644 --- a/google/cloud/compute/global_organization_operations/v1/internal/global_organization_operations_rest_stub.cc +++ b/google/cloud/compute/global_organization_operations/v1/internal/global_organization_operations_rest_stub.cc @@ -18,11 +18,11 @@ // google/cloud/compute/global_organization_operations/v1/global_organization_operations.proto #include "google/cloud/compute/global_organization_operations/v1/internal/global_organization_operations_rest_stub.h" +#include "google/cloud/compute/global_organization_operations/v1/global_organization_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/global_organization_operations/v1/internal/global_organization_operations_rest_stub.h b/google/cloud/compute/global_organization_operations/v1/internal/global_organization_operations_rest_stub.h index baa90d8f1188b..3ce16faec42d5 100644 --- a/google/cloud/compute/global_organization_operations/v1/internal/global_organization_operations_rest_stub.h +++ b/google/cloud/compute/global_organization_operations/v1/internal/global_organization_operations_rest_stub.h @@ -20,12 +20,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_ORGANIZATION_OPERATIONS_V1_INTERNAL_GLOBAL_ORGANIZATION_OPERATIONS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_ORGANIZATION_OPERATIONS_V1_INTERNAL_GLOBAL_ORGANIZATION_OPERATIONS_REST_STUB_H +#include "google/cloud/compute/global_organization_operations/v1/global_organization_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/global_organization_operations/v1/internal/global_organization_operations_tracing_connection.cc b/google/cloud/compute/global_organization_operations/v1/internal/global_organization_operations_tracing_connection.cc index 19894b8612dee..d5c7c30490015 100644 --- a/google/cloud/compute/global_organization_operations/v1/internal/global_organization_operations_tracing_connection.cc +++ b/google/cloud/compute/global_organization_operations/v1/internal/global_organization_operations_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace compute_global_organization_operations_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GlobalOrganizationOperationsTracingConnection:: GlobalOrganizationOperationsTracingConnection( std::shared_ptr MakeGlobalOrganizationOperationsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/global_organization_operations/v1/internal/global_organization_operations_tracing_connection.h b/google/cloud/compute/global_organization_operations/v1/internal/global_organization_operations_tracing_connection.h index b5a00a6c77941..1d551b3822eba 100644 --- a/google/cloud/compute/global_organization_operations/v1/internal/global_organization_operations_tracing_connection.h +++ b/google/cloud/compute/global_organization_operations/v1/internal/global_organization_operations_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace compute_global_organization_operations_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class GlobalOrganizationOperationsTracingConnection : public compute_global_organization_operations_v1:: GlobalOrganizationOperationsConnection { @@ -63,8 +61,6 @@ class GlobalOrganizationOperationsTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/global_public_delegated_prefixes/v1/global_public_delegated_prefixes_connection.h b/google/cloud/compute/global_public_delegated_prefixes/v1/global_public_delegated_prefixes_connection.h index e482a2f2f1c02..889c1f83b27aa 100644 --- a/google/cloud/compute/global_public_delegated_prefixes/v1/global_public_delegated_prefixes_connection.h +++ b/google/cloud/compute/global_public_delegated_prefixes/v1/global_public_delegated_prefixes_connection.h @@ -20,6 +20,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_PUBLIC_DELEGATED_PREFIXES_V1_GLOBAL_PUBLIC_DELEGATED_PREFIXES_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_PUBLIC_DELEGATED_PREFIXES_V1_GLOBAL_PUBLIC_DELEGATED_PREFIXES_CONNECTION_H +#include "google/cloud/compute/global_public_delegated_prefixes/v1/global_public_delegated_prefixes.pb.h" #include "google/cloud/compute/global_public_delegated_prefixes/v1/global_public_delegated_prefixes_connection_idempotency_policy.h" #include "google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -31,7 +32,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/global_public_delegated_prefixes/v1/global_public_delegated_prefixes_connection_idempotency_policy.h b/google/cloud/compute/global_public_delegated_prefixes/v1/global_public_delegated_prefixes_connection_idempotency_policy.h index 02f5160520231..518754b9a6d8b 100644 --- a/google/cloud/compute/global_public_delegated_prefixes/v1/global_public_delegated_prefixes_connection_idempotency_policy.h +++ b/google/cloud/compute/global_public_delegated_prefixes/v1/global_public_delegated_prefixes_connection_idempotency_policy.h @@ -20,9 +20,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_PUBLIC_DELEGATED_PREFIXES_V1_GLOBAL_PUBLIC_DELEGATED_PREFIXES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_PUBLIC_DELEGATED_PREFIXES_V1_GLOBAL_PUBLIC_DELEGATED_PREFIXES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/global_public_delegated_prefixes/v1/global_public_delegated_prefixes.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/global_public_delegated_prefixes/v1/global_public_delegated_prefixes_proto_export.h b/google/cloud/compute/global_public_delegated_prefixes/v1/global_public_delegated_prefixes_proto_export.h index dcec4963a1567..3bdf0adb99009 100644 --- a/google/cloud/compute/global_public_delegated_prefixes/v1/global_public_delegated_prefixes_proto_export.h +++ b/google/cloud/compute/global_public_delegated_prefixes/v1/global_public_delegated_prefixes_proto_export.h @@ -26,8 +26,8 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_PUBLIC_DELEGATED_PREFIXES_V1_GLOBAL_PUBLIC_DELEGATED_PREFIXES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_096.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_PUBLIC_DELEGATED_PREFIXES_V1_GLOBAL_PUBLIC_DELEGATED_PREFIXES_PROTO_EXPORT_H diff --git a/google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_option_defaults.cc b/google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_option_defaults.cc index b4895e46b6e0a..a617d69838759 100644 --- a/google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_option_defaults.cc +++ b/google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_option_defaults.cc @@ -47,7 +47,7 @@ Options GlobalPublicDelegatedPrefixesDefaultOptions(Options options) { GlobalPublicDelegatedPrefixesRetryPolicyOption>( compute_global_public_delegated_prefixes_v1:: GlobalPublicDelegatedPrefixesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_rest_logging_decorator.h b/google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_rest_logging_decorator.h index e5b594868ac48..fb49a38450665 100644 --- a/google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_rest_logging_decorator.h +++ b/google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_rest_logging_decorator.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_PUBLIC_DELEGATED_PREFIXES_V1_INTERNAL_GLOBAL_PUBLIC_DELEGATED_PREFIXES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_PUBLIC_DELEGATED_PREFIXES_V1_INTERNAL_GLOBAL_PUBLIC_DELEGATED_PREFIXES_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/global_public_delegated_prefixes/v1/global_public_delegated_prefixes.pb.h" #include "google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_rest_metadata_decorator.cc b/google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_rest_metadata_decorator.cc index 5ac5f9624f19b..ad6cebb348ec7 100644 --- a/google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_rest_metadata_decorator.cc +++ b/google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_rest_metadata_decorator.cc @@ -18,10 +18,10 @@ // google/cloud/compute/global_public_delegated_prefixes/v1/global_public_delegated_prefixes.proto #include "google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_rest_metadata_decorator.h b/google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_rest_metadata_decorator.h index 5b408b13209ed..f1b776d49f4ee 100644 --- a/google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_rest_metadata_decorator.h +++ b/google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_rest_metadata_decorator.h @@ -20,12 +20,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_PUBLIC_DELEGATED_PREFIXES_V1_INTERNAL_GLOBAL_PUBLIC_DELEGATED_PREFIXES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_PUBLIC_DELEGATED_PREFIXES_V1_INTERNAL_GLOBAL_PUBLIC_DELEGATED_PREFIXES_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/global_public_delegated_prefixes/v1/global_public_delegated_prefixes.pb.h" #include "google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_rest_stub.cc b/google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_rest_stub.cc index 9fc1f7d2baa1f..8331b8c39d350 100644 --- a/google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_rest_stub.cc +++ b/google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_rest_stub.cc @@ -18,12 +18,12 @@ // google/cloud/compute/global_public_delegated_prefixes/v1/global_public_delegated_prefixes.proto #include "google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/global_public_delegated_prefixes/v1/global_public_delegated_prefixes.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_rest_stub.h b/google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_rest_stub.h index 96f7f5af217b9..bb18c3812e678 100644 --- a/google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_rest_stub.h +++ b/google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_rest_stub.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_PUBLIC_DELEGATED_PREFIXES_V1_INTERNAL_GLOBAL_PUBLIC_DELEGATED_PREFIXES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_GLOBAL_PUBLIC_DELEGATED_PREFIXES_V1_INTERNAL_GLOBAL_PUBLIC_DELEGATED_PREFIXES_REST_STUB_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/global_public_delegated_prefixes/v1/global_public_delegated_prefixes.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_tracing_connection.cc b/google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_tracing_connection.cc index 8214dab74573e..fdbb9e2dc10df 100644 --- a/google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_tracing_connection.cc +++ b/google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace compute_global_public_delegated_prefixes_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GlobalPublicDelegatedPrefixesTracingConnection:: GlobalPublicDelegatedPrefixesTracingConnection( std::shared_ptrPatchPublicDelegatedPrefix(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeGlobalPublicDelegatedPrefixesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_tracing_connection.h b/google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_tracing_connection.h index 4d60c19389a68..91fc3331b55ec 100644 --- a/google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_tracing_connection.h +++ b/google/cloud/compute/global_public_delegated_prefixes/v1/internal/global_public_delegated_prefixes_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace compute_global_public_delegated_prefixes_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class GlobalPublicDelegatedPrefixesTracingConnection : public compute_global_public_delegated_prefixes_v1:: GlobalPublicDelegatedPrefixesConnection { @@ -105,8 +103,6 @@ class GlobalPublicDelegatedPrefixesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/health_checks/v1/health_checks_connection.h b/google/cloud/compute/health_checks/v1/health_checks_connection.h index 2b1d604807980..64cac99cbb912 100644 --- a/google/cloud/compute/health_checks/v1/health_checks_connection.h +++ b/google/cloud/compute/health_checks/v1/health_checks_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HEALTH_CHECKS_V1_HEALTH_CHECKS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HEALTH_CHECKS_V1_HEALTH_CHECKS_CONNECTION_H +#include "google/cloud/compute/health_checks/v1/health_checks.pb.h" #include "google/cloud/compute/health_checks/v1/health_checks_connection_idempotency_policy.h" #include "google/cloud/compute/health_checks/v1/internal/health_checks_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/health_checks/v1/health_checks_connection_idempotency_policy.h b/google/cloud/compute/health_checks/v1/health_checks_connection_idempotency_policy.h index de1dd32d0708e..33509b33bac1c 100644 --- a/google/cloud/compute/health_checks/v1/health_checks_connection_idempotency_policy.h +++ b/google/cloud/compute/health_checks/v1/health_checks_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HEALTH_CHECKS_V1_HEALTH_CHECKS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HEALTH_CHECKS_V1_HEALTH_CHECKS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/health_checks/v1/health_checks.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/health_checks/v1/health_checks_proto_export.h b/google/cloud/compute/health_checks/v1/health_checks_proto_export.h index 370a45ec6955a..5c60b105d1b1d 100644 --- a/google/cloud/compute/health_checks/v1/health_checks_proto_export.h +++ b/google/cloud/compute/health_checks/v1/health_checks_proto_export.h @@ -26,9 +26,9 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HEALTH_CHECKS_V1_HEALTH_CHECKS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_043.pb.h" +#include "google/cloud/compute/v1/internal/common_051.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HEALTH_CHECKS_V1_HEALTH_CHECKS_PROTO_EXPORT_H diff --git a/google/cloud/compute/health_checks/v1/internal/health_checks_option_defaults.cc b/google/cloud/compute/health_checks/v1/internal/health_checks_option_defaults.cc index 6e5d71d34ddd3..5293b47135d70 100644 --- a/google/cloud/compute/health_checks/v1/internal/health_checks_option_defaults.cc +++ b/google/cloud/compute/health_checks/v1/internal/health_checks_option_defaults.cc @@ -41,7 +41,7 @@ Options HealthChecksDefaultOptions(Options options) { if (!options.has()) { options.set( compute_health_checks_v1::HealthChecksLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/compute/health_checks/v1/internal/health_checks_rest_connection_impl.h b/google/cloud/compute/health_checks/v1/internal/health_checks_rest_connection_impl.h index 9556f3daecb25..ecfec7fd13ecb 100644 --- a/google/cloud/compute/health_checks/v1/internal/health_checks_rest_connection_impl.h +++ b/google/cloud/compute/health_checks/v1/internal/health_checks_rest_connection_impl.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HEALTH_CHECKS_V1_INTERNAL_HEALTH_CHECKS_REST_CONNECTION_IMPL_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HEALTH_CHECKS_V1_INTERNAL_HEALTH_CHECKS_REST_CONNECTION_IMPL_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/health_checks/v1/health_checks_connection.h" #include "google/cloud/compute/health_checks/v1/health_checks_connection_idempotency_policy.h" #include "google/cloud/compute/health_checks/v1/health_checks_options.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/health_checks/v1/internal/health_checks_rest_logging_decorator.h b/google/cloud/compute/health_checks/v1/internal/health_checks_rest_logging_decorator.h index 8223380c4d150..c78abceaf2b87 100644 --- a/google/cloud/compute/health_checks/v1/internal/health_checks_rest_logging_decorator.h +++ b/google/cloud/compute/health_checks/v1/internal/health_checks_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HEALTH_CHECKS_V1_INTERNAL_HEALTH_CHECKS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HEALTH_CHECKS_V1_INTERNAL_HEALTH_CHECKS_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/health_checks/v1/health_checks.pb.h" #include "google/cloud/compute/health_checks/v1/internal/health_checks_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/health_checks/v1/internal/health_checks_rest_metadata_decorator.cc b/google/cloud/compute/health_checks/v1/internal/health_checks_rest_metadata_decorator.cc index a4719011ac5a8..028b6a2155dcc 100644 --- a/google/cloud/compute/health_checks/v1/internal/health_checks_rest_metadata_decorator.cc +++ b/google/cloud/compute/health_checks/v1/internal/health_checks_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/health_checks/v1/health_checks.proto #include "google/cloud/compute/health_checks/v1/internal/health_checks_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/health_checks/v1/internal/health_checks_rest_metadata_decorator.h b/google/cloud/compute/health_checks/v1/internal/health_checks_rest_metadata_decorator.h index bd8e9958f435e..93b69705c98ec 100644 --- a/google/cloud/compute/health_checks/v1/internal/health_checks_rest_metadata_decorator.h +++ b/google/cloud/compute/health_checks/v1/internal/health_checks_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HEALTH_CHECKS_V1_INTERNAL_HEALTH_CHECKS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HEALTH_CHECKS_V1_INTERNAL_HEALTH_CHECKS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/health_checks/v1/health_checks.pb.h" #include "google/cloud/compute/health_checks/v1/internal/health_checks_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/health_checks/v1/internal/health_checks_rest_stub.cc b/google/cloud/compute/health_checks/v1/internal/health_checks_rest_stub.cc index 3f34d96af82eb..a333f888b8030 100644 --- a/google/cloud/compute/health_checks/v1/internal/health_checks_rest_stub.cc +++ b/google/cloud/compute/health_checks/v1/internal/health_checks_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/health_checks/v1/health_checks.proto #include "google/cloud/compute/health_checks/v1/internal/health_checks_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/health_checks/v1/health_checks.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/health_checks/v1/internal/health_checks_rest_stub.h b/google/cloud/compute/health_checks/v1/internal/health_checks_rest_stub.h index a7dbeca38c2cc..05a450573c646 100644 --- a/google/cloud/compute/health_checks/v1/internal/health_checks_rest_stub.h +++ b/google/cloud/compute/health_checks/v1/internal/health_checks_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HEALTH_CHECKS_V1_INTERNAL_HEALTH_CHECKS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HEALTH_CHECKS_V1_INTERNAL_HEALTH_CHECKS_REST_STUB_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/health_checks/v1/health_checks.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/health_checks/v1/internal/health_checks_tracing_connection.cc b/google/cloud/compute/health_checks/v1/internal/health_checks_tracing_connection.cc index 3ba5d35de0f19..833f7dc3027ef 100644 --- a/google/cloud/compute/health_checks/v1/internal/health_checks_tracing_connection.cc +++ b/google/cloud/compute/health_checks/v1/internal/health_checks_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_health_checks_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - HealthChecksTracingConnection::HealthChecksTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -195,16 +193,12 @@ HealthChecksTracingConnection::UpdateHealthCheck( child_->UpdateHealthCheck(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeHealthChecksTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/health_checks/v1/internal/health_checks_tracing_connection.h b/google/cloud/compute/health_checks/v1/internal/health_checks_tracing_connection.h index 8d954ee26b01c..974780dd37442 100644 --- a/google/cloud/compute/health_checks/v1/internal/health_checks_tracing_connection.h +++ b/google/cloud/compute/health_checks/v1/internal/health_checks_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_health_checks_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class HealthChecksTracingConnection : public compute_health_checks_v1::HealthChecksConnection { public: @@ -105,8 +103,6 @@ class HealthChecksTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/http_health_checks/v1/http_health_checks_connection.h b/google/cloud/compute/http_health_checks/v1/http_health_checks_connection.h index 232b424b1631b..bfbd229fb0c98 100644 --- a/google/cloud/compute/http_health_checks/v1/http_health_checks_connection.h +++ b/google/cloud/compute/http_health_checks/v1/http_health_checks_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HTTP_HEALTH_CHECKS_V1_HTTP_HEALTH_CHECKS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HTTP_HEALTH_CHECKS_V1_HTTP_HEALTH_CHECKS_CONNECTION_H +#include "google/cloud/compute/http_health_checks/v1/http_health_checks.pb.h" #include "google/cloud/compute/http_health_checks/v1/http_health_checks_connection_idempotency_policy.h" #include "google/cloud/compute/http_health_checks/v1/internal/http_health_checks_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/http_health_checks/v1/http_health_checks_connection_idempotency_policy.h b/google/cloud/compute/http_health_checks/v1/http_health_checks_connection_idempotency_policy.h index c5705aec85109..0331861527f92 100644 --- a/google/cloud/compute/http_health_checks/v1/http_health_checks_connection_idempotency_policy.h +++ b/google/cloud/compute/http_health_checks/v1/http_health_checks_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HTTP_HEALTH_CHECKS_V1_HTTP_HEALTH_CHECKS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HTTP_HEALTH_CHECKS_V1_HTTP_HEALTH_CHECKS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/http_health_checks/v1/http_health_checks.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/http_health_checks/v1/http_health_checks_proto_export.h b/google/cloud/compute/http_health_checks/v1/http_health_checks_proto_export.h index 31a6731d06a95..a13ad208156f7 100644 --- a/google/cloud/compute/http_health_checks/v1/http_health_checks_proto_export.h +++ b/google/cloud/compute/http_health_checks/v1/http_health_checks_proto_export.h @@ -26,8 +26,8 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HTTP_HEALTH_CHECKS_V1_HTTP_HEALTH_CHECKS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_053.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HTTP_HEALTH_CHECKS_V1_HTTP_HEALTH_CHECKS_PROTO_EXPORT_H diff --git a/google/cloud/compute/http_health_checks/v1/internal/http_health_checks_option_defaults.cc b/google/cloud/compute/http_health_checks/v1/internal/http_health_checks_option_defaults.cc index 428787728b4c0..1bafcb6eb7ff2 100644 --- a/google/cloud/compute/http_health_checks/v1/internal/http_health_checks_option_defaults.cc +++ b/google/cloud/compute/http_health_checks/v1/internal/http_health_checks_option_defaults.cc @@ -44,7 +44,7 @@ Options HttpHealthChecksDefaultOptions(Options options) { options.set< compute_http_health_checks_v1::HttpHealthChecksRetryPolicyOption>( compute_http_health_checks_v1::HttpHealthChecksLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/http_health_checks/v1/internal/http_health_checks_rest_logging_decorator.h b/google/cloud/compute/http_health_checks/v1/internal/http_health_checks_rest_logging_decorator.h index 208659d5958b8..3b222e76e2943 100644 --- a/google/cloud/compute/http_health_checks/v1/internal/http_health_checks_rest_logging_decorator.h +++ b/google/cloud/compute/http_health_checks/v1/internal/http_health_checks_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HTTP_HEALTH_CHECKS_V1_INTERNAL_HTTP_HEALTH_CHECKS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HTTP_HEALTH_CHECKS_V1_INTERNAL_HTTP_HEALTH_CHECKS_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/http_health_checks/v1/http_health_checks.pb.h" #include "google/cloud/compute/http_health_checks/v1/internal/http_health_checks_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/http_health_checks/v1/internal/http_health_checks_rest_metadata_decorator.cc b/google/cloud/compute/http_health_checks/v1/internal/http_health_checks_rest_metadata_decorator.cc index 0b3aa9049129c..88f77638f7d67 100644 --- a/google/cloud/compute/http_health_checks/v1/internal/http_health_checks_rest_metadata_decorator.cc +++ b/google/cloud/compute/http_health_checks/v1/internal/http_health_checks_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/http_health_checks/v1/http_health_checks.proto #include "google/cloud/compute/http_health_checks/v1/internal/http_health_checks_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/http_health_checks/v1/internal/http_health_checks_rest_metadata_decorator.h b/google/cloud/compute/http_health_checks/v1/internal/http_health_checks_rest_metadata_decorator.h index 929687ed0cea0..f754cfe186d5e 100644 --- a/google/cloud/compute/http_health_checks/v1/internal/http_health_checks_rest_metadata_decorator.h +++ b/google/cloud/compute/http_health_checks/v1/internal/http_health_checks_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HTTP_HEALTH_CHECKS_V1_INTERNAL_HTTP_HEALTH_CHECKS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HTTP_HEALTH_CHECKS_V1_INTERNAL_HTTP_HEALTH_CHECKS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/http_health_checks/v1/http_health_checks.pb.h" #include "google/cloud/compute/http_health_checks/v1/internal/http_health_checks_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/http_health_checks/v1/internal/http_health_checks_rest_stub.cc b/google/cloud/compute/http_health_checks/v1/internal/http_health_checks_rest_stub.cc index 5f29e7bf9edf5..b6337a65fe9d2 100644 --- a/google/cloud/compute/http_health_checks/v1/internal/http_health_checks_rest_stub.cc +++ b/google/cloud/compute/http_health_checks/v1/internal/http_health_checks_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/http_health_checks/v1/http_health_checks.proto #include "google/cloud/compute/http_health_checks/v1/internal/http_health_checks_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/http_health_checks/v1/http_health_checks.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/http_health_checks/v1/internal/http_health_checks_rest_stub.h b/google/cloud/compute/http_health_checks/v1/internal/http_health_checks_rest_stub.h index adc1c38d7592c..54d00d9043be2 100644 --- a/google/cloud/compute/http_health_checks/v1/internal/http_health_checks_rest_stub.h +++ b/google/cloud/compute/http_health_checks/v1/internal/http_health_checks_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HTTP_HEALTH_CHECKS_V1_INTERNAL_HTTP_HEALTH_CHECKS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HTTP_HEALTH_CHECKS_V1_INTERNAL_HTTP_HEALTH_CHECKS_REST_STUB_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/http_health_checks/v1/http_health_checks.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/http_health_checks/v1/internal/http_health_checks_tracing_connection.cc b/google/cloud/compute/http_health_checks/v1/internal/http_health_checks_tracing_connection.cc index 35a0dafd16512..6133ccec68b9f 100644 --- a/google/cloud/compute/http_health_checks/v1/internal/http_health_checks_tracing_connection.cc +++ b/google/cloud/compute/http_health_checks/v1/internal/http_health_checks_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_http_health_checks_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - HttpHealthChecksTracingConnection::HttpHealthChecksTracingConnection( std::shared_ptr child) @@ -199,17 +197,13 @@ HttpHealthChecksTracingConnection::UpdateHttpHealthCheck( child_->UpdateHttpHealthCheck(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeHttpHealthChecksTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/http_health_checks/v1/internal/http_health_checks_tracing_connection.h b/google/cloud/compute/http_health_checks/v1/internal/http_health_checks_tracing_connection.h index 81db483011e1d..3ee4fc55438ea 100644 --- a/google/cloud/compute/http_health_checks/v1/internal/http_health_checks_tracing_connection.h +++ b/google/cloud/compute/http_health_checks/v1/internal/http_health_checks_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_http_health_checks_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class HttpHealthChecksTracingConnection : public compute_http_health_checks_v1::HttpHealthChecksConnection { public: @@ -105,8 +103,6 @@ class HttpHealthChecksTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/https_health_checks/v1/https_health_checks_connection.h b/google/cloud/compute/https_health_checks/v1/https_health_checks_connection.h index 1eef33f981762..49a98c41909e0 100644 --- a/google/cloud/compute/https_health_checks/v1/https_health_checks_connection.h +++ b/google/cloud/compute/https_health_checks/v1/https_health_checks_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HTTPS_HEALTH_CHECKS_V1_HTTPS_HEALTH_CHECKS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HTTPS_HEALTH_CHECKS_V1_HTTPS_HEALTH_CHECKS_CONNECTION_H +#include "google/cloud/compute/https_health_checks/v1/https_health_checks.pb.h" #include "google/cloud/compute/https_health_checks/v1/https_health_checks_connection_idempotency_policy.h" #include "google/cloud/compute/https_health_checks/v1/internal/https_health_checks_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/https_health_checks/v1/https_health_checks_connection_idempotency_policy.h b/google/cloud/compute/https_health_checks/v1/https_health_checks_connection_idempotency_policy.h index bd5ab768587d0..9d2c5fa4840c1 100644 --- a/google/cloud/compute/https_health_checks/v1/https_health_checks_connection_idempotency_policy.h +++ b/google/cloud/compute/https_health_checks/v1/https_health_checks_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HTTPS_HEALTH_CHECKS_V1_HTTPS_HEALTH_CHECKS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HTTPS_HEALTH_CHECKS_V1_HTTPS_HEALTH_CHECKS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/https_health_checks/v1/https_health_checks.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/https_health_checks/v1/https_health_checks_proto_export.h b/google/cloud/compute/https_health_checks/v1/https_health_checks_proto_export.h index cbf50f8173116..51f70130f5f90 100644 --- a/google/cloud/compute/https_health_checks/v1/https_health_checks_proto_export.h +++ b/google/cloud/compute/https_health_checks/v1/https_health_checks_proto_export.h @@ -26,8 +26,8 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HTTPS_HEALTH_CHECKS_V1_HTTPS_HEALTH_CHECKS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_054.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HTTPS_HEALTH_CHECKS_V1_HTTPS_HEALTH_CHECKS_PROTO_EXPORT_H diff --git a/google/cloud/compute/https_health_checks/v1/internal/https_health_checks_option_defaults.cc b/google/cloud/compute/https_health_checks/v1/internal/https_health_checks_option_defaults.cc index 0a30d8b4d38a6..66f9243573a46 100644 --- a/google/cloud/compute/https_health_checks/v1/internal/https_health_checks_option_defaults.cc +++ b/google/cloud/compute/https_health_checks/v1/internal/https_health_checks_option_defaults.cc @@ -44,7 +44,7 @@ Options HttpsHealthChecksDefaultOptions(Options options) { options.set< compute_https_health_checks_v1::HttpsHealthChecksRetryPolicyOption>( compute_https_health_checks_v1::HttpsHealthChecksLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/https_health_checks/v1/internal/https_health_checks_rest_logging_decorator.h b/google/cloud/compute/https_health_checks/v1/internal/https_health_checks_rest_logging_decorator.h index 29d12cb121c8a..a4044050d7a70 100644 --- a/google/cloud/compute/https_health_checks/v1/internal/https_health_checks_rest_logging_decorator.h +++ b/google/cloud/compute/https_health_checks/v1/internal/https_health_checks_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HTTPS_HEALTH_CHECKS_V1_INTERNAL_HTTPS_HEALTH_CHECKS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HTTPS_HEALTH_CHECKS_V1_INTERNAL_HTTPS_HEALTH_CHECKS_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/https_health_checks/v1/https_health_checks.pb.h" #include "google/cloud/compute/https_health_checks/v1/internal/https_health_checks_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/https_health_checks/v1/internal/https_health_checks_rest_metadata_decorator.cc b/google/cloud/compute/https_health_checks/v1/internal/https_health_checks_rest_metadata_decorator.cc index 3577688374139..22095930504b9 100644 --- a/google/cloud/compute/https_health_checks/v1/internal/https_health_checks_rest_metadata_decorator.cc +++ b/google/cloud/compute/https_health_checks/v1/internal/https_health_checks_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/https_health_checks/v1/https_health_checks.proto #include "google/cloud/compute/https_health_checks/v1/internal/https_health_checks_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/https_health_checks/v1/internal/https_health_checks_rest_metadata_decorator.h b/google/cloud/compute/https_health_checks/v1/internal/https_health_checks_rest_metadata_decorator.h index 2f681a6c3e2cc..1ba2fe726fbf3 100644 --- a/google/cloud/compute/https_health_checks/v1/internal/https_health_checks_rest_metadata_decorator.h +++ b/google/cloud/compute/https_health_checks/v1/internal/https_health_checks_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HTTPS_HEALTH_CHECKS_V1_INTERNAL_HTTPS_HEALTH_CHECKS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HTTPS_HEALTH_CHECKS_V1_INTERNAL_HTTPS_HEALTH_CHECKS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/https_health_checks/v1/https_health_checks.pb.h" #include "google/cloud/compute/https_health_checks/v1/internal/https_health_checks_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/https_health_checks/v1/internal/https_health_checks_rest_stub.cc b/google/cloud/compute/https_health_checks/v1/internal/https_health_checks_rest_stub.cc index abb69ebd058a7..d2651fe27e8b9 100644 --- a/google/cloud/compute/https_health_checks/v1/internal/https_health_checks_rest_stub.cc +++ b/google/cloud/compute/https_health_checks/v1/internal/https_health_checks_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/https_health_checks/v1/https_health_checks.proto #include "google/cloud/compute/https_health_checks/v1/internal/https_health_checks_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/https_health_checks/v1/https_health_checks.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/https_health_checks/v1/internal/https_health_checks_rest_stub.h b/google/cloud/compute/https_health_checks/v1/internal/https_health_checks_rest_stub.h index dae0e36e2d679..839455228655b 100644 --- a/google/cloud/compute/https_health_checks/v1/internal/https_health_checks_rest_stub.h +++ b/google/cloud/compute/https_health_checks/v1/internal/https_health_checks_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HTTPS_HEALTH_CHECKS_V1_INTERNAL_HTTPS_HEALTH_CHECKS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_HTTPS_HEALTH_CHECKS_V1_INTERNAL_HTTPS_HEALTH_CHECKS_REST_STUB_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/https_health_checks/v1/https_health_checks.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/https_health_checks/v1/internal/https_health_checks_tracing_connection.cc b/google/cloud/compute/https_health_checks/v1/internal/https_health_checks_tracing_connection.cc index f9cb9d6350eb6..003dc4e104b07 100644 --- a/google/cloud/compute/https_health_checks/v1/internal/https_health_checks_tracing_connection.cc +++ b/google/cloud/compute/https_health_checks/v1/internal/https_health_checks_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_https_health_checks_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - HttpsHealthChecksTracingConnection::HttpsHealthChecksTracingConnection( std::shared_ptr child) @@ -199,18 +197,14 @@ HttpsHealthChecksTracingConnection::UpdateHttpsHealthCheck( child_->UpdateHttpsHealthCheck(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeHttpsHealthChecksTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/https_health_checks/v1/internal/https_health_checks_tracing_connection.h b/google/cloud/compute/https_health_checks/v1/internal/https_health_checks_tracing_connection.h index ee4415896bad5..623f2c83bc1f5 100644 --- a/google/cloud/compute/https_health_checks/v1/internal/https_health_checks_tracing_connection.h +++ b/google/cloud/compute/https_health_checks/v1/internal/https_health_checks_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_https_health_checks_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class HttpsHealthChecksTracingConnection : public compute_https_health_checks_v1::HttpsHealthChecksConnection { public: @@ -107,8 +105,6 @@ class HttpsHealthChecksTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/image_family_views/v1/image_family_views_connection.h b/google/cloud/compute/image_family_views/v1/image_family_views_connection.h index 762803e3465b0..a96e38c33f528 100644 --- a/google/cloud/compute/image_family_views/v1/image_family_views_connection.h +++ b/google/cloud/compute/image_family_views/v1/image_family_views_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_IMAGE_FAMILY_VIEWS_V1_IMAGE_FAMILY_VIEWS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_IMAGE_FAMILY_VIEWS_V1_IMAGE_FAMILY_VIEWS_CONNECTION_H +#include "google/cloud/compute/image_family_views/v1/image_family_views.pb.h" #include "google/cloud/compute/image_family_views/v1/image_family_views_connection_idempotency_policy.h" #include "google/cloud/compute/image_family_views/v1/internal/image_family_views_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -26,7 +27,6 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/image_family_views/v1/image_family_views_connection_idempotency_policy.h b/google/cloud/compute/image_family_views/v1/image_family_views_connection_idempotency_policy.h index c74e9e06ad121..09b22b75836ee 100644 --- a/google/cloud/compute/image_family_views/v1/image_family_views_connection_idempotency_policy.h +++ b/google/cloud/compute/image_family_views/v1/image_family_views_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_IMAGE_FAMILY_VIEWS_V1_IMAGE_FAMILY_VIEWS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_IMAGE_FAMILY_VIEWS_V1_IMAGE_FAMILY_VIEWS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/image_family_views/v1/image_family_views.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/image_family_views/v1/image_family_views_proto_export.h b/google/cloud/compute/image_family_views/v1/image_family_views_proto_export.h index fc067ff2de344..146a2bb003e35 100644 --- a/google/cloud/compute/image_family_views/v1/image_family_views_proto_export.h +++ b/google/cloud/compute/image_family_views/v1/image_family_views_proto_export.h @@ -26,11 +26,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_IMAGE_FAMILY_VIEWS_V1_IMAGE_FAMILY_VIEWS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_021.pb.h" +#include "google/cloud/compute/v1/internal/common_023.pb.h" +#include "google/cloud/compute/v1/internal/common_033.pb.h" +#include "google/cloud/compute/v1/internal/common_055.pb.h" +#include "google/cloud/compute/v1/internal/common_056.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_IMAGE_FAMILY_VIEWS_V1_IMAGE_FAMILY_VIEWS_PROTO_EXPORT_H diff --git a/google/cloud/compute/image_family_views/v1/internal/image_family_views_option_defaults.cc b/google/cloud/compute/image_family_views/v1/internal/image_family_views_option_defaults.cc index 6dde93c72257b..dc5113e9f9f9c 100644 --- a/google/cloud/compute/image_family_views/v1/internal/image_family_views_option_defaults.cc +++ b/google/cloud/compute/image_family_views/v1/internal/image_family_views_option_defaults.cc @@ -44,7 +44,7 @@ Options ImageFamilyViewsDefaultOptions(Options options) { options.set< compute_image_family_views_v1::ImageFamilyViewsRetryPolicyOption>( compute_image_family_views_v1::ImageFamilyViewsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include #include #include diff --git a/google/cloud/compute/image_family_views/v1/internal/image_family_views_rest_metadata_decorator.cc b/google/cloud/compute/image_family_views/v1/internal/image_family_views_rest_metadata_decorator.cc index 6715491000ff0..15c2a0a8bd076 100644 --- a/google/cloud/compute/image_family_views/v1/internal/image_family_views_rest_metadata_decorator.cc +++ b/google/cloud/compute/image_family_views/v1/internal/image_family_views_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/image_family_views/v1/image_family_views.proto #include "google/cloud/compute/image_family_views/v1/internal/image_family_views_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/image_family_views/v1/internal/image_family_views_rest_metadata_decorator.h b/google/cloud/compute/image_family_views/v1/internal/image_family_views_rest_metadata_decorator.h index 2eeeaa856f688..206246ba7eb42 100644 --- a/google/cloud/compute/image_family_views/v1/internal/image_family_views_rest_metadata_decorator.h +++ b/google/cloud/compute/image_family_views/v1/internal/image_family_views_rest_metadata_decorator.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_IMAGE_FAMILY_VIEWS_V1_INTERNAL_IMAGE_FAMILY_VIEWS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_IMAGE_FAMILY_VIEWS_V1_INTERNAL_IMAGE_FAMILY_VIEWS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/image_family_views/v1/image_family_views.pb.h" #include "google/cloud/compute/image_family_views/v1/internal/image_family_views_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/compute/image_family_views/v1/internal/image_family_views_rest_stub.cc b/google/cloud/compute/image_family_views/v1/internal/image_family_views_rest_stub.cc index f38c7cb7ec434..63971fb671abc 100644 --- a/google/cloud/compute/image_family_views/v1/internal/image_family_views_rest_stub.cc +++ b/google/cloud/compute/image_family_views/v1/internal/image_family_views_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/compute/image_family_views/v1/image_family_views.proto #include "google/cloud/compute/image_family_views/v1/internal/image_family_views_rest_stub.h" +#include "google/cloud/compute/image_family_views/v1/image_family_views.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/image_family_views/v1/internal/image_family_views_rest_stub.h b/google/cloud/compute/image_family_views/v1/internal/image_family_views_rest_stub.h index 39e3f07933450..e0eb9af3e660f 100644 --- a/google/cloud/compute/image_family_views/v1/internal/image_family_views_rest_stub.h +++ b/google/cloud/compute/image_family_views/v1/internal/image_family_views_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_IMAGE_FAMILY_VIEWS_V1_INTERNAL_IMAGE_FAMILY_VIEWS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_IMAGE_FAMILY_VIEWS_V1_INTERNAL_IMAGE_FAMILY_VIEWS_REST_STUB_H +#include "google/cloud/compute/image_family_views/v1/image_family_views.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/image_family_views/v1/internal/image_family_views_tracing_connection.cc b/google/cloud/compute/image_family_views/v1/internal/image_family_views_tracing_connection.cc index 510420f154d0e..85c41acea1cdf 100644 --- a/google/cloud/compute/image_family_views/v1/internal/image_family_views_tracing_connection.cc +++ b/google/cloud/compute/image_family_views/v1/internal/image_family_views_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace compute_image_family_views_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ImageFamilyViewsTracingConnection::ImageFamilyViewsTracingConnection( std::shared_ptr child) @@ -44,17 +42,13 @@ ImageFamilyViewsTracingConnection::GetImageFamilyView( return internal::EndSpan(*span, child_->GetImageFamilyView(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeImageFamilyViewsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/image_family_views/v1/internal/image_family_views_tracing_connection.h b/google/cloud/compute/image_family_views/v1/internal/image_family_views_tracing_connection.h index b1251ec5d15b7..c79c7304088a0 100644 --- a/google/cloud/compute/image_family_views/v1/internal/image_family_views_tracing_connection.h +++ b/google/cloud/compute/image_family_views/v1/internal/image_family_views_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_image_family_views_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ImageFamilyViewsTracingConnection : public compute_image_family_views_v1::ImageFamilyViewsConnection { public: @@ -50,8 +48,6 @@ class ImageFamilyViewsTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/images/v1/images_connection.h b/google/cloud/compute/images/v1/images_connection.h index d99bb28b73b51..032f39646bcbc 100644 --- a/google/cloud/compute/images/v1/images_connection.h +++ b/google/cloud/compute/images/v1/images_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_IMAGES_V1_IMAGES_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_IMAGES_V1_IMAGES_CONNECTION_H +#include "google/cloud/compute/images/v1/images.pb.h" #include "google/cloud/compute/images/v1/images_connection_idempotency_policy.h" #include "google/cloud/compute/images/v1/internal/images_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/images/v1/images_connection_idempotency_policy.h b/google/cloud/compute/images/v1/images_connection_idempotency_policy.h index bd35efb38c5bf..96bfe2ca31240 100644 --- a/google/cloud/compute/images/v1/images_connection_idempotency_policy.h +++ b/google/cloud/compute/images/v1/images_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_IMAGES_V1_IMAGES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_IMAGES_V1_IMAGES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/images/v1/images.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/images/v1/images_proto_export.h b/google/cloud/compute/images/v1/images_proto_export.h index 8c2dec9a27d57..f3f6cb0503048 100644 --- a/google/cloud/compute/images/v1/images_proto_export.h +++ b/google/cloud/compute/images/v1/images_proto_export.h @@ -26,17 +26,17 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_IMAGES_V1_IMAGES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_007.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_021.pb.h" +#include "google/cloud/compute/v1/internal/common_023.pb.h" +#include "google/cloud/compute/v1/internal/common_031.pb.h" +#include "google/cloud/compute/v1/internal/common_033.pb.h" +#include "google/cloud/compute/v1/internal/common_046.pb.h" +#include "google/cloud/compute/v1/internal/common_047.pb.h" +#include "google/cloud/compute/v1/internal/common_055.pb.h" +#include "google/cloud/compute/v1/internal/common_057.pb.h" +#include "google/cloud/compute/v1/internal/common_145.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_IMAGES_V1_IMAGES_PROTO_EXPORT_H diff --git a/google/cloud/compute/images/v1/internal/images_option_defaults.cc b/google/cloud/compute/images/v1/internal/images_option_defaults.cc index 6c47501850f7f..e9c790ce480c2 100644 --- a/google/cloud/compute/images/v1/internal/images_option_defaults.cc +++ b/google/cloud/compute/images/v1/internal/images_option_defaults.cc @@ -41,7 +41,7 @@ Options ImagesDefaultOptions(Options options) { if (!options.has()) { options.set( compute_images_v1::ImagesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/compute/images/v1/internal/images_rest_connection_impl.h b/google/cloud/compute/images/v1/internal/images_rest_connection_impl.h index 6b9e78ffe99e6..b03c8d83990d0 100644 --- a/google/cloud/compute/images/v1/internal/images_rest_connection_impl.h +++ b/google/cloud/compute/images/v1/internal/images_rest_connection_impl.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_IMAGES_V1_INTERNAL_IMAGES_REST_CONNECTION_IMPL_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_IMAGES_V1_INTERNAL_IMAGES_REST_CONNECTION_IMPL_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/images/v1/images_connection.h" #include "google/cloud/compute/images/v1/images_connection_idempotency_policy.h" #include "google/cloud/compute/images/v1/images_options.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/images/v1/internal/images_rest_logging_decorator.h b/google/cloud/compute/images/v1/internal/images_rest_logging_decorator.h index 8b09031c69def..e10ca39c2bae4 100644 --- a/google/cloud/compute/images/v1/internal/images_rest_logging_decorator.h +++ b/google/cloud/compute/images/v1/internal/images_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_IMAGES_V1_INTERNAL_IMAGES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_IMAGES_V1_INTERNAL_IMAGES_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/images/v1/images.pb.h" #include "google/cloud/compute/images/v1/internal/images_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/images/v1/internal/images_rest_metadata_decorator.cc b/google/cloud/compute/images/v1/internal/images_rest_metadata_decorator.cc index 7552ce1fadb35..73829ac945ccc 100644 --- a/google/cloud/compute/images/v1/internal/images_rest_metadata_decorator.cc +++ b/google/cloud/compute/images/v1/internal/images_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/images/v1/images.proto #include "google/cloud/compute/images/v1/internal/images_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/images/v1/internal/images_rest_metadata_decorator.h b/google/cloud/compute/images/v1/internal/images_rest_metadata_decorator.h index e0f76df2bde9c..0bcd441b2358c 100644 --- a/google/cloud/compute/images/v1/internal/images_rest_metadata_decorator.h +++ b/google/cloud/compute/images/v1/internal/images_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_IMAGES_V1_INTERNAL_IMAGES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_IMAGES_V1_INTERNAL_IMAGES_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/images/v1/images.pb.h" #include "google/cloud/compute/images/v1/internal/images_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/images/v1/internal/images_rest_stub.cc b/google/cloud/compute/images/v1/internal/images_rest_stub.cc index 28689f74484bb..da9f6019af8bc 100644 --- a/google/cloud/compute/images/v1/internal/images_rest_stub.cc +++ b/google/cloud/compute/images/v1/internal/images_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/images/v1/images.proto #include "google/cloud/compute/images/v1/internal/images_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/images/v1/images.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/images/v1/internal/images_rest_stub.h b/google/cloud/compute/images/v1/internal/images_rest_stub.h index d91dfe754258e..beffdbfb4bc94 100644 --- a/google/cloud/compute/images/v1/internal/images_rest_stub.h +++ b/google/cloud/compute/images/v1/internal/images_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_IMAGES_V1_INTERNAL_IMAGES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_IMAGES_V1_INTERNAL_IMAGES_REST_STUB_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/images/v1/images.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/images/v1/internal/images_tracing_connection.cc b/google/cloud/compute/images/v1/internal/images_tracing_connection.cc index 229d78fef945b..fd3396db79480 100644 --- a/google/cloud/compute/images/v1/internal/images_tracing_connection.cc +++ b/google/cloud/compute/images/v1/internal/images_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_images_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ImagesTracingConnection::ImagesTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -237,16 +235,12 @@ ImagesTracingConnection::TestIamPermissions( return internal::EndSpan(*span, child_->TestIamPermissions(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeImagesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/images/v1/internal/images_tracing_connection.h b/google/cloud/compute/images/v1/internal/images_tracing_connection.h index ae8024b7803fe..46c62b9a72a56 100644 --- a/google/cloud/compute/images/v1/internal/images_tracing_connection.h +++ b/google/cloud/compute/images/v1/internal/images_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_images_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ImagesTracingConnection : public compute_images_v1::ImagesConnection { public: ~ImagesTracingConnection() override = default; @@ -128,8 +126,6 @@ class ImagesTracingConnection : public compute_images_v1::ImagesConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/instance_group_manager_resize_requests/v1/instance_group_manager_resize_requests_connection.h b/google/cloud/compute/instance_group_manager_resize_requests/v1/instance_group_manager_resize_requests_connection.h index ccef4edcec104..46948a3f913ce 100644 --- a/google/cloud/compute/instance_group_manager_resize_requests/v1/instance_group_manager_resize_requests_connection.h +++ b/google/cloud/compute/instance_group_manager_resize_requests/v1/instance_group_manager_resize_requests_connection.h @@ -20,6 +20,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUP_MANAGER_RESIZE_REQUESTS_V1_INSTANCE_GROUP_MANAGER_RESIZE_REQUESTS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUP_MANAGER_RESIZE_REQUESTS_V1_INSTANCE_GROUP_MANAGER_RESIZE_REQUESTS_CONNECTION_H +#include "google/cloud/compute/instance_group_manager_resize_requests/v1/instance_group_manager_resize_requests.pb.h" #include "google/cloud/compute/instance_group_manager_resize_requests/v1/instance_group_manager_resize_requests_connection_idempotency_policy.h" #include "google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -31,7 +32,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/instance_group_manager_resize_requests/v1/instance_group_manager_resize_requests_connection_idempotency_policy.h b/google/cloud/compute/instance_group_manager_resize_requests/v1/instance_group_manager_resize_requests_connection_idempotency_policy.h index 1ea821af37246..49473681d357e 100644 --- a/google/cloud/compute/instance_group_manager_resize_requests/v1/instance_group_manager_resize_requests_connection_idempotency_policy.h +++ b/google/cloud/compute/instance_group_manager_resize_requests/v1/instance_group_manager_resize_requests_connection_idempotency_policy.h @@ -20,9 +20,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUP_MANAGER_RESIZE_REQUESTS_V1_INSTANCE_GROUP_MANAGER_RESIZE_REQUESTS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUP_MANAGER_RESIZE_REQUESTS_V1_INSTANCE_GROUP_MANAGER_RESIZE_REQUESTS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/instance_group_manager_resize_requests/v1/instance_group_manager_resize_requests.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/instance_group_manager_resize_requests/v1/instance_group_manager_resize_requests_proto_export.h b/google/cloud/compute/instance_group_manager_resize_requests/v1/instance_group_manager_resize_requests_proto_export.h index 10366067b50fa..2faf312babb8f 100644 --- a/google/cloud/compute/instance_group_manager_resize_requests/v1/instance_group_manager_resize_requests_proto_export.h +++ b/google/cloud/compute/instance_group_manager_resize_requests/v1/instance_group_manager_resize_requests_proto_export.h @@ -26,9 +26,9 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUP_MANAGER_RESIZE_REQUESTS_V1_INSTANCE_GROUP_MANAGER_RESIZE_REQUESTS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_029.pb.h" +#include "google/cloud/compute/v1/internal/common_062.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUP_MANAGER_RESIZE_REQUESTS_V1_INSTANCE_GROUP_MANAGER_RESIZE_REQUESTS_PROTO_EXPORT_H diff --git a/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_option_defaults.cc b/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_option_defaults.cc index e8c88aab3be92..a65f5f15fde23 100644 --- a/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_option_defaults.cc +++ b/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_option_defaults.cc @@ -47,7 +47,7 @@ Options InstanceGroupManagerResizeRequestsDefaultOptions(Options options) { InstanceGroupManagerResizeRequestsRetryPolicyOption>( compute_instance_group_manager_resize_requests_v1:: InstanceGroupManagerResizeRequestsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_rest_connection_impl.h b/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_rest_connection_impl.h index 9168e56ddcac0..f49f9336b14a5 100644 --- a/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_rest_connection_impl.h +++ b/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_rest_connection_impl.h @@ -25,13 +25,13 @@ #include "google/cloud/compute/instance_group_manager_resize_requests/v1/instance_group_manager_resize_requests_options.h" #include "google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_rest_stub.h" #include "google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_retry_traits.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/background_threads.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_rest_logging_decorator.h b/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_rest_logging_decorator.h index 30c7e63ceb8da..c7c016d51637c 100644 --- a/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_rest_logging_decorator.h +++ b/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_rest_logging_decorator.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUP_MANAGER_RESIZE_REQUESTS_V1_INTERNAL_INSTANCE_GROUP_MANAGER_RESIZE_REQUESTS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUP_MANAGER_RESIZE_REQUESTS_V1_INTERNAL_INSTANCE_GROUP_MANAGER_RESIZE_REQUESTS_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/instance_group_manager_resize_requests/v1/instance_group_manager_resize_requests.pb.h" #include "google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_rest_stub.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_rest_metadata_decorator.cc b/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_rest_metadata_decorator.cc index b31af9ebd966d..3b0c33b64473e 100644 --- a/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_rest_metadata_decorator.cc +++ b/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_rest_metadata_decorator.cc @@ -18,10 +18,10 @@ // google/cloud/compute/instance_group_manager_resize_requests/v1/instance_group_manager_resize_requests.proto #include "google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_rest_metadata_decorator.h b/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_rest_metadata_decorator.h index 78149bff6edca..b3dcef4a5d809 100644 --- a/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_rest_metadata_decorator.h +++ b/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_rest_metadata_decorator.h @@ -20,12 +20,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUP_MANAGER_RESIZE_REQUESTS_V1_INTERNAL_INSTANCE_GROUP_MANAGER_RESIZE_REQUESTS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUP_MANAGER_RESIZE_REQUESTS_V1_INTERNAL_INSTANCE_GROUP_MANAGER_RESIZE_REQUESTS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/instance_group_manager_resize_requests/v1/instance_group_manager_resize_requests.pb.h" #include "google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_rest_stub.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_rest_stub.cc b/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_rest_stub.cc index 29bd4ccaafbee..2163d1e2fdedc 100644 --- a/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_rest_stub.cc +++ b/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_rest_stub.cc @@ -18,12 +18,12 @@ // google/cloud/compute/instance_group_manager_resize_requests/v1/instance_group_manager_resize_requests.proto #include "google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_rest_stub.h" +#include "google/cloud/compute/instance_group_manager_resize_requests/v1/instance_group_manager_resize_requests.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_rest_stub.h b/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_rest_stub.h index bc761578966cc..340c586e3cfe9 100644 --- a/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_rest_stub.h +++ b/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_rest_stub.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUP_MANAGER_RESIZE_REQUESTS_V1_INTERNAL_INSTANCE_GROUP_MANAGER_RESIZE_REQUESTS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUP_MANAGER_RESIZE_REQUESTS_V1_INTERNAL_INSTANCE_GROUP_MANAGER_RESIZE_REQUESTS_REST_STUB_H +#include "google/cloud/compute/instance_group_manager_resize_requests/v1/instance_group_manager_resize_requests.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_tracing_connection.cc b/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_tracing_connection.cc index 4b7b1730b3356..5db39e52f3b0c 100644 --- a/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_tracing_connection.cc +++ b/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace compute_instance_group_manager_resize_requests_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - InstanceGroupManagerResizeRequestsTracingConnection:: InstanceGroupManagerResizeRequestsTracingConnection( std::shared_ptr MakeInstanceGroupManagerResizeRequestsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_tracing_connection.h b/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_tracing_connection.h index abc797c1606b9..ee0d518853d00 100644 --- a/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_tracing_connection.h +++ b/google/cloud/compute/instance_group_manager_resize_requests/v1/internal/instance_group_manager_resize_requests_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace compute_instance_group_manager_resize_requests_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class InstanceGroupManagerResizeRequestsTracingConnection : public compute_instance_group_manager_resize_requests_v1:: InstanceGroupManagerResizeRequestsConnection { @@ -107,8 +105,6 @@ class InstanceGroupManagerResizeRequestsTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/instance_group_managers/v1/instance_group_managers_connection.h b/google/cloud/compute/instance_group_managers/v1/instance_group_managers_connection.h index 729287452b7b4..0c8e4a89d39b5 100644 --- a/google/cloud/compute/instance_group_managers/v1/instance_group_managers_connection.h +++ b/google/cloud/compute/instance_group_managers/v1/instance_group_managers_connection.h @@ -20,6 +20,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUP_MANAGERS_V1_INSTANCE_GROUP_MANAGERS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUP_MANAGERS_V1_INSTANCE_GROUP_MANAGERS_CONNECTION_H +#include "google/cloud/compute/instance_group_managers/v1/instance_group_managers.pb.h" #include "google/cloud/compute/instance_group_managers/v1/instance_group_managers_connection_idempotency_policy.h" #include "google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -31,7 +32,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/instance_group_managers/v1/instance_group_managers_connection_idempotency_policy.h b/google/cloud/compute/instance_group_managers/v1/instance_group_managers_connection_idempotency_policy.h index 4642adc850653..f92e87f3bd5c2 100644 --- a/google/cloud/compute/instance_group_managers/v1/instance_group_managers_connection_idempotency_policy.h +++ b/google/cloud/compute/instance_group_managers/v1/instance_group_managers_connection_idempotency_policy.h @@ -20,9 +20,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUP_MANAGERS_V1_INSTANCE_GROUP_MANAGERS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUP_MANAGERS_V1_INSTANCE_GROUP_MANAGERS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/instance_group_managers/v1/instance_group_managers.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/instance_group_managers/v1/instance_group_managers_proto_export.h b/google/cloud/compute/instance_group_managers/v1/instance_group_managers_proto_export.h index 7d16c0adb716a..145560402f9c2 100644 --- a/google/cloud/compute/instance_group_managers/v1/instance_group_managers_proto_export.h +++ b/google/cloud/compute/instance_group_managers/v1/instance_group_managers_proto_export.h @@ -26,11 +26,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUP_MANAGERS_V1_INSTANCE_GROUP_MANAGERS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_028.pb.h" +#include "google/cloud/compute/v1/internal/common_040.pb.h" +#include "google/cloud/compute/v1/internal/common_061.pb.h" +#include "google/cloud/compute/v1/internal/common_083.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUP_MANAGERS_V1_INSTANCE_GROUP_MANAGERS_PROTO_EXPORT_H diff --git a/google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_option_defaults.cc b/google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_option_defaults.cc index f1629ab3f7e14..1427aae8e6beb 100644 --- a/google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_option_defaults.cc +++ b/google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_option_defaults.cc @@ -46,7 +46,7 @@ Options InstanceGroupManagersDefaultOptions(Options options) { InstanceGroupManagersRetryPolicyOption>( compute_instance_group_managers_v1:: InstanceGroupManagersLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_rest_logging_decorator.h b/google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_rest_logging_decorator.h index 7f5700935f353..3ab17bd676f64 100644 --- a/google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_rest_logging_decorator.h +++ b/google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_rest_logging_decorator.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUP_MANAGERS_V1_INTERNAL_INSTANCE_GROUP_MANAGERS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUP_MANAGERS_V1_INTERNAL_INSTANCE_GROUP_MANAGERS_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/instance_group_managers/v1/instance_group_managers.pb.h" #include "google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_rest_stub.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_rest_metadata_decorator.cc b/google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_rest_metadata_decorator.cc index 24783fc788116..5f89deba3732e 100644 --- a/google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_rest_metadata_decorator.cc +++ b/google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_rest_metadata_decorator.cc @@ -18,10 +18,10 @@ // google/cloud/compute/instance_group_managers/v1/instance_group_managers.proto #include "google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_rest_metadata_decorator.h b/google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_rest_metadata_decorator.h index 9f45284f5a733..07188df200b53 100644 --- a/google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_rest_metadata_decorator.h +++ b/google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_rest_metadata_decorator.h @@ -20,12 +20,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUP_MANAGERS_V1_INTERNAL_INSTANCE_GROUP_MANAGERS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUP_MANAGERS_V1_INTERNAL_INSTANCE_GROUP_MANAGERS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/instance_group_managers/v1/instance_group_managers.pb.h" #include "google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_rest_stub.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_rest_stub.cc b/google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_rest_stub.cc index 6db8ab4a8a3c5..d70d2a1945d36 100644 --- a/google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_rest_stub.cc +++ b/google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_rest_stub.cc @@ -18,12 +18,12 @@ // google/cloud/compute/instance_group_managers/v1/instance_group_managers.proto #include "google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_rest_stub.h" +#include "google/cloud/compute/instance_group_managers/v1/instance_group_managers.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_rest_stub.h b/google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_rest_stub.h index 03431f352633f..90719f386dcc1 100644 --- a/google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_rest_stub.h +++ b/google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_rest_stub.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUP_MANAGERS_V1_INTERNAL_INSTANCE_GROUP_MANAGERS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUP_MANAGERS_V1_INTERNAL_INSTANCE_GROUP_MANAGERS_REST_STUB_H +#include "google/cloud/compute/instance_group_managers/v1/instance_group_managers.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_tracing_connection.cc b/google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_tracing_connection.cc index 98cbe255dce1f..78363d452094d 100644 --- a/google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_tracing_connection.cc +++ b/google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace compute_instance_group_managers_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - InstanceGroupManagersTracingConnection::InstanceGroupManagersTracingConnection( std::shared_ptr< compute_instance_group_managers_v1::InstanceGroupManagersConnection> @@ -729,20 +727,16 @@ InstanceGroupManagersTracingConnection::UpdatePerInstanceConfigs( child_->UpdatePerInstanceConfigs(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr< compute_instance_group_managers_v1::InstanceGroupManagersConnection> MakeInstanceGroupManagersTracingConnection( std::shared_ptr< compute_instance_group_managers_v1::InstanceGroupManagersConnection> conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_tracing_connection.h b/google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_tracing_connection.h index bc4903491085c..75a368d5e5cc9 100644 --- a/google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_tracing_connection.h +++ b/google/cloud/compute/instance_group_managers/v1/internal/instance_group_managers_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace compute_instance_group_managers_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class InstanceGroupManagersTracingConnection : public compute_instance_group_managers_v1:: InstanceGroupManagersConnection { @@ -300,8 +298,6 @@ class InstanceGroupManagersTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/instance_groups/v1/instance_groups_connection.h b/google/cloud/compute/instance_groups/v1/instance_groups_connection.h index 6a4e91ef3f30c..3fd4fe1ca3bdd 100644 --- a/google/cloud/compute/instance_groups/v1/instance_groups_connection.h +++ b/google/cloud/compute/instance_groups/v1/instance_groups_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUPS_V1_INSTANCE_GROUPS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUPS_V1_INSTANCE_GROUPS_CONNECTION_H +#include "google/cloud/compute/instance_groups/v1/instance_groups.pb.h" #include "google/cloud/compute/instance_groups/v1/instance_groups_connection_idempotency_policy.h" #include "google/cloud/compute/instance_groups/v1/internal/instance_groups_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/instance_groups/v1/instance_groups_connection_idempotency_policy.h b/google/cloud/compute/instance_groups/v1/instance_groups_connection_idempotency_policy.h index 15baaf2fee932..4af7d05610ffe 100644 --- a/google/cloud/compute/instance_groups/v1/instance_groups_connection_idempotency_policy.h +++ b/google/cloud/compute/instance_groups/v1/instance_groups_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUPS_V1_INSTANCE_GROUPS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUPS_V1_INSTANCE_GROUPS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/instance_groups/v1/instance_groups.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/instance_groups/v1/instance_groups_proto_export.h b/google/cloud/compute/instance_groups/v1/instance_groups_proto_export.h index a8f09a3aedbe3..8eb5aa4cfea08 100644 --- a/google/cloud/compute/instance_groups/v1/instance_groups_proto_export.h +++ b/google/cloud/compute/instance_groups/v1/instance_groups_proto_export.h @@ -26,11 +26,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUPS_V1_INSTANCE_GROUPS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_059.pb.h" +#include "google/cloud/compute/v1/internal/common_060.pb.h" +#include "google/cloud/compute/v1/internal/common_063.pb.h" +#include "google/cloud/compute/v1/internal/common_083.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUPS_V1_INSTANCE_GROUPS_PROTO_EXPORT_H diff --git a/google/cloud/compute/instance_groups/v1/internal/instance_groups_option_defaults.cc b/google/cloud/compute/instance_groups/v1/internal/instance_groups_option_defaults.cc index d497f0bea5fa6..ccbe72e31896b 100644 --- a/google/cloud/compute/instance_groups/v1/internal/instance_groups_option_defaults.cc +++ b/google/cloud/compute/instance_groups/v1/internal/instance_groups_option_defaults.cc @@ -42,7 +42,7 @@ Options InstanceGroupsDefaultOptions(Options options) { compute_instance_groups_v1::InstanceGroupsRetryPolicyOption>()) { options.set( compute_instance_groups_v1::InstanceGroupsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/compute/instance_groups/v1/internal/instance_groups_rest_connection_impl.h b/google/cloud/compute/instance_groups/v1/internal/instance_groups_rest_connection_impl.h index 28cb90fa597ab..fb7274910a49a 100644 --- a/google/cloud/compute/instance_groups/v1/internal/instance_groups_rest_connection_impl.h +++ b/google/cloud/compute/instance_groups/v1/internal/instance_groups_rest_connection_impl.h @@ -24,13 +24,13 @@ #include "google/cloud/compute/instance_groups/v1/instance_groups_options.h" #include "google/cloud/compute/instance_groups/v1/internal/instance_groups_rest_stub.h" #include "google/cloud/compute/instance_groups/v1/internal/instance_groups_retry_traits.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/background_threads.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/instance_groups/v1/internal/instance_groups_rest_logging_decorator.h b/google/cloud/compute/instance_groups/v1/internal/instance_groups_rest_logging_decorator.h index 66d4023e82ab3..7b57f38e1a55d 100644 --- a/google/cloud/compute/instance_groups/v1/internal/instance_groups_rest_logging_decorator.h +++ b/google/cloud/compute/instance_groups/v1/internal/instance_groups_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUPS_V1_INTERNAL_INSTANCE_GROUPS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUPS_V1_INTERNAL_INSTANCE_GROUPS_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/instance_groups/v1/instance_groups.pb.h" #include "google/cloud/compute/instance_groups/v1/internal/instance_groups_rest_stub.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/instance_groups/v1/internal/instance_groups_rest_metadata_decorator.cc b/google/cloud/compute/instance_groups/v1/internal/instance_groups_rest_metadata_decorator.cc index ed920d4408ab4..5ed7fe3cc4fe9 100644 --- a/google/cloud/compute/instance_groups/v1/internal/instance_groups_rest_metadata_decorator.cc +++ b/google/cloud/compute/instance_groups/v1/internal/instance_groups_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/instance_groups/v1/instance_groups.proto #include "google/cloud/compute/instance_groups/v1/internal/instance_groups_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/instance_groups/v1/internal/instance_groups_rest_metadata_decorator.h b/google/cloud/compute/instance_groups/v1/internal/instance_groups_rest_metadata_decorator.h index 4a2ce26e2bcb6..bfbe7cbcbac7e 100644 --- a/google/cloud/compute/instance_groups/v1/internal/instance_groups_rest_metadata_decorator.h +++ b/google/cloud/compute/instance_groups/v1/internal/instance_groups_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUPS_V1_INTERNAL_INSTANCE_GROUPS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUPS_V1_INTERNAL_INSTANCE_GROUPS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/instance_groups/v1/instance_groups.pb.h" #include "google/cloud/compute/instance_groups/v1/internal/instance_groups_rest_stub.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/instance_groups/v1/internal/instance_groups_rest_stub.cc b/google/cloud/compute/instance_groups/v1/internal/instance_groups_rest_stub.cc index 6325015b90dc5..11942205405be 100644 --- a/google/cloud/compute/instance_groups/v1/internal/instance_groups_rest_stub.cc +++ b/google/cloud/compute/instance_groups/v1/internal/instance_groups_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/instance_groups/v1/instance_groups.proto #include "google/cloud/compute/instance_groups/v1/internal/instance_groups_rest_stub.h" +#include "google/cloud/compute/instance_groups/v1/instance_groups.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/instance_groups/v1/internal/instance_groups_rest_stub.h b/google/cloud/compute/instance_groups/v1/internal/instance_groups_rest_stub.h index a697028599288..699c86660ad21 100644 --- a/google/cloud/compute/instance_groups/v1/internal/instance_groups_rest_stub.h +++ b/google/cloud/compute/instance_groups/v1/internal/instance_groups_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUPS_V1_INTERNAL_INSTANCE_GROUPS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_GROUPS_V1_INTERNAL_INSTANCE_GROUPS_REST_STUB_H +#include "google/cloud/compute/instance_groups/v1/instance_groups.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/instance_groups/v1/internal/instance_groups_tracing_connection.cc b/google/cloud/compute/instance_groups/v1/internal/instance_groups_tracing_connection.cc index bdab63c583d9d..60969134a114a 100644 --- a/google/cloud/compute/instance_groups/v1/internal/instance_groups_tracing_connection.cc +++ b/google/cloud/compute/instance_groups/v1/internal/instance_groups_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_instance_groups_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - InstanceGroupsTracingConnection::InstanceGroupsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -244,17 +242,13 @@ InstanceGroupsTracingConnection::SetNamedPorts( return internal::EndSpan(std::move(span), child_->SetNamedPorts(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeInstanceGroupsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/instance_groups/v1/internal/instance_groups_tracing_connection.h b/google/cloud/compute/instance_groups/v1/internal/instance_groups_tracing_connection.h index d77123a6031f2..2411e33285b74 100644 --- a/google/cloud/compute/instance_groups/v1/internal/instance_groups_tracing_connection.h +++ b/google/cloud/compute/instance_groups/v1/internal/instance_groups_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_instance_groups_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class InstanceGroupsTracingConnection : public compute_instance_groups_v1::InstanceGroupsConnection { public: @@ -121,8 +119,6 @@ class InstanceGroupsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/instance_settings/v1/instance_settings_connection.h b/google/cloud/compute/instance_settings/v1/instance_settings_connection.h index 7529e10fd2ec5..6b4d8ebe6b163 100644 --- a/google/cloud/compute/instance_settings/v1/instance_settings_connection.h +++ b/google/cloud/compute/instance_settings/v1/instance_settings_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_SETTINGS_V1_INSTANCE_SETTINGS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_SETTINGS_V1_INSTANCE_SETTINGS_CONNECTION_H +#include "google/cloud/compute/instance_settings/v1/instance_settings.pb.h" #include "google/cloud/compute/instance_settings/v1/instance_settings_connection_idempotency_policy.h" #include "google/cloud/compute/instance_settings/v1/internal/instance_settings_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -29,7 +30,6 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/instance_settings/v1/instance_settings_connection_idempotency_policy.h b/google/cloud/compute/instance_settings/v1/instance_settings_connection_idempotency_policy.h index b2285d51f35ef..21ec7faa367a2 100644 --- a/google/cloud/compute/instance_settings/v1/instance_settings_connection_idempotency_policy.h +++ b/google/cloud/compute/instance_settings/v1/instance_settings_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_SETTINGS_V1_INSTANCE_SETTINGS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_SETTINGS_V1_INSTANCE_SETTINGS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/instance_settings/v1/instance_settings.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/instance_settings/v1/instance_settings_proto_export.h b/google/cloud/compute/instance_settings/v1/instance_settings_proto_export.h index 88547360125b8..f9beef5cc16eb 100644 --- a/google/cloud/compute/instance_settings/v1/instance_settings_proto_export.h +++ b/google/cloud/compute/instance_settings/v1/instance_settings_proto_export.h @@ -26,8 +26,8 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_SETTINGS_V1_INSTANCE_SETTINGS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_064.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_SETTINGS_V1_INSTANCE_SETTINGS_PROTO_EXPORT_H diff --git a/google/cloud/compute/instance_settings/v1/internal/instance_settings_option_defaults.cc b/google/cloud/compute/instance_settings/v1/internal/instance_settings_option_defaults.cc index ed65f7a106016..2e06a8d5859d5 100644 --- a/google/cloud/compute/instance_settings/v1/internal/instance_settings_option_defaults.cc +++ b/google/cloud/compute/instance_settings/v1/internal/instance_settings_option_defaults.cc @@ -43,7 +43,7 @@ Options InstanceSettingsDefaultOptions(Options options) { options.set< compute_instance_settings_v1::InstanceSettingsRetryPolicyOption>( compute_instance_settings_v1::InstanceSettingsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/instance_settings/v1/internal/instance_settings_rest_logging_decorator.h b/google/cloud/compute/instance_settings/v1/internal/instance_settings_rest_logging_decorator.h index 7d4e623e01497..4bbe985fb5084 100644 --- a/google/cloud/compute/instance_settings/v1/internal/instance_settings_rest_logging_decorator.h +++ b/google/cloud/compute/instance_settings/v1/internal/instance_settings_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_SETTINGS_V1_INTERNAL_INSTANCE_SETTINGS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_SETTINGS_V1_INTERNAL_INSTANCE_SETTINGS_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/instance_settings/v1/instance_settings.pb.h" #include "google/cloud/compute/instance_settings/v1/internal/instance_settings_rest_stub.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/instance_settings/v1/internal/instance_settings_rest_metadata_decorator.cc b/google/cloud/compute/instance_settings/v1/internal/instance_settings_rest_metadata_decorator.cc index 0b43ec982754e..77e34cef80652 100644 --- a/google/cloud/compute/instance_settings/v1/internal/instance_settings_rest_metadata_decorator.cc +++ b/google/cloud/compute/instance_settings/v1/internal/instance_settings_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/instance_settings/v1/instance_settings.proto #include "google/cloud/compute/instance_settings/v1/internal/instance_settings_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/instance_settings/v1/internal/instance_settings_rest_metadata_decorator.h b/google/cloud/compute/instance_settings/v1/internal/instance_settings_rest_metadata_decorator.h index 4004b6e7732ea..af6f6ce2d0899 100644 --- a/google/cloud/compute/instance_settings/v1/internal/instance_settings_rest_metadata_decorator.h +++ b/google/cloud/compute/instance_settings/v1/internal/instance_settings_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_SETTINGS_V1_INTERNAL_INSTANCE_SETTINGS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_SETTINGS_V1_INTERNAL_INSTANCE_SETTINGS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/instance_settings/v1/instance_settings.pb.h" #include "google/cloud/compute/instance_settings/v1/internal/instance_settings_rest_stub.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/instance_settings/v1/internal/instance_settings_rest_stub.cc b/google/cloud/compute/instance_settings/v1/internal/instance_settings_rest_stub.cc index ce1ad54c7edf8..96d4d325b5bad 100644 --- a/google/cloud/compute/instance_settings/v1/internal/instance_settings_rest_stub.cc +++ b/google/cloud/compute/instance_settings/v1/internal/instance_settings_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/instance_settings/v1/instance_settings.proto #include "google/cloud/compute/instance_settings/v1/internal/instance_settings_rest_stub.h" +#include "google/cloud/compute/instance_settings/v1/instance_settings.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/instance_settings/v1/internal/instance_settings_rest_stub.h b/google/cloud/compute/instance_settings/v1/internal/instance_settings_rest_stub.h index b162ddb71a4de..6fee378673b70 100644 --- a/google/cloud/compute/instance_settings/v1/internal/instance_settings_rest_stub.h +++ b/google/cloud/compute/instance_settings/v1/internal/instance_settings_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_SETTINGS_V1_INTERNAL_INSTANCE_SETTINGS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_SETTINGS_V1_INTERNAL_INSTANCE_SETTINGS_REST_STUB_H +#include "google/cloud/compute/instance_settings/v1/instance_settings.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/instance_settings/v1/internal/instance_settings_tracing_connection.cc b/google/cloud/compute/instance_settings/v1/internal/instance_settings_tracing_connection.cc index 09eddab8dca73..404dc84b97358 100644 --- a/google/cloud/compute/instance_settings/v1/internal/instance_settings_tracing_connection.cc +++ b/google/cloud/compute/instance_settings/v1/internal/instance_settings_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace compute_instance_settings_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - InstanceSettingsTracingConnection::InstanceSettingsTracingConnection( std::shared_ptr child) @@ -79,17 +77,13 @@ InstanceSettingsTracingConnection::PatchInstanceSettings( child_->PatchInstanceSettings(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeInstanceSettingsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/instance_settings/v1/internal/instance_settings_tracing_connection.h b/google/cloud/compute/instance_settings/v1/internal/instance_settings_tracing_connection.h index cafc7b9b9290c..b1f6826ed6128 100644 --- a/google/cloud/compute/instance_settings/v1/internal/instance_settings_tracing_connection.h +++ b/google/cloud/compute/instance_settings/v1/internal/instance_settings_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_instance_settings_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class InstanceSettingsTracingConnection : public compute_instance_settings_v1::InstanceSettingsConnection { public: @@ -63,8 +61,6 @@ class InstanceSettingsTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/instance_templates/v1/instance_templates_connection.h b/google/cloud/compute/instance_templates/v1/instance_templates_connection.h index ae5b14565e6c4..dc78c3643e8d7 100644 --- a/google/cloud/compute/instance_templates/v1/instance_templates_connection.h +++ b/google/cloud/compute/instance_templates/v1/instance_templates_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_TEMPLATES_V1_INSTANCE_TEMPLATES_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_TEMPLATES_V1_INSTANCE_TEMPLATES_CONNECTION_H +#include "google/cloud/compute/instance_templates/v1/instance_templates.pb.h" #include "google/cloud/compute/instance_templates/v1/instance_templates_connection_idempotency_policy.h" #include "google/cloud/compute/instance_templates/v1/internal/instance_templates_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/instance_templates/v1/instance_templates_connection_idempotency_policy.h b/google/cloud/compute/instance_templates/v1/instance_templates_connection_idempotency_policy.h index 9722097fcba0f..3dae768f430f2 100644 --- a/google/cloud/compute/instance_templates/v1/instance_templates_connection_idempotency_policy.h +++ b/google/cloud/compute/instance_templates/v1/instance_templates_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_TEMPLATES_V1_INSTANCE_TEMPLATES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_TEMPLATES_V1_INSTANCE_TEMPLATES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/instance_templates/v1/instance_templates.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/instance_templates/v1/instance_templates_proto_export.h b/google/cloud/compute/instance_templates/v1/instance_templates_proto_export.h index a3a2df8da44b0..143ec0382f3cc 100644 --- a/google/cloud/compute/instance_templates/v1/instance_templates_proto_export.h +++ b/google/cloud/compute/instance_templates/v1/instance_templates_proto_export.h @@ -26,19 +26,19 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_TEMPLATES_V1_INSTANCE_TEMPLATES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_001.pb.h" +#include "google/cloud/compute/v1/internal/common_003.pb.h" +#include "google/cloud/compute/v1/internal/common_007.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_021.pb.h" +#include "google/cloud/compute/v1/internal/common_024.pb.h" +#include "google/cloud/compute/v1/internal/common_029.pb.h" +#include "google/cloud/compute/v1/internal/common_031.pb.h" +#include "google/cloud/compute/v1/internal/common_033.pb.h" +#include "google/cloud/compute/v1/internal/common_047.pb.h" +#include "google/cloud/compute/v1/internal/common_065.pb.h" +#include "google/cloud/compute/v1/internal/common_081.pb.h" +#include "google/cloud/compute/v1/internal/common_145.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_TEMPLATES_V1_INSTANCE_TEMPLATES_PROTO_EXPORT_H diff --git a/google/cloud/compute/instance_templates/v1/internal/instance_templates_option_defaults.cc b/google/cloud/compute/instance_templates/v1/internal/instance_templates_option_defaults.cc index deed4214c082b..479464ca7389b 100644 --- a/google/cloud/compute/instance_templates/v1/internal/instance_templates_option_defaults.cc +++ b/google/cloud/compute/instance_templates/v1/internal/instance_templates_option_defaults.cc @@ -44,7 +44,7 @@ Options InstanceTemplatesDefaultOptions(Options options) { options.set< compute_instance_templates_v1::InstanceTemplatesRetryPolicyOption>( compute_instance_templates_v1::InstanceTemplatesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/instance_templates/v1/internal/instance_templates_rest_logging_decorator.h b/google/cloud/compute/instance_templates/v1/internal/instance_templates_rest_logging_decorator.h index e3fb828562817..b302cedc81dc4 100644 --- a/google/cloud/compute/instance_templates/v1/internal/instance_templates_rest_logging_decorator.h +++ b/google/cloud/compute/instance_templates/v1/internal/instance_templates_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_TEMPLATES_V1_INTERNAL_INSTANCE_TEMPLATES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_TEMPLATES_V1_INTERNAL_INSTANCE_TEMPLATES_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/instance_templates/v1/instance_templates.pb.h" #include "google/cloud/compute/instance_templates/v1/internal/instance_templates_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/instance_templates/v1/internal/instance_templates_rest_metadata_decorator.cc b/google/cloud/compute/instance_templates/v1/internal/instance_templates_rest_metadata_decorator.cc index 123f008d6896c..80d0f1846763b 100644 --- a/google/cloud/compute/instance_templates/v1/internal/instance_templates_rest_metadata_decorator.cc +++ b/google/cloud/compute/instance_templates/v1/internal/instance_templates_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/instance_templates/v1/instance_templates.proto #include "google/cloud/compute/instance_templates/v1/internal/instance_templates_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/instance_templates/v1/internal/instance_templates_rest_metadata_decorator.h b/google/cloud/compute/instance_templates/v1/internal/instance_templates_rest_metadata_decorator.h index 959ca46063a91..c1cac63aed397 100644 --- a/google/cloud/compute/instance_templates/v1/internal/instance_templates_rest_metadata_decorator.h +++ b/google/cloud/compute/instance_templates/v1/internal/instance_templates_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_TEMPLATES_V1_INTERNAL_INSTANCE_TEMPLATES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_TEMPLATES_V1_INTERNAL_INSTANCE_TEMPLATES_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/instance_templates/v1/instance_templates.pb.h" #include "google/cloud/compute/instance_templates/v1/internal/instance_templates_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/instance_templates/v1/internal/instance_templates_rest_stub.cc b/google/cloud/compute/instance_templates/v1/internal/instance_templates_rest_stub.cc index 6595885c14b59..415882e165419 100644 --- a/google/cloud/compute/instance_templates/v1/internal/instance_templates_rest_stub.cc +++ b/google/cloud/compute/instance_templates/v1/internal/instance_templates_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/instance_templates/v1/instance_templates.proto #include "google/cloud/compute/instance_templates/v1/internal/instance_templates_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/instance_templates/v1/instance_templates.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/instance_templates/v1/internal/instance_templates_rest_stub.h b/google/cloud/compute/instance_templates/v1/internal/instance_templates_rest_stub.h index 72d4fe32a4439..81c28de28deb0 100644 --- a/google/cloud/compute/instance_templates/v1/internal/instance_templates_rest_stub.h +++ b/google/cloud/compute/instance_templates/v1/internal/instance_templates_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_TEMPLATES_V1_INTERNAL_INSTANCE_TEMPLATES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCE_TEMPLATES_V1_INTERNAL_INSTANCE_TEMPLATES_REST_STUB_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/instance_templates/v1/instance_templates.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/instance_templates/v1/internal/instance_templates_tracing_connection.cc b/google/cloud/compute/instance_templates/v1/internal/instance_templates_tracing_connection.cc index 3ed9a3e0f431d..1ab294ee2c3ff 100644 --- a/google/cloud/compute/instance_templates/v1/internal/instance_templates_tracing_connection.cc +++ b/google/cloud/compute/instance_templates/v1/internal/instance_templates_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_instance_templates_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - InstanceTemplatesTracingConnection::InstanceTemplatesTracingConnection( std::shared_ptr child) @@ -178,18 +176,14 @@ InstanceTemplatesTracingConnection::TestIamPermissions( return internal::EndSpan(*span, child_->TestIamPermissions(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeInstanceTemplatesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/instance_templates/v1/internal/instance_templates_tracing_connection.h b/google/cloud/compute/instance_templates/v1/internal/instance_templates_tracing_connection.h index 9661f9087a690..78e1996075958 100644 --- a/google/cloud/compute/instance_templates/v1/internal/instance_templates_tracing_connection.h +++ b/google/cloud/compute/instance_templates/v1/internal/instance_templates_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_instance_templates_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class InstanceTemplatesTracingConnection : public compute_instance_templates_v1::InstanceTemplatesConnection { public: @@ -100,8 +98,6 @@ class InstanceTemplatesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/instances/v1/instances_connection.h b/google/cloud/compute/instances/v1/instances_connection.h index cb9b5b3d3828d..9a4aeee7d0a83 100644 --- a/google/cloud/compute/instances/v1/instances_connection.h +++ b/google/cloud/compute/instances/v1/instances_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCES_V1_INSTANCES_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCES_V1_INSTANCES_CONNECTION_H +#include "google/cloud/compute/instances/v1/instances.pb.h" #include "google/cloud/compute/instances/v1/instances_connection_idempotency_policy.h" #include "google/cloud/compute/instances/v1/internal/instances_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/instances/v1/instances_connection_idempotency_policy.h b/google/cloud/compute/instances/v1/instances_connection_idempotency_policy.h index 1e8a4d35ad0d7..772320437dad3 100644 --- a/google/cloud/compute/instances/v1/instances_connection_idempotency_policy.h +++ b/google/cloud/compute/instances/v1/instances_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCES_V1_INSTANCES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCES_V1_INSTANCES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/instances/v1/instances.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/instances/v1/instances_proto_export.h b/google/cloud/compute/instances/v1/instances_proto_export.h index 22c108f83ec8a..31058ec707203 100644 --- a/google/cloud/compute/instances/v1/instances_proto_export.h +++ b/google/cloud/compute/instances/v1/instances_proto_export.h @@ -26,22 +26,22 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCES_V1_INSTANCES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_001.pb.h" +#include "google/cloud/compute/v1/internal/common_003.pb.h" +#include "google/cloud/compute/v1/internal/common_007.pb.h" +#include "google/cloud/compute/v1/internal/common_015.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_021.pb.h" +#include "google/cloud/compute/v1/internal/common_022.pb.h" +#include "google/cloud/compute/v1/internal/common_029.pb.h" +#include "google/cloud/compute/v1/internal/common_031.pb.h" +#include "google/cloud/compute/v1/internal/common_033.pb.h" +#include "google/cloud/compute/v1/internal/common_034.pb.h" +#include "google/cloud/compute/v1/internal/common_039.pb.h" +#include "google/cloud/compute/v1/internal/common_081.pb.h" +#include "google/cloud/compute/v1/internal/common_145.pb.h" +#include "google/cloud/compute/v1/internal/common_146.pb.h" +#include "google/cloud/compute/v1/internal/common_152.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCES_V1_INSTANCES_PROTO_EXPORT_H diff --git a/google/cloud/compute/instances/v1/internal/instances_option_defaults.cc b/google/cloud/compute/instances/v1/internal/instances_option_defaults.cc index fa54e7c489421..87856aa7e379e 100644 --- a/google/cloud/compute/instances/v1/internal/instances_option_defaults.cc +++ b/google/cloud/compute/instances/v1/internal/instances_option_defaults.cc @@ -41,7 +41,7 @@ Options InstancesDefaultOptions(Options options) { if (!options.has()) { options.set( compute_instances_v1::InstancesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/compute/instances/v1/internal/instances_rest_connection_impl.h b/google/cloud/compute/instances/v1/internal/instances_rest_connection_impl.h index 5f8020a7443cd..375d08283ffcc 100644 --- a/google/cloud/compute/instances/v1/internal/instances_rest_connection_impl.h +++ b/google/cloud/compute/instances/v1/internal/instances_rest_connection_impl.h @@ -24,13 +24,13 @@ #include "google/cloud/compute/instances/v1/instances_options.h" #include "google/cloud/compute/instances/v1/internal/instances_rest_stub.h" #include "google/cloud/compute/instances/v1/internal/instances_retry_traits.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/background_threads.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/instances/v1/internal/instances_rest_logging_decorator.h b/google/cloud/compute/instances/v1/internal/instances_rest_logging_decorator.h index 202656fe5c14f..13637e55d4487 100644 --- a/google/cloud/compute/instances/v1/internal/instances_rest_logging_decorator.h +++ b/google/cloud/compute/instances/v1/internal/instances_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCES_V1_INTERNAL_INSTANCES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCES_V1_INTERNAL_INSTANCES_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/instances/v1/instances.pb.h" #include "google/cloud/compute/instances/v1/internal/instances_rest_stub.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/instances/v1/internal/instances_rest_metadata_decorator.cc b/google/cloud/compute/instances/v1/internal/instances_rest_metadata_decorator.cc index e569018817183..da3001805d4eb 100644 --- a/google/cloud/compute/instances/v1/internal/instances_rest_metadata_decorator.cc +++ b/google/cloud/compute/instances/v1/internal/instances_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/instances/v1/instances.proto #include "google/cloud/compute/instances/v1/internal/instances_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/instances/v1/internal/instances_rest_metadata_decorator.h b/google/cloud/compute/instances/v1/internal/instances_rest_metadata_decorator.h index 590764e345456..4e57e4b711aed 100644 --- a/google/cloud/compute/instances/v1/internal/instances_rest_metadata_decorator.h +++ b/google/cloud/compute/instances/v1/internal/instances_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCES_V1_INTERNAL_INSTANCES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCES_V1_INTERNAL_INSTANCES_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/instances/v1/instances.pb.h" #include "google/cloud/compute/instances/v1/internal/instances_rest_stub.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/instances/v1/internal/instances_rest_stub.cc b/google/cloud/compute/instances/v1/internal/instances_rest_stub.cc index 009bebf415096..7a19c4610725e 100644 --- a/google/cloud/compute/instances/v1/internal/instances_rest_stub.cc +++ b/google/cloud/compute/instances/v1/internal/instances_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/instances/v1/instances.proto #include "google/cloud/compute/instances/v1/internal/instances_rest_stub.h" +#include "google/cloud/compute/instances/v1/instances.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/instances/v1/internal/instances_rest_stub.h b/google/cloud/compute/instances/v1/internal/instances_rest_stub.h index cebffdf70e2a7..5329c7daacdc7 100644 --- a/google/cloud/compute/instances/v1/internal/instances_rest_stub.h +++ b/google/cloud/compute/instances/v1/internal/instances_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCES_V1_INTERNAL_INSTANCES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANCES_V1_INTERNAL_INSTANCES_REST_STUB_H +#include "google/cloud/compute/instances/v1/instances.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/instances/v1/internal/instances_tracing_connection.cc b/google/cloud/compute/instances/v1/internal/instances_tracing_connection.cc index 44e9c477016c6..b4d7c0859518f 100644 --- a/google/cloud/compute/instances/v1/internal/instances_tracing_connection.cc +++ b/google/cloud/compute/instances/v1/internal/instances_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_instances_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - InstancesTracingConnection::InstancesTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -1288,16 +1286,12 @@ InstancesTracingConnection::UpdateShieldedInstanceConfig( child_->UpdateShieldedInstanceConfig(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeInstancesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/instances/v1/internal/instances_tracing_connection.h b/google/cloud/compute/instances/v1/internal/instances_tracing_connection.h index fbc8a2b1c9d4e..f076434a3bfcc 100644 --- a/google/cloud/compute/instances/v1/internal/instances_tracing_connection.h +++ b/google/cloud/compute/instances/v1/internal/instances_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_instances_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class InstancesTracingConnection : public compute_instances_v1::InstancesConnection { public: @@ -544,8 +542,6 @@ class InstancesTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/instant_snapshots/v1/instant_snapshots_connection.h b/google/cloud/compute/instant_snapshots/v1/instant_snapshots_connection.h index d889d707da3c0..8cd42e6b28858 100644 --- a/google/cloud/compute/instant_snapshots/v1/instant_snapshots_connection.h +++ b/google/cloud/compute/instant_snapshots/v1/instant_snapshots_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANT_SNAPSHOTS_V1_INSTANT_SNAPSHOTS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANT_SNAPSHOTS_V1_INSTANT_SNAPSHOTS_CONNECTION_H +#include "google/cloud/compute/instant_snapshots/v1/instant_snapshots.pb.h" #include "google/cloud/compute/instant_snapshots/v1/instant_snapshots_connection_idempotency_policy.h" #include "google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/instant_snapshots/v1/instant_snapshots_connection_idempotency_policy.h b/google/cloud/compute/instant_snapshots/v1/instant_snapshots_connection_idempotency_policy.h index a06ce5c6e7750..2048c7d7f1616 100644 --- a/google/cloud/compute/instant_snapshots/v1/instant_snapshots_connection_idempotency_policy.h +++ b/google/cloud/compute/instant_snapshots/v1/instant_snapshots_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANT_SNAPSHOTS_V1_INSTANT_SNAPSHOTS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANT_SNAPSHOTS_V1_INSTANT_SNAPSHOTS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/instant_snapshots/v1/instant_snapshots.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/instant_snapshots/v1/instant_snapshots_proto_export.h b/google/cloud/compute/instant_snapshots/v1/instant_snapshots_proto_export.h index 523e8482cebbc..2df65dca61d48 100644 --- a/google/cloud/compute/instant_snapshots/v1/instant_snapshots_proto_export.h +++ b/google/cloud/compute/instant_snapshots/v1/instant_snapshots_proto_export.h @@ -26,14 +26,14 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANT_SNAPSHOTS_V1_INSTANT_SNAPSHOTS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_007.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_031.pb.h" +#include "google/cloud/compute/v1/internal/common_066.pb.h" +#include "google/cloud/compute/v1/internal/common_067.pb.h" +#include "google/cloud/compute/v1/internal/common_145.pb.h" +#include "google/cloud/compute/v1/internal/common_151.pb.h" +#include "google/cloud/compute/v1/internal/common_152.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANT_SNAPSHOTS_V1_INSTANT_SNAPSHOTS_PROTO_EXPORT_H diff --git a/google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_option_defaults.cc b/google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_option_defaults.cc index 8b983cb99233c..79ab972e3a012 100644 --- a/google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_option_defaults.cc +++ b/google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_option_defaults.cc @@ -43,7 +43,7 @@ Options InstantSnapshotsDefaultOptions(Options options) { options.set< compute_instant_snapshots_v1::InstantSnapshotsRetryPolicyOption>( compute_instant_snapshots_v1::InstantSnapshotsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_rest_logging_decorator.h b/google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_rest_logging_decorator.h index 975d114a2928d..58c61f46aff54 100644 --- a/google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_rest_logging_decorator.h +++ b/google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANT_SNAPSHOTS_V1_INTERNAL_INSTANT_SNAPSHOTS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANT_SNAPSHOTS_V1_INTERNAL_INSTANT_SNAPSHOTS_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/instant_snapshots/v1/instant_snapshots.pb.h" #include "google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_rest_stub.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_rest_metadata_decorator.cc b/google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_rest_metadata_decorator.cc index 6f3bb752a0946..9c6b9b5f19890 100644 --- a/google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_rest_metadata_decorator.cc +++ b/google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/instant_snapshots/v1/instant_snapshots.proto #include "google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_rest_metadata_decorator.h b/google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_rest_metadata_decorator.h index 37d455ba53497..73324e8c993e4 100644 --- a/google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_rest_metadata_decorator.h +++ b/google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANT_SNAPSHOTS_V1_INTERNAL_INSTANT_SNAPSHOTS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANT_SNAPSHOTS_V1_INTERNAL_INSTANT_SNAPSHOTS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/instant_snapshots/v1/instant_snapshots.pb.h" #include "google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_rest_stub.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_rest_stub.cc b/google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_rest_stub.cc index f89b83c90ad88..c0196aa3b0c60 100644 --- a/google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_rest_stub.cc +++ b/google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/instant_snapshots/v1/instant_snapshots.proto #include "google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_rest_stub.h" +#include "google/cloud/compute/instant_snapshots/v1/instant_snapshots.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_rest_stub.h b/google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_rest_stub.h index 3e7027fa17822..5a6457a1c82e4 100644 --- a/google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_rest_stub.h +++ b/google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANT_SNAPSHOTS_V1_INTERNAL_INSTANT_SNAPSHOTS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INSTANT_SNAPSHOTS_V1_INTERNAL_INSTANT_SNAPSHOTS_REST_STUB_H +#include "google/cloud/compute/instant_snapshots/v1/instant_snapshots.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_tracing_connection.cc b/google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_tracing_connection.cc index 41fd5f4829e87..1f0a3dbab1a04 100644 --- a/google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_tracing_connection.cc +++ b/google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_instant_snapshots_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - InstantSnapshotsTracingConnection::InstantSnapshotsTracingConnection( std::shared_ptr child) @@ -206,17 +204,13 @@ InstantSnapshotsTracingConnection::TestIamPermissions( return internal::EndSpan(*span, child_->TestIamPermissions(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeInstantSnapshotsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_tracing_connection.h b/google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_tracing_connection.h index eeeb051cb9a94..ab51177169ee9 100644 --- a/google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_tracing_connection.h +++ b/google/cloud/compute/instant_snapshots/v1/internal/instant_snapshots_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_instant_snapshots_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class InstantSnapshotsTracingConnection : public compute_instant_snapshots_v1::InstantSnapshotsConnection { public: @@ -109,8 +107,6 @@ class InstantSnapshotsTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/integration_tests/compute_integration_test.cc b/google/cloud/compute/integration_tests/compute_integration_test.cc index 53161ae74c22d..6f8c0a01d05cc 100644 --- a/google/cloud/compute/integration_tests/compute_integration_test.cc +++ b/google/cloud/compute/integration_tests/compute_integration_test.cc @@ -16,13 +16,13 @@ #include "google/cloud/compute/disks/v1/disks_proto_export.h" #include "google/cloud/compute/instances/v1/instances_client.h" #include "google/cloud/compute/networks/v1/networks_client.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/internal/parse_rfc3339.h" #include "google/cloud/internal/random.h" #include "google/cloud/testing_util/integration_test.h" #include "google/cloud/testing_util/status_matchers.h" #include "absl/strings/match.h" +#include "absl/strings/str_cat.h" #include #include #include diff --git a/google/cloud/compute/interconnect_attachment_groups/v1/interconnect_attachment_groups_connection.h b/google/cloud/compute/interconnect_attachment_groups/v1/interconnect_attachment_groups_connection.h index b79074386f2c4..8498258bdbbe1 100644 --- a/google/cloud/compute/interconnect_attachment_groups/v1/interconnect_attachment_groups_connection.h +++ b/google/cloud/compute/interconnect_attachment_groups/v1/interconnect_attachment_groups_connection.h @@ -20,6 +20,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_ATTACHMENT_GROUPS_V1_INTERCONNECT_ATTACHMENT_GROUPS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_ATTACHMENT_GROUPS_V1_INTERCONNECT_ATTACHMENT_GROUPS_CONNECTION_H +#include "google/cloud/compute/interconnect_attachment_groups/v1/interconnect_attachment_groups.pb.h" #include "google/cloud/compute/interconnect_attachment_groups/v1/interconnect_attachment_groups_connection_idempotency_policy.h" #include "google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -31,7 +32,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/interconnect_attachment_groups/v1/interconnect_attachment_groups_connection_idempotency_policy.h b/google/cloud/compute/interconnect_attachment_groups/v1/interconnect_attachment_groups_connection_idempotency_policy.h index bfc89a8c128aa..fb3ad666c33e8 100644 --- a/google/cloud/compute/interconnect_attachment_groups/v1/interconnect_attachment_groups_connection_idempotency_policy.h +++ b/google/cloud/compute/interconnect_attachment_groups/v1/interconnect_attachment_groups_connection_idempotency_policy.h @@ -20,9 +20,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_ATTACHMENT_GROUPS_V1_INTERCONNECT_ATTACHMENT_GROUPS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_ATTACHMENT_GROUPS_V1_INTERCONNECT_ATTACHMENT_GROUPS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/interconnect_attachment_groups/v1/interconnect_attachment_groups.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/interconnect_attachment_groups/v1/interconnect_attachment_groups_proto_export.h b/google/cloud/compute/interconnect_attachment_groups/v1/interconnect_attachment_groups_proto_export.h index b82a4077b72b4..ec6516a3afcc3 100644 --- a/google/cloud/compute/interconnect_attachment_groups/v1/interconnect_attachment_groups_proto_export.h +++ b/google/cloud/compute/interconnect_attachment_groups/v1/interconnect_attachment_groups_proto_export.h @@ -26,12 +26,12 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_ATTACHMENT_GROUPS_V1_INTERCONNECT_ATTACHMENT_GROUPS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_007.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_031.pb.h" +#include "google/cloud/compute/v1/internal/common_047.pb.h" +#include "google/cloud/compute/v1/internal/common_071.pb.h" +#include "google/cloud/compute/v1/internal/common_145.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_ATTACHMENT_GROUPS_V1_INTERCONNECT_ATTACHMENT_GROUPS_PROTO_EXPORT_H diff --git a/google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_option_defaults.cc b/google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_option_defaults.cc index 93ecd93d3f886..11ba22394649a 100644 --- a/google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_option_defaults.cc +++ b/google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_option_defaults.cc @@ -47,7 +47,7 @@ Options InterconnectAttachmentGroupsDefaultOptions(Options options) { InterconnectAttachmentGroupsRetryPolicyOption>( compute_interconnect_attachment_groups_v1:: InterconnectAttachmentGroupsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_rest_logging_decorator.h b/google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_rest_logging_decorator.h index 246f81a566d73..248c68c9caf4e 100644 --- a/google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_rest_logging_decorator.h +++ b/google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_rest_logging_decorator.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_ATTACHMENT_GROUPS_V1_INTERNAL_INTERCONNECT_ATTACHMENT_GROUPS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_ATTACHMENT_GROUPS_V1_INTERNAL_INTERCONNECT_ATTACHMENT_GROUPS_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/interconnect_attachment_groups/v1/interconnect_attachment_groups.pb.h" #include "google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_rest_metadata_decorator.cc b/google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_rest_metadata_decorator.cc index 1dff603449285..9a0f35a22d0d9 100644 --- a/google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_rest_metadata_decorator.cc +++ b/google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_rest_metadata_decorator.cc @@ -18,10 +18,10 @@ // google/cloud/compute/interconnect_attachment_groups/v1/interconnect_attachment_groups.proto #include "google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_rest_metadata_decorator.h b/google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_rest_metadata_decorator.h index edc5149779615..95b3357533f3d 100644 --- a/google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_rest_metadata_decorator.h +++ b/google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_rest_metadata_decorator.h @@ -20,12 +20,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_ATTACHMENT_GROUPS_V1_INTERNAL_INTERCONNECT_ATTACHMENT_GROUPS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_ATTACHMENT_GROUPS_V1_INTERNAL_INTERCONNECT_ATTACHMENT_GROUPS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/interconnect_attachment_groups/v1/interconnect_attachment_groups.pb.h" #include "google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_rest_stub.cc b/google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_rest_stub.cc index bd662bb8bb181..2731ebf036c19 100644 --- a/google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_rest_stub.cc +++ b/google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_rest_stub.cc @@ -18,12 +18,12 @@ // google/cloud/compute/interconnect_attachment_groups/v1/interconnect_attachment_groups.proto #include "google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/interconnect_attachment_groups/v1/interconnect_attachment_groups.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_rest_stub.h b/google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_rest_stub.h index e5d1d22427978..0511d849c57c7 100644 --- a/google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_rest_stub.h +++ b/google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_rest_stub.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_ATTACHMENT_GROUPS_V1_INTERNAL_INTERCONNECT_ATTACHMENT_GROUPS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_ATTACHMENT_GROUPS_V1_INTERNAL_INTERCONNECT_ATTACHMENT_GROUPS_REST_STUB_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/interconnect_attachment_groups/v1/interconnect_attachment_groups.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_tracing_connection.cc b/google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_tracing_connection.cc index b1c3348b0a086..c443bdaad77f9 100644 --- a/google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_tracing_connection.cc +++ b/google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace compute_interconnect_attachment_groups_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - InterconnectAttachmentGroupsTracingConnection:: InterconnectAttachmentGroupsTracingConnection( std::shared_ptrTestIamPermissions(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeInterconnectAttachmentGroupsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_tracing_connection.h b/google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_tracing_connection.h index 296ab19150236..e82b1a078ec33 100644 --- a/google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_tracing_connection.h +++ b/google/cloud/compute/interconnect_attachment_groups/v1/internal/interconnect_attachment_groups_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace compute_interconnect_attachment_groups_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class InterconnectAttachmentGroupsTracingConnection : public compute_interconnect_attachment_groups_v1:: InterconnectAttachmentGroupsConnection { @@ -124,8 +122,6 @@ class InterconnectAttachmentGroupsTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/interconnect_attachments/v1/interconnect_attachments_connection.h b/google/cloud/compute/interconnect_attachments/v1/interconnect_attachments_connection.h index b12d576445d58..2212f39369caf 100644 --- a/google/cloud/compute/interconnect_attachments/v1/interconnect_attachments_connection.h +++ b/google/cloud/compute/interconnect_attachments/v1/interconnect_attachments_connection.h @@ -20,6 +20,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_ATTACHMENTS_V1_INTERCONNECT_ATTACHMENTS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_ATTACHMENTS_V1_INTERCONNECT_ATTACHMENTS_CONNECTION_H +#include "google/cloud/compute/interconnect_attachments/v1/interconnect_attachments.pb.h" #include "google/cloud/compute/interconnect_attachments/v1/interconnect_attachments_connection_idempotency_policy.h" #include "google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -31,7 +32,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/interconnect_attachments/v1/interconnect_attachments_connection_idempotency_policy.h b/google/cloud/compute/interconnect_attachments/v1/interconnect_attachments_connection_idempotency_policy.h index 3701f13e3e169..2a16146d32189 100644 --- a/google/cloud/compute/interconnect_attachments/v1/interconnect_attachments_connection_idempotency_policy.h +++ b/google/cloud/compute/interconnect_attachments/v1/interconnect_attachments_connection_idempotency_policy.h @@ -20,9 +20,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_ATTACHMENTS_V1_INTERCONNECT_ATTACHMENTS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_ATTACHMENTS_V1_INTERCONNECT_ATTACHMENTS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/interconnect_attachments/v1/interconnect_attachments.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/interconnect_attachments/v1/interconnect_attachments_proto_export.h b/google/cloud/compute/interconnect_attachments/v1/interconnect_attachments_proto_export.h index 457050ff4cf36..87d65a390321b 100644 --- a/google/cloud/compute/interconnect_attachments/v1/interconnect_attachments_proto_export.h +++ b/google/cloud/compute/interconnect_attachments/v1/interconnect_attachments_proto_export.h @@ -26,10 +26,10 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_ATTACHMENTS_V1_INTERCONNECT_ATTACHMENTS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_069.pb.h" +#include "google/cloud/compute/v1/internal/common_070.pb.h" +#include "google/cloud/compute/v1/internal/common_107.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_ATTACHMENTS_V1_INTERCONNECT_ATTACHMENTS_PROTO_EXPORT_H diff --git a/google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_option_defaults.cc b/google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_option_defaults.cc index 42ea3b3eeb892..9078aa8f7d112 100644 --- a/google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_option_defaults.cc +++ b/google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_option_defaults.cc @@ -46,7 +46,7 @@ Options InterconnectAttachmentsDefaultOptions(Options options) { InterconnectAttachmentsRetryPolicyOption>( compute_interconnect_attachments_v1:: InterconnectAttachmentsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_rest_logging_decorator.h b/google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_rest_logging_decorator.h index f454d1b98b3d9..bd4a4f70e96aa 100644 --- a/google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_rest_logging_decorator.h +++ b/google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_rest_logging_decorator.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_ATTACHMENTS_V1_INTERNAL_INTERCONNECT_ATTACHMENTS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_ATTACHMENTS_V1_INTERNAL_INTERCONNECT_ATTACHMENTS_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/interconnect_attachments/v1/interconnect_attachments.pb.h" #include "google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_rest_stub.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_rest_metadata_decorator.cc b/google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_rest_metadata_decorator.cc index 0edab236eea64..e339aae30ad86 100644 --- a/google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_rest_metadata_decorator.cc +++ b/google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_rest_metadata_decorator.cc @@ -18,10 +18,10 @@ // google/cloud/compute/interconnect_attachments/v1/interconnect_attachments.proto #include "google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_rest_metadata_decorator.h b/google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_rest_metadata_decorator.h index eb25f42460f09..24a528053ac84 100644 --- a/google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_rest_metadata_decorator.h +++ b/google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_rest_metadata_decorator.h @@ -20,12 +20,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_ATTACHMENTS_V1_INTERNAL_INTERCONNECT_ATTACHMENTS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_ATTACHMENTS_V1_INTERNAL_INTERCONNECT_ATTACHMENTS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/interconnect_attachments/v1/interconnect_attachments.pb.h" #include "google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_rest_stub.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_rest_stub.cc b/google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_rest_stub.cc index 2d8a443c99137..d22e54085e6f3 100644 --- a/google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_rest_stub.cc +++ b/google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_rest_stub.cc @@ -18,12 +18,12 @@ // google/cloud/compute/interconnect_attachments/v1/interconnect_attachments.proto #include "google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_rest_stub.h" +#include "google/cloud/compute/interconnect_attachments/v1/interconnect_attachments.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_rest_stub.h b/google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_rest_stub.h index 4afa037100fe3..6617bd18b4794 100644 --- a/google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_rest_stub.h +++ b/google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_rest_stub.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_ATTACHMENTS_V1_INTERNAL_INTERCONNECT_ATTACHMENTS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_ATTACHMENTS_V1_INTERNAL_INTERCONNECT_ATTACHMENTS_REST_STUB_H +#include "google/cloud/compute/interconnect_attachments/v1/interconnect_attachments.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_tracing_connection.cc b/google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_tracing_connection.cc index 73841f9cd5a64..e3cd97fb95aaf 100644 --- a/google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_tracing_connection.cc +++ b/google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace compute_interconnect_attachments_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - InterconnectAttachmentsTracingConnection:: InterconnectAttachmentsTracingConnection( std::shared_ptrSetLabels(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr< compute_interconnect_attachments_v1::InterconnectAttachmentsConnection> MakeInterconnectAttachmentsTracingConnection( std::shared_ptr< compute_interconnect_attachments_v1::InterconnectAttachmentsConnection> conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_tracing_connection.h b/google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_tracing_connection.h index eba6596fad106..262767d0c9f60 100644 --- a/google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_tracing_connection.h +++ b/google/cloud/compute/interconnect_attachments/v1/internal/interconnect_attachments_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace compute_interconnect_attachments_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class InterconnectAttachmentsTracingConnection : public compute_interconnect_attachments_v1:: InterconnectAttachmentsConnection { @@ -122,8 +120,6 @@ class InterconnectAttachmentsTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/interconnect_groups/v1/interconnect_groups_connection.h b/google/cloud/compute/interconnect_groups/v1/interconnect_groups_connection.h index df444f090223d..28e744b366dbd 100644 --- a/google/cloud/compute/interconnect_groups/v1/interconnect_groups_connection.h +++ b/google/cloud/compute/interconnect_groups/v1/interconnect_groups_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_GROUPS_V1_INTERCONNECT_GROUPS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_GROUPS_V1_INTERCONNECT_GROUPS_CONNECTION_H +#include "google/cloud/compute/interconnect_groups/v1/interconnect_groups.pb.h" #include "google/cloud/compute/interconnect_groups/v1/interconnect_groups_connection_idempotency_policy.h" #include "google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/interconnect_groups/v1/interconnect_groups_connection_idempotency_policy.h b/google/cloud/compute/interconnect_groups/v1/interconnect_groups_connection_idempotency_policy.h index 26effa0fcb2d0..8fe74a41624f2 100644 --- a/google/cloud/compute/interconnect_groups/v1/interconnect_groups_connection_idempotency_policy.h +++ b/google/cloud/compute/interconnect_groups/v1/interconnect_groups_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_GROUPS_V1_INTERCONNECT_GROUPS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_GROUPS_V1_INTERCONNECT_GROUPS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/interconnect_groups/v1/interconnect_groups.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/interconnect_groups/v1/interconnect_groups_proto_export.h b/google/cloud/compute/interconnect_groups/v1/interconnect_groups_proto_export.h index 97051ff570fd2..942bc1daa59a6 100644 --- a/google/cloud/compute/interconnect_groups/v1/interconnect_groups_proto_export.h +++ b/google/cloud/compute/interconnect_groups/v1/interconnect_groups_proto_export.h @@ -26,13 +26,13 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_GROUPS_V1_INTERCONNECT_GROUPS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_007.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_031.pb.h" +#include "google/cloud/compute/v1/internal/common_047.pb.h" +#include "google/cloud/compute/v1/internal/common_072.pb.h" +#include "google/cloud/compute/v1/internal/common_073.pb.h" +#include "google/cloud/compute/v1/internal/common_145.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_GROUPS_V1_INTERCONNECT_GROUPS_PROTO_EXPORT_H diff --git a/google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_option_defaults.cc b/google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_option_defaults.cc index 0707264129314..78bd9081c82ae 100644 --- a/google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_option_defaults.cc +++ b/google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_option_defaults.cc @@ -44,7 +44,7 @@ Options InterconnectGroupsDefaultOptions(Options options) { options.set< compute_interconnect_groups_v1::InterconnectGroupsRetryPolicyOption>( compute_interconnect_groups_v1:: - InterconnectGroupsLimitedTimeRetryPolicy(std::chrono::minutes(30)) + InterconnectGroupsLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_rest_logging_decorator.h b/google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_rest_logging_decorator.h index 98f4fd3cd08c1..772e3ceef84ff 100644 --- a/google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_rest_logging_decorator.h +++ b/google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_GROUPS_V1_INTERNAL_INTERCONNECT_GROUPS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_GROUPS_V1_INTERNAL_INTERCONNECT_GROUPS_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/interconnect_groups/v1/interconnect_groups.pb.h" #include "google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_rest_metadata_decorator.cc b/google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_rest_metadata_decorator.cc index 56e0b9c39e1fa..ae701ceabb26f 100644 --- a/google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_rest_metadata_decorator.cc +++ b/google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/interconnect_groups/v1/interconnect_groups.proto #include "google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_rest_metadata_decorator.h b/google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_rest_metadata_decorator.h index cd4876fe0e717..767db4c4790a0 100644 --- a/google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_rest_metadata_decorator.h +++ b/google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_GROUPS_V1_INTERNAL_INTERCONNECT_GROUPS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_GROUPS_V1_INTERNAL_INTERCONNECT_GROUPS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/interconnect_groups/v1/interconnect_groups.pb.h" #include "google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_rest_stub.cc b/google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_rest_stub.cc index d2962b3180ed1..3fc08df52ed80 100644 --- a/google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_rest_stub.cc +++ b/google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/interconnect_groups/v1/interconnect_groups.proto #include "google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/interconnect_groups/v1/interconnect_groups.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_rest_stub.h b/google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_rest_stub.h index e12f035580abf..4807d340f4175 100644 --- a/google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_rest_stub.h +++ b/google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_GROUPS_V1_INTERNAL_INTERCONNECT_GROUPS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_GROUPS_V1_INTERNAL_INTERCONNECT_GROUPS_REST_STUB_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/interconnect_groups/v1/interconnect_groups.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_tracing_connection.cc b/google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_tracing_connection.cc index 6dd8b638058dc..2d7bf6e9fed60 100644 --- a/google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_tracing_connection.cc +++ b/google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_interconnect_groups_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - InterconnectGroupsTracingConnection::InterconnectGroupsTracingConnection( std::shared_ptr< compute_interconnect_groups_v1::InterconnectGroupsConnection> @@ -242,19 +240,15 @@ InterconnectGroupsTracingConnection::TestIamPermissions( return internal::EndSpan(*span, child_->TestIamPermissions(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeInterconnectGroupsTracingConnection( std::shared_ptr< compute_interconnect_groups_v1::InterconnectGroupsConnection> conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_tracing_connection.h b/google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_tracing_connection.h index b60bcb1254673..8658aab4fa986 100644 --- a/google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_tracing_connection.h +++ b/google/cloud/compute/interconnect_groups/v1/internal/interconnect_groups_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_interconnect_groups_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class InterconnectGroupsTracingConnection : public compute_interconnect_groups_v1::InterconnectGroupsConnection { public: @@ -122,8 +120,6 @@ class InterconnectGroupsTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/interconnect_locations/v1/interconnect_locations_connection.h b/google/cloud/compute/interconnect_locations/v1/interconnect_locations_connection.h index 97a07d7349fbd..26a0d34423ba6 100644 --- a/google/cloud/compute/interconnect_locations/v1/interconnect_locations_connection.h +++ b/google/cloud/compute/interconnect_locations/v1/interconnect_locations_connection.h @@ -20,6 +20,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_LOCATIONS_V1_INTERCONNECT_LOCATIONS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_LOCATIONS_V1_INTERCONNECT_LOCATIONS_CONNECTION_H +#include "google/cloud/compute/interconnect_locations/v1/interconnect_locations.pb.h" #include "google/cloud/compute/interconnect_locations/v1/interconnect_locations_connection_idempotency_policy.h" #include "google/cloud/compute/interconnect_locations/v1/internal/interconnect_locations_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -28,7 +29,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/interconnect_locations/v1/interconnect_locations_connection_idempotency_policy.h b/google/cloud/compute/interconnect_locations/v1/interconnect_locations_connection_idempotency_policy.h index 482d44d5d8175..a3e85cd50307c 100644 --- a/google/cloud/compute/interconnect_locations/v1/interconnect_locations_connection_idempotency_policy.h +++ b/google/cloud/compute/interconnect_locations/v1/interconnect_locations_connection_idempotency_policy.h @@ -20,9 +20,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_LOCATIONS_V1_INTERCONNECT_LOCATIONS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_LOCATIONS_V1_INTERCONNECT_LOCATIONS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/interconnect_locations/v1/interconnect_locations.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/interconnect_locations/v1/interconnect_locations_proto_export.h b/google/cloud/compute/interconnect_locations/v1/interconnect_locations_proto_export.h index 2312f2a28562b..049a82f5dab94 100644 --- a/google/cloud/compute/interconnect_locations/v1/interconnect_locations_proto_export.h +++ b/google/cloud/compute/interconnect_locations/v1/interconnect_locations_proto_export.h @@ -26,7 +26,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_LOCATIONS_V1_INTERCONNECT_LOCATIONS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include +#include "google/cloud/compute/v1/internal/common_074.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_LOCATIONS_V1_INTERCONNECT_LOCATIONS_PROTO_EXPORT_H diff --git a/google/cloud/compute/interconnect_locations/v1/internal/interconnect_locations_option_defaults.cc b/google/cloud/compute/interconnect_locations/v1/internal/interconnect_locations_option_defaults.cc index d3c314070f9a9..7079a74b3cf87 100644 --- a/google/cloud/compute/interconnect_locations/v1/internal/interconnect_locations_option_defaults.cc +++ b/google/cloud/compute/interconnect_locations/v1/internal/interconnect_locations_option_defaults.cc @@ -46,7 +46,7 @@ Options InterconnectLocationsDefaultOptions(Options options) { InterconnectLocationsRetryPolicyOption>( compute_interconnect_locations_v1:: InterconnectLocationsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include #include #include diff --git a/google/cloud/compute/interconnect_locations/v1/internal/interconnect_locations_rest_metadata_decorator.cc b/google/cloud/compute/interconnect_locations/v1/internal/interconnect_locations_rest_metadata_decorator.cc index 2fc09054435c7..59dc00be6ca7f 100644 --- a/google/cloud/compute/interconnect_locations/v1/internal/interconnect_locations_rest_metadata_decorator.cc +++ b/google/cloud/compute/interconnect_locations/v1/internal/interconnect_locations_rest_metadata_decorator.cc @@ -18,10 +18,10 @@ // google/cloud/compute/interconnect_locations/v1/interconnect_locations.proto #include "google/cloud/compute/interconnect_locations/v1/internal/interconnect_locations_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/interconnect_locations/v1/internal/interconnect_locations_rest_metadata_decorator.h b/google/cloud/compute/interconnect_locations/v1/internal/interconnect_locations_rest_metadata_decorator.h index 2531336de3022..62afed4607817 100644 --- a/google/cloud/compute/interconnect_locations/v1/internal/interconnect_locations_rest_metadata_decorator.h +++ b/google/cloud/compute/interconnect_locations/v1/internal/interconnect_locations_rest_metadata_decorator.h @@ -20,11 +20,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_LOCATIONS_V1_INTERNAL_INTERCONNECT_LOCATIONS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_LOCATIONS_V1_INTERNAL_INTERCONNECT_LOCATIONS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/interconnect_locations/v1/interconnect_locations.pb.h" #include "google/cloud/compute/interconnect_locations/v1/internal/interconnect_locations_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/compute/interconnect_locations/v1/internal/interconnect_locations_rest_stub.cc b/google/cloud/compute/interconnect_locations/v1/internal/interconnect_locations_rest_stub.cc index 4cc5bf9b1881e..f2bd1fe366d46 100644 --- a/google/cloud/compute/interconnect_locations/v1/internal/interconnect_locations_rest_stub.cc +++ b/google/cloud/compute/interconnect_locations/v1/internal/interconnect_locations_rest_stub.cc @@ -18,11 +18,11 @@ // google/cloud/compute/interconnect_locations/v1/interconnect_locations.proto #include "google/cloud/compute/interconnect_locations/v1/internal/interconnect_locations_rest_stub.h" +#include "google/cloud/compute/interconnect_locations/v1/interconnect_locations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/interconnect_locations/v1/internal/interconnect_locations_rest_stub.h b/google/cloud/compute/interconnect_locations/v1/internal/interconnect_locations_rest_stub.h index 630d4ad8c90e9..17b2d60fe7446 100644 --- a/google/cloud/compute/interconnect_locations/v1/internal/interconnect_locations_rest_stub.h +++ b/google/cloud/compute/interconnect_locations/v1/internal/interconnect_locations_rest_stub.h @@ -20,12 +20,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_LOCATIONS_V1_INTERNAL_INTERCONNECT_LOCATIONS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_LOCATIONS_V1_INTERNAL_INTERCONNECT_LOCATIONS_REST_STUB_H +#include "google/cloud/compute/interconnect_locations/v1/interconnect_locations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/interconnect_locations/v1/internal/interconnect_locations_tracing_connection.cc b/google/cloud/compute/interconnect_locations/v1/internal/interconnect_locations_tracing_connection.cc index 8f7ed15f17e38..be084abc5f62c 100644 --- a/google/cloud/compute/interconnect_locations/v1/internal/interconnect_locations_tracing_connection.cc +++ b/google/cloud/compute/interconnect_locations/v1/internal/interconnect_locations_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace compute_interconnect_locations_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - InterconnectLocationsTracingConnection::InterconnectLocationsTracingConnection( std::shared_ptr< compute_interconnect_locations_v1::InterconnectLocationsConnection> @@ -61,20 +59,16 @@ InterconnectLocationsTracingConnection::ListInterconnectLocations( std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr< compute_interconnect_locations_v1::InterconnectLocationsConnection> MakeInterconnectLocationsTracingConnection( std::shared_ptr< compute_interconnect_locations_v1::InterconnectLocationsConnection> conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/interconnect_locations/v1/internal/interconnect_locations_tracing_connection.h b/google/cloud/compute/interconnect_locations/v1/internal/interconnect_locations_tracing_connection.h index a3fbc277c7a01..1e5484a2b2c77 100644 --- a/google/cloud/compute/interconnect_locations/v1/internal/interconnect_locations_tracing_connection.h +++ b/google/cloud/compute/interconnect_locations/v1/internal/interconnect_locations_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace compute_interconnect_locations_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class InterconnectLocationsTracingConnection : public compute_interconnect_locations_v1:: InterconnectLocationsConnection { @@ -60,8 +58,6 @@ class InterconnectLocationsTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/interconnect_remote_locations/v1/interconnect_remote_locations_connection.h b/google/cloud/compute/interconnect_remote_locations/v1/interconnect_remote_locations_connection.h index 8429dc64f890d..acfaca4f8cc1f 100644 --- a/google/cloud/compute/interconnect_remote_locations/v1/interconnect_remote_locations_connection.h +++ b/google/cloud/compute/interconnect_remote_locations/v1/interconnect_remote_locations_connection.h @@ -20,6 +20,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_REMOTE_LOCATIONS_V1_INTERCONNECT_REMOTE_LOCATIONS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_REMOTE_LOCATIONS_V1_INTERCONNECT_REMOTE_LOCATIONS_CONNECTION_H +#include "google/cloud/compute/interconnect_remote_locations/v1/interconnect_remote_locations.pb.h" #include "google/cloud/compute/interconnect_remote_locations/v1/interconnect_remote_locations_connection_idempotency_policy.h" #include "google/cloud/compute/interconnect_remote_locations/v1/internal/interconnect_remote_locations_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -28,7 +29,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/interconnect_remote_locations/v1/interconnect_remote_locations_connection_idempotency_policy.h b/google/cloud/compute/interconnect_remote_locations/v1/interconnect_remote_locations_connection_idempotency_policy.h index 01a0e7683f731..1f78d402b0264 100644 --- a/google/cloud/compute/interconnect_remote_locations/v1/interconnect_remote_locations_connection_idempotency_policy.h +++ b/google/cloud/compute/interconnect_remote_locations/v1/interconnect_remote_locations_connection_idempotency_policy.h @@ -20,9 +20,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_REMOTE_LOCATIONS_V1_INTERCONNECT_REMOTE_LOCATIONS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_REMOTE_LOCATIONS_V1_INTERCONNECT_REMOTE_LOCATIONS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/interconnect_remote_locations/v1/interconnect_remote_locations.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/interconnect_remote_locations/v1/interconnect_remote_locations_proto_export.h b/google/cloud/compute/interconnect_remote_locations/v1/interconnect_remote_locations_proto_export.h index 9258d785a36a1..dee12ca0726a4 100644 --- a/google/cloud/compute/interconnect_remote_locations/v1/interconnect_remote_locations_proto_export.h +++ b/google/cloud/compute/interconnect_remote_locations/v1/interconnect_remote_locations_proto_export.h @@ -26,8 +26,8 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_REMOTE_LOCATIONS_V1_INTERCONNECT_REMOTE_LOCATIONS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include +#include "google/cloud/compute/v1/internal/common_070.pb.h" +#include "google/cloud/compute/v1/internal/common_075.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_REMOTE_LOCATIONS_V1_INTERCONNECT_REMOTE_LOCATIONS_PROTO_EXPORT_H diff --git a/google/cloud/compute/interconnect_remote_locations/v1/internal/interconnect_remote_locations_option_defaults.cc b/google/cloud/compute/interconnect_remote_locations/v1/internal/interconnect_remote_locations_option_defaults.cc index a349dd8455643..64f55096c55e3 100644 --- a/google/cloud/compute/interconnect_remote_locations/v1/internal/interconnect_remote_locations_option_defaults.cc +++ b/google/cloud/compute/interconnect_remote_locations/v1/internal/interconnect_remote_locations_option_defaults.cc @@ -47,7 +47,7 @@ Options InterconnectRemoteLocationsDefaultOptions(Options options) { InterconnectRemoteLocationsRetryPolicyOption>( compute_interconnect_remote_locations_v1:: InterconnectRemoteLocationsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include #include #include diff --git a/google/cloud/compute/interconnect_remote_locations/v1/internal/interconnect_remote_locations_rest_metadata_decorator.cc b/google/cloud/compute/interconnect_remote_locations/v1/internal/interconnect_remote_locations_rest_metadata_decorator.cc index 78cdc59d27774..d0d12dc65951b 100644 --- a/google/cloud/compute/interconnect_remote_locations/v1/internal/interconnect_remote_locations_rest_metadata_decorator.cc +++ b/google/cloud/compute/interconnect_remote_locations/v1/internal/interconnect_remote_locations_rest_metadata_decorator.cc @@ -18,10 +18,10 @@ // google/cloud/compute/interconnect_remote_locations/v1/interconnect_remote_locations.proto #include "google/cloud/compute/interconnect_remote_locations/v1/internal/interconnect_remote_locations_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/interconnect_remote_locations/v1/internal/interconnect_remote_locations_rest_metadata_decorator.h b/google/cloud/compute/interconnect_remote_locations/v1/internal/interconnect_remote_locations_rest_metadata_decorator.h index 00cbdf1f0f333..d9ff68cbcb89d 100644 --- a/google/cloud/compute/interconnect_remote_locations/v1/internal/interconnect_remote_locations_rest_metadata_decorator.h +++ b/google/cloud/compute/interconnect_remote_locations/v1/internal/interconnect_remote_locations_rest_metadata_decorator.h @@ -20,11 +20,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_REMOTE_LOCATIONS_V1_INTERNAL_INTERCONNECT_REMOTE_LOCATIONS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_REMOTE_LOCATIONS_V1_INTERNAL_INTERCONNECT_REMOTE_LOCATIONS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/interconnect_remote_locations/v1/interconnect_remote_locations.pb.h" #include "google/cloud/compute/interconnect_remote_locations/v1/internal/interconnect_remote_locations_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/compute/interconnect_remote_locations/v1/internal/interconnect_remote_locations_rest_stub.cc b/google/cloud/compute/interconnect_remote_locations/v1/internal/interconnect_remote_locations_rest_stub.cc index 32d9159bced85..1fe473f92b6ec 100644 --- a/google/cloud/compute/interconnect_remote_locations/v1/internal/interconnect_remote_locations_rest_stub.cc +++ b/google/cloud/compute/interconnect_remote_locations/v1/internal/interconnect_remote_locations_rest_stub.cc @@ -18,11 +18,11 @@ // google/cloud/compute/interconnect_remote_locations/v1/interconnect_remote_locations.proto #include "google/cloud/compute/interconnect_remote_locations/v1/internal/interconnect_remote_locations_rest_stub.h" +#include "google/cloud/compute/interconnect_remote_locations/v1/interconnect_remote_locations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/interconnect_remote_locations/v1/internal/interconnect_remote_locations_rest_stub.h b/google/cloud/compute/interconnect_remote_locations/v1/internal/interconnect_remote_locations_rest_stub.h index 18a3f782557dc..0ba0f5c42103b 100644 --- a/google/cloud/compute/interconnect_remote_locations/v1/internal/interconnect_remote_locations_rest_stub.h +++ b/google/cloud/compute/interconnect_remote_locations/v1/internal/interconnect_remote_locations_rest_stub.h @@ -20,12 +20,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_REMOTE_LOCATIONS_V1_INTERNAL_INTERCONNECT_REMOTE_LOCATIONS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECT_REMOTE_LOCATIONS_V1_INTERNAL_INTERCONNECT_REMOTE_LOCATIONS_REST_STUB_H +#include "google/cloud/compute/interconnect_remote_locations/v1/interconnect_remote_locations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/interconnect_remote_locations/v1/internal/interconnect_remote_locations_tracing_connection.cc b/google/cloud/compute/interconnect_remote_locations/v1/internal/interconnect_remote_locations_tracing_connection.cc index fbf8ef66d8066..cd9116ccd2f85 100644 --- a/google/cloud/compute/interconnect_remote_locations/v1/internal/interconnect_remote_locations_tracing_connection.cc +++ b/google/cloud/compute/interconnect_remote_locations/v1/internal/interconnect_remote_locations_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace compute_interconnect_remote_locations_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - InterconnectRemoteLocationsTracingConnection:: InterconnectRemoteLocationsTracingConnection( std::shared_ptr MakeInterconnectRemoteLocationsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/interconnect_remote_locations/v1/internal/interconnect_remote_locations_tracing_connection.h b/google/cloud/compute/interconnect_remote_locations/v1/internal/interconnect_remote_locations_tracing_connection.h index 2ab266ae11ec9..57607a7197416 100644 --- a/google/cloud/compute/interconnect_remote_locations/v1/internal/interconnect_remote_locations_tracing_connection.h +++ b/google/cloud/compute/interconnect_remote_locations/v1/internal/interconnect_remote_locations_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace compute_interconnect_remote_locations_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class InterconnectRemoteLocationsTracingConnection : public compute_interconnect_remote_locations_v1:: InterconnectRemoteLocationsConnection { @@ -60,8 +58,6 @@ class InterconnectRemoteLocationsTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/interconnects/v1/interconnects_connection.h b/google/cloud/compute/interconnects/v1/interconnects_connection.h index c44d90e5b761e..40efe62925122 100644 --- a/google/cloud/compute/interconnects/v1/interconnects_connection.h +++ b/google/cloud/compute/interconnects/v1/interconnects_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECTS_V1_INTERCONNECTS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECTS_V1_INTERCONNECTS_CONNECTION_H +#include "google/cloud/compute/interconnects/v1/interconnects.pb.h" #include "google/cloud/compute/interconnects/v1/interconnects_connection_idempotency_policy.h" #include "google/cloud/compute/interconnects/v1/internal/interconnects_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/interconnects/v1/interconnects_connection_idempotency_policy.h b/google/cloud/compute/interconnects/v1/interconnects_connection_idempotency_policy.h index c7d3f4c72ab6e..d3e4840d0ab33 100644 --- a/google/cloud/compute/interconnects/v1/interconnects_connection_idempotency_policy.h +++ b/google/cloud/compute/interconnects/v1/interconnects_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECTS_V1_INTERCONNECTS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECTS_V1_INTERCONNECTS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/interconnects/v1/interconnects.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/interconnects/v1/interconnects_proto_export.h b/google/cloud/compute/interconnects/v1/interconnects_proto_export.h index 61b2191a97a3a..28d03f527b2ee 100644 --- a/google/cloud/compute/interconnects/v1/interconnects_proto_export.h +++ b/google/cloud/compute/interconnects/v1/interconnects_proto_export.h @@ -26,10 +26,10 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECTS_V1_INTERCONNECTS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_046.pb.h" +#include "google/cloud/compute/v1/internal/common_068.pb.h" +#include "google/cloud/compute/v1/internal/common_072.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECTS_V1_INTERCONNECTS_PROTO_EXPORT_H diff --git a/google/cloud/compute/interconnects/v1/internal/interconnects_option_defaults.cc b/google/cloud/compute/interconnects/v1/internal/interconnects_option_defaults.cc index ed32d336a6ccf..60d6fd0a6582f 100644 --- a/google/cloud/compute/interconnects/v1/internal/interconnects_option_defaults.cc +++ b/google/cloud/compute/interconnects/v1/internal/interconnects_option_defaults.cc @@ -42,7 +42,7 @@ Options InterconnectsDefaultOptions(Options options) { .has()) { options.set( compute_interconnects_v1::InterconnectsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/compute/interconnects/v1/internal/interconnects_rest_connection_impl.h b/google/cloud/compute/interconnects/v1/internal/interconnects_rest_connection_impl.h index af643e271b2fe..a574a560a4c55 100644 --- a/google/cloud/compute/interconnects/v1/internal/interconnects_rest_connection_impl.h +++ b/google/cloud/compute/interconnects/v1/internal/interconnects_rest_connection_impl.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECTS_V1_INTERNAL_INTERCONNECTS_REST_CONNECTION_IMPL_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECTS_V1_INTERNAL_INTERCONNECTS_REST_CONNECTION_IMPL_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/interconnects/v1/interconnects_connection.h" #include "google/cloud/compute/interconnects/v1/interconnects_connection_idempotency_policy.h" #include "google/cloud/compute/interconnects/v1/interconnects_options.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/interconnects/v1/internal/interconnects_rest_logging_decorator.h b/google/cloud/compute/interconnects/v1/internal/interconnects_rest_logging_decorator.h index c18b61ea4cdcf..44e3516b668fc 100644 --- a/google/cloud/compute/interconnects/v1/internal/interconnects_rest_logging_decorator.h +++ b/google/cloud/compute/interconnects/v1/internal/interconnects_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECTS_V1_INTERNAL_INTERCONNECTS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECTS_V1_INTERNAL_INTERCONNECTS_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/interconnects/v1/interconnects.pb.h" #include "google/cloud/compute/interconnects/v1/internal/interconnects_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/interconnects/v1/internal/interconnects_rest_metadata_decorator.cc b/google/cloud/compute/interconnects/v1/internal/interconnects_rest_metadata_decorator.cc index 56e6680589718..909fa3c8561bd 100644 --- a/google/cloud/compute/interconnects/v1/internal/interconnects_rest_metadata_decorator.cc +++ b/google/cloud/compute/interconnects/v1/internal/interconnects_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/interconnects/v1/interconnects.proto #include "google/cloud/compute/interconnects/v1/internal/interconnects_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/interconnects/v1/internal/interconnects_rest_metadata_decorator.h b/google/cloud/compute/interconnects/v1/internal/interconnects_rest_metadata_decorator.h index adda6c50f02e4..a7de627b2c9a6 100644 --- a/google/cloud/compute/interconnects/v1/internal/interconnects_rest_metadata_decorator.h +++ b/google/cloud/compute/interconnects/v1/internal/interconnects_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECTS_V1_INTERNAL_INTERCONNECTS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECTS_V1_INTERNAL_INTERCONNECTS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/interconnects/v1/interconnects.pb.h" #include "google/cloud/compute/interconnects/v1/internal/interconnects_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/interconnects/v1/internal/interconnects_rest_stub.cc b/google/cloud/compute/interconnects/v1/internal/interconnects_rest_stub.cc index 3d6b0f1413334..d7cada1c2b298 100644 --- a/google/cloud/compute/interconnects/v1/internal/interconnects_rest_stub.cc +++ b/google/cloud/compute/interconnects/v1/internal/interconnects_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/interconnects/v1/interconnects.proto #include "google/cloud/compute/interconnects/v1/internal/interconnects_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/interconnects/v1/interconnects.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/interconnects/v1/internal/interconnects_rest_stub.h b/google/cloud/compute/interconnects/v1/internal/interconnects_rest_stub.h index ed4220d6f8a11..faf5f097d5a8d 100644 --- a/google/cloud/compute/interconnects/v1/internal/interconnects_rest_stub.h +++ b/google/cloud/compute/interconnects/v1/internal/interconnects_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECTS_V1_INTERNAL_INTERCONNECTS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_INTERCONNECTS_V1_INTERNAL_INTERCONNECTS_REST_STUB_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/interconnects/v1/interconnects.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/interconnects/v1/internal/interconnects_tracing_connection.cc b/google/cloud/compute/interconnects/v1/internal/interconnects_tracing_connection.cc index 1f2c5796c70c5..3c50451d70899 100644 --- a/google/cloud/compute/interconnects/v1/internal/interconnects_tracing_connection.cc +++ b/google/cloud/compute/interconnects/v1/internal/interconnects_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_interconnects_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - InterconnectsTracingConnection::InterconnectsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -201,16 +199,12 @@ InterconnectsTracingConnection::SetLabels( return internal::EndSpan(std::move(span), child_->SetLabels(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeInterconnectsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/interconnects/v1/internal/interconnects_tracing_connection.h b/google/cloud/compute/interconnects/v1/internal/interconnects_tracing_connection.h index ee092d0361b18..dd28b22768089 100644 --- a/google/cloud/compute/interconnects/v1/internal/interconnects_tracing_connection.h +++ b/google/cloud/compute/interconnects/v1/internal/interconnects_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_interconnects_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class InterconnectsTracingConnection : public compute_interconnects_v1::InterconnectsConnection { public: @@ -109,8 +107,6 @@ class InterconnectsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/license_codes/v1/internal/license_codes_option_defaults.cc b/google/cloud/compute/license_codes/v1/internal/license_codes_option_defaults.cc index d82f73d304838..d62584e28b56b 100644 --- a/google/cloud/compute/license_codes/v1/internal/license_codes_option_defaults.cc +++ b/google/cloud/compute/license_codes/v1/internal/license_codes_option_defaults.cc @@ -41,7 +41,7 @@ Options LicenseCodesDefaultOptions(Options options) { if (!options.has()) { options.set( compute_license_codes_v1::LicenseCodesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/compute/license_codes/v1/internal/license_codes_rest_logging_decorator.h b/google/cloud/compute/license_codes/v1/internal/license_codes_rest_logging_decorator.h index 9928f17eeccd4..1338441af6042 100644 --- a/google/cloud/compute/license_codes/v1/internal/license_codes_rest_logging_decorator.h +++ b/google/cloud/compute/license_codes/v1/internal/license_codes_rest_logging_decorator.h @@ -20,11 +20,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_LICENSE_CODES_V1_INTERNAL_LICENSE_CODES_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/license_codes/v1/internal/license_codes_rest_stub.h" +#include "google/cloud/compute/license_codes/v1/license_codes.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include #include #include #include diff --git a/google/cloud/compute/license_codes/v1/internal/license_codes_rest_metadata_decorator.cc b/google/cloud/compute/license_codes/v1/internal/license_codes_rest_metadata_decorator.cc index 243b2c72216d3..ed0e1c2c1bd01 100644 --- a/google/cloud/compute/license_codes/v1/internal/license_codes_rest_metadata_decorator.cc +++ b/google/cloud/compute/license_codes/v1/internal/license_codes_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/license_codes/v1/license_codes.proto #include "google/cloud/compute/license_codes/v1/internal/license_codes_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/license_codes/v1/internal/license_codes_rest_metadata_decorator.h b/google/cloud/compute/license_codes/v1/internal/license_codes_rest_metadata_decorator.h index 0ee675915c058..774af7f60c9c0 100644 --- a/google/cloud/compute/license_codes/v1/internal/license_codes_rest_metadata_decorator.h +++ b/google/cloud/compute/license_codes/v1/internal/license_codes_rest_metadata_decorator.h @@ -20,10 +20,10 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_LICENSE_CODES_V1_INTERNAL_LICENSE_CODES_REST_METADATA_DECORATOR_H #include "google/cloud/compute/license_codes/v1/internal/license_codes_rest_stub.h" +#include "google/cloud/compute/license_codes/v1/license_codes.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/compute/license_codes/v1/internal/license_codes_rest_stub.cc b/google/cloud/compute/license_codes/v1/internal/license_codes_rest_stub.cc index ac720e511d092..1dfe9b231b9fa 100644 --- a/google/cloud/compute/license_codes/v1/internal/license_codes_rest_stub.cc +++ b/google/cloud/compute/license_codes/v1/internal/license_codes_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/compute/license_codes/v1/license_codes.proto #include "google/cloud/compute/license_codes/v1/internal/license_codes_rest_stub.h" +#include "google/cloud/compute/license_codes/v1/license_codes.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/license_codes/v1/internal/license_codes_rest_stub.h b/google/cloud/compute/license_codes/v1/internal/license_codes_rest_stub.h index 1795166d74bee..3de76502f66d8 100644 --- a/google/cloud/compute/license_codes/v1/internal/license_codes_rest_stub.h +++ b/google/cloud/compute/license_codes/v1/internal/license_codes_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_LICENSE_CODES_V1_INTERNAL_LICENSE_CODES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_LICENSE_CODES_V1_INTERNAL_LICENSE_CODES_REST_STUB_H +#include "google/cloud/compute/license_codes/v1/license_codes.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/license_codes/v1/internal/license_codes_tracing_connection.cc b/google/cloud/compute/license_codes/v1/internal/license_codes_tracing_connection.cc index 7f3d1ea4e7aa3..8d61a0afeb6e7 100644 --- a/google/cloud/compute/license_codes/v1/internal/license_codes_tracing_connection.cc +++ b/google/cloud/compute/license_codes/v1/internal/license_codes_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace compute_license_codes_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - LicenseCodesTracingConnection::LicenseCodesTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -52,16 +50,12 @@ LicenseCodesTracingConnection::TestIamPermissions( return internal::EndSpan(*span, child_->TestIamPermissions(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeLicenseCodesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/license_codes/v1/internal/license_codes_tracing_connection.h b/google/cloud/compute/license_codes/v1/internal/license_codes_tracing_connection.h index 1bf365e7ccbd8..962b1ae73645f 100644 --- a/google/cloud/compute/license_codes/v1/internal/license_codes_tracing_connection.h +++ b/google/cloud/compute/license_codes/v1/internal/license_codes_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_license_codes_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class LicenseCodesTracingConnection : public compute_license_codes_v1::LicenseCodesConnection { public: @@ -52,8 +50,6 @@ class LicenseCodesTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/license_codes/v1/license_codes_connection.h b/google/cloud/compute/license_codes/v1/license_codes_connection.h index 3f3abfc397baf..ad811d4af8318 100644 --- a/google/cloud/compute/license_codes/v1/license_codes_connection.h +++ b/google/cloud/compute/license_codes/v1/license_codes_connection.h @@ -20,13 +20,13 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_LICENSE_CODES_V1_LICENSE_CODES_CONNECTION_H #include "google/cloud/compute/license_codes/v1/internal/license_codes_retry_traits.h" +#include "google/cloud/compute/license_codes/v1/license_codes.pb.h" #include "google/cloud/compute/license_codes/v1/license_codes_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/license_codes/v1/license_codes_connection_idempotency_policy.h b/google/cloud/compute/license_codes/v1/license_codes_connection_idempotency_policy.h index d9d23efc8acbd..9fb95dc04f653 100644 --- a/google/cloud/compute/license_codes/v1/license_codes_connection_idempotency_policy.h +++ b/google/cloud/compute/license_codes/v1/license_codes_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_LICENSE_CODES_V1_LICENSE_CODES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_LICENSE_CODES_V1_LICENSE_CODES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/license_codes/v1/license_codes.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/license_codes/v1/license_codes_proto_export.h b/google/cloud/compute/license_codes/v1/license_codes_proto_export.h index d6add981d1c52..1615730514d13 100644 --- a/google/cloud/compute/license_codes/v1/license_codes_proto_export.h +++ b/google/cloud/compute/license_codes/v1/license_codes_proto_export.h @@ -26,8 +26,8 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_LICENSE_CODES_V1_LICENSE_CODES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include +#include "google/cloud/compute/v1/internal/common_077.pb.h" +#include "google/cloud/compute/v1/internal/common_145.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_LICENSE_CODES_V1_LICENSE_CODES_PROTO_EXPORT_H diff --git a/google/cloud/compute/licenses/v1/internal/licenses_option_defaults.cc b/google/cloud/compute/licenses/v1/internal/licenses_option_defaults.cc index fd474641c775c..b9c85f772d796 100644 --- a/google/cloud/compute/licenses/v1/internal/licenses_option_defaults.cc +++ b/google/cloud/compute/licenses/v1/internal/licenses_option_defaults.cc @@ -41,7 +41,7 @@ Options LicensesDefaultOptions(Options options) { if (!options.has()) { options.set( compute_licenses_v1::LicensesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/compute/licenses/v1/internal/licenses_rest_connection_impl.h b/google/cloud/compute/licenses/v1/internal/licenses_rest_connection_impl.h index 246ee2e79ec34..88bc28b1708e0 100644 --- a/google/cloud/compute/licenses/v1/internal/licenses_rest_connection_impl.h +++ b/google/cloud/compute/licenses/v1/internal/licenses_rest_connection_impl.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_LICENSES_V1_INTERNAL_LICENSES_REST_CONNECTION_IMPL_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_LICENSES_V1_INTERNAL_LICENSES_REST_CONNECTION_IMPL_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/licenses/v1/internal/licenses_rest_stub.h" #include "google/cloud/compute/licenses/v1/internal/licenses_retry_traits.h" #include "google/cloud/compute/licenses/v1/licenses_connection.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/licenses/v1/internal/licenses_rest_logging_decorator.h b/google/cloud/compute/licenses/v1/internal/licenses_rest_logging_decorator.h index 887179762ccc2..501eb7675f7c7 100644 --- a/google/cloud/compute/licenses/v1/internal/licenses_rest_logging_decorator.h +++ b/google/cloud/compute/licenses/v1/internal/licenses_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_LICENSES_V1_INTERNAL_LICENSES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_LICENSES_V1_INTERNAL_LICENSES_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/licenses/v1/internal/licenses_rest_stub.h" +#include "google/cloud/compute/licenses/v1/licenses.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/licenses/v1/internal/licenses_rest_metadata_decorator.cc b/google/cloud/compute/licenses/v1/internal/licenses_rest_metadata_decorator.cc index ca07301cf0288..2e5791d409949 100644 --- a/google/cloud/compute/licenses/v1/internal/licenses_rest_metadata_decorator.cc +++ b/google/cloud/compute/licenses/v1/internal/licenses_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/licenses/v1/licenses.proto #include "google/cloud/compute/licenses/v1/internal/licenses_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/licenses/v1/internal/licenses_rest_metadata_decorator.h b/google/cloud/compute/licenses/v1/internal/licenses_rest_metadata_decorator.h index 5b095a83d65f0..6073f931e32ae 100644 --- a/google/cloud/compute/licenses/v1/internal/licenses_rest_metadata_decorator.h +++ b/google/cloud/compute/licenses/v1/internal/licenses_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_LICENSES_V1_INTERNAL_LICENSES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_LICENSES_V1_INTERNAL_LICENSES_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/licenses/v1/internal/licenses_rest_stub.h" +#include "google/cloud/compute/licenses/v1/licenses.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/licenses/v1/internal/licenses_rest_stub.cc b/google/cloud/compute/licenses/v1/internal/licenses_rest_stub.cc index 6bae346f75e40..3831542ddcaa9 100644 --- a/google/cloud/compute/licenses/v1/internal/licenses_rest_stub.cc +++ b/google/cloud/compute/licenses/v1/internal/licenses_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/licenses/v1/licenses.proto #include "google/cloud/compute/licenses/v1/internal/licenses_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/licenses/v1/licenses.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/licenses/v1/internal/licenses_rest_stub.h b/google/cloud/compute/licenses/v1/internal/licenses_rest_stub.h index 639bce77efcd6..fb150d125282a 100644 --- a/google/cloud/compute/licenses/v1/internal/licenses_rest_stub.h +++ b/google/cloud/compute/licenses/v1/internal/licenses_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_LICENSES_V1_INTERNAL_LICENSES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_LICENSES_V1_INTERNAL_LICENSES_REST_STUB_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/licenses/v1/licenses.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/licenses/v1/internal/licenses_tracing_connection.cc b/google/cloud/compute/licenses/v1/internal/licenses_tracing_connection.cc index 5a3d38c15e0d3..ad25da957fbad 100644 --- a/google/cloud/compute/licenses/v1/internal/licenses_tracing_connection.cc +++ b/google/cloud/compute/licenses/v1/internal/licenses_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_licenses_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - LicensesTracingConnection::LicensesTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -174,16 +172,12 @@ LicensesTracingConnection::UpdateLicense( return internal::EndSpan(std::move(span), child_->UpdateLicense(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeLicensesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/licenses/v1/internal/licenses_tracing_connection.h b/google/cloud/compute/licenses/v1/internal/licenses_tracing_connection.h index 1ae7ae196ca2b..f435b0f284a56 100644 --- a/google/cloud/compute/licenses/v1/internal/licenses_tracing_connection.h +++ b/google/cloud/compute/licenses/v1/internal/licenses_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_licenses_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class LicensesTracingConnection : public compute_licenses_v1::LicensesConnection { public: @@ -100,8 +98,6 @@ class LicensesTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/licenses/v1/licenses_connection.h b/google/cloud/compute/licenses/v1/licenses_connection.h index cb19e814d2fd2..fb99f38f8c5c6 100644 --- a/google/cloud/compute/licenses/v1/licenses_connection.h +++ b/google/cloud/compute/licenses/v1/licenses_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_LICENSES_V1_LICENSES_CONNECTION_H #include "google/cloud/compute/licenses/v1/internal/licenses_retry_traits.h" +#include "google/cloud/compute/licenses/v1/licenses.pb.h" #include "google/cloud/compute/licenses/v1/licenses_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/licenses/v1/licenses_connection_idempotency_policy.h b/google/cloud/compute/licenses/v1/licenses_connection_idempotency_policy.h index 01159edd15bce..4fc9f9058b5f7 100644 --- a/google/cloud/compute/licenses/v1/licenses_connection_idempotency_policy.h +++ b/google/cloud/compute/licenses/v1/licenses_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_LICENSES_V1_LICENSES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_LICENSES_V1_LICENSES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/licenses/v1/licenses.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/licenses/v1/licenses_proto_export.h b/google/cloud/compute/licenses/v1/licenses_proto_export.h index 585fb1b7ecfec..d57c206a4b996 100644 --- a/google/cloud/compute/licenses/v1/licenses_proto_export.h +++ b/google/cloud/compute/licenses/v1/licenses_proto_export.h @@ -26,13 +26,13 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_LICENSES_V1_LICENSES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_007.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_029.pb.h" +#include "google/cloud/compute/v1/internal/common_031.pb.h" +#include "google/cloud/compute/v1/internal/common_047.pb.h" +#include "google/cloud/compute/v1/internal/common_076.pb.h" +#include "google/cloud/compute/v1/internal/common_145.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_LICENSES_V1_LICENSES_PROTO_EXPORT_H diff --git a/google/cloud/compute/machine_images/v1/internal/machine_images_option_defaults.cc b/google/cloud/compute/machine_images/v1/internal/machine_images_option_defaults.cc index 2fb973d9123b8..7c589ede55cb6 100644 --- a/google/cloud/compute/machine_images/v1/internal/machine_images_option_defaults.cc +++ b/google/cloud/compute/machine_images/v1/internal/machine_images_option_defaults.cc @@ -42,7 +42,7 @@ Options MachineImagesDefaultOptions(Options options) { .has()) { options.set( compute_machine_images_v1::MachineImagesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/compute/machine_images/v1/internal/machine_images_rest_connection_impl.h b/google/cloud/compute/machine_images/v1/internal/machine_images_rest_connection_impl.h index 19635db9a9c26..8bcb8c5542792 100644 --- a/google/cloud/compute/machine_images/v1/internal/machine_images_rest_connection_impl.h +++ b/google/cloud/compute/machine_images/v1/internal/machine_images_rest_connection_impl.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_MACHINE_IMAGES_V1_INTERNAL_MACHINE_IMAGES_REST_CONNECTION_IMPL_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_MACHINE_IMAGES_V1_INTERNAL_MACHINE_IMAGES_REST_CONNECTION_IMPL_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/machine_images/v1/internal/machine_images_rest_stub.h" #include "google/cloud/compute/machine_images/v1/internal/machine_images_retry_traits.h" #include "google/cloud/compute/machine_images/v1/machine_images_connection.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/machine_images/v1/internal/machine_images_rest_logging_decorator.h b/google/cloud/compute/machine_images/v1/internal/machine_images_rest_logging_decorator.h index 84faa66928d00..5292f16fa50f7 100644 --- a/google/cloud/compute/machine_images/v1/internal/machine_images_rest_logging_decorator.h +++ b/google/cloud/compute/machine_images/v1/internal/machine_images_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_MACHINE_IMAGES_V1_INTERNAL_MACHINE_IMAGES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_MACHINE_IMAGES_V1_INTERNAL_MACHINE_IMAGES_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/machine_images/v1/internal/machine_images_rest_stub.h" +#include "google/cloud/compute/machine_images/v1/machine_images.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/machine_images/v1/internal/machine_images_rest_metadata_decorator.cc b/google/cloud/compute/machine_images/v1/internal/machine_images_rest_metadata_decorator.cc index f92b9772e3ccc..c48ef3bcf6748 100644 --- a/google/cloud/compute/machine_images/v1/internal/machine_images_rest_metadata_decorator.cc +++ b/google/cloud/compute/machine_images/v1/internal/machine_images_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/machine_images/v1/machine_images.proto #include "google/cloud/compute/machine_images/v1/internal/machine_images_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/machine_images/v1/internal/machine_images_rest_metadata_decorator.h b/google/cloud/compute/machine_images/v1/internal/machine_images_rest_metadata_decorator.h index 3e7443145b7f7..8cfe029e33bf7 100644 --- a/google/cloud/compute/machine_images/v1/internal/machine_images_rest_metadata_decorator.h +++ b/google/cloud/compute/machine_images/v1/internal/machine_images_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_MACHINE_IMAGES_V1_INTERNAL_MACHINE_IMAGES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_MACHINE_IMAGES_V1_INTERNAL_MACHINE_IMAGES_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/machine_images/v1/internal/machine_images_rest_stub.h" +#include "google/cloud/compute/machine_images/v1/machine_images.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/machine_images/v1/internal/machine_images_rest_stub.cc b/google/cloud/compute/machine_images/v1/internal/machine_images_rest_stub.cc index 6eda66033a5ec..5434166efbaae 100644 --- a/google/cloud/compute/machine_images/v1/internal/machine_images_rest_stub.cc +++ b/google/cloud/compute/machine_images/v1/internal/machine_images_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/machine_images/v1/machine_images.proto #include "google/cloud/compute/machine_images/v1/internal/machine_images_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/machine_images/v1/machine_images.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/machine_images/v1/internal/machine_images_rest_stub.h b/google/cloud/compute/machine_images/v1/internal/machine_images_rest_stub.h index 09d988764f7cf..1601362c40dc4 100644 --- a/google/cloud/compute/machine_images/v1/internal/machine_images_rest_stub.h +++ b/google/cloud/compute/machine_images/v1/internal/machine_images_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_MACHINE_IMAGES_V1_INTERNAL_MACHINE_IMAGES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_MACHINE_IMAGES_V1_INTERNAL_MACHINE_IMAGES_REST_STUB_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/machine_images/v1/machine_images.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/machine_images/v1/internal/machine_images_tracing_connection.cc b/google/cloud/compute/machine_images/v1/internal/machine_images_tracing_connection.cc index 3a8d9a816e639..cc4fdbd157f3d 100644 --- a/google/cloud/compute/machine_images/v1/internal/machine_images_tracing_connection.cc +++ b/google/cloud/compute/machine_images/v1/internal/machine_images_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_machine_images_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - MachineImagesTracingConnection::MachineImagesTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -180,16 +178,12 @@ MachineImagesTracingConnection::TestIamPermissions( return internal::EndSpan(*span, child_->TestIamPermissions(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeMachineImagesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/machine_images/v1/internal/machine_images_tracing_connection.h b/google/cloud/compute/machine_images/v1/internal/machine_images_tracing_connection.h index eb7d12ed68a51..cf7afc783af37 100644 --- a/google/cloud/compute/machine_images/v1/internal/machine_images_tracing_connection.h +++ b/google/cloud/compute/machine_images/v1/internal/machine_images_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_machine_images_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class MachineImagesTracingConnection : public compute_machine_images_v1::MachineImagesConnection { public: @@ -101,8 +99,6 @@ class MachineImagesTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/machine_images/v1/machine_images_connection.h b/google/cloud/compute/machine_images/v1/machine_images_connection.h index ed2ec13cfb471..b94e99dcc9b04 100644 --- a/google/cloud/compute/machine_images/v1/machine_images_connection.h +++ b/google/cloud/compute/machine_images/v1/machine_images_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_MACHINE_IMAGES_V1_MACHINE_IMAGES_CONNECTION_H #include "google/cloud/compute/machine_images/v1/internal/machine_images_retry_traits.h" +#include "google/cloud/compute/machine_images/v1/machine_images.pb.h" #include "google/cloud/compute/machine_images/v1/machine_images_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/machine_images/v1/machine_images_connection_idempotency_policy.h b/google/cloud/compute/machine_images/v1/machine_images_connection_idempotency_policy.h index f87edd0a046d9..b24aef23d791b 100644 --- a/google/cloud/compute/machine_images/v1/machine_images_connection_idempotency_policy.h +++ b/google/cloud/compute/machine_images/v1/machine_images_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_MACHINE_IMAGES_V1_MACHINE_IMAGES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_MACHINE_IMAGES_V1_MACHINE_IMAGES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/machine_images/v1/machine_images.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/machine_images/v1/machine_images_proto_export.h b/google/cloud/compute/machine_images/v1/machine_images_proto_export.h index 5c5a4885bebd4..7252eaec96f6b 100644 --- a/google/cloud/compute/machine_images/v1/machine_images_proto_export.h +++ b/google/cloud/compute/machine_images/v1/machine_images_proto_export.h @@ -26,19 +26,19 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_MACHINE_IMAGES_V1_MACHINE_IMAGES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_001.pb.h" +#include "google/cloud/compute/v1/internal/common_003.pb.h" +#include "google/cloud/compute/v1/internal/common_007.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_021.pb.h" +#include "google/cloud/compute/v1/internal/common_029.pb.h" +#include "google/cloud/compute/v1/internal/common_031.pb.h" +#include "google/cloud/compute/v1/internal/common_033.pb.h" +#include "google/cloud/compute/v1/internal/common_046.pb.h" +#include "google/cloud/compute/v1/internal/common_047.pb.h" +#include "google/cloud/compute/v1/internal/common_079.pb.h" +#include "google/cloud/compute/v1/internal/common_081.pb.h" +#include "google/cloud/compute/v1/internal/common_145.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_MACHINE_IMAGES_V1_MACHINE_IMAGES_PROTO_EXPORT_H diff --git a/google/cloud/compute/machine_types/v1/internal/machine_types_option_defaults.cc b/google/cloud/compute/machine_types/v1/internal/machine_types_option_defaults.cc index b933d8fab62d9..bf717d121b177 100644 --- a/google/cloud/compute/machine_types/v1/internal/machine_types_option_defaults.cc +++ b/google/cloud/compute/machine_types/v1/internal/machine_types_option_defaults.cc @@ -41,7 +41,7 @@ Options MachineTypesDefaultOptions(Options options) { if (!options.has()) { options.set( compute_machine_types_v1::MachineTypesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/compute/machine_types/v1/internal/machine_types_rest_logging_decorator.h b/google/cloud/compute/machine_types/v1/internal/machine_types_rest_logging_decorator.h index 4824416d561c1..e66598f8c5005 100644 --- a/google/cloud/compute/machine_types/v1/internal/machine_types_rest_logging_decorator.h +++ b/google/cloud/compute/machine_types/v1/internal/machine_types_rest_logging_decorator.h @@ -20,11 +20,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_MACHINE_TYPES_V1_INTERNAL_MACHINE_TYPES_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/machine_types/v1/internal/machine_types_rest_stub.h" +#include "google/cloud/compute/machine_types/v1/machine_types.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include #include #include #include diff --git a/google/cloud/compute/machine_types/v1/internal/machine_types_rest_metadata_decorator.cc b/google/cloud/compute/machine_types/v1/internal/machine_types_rest_metadata_decorator.cc index 3f6924d4b3774..a629bee92acf2 100644 --- a/google/cloud/compute/machine_types/v1/internal/machine_types_rest_metadata_decorator.cc +++ b/google/cloud/compute/machine_types/v1/internal/machine_types_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/machine_types/v1/machine_types.proto #include "google/cloud/compute/machine_types/v1/internal/machine_types_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/machine_types/v1/internal/machine_types_rest_metadata_decorator.h b/google/cloud/compute/machine_types/v1/internal/machine_types_rest_metadata_decorator.h index 583e332627926..1aa64dcf4a3df 100644 --- a/google/cloud/compute/machine_types/v1/internal/machine_types_rest_metadata_decorator.h +++ b/google/cloud/compute/machine_types/v1/internal/machine_types_rest_metadata_decorator.h @@ -20,10 +20,10 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_MACHINE_TYPES_V1_INTERNAL_MACHINE_TYPES_REST_METADATA_DECORATOR_H #include "google/cloud/compute/machine_types/v1/internal/machine_types_rest_stub.h" +#include "google/cloud/compute/machine_types/v1/machine_types.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/compute/machine_types/v1/internal/machine_types_rest_stub.cc b/google/cloud/compute/machine_types/v1/internal/machine_types_rest_stub.cc index c7b21cd6bffb8..d73c1d85cf0ab 100644 --- a/google/cloud/compute/machine_types/v1/internal/machine_types_rest_stub.cc +++ b/google/cloud/compute/machine_types/v1/internal/machine_types_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/compute/machine_types/v1/machine_types.proto #include "google/cloud/compute/machine_types/v1/internal/machine_types_rest_stub.h" +#include "google/cloud/compute/machine_types/v1/machine_types.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/machine_types/v1/internal/machine_types_rest_stub.h b/google/cloud/compute/machine_types/v1/internal/machine_types_rest_stub.h index 3a96878799ee0..cd0b8f259294e 100644 --- a/google/cloud/compute/machine_types/v1/internal/machine_types_rest_stub.h +++ b/google/cloud/compute/machine_types/v1/internal/machine_types_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_MACHINE_TYPES_V1_INTERNAL_MACHINE_TYPES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_MACHINE_TYPES_V1_INTERNAL_MACHINE_TYPES_REST_STUB_H +#include "google/cloud/compute/machine_types/v1/machine_types.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/machine_types/v1/internal/machine_types_tracing_connection.cc b/google/cloud/compute/machine_types/v1/internal/machine_types_tracing_connection.cc index de7a314ef4b1e..a8e1f2478fa2f 100644 --- a/google/cloud/compute/machine_types/v1/internal/machine_types_tracing_connection.cc +++ b/google/cloud/compute/machine_types/v1/internal/machine_types_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_machine_types_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - MachineTypesTracingConnection::MachineTypesTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -71,16 +69,12 @@ MachineTypesTracingConnection::ListMachineTypes( std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeMachineTypesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/machine_types/v1/internal/machine_types_tracing_connection.h b/google/cloud/compute/machine_types/v1/internal/machine_types_tracing_connection.h index a55388a9328b1..afa620099d820 100644 --- a/google/cloud/compute/machine_types/v1/internal/machine_types_tracing_connection.h +++ b/google/cloud/compute/machine_types/v1/internal/machine_types_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_machine_types_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class MachineTypesTracingConnection : public compute_machine_types_v1::MachineTypesConnection { public: @@ -58,8 +56,6 @@ class MachineTypesTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/machine_types/v1/machine_types_connection.h b/google/cloud/compute/machine_types/v1/machine_types_connection.h index f5f084a6c91b5..69f360dca0079 100644 --- a/google/cloud/compute/machine_types/v1/machine_types_connection.h +++ b/google/cloud/compute/machine_types/v1/machine_types_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_MACHINE_TYPES_V1_MACHINE_TYPES_CONNECTION_H #include "google/cloud/compute/machine_types/v1/internal/machine_types_retry_traits.h" +#include "google/cloud/compute/machine_types/v1/machine_types.pb.h" #include "google/cloud/compute/machine_types/v1/machine_types_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/machine_types/v1/machine_types_connection_idempotency_policy.h b/google/cloud/compute/machine_types/v1/machine_types_connection_idempotency_policy.h index b6325bfdd63b3..9ab63d4632218 100644 --- a/google/cloud/compute/machine_types/v1/machine_types_connection_idempotency_policy.h +++ b/google/cloud/compute/machine_types/v1/machine_types_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_MACHINE_TYPES_V1_MACHINE_TYPES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_MACHINE_TYPES_V1_MACHINE_TYPES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/machine_types/v1/machine_types.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/machine_types/v1/machine_types_proto_export.h b/google/cloud/compute/machine_types/v1/machine_types_proto_export.h index 8aabb7352dd99..38e374ce17ad9 100644 --- a/google/cloud/compute/machine_types/v1/machine_types_proto_export.h +++ b/google/cloud/compute/machine_types/v1/machine_types_proto_export.h @@ -26,8 +26,8 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_MACHINE_TYPES_V1_MACHINE_TYPES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include +#include "google/cloud/compute/v1/internal/common_023.pb.h" +#include "google/cloud/compute/v1/internal/common_080.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_MACHINE_TYPES_V1_MACHINE_TYPES_PROTO_EXPORT_H diff --git a/google/cloud/compute/network_attachments/v1/internal/network_attachments_option_defaults.cc b/google/cloud/compute/network_attachments/v1/internal/network_attachments_option_defaults.cc index 4346b2e0bb308..e91c7c50a71af 100644 --- a/google/cloud/compute/network_attachments/v1/internal/network_attachments_option_defaults.cc +++ b/google/cloud/compute/network_attachments/v1/internal/network_attachments_option_defaults.cc @@ -44,7 +44,7 @@ Options NetworkAttachmentsDefaultOptions(Options options) { options.set< compute_network_attachments_v1::NetworkAttachmentsRetryPolicyOption>( compute_network_attachments_v1:: - NetworkAttachmentsLimitedTimeRetryPolicy(std::chrono::minutes(30)) + NetworkAttachmentsLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/network_attachments/v1/internal/network_attachments_rest_logging_decorator.h b/google/cloud/compute/network_attachments/v1/internal/network_attachments_rest_logging_decorator.h index 34b2c090c4054..6a287f4bbd1d8 100644 --- a/google/cloud/compute/network_attachments/v1/internal/network_attachments_rest_logging_decorator.h +++ b/google/cloud/compute/network_attachments/v1/internal/network_attachments_rest_logging_decorator.h @@ -20,12 +20,12 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_ATTACHMENTS_V1_INTERNAL_NETWORK_ATTACHMENTS_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/network_attachments/v1/internal/network_attachments_rest_stub.h" +#include "google/cloud/compute/network_attachments/v1/network_attachments.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/network_attachments/v1/internal/network_attachments_rest_metadata_decorator.cc b/google/cloud/compute/network_attachments/v1/internal/network_attachments_rest_metadata_decorator.cc index 3d6e713a3a01e..b22166a2af570 100644 --- a/google/cloud/compute/network_attachments/v1/internal/network_attachments_rest_metadata_decorator.cc +++ b/google/cloud/compute/network_attachments/v1/internal/network_attachments_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/network_attachments/v1/network_attachments.proto #include "google/cloud/compute/network_attachments/v1/internal/network_attachments_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/network_attachments/v1/internal/network_attachments_rest_metadata_decorator.h b/google/cloud/compute/network_attachments/v1/internal/network_attachments_rest_metadata_decorator.h index 22eae75654e03..e64b2c46de46d 100644 --- a/google/cloud/compute/network_attachments/v1/internal/network_attachments_rest_metadata_decorator.h +++ b/google/cloud/compute/network_attachments/v1/internal/network_attachments_rest_metadata_decorator.h @@ -20,11 +20,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_ATTACHMENTS_V1_INTERNAL_NETWORK_ATTACHMENTS_REST_METADATA_DECORATOR_H #include "google/cloud/compute/network_attachments/v1/internal/network_attachments_rest_stub.h" +#include "google/cloud/compute/network_attachments/v1/network_attachments.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/network_attachments/v1/internal/network_attachments_rest_stub.cc b/google/cloud/compute/network_attachments/v1/internal/network_attachments_rest_stub.cc index c9128f555ed90..d3f3dbf5ffa55 100644 --- a/google/cloud/compute/network_attachments/v1/internal/network_attachments_rest_stub.cc +++ b/google/cloud/compute/network_attachments/v1/internal/network_attachments_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/network_attachments/v1/network_attachments.proto #include "google/cloud/compute/network_attachments/v1/internal/network_attachments_rest_stub.h" +#include "google/cloud/compute/network_attachments/v1/network_attachments.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/network_attachments/v1/internal/network_attachments_rest_stub.h b/google/cloud/compute/network_attachments/v1/internal/network_attachments_rest_stub.h index deb7afe662acf..f91cf71688e18 100644 --- a/google/cloud/compute/network_attachments/v1/internal/network_attachments_rest_stub.h +++ b/google/cloud/compute/network_attachments/v1/internal/network_attachments_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_ATTACHMENTS_V1_INTERNAL_NETWORK_ATTACHMENTS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_ATTACHMENTS_V1_INTERNAL_NETWORK_ATTACHMENTS_REST_STUB_H +#include "google/cloud/compute/network_attachments/v1/network_attachments.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/network_attachments/v1/internal/network_attachments_tracing_connection.cc b/google/cloud/compute/network_attachments/v1/internal/network_attachments_tracing_connection.cc index 6e1f70f6398e0..8ab7e2777dd66 100644 --- a/google/cloud/compute/network_attachments/v1/internal/network_attachments_tracing_connection.cc +++ b/google/cloud/compute/network_attachments/v1/internal/network_attachments_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_network_attachments_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - NetworkAttachmentsTracingConnection::NetworkAttachmentsTracingConnection( std::shared_ptr< compute_network_attachments_v1::NetworkAttachmentsConnection> @@ -214,19 +212,15 @@ NetworkAttachmentsTracingConnection::TestIamPermissions( return internal::EndSpan(*span, child_->TestIamPermissions(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeNetworkAttachmentsTracingConnection( std::shared_ptr< compute_network_attachments_v1::NetworkAttachmentsConnection> conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/network_attachments/v1/internal/network_attachments_tracing_connection.h b/google/cloud/compute/network_attachments/v1/internal/network_attachments_tracing_connection.h index abc4790d101da..a63676a0d4b0e 100644 --- a/google/cloud/compute/network_attachments/v1/internal/network_attachments_tracing_connection.h +++ b/google/cloud/compute/network_attachments/v1/internal/network_attachments_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_network_attachments_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class NetworkAttachmentsTracingConnection : public compute_network_attachments_v1::NetworkAttachmentsConnection { public: @@ -113,8 +111,6 @@ class NetworkAttachmentsTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/network_attachments/v1/network_attachments_connection.h b/google/cloud/compute/network_attachments/v1/network_attachments_connection.h index bfbe8faf9ad86..92996014a147c 100644 --- a/google/cloud/compute/network_attachments/v1/network_attachments_connection.h +++ b/google/cloud/compute/network_attachments/v1/network_attachments_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_ATTACHMENTS_V1_NETWORK_ATTACHMENTS_CONNECTION_H #include "google/cloud/compute/network_attachments/v1/internal/network_attachments_retry_traits.h" +#include "google/cloud/compute/network_attachments/v1/network_attachments.pb.h" #include "google/cloud/compute/network_attachments/v1/network_attachments_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/network_attachments/v1/network_attachments_connection_idempotency_policy.h b/google/cloud/compute/network_attachments/v1/network_attachments_connection_idempotency_policy.h index 9eb4b1b0674ca..b5d2005935e3f 100644 --- a/google/cloud/compute/network_attachments/v1/network_attachments_connection_idempotency_policy.h +++ b/google/cloud/compute/network_attachments/v1/network_attachments_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_ATTACHMENTS_V1_NETWORK_ATTACHMENTS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_ATTACHMENTS_V1_NETWORK_ATTACHMENTS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/network_attachments/v1/network_attachments.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/network_attachments/v1/network_attachments_proto_export.h b/google/cloud/compute/network_attachments/v1/network_attachments_proto_export.h index 229f09aa8a5a5..e714541e48486 100644 --- a/google/cloud/compute/network_attachments/v1/network_attachments_proto_export.h +++ b/google/cloud/compute/network_attachments/v1/network_attachments_proto_export.h @@ -26,12 +26,12 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_ATTACHMENTS_V1_NETWORK_ATTACHMENTS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_007.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_031.pb.h" +#include "google/cloud/compute/v1/internal/common_084.pb.h" +#include "google/cloud/compute/v1/internal/common_108.pb.h" +#include "google/cloud/compute/v1/internal/common_145.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_ATTACHMENTS_V1_NETWORK_ATTACHMENTS_PROTO_EXPORT_H diff --git a/google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_option_defaults.cc b/google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_option_defaults.cc index ef702a50121ac..48fe58ffb7f5a 100644 --- a/google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_option_defaults.cc +++ b/google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_option_defaults.cc @@ -47,7 +47,7 @@ Options NetworkEdgeSecurityServicesDefaultOptions(Options options) { NetworkEdgeSecurityServicesRetryPolicyOption>( compute_network_edge_security_services_v1:: NetworkEdgeSecurityServicesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_rest_logging_decorator.h b/google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_rest_logging_decorator.h index 870b81a59df33..4d212abe3a20c 100644 --- a/google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_rest_logging_decorator.h +++ b/google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_rest_logging_decorator.h @@ -21,12 +21,12 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_EDGE_SECURITY_SERVICES_V1_INTERNAL_NETWORK_EDGE_SECURITY_SERVICES_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_rest_stub.h" +#include "google/cloud/compute/network_edge_security_services/v1/network_edge_security_services.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_rest_metadata_decorator.cc b/google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_rest_metadata_decorator.cc index faa57b8beddf4..afd5b501d761c 100644 --- a/google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_rest_metadata_decorator.cc +++ b/google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_rest_metadata_decorator.cc @@ -18,10 +18,10 @@ // google/cloud/compute/network_edge_security_services/v1/network_edge_security_services.proto #include "google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_rest_metadata_decorator.h b/google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_rest_metadata_decorator.h index 0fd766bc68ab6..90a1d0d2f2559 100644 --- a/google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_rest_metadata_decorator.h +++ b/google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_rest_metadata_decorator.h @@ -21,11 +21,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_EDGE_SECURITY_SERVICES_V1_INTERNAL_NETWORK_EDGE_SECURITY_SERVICES_REST_METADATA_DECORATOR_H #include "google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_rest_stub.h" +#include "google/cloud/compute/network_edge_security_services/v1/network_edge_security_services.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_rest_stub.cc b/google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_rest_stub.cc index ee9ded0d7ee21..1b2461b46a454 100644 --- a/google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_rest_stub.cc +++ b/google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_rest_stub.cc @@ -18,12 +18,12 @@ // google/cloud/compute/network_edge_security_services/v1/network_edge_security_services.proto #include "google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_rest_stub.h" +#include "google/cloud/compute/network_edge_security_services/v1/network_edge_security_services.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_rest_stub.h b/google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_rest_stub.h index 301c03bf5dcb5..2148f7c056254 100644 --- a/google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_rest_stub.h +++ b/google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_rest_stub.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_EDGE_SECURITY_SERVICES_V1_INTERNAL_NETWORK_EDGE_SECURITY_SERVICES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_EDGE_SECURITY_SERVICES_V1_INTERNAL_NETWORK_EDGE_SECURITY_SERVICES_REST_STUB_H +#include "google/cloud/compute/network_edge_security_services/v1/network_edge_security_services.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_tracing_connection.cc b/google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_tracing_connection.cc index bd24ed487f782..187ea67799607 100644 --- a/google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_tracing_connection.cc +++ b/google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace compute_network_edge_security_services_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - NetworkEdgeSecurityServicesTracingConnection:: NetworkEdgeSecurityServicesTracingConnection( std::shared_ptrPatchNetworkEdgeSecurityService(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeNetworkEdgeSecurityServicesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_tracing_connection.h b/google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_tracing_connection.h index 9dc17abff7e72..0d36794c4712c 100644 --- a/google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_tracing_connection.h +++ b/google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace compute_network_edge_security_services_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class NetworkEdgeSecurityServicesTracingConnection : public compute_network_edge_security_services_v1:: NetworkEdgeSecurityServicesConnection { @@ -106,8 +104,6 @@ class NetworkEdgeSecurityServicesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/network_edge_security_services/v1/network_edge_security_services_connection.h b/google/cloud/compute/network_edge_security_services/v1/network_edge_security_services_connection.h index c7e80a684a434..95504dfcd7f42 100644 --- a/google/cloud/compute/network_edge_security_services/v1/network_edge_security_services_connection.h +++ b/google/cloud/compute/network_edge_security_services/v1/network_edge_security_services_connection.h @@ -21,6 +21,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_EDGE_SECURITY_SERVICES_V1_NETWORK_EDGE_SECURITY_SERVICES_CONNECTION_H #include "google/cloud/compute/network_edge_security_services/v1/internal/network_edge_security_services_retry_traits.h" +#include "google/cloud/compute/network_edge_security_services/v1/network_edge_security_services.pb.h" #include "google/cloud/compute/network_edge_security_services/v1/network_edge_security_services_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -31,7 +32,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/network_edge_security_services/v1/network_edge_security_services_connection_idempotency_policy.h b/google/cloud/compute/network_edge_security_services/v1/network_edge_security_services_connection_idempotency_policy.h index 499c903239fb4..717e9c8119d3c 100644 --- a/google/cloud/compute/network_edge_security_services/v1/network_edge_security_services_connection_idempotency_policy.h +++ b/google/cloud/compute/network_edge_security_services/v1/network_edge_security_services_connection_idempotency_policy.h @@ -20,9 +20,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_EDGE_SECURITY_SERVICES_V1_NETWORK_EDGE_SECURITY_SERVICES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_EDGE_SECURITY_SERVICES_V1_NETWORK_EDGE_SECURITY_SERVICES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/network_edge_security_services/v1/network_edge_security_services.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/network_edge_security_services/v1/network_edge_security_services_proto_export.h b/google/cloud/compute/network_edge_security_services/v1/network_edge_security_services_proto_export.h index 49233af3c687c..3298cb4063517 100644 --- a/google/cloud/compute/network_edge_security_services/v1/network_edge_security_services_proto_export.h +++ b/google/cloud/compute/network_edge_security_services/v1/network_edge_security_services_proto_export.h @@ -26,8 +26,8 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_EDGE_SECURITY_SERVICES_V1_NETWORK_EDGE_SECURITY_SERVICES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_085.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_EDGE_SECURITY_SERVICES_V1_NETWORK_EDGE_SECURITY_SERVICES_PROTO_EXPORT_H diff --git a/google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_option_defaults.cc b/google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_option_defaults.cc index a03b3908ff606..d1ba6a30228ca 100644 --- a/google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_option_defaults.cc +++ b/google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_option_defaults.cc @@ -46,7 +46,7 @@ Options NetworkEndpointGroupsDefaultOptions(Options options) { NetworkEndpointGroupsRetryPolicyOption>( compute_network_endpoint_groups_v1:: NetworkEndpointGroupsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_rest_logging_decorator.h b/google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_rest_logging_decorator.h index a8f0d5f0de4e4..f8f9c9ab84ff3 100644 --- a/google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_rest_logging_decorator.h +++ b/google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_rest_logging_decorator.h @@ -21,12 +21,12 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_ENDPOINT_GROUPS_V1_INTERNAL_NETWORK_ENDPOINT_GROUPS_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_rest_stub.h" +#include "google/cloud/compute/network_endpoint_groups/v1/network_endpoint_groups.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_rest_metadata_decorator.cc b/google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_rest_metadata_decorator.cc index 673659bad8295..796ce0b023a33 100644 --- a/google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_rest_metadata_decorator.cc +++ b/google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_rest_metadata_decorator.cc @@ -18,10 +18,10 @@ // google/cloud/compute/network_endpoint_groups/v1/network_endpoint_groups.proto #include "google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_rest_metadata_decorator.h b/google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_rest_metadata_decorator.h index 164a1b51aa094..48c2d23cf0eb6 100644 --- a/google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_rest_metadata_decorator.h +++ b/google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_rest_metadata_decorator.h @@ -21,11 +21,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_ENDPOINT_GROUPS_V1_INTERNAL_NETWORK_ENDPOINT_GROUPS_REST_METADATA_DECORATOR_H #include "google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_rest_stub.h" +#include "google/cloud/compute/network_endpoint_groups/v1/network_endpoint_groups.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_rest_stub.cc b/google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_rest_stub.cc index 5238d7cc60562..98b67928877ec 100644 --- a/google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_rest_stub.cc +++ b/google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_rest_stub.cc @@ -18,12 +18,12 @@ // google/cloud/compute/network_endpoint_groups/v1/network_endpoint_groups.proto #include "google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_rest_stub.h" +#include "google/cloud/compute/network_endpoint_groups/v1/network_endpoint_groups.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_rest_stub.h b/google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_rest_stub.h index 7a515334a2819..a0d3c3844b97c 100644 --- a/google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_rest_stub.h +++ b/google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_rest_stub.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_ENDPOINT_GROUPS_V1_INTERNAL_NETWORK_ENDPOINT_GROUPS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_ENDPOINT_GROUPS_V1_INTERNAL_NETWORK_ENDPOINT_GROUPS_REST_STUB_H +#include "google/cloud/compute/network_endpoint_groups/v1/network_endpoint_groups.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_tracing_connection.cc b/google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_tracing_connection.cc index a10453c668541..85030f0583f9d 100644 --- a/google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_tracing_connection.cc +++ b/google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace compute_network_endpoint_groups_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - NetworkEndpointGroupsTracingConnection::NetworkEndpointGroupsTracingConnection( std::shared_ptr< compute_network_endpoint_groups_v1::NetworkEndpointGroupsConnection> @@ -243,20 +241,16 @@ NetworkEndpointGroupsTracingConnection::TestIamPermissions( return internal::EndSpan(*span, child_->TestIamPermissions(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr< compute_network_endpoint_groups_v1::NetworkEndpointGroupsConnection> MakeNetworkEndpointGroupsTracingConnection( std::shared_ptr< compute_network_endpoint_groups_v1::NetworkEndpointGroupsConnection> conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_tracing_connection.h b/google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_tracing_connection.h index e3be63652bc00..aad7d49c58a8a 100644 --- a/google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_tracing_connection.h +++ b/google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace compute_network_endpoint_groups_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class NetworkEndpointGroupsTracingConnection : public compute_network_endpoint_groups_v1:: NetworkEndpointGroupsConnection { @@ -130,8 +128,6 @@ class NetworkEndpointGroupsTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/network_endpoint_groups/v1/network_endpoint_groups_connection.h b/google/cloud/compute/network_endpoint_groups/v1/network_endpoint_groups_connection.h index c1d8d612f3d83..a0087a40d2f92 100644 --- a/google/cloud/compute/network_endpoint_groups/v1/network_endpoint_groups_connection.h +++ b/google/cloud/compute/network_endpoint_groups/v1/network_endpoint_groups_connection.h @@ -21,6 +21,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_ENDPOINT_GROUPS_V1_NETWORK_ENDPOINT_GROUPS_CONNECTION_H #include "google/cloud/compute/network_endpoint_groups/v1/internal/network_endpoint_groups_retry_traits.h" +#include "google/cloud/compute/network_endpoint_groups/v1/network_endpoint_groups.pb.h" #include "google/cloud/compute/network_endpoint_groups/v1/network_endpoint_groups_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -31,7 +32,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/network_endpoint_groups/v1/network_endpoint_groups_connection_idempotency_policy.h b/google/cloud/compute/network_endpoint_groups/v1/network_endpoint_groups_connection_idempotency_policy.h index ab4a9ee647882..fc1eb335629ae 100644 --- a/google/cloud/compute/network_endpoint_groups/v1/network_endpoint_groups_connection_idempotency_policy.h +++ b/google/cloud/compute/network_endpoint_groups/v1/network_endpoint_groups_connection_idempotency_policy.h @@ -20,9 +20,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_ENDPOINT_GROUPS_V1_NETWORK_ENDPOINT_GROUPS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_ENDPOINT_GROUPS_V1_NETWORK_ENDPOINT_GROUPS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/network_endpoint_groups/v1/network_endpoint_groups.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/network_endpoint_groups/v1/network_endpoint_groups_proto_export.h b/google/cloud/compute/network_endpoint_groups/v1/network_endpoint_groups_proto_export.h index f9605fe6a1ce8..c878ac3acd9f5 100644 --- a/google/cloud/compute/network_endpoint_groups/v1/network_endpoint_groups_proto_export.h +++ b/google/cloud/compute/network_endpoint_groups/v1/network_endpoint_groups_proto_export.h @@ -26,11 +26,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_ENDPOINT_GROUPS_V1_NETWORK_ENDPOINT_GROUPS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_012.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_049.pb.h" +#include "google/cloud/compute/v1/internal/common_086.pb.h" +#include "google/cloud/compute/v1/internal/common_145.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_ENDPOINT_GROUPS_V1_NETWORK_ENDPOINT_GROUPS_PROTO_EXPORT_H diff --git a/google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_option_defaults.cc b/google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_option_defaults.cc index 2862794e8e8fa..781fa82828f0e 100644 --- a/google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_option_defaults.cc +++ b/google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_option_defaults.cc @@ -46,7 +46,7 @@ Options NetworkFirewallPoliciesDefaultOptions(Options options) { NetworkFirewallPoliciesRetryPolicyOption>( compute_network_firewall_policies_v1:: NetworkFirewallPoliciesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_rest_logging_decorator.h b/google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_rest_logging_decorator.h index b454b919a989a..04fc22cade9fe 100644 --- a/google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_rest_logging_decorator.h +++ b/google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_rest_logging_decorator.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_FIREWALL_POLICIES_V1_INTERNAL_NETWORK_FIREWALL_POLICIES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_FIREWALL_POLICIES_V1_INTERNAL_NETWORK_FIREWALL_POLICIES_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_rest_stub.h" +#include "google/cloud/compute/network_firewall_policies/v1/network_firewall_policies.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_rest_metadata_decorator.cc b/google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_rest_metadata_decorator.cc index 35bb33b516f62..06a028f630d3e 100644 --- a/google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_rest_metadata_decorator.cc +++ b/google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_rest_metadata_decorator.cc @@ -18,10 +18,10 @@ // google/cloud/compute/network_firewall_policies/v1/network_firewall_policies.proto #include "google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_rest_metadata_decorator.h b/google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_rest_metadata_decorator.h index 40b834a44cb0c..99b20572df99c 100644 --- a/google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_rest_metadata_decorator.h +++ b/google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_rest_metadata_decorator.h @@ -20,12 +20,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_FIREWALL_POLICIES_V1_INTERNAL_NETWORK_FIREWALL_POLICIES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_FIREWALL_POLICIES_V1_INTERNAL_NETWORK_FIREWALL_POLICIES_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_rest_stub.h" +#include "google/cloud/compute/network_firewall_policies/v1/network_firewall_policies.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_rest_stub.cc b/google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_rest_stub.cc index 0e12d853ea1ac..64463ab30e197 100644 --- a/google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_rest_stub.cc +++ b/google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_rest_stub.cc @@ -18,12 +18,12 @@ // google/cloud/compute/network_firewall_policies/v1/network_firewall_policies.proto #include "google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/network_firewall_policies/v1/network_firewall_policies.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_rest_stub.h b/google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_rest_stub.h index af253efc22625..9d24c69570e8b 100644 --- a/google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_rest_stub.h +++ b/google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_rest_stub.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_FIREWALL_POLICIES_V1_INTERNAL_NETWORK_FIREWALL_POLICIES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_FIREWALL_POLICIES_V1_INTERNAL_NETWORK_FIREWALL_POLICIES_REST_STUB_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/network_firewall_policies/v1/network_firewall_policies.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_tracing_connection.cc b/google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_tracing_connection.cc index c7a67afd5e305..9168cd9f6c4c6 100644 --- a/google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_tracing_connection.cc +++ b/google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace compute_network_firewall_policies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - NetworkFirewallPoliciesTracingConnection:: NetworkFirewallPoliciesTracingConnection( std::shared_ptrTestIamPermissions(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr< compute_network_firewall_policies_v1::NetworkFirewallPoliciesConnection> MakeNetworkFirewallPoliciesTracingConnection( std::shared_ptr< compute_network_firewall_policies_v1::NetworkFirewallPoliciesConnection> conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_tracing_connection.h b/google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_tracing_connection.h index 30816b042afe9..566eef2bd7757 100644 --- a/google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_tracing_connection.h +++ b/google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace compute_network_firewall_policies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class NetworkFirewallPoliciesTracingConnection : public compute_network_firewall_policies_v1:: NetworkFirewallPoliciesConnection { @@ -236,8 +234,6 @@ class NetworkFirewallPoliciesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/network_firewall_policies/v1/network_firewall_policies_connection.h b/google/cloud/compute/network_firewall_policies/v1/network_firewall_policies_connection.h index 359cdb90ef565..8445b73ff879a 100644 --- a/google/cloud/compute/network_firewall_policies/v1/network_firewall_policies_connection.h +++ b/google/cloud/compute/network_firewall_policies/v1/network_firewall_policies_connection.h @@ -21,6 +21,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_FIREWALL_POLICIES_V1_NETWORK_FIREWALL_POLICIES_CONNECTION_H #include "google/cloud/compute/network_firewall_policies/v1/internal/network_firewall_policies_retry_traits.h" +#include "google/cloud/compute/network_firewall_policies/v1/network_firewall_policies.pb.h" #include "google/cloud/compute/network_firewall_policies/v1/network_firewall_policies_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -31,7 +32,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/network_firewall_policies/v1/network_firewall_policies_connection_idempotency_policy.h b/google/cloud/compute/network_firewall_policies/v1/network_firewall_policies_connection_idempotency_policy.h index 4998b36683a7a..98f62889ec740 100644 --- a/google/cloud/compute/network_firewall_policies/v1/network_firewall_policies_connection_idempotency_policy.h +++ b/google/cloud/compute/network_firewall_policies/v1/network_firewall_policies_connection_idempotency_policy.h @@ -20,9 +20,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_FIREWALL_POLICIES_V1_NETWORK_FIREWALL_POLICIES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_FIREWALL_POLICIES_V1_NETWORK_FIREWALL_POLICIES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/network_firewall_policies/v1/network_firewall_policies.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/network_firewall_policies/v1/network_firewall_policies_proto_export.h b/google/cloud/compute/network_firewall_policies/v1/network_firewall_policies_proto_export.h index 5fa91bc7e2cf6..b79d4dd7d1912 100644 --- a/google/cloud/compute/network_firewall_policies/v1/network_firewall_policies_proto_export.h +++ b/google/cloud/compute/network_firewall_policies/v1/network_firewall_policies_proto_export.h @@ -26,14 +26,14 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_FIREWALL_POLICIES_V1_NETWORK_FIREWALL_POLICIES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_007.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_031.pb.h" +#include "google/cloud/compute/v1/internal/common_037.pb.h" +#include "google/cloud/compute/v1/internal/common_038.pb.h" +#include "google/cloud/compute/v1/internal/common_039.pb.h" +#include "google/cloud/compute/v1/internal/common_047.pb.h" +#include "google/cloud/compute/v1/internal/common_145.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_FIREWALL_POLICIES_V1_NETWORK_FIREWALL_POLICIES_PROTO_EXPORT_H diff --git a/google/cloud/compute/network_profiles/v1/internal/network_profiles_option_defaults.cc b/google/cloud/compute/network_profiles/v1/internal/network_profiles_option_defaults.cc index e1a511682ec65..e8a7ddbe8fd08 100644 --- a/google/cloud/compute/network_profiles/v1/internal/network_profiles_option_defaults.cc +++ b/google/cloud/compute/network_profiles/v1/internal/network_profiles_option_defaults.cc @@ -42,7 +42,7 @@ Options NetworkProfilesDefaultOptions(Options options) { compute_network_profiles_v1::NetworkProfilesRetryPolicyOption>()) { options.set( compute_network_profiles_v1::NetworkProfilesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/compute/network_profiles/v1/internal/network_profiles_rest_logging_decorator.h b/google/cloud/compute/network_profiles/v1/internal/network_profiles_rest_logging_decorator.h index b93923715ce7e..4c836974099f4 100644 --- a/google/cloud/compute/network_profiles/v1/internal/network_profiles_rest_logging_decorator.h +++ b/google/cloud/compute/network_profiles/v1/internal/network_profiles_rest_logging_decorator.h @@ -20,11 +20,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_PROFILES_V1_INTERNAL_NETWORK_PROFILES_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/network_profiles/v1/internal/network_profiles_rest_stub.h" +#include "google/cloud/compute/network_profiles/v1/network_profiles.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include #include #include #include diff --git a/google/cloud/compute/network_profiles/v1/internal/network_profiles_rest_metadata_decorator.cc b/google/cloud/compute/network_profiles/v1/internal/network_profiles_rest_metadata_decorator.cc index 58db3d0360657..3841cb4200ddf 100644 --- a/google/cloud/compute/network_profiles/v1/internal/network_profiles_rest_metadata_decorator.cc +++ b/google/cloud/compute/network_profiles/v1/internal/network_profiles_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/network_profiles/v1/network_profiles.proto #include "google/cloud/compute/network_profiles/v1/internal/network_profiles_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/network_profiles/v1/internal/network_profiles_rest_metadata_decorator.h b/google/cloud/compute/network_profiles/v1/internal/network_profiles_rest_metadata_decorator.h index 9285c050670b2..c6a2aa2c2f5c6 100644 --- a/google/cloud/compute/network_profiles/v1/internal/network_profiles_rest_metadata_decorator.h +++ b/google/cloud/compute/network_profiles/v1/internal/network_profiles_rest_metadata_decorator.h @@ -20,10 +20,10 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_PROFILES_V1_INTERNAL_NETWORK_PROFILES_REST_METADATA_DECORATOR_H #include "google/cloud/compute/network_profiles/v1/internal/network_profiles_rest_stub.h" +#include "google/cloud/compute/network_profiles/v1/network_profiles.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/compute/network_profiles/v1/internal/network_profiles_rest_stub.cc b/google/cloud/compute/network_profiles/v1/internal/network_profiles_rest_stub.cc index 011e7b4777b3d..eaa177086dda1 100644 --- a/google/cloud/compute/network_profiles/v1/internal/network_profiles_rest_stub.cc +++ b/google/cloud/compute/network_profiles/v1/internal/network_profiles_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/compute/network_profiles/v1/network_profiles.proto #include "google/cloud/compute/network_profiles/v1/internal/network_profiles_rest_stub.h" +#include "google/cloud/compute/network_profiles/v1/network_profiles.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/network_profiles/v1/internal/network_profiles_rest_stub.h b/google/cloud/compute/network_profiles/v1/internal/network_profiles_rest_stub.h index df6b26d419042..fcdc08f0ec4de 100644 --- a/google/cloud/compute/network_profiles/v1/internal/network_profiles_rest_stub.h +++ b/google/cloud/compute/network_profiles/v1/internal/network_profiles_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_PROFILES_V1_INTERNAL_NETWORK_PROFILES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_PROFILES_V1_INTERNAL_NETWORK_PROFILES_REST_STUB_H +#include "google/cloud/compute/network_profiles/v1/network_profiles.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/network_profiles/v1/internal/network_profiles_tracing_connection.cc b/google/cloud/compute/network_profiles/v1/internal/network_profiles_tracing_connection.cc index e23181efd22f8..cf6ba11d1226e 100644 --- a/google/cloud/compute/network_profiles/v1/internal/network_profiles_tracing_connection.cc +++ b/google/cloud/compute/network_profiles/v1/internal/network_profiles_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_network_profiles_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - NetworkProfilesTracingConnection::NetworkProfilesTracingConnection( std::shared_ptr child) @@ -59,17 +57,13 @@ NetworkProfilesTracingConnection::ListNetworkProfiles( std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeNetworkProfilesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/network_profiles/v1/internal/network_profiles_tracing_connection.h b/google/cloud/compute/network_profiles/v1/internal/network_profiles_tracing_connection.h index 9897fe5ce1eeb..2e8c86c1286f6 100644 --- a/google/cloud/compute/network_profiles/v1/internal/network_profiles_tracing_connection.h +++ b/google/cloud/compute/network_profiles/v1/internal/network_profiles_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_network_profiles_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class NetworkProfilesTracingConnection : public compute_network_profiles_v1::NetworkProfilesConnection { public: @@ -54,8 +52,6 @@ class NetworkProfilesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/network_profiles/v1/network_profiles_connection.h b/google/cloud/compute/network_profiles/v1/network_profiles_connection.h index 7f9016cab2898..bbc77697b0761 100644 --- a/google/cloud/compute/network_profiles/v1/network_profiles_connection.h +++ b/google/cloud/compute/network_profiles/v1/network_profiles_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_PROFILES_V1_NETWORK_PROFILES_CONNECTION_H #include "google/cloud/compute/network_profiles/v1/internal/network_profiles_retry_traits.h" +#include "google/cloud/compute/network_profiles/v1/network_profiles.pb.h" #include "google/cloud/compute/network_profiles/v1/network_profiles_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/network_profiles/v1/network_profiles_connection_idempotency_policy.h b/google/cloud/compute/network_profiles/v1/network_profiles_connection_idempotency_policy.h index 639378ba3078e..05a7200452ad9 100644 --- a/google/cloud/compute/network_profiles/v1/network_profiles_connection_idempotency_policy.h +++ b/google/cloud/compute/network_profiles/v1/network_profiles_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_PROFILES_V1_NETWORK_PROFILES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_PROFILES_V1_NETWORK_PROFILES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/network_profiles/v1/network_profiles.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/network_profiles/v1/network_profiles_proto_export.h b/google/cloud/compute/network_profiles/v1/network_profiles_proto_export.h index 0f1f511aef7ae..859d60f5ce192 100644 --- a/google/cloud/compute/network_profiles/v1/network_profiles_proto_export.h +++ b/google/cloud/compute/network_profiles/v1/network_profiles_proto_export.h @@ -26,7 +26,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_PROFILES_V1_NETWORK_PROFILES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include +#include "google/cloud/compute/v1/internal/common_087.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORK_PROFILES_V1_NETWORK_PROFILES_PROTO_EXPORT_H diff --git a/google/cloud/compute/networks/v1/internal/networks_option_defaults.cc b/google/cloud/compute/networks/v1/internal/networks_option_defaults.cc index f7818161c8e64..5826e9706af7d 100644 --- a/google/cloud/compute/networks/v1/internal/networks_option_defaults.cc +++ b/google/cloud/compute/networks/v1/internal/networks_option_defaults.cc @@ -41,7 +41,7 @@ Options NetworksDefaultOptions(Options options) { if (!options.has()) { options.set( compute_networks_v1::NetworksLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/compute/networks/v1/internal/networks_rest_connection_impl.h b/google/cloud/compute/networks/v1/internal/networks_rest_connection_impl.h index 736d168656083..f190b4f89410c 100644 --- a/google/cloud/compute/networks/v1/internal/networks_rest_connection_impl.h +++ b/google/cloud/compute/networks/v1/internal/networks_rest_connection_impl.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORKS_V1_INTERNAL_NETWORKS_REST_CONNECTION_IMPL_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORKS_V1_INTERNAL_NETWORKS_REST_CONNECTION_IMPL_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/networks/v1/internal/networks_rest_stub.h" #include "google/cloud/compute/networks/v1/internal/networks_retry_traits.h" #include "google/cloud/compute/networks/v1/networks_connection.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/networks/v1/internal/networks_rest_logging_decorator.h b/google/cloud/compute/networks/v1/internal/networks_rest_logging_decorator.h index e2fa39a8e24ea..534999b6e3172 100644 --- a/google/cloud/compute/networks/v1/internal/networks_rest_logging_decorator.h +++ b/google/cloud/compute/networks/v1/internal/networks_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORKS_V1_INTERNAL_NETWORKS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORKS_V1_INTERNAL_NETWORKS_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/networks/v1/internal/networks_rest_stub.h" +#include "google/cloud/compute/networks/v1/networks.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/networks/v1/internal/networks_rest_metadata_decorator.cc b/google/cloud/compute/networks/v1/internal/networks_rest_metadata_decorator.cc index 2e9a2bc81665b..8716be2a8e979 100644 --- a/google/cloud/compute/networks/v1/internal/networks_rest_metadata_decorator.cc +++ b/google/cloud/compute/networks/v1/internal/networks_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/networks/v1/networks.proto #include "google/cloud/compute/networks/v1/internal/networks_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/networks/v1/internal/networks_rest_metadata_decorator.h b/google/cloud/compute/networks/v1/internal/networks_rest_metadata_decorator.h index 52534abef42d1..1203473a96899 100644 --- a/google/cloud/compute/networks/v1/internal/networks_rest_metadata_decorator.h +++ b/google/cloud/compute/networks/v1/internal/networks_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORKS_V1_INTERNAL_NETWORKS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORKS_V1_INTERNAL_NETWORKS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/networks/v1/internal/networks_rest_stub.h" +#include "google/cloud/compute/networks/v1/networks.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/networks/v1/internal/networks_rest_stub.cc b/google/cloud/compute/networks/v1/internal/networks_rest_stub.cc index 3d30b5bb27e0b..8eb6fae4c43b2 100644 --- a/google/cloud/compute/networks/v1/internal/networks_rest_stub.cc +++ b/google/cloud/compute/networks/v1/internal/networks_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/networks/v1/networks.proto #include "google/cloud/compute/networks/v1/internal/networks_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/networks/v1/networks.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/networks/v1/internal/networks_rest_stub.h b/google/cloud/compute/networks/v1/internal/networks_rest_stub.h index fc9b4ae602cfd..157f26f4f7a18 100644 --- a/google/cloud/compute/networks/v1/internal/networks_rest_stub.h +++ b/google/cloud/compute/networks/v1/internal/networks_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORKS_V1_INTERNAL_NETWORKS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORKS_V1_INTERNAL_NETWORKS_REST_STUB_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/networks/v1/networks.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/networks/v1/internal/networks_tracing_connection.cc b/google/cloud/compute/networks/v1/internal/networks_tracing_connection.cc index 831be36e871fe..38cf287a271ed 100644 --- a/google/cloud/compute/networks/v1/internal/networks_tracing_connection.cc +++ b/google/cloud/compute/networks/v1/internal/networks_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_networks_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - NetworksTracingConnection::NetworksTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -290,16 +288,12 @@ NetworksTracingConnection::UpdatePeering( return internal::EndSpan(std::move(span), child_->UpdatePeering(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeNetworksTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/networks/v1/internal/networks_tracing_connection.h b/google/cloud/compute/networks/v1/internal/networks_tracing_connection.h index b52c96d3857e9..7cea9949404ba 100644 --- a/google/cloud/compute/networks/v1/internal/networks_tracing_connection.h +++ b/google/cloud/compute/networks/v1/internal/networks_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_networks_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class NetworksTracingConnection : public compute_networks_v1::NetworksConnection { public: @@ -147,8 +145,6 @@ class NetworksTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/networks/v1/networks_connection.h b/google/cloud/compute/networks/v1/networks_connection.h index 2ca7221dd06a4..05cb2e06f4deb 100644 --- a/google/cloud/compute/networks/v1/networks_connection.h +++ b/google/cloud/compute/networks/v1/networks_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORKS_V1_NETWORKS_CONNECTION_H #include "google/cloud/compute/networks/v1/internal/networks_retry_traits.h" +#include "google/cloud/compute/networks/v1/networks.pb.h" #include "google/cloud/compute/networks/v1/networks_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/networks/v1/networks_connection_idempotency_policy.h b/google/cloud/compute/networks/v1/networks_connection_idempotency_policy.h index 268938d7c4e14..2700e292ffc3a 100644 --- a/google/cloud/compute/networks/v1/networks_connection_idempotency_policy.h +++ b/google/cloud/compute/networks/v1/networks_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORKS_V1_NETWORKS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORKS_V1_NETWORKS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/networks/v1/networks.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/networks/v1/networks_proto_export.h b/google/cloud/compute/networks/v1/networks_proto_export.h index 76ea555b4b3fa..063a722deecb9 100644 --- a/google/cloud/compute/networks/v1/networks_proto_export.h +++ b/google/cloud/compute/networks/v1/networks_proto_export.h @@ -26,15 +26,15 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORKS_V1_NETWORKS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_007.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_030.pb.h" +#include "google/cloud/compute/v1/internal/common_031.pb.h" +#include "google/cloud/compute/v1/internal/common_034.pb.h" +#include "google/cloud/compute/v1/internal/common_039.pb.h" +#include "google/cloud/compute/v1/internal/common_108.pb.h" +#include "google/cloud/compute/v1/internal/common_132.pb.h" +#include "google/cloud/compute/v1/internal/common_145.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NETWORKS_V1_NETWORKS_PROTO_EXPORT_H diff --git a/google/cloud/compute/node_groups/v1/internal/node_groups_option_defaults.cc b/google/cloud/compute/node_groups/v1/internal/node_groups_option_defaults.cc index a2a72bbcbcf77..eb99aaf96a0ec 100644 --- a/google/cloud/compute/node_groups/v1/internal/node_groups_option_defaults.cc +++ b/google/cloud/compute/node_groups/v1/internal/node_groups_option_defaults.cc @@ -41,7 +41,7 @@ Options NodeGroupsDefaultOptions(Options options) { if (!options.has()) { options.set( compute_node_groups_v1::NodeGroupsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/compute/node_groups/v1/internal/node_groups_rest_connection_impl.h b/google/cloud/compute/node_groups/v1/internal/node_groups_rest_connection_impl.h index b89ee7a89f5b6..49f2c8a7595f1 100644 --- a/google/cloud/compute/node_groups/v1/internal/node_groups_rest_connection_impl.h +++ b/google/cloud/compute/node_groups/v1/internal/node_groups_rest_connection_impl.h @@ -24,13 +24,13 @@ #include "google/cloud/compute/node_groups/v1/node_groups_connection.h" #include "google/cloud/compute/node_groups/v1/node_groups_connection_idempotency_policy.h" #include "google/cloud/compute/node_groups/v1/node_groups_options.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/background_threads.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/node_groups/v1/internal/node_groups_rest_logging_decorator.h b/google/cloud/compute/node_groups/v1/internal/node_groups_rest_logging_decorator.h index 526b443960c4a..848c74dd24bcd 100644 --- a/google/cloud/compute/node_groups/v1/internal/node_groups_rest_logging_decorator.h +++ b/google/cloud/compute/node_groups/v1/internal/node_groups_rest_logging_decorator.h @@ -20,12 +20,12 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NODE_GROUPS_V1_INTERNAL_NODE_GROUPS_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/node_groups/v1/internal/node_groups_rest_stub.h" +#include "google/cloud/compute/node_groups/v1/node_groups.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/node_groups/v1/internal/node_groups_rest_metadata_decorator.cc b/google/cloud/compute/node_groups/v1/internal/node_groups_rest_metadata_decorator.cc index a655a52aabeca..eb6fce2138215 100644 --- a/google/cloud/compute/node_groups/v1/internal/node_groups_rest_metadata_decorator.cc +++ b/google/cloud/compute/node_groups/v1/internal/node_groups_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/node_groups/v1/node_groups.proto #include "google/cloud/compute/node_groups/v1/internal/node_groups_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/node_groups/v1/internal/node_groups_rest_metadata_decorator.h b/google/cloud/compute/node_groups/v1/internal/node_groups_rest_metadata_decorator.h index 6576b07635232..30e0d2508db0d 100644 --- a/google/cloud/compute/node_groups/v1/internal/node_groups_rest_metadata_decorator.h +++ b/google/cloud/compute/node_groups/v1/internal/node_groups_rest_metadata_decorator.h @@ -20,11 +20,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NODE_GROUPS_V1_INTERNAL_NODE_GROUPS_REST_METADATA_DECORATOR_H #include "google/cloud/compute/node_groups/v1/internal/node_groups_rest_stub.h" +#include "google/cloud/compute/node_groups/v1/node_groups.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/node_groups/v1/internal/node_groups_rest_stub.cc b/google/cloud/compute/node_groups/v1/internal/node_groups_rest_stub.cc index c136c1131e899..fbb879457b1d6 100644 --- a/google/cloud/compute/node_groups/v1/internal/node_groups_rest_stub.cc +++ b/google/cloud/compute/node_groups/v1/internal/node_groups_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/node_groups/v1/node_groups.proto #include "google/cloud/compute/node_groups/v1/internal/node_groups_rest_stub.h" +#include "google/cloud/compute/node_groups/v1/node_groups.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/node_groups/v1/internal/node_groups_rest_stub.h b/google/cloud/compute/node_groups/v1/internal/node_groups_rest_stub.h index 83e76d2797efe..2fb884d09738b 100644 --- a/google/cloud/compute/node_groups/v1/internal/node_groups_rest_stub.h +++ b/google/cloud/compute/node_groups/v1/internal/node_groups_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NODE_GROUPS_V1_INTERNAL_NODE_GROUPS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NODE_GROUPS_V1_INTERNAL_NODE_GROUPS_REST_STUB_H +#include "google/cloud/compute/node_groups/v1/node_groups.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/node_groups/v1/internal/node_groups_tracing_connection.cc b/google/cloud/compute/node_groups/v1/internal/node_groups_tracing_connection.cc index fa9314fba5132..8b72ee9081254 100644 --- a/google/cloud/compute/node_groups/v1/internal/node_groups_tracing_connection.cc +++ b/google/cloud/compute/node_groups/v1/internal/node_groups_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_node_groups_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - NodeGroupsTracingConnection::NodeGroupsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -360,16 +358,12 @@ NodeGroupsTracingConnection::TestIamPermissions( return internal::EndSpan(*span, child_->TestIamPermissions(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeNodeGroupsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/node_groups/v1/internal/node_groups_tracing_connection.h b/google/cloud/compute/node_groups/v1/internal/node_groups_tracing_connection.h index 733b81a3ce1e4..a4d17a6c3ac6c 100644 --- a/google/cloud/compute/node_groups/v1/internal/node_groups_tracing_connection.h +++ b/google/cloud/compute/node_groups/v1/internal/node_groups_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_node_groups_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class NodeGroupsTracingConnection : public compute_node_groups_v1::NodeGroupsConnection { public: @@ -168,8 +166,6 @@ class NodeGroupsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/node_groups/v1/node_groups_connection.h b/google/cloud/compute/node_groups/v1/node_groups_connection.h index bd96dfadcfae5..b1fd36020ccd4 100644 --- a/google/cloud/compute/node_groups/v1/node_groups_connection.h +++ b/google/cloud/compute/node_groups/v1/node_groups_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NODE_GROUPS_V1_NODE_GROUPS_CONNECTION_H #include "google/cloud/compute/node_groups/v1/internal/node_groups_retry_traits.h" +#include "google/cloud/compute/node_groups/v1/node_groups.pb.h" #include "google/cloud/compute/node_groups/v1/node_groups_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/node_groups/v1/node_groups_connection_idempotency_policy.h b/google/cloud/compute/node_groups/v1/node_groups_connection_idempotency_policy.h index 4dfd1c6701dcf..f408133e3ca63 100644 --- a/google/cloud/compute/node_groups/v1/node_groups_connection_idempotency_policy.h +++ b/google/cloud/compute/node_groups/v1/node_groups_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NODE_GROUPS_V1_NODE_GROUPS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NODE_GROUPS_V1_NODE_GROUPS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/node_groups/v1/node_groups.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/node_groups/v1/node_groups_proto_export.h b/google/cloud/compute/node_groups/v1/node_groups_proto_export.h index 008ca3dafc63f..0c94514e229d5 100644 --- a/google/cloud/compute/node_groups/v1/node_groups_proto_export.h +++ b/google/cloud/compute/node_groups/v1/node_groups_proto_export.h @@ -26,17 +26,17 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NODE_GROUPS_V1_NODE_GROUPS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_001.pb.h" +#include "google/cloud/compute/v1/internal/common_007.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_029.pb.h" +#include "google/cloud/compute/v1/internal/common_031.pb.h" +#include "google/cloud/compute/v1/internal/common_058.pb.h" +#include "google/cloud/compute/v1/internal/common_078.pb.h" +#include "google/cloud/compute/v1/internal/common_120.pb.h" +#include "google/cloud/compute/v1/internal/common_145.pb.h" +#include "google/cloud/compute/v1/internal/common_146.pb.h" +#include "google/cloud/compute/v1/internal/common_152.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NODE_GROUPS_V1_NODE_GROUPS_PROTO_EXPORT_H diff --git a/google/cloud/compute/node_templates/v1/internal/node_templates_option_defaults.cc b/google/cloud/compute/node_templates/v1/internal/node_templates_option_defaults.cc index a62cf615e53ff..918c6182f0036 100644 --- a/google/cloud/compute/node_templates/v1/internal/node_templates_option_defaults.cc +++ b/google/cloud/compute/node_templates/v1/internal/node_templates_option_defaults.cc @@ -42,7 +42,7 @@ Options NodeTemplatesDefaultOptions(Options options) { .has()) { options.set( compute_node_templates_v1::NodeTemplatesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/compute/node_templates/v1/internal/node_templates_rest_connection_impl.h b/google/cloud/compute/node_templates/v1/internal/node_templates_rest_connection_impl.h index e4513335b9941..a9816dd3e0e8a 100644 --- a/google/cloud/compute/node_templates/v1/internal/node_templates_rest_connection_impl.h +++ b/google/cloud/compute/node_templates/v1/internal/node_templates_rest_connection_impl.h @@ -24,13 +24,13 @@ #include "google/cloud/compute/node_templates/v1/node_templates_connection.h" #include "google/cloud/compute/node_templates/v1/node_templates_connection_idempotency_policy.h" #include "google/cloud/compute/node_templates/v1/node_templates_options.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/background_threads.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/node_templates/v1/internal/node_templates_rest_logging_decorator.h b/google/cloud/compute/node_templates/v1/internal/node_templates_rest_logging_decorator.h index 455742b49a456..500ff71eec501 100644 --- a/google/cloud/compute/node_templates/v1/internal/node_templates_rest_logging_decorator.h +++ b/google/cloud/compute/node_templates/v1/internal/node_templates_rest_logging_decorator.h @@ -20,12 +20,12 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NODE_TEMPLATES_V1_INTERNAL_NODE_TEMPLATES_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/node_templates/v1/internal/node_templates_rest_stub.h" +#include "google/cloud/compute/node_templates/v1/node_templates.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/node_templates/v1/internal/node_templates_rest_metadata_decorator.cc b/google/cloud/compute/node_templates/v1/internal/node_templates_rest_metadata_decorator.cc index a00ddc043c404..4c22ff29e1b4c 100644 --- a/google/cloud/compute/node_templates/v1/internal/node_templates_rest_metadata_decorator.cc +++ b/google/cloud/compute/node_templates/v1/internal/node_templates_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/node_templates/v1/node_templates.proto #include "google/cloud/compute/node_templates/v1/internal/node_templates_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/node_templates/v1/internal/node_templates_rest_metadata_decorator.h b/google/cloud/compute/node_templates/v1/internal/node_templates_rest_metadata_decorator.h index b682d77ed11ab..6a84a61901567 100644 --- a/google/cloud/compute/node_templates/v1/internal/node_templates_rest_metadata_decorator.h +++ b/google/cloud/compute/node_templates/v1/internal/node_templates_rest_metadata_decorator.h @@ -20,11 +20,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NODE_TEMPLATES_V1_INTERNAL_NODE_TEMPLATES_REST_METADATA_DECORATOR_H #include "google/cloud/compute/node_templates/v1/internal/node_templates_rest_stub.h" +#include "google/cloud/compute/node_templates/v1/node_templates.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/node_templates/v1/internal/node_templates_rest_stub.cc b/google/cloud/compute/node_templates/v1/internal/node_templates_rest_stub.cc index ed799987f61b0..4e7bf1d0e79d8 100644 --- a/google/cloud/compute/node_templates/v1/internal/node_templates_rest_stub.cc +++ b/google/cloud/compute/node_templates/v1/internal/node_templates_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/node_templates/v1/node_templates.proto #include "google/cloud/compute/node_templates/v1/internal/node_templates_rest_stub.h" +#include "google/cloud/compute/node_templates/v1/node_templates.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/node_templates/v1/internal/node_templates_rest_stub.h b/google/cloud/compute/node_templates/v1/internal/node_templates_rest_stub.h index d6b66d2568d33..86b062e1b148c 100644 --- a/google/cloud/compute/node_templates/v1/internal/node_templates_rest_stub.h +++ b/google/cloud/compute/node_templates/v1/internal/node_templates_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NODE_TEMPLATES_V1_INTERNAL_NODE_TEMPLATES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NODE_TEMPLATES_V1_INTERNAL_NODE_TEMPLATES_REST_STUB_H +#include "google/cloud/compute/node_templates/v1/node_templates.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/node_templates/v1/internal/node_templates_tracing_connection.cc b/google/cloud/compute/node_templates/v1/internal/node_templates_tracing_connection.cc index c36da22f3066c..53667ebb45e68 100644 --- a/google/cloud/compute/node_templates/v1/internal/node_templates_tracing_connection.cc +++ b/google/cloud/compute/node_templates/v1/internal/node_templates_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_node_templates_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - NodeTemplatesTracingConnection::NodeTemplatesTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -165,16 +163,12 @@ NodeTemplatesTracingConnection::TestIamPermissions( return internal::EndSpan(*span, child_->TestIamPermissions(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeNodeTemplatesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/node_templates/v1/internal/node_templates_tracing_connection.h b/google/cloud/compute/node_templates/v1/internal/node_templates_tracing_connection.h index afb6ab2953149..8e0b0513ab6ab 100644 --- a/google/cloud/compute/node_templates/v1/internal/node_templates_tracing_connection.h +++ b/google/cloud/compute/node_templates/v1/internal/node_templates_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_node_templates_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class NodeTemplatesTracingConnection : public compute_node_templates_v1::NodeTemplatesConnection { public: @@ -95,8 +93,6 @@ class NodeTemplatesTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/node_templates/v1/node_templates_connection.h b/google/cloud/compute/node_templates/v1/node_templates_connection.h index 2b14e2cb3e4a6..a7c462fe60bb8 100644 --- a/google/cloud/compute/node_templates/v1/node_templates_connection.h +++ b/google/cloud/compute/node_templates/v1/node_templates_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NODE_TEMPLATES_V1_NODE_TEMPLATES_CONNECTION_H #include "google/cloud/compute/node_templates/v1/internal/node_templates_retry_traits.h" +#include "google/cloud/compute/node_templates/v1/node_templates.pb.h" #include "google/cloud/compute/node_templates/v1/node_templates_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/node_templates/v1/node_templates_connection_idempotency_policy.h b/google/cloud/compute/node_templates/v1/node_templates_connection_idempotency_policy.h index ef0a7baa3d778..dc3022056b270 100644 --- a/google/cloud/compute/node_templates/v1/node_templates_connection_idempotency_policy.h +++ b/google/cloud/compute/node_templates/v1/node_templates_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NODE_TEMPLATES_V1_NODE_TEMPLATES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NODE_TEMPLATES_V1_NODE_TEMPLATES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/node_templates/v1/node_templates.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/node_templates/v1/node_templates_proto_export.h b/google/cloud/compute/node_templates/v1/node_templates_proto_export.h index 350ea5837eba1..471001ad9c7a3 100644 --- a/google/cloud/compute/node_templates/v1/node_templates_proto_export.h +++ b/google/cloud/compute/node_templates/v1/node_templates_proto_export.h @@ -26,14 +26,14 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NODE_TEMPLATES_V1_NODE_TEMPLATES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_001.pb.h" +#include "google/cloud/compute/v1/internal/common_007.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_031.pb.h" +#include "google/cloud/compute/v1/internal/common_078.pb.h" +#include "google/cloud/compute/v1/internal/common_088.pb.h" +#include "google/cloud/compute/v1/internal/common_108.pb.h" +#include "google/cloud/compute/v1/internal/common_145.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NODE_TEMPLATES_V1_NODE_TEMPLATES_PROTO_EXPORT_H diff --git a/google/cloud/compute/node_types/v1/internal/node_types_option_defaults.cc b/google/cloud/compute/node_types/v1/internal/node_types_option_defaults.cc index 105bbaee15b22..27fb1eaf0dec4 100644 --- a/google/cloud/compute/node_types/v1/internal/node_types_option_defaults.cc +++ b/google/cloud/compute/node_types/v1/internal/node_types_option_defaults.cc @@ -41,7 +41,7 @@ Options NodeTypesDefaultOptions(Options options) { if (!options.has()) { options.set( compute_node_types_v1::NodeTypesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/compute/node_types/v1/internal/node_types_rest_logging_decorator.h b/google/cloud/compute/node_types/v1/internal/node_types_rest_logging_decorator.h index 58ade8ed6cab3..d7cc47b42c33c 100644 --- a/google/cloud/compute/node_types/v1/internal/node_types_rest_logging_decorator.h +++ b/google/cloud/compute/node_types/v1/internal/node_types_rest_logging_decorator.h @@ -20,11 +20,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NODE_TYPES_V1_INTERNAL_NODE_TYPES_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/node_types/v1/internal/node_types_rest_stub.h" +#include "google/cloud/compute/node_types/v1/node_types.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include #include #include #include diff --git a/google/cloud/compute/node_types/v1/internal/node_types_rest_metadata_decorator.cc b/google/cloud/compute/node_types/v1/internal/node_types_rest_metadata_decorator.cc index 3fd7203473f8a..465dc2050d995 100644 --- a/google/cloud/compute/node_types/v1/internal/node_types_rest_metadata_decorator.cc +++ b/google/cloud/compute/node_types/v1/internal/node_types_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/node_types/v1/node_types.proto #include "google/cloud/compute/node_types/v1/internal/node_types_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/node_types/v1/internal/node_types_rest_metadata_decorator.h b/google/cloud/compute/node_types/v1/internal/node_types_rest_metadata_decorator.h index c17744f80c0a4..ec5cf6b0276ba 100644 --- a/google/cloud/compute/node_types/v1/internal/node_types_rest_metadata_decorator.h +++ b/google/cloud/compute/node_types/v1/internal/node_types_rest_metadata_decorator.h @@ -20,10 +20,10 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NODE_TYPES_V1_INTERNAL_NODE_TYPES_REST_METADATA_DECORATOR_H #include "google/cloud/compute/node_types/v1/internal/node_types_rest_stub.h" +#include "google/cloud/compute/node_types/v1/node_types.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/compute/node_types/v1/internal/node_types_rest_stub.cc b/google/cloud/compute/node_types/v1/internal/node_types_rest_stub.cc index 4cd4d68e05383..1b581f3124aef 100644 --- a/google/cloud/compute/node_types/v1/internal/node_types_rest_stub.cc +++ b/google/cloud/compute/node_types/v1/internal/node_types_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/compute/node_types/v1/node_types.proto #include "google/cloud/compute/node_types/v1/internal/node_types_rest_stub.h" +#include "google/cloud/compute/node_types/v1/node_types.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/node_types/v1/internal/node_types_rest_stub.h b/google/cloud/compute/node_types/v1/internal/node_types_rest_stub.h index 6cbd235297a8c..e016a0095e670 100644 --- a/google/cloud/compute/node_types/v1/internal/node_types_rest_stub.h +++ b/google/cloud/compute/node_types/v1/internal/node_types_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NODE_TYPES_V1_INTERNAL_NODE_TYPES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NODE_TYPES_V1_INTERNAL_NODE_TYPES_REST_STUB_H +#include "google/cloud/compute/node_types/v1/node_types.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/node_types/v1/internal/node_types_tracing_connection.cc b/google/cloud/compute/node_types/v1/internal/node_types_tracing_connection.cc index 94e47d85c4ef9..2a880afb46db2 100644 --- a/google/cloud/compute/node_types/v1/internal/node_types_tracing_connection.cc +++ b/google/cloud/compute/node_types/v1/internal/node_types_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_node_types_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - NodeTypesTracingConnection::NodeTypesTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -69,16 +67,12 @@ NodeTypesTracingConnection::ListNodeTypes( std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeNodeTypesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/node_types/v1/internal/node_types_tracing_connection.h b/google/cloud/compute/node_types/v1/internal/node_types_tracing_connection.h index 5ab288d047296..f87fad28d5275 100644 --- a/google/cloud/compute/node_types/v1/internal/node_types_tracing_connection.h +++ b/google/cloud/compute/node_types/v1/internal/node_types_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_node_types_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class NodeTypesTracingConnection : public compute_node_types_v1::NodeTypesConnection { public: @@ -57,8 +55,6 @@ class NodeTypesTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/node_types/v1/node_types_connection.h b/google/cloud/compute/node_types/v1/node_types_connection.h index 14ab64ea4a5e6..a56008f300336 100644 --- a/google/cloud/compute/node_types/v1/node_types_connection.h +++ b/google/cloud/compute/node_types/v1/node_types_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NODE_TYPES_V1_NODE_TYPES_CONNECTION_H #include "google/cloud/compute/node_types/v1/internal/node_types_retry_traits.h" +#include "google/cloud/compute/node_types/v1/node_types.pb.h" #include "google/cloud/compute/node_types/v1/node_types_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/node_types/v1/node_types_connection_idempotency_policy.h b/google/cloud/compute/node_types/v1/node_types_connection_idempotency_policy.h index 3e59700e4e472..d12a64beb7d23 100644 --- a/google/cloud/compute/node_types/v1/node_types_connection_idempotency_policy.h +++ b/google/cloud/compute/node_types/v1/node_types_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NODE_TYPES_V1_NODE_TYPES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NODE_TYPES_V1_NODE_TYPES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/node_types/v1/node_types.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/node_types/v1/node_types_proto_export.h b/google/cloud/compute/node_types/v1/node_types_proto_export.h index a5a001a97d612..879dc6fdf95b8 100644 --- a/google/cloud/compute/node_types/v1/node_types_proto_export.h +++ b/google/cloud/compute/node_types/v1/node_types_proto_export.h @@ -26,8 +26,8 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NODE_TYPES_V1_NODE_TYPES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include +#include "google/cloud/compute/v1/internal/common_023.pb.h" +#include "google/cloud/compute/v1/internal/common_089.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_NODE_TYPES_V1_NODE_TYPES_PROTO_EXPORT_H diff --git a/google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_option_defaults.cc b/google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_option_defaults.cc index fffe167647030..868af41448269 100644 --- a/google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_option_defaults.cc +++ b/google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_option_defaults.cc @@ -43,7 +43,7 @@ Options PacketMirroringsDefaultOptions(Options options) { options.set< compute_packet_mirrorings_v1::PacketMirroringsRetryPolicyOption>( compute_packet_mirrorings_v1::PacketMirroringsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_rest_logging_decorator.h b/google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_rest_logging_decorator.h index 24bbf5eececdd..c2baf4351e7e5 100644 --- a/google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_rest_logging_decorator.h +++ b/google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_rest_logging_decorator.h @@ -20,12 +20,12 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PACKET_MIRRORINGS_V1_INTERNAL_PACKET_MIRRORINGS_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_rest_stub.h" +#include "google/cloud/compute/packet_mirrorings/v1/packet_mirrorings.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_rest_metadata_decorator.cc b/google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_rest_metadata_decorator.cc index fe5c0d5fe3d70..f2bb91fbd6205 100644 --- a/google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_rest_metadata_decorator.cc +++ b/google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/packet_mirrorings/v1/packet_mirrorings.proto #include "google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_rest_metadata_decorator.h b/google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_rest_metadata_decorator.h index 050b3ab2cbe81..ccb6870fd3ec4 100644 --- a/google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_rest_metadata_decorator.h +++ b/google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_rest_metadata_decorator.h @@ -20,11 +20,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PACKET_MIRRORINGS_V1_INTERNAL_PACKET_MIRRORINGS_REST_METADATA_DECORATOR_H #include "google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_rest_stub.h" +#include "google/cloud/compute/packet_mirrorings/v1/packet_mirrorings.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_rest_stub.cc b/google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_rest_stub.cc index 34ce9025b4104..f5c663df2a7f4 100644 --- a/google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_rest_stub.cc +++ b/google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/packet_mirrorings/v1/packet_mirrorings.proto #include "google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_rest_stub.h" +#include "google/cloud/compute/packet_mirrorings/v1/packet_mirrorings.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_rest_stub.h b/google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_rest_stub.h index afb6da36bbb27..fec8188773255 100644 --- a/google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_rest_stub.h +++ b/google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PACKET_MIRRORINGS_V1_INTERNAL_PACKET_MIRRORINGS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PACKET_MIRRORINGS_V1_INTERNAL_PACKET_MIRRORINGS_REST_STUB_H +#include "google/cloud/compute/packet_mirrorings/v1/packet_mirrorings.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_tracing_connection.cc b/google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_tracing_connection.cc index 90a22548f1661..bae1d0ab90686 100644 --- a/google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_tracing_connection.cc +++ b/google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_packet_mirrorings_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PacketMirroringsTracingConnection::PacketMirroringsTracingConnection( std::shared_ptr child) @@ -191,17 +189,13 @@ PacketMirroringsTracingConnection::TestIamPermissions( return internal::EndSpan(*span, child_->TestIamPermissions(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePacketMirroringsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_tracing_connection.h b/google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_tracing_connection.h index d6445efa2bc1e..750c7bc7754d2 100644 --- a/google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_tracing_connection.h +++ b/google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_packet_mirrorings_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PacketMirroringsTracingConnection : public compute_packet_mirrorings_v1::PacketMirroringsConnection { public: @@ -102,8 +100,6 @@ class PacketMirroringsTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/packet_mirrorings/v1/packet_mirrorings_connection.h b/google/cloud/compute/packet_mirrorings/v1/packet_mirrorings_connection.h index 0041f8dbd403e..a4f3e8d5f6d9f 100644 --- a/google/cloud/compute/packet_mirrorings/v1/packet_mirrorings_connection.h +++ b/google/cloud/compute/packet_mirrorings/v1/packet_mirrorings_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PACKET_MIRRORINGS_V1_PACKET_MIRRORINGS_CONNECTION_H #include "google/cloud/compute/packet_mirrorings/v1/internal/packet_mirrorings_retry_traits.h" +#include "google/cloud/compute/packet_mirrorings/v1/packet_mirrorings.pb.h" #include "google/cloud/compute/packet_mirrorings/v1/packet_mirrorings_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/packet_mirrorings/v1/packet_mirrorings_connection_idempotency_policy.h b/google/cloud/compute/packet_mirrorings/v1/packet_mirrorings_connection_idempotency_policy.h index a1bc82484b6ca..891cf58f65e35 100644 --- a/google/cloud/compute/packet_mirrorings/v1/packet_mirrorings_connection_idempotency_policy.h +++ b/google/cloud/compute/packet_mirrorings/v1/packet_mirrorings_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PACKET_MIRRORINGS_V1_PACKET_MIRRORINGS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PACKET_MIRRORINGS_V1_PACKET_MIRRORINGS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/packet_mirrorings/v1/packet_mirrorings.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/packet_mirrorings/v1/packet_mirrorings_proto_export.h b/google/cloud/compute/packet_mirrorings/v1/packet_mirrorings_proto_export.h index 74ef9b7e7dbdc..f410b79d44368 100644 --- a/google/cloud/compute/packet_mirrorings/v1/packet_mirrorings_proto_export.h +++ b/google/cloud/compute/packet_mirrorings/v1/packet_mirrorings_proto_export.h @@ -26,9 +26,9 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PACKET_MIRRORINGS_V1_PACKET_MIRRORINGS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_093.pb.h" +#include "google/cloud/compute/v1/internal/common_145.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PACKET_MIRRORINGS_V1_PACKET_MIRRORINGS_PROTO_EXPORT_H diff --git a/google/cloud/compute/projects/v1/internal/projects_option_defaults.cc b/google/cloud/compute/projects/v1/internal/projects_option_defaults.cc index e311542d1aa91..d17c6e04c7ea1 100644 --- a/google/cloud/compute/projects/v1/internal/projects_option_defaults.cc +++ b/google/cloud/compute/projects/v1/internal/projects_option_defaults.cc @@ -41,7 +41,7 @@ Options ProjectsDefaultOptions(Options options) { if (!options.has()) { options.set( compute_projects_v1::ProjectsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/compute/projects/v1/internal/projects_rest_connection_impl.h b/google/cloud/compute/projects/v1/internal/projects_rest_connection_impl.h index ed342d604d33b..75843d1488026 100644 --- a/google/cloud/compute/projects/v1/internal/projects_rest_connection_impl.h +++ b/google/cloud/compute/projects/v1/internal/projects_rest_connection_impl.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PROJECTS_V1_INTERNAL_PROJECTS_REST_CONNECTION_IMPL_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PROJECTS_V1_INTERNAL_PROJECTS_REST_CONNECTION_IMPL_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/projects/v1/internal/projects_rest_stub.h" #include "google/cloud/compute/projects/v1/internal/projects_retry_traits.h" #include "google/cloud/compute/projects/v1/projects_connection.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/projects/v1/internal/projects_rest_logging_decorator.h b/google/cloud/compute/projects/v1/internal/projects_rest_logging_decorator.h index 2f9576b93a57c..724cc4f058d0d 100644 --- a/google/cloud/compute/projects/v1/internal/projects_rest_logging_decorator.h +++ b/google/cloud/compute/projects/v1/internal/projects_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PROJECTS_V1_INTERNAL_PROJECTS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PROJECTS_V1_INTERNAL_PROJECTS_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/projects/v1/internal/projects_rest_stub.h" +#include "google/cloud/compute/projects/v1/projects.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/projects/v1/internal/projects_rest_metadata_decorator.cc b/google/cloud/compute/projects/v1/internal/projects_rest_metadata_decorator.cc index a38bc80cb1ab0..c225aa412834f 100644 --- a/google/cloud/compute/projects/v1/internal/projects_rest_metadata_decorator.cc +++ b/google/cloud/compute/projects/v1/internal/projects_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/projects/v1/projects.proto #include "google/cloud/compute/projects/v1/internal/projects_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/projects/v1/internal/projects_rest_metadata_decorator.h b/google/cloud/compute/projects/v1/internal/projects_rest_metadata_decorator.h index c8da3ccc8ecf9..0823e2e8aba1d 100644 --- a/google/cloud/compute/projects/v1/internal/projects_rest_metadata_decorator.h +++ b/google/cloud/compute/projects/v1/internal/projects_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PROJECTS_V1_INTERNAL_PROJECTS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PROJECTS_V1_INTERNAL_PROJECTS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/projects/v1/internal/projects_rest_stub.h" +#include "google/cloud/compute/projects/v1/projects.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/projects/v1/internal/projects_rest_stub.cc b/google/cloud/compute/projects/v1/internal/projects_rest_stub.cc index eef501c19ca98..f489315b3bc0f 100644 --- a/google/cloud/compute/projects/v1/internal/projects_rest_stub.cc +++ b/google/cloud/compute/projects/v1/internal/projects_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/projects/v1/projects.proto #include "google/cloud/compute/projects/v1/internal/projects_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/projects/v1/projects.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/projects/v1/internal/projects_rest_stub.h b/google/cloud/compute/projects/v1/internal/projects_rest_stub.h index e36ffe88a623d..302dcc76faf40 100644 --- a/google/cloud/compute/projects/v1/internal/projects_rest_stub.h +++ b/google/cloud/compute/projects/v1/internal/projects_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PROJECTS_V1_INTERNAL_PROJECTS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PROJECTS_V1_INTERNAL_PROJECTS_REST_STUB_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/projects/v1/projects.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/projects/v1/internal/projects_tracing_connection.cc b/google/cloud/compute/projects/v1/internal/projects_tracing_connection.cc index 1e64392ec75da..38012163162be 100644 --- a/google/cloud/compute/projects/v1/internal/projects_tracing_connection.cc +++ b/google/cloud/compute/projects/v1/internal/projects_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_projects_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ProjectsTracingConnection::ProjectsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -386,16 +384,12 @@ ProjectsTracingConnection::SetUsageExportBucket( child_->SetUsageExportBucket(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeProjectsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/projects/v1/internal/projects_tracing_connection.h b/google/cloud/compute/projects/v1/internal/projects_tracing_connection.h index 173bd0a1ebf8b..a1f28e7714cde 100644 --- a/google/cloud/compute/projects/v1/internal/projects_tracing_connection.h +++ b/google/cloud/compute/projects/v1/internal/projects_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_projects_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ProjectsTracingConnection : public compute_projects_v1::ProjectsConnection { public: @@ -188,8 +186,6 @@ class ProjectsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/projects/v1/projects_connection.h b/google/cloud/compute/projects/v1/projects_connection.h index cc2d4af46f782..32151d0ccae5a 100644 --- a/google/cloud/compute/projects/v1/projects_connection.h +++ b/google/cloud/compute/projects/v1/projects_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PROJECTS_V1_PROJECTS_CONNECTION_H #include "google/cloud/compute/projects/v1/internal/projects_retry_traits.h" +#include "google/cloud/compute/projects/v1/projects.pb.h" #include "google/cloud/compute/projects/v1/projects_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/projects/v1/projects_connection_idempotency_policy.h b/google/cloud/compute/projects/v1/projects_connection_idempotency_policy.h index 37ca40331527e..4f49566616f14 100644 --- a/google/cloud/compute/projects/v1/projects_connection_idempotency_policy.h +++ b/google/cloud/compute/projects/v1/projects_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PROJECTS_V1_PROJECTS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PROJECTS_V1_PROJECTS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/projects/v1/projects.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/projects/v1/projects_proto_export.h b/google/cloud/compute/projects/v1/projects_proto_export.h index 42cfbf7f2f195..81463ab7e1eb1 100644 --- a/google/cloud/compute/projects/v1/projects_proto_export.h +++ b/google/cloud/compute/projects/v1/projects_proto_export.h @@ -26,10 +26,10 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PROJECTS_V1_PROJECTS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_025.pb.h" +#include "google/cloud/compute/v1/internal/common_081.pb.h" +#include "google/cloud/compute/v1/internal/common_098.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PROJECTS_V1_PROJECTS_PROTO_EXPORT_H diff --git a/google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_option_defaults.cc b/google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_option_defaults.cc index baeddbbab2723..2197338416d2d 100644 --- a/google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_option_defaults.cc +++ b/google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_option_defaults.cc @@ -47,7 +47,7 @@ Options PublicAdvertisedPrefixesDefaultOptions(Options options) { PublicAdvertisedPrefixesRetryPolicyOption>( compute_public_advertised_prefixes_v1:: PublicAdvertisedPrefixesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_rest_logging_decorator.h b/google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_rest_logging_decorator.h index e03ff20c62973..8e939439a649f 100644 --- a/google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_rest_logging_decorator.h +++ b/google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_rest_logging_decorator.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PUBLIC_ADVERTISED_PREFIXES_V1_INTERNAL_PUBLIC_ADVERTISED_PREFIXES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PUBLIC_ADVERTISED_PREFIXES_V1_INTERNAL_PUBLIC_ADVERTISED_PREFIXES_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_rest_stub.h" +#include "google/cloud/compute/public_advertised_prefixes/v1/public_advertised_prefixes.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_rest_metadata_decorator.cc b/google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_rest_metadata_decorator.cc index 25d979e840302..5450951fe5f68 100644 --- a/google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_rest_metadata_decorator.cc +++ b/google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_rest_metadata_decorator.cc @@ -18,10 +18,10 @@ // google/cloud/compute/public_advertised_prefixes/v1/public_advertised_prefixes.proto #include "google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_rest_metadata_decorator.h b/google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_rest_metadata_decorator.h index b6941163d377f..2451f6f976f61 100644 --- a/google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_rest_metadata_decorator.h +++ b/google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_rest_metadata_decorator.h @@ -20,12 +20,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PUBLIC_ADVERTISED_PREFIXES_V1_INTERNAL_PUBLIC_ADVERTISED_PREFIXES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PUBLIC_ADVERTISED_PREFIXES_V1_INTERNAL_PUBLIC_ADVERTISED_PREFIXES_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_rest_stub.h" +#include "google/cloud/compute/public_advertised_prefixes/v1/public_advertised_prefixes.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_rest_stub.cc b/google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_rest_stub.cc index a9ef3f3603ad3..50e370a8acde4 100644 --- a/google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_rest_stub.cc +++ b/google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_rest_stub.cc @@ -18,12 +18,12 @@ // google/cloud/compute/public_advertised_prefixes/v1/public_advertised_prefixes.proto #include "google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/public_advertised_prefixes/v1/public_advertised_prefixes.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_rest_stub.h b/google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_rest_stub.h index ea67b3c71de17..f3b80db3528fd 100644 --- a/google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_rest_stub.h +++ b/google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_rest_stub.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PUBLIC_ADVERTISED_PREFIXES_V1_INTERNAL_PUBLIC_ADVERTISED_PREFIXES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PUBLIC_ADVERTISED_PREFIXES_V1_INTERNAL_PUBLIC_ADVERTISED_PREFIXES_REST_STUB_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/public_advertised_prefixes/v1/public_advertised_prefixes.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_tracing_connection.cc b/google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_tracing_connection.cc index 1fafdc1b25abd..8014b865c5da6 100644 --- a/google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_tracing_connection.cc +++ b/google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace compute_public_advertised_prefixes_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PublicAdvertisedPrefixesTracingConnection:: PublicAdvertisedPrefixesTracingConnection( std::shared_ptrWithdraw(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr< compute_public_advertised_prefixes_v1::PublicAdvertisedPrefixesConnection> MakePublicAdvertisedPrefixesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_tracing_connection.h b/google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_tracing_connection.h index 783b15a01dd2c..e4a5b44a03081 100644 --- a/google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_tracing_connection.h +++ b/google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace compute_public_advertised_prefixes_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PublicAdvertisedPrefixesTracingConnection : public compute_public_advertised_prefixes_v1:: PublicAdvertisedPrefixesConnection { @@ -127,8 +125,6 @@ class PublicAdvertisedPrefixesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/public_advertised_prefixes/v1/public_advertised_prefixes_connection.h b/google/cloud/compute/public_advertised_prefixes/v1/public_advertised_prefixes_connection.h index c1938963f04a6..b474194f209ec 100644 --- a/google/cloud/compute/public_advertised_prefixes/v1/public_advertised_prefixes_connection.h +++ b/google/cloud/compute/public_advertised_prefixes/v1/public_advertised_prefixes_connection.h @@ -21,6 +21,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PUBLIC_ADVERTISED_PREFIXES_V1_PUBLIC_ADVERTISED_PREFIXES_CONNECTION_H #include "google/cloud/compute/public_advertised_prefixes/v1/internal/public_advertised_prefixes_retry_traits.h" +#include "google/cloud/compute/public_advertised_prefixes/v1/public_advertised_prefixes.pb.h" #include "google/cloud/compute/public_advertised_prefixes/v1/public_advertised_prefixes_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -31,7 +32,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/public_advertised_prefixes/v1/public_advertised_prefixes_connection_idempotency_policy.h b/google/cloud/compute/public_advertised_prefixes/v1/public_advertised_prefixes_connection_idempotency_policy.h index 79b101d5f144b..b97c2fb7e3739 100644 --- a/google/cloud/compute/public_advertised_prefixes/v1/public_advertised_prefixes_connection_idempotency_policy.h +++ b/google/cloud/compute/public_advertised_prefixes/v1/public_advertised_prefixes_connection_idempotency_policy.h @@ -20,9 +20,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PUBLIC_ADVERTISED_PREFIXES_V1_PUBLIC_ADVERTISED_PREFIXES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PUBLIC_ADVERTISED_PREFIXES_V1_PUBLIC_ADVERTISED_PREFIXES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/public_advertised_prefixes/v1/public_advertised_prefixes.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/public_advertised_prefixes/v1/public_advertised_prefixes_proto_export.h b/google/cloud/compute/public_advertised_prefixes/v1/public_advertised_prefixes_proto_export.h index 473df486bf6bf..263f7641c7568 100644 --- a/google/cloud/compute/public_advertised_prefixes/v1/public_advertised_prefixes_proto_export.h +++ b/google/cloud/compute/public_advertised_prefixes/v1/public_advertised_prefixes_proto_export.h @@ -26,8 +26,8 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PUBLIC_ADVERTISED_PREFIXES_V1_PUBLIC_ADVERTISED_PREFIXES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_095.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PUBLIC_ADVERTISED_PREFIXES_V1_PUBLIC_ADVERTISED_PREFIXES_PROTO_EXPORT_H diff --git a/google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_option_defaults.cc b/google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_option_defaults.cc index 4dad9af04002f..7af196ad259e7 100644 --- a/google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_option_defaults.cc +++ b/google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_option_defaults.cc @@ -46,7 +46,7 @@ Options PublicDelegatedPrefixesDefaultOptions(Options options) { PublicDelegatedPrefixesRetryPolicyOption>( compute_public_delegated_prefixes_v1:: PublicDelegatedPrefixesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_rest_logging_decorator.h b/google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_rest_logging_decorator.h index cf8c4dd574859..7ad6b5ec41613 100644 --- a/google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_rest_logging_decorator.h +++ b/google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_rest_logging_decorator.h @@ -21,12 +21,12 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PUBLIC_DELEGATED_PREFIXES_V1_INTERNAL_PUBLIC_DELEGATED_PREFIXES_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_rest_stub.h" +#include "google/cloud/compute/public_delegated_prefixes/v1/public_delegated_prefixes.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_rest_metadata_decorator.cc b/google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_rest_metadata_decorator.cc index ac0ef4bec2564..f5709a3685ed3 100644 --- a/google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_rest_metadata_decorator.cc +++ b/google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_rest_metadata_decorator.cc @@ -18,10 +18,10 @@ // google/cloud/compute/public_delegated_prefixes/v1/public_delegated_prefixes.proto #include "google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_rest_metadata_decorator.h b/google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_rest_metadata_decorator.h index 0668de27a218f..6e774cedbc0aa 100644 --- a/google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_rest_metadata_decorator.h +++ b/google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_rest_metadata_decorator.h @@ -21,11 +21,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PUBLIC_DELEGATED_PREFIXES_V1_INTERNAL_PUBLIC_DELEGATED_PREFIXES_REST_METADATA_DECORATOR_H #include "google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_rest_stub.h" +#include "google/cloud/compute/public_delegated_prefixes/v1/public_delegated_prefixes.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_rest_stub.cc b/google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_rest_stub.cc index 063281250bd09..a71b60e10fff1 100644 --- a/google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_rest_stub.cc +++ b/google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_rest_stub.cc @@ -18,12 +18,12 @@ // google/cloud/compute/public_delegated_prefixes/v1/public_delegated_prefixes.proto #include "google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_rest_stub.h" +#include "google/cloud/compute/public_delegated_prefixes/v1/public_delegated_prefixes.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_rest_stub.h b/google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_rest_stub.h index 6b53180eb35ca..1fbb7d4899b63 100644 --- a/google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_rest_stub.h +++ b/google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_rest_stub.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PUBLIC_DELEGATED_PREFIXES_V1_INTERNAL_PUBLIC_DELEGATED_PREFIXES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PUBLIC_DELEGATED_PREFIXES_V1_INTERNAL_PUBLIC_DELEGATED_PREFIXES_REST_STUB_H +#include "google/cloud/compute/public_delegated_prefixes/v1/public_delegated_prefixes.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_tracing_connection.cc b/google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_tracing_connection.cc index e823e2c85b419..0409a253473ea 100644 --- a/google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_tracing_connection.cc +++ b/google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace compute_public_delegated_prefixes_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PublicDelegatedPrefixesTracingConnection:: PublicDelegatedPrefixesTracingConnection( std::shared_ptrWithdraw(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr< compute_public_delegated_prefixes_v1::PublicDelegatedPrefixesConnection> MakePublicDelegatedPrefixesTracingConnection( std::shared_ptr< compute_public_delegated_prefixes_v1::PublicDelegatedPrefixesConnection> conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_tracing_connection.h b/google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_tracing_connection.h index a398200147c90..d9f9f53d416be 100644 --- a/google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_tracing_connection.h +++ b/google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace compute_public_delegated_prefixes_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PublicDelegatedPrefixesTracingConnection : public compute_public_delegated_prefixes_v1:: PublicDelegatedPrefixesConnection { @@ -133,8 +131,6 @@ class PublicDelegatedPrefixesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/public_delegated_prefixes/v1/public_delegated_prefixes_connection.h b/google/cloud/compute/public_delegated_prefixes/v1/public_delegated_prefixes_connection.h index da9cf94ae63fb..b91a5b2ca9834 100644 --- a/google/cloud/compute/public_delegated_prefixes/v1/public_delegated_prefixes_connection.h +++ b/google/cloud/compute/public_delegated_prefixes/v1/public_delegated_prefixes_connection.h @@ -21,6 +21,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PUBLIC_DELEGATED_PREFIXES_V1_PUBLIC_DELEGATED_PREFIXES_CONNECTION_H #include "google/cloud/compute/public_delegated_prefixes/v1/internal/public_delegated_prefixes_retry_traits.h" +#include "google/cloud/compute/public_delegated_prefixes/v1/public_delegated_prefixes.pb.h" #include "google/cloud/compute/public_delegated_prefixes/v1/public_delegated_prefixes_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -31,7 +32,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/public_delegated_prefixes/v1/public_delegated_prefixes_connection_idempotency_policy.h b/google/cloud/compute/public_delegated_prefixes/v1/public_delegated_prefixes_connection_idempotency_policy.h index 81d4c06e793e2..625595b30da49 100644 --- a/google/cloud/compute/public_delegated_prefixes/v1/public_delegated_prefixes_connection_idempotency_policy.h +++ b/google/cloud/compute/public_delegated_prefixes/v1/public_delegated_prefixes_connection_idempotency_policy.h @@ -20,9 +20,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PUBLIC_DELEGATED_PREFIXES_V1_PUBLIC_DELEGATED_PREFIXES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PUBLIC_DELEGATED_PREFIXES_V1_PUBLIC_DELEGATED_PREFIXES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/public_delegated_prefixes/v1/public_delegated_prefixes.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/public_delegated_prefixes/v1/public_delegated_prefixes_proto_export.h b/google/cloud/compute/public_delegated_prefixes/v1/public_delegated_prefixes_proto_export.h index 2233ade939dbf..e372bd05444bf 100644 --- a/google/cloud/compute/public_delegated_prefixes/v1/public_delegated_prefixes_proto_export.h +++ b/google/cloud/compute/public_delegated_prefixes/v1/public_delegated_prefixes_proto_export.h @@ -26,9 +26,9 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PUBLIC_DELEGATED_PREFIXES_V1_PUBLIC_DELEGATED_PREFIXES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_096.pb.h" +#include "google/cloud/compute/v1/internal/common_097.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_PUBLIC_DELEGATED_PREFIXES_V1_PUBLIC_DELEGATED_PREFIXES_PROTO_EXPORT_H diff --git a/google/cloud/compute/quickstart/.bazelrc b/google/cloud/compute/quickstart/.bazelrc index 6777c6b4c95de..ec27511a60add 100644 --- a/google/cloud/compute/quickstart/.bazelrc +++ b/google/cloud/compute/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/compute/quickstart/CMakeLists.txt b/google/cloud/compute/quickstart/CMakeLists.txt index f8ac077644adb..6eb7e6fd45d24 100644 --- a/google/cloud/compute/quickstart/CMakeLists.txt +++ b/google/cloud/compute/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Compute Engine API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-compute-quickstart CXX) find_package(google_cloud_cpp_compute REQUIRED) diff --git a/google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_option_defaults.cc b/google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_option_defaults.cc index 8c0ca79576d35..0d0a1f30fd88f 100644 --- a/google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_option_defaults.cc +++ b/google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_option_defaults.cc @@ -44,7 +44,7 @@ Options RegionAutoscalersDefaultOptions(Options options) { options.set< compute_region_autoscalers_v1::RegionAutoscalersRetryPolicyOption>( compute_region_autoscalers_v1::RegionAutoscalersLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_rest_logging_decorator.h b/google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_rest_logging_decorator.h index aafbb719fe5a0..9904b8b9a74a4 100644 --- a/google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_rest_logging_decorator.h +++ b/google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_rest_logging_decorator.h @@ -20,12 +20,12 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_AUTOSCALERS_V1_INTERNAL_REGION_AUTOSCALERS_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_rest_stub.h" +#include "google/cloud/compute/region_autoscalers/v1/region_autoscalers.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_rest_metadata_decorator.cc b/google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_rest_metadata_decorator.cc index 9c9daaa378bdb..46732319e1d73 100644 --- a/google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_rest_metadata_decorator.cc +++ b/google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/region_autoscalers/v1/region_autoscalers.proto #include "google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_rest_metadata_decorator.h b/google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_rest_metadata_decorator.h index 0ad1e7f0c02ee..2c348291d45a5 100644 --- a/google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_rest_metadata_decorator.h +++ b/google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_rest_metadata_decorator.h @@ -20,11 +20,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_AUTOSCALERS_V1_INTERNAL_REGION_AUTOSCALERS_REST_METADATA_DECORATOR_H #include "google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_rest_stub.h" +#include "google/cloud/compute/region_autoscalers/v1/region_autoscalers.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_rest_stub.cc b/google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_rest_stub.cc index fa52326022849..963888c10e3d5 100644 --- a/google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_rest_stub.cc +++ b/google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/region_autoscalers/v1/region_autoscalers.proto #include "google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_rest_stub.h" +#include "google/cloud/compute/region_autoscalers/v1/region_autoscalers.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_rest_stub.h b/google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_rest_stub.h index 4b7c5a1dc9a55..05ea74a003823 100644 --- a/google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_rest_stub.h +++ b/google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_AUTOSCALERS_V1_INTERNAL_REGION_AUTOSCALERS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_AUTOSCALERS_V1_INTERNAL_REGION_AUTOSCALERS_REST_STUB_H +#include "google/cloud/compute/region_autoscalers/v1/region_autoscalers.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_tracing_connection.cc b/google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_tracing_connection.cc index 417f40967f98c..38c91e7b3ea57 100644 --- a/google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_tracing_connection.cc +++ b/google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_region_autoscalers_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RegionAutoscalersTracingConnection::RegionAutoscalersTracingConnection( std::shared_ptr child) @@ -194,18 +192,14 @@ RegionAutoscalersTracingConnection::UpdateAutoscaler( child_->UpdateAutoscaler(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRegionAutoscalersTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_tracing_connection.h b/google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_tracing_connection.h index f5285ce7e1259..ae8399daf9f67 100644 --- a/google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_tracing_connection.h +++ b/google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_region_autoscalers_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RegionAutoscalersTracingConnection : public compute_region_autoscalers_v1::RegionAutoscalersConnection { public: @@ -99,8 +97,6 @@ class RegionAutoscalersTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/region_autoscalers/v1/region_autoscalers_connection.h b/google/cloud/compute/region_autoscalers/v1/region_autoscalers_connection.h index 56d6790d4156c..8e27b4b0b13df 100644 --- a/google/cloud/compute/region_autoscalers/v1/region_autoscalers_connection.h +++ b/google/cloud/compute/region_autoscalers/v1/region_autoscalers_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_AUTOSCALERS_V1_REGION_AUTOSCALERS_CONNECTION_H #include "google/cloud/compute/region_autoscalers/v1/internal/region_autoscalers_retry_traits.h" +#include "google/cloud/compute/region_autoscalers/v1/region_autoscalers.pb.h" #include "google/cloud/compute/region_autoscalers/v1/region_autoscalers_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_autoscalers/v1/region_autoscalers_connection_idempotency_policy.h b/google/cloud/compute/region_autoscalers/v1/region_autoscalers_connection_idempotency_policy.h index 7ba6dec19f201..edcca9e61ae84 100644 --- a/google/cloud/compute/region_autoscalers/v1/region_autoscalers_connection_idempotency_policy.h +++ b/google/cloud/compute/region_autoscalers/v1/region_autoscalers_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_AUTOSCALERS_V1_REGION_AUTOSCALERS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_AUTOSCALERS_V1_REGION_AUTOSCALERS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/region_autoscalers/v1/region_autoscalers.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_autoscalers/v1/region_autoscalers_proto_export.h b/google/cloud/compute/region_autoscalers/v1/region_autoscalers_proto_export.h index 900992f36ec55..96b540cda01b4 100644 --- a/google/cloud/compute/region_autoscalers/v1/region_autoscalers_proto_export.h +++ b/google/cloud/compute/region_autoscalers/v1/region_autoscalers_proto_export.h @@ -26,10 +26,10 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_AUTOSCALERS_V1_REGION_AUTOSCALERS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_008.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_040.pb.h" +#include "google/cloud/compute/v1/internal/common_100.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_AUTOSCALERS_V1_REGION_AUTOSCALERS_PROTO_EXPORT_H diff --git a/google/cloud/compute/region_backend_services/v1/internal/region_backend_services_option_defaults.cc b/google/cloud/compute/region_backend_services/v1/internal/region_backend_services_option_defaults.cc index b2514b5e0e509..e23b1cbc7d7ae 100644 --- a/google/cloud/compute/region_backend_services/v1/internal/region_backend_services_option_defaults.cc +++ b/google/cloud/compute/region_backend_services/v1/internal/region_backend_services_option_defaults.cc @@ -46,7 +46,7 @@ Options RegionBackendServicesDefaultOptions(Options options) { RegionBackendServicesRetryPolicyOption>( compute_region_backend_services_v1:: RegionBackendServicesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/region_backend_services/v1/internal/region_backend_services_rest_logging_decorator.h b/google/cloud/compute/region_backend_services/v1/internal/region_backend_services_rest_logging_decorator.h index d4f089e08961d..7ec9edec79598 100644 --- a/google/cloud/compute/region_backend_services/v1/internal/region_backend_services_rest_logging_decorator.h +++ b/google/cloud/compute/region_backend_services/v1/internal/region_backend_services_rest_logging_decorator.h @@ -21,12 +21,12 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_BACKEND_SERVICES_V1_INTERNAL_REGION_BACKEND_SERVICES_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/region_backend_services/v1/internal/region_backend_services_rest_stub.h" +#include "google/cloud/compute/region_backend_services/v1/region_backend_services.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/region_backend_services/v1/internal/region_backend_services_rest_metadata_decorator.cc b/google/cloud/compute/region_backend_services/v1/internal/region_backend_services_rest_metadata_decorator.cc index acc6afdf85ffa..6245ee3435f1d 100644 --- a/google/cloud/compute/region_backend_services/v1/internal/region_backend_services_rest_metadata_decorator.cc +++ b/google/cloud/compute/region_backend_services/v1/internal/region_backend_services_rest_metadata_decorator.cc @@ -18,10 +18,10 @@ // google/cloud/compute/region_backend_services/v1/region_backend_services.proto #include "google/cloud/compute/region_backend_services/v1/internal/region_backend_services_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/region_backend_services/v1/internal/region_backend_services_rest_metadata_decorator.h b/google/cloud/compute/region_backend_services/v1/internal/region_backend_services_rest_metadata_decorator.h index 282407fd4c3c8..973f7564da386 100644 --- a/google/cloud/compute/region_backend_services/v1/internal/region_backend_services_rest_metadata_decorator.h +++ b/google/cloud/compute/region_backend_services/v1/internal/region_backend_services_rest_metadata_decorator.h @@ -21,11 +21,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_BACKEND_SERVICES_V1_INTERNAL_REGION_BACKEND_SERVICES_REST_METADATA_DECORATOR_H #include "google/cloud/compute/region_backend_services/v1/internal/region_backend_services_rest_stub.h" +#include "google/cloud/compute/region_backend_services/v1/region_backend_services.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/region_backend_services/v1/internal/region_backend_services_rest_stub.cc b/google/cloud/compute/region_backend_services/v1/internal/region_backend_services_rest_stub.cc index 5e319e8091b2a..679b6c65a8af4 100644 --- a/google/cloud/compute/region_backend_services/v1/internal/region_backend_services_rest_stub.cc +++ b/google/cloud/compute/region_backend_services/v1/internal/region_backend_services_rest_stub.cc @@ -18,12 +18,12 @@ // google/cloud/compute/region_backend_services/v1/region_backend_services.proto #include "google/cloud/compute/region_backend_services/v1/internal/region_backend_services_rest_stub.h" +#include "google/cloud/compute/region_backend_services/v1/region_backend_services.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/region_backend_services/v1/internal/region_backend_services_rest_stub.h b/google/cloud/compute/region_backend_services/v1/internal/region_backend_services_rest_stub.h index 3265cc5cca3af..5d29518182e5b 100644 --- a/google/cloud/compute/region_backend_services/v1/internal/region_backend_services_rest_stub.h +++ b/google/cloud/compute/region_backend_services/v1/internal/region_backend_services_rest_stub.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_BACKEND_SERVICES_V1_INTERNAL_REGION_BACKEND_SERVICES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_BACKEND_SERVICES_V1_INTERNAL_REGION_BACKEND_SERVICES_REST_STUB_H +#include "google/cloud/compute/region_backend_services/v1/region_backend_services.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/region_backend_services/v1/internal/region_backend_services_tracing_connection.cc b/google/cloud/compute/region_backend_services/v1/internal/region_backend_services_tracing_connection.cc index 1fe377b01c0f6..1a2eb7c53e712 100644 --- a/google/cloud/compute/region_backend_services/v1/internal/region_backend_services_tracing_connection.cc +++ b/google/cloud/compute/region_backend_services/v1/internal/region_backend_services_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace compute_region_backend_services_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RegionBackendServicesTracingConnection::RegionBackendServicesTracingConnection( std::shared_ptr< compute_region_backend_services_v1::RegionBackendServicesConnection> @@ -293,20 +291,16 @@ RegionBackendServicesTracingConnection::UpdateBackendService( child_->UpdateBackendService(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr< compute_region_backend_services_v1::RegionBackendServicesConnection> MakeRegionBackendServicesTracingConnection( std::shared_ptr< compute_region_backend_services_v1::RegionBackendServicesConnection> conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/region_backend_services/v1/internal/region_backend_services_tracing_connection.h b/google/cloud/compute/region_backend_services/v1/internal/region_backend_services_tracing_connection.h index 2807dfb5dc7fb..52eaa8a0f4915 100644 --- a/google/cloud/compute/region_backend_services/v1/internal/region_backend_services_tracing_connection.h +++ b/google/cloud/compute/region_backend_services/v1/internal/region_backend_services_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace compute_region_backend_services_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RegionBackendServicesTracingConnection : public compute_region_backend_services_v1:: RegionBackendServicesConnection { @@ -142,8 +140,6 @@ class RegionBackendServicesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/region_backend_services/v1/region_backend_services_connection.h b/google/cloud/compute/region_backend_services/v1/region_backend_services_connection.h index 639eef6247102..8852ea311c4e3 100644 --- a/google/cloud/compute/region_backend_services/v1/region_backend_services_connection.h +++ b/google/cloud/compute/region_backend_services/v1/region_backend_services_connection.h @@ -21,6 +21,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_BACKEND_SERVICES_V1_REGION_BACKEND_SERVICES_CONNECTION_H #include "google/cloud/compute/region_backend_services/v1/internal/region_backend_services_retry_traits.h" +#include "google/cloud/compute/region_backend_services/v1/region_backend_services.pb.h" #include "google/cloud/compute/region_backend_services/v1/region_backend_services_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -31,7 +32,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_backend_services/v1/region_backend_services_connection_idempotency_policy.h b/google/cloud/compute/region_backend_services/v1/region_backend_services_connection_idempotency_policy.h index bfddece424f8d..928c1274ab2d1 100644 --- a/google/cloud/compute/region_backend_services/v1/region_backend_services_connection_idempotency_policy.h +++ b/google/cloud/compute/region_backend_services/v1/region_backend_services_connection_idempotency_policy.h @@ -20,9 +20,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_BACKEND_SERVICES_V1_REGION_BACKEND_SERVICES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_BACKEND_SERVICES_V1_REGION_BACKEND_SERVICES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/region_backend_services/v1/region_backend_services.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_backend_services/v1/region_backend_services_proto_export.h b/google/cloud/compute/region_backend_services/v1/region_backend_services_proto_export.h index 35870c0a3c857..d049495648f3a 100644 --- a/google/cloud/compute/region_backend_services/v1/region_backend_services_proto_export.h +++ b/google/cloud/compute/region_backend_services/v1/region_backend_services_proto_export.h @@ -26,15 +26,15 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_BACKEND_SERVICES_V1_REGION_BACKEND_SERVICES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_000.pb.h" +#include "google/cloud/compute/v1/internal/common_007.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_029.pb.h" +#include "google/cloud/compute/v1/internal/common_031.pb.h" +#include "google/cloud/compute/v1/internal/common_052.pb.h" +#include "google/cloud/compute/v1/internal/common_108.pb.h" +#include "google/cloud/compute/v1/internal/common_118.pb.h" +#include "google/cloud/compute/v1/internal/common_145.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_BACKEND_SERVICES_V1_REGION_BACKEND_SERVICES_PROTO_EXPORT_H diff --git a/google/cloud/compute/region_commitments/v1/internal/region_commitments_option_defaults.cc b/google/cloud/compute/region_commitments/v1/internal/region_commitments_option_defaults.cc index b397d17be702f..c0b86a012e1b9 100644 --- a/google/cloud/compute/region_commitments/v1/internal/region_commitments_option_defaults.cc +++ b/google/cloud/compute/region_commitments/v1/internal/region_commitments_option_defaults.cc @@ -44,7 +44,7 @@ Options RegionCommitmentsDefaultOptions(Options options) { options.set< compute_region_commitments_v1::RegionCommitmentsRetryPolicyOption>( compute_region_commitments_v1::RegionCommitmentsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/region_commitments/v1/internal/region_commitments_rest_logging_decorator.h b/google/cloud/compute/region_commitments/v1/internal/region_commitments_rest_logging_decorator.h index c74ab99ba439c..b0d3c0e9165ed 100644 --- a/google/cloud/compute/region_commitments/v1/internal/region_commitments_rest_logging_decorator.h +++ b/google/cloud/compute/region_commitments/v1/internal/region_commitments_rest_logging_decorator.h @@ -20,12 +20,12 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_COMMITMENTS_V1_INTERNAL_REGION_COMMITMENTS_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/region_commitments/v1/internal/region_commitments_rest_stub.h" +#include "google/cloud/compute/region_commitments/v1/region_commitments.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/region_commitments/v1/internal/region_commitments_rest_metadata_decorator.cc b/google/cloud/compute/region_commitments/v1/internal/region_commitments_rest_metadata_decorator.cc index a95f1cd062165..83afc01c360fd 100644 --- a/google/cloud/compute/region_commitments/v1/internal/region_commitments_rest_metadata_decorator.cc +++ b/google/cloud/compute/region_commitments/v1/internal/region_commitments_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/region_commitments/v1/region_commitments.proto #include "google/cloud/compute/region_commitments/v1/internal/region_commitments_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/region_commitments/v1/internal/region_commitments_rest_metadata_decorator.h b/google/cloud/compute/region_commitments/v1/internal/region_commitments_rest_metadata_decorator.h index 995c44380ee37..381e0e1e5cd79 100644 --- a/google/cloud/compute/region_commitments/v1/internal/region_commitments_rest_metadata_decorator.h +++ b/google/cloud/compute/region_commitments/v1/internal/region_commitments_rest_metadata_decorator.h @@ -20,11 +20,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_COMMITMENTS_V1_INTERNAL_REGION_COMMITMENTS_REST_METADATA_DECORATOR_H #include "google/cloud/compute/region_commitments/v1/internal/region_commitments_rest_stub.h" +#include "google/cloud/compute/region_commitments/v1/region_commitments.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/region_commitments/v1/internal/region_commitments_rest_stub.cc b/google/cloud/compute/region_commitments/v1/internal/region_commitments_rest_stub.cc index 5da166f40d922..615cf55850088 100644 --- a/google/cloud/compute/region_commitments/v1/internal/region_commitments_rest_stub.cc +++ b/google/cloud/compute/region_commitments/v1/internal/region_commitments_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/region_commitments/v1/region_commitments.proto #include "google/cloud/compute/region_commitments/v1/internal/region_commitments_rest_stub.h" +#include "google/cloud/compute/region_commitments/v1/region_commitments.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/region_commitments/v1/internal/region_commitments_rest_stub.h b/google/cloud/compute/region_commitments/v1/internal/region_commitments_rest_stub.h index 034e10a3dd738..1ae63de7e6401 100644 --- a/google/cloud/compute/region_commitments/v1/internal/region_commitments_rest_stub.h +++ b/google/cloud/compute/region_commitments/v1/internal/region_commitments_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_COMMITMENTS_V1_INTERNAL_REGION_COMMITMENTS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_COMMITMENTS_V1_INTERNAL_REGION_COMMITMENTS_REST_STUB_H +#include "google/cloud/compute/region_commitments/v1/region_commitments.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/region_commitments/v1/internal/region_commitments_tracing_connection.cc b/google/cloud/compute/region_commitments/v1/internal/region_commitments_tracing_connection.cc index 21ae5e97d329a..fbb2013b40ddf 100644 --- a/google/cloud/compute/region_commitments/v1/internal/region_commitments_tracing_connection.cc +++ b/google/cloud/compute/region_commitments/v1/internal/region_commitments_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_region_commitments_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RegionCommitmentsTracingConnection::RegionCommitmentsTracingConnection( std::shared_ptr child) @@ -142,18 +140,14 @@ RegionCommitmentsTracingConnection::UpdateCommitment( child_->UpdateCommitment(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRegionCommitmentsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/region_commitments/v1/internal/region_commitments_tracing_connection.h b/google/cloud/compute/region_commitments/v1/internal/region_commitments_tracing_connection.h index dee2c8bc1bdb2..c10340d8ea5c8 100644 --- a/google/cloud/compute/region_commitments/v1/internal/region_commitments_tracing_connection.h +++ b/google/cloud/compute/region_commitments/v1/internal/region_commitments_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_region_commitments_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RegionCommitmentsTracingConnection : public compute_region_commitments_v1::RegionCommitmentsConnection { public: @@ -83,8 +81,6 @@ class RegionCommitmentsTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/region_commitments/v1/region_commitments_connection.h b/google/cloud/compute/region_commitments/v1/region_commitments_connection.h index 3fe0cbde09ae0..dfba56afc3491 100644 --- a/google/cloud/compute/region_commitments/v1/region_commitments_connection.h +++ b/google/cloud/compute/region_commitments/v1/region_commitments_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_COMMITMENTS_V1_REGION_COMMITMENTS_CONNECTION_H #include "google/cloud/compute/region_commitments/v1/internal/region_commitments_retry_traits.h" +#include "google/cloud/compute/region_commitments/v1/region_commitments.pb.h" #include "google/cloud/compute/region_commitments/v1/region_commitments_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_commitments/v1/region_commitments_connection_idempotency_policy.h b/google/cloud/compute/region_commitments/v1/region_commitments_connection_idempotency_policy.h index 1b5cf2cd7c590..7c9b367a02ccf 100644 --- a/google/cloud/compute/region_commitments/v1/region_commitments_connection_idempotency_policy.h +++ b/google/cloud/compute/region_commitments/v1/region_commitments_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_COMMITMENTS_V1_REGION_COMMITMENTS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_COMMITMENTS_V1_REGION_COMMITMENTS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/region_commitments/v1/region_commitments.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_commitments/v1/region_commitments_proto_export.h b/google/cloud/compute/region_commitments/v1/region_commitments_proto_export.h index 5521d8caf491f..6f39ec34042f9 100644 --- a/google/cloud/compute/region_commitments/v1/region_commitments_proto_export.h +++ b/google/cloud/compute/region_commitments/v1/region_commitments_proto_export.h @@ -26,14 +26,14 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_COMMITMENTS_V1_REGION_COMMITMENTS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_001.pb.h" +#include "google/cloud/compute/v1/internal/common_006.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_019.pb.h" +#include "google/cloud/compute/v1/internal/common_029.pb.h" +#include "google/cloud/compute/v1/internal/common_048.pb.h" +#include "google/cloud/compute/v1/internal/common_120.pb.h" +#include "google/cloud/compute/v1/internal/common_146.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_COMMITMENTS_V1_REGION_COMMITMENTS_PROTO_EXPORT_H diff --git a/google/cloud/compute/region_disk_types/v1/internal/region_disk_types_option_defaults.cc b/google/cloud/compute/region_disk_types/v1/internal/region_disk_types_option_defaults.cc index daa32ba6ef4dd..902aa97f57a82 100644 --- a/google/cloud/compute/region_disk_types/v1/internal/region_disk_types_option_defaults.cc +++ b/google/cloud/compute/region_disk_types/v1/internal/region_disk_types_option_defaults.cc @@ -42,7 +42,7 @@ Options RegionDiskTypesDefaultOptions(Options options) { compute_region_disk_types_v1::RegionDiskTypesRetryPolicyOption>()) { options.set( compute_region_disk_types_v1::RegionDiskTypesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/compute/region_disk_types/v1/internal/region_disk_types_rest_logging_decorator.h b/google/cloud/compute/region_disk_types/v1/internal/region_disk_types_rest_logging_decorator.h index a511b8345bc82..5f7d3edb3dda5 100644 --- a/google/cloud/compute/region_disk_types/v1/internal/region_disk_types_rest_logging_decorator.h +++ b/google/cloud/compute/region_disk_types/v1/internal/region_disk_types_rest_logging_decorator.h @@ -20,11 +20,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_DISK_TYPES_V1_INTERNAL_REGION_DISK_TYPES_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/region_disk_types/v1/internal/region_disk_types_rest_stub.h" +#include "google/cloud/compute/region_disk_types/v1/region_disk_types.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include #include #include #include diff --git a/google/cloud/compute/region_disk_types/v1/internal/region_disk_types_rest_metadata_decorator.cc b/google/cloud/compute/region_disk_types/v1/internal/region_disk_types_rest_metadata_decorator.cc index 7d2eadf3053ac..478a39de159d2 100644 --- a/google/cloud/compute/region_disk_types/v1/internal/region_disk_types_rest_metadata_decorator.cc +++ b/google/cloud/compute/region_disk_types/v1/internal/region_disk_types_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/region_disk_types/v1/region_disk_types.proto #include "google/cloud/compute/region_disk_types/v1/internal/region_disk_types_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/region_disk_types/v1/internal/region_disk_types_rest_metadata_decorator.h b/google/cloud/compute/region_disk_types/v1/internal/region_disk_types_rest_metadata_decorator.h index ecb93e942deb8..ecd292495146f 100644 --- a/google/cloud/compute/region_disk_types/v1/internal/region_disk_types_rest_metadata_decorator.h +++ b/google/cloud/compute/region_disk_types/v1/internal/region_disk_types_rest_metadata_decorator.h @@ -20,10 +20,10 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_DISK_TYPES_V1_INTERNAL_REGION_DISK_TYPES_REST_METADATA_DECORATOR_H #include "google/cloud/compute/region_disk_types/v1/internal/region_disk_types_rest_stub.h" +#include "google/cloud/compute/region_disk_types/v1/region_disk_types.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/compute/region_disk_types/v1/internal/region_disk_types_rest_stub.cc b/google/cloud/compute/region_disk_types/v1/internal/region_disk_types_rest_stub.cc index 52e9e07a8cce5..a216550828551 100644 --- a/google/cloud/compute/region_disk_types/v1/internal/region_disk_types_rest_stub.cc +++ b/google/cloud/compute/region_disk_types/v1/internal/region_disk_types_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/compute/region_disk_types/v1/region_disk_types.proto #include "google/cloud/compute/region_disk_types/v1/internal/region_disk_types_rest_stub.h" +#include "google/cloud/compute/region_disk_types/v1/region_disk_types.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/region_disk_types/v1/internal/region_disk_types_rest_stub.h b/google/cloud/compute/region_disk_types/v1/internal/region_disk_types_rest_stub.h index 2c84de16bf84a..386eaf7c9dbb1 100644 --- a/google/cloud/compute/region_disk_types/v1/internal/region_disk_types_rest_stub.h +++ b/google/cloud/compute/region_disk_types/v1/internal/region_disk_types_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_DISK_TYPES_V1_INTERNAL_REGION_DISK_TYPES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_DISK_TYPES_V1_INTERNAL_REGION_DISK_TYPES_REST_STUB_H +#include "google/cloud/compute/region_disk_types/v1/region_disk_types.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_disk_types/v1/internal/region_disk_types_tracing_connection.cc b/google/cloud/compute/region_disk_types/v1/internal/region_disk_types_tracing_connection.cc index 45e9859eda60f..8250831a99fc2 100644 --- a/google/cloud/compute/region_disk_types/v1/internal/region_disk_types_tracing_connection.cc +++ b/google/cloud/compute/region_disk_types/v1/internal/region_disk_types_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_region_disk_types_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RegionDiskTypesTracingConnection::RegionDiskTypesTracingConnection( std::shared_ptr child) @@ -58,17 +56,13 @@ RegionDiskTypesTracingConnection::ListRegionDiskTypes( std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRegionDiskTypesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/region_disk_types/v1/internal/region_disk_types_tracing_connection.h b/google/cloud/compute/region_disk_types/v1/internal/region_disk_types_tracing_connection.h index bfdd9b9241bde..bfe4a7ea4e6f4 100644 --- a/google/cloud/compute/region_disk_types/v1/internal/region_disk_types_tracing_connection.h +++ b/google/cloud/compute/region_disk_types/v1/internal/region_disk_types_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_region_disk_types_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RegionDiskTypesTracingConnection : public compute_region_disk_types_v1::RegionDiskTypesConnection { public: @@ -54,8 +52,6 @@ class RegionDiskTypesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/region_disk_types/v1/region_disk_types_connection.h b/google/cloud/compute/region_disk_types/v1/region_disk_types_connection.h index 6680af5546f43..db75dfa537f3a 100644 --- a/google/cloud/compute/region_disk_types/v1/region_disk_types_connection.h +++ b/google/cloud/compute/region_disk_types/v1/region_disk_types_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_DISK_TYPES_V1_REGION_DISK_TYPES_CONNECTION_H #include "google/cloud/compute/region_disk_types/v1/internal/region_disk_types_retry_traits.h" +#include "google/cloud/compute/region_disk_types/v1/region_disk_types.pb.h" #include "google/cloud/compute/region_disk_types/v1/region_disk_types_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_disk_types/v1/region_disk_types_connection_idempotency_policy.h b/google/cloud/compute/region_disk_types/v1/region_disk_types_connection_idempotency_policy.h index c33be9d7c239a..fc49f6cd766d8 100644 --- a/google/cloud/compute/region_disk_types/v1/region_disk_types_connection_idempotency_policy.h +++ b/google/cloud/compute/region_disk_types/v1/region_disk_types_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_DISK_TYPES_V1_REGION_DISK_TYPES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_DISK_TYPES_V1_REGION_DISK_TYPES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/region_disk_types/v1/region_disk_types.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_disk_types/v1/region_disk_types_proto_export.h b/google/cloud/compute/region_disk_types/v1/region_disk_types_proto_export.h index 0ddf12a582050..fc8d3d29cffe4 100644 --- a/google/cloud/compute/region_disk_types/v1/region_disk_types_proto_export.h +++ b/google/cloud/compute/region_disk_types/v1/region_disk_types_proto_export.h @@ -26,9 +26,9 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_DISK_TYPES_V1_REGION_DISK_TYPES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_023.pb.h" +#include "google/cloud/compute/v1/internal/common_026.pb.h" +#include "google/cloud/compute/v1/internal/common_101.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_DISK_TYPES_V1_REGION_DISK_TYPES_PROTO_EXPORT_H diff --git a/google/cloud/compute/region_disks/v1/internal/region_disks_option_defaults.cc b/google/cloud/compute/region_disks/v1/internal/region_disks_option_defaults.cc index cab89fdeda901..9bbb9b9f6618e 100644 --- a/google/cloud/compute/region_disks/v1/internal/region_disks_option_defaults.cc +++ b/google/cloud/compute/region_disks/v1/internal/region_disks_option_defaults.cc @@ -41,7 +41,7 @@ Options RegionDisksDefaultOptions(Options options) { if (!options.has()) { options.set( compute_region_disks_v1::RegionDisksLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/compute/region_disks/v1/internal/region_disks_rest_connection_impl.h b/google/cloud/compute/region_disks/v1/internal/region_disks_rest_connection_impl.h index b51bc9c76cf03..a336f0ac2bd92 100644 --- a/google/cloud/compute/region_disks/v1/internal/region_disks_rest_connection_impl.h +++ b/google/cloud/compute/region_disks/v1/internal/region_disks_rest_connection_impl.h @@ -24,13 +24,13 @@ #include "google/cloud/compute/region_disks/v1/region_disks_connection.h" #include "google/cloud/compute/region_disks/v1/region_disks_connection_idempotency_policy.h" #include "google/cloud/compute/region_disks/v1/region_disks_options.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/background_threads.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_disks/v1/internal/region_disks_rest_logging_decorator.h b/google/cloud/compute/region_disks/v1/internal/region_disks_rest_logging_decorator.h index 6af0965e2f1ef..6e6b773edf131 100644 --- a/google/cloud/compute/region_disks/v1/internal/region_disks_rest_logging_decorator.h +++ b/google/cloud/compute/region_disks/v1/internal/region_disks_rest_logging_decorator.h @@ -20,12 +20,12 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_DISKS_V1_INTERNAL_REGION_DISKS_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/region_disks/v1/internal/region_disks_rest_stub.h" +#include "google/cloud/compute/region_disks/v1/region_disks.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/region_disks/v1/internal/region_disks_rest_metadata_decorator.cc b/google/cloud/compute/region_disks/v1/internal/region_disks_rest_metadata_decorator.cc index 52bd2697f3a08..64be6ec7a6b69 100644 --- a/google/cloud/compute/region_disks/v1/internal/region_disks_rest_metadata_decorator.cc +++ b/google/cloud/compute/region_disks/v1/internal/region_disks_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/region_disks/v1/region_disks.proto #include "google/cloud/compute/region_disks/v1/internal/region_disks_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/region_disks/v1/internal/region_disks_rest_metadata_decorator.h b/google/cloud/compute/region_disks/v1/internal/region_disks_rest_metadata_decorator.h index f12668f7c878b..fb0315454a9f3 100644 --- a/google/cloud/compute/region_disks/v1/internal/region_disks_rest_metadata_decorator.h +++ b/google/cloud/compute/region_disks/v1/internal/region_disks_rest_metadata_decorator.h @@ -20,11 +20,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_DISKS_V1_INTERNAL_REGION_DISKS_REST_METADATA_DECORATOR_H #include "google/cloud/compute/region_disks/v1/internal/region_disks_rest_stub.h" +#include "google/cloud/compute/region_disks/v1/region_disks.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/region_disks/v1/internal/region_disks_rest_stub.cc b/google/cloud/compute/region_disks/v1/internal/region_disks_rest_stub.cc index 8f9582451f017..87a5fc1c09fcb 100644 --- a/google/cloud/compute/region_disks/v1/internal/region_disks_rest_stub.cc +++ b/google/cloud/compute/region_disks/v1/internal/region_disks_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/region_disks/v1/region_disks.proto #include "google/cloud/compute/region_disks/v1/internal/region_disks_rest_stub.h" +#include "google/cloud/compute/region_disks/v1/region_disks.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/region_disks/v1/internal/region_disks_rest_stub.h b/google/cloud/compute/region_disks/v1/internal/region_disks_rest_stub.h index f897937372206..051309674f6a6 100644 --- a/google/cloud/compute/region_disks/v1/internal/region_disks_rest_stub.h +++ b/google/cloud/compute/region_disks/v1/internal/region_disks_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_DISKS_V1_INTERNAL_REGION_DISKS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_DISKS_V1_INTERNAL_REGION_DISKS_REST_STUB_H +#include "google/cloud/compute/region_disks/v1/region_disks.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/region_disks/v1/internal/region_disks_tracing_connection.cc b/google/cloud/compute/region_disks/v1/internal/region_disks_tracing_connection.cc index 29adc384a34fc..2b85dac179a6b 100644 --- a/google/cloud/compute/region_disks/v1/internal/region_disks_tracing_connection.cc +++ b/google/cloud/compute/region_disks/v1/internal/region_disks_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_region_disks_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RegionDisksTracingConnection::RegionDisksTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -459,16 +457,12 @@ RegionDisksTracingConnection::UpdateDisk( return internal::EndSpan(std::move(span), child_->UpdateDisk(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRegionDisksTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/region_disks/v1/internal/region_disks_tracing_connection.h b/google/cloud/compute/region_disks/v1/internal/region_disks_tracing_connection.h index c916c4f429799..ebc54d08a6128 100644 --- a/google/cloud/compute/region_disks/v1/internal/region_disks_tracing_connection.h +++ b/google/cloud/compute/region_disks/v1/internal/region_disks_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_region_disks_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RegionDisksTracingConnection : public compute_region_disks_v1::RegionDisksConnection { public: @@ -211,8 +209,6 @@ class RegionDisksTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/region_disks/v1/region_disks_connection.h b/google/cloud/compute/region_disks/v1/region_disks_connection.h index c5f96da313317..c216eadeeaab9 100644 --- a/google/cloud/compute/region_disks/v1/region_disks_connection.h +++ b/google/cloud/compute/region_disks/v1/region_disks_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_DISKS_V1_REGION_DISKS_CONNECTION_H #include "google/cloud/compute/region_disks/v1/internal/region_disks_retry_traits.h" +#include "google/cloud/compute/region_disks/v1/region_disks.pb.h" #include "google/cloud/compute/region_disks/v1/region_disks_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_disks/v1/region_disks_connection_idempotency_policy.h b/google/cloud/compute/region_disks/v1/region_disks_connection_idempotency_policy.h index cd8e146f6b735..c683ec6a17696 100644 --- a/google/cloud/compute/region_disks/v1/region_disks_connection_idempotency_policy.h +++ b/google/cloud/compute/region_disks/v1/region_disks_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_DISKS_V1_REGION_DISKS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_DISKS_V1_REGION_DISKS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/region_disks/v1/region_disks.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_disks/v1/region_disks_proto_export.h b/google/cloud/compute/region_disks/v1/region_disks_proto_export.h index f4ad8218c88e6..ef63807d80d40 100644 --- a/google/cloud/compute/region_disks/v1/region_disks_proto_export.h +++ b/google/cloud/compute/region_disks/v1/region_disks_proto_export.h @@ -26,16 +26,16 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_DISKS_V1_REGION_DISKS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_007.pb.h" +#include "google/cloud/compute/v1/internal/common_014.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_021.pb.h" +#include "google/cloud/compute/v1/internal/common_031.pb.h" +#include "google/cloud/compute/v1/internal/common_102.pb.h" +#include "google/cloud/compute/v1/internal/common_107.pb.h" +#include "google/cloud/compute/v1/internal/common_108.pb.h" +#include "google/cloud/compute/v1/internal/common_122.pb.h" +#include "google/cloud/compute/v1/internal/common_145.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_DISKS_V1_REGION_DISKS_PROTO_EXPORT_H diff --git a/google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_option_defaults.cc b/google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_option_defaults.cc index 98d8a25cb8a4c..9567bb52ca1d1 100644 --- a/google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_option_defaults.cc +++ b/google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_option_defaults.cc @@ -47,7 +47,7 @@ Options RegionHealthCheckServicesDefaultOptions(Options options) { RegionHealthCheckServicesRetryPolicyOption>( compute_region_health_check_services_v1:: RegionHealthCheckServicesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_rest_logging_decorator.h b/google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_rest_logging_decorator.h index 3a7088377446b..ab266db99d23b 100644 --- a/google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_rest_logging_decorator.h +++ b/google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_rest_logging_decorator.h @@ -21,12 +21,12 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_HEALTH_CHECK_SERVICES_V1_INTERNAL_REGION_HEALTH_CHECK_SERVICES_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_rest_stub.h" +#include "google/cloud/compute/region_health_check_services/v1/region_health_check_services.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_rest_metadata_decorator.cc b/google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_rest_metadata_decorator.cc index 28ddde6f2d7bf..eb2a69c33ee0b 100644 --- a/google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_rest_metadata_decorator.cc +++ b/google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_rest_metadata_decorator.cc @@ -18,10 +18,10 @@ // google/cloud/compute/region_health_check_services/v1/region_health_check_services.proto #include "google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_rest_metadata_decorator.h b/google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_rest_metadata_decorator.h index 5b5b7659809c5..669298532b390 100644 --- a/google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_rest_metadata_decorator.h +++ b/google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_rest_metadata_decorator.h @@ -21,11 +21,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_HEALTH_CHECK_SERVICES_V1_INTERNAL_REGION_HEALTH_CHECK_SERVICES_REST_METADATA_DECORATOR_H #include "google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_rest_stub.h" +#include "google/cloud/compute/region_health_check_services/v1/region_health_check_services.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_rest_stub.cc b/google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_rest_stub.cc index d681012da5878..af9bb1012a88c 100644 --- a/google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_rest_stub.cc +++ b/google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_rest_stub.cc @@ -18,12 +18,12 @@ // google/cloud/compute/region_health_check_services/v1/region_health_check_services.proto #include "google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_rest_stub.h" +#include "google/cloud/compute/region_health_check_services/v1/region_health_check_services.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_rest_stub.h b/google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_rest_stub.h index 31c032acd579e..225bb02adafcb 100644 --- a/google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_rest_stub.h +++ b/google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_rest_stub.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_HEALTH_CHECK_SERVICES_V1_INTERNAL_REGION_HEALTH_CHECK_SERVICES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_HEALTH_CHECK_SERVICES_V1_INTERNAL_REGION_HEALTH_CHECK_SERVICES_REST_STUB_H +#include "google/cloud/compute/region_health_check_services/v1/region_health_check_services.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_tracing_connection.cc b/google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_tracing_connection.cc index 51502f080d59d..45054b8035ae3 100644 --- a/google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_tracing_connection.cc +++ b/google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace compute_region_health_check_services_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RegionHealthCheckServicesTracingConnection:: RegionHealthCheckServicesTracingConnection( std::shared_ptrPatchHealthCheckService(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRegionHealthCheckServicesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_tracing_connection.h b/google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_tracing_connection.h index e86ba2661c051..4385443e7406c 100644 --- a/google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_tracing_connection.h +++ b/google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace compute_region_health_check_services_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RegionHealthCheckServicesTracingConnection : public compute_region_health_check_services_v1:: RegionHealthCheckServicesConnection { @@ -102,8 +100,6 @@ class RegionHealthCheckServicesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/region_health_check_services/v1/region_health_check_services_connection.h b/google/cloud/compute/region_health_check_services/v1/region_health_check_services_connection.h index 38c21a6c89064..af3889b1f8351 100644 --- a/google/cloud/compute/region_health_check_services/v1/region_health_check_services_connection.h +++ b/google/cloud/compute/region_health_check_services/v1/region_health_check_services_connection.h @@ -21,6 +21,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_HEALTH_CHECK_SERVICES_V1_REGION_HEALTH_CHECK_SERVICES_CONNECTION_H #include "google/cloud/compute/region_health_check_services/v1/internal/region_health_check_services_retry_traits.h" +#include "google/cloud/compute/region_health_check_services/v1/region_health_check_services.pb.h" #include "google/cloud/compute/region_health_check_services/v1/region_health_check_services_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -31,7 +32,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_health_check_services/v1/region_health_check_services_connection_idempotency_policy.h b/google/cloud/compute/region_health_check_services/v1/region_health_check_services_connection_idempotency_policy.h index 6a469b7642189..cfda50f881cbf 100644 --- a/google/cloud/compute/region_health_check_services/v1/region_health_check_services_connection_idempotency_policy.h +++ b/google/cloud/compute/region_health_check_services/v1/region_health_check_services_connection_idempotency_policy.h @@ -20,9 +20,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_HEALTH_CHECK_SERVICES_V1_REGION_HEALTH_CHECK_SERVICES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_HEALTH_CHECK_SERVICES_V1_REGION_HEALTH_CHECK_SERVICES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/region_health_check_services/v1/region_health_check_services.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_health_check_services/v1/region_health_check_services_proto_export.h b/google/cloud/compute/region_health_check_services/v1/region_health_check_services_proto_export.h index 13f7a165a4f43..6ecb9638ff449 100644 --- a/google/cloud/compute/region_health_check_services/v1/region_health_check_services_proto_export.h +++ b/google/cloud/compute/region_health_check_services/v1/region_health_check_services_proto_export.h @@ -26,8 +26,8 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_HEALTH_CHECK_SERVICES_V1_REGION_HEALTH_CHECK_SERVICES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_050.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_HEALTH_CHECK_SERVICES_V1_REGION_HEALTH_CHECK_SERVICES_PROTO_EXPORT_H diff --git a/google/cloud/compute/region_health_checks/v1/internal/region_health_checks_option_defaults.cc b/google/cloud/compute/region_health_checks/v1/internal/region_health_checks_option_defaults.cc index 9503bf74202f7..616a5e0a1d46f 100644 --- a/google/cloud/compute/region_health_checks/v1/internal/region_health_checks_option_defaults.cc +++ b/google/cloud/compute/region_health_checks/v1/internal/region_health_checks_option_defaults.cc @@ -45,7 +45,7 @@ Options RegionHealthChecksDefaultOptions(Options options) { options.set< compute_region_health_checks_v1::RegionHealthChecksRetryPolicyOption>( compute_region_health_checks_v1:: - RegionHealthChecksLimitedTimeRetryPolicy(std::chrono::minutes(30)) + RegionHealthChecksLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/region_health_checks/v1/internal/region_health_checks_rest_logging_decorator.h b/google/cloud/compute/region_health_checks/v1/internal/region_health_checks_rest_logging_decorator.h index 7a24eefb2a5ad..a7bb9261e8593 100644 --- a/google/cloud/compute/region_health_checks/v1/internal/region_health_checks_rest_logging_decorator.h +++ b/google/cloud/compute/region_health_checks/v1/internal/region_health_checks_rest_logging_decorator.h @@ -21,12 +21,12 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_HEALTH_CHECKS_V1_INTERNAL_REGION_HEALTH_CHECKS_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/region_health_checks/v1/internal/region_health_checks_rest_stub.h" +#include "google/cloud/compute/region_health_checks/v1/region_health_checks.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/region_health_checks/v1/internal/region_health_checks_rest_metadata_decorator.cc b/google/cloud/compute/region_health_checks/v1/internal/region_health_checks_rest_metadata_decorator.cc index 96703ba31c31d..01a0600afff61 100644 --- a/google/cloud/compute/region_health_checks/v1/internal/region_health_checks_rest_metadata_decorator.cc +++ b/google/cloud/compute/region_health_checks/v1/internal/region_health_checks_rest_metadata_decorator.cc @@ -18,10 +18,10 @@ // google/cloud/compute/region_health_checks/v1/region_health_checks.proto #include "google/cloud/compute/region_health_checks/v1/internal/region_health_checks_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/region_health_checks/v1/internal/region_health_checks_rest_metadata_decorator.h b/google/cloud/compute/region_health_checks/v1/internal/region_health_checks_rest_metadata_decorator.h index 57074cc3a495d..659d15aabdd1c 100644 --- a/google/cloud/compute/region_health_checks/v1/internal/region_health_checks_rest_metadata_decorator.h +++ b/google/cloud/compute/region_health_checks/v1/internal/region_health_checks_rest_metadata_decorator.h @@ -21,11 +21,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_HEALTH_CHECKS_V1_INTERNAL_REGION_HEALTH_CHECKS_REST_METADATA_DECORATOR_H #include "google/cloud/compute/region_health_checks/v1/internal/region_health_checks_rest_stub.h" +#include "google/cloud/compute/region_health_checks/v1/region_health_checks.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/region_health_checks/v1/internal/region_health_checks_rest_stub.cc b/google/cloud/compute/region_health_checks/v1/internal/region_health_checks_rest_stub.cc index 9f3650216197a..a14d569c5df0c 100644 --- a/google/cloud/compute/region_health_checks/v1/internal/region_health_checks_rest_stub.cc +++ b/google/cloud/compute/region_health_checks/v1/internal/region_health_checks_rest_stub.cc @@ -18,12 +18,12 @@ // google/cloud/compute/region_health_checks/v1/region_health_checks.proto #include "google/cloud/compute/region_health_checks/v1/internal/region_health_checks_rest_stub.h" +#include "google/cloud/compute/region_health_checks/v1/region_health_checks.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/region_health_checks/v1/internal/region_health_checks_rest_stub.h b/google/cloud/compute/region_health_checks/v1/internal/region_health_checks_rest_stub.h index 2fbd07f3c69dd..43bc9934e03c0 100644 --- a/google/cloud/compute/region_health_checks/v1/internal/region_health_checks_rest_stub.h +++ b/google/cloud/compute/region_health_checks/v1/internal/region_health_checks_rest_stub.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_HEALTH_CHECKS_V1_INTERNAL_REGION_HEALTH_CHECKS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_HEALTH_CHECKS_V1_INTERNAL_REGION_HEALTH_CHECKS_REST_STUB_H +#include "google/cloud/compute/region_health_checks/v1/region_health_checks.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/region_health_checks/v1/internal/region_health_checks_tracing_connection.cc b/google/cloud/compute/region_health_checks/v1/internal/region_health_checks_tracing_connection.cc index cb70f4c7f5652..de5360789d69a 100644 --- a/google/cloud/compute/region_health_checks/v1/internal/region_health_checks_tracing_connection.cc +++ b/google/cloud/compute/region_health_checks/v1/internal/region_health_checks_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace compute_region_health_checks_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RegionHealthChecksTracingConnection::RegionHealthChecksTracingConnection( std::shared_ptr< compute_region_health_checks_v1::RegionHealthChecksConnection> @@ -197,19 +195,15 @@ RegionHealthChecksTracingConnection::UpdateHealthCheck( child_->UpdateHealthCheck(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRegionHealthChecksTracingConnection( std::shared_ptr< compute_region_health_checks_v1::RegionHealthChecksConnection> conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/region_health_checks/v1/internal/region_health_checks_tracing_connection.h b/google/cloud/compute/region_health_checks/v1/internal/region_health_checks_tracing_connection.h index f30add004db7c..ed58f596b6f06 100644 --- a/google/cloud/compute/region_health_checks/v1/internal/region_health_checks_tracing_connection.h +++ b/google/cloud/compute/region_health_checks/v1/internal/region_health_checks_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace compute_region_health_checks_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RegionHealthChecksTracingConnection : public compute_region_health_checks_v1::RegionHealthChecksConnection { public: @@ -103,8 +101,6 @@ class RegionHealthChecksTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/region_health_checks/v1/region_health_checks_connection.h b/google/cloud/compute/region_health_checks/v1/region_health_checks_connection.h index c4d6ae18dc95f..f97036dcd60b0 100644 --- a/google/cloud/compute/region_health_checks/v1/region_health_checks_connection.h +++ b/google/cloud/compute/region_health_checks/v1/region_health_checks_connection.h @@ -21,6 +21,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_HEALTH_CHECKS_V1_REGION_HEALTH_CHECKS_CONNECTION_H #include "google/cloud/compute/region_health_checks/v1/internal/region_health_checks_retry_traits.h" +#include "google/cloud/compute/region_health_checks/v1/region_health_checks.pb.h" #include "google/cloud/compute/region_health_checks/v1/region_health_checks_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -31,7 +32,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_health_checks/v1/region_health_checks_connection_idempotency_policy.h b/google/cloud/compute/region_health_checks/v1/region_health_checks_connection_idempotency_policy.h index 3c4e68e4df5af..2b81e53261701 100644 --- a/google/cloud/compute/region_health_checks/v1/region_health_checks_connection_idempotency_policy.h +++ b/google/cloud/compute/region_health_checks/v1/region_health_checks_connection_idempotency_policy.h @@ -20,9 +20,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_HEALTH_CHECKS_V1_REGION_HEALTH_CHECKS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_HEALTH_CHECKS_V1_REGION_HEALTH_CHECKS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/region_health_checks/v1/region_health_checks.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_health_checks/v1/region_health_checks_proto_export.h b/google/cloud/compute/region_health_checks/v1/region_health_checks_proto_export.h index 4a437f28c7f24..31816f7f7222a 100644 --- a/google/cloud/compute/region_health_checks/v1/region_health_checks_proto_export.h +++ b/google/cloud/compute/region_health_checks/v1/region_health_checks_proto_export.h @@ -26,8 +26,8 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_HEALTH_CHECKS_V1_REGION_HEALTH_CHECKS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_043.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_HEALTH_CHECKS_V1_REGION_HEALTH_CHECKS_PROTO_EXPORT_H diff --git a/google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_option_defaults.cc b/google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_option_defaults.cc index 1f922ea910892..27c19c391ca38 100644 --- a/google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_option_defaults.cc +++ b/google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_option_defaults.cc @@ -47,7 +47,7 @@ Options RegionInstanceGroupManagersDefaultOptions(Options options) { RegionInstanceGroupManagersRetryPolicyOption>( compute_region_instance_group_managers_v1:: RegionInstanceGroupManagersLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_rest_logging_decorator.h b/google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_rest_logging_decorator.h index 510f72198a7c1..aaf5ed8ffdb20 100644 --- a/google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_rest_logging_decorator.h +++ b/google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_rest_logging_decorator.h @@ -21,12 +21,12 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCE_GROUP_MANAGERS_V1_INTERNAL_REGION_INSTANCE_GROUP_MANAGERS_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_rest_stub.h" +#include "google/cloud/compute/region_instance_group_managers/v1/region_instance_group_managers.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_rest_metadata_decorator.cc b/google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_rest_metadata_decorator.cc index 381a17a757fb1..99738471d8f24 100644 --- a/google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_rest_metadata_decorator.cc +++ b/google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_rest_metadata_decorator.cc @@ -18,10 +18,10 @@ // google/cloud/compute/region_instance_group_managers/v1/region_instance_group_managers.proto #include "google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_rest_metadata_decorator.h b/google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_rest_metadata_decorator.h index 119526b877143..2b297b4850c8c 100644 --- a/google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_rest_metadata_decorator.h +++ b/google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_rest_metadata_decorator.h @@ -21,11 +21,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCE_GROUP_MANAGERS_V1_INTERNAL_REGION_INSTANCE_GROUP_MANAGERS_REST_METADATA_DECORATOR_H #include "google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_rest_stub.h" +#include "google/cloud/compute/region_instance_group_managers/v1/region_instance_group_managers.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_rest_stub.cc b/google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_rest_stub.cc index 461e1eb05d79d..298543db9c1d5 100644 --- a/google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_rest_stub.cc +++ b/google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_rest_stub.cc @@ -18,12 +18,12 @@ // google/cloud/compute/region_instance_group_managers/v1/region_instance_group_managers.proto #include "google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_rest_stub.h" +#include "google/cloud/compute/region_instance_group_managers/v1/region_instance_group_managers.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_rest_stub.h b/google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_rest_stub.h index 14babb7f4b35a..1eb90909520ba 100644 --- a/google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_rest_stub.h +++ b/google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_rest_stub.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCE_GROUP_MANAGERS_V1_INTERNAL_REGION_INSTANCE_GROUP_MANAGERS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCE_GROUP_MANAGERS_V1_INTERNAL_REGION_INSTANCE_GROUP_MANAGERS_REST_STUB_H +#include "google/cloud/compute/region_instance_group_managers/v1/region_instance_group_managers.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_tracing_connection.cc b/google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_tracing_connection.cc index e98d43b002f59..faa34535df4ba 100644 --- a/google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_tracing_connection.cc +++ b/google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace compute_region_instance_group_managers_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RegionInstanceGroupManagersTracingConnection:: RegionInstanceGroupManagersTracingConnection( std::shared_ptrUpdatePerInstanceConfigs(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRegionInstanceGroupManagersTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_tracing_connection.h b/google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_tracing_connection.h index 6fc7c181fe055..024596a8480b8 100644 --- a/google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_tracing_connection.h +++ b/google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace compute_region_instance_group_managers_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RegionInstanceGroupManagersTracingConnection : public compute_region_instance_group_managers_v1:: RegionInstanceGroupManagersConnection { @@ -301,8 +299,6 @@ class RegionInstanceGroupManagersTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/region_instance_group_managers/v1/region_instance_group_managers_connection.h b/google/cloud/compute/region_instance_group_managers/v1/region_instance_group_managers_connection.h index ab8a55e081bb7..fe533657c8b4f 100644 --- a/google/cloud/compute/region_instance_group_managers/v1/region_instance_group_managers_connection.h +++ b/google/cloud/compute/region_instance_group_managers/v1/region_instance_group_managers_connection.h @@ -21,6 +21,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCE_GROUP_MANAGERS_V1_REGION_INSTANCE_GROUP_MANAGERS_CONNECTION_H #include "google/cloud/compute/region_instance_group_managers/v1/internal/region_instance_group_managers_retry_traits.h" +#include "google/cloud/compute/region_instance_group_managers/v1/region_instance_group_managers.pb.h" #include "google/cloud/compute/region_instance_group_managers/v1/region_instance_group_managers_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -31,7 +32,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_instance_group_managers/v1/region_instance_group_managers_connection_idempotency_policy.h b/google/cloud/compute/region_instance_group_managers/v1/region_instance_group_managers_connection_idempotency_policy.h index 1526d304648be..9e96c2de407c6 100644 --- a/google/cloud/compute/region_instance_group_managers/v1/region_instance_group_managers_connection_idempotency_policy.h +++ b/google/cloud/compute/region_instance_group_managers/v1/region_instance_group_managers_connection_idempotency_policy.h @@ -20,9 +20,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCE_GROUP_MANAGERS_V1_REGION_INSTANCE_GROUP_MANAGERS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCE_GROUP_MANAGERS_V1_REGION_INSTANCE_GROUP_MANAGERS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/region_instance_group_managers/v1/region_instance_group_managers.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_instance_group_managers/v1/region_instance_group_managers_proto_export.h b/google/cloud/compute/region_instance_group_managers/v1/region_instance_group_managers_proto_export.h index a15454a4e20b0..6c0131758eb73 100644 --- a/google/cloud/compute/region_instance_group_managers/v1/region_instance_group_managers_proto_export.h +++ b/google/cloud/compute/region_instance_group_managers/v1/region_instance_group_managers_proto_export.h @@ -26,11 +26,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCE_GROUP_MANAGERS_V1_REGION_INSTANCE_GROUP_MANAGERS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_028.pb.h" +#include "google/cloud/compute/v1/internal/common_040.pb.h" +#include "google/cloud/compute/v1/internal/common_083.pb.h" +#include "google/cloud/compute/v1/internal/common_104.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCE_GROUP_MANAGERS_V1_REGION_INSTANCE_GROUP_MANAGERS_PROTO_EXPORT_H diff --git a/google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_option_defaults.cc b/google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_option_defaults.cc index 1c1410144bb80..55d9471e995d9 100644 --- a/google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_option_defaults.cc +++ b/google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_option_defaults.cc @@ -45,7 +45,7 @@ Options RegionInstanceGroupsDefaultOptions(Options options) { options.set( compute_region_instance_groups_v1:: - RegionInstanceGroupsLimitedTimeRetryPolicy(std::chrono::minutes(30)) + RegionInstanceGroupsLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_rest_logging_decorator.h b/google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_rest_logging_decorator.h index 6ccabc4d85b09..4f1eeb87ad946 100644 --- a/google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_rest_logging_decorator.h +++ b/google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_rest_logging_decorator.h @@ -21,12 +21,12 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCE_GROUPS_V1_INTERNAL_REGION_INSTANCE_GROUPS_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_rest_stub.h" +#include "google/cloud/compute/region_instance_groups/v1/region_instance_groups.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_rest_metadata_decorator.cc b/google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_rest_metadata_decorator.cc index c6030b7ba99f2..6842dabeeb6c4 100644 --- a/google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_rest_metadata_decorator.cc +++ b/google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_rest_metadata_decorator.cc @@ -18,10 +18,10 @@ // google/cloud/compute/region_instance_groups/v1/region_instance_groups.proto #include "google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_rest_metadata_decorator.h b/google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_rest_metadata_decorator.h index 3988c56a24e0d..ca8f31e0721e7 100644 --- a/google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_rest_metadata_decorator.h +++ b/google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_rest_metadata_decorator.h @@ -21,11 +21,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCE_GROUPS_V1_INTERNAL_REGION_INSTANCE_GROUPS_REST_METADATA_DECORATOR_H #include "google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_rest_stub.h" +#include "google/cloud/compute/region_instance_groups/v1/region_instance_groups.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_rest_stub.cc b/google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_rest_stub.cc index c0d90241f54fd..ef666e695badb 100644 --- a/google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_rest_stub.cc +++ b/google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_rest_stub.cc @@ -18,12 +18,12 @@ // google/cloud/compute/region_instance_groups/v1/region_instance_groups.proto #include "google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_rest_stub.h" +#include "google/cloud/compute/region_instance_groups/v1/region_instance_groups.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_rest_stub.h b/google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_rest_stub.h index 47874ed90ada9..3adbce621927b 100644 --- a/google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_rest_stub.h +++ b/google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_rest_stub.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCE_GROUPS_V1_INTERNAL_REGION_INSTANCE_GROUPS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCE_GROUPS_V1_INTERNAL_REGION_INSTANCE_GROUPS_REST_STUB_H +#include "google/cloud/compute/region_instance_groups/v1/region_instance_groups.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_tracing_connection.cc b/google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_tracing_connection.cc index 9dd70d5cca64b..b6772a08d0e94 100644 --- a/google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_tracing_connection.cc +++ b/google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace compute_region_instance_groups_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RegionInstanceGroupsTracingConnection::RegionInstanceGroupsTracingConnection( std::shared_ptr< compute_region_instance_groups_v1::RegionInstanceGroupsConnection> @@ -107,20 +105,16 @@ RegionInstanceGroupsTracingConnection::SetNamedPorts( return internal::EndSpan(std::move(span), child_->SetNamedPorts(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr< compute_region_instance_groups_v1::RegionInstanceGroupsConnection> MakeRegionInstanceGroupsTracingConnection( std::shared_ptr< compute_region_instance_groups_v1::RegionInstanceGroupsConnection> conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_tracing_connection.h b/google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_tracing_connection.h index d330ef6103090..b938be2124e93 100644 --- a/google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_tracing_connection.h +++ b/google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace compute_region_instance_groups_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RegionInstanceGroupsTracingConnection : public compute_region_instance_groups_v1::RegionInstanceGroupsConnection { public: @@ -73,8 +71,6 @@ class RegionInstanceGroupsTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/region_instance_groups/v1/region_instance_groups_connection.h b/google/cloud/compute/region_instance_groups/v1/region_instance_groups_connection.h index c2586ee09b8aa..4f674000595ec 100644 --- a/google/cloud/compute/region_instance_groups/v1/region_instance_groups_connection.h +++ b/google/cloud/compute/region_instance_groups/v1/region_instance_groups_connection.h @@ -21,6 +21,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCE_GROUPS_V1_REGION_INSTANCE_GROUPS_CONNECTION_H #include "google/cloud/compute/region_instance_groups/v1/internal/region_instance_groups_retry_traits.h" +#include "google/cloud/compute/region_instance_groups/v1/region_instance_groups.pb.h" #include "google/cloud/compute/region_instance_groups/v1/region_instance_groups_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -31,7 +32,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_instance_groups/v1/region_instance_groups_connection_idempotency_policy.h b/google/cloud/compute/region_instance_groups/v1/region_instance_groups_connection_idempotency_policy.h index 519e25253cf6e..d2002fc52f5d9 100644 --- a/google/cloud/compute/region_instance_groups/v1/region_instance_groups_connection_idempotency_policy.h +++ b/google/cloud/compute/region_instance_groups/v1/region_instance_groups_connection_idempotency_policy.h @@ -20,9 +20,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCE_GROUPS_V1_REGION_INSTANCE_GROUPS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCE_GROUPS_V1_REGION_INSTANCE_GROUPS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/region_instance_groups/v1/region_instance_groups.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_instance_groups/v1/region_instance_groups_proto_export.h b/google/cloud/compute/region_instance_groups/v1/region_instance_groups_proto_export.h index 30f7cb2d984c1..4d1785ab2e343 100644 --- a/google/cloud/compute/region_instance_groups/v1/region_instance_groups_proto_export.h +++ b/google/cloud/compute/region_instance_groups/v1/region_instance_groups_proto_export.h @@ -26,10 +26,10 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCE_GROUPS_V1_REGION_INSTANCE_GROUPS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_059.pb.h" +#include "google/cloud/compute/v1/internal/common_083.pb.h" +#include "google/cloud/compute/v1/internal/common_103.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCE_GROUPS_V1_REGION_INSTANCE_GROUPS_PROTO_EXPORT_H diff --git a/google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_option_defaults.cc b/google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_option_defaults.cc index cda2d70a9c9e7..19a18f4e520d2 100644 --- a/google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_option_defaults.cc +++ b/google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_option_defaults.cc @@ -46,7 +46,7 @@ Options RegionInstanceTemplatesDefaultOptions(Options options) { RegionInstanceTemplatesRetryPolicyOption>( compute_region_instance_templates_v1:: RegionInstanceTemplatesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_rest_logging_decorator.h b/google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_rest_logging_decorator.h index 347a9b031dd4b..3e50e1c683d5f 100644 --- a/google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_rest_logging_decorator.h +++ b/google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_rest_logging_decorator.h @@ -21,12 +21,12 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCE_TEMPLATES_V1_INTERNAL_REGION_INSTANCE_TEMPLATES_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_rest_stub.h" +#include "google/cloud/compute/region_instance_templates/v1/region_instance_templates.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_rest_metadata_decorator.cc b/google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_rest_metadata_decorator.cc index d52ea5af6d98d..ffb3c1f3fdb5f 100644 --- a/google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_rest_metadata_decorator.cc +++ b/google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_rest_metadata_decorator.cc @@ -18,10 +18,10 @@ // google/cloud/compute/region_instance_templates/v1/region_instance_templates.proto #include "google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_rest_metadata_decorator.h b/google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_rest_metadata_decorator.h index d2c780b1807e2..b780da0f6eb87 100644 --- a/google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_rest_metadata_decorator.h +++ b/google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_rest_metadata_decorator.h @@ -21,11 +21,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCE_TEMPLATES_V1_INTERNAL_REGION_INSTANCE_TEMPLATES_REST_METADATA_DECORATOR_H #include "google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_rest_stub.h" +#include "google/cloud/compute/region_instance_templates/v1/region_instance_templates.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_rest_stub.cc b/google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_rest_stub.cc index 83438f4fb4cd9..4e29be2d70722 100644 --- a/google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_rest_stub.cc +++ b/google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_rest_stub.cc @@ -18,12 +18,12 @@ // google/cloud/compute/region_instance_templates/v1/region_instance_templates.proto #include "google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_rest_stub.h" +#include "google/cloud/compute/region_instance_templates/v1/region_instance_templates.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_rest_stub.h b/google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_rest_stub.h index a43f580905f17..d8e83f0c49138 100644 --- a/google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_rest_stub.h +++ b/google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_rest_stub.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCE_TEMPLATES_V1_INTERNAL_REGION_INSTANCE_TEMPLATES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCE_TEMPLATES_V1_INTERNAL_REGION_INSTANCE_TEMPLATES_REST_STUB_H +#include "google/cloud/compute/region_instance_templates/v1/region_instance_templates.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_tracing_connection.cc b/google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_tracing_connection.cc index 891d7268f7dac..2be0f27f6de40 100644 --- a/google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_tracing_connection.cc +++ b/google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace compute_region_instance_templates_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RegionInstanceTemplatesTracingConnection:: RegionInstanceTemplatesTracingConnection( std::shared_ptr MakeRegionInstanceTemplatesTracingConnection( std::shared_ptr< compute_region_instance_templates_v1::RegionInstanceTemplatesConnection> conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_tracing_connection.h b/google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_tracing_connection.h index 59ac012eb1475..06b1bf44432c1 100644 --- a/google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_tracing_connection.h +++ b/google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace compute_region_instance_templates_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RegionInstanceTemplatesTracingConnection : public compute_region_instance_templates_v1:: RegionInstanceTemplatesConnection { @@ -86,8 +84,6 @@ class RegionInstanceTemplatesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/region_instance_templates/v1/region_instance_templates_connection.h b/google/cloud/compute/region_instance_templates/v1/region_instance_templates_connection.h index 6be30c80ced53..b38d16ffd9021 100644 --- a/google/cloud/compute/region_instance_templates/v1/region_instance_templates_connection.h +++ b/google/cloud/compute/region_instance_templates/v1/region_instance_templates_connection.h @@ -21,6 +21,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCE_TEMPLATES_V1_REGION_INSTANCE_TEMPLATES_CONNECTION_H #include "google/cloud/compute/region_instance_templates/v1/internal/region_instance_templates_retry_traits.h" +#include "google/cloud/compute/region_instance_templates/v1/region_instance_templates.pb.h" #include "google/cloud/compute/region_instance_templates/v1/region_instance_templates_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -31,7 +32,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_instance_templates/v1/region_instance_templates_connection_idempotency_policy.h b/google/cloud/compute/region_instance_templates/v1/region_instance_templates_connection_idempotency_policy.h index 511ed02697a01..7675b61136356 100644 --- a/google/cloud/compute/region_instance_templates/v1/region_instance_templates_connection_idempotency_policy.h +++ b/google/cloud/compute/region_instance_templates/v1/region_instance_templates_connection_idempotency_policy.h @@ -20,9 +20,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCE_TEMPLATES_V1_REGION_INSTANCE_TEMPLATES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCE_TEMPLATES_V1_REGION_INSTANCE_TEMPLATES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/region_instance_templates/v1/region_instance_templates.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_instance_templates/v1/region_instance_templates_proto_export.h b/google/cloud/compute/region_instance_templates/v1/region_instance_templates_proto_export.h index 98789c49a7a5b..dcfd45d71cbce 100644 --- a/google/cloud/compute/region_instance_templates/v1/region_instance_templates_proto_export.h +++ b/google/cloud/compute/region_instance_templates/v1/region_instance_templates_proto_export.h @@ -26,14 +26,14 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCE_TEMPLATES_V1_REGION_INSTANCE_TEMPLATES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_001.pb.h" +#include "google/cloud/compute/v1/internal/common_003.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_021.pb.h" +#include "google/cloud/compute/v1/internal/common_024.pb.h" +#include "google/cloud/compute/v1/internal/common_029.pb.h" +#include "google/cloud/compute/v1/internal/common_033.pb.h" +#include "google/cloud/compute/v1/internal/common_081.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCE_TEMPLATES_V1_REGION_INSTANCE_TEMPLATES_PROTO_EXPORT_H diff --git a/google/cloud/compute/region_instances/v1/internal/region_instances_option_defaults.cc b/google/cloud/compute/region_instances/v1/internal/region_instances_option_defaults.cc index f0e6cf810eaba..0ce79ef880960 100644 --- a/google/cloud/compute/region_instances/v1/internal/region_instances_option_defaults.cc +++ b/google/cloud/compute/region_instances/v1/internal/region_instances_option_defaults.cc @@ -42,7 +42,7 @@ Options RegionInstancesDefaultOptions(Options options) { compute_region_instances_v1::RegionInstancesRetryPolicyOption>()) { options.set( compute_region_instances_v1::RegionInstancesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/compute/region_instances/v1/internal/region_instances_rest_connection_impl.h b/google/cloud/compute/region_instances/v1/internal/region_instances_rest_connection_impl.h index 7fdd4e30cde97..99656c48da093 100644 --- a/google/cloud/compute/region_instances/v1/internal/region_instances_rest_connection_impl.h +++ b/google/cloud/compute/region_instances/v1/internal/region_instances_rest_connection_impl.h @@ -24,12 +24,12 @@ #include "google/cloud/compute/region_instances/v1/region_instances_connection.h" #include "google/cloud/compute/region_instances/v1/region_instances_connection_idempotency_policy.h" #include "google/cloud/compute/region_instances/v1/region_instances_options.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/background_threads.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_instances/v1/internal/region_instances_rest_logging_decorator.h b/google/cloud/compute/region_instances/v1/internal/region_instances_rest_logging_decorator.h index 72f1397f28770..35047d264517b 100644 --- a/google/cloud/compute/region_instances/v1/internal/region_instances_rest_logging_decorator.h +++ b/google/cloud/compute/region_instances/v1/internal/region_instances_rest_logging_decorator.h @@ -20,12 +20,12 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCES_V1_INTERNAL_REGION_INSTANCES_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/region_instances/v1/internal/region_instances_rest_stub.h" +#include "google/cloud/compute/region_instances/v1/region_instances.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/region_instances/v1/internal/region_instances_rest_metadata_decorator.cc b/google/cloud/compute/region_instances/v1/internal/region_instances_rest_metadata_decorator.cc index 5f4d3c4975f17..6b04c59491478 100644 --- a/google/cloud/compute/region_instances/v1/internal/region_instances_rest_metadata_decorator.cc +++ b/google/cloud/compute/region_instances/v1/internal/region_instances_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/region_instances/v1/region_instances.proto #include "google/cloud/compute/region_instances/v1/internal/region_instances_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/region_instances/v1/internal/region_instances_rest_metadata_decorator.h b/google/cloud/compute/region_instances/v1/internal/region_instances_rest_metadata_decorator.h index aabd7730761dc..2a169ef765a96 100644 --- a/google/cloud/compute/region_instances/v1/internal/region_instances_rest_metadata_decorator.h +++ b/google/cloud/compute/region_instances/v1/internal/region_instances_rest_metadata_decorator.h @@ -20,11 +20,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCES_V1_INTERNAL_REGION_INSTANCES_REST_METADATA_DECORATOR_H #include "google/cloud/compute/region_instances/v1/internal/region_instances_rest_stub.h" +#include "google/cloud/compute/region_instances/v1/region_instances.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/region_instances/v1/internal/region_instances_rest_stub.cc b/google/cloud/compute/region_instances/v1/internal/region_instances_rest_stub.cc index 1b1348fff5a94..08f2304c1559b 100644 --- a/google/cloud/compute/region_instances/v1/internal/region_instances_rest_stub.cc +++ b/google/cloud/compute/region_instances/v1/internal/region_instances_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/region_instances/v1/region_instances.proto #include "google/cloud/compute/region_instances/v1/internal/region_instances_rest_stub.h" +#include "google/cloud/compute/region_instances/v1/region_instances.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/region_instances/v1/internal/region_instances_rest_stub.h b/google/cloud/compute/region_instances/v1/internal/region_instances_rest_stub.h index 6ef14264de647..99bd1076ce7e1 100644 --- a/google/cloud/compute/region_instances/v1/internal/region_instances_rest_stub.h +++ b/google/cloud/compute/region_instances/v1/internal/region_instances_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCES_V1_INTERNAL_REGION_INSTANCES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCES_V1_INTERNAL_REGION_INSTANCES_REST_STUB_H +#include "google/cloud/compute/region_instances/v1/region_instances.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/region_instances/v1/internal/region_instances_tracing_connection.cc b/google/cloud/compute/region_instances/v1/internal/region_instances_tracing_connection.cc index 0efa1b72a8631..32813d7b98b17 100644 --- a/google/cloud/compute/region_instances/v1/internal/region_instances_tracing_connection.cc +++ b/google/cloud/compute/region_instances/v1/internal/region_instances_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace compute_region_instances_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RegionInstancesTracingConnection::RegionInstancesTracingConnection( std::shared_ptr child) @@ -63,17 +61,13 @@ RegionInstancesTracingConnection::BulkInsert( return internal::EndSpan(std::move(span), child_->BulkInsert(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRegionInstancesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/region_instances/v1/internal/region_instances_tracing_connection.h b/google/cloud/compute/region_instances/v1/internal/region_instances_tracing_connection.h index 76fb4a3c1a356..c7106ccf5ad23 100644 --- a/google/cloud/compute/region_instances/v1/internal/region_instances_tracing_connection.h +++ b/google/cloud/compute/region_instances/v1/internal/region_instances_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_region_instances_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RegionInstancesTracingConnection : public compute_region_instances_v1::RegionInstancesConnection { public: @@ -57,8 +55,6 @@ class RegionInstancesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/region_instances/v1/region_instances_connection.h b/google/cloud/compute/region_instances/v1/region_instances_connection.h index c1571fc93186e..52d8215f7601c 100644 --- a/google/cloud/compute/region_instances/v1/region_instances_connection.h +++ b/google/cloud/compute/region_instances/v1/region_instances_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCES_V1_REGION_INSTANCES_CONNECTION_H #include "google/cloud/compute/region_instances/v1/internal/region_instances_retry_traits.h" +#include "google/cloud/compute/region_instances/v1/region_instances.pb.h" #include "google/cloud/compute/region_instances/v1/region_instances_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -29,7 +30,6 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_instances/v1/region_instances_connection_idempotency_policy.h b/google/cloud/compute/region_instances/v1/region_instances_connection_idempotency_policy.h index fd7e2555f0d55..1ac8c327f5aa3 100644 --- a/google/cloud/compute/region_instances/v1/region_instances_connection_idempotency_policy.h +++ b/google/cloud/compute/region_instances/v1/region_instances_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCES_V1_REGION_INSTANCES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCES_V1_REGION_INSTANCES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/region_instances/v1/region_instances.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_instances/v1/region_instances_proto_export.h b/google/cloud/compute/region_instances/v1/region_instances_proto_export.h index 70812da9a58fa..d80a7bdcbaec8 100644 --- a/google/cloud/compute/region_instances/v1/region_instances_proto_export.h +++ b/google/cloud/compute/region_instances/v1/region_instances_proto_export.h @@ -26,14 +26,14 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCES_V1_REGION_INSTANCES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_001.pb.h" +#include "google/cloud/compute/v1/internal/common_003.pb.h" +#include "google/cloud/compute/v1/internal/common_015.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_021.pb.h" +#include "google/cloud/compute/v1/internal/common_029.pb.h" +#include "google/cloud/compute/v1/internal/common_033.pb.h" +#include "google/cloud/compute/v1/internal/common_081.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANCES_V1_REGION_INSTANCES_PROTO_EXPORT_H diff --git a/google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_option_defaults.cc b/google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_option_defaults.cc index 305cfaced0983..4d7464d723037 100644 --- a/google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_option_defaults.cc +++ b/google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_option_defaults.cc @@ -46,7 +46,7 @@ Options RegionInstantSnapshotsDefaultOptions(Options options) { RegionInstantSnapshotsRetryPolicyOption>( compute_region_instant_snapshots_v1:: RegionInstantSnapshotsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_rest_logging_decorator.h b/google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_rest_logging_decorator.h index 6cb5f53f8b338..4549881263db8 100644 --- a/google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_rest_logging_decorator.h +++ b/google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_rest_logging_decorator.h @@ -21,12 +21,12 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANT_SNAPSHOTS_V1_INTERNAL_REGION_INSTANT_SNAPSHOTS_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_rest_stub.h" +#include "google/cloud/compute/region_instant_snapshots/v1/region_instant_snapshots.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_rest_metadata_decorator.cc b/google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_rest_metadata_decorator.cc index 2a8ddfe69817a..32d24562a5eba 100644 --- a/google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_rest_metadata_decorator.cc +++ b/google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_rest_metadata_decorator.cc @@ -18,10 +18,10 @@ // google/cloud/compute/region_instant_snapshots/v1/region_instant_snapshots.proto #include "google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_rest_metadata_decorator.h b/google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_rest_metadata_decorator.h index 5eb3dd1942a86..cbba5fd972294 100644 --- a/google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_rest_metadata_decorator.h +++ b/google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_rest_metadata_decorator.h @@ -21,11 +21,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANT_SNAPSHOTS_V1_INTERNAL_REGION_INSTANT_SNAPSHOTS_REST_METADATA_DECORATOR_H #include "google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_rest_stub.h" +#include "google/cloud/compute/region_instant_snapshots/v1/region_instant_snapshots.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_rest_stub.cc b/google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_rest_stub.cc index db95810560da9..33b77c91afe1a 100644 --- a/google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_rest_stub.cc +++ b/google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_rest_stub.cc @@ -18,12 +18,12 @@ // google/cloud/compute/region_instant_snapshots/v1/region_instant_snapshots.proto #include "google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_rest_stub.h" +#include "google/cloud/compute/region_instant_snapshots/v1/region_instant_snapshots.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_rest_stub.h b/google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_rest_stub.h index 56b65c0da5f5c..02eb11ae742fb 100644 --- a/google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_rest_stub.h +++ b/google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_rest_stub.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANT_SNAPSHOTS_V1_INTERNAL_REGION_INSTANT_SNAPSHOTS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANT_SNAPSHOTS_V1_INTERNAL_REGION_INSTANT_SNAPSHOTS_REST_STUB_H +#include "google/cloud/compute/region_instant_snapshots/v1/region_instant_snapshots.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_tracing_connection.cc b/google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_tracing_connection.cc index 22ef4a8f86a1e..fe968db893167 100644 --- a/google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_tracing_connection.cc +++ b/google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace compute_region_instant_snapshots_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RegionInstantSnapshotsTracingConnection:: RegionInstantSnapshotsTracingConnection( std::shared_ptrTestIamPermissions(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr< compute_region_instant_snapshots_v1::RegionInstantSnapshotsConnection> MakeRegionInstantSnapshotsTracingConnection( std::shared_ptr< compute_region_instant_snapshots_v1::RegionInstantSnapshotsConnection> conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_tracing_connection.h b/google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_tracing_connection.h index 331394e917294..b57b60df77c88 100644 --- a/google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_tracing_connection.h +++ b/google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace compute_region_instant_snapshots_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RegionInstantSnapshotsTracingConnection : public compute_region_instant_snapshots_v1:: RegionInstantSnapshotsConnection { @@ -108,8 +106,6 @@ class RegionInstantSnapshotsTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/region_instant_snapshots/v1/region_instant_snapshots_connection.h b/google/cloud/compute/region_instant_snapshots/v1/region_instant_snapshots_connection.h index fcbf100d61250..62cb69203513f 100644 --- a/google/cloud/compute/region_instant_snapshots/v1/region_instant_snapshots_connection.h +++ b/google/cloud/compute/region_instant_snapshots/v1/region_instant_snapshots_connection.h @@ -21,6 +21,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANT_SNAPSHOTS_V1_REGION_INSTANT_SNAPSHOTS_CONNECTION_H #include "google/cloud/compute/region_instant_snapshots/v1/internal/region_instant_snapshots_retry_traits.h" +#include "google/cloud/compute/region_instant_snapshots/v1/region_instant_snapshots.pb.h" #include "google/cloud/compute/region_instant_snapshots/v1/region_instant_snapshots_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -31,7 +32,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_instant_snapshots/v1/region_instant_snapshots_connection_idempotency_policy.h b/google/cloud/compute/region_instant_snapshots/v1/region_instant_snapshots_connection_idempotency_policy.h index f9b1f3359ba5d..4e26507123edf 100644 --- a/google/cloud/compute/region_instant_snapshots/v1/region_instant_snapshots_connection_idempotency_policy.h +++ b/google/cloud/compute/region_instant_snapshots/v1/region_instant_snapshots_connection_idempotency_policy.h @@ -20,9 +20,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANT_SNAPSHOTS_V1_REGION_INSTANT_SNAPSHOTS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANT_SNAPSHOTS_V1_REGION_INSTANT_SNAPSHOTS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/region_instant_snapshots/v1/region_instant_snapshots.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_instant_snapshots/v1/region_instant_snapshots_proto_export.h b/google/cloud/compute/region_instant_snapshots/v1/region_instant_snapshots_proto_export.h index e8c81feeeb5b6..1bbe01062fe9c 100644 --- a/google/cloud/compute/region_instant_snapshots/v1/region_instant_snapshots_proto_export.h +++ b/google/cloud/compute/region_instant_snapshots/v1/region_instant_snapshots_proto_export.h @@ -26,13 +26,13 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANT_SNAPSHOTS_V1_REGION_INSTANT_SNAPSHOTS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_007.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_031.pb.h" +#include "google/cloud/compute/v1/internal/common_066.pb.h" +#include "google/cloud/compute/v1/internal/common_107.pb.h" +#include "google/cloud/compute/v1/internal/common_108.pb.h" +#include "google/cloud/compute/v1/internal/common_145.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_INSTANT_SNAPSHOTS_V1_REGION_INSTANT_SNAPSHOTS_PROTO_EXPORT_H diff --git a/google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_option_defaults.cc b/google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_option_defaults.cc index c6d49ba053220..7a5aca2eea7ae 100644 --- a/google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_option_defaults.cc +++ b/google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_option_defaults.cc @@ -47,7 +47,7 @@ Options RegionNetworkEndpointGroupsDefaultOptions(Options options) { RegionNetworkEndpointGroupsRetryPolicyOption>( compute_region_network_endpoint_groups_v1:: RegionNetworkEndpointGroupsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_rest_logging_decorator.h b/google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_rest_logging_decorator.h index 1629b48b61701..a5b91e13ab7a3 100644 --- a/google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_rest_logging_decorator.h +++ b/google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_rest_logging_decorator.h @@ -21,12 +21,12 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_NETWORK_ENDPOINT_GROUPS_V1_INTERNAL_REGION_NETWORK_ENDPOINT_GROUPS_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_rest_stub.h" +#include "google/cloud/compute/region_network_endpoint_groups/v1/region_network_endpoint_groups.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_rest_metadata_decorator.cc b/google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_rest_metadata_decorator.cc index 0f553602713ef..a83581d7b594d 100644 --- a/google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_rest_metadata_decorator.cc +++ b/google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_rest_metadata_decorator.cc @@ -18,10 +18,10 @@ // google/cloud/compute/region_network_endpoint_groups/v1/region_network_endpoint_groups.proto #include "google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_rest_metadata_decorator.h b/google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_rest_metadata_decorator.h index 60dd9b0398816..3f1eb58cf087b 100644 --- a/google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_rest_metadata_decorator.h +++ b/google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_rest_metadata_decorator.h @@ -21,11 +21,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_NETWORK_ENDPOINT_GROUPS_V1_INTERNAL_REGION_NETWORK_ENDPOINT_GROUPS_REST_METADATA_DECORATOR_H #include "google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_rest_stub.h" +#include "google/cloud/compute/region_network_endpoint_groups/v1/region_network_endpoint_groups.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_rest_stub.cc b/google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_rest_stub.cc index 8a25dae5f4cab..c7fc9dac250b5 100644 --- a/google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_rest_stub.cc +++ b/google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_rest_stub.cc @@ -18,12 +18,12 @@ // google/cloud/compute/region_network_endpoint_groups/v1/region_network_endpoint_groups.proto #include "google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_rest_stub.h" +#include "google/cloud/compute/region_network_endpoint_groups/v1/region_network_endpoint_groups.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_rest_stub.h b/google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_rest_stub.h index 837b9fbef1366..a085cb8df0d1b 100644 --- a/google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_rest_stub.h +++ b/google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_rest_stub.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_NETWORK_ENDPOINT_GROUPS_V1_INTERNAL_REGION_NETWORK_ENDPOINT_GROUPS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_NETWORK_ENDPOINT_GROUPS_V1_INTERNAL_REGION_NETWORK_ENDPOINT_GROUPS_REST_STUB_H +#include "google/cloud/compute/region_network_endpoint_groups/v1/region_network_endpoint_groups.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_tracing_connection.cc b/google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_tracing_connection.cc index 3d5b9fb0a7db2..a5b360e840b79 100644 --- a/google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_tracing_connection.cc +++ b/google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace compute_region_network_endpoint_groups_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RegionNetworkEndpointGroupsTracingConnection:: RegionNetworkEndpointGroupsTracingConnection( std::shared_ptr MakeRegionNetworkEndpointGroupsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_tracing_connection.h b/google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_tracing_connection.h index 90d32a22d22d8..e7cb4c8ba8ccb 100644 --- a/google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_tracing_connection.h +++ b/google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace compute_region_network_endpoint_groups_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RegionNetworkEndpointGroupsTracingConnection : public compute_region_network_endpoint_groups_v1:: RegionNetworkEndpointGroupsConnection { @@ -123,8 +121,6 @@ class RegionNetworkEndpointGroupsTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/region_network_endpoint_groups/v1/region_network_endpoint_groups_connection.h b/google/cloud/compute/region_network_endpoint_groups/v1/region_network_endpoint_groups_connection.h index 65b1af822ef2c..e17d51fa1b18b 100644 --- a/google/cloud/compute/region_network_endpoint_groups/v1/region_network_endpoint_groups_connection.h +++ b/google/cloud/compute/region_network_endpoint_groups/v1/region_network_endpoint_groups_connection.h @@ -21,6 +21,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_NETWORK_ENDPOINT_GROUPS_V1_REGION_NETWORK_ENDPOINT_GROUPS_CONNECTION_H #include "google/cloud/compute/region_network_endpoint_groups/v1/internal/region_network_endpoint_groups_retry_traits.h" +#include "google/cloud/compute/region_network_endpoint_groups/v1/region_network_endpoint_groups.pb.h" #include "google/cloud/compute/region_network_endpoint_groups/v1/region_network_endpoint_groups_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -31,7 +32,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_network_endpoint_groups/v1/region_network_endpoint_groups_connection_idempotency_policy.h b/google/cloud/compute/region_network_endpoint_groups/v1/region_network_endpoint_groups_connection_idempotency_policy.h index edc2c52269283..95a817d926c44 100644 --- a/google/cloud/compute/region_network_endpoint_groups/v1/region_network_endpoint_groups_connection_idempotency_policy.h +++ b/google/cloud/compute/region_network_endpoint_groups/v1/region_network_endpoint_groups_connection_idempotency_policy.h @@ -20,9 +20,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_NETWORK_ENDPOINT_GROUPS_V1_REGION_NETWORK_ENDPOINT_GROUPS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_NETWORK_ENDPOINT_GROUPS_V1_REGION_NETWORK_ENDPOINT_GROUPS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/region_network_endpoint_groups/v1/region_network_endpoint_groups.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_network_endpoint_groups/v1/region_network_endpoint_groups_proto_export.h b/google/cloud/compute/region_network_endpoint_groups/v1/region_network_endpoint_groups_proto_export.h index e5477f91040b2..6e5138a5e1c7f 100644 --- a/google/cloud/compute/region_network_endpoint_groups/v1/region_network_endpoint_groups_proto_export.h +++ b/google/cloud/compute/region_network_endpoint_groups/v1/region_network_endpoint_groups_proto_export.h @@ -26,10 +26,10 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_NETWORK_ENDPOINT_GROUPS_V1_REGION_NETWORK_ENDPOINT_GROUPS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_012.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_049.pb.h" +#include "google/cloud/compute/v1/internal/common_105.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_NETWORK_ENDPOINT_GROUPS_V1_REGION_NETWORK_ENDPOINT_GROUPS_PROTO_EXPORT_H diff --git a/google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_option_defaults.cc b/google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_option_defaults.cc index 51aa9a2cb5f84..4a00e8210de0a 100644 --- a/google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_option_defaults.cc +++ b/google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_option_defaults.cc @@ -47,7 +47,7 @@ Options RegionNetworkFirewallPoliciesDefaultOptions(Options options) { RegionNetworkFirewallPoliciesRetryPolicyOption>( compute_region_network_firewall_policies_v1:: RegionNetworkFirewallPoliciesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_rest_logging_decorator.h b/google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_rest_logging_decorator.h index 5cc0408569f4d..c54d0bbac6b44 100644 --- a/google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_rest_logging_decorator.h +++ b/google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_rest_logging_decorator.h @@ -21,12 +21,12 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_NETWORK_FIREWALL_POLICIES_V1_INTERNAL_REGION_NETWORK_FIREWALL_POLICIES_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_rest_stub.h" +#include "google/cloud/compute/region_network_firewall_policies/v1/region_network_firewall_policies.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_rest_metadata_decorator.cc b/google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_rest_metadata_decorator.cc index 999fc19498f67..a26ab2ab58381 100644 --- a/google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_rest_metadata_decorator.cc +++ b/google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_rest_metadata_decorator.cc @@ -18,10 +18,10 @@ // google/cloud/compute/region_network_firewall_policies/v1/region_network_firewall_policies.proto #include "google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_rest_metadata_decorator.h b/google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_rest_metadata_decorator.h index b0b7d59b7b2ae..74d186d0bd399 100644 --- a/google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_rest_metadata_decorator.h +++ b/google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_rest_metadata_decorator.h @@ -21,11 +21,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_NETWORK_FIREWALL_POLICIES_V1_INTERNAL_REGION_NETWORK_FIREWALL_POLICIES_REST_METADATA_DECORATOR_H #include "google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_rest_stub.h" +#include "google/cloud/compute/region_network_firewall_policies/v1/region_network_firewall_policies.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_rest_stub.cc b/google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_rest_stub.cc index def7c0c3c64bf..8c4b2954d601d 100644 --- a/google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_rest_stub.cc +++ b/google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_rest_stub.cc @@ -18,12 +18,12 @@ // google/cloud/compute/region_network_firewall_policies/v1/region_network_firewall_policies.proto #include "google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_rest_stub.h" +#include "google/cloud/compute/region_network_firewall_policies/v1/region_network_firewall_policies.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_rest_stub.h b/google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_rest_stub.h index 2fe963e5da0ab..6846c3a013a23 100644 --- a/google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_rest_stub.h +++ b/google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_rest_stub.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_NETWORK_FIREWALL_POLICIES_V1_INTERNAL_REGION_NETWORK_FIREWALL_POLICIES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_NETWORK_FIREWALL_POLICIES_V1_INTERNAL_REGION_NETWORK_FIREWALL_POLICIES_REST_STUB_H +#include "google/cloud/compute/region_network_firewall_policies/v1/region_network_firewall_policies.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_tracing_connection.cc b/google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_tracing_connection.cc index 07833d6e9c957..747ca7fe4641e 100644 --- a/google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_tracing_connection.cc +++ b/google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace compute_region_network_firewall_policies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RegionNetworkFirewallPoliciesTracingConnection:: RegionNetworkFirewallPoliciesTracingConnection( std::shared_ptrTestIamPermissions(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRegionNetworkFirewallPoliciesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_tracing_connection.h b/google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_tracing_connection.h index a6d88540b935b..a4aac5082683c 100644 --- a/google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_tracing_connection.h +++ b/google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace compute_region_network_firewall_policies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RegionNetworkFirewallPoliciesTracingConnection : public compute_region_network_firewall_policies_v1:: RegionNetworkFirewallPoliciesConnection { @@ -202,8 +200,6 @@ class RegionNetworkFirewallPoliciesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/region_network_firewall_policies/v1/region_network_firewall_policies_connection.h b/google/cloud/compute/region_network_firewall_policies/v1/region_network_firewall_policies_connection.h index 4ed7837008e41..0106ca9ebc1da 100644 --- a/google/cloud/compute/region_network_firewall_policies/v1/region_network_firewall_policies_connection.h +++ b/google/cloud/compute/region_network_firewall_policies/v1/region_network_firewall_policies_connection.h @@ -21,6 +21,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_NETWORK_FIREWALL_POLICIES_V1_REGION_NETWORK_FIREWALL_POLICIES_CONNECTION_H #include "google/cloud/compute/region_network_firewall_policies/v1/internal/region_network_firewall_policies_retry_traits.h" +#include "google/cloud/compute/region_network_firewall_policies/v1/region_network_firewall_policies.pb.h" #include "google/cloud/compute/region_network_firewall_policies/v1/region_network_firewall_policies_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -31,7 +32,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_network_firewall_policies/v1/region_network_firewall_policies_connection_idempotency_policy.h b/google/cloud/compute/region_network_firewall_policies/v1/region_network_firewall_policies_connection_idempotency_policy.h index ac1b9d0c34140..4137bfaabfce7 100644 --- a/google/cloud/compute/region_network_firewall_policies/v1/region_network_firewall_policies_connection_idempotency_policy.h +++ b/google/cloud/compute/region_network_firewall_policies/v1/region_network_firewall_policies_connection_idempotency_policy.h @@ -20,9 +20,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_NETWORK_FIREWALL_POLICIES_V1_REGION_NETWORK_FIREWALL_POLICIES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_NETWORK_FIREWALL_POLICIES_V1_REGION_NETWORK_FIREWALL_POLICIES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/region_network_firewall_policies/v1/region_network_firewall_policies.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_network_firewall_policies/v1/region_network_firewall_policies_proto_export.h b/google/cloud/compute/region_network_firewall_policies/v1/region_network_firewall_policies_proto_export.h index 85ed79a883758..e46e7cb4a6351 100644 --- a/google/cloud/compute/region_network_firewall_policies/v1/region_network_firewall_policies_proto_export.h +++ b/google/cloud/compute/region_network_firewall_policies/v1/region_network_firewall_policies_proto_export.h @@ -26,15 +26,15 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_NETWORK_FIREWALL_POLICIES_V1_REGION_NETWORK_FIREWALL_POLICIES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_007.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_031.pb.h" +#include "google/cloud/compute/v1/internal/common_034.pb.h" +#include "google/cloud/compute/v1/internal/common_038.pb.h" +#include "google/cloud/compute/v1/internal/common_039.pb.h" +#include "google/cloud/compute/v1/internal/common_106.pb.h" +#include "google/cloud/compute/v1/internal/common_108.pb.h" +#include "google/cloud/compute/v1/internal/common_145.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_NETWORK_FIREWALL_POLICIES_V1_REGION_NETWORK_FIREWALL_POLICIES_PROTO_EXPORT_H diff --git a/google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_option_defaults.cc b/google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_option_defaults.cc index 200948123d1b7..bc2bc4e94e2cf 100644 --- a/google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_option_defaults.cc +++ b/google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_option_defaults.cc @@ -47,7 +47,7 @@ Options RegionNotificationEndpointsDefaultOptions(Options options) { RegionNotificationEndpointsRetryPolicyOption>( compute_region_notification_endpoints_v1:: RegionNotificationEndpointsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_rest_logging_decorator.h b/google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_rest_logging_decorator.h index 7e902b7049fb7..5f2f1501ee2e5 100644 --- a/google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_rest_logging_decorator.h +++ b/google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_rest_logging_decorator.h @@ -21,12 +21,12 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_NOTIFICATION_ENDPOINTS_V1_INTERNAL_REGION_NOTIFICATION_ENDPOINTS_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_rest_stub.h" +#include "google/cloud/compute/region_notification_endpoints/v1/region_notification_endpoints.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_rest_metadata_decorator.cc b/google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_rest_metadata_decorator.cc index 91270b5a1abea..08a4d93c5b81a 100644 --- a/google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_rest_metadata_decorator.cc +++ b/google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_rest_metadata_decorator.cc @@ -18,10 +18,10 @@ // google/cloud/compute/region_notification_endpoints/v1/region_notification_endpoints.proto #include "google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_rest_metadata_decorator.h b/google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_rest_metadata_decorator.h index 924e3a7dc623b..d149fd3e3fa23 100644 --- a/google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_rest_metadata_decorator.h +++ b/google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_rest_metadata_decorator.h @@ -21,11 +21,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_NOTIFICATION_ENDPOINTS_V1_INTERNAL_REGION_NOTIFICATION_ENDPOINTS_REST_METADATA_DECORATOR_H #include "google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_rest_stub.h" +#include "google/cloud/compute/region_notification_endpoints/v1/region_notification_endpoints.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_rest_stub.cc b/google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_rest_stub.cc index bc6635cdd1cc7..e6767501d82cd 100644 --- a/google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_rest_stub.cc +++ b/google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_rest_stub.cc @@ -18,12 +18,12 @@ // google/cloud/compute/region_notification_endpoints/v1/region_notification_endpoints.proto #include "google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_rest_stub.h" +#include "google/cloud/compute/region_notification_endpoints/v1/region_notification_endpoints.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_rest_stub.h b/google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_rest_stub.h index 574e758373f81..ceb581c607627 100644 --- a/google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_rest_stub.h +++ b/google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_rest_stub.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_NOTIFICATION_ENDPOINTS_V1_INTERNAL_REGION_NOTIFICATION_ENDPOINTS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_NOTIFICATION_ENDPOINTS_V1_INTERNAL_REGION_NOTIFICATION_ENDPOINTS_REST_STUB_H +#include "google/cloud/compute/region_notification_endpoints/v1/region_notification_endpoints.pb.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_tracing_connection.cc b/google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_tracing_connection.cc index dce894c7b37d6..72e64f5209ed5 100644 --- a/google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_tracing_connection.cc +++ b/google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace compute_region_notification_endpoints_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RegionNotificationEndpointsTracingConnection:: RegionNotificationEndpointsTracingConnection( std::shared_ptr MakeRegionNotificationEndpointsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_tracing_connection.h b/google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_tracing_connection.h index b75adcb18aa4b..e11257bce71fd 100644 --- a/google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_tracing_connection.h +++ b/google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace compute_region_notification_endpoints_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RegionNotificationEndpointsTracingConnection : public compute_region_notification_endpoints_v1:: RegionNotificationEndpointsConnection { @@ -90,8 +88,6 @@ class RegionNotificationEndpointsTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/region_notification_endpoints/v1/region_notification_endpoints_connection.h b/google/cloud/compute/region_notification_endpoints/v1/region_notification_endpoints_connection.h index 2d4baa9080b36..1f3f39fb505c2 100644 --- a/google/cloud/compute/region_notification_endpoints/v1/region_notification_endpoints_connection.h +++ b/google/cloud/compute/region_notification_endpoints/v1/region_notification_endpoints_connection.h @@ -21,6 +21,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_NOTIFICATION_ENDPOINTS_V1_REGION_NOTIFICATION_ENDPOINTS_CONNECTION_H #include "google/cloud/compute/region_notification_endpoints/v1/internal/region_notification_endpoints_retry_traits.h" +#include "google/cloud/compute/region_notification_endpoints/v1/region_notification_endpoints.pb.h" #include "google/cloud/compute/region_notification_endpoints/v1/region_notification_endpoints_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -31,7 +32,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_notification_endpoints/v1/region_notification_endpoints_connection_idempotency_policy.h b/google/cloud/compute/region_notification_endpoints/v1/region_notification_endpoints_connection_idempotency_policy.h index ba4915ecb49db..363d843a52fb6 100644 --- a/google/cloud/compute/region_notification_endpoints/v1/region_notification_endpoints_connection_idempotency_policy.h +++ b/google/cloud/compute/region_notification_endpoints/v1/region_notification_endpoints_connection_idempotency_policy.h @@ -20,9 +20,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_NOTIFICATION_ENDPOINTS_V1_REGION_NOTIFICATION_ENDPOINTS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_NOTIFICATION_ENDPOINTS_V1_REGION_NOTIFICATION_ENDPOINTS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/region_notification_endpoints/v1/region_notification_endpoints.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_notification_endpoints/v1/region_notification_endpoints_proto_export.h b/google/cloud/compute/region_notification_endpoints/v1/region_notification_endpoints_proto_export.h index 448babd845714..f2db8aff21857 100644 --- a/google/cloud/compute/region_notification_endpoints/v1/region_notification_endpoints_proto_export.h +++ b/google/cloud/compute/region_notification_endpoints/v1/region_notification_endpoints_proto_export.h @@ -26,9 +26,9 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_NOTIFICATION_ENDPOINTS_V1_REGION_NOTIFICATION_ENDPOINTS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_029.pb.h" +#include "google/cloud/compute/v1/internal/common_090.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_NOTIFICATION_ENDPOINTS_V1_REGION_NOTIFICATION_ENDPOINTS_PROTO_EXPORT_H diff --git a/google/cloud/compute/region_operations/v1/internal/region_operations_option_defaults.cc b/google/cloud/compute/region_operations/v1/internal/region_operations_option_defaults.cc index bc802a216a58c..4e34bf18ea042 100644 --- a/google/cloud/compute/region_operations/v1/internal/region_operations_option_defaults.cc +++ b/google/cloud/compute/region_operations/v1/internal/region_operations_option_defaults.cc @@ -43,7 +43,7 @@ Options RegionOperationsDefaultOptions(Options options) { options.set< compute_region_operations_v1::RegionOperationsRetryPolicyOption>( compute_region_operations_v1::RegionOperationsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include #include #include diff --git a/google/cloud/compute/region_operations/v1/internal/region_operations_rest_metadata_decorator.cc b/google/cloud/compute/region_operations/v1/internal/region_operations_rest_metadata_decorator.cc index 78bf7ffe9f7c5..4eb3e5be7d6ad 100644 --- a/google/cloud/compute/region_operations/v1/internal/region_operations_rest_metadata_decorator.cc +++ b/google/cloud/compute/region_operations/v1/internal/region_operations_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/region_operations/v1/region_operations.proto #include "google/cloud/compute/region_operations/v1/internal/region_operations_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/region_operations/v1/internal/region_operations_rest_metadata_decorator.h b/google/cloud/compute/region_operations/v1/internal/region_operations_rest_metadata_decorator.h index 19a5ba64f9c6e..8758a2d5b26d0 100644 --- a/google/cloud/compute/region_operations/v1/internal/region_operations_rest_metadata_decorator.h +++ b/google/cloud/compute/region_operations/v1/internal/region_operations_rest_metadata_decorator.h @@ -20,10 +20,10 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_OPERATIONS_V1_INTERNAL_REGION_OPERATIONS_REST_METADATA_DECORATOR_H #include "google/cloud/compute/region_operations/v1/internal/region_operations_rest_stub.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/compute/region_operations/v1/internal/region_operations_rest_stub.cc b/google/cloud/compute/region_operations/v1/internal/region_operations_rest_stub.cc index f8a7b1b90bf79..10406f71ff212 100644 --- a/google/cloud/compute/region_operations/v1/internal/region_operations_rest_stub.cc +++ b/google/cloud/compute/region_operations/v1/internal/region_operations_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/compute/region_operations/v1/region_operations.proto #include "google/cloud/compute/region_operations/v1/internal/region_operations_rest_stub.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/region_operations/v1/internal/region_operations_rest_stub.h b/google/cloud/compute/region_operations/v1/internal/region_operations_rest_stub.h index fefd0b193a9f2..7d61dd7eb9d47 100644 --- a/google/cloud/compute/region_operations/v1/internal/region_operations_rest_stub.h +++ b/google/cloud/compute/region_operations/v1/internal/region_operations_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_OPERATIONS_V1_INTERNAL_REGION_OPERATIONS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_OPERATIONS_V1_INTERNAL_REGION_OPERATIONS_REST_STUB_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_operations/v1/internal/region_operations_tracing_connection.cc b/google/cloud/compute/region_operations/v1/internal/region_operations_tracing_connection.cc index 10667a410b1c5..800d1d67330a2 100644 --- a/google/cloud/compute/region_operations/v1/internal/region_operations_tracing_connection.cc +++ b/google/cloud/compute/region_operations/v1/internal/region_operations_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_region_operations_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RegionOperationsTracingConnection::RegionOperationsTracingConnection( std::shared_ptr child) @@ -78,17 +76,13 @@ RegionOperationsTracingConnection::Wait( return internal::EndSpan(*span, child_->Wait(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRegionOperationsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/region_operations/v1/internal/region_operations_tracing_connection.h b/google/cloud/compute/region_operations/v1/internal/region_operations_tracing_connection.h index c6d906f7d6164..76032a4425601 100644 --- a/google/cloud/compute/region_operations/v1/internal/region_operations_tracing_connection.h +++ b/google/cloud/compute/region_operations/v1/internal/region_operations_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_region_operations_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RegionOperationsTracingConnection : public compute_region_operations_v1::RegionOperationsConnection { public: @@ -61,8 +59,6 @@ class RegionOperationsTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/region_operations/v1/region_operations_connection.h b/google/cloud/compute/region_operations/v1/region_operations_connection.h index e4cdf15fb0d28..50e3d5d6345da 100644 --- a/google/cloud/compute/region_operations/v1/region_operations_connection.h +++ b/google/cloud/compute/region_operations/v1/region_operations_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_OPERATIONS_V1_REGION_OPERATIONS_CONNECTION_H #include "google/cloud/compute/region_operations/v1/internal/region_operations_retry_traits.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/region_operations/v1/region_operations_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_operations/v1/region_operations_connection_idempotency_policy.h b/google/cloud/compute/region_operations/v1/region_operations_connection_idempotency_policy.h index add5932223a06..4892e13f90f84 100644 --- a/google/cloud/compute/region_operations/v1/region_operations_connection_idempotency_policy.h +++ b/google/cloud/compute/region_operations/v1/region_operations_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_OPERATIONS_V1_REGION_OPERATIONS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_OPERATIONS_V1_REGION_OPERATIONS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_operations/v1/region_operations_proto_export.h b/google/cloud/compute/region_operations/v1/region_operations_proto_export.h index cd3e9fce976a6..16e0afa4ae4e8 100644 --- a/google/cloud/compute/region_operations/v1/region_operations_proto_export.h +++ b/google/cloud/compute/region_operations/v1/region_operations_proto_export.h @@ -26,8 +26,8 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_OPERATIONS_V1_REGION_OPERATIONS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_092.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_OPERATIONS_V1_REGION_OPERATIONS_PROTO_EXPORT_H diff --git a/google/cloud/compute/region_security_policies/v1/internal/region_security_policies_option_defaults.cc b/google/cloud/compute/region_security_policies/v1/internal/region_security_policies_option_defaults.cc index ac821e6c9d3ac..55112811f0541 100644 --- a/google/cloud/compute/region_security_policies/v1/internal/region_security_policies_option_defaults.cc +++ b/google/cloud/compute/region_security_policies/v1/internal/region_security_policies_option_defaults.cc @@ -46,7 +46,7 @@ Options RegionSecurityPoliciesDefaultOptions(Options options) { RegionSecurityPoliciesRetryPolicyOption>( compute_region_security_policies_v1:: RegionSecurityPoliciesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/region_security_policies/v1/internal/region_security_policies_rest_logging_decorator.h b/google/cloud/compute/region_security_policies/v1/internal/region_security_policies_rest_logging_decorator.h index 2872615f3c161..60db561a97938 100644 --- a/google/cloud/compute/region_security_policies/v1/internal/region_security_policies_rest_logging_decorator.h +++ b/google/cloud/compute/region_security_policies/v1/internal/region_security_policies_rest_logging_decorator.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_SECURITY_POLICIES_V1_INTERNAL_REGION_SECURITY_POLICIES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_SECURITY_POLICIES_V1_INTERNAL_REGION_SECURITY_POLICIES_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/region_security_policies/v1/internal/region_security_policies_rest_stub.h" +#include "google/cloud/compute/region_security_policies/v1/region_security_policies.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/region_security_policies/v1/internal/region_security_policies_rest_metadata_decorator.cc b/google/cloud/compute/region_security_policies/v1/internal/region_security_policies_rest_metadata_decorator.cc index 46274d0cb9fbc..1d5550fa27018 100644 --- a/google/cloud/compute/region_security_policies/v1/internal/region_security_policies_rest_metadata_decorator.cc +++ b/google/cloud/compute/region_security_policies/v1/internal/region_security_policies_rest_metadata_decorator.cc @@ -18,10 +18,10 @@ // google/cloud/compute/region_security_policies/v1/region_security_policies.proto #include "google/cloud/compute/region_security_policies/v1/internal/region_security_policies_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/region_security_policies/v1/internal/region_security_policies_rest_metadata_decorator.h b/google/cloud/compute/region_security_policies/v1/internal/region_security_policies_rest_metadata_decorator.h index a14ae6357de2c..0a61951a6917b 100644 --- a/google/cloud/compute/region_security_policies/v1/internal/region_security_policies_rest_metadata_decorator.h +++ b/google/cloud/compute/region_security_policies/v1/internal/region_security_policies_rest_metadata_decorator.h @@ -20,12 +20,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_SECURITY_POLICIES_V1_INTERNAL_REGION_SECURITY_POLICIES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_SECURITY_POLICIES_V1_INTERNAL_REGION_SECURITY_POLICIES_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/region_security_policies/v1/internal/region_security_policies_rest_stub.h" +#include "google/cloud/compute/region_security_policies/v1/region_security_policies.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/region_security_policies/v1/internal/region_security_policies_rest_stub.cc b/google/cloud/compute/region_security_policies/v1/internal/region_security_policies_rest_stub.cc index adf76b8fd70d4..cb6f86b997d2a 100644 --- a/google/cloud/compute/region_security_policies/v1/internal/region_security_policies_rest_stub.cc +++ b/google/cloud/compute/region_security_policies/v1/internal/region_security_policies_rest_stub.cc @@ -18,12 +18,12 @@ // google/cloud/compute/region_security_policies/v1/region_security_policies.proto #include "google/cloud/compute/region_security_policies/v1/internal/region_security_policies_rest_stub.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" +#include "google/cloud/compute/region_security_policies/v1/region_security_policies.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/region_security_policies/v1/internal/region_security_policies_rest_stub.h b/google/cloud/compute/region_security_policies/v1/internal/region_security_policies_rest_stub.h index 8f2b65ae1165e..b5a097bfdcf04 100644 --- a/google/cloud/compute/region_security_policies/v1/internal/region_security_policies_rest_stub.h +++ b/google/cloud/compute/region_security_policies/v1/internal/region_security_policies_rest_stub.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_SECURITY_POLICIES_V1_INTERNAL_REGION_SECURITY_POLICIES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_SECURITY_POLICIES_V1_INTERNAL_REGION_SECURITY_POLICIES_REST_STUB_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" +#include "google/cloud/compute/region_security_policies/v1/region_security_policies.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/region_security_policies/v1/internal/region_security_policies_tracing_connection.cc b/google/cloud/compute/region_security_policies/v1/internal/region_security_policies_tracing_connection.cc index 05574e88e5415..f9ed523bd7552 100644 --- a/google/cloud/compute/region_security_policies/v1/internal/region_security_policies_tracing_connection.cc +++ b/google/cloud/compute/region_security_policies/v1/internal/region_security_policies_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace compute_region_security_policies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RegionSecurityPoliciesTracingConnection:: RegionSecurityPoliciesTracingConnection( std::shared_ptrSetLabels(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr< compute_region_security_policies_v1::RegionSecurityPoliciesConnection> MakeRegionSecurityPoliciesTracingConnection( std::shared_ptr< compute_region_security_policies_v1::RegionSecurityPoliciesConnection> conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/region_security_policies/v1/internal/region_security_policies_tracing_connection.h b/google/cloud/compute/region_security_policies/v1/internal/region_security_policies_tracing_connection.h index 2de11377df9c5..d417429bfebd0 100644 --- a/google/cloud/compute/region_security_policies/v1/internal/region_security_policies_tracing_connection.h +++ b/google/cloud/compute/region_security_policies/v1/internal/region_security_policies_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace compute_region_security_policies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RegionSecurityPoliciesTracingConnection : public compute_region_security_policies_v1:: RegionSecurityPoliciesConnection { @@ -146,8 +144,6 @@ class RegionSecurityPoliciesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/region_security_policies/v1/region_security_policies_connection.h b/google/cloud/compute/region_security_policies/v1/region_security_policies_connection.h index f39d281e9e424..df42296c04197 100644 --- a/google/cloud/compute/region_security_policies/v1/region_security_policies_connection.h +++ b/google/cloud/compute/region_security_policies/v1/region_security_policies_connection.h @@ -21,6 +21,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_SECURITY_POLICIES_V1_REGION_SECURITY_POLICIES_CONNECTION_H #include "google/cloud/compute/region_security_policies/v1/internal/region_security_policies_retry_traits.h" +#include "google/cloud/compute/region_security_policies/v1/region_security_policies.pb.h" #include "google/cloud/compute/region_security_policies/v1/region_security_policies_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -31,7 +32,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_security_policies/v1/region_security_policies_connection_idempotency_policy.h b/google/cloud/compute/region_security_policies/v1/region_security_policies_connection_idempotency_policy.h index dc89ae9b910b5..b74ad9dbe4b94 100644 --- a/google/cloud/compute/region_security_policies/v1/region_security_policies_connection_idempotency_policy.h +++ b/google/cloud/compute/region_security_policies/v1/region_security_policies_connection_idempotency_policy.h @@ -20,9 +20,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_SECURITY_POLICIES_V1_REGION_SECURITY_POLICIES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_SECURITY_POLICIES_V1_REGION_SECURITY_POLICIES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/region_security_policies/v1/region_security_policies.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_security_policies/v1/region_security_policies_proto_export.h b/google/cloud/compute/region_security_policies/v1/region_security_policies_proto_export.h index 0d0dccc2b84f9..dc572e34b9865 100644 --- a/google/cloud/compute/region_security_policies/v1/region_security_policies_proto_export.h +++ b/google/cloud/compute/region_security_policies/v1/region_security_policies_proto_export.h @@ -26,10 +26,10 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_SECURITY_POLICIES_V1_REGION_SECURITY_POLICIES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_031.pb.h" +#include "google/cloud/compute/v1/internal/common_107.pb.h" +#include "google/cloud/compute/v1/internal/common_117.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_SECURITY_POLICIES_V1_REGION_SECURITY_POLICIES_PROTO_EXPORT_H diff --git a/google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_option_defaults.cc b/google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_option_defaults.cc index 78d96964d7aff..593b0b7324882 100644 --- a/google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_option_defaults.cc +++ b/google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_option_defaults.cc @@ -46,7 +46,7 @@ Options RegionSslCertificatesDefaultOptions(Options options) { RegionSslCertificatesRetryPolicyOption>( compute_region_ssl_certificates_v1:: RegionSslCertificatesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_rest_logging_decorator.h b/google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_rest_logging_decorator.h index d2b7ab2d21ac5..e23d99b69db84 100644 --- a/google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_rest_logging_decorator.h +++ b/google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_rest_logging_decorator.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_SSL_CERTIFICATES_V1_INTERNAL_REGION_SSL_CERTIFICATES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_SSL_CERTIFICATES_V1_INTERNAL_REGION_SSL_CERTIFICATES_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_rest_stub.h" +#include "google/cloud/compute/region_ssl_certificates/v1/region_ssl_certificates.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_rest_metadata_decorator.cc b/google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_rest_metadata_decorator.cc index d4f49e025f743..7ea0b8c57fb8b 100644 --- a/google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_rest_metadata_decorator.cc +++ b/google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_rest_metadata_decorator.cc @@ -18,10 +18,10 @@ // google/cloud/compute/region_ssl_certificates/v1/region_ssl_certificates.proto #include "google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_rest_metadata_decorator.h b/google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_rest_metadata_decorator.h index c99e103112dcd..f402de9c3309c 100644 --- a/google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_rest_metadata_decorator.h +++ b/google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_rest_metadata_decorator.h @@ -20,12 +20,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_SSL_CERTIFICATES_V1_INTERNAL_REGION_SSL_CERTIFICATES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_SSL_CERTIFICATES_V1_INTERNAL_REGION_SSL_CERTIFICATES_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_rest_stub.h" +#include "google/cloud/compute/region_ssl_certificates/v1/region_ssl_certificates.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_rest_stub.cc b/google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_rest_stub.cc index e206a396b718f..4ce68f9735391 100644 --- a/google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_rest_stub.cc +++ b/google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_rest_stub.cc @@ -18,12 +18,12 @@ // google/cloud/compute/region_ssl_certificates/v1/region_ssl_certificates.proto #include "google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_rest_stub.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" +#include "google/cloud/compute/region_ssl_certificates/v1/region_ssl_certificates.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_rest_stub.h b/google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_rest_stub.h index 740ae7115f490..38fe32cbecbbd 100644 --- a/google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_rest_stub.h +++ b/google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_rest_stub.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_SSL_CERTIFICATES_V1_INTERNAL_REGION_SSL_CERTIFICATES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_SSL_CERTIFICATES_V1_INTERNAL_REGION_SSL_CERTIFICATES_REST_STUB_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" +#include "google/cloud/compute/region_ssl_certificates/v1/region_ssl_certificates.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_tracing_connection.cc b/google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_tracing_connection.cc index f9bf20c533d30..53849fada216c 100644 --- a/google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_tracing_connection.cc +++ b/google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace compute_region_ssl_certificates_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RegionSslCertificatesTracingConnection::RegionSslCertificatesTracingConnection( std::shared_ptr< compute_region_ssl_certificates_v1::RegionSslCertificatesConnection> @@ -131,20 +129,16 @@ RegionSslCertificatesTracingConnection::ListRegionSslCertificates( std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr< compute_region_ssl_certificates_v1::RegionSslCertificatesConnection> MakeRegionSslCertificatesTracingConnection( std::shared_ptr< compute_region_ssl_certificates_v1::RegionSslCertificatesConnection> conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_tracing_connection.h b/google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_tracing_connection.h index dd281b6fefcd7..c71615b356e9b 100644 --- a/google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_tracing_connection.h +++ b/google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace compute_region_ssl_certificates_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RegionSslCertificatesTracingConnection : public compute_region_ssl_certificates_v1:: RegionSslCertificatesConnection { @@ -85,8 +83,6 @@ class RegionSslCertificatesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/region_ssl_certificates/v1/region_ssl_certificates_connection.h b/google/cloud/compute/region_ssl_certificates/v1/region_ssl_certificates_connection.h index 0eca5b1a03b88..4d2aadedf8d21 100644 --- a/google/cloud/compute/region_ssl_certificates/v1/region_ssl_certificates_connection.h +++ b/google/cloud/compute/region_ssl_certificates/v1/region_ssl_certificates_connection.h @@ -21,6 +21,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_SSL_CERTIFICATES_V1_REGION_SSL_CERTIFICATES_CONNECTION_H #include "google/cloud/compute/region_ssl_certificates/v1/internal/region_ssl_certificates_retry_traits.h" +#include "google/cloud/compute/region_ssl_certificates/v1/region_ssl_certificates.pb.h" #include "google/cloud/compute/region_ssl_certificates/v1/region_ssl_certificates_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -31,7 +32,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_ssl_certificates/v1/region_ssl_certificates_connection_idempotency_policy.h b/google/cloud/compute/region_ssl_certificates/v1/region_ssl_certificates_connection_idempotency_policy.h index 95de6079594be..e19d4988a4e45 100644 --- a/google/cloud/compute/region_ssl_certificates/v1/region_ssl_certificates_connection_idempotency_policy.h +++ b/google/cloud/compute/region_ssl_certificates/v1/region_ssl_certificates_connection_idempotency_policy.h @@ -20,9 +20,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_SSL_CERTIFICATES_V1_REGION_SSL_CERTIFICATES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_SSL_CERTIFICATES_V1_REGION_SSL_CERTIFICATES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/region_ssl_certificates/v1/region_ssl_certificates.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_ssl_certificates/v1/region_ssl_certificates_proto_export.h b/google/cloud/compute/region_ssl_certificates/v1/region_ssl_certificates_proto_export.h index 23d7abfcb1a68..53f07c86c3bab 100644 --- a/google/cloud/compute/region_ssl_certificates/v1/region_ssl_certificates_proto_export.h +++ b/google/cloud/compute/region_ssl_certificates/v1/region_ssl_certificates_proto_export.h @@ -26,8 +26,8 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_SSL_CERTIFICATES_V1_REGION_SSL_CERTIFICATES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_125.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_SSL_CERTIFICATES_V1_REGION_SSL_CERTIFICATES_PROTO_EXPORT_H diff --git a/google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_option_defaults.cc b/google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_option_defaults.cc index 58f9c602690a9..972e108782c47 100644 --- a/google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_option_defaults.cc +++ b/google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_option_defaults.cc @@ -44,7 +44,7 @@ Options RegionSslPoliciesDefaultOptions(Options options) { options.set< compute_region_ssl_policies_v1::RegionSslPoliciesRetryPolicyOption>( compute_region_ssl_policies_v1::RegionSslPoliciesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_rest_logging_decorator.h b/google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_rest_logging_decorator.h index 32cafd8bf7a23..0ca98dc103178 100644 --- a/google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_rest_logging_decorator.h +++ b/google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_SSL_POLICIES_V1_INTERNAL_REGION_SSL_POLICIES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_SSL_POLICIES_V1_INTERNAL_REGION_SSL_POLICIES_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_rest_stub.h" +#include "google/cloud/compute/region_ssl_policies/v1/region_ssl_policies.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_rest_metadata_decorator.cc b/google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_rest_metadata_decorator.cc index dd2ae88ec71fe..24318cc2a9665 100644 --- a/google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_rest_metadata_decorator.cc +++ b/google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/region_ssl_policies/v1/region_ssl_policies.proto #include "google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_rest_metadata_decorator.h b/google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_rest_metadata_decorator.h index 4193441636897..4f7fa6d7d8ade 100644 --- a/google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_rest_metadata_decorator.h +++ b/google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_SSL_POLICIES_V1_INTERNAL_REGION_SSL_POLICIES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_SSL_POLICIES_V1_INTERNAL_REGION_SSL_POLICIES_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_rest_stub.h" +#include "google/cloud/compute/region_ssl_policies/v1/region_ssl_policies.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_rest_stub.cc b/google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_rest_stub.cc index 5232e384a6b5a..eec2c3b41ae41 100644 --- a/google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_rest_stub.cc +++ b/google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/region_ssl_policies/v1/region_ssl_policies.proto #include "google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_rest_stub.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" +#include "google/cloud/compute/region_ssl_policies/v1/region_ssl_policies.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_rest_stub.h b/google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_rest_stub.h index 127383c34e39c..6b97f77a54e68 100644 --- a/google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_rest_stub.h +++ b/google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_SSL_POLICIES_V1_INTERNAL_REGION_SSL_POLICIES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_SSL_POLICIES_V1_INTERNAL_REGION_SSL_POLICIES_REST_STUB_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" +#include "google/cloud/compute/region_ssl_policies/v1/region_ssl_policies.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_tracing_connection.cc b/google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_tracing_connection.cc index 7c47d434c1a0d..9684473e78494 100644 --- a/google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_tracing_connection.cc +++ b/google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_region_ssl_policies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RegionSslPoliciesTracingConnection::RegionSslPoliciesTracingConnection( std::shared_ptr child) @@ -170,18 +168,14 @@ RegionSslPoliciesTracingConnection::PatchSslPolicy( return internal::EndSpan(std::move(span), child_->PatchSslPolicy(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRegionSslPoliciesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_tracing_connection.h b/google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_tracing_connection.h index b2a4d540befed..0e845fbaf3fb9 100644 --- a/google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_tracing_connection.h +++ b/google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_region_ssl_policies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RegionSslPoliciesTracingConnection : public compute_region_ssl_policies_v1::RegionSslPoliciesConnection { public: @@ -94,8 +92,6 @@ class RegionSslPoliciesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/region_ssl_policies/v1/region_ssl_policies_connection.h b/google/cloud/compute/region_ssl_policies/v1/region_ssl_policies_connection.h index 15aa268f40c18..a016f0f17e7eb 100644 --- a/google/cloud/compute/region_ssl_policies/v1/region_ssl_policies_connection.h +++ b/google/cloud/compute/region_ssl_policies/v1/region_ssl_policies_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_SSL_POLICIES_V1_REGION_SSL_POLICIES_CONNECTION_H #include "google/cloud/compute/region_ssl_policies/v1/internal/region_ssl_policies_retry_traits.h" +#include "google/cloud/compute/region_ssl_policies/v1/region_ssl_policies.pb.h" #include "google/cloud/compute/region_ssl_policies/v1/region_ssl_policies_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_ssl_policies/v1/region_ssl_policies_connection_idempotency_policy.h b/google/cloud/compute/region_ssl_policies/v1/region_ssl_policies_connection_idempotency_policy.h index bdb01636d1845..76cc1400f5f1f 100644 --- a/google/cloud/compute/region_ssl_policies/v1/region_ssl_policies_connection_idempotency_policy.h +++ b/google/cloud/compute/region_ssl_policies/v1/region_ssl_policies_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_SSL_POLICIES_V1_REGION_SSL_POLICIES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_SSL_POLICIES_V1_REGION_SSL_POLICIES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/region_ssl_policies/v1/region_ssl_policies.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_ssl_policies/v1/region_ssl_policies_proto_export.h b/google/cloud/compute/region_ssl_policies/v1/region_ssl_policies_proto_export.h index 63a7330380069..d14a283cdc0f8 100644 --- a/google/cloud/compute/region_ssl_policies/v1/region_ssl_policies_proto_export.h +++ b/google/cloud/compute/region_ssl_policies/v1/region_ssl_policies_proto_export.h @@ -26,8 +26,8 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_SSL_POLICIES_V1_REGION_SSL_POLICIES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_128.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_SSL_POLICIES_V1_REGION_SSL_POLICIES_PROTO_EXPORT_H diff --git a/google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_option_defaults.cc b/google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_option_defaults.cc index fc9f2179f1919..1af4cd916b9e4 100644 --- a/google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_option_defaults.cc +++ b/google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_option_defaults.cc @@ -47,7 +47,7 @@ Options RegionTargetHttpProxiesDefaultOptions(Options options) { RegionTargetHttpProxiesRetryPolicyOption>( compute_region_target_http_proxies_v1:: RegionTargetHttpProxiesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_rest_logging_decorator.h b/google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_rest_logging_decorator.h index e0de07cda6486..52754dac4b277 100644 --- a/google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_rest_logging_decorator.h +++ b/google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_rest_logging_decorator.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_TARGET_HTTP_PROXIES_V1_INTERNAL_REGION_TARGET_HTTP_PROXIES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_TARGET_HTTP_PROXIES_V1_INTERNAL_REGION_TARGET_HTTP_PROXIES_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_rest_stub.h" +#include "google/cloud/compute/region_target_http_proxies/v1/region_target_http_proxies.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_rest_metadata_decorator.cc b/google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_rest_metadata_decorator.cc index e48956ddd013a..80aa4351183e9 100644 --- a/google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_rest_metadata_decorator.cc +++ b/google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_rest_metadata_decorator.cc @@ -18,10 +18,10 @@ // google/cloud/compute/region_target_http_proxies/v1/region_target_http_proxies.proto #include "google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_rest_metadata_decorator.h b/google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_rest_metadata_decorator.h index bfbeb0615b1ac..b4ef5df49c81f 100644 --- a/google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_rest_metadata_decorator.h +++ b/google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_rest_metadata_decorator.h @@ -20,12 +20,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_TARGET_HTTP_PROXIES_V1_INTERNAL_REGION_TARGET_HTTP_PROXIES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_TARGET_HTTP_PROXIES_V1_INTERNAL_REGION_TARGET_HTTP_PROXIES_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_rest_stub.h" +#include "google/cloud/compute/region_target_http_proxies/v1/region_target_http_proxies.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_rest_stub.cc b/google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_rest_stub.cc index c0925bcb97c35..d7ae7c2bf4058 100644 --- a/google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_rest_stub.cc +++ b/google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_rest_stub.cc @@ -18,12 +18,12 @@ // google/cloud/compute/region_target_http_proxies/v1/region_target_http_proxies.proto #include "google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_rest_stub.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" +#include "google/cloud/compute/region_target_http_proxies/v1/region_target_http_proxies.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_rest_stub.h b/google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_rest_stub.h index 4da5a139dc961..8c6e2981a5faf 100644 --- a/google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_rest_stub.h +++ b/google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_rest_stub.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_TARGET_HTTP_PROXIES_V1_INTERNAL_REGION_TARGET_HTTP_PROXIES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_TARGET_HTTP_PROXIES_V1_INTERNAL_REGION_TARGET_HTTP_PROXIES_REST_STUB_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" +#include "google/cloud/compute/region_target_http_proxies/v1/region_target_http_proxies.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_tracing_connection.cc b/google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_tracing_connection.cc index a61563788ad34..0072cfda416d1 100644 --- a/google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_tracing_connection.cc +++ b/google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace compute_region_target_http_proxies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RegionTargetHttpProxiesTracingConnection:: RegionTargetHttpProxiesTracingConnection( std::shared_ptrSetUrlMap(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr< compute_region_target_http_proxies_v1::RegionTargetHttpProxiesConnection> MakeRegionTargetHttpProxiesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_tracing_connection.h b/google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_tracing_connection.h index 1c72fa6bd9aa2..ecb629dca46c3 100644 --- a/google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_tracing_connection.h +++ b/google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace compute_region_target_http_proxies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RegionTargetHttpProxiesTracingConnection : public compute_region_target_http_proxies_v1:: RegionTargetHttpProxiesConnection { @@ -96,8 +94,6 @@ class RegionTargetHttpProxiesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/region_target_http_proxies/v1/region_target_http_proxies_connection.h b/google/cloud/compute/region_target_http_proxies/v1/region_target_http_proxies_connection.h index 1b65284352522..df33511f671be 100644 --- a/google/cloud/compute/region_target_http_proxies/v1/region_target_http_proxies_connection.h +++ b/google/cloud/compute/region_target_http_proxies/v1/region_target_http_proxies_connection.h @@ -21,6 +21,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_TARGET_HTTP_PROXIES_V1_REGION_TARGET_HTTP_PROXIES_CONNECTION_H #include "google/cloud/compute/region_target_http_proxies/v1/internal/region_target_http_proxies_retry_traits.h" +#include "google/cloud/compute/region_target_http_proxies/v1/region_target_http_proxies.pb.h" #include "google/cloud/compute/region_target_http_proxies/v1/region_target_http_proxies_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -31,7 +32,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_target_http_proxies/v1/region_target_http_proxies_connection_idempotency_policy.h b/google/cloud/compute/region_target_http_proxies/v1/region_target_http_proxies_connection_idempotency_policy.h index 7e1ff31d5abe4..d6aaf0ad065f2 100644 --- a/google/cloud/compute/region_target_http_proxies/v1/region_target_http_proxies_connection_idempotency_policy.h +++ b/google/cloud/compute/region_target_http_proxies/v1/region_target_http_proxies_connection_idempotency_policy.h @@ -20,9 +20,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_TARGET_HTTP_PROXIES_V1_REGION_TARGET_HTTP_PROXIES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_TARGET_HTTP_PROXIES_V1_REGION_TARGET_HTTP_PROXIES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/region_target_http_proxies/v1/region_target_http_proxies.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_target_http_proxies/v1/region_target_http_proxies_proto_export.h b/google/cloud/compute/region_target_http_proxies/v1/region_target_http_proxies_proto_export.h index 84ab4c15de03f..7a536280922ea 100644 --- a/google/cloud/compute/region_target_http_proxies/v1/region_target_http_proxies_proto_export.h +++ b/google/cloud/compute/region_target_http_proxies/v1/region_target_http_proxies_proto_export.h @@ -26,9 +26,9 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_TARGET_HTTP_PROXIES_V1_REGION_TARGET_HTTP_PROXIES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_135.pb.h" +#include "google/cloud/compute/v1/internal/common_147.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_TARGET_HTTP_PROXIES_V1_REGION_TARGET_HTTP_PROXIES_PROTO_EXPORT_H diff --git a/google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_option_defaults.cc b/google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_option_defaults.cc index aa1c98cbcb988..b116c929d9944 100644 --- a/google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_option_defaults.cc +++ b/google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_option_defaults.cc @@ -47,7 +47,7 @@ Options RegionTargetHttpsProxiesDefaultOptions(Options options) { RegionTargetHttpsProxiesRetryPolicyOption>( compute_region_target_https_proxies_v1:: RegionTargetHttpsProxiesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_rest_logging_decorator.h b/google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_rest_logging_decorator.h index 236d510557e47..6730930c89d05 100644 --- a/google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_rest_logging_decorator.h +++ b/google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_rest_logging_decorator.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_TARGET_HTTPS_PROXIES_V1_INTERNAL_REGION_TARGET_HTTPS_PROXIES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_TARGET_HTTPS_PROXIES_V1_INTERNAL_REGION_TARGET_HTTPS_PROXIES_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_rest_stub.h" +#include "google/cloud/compute/region_target_https_proxies/v1/region_target_https_proxies.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_rest_metadata_decorator.cc b/google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_rest_metadata_decorator.cc index 360f025d62011..c05e4ba2c419f 100644 --- a/google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_rest_metadata_decorator.cc +++ b/google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_rest_metadata_decorator.cc @@ -18,10 +18,10 @@ // google/cloud/compute/region_target_https_proxies/v1/region_target_https_proxies.proto #include "google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_rest_metadata_decorator.h b/google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_rest_metadata_decorator.h index 52f94cec09cd1..3874bd162f1b9 100644 --- a/google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_rest_metadata_decorator.h +++ b/google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_rest_metadata_decorator.h @@ -20,12 +20,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_TARGET_HTTPS_PROXIES_V1_INTERNAL_REGION_TARGET_HTTPS_PROXIES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_TARGET_HTTPS_PROXIES_V1_INTERNAL_REGION_TARGET_HTTPS_PROXIES_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_rest_stub.h" +#include "google/cloud/compute/region_target_https_proxies/v1/region_target_https_proxies.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_rest_stub.cc b/google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_rest_stub.cc index 63865a21f9c33..e229fad2e32a4 100644 --- a/google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_rest_stub.cc +++ b/google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_rest_stub.cc @@ -18,12 +18,12 @@ // google/cloud/compute/region_target_https_proxies/v1/region_target_https_proxies.proto #include "google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_rest_stub.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" +#include "google/cloud/compute/region_target_https_proxies/v1/region_target_https_proxies.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_rest_stub.h b/google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_rest_stub.h index 24fe0d2d11446..7cd465f4fbfe4 100644 --- a/google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_rest_stub.h +++ b/google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_rest_stub.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_TARGET_HTTPS_PROXIES_V1_INTERNAL_REGION_TARGET_HTTPS_PROXIES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_TARGET_HTTPS_PROXIES_V1_INTERNAL_REGION_TARGET_HTTPS_PROXIES_REST_STUB_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" +#include "google/cloud/compute/region_target_https_proxies/v1/region_target_https_proxies.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_tracing_connection.cc b/google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_tracing_connection.cc index 2d3a8debc542c..82d85ef0408bb 100644 --- a/google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_tracing_connection.cc +++ b/google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace compute_region_target_https_proxies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RegionTargetHttpsProxiesTracingConnection:: RegionTargetHttpsProxiesTracingConnection( std::shared_ptrSetUrlMap(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr< compute_region_target_https_proxies_v1::RegionTargetHttpsProxiesConnection> MakeRegionTargetHttpsProxiesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_tracing_connection.h b/google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_tracing_connection.h index d7ed4f56a0265..5f18d3b132efb 100644 --- a/google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_tracing_connection.h +++ b/google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace compute_region_target_https_proxies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RegionTargetHttpsProxiesTracingConnection : public compute_region_target_https_proxies_v1:: RegionTargetHttpsProxiesConnection { @@ -122,8 +120,6 @@ class RegionTargetHttpsProxiesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/region_target_https_proxies/v1/region_target_https_proxies_connection.h b/google/cloud/compute/region_target_https_proxies/v1/region_target_https_proxies_connection.h index 56e0bfcd55c8d..30864e4abc260 100644 --- a/google/cloud/compute/region_target_https_proxies/v1/region_target_https_proxies_connection.h +++ b/google/cloud/compute/region_target_https_proxies/v1/region_target_https_proxies_connection.h @@ -21,6 +21,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_TARGET_HTTPS_PROXIES_V1_REGION_TARGET_HTTPS_PROXIES_CONNECTION_H #include "google/cloud/compute/region_target_https_proxies/v1/internal/region_target_https_proxies_retry_traits.h" +#include "google/cloud/compute/region_target_https_proxies/v1/region_target_https_proxies.pb.h" #include "google/cloud/compute/region_target_https_proxies/v1/region_target_https_proxies_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -31,7 +32,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_target_https_proxies/v1/region_target_https_proxies_connection_idempotency_policy.h b/google/cloud/compute/region_target_https_proxies/v1/region_target_https_proxies_connection_idempotency_policy.h index 216ed83e7baa9..cb4b94b98581c 100644 --- a/google/cloud/compute/region_target_https_proxies/v1/region_target_https_proxies_connection_idempotency_policy.h +++ b/google/cloud/compute/region_target_https_proxies/v1/region_target_https_proxies_connection_idempotency_policy.h @@ -20,9 +20,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_TARGET_HTTPS_PROXIES_V1_REGION_TARGET_HTTPS_PROXIES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_TARGET_HTTPS_PROXIES_V1_REGION_TARGET_HTTPS_PROXIES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/region_target_https_proxies/v1/region_target_https_proxies.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_target_https_proxies/v1/region_target_https_proxies_proto_export.h b/google/cloud/compute/region_target_https_proxies/v1/region_target_https_proxies_proto_export.h index d187a7835e005..ae98cca47bc24 100644 --- a/google/cloud/compute/region_target_https_proxies/v1/region_target_https_proxies_proto_export.h +++ b/google/cloud/compute/region_target_https_proxies/v1/region_target_https_proxies_proto_export.h @@ -26,10 +26,10 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_TARGET_HTTPS_PROXIES_V1_REGION_TARGET_HTTPS_PROXIES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_109.pb.h" +#include "google/cloud/compute/v1/internal/common_137.pb.h" +#include "google/cloud/compute/v1/internal/common_147.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_TARGET_HTTPS_PROXIES_V1_REGION_TARGET_HTTPS_PROXIES_PROTO_EXPORT_H diff --git a/google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_option_defaults.cc b/google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_option_defaults.cc index eb070d5168c5c..1c31aebc4275d 100644 --- a/google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_option_defaults.cc +++ b/google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_option_defaults.cc @@ -46,7 +46,7 @@ Options RegionTargetTcpProxiesDefaultOptions(Options options) { RegionTargetTcpProxiesRetryPolicyOption>( compute_region_target_tcp_proxies_v1:: RegionTargetTcpProxiesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_rest_logging_decorator.h b/google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_rest_logging_decorator.h index 8b7837df07e3e..d517b3b76d207 100644 --- a/google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_rest_logging_decorator.h +++ b/google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_rest_logging_decorator.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_TARGET_TCP_PROXIES_V1_INTERNAL_REGION_TARGET_TCP_PROXIES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_TARGET_TCP_PROXIES_V1_INTERNAL_REGION_TARGET_TCP_PROXIES_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_rest_stub.h" +#include "google/cloud/compute/region_target_tcp_proxies/v1/region_target_tcp_proxies.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_rest_metadata_decorator.cc b/google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_rest_metadata_decorator.cc index 73b69854fd861..c6e583d66561f 100644 --- a/google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_rest_metadata_decorator.cc +++ b/google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_rest_metadata_decorator.cc @@ -18,10 +18,10 @@ // google/cloud/compute/region_target_tcp_proxies/v1/region_target_tcp_proxies.proto #include "google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_rest_metadata_decorator.h b/google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_rest_metadata_decorator.h index 37ef6c3bd457e..84e897ce39bc1 100644 --- a/google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_rest_metadata_decorator.h +++ b/google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_rest_metadata_decorator.h @@ -20,12 +20,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_TARGET_TCP_PROXIES_V1_INTERNAL_REGION_TARGET_TCP_PROXIES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_TARGET_TCP_PROXIES_V1_INTERNAL_REGION_TARGET_TCP_PROXIES_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_rest_stub.h" +#include "google/cloud/compute/region_target_tcp_proxies/v1/region_target_tcp_proxies.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_rest_stub.cc b/google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_rest_stub.cc index e6dc95929b12e..5fda464ba515f 100644 --- a/google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_rest_stub.cc +++ b/google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_rest_stub.cc @@ -18,12 +18,12 @@ // google/cloud/compute/region_target_tcp_proxies/v1/region_target_tcp_proxies.proto #include "google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_rest_stub.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" +#include "google/cloud/compute/region_target_tcp_proxies/v1/region_target_tcp_proxies.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_rest_stub.h b/google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_rest_stub.h index 52599646d0c76..bb9f7887e23b2 100644 --- a/google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_rest_stub.h +++ b/google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_rest_stub.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_TARGET_TCP_PROXIES_V1_INTERNAL_REGION_TARGET_TCP_PROXIES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_TARGET_TCP_PROXIES_V1_INTERNAL_REGION_TARGET_TCP_PROXIES_REST_STUB_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" +#include "google/cloud/compute/region_target_tcp_proxies/v1/region_target_tcp_proxies.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_tracing_connection.cc b/google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_tracing_connection.cc index f5d55bd564c76..5041660227d35 100644 --- a/google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_tracing_connection.cc +++ b/google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace compute_region_target_tcp_proxies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RegionTargetTcpProxiesTracingConnection:: RegionTargetTcpProxiesTracingConnection( std::shared_ptr MakeRegionTargetTcpProxiesTracingConnection( std::shared_ptr< compute_region_target_tcp_proxies_v1::RegionTargetTcpProxiesConnection> conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_tracing_connection.h b/google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_tracing_connection.h index ad6d2171c35f9..e29fb1bc98bf7 100644 --- a/google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_tracing_connection.h +++ b/google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace compute_region_target_tcp_proxies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RegionTargetTcpProxiesTracingConnection : public compute_region_target_tcp_proxies_v1:: RegionTargetTcpProxiesConnection { @@ -85,8 +83,6 @@ class RegionTargetTcpProxiesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/region_target_tcp_proxies/v1/region_target_tcp_proxies_connection.h b/google/cloud/compute/region_target_tcp_proxies/v1/region_target_tcp_proxies_connection.h index 1e643be7ca735..9a189e8570c5f 100644 --- a/google/cloud/compute/region_target_tcp_proxies/v1/region_target_tcp_proxies_connection.h +++ b/google/cloud/compute/region_target_tcp_proxies/v1/region_target_tcp_proxies_connection.h @@ -21,6 +21,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_TARGET_TCP_PROXIES_V1_REGION_TARGET_TCP_PROXIES_CONNECTION_H #include "google/cloud/compute/region_target_tcp_proxies/v1/internal/region_target_tcp_proxies_retry_traits.h" +#include "google/cloud/compute/region_target_tcp_proxies/v1/region_target_tcp_proxies.pb.h" #include "google/cloud/compute/region_target_tcp_proxies/v1/region_target_tcp_proxies_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -31,7 +32,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_target_tcp_proxies/v1/region_target_tcp_proxies_connection_idempotency_policy.h b/google/cloud/compute/region_target_tcp_proxies/v1/region_target_tcp_proxies_connection_idempotency_policy.h index 23cda2e9ba754..704d0664e0702 100644 --- a/google/cloud/compute/region_target_tcp_proxies/v1/region_target_tcp_proxies_connection_idempotency_policy.h +++ b/google/cloud/compute/region_target_tcp_proxies/v1/region_target_tcp_proxies_connection_idempotency_policy.h @@ -20,9 +20,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_TARGET_TCP_PROXIES_V1_REGION_TARGET_TCP_PROXIES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_TARGET_TCP_PROXIES_V1_REGION_TARGET_TCP_PROXIES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/region_target_tcp_proxies/v1/region_target_tcp_proxies.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_target_tcp_proxies/v1/region_target_tcp_proxies_proto_export.h b/google/cloud/compute/region_target_tcp_proxies/v1/region_target_tcp_proxies_proto_export.h index ec39272193fe5..cb711e208aa3c 100644 --- a/google/cloud/compute/region_target_tcp_proxies/v1/region_target_tcp_proxies_proto_export.h +++ b/google/cloud/compute/region_target_tcp_proxies/v1/region_target_tcp_proxies_proto_export.h @@ -26,8 +26,8 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_TARGET_TCP_PROXIES_V1_REGION_TARGET_TCP_PROXIES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_143.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_TARGET_TCP_PROXIES_V1_REGION_TARGET_TCP_PROXIES_PROTO_EXPORT_H diff --git a/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_option_defaults.cc b/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_option_defaults.cc index 16ba71de5acc6..7ede5ca7896a1 100644 --- a/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_option_defaults.cc +++ b/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_option_defaults.cc @@ -42,7 +42,7 @@ Options RegionUrlMapsDefaultOptions(Options options) { .has()) { options.set( compute_region_url_maps_v1::RegionUrlMapsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_rest_connection_impl.h b/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_rest_connection_impl.h index 9f0789e442d12..edff4e69e81f0 100644 --- a/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_rest_connection_impl.h +++ b/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_rest_connection_impl.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_URL_MAPS_V1_INTERNAL_REGION_URL_MAPS_REST_CONNECTION_IMPL_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_URL_MAPS_V1_INTERNAL_REGION_URL_MAPS_REST_CONNECTION_IMPL_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/region_url_maps/v1/internal/region_url_maps_rest_stub.h" #include "google/cloud/compute/region_url_maps/v1/internal/region_url_maps_retry_traits.h" #include "google/cloud/compute/region_url_maps/v1/region_url_maps_connection.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_rest_logging_decorator.h b/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_rest_logging_decorator.h index 0560b92eef0ef..82b3103928393 100644 --- a/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_rest_logging_decorator.h +++ b/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_URL_MAPS_V1_INTERNAL_REGION_URL_MAPS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_URL_MAPS_V1_INTERNAL_REGION_URL_MAPS_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/region_url_maps/v1/internal/region_url_maps_rest_stub.h" +#include "google/cloud/compute/region_url_maps/v1/region_url_maps.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_rest_metadata_decorator.cc b/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_rest_metadata_decorator.cc index ef5e30b95c471..4bb6f854ea1ed 100644 --- a/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_rest_metadata_decorator.cc +++ b/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/region_url_maps/v1/region_url_maps.proto #include "google/cloud/compute/region_url_maps/v1/internal/region_url_maps_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_rest_metadata_decorator.h b/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_rest_metadata_decorator.h index 73b9dc263c0ca..1191b054ffb6d 100644 --- a/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_rest_metadata_decorator.h +++ b/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_URL_MAPS_V1_INTERNAL_REGION_URL_MAPS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_URL_MAPS_V1_INTERNAL_REGION_URL_MAPS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/region_url_maps/v1/internal/region_url_maps_rest_stub.h" +#include "google/cloud/compute/region_url_maps/v1/region_url_maps.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_rest_stub.cc b/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_rest_stub.cc index ca48cc6305336..da92040f381cd 100644 --- a/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_rest_stub.cc +++ b/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/region_url_maps/v1/region_url_maps.proto #include "google/cloud/compute/region_url_maps/v1/internal/region_url_maps_rest_stub.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" +#include "google/cloud/compute/region_url_maps/v1/region_url_maps.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_rest_stub.h b/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_rest_stub.h index 0cf691e2d3aa6..44e90fa7d0a41 100644 --- a/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_rest_stub.h +++ b/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_URL_MAPS_V1_INTERNAL_REGION_URL_MAPS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_URL_MAPS_V1_INTERNAL_REGION_URL_MAPS_REST_STUB_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" +#include "google/cloud/compute/region_url_maps/v1/region_url_maps.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_tracing_connection.cc b/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_tracing_connection.cc index 0766ca6488ede..a5ba4d18ea4c8 100644 --- a/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_tracing_connection.cc +++ b/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_region_url_maps_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RegionUrlMapsTracingConnection::RegionUrlMapsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -185,16 +183,12 @@ RegionUrlMapsTracingConnection::Validate( return internal::EndSpan(*span, child_->Validate(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRegionUrlMapsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_tracing_connection.h b/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_tracing_connection.h index 3b6b4a818558d..9ed4e1937d235 100644 --- a/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_tracing_connection.h +++ b/google/cloud/compute/region_url_maps/v1/internal/region_url_maps_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_region_url_maps_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RegionUrlMapsTracingConnection : public compute_region_url_maps_v1::RegionUrlMapsConnection { public: @@ -101,8 +99,6 @@ class RegionUrlMapsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/region_url_maps/v1/region_url_maps_connection.h b/google/cloud/compute/region_url_maps/v1/region_url_maps_connection.h index 17fdde1c66f88..f0fd222601661 100644 --- a/google/cloud/compute/region_url_maps/v1/region_url_maps_connection.h +++ b/google/cloud/compute/region_url_maps/v1/region_url_maps_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_URL_MAPS_V1_REGION_URL_MAPS_CONNECTION_H #include "google/cloud/compute/region_url_maps/v1/internal/region_url_maps_retry_traits.h" +#include "google/cloud/compute/region_url_maps/v1/region_url_maps.pb.h" #include "google/cloud/compute/region_url_maps/v1/region_url_maps_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_url_maps/v1/region_url_maps_connection_idempotency_policy.h b/google/cloud/compute/region_url_maps/v1/region_url_maps_connection_idempotency_policy.h index 190c97b25b9e1..0e3a8c02f8bc7 100644 --- a/google/cloud/compute/region_url_maps/v1/region_url_maps_connection_idempotency_policy.h +++ b/google/cloud/compute/region_url_maps/v1/region_url_maps_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_URL_MAPS_V1_REGION_URL_MAPS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_URL_MAPS_V1_REGION_URL_MAPS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/region_url_maps/v1/region_url_maps.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_url_maps/v1/region_url_maps_proto_export.h b/google/cloud/compute/region_url_maps/v1/region_url_maps_proto_export.h index 92f3a6c602ed6..f37775f1a5030 100644 --- a/google/cloud/compute/region_url_maps/v1/region_url_maps_proto_export.h +++ b/google/cloud/compute/region_url_maps/v1/region_url_maps_proto_export.h @@ -26,11 +26,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_URL_MAPS_V1_REGION_URL_MAPS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_020.pb.h" +#include "google/cloud/compute/v1/internal/common_029.pb.h" +#include "google/cloud/compute/v1/internal/common_082.pb.h" +#include "google/cloud/compute/v1/internal/common_110.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_URL_MAPS_V1_REGION_URL_MAPS_PROTO_EXPORT_H diff --git a/google/cloud/compute/region_zones/v1/internal/region_zones_option_defaults.cc b/google/cloud/compute/region_zones/v1/internal/region_zones_option_defaults.cc index 887093d955c54..9c4bfc282c72e 100644 --- a/google/cloud/compute/region_zones/v1/internal/region_zones_option_defaults.cc +++ b/google/cloud/compute/region_zones/v1/internal/region_zones_option_defaults.cc @@ -41,7 +41,7 @@ Options RegionZonesDefaultOptions(Options options) { if (!options.has()) { options.set( compute_region_zones_v1::RegionZonesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/compute/region_zones/v1/internal/region_zones_rest_logging_decorator.h b/google/cloud/compute/region_zones/v1/internal/region_zones_rest_logging_decorator.h index f2d0529d4c1af..647504969e2b7 100644 --- a/google/cloud/compute/region_zones/v1/internal/region_zones_rest_logging_decorator.h +++ b/google/cloud/compute/region_zones/v1/internal/region_zones_rest_logging_decorator.h @@ -20,11 +20,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_ZONES_V1_INTERNAL_REGION_ZONES_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/region_zones/v1/internal/region_zones_rest_stub.h" +#include "google/cloud/compute/region_zones/v1/region_zones.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include #include #include #include diff --git a/google/cloud/compute/region_zones/v1/internal/region_zones_rest_metadata_decorator.cc b/google/cloud/compute/region_zones/v1/internal/region_zones_rest_metadata_decorator.cc index 6349d635626c0..e10357a26a3ab 100644 --- a/google/cloud/compute/region_zones/v1/internal/region_zones_rest_metadata_decorator.cc +++ b/google/cloud/compute/region_zones/v1/internal/region_zones_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/region_zones/v1/region_zones.proto #include "google/cloud/compute/region_zones/v1/internal/region_zones_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/region_zones/v1/internal/region_zones_rest_metadata_decorator.h b/google/cloud/compute/region_zones/v1/internal/region_zones_rest_metadata_decorator.h index 9173cd1a8b801..5d1774ab430ef 100644 --- a/google/cloud/compute/region_zones/v1/internal/region_zones_rest_metadata_decorator.h +++ b/google/cloud/compute/region_zones/v1/internal/region_zones_rest_metadata_decorator.h @@ -20,10 +20,10 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_ZONES_V1_INTERNAL_REGION_ZONES_REST_METADATA_DECORATOR_H #include "google/cloud/compute/region_zones/v1/internal/region_zones_rest_stub.h" +#include "google/cloud/compute/region_zones/v1/region_zones.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/compute/region_zones/v1/internal/region_zones_rest_stub.cc b/google/cloud/compute/region_zones/v1/internal/region_zones_rest_stub.cc index d75d70d7f2a9c..7da5e6a7e991d 100644 --- a/google/cloud/compute/region_zones/v1/internal/region_zones_rest_stub.cc +++ b/google/cloud/compute/region_zones/v1/internal/region_zones_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/compute/region_zones/v1/region_zones.proto #include "google/cloud/compute/region_zones/v1/internal/region_zones_rest_stub.h" +#include "google/cloud/compute/region_zones/v1/region_zones.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/region_zones/v1/internal/region_zones_rest_stub.h b/google/cloud/compute/region_zones/v1/internal/region_zones_rest_stub.h index 1b6c75379fca2..3af45d3f2b610 100644 --- a/google/cloud/compute/region_zones/v1/internal/region_zones_rest_stub.h +++ b/google/cloud/compute/region_zones/v1/internal/region_zones_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_ZONES_V1_INTERNAL_REGION_ZONES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_ZONES_V1_INTERNAL_REGION_ZONES_REST_STUB_H +#include "google/cloud/compute/region_zones/v1/region_zones.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_zones/v1/internal/region_zones_tracing_connection.cc b/google/cloud/compute/region_zones/v1/internal/region_zones_tracing_connection.cc index e49791b34788d..0ca1edfb279f2 100644 --- a/google/cloud/compute/region_zones/v1/internal/region_zones_tracing_connection.cc +++ b/google/cloud/compute/region_zones/v1/internal/region_zones_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_region_zones_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RegionZonesTracingConnection::RegionZonesTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -45,16 +43,12 @@ RegionZonesTracingConnection::ListRegionZones( std::move(span), std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRegionZonesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/region_zones/v1/internal/region_zones_tracing_connection.h b/google/cloud/compute/region_zones/v1/internal/region_zones_tracing_connection.h index 38f57b54bcd08..331b830abfd9b 100644 --- a/google/cloud/compute/region_zones/v1/internal/region_zones_tracing_connection.h +++ b/google/cloud/compute/region_zones/v1/internal/region_zones_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_region_zones_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RegionZonesTracingConnection : public compute_region_zones_v1::RegionZonesConnection { public: @@ -48,8 +46,6 @@ class RegionZonesTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/region_zones/v1/region_zones_connection.h b/google/cloud/compute/region_zones/v1/region_zones_connection.h index 16589cbc982e3..916ce9883b55a 100644 --- a/google/cloud/compute/region_zones/v1/region_zones_connection.h +++ b/google/cloud/compute/region_zones/v1/region_zones_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_ZONES_V1_REGION_ZONES_CONNECTION_H #include "google/cloud/compute/region_zones/v1/internal/region_zones_retry_traits.h" +#include "google/cloud/compute/region_zones/v1/region_zones.pb.h" #include "google/cloud/compute/region_zones/v1/region_zones_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_zones/v1/region_zones_connection_idempotency_policy.h b/google/cloud/compute/region_zones/v1/region_zones_connection_idempotency_policy.h index 35c1e8f5dc634..ebc78bb595c9f 100644 --- a/google/cloud/compute/region_zones/v1/region_zones_connection_idempotency_policy.h +++ b/google/cloud/compute/region_zones/v1/region_zones_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_ZONES_V1_REGION_ZONES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_ZONES_V1_REGION_ZONES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/region_zones/v1/region_zones.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/region_zones/v1/region_zones_proto_export.h b/google/cloud/compute/region_zones/v1/region_zones_proto_export.h index 4941aeffc2489..de43f725c90f7 100644 --- a/google/cloud/compute/region_zones/v1/region_zones_proto_export.h +++ b/google/cloud/compute/region_zones/v1/region_zones_proto_export.h @@ -26,8 +26,8 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_ZONES_V1_REGION_ZONES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include +#include "google/cloud/compute/v1/internal/common_023.pb.h" +#include "google/cloud/compute/v1/internal/common_150.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGION_ZONES_V1_REGION_ZONES_PROTO_EXPORT_H diff --git a/google/cloud/compute/regions/v1/internal/regions_option_defaults.cc b/google/cloud/compute/regions/v1/internal/regions_option_defaults.cc index ed1f634226a4a..3f70634ecd6c3 100644 --- a/google/cloud/compute/regions/v1/internal/regions_option_defaults.cc +++ b/google/cloud/compute/regions/v1/internal/regions_option_defaults.cc @@ -41,7 +41,7 @@ Options RegionsDefaultOptions(Options options) { if (!options.has()) { options.set( compute_regions_v1::RegionsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/compute/regions/v1/internal/regions_rest_logging_decorator.h b/google/cloud/compute/regions/v1/internal/regions_rest_logging_decorator.h index 24e36a6091cc8..3f7122b2f8794 100644 --- a/google/cloud/compute/regions/v1/internal/regions_rest_logging_decorator.h +++ b/google/cloud/compute/regions/v1/internal/regions_rest_logging_decorator.h @@ -20,11 +20,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGIONS_V1_INTERNAL_REGIONS_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/regions/v1/internal/regions_rest_stub.h" +#include "google/cloud/compute/regions/v1/regions.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include #include #include #include diff --git a/google/cloud/compute/regions/v1/internal/regions_rest_metadata_decorator.cc b/google/cloud/compute/regions/v1/internal/regions_rest_metadata_decorator.cc index 0e44f5eb2cadf..87b4191d8059f 100644 --- a/google/cloud/compute/regions/v1/internal/regions_rest_metadata_decorator.cc +++ b/google/cloud/compute/regions/v1/internal/regions_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/regions/v1/regions.proto #include "google/cloud/compute/regions/v1/internal/regions_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/regions/v1/internal/regions_rest_metadata_decorator.h b/google/cloud/compute/regions/v1/internal/regions_rest_metadata_decorator.h index e1e26b32200b8..f614911eeca5f 100644 --- a/google/cloud/compute/regions/v1/internal/regions_rest_metadata_decorator.h +++ b/google/cloud/compute/regions/v1/internal/regions_rest_metadata_decorator.h @@ -20,10 +20,10 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGIONS_V1_INTERNAL_REGIONS_REST_METADATA_DECORATOR_H #include "google/cloud/compute/regions/v1/internal/regions_rest_stub.h" +#include "google/cloud/compute/regions/v1/regions.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/compute/regions/v1/internal/regions_rest_stub.cc b/google/cloud/compute/regions/v1/internal/regions_rest_stub.cc index 9d907fef4b2fe..1dec5ccf293c0 100644 --- a/google/cloud/compute/regions/v1/internal/regions_rest_stub.cc +++ b/google/cloud/compute/regions/v1/internal/regions_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/compute/regions/v1/regions.proto #include "google/cloud/compute/regions/v1/internal/regions_rest_stub.h" +#include "google/cloud/compute/regions/v1/regions.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/regions/v1/internal/regions_rest_stub.h b/google/cloud/compute/regions/v1/internal/regions_rest_stub.h index 58b19443ecbe9..0c326d4dfd032 100644 --- a/google/cloud/compute/regions/v1/internal/regions_rest_stub.h +++ b/google/cloud/compute/regions/v1/internal/regions_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGIONS_V1_INTERNAL_REGIONS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGIONS_V1_INTERNAL_REGIONS_REST_STUB_H +#include "google/cloud/compute/regions/v1/regions.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/regions/v1/internal/regions_tracing_connection.cc b/google/cloud/compute/regions/v1/internal/regions_tracing_connection.cc index a83c58e3e9ddc..9c7a97e0c382d 100644 --- a/google/cloud/compute/regions/v1/internal/regions_tracing_connection.cc +++ b/google/cloud/compute/regions/v1/internal/regions_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_regions_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RegionsTracingConnection::RegionsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -53,16 +51,12 @@ RegionsTracingConnection::ListRegions( google::cloud::cpp::compute::v1::Region>(std::move(span), std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRegionsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/regions/v1/internal/regions_tracing_connection.h b/google/cloud/compute/regions/v1/internal/regions_tracing_connection.h index 83ac35c355a9e..b57d28d45ab96 100644 --- a/google/cloud/compute/regions/v1/internal/regions_tracing_connection.h +++ b/google/cloud/compute/regions/v1/internal/regions_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_regions_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RegionsTracingConnection : public compute_regions_v1::RegionsConnection { public: ~RegionsTracingConnection() override = default; @@ -51,8 +49,6 @@ class RegionsTracingConnection : public compute_regions_v1::RegionsConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/regions/v1/regions_connection.h b/google/cloud/compute/regions/v1/regions_connection.h index 9ac789bce5581..fe8a251a90d55 100644 --- a/google/cloud/compute/regions/v1/regions_connection.h +++ b/google/cloud/compute/regions/v1/regions_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGIONS_V1_REGIONS_CONNECTION_H #include "google/cloud/compute/regions/v1/internal/regions_retry_traits.h" +#include "google/cloud/compute/regions/v1/regions.pb.h" #include "google/cloud/compute/regions/v1/regions_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/regions/v1/regions_connection_idempotency_policy.h b/google/cloud/compute/regions/v1/regions_connection_idempotency_policy.h index 935e679fa5de6..5c45d2533acae 100644 --- a/google/cloud/compute/regions/v1/regions_connection_idempotency_policy.h +++ b/google/cloud/compute/regions/v1/regions_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGIONS_V1_REGIONS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGIONS_V1_REGIONS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/regions/v1/regions.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/regions/v1/regions_proto_export.h b/google/cloud/compute/regions/v1/regions_proto_export.h index 47bca199d3e12..e9ffa0bc8fed5 100644 --- a/google/cloud/compute/regions/v1/regions_proto_export.h +++ b/google/cloud/compute/regions/v1/regions_proto_export.h @@ -26,9 +26,9 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGIONS_V1_REGIONS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_023.pb.h" +#include "google/cloud/compute/v1/internal/common_098.pb.h" +#include "google/cloud/compute/v1/internal/common_099.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_REGIONS_V1_REGIONS_PROTO_EXPORT_H diff --git a/google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_option_defaults.cc b/google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_option_defaults.cc index b94bf76126c35..784b17e563dfd 100644 --- a/google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_option_defaults.cc +++ b/google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_option_defaults.cc @@ -44,7 +44,7 @@ Options ReservationBlocksDefaultOptions(Options options) { options.set< compute_reservation_blocks_v1::ReservationBlocksRetryPolicyOption>( compute_reservation_blocks_v1::ReservationBlocksLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_rest_logging_decorator.h b/google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_rest_logging_decorator.h index 3209d2b0d7f89..471b3be22cc85 100644 --- a/google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_rest_logging_decorator.h +++ b/google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_rest_logging_decorator.h @@ -20,12 +20,12 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESERVATION_BLOCKS_V1_INTERNAL_RESERVATION_BLOCKS_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_rest_stub.h" +#include "google/cloud/compute/reservation_blocks/v1/reservation_blocks.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_rest_metadata_decorator.cc b/google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_rest_metadata_decorator.cc index e810ed30af237..366924b7d2e60 100644 --- a/google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_rest_metadata_decorator.cc +++ b/google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/reservation_blocks/v1/reservation_blocks.proto #include "google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_rest_metadata_decorator.h b/google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_rest_metadata_decorator.h index a3eed725b9c50..05cb920355fb1 100644 --- a/google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_rest_metadata_decorator.h +++ b/google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_rest_metadata_decorator.h @@ -20,11 +20,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESERVATION_BLOCKS_V1_INTERNAL_RESERVATION_BLOCKS_REST_METADATA_DECORATOR_H #include "google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_rest_stub.h" +#include "google/cloud/compute/reservation_blocks/v1/reservation_blocks.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_rest_stub.cc b/google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_rest_stub.cc index ba872ca13ba8a..837ed439c5d55 100644 --- a/google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_rest_stub.cc +++ b/google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/reservation_blocks/v1/reservation_blocks.proto #include "google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_rest_stub.h" +#include "google/cloud/compute/reservation_blocks/v1/reservation_blocks.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_rest_stub.h b/google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_rest_stub.h index 6f3775648df42..fe3b18c2e2b31 100644 --- a/google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_rest_stub.h +++ b/google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESERVATION_BLOCKS_V1_INTERNAL_RESERVATION_BLOCKS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESERVATION_BLOCKS_V1_INTERNAL_RESERVATION_BLOCKS_REST_STUB_H +#include "google/cloud/compute/reservation_blocks/v1/reservation_blocks.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_tracing_connection.cc b/google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_tracing_connection.cc index ae407f0b7943c..be03952d3f5b7 100644 --- a/google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_tracing_connection.cc +++ b/google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_reservation_blocks_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ReservationBlocksTracingConnection::ReservationBlocksTracingConnection( std::shared_ptr child) @@ -95,18 +93,14 @@ ReservationBlocksTracingConnection::PerformMaintenance( child_->PerformMaintenance(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeReservationBlocksTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_tracing_connection.h b/google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_tracing_connection.h index f2aa5692d8792..923b20756ae42 100644 --- a/google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_tracing_connection.h +++ b/google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_reservation_blocks_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ReservationBlocksTracingConnection : public compute_reservation_blocks_v1::ReservationBlocksConnection { public: @@ -68,8 +66,6 @@ class ReservationBlocksTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/reservation_blocks/v1/reservation_blocks_connection.h b/google/cloud/compute/reservation_blocks/v1/reservation_blocks_connection.h index fffde3656dbe5..511fb51c96896 100644 --- a/google/cloud/compute/reservation_blocks/v1/reservation_blocks_connection.h +++ b/google/cloud/compute/reservation_blocks/v1/reservation_blocks_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESERVATION_BLOCKS_V1_RESERVATION_BLOCKS_CONNECTION_H #include "google/cloud/compute/reservation_blocks/v1/internal/reservation_blocks_retry_traits.h" +#include "google/cloud/compute/reservation_blocks/v1/reservation_blocks.pb.h" #include "google/cloud/compute/reservation_blocks/v1/reservation_blocks_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/reservation_blocks/v1/reservation_blocks_connection_idempotency_policy.h b/google/cloud/compute/reservation_blocks/v1/reservation_blocks_connection_idempotency_policy.h index cb522fc225312..3d89167901ea1 100644 --- a/google/cloud/compute/reservation_blocks/v1/reservation_blocks_connection_idempotency_policy.h +++ b/google/cloud/compute/reservation_blocks/v1/reservation_blocks_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESERVATION_BLOCKS_V1_RESERVATION_BLOCKS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESERVATION_BLOCKS_V1_RESERVATION_BLOCKS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/reservation_blocks/v1/reservation_blocks.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/reservation_blocks/v1/reservation_blocks_proto_export.h b/google/cloud/compute/reservation_blocks/v1/reservation_blocks_proto_export.h index 472bdf2ab5ff4..88aca6ea49b87 100644 --- a/google/cloud/compute/reservation_blocks/v1/reservation_blocks_proto_export.h +++ b/google/cloud/compute/reservation_blocks/v1/reservation_blocks_proto_export.h @@ -26,10 +26,10 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESERVATION_BLOCKS_V1_RESERVATION_BLOCKS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_048.pb.h" +#include "google/cloud/compute/v1/internal/common_112.pb.h" +#include "google/cloud/compute/v1/internal/common_146.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESERVATION_BLOCKS_V1_RESERVATION_BLOCKS_PROTO_EXPORT_H diff --git a/google/cloud/compute/reservation_sub_blocks/v1/internal/reservation_sub_blocks_option_defaults.cc b/google/cloud/compute/reservation_sub_blocks/v1/internal/reservation_sub_blocks_option_defaults.cc index ffa66d7f9e4ad..18024fc0cfaaa 100644 --- a/google/cloud/compute/reservation_sub_blocks/v1/internal/reservation_sub_blocks_option_defaults.cc +++ b/google/cloud/compute/reservation_sub_blocks/v1/internal/reservation_sub_blocks_option_defaults.cc @@ -45,7 +45,7 @@ Options ReservationSubBlocksDefaultOptions(Options options) { options.set( compute_reservation_sub_blocks_v1:: - ReservationSubBlocksLimitedTimeRetryPolicy(std::chrono::minutes(30)) + ReservationSubBlocksLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has #include #include #include diff --git a/google/cloud/compute/reservation_sub_blocks/v1/internal/reservation_sub_blocks_rest_metadata_decorator.cc b/google/cloud/compute/reservation_sub_blocks/v1/internal/reservation_sub_blocks_rest_metadata_decorator.cc index 85b95822088e9..d10d4e707e9ca 100644 --- a/google/cloud/compute/reservation_sub_blocks/v1/internal/reservation_sub_blocks_rest_metadata_decorator.cc +++ b/google/cloud/compute/reservation_sub_blocks/v1/internal/reservation_sub_blocks_rest_metadata_decorator.cc @@ -18,10 +18,10 @@ // google/cloud/compute/reservation_sub_blocks/v1/reservation_sub_blocks.proto #include "google/cloud/compute/reservation_sub_blocks/v1/internal/reservation_sub_blocks_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/reservation_sub_blocks/v1/internal/reservation_sub_blocks_rest_metadata_decorator.h b/google/cloud/compute/reservation_sub_blocks/v1/internal/reservation_sub_blocks_rest_metadata_decorator.h index 380d16e1f3a83..178b7e76cb1f0 100644 --- a/google/cloud/compute/reservation_sub_blocks/v1/internal/reservation_sub_blocks_rest_metadata_decorator.h +++ b/google/cloud/compute/reservation_sub_blocks/v1/internal/reservation_sub_blocks_rest_metadata_decorator.h @@ -21,10 +21,10 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESERVATION_SUB_BLOCKS_V1_INTERNAL_RESERVATION_SUB_BLOCKS_REST_METADATA_DECORATOR_H #include "google/cloud/compute/reservation_sub_blocks/v1/internal/reservation_sub_blocks_rest_stub.h" +#include "google/cloud/compute/reservation_sub_blocks/v1/reservation_sub_blocks.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/compute/reservation_sub_blocks/v1/internal/reservation_sub_blocks_rest_stub.cc b/google/cloud/compute/reservation_sub_blocks/v1/internal/reservation_sub_blocks_rest_stub.cc index 5bdaa067fae12..db542fe5b0697 100644 --- a/google/cloud/compute/reservation_sub_blocks/v1/internal/reservation_sub_blocks_rest_stub.cc +++ b/google/cloud/compute/reservation_sub_blocks/v1/internal/reservation_sub_blocks_rest_stub.cc @@ -18,11 +18,11 @@ // google/cloud/compute/reservation_sub_blocks/v1/reservation_sub_blocks.proto #include "google/cloud/compute/reservation_sub_blocks/v1/internal/reservation_sub_blocks_rest_stub.h" +#include "google/cloud/compute/reservation_sub_blocks/v1/reservation_sub_blocks.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/reservation_sub_blocks/v1/internal/reservation_sub_blocks_rest_stub.h b/google/cloud/compute/reservation_sub_blocks/v1/internal/reservation_sub_blocks_rest_stub.h index dcbf778613d27..a469779eb964d 100644 --- a/google/cloud/compute/reservation_sub_blocks/v1/internal/reservation_sub_blocks_rest_stub.h +++ b/google/cloud/compute/reservation_sub_blocks/v1/internal/reservation_sub_blocks_rest_stub.h @@ -20,12 +20,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESERVATION_SUB_BLOCKS_V1_INTERNAL_RESERVATION_SUB_BLOCKS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESERVATION_SUB_BLOCKS_V1_INTERNAL_RESERVATION_SUB_BLOCKS_REST_STUB_H +#include "google/cloud/compute/reservation_sub_blocks/v1/reservation_sub_blocks.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/reservation_sub_blocks/v1/internal/reservation_sub_blocks_tracing_connection.cc b/google/cloud/compute/reservation_sub_blocks/v1/internal/reservation_sub_blocks_tracing_connection.cc index 4a155cb612158..19c78d6bb1833 100644 --- a/google/cloud/compute/reservation_sub_blocks/v1/internal/reservation_sub_blocks_tracing_connection.cc +++ b/google/cloud/compute/reservation_sub_blocks/v1/internal/reservation_sub_blocks_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace compute_reservation_sub_blocks_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ReservationSubBlocksTracingConnection::ReservationSubBlocksTracingConnection( std::shared_ptr< compute_reservation_sub_blocks_v1::ReservationSubBlocksConnection> @@ -62,20 +60,16 @@ ReservationSubBlocksTracingConnection::ListReservationSubBlocks( std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr< compute_reservation_sub_blocks_v1::ReservationSubBlocksConnection> MakeReservationSubBlocksTracingConnection( std::shared_ptr< compute_reservation_sub_blocks_v1::ReservationSubBlocksConnection> conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/reservation_sub_blocks/v1/internal/reservation_sub_blocks_tracing_connection.h b/google/cloud/compute/reservation_sub_blocks/v1/internal/reservation_sub_blocks_tracing_connection.h index 633507cc2d7a0..a9f931da2eaff 100644 --- a/google/cloud/compute/reservation_sub_blocks/v1/internal/reservation_sub_blocks_tracing_connection.h +++ b/google/cloud/compute/reservation_sub_blocks/v1/internal/reservation_sub_blocks_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace compute_reservation_sub_blocks_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ReservationSubBlocksTracingConnection : public compute_reservation_sub_blocks_v1::ReservationSubBlocksConnection { public: @@ -59,8 +57,6 @@ class ReservationSubBlocksTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/reservation_sub_blocks/v1/reservation_sub_blocks_connection.h b/google/cloud/compute/reservation_sub_blocks/v1/reservation_sub_blocks_connection.h index bbfc4aecc4db9..4a5f11208dc3a 100644 --- a/google/cloud/compute/reservation_sub_blocks/v1/reservation_sub_blocks_connection.h +++ b/google/cloud/compute/reservation_sub_blocks/v1/reservation_sub_blocks_connection.h @@ -21,6 +21,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESERVATION_SUB_BLOCKS_V1_RESERVATION_SUB_BLOCKS_CONNECTION_H #include "google/cloud/compute/reservation_sub_blocks/v1/internal/reservation_sub_blocks_retry_traits.h" +#include "google/cloud/compute/reservation_sub_blocks/v1/reservation_sub_blocks.pb.h" #include "google/cloud/compute/reservation_sub_blocks/v1/reservation_sub_blocks_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -28,7 +29,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/reservation_sub_blocks/v1/reservation_sub_blocks_connection_idempotency_policy.h b/google/cloud/compute/reservation_sub_blocks/v1/reservation_sub_blocks_connection_idempotency_policy.h index 99069bb8746fa..43d85621d4f68 100644 --- a/google/cloud/compute/reservation_sub_blocks/v1/reservation_sub_blocks_connection_idempotency_policy.h +++ b/google/cloud/compute/reservation_sub_blocks/v1/reservation_sub_blocks_connection_idempotency_policy.h @@ -20,9 +20,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESERVATION_SUB_BLOCKS_V1_RESERVATION_SUB_BLOCKS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESERVATION_SUB_BLOCKS_V1_RESERVATION_SUB_BLOCKS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/reservation_sub_blocks/v1/reservation_sub_blocks.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/reservation_sub_blocks/v1/reservation_sub_blocks_proto_export.h b/google/cloud/compute/reservation_sub_blocks/v1/reservation_sub_blocks_proto_export.h index 22cb47ac88f6a..182c254584614 100644 --- a/google/cloud/compute/reservation_sub_blocks/v1/reservation_sub_blocks_proto_export.h +++ b/google/cloud/compute/reservation_sub_blocks/v1/reservation_sub_blocks_proto_export.h @@ -26,7 +26,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESERVATION_SUB_BLOCKS_V1_RESERVATION_SUB_BLOCKS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include +#include "google/cloud/compute/v1/internal/common_113.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESERVATION_SUB_BLOCKS_V1_RESERVATION_SUB_BLOCKS_PROTO_EXPORT_H diff --git a/google/cloud/compute/reservations/v1/internal/reservations_option_defaults.cc b/google/cloud/compute/reservations/v1/internal/reservations_option_defaults.cc index c50bdf37ca313..acc0170293372 100644 --- a/google/cloud/compute/reservations/v1/internal/reservations_option_defaults.cc +++ b/google/cloud/compute/reservations/v1/internal/reservations_option_defaults.cc @@ -41,7 +41,7 @@ Options ReservationsDefaultOptions(Options options) { if (!options.has()) { options.set( compute_reservations_v1::ReservationsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/compute/reservations/v1/internal/reservations_rest_connection_impl.h b/google/cloud/compute/reservations/v1/internal/reservations_rest_connection_impl.h index 3149b6294a36d..5bf187ea0d533 100644 --- a/google/cloud/compute/reservations/v1/internal/reservations_rest_connection_impl.h +++ b/google/cloud/compute/reservations/v1/internal/reservations_rest_connection_impl.h @@ -24,13 +24,13 @@ #include "google/cloud/compute/reservations/v1/reservations_connection.h" #include "google/cloud/compute/reservations/v1/reservations_connection_idempotency_policy.h" #include "google/cloud/compute/reservations/v1/reservations_options.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/background_threads.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/reservations/v1/internal/reservations_rest_logging_decorator.h b/google/cloud/compute/reservations/v1/internal/reservations_rest_logging_decorator.h index a168132d98dd0..b124b6128f968 100644 --- a/google/cloud/compute/reservations/v1/internal/reservations_rest_logging_decorator.h +++ b/google/cloud/compute/reservations/v1/internal/reservations_rest_logging_decorator.h @@ -20,12 +20,12 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESERVATIONS_V1_INTERNAL_RESERVATIONS_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/reservations/v1/internal/reservations_rest_stub.h" +#include "google/cloud/compute/reservations/v1/reservations.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/reservations/v1/internal/reservations_rest_metadata_decorator.cc b/google/cloud/compute/reservations/v1/internal/reservations_rest_metadata_decorator.cc index 8fda19bf3b0a0..ab2ecab4a0f60 100644 --- a/google/cloud/compute/reservations/v1/internal/reservations_rest_metadata_decorator.cc +++ b/google/cloud/compute/reservations/v1/internal/reservations_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/reservations/v1/reservations.proto #include "google/cloud/compute/reservations/v1/internal/reservations_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/reservations/v1/internal/reservations_rest_metadata_decorator.h b/google/cloud/compute/reservations/v1/internal/reservations_rest_metadata_decorator.h index 0c2871287747e..6521d2b9318e8 100644 --- a/google/cloud/compute/reservations/v1/internal/reservations_rest_metadata_decorator.h +++ b/google/cloud/compute/reservations/v1/internal/reservations_rest_metadata_decorator.h @@ -20,11 +20,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESERVATIONS_V1_INTERNAL_RESERVATIONS_REST_METADATA_DECORATOR_H #include "google/cloud/compute/reservations/v1/internal/reservations_rest_stub.h" +#include "google/cloud/compute/reservations/v1/reservations.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/reservations/v1/internal/reservations_rest_stub.cc b/google/cloud/compute/reservations/v1/internal/reservations_rest_stub.cc index c716ea8d158f1..3959c59213d95 100644 --- a/google/cloud/compute/reservations/v1/internal/reservations_rest_stub.cc +++ b/google/cloud/compute/reservations/v1/internal/reservations_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/reservations/v1/reservations.proto #include "google/cloud/compute/reservations/v1/internal/reservations_rest_stub.h" +#include "google/cloud/compute/reservations/v1/reservations.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/reservations/v1/internal/reservations_rest_stub.h b/google/cloud/compute/reservations/v1/internal/reservations_rest_stub.h index dd7a58443aab8..774c2c5624b2d 100644 --- a/google/cloud/compute/reservations/v1/internal/reservations_rest_stub.h +++ b/google/cloud/compute/reservations/v1/internal/reservations_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESERVATIONS_V1_INTERNAL_RESERVATIONS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESERVATIONS_V1_INTERNAL_RESERVATIONS_REST_STUB_H +#include "google/cloud/compute/reservations/v1/reservations.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/reservations/v1/internal/reservations_tracing_connection.cc b/google/cloud/compute/reservations/v1/internal/reservations_tracing_connection.cc index 92376aa94882c..a28d3e2b04c47 100644 --- a/google/cloud/compute/reservations/v1/internal/reservations_tracing_connection.cc +++ b/google/cloud/compute/reservations/v1/internal/reservations_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_reservations_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ReservationsTracingConnection::ReservationsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -256,16 +254,12 @@ ReservationsTracingConnection::UpdateReservation( child_->UpdateReservation(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeReservationsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/reservations/v1/internal/reservations_tracing_connection.h b/google/cloud/compute/reservations/v1/internal/reservations_tracing_connection.h index 6e39bee02a69d..1cb4f1d5f359c 100644 --- a/google/cloud/compute/reservations/v1/internal/reservations_tracing_connection.h +++ b/google/cloud/compute/reservations/v1/internal/reservations_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_reservations_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ReservationsTracingConnection : public compute_reservations_v1::ReservationsConnection { public: @@ -130,8 +128,6 @@ class ReservationsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/reservations/v1/reservations_connection.h b/google/cloud/compute/reservations/v1/reservations_connection.h index 97bdb9598f486..d710da0aea180 100644 --- a/google/cloud/compute/reservations/v1/reservations_connection.h +++ b/google/cloud/compute/reservations/v1/reservations_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESERVATIONS_V1_RESERVATIONS_CONNECTION_H #include "google/cloud/compute/reservations/v1/internal/reservations_retry_traits.h" +#include "google/cloud/compute/reservations/v1/reservations.pb.h" #include "google/cloud/compute/reservations/v1/reservations_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/reservations/v1/reservations_connection_idempotency_policy.h b/google/cloud/compute/reservations/v1/reservations_connection_idempotency_policy.h index 5401741fe28fa..6f357dc330149 100644 --- a/google/cloud/compute/reservations/v1/reservations_connection_idempotency_policy.h +++ b/google/cloud/compute/reservations/v1/reservations_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESERVATIONS_V1_RESERVATIONS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESERVATIONS_V1_RESERVATIONS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/reservations/v1/reservations.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/reservations/v1/reservations_proto_export.h b/google/cloud/compute/reservations/v1/reservations_proto_export.h index 415890993ed00..62ac023a86131 100644 --- a/google/cloud/compute/reservations/v1/reservations_proto_export.h +++ b/google/cloud/compute/reservations/v1/reservations_proto_export.h @@ -26,18 +26,18 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESERVATIONS_V1_RESERVATIONS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_001.pb.h" +#include "google/cloud/compute/v1/internal/common_006.pb.h" +#include "google/cloud/compute/v1/internal/common_007.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_029.pb.h" +#include "google/cloud/compute/v1/internal/common_031.pb.h" +#include "google/cloud/compute/v1/internal/common_048.pb.h" +#include "google/cloud/compute/v1/internal/common_111.pb.h" +#include "google/cloud/compute/v1/internal/common_120.pb.h" +#include "google/cloud/compute/v1/internal/common_145.pb.h" +#include "google/cloud/compute/v1/internal/common_146.pb.h" +#include "google/cloud/compute/v1/internal/common_152.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESERVATIONS_V1_RESERVATIONS_PROTO_EXPORT_H diff --git a/google/cloud/compute/resource_policies/v1/internal/resource_policies_option_defaults.cc b/google/cloud/compute/resource_policies/v1/internal/resource_policies_option_defaults.cc index 0e98c91086bbc..9b2a689795ca7 100644 --- a/google/cloud/compute/resource_policies/v1/internal/resource_policies_option_defaults.cc +++ b/google/cloud/compute/resource_policies/v1/internal/resource_policies_option_defaults.cc @@ -43,7 +43,7 @@ Options ResourcePoliciesDefaultOptions(Options options) { options.set< compute_resource_policies_v1::ResourcePoliciesRetryPolicyOption>( compute_resource_policies_v1::ResourcePoliciesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/resource_policies/v1/internal/resource_policies_rest_logging_decorator.h b/google/cloud/compute/resource_policies/v1/internal/resource_policies_rest_logging_decorator.h index 472abdb64f2af..2b00a08679171 100644 --- a/google/cloud/compute/resource_policies/v1/internal/resource_policies_rest_logging_decorator.h +++ b/google/cloud/compute/resource_policies/v1/internal/resource_policies_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESOURCE_POLICIES_V1_INTERNAL_RESOURCE_POLICIES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESOURCE_POLICIES_V1_INTERNAL_RESOURCE_POLICIES_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/resource_policies/v1/internal/resource_policies_rest_stub.h" +#include "google/cloud/compute/resource_policies/v1/resource_policies.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/resource_policies/v1/internal/resource_policies_rest_metadata_decorator.cc b/google/cloud/compute/resource_policies/v1/internal/resource_policies_rest_metadata_decorator.cc index 6fd84cdeec3f9..9a78716eaf7dc 100644 --- a/google/cloud/compute/resource_policies/v1/internal/resource_policies_rest_metadata_decorator.cc +++ b/google/cloud/compute/resource_policies/v1/internal/resource_policies_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/resource_policies/v1/resource_policies.proto #include "google/cloud/compute/resource_policies/v1/internal/resource_policies_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/resource_policies/v1/internal/resource_policies_rest_metadata_decorator.h b/google/cloud/compute/resource_policies/v1/internal/resource_policies_rest_metadata_decorator.h index 4711b974a30ec..85c434e06d9fc 100644 --- a/google/cloud/compute/resource_policies/v1/internal/resource_policies_rest_metadata_decorator.h +++ b/google/cloud/compute/resource_policies/v1/internal/resource_policies_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESOURCE_POLICIES_V1_INTERNAL_RESOURCE_POLICIES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESOURCE_POLICIES_V1_INTERNAL_RESOURCE_POLICIES_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/resource_policies/v1/internal/resource_policies_rest_stub.h" +#include "google/cloud/compute/resource_policies/v1/resource_policies.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/resource_policies/v1/internal/resource_policies_rest_stub.cc b/google/cloud/compute/resource_policies/v1/internal/resource_policies_rest_stub.cc index f0ba2ea4aa1c6..2cc4c962b70fe 100644 --- a/google/cloud/compute/resource_policies/v1/internal/resource_policies_rest_stub.cc +++ b/google/cloud/compute/resource_policies/v1/internal/resource_policies_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/resource_policies/v1/resource_policies.proto #include "google/cloud/compute/resource_policies/v1/internal/resource_policies_rest_stub.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" +#include "google/cloud/compute/resource_policies/v1/resource_policies.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/resource_policies/v1/internal/resource_policies_rest_stub.h b/google/cloud/compute/resource_policies/v1/internal/resource_policies_rest_stub.h index abaca69ce51d6..12d8c10eff247 100644 --- a/google/cloud/compute/resource_policies/v1/internal/resource_policies_rest_stub.h +++ b/google/cloud/compute/resource_policies/v1/internal/resource_policies_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESOURCE_POLICIES_V1_INTERNAL_RESOURCE_POLICIES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESOURCE_POLICIES_V1_INTERNAL_RESOURCE_POLICIES_REST_STUB_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" +#include "google/cloud/compute/resource_policies/v1/resource_policies.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/resource_policies/v1/internal/resource_policies_tracing_connection.cc b/google/cloud/compute/resource_policies/v1/internal/resource_policies_tracing_connection.cc index c058576ebb84b..e3e9aa0ddec0f 100644 --- a/google/cloud/compute/resource_policies/v1/internal/resource_policies_tracing_connection.cc +++ b/google/cloud/compute/resource_policies/v1/internal/resource_policies_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_resource_policies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ResourcePoliciesTracingConnection::ResourcePoliciesTracingConnection( std::shared_ptr child) @@ -211,17 +209,13 @@ ResourcePoliciesTracingConnection::TestIamPermissions( return internal::EndSpan(*span, child_->TestIamPermissions(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeResourcePoliciesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/resource_policies/v1/internal/resource_policies_tracing_connection.h b/google/cloud/compute/resource_policies/v1/internal/resource_policies_tracing_connection.h index a71d26a73c141..5719108e08b81 100644 --- a/google/cloud/compute/resource_policies/v1/internal/resource_policies_tracing_connection.h +++ b/google/cloud/compute/resource_policies/v1/internal/resource_policies_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_resource_policies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ResourcePoliciesTracingConnection : public compute_resource_policies_v1::ResourcePoliciesConnection { public: @@ -108,8 +106,6 @@ class ResourcePoliciesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/resource_policies/v1/resource_policies_connection.h b/google/cloud/compute/resource_policies/v1/resource_policies_connection.h index c8fa418e08162..ab90573a2f082 100644 --- a/google/cloud/compute/resource_policies/v1/resource_policies_connection.h +++ b/google/cloud/compute/resource_policies/v1/resource_policies_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESOURCE_POLICIES_V1_RESOURCE_POLICIES_CONNECTION_H #include "google/cloud/compute/resource_policies/v1/internal/resource_policies_retry_traits.h" +#include "google/cloud/compute/resource_policies/v1/resource_policies.pb.h" #include "google/cloud/compute/resource_policies/v1/resource_policies_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/resource_policies/v1/resource_policies_connection_idempotency_policy.h b/google/cloud/compute/resource_policies/v1/resource_policies_connection_idempotency_policy.h index 4c7ef4dffa090..7d43a94d8954e 100644 --- a/google/cloud/compute/resource_policies/v1/resource_policies_connection_idempotency_policy.h +++ b/google/cloud/compute/resource_policies/v1/resource_policies_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESOURCE_POLICIES_V1_RESOURCE_POLICIES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESOURCE_POLICIES_V1_RESOURCE_POLICIES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/resource_policies/v1/resource_policies.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/resource_policies/v1/resource_policies_proto_export.h b/google/cloud/compute/resource_policies/v1/resource_policies_proto_export.h index f503bf1ac6b74..1863bee555dcf 100644 --- a/google/cloud/compute/resource_policies/v1/resource_policies_proto_export.h +++ b/google/cloud/compute/resource_policies/v1/resource_policies_proto_export.h @@ -26,12 +26,12 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESOURCE_POLICIES_V1_RESOURCE_POLICIES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_007.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_031.pb.h" +#include "google/cloud/compute/v1/internal/common_108.pb.h" +#include "google/cloud/compute/v1/internal/common_114.pb.h" +#include "google/cloud/compute/v1/internal/common_145.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_RESOURCE_POLICIES_V1_RESOURCE_POLICIES_PROTO_EXPORT_H diff --git a/google/cloud/compute/routers/v1/internal/routers_option_defaults.cc b/google/cloud/compute/routers/v1/internal/routers_option_defaults.cc index 7c768eb94cb11..9ed4cf6cb305d 100644 --- a/google/cloud/compute/routers/v1/internal/routers_option_defaults.cc +++ b/google/cloud/compute/routers/v1/internal/routers_option_defaults.cc @@ -41,7 +41,7 @@ Options RoutersDefaultOptions(Options options) { if (!options.has()) { options.set( compute_routers_v1::RoutersLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/compute/routers/v1/internal/routers_rest_connection_impl.h b/google/cloud/compute/routers/v1/internal/routers_rest_connection_impl.h index 2d4a617742330..9b52454754c99 100644 --- a/google/cloud/compute/routers/v1/internal/routers_rest_connection_impl.h +++ b/google/cloud/compute/routers/v1/internal/routers_rest_connection_impl.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ROUTERS_V1_INTERNAL_ROUTERS_REST_CONNECTION_IMPL_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ROUTERS_V1_INTERNAL_ROUTERS_REST_CONNECTION_IMPL_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/routers/v1/internal/routers_rest_stub.h" #include "google/cloud/compute/routers/v1/internal/routers_retry_traits.h" #include "google/cloud/compute/routers/v1/routers_connection.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/routers/v1/internal/routers_rest_logging_decorator.h b/google/cloud/compute/routers/v1/internal/routers_rest_logging_decorator.h index b876b086b397c..eb10d4f068f4c 100644 --- a/google/cloud/compute/routers/v1/internal/routers_rest_logging_decorator.h +++ b/google/cloud/compute/routers/v1/internal/routers_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ROUTERS_V1_INTERNAL_ROUTERS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ROUTERS_V1_INTERNAL_ROUTERS_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/routers/v1/internal/routers_rest_stub.h" +#include "google/cloud/compute/routers/v1/routers.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/routers/v1/internal/routers_rest_metadata_decorator.cc b/google/cloud/compute/routers/v1/internal/routers_rest_metadata_decorator.cc index 8a4d788979875..2763fe10af6c3 100644 --- a/google/cloud/compute/routers/v1/internal/routers_rest_metadata_decorator.cc +++ b/google/cloud/compute/routers/v1/internal/routers_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/routers/v1/routers.proto #include "google/cloud/compute/routers/v1/internal/routers_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/routers/v1/internal/routers_rest_metadata_decorator.h b/google/cloud/compute/routers/v1/internal/routers_rest_metadata_decorator.h index 2a5e45f2ec56a..3c31e3febaaff 100644 --- a/google/cloud/compute/routers/v1/internal/routers_rest_metadata_decorator.h +++ b/google/cloud/compute/routers/v1/internal/routers_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ROUTERS_V1_INTERNAL_ROUTERS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ROUTERS_V1_INTERNAL_ROUTERS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/routers/v1/internal/routers_rest_stub.h" +#include "google/cloud/compute/routers/v1/routers.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/routers/v1/internal/routers_rest_stub.cc b/google/cloud/compute/routers/v1/internal/routers_rest_stub.cc index 2606040dcf5dd..ee1096bf12dd3 100644 --- a/google/cloud/compute/routers/v1/internal/routers_rest_stub.cc +++ b/google/cloud/compute/routers/v1/internal/routers_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/routers/v1/routers.proto #include "google/cloud/compute/routers/v1/internal/routers_rest_stub.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" +#include "google/cloud/compute/routers/v1/routers.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/routers/v1/internal/routers_rest_stub.h b/google/cloud/compute/routers/v1/internal/routers_rest_stub.h index 383e2eb8e5f6c..261af1927e8c7 100644 --- a/google/cloud/compute/routers/v1/internal/routers_rest_stub.h +++ b/google/cloud/compute/routers/v1/internal/routers_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ROUTERS_V1_INTERNAL_ROUTERS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ROUTERS_V1_INTERNAL_ROUTERS_REST_STUB_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" +#include "google/cloud/compute/routers/v1/routers.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/routers/v1/internal/routers_tracing_connection.cc b/google/cloud/compute/routers/v1/internal/routers_tracing_connection.cc index a19829b029e33..bec02c39781d1 100644 --- a/google/cloud/compute/routers/v1/internal/routers_tracing_connection.cc +++ b/google/cloud/compute/routers/v1/internal/routers_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_routers_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RoutersTracingConnection::RoutersTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -352,16 +350,12 @@ RoutersTracingConnection::UpdateRoutePolicy( child_->UpdateRoutePolicy(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRoutersTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/routers/v1/internal/routers_tracing_connection.h b/google/cloud/compute/routers/v1/internal/routers_tracing_connection.h index ea37526f9b7ab..ffbf63a3f295b 100644 --- a/google/cloud/compute/routers/v1/internal/routers_tracing_connection.h +++ b/google/cloud/compute/routers/v1/internal/routers_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_routers_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RoutersTracingConnection : public compute_routers_v1::RoutersConnection { public: ~RoutersTracingConnection() override = default; @@ -177,8 +175,6 @@ class RoutersTracingConnection : public compute_routers_v1::RoutersConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/routers/v1/routers_connection.h b/google/cloud/compute/routers/v1/routers_connection.h index 4df108018dfea..21f9c3e2fad74 100644 --- a/google/cloud/compute/routers/v1/routers_connection.h +++ b/google/cloud/compute/routers/v1/routers_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ROUTERS_V1_ROUTERS_CONNECTION_H #include "google/cloud/compute/routers/v1/internal/routers_retry_traits.h" +#include "google/cloud/compute/routers/v1/routers.pb.h" #include "google/cloud/compute/routers/v1/routers_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/routers/v1/routers_connection_idempotency_policy.h b/google/cloud/compute/routers/v1/routers_connection_idempotency_policy.h index 41b4649d0cc1e..f1de3e599d65b 100644 --- a/google/cloud/compute/routers/v1/routers_connection_idempotency_policy.h +++ b/google/cloud/compute/routers/v1/routers_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ROUTERS_V1_ROUTERS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ROUTERS_V1_ROUTERS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/routers/v1/routers.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/routers/v1/routers_proto_export.h b/google/cloud/compute/routers/v1/routers_proto_export.h index 8568f15792a1c..405c57335485c 100644 --- a/google/cloud/compute/routers/v1/routers_proto_export.h +++ b/google/cloud/compute/routers/v1/routers_proto_export.h @@ -26,10 +26,10 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ROUTERS_V1_ROUTERS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_013.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_031.pb.h" +#include "google/cloud/compute/v1/internal/common_115.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ROUTERS_V1_ROUTERS_PROTO_EXPORT_H diff --git a/google/cloud/compute/routes/v1/internal/routes_option_defaults.cc b/google/cloud/compute/routes/v1/internal/routes_option_defaults.cc index 7b0caf91286da..d00860ec0b76a 100644 --- a/google/cloud/compute/routes/v1/internal/routes_option_defaults.cc +++ b/google/cloud/compute/routes/v1/internal/routes_option_defaults.cc @@ -41,7 +41,7 @@ Options RoutesDefaultOptions(Options options) { if (!options.has()) { options.set( compute_routes_v1::RoutesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/compute/routes/v1/internal/routes_rest_connection_impl.h b/google/cloud/compute/routes/v1/internal/routes_rest_connection_impl.h index 484d1ba128eaa..115a2ef2757ef 100644 --- a/google/cloud/compute/routes/v1/internal/routes_rest_connection_impl.h +++ b/google/cloud/compute/routes/v1/internal/routes_rest_connection_impl.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ROUTES_V1_INTERNAL_ROUTES_REST_CONNECTION_IMPL_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ROUTES_V1_INTERNAL_ROUTES_REST_CONNECTION_IMPL_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/routes/v1/internal/routes_rest_stub.h" #include "google/cloud/compute/routes/v1/internal/routes_retry_traits.h" #include "google/cloud/compute/routes/v1/routes_connection.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/routes/v1/internal/routes_rest_logging_decorator.h b/google/cloud/compute/routes/v1/internal/routes_rest_logging_decorator.h index 619698a3ac8d6..7a8a9ea8ed26f 100644 --- a/google/cloud/compute/routes/v1/internal/routes_rest_logging_decorator.h +++ b/google/cloud/compute/routes/v1/internal/routes_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ROUTES_V1_INTERNAL_ROUTES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ROUTES_V1_INTERNAL_ROUTES_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/routes/v1/internal/routes_rest_stub.h" +#include "google/cloud/compute/routes/v1/routes.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/routes/v1/internal/routes_rest_metadata_decorator.cc b/google/cloud/compute/routes/v1/internal/routes_rest_metadata_decorator.cc index 34d8d66a5b2f1..818766a2b48e6 100644 --- a/google/cloud/compute/routes/v1/internal/routes_rest_metadata_decorator.cc +++ b/google/cloud/compute/routes/v1/internal/routes_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/routes/v1/routes.proto #include "google/cloud/compute/routes/v1/internal/routes_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/routes/v1/internal/routes_rest_metadata_decorator.h b/google/cloud/compute/routes/v1/internal/routes_rest_metadata_decorator.h index d24bd8673ec9f..50258b5aad3bc 100644 --- a/google/cloud/compute/routes/v1/internal/routes_rest_metadata_decorator.h +++ b/google/cloud/compute/routes/v1/internal/routes_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ROUTES_V1_INTERNAL_ROUTES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ROUTES_V1_INTERNAL_ROUTES_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/routes/v1/internal/routes_rest_stub.h" +#include "google/cloud/compute/routes/v1/routes.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/routes/v1/internal/routes_rest_stub.cc b/google/cloud/compute/routes/v1/internal/routes_rest_stub.cc index d0fff81074c4e..eacfd65950be4 100644 --- a/google/cloud/compute/routes/v1/internal/routes_rest_stub.cc +++ b/google/cloud/compute/routes/v1/internal/routes_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/routes/v1/routes.proto #include "google/cloud/compute/routes/v1/internal/routes_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/routes/v1/routes.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/routes/v1/internal/routes_rest_stub.h b/google/cloud/compute/routes/v1/internal/routes_rest_stub.h index 9a21682581483..9ed3cd9f4246d 100644 --- a/google/cloud/compute/routes/v1/internal/routes_rest_stub.h +++ b/google/cloud/compute/routes/v1/internal/routes_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ROUTES_V1_INTERNAL_ROUTES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ROUTES_V1_INTERNAL_ROUTES_REST_STUB_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/routes/v1/routes.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/routes/v1/internal/routes_tracing_connection.cc b/google/cloud/compute/routes/v1/internal/routes_tracing_connection.cc index 0e2c9e08c513e..5b0b2b32276be 100644 --- a/google/cloud/compute/routes/v1/internal/routes_tracing_connection.cc +++ b/google/cloud/compute/routes/v1/internal/routes_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_routes_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RoutesTracingConnection::RoutesTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -113,16 +111,12 @@ RoutesTracingConnection::ListRoutes( google::cloud::cpp::compute::v1::Route>(std::move(span), std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRoutesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/routes/v1/internal/routes_tracing_connection.h b/google/cloud/compute/routes/v1/internal/routes_tracing_connection.h index 23be80fbfceba..9fa1a83a198a2 100644 --- a/google/cloud/compute/routes/v1/internal/routes_tracing_connection.h +++ b/google/cloud/compute/routes/v1/internal/routes_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_routes_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RoutesTracingConnection : public compute_routes_v1::RoutesConnection { public: ~RoutesTracingConnection() override = default; @@ -75,8 +73,6 @@ class RoutesTracingConnection : public compute_routes_v1::RoutesConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/routes/v1/routes_connection.h b/google/cloud/compute/routes/v1/routes_connection.h index b950e3ec2013f..1ee615c1fa68f 100644 --- a/google/cloud/compute/routes/v1/routes_connection.h +++ b/google/cloud/compute/routes/v1/routes_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ROUTES_V1_ROUTES_CONNECTION_H #include "google/cloud/compute/routes/v1/internal/routes_retry_traits.h" +#include "google/cloud/compute/routes/v1/routes.pb.h" #include "google/cloud/compute/routes/v1/routes_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/routes/v1/routes_connection_idempotency_policy.h b/google/cloud/compute/routes/v1/routes_connection_idempotency_policy.h index 1ad279af6c4e9..bdbd0ca4e2128 100644 --- a/google/cloud/compute/routes/v1/routes_connection_idempotency_policy.h +++ b/google/cloud/compute/routes/v1/routes_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ROUTES_V1_ROUTES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ROUTES_V1_ROUTES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/routes/v1/routes.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/routes/v1/routes_proto_export.h b/google/cloud/compute/routes/v1/routes_proto_export.h index 8e4038d6b9dca..f6371fbf47845 100644 --- a/google/cloud/compute/routes/v1/routes_proto_export.h +++ b/google/cloud/compute/routes/v1/routes_proto_export.h @@ -26,9 +26,9 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ROUTES_V1_ROUTES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_115.pb.h" +#include "google/cloud/compute/v1/internal/common_116.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ROUTES_V1_ROUTES_PROTO_EXPORT_H diff --git a/google/cloud/compute/samples/disk_samples.cc b/google/cloud/compute/samples/disk_samples.cc index babb641559fa9..68e00ff7e9efc 100644 --- a/google/cloud/compute/samples/disk_samples.cc +++ b/google/cloud/compute/samples/disk_samples.cc @@ -14,11 +14,11 @@ #include "google/cloud/compute/disks/v1/disks_client.h" #include "google/cloud/future.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/internal/random.h" #include "google/cloud/status_or.h" #include "google/cloud/testing_util/example_driver.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_split.h" #include #include diff --git a/google/cloud/compute/security_policies/v1/internal/security_policies_option_defaults.cc b/google/cloud/compute/security_policies/v1/internal/security_policies_option_defaults.cc index e64418fb0222a..cf6e9cd69b16e 100644 --- a/google/cloud/compute/security_policies/v1/internal/security_policies_option_defaults.cc +++ b/google/cloud/compute/security_policies/v1/internal/security_policies_option_defaults.cc @@ -43,7 +43,7 @@ Options SecurityPoliciesDefaultOptions(Options options) { options.set< compute_security_policies_v1::SecurityPoliciesRetryPolicyOption>( compute_security_policies_v1::SecurityPoliciesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/security_policies/v1/internal/security_policies_rest_logging_decorator.h b/google/cloud/compute/security_policies/v1/internal/security_policies_rest_logging_decorator.h index ba82168ad1ee9..20402dde3f2e7 100644 --- a/google/cloud/compute/security_policies/v1/internal/security_policies_rest_logging_decorator.h +++ b/google/cloud/compute/security_policies/v1/internal/security_policies_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SECURITY_POLICIES_V1_INTERNAL_SECURITY_POLICIES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SECURITY_POLICIES_V1_INTERNAL_SECURITY_POLICIES_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/security_policies/v1/internal/security_policies_rest_stub.h" +#include "google/cloud/compute/security_policies/v1/security_policies.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/security_policies/v1/internal/security_policies_rest_metadata_decorator.cc b/google/cloud/compute/security_policies/v1/internal/security_policies_rest_metadata_decorator.cc index 476106d66f799..8fe85dfe543ad 100644 --- a/google/cloud/compute/security_policies/v1/internal/security_policies_rest_metadata_decorator.cc +++ b/google/cloud/compute/security_policies/v1/internal/security_policies_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/security_policies/v1/security_policies.proto #include "google/cloud/compute/security_policies/v1/internal/security_policies_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/security_policies/v1/internal/security_policies_rest_metadata_decorator.h b/google/cloud/compute/security_policies/v1/internal/security_policies_rest_metadata_decorator.h index 45a67bbddfc09..6332448222e4b 100644 --- a/google/cloud/compute/security_policies/v1/internal/security_policies_rest_metadata_decorator.h +++ b/google/cloud/compute/security_policies/v1/internal/security_policies_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SECURITY_POLICIES_V1_INTERNAL_SECURITY_POLICIES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SECURITY_POLICIES_V1_INTERNAL_SECURITY_POLICIES_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/security_policies/v1/internal/security_policies_rest_stub.h" +#include "google/cloud/compute/security_policies/v1/security_policies.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/security_policies/v1/internal/security_policies_rest_stub.cc b/google/cloud/compute/security_policies/v1/internal/security_policies_rest_stub.cc index be4f6427460df..b7c67b03195af 100644 --- a/google/cloud/compute/security_policies/v1/internal/security_policies_rest_stub.cc +++ b/google/cloud/compute/security_policies/v1/internal/security_policies_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/security_policies/v1/security_policies.proto #include "google/cloud/compute/security_policies/v1/internal/security_policies_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/security_policies/v1/security_policies.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/security_policies/v1/internal/security_policies_rest_stub.h b/google/cloud/compute/security_policies/v1/internal/security_policies_rest_stub.h index d31b2a64a9bcc..ef24bddad43fc 100644 --- a/google/cloud/compute/security_policies/v1/internal/security_policies_rest_stub.h +++ b/google/cloud/compute/security_policies/v1/internal/security_policies_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SECURITY_POLICIES_V1_INTERNAL_SECURITY_POLICIES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SECURITY_POLICIES_V1_INTERNAL_SECURITY_POLICIES_REST_STUB_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/security_policies/v1/security_policies.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/security_policies/v1/internal/security_policies_tracing_connection.cc b/google/cloud/compute/security_policies/v1/internal/security_policies_tracing_connection.cc index 6d76f78379fcd..4ba0ffb3c9261 100644 --- a/google/cloud/compute/security_policies/v1/internal/security_policies_tracing_connection.cc +++ b/google/cloud/compute/security_policies/v1/internal/security_policies_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_security_policies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SecurityPoliciesTracingConnection::SecurityPoliciesTracingConnection( std::shared_ptr child) @@ -323,17 +321,13 @@ SecurityPoliciesTracingConnection::SetLabels( return internal::EndSpan(std::move(span), child_->SetLabels(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSecurityPoliciesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/security_policies/v1/internal/security_policies_tracing_connection.h b/google/cloud/compute/security_policies/v1/internal/security_policies_tracing_connection.h index 09b5130bad045..71f273778d6d3 100644 --- a/google/cloud/compute/security_policies/v1/internal/security_policies_tracing_connection.h +++ b/google/cloud/compute/security_policies/v1/internal/security_policies_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_security_policies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SecurityPoliciesTracingConnection : public compute_security_policies_v1::SecurityPoliciesConnection { public: @@ -151,8 +149,6 @@ class SecurityPoliciesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/security_policies/v1/security_policies_connection.h b/google/cloud/compute/security_policies/v1/security_policies_connection.h index 021f303f2b437..97ed465bd69df 100644 --- a/google/cloud/compute/security_policies/v1/security_policies_connection.h +++ b/google/cloud/compute/security_policies/v1/security_policies_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SECURITY_POLICIES_V1_SECURITY_POLICIES_CONNECTION_H #include "google/cloud/compute/security_policies/v1/internal/security_policies_retry_traits.h" +#include "google/cloud/compute/security_policies/v1/security_policies.pb.h" #include "google/cloud/compute/security_policies/v1/security_policies_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/security_policies/v1/security_policies_connection_idempotency_policy.h b/google/cloud/compute/security_policies/v1/security_policies_connection_idempotency_policy.h index 4e69ed4712483..ad6e6e97bf2d8 100644 --- a/google/cloud/compute/security_policies/v1/security_policies_connection_idempotency_policy.h +++ b/google/cloud/compute/security_policies/v1/security_policies_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SECURITY_POLICIES_V1_SECURITY_POLICIES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SECURITY_POLICIES_V1_SECURITY_POLICIES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/security_policies/v1/security_policies.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/security_policies/v1/security_policies_proto_export.h b/google/cloud/compute/security_policies/v1/security_policies_proto_export.h index 5194fad56d50c..bd3ba6eb69771 100644 --- a/google/cloud/compute/security_policies/v1/security_policies_proto_export.h +++ b/google/cloud/compute/security_policies/v1/security_policies_proto_export.h @@ -26,11 +26,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SECURITY_POLICIES_V1_SECURITY_POLICIES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_031.pb.h" +#include "google/cloud/compute/v1/internal/common_046.pb.h" +#include "google/cloud/compute/v1/internal/common_094.pb.h" +#include "google/cloud/compute/v1/internal/common_117.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SECURITY_POLICIES_V1_SECURITY_POLICIES_PROTO_EXPORT_H diff --git a/google/cloud/compute/service_attachments/v1/internal/service_attachments_option_defaults.cc b/google/cloud/compute/service_attachments/v1/internal/service_attachments_option_defaults.cc index 09606a0e98dae..b61771f6edc9d 100644 --- a/google/cloud/compute/service_attachments/v1/internal/service_attachments_option_defaults.cc +++ b/google/cloud/compute/service_attachments/v1/internal/service_attachments_option_defaults.cc @@ -44,7 +44,7 @@ Options ServiceAttachmentsDefaultOptions(Options options) { options.set< compute_service_attachments_v1::ServiceAttachmentsRetryPolicyOption>( compute_service_attachments_v1:: - ServiceAttachmentsLimitedTimeRetryPolicy(std::chrono::minutes(30)) + ServiceAttachmentsLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/service_attachments/v1/internal/service_attachments_rest_logging_decorator.h b/google/cloud/compute/service_attachments/v1/internal/service_attachments_rest_logging_decorator.h index f236ea0db0817..b601ccafddd24 100644 --- a/google/cloud/compute/service_attachments/v1/internal/service_attachments_rest_logging_decorator.h +++ b/google/cloud/compute/service_attachments/v1/internal/service_attachments_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SERVICE_ATTACHMENTS_V1_INTERNAL_SERVICE_ATTACHMENTS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SERVICE_ATTACHMENTS_V1_INTERNAL_SERVICE_ATTACHMENTS_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/service_attachments/v1/internal/service_attachments_rest_stub.h" +#include "google/cloud/compute/service_attachments/v1/service_attachments.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/service_attachments/v1/internal/service_attachments_rest_metadata_decorator.cc b/google/cloud/compute/service_attachments/v1/internal/service_attachments_rest_metadata_decorator.cc index 9dc3870bec941..0f6e0fcaefffa 100644 --- a/google/cloud/compute/service_attachments/v1/internal/service_attachments_rest_metadata_decorator.cc +++ b/google/cloud/compute/service_attachments/v1/internal/service_attachments_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/service_attachments/v1/service_attachments.proto #include "google/cloud/compute/service_attachments/v1/internal/service_attachments_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/service_attachments/v1/internal/service_attachments_rest_metadata_decorator.h b/google/cloud/compute/service_attachments/v1/internal/service_attachments_rest_metadata_decorator.h index 7ad94d39f421d..87b5c3684efe9 100644 --- a/google/cloud/compute/service_attachments/v1/internal/service_attachments_rest_metadata_decorator.h +++ b/google/cloud/compute/service_attachments/v1/internal/service_attachments_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SERVICE_ATTACHMENTS_V1_INTERNAL_SERVICE_ATTACHMENTS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SERVICE_ATTACHMENTS_V1_INTERNAL_SERVICE_ATTACHMENTS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/service_attachments/v1/internal/service_attachments_rest_stub.h" +#include "google/cloud/compute/service_attachments/v1/service_attachments.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/service_attachments/v1/internal/service_attachments_rest_stub.cc b/google/cloud/compute/service_attachments/v1/internal/service_attachments_rest_stub.cc index 9506c084d0663..340878aa67e93 100644 --- a/google/cloud/compute/service_attachments/v1/internal/service_attachments_rest_stub.cc +++ b/google/cloud/compute/service_attachments/v1/internal/service_attachments_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/service_attachments/v1/service_attachments.proto #include "google/cloud/compute/service_attachments/v1/internal/service_attachments_rest_stub.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" +#include "google/cloud/compute/service_attachments/v1/service_attachments.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/service_attachments/v1/internal/service_attachments_rest_stub.h b/google/cloud/compute/service_attachments/v1/internal/service_attachments_rest_stub.h index b010812dd769e..39e99d0b95e38 100644 --- a/google/cloud/compute/service_attachments/v1/internal/service_attachments_rest_stub.h +++ b/google/cloud/compute/service_attachments/v1/internal/service_attachments_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SERVICE_ATTACHMENTS_V1_INTERNAL_SERVICE_ATTACHMENTS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SERVICE_ATTACHMENTS_V1_INTERNAL_SERVICE_ATTACHMENTS_REST_STUB_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" +#include "google/cloud/compute/service_attachments/v1/service_attachments.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/service_attachments/v1/internal/service_attachments_tracing_connection.cc b/google/cloud/compute/service_attachments/v1/internal/service_attachments_tracing_connection.cc index ce618d8c07900..928899ba92544 100644 --- a/google/cloud/compute/service_attachments/v1/internal/service_attachments_tracing_connection.cc +++ b/google/cloud/compute/service_attachments/v1/internal/service_attachments_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_service_attachments_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ServiceAttachmentsTracingConnection::ServiceAttachmentsTracingConnection( std::shared_ptr< compute_service_attachments_v1::ServiceAttachmentsConnection> @@ -214,19 +212,15 @@ ServiceAttachmentsTracingConnection::TestIamPermissions( return internal::EndSpan(*span, child_->TestIamPermissions(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeServiceAttachmentsTracingConnection( std::shared_ptr< compute_service_attachments_v1::ServiceAttachmentsConnection> conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/service_attachments/v1/internal/service_attachments_tracing_connection.h b/google/cloud/compute/service_attachments/v1/internal/service_attachments_tracing_connection.h index 6a1fd76e5bdbd..4f3c9dfc6f891 100644 --- a/google/cloud/compute/service_attachments/v1/internal/service_attachments_tracing_connection.h +++ b/google/cloud/compute/service_attachments/v1/internal/service_attachments_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_service_attachments_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ServiceAttachmentsTracingConnection : public compute_service_attachments_v1::ServiceAttachmentsConnection { public: @@ -113,8 +111,6 @@ class ServiceAttachmentsTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/service_attachments/v1/service_attachments_connection.h b/google/cloud/compute/service_attachments/v1/service_attachments_connection.h index 721b78f8eb962..85212762222ef 100644 --- a/google/cloud/compute/service_attachments/v1/service_attachments_connection.h +++ b/google/cloud/compute/service_attachments/v1/service_attachments_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SERVICE_ATTACHMENTS_V1_SERVICE_ATTACHMENTS_CONNECTION_H #include "google/cloud/compute/service_attachments/v1/internal/service_attachments_retry_traits.h" +#include "google/cloud/compute/service_attachments/v1/service_attachments.pb.h" #include "google/cloud/compute/service_attachments/v1/service_attachments_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/service_attachments/v1/service_attachments_connection_idempotency_policy.h b/google/cloud/compute/service_attachments/v1/service_attachments_connection_idempotency_policy.h index 765cff96dec10..058b89907d6d6 100644 --- a/google/cloud/compute/service_attachments/v1/service_attachments_connection_idempotency_policy.h +++ b/google/cloud/compute/service_attachments/v1/service_attachments_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SERVICE_ATTACHMENTS_V1_SERVICE_ATTACHMENTS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SERVICE_ATTACHMENTS_V1_SERVICE_ATTACHMENTS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/service_attachments/v1/service_attachments.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/service_attachments/v1/service_attachments_proto_export.h b/google/cloud/compute/service_attachments/v1/service_attachments_proto_export.h index a1925f34d90ab..4d61226dba6e7 100644 --- a/google/cloud/compute/service_attachments/v1/service_attachments_proto_export.h +++ b/google/cloud/compute/service_attachments/v1/service_attachments_proto_export.h @@ -26,12 +26,12 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SERVICE_ATTACHMENTS_V1_SERVICE_ATTACHMENTS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_007.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_031.pb.h" +#include "google/cloud/compute/v1/internal/common_108.pb.h" +#include "google/cloud/compute/v1/internal/common_119.pb.h" +#include "google/cloud/compute/v1/internal/common_145.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SERVICE_ATTACHMENTS_V1_SERVICE_ATTACHMENTS_PROTO_EXPORT_H diff --git a/google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_option_defaults.cc b/google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_option_defaults.cc index 532a305e503eb..e2e0929eece9a 100644 --- a/google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_option_defaults.cc +++ b/google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_option_defaults.cc @@ -43,7 +43,7 @@ Options SnapshotSettingsDefaultOptions(Options options) { options.set< compute_snapshot_settings_v1::SnapshotSettingsRetryPolicyOption>( compute_snapshot_settings_v1::SnapshotSettingsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_rest_logging_decorator.h b/google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_rest_logging_decorator.h index 19593ffd28765..7233f2e6f389f 100644 --- a/google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_rest_logging_decorator.h +++ b/google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SNAPSHOT_SETTINGS_V1_INTERNAL_SNAPSHOT_SETTINGS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SNAPSHOT_SETTINGS_V1_INTERNAL_SNAPSHOT_SETTINGS_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_rest_stub.h" +#include "google/cloud/compute/snapshot_settings/v1/snapshot_settings.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_rest_metadata_decorator.cc b/google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_rest_metadata_decorator.cc index 75533922504ca..68b4e11bf4a2d 100644 --- a/google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_rest_metadata_decorator.cc +++ b/google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/snapshot_settings/v1/snapshot_settings.proto #include "google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_rest_metadata_decorator.h b/google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_rest_metadata_decorator.h index 52b906f692891..2853c9eb7da28 100644 --- a/google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_rest_metadata_decorator.h +++ b/google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SNAPSHOT_SETTINGS_V1_INTERNAL_SNAPSHOT_SETTINGS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SNAPSHOT_SETTINGS_V1_INTERNAL_SNAPSHOT_SETTINGS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_rest_stub.h" +#include "google/cloud/compute/snapshot_settings/v1/snapshot_settings.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_rest_stub.cc b/google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_rest_stub.cc index 87279b266ce64..31b1eee7a2706 100644 --- a/google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_rest_stub.cc +++ b/google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/snapshot_settings/v1/snapshot_settings.proto #include "google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/snapshot_settings/v1/snapshot_settings.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_rest_stub.h b/google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_rest_stub.h index deb40a51e5de8..0a0935a601700 100644 --- a/google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_rest_stub.h +++ b/google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SNAPSHOT_SETTINGS_V1_INTERNAL_SNAPSHOT_SETTINGS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SNAPSHOT_SETTINGS_V1_INTERNAL_SNAPSHOT_SETTINGS_REST_STUB_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/snapshot_settings/v1/snapshot_settings.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_tracing_connection.cc b/google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_tracing_connection.cc index 222d7416233b6..368d500162005 100644 --- a/google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_tracing_connection.cc +++ b/google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace compute_snapshot_settings_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SnapshotSettingsTracingConnection::SnapshotSettingsTracingConnection( std::shared_ptr child) @@ -79,17 +77,13 @@ SnapshotSettingsTracingConnection::PatchSnapshotSettings( child_->PatchSnapshotSettings(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSnapshotSettingsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_tracing_connection.h b/google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_tracing_connection.h index 0da5df1399c62..8f1864998229f 100644 --- a/google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_tracing_connection.h +++ b/google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_snapshot_settings_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SnapshotSettingsTracingConnection : public compute_snapshot_settings_v1::SnapshotSettingsConnection { public: @@ -63,8 +61,6 @@ class SnapshotSettingsTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/snapshot_settings/v1/snapshot_settings_connection.h b/google/cloud/compute/snapshot_settings/v1/snapshot_settings_connection.h index 0e3c39e4ef327..15f2323e63bde 100644 --- a/google/cloud/compute/snapshot_settings/v1/snapshot_settings_connection.h +++ b/google/cloud/compute/snapshot_settings/v1/snapshot_settings_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SNAPSHOT_SETTINGS_V1_SNAPSHOT_SETTINGS_CONNECTION_H #include "google/cloud/compute/snapshot_settings/v1/internal/snapshot_settings_retry_traits.h" +#include "google/cloud/compute/snapshot_settings/v1/snapshot_settings.pb.h" #include "google/cloud/compute/snapshot_settings/v1/snapshot_settings_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -29,7 +30,6 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/snapshot_settings/v1/snapshot_settings_connection_idempotency_policy.h b/google/cloud/compute/snapshot_settings/v1/snapshot_settings_connection_idempotency_policy.h index d05e1ddfc2e8e..706a47cb52204 100644 --- a/google/cloud/compute/snapshot_settings/v1/snapshot_settings_connection_idempotency_policy.h +++ b/google/cloud/compute/snapshot_settings/v1/snapshot_settings_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SNAPSHOT_SETTINGS_V1_SNAPSHOT_SETTINGS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SNAPSHOT_SETTINGS_V1_SNAPSHOT_SETTINGS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/snapshot_settings/v1/snapshot_settings.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/snapshot_settings/v1/snapshot_settings_proto_export.h b/google/cloud/compute/snapshot_settings/v1/snapshot_settings_proto_export.h index 1c262d13488be..cff16a8f85b49 100644 --- a/google/cloud/compute/snapshot_settings/v1/snapshot_settings_proto_export.h +++ b/google/cloud/compute/snapshot_settings/v1/snapshot_settings_proto_export.h @@ -26,8 +26,8 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SNAPSHOT_SETTINGS_V1_SNAPSHOT_SETTINGS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_124.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SNAPSHOT_SETTINGS_V1_SNAPSHOT_SETTINGS_PROTO_EXPORT_H diff --git a/google/cloud/compute/snapshots/v1/internal/snapshots_option_defaults.cc b/google/cloud/compute/snapshots/v1/internal/snapshots_option_defaults.cc index f3f2d86b9a70d..c9168053b7b93 100644 --- a/google/cloud/compute/snapshots/v1/internal/snapshots_option_defaults.cc +++ b/google/cloud/compute/snapshots/v1/internal/snapshots_option_defaults.cc @@ -41,7 +41,7 @@ Options SnapshotsDefaultOptions(Options options) { if (!options.has()) { options.set( compute_snapshots_v1::SnapshotsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/compute/snapshots/v1/internal/snapshots_rest_connection_impl.h b/google/cloud/compute/snapshots/v1/internal/snapshots_rest_connection_impl.h index 60e4dbe01161f..845f6fdd46732 100644 --- a/google/cloud/compute/snapshots/v1/internal/snapshots_rest_connection_impl.h +++ b/google/cloud/compute/snapshots/v1/internal/snapshots_rest_connection_impl.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SNAPSHOTS_V1_INTERNAL_SNAPSHOTS_REST_CONNECTION_IMPL_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SNAPSHOTS_V1_INTERNAL_SNAPSHOTS_REST_CONNECTION_IMPL_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/snapshots/v1/internal/snapshots_rest_stub.h" #include "google/cloud/compute/snapshots/v1/internal/snapshots_retry_traits.h" #include "google/cloud/compute/snapshots/v1/snapshots_connection.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/snapshots/v1/internal/snapshots_rest_logging_decorator.h b/google/cloud/compute/snapshots/v1/internal/snapshots_rest_logging_decorator.h index bf10795f30cc5..bd987a7bea166 100644 --- a/google/cloud/compute/snapshots/v1/internal/snapshots_rest_logging_decorator.h +++ b/google/cloud/compute/snapshots/v1/internal/snapshots_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SNAPSHOTS_V1_INTERNAL_SNAPSHOTS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SNAPSHOTS_V1_INTERNAL_SNAPSHOTS_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/snapshots/v1/internal/snapshots_rest_stub.h" +#include "google/cloud/compute/snapshots/v1/snapshots.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/snapshots/v1/internal/snapshots_rest_metadata_decorator.cc b/google/cloud/compute/snapshots/v1/internal/snapshots_rest_metadata_decorator.cc index c8ddd6b42abcf..703d7346314ac 100644 --- a/google/cloud/compute/snapshots/v1/internal/snapshots_rest_metadata_decorator.cc +++ b/google/cloud/compute/snapshots/v1/internal/snapshots_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/snapshots/v1/snapshots.proto #include "google/cloud/compute/snapshots/v1/internal/snapshots_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/snapshots/v1/internal/snapshots_rest_metadata_decorator.h b/google/cloud/compute/snapshots/v1/internal/snapshots_rest_metadata_decorator.h index 103fc8cc1b7c9..10a45c4d89a56 100644 --- a/google/cloud/compute/snapshots/v1/internal/snapshots_rest_metadata_decorator.h +++ b/google/cloud/compute/snapshots/v1/internal/snapshots_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SNAPSHOTS_V1_INTERNAL_SNAPSHOTS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SNAPSHOTS_V1_INTERNAL_SNAPSHOTS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/snapshots/v1/internal/snapshots_rest_stub.h" +#include "google/cloud/compute/snapshots/v1/snapshots.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/snapshots/v1/internal/snapshots_rest_stub.cc b/google/cloud/compute/snapshots/v1/internal/snapshots_rest_stub.cc index 814221457f5e5..a9511128179d8 100644 --- a/google/cloud/compute/snapshots/v1/internal/snapshots_rest_stub.cc +++ b/google/cloud/compute/snapshots/v1/internal/snapshots_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/snapshots/v1/snapshots.proto #include "google/cloud/compute/snapshots/v1/internal/snapshots_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/snapshots/v1/snapshots.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/snapshots/v1/internal/snapshots_rest_stub.h b/google/cloud/compute/snapshots/v1/internal/snapshots_rest_stub.h index 3e50a7f6e427a..875ac41116211 100644 --- a/google/cloud/compute/snapshots/v1/internal/snapshots_rest_stub.h +++ b/google/cloud/compute/snapshots/v1/internal/snapshots_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SNAPSHOTS_V1_INTERNAL_SNAPSHOTS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SNAPSHOTS_V1_INTERNAL_SNAPSHOTS_REST_STUB_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/snapshots/v1/snapshots.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/snapshots/v1/internal/snapshots_tracing_connection.cc b/google/cloud/compute/snapshots/v1/internal/snapshots_tracing_connection.cc index 4b51382eed3a6..45fc0a248e50d 100644 --- a/google/cloud/compute/snapshots/v1/internal/snapshots_tracing_connection.cc +++ b/google/cloud/compute/snapshots/v1/internal/snapshots_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_snapshots_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SnapshotsTracingConnection::SnapshotsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -177,16 +175,12 @@ SnapshotsTracingConnection::TestIamPermissions( return internal::EndSpan(*span, child_->TestIamPermissions(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSnapshotsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/snapshots/v1/internal/snapshots_tracing_connection.h b/google/cloud/compute/snapshots/v1/internal/snapshots_tracing_connection.h index e367a41bad8bb..ce137314de40b 100644 --- a/google/cloud/compute/snapshots/v1/internal/snapshots_tracing_connection.h +++ b/google/cloud/compute/snapshots/v1/internal/snapshots_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_snapshots_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SnapshotsTracingConnection : public compute_snapshots_v1::SnapshotsConnection { public: @@ -100,8 +98,6 @@ class SnapshotsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/snapshots/v1/snapshots_connection.h b/google/cloud/compute/snapshots/v1/snapshots_connection.h index 7a0ddd4fb2902..c8478224c89bd 100644 --- a/google/cloud/compute/snapshots/v1/snapshots_connection.h +++ b/google/cloud/compute/snapshots/v1/snapshots_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SNAPSHOTS_V1_SNAPSHOTS_CONNECTION_H #include "google/cloud/compute/snapshots/v1/internal/snapshots_retry_traits.h" +#include "google/cloud/compute/snapshots/v1/snapshots.pb.h" #include "google/cloud/compute/snapshots/v1/snapshots_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/snapshots/v1/snapshots_connection_idempotency_policy.h b/google/cloud/compute/snapshots/v1/snapshots_connection_idempotency_policy.h index 25d19847ebcfa..f3d7fed50796b 100644 --- a/google/cloud/compute/snapshots/v1/snapshots_connection_idempotency_policy.h +++ b/google/cloud/compute/snapshots/v1/snapshots_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SNAPSHOTS_V1_SNAPSHOTS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SNAPSHOTS_V1_SNAPSHOTS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/snapshots/v1/snapshots.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/snapshots/v1/snapshots_proto_export.h b/google/cloud/compute/snapshots/v1/snapshots_proto_export.h index bec6d57f7ec38..20047a2da893a 100644 --- a/google/cloud/compute/snapshots/v1/snapshots_proto_export.h +++ b/google/cloud/compute/snapshots/v1/snapshots_proto_export.h @@ -26,15 +26,15 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SNAPSHOTS_V1_SNAPSHOTS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_007.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_021.pb.h" +#include "google/cloud/compute/v1/internal/common_031.pb.h" +#include "google/cloud/compute/v1/internal/common_046.pb.h" +#include "google/cloud/compute/v1/internal/common_047.pb.h" +#include "google/cloud/compute/v1/internal/common_122.pb.h" +#include "google/cloud/compute/v1/internal/common_123.pb.h" +#include "google/cloud/compute/v1/internal/common_145.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SNAPSHOTS_V1_SNAPSHOTS_PROTO_EXPORT_H diff --git a/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_option_defaults.cc b/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_option_defaults.cc index 07736fe84ade8..400f8451df365 100644 --- a/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_option_defaults.cc +++ b/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_option_defaults.cc @@ -42,7 +42,7 @@ Options SslCertificatesDefaultOptions(Options options) { compute_ssl_certificates_v1::SslCertificatesRetryPolicyOption>()) { options.set( compute_ssl_certificates_v1::SslCertificatesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_rest_connection_impl.h b/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_rest_connection_impl.h index e4f8115f2e3b1..7dfbfbf90da44 100644 --- a/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_rest_connection_impl.h +++ b/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_rest_connection_impl.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SSL_CERTIFICATES_V1_INTERNAL_SSL_CERTIFICATES_REST_CONNECTION_IMPL_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SSL_CERTIFICATES_V1_INTERNAL_SSL_CERTIFICATES_REST_CONNECTION_IMPL_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_rest_stub.h" #include "google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_retry_traits.h" #include "google/cloud/compute/ssl_certificates/v1/ssl_certificates_connection.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_rest_logging_decorator.h b/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_rest_logging_decorator.h index 0fce342ed2dfc..59006b0a7867f 100644 --- a/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_rest_logging_decorator.h +++ b/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SSL_CERTIFICATES_V1_INTERNAL_SSL_CERTIFICATES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SSL_CERTIFICATES_V1_INTERNAL_SSL_CERTIFICATES_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_rest_stub.h" +#include "google/cloud/compute/ssl_certificates/v1/ssl_certificates.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_rest_metadata_decorator.cc b/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_rest_metadata_decorator.cc index 285f720e9d5d5..8bb107f3e34ed 100644 --- a/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_rest_metadata_decorator.cc +++ b/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/ssl_certificates/v1/ssl_certificates.proto #include "google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_rest_metadata_decorator.h b/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_rest_metadata_decorator.h index 91b2e1d60788f..8a0ae79059425 100644 --- a/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_rest_metadata_decorator.h +++ b/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SSL_CERTIFICATES_V1_INTERNAL_SSL_CERTIFICATES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SSL_CERTIFICATES_V1_INTERNAL_SSL_CERTIFICATES_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_rest_stub.h" +#include "google/cloud/compute/ssl_certificates/v1/ssl_certificates.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_rest_stub.cc b/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_rest_stub.cc index f2a92215a56f9..14b6928255a9f 100644 --- a/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_rest_stub.cc +++ b/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/ssl_certificates/v1/ssl_certificates.proto #include "google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/ssl_certificates/v1/ssl_certificates.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_rest_stub.h b/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_rest_stub.h index 71889b1b82c70..61263482b4664 100644 --- a/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_rest_stub.h +++ b/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SSL_CERTIFICATES_V1_INTERNAL_SSL_CERTIFICATES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SSL_CERTIFICATES_V1_INTERNAL_SSL_CERTIFICATES_REST_STUB_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/ssl_certificates/v1/ssl_certificates.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_tracing_connection.cc b/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_tracing_connection.cc index 269484d7d4a5c..d2734728e653d 100644 --- a/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_tracing_connection.cc +++ b/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_ssl_certificates_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SslCertificatesTracingConnection::SslCertificatesTracingConnection( std::shared_ptr child) @@ -144,17 +142,13 @@ SslCertificatesTracingConnection::ListSslCertificates( std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSslCertificatesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_tracing_connection.h b/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_tracing_connection.h index 4d2572c714c1d..2785c8c2ce6f7 100644 --- a/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_tracing_connection.h +++ b/google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_ssl_certificates_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SslCertificatesTracingConnection : public compute_ssl_certificates_v1::SslCertificatesConnection { public: @@ -84,8 +82,6 @@ class SslCertificatesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/ssl_certificates/v1/ssl_certificates_connection.h b/google/cloud/compute/ssl_certificates/v1/ssl_certificates_connection.h index b6aa5e0baeef1..150fd82c2ffff 100644 --- a/google/cloud/compute/ssl_certificates/v1/ssl_certificates_connection.h +++ b/google/cloud/compute/ssl_certificates/v1/ssl_certificates_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SSL_CERTIFICATES_V1_SSL_CERTIFICATES_CONNECTION_H #include "google/cloud/compute/ssl_certificates/v1/internal/ssl_certificates_retry_traits.h" +#include "google/cloud/compute/ssl_certificates/v1/ssl_certificates.pb.h" #include "google/cloud/compute/ssl_certificates/v1/ssl_certificates_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/ssl_certificates/v1/ssl_certificates_connection_idempotency_policy.h b/google/cloud/compute/ssl_certificates/v1/ssl_certificates_connection_idempotency_policy.h index ae8a6493b25bb..53b45f5828937 100644 --- a/google/cloud/compute/ssl_certificates/v1/ssl_certificates_connection_idempotency_policy.h +++ b/google/cloud/compute/ssl_certificates/v1/ssl_certificates_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SSL_CERTIFICATES_V1_SSL_CERTIFICATES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SSL_CERTIFICATES_V1_SSL_CERTIFICATES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/ssl_certificates/v1/ssl_certificates.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/ssl_certificates/v1/ssl_certificates_proto_export.h b/google/cloud/compute/ssl_certificates/v1/ssl_certificates_proto_export.h index 112733883b6ef..35f1555726484 100644 --- a/google/cloud/compute/ssl_certificates/v1/ssl_certificates_proto_export.h +++ b/google/cloud/compute/ssl_certificates/v1/ssl_certificates_proto_export.h @@ -26,9 +26,9 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SSL_CERTIFICATES_V1_SSL_CERTIFICATES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_125.pb.h" +#include "google/cloud/compute/v1/internal/common_126.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SSL_CERTIFICATES_V1_SSL_CERTIFICATES_PROTO_EXPORT_H diff --git a/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_option_defaults.cc b/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_option_defaults.cc index 37e9bc8a11ce6..642d227e94b86 100644 --- a/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_option_defaults.cc +++ b/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_option_defaults.cc @@ -41,7 +41,7 @@ Options SslPoliciesDefaultOptions(Options options) { if (!options.has()) { options.set( compute_ssl_policies_v1::SslPoliciesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_rest_connection_impl.h b/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_rest_connection_impl.h index 66e08e0f7d810..1a81b577fea29 100644 --- a/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_rest_connection_impl.h +++ b/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_rest_connection_impl.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SSL_POLICIES_V1_INTERNAL_SSL_POLICIES_REST_CONNECTION_IMPL_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SSL_POLICIES_V1_INTERNAL_SSL_POLICIES_REST_CONNECTION_IMPL_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/ssl_policies/v1/internal/ssl_policies_rest_stub.h" #include "google/cloud/compute/ssl_policies/v1/internal/ssl_policies_retry_traits.h" #include "google/cloud/compute/ssl_policies/v1/ssl_policies_connection.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_rest_logging_decorator.h b/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_rest_logging_decorator.h index 9617bc2f94b60..f7a33160a4dd6 100644 --- a/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_rest_logging_decorator.h +++ b/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SSL_POLICIES_V1_INTERNAL_SSL_POLICIES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SSL_POLICIES_V1_INTERNAL_SSL_POLICIES_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/ssl_policies/v1/internal/ssl_policies_rest_stub.h" +#include "google/cloud/compute/ssl_policies/v1/ssl_policies.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_rest_metadata_decorator.cc b/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_rest_metadata_decorator.cc index c42b8f752c247..d4db200cbf7a5 100644 --- a/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_rest_metadata_decorator.cc +++ b/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/ssl_policies/v1/ssl_policies.proto #include "google/cloud/compute/ssl_policies/v1/internal/ssl_policies_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_rest_metadata_decorator.h b/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_rest_metadata_decorator.h index 300cbc935368e..7c2c82c11b6c4 100644 --- a/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_rest_metadata_decorator.h +++ b/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SSL_POLICIES_V1_INTERNAL_SSL_POLICIES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SSL_POLICIES_V1_INTERNAL_SSL_POLICIES_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/ssl_policies/v1/internal/ssl_policies_rest_stub.h" +#include "google/cloud/compute/ssl_policies/v1/ssl_policies.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_rest_stub.cc b/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_rest_stub.cc index 8487fbf07d40e..3f1d8fadd59dc 100644 --- a/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_rest_stub.cc +++ b/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/ssl_policies/v1/ssl_policies.proto #include "google/cloud/compute/ssl_policies/v1/internal/ssl_policies_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/ssl_policies/v1/ssl_policies.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_rest_stub.h b/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_rest_stub.h index 895e5b1211abd..fafd63f2f5c11 100644 --- a/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_rest_stub.h +++ b/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SSL_POLICIES_V1_INTERNAL_SSL_POLICIES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SSL_POLICIES_V1_INTERNAL_SSL_POLICIES_REST_STUB_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/ssl_policies/v1/ssl_policies.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_tracing_connection.cc b/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_tracing_connection.cc index 43e0610506760..d38edaad6881b 100644 --- a/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_tracing_connection.cc +++ b/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_ssl_policies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SslPoliciesTracingConnection::SslPoliciesTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -175,16 +173,12 @@ SslPoliciesTracingConnection::PatchSslPolicy( return internal::EndSpan(std::move(span), child_->PatchSslPolicy(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSslPoliciesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_tracing_connection.h b/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_tracing_connection.h index f6086b5de18b4..2a121ea1839b4 100644 --- a/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_tracing_connection.h +++ b/google/cloud/compute/ssl_policies/v1/internal/ssl_policies_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_ssl_policies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SslPoliciesTracingConnection : public compute_ssl_policies_v1::SslPoliciesConnection { public: @@ -97,8 +95,6 @@ class SslPoliciesTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/ssl_policies/v1/ssl_policies_connection.h b/google/cloud/compute/ssl_policies/v1/ssl_policies_connection.h index d4efb50ebc6b7..cc89ae5f2a99a 100644 --- a/google/cloud/compute/ssl_policies/v1/ssl_policies_connection.h +++ b/google/cloud/compute/ssl_policies/v1/ssl_policies_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SSL_POLICIES_V1_SSL_POLICIES_CONNECTION_H #include "google/cloud/compute/ssl_policies/v1/internal/ssl_policies_retry_traits.h" +#include "google/cloud/compute/ssl_policies/v1/ssl_policies.pb.h" #include "google/cloud/compute/ssl_policies/v1/ssl_policies_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/ssl_policies/v1/ssl_policies_connection_idempotency_policy.h b/google/cloud/compute/ssl_policies/v1/ssl_policies_connection_idempotency_policy.h index e38e222418383..7f7445b21ba6b 100644 --- a/google/cloud/compute/ssl_policies/v1/ssl_policies_connection_idempotency_policy.h +++ b/google/cloud/compute/ssl_policies/v1/ssl_policies_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SSL_POLICIES_V1_SSL_POLICIES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SSL_POLICIES_V1_SSL_POLICIES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/ssl_policies/v1/ssl_policies.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/ssl_policies/v1/ssl_policies_proto_export.h b/google/cloud/compute/ssl_policies/v1/ssl_policies_proto_export.h index b1674ad6a7ba4..c5cb512953f3d 100644 --- a/google/cloud/compute/ssl_policies/v1/ssl_policies_proto_export.h +++ b/google/cloud/compute/ssl_policies/v1/ssl_policies_proto_export.h @@ -26,9 +26,9 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SSL_POLICIES_V1_SSL_POLICIES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_127.pb.h" +#include "google/cloud/compute/v1/internal/common_128.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SSL_POLICIES_V1_SSL_POLICIES_PROTO_EXPORT_H diff --git a/google/cloud/compute/storage_pool_types/v1/internal/storage_pool_types_option_defaults.cc b/google/cloud/compute/storage_pool_types/v1/internal/storage_pool_types_option_defaults.cc index 9919943c5c450..d9666db9c7da6 100644 --- a/google/cloud/compute/storage_pool_types/v1/internal/storage_pool_types_option_defaults.cc +++ b/google/cloud/compute/storage_pool_types/v1/internal/storage_pool_types_option_defaults.cc @@ -44,7 +44,7 @@ Options StoragePoolTypesDefaultOptions(Options options) { options.set< compute_storage_pool_types_v1::StoragePoolTypesRetryPolicyOption>( compute_storage_pool_types_v1::StoragePoolTypesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include #include #include diff --git a/google/cloud/compute/storage_pool_types/v1/internal/storage_pool_types_rest_metadata_decorator.cc b/google/cloud/compute/storage_pool_types/v1/internal/storage_pool_types_rest_metadata_decorator.cc index a2e8be5c80515..ac156f67bc2df 100644 --- a/google/cloud/compute/storage_pool_types/v1/internal/storage_pool_types_rest_metadata_decorator.cc +++ b/google/cloud/compute/storage_pool_types/v1/internal/storage_pool_types_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/storage_pool_types/v1/storage_pool_types.proto #include "google/cloud/compute/storage_pool_types/v1/internal/storage_pool_types_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/storage_pool_types/v1/internal/storage_pool_types_rest_metadata_decorator.h b/google/cloud/compute/storage_pool_types/v1/internal/storage_pool_types_rest_metadata_decorator.h index 77c5cfb8ae4c0..9ef90834cbb1f 100644 --- a/google/cloud/compute/storage_pool_types/v1/internal/storage_pool_types_rest_metadata_decorator.h +++ b/google/cloud/compute/storage_pool_types/v1/internal/storage_pool_types_rest_metadata_decorator.h @@ -20,10 +20,10 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_STORAGE_POOL_TYPES_V1_INTERNAL_STORAGE_POOL_TYPES_REST_METADATA_DECORATOR_H #include "google/cloud/compute/storage_pool_types/v1/internal/storage_pool_types_rest_stub.h" +#include "google/cloud/compute/storage_pool_types/v1/storage_pool_types.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/compute/storage_pool_types/v1/internal/storage_pool_types_rest_stub.cc b/google/cloud/compute/storage_pool_types/v1/internal/storage_pool_types_rest_stub.cc index 28b70f327f00e..8a6060cfd1c85 100644 --- a/google/cloud/compute/storage_pool_types/v1/internal/storage_pool_types_rest_stub.cc +++ b/google/cloud/compute/storage_pool_types/v1/internal/storage_pool_types_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/compute/storage_pool_types/v1/storage_pool_types.proto #include "google/cloud/compute/storage_pool_types/v1/internal/storage_pool_types_rest_stub.h" +#include "google/cloud/compute/storage_pool_types/v1/storage_pool_types.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/storage_pool_types/v1/internal/storage_pool_types_rest_stub.h b/google/cloud/compute/storage_pool_types/v1/internal/storage_pool_types_rest_stub.h index a72c5dc6e00d2..8021b63c39a98 100644 --- a/google/cloud/compute/storage_pool_types/v1/internal/storage_pool_types_rest_stub.h +++ b/google/cloud/compute/storage_pool_types/v1/internal/storage_pool_types_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_STORAGE_POOL_TYPES_V1_INTERNAL_STORAGE_POOL_TYPES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_STORAGE_POOL_TYPES_V1_INTERNAL_STORAGE_POOL_TYPES_REST_STUB_H +#include "google/cloud/compute/storage_pool_types/v1/storage_pool_types.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/storage_pool_types/v1/internal/storage_pool_types_tracing_connection.cc b/google/cloud/compute/storage_pool_types/v1/internal/storage_pool_types_tracing_connection.cc index 8fafca8623ab4..5177345d42b05 100644 --- a/google/cloud/compute/storage_pool_types/v1/internal/storage_pool_types_tracing_connection.cc +++ b/google/cloud/compute/storage_pool_types/v1/internal/storage_pool_types_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_storage_pool_types_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - StoragePoolTypesTracingConnection::StoragePoolTypesTracingConnection( std::shared_ptr child) @@ -75,17 +73,13 @@ StoragePoolTypesTracingConnection::ListStoragePoolTypes( std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeStoragePoolTypesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/storage_pool_types/v1/internal/storage_pool_types_tracing_connection.h b/google/cloud/compute/storage_pool_types/v1/internal/storage_pool_types_tracing_connection.h index b4a273c0487b4..24a0397124d3f 100644 --- a/google/cloud/compute/storage_pool_types/v1/internal/storage_pool_types_tracing_connection.h +++ b/google/cloud/compute/storage_pool_types/v1/internal/storage_pool_types_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_storage_pool_types_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class StoragePoolTypesTracingConnection : public compute_storage_pool_types_v1::StoragePoolTypesConnection { public: @@ -60,8 +58,6 @@ class StoragePoolTypesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/storage_pool_types/v1/storage_pool_types_connection.h b/google/cloud/compute/storage_pool_types/v1/storage_pool_types_connection.h index 868fb2c4ca682..bb4d5f0a4571a 100644 --- a/google/cloud/compute/storage_pool_types/v1/storage_pool_types_connection.h +++ b/google/cloud/compute/storage_pool_types/v1/storage_pool_types_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_STORAGE_POOL_TYPES_V1_STORAGE_POOL_TYPES_CONNECTION_H #include "google/cloud/compute/storage_pool_types/v1/internal/storage_pool_types_retry_traits.h" +#include "google/cloud/compute/storage_pool_types/v1/storage_pool_types.pb.h" #include "google/cloud/compute/storage_pool_types/v1/storage_pool_types_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/storage_pool_types/v1/storage_pool_types_connection_idempotency_policy.h b/google/cloud/compute/storage_pool_types/v1/storage_pool_types_connection_idempotency_policy.h index c0265dedcd281..2d23895180a56 100644 --- a/google/cloud/compute/storage_pool_types/v1/storage_pool_types_connection_idempotency_policy.h +++ b/google/cloud/compute/storage_pool_types/v1/storage_pool_types_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_STORAGE_POOL_TYPES_V1_STORAGE_POOL_TYPES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_STORAGE_POOL_TYPES_V1_STORAGE_POOL_TYPES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/storage_pool_types/v1/storage_pool_types.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/storage_pool_types/v1/storage_pool_types_proto_export.h b/google/cloud/compute/storage_pool_types/v1/storage_pool_types_proto_export.h index e41b928eea713..b335bef741dec 100644 --- a/google/cloud/compute/storage_pool_types/v1/storage_pool_types_proto_export.h +++ b/google/cloud/compute/storage_pool_types/v1/storage_pool_types_proto_export.h @@ -26,8 +26,8 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_STORAGE_POOL_TYPES_V1_STORAGE_POOL_TYPES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include +#include "google/cloud/compute/v1/internal/common_023.pb.h" +#include "google/cloud/compute/v1/internal/common_131.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_STORAGE_POOL_TYPES_V1_STORAGE_POOL_TYPES_PROTO_EXPORT_H diff --git a/google/cloud/compute/storage_pools/v1/internal/storage_pools_option_defaults.cc b/google/cloud/compute/storage_pools/v1/internal/storage_pools_option_defaults.cc index 76c42e97ccf58..2277be0e9d667 100644 --- a/google/cloud/compute/storage_pools/v1/internal/storage_pools_option_defaults.cc +++ b/google/cloud/compute/storage_pools/v1/internal/storage_pools_option_defaults.cc @@ -41,7 +41,7 @@ Options StoragePoolsDefaultOptions(Options options) { if (!options.has()) { options.set( compute_storage_pools_v1::StoragePoolsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/compute/storage_pools/v1/internal/storage_pools_rest_connection_impl.h b/google/cloud/compute/storage_pools/v1/internal/storage_pools_rest_connection_impl.h index c7eb039d14090..9dad6a3f1e269 100644 --- a/google/cloud/compute/storage_pools/v1/internal/storage_pools_rest_connection_impl.h +++ b/google/cloud/compute/storage_pools/v1/internal/storage_pools_rest_connection_impl.h @@ -24,13 +24,13 @@ #include "google/cloud/compute/storage_pools/v1/storage_pools_connection.h" #include "google/cloud/compute/storage_pools/v1/storage_pools_connection_idempotency_policy.h" #include "google/cloud/compute/storage_pools/v1/storage_pools_options.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/background_threads.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/storage_pools/v1/internal/storage_pools_rest_logging_decorator.h b/google/cloud/compute/storage_pools/v1/internal/storage_pools_rest_logging_decorator.h index 027bc70a422ca..a8442275af8dd 100644 --- a/google/cloud/compute/storage_pools/v1/internal/storage_pools_rest_logging_decorator.h +++ b/google/cloud/compute/storage_pools/v1/internal/storage_pools_rest_logging_decorator.h @@ -20,12 +20,12 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_STORAGE_POOLS_V1_INTERNAL_STORAGE_POOLS_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/storage_pools/v1/internal/storage_pools_rest_stub.h" +#include "google/cloud/compute/storage_pools/v1/storage_pools.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/storage_pools/v1/internal/storage_pools_rest_metadata_decorator.cc b/google/cloud/compute/storage_pools/v1/internal/storage_pools_rest_metadata_decorator.cc index 5ad90c14aaf41..78ee8708b9e48 100644 --- a/google/cloud/compute/storage_pools/v1/internal/storage_pools_rest_metadata_decorator.cc +++ b/google/cloud/compute/storage_pools/v1/internal/storage_pools_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/storage_pools/v1/storage_pools.proto #include "google/cloud/compute/storage_pools/v1/internal/storage_pools_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/storage_pools/v1/internal/storage_pools_rest_metadata_decorator.h b/google/cloud/compute/storage_pools/v1/internal/storage_pools_rest_metadata_decorator.h index 701b0d0c51e7f..1d6d51c26bb4b 100644 --- a/google/cloud/compute/storage_pools/v1/internal/storage_pools_rest_metadata_decorator.h +++ b/google/cloud/compute/storage_pools/v1/internal/storage_pools_rest_metadata_decorator.h @@ -20,11 +20,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_STORAGE_POOLS_V1_INTERNAL_STORAGE_POOLS_REST_METADATA_DECORATOR_H #include "google/cloud/compute/storage_pools/v1/internal/storage_pools_rest_stub.h" +#include "google/cloud/compute/storage_pools/v1/storage_pools.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/storage_pools/v1/internal/storage_pools_rest_stub.cc b/google/cloud/compute/storage_pools/v1/internal/storage_pools_rest_stub.cc index 6b4ebe5fe9e77..712316c742a79 100644 --- a/google/cloud/compute/storage_pools/v1/internal/storage_pools_rest_stub.cc +++ b/google/cloud/compute/storage_pools/v1/internal/storage_pools_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/storage_pools/v1/storage_pools.proto #include "google/cloud/compute/storage_pools/v1/internal/storage_pools_rest_stub.h" +#include "google/cloud/compute/storage_pools/v1/storage_pools.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/storage_pools/v1/internal/storage_pools_rest_stub.h b/google/cloud/compute/storage_pools/v1/internal/storage_pools_rest_stub.h index 2b7a03b8a434c..6928896246d59 100644 --- a/google/cloud/compute/storage_pools/v1/internal/storage_pools_rest_stub.h +++ b/google/cloud/compute/storage_pools/v1/internal/storage_pools_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_STORAGE_POOLS_V1_INTERNAL_STORAGE_POOLS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_STORAGE_POOLS_V1_INTERNAL_STORAGE_POOLS_REST_STUB_H +#include "google/cloud/compute/storage_pools/v1/storage_pools.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/storage_pools/v1/internal/storage_pools_tracing_connection.cc b/google/cloud/compute/storage_pools/v1/internal/storage_pools_tracing_connection.cc index d37e1bfd59181..c64f202eee49a 100644 --- a/google/cloud/compute/storage_pools/v1/internal/storage_pools_tracing_connection.cc +++ b/google/cloud/compute/storage_pools/v1/internal/storage_pools_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_storage_pools_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - StoragePoolsTracingConnection::StoragePoolsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -206,16 +204,12 @@ StoragePoolsTracingConnection::UpdateStoragePool( child_->UpdateStoragePool(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeStoragePoolsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/storage_pools/v1/internal/storage_pools_tracing_connection.h b/google/cloud/compute/storage_pools/v1/internal/storage_pools_tracing_connection.h index d88ba62517969..c27ba99f705bf 100644 --- a/google/cloud/compute/storage_pools/v1/internal/storage_pools_tracing_connection.h +++ b/google/cloud/compute/storage_pools/v1/internal/storage_pools_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_storage_pools_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class StoragePoolsTracingConnection : public compute_storage_pools_v1::StoragePoolsConnection { public: @@ -110,8 +108,6 @@ class StoragePoolsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/storage_pools/v1/storage_pools_connection.h b/google/cloud/compute/storage_pools/v1/storage_pools_connection.h index e82a9ccfc40bf..90e78ad16a73f 100644 --- a/google/cloud/compute/storage_pools/v1/storage_pools_connection.h +++ b/google/cloud/compute/storage_pools/v1/storage_pools_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_STORAGE_POOLS_V1_STORAGE_POOLS_CONNECTION_H #include "google/cloud/compute/storage_pools/v1/internal/storage_pools_retry_traits.h" +#include "google/cloud/compute/storage_pools/v1/storage_pools.pb.h" #include "google/cloud/compute/storage_pools/v1/storage_pools_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/storage_pools/v1/storage_pools_connection_idempotency_policy.h b/google/cloud/compute/storage_pools/v1/storage_pools_connection_idempotency_policy.h index ae4627eaaf1e2..406c5c4f08121 100644 --- a/google/cloud/compute/storage_pools/v1/storage_pools_connection_idempotency_policy.h +++ b/google/cloud/compute/storage_pools/v1/storage_pools_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_STORAGE_POOLS_V1_STORAGE_POOLS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_STORAGE_POOLS_V1_STORAGE_POOLS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/storage_pools/v1/storage_pools.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/storage_pools/v1/storage_pools_proto_export.h b/google/cloud/compute/storage_pools/v1/storage_pools_proto_export.h index f67e0320f7d2c..d71ea8cc40522 100644 --- a/google/cloud/compute/storage_pools/v1/storage_pools_proto_export.h +++ b/google/cloud/compute/storage_pools/v1/storage_pools_proto_export.h @@ -26,12 +26,12 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_STORAGE_POOLS_V1_STORAGE_POOLS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_007.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_031.pb.h" +#include "google/cloud/compute/v1/internal/common_130.pb.h" +#include "google/cloud/compute/v1/internal/common_145.pb.h" +#include "google/cloud/compute/v1/internal/common_152.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_STORAGE_POOLS_V1_STORAGE_POOLS_PROTO_EXPORT_H diff --git a/google/cloud/compute/subnetworks/v1/internal/subnetworks_option_defaults.cc b/google/cloud/compute/subnetworks/v1/internal/subnetworks_option_defaults.cc index dbcc274c20a5a..949a95c3d61ee 100644 --- a/google/cloud/compute/subnetworks/v1/internal/subnetworks_option_defaults.cc +++ b/google/cloud/compute/subnetworks/v1/internal/subnetworks_option_defaults.cc @@ -41,7 +41,7 @@ Options SubnetworksDefaultOptions(Options options) { if (!options.has()) { options.set( compute_subnetworks_v1::SubnetworksLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/compute/subnetworks/v1/internal/subnetworks_rest_connection_impl.h b/google/cloud/compute/subnetworks/v1/internal/subnetworks_rest_connection_impl.h index 21401e6b8675c..26fca92487fef 100644 --- a/google/cloud/compute/subnetworks/v1/internal/subnetworks_rest_connection_impl.h +++ b/google/cloud/compute/subnetworks/v1/internal/subnetworks_rest_connection_impl.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SUBNETWORKS_V1_INTERNAL_SUBNETWORKS_REST_CONNECTION_IMPL_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SUBNETWORKS_V1_INTERNAL_SUBNETWORKS_REST_CONNECTION_IMPL_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/subnetworks/v1/internal/subnetworks_rest_stub.h" #include "google/cloud/compute/subnetworks/v1/internal/subnetworks_retry_traits.h" #include "google/cloud/compute/subnetworks/v1/subnetworks_connection.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/subnetworks/v1/internal/subnetworks_rest_logging_decorator.h b/google/cloud/compute/subnetworks/v1/internal/subnetworks_rest_logging_decorator.h index c7333e5f7f466..d044611ce4e04 100644 --- a/google/cloud/compute/subnetworks/v1/internal/subnetworks_rest_logging_decorator.h +++ b/google/cloud/compute/subnetworks/v1/internal/subnetworks_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SUBNETWORKS_V1_INTERNAL_SUBNETWORKS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SUBNETWORKS_V1_INTERNAL_SUBNETWORKS_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/subnetworks/v1/internal/subnetworks_rest_stub.h" +#include "google/cloud/compute/subnetworks/v1/subnetworks.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/subnetworks/v1/internal/subnetworks_rest_metadata_decorator.cc b/google/cloud/compute/subnetworks/v1/internal/subnetworks_rest_metadata_decorator.cc index e7018020eda7c..5d471efc119b0 100644 --- a/google/cloud/compute/subnetworks/v1/internal/subnetworks_rest_metadata_decorator.cc +++ b/google/cloud/compute/subnetworks/v1/internal/subnetworks_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/subnetworks/v1/subnetworks.proto #include "google/cloud/compute/subnetworks/v1/internal/subnetworks_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/subnetworks/v1/internal/subnetworks_rest_metadata_decorator.h b/google/cloud/compute/subnetworks/v1/internal/subnetworks_rest_metadata_decorator.h index f195d2f7d5344..76345e12056ee 100644 --- a/google/cloud/compute/subnetworks/v1/internal/subnetworks_rest_metadata_decorator.h +++ b/google/cloud/compute/subnetworks/v1/internal/subnetworks_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SUBNETWORKS_V1_INTERNAL_SUBNETWORKS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SUBNETWORKS_V1_INTERNAL_SUBNETWORKS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/subnetworks/v1/internal/subnetworks_rest_stub.h" +#include "google/cloud/compute/subnetworks/v1/subnetworks.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/subnetworks/v1/internal/subnetworks_rest_stub.cc b/google/cloud/compute/subnetworks/v1/internal/subnetworks_rest_stub.cc index 9ed1f5bc9e6b7..bfb4d1f74071e 100644 --- a/google/cloud/compute/subnetworks/v1/internal/subnetworks_rest_stub.cc +++ b/google/cloud/compute/subnetworks/v1/internal/subnetworks_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/subnetworks/v1/subnetworks.proto #include "google/cloud/compute/subnetworks/v1/internal/subnetworks_rest_stub.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" +#include "google/cloud/compute/subnetworks/v1/subnetworks.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/subnetworks/v1/internal/subnetworks_rest_stub.h b/google/cloud/compute/subnetworks/v1/internal/subnetworks_rest_stub.h index 601a3a721e417..cee167ab6cbed 100644 --- a/google/cloud/compute/subnetworks/v1/internal/subnetworks_rest_stub.h +++ b/google/cloud/compute/subnetworks/v1/internal/subnetworks_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SUBNETWORKS_V1_INTERNAL_SUBNETWORKS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SUBNETWORKS_V1_INTERNAL_SUBNETWORKS_REST_STUB_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" +#include "google/cloud/compute/subnetworks/v1/subnetworks.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/subnetworks/v1/internal/subnetworks_tracing_connection.cc b/google/cloud/compute/subnetworks/v1/internal/subnetworks_tracing_connection.cc index a27467785dd2f..863c6b620715c 100644 --- a/google/cloud/compute/subnetworks/v1/internal/subnetworks_tracing_connection.cc +++ b/google/cloud/compute/subnetworks/v1/internal/subnetworks_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_subnetworks_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SubnetworksTracingConnection::SubnetworksTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -274,16 +272,12 @@ SubnetworksTracingConnection::TestIamPermissions( return internal::EndSpan(*span, child_->TestIamPermissions(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSubnetworksTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/subnetworks/v1/internal/subnetworks_tracing_connection.h b/google/cloud/compute/subnetworks/v1/internal/subnetworks_tracing_connection.h index aae0a52e66a98..a5b5ae00137f7 100644 --- a/google/cloud/compute/subnetworks/v1/internal/subnetworks_tracing_connection.h +++ b/google/cloud/compute/subnetworks/v1/internal/subnetworks_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_subnetworks_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SubnetworksTracingConnection : public compute_subnetworks_v1::SubnetworksConnection { public: @@ -132,8 +130,6 @@ class SubnetworksTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/subnetworks/v1/subnetworks_connection.h b/google/cloud/compute/subnetworks/v1/subnetworks_connection.h index a6af885b51c65..2042868c07f47 100644 --- a/google/cloud/compute/subnetworks/v1/subnetworks_connection.h +++ b/google/cloud/compute/subnetworks/v1/subnetworks_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SUBNETWORKS_V1_SUBNETWORKS_CONNECTION_H #include "google/cloud/compute/subnetworks/v1/internal/subnetworks_retry_traits.h" +#include "google/cloud/compute/subnetworks/v1/subnetworks.pb.h" #include "google/cloud/compute/subnetworks/v1/subnetworks_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/subnetworks/v1/subnetworks_connection_idempotency_policy.h b/google/cloud/compute/subnetworks/v1/subnetworks_connection_idempotency_policy.h index 69d0684bcc15e..6ad7b3b4b2614 100644 --- a/google/cloud/compute/subnetworks/v1/subnetworks_connection_idempotency_policy.h +++ b/google/cloud/compute/subnetworks/v1/subnetworks_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SUBNETWORKS_V1_SUBNETWORKS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SUBNETWORKS_V1_SUBNETWORKS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/subnetworks/v1/subnetworks.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/subnetworks/v1/subnetworks_proto_export.h b/google/cloud/compute/subnetworks/v1/subnetworks_proto_export.h index 55ea306099f93..34e22f287766b 100644 --- a/google/cloud/compute/subnetworks/v1/subnetworks_proto_export.h +++ b/google/cloud/compute/subnetworks/v1/subnetworks_proto_export.h @@ -26,12 +26,12 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SUBNETWORKS_V1_SUBNETWORKS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_007.pb.h" +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_031.pb.h" +#include "google/cloud/compute/v1/internal/common_108.pb.h" +#include "google/cloud/compute/v1/internal/common_132.pb.h" +#include "google/cloud/compute/v1/internal/common_145.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_SUBNETWORKS_V1_SUBNETWORKS_PROTO_EXPORT_H diff --git a/google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_option_defaults.cc b/google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_option_defaults.cc index 4ade4fa8b8c4d..ddceb307a6bb4 100644 --- a/google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_option_defaults.cc +++ b/google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_option_defaults.cc @@ -44,7 +44,7 @@ Options TargetGrpcProxiesDefaultOptions(Options options) { options.set< compute_target_grpc_proxies_v1::TargetGrpcProxiesRetryPolicyOption>( compute_target_grpc_proxies_v1::TargetGrpcProxiesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_rest_logging_decorator.h b/google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_rest_logging_decorator.h index c0d10a20fe64a..95a05698bddd4 100644 --- a/google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_rest_logging_decorator.h +++ b/google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_GRPC_PROXIES_V1_INTERNAL_TARGET_GRPC_PROXIES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_GRPC_PROXIES_V1_INTERNAL_TARGET_GRPC_PROXIES_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_rest_stub.h" +#include "google/cloud/compute/target_grpc_proxies/v1/target_grpc_proxies.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_rest_metadata_decorator.cc b/google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_rest_metadata_decorator.cc index 8b9d0f5ebec0e..d9e10897fbdb6 100644 --- a/google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_rest_metadata_decorator.cc +++ b/google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/target_grpc_proxies/v1/target_grpc_proxies.proto #include "google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_rest_metadata_decorator.h b/google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_rest_metadata_decorator.h index 963a174cbffe6..69fe12c2bfb55 100644 --- a/google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_rest_metadata_decorator.h +++ b/google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_GRPC_PROXIES_V1_INTERNAL_TARGET_GRPC_PROXIES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_GRPC_PROXIES_V1_INTERNAL_TARGET_GRPC_PROXIES_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_rest_stub.h" +#include "google/cloud/compute/target_grpc_proxies/v1/target_grpc_proxies.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_rest_stub.cc b/google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_rest_stub.cc index 66fbcb7c4b237..1881ec77e8701 100644 --- a/google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_rest_stub.cc +++ b/google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/target_grpc_proxies/v1/target_grpc_proxies.proto #include "google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/target_grpc_proxies/v1/target_grpc_proxies.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_rest_stub.h b/google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_rest_stub.h index 00a9c31f24392..5391b5c66221e 100644 --- a/google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_rest_stub.h +++ b/google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_GRPC_PROXIES_V1_INTERNAL_TARGET_GRPC_PROXIES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_GRPC_PROXIES_V1_INTERNAL_TARGET_GRPC_PROXIES_REST_STUB_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/target_grpc_proxies/v1/target_grpc_proxies.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_tracing_connection.cc b/google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_tracing_connection.cc index 3806e729907c9..707184eb1e07e 100644 --- a/google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_tracing_connection.cc +++ b/google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_target_grpc_proxies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TargetGrpcProxiesTracingConnection::TargetGrpcProxiesTracingConnection( std::shared_ptr child) @@ -164,18 +162,14 @@ TargetGrpcProxiesTracingConnection::PatchTargetGrpcProxy( child_->PatchTargetGrpcProxy(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTargetGrpcProxiesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_tracing_connection.h b/google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_tracing_connection.h index 7dbc5bee69a20..c0c5c26b9281d 100644 --- a/google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_tracing_connection.h +++ b/google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_target_grpc_proxies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TargetGrpcProxiesTracingConnection : public compute_target_grpc_proxies_v1::TargetGrpcProxiesConnection { public: @@ -93,8 +91,6 @@ class TargetGrpcProxiesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/target_grpc_proxies/v1/target_grpc_proxies_connection.h b/google/cloud/compute/target_grpc_proxies/v1/target_grpc_proxies_connection.h index 4879df0421d8b..ed109627165a4 100644 --- a/google/cloud/compute/target_grpc_proxies/v1/target_grpc_proxies_connection.h +++ b/google/cloud/compute/target_grpc_proxies/v1/target_grpc_proxies_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_GRPC_PROXIES_V1_TARGET_GRPC_PROXIES_CONNECTION_H #include "google/cloud/compute/target_grpc_proxies/v1/internal/target_grpc_proxies_retry_traits.h" +#include "google/cloud/compute/target_grpc_proxies/v1/target_grpc_proxies.pb.h" #include "google/cloud/compute/target_grpc_proxies/v1/target_grpc_proxies_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/target_grpc_proxies/v1/target_grpc_proxies_connection_idempotency_policy.h b/google/cloud/compute/target_grpc_proxies/v1/target_grpc_proxies_connection_idempotency_policy.h index a38b196c604d7..c6f23ae610eca 100644 --- a/google/cloud/compute/target_grpc_proxies/v1/target_grpc_proxies_connection_idempotency_policy.h +++ b/google/cloud/compute/target_grpc_proxies/v1/target_grpc_proxies_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_GRPC_PROXIES_V1_TARGET_GRPC_PROXIES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_GRPC_PROXIES_V1_TARGET_GRPC_PROXIES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/target_grpc_proxies/v1/target_grpc_proxies.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/target_grpc_proxies/v1/target_grpc_proxies_proto_export.h b/google/cloud/compute/target_grpc_proxies/v1/target_grpc_proxies_proto_export.h index 3886cf82f6693..d59c48640a678 100644 --- a/google/cloud/compute/target_grpc_proxies/v1/target_grpc_proxies_proto_export.h +++ b/google/cloud/compute/target_grpc_proxies/v1/target_grpc_proxies_proto_export.h @@ -26,8 +26,8 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_GRPC_PROXIES_V1_TARGET_GRPC_PROXIES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_133.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_GRPC_PROXIES_V1_TARGET_GRPC_PROXIES_PROTO_EXPORT_H diff --git a/google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_option_defaults.cc b/google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_option_defaults.cc index abe7f69a26b0c..c16e4ac903d7f 100644 --- a/google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_option_defaults.cc +++ b/google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_option_defaults.cc @@ -44,7 +44,7 @@ Options TargetHttpProxiesDefaultOptions(Options options) { options.set< compute_target_http_proxies_v1::TargetHttpProxiesRetryPolicyOption>( compute_target_http_proxies_v1::TargetHttpProxiesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_rest_logging_decorator.h b/google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_rest_logging_decorator.h index b67788e056eed..ccab17a999154 100644 --- a/google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_rest_logging_decorator.h +++ b/google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_HTTP_PROXIES_V1_INTERNAL_TARGET_HTTP_PROXIES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_HTTP_PROXIES_V1_INTERNAL_TARGET_HTTP_PROXIES_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_rest_stub.h" +#include "google/cloud/compute/target_http_proxies/v1/target_http_proxies.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_rest_metadata_decorator.cc b/google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_rest_metadata_decorator.cc index 365c0a0479de3..febb737b93fa9 100644 --- a/google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_rest_metadata_decorator.cc +++ b/google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/target_http_proxies/v1/target_http_proxies.proto #include "google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_rest_metadata_decorator.h b/google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_rest_metadata_decorator.h index 84dd2f2a3ba5b..9eb912a9c67b1 100644 --- a/google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_rest_metadata_decorator.h +++ b/google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_HTTP_PROXIES_V1_INTERNAL_TARGET_HTTP_PROXIES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_HTTP_PROXIES_V1_INTERNAL_TARGET_HTTP_PROXIES_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_rest_stub.h" +#include "google/cloud/compute/target_http_proxies/v1/target_http_proxies.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_rest_stub.cc b/google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_rest_stub.cc index 12b5e8a5e5cea..ff3cae2a3b054 100644 --- a/google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_rest_stub.cc +++ b/google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/target_http_proxies/v1/target_http_proxies.proto #include "google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/target_http_proxies/v1/target_http_proxies.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_rest_stub.h b/google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_rest_stub.h index 220758080d1ba..add5b5fda859c 100644 --- a/google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_rest_stub.h +++ b/google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_HTTP_PROXIES_V1_INTERNAL_TARGET_HTTP_PROXIES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_HTTP_PROXIES_V1_INTERNAL_TARGET_HTTP_PROXIES_REST_STUB_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/target_http_proxies/v1/target_http_proxies.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_tracing_connection.cc b/google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_tracing_connection.cc index 7e5bc76f1dce7..be30397ac8c9a 100644 --- a/google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_tracing_connection.cc +++ b/google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_target_http_proxies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TargetHttpProxiesTracingConnection::TargetHttpProxiesTracingConnection( std::shared_ptr child) @@ -209,18 +207,14 @@ TargetHttpProxiesTracingConnection::SetUrlMap( return internal::EndSpan(std::move(span), child_->SetUrlMap(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTargetHttpProxiesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_tracing_connection.h b/google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_tracing_connection.h index 2a90ae4579aa0..fe8b9d3d7050b 100644 --- a/google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_tracing_connection.h +++ b/google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_target_http_proxies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TargetHttpProxiesTracingConnection : public compute_target_http_proxies_v1::TargetHttpProxiesConnection { public: @@ -111,8 +109,6 @@ class TargetHttpProxiesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/target_http_proxies/v1/target_http_proxies_connection.h b/google/cloud/compute/target_http_proxies/v1/target_http_proxies_connection.h index 3a28cd0a442f5..fe2b3355f8786 100644 --- a/google/cloud/compute/target_http_proxies/v1/target_http_proxies_connection.h +++ b/google/cloud/compute/target_http_proxies/v1/target_http_proxies_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_HTTP_PROXIES_V1_TARGET_HTTP_PROXIES_CONNECTION_H #include "google/cloud/compute/target_http_proxies/v1/internal/target_http_proxies_retry_traits.h" +#include "google/cloud/compute/target_http_proxies/v1/target_http_proxies.pb.h" #include "google/cloud/compute/target_http_proxies/v1/target_http_proxies_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/target_http_proxies/v1/target_http_proxies_connection_idempotency_policy.h b/google/cloud/compute/target_http_proxies/v1/target_http_proxies_connection_idempotency_policy.h index 7c6cf422c574e..37e384de31c50 100644 --- a/google/cloud/compute/target_http_proxies/v1/target_http_proxies_connection_idempotency_policy.h +++ b/google/cloud/compute/target_http_proxies/v1/target_http_proxies_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_HTTP_PROXIES_V1_TARGET_HTTP_PROXIES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_HTTP_PROXIES_V1_TARGET_HTTP_PROXIES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/target_http_proxies/v1/target_http_proxies.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/target_http_proxies/v1/target_http_proxies_proto_export.h b/google/cloud/compute/target_http_proxies/v1/target_http_proxies_proto_export.h index 1b958868d465c..98f1de712447b 100644 --- a/google/cloud/compute/target_http_proxies/v1/target_http_proxies_proto_export.h +++ b/google/cloud/compute/target_http_proxies/v1/target_http_proxies_proto_export.h @@ -26,10 +26,10 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_HTTP_PROXIES_V1_TARGET_HTTP_PROXIES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_134.pb.h" +#include "google/cloud/compute/v1/internal/common_135.pb.h" +#include "google/cloud/compute/v1/internal/common_147.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_HTTP_PROXIES_V1_TARGET_HTTP_PROXIES_PROTO_EXPORT_H diff --git a/google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_option_defaults.cc b/google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_option_defaults.cc index 8f84eb9925785..c81d0ac4c4d7e 100644 --- a/google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_option_defaults.cc +++ b/google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_option_defaults.cc @@ -45,7 +45,7 @@ Options TargetHttpsProxiesDefaultOptions(Options options) { options.set< compute_target_https_proxies_v1::TargetHttpsProxiesRetryPolicyOption>( compute_target_https_proxies_v1:: - TargetHttpsProxiesLimitedTimeRetryPolicy(std::chrono::minutes(30)) + TargetHttpsProxiesLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_rest_logging_decorator.h b/google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_rest_logging_decorator.h index 695e8dcab4b22..fafd52b30f5b9 100644 --- a/google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_rest_logging_decorator.h +++ b/google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_rest_logging_decorator.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_HTTPS_PROXIES_V1_INTERNAL_TARGET_HTTPS_PROXIES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_HTTPS_PROXIES_V1_INTERNAL_TARGET_HTTPS_PROXIES_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_rest_stub.h" +#include "google/cloud/compute/target_https_proxies/v1/target_https_proxies.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_rest_metadata_decorator.cc b/google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_rest_metadata_decorator.cc index 934a151b7c430..3188174e00a7b 100644 --- a/google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_rest_metadata_decorator.cc +++ b/google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_rest_metadata_decorator.cc @@ -18,10 +18,10 @@ // google/cloud/compute/target_https_proxies/v1/target_https_proxies.proto #include "google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_rest_metadata_decorator.h b/google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_rest_metadata_decorator.h index 66ced86a67312..d04093c0c2303 100644 --- a/google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_rest_metadata_decorator.h +++ b/google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_rest_metadata_decorator.h @@ -20,12 +20,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_HTTPS_PROXIES_V1_INTERNAL_TARGET_HTTPS_PROXIES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_HTTPS_PROXIES_V1_INTERNAL_TARGET_HTTPS_PROXIES_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_rest_stub.h" +#include "google/cloud/compute/target_https_proxies/v1/target_https_proxies.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_rest_stub.cc b/google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_rest_stub.cc index b944461c8df24..4352382f379e3 100644 --- a/google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_rest_stub.cc +++ b/google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_rest_stub.cc @@ -18,12 +18,12 @@ // google/cloud/compute/target_https_proxies/v1/target_https_proxies.proto #include "google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/target_https_proxies/v1/target_https_proxies.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_rest_stub.h b/google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_rest_stub.h index f200b5782ffe3..bfb36ac6112ab 100644 --- a/google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_rest_stub.h +++ b/google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_rest_stub.h @@ -20,13 +20,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_HTTPS_PROXIES_V1_INTERNAL_TARGET_HTTPS_PROXIES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_HTTPS_PROXIES_V1_INTERNAL_TARGET_HTTPS_PROXIES_REST_STUB_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/target_https_proxies/v1/target_https_proxies.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_tracing_connection.cc b/google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_tracing_connection.cc index 23000669654cc..5e88c40d576af 100644 --- a/google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_tracing_connection.cc +++ b/google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace compute_target_https_proxies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TargetHttpsProxiesTracingConnection::TargetHttpsProxiesTracingConnection( std::shared_ptr< compute_target_https_proxies_v1::TargetHttpsProxiesConnection> @@ -348,19 +346,15 @@ TargetHttpsProxiesTracingConnection::SetUrlMap( return internal::EndSpan(std::move(span), child_->SetUrlMap(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTargetHttpsProxiesTracingConnection( std::shared_ptr< compute_target_https_proxies_v1::TargetHttpsProxiesConnection> conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_tracing_connection.h b/google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_tracing_connection.h index 3985209fb2b68..075ec6d7ce00c 100644 --- a/google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_tracing_connection.h +++ b/google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace compute_target_https_proxies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TargetHttpsProxiesTracingConnection : public compute_target_https_proxies_v1::TargetHttpsProxiesConnection { public: @@ -159,8 +157,6 @@ class TargetHttpsProxiesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/target_https_proxies/v1/target_https_proxies_connection.h b/google/cloud/compute/target_https_proxies/v1/target_https_proxies_connection.h index 63653f3bfd723..8902f47b1f666 100644 --- a/google/cloud/compute/target_https_proxies/v1/target_https_proxies_connection.h +++ b/google/cloud/compute/target_https_proxies/v1/target_https_proxies_connection.h @@ -21,6 +21,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_HTTPS_PROXIES_V1_TARGET_HTTPS_PROXIES_CONNECTION_H #include "google/cloud/compute/target_https_proxies/v1/internal/target_https_proxies_retry_traits.h" +#include "google/cloud/compute/target_https_proxies/v1/target_https_proxies.pb.h" #include "google/cloud/compute/target_https_proxies/v1/target_https_proxies_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -31,7 +32,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/target_https_proxies/v1/target_https_proxies_connection_idempotency_policy.h b/google/cloud/compute/target_https_proxies/v1/target_https_proxies_connection_idempotency_policy.h index 8329a21af5e5b..f7dc253e31e08 100644 --- a/google/cloud/compute/target_https_proxies/v1/target_https_proxies_connection_idempotency_policy.h +++ b/google/cloud/compute/target_https_proxies/v1/target_https_proxies_connection_idempotency_policy.h @@ -20,9 +20,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_HTTPS_PROXIES_V1_TARGET_HTTPS_PROXIES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_HTTPS_PROXIES_V1_TARGET_HTTPS_PROXIES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/target_https_proxies/v1/target_https_proxies.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/target_https_proxies/v1/target_https_proxies_proto_export.h b/google/cloud/compute/target_https_proxies/v1/target_https_proxies_proto_export.h index c33d13125ea47..3bff5a44ef7e2 100644 --- a/google/cloud/compute/target_https_proxies/v1/target_https_proxies_proto_export.h +++ b/google/cloud/compute/target_https_proxies/v1/target_https_proxies_proto_export.h @@ -26,11 +26,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_HTTPS_PROXIES_V1_TARGET_HTTPS_PROXIES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_129.pb.h" +#include "google/cloud/compute/v1/internal/common_136.pb.h" +#include "google/cloud/compute/v1/internal/common_137.pb.h" +#include "google/cloud/compute/v1/internal/common_147.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_HTTPS_PROXIES_V1_TARGET_HTTPS_PROXIES_PROTO_EXPORT_H diff --git a/google/cloud/compute/target_instances/v1/internal/target_instances_option_defaults.cc b/google/cloud/compute/target_instances/v1/internal/target_instances_option_defaults.cc index 0207ffca0a0da..6f5a01410cbdc 100644 --- a/google/cloud/compute/target_instances/v1/internal/target_instances_option_defaults.cc +++ b/google/cloud/compute/target_instances/v1/internal/target_instances_option_defaults.cc @@ -42,7 +42,7 @@ Options TargetInstancesDefaultOptions(Options options) { compute_target_instances_v1::TargetInstancesRetryPolicyOption>()) { options.set( compute_target_instances_v1::TargetInstancesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/compute/target_instances/v1/internal/target_instances_rest_connection_impl.h b/google/cloud/compute/target_instances/v1/internal/target_instances_rest_connection_impl.h index 64b401bfa7e8e..fafcfee77c7e1 100644 --- a/google/cloud/compute/target_instances/v1/internal/target_instances_rest_connection_impl.h +++ b/google/cloud/compute/target_instances/v1/internal/target_instances_rest_connection_impl.h @@ -24,13 +24,13 @@ #include "google/cloud/compute/target_instances/v1/target_instances_connection.h" #include "google/cloud/compute/target_instances/v1/target_instances_connection_idempotency_policy.h" #include "google/cloud/compute/target_instances/v1/target_instances_options.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/background_threads.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/target_instances/v1/internal/target_instances_rest_logging_decorator.h b/google/cloud/compute/target_instances/v1/internal/target_instances_rest_logging_decorator.h index 84e63190b3c64..10706071bd783 100644 --- a/google/cloud/compute/target_instances/v1/internal/target_instances_rest_logging_decorator.h +++ b/google/cloud/compute/target_instances/v1/internal/target_instances_rest_logging_decorator.h @@ -20,12 +20,12 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_INSTANCES_V1_INTERNAL_TARGET_INSTANCES_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/target_instances/v1/internal/target_instances_rest_stub.h" +#include "google/cloud/compute/target_instances/v1/target_instances.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/target_instances/v1/internal/target_instances_rest_metadata_decorator.cc b/google/cloud/compute/target_instances/v1/internal/target_instances_rest_metadata_decorator.cc index 9a817956ec901..3ffdbda20ce3a 100644 --- a/google/cloud/compute/target_instances/v1/internal/target_instances_rest_metadata_decorator.cc +++ b/google/cloud/compute/target_instances/v1/internal/target_instances_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/target_instances/v1/target_instances.proto #include "google/cloud/compute/target_instances/v1/internal/target_instances_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/target_instances/v1/internal/target_instances_rest_metadata_decorator.h b/google/cloud/compute/target_instances/v1/internal/target_instances_rest_metadata_decorator.h index b7781db0572aa..ed4a4d6342af1 100644 --- a/google/cloud/compute/target_instances/v1/internal/target_instances_rest_metadata_decorator.h +++ b/google/cloud/compute/target_instances/v1/internal/target_instances_rest_metadata_decorator.h @@ -20,11 +20,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_INSTANCES_V1_INTERNAL_TARGET_INSTANCES_REST_METADATA_DECORATOR_H #include "google/cloud/compute/target_instances/v1/internal/target_instances_rest_stub.h" +#include "google/cloud/compute/target_instances/v1/target_instances.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/target_instances/v1/internal/target_instances_rest_stub.cc b/google/cloud/compute/target_instances/v1/internal/target_instances_rest_stub.cc index 3404912888203..81e8c12bcb160 100644 --- a/google/cloud/compute/target_instances/v1/internal/target_instances_rest_stub.cc +++ b/google/cloud/compute/target_instances/v1/internal/target_instances_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/target_instances/v1/target_instances.proto #include "google/cloud/compute/target_instances/v1/internal/target_instances_rest_stub.h" +#include "google/cloud/compute/target_instances/v1/target_instances.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/target_instances/v1/internal/target_instances_rest_stub.h b/google/cloud/compute/target_instances/v1/internal/target_instances_rest_stub.h index cf846f1ac808b..dbf138d5470af 100644 --- a/google/cloud/compute/target_instances/v1/internal/target_instances_rest_stub.h +++ b/google/cloud/compute/target_instances/v1/internal/target_instances_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_INSTANCES_V1_INTERNAL_TARGET_INSTANCES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_INSTANCES_V1_INTERNAL_TARGET_INSTANCES_REST_STUB_H +#include "google/cloud/compute/target_instances/v1/target_instances.pb.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/target_instances/v1/internal/target_instances_tracing_connection.cc b/google/cloud/compute/target_instances/v1/internal/target_instances_tracing_connection.cc index fb0bfa139bd90..938a614b5f807 100644 --- a/google/cloud/compute/target_instances/v1/internal/target_instances_tracing_connection.cc +++ b/google/cloud/compute/target_instances/v1/internal/target_instances_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_target_instances_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TargetInstancesTracingConnection::TargetInstancesTracingConnection( std::shared_ptr child) @@ -178,17 +176,13 @@ TargetInstancesTracingConnection::SetSecurityPolicy( child_->SetSecurityPolicy(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTargetInstancesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/target_instances/v1/internal/target_instances_tracing_connection.h b/google/cloud/compute/target_instances/v1/internal/target_instances_tracing_connection.h index 8d8ef6d65b7ce..049586b689e60 100644 --- a/google/cloud/compute/target_instances/v1/internal/target_instances_tracing_connection.h +++ b/google/cloud/compute/target_instances/v1/internal/target_instances_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_target_instances_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TargetInstancesTracingConnection : public compute_target_instances_v1::TargetInstancesConnection { public: @@ -96,8 +94,6 @@ class TargetInstancesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/target_instances/v1/target_instances_connection.h b/google/cloud/compute/target_instances/v1/target_instances_connection.h index aacef0d8e12c4..18eb77a6bdd44 100644 --- a/google/cloud/compute/target_instances/v1/target_instances_connection.h +++ b/google/cloud/compute/target_instances/v1/target_instances_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_INSTANCES_V1_TARGET_INSTANCES_CONNECTION_H #include "google/cloud/compute/target_instances/v1/internal/target_instances_retry_traits.h" +#include "google/cloud/compute/target_instances/v1/target_instances.pb.h" #include "google/cloud/compute/target_instances/v1/target_instances_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/target_instances/v1/target_instances_connection_idempotency_policy.h b/google/cloud/compute/target_instances/v1/target_instances_connection_idempotency_policy.h index debcb3fc7ce9f..766e3771e1fc4 100644 --- a/google/cloud/compute/target_instances/v1/target_instances_connection_idempotency_policy.h +++ b/google/cloud/compute/target_instances/v1/target_instances_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_INSTANCES_V1_TARGET_INSTANCES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_INSTANCES_V1_TARGET_INSTANCES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/target_instances/v1/target_instances.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/target_instances/v1/target_instances_proto_export.h b/google/cloud/compute/target_instances/v1/target_instances_proto_export.h index 477bb9b527d1f..4c9edebaabaf2 100644 --- a/google/cloud/compute/target_instances/v1/target_instances_proto_export.h +++ b/google/cloud/compute/target_instances/v1/target_instances_proto_export.h @@ -26,9 +26,9 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_INSTANCES_V1_TARGET_INSTANCES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_118.pb.h" +#include "google/cloud/compute/v1/internal/common_138.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_INSTANCES_V1_TARGET_INSTANCES_PROTO_EXPORT_H diff --git a/google/cloud/compute/target_pools/v1/internal/target_pools_option_defaults.cc b/google/cloud/compute/target_pools/v1/internal/target_pools_option_defaults.cc index fb22bfb2f5387..8faedab4078ed 100644 --- a/google/cloud/compute/target_pools/v1/internal/target_pools_option_defaults.cc +++ b/google/cloud/compute/target_pools/v1/internal/target_pools_option_defaults.cc @@ -41,7 +41,7 @@ Options TargetPoolsDefaultOptions(Options options) { if (!options.has()) { options.set( compute_target_pools_v1::TargetPoolsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/compute/target_pools/v1/internal/target_pools_rest_connection_impl.h b/google/cloud/compute/target_pools/v1/internal/target_pools_rest_connection_impl.h index 3209854375ee7..e564a34d379c8 100644 --- a/google/cloud/compute/target_pools/v1/internal/target_pools_rest_connection_impl.h +++ b/google/cloud/compute/target_pools/v1/internal/target_pools_rest_connection_impl.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_POOLS_V1_INTERNAL_TARGET_POOLS_REST_CONNECTION_IMPL_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_POOLS_V1_INTERNAL_TARGET_POOLS_REST_CONNECTION_IMPL_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/target_pools/v1/internal/target_pools_rest_stub.h" #include "google/cloud/compute/target_pools/v1/internal/target_pools_retry_traits.h" #include "google/cloud/compute/target_pools/v1/target_pools_connection.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/target_pools/v1/internal/target_pools_rest_logging_decorator.h b/google/cloud/compute/target_pools/v1/internal/target_pools_rest_logging_decorator.h index 8237059e64fd2..1db83a1253083 100644 --- a/google/cloud/compute/target_pools/v1/internal/target_pools_rest_logging_decorator.h +++ b/google/cloud/compute/target_pools/v1/internal/target_pools_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_POOLS_V1_INTERNAL_TARGET_POOLS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_POOLS_V1_INTERNAL_TARGET_POOLS_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/target_pools/v1/internal/target_pools_rest_stub.h" +#include "google/cloud/compute/target_pools/v1/target_pools.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/target_pools/v1/internal/target_pools_rest_metadata_decorator.cc b/google/cloud/compute/target_pools/v1/internal/target_pools_rest_metadata_decorator.cc index 8e810ea4099a9..908ef562a5f77 100644 --- a/google/cloud/compute/target_pools/v1/internal/target_pools_rest_metadata_decorator.cc +++ b/google/cloud/compute/target_pools/v1/internal/target_pools_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/target_pools/v1/target_pools.proto #include "google/cloud/compute/target_pools/v1/internal/target_pools_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/target_pools/v1/internal/target_pools_rest_metadata_decorator.h b/google/cloud/compute/target_pools/v1/internal/target_pools_rest_metadata_decorator.h index 42e5116a3d807..7d31c4e6af8af 100644 --- a/google/cloud/compute/target_pools/v1/internal/target_pools_rest_metadata_decorator.h +++ b/google/cloud/compute/target_pools/v1/internal/target_pools_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_POOLS_V1_INTERNAL_TARGET_POOLS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_POOLS_V1_INTERNAL_TARGET_POOLS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/target_pools/v1/internal/target_pools_rest_stub.h" +#include "google/cloud/compute/target_pools/v1/target_pools.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/target_pools/v1/internal/target_pools_rest_stub.cc b/google/cloud/compute/target_pools/v1/internal/target_pools_rest_stub.cc index b1473a9493ec4..c0d1a3a560185 100644 --- a/google/cloud/compute/target_pools/v1/internal/target_pools_rest_stub.cc +++ b/google/cloud/compute/target_pools/v1/internal/target_pools_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/target_pools/v1/target_pools.proto #include "google/cloud/compute/target_pools/v1/internal/target_pools_rest_stub.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" +#include "google/cloud/compute/target_pools/v1/target_pools.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/target_pools/v1/internal/target_pools_rest_stub.h b/google/cloud/compute/target_pools/v1/internal/target_pools_rest_stub.h index 2ae04cc765284..6f6691f901265 100644 --- a/google/cloud/compute/target_pools/v1/internal/target_pools_rest_stub.h +++ b/google/cloud/compute/target_pools/v1/internal/target_pools_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_POOLS_V1_INTERNAL_TARGET_POOLS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_POOLS_V1_INTERNAL_TARGET_POOLS_REST_STUB_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" +#include "google/cloud/compute/target_pools/v1/target_pools.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/target_pools/v1/internal/target_pools_tracing_connection.cc b/google/cloud/compute/target_pools/v1/internal/target_pools_tracing_connection.cc index 4742233bcb6db..793b6810d6017 100644 --- a/google/cloud/compute/target_pools/v1/internal/target_pools_tracing_connection.cc +++ b/google/cloud/compute/target_pools/v1/internal/target_pools_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_target_pools_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TargetPoolsTracingConnection::TargetPoolsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -327,16 +325,12 @@ TargetPoolsTracingConnection::SetSecurityPolicy( child_->SetSecurityPolicy(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTargetPoolsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/target_pools/v1/internal/target_pools_tracing_connection.h b/google/cloud/compute/target_pools/v1/internal/target_pools_tracing_connection.h index ac6d45abd3037..f119b0ba11fb4 100644 --- a/google/cloud/compute/target_pools/v1/internal/target_pools_tracing_connection.h +++ b/google/cloud/compute/target_pools/v1/internal/target_pools_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_target_pools_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TargetPoolsTracingConnection : public compute_target_pools_v1::TargetPoolsConnection { public: @@ -154,8 +152,6 @@ class TargetPoolsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/target_pools/v1/target_pools_connection.h b/google/cloud/compute/target_pools/v1/target_pools_connection.h index 41b1fae1dcf94..4cb09cef7221a 100644 --- a/google/cloud/compute/target_pools/v1/target_pools_connection.h +++ b/google/cloud/compute/target_pools/v1/target_pools_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_POOLS_V1_TARGET_POOLS_CONNECTION_H #include "google/cloud/compute/target_pools/v1/internal/target_pools_retry_traits.h" +#include "google/cloud/compute/target_pools/v1/target_pools.pb.h" #include "google/cloud/compute/target_pools/v1/target_pools_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/target_pools/v1/target_pools_connection_idempotency_policy.h b/google/cloud/compute/target_pools/v1/target_pools_connection_idempotency_policy.h index 2a286426640e4..fd9dafc079137 100644 --- a/google/cloud/compute/target_pools/v1/target_pools_connection_idempotency_policy.h +++ b/google/cloud/compute/target_pools/v1/target_pools_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_POOLS_V1_TARGET_POOLS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_POOLS_V1_TARGET_POOLS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/target_pools/v1/target_pools.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/target_pools/v1/target_pools_proto_export.h b/google/cloud/compute/target_pools/v1/target_pools_proto_export.h index 9c18758151907..c38bcff3b167b 100644 --- a/google/cloud/compute/target_pools/v1/target_pools_proto_export.h +++ b/google/cloud/compute/target_pools/v1/target_pools_proto_export.h @@ -26,13 +26,13 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_POOLS_V1_TARGET_POOLS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_049.pb.h" +#include "google/cloud/compute/v1/internal/common_052.pb.h" +#include "google/cloud/compute/v1/internal/common_063.pb.h" +#include "google/cloud/compute/v1/internal/common_118.pb.h" +#include "google/cloud/compute/v1/internal/common_139.pb.h" +#include "google/cloud/compute/v1/internal/common_140.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_POOLS_V1_TARGET_POOLS_PROTO_EXPORT_H diff --git a/google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_option_defaults.cc b/google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_option_defaults.cc index ed24c5093cd74..0ed912db29125 100644 --- a/google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_option_defaults.cc +++ b/google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_option_defaults.cc @@ -44,7 +44,7 @@ Options TargetSslProxiesDefaultOptions(Options options) { options.set< compute_target_ssl_proxies_v1::TargetSslProxiesRetryPolicyOption>( compute_target_ssl_proxies_v1::TargetSslProxiesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_rest_logging_decorator.h b/google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_rest_logging_decorator.h index be5db1f1706e6..590327bf0e574 100644 --- a/google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_rest_logging_decorator.h +++ b/google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_SSL_PROXIES_V1_INTERNAL_TARGET_SSL_PROXIES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_SSL_PROXIES_V1_INTERNAL_TARGET_SSL_PROXIES_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_rest_stub.h" +#include "google/cloud/compute/target_ssl_proxies/v1/target_ssl_proxies.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_rest_metadata_decorator.cc b/google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_rest_metadata_decorator.cc index 531508701372c..31bb9c96ae8e2 100644 --- a/google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_rest_metadata_decorator.cc +++ b/google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/target_ssl_proxies/v1/target_ssl_proxies.proto #include "google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_rest_metadata_decorator.h b/google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_rest_metadata_decorator.h index a92c472a72108..89f83ebe7df1e 100644 --- a/google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_rest_metadata_decorator.h +++ b/google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_SSL_PROXIES_V1_INTERNAL_TARGET_SSL_PROXIES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_SSL_PROXIES_V1_INTERNAL_TARGET_SSL_PROXIES_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_rest_stub.h" +#include "google/cloud/compute/target_ssl_proxies/v1/target_ssl_proxies.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_rest_stub.cc b/google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_rest_stub.cc index 7f45b90ab5bc1..712df00fe786c 100644 --- a/google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_rest_stub.cc +++ b/google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/target_ssl_proxies/v1/target_ssl_proxies.proto #include "google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/target_ssl_proxies/v1/target_ssl_proxies.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_rest_stub.h b/google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_rest_stub.h index 2e92f6191edfd..9ce8af0d9b570 100644 --- a/google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_rest_stub.h +++ b/google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_SSL_PROXIES_V1_INTERNAL_TARGET_SSL_PROXIES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_SSL_PROXIES_V1_INTERNAL_TARGET_SSL_PROXIES_REST_STUB_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/target_ssl_proxies/v1/target_ssl_proxies.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_tracing_connection.cc b/google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_tracing_connection.cc index 79138a9bd7a0b..c6f282c81fea4 100644 --- a/google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_tracing_connection.cc +++ b/google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_target_ssl_proxies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TargetSslProxiesTracingConnection::TargetSslProxiesTracingConnection( std::shared_ptr child) @@ -297,17 +295,13 @@ TargetSslProxiesTracingConnection::SetSslPolicy( return internal::EndSpan(std::move(span), child_->SetSslPolicy(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTargetSslProxiesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_tracing_connection.h b/google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_tracing_connection.h index 6baa93fcf5e82..57feb389d0b73 100644 --- a/google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_tracing_connection.h +++ b/google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_target_ssl_proxies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TargetSslProxiesTracingConnection : public compute_target_ssl_proxies_v1::TargetSslProxiesConnection { public: @@ -136,8 +134,6 @@ class TargetSslProxiesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/target_ssl_proxies/v1/target_ssl_proxies_connection.h b/google/cloud/compute/target_ssl_proxies/v1/target_ssl_proxies_connection.h index 864cbdcc0046a..f616b746a18a3 100644 --- a/google/cloud/compute/target_ssl_proxies/v1/target_ssl_proxies_connection.h +++ b/google/cloud/compute/target_ssl_proxies/v1/target_ssl_proxies_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_SSL_PROXIES_V1_TARGET_SSL_PROXIES_CONNECTION_H #include "google/cloud/compute/target_ssl_proxies/v1/internal/target_ssl_proxies_retry_traits.h" +#include "google/cloud/compute/target_ssl_proxies/v1/target_ssl_proxies.pb.h" #include "google/cloud/compute/target_ssl_proxies/v1/target_ssl_proxies_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/target_ssl_proxies/v1/target_ssl_proxies_connection_idempotency_policy.h b/google/cloud/compute/target_ssl_proxies/v1/target_ssl_proxies_connection_idempotency_policy.h index 27d03f7e67e98..354e5032c8d85 100644 --- a/google/cloud/compute/target_ssl_proxies/v1/target_ssl_proxies_connection_idempotency_policy.h +++ b/google/cloud/compute/target_ssl_proxies/v1/target_ssl_proxies_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_SSL_PROXIES_V1_TARGET_SSL_PROXIES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_SSL_PROXIES_V1_TARGET_SSL_PROXIES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/target_ssl_proxies/v1/target_ssl_proxies.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/target_ssl_proxies/v1/target_ssl_proxies_proto_export.h b/google/cloud/compute/target_ssl_proxies/v1/target_ssl_proxies_proto_export.h index df926fd2bc2f2..2518416d36cba 100644 --- a/google/cloud/compute/target_ssl_proxies/v1/target_ssl_proxies_proto_export.h +++ b/google/cloud/compute/target_ssl_proxies/v1/target_ssl_proxies_proto_export.h @@ -26,9 +26,9 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_SSL_PROXIES_V1_TARGET_SSL_PROXIES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_129.pb.h" +#include "google/cloud/compute/v1/internal/common_141.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_SSL_PROXIES_V1_TARGET_SSL_PROXIES_PROTO_EXPORT_H diff --git a/google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_option_defaults.cc b/google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_option_defaults.cc index fa465b0fdb621..a63d328720a3a 100644 --- a/google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_option_defaults.cc +++ b/google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_option_defaults.cc @@ -44,7 +44,7 @@ Options TargetTcpProxiesDefaultOptions(Options options) { options.set< compute_target_tcp_proxies_v1::TargetTcpProxiesRetryPolicyOption>( compute_target_tcp_proxies_v1::TargetTcpProxiesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_rest_logging_decorator.h b/google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_rest_logging_decorator.h index cca46f131d861..32a13953a0756 100644 --- a/google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_rest_logging_decorator.h +++ b/google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_TCP_PROXIES_V1_INTERNAL_TARGET_TCP_PROXIES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_TCP_PROXIES_V1_INTERNAL_TARGET_TCP_PROXIES_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_rest_stub.h" +#include "google/cloud/compute/target_tcp_proxies/v1/target_tcp_proxies.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_rest_metadata_decorator.cc b/google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_rest_metadata_decorator.cc index a1bdb2510d408..561a8472587bb 100644 --- a/google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_rest_metadata_decorator.cc +++ b/google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/target_tcp_proxies/v1/target_tcp_proxies.proto #include "google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_rest_metadata_decorator.h b/google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_rest_metadata_decorator.h index 787320a69916a..857d0dbd28f4f 100644 --- a/google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_rest_metadata_decorator.h +++ b/google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_TCP_PROXIES_V1_INTERNAL_TARGET_TCP_PROXIES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_TCP_PROXIES_V1_INTERNAL_TARGET_TCP_PROXIES_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_rest_stub.h" +#include "google/cloud/compute/target_tcp_proxies/v1/target_tcp_proxies.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_rest_stub.cc b/google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_rest_stub.cc index fb0b05a9f65bc..7f88bcaebe19a 100644 --- a/google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_rest_stub.cc +++ b/google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/target_tcp_proxies/v1/target_tcp_proxies.proto #include "google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/target_tcp_proxies/v1/target_tcp_proxies.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_rest_stub.h b/google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_rest_stub.h index 208143b989f97..4b88f8554ec80 100644 --- a/google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_rest_stub.h +++ b/google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_TCP_PROXIES_V1_INTERNAL_TARGET_TCP_PROXIES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_TCP_PROXIES_V1_INTERNAL_TARGET_TCP_PROXIES_REST_STUB_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/target_tcp_proxies/v1/target_tcp_proxies.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_tracing_connection.cc b/google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_tracing_connection.cc index 63b252994d77b..90c2c77e2bf1a 100644 --- a/google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_tracing_connection.cc +++ b/google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_target_tcp_proxies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TargetTcpProxiesTracingConnection::TargetTcpProxiesTracingConnection( std::shared_ptr child) @@ -212,17 +210,13 @@ TargetTcpProxiesTracingConnection::SetProxyHeader( return internal::EndSpan(std::move(span), child_->SetProxyHeader(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTargetTcpProxiesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_tracing_connection.h b/google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_tracing_connection.h index e2ec695e6a367..7e47641266caa 100644 --- a/google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_tracing_connection.h +++ b/google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_target_tcp_proxies_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TargetTcpProxiesTracingConnection : public compute_target_tcp_proxies_v1::TargetTcpProxiesConnection { public: @@ -107,8 +105,6 @@ class TargetTcpProxiesTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/target_tcp_proxies/v1/target_tcp_proxies_connection.h b/google/cloud/compute/target_tcp_proxies/v1/target_tcp_proxies_connection.h index e7adcffc8205c..a03358010eee0 100644 --- a/google/cloud/compute/target_tcp_proxies/v1/target_tcp_proxies_connection.h +++ b/google/cloud/compute/target_tcp_proxies/v1/target_tcp_proxies_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_TCP_PROXIES_V1_TARGET_TCP_PROXIES_CONNECTION_H #include "google/cloud/compute/target_tcp_proxies/v1/internal/target_tcp_proxies_retry_traits.h" +#include "google/cloud/compute/target_tcp_proxies/v1/target_tcp_proxies.pb.h" #include "google/cloud/compute/target_tcp_proxies/v1/target_tcp_proxies_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/target_tcp_proxies/v1/target_tcp_proxies_connection_idempotency_policy.h b/google/cloud/compute/target_tcp_proxies/v1/target_tcp_proxies_connection_idempotency_policy.h index 920e1640f65d9..71168c8ed4cb7 100644 --- a/google/cloud/compute/target_tcp_proxies/v1/target_tcp_proxies_connection_idempotency_policy.h +++ b/google/cloud/compute/target_tcp_proxies/v1/target_tcp_proxies_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_TCP_PROXIES_V1_TARGET_TCP_PROXIES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_TCP_PROXIES_V1_TARGET_TCP_PROXIES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/target_tcp_proxies/v1/target_tcp_proxies.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/target_tcp_proxies/v1/target_tcp_proxies_proto_export.h b/google/cloud/compute/target_tcp_proxies/v1/target_tcp_proxies_proto_export.h index 86ba1890fd9a9..d8adacff18dd7 100644 --- a/google/cloud/compute/target_tcp_proxies/v1/target_tcp_proxies_proto_export.h +++ b/google/cloud/compute/target_tcp_proxies/v1/target_tcp_proxies_proto_export.h @@ -26,9 +26,9 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_TCP_PROXIES_V1_TARGET_TCP_PROXIES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_142.pb.h" +#include "google/cloud/compute/v1/internal/common_143.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_TCP_PROXIES_V1_TARGET_TCP_PROXIES_PROTO_EXPORT_H diff --git a/google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_option_defaults.cc b/google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_option_defaults.cc index 72ddd84900d21..410bc32edcb9e 100644 --- a/google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_option_defaults.cc +++ b/google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_option_defaults.cc @@ -44,7 +44,7 @@ Options TargetVpnGatewaysDefaultOptions(Options options) { options.set< compute_target_vpn_gateways_v1::TargetVpnGatewaysRetryPolicyOption>( compute_target_vpn_gateways_v1::TargetVpnGatewaysLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include namespace google { diff --git a/google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_rest_logging_decorator.h b/google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_rest_logging_decorator.h index eed118e6869b8..d4fc9b9eae80b 100644 --- a/google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_rest_logging_decorator.h +++ b/google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_VPN_GATEWAYS_V1_INTERNAL_TARGET_VPN_GATEWAYS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_VPN_GATEWAYS_V1_INTERNAL_TARGET_VPN_GATEWAYS_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_rest_stub.h" +#include "google/cloud/compute/target_vpn_gateways/v1/target_vpn_gateways.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_rest_metadata_decorator.cc b/google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_rest_metadata_decorator.cc index 1ded399b09692..1c83c94a426fb 100644 --- a/google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_rest_metadata_decorator.cc +++ b/google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/target_vpn_gateways/v1/target_vpn_gateways.proto #include "google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_rest_metadata_decorator.h b/google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_rest_metadata_decorator.h index e86bd8cc995c5..64a040462ccee 100644 --- a/google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_rest_metadata_decorator.h +++ b/google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_VPN_GATEWAYS_V1_INTERNAL_TARGET_VPN_GATEWAYS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_VPN_GATEWAYS_V1_INTERNAL_TARGET_VPN_GATEWAYS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_rest_stub.h" +#include "google/cloud/compute/target_vpn_gateways/v1/target_vpn_gateways.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_rest_stub.cc b/google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_rest_stub.cc index 1b735cc8bb792..431c1c5b9f8a4 100644 --- a/google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_rest_stub.cc +++ b/google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/target_vpn_gateways/v1/target_vpn_gateways.proto #include "google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_rest_stub.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" +#include "google/cloud/compute/target_vpn_gateways/v1/target_vpn_gateways.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_rest_stub.h b/google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_rest_stub.h index 6fc29d3fefe78..22ecf1e2a45a8 100644 --- a/google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_rest_stub.h +++ b/google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_VPN_GATEWAYS_V1_INTERNAL_TARGET_VPN_GATEWAYS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_VPN_GATEWAYS_V1_INTERNAL_TARGET_VPN_GATEWAYS_REST_STUB_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" +#include "google/cloud/compute/target_vpn_gateways/v1/target_vpn_gateways.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_tracing_connection.cc b/google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_tracing_connection.cc index 41b830f04bd44..fcabd315ecc39 100644 --- a/google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_tracing_connection.cc +++ b/google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_target_vpn_gateways_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TargetVpnGatewaysTracingConnection::TargetVpnGatewaysTracingConnection( std::shared_ptr child) @@ -174,18 +172,14 @@ TargetVpnGatewaysTracingConnection::SetLabels( return internal::EndSpan(std::move(span), child_->SetLabels(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTargetVpnGatewaysTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_tracing_connection.h b/google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_tracing_connection.h index 3ad02e905d0de..bdf08a300fe40 100644 --- a/google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_tracing_connection.h +++ b/google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_target_vpn_gateways_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TargetVpnGatewaysTracingConnection : public compute_target_vpn_gateways_v1::TargetVpnGatewaysConnection { public: @@ -99,8 +97,6 @@ class TargetVpnGatewaysTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/target_vpn_gateways/v1/target_vpn_gateways_connection.h b/google/cloud/compute/target_vpn_gateways/v1/target_vpn_gateways_connection.h index 86d100d21d472..cbb8ce8b44c82 100644 --- a/google/cloud/compute/target_vpn_gateways/v1/target_vpn_gateways_connection.h +++ b/google/cloud/compute/target_vpn_gateways/v1/target_vpn_gateways_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_VPN_GATEWAYS_V1_TARGET_VPN_GATEWAYS_CONNECTION_H #include "google/cloud/compute/target_vpn_gateways/v1/internal/target_vpn_gateways_retry_traits.h" +#include "google/cloud/compute/target_vpn_gateways/v1/target_vpn_gateways.pb.h" #include "google/cloud/compute/target_vpn_gateways/v1/target_vpn_gateways_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/target_vpn_gateways/v1/target_vpn_gateways_connection_idempotency_policy.h b/google/cloud/compute/target_vpn_gateways/v1/target_vpn_gateways_connection_idempotency_policy.h index cd40af3fe791a..3b1c3ddd31dcc 100644 --- a/google/cloud/compute/target_vpn_gateways/v1/target_vpn_gateways_connection_idempotency_policy.h +++ b/google/cloud/compute/target_vpn_gateways/v1/target_vpn_gateways_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_VPN_GATEWAYS_V1_TARGET_VPN_GATEWAYS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_VPN_GATEWAYS_V1_TARGET_VPN_GATEWAYS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/target_vpn_gateways/v1/target_vpn_gateways.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/target_vpn_gateways/v1/target_vpn_gateways_proto_export.h b/google/cloud/compute/target_vpn_gateways/v1/target_vpn_gateways_proto_export.h index b636d530e1e62..ccdd2e817d00b 100644 --- a/google/cloud/compute/target_vpn_gateways/v1/target_vpn_gateways_proto_export.h +++ b/google/cloud/compute/target_vpn_gateways/v1/target_vpn_gateways_proto_export.h @@ -26,9 +26,9 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_VPN_GATEWAYS_V1_TARGET_VPN_GATEWAYS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_107.pb.h" +#include "google/cloud/compute/v1/internal/common_144.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_TARGET_VPN_GATEWAYS_V1_TARGET_VPN_GATEWAYS_PROTO_EXPORT_H diff --git a/google/cloud/compute/url_maps/v1/internal/url_maps_option_defaults.cc b/google/cloud/compute/url_maps/v1/internal/url_maps_option_defaults.cc index 6cce3eb0945e0..358217a8c1a08 100644 --- a/google/cloud/compute/url_maps/v1/internal/url_maps_option_defaults.cc +++ b/google/cloud/compute/url_maps/v1/internal/url_maps_option_defaults.cc @@ -41,7 +41,7 @@ Options UrlMapsDefaultOptions(Options options) { if (!options.has()) { options.set( compute_url_maps_v1::UrlMapsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/compute/url_maps/v1/internal/url_maps_rest_connection_impl.h b/google/cloud/compute/url_maps/v1/internal/url_maps_rest_connection_impl.h index dc9a2d253b7f2..082b0038ea46b 100644 --- a/google/cloud/compute/url_maps/v1/internal/url_maps_rest_connection_impl.h +++ b/google/cloud/compute/url_maps/v1/internal/url_maps_rest_connection_impl.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_URL_MAPS_V1_INTERNAL_URL_MAPS_REST_CONNECTION_IMPL_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_URL_MAPS_V1_INTERNAL_URL_MAPS_REST_CONNECTION_IMPL_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/url_maps/v1/internal/url_maps_rest_stub.h" #include "google/cloud/compute/url_maps/v1/internal/url_maps_retry_traits.h" #include "google/cloud/compute/url_maps/v1/url_maps_connection.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/url_maps/v1/internal/url_maps_rest_logging_decorator.h b/google/cloud/compute/url_maps/v1/internal/url_maps_rest_logging_decorator.h index 4d176a04d960a..8bf58112f8054 100644 --- a/google/cloud/compute/url_maps/v1/internal/url_maps_rest_logging_decorator.h +++ b/google/cloud/compute/url_maps/v1/internal/url_maps_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_URL_MAPS_V1_INTERNAL_URL_MAPS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_URL_MAPS_V1_INTERNAL_URL_MAPS_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/url_maps/v1/internal/url_maps_rest_stub.h" +#include "google/cloud/compute/url_maps/v1/url_maps.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/url_maps/v1/internal/url_maps_rest_metadata_decorator.cc b/google/cloud/compute/url_maps/v1/internal/url_maps_rest_metadata_decorator.cc index f2730db5e5dd5..550e7baee1f34 100644 --- a/google/cloud/compute/url_maps/v1/internal/url_maps_rest_metadata_decorator.cc +++ b/google/cloud/compute/url_maps/v1/internal/url_maps_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/url_maps/v1/url_maps.proto #include "google/cloud/compute/url_maps/v1/internal/url_maps_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/url_maps/v1/internal/url_maps_rest_metadata_decorator.h b/google/cloud/compute/url_maps/v1/internal/url_maps_rest_metadata_decorator.h index aa770354fe8d6..62eeb60893749 100644 --- a/google/cloud/compute/url_maps/v1/internal/url_maps_rest_metadata_decorator.h +++ b/google/cloud/compute/url_maps/v1/internal/url_maps_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_URL_MAPS_V1_INTERNAL_URL_MAPS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_URL_MAPS_V1_INTERNAL_URL_MAPS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" #include "google/cloud/compute/url_maps/v1/internal/url_maps_rest_stub.h" +#include "google/cloud/compute/url_maps/v1/url_maps.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/url_maps/v1/internal/url_maps_rest_stub.cc b/google/cloud/compute/url_maps/v1/internal/url_maps_rest_stub.cc index a7268e89a6cc2..76cbf1ce2759e 100644 --- a/google/cloud/compute/url_maps/v1/internal/url_maps_rest_stub.cc +++ b/google/cloud/compute/url_maps/v1/internal/url_maps_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/url_maps/v1/url_maps.proto #include "google/cloud/compute/url_maps/v1/internal/url_maps_rest_stub.h" +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/url_maps/v1/url_maps.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/url_maps/v1/internal/url_maps_rest_stub.h b/google/cloud/compute/url_maps/v1/internal/url_maps_rest_stub.h index b7dd4fa6fb8e3..553a9cd6c7ae4 100644 --- a/google/cloud/compute/url_maps/v1/internal/url_maps_rest_stub.h +++ b/google/cloud/compute/url_maps/v1/internal/url_maps_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_URL_MAPS_V1_INTERNAL_URL_MAPS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_URL_MAPS_V1_INTERNAL_URL_MAPS_REST_STUB_H +#include "google/cloud/compute/global_operations/v1/global_operations.pb.h" +#include "google/cloud/compute/url_maps/v1/url_maps.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/url_maps/v1/internal/url_maps_tracing_connection.cc b/google/cloud/compute/url_maps/v1/internal/url_maps_tracing_connection.cc index 36eb502e47f0f..ffb4a9cc3bd15 100644 --- a/google/cloud/compute/url_maps/v1/internal/url_maps_tracing_connection.cc +++ b/google/cloud/compute/url_maps/v1/internal/url_maps_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_url_maps_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - UrlMapsTracingConnection::UrlMapsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -228,16 +226,12 @@ UrlMapsTracingConnection::Validate( return internal::EndSpan(*span, child_->Validate(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeUrlMapsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/url_maps/v1/internal/url_maps_tracing_connection.h b/google/cloud/compute/url_maps/v1/internal/url_maps_tracing_connection.h index b80fc54b84daa..a4c4382c763d7 100644 --- a/google/cloud/compute/url_maps/v1/internal/url_maps_tracing_connection.h +++ b/google/cloud/compute/url_maps/v1/internal/url_maps_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_url_maps_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class UrlMapsTracingConnection : public compute_url_maps_v1::UrlMapsConnection { public: ~UrlMapsTracingConnection() override = default; @@ -121,8 +119,6 @@ class UrlMapsTracingConnection : public compute_url_maps_v1::UrlMapsConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/url_maps/v1/url_maps_connection.h b/google/cloud/compute/url_maps/v1/url_maps_connection.h index 49b249a0b4c39..931d51d72d425 100644 --- a/google/cloud/compute/url_maps/v1/url_maps_connection.h +++ b/google/cloud/compute/url_maps/v1/url_maps_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_URL_MAPS_V1_URL_MAPS_CONNECTION_H #include "google/cloud/compute/url_maps/v1/internal/url_maps_retry_traits.h" +#include "google/cloud/compute/url_maps/v1/url_maps.pb.h" #include "google/cloud/compute/url_maps/v1/url_maps_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/url_maps/v1/url_maps_connection_idempotency_policy.h b/google/cloud/compute/url_maps/v1/url_maps_connection_idempotency_policy.h index 18342e33017f6..b22ff0bec4526 100644 --- a/google/cloud/compute/url_maps/v1/url_maps_connection_idempotency_policy.h +++ b/google/cloud/compute/url_maps/v1/url_maps_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_URL_MAPS_V1_URL_MAPS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_URL_MAPS_V1_URL_MAPS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/url_maps/v1/url_maps.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/url_maps/v1/url_maps_proto_export.h b/google/cloud/compute/url_maps/v1/url_maps_proto_export.h index 176268d82c88f..074ac7e920b9c 100644 --- a/google/cloud/compute/url_maps/v1/url_maps_proto_export.h +++ b/google/cloud/compute/url_maps/v1/url_maps_proto_export.h @@ -26,11 +26,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_URL_MAPS_V1_URL_MAPS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_018.pb.h" +#include "google/cloud/compute/v1/internal/common_020.pb.h" +#include "google/cloud/compute/v1/internal/common_029.pb.h" +#include "google/cloud/compute/v1/internal/common_082.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_URL_MAPS_V1_URL_MAPS_PROTO_EXPORT_H diff --git a/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_option_defaults.cc b/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_option_defaults.cc index df43e4e3e79a2..809e5fd4f5c9f 100644 --- a/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_option_defaults.cc +++ b/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_option_defaults.cc @@ -41,7 +41,7 @@ Options VpnGatewaysDefaultOptions(Options options) { if (!options.has()) { options.set( compute_vpn_gateways_v1::VpnGatewaysLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_rest_connection_impl.h b/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_rest_connection_impl.h index bf6ce1ab85e12..6c564608a821e 100644 --- a/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_rest_connection_impl.h +++ b/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_rest_connection_impl.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_VPN_GATEWAYS_V1_INTERNAL_VPN_GATEWAYS_REST_CONNECTION_IMPL_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_VPN_GATEWAYS_V1_INTERNAL_VPN_GATEWAYS_REST_CONNECTION_IMPL_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_rest_stub.h" #include "google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_retry_traits.h" #include "google/cloud/compute/vpn_gateways/v1/vpn_gateways_connection.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_rest_logging_decorator.h b/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_rest_logging_decorator.h index bf2dca5445bf4..3ccfa5e3ffa92 100644 --- a/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_rest_logging_decorator.h +++ b/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_VPN_GATEWAYS_V1_INTERNAL_VPN_GATEWAYS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_VPN_GATEWAYS_V1_INTERNAL_VPN_GATEWAYS_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_rest_stub.h" +#include "google/cloud/compute/vpn_gateways/v1/vpn_gateways.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_rest_metadata_decorator.cc b/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_rest_metadata_decorator.cc index e39c1f7c73041..ba45e04df5659 100644 --- a/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_rest_metadata_decorator.cc +++ b/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/vpn_gateways/v1/vpn_gateways.proto #include "google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_rest_metadata_decorator.h b/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_rest_metadata_decorator.h index f9ba0a6838a8a..c8fbae65e9b6c 100644 --- a/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_rest_metadata_decorator.h +++ b/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_VPN_GATEWAYS_V1_INTERNAL_VPN_GATEWAYS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_VPN_GATEWAYS_V1_INTERNAL_VPN_GATEWAYS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_rest_stub.h" +#include "google/cloud/compute/vpn_gateways/v1/vpn_gateways.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_rest_stub.cc b/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_rest_stub.cc index ea1ead991e1af..9adcb5a9d1dd4 100644 --- a/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_rest_stub.cc +++ b/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/vpn_gateways/v1/vpn_gateways.proto #include "google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_rest_stub.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" +#include "google/cloud/compute/vpn_gateways/v1/vpn_gateways.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_rest_stub.h b/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_rest_stub.h index b5f76079a2939..961bb88a11bd6 100644 --- a/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_rest_stub.h +++ b/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_VPN_GATEWAYS_V1_INTERNAL_VPN_GATEWAYS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_VPN_GATEWAYS_V1_INTERNAL_VPN_GATEWAYS_REST_STUB_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" +#include "google/cloud/compute/vpn_gateways/v1/vpn_gateways.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_tracing_connection.cc b/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_tracing_connection.cc index efea810f31237..4933537e60b8f 100644 --- a/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_tracing_connection.cc +++ b/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_vpn_gateways_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - VpnGatewaysTracingConnection::VpnGatewaysTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -183,16 +181,12 @@ VpnGatewaysTracingConnection::TestIamPermissions( return internal::EndSpan(*span, child_->TestIamPermissions(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeVpnGatewaysTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_tracing_connection.h b/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_tracing_connection.h index 3091e646922e8..df23fbb318111 100644 --- a/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_tracing_connection.h +++ b/google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_vpn_gateways_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class VpnGatewaysTracingConnection : public compute_vpn_gateways_v1::VpnGatewaysConnection { public: @@ -101,8 +99,6 @@ class VpnGatewaysTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/vpn_gateways/v1/vpn_gateways_connection.h b/google/cloud/compute/vpn_gateways/v1/vpn_gateways_connection.h index 20a67db7e0f4d..0e06980fcf430 100644 --- a/google/cloud/compute/vpn_gateways/v1/vpn_gateways_connection.h +++ b/google/cloud/compute/vpn_gateways/v1/vpn_gateways_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_VPN_GATEWAYS_V1_VPN_GATEWAYS_CONNECTION_H #include "google/cloud/compute/vpn_gateways/v1/internal/vpn_gateways_retry_traits.h" +#include "google/cloud/compute/vpn_gateways/v1/vpn_gateways.pb.h" #include "google/cloud/compute/vpn_gateways/v1/vpn_gateways_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/vpn_gateways/v1/vpn_gateways_connection_idempotency_policy.h b/google/cloud/compute/vpn_gateways/v1/vpn_gateways_connection_idempotency_policy.h index 79798c432f4fc..a9b9405463746 100644 --- a/google/cloud/compute/vpn_gateways/v1/vpn_gateways_connection_idempotency_policy.h +++ b/google/cloud/compute/vpn_gateways/v1/vpn_gateways_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_VPN_GATEWAYS_V1_VPN_GATEWAYS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_VPN_GATEWAYS_V1_VPN_GATEWAYS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/vpn_gateways/v1/vpn_gateways.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/vpn_gateways/v1/vpn_gateways_proto_export.h b/google/cloud/compute/vpn_gateways/v1/vpn_gateways_proto_export.h index 6d263eccca367..4511d005df643 100644 --- a/google/cloud/compute/vpn_gateways/v1/vpn_gateways_proto_export.h +++ b/google/cloud/compute/vpn_gateways/v1/vpn_gateways_proto_export.h @@ -26,10 +26,10 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_VPN_GATEWAYS_V1_VPN_GATEWAYS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_107.pb.h" +#include "google/cloud/compute/v1/internal/common_145.pb.h" +#include "google/cloud/compute/v1/internal/common_148.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_VPN_GATEWAYS_V1_VPN_GATEWAYS_PROTO_EXPORT_H diff --git a/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_option_defaults.cc b/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_option_defaults.cc index 5886219d8feee..6bdada5d83172 100644 --- a/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_option_defaults.cc +++ b/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_option_defaults.cc @@ -41,7 +41,7 @@ Options VpnTunnelsDefaultOptions(Options options) { if (!options.has()) { options.set( compute_vpn_tunnels_v1::VpnTunnelsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_rest_connection_impl.h b/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_rest_connection_impl.h index a88211da6df67..f0a101cc83ac2 100644 --- a/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_rest_connection_impl.h +++ b/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_rest_connection_impl.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_VPN_TUNNELS_V1_INTERNAL_VPN_TUNNELS_REST_CONNECTION_IMPL_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_VPN_TUNNELS_V1_INTERNAL_VPN_TUNNELS_REST_CONNECTION_IMPL_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_rest_stub.h" #include "google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_retry_traits.h" #include "google/cloud/compute/vpn_tunnels/v1/vpn_tunnels_connection.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_rest_logging_decorator.h b/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_rest_logging_decorator.h index 94de8dff3ac73..517dd0cb0deec 100644 --- a/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_rest_logging_decorator.h +++ b/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_rest_logging_decorator.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_VPN_TUNNELS_V1_INTERNAL_VPN_TUNNELS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_VPN_TUNNELS_V1_INTERNAL_VPN_TUNNELS_REST_LOGGING_DECORATOR_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_rest_stub.h" +#include "google/cloud/compute/vpn_tunnels/v1/vpn_tunnels.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include #include #include #include diff --git a/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_rest_metadata_decorator.cc b/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_rest_metadata_decorator.cc index f0fd13e2a7720..d7194deaa261c 100644 --- a/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_rest_metadata_decorator.cc +++ b/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/vpn_tunnels/v1/vpn_tunnels.proto #include "google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_rest_metadata_decorator.h b/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_rest_metadata_decorator.h index 66f310c5eaaf9..96c8394dbe23f 100644 --- a/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_rest_metadata_decorator.h +++ b/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_rest_metadata_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_VPN_TUNNELS_V1_INTERNAL_VPN_TUNNELS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_VPN_TUNNELS_V1_INTERNAL_VPN_TUNNELS_REST_METADATA_DECORATOR_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" #include "google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_rest_stub.h" +#include "google/cloud/compute/vpn_tunnels/v1/vpn_tunnels.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include #include #include diff --git a/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_rest_stub.cc b/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_rest_stub.cc index 1b88c250ed773..1c0792a32499e 100644 --- a/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_rest_stub.cc +++ b/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_rest_stub.cc @@ -17,12 +17,12 @@ // source: google/cloud/compute/vpn_tunnels/v1/vpn_tunnels.proto #include "google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_rest_stub.h" +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" +#include "google/cloud/compute/vpn_tunnels/v1/vpn_tunnels.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_rest_stub.h b/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_rest_stub.h index 0cd3f46fd6d22..0c0a379bd8033 100644 --- a/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_rest_stub.h +++ b/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_rest_stub.h @@ -19,13 +19,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_VPN_TUNNELS_V1_INTERNAL_VPN_TUNNELS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_VPN_TUNNELS_V1_INTERNAL_VPN_TUNNELS_REST_STUB_H +#include "google/cloud/compute/region_operations/v1/region_operations.pb.h" +#include "google/cloud/compute/vpn_tunnels/v1/vpn_tunnels.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_tracing_connection.cc b/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_tracing_connection.cc index 705de28107c23..d4fce79e45a66 100644 --- a/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_tracing_connection.cc +++ b/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_vpn_tunnels_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - VpnTunnelsTracingConnection::VpnTunnelsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -162,16 +160,12 @@ VpnTunnelsTracingConnection::SetLabels( return internal::EndSpan(std::move(span), child_->SetLabels(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeVpnTunnelsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_tracing_connection.h b/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_tracing_connection.h index 8ebf213bf5267..a3458246108cf 100644 --- a/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_tracing_connection.h +++ b/google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_vpn_tunnels_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class VpnTunnelsTracingConnection : public compute_vpn_tunnels_v1::VpnTunnelsConnection { public: @@ -92,8 +90,6 @@ class VpnTunnelsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/vpn_tunnels/v1/vpn_tunnels_connection.h b/google/cloud/compute/vpn_tunnels/v1/vpn_tunnels_connection.h index 99b2340e052df..b07b7b38c371d 100644 --- a/google/cloud/compute/vpn_tunnels/v1/vpn_tunnels_connection.h +++ b/google/cloud/compute/vpn_tunnels/v1/vpn_tunnels_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_VPN_TUNNELS_V1_VPN_TUNNELS_CONNECTION_H #include "google/cloud/compute/vpn_tunnels/v1/internal/vpn_tunnels_retry_traits.h" +#include "google/cloud/compute/vpn_tunnels/v1/vpn_tunnels.pb.h" #include "google/cloud/compute/vpn_tunnels/v1/vpn_tunnels_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,7 +31,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/vpn_tunnels/v1/vpn_tunnels_connection_idempotency_policy.h b/google/cloud/compute/vpn_tunnels/v1/vpn_tunnels_connection_idempotency_policy.h index 5bf3eca60b723..5921d87a9869b 100644 --- a/google/cloud/compute/vpn_tunnels/v1/vpn_tunnels_connection_idempotency_policy.h +++ b/google/cloud/compute/vpn_tunnels/v1/vpn_tunnels_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_VPN_TUNNELS_V1_VPN_TUNNELS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_VPN_TUNNELS_V1_VPN_TUNNELS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/vpn_tunnels/v1/vpn_tunnels.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/vpn_tunnels/v1/vpn_tunnels_proto_export.h b/google/cloud/compute/vpn_tunnels/v1/vpn_tunnels_proto_export.h index e7773e8debe51..d551a462fbb5f 100644 --- a/google/cloud/compute/vpn_tunnels/v1/vpn_tunnels_proto_export.h +++ b/google/cloud/compute/vpn_tunnels/v1/vpn_tunnels_proto_export.h @@ -26,9 +26,9 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_VPN_TUNNELS_V1_VPN_TUNNELS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_107.pb.h" +#include "google/cloud/compute/v1/internal/common_149.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_VPN_TUNNELS_V1_VPN_TUNNELS_PROTO_EXPORT_H diff --git a/google/cloud/compute/zone_operations/v1/internal/zone_operations_option_defaults.cc b/google/cloud/compute/zone_operations/v1/internal/zone_operations_option_defaults.cc index f87152e301873..2446dd73cce02 100644 --- a/google/cloud/compute/zone_operations/v1/internal/zone_operations_option_defaults.cc +++ b/google/cloud/compute/zone_operations/v1/internal/zone_operations_option_defaults.cc @@ -42,7 +42,7 @@ Options ZoneOperationsDefaultOptions(Options options) { compute_zone_operations_v1::ZoneOperationsRetryPolicyOption>()) { options.set( compute_zone_operations_v1::ZoneOperationsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/compute/zone_operations/v1/internal/zone_operations_rest_logging_decorator.h b/google/cloud/compute/zone_operations/v1/internal/zone_operations_rest_logging_decorator.h index b7b1201ce9743..8ed9f3fd2c05f 100644 --- a/google/cloud/compute/zone_operations/v1/internal/zone_operations_rest_logging_decorator.h +++ b/google/cloud/compute/zone_operations/v1/internal/zone_operations_rest_logging_decorator.h @@ -20,11 +20,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ZONE_OPERATIONS_V1_INTERNAL_ZONE_OPERATIONS_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/zone_operations/v1/internal/zone_operations_rest_stub.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include #include #include #include diff --git a/google/cloud/compute/zone_operations/v1/internal/zone_operations_rest_metadata_decorator.cc b/google/cloud/compute/zone_operations/v1/internal/zone_operations_rest_metadata_decorator.cc index b1643744b57e1..01d63f21c3abb 100644 --- a/google/cloud/compute/zone_operations/v1/internal/zone_operations_rest_metadata_decorator.cc +++ b/google/cloud/compute/zone_operations/v1/internal/zone_operations_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/zone_operations/v1/zone_operations.proto #include "google/cloud/compute/zone_operations/v1/internal/zone_operations_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/zone_operations/v1/internal/zone_operations_rest_metadata_decorator.h b/google/cloud/compute/zone_operations/v1/internal/zone_operations_rest_metadata_decorator.h index cc6075b63b229..e92f05f9f4240 100644 --- a/google/cloud/compute/zone_operations/v1/internal/zone_operations_rest_metadata_decorator.h +++ b/google/cloud/compute/zone_operations/v1/internal/zone_operations_rest_metadata_decorator.h @@ -20,10 +20,10 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ZONE_OPERATIONS_V1_INTERNAL_ZONE_OPERATIONS_REST_METADATA_DECORATOR_H #include "google/cloud/compute/zone_operations/v1/internal/zone_operations_rest_stub.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/compute/zone_operations/v1/internal/zone_operations_rest_stub.cc b/google/cloud/compute/zone_operations/v1/internal/zone_operations_rest_stub.cc index b8598bda34eb2..f672e5261bf4b 100644 --- a/google/cloud/compute/zone_operations/v1/internal/zone_operations_rest_stub.cc +++ b/google/cloud/compute/zone_operations/v1/internal/zone_operations_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/compute/zone_operations/v1/zone_operations.proto #include "google/cloud/compute/zone_operations/v1/internal/zone_operations_rest_stub.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/zone_operations/v1/internal/zone_operations_rest_stub.h b/google/cloud/compute/zone_operations/v1/internal/zone_operations_rest_stub.h index eb1531554b7ee..98b8359951da9 100644 --- a/google/cloud/compute/zone_operations/v1/internal/zone_operations_rest_stub.h +++ b/google/cloud/compute/zone_operations/v1/internal/zone_operations_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ZONE_OPERATIONS_V1_INTERNAL_ZONE_OPERATIONS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ZONE_OPERATIONS_V1_INTERNAL_ZONE_OPERATIONS_REST_STUB_H +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/zone_operations/v1/internal/zone_operations_tracing_connection.cc b/google/cloud/compute/zone_operations/v1/internal/zone_operations_tracing_connection.cc index 38811303c68b0..5c9deadbd7833 100644 --- a/google/cloud/compute/zone_operations/v1/internal/zone_operations_tracing_connection.cc +++ b/google/cloud/compute/zone_operations/v1/internal/zone_operations_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_zone_operations_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ZoneOperationsTracingConnection::ZoneOperationsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -76,17 +74,13 @@ ZoneOperationsTracingConnection::Wait( return internal::EndSpan(*span, child_->Wait(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeZoneOperationsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/zone_operations/v1/internal/zone_operations_tracing_connection.h b/google/cloud/compute/zone_operations/v1/internal/zone_operations_tracing_connection.h index a4795a24ca225..fa16aa5f1c01c 100644 --- a/google/cloud/compute/zone_operations/v1/internal/zone_operations_tracing_connection.h +++ b/google/cloud/compute/zone_operations/v1/internal/zone_operations_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_zone_operations_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ZoneOperationsTracingConnection : public compute_zone_operations_v1::ZoneOperationsConnection { public: @@ -60,8 +58,6 @@ class ZoneOperationsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/zone_operations/v1/zone_operations_connection.h b/google/cloud/compute/zone_operations/v1/zone_operations_connection.h index d4e8903e632f6..f8fb4f8f6ac4e 100644 --- a/google/cloud/compute/zone_operations/v1/zone_operations_connection.h +++ b/google/cloud/compute/zone_operations/v1/zone_operations_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ZONE_OPERATIONS_V1_ZONE_OPERATIONS_CONNECTION_H #include "google/cloud/compute/zone_operations/v1/internal/zone_operations_retry_traits.h" +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/compute/zone_operations/v1/zone_operations_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/zone_operations/v1/zone_operations_connection_idempotency_policy.h b/google/cloud/compute/zone_operations/v1/zone_operations_connection_idempotency_policy.h index 17a2c484f4e35..cf63aba8cbf61 100644 --- a/google/cloud/compute/zone_operations/v1/zone_operations_connection_idempotency_policy.h +++ b/google/cloud/compute/zone_operations/v1/zone_operations_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ZONE_OPERATIONS_V1_ZONE_OPERATIONS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ZONE_OPERATIONS_V1_ZONE_OPERATIONS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/zone_operations/v1/zone_operations.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/zone_operations/v1/zone_operations_proto_export.h b/google/cloud/compute/zone_operations/v1/zone_operations_proto_export.h index da248b1100fe4..f5d9d5a810e1e 100644 --- a/google/cloud/compute/zone_operations/v1/zone_operations_proto_export.h +++ b/google/cloud/compute/zone_operations/v1/zone_operations_proto_export.h @@ -26,8 +26,8 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ZONE_OPERATIONS_V1_ZONE_OPERATIONS_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include +#include "google/cloud/compute/v1/internal/common_016.pb.h" +#include "google/cloud/compute/v1/internal/common_092.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ZONE_OPERATIONS_V1_ZONE_OPERATIONS_PROTO_EXPORT_H diff --git a/google/cloud/compute/zones/v1/internal/zones_option_defaults.cc b/google/cloud/compute/zones/v1/internal/zones_option_defaults.cc index 6d35c5c951536..54dbaa133a9fa 100644 --- a/google/cloud/compute/zones/v1/internal/zones_option_defaults.cc +++ b/google/cloud/compute/zones/v1/internal/zones_option_defaults.cc @@ -40,7 +40,7 @@ Options ZonesDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - compute_zones_v1::ZonesLimitedTimeRetryPolicy(std::chrono::minutes(30)) + compute_zones_v1::ZonesLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/compute/zones/v1/internal/zones_rest_logging_decorator.h b/google/cloud/compute/zones/v1/internal/zones_rest_logging_decorator.h index ade0bbe161b82..3abbe0f97d2ef 100644 --- a/google/cloud/compute/zones/v1/internal/zones_rest_logging_decorator.h +++ b/google/cloud/compute/zones/v1/internal/zones_rest_logging_decorator.h @@ -20,11 +20,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ZONES_V1_INTERNAL_ZONES_REST_LOGGING_DECORATOR_H #include "google/cloud/compute/zones/v1/internal/zones_rest_stub.h" +#include "google/cloud/compute/zones/v1/zones.pb.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include #include #include #include diff --git a/google/cloud/compute/zones/v1/internal/zones_rest_metadata_decorator.cc b/google/cloud/compute/zones/v1/internal/zones_rest_metadata_decorator.cc index bcad8bbc8d939..70fbe6f488369 100644 --- a/google/cloud/compute/zones/v1/internal/zones_rest_metadata_decorator.cc +++ b/google/cloud/compute/zones/v1/internal/zones_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/compute/zones/v1/zones.proto #include "google/cloud/compute/zones/v1/internal/zones_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/compute/zones/v1/internal/zones_rest_metadata_decorator.h b/google/cloud/compute/zones/v1/internal/zones_rest_metadata_decorator.h index d3786c361782d..0a8ad4bf1c067 100644 --- a/google/cloud/compute/zones/v1/internal/zones_rest_metadata_decorator.h +++ b/google/cloud/compute/zones/v1/internal/zones_rest_metadata_decorator.h @@ -20,10 +20,10 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ZONES_V1_INTERNAL_ZONES_REST_METADATA_DECORATOR_H #include "google/cloud/compute/zones/v1/internal/zones_rest_stub.h" +#include "google/cloud/compute/zones/v1/zones.pb.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/compute/zones/v1/internal/zones_rest_stub.cc b/google/cloud/compute/zones/v1/internal/zones_rest_stub.cc index ec35fce04a606..ea644b20dd516 100644 --- a/google/cloud/compute/zones/v1/internal/zones_rest_stub.cc +++ b/google/cloud/compute/zones/v1/internal/zones_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/compute/zones/v1/zones.proto #include "google/cloud/compute/zones/v1/internal/zones_rest_stub.h" +#include "google/cloud/compute/zones/v1/zones.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/compute/zones/v1/internal/zones_rest_stub.h b/google/cloud/compute/zones/v1/internal/zones_rest_stub.h index 30d33cfc52a98..86c7bb5545414 100644 --- a/google/cloud/compute/zones/v1/internal/zones_rest_stub.h +++ b/google/cloud/compute/zones/v1/internal/zones_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ZONES_V1_INTERNAL_ZONES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ZONES_V1_INTERNAL_ZONES_REST_STUB_H +#include "google/cloud/compute/zones/v1/zones.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/zones/v1/internal/zones_tracing_connection.cc b/google/cloud/compute/zones/v1/internal/zones_tracing_connection.cc index 4b6cfa2f18095..53f12ce3d31aa 100644 --- a/google/cloud/compute/zones/v1/internal/zones_tracing_connection.cc +++ b/google/cloud/compute/zones/v1/internal/zones_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace compute_zones_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ZonesTracingConnection::ZonesTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -51,15 +49,11 @@ ZonesTracingConnection::ListZones( std::move(span), std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeZonesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/compute/zones/v1/internal/zones_tracing_connection.h b/google/cloud/compute/zones/v1/internal/zones_tracing_connection.h index 7057f347987fe..7677441534d0d 100644 --- a/google/cloud/compute/zones/v1/internal/zones_tracing_connection.h +++ b/google/cloud/compute/zones/v1/internal/zones_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace compute_zones_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ZonesTracingConnection : public compute_zones_v1::ZonesConnection { public: ~ZonesTracingConnection() override = default; @@ -51,8 +49,6 @@ class ZonesTracingConnection : public compute_zones_v1::ZonesConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/compute/zones/v1/zones_connection.h b/google/cloud/compute/zones/v1/zones_connection.h index 326f8bfee0292..5a999723a6eab 100644 --- a/google/cloud/compute/zones/v1/zones_connection.h +++ b/google/cloud/compute/zones/v1/zones_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ZONES_V1_ZONES_CONNECTION_H #include "google/cloud/compute/zones/v1/internal/zones_retry_traits.h" +#include "google/cloud/compute/zones/v1/zones.pb.h" #include "google/cloud/compute/zones/v1/zones_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/zones/v1/zones_connection_idempotency_policy.h b/google/cloud/compute/zones/v1/zones_connection_idempotency_policy.h index c8ac6e8ac446f..bcc7d5cccc30b 100644 --- a/google/cloud/compute/zones/v1/zones_connection_idempotency_policy.h +++ b/google/cloud/compute/zones/v1/zones_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ZONES_V1_ZONES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ZONES_V1_ZONES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/compute/zones/v1/zones.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/compute/zones/v1/zones_proto_export.h b/google/cloud/compute/zones/v1/zones_proto_export.h index 85ba6f8146ff8..be0f981cd6a7b 100644 --- a/google/cloud/compute/zones/v1/zones_proto_export.h +++ b/google/cloud/compute/zones/v1/zones_proto_export.h @@ -26,8 +26,8 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ZONES_V1_ZONES_PROTO_EXPORT_H // IWYU pragma: begin_exports -#include -#include +#include "google/cloud/compute/v1/internal/common_023.pb.h" +#include "google/cloud/compute/v1/internal/common_150.pb.h" // IWYU pragma: end_exports #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_COMPUTE_ZONES_V1_ZONES_PROTO_EXPORT_H diff --git a/google/cloud/confidentialcomputing/BUILD.bazel b/google/cloud/confidentialcomputing/BUILD.bazel index 472ceffc849d7..e02a81d44a4a7 100644 --- a/google/cloud/confidentialcomputing/BUILD.bazel +++ b/google/cloud/confidentialcomputing/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/confidentialcomputing/v1:confidentialcomputing_cc_grpc", + "@googleapis//google/cloud/confidentialcomputing/v1:confidentialcomputing_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/confidentialcomputing/quickstart/.bazelrc b/google/cloud/confidentialcomputing/quickstart/.bazelrc index 6777c6b4c95de..ec27511a60add 100644 --- a/google/cloud/confidentialcomputing/quickstart/.bazelrc +++ b/google/cloud/confidentialcomputing/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/confidentialcomputing/quickstart/CMakeLists.txt b/google/cloud/confidentialcomputing/quickstart/CMakeLists.txt index 088a297eaab87..b578e116060b2 100644 --- a/google/cloud/confidentialcomputing/quickstart/CMakeLists.txt +++ b/google/cloud/confidentialcomputing/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Confidential Computing API C++ client library # from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-confidentialcomputing-quickstart CXX) find_package(google_cloud_cpp_confidentialcomputing REQUIRED) diff --git a/google/cloud/confidentialcomputing/v1/confidential_computing_connection.h b/google/cloud/confidentialcomputing/v1/confidential_computing_connection.h index 8fd5df94cb5d6..d5fd77ad8ee68 100644 --- a/google/cloud/confidentialcomputing/v1/confidential_computing_connection.h +++ b/google/cloud/confidentialcomputing/v1/confidential_computing_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/confidentialcomputing/v1/confidential_computing_connection_idempotency_policy.h" #include "google/cloud/confidentialcomputing/v1/internal/confidential_computing_retry_traits.h" +#include "google/cloud/confidentialcomputing/v1/service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/confidentialcomputing/v1/confidential_computing_connection_idempotency_policy.h b/google/cloud/confidentialcomputing/v1/confidential_computing_connection_idempotency_policy.h index 17cb6121d061f..9794b2586f4ec 100644 --- a/google/cloud/confidentialcomputing/v1/confidential_computing_connection_idempotency_policy.h +++ b/google/cloud/confidentialcomputing/v1/confidential_computing_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIDENTIALCOMPUTING_V1_CONFIDENTIAL_COMPUTING_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIDENTIALCOMPUTING_V1_CONFIDENTIAL_COMPUTING_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/confidentialcomputing/v1/service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/confidentialcomputing/v1/internal/confidential_computing_auth_decorator.cc b/google/cloud/confidentialcomputing/v1/internal/confidential_computing_auth_decorator.cc index bf79dc0072be2..d36df1c7e0c5d 100644 --- a/google/cloud/confidentialcomputing/v1/internal/confidential_computing_auth_decorator.cc +++ b/google/cloud/confidentialcomputing/v1/internal/confidential_computing_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/confidentialcomputing/v1/service.proto #include "google/cloud/confidentialcomputing/v1/internal/confidential_computing_auth_decorator.h" -#include +#include "google/cloud/confidentialcomputing/v1/service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace confidentialcomputing_v1_internal { @@ -95,3 +98,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace confidentialcomputing_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/confidentialcomputing/v1/internal/confidential_computing_auth_decorator.h b/google/cloud/confidentialcomputing/v1/internal/confidential_computing_auth_decorator.h index e93814869588b..17f915ea8609b 100644 --- a/google/cloud/confidentialcomputing/v1/internal/confidential_computing_auth_decorator.h +++ b/google/cloud/confidentialcomputing/v1/internal/confidential_computing_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace confidentialcomputing_v1_internal { @@ -81,4 +84,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIDENTIALCOMPUTING_V1_INTERNAL_CONFIDENTIAL_COMPUTING_AUTH_DECORATOR_H diff --git a/google/cloud/confidentialcomputing/v1/internal/confidential_computing_logging_decorator.cc b/google/cloud/confidentialcomputing/v1/internal/confidential_computing_logging_decorator.cc index 2a4e0204765fd..266b2bc5b3d37 100644 --- a/google/cloud/confidentialcomputing/v1/internal/confidential_computing_logging_decorator.cc +++ b/google/cloud/confidentialcomputing/v1/internal/confidential_computing_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/confidentialcomputing/v1/service.proto #include "google/cloud/confidentialcomputing/v1/internal/confidential_computing_logging_decorator.h" +#include "google/cloud/confidentialcomputing/v1/service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace confidentialcomputing_v1_internal { @@ -121,3 +124,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace confidentialcomputing_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/confidentialcomputing/v1/internal/confidential_computing_logging_decorator.h b/google/cloud/confidentialcomputing/v1/internal/confidential_computing_logging_decorator.h index 0814ea58d7c16..b1c63df1b8ae4 100644 --- a/google/cloud/confidentialcomputing/v1/internal/confidential_computing_logging_decorator.h +++ b/google/cloud/confidentialcomputing/v1/internal/confidential_computing_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace confidentialcomputing_v1_internal { @@ -81,4 +84,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIDENTIALCOMPUTING_V1_INTERNAL_CONFIDENTIAL_COMPUTING_LOGGING_DECORATOR_H diff --git a/google/cloud/confidentialcomputing/v1/internal/confidential_computing_metadata_decorator.cc b/google/cloud/confidentialcomputing/v1/internal/confidential_computing_metadata_decorator.cc index 9112e6878a103..070873380c5c2 100644 --- a/google/cloud/confidentialcomputing/v1/internal/confidential_computing_metadata_decorator.cc +++ b/google/cloud/confidentialcomputing/v1/internal/confidential_computing_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/confidentialcomputing/v1/service.proto #include "google/cloud/confidentialcomputing/v1/internal/confidential_computing_metadata_decorator.h" +#include "google/cloud/confidentialcomputing/v1/service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace confidentialcomputing_v1_internal { @@ -124,3 +128,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace confidentialcomputing_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/confidentialcomputing/v1/internal/confidential_computing_metadata_decorator.h b/google/cloud/confidentialcomputing/v1/internal/confidential_computing_metadata_decorator.h index 2f10d4f39ef02..bce36387b6e53 100644 --- a/google/cloud/confidentialcomputing/v1/internal/confidential_computing_metadata_decorator.h +++ b/google/cloud/confidentialcomputing/v1/internal/confidential_computing_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace confidentialcomputing_v1_internal { @@ -87,4 +90,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIDENTIALCOMPUTING_V1_INTERNAL_CONFIDENTIAL_COMPUTING_METADATA_DECORATOR_H diff --git a/google/cloud/confidentialcomputing/v1/internal/confidential_computing_option_defaults.cc b/google/cloud/confidentialcomputing/v1/internal/confidential_computing_option_defaults.cc index 8933b073831e9..45952740d3172 100644 --- a/google/cloud/confidentialcomputing/v1/internal/confidential_computing_option_defaults.cc +++ b/google/cloud/confidentialcomputing/v1/internal/confidential_computing_option_defaults.cc @@ -44,7 +44,7 @@ Options ConfidentialComputingDefaultOptions(Options options) { options.set< confidentialcomputing_v1::ConfidentialComputingRetryPolicyOption>( confidentialcomputing_v1::ConfidentialComputingLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace confidentialcomputing_v1_internal { @@ -115,3 +118,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace confidentialcomputing_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/confidentialcomputing/v1/internal/confidential_computing_stub.h b/google/cloud/confidentialcomputing/v1/internal/confidential_computing_stub.h index 7dc8bfeb6380d..cdf88f6bac7f2 100644 --- a/google/cloud/confidentialcomputing/v1/internal/confidential_computing_stub.h +++ b/google/cloud/confidentialcomputing/v1/internal/confidential_computing_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIDENTIALCOMPUTING_V1_INTERNAL_CONFIDENTIAL_COMPUTING_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIDENTIALCOMPUTING_V1_INTERNAL_CONFIDENTIAL_COMPUTING_STUB_H +#include "google/cloud/confidentialcomputing/v1/service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace confidentialcomputing_v1_internal { @@ -129,4 +132,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIDENTIALCOMPUTING_V1_INTERNAL_CONFIDENTIAL_COMPUTING_STUB_H diff --git a/google/cloud/confidentialcomputing/v1/internal/confidential_computing_stub_factory.cc b/google/cloud/confidentialcomputing/v1/internal/confidential_computing_stub_factory.cc index 7103c3697ec62..a20090e32a038 100644 --- a/google/cloud/confidentialcomputing/v1/internal/confidential_computing_stub_factory.cc +++ b/google/cloud/confidentialcomputing/v1/internal/confidential_computing_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/confidentialcomputing/v1/internal/confidential_computing_metadata_decorator.h" #include "google/cloud/confidentialcomputing/v1/internal/confidential_computing_stub.h" #include "google/cloud/confidentialcomputing/v1/internal/confidential_computing_tracing_stub.h" +#include "google/cloud/confidentialcomputing/v1/service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace confidentialcomputing_v1_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace confidentialcomputing_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/confidentialcomputing/v1/internal/confidential_computing_stub_factory.h b/google/cloud/confidentialcomputing/v1/internal/confidential_computing_stub_factory.h index 5952d897ad289..3ef20587315dc 100644 --- a/google/cloud/confidentialcomputing/v1/internal/confidential_computing_stub_factory.h +++ b/google/cloud/confidentialcomputing/v1/internal/confidential_computing_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace confidentialcomputing_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIDENTIALCOMPUTING_V1_INTERNAL_CONFIDENTIAL_COMPUTING_STUB_FACTORY_H diff --git a/google/cloud/confidentialcomputing/v1/internal/confidential_computing_tracing_connection.cc b/google/cloud/confidentialcomputing/v1/internal/confidential_computing_tracing_connection.cc index 96c7ec4bafb85..4389d1f4ccff4 100644 --- a/google/cloud/confidentialcomputing/v1/internal/confidential_computing_tracing_connection.cc +++ b/google/cloud/confidentialcomputing/v1/internal/confidential_computing_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace confidentialcomputing_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ConfidentialComputingTracingConnection::ConfidentialComputingTracingConnection( std::shared_ptr child) @@ -101,18 +99,14 @@ ConfidentialComputingTracingConnection::GetLocation( return internal::EndSpan(*span, child_->GetLocation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeConfidentialComputingTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/confidentialcomputing/v1/internal/confidential_computing_tracing_connection.h b/google/cloud/confidentialcomputing/v1/internal/confidential_computing_tracing_connection.h index 273159a152136..c70e74c69ff82 100644 --- a/google/cloud/confidentialcomputing/v1/internal/confidential_computing_tracing_connection.h +++ b/google/cloud/confidentialcomputing/v1/internal/confidential_computing_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace confidentialcomputing_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ConfidentialComputingTracingConnection : public confidentialcomputing_v1::ConfidentialComputingConnection { public: @@ -73,8 +71,6 @@ class ConfidentialComputingTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/confidentialcomputing/v1/internal/confidential_computing_tracing_stub.cc b/google/cloud/confidentialcomputing/v1/internal/confidential_computing_tracing_stub.cc index bfdb263a5aec3..a817eadf5184d 100644 --- a/google/cloud/confidentialcomputing/v1/internal/confidential_computing_tracing_stub.cc +++ b/google/cloud/confidentialcomputing/v1/internal/confidential_computing_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace confidentialcomputing_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ConfidentialComputingTracingStub::ConfidentialComputingTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -117,18 +118,14 @@ ConfidentialComputingTracingStub::GetLocation( child_->GetLocation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeConfidentialComputingTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace confidentialcomputing_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/confidentialcomputing/v1/internal/confidential_computing_tracing_stub.h b/google/cloud/confidentialcomputing/v1/internal/confidential_computing_tracing_stub.h index 15eb0228d957c..d43fdcf22507d 100644 --- a/google/cloud/confidentialcomputing/v1/internal/confidential_computing_tracing_stub.h +++ b/google/cloud/confidentialcomputing/v1/internal/confidential_computing_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace confidentialcomputing_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ConfidentialComputingTracingStub : public ConfidentialComputingStub { public: ~ConfidentialComputingTracingStub() override = default; @@ -78,8 +79,6 @@ class ConfidentialComputingTracingStub : public ConfidentialComputingStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -94,4 +93,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIDENTIALCOMPUTING_V1_INTERNAL_CONFIDENTIAL_COMPUTING_TRACING_STUB_H diff --git a/google/cloud/grpc_utils/config.cmake.in b/google/cloud/config-grpc-utils.cmake.in similarity index 96% rename from google/cloud/grpc_utils/config.cmake.in rename to google/cloud/config-grpc-utils.cmake.in index 64287e9bf6675..adad7bb9ba946 100644 --- a/google/cloud/grpc_utils/config.cmake.in +++ b/google/cloud/config-grpc-utils.cmake.in @@ -1,4 +1,4 @@ -# Copyright 2019 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/google/cloud/config/BUILD.bazel b/google/cloud/config/BUILD.bazel index b9fc4817edc99..de37451c99310 100644 --- a/google/cloud/config/BUILD.bazel +++ b/google/cloud/config/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/config/v1:config_cc_grpc", + "@googleapis//google/cloud/config/v1:config_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/config/quickstart/.bazelrc b/google/cloud/config/quickstart/.bazelrc index 6777c6b4c95de..ec27511a60add 100644 --- a/google/cloud/config/quickstart/.bazelrc +++ b/google/cloud/config/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/config/quickstart/CMakeLists.txt b/google/cloud/config/quickstart/CMakeLists.txt index d856820e8985c..e4f9c67a9f23e 100644 --- a/google/cloud/config/quickstart/CMakeLists.txt +++ b/google/cloud/config/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Infrastructure Manager API C++ client library # from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-config-quickstart CXX) find_package(google_cloud_cpp_config REQUIRED) diff --git a/google/cloud/config/v1/config_client.h b/google/cloud/config/v1/config_client.h index 3e0a7a5cf30f5..251471c9d923e 100644 --- a/google/cloud/config/v1/config_client.h +++ b/google/cloud/config/v1/config_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/config/v1/config_connection.h b/google/cloud/config/v1/config_connection.h index 4b77a259197c5..7479af60a5816 100644 --- a/google/cloud/config/v1/config_connection.h +++ b/google/cloud/config/v1/config_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIG_V1_CONFIG_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIG_V1_CONFIG_CONNECTION_H +#include "google/cloud/config/v1/config.pb.h" #include "google/cloud/config/v1/config_connection_idempotency_policy.h" #include "google/cloud/config/v1/internal/config_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/config/v1/config_connection_idempotency_policy.h b/google/cloud/config/v1/config_connection_idempotency_policy.h index 8fa52bc5b5c0e..513820fdfb5a0 100644 --- a/google/cloud/config/v1/config_connection_idempotency_policy.h +++ b/google/cloud/config/v1/config_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIG_V1_CONFIG_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIG_V1_CONFIG_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/config/v1/config.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/config/v1/internal/config_auth_decorator.cc b/google/cloud/config/v1/internal/config_auth_decorator.cc index d9f4112ae415d..3b91fb0b60e3c 100644 --- a/google/cloud/config/v1/internal/config_auth_decorator.cc +++ b/google/cloud/config/v1/internal/config_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/config/v1/config.proto #include "google/cloud/config/v1/internal/config_auth_decorator.h" -#include +#include "google/cloud/config/v1/config.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace config_v1_internal { @@ -551,3 +554,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace config_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/config/v1/internal/config_auth_decorator.h b/google/cloud/config/v1/internal/config_auth_decorator.h index c991dc79efe76..1717e96e38af3 100644 --- a/google/cloud/config/v1/internal/config_auth_decorator.h +++ b/google/cloud/config/v1/internal/config_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/config/v1/internal/config_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace config_v1_internal { @@ -289,4 +292,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIG_V1_INTERNAL_CONFIG_AUTH_DECORATOR_H diff --git a/google/cloud/config/v1/internal/config_connection_impl.h b/google/cloud/config/v1/internal/config_connection_impl.h index 9f8aa32911545..96576e74d46df 100644 --- a/google/cloud/config/v1/internal/config_connection_impl.h +++ b/google/cloud/config/v1/internal/config_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/config/v1/internal/config_logging_decorator.cc b/google/cloud/config/v1/internal/config_logging_decorator.cc index b245d96dc21ea..25822666baf9c 100644 --- a/google/cloud/config/v1/internal/config_logging_decorator.cc +++ b/google/cloud/config/v1/internal/config_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/config/v1/config.proto #include "google/cloud/config/v1/internal/config_logging_decorator.h" +#include "google/cloud/config/v1/config.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace config_v1_internal { @@ -677,3 +680,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace config_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/config/v1/internal/config_logging_decorator.h b/google/cloud/config/v1/internal/config_logging_decorator.h index 79d738de2bb54..4f65bb06510ee 100644 --- a/google/cloud/config/v1/internal/config_logging_decorator.h +++ b/google/cloud/config/v1/internal/config_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/config/v1/internal/config_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace config_v1_internal { @@ -289,4 +292,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIG_V1_INTERNAL_CONFIG_LOGGING_DECORATOR_H diff --git a/google/cloud/config/v1/internal/config_metadata_decorator.cc b/google/cloud/config/v1/internal/config_metadata_decorator.cc index 64637d320119b..3ca7329946af9 100644 --- a/google/cloud/config/v1/internal/config_metadata_decorator.cc +++ b/google/cloud/config/v1/internal/config_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/config/v1/config.proto #include "google/cloud/config/v1/internal/config_metadata_decorator.h" +#include "google/cloud/config/v1/config.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace config_v1_internal { @@ -514,3 +518,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace config_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/config/v1/internal/config_metadata_decorator.h b/google/cloud/config/v1/internal/config_metadata_decorator.h index 6b9693855d80f..ef49c990d5278 100644 --- a/google/cloud/config/v1/internal/config_metadata_decorator.h +++ b/google/cloud/config/v1/internal/config_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/config/v1/internal/config_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace config_v1_internal { @@ -294,4 +297,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIG_V1_INTERNAL_CONFIG_METADATA_DECORATOR_H diff --git a/google/cloud/config/v1/internal/config_option_defaults.cc b/google/cloud/config/v1/internal/config_option_defaults.cc index 1d24c64d486ed..50c67a578d823 100644 --- a/google/cloud/config/v1/internal/config_option_defaults.cc +++ b/google/cloud/config/v1/internal/config_option_defaults.cc @@ -40,7 +40,7 @@ Options ConfigDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - config_v1::ConfigLimitedTimeRetryPolicy(std::chrono::minutes(30)) + config_v1::ConfigLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/config/v1/internal/config_stub.cc b/google/cloud/config/v1/internal/config_stub.cc index 87dff5ee2ec89..9fc2f12c8358a 100644 --- a/google/cloud/config/v1/internal/config_stub.cc +++ b/google/cloud/config/v1/internal/config_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/config/v1/config.proto #include "google/cloud/config/v1/internal/config_stub.h" +#include "google/cloud/config/v1/config.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace config_v1_internal { @@ -665,3 +668,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace config_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/config/v1/internal/config_stub.h b/google/cloud/config/v1/internal/config_stub.h index f0d94b765cf19..bde086b09ff21 100644 --- a/google/cloud/config/v1/internal/config_stub.h +++ b/google/cloud/config/v1/internal/config_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIG_V1_INTERNAL_CONFIG_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIG_V1_INTERNAL_CONFIG_STUB_H +#include "google/cloud/config/v1/config.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace config_v1_internal { @@ -547,4 +550,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIG_V1_INTERNAL_CONFIG_STUB_H diff --git a/google/cloud/config/v1/internal/config_stub_factory.cc b/google/cloud/config/v1/internal/config_stub_factory.cc index e24c8dfd41525..da89927c543e1 100644 --- a/google/cloud/config/v1/internal/config_stub_factory.cc +++ b/google/cloud/config/v1/internal/config_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/config/v1/config.proto #include "google/cloud/config/v1/internal/config_stub_factory.h" +#include "google/cloud/config/v1/config.grpc.pb.h" #include "google/cloud/config/v1/internal/config_auth_decorator.h" #include "google/cloud/config/v1/internal/config_logging_decorator.h" #include "google/cloud/config/v1/internal/config_metadata_decorator.h" #include "google/cloud/config/v1/internal/config_stub.h" #include "google/cloud/config/v1/internal/config_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace config_v1_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace config_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/config/v1/internal/config_stub_factory.h b/google/cloud/config/v1/internal/config_stub_factory.h index 0751410ae9b02..d33375028483a 100644 --- a/google/cloud/config/v1/internal/config_stub_factory.h +++ b/google/cloud/config/v1/internal/config_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace config_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIG_V1_INTERNAL_CONFIG_STUB_FACTORY_H diff --git a/google/cloud/config/v1/internal/config_tracing_connection.cc b/google/cloud/config/v1/internal/config_tracing_connection.cc index c2a3ae0ad14fd..76db85be6dec1 100644 --- a/google/cloud/config/v1/internal/config_tracing_connection.cc +++ b/google/cloud/config/v1/internal/config_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace config_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ConfigTracingConnection::ConfigTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -531,15 +529,11 @@ Status ConfigTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeConfigTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/config/v1/internal/config_tracing_connection.h b/google/cloud/config/v1/internal/config_tracing_connection.h index 86a9de7ab029c..5e55fb590abf7 100644 --- a/google/cloud/config/v1/internal/config_tracing_connection.h +++ b/google/cloud/config/v1/internal/config_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace config_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ConfigTracingConnection : public config_v1::ConfigConnection { public: ~ConfigTracingConnection() override = default; @@ -237,8 +235,6 @@ class ConfigTracingConnection : public config_v1::ConfigConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/config/v1/internal/config_tracing_stub.cc b/google/cloud/config/v1/internal/config_tracing_stub.cc index 363fab4a30a35..daf95bb93a976 100644 --- a/google/cloud/config/v1/internal/config_tracing_stub.cc +++ b/google/cloud/config/v1/internal/config_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace config_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ConfigTracingStub::ConfigTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -622,18 +623,14 @@ future ConfigTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeConfigTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace config_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/config/v1/internal/config_tracing_stub.h b/google/cloud/config/v1/internal/config_tracing_stub.h index f73c83168cb44..5d5aaa1916f63 100644 --- a/google/cloud/config/v1/internal/config_tracing_stub.h +++ b/google/cloud/config/v1/internal/config_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace config_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ConfigTracingStub : public ConfigStub { public: ~ConfigTracingStub() override = default; @@ -284,8 +285,6 @@ class ConfigTracingStub : public ConfigStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -300,4 +299,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIG_V1_INTERNAL_CONFIG_TRACING_STUB_H diff --git a/google/cloud/configdelivery/BUILD.bazel b/google/cloud/configdelivery/BUILD.bazel index 1444e57dd280f..b0f3ef668a7f7 100644 --- a/google/cloud/configdelivery/BUILD.bazel +++ b/google/cloud/configdelivery/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/configdelivery/v1:configdelivery_cc_grpc", + "@googleapis//google/cloud/configdelivery/v1:configdelivery_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/configdelivery/quickstart/CMakeLists.txt b/google/cloud/configdelivery/quickstart/CMakeLists.txt index 38bba03e73b83..69ddd3e6199dd 100644 --- a/google/cloud/configdelivery/quickstart/CMakeLists.txt +++ b/google/cloud/configdelivery/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Config Delivery API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-configdelivery-quickstart CXX) find_package(google_cloud_cpp_configdelivery REQUIRED) diff --git a/google/cloud/configdelivery/v1/config_delivery_client.h b/google/cloud/configdelivery/v1/config_delivery_client.h index eb7c386a0ec93..c1d232b434266 100644 --- a/google/cloud/configdelivery/v1/config_delivery_client.h +++ b/google/cloud/configdelivery/v1/config_delivery_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/configdelivery/v1/config_delivery_connection.h b/google/cloud/configdelivery/v1/config_delivery_connection.h index d462068e43eec..c83b451b9009c 100644 --- a/google/cloud/configdelivery/v1/config_delivery_connection.h +++ b/google/cloud/configdelivery/v1/config_delivery_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIGDELIVERY_V1_CONFIG_DELIVERY_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIGDELIVERY_V1_CONFIG_DELIVERY_CONNECTION_H +#include "google/cloud/configdelivery/v1/config_delivery.pb.h" #include "google/cloud/configdelivery/v1/config_delivery_connection_idempotency_policy.h" #include "google/cloud/configdelivery/v1/internal/config_delivery_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/configdelivery/v1/config_delivery_connection_idempotency_policy.h b/google/cloud/configdelivery/v1/config_delivery_connection_idempotency_policy.h index b0326d395f790..eca0b270e9a87 100644 --- a/google/cloud/configdelivery/v1/config_delivery_connection_idempotency_policy.h +++ b/google/cloud/configdelivery/v1/config_delivery_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIGDELIVERY_V1_CONFIG_DELIVERY_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIGDELIVERY_V1_CONFIG_DELIVERY_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/configdelivery/v1/config_delivery.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/configdelivery/v1/internal/config_delivery_auth_decorator.cc b/google/cloud/configdelivery/v1/internal/config_delivery_auth_decorator.cc index f09273505ba3d..234c34c30bb6b 100644 --- a/google/cloud/configdelivery/v1/internal/config_delivery_auth_decorator.cc +++ b/google/cloud/configdelivery/v1/internal/config_delivery_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/configdelivery/v1/config_delivery.proto #include "google/cloud/configdelivery/v1/internal/config_delivery_auth_decorator.h" -#include +#include "google/cloud/configdelivery/v1/config_delivery.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace configdelivery_v1_internal { @@ -649,3 +652,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace configdelivery_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/configdelivery/v1/internal/config_delivery_auth_decorator.h b/google/cloud/configdelivery/v1/internal/config_delivery_auth_decorator.h index 81e7e338c201c..697c762ed3c16 100644 --- a/google/cloud/configdelivery/v1/internal/config_delivery_auth_decorator.h +++ b/google/cloud/configdelivery/v1/internal/config_delivery_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/configdelivery/v1/internal/config_delivery_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace configdelivery_v1_internal { @@ -317,4 +320,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIGDELIVERY_V1_INTERNAL_CONFIG_DELIVERY_AUTH_DECORATOR_H diff --git a/google/cloud/configdelivery/v1/internal/config_delivery_connection_impl.h b/google/cloud/configdelivery/v1/internal/config_delivery_connection_impl.h index 4aa8dda1309a4..1f55eb2ed0cf3 100644 --- a/google/cloud/configdelivery/v1/internal/config_delivery_connection_impl.h +++ b/google/cloud/configdelivery/v1/internal/config_delivery_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/configdelivery/v1/internal/config_delivery_logging_decorator.cc b/google/cloud/configdelivery/v1/internal/config_delivery_logging_decorator.cc index 989c51757fb60..cf3fe8fec9088 100644 --- a/google/cloud/configdelivery/v1/internal/config_delivery_logging_decorator.cc +++ b/google/cloud/configdelivery/v1/internal/config_delivery_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/configdelivery/v1/config_delivery.proto #include "google/cloud/configdelivery/v1/internal/config_delivery_logging_decorator.h" +#include "google/cloud/configdelivery/v1/config_delivery.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace configdelivery_v1_internal { @@ -765,3 +768,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace configdelivery_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/configdelivery/v1/internal/config_delivery_logging_decorator.h b/google/cloud/configdelivery/v1/internal/config_delivery_logging_decorator.h index 821fa4e395ecd..a5f62981e9f46 100644 --- a/google/cloud/configdelivery/v1/internal/config_delivery_logging_decorator.h +++ b/google/cloud/configdelivery/v1/internal/config_delivery_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/configdelivery/v1/internal/config_delivery_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace configdelivery_v1_internal { @@ -317,4 +320,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIGDELIVERY_V1_INTERNAL_CONFIG_DELIVERY_LOGGING_DECORATOR_H diff --git a/google/cloud/configdelivery/v1/internal/config_delivery_metadata_decorator.cc b/google/cloud/configdelivery/v1/internal/config_delivery_metadata_decorator.cc index 8276552cbc883..6b2ff5e2eb81a 100644 --- a/google/cloud/configdelivery/v1/internal/config_delivery_metadata_decorator.cc +++ b/google/cloud/configdelivery/v1/internal/config_delivery_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/configdelivery/v1/config_delivery.proto #include "google/cloud/configdelivery/v1/internal/config_delivery_metadata_decorator.h" +#include "google/cloud/configdelivery/v1/config_delivery.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace configdelivery_v1_internal { @@ -557,3 +561,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace configdelivery_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/configdelivery/v1/internal/config_delivery_metadata_decorator.h b/google/cloud/configdelivery/v1/internal/config_delivery_metadata_decorator.h index f76fe9f041eb5..467676a148db0 100644 --- a/google/cloud/configdelivery/v1/internal/config_delivery_metadata_decorator.h +++ b/google/cloud/configdelivery/v1/internal/config_delivery_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/configdelivery/v1/internal/config_delivery_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace configdelivery_v1_internal { @@ -322,4 +325,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIGDELIVERY_V1_INTERNAL_CONFIG_DELIVERY_METADATA_DECORATOR_H diff --git a/google/cloud/configdelivery/v1/internal/config_delivery_option_defaults.cc b/google/cloud/configdelivery/v1/internal/config_delivery_option_defaults.cc index d287ef68e5c5f..fc52442e5d24e 100644 --- a/google/cloud/configdelivery/v1/internal/config_delivery_option_defaults.cc +++ b/google/cloud/configdelivery/v1/internal/config_delivery_option_defaults.cc @@ -42,7 +42,7 @@ Options ConfigDeliveryDefaultOptions(Options options) { if (!options.has()) { options.set( configdelivery_v1::ConfigDeliveryLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/configdelivery/v1/internal/config_delivery_stub.cc b/google/cloud/configdelivery/v1/internal/config_delivery_stub.cc index 78339da67a3e8..42fcd87074f59 100644 --- a/google/cloud/configdelivery/v1/internal/config_delivery_stub.cc +++ b/google/cloud/configdelivery/v1/internal/config_delivery_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/configdelivery/v1/config_delivery.proto #include "google/cloud/configdelivery/v1/internal/config_delivery_stub.h" +#include "google/cloud/configdelivery/v1/config_delivery.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace configdelivery_v1_internal { @@ -747,3 +750,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace configdelivery_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/configdelivery/v1/internal/config_delivery_stub.h b/google/cloud/configdelivery/v1/internal/config_delivery_stub.h index 265ae3c757927..e339da5e7e9cc 100644 --- a/google/cloud/configdelivery/v1/internal/config_delivery_stub.h +++ b/google/cloud/configdelivery/v1/internal/config_delivery_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIGDELIVERY_V1_INTERNAL_CONFIG_DELIVERY_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIGDELIVERY_V1_INTERNAL_CONFIG_DELIVERY_STUB_H +#include "google/cloud/configdelivery/v1/config_delivery.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace configdelivery_v1_internal { @@ -612,4 +615,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIGDELIVERY_V1_INTERNAL_CONFIG_DELIVERY_STUB_H diff --git a/google/cloud/configdelivery/v1/internal/config_delivery_stub_factory.cc b/google/cloud/configdelivery/v1/internal/config_delivery_stub_factory.cc index ebdd64aa64bb7..a10f3257b4634 100644 --- a/google/cloud/configdelivery/v1/internal/config_delivery_stub_factory.cc +++ b/google/cloud/configdelivery/v1/internal/config_delivery_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/configdelivery/v1/config_delivery.proto #include "google/cloud/configdelivery/v1/internal/config_delivery_stub_factory.h" +#include "google/cloud/configdelivery/v1/config_delivery.grpc.pb.h" #include "google/cloud/configdelivery/v1/internal/config_delivery_auth_decorator.h" #include "google/cloud/configdelivery/v1/internal/config_delivery_logging_decorator.h" #include "google/cloud/configdelivery/v1/internal/config_delivery_metadata_decorator.h" #include "google/cloud/configdelivery/v1/internal/config_delivery_stub.h" #include "google/cloud/configdelivery/v1/internal/config_delivery_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace configdelivery_v1_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace configdelivery_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/configdelivery/v1/internal/config_delivery_stub_factory.h b/google/cloud/configdelivery/v1/internal/config_delivery_stub_factory.h index aa9c8ea4bb0fb..40c1f77ce3059 100644 --- a/google/cloud/configdelivery/v1/internal/config_delivery_stub_factory.h +++ b/google/cloud/configdelivery/v1/internal/config_delivery_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace configdelivery_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIGDELIVERY_V1_INTERNAL_CONFIG_DELIVERY_STUB_FACTORY_H diff --git a/google/cloud/configdelivery/v1/internal/config_delivery_tracing_connection.cc b/google/cloud/configdelivery/v1/internal/config_delivery_tracing_connection.cc index fa6ff7c7415be..7de719809e8c0 100644 --- a/google/cloud/configdelivery/v1/internal/config_delivery_tracing_connection.cc +++ b/google/cloud/configdelivery/v1/internal/config_delivery_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace configdelivery_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ConfigDeliveryTracingConnection::ConfigDeliveryTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -646,16 +644,12 @@ Status ConfigDeliveryTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeConfigDeliveryTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/configdelivery/v1/internal/config_delivery_tracing_connection.h b/google/cloud/configdelivery/v1/internal/config_delivery_tracing_connection.h index 10878523305e3..e1b331e4588d9 100644 --- a/google/cloud/configdelivery/v1/internal/config_delivery_tracing_connection.h +++ b/google/cloud/configdelivery/v1/internal/config_delivery_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace configdelivery_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ConfigDeliveryTracingConnection : public configdelivery_v1::ConfigDeliveryConnection { public: @@ -289,8 +287,6 @@ class ConfigDeliveryTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/configdelivery/v1/internal/config_delivery_tracing_stub.cc b/google/cloud/configdelivery/v1/internal/config_delivery_tracing_stub.cc index 74263bff488b0..7405be3910853 100644 --- a/google/cloud/configdelivery/v1/internal/config_delivery_tracing_stub.cc +++ b/google/cloud/configdelivery/v1/internal/config_delivery_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace configdelivery_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ConfigDeliveryTracingStub::ConfigDeliveryTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -662,18 +663,14 @@ future ConfigDeliveryTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeConfigDeliveryTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace configdelivery_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/configdelivery/v1/internal/config_delivery_tracing_stub.h b/google/cloud/configdelivery/v1/internal/config_delivery_tracing_stub.h index 1aa34c1a8688b..93e8a5820f974 100644 --- a/google/cloud/configdelivery/v1/internal/config_delivery_tracing_stub.h +++ b/google/cloud/configdelivery/v1/internal/config_delivery_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace configdelivery_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ConfigDeliveryTracingStub : public ConfigDeliveryStub { public: ~ConfigDeliveryTracingStub() override = default; @@ -312,8 +313,6 @@ class ConfigDeliveryTracingStub : public ConfigDeliveryStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -328,4 +327,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONFIGDELIVERY_V1_INTERNAL_CONFIG_DELIVERY_TRACING_STUB_H diff --git a/google/cloud/connectors/BUILD.bazel b/google/cloud/connectors/BUILD.bazel index ed474bb371edc..6ec21767c37f1 100644 --- a/google/cloud/connectors/BUILD.bazel +++ b/google/cloud/connectors/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/connectors/v1:connectors_cc_grpc", + "@googleapis//google/cloud/connectors/v1:connectors_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/connectors/CMakeLists.txt b/google/cloud/connectors/CMakeLists.txt index 09fa025f1cd28..13c429a85fe32 100644 --- a/google/cloud/connectors/CMakeLists.txt +++ b/google/cloud/connectors/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(connectors "Connectors API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(connectors_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/connectors/connectors_client.h b/google/cloud/connectors/connectors_client.h deleted file mode 100644 index 6e4a548409db4..0000000000000 --- a/google/cloud/connectors/connectors_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/connectors/v1/connectors_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONNECTORS_CONNECTORS_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONNECTORS_CONNECTORS_CLIENT_H - -#include "google/cloud/connectors/connectors_connection.h" -#include "google/cloud/connectors/v1/connectors_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in connectors_v1 instead of the aliases defined in -/// this namespace. -namespace connectors { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use connectors_v1::ConnectorsClient directly. -using ::google::cloud::connectors_v1::ConnectorsClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace connectors -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONNECTORS_CONNECTORS_CLIENT_H diff --git a/google/cloud/connectors/connectors_connection.h b/google/cloud/connectors/connectors_connection.h deleted file mode 100644 index fcb186fa66327..0000000000000 --- a/google/cloud/connectors/connectors_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/connectors/v1/connectors_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONNECTORS_CONNECTORS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONNECTORS_CONNECTORS_CONNECTION_H - -#include "google/cloud/connectors/connectors_connection_idempotency_policy.h" -#include "google/cloud/connectors/v1/connectors_connection.h" - -namespace google { -namespace cloud { -namespace connectors { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use connectors_v1::MakeConnectorsConnection directly. -using ::google::cloud::connectors_v1::MakeConnectorsConnection; - -/// @deprecated Use connectors_v1::ConnectorsConnection directly. -using ::google::cloud::connectors_v1::ConnectorsConnection; - -/// @deprecated Use connectors_v1::ConnectorsLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::connectors_v1::ConnectorsLimitedErrorCountRetryPolicy; - -/// @deprecated Use connectors_v1::ConnectorsLimitedTimeRetryPolicy directly. -using ::google::cloud::connectors_v1::ConnectorsLimitedTimeRetryPolicy; - -/// @deprecated Use connectors_v1::ConnectorsRetryPolicy directly. -using ::google::cloud::connectors_v1::ConnectorsRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace connectors -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONNECTORS_CONNECTORS_CONNECTION_H diff --git a/google/cloud/connectors/connectors_connection_idempotency_policy.h b/google/cloud/connectors/connectors_connection_idempotency_policy.h deleted file mode 100644 index 43b62714ce751..0000000000000 --- a/google/cloud/connectors/connectors_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/connectors/v1/connectors_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONNECTORS_CONNECTORS_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONNECTORS_CONNECTORS_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/connectors/v1/connectors_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace connectors { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// connectors_v1::MakeDefaultConnectorsConnectionIdempotencyPolicy directly. -using ::google::cloud::connectors_v1:: - MakeDefaultConnectorsConnectionIdempotencyPolicy; - -/// @deprecated Use connectors_v1::ConnectorsConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::connectors_v1::ConnectorsConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace connectors -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONNECTORS_CONNECTORS_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/connectors/connectors_options.h b/google/cloud/connectors/connectors_options.h deleted file mode 100644 index f1e33e05c84a6..0000000000000 --- a/google/cloud/connectors/connectors_options.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/connectors/v1/connectors_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONNECTORS_CONNECTORS_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONNECTORS_CONNECTORS_OPTIONS_H - -#include "google/cloud/connectors/connectors_connection.h" -#include "google/cloud/connectors/connectors_connection_idempotency_policy.h" -#include "google/cloud/connectors/v1/connectors_options.h" - -namespace google { -namespace cloud { -namespace connectors { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use connectors_v1::ConnectorsPollingPolicyOption directly. -using ::google::cloud::connectors_v1::ConnectorsPollingPolicyOption; - -/// @deprecated Use connectors_v1::ConnectorsBackoffPolicyOption directly. -using ::google::cloud::connectors_v1::ConnectorsBackoffPolicyOption; - -/// @deprecated Use connectors_v1::ConnectorsConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::connectors_v1:: - ConnectorsConnectionIdempotencyPolicyOption; - -/// @deprecated Use connectors_v1::ConnectorsPolicyOptionList directly. -using ::google::cloud::connectors_v1::ConnectorsPolicyOptionList; - -/// @deprecated Use connectors_v1::ConnectorsRetryPolicyOption directly. -using ::google::cloud::connectors_v1::ConnectorsRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace connectors -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONNECTORS_CONNECTORS_OPTIONS_H diff --git a/google/cloud/connectors/mocks/mock_connectors_connection.h b/google/cloud/connectors/mocks/mock_connectors_connection.h deleted file mode 100644 index e366152ec9e49..0000000000000 --- a/google/cloud/connectors/mocks/mock_connectors_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/connectors/v1/connectors_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONNECTORS_MOCKS_MOCK_CONNECTORS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONNECTORS_MOCKS_MOCK_CONNECTORS_CONNECTION_H - -#include "google/cloud/connectors/connectors_connection.h" -#include "google/cloud/connectors/v1/mocks/mock_connectors_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in connectors_v1_mocks instead of the aliases -/// defined in this namespace. -namespace connectors_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use connectors_v1_mocks::MockConnectorsConnection directly. -using ::google::cloud::connectors_v1_mocks::MockConnectorsConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace connectors_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONNECTORS_MOCKS_MOCK_CONNECTORS_CONNECTION_H diff --git a/google/cloud/connectors/quickstart/.bazelrc b/google/cloud/connectors/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/connectors/quickstart/.bazelrc +++ b/google/cloud/connectors/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/connectors/quickstart/CMakeLists.txt b/google/cloud/connectors/quickstart/CMakeLists.txt index f4a4e9993a7d9..7cf214a78a280 100644 --- a/google/cloud/connectors/quickstart/CMakeLists.txt +++ b/google/cloud/connectors/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Connectors API C++ client library from a larger # CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-connectors-quickstart CXX) find_package(google_cloud_cpp_connectors REQUIRED) diff --git a/google/cloud/connectors/v1/connectors_client.h b/google/cloud/connectors/v1/connectors_client.h index 08ad5d3d790f4..0c7af10338d37 100644 --- a/google/cloud/connectors/v1/connectors_client.h +++ b/google/cloud/connectors/v1/connectors_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/connectors/v1/connectors_connection.h b/google/cloud/connectors/v1/connectors_connection.h index 3f597c26a07c4..29ff136263cb9 100644 --- a/google/cloud/connectors/v1/connectors_connection.h +++ b/google/cloud/connectors/v1/connectors_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONNECTORS_V1_CONNECTORS_CONNECTION_H #include "google/cloud/connectors/v1/connectors_connection_idempotency_policy.h" +#include "google/cloud/connectors/v1/connectors_service.pb.h" #include "google/cloud/connectors/v1/internal/connectors_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/connectors/v1/connectors_connection_idempotency_policy.h b/google/cloud/connectors/v1/connectors_connection_idempotency_policy.h index 4fcfcae0d9b51..bb20c74dc76bb 100644 --- a/google/cloud/connectors/v1/connectors_connection_idempotency_policy.h +++ b/google/cloud/connectors/v1/connectors_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONNECTORS_V1_CONNECTORS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONNECTORS_V1_CONNECTORS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/connectors/v1/connectors_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/connectors/v1/internal/connectors_auth_decorator.cc b/google/cloud/connectors/v1/internal/connectors_auth_decorator.cc index 8b38cad5eab73..7d0231ad02a30 100644 --- a/google/cloud/connectors/v1/internal/connectors_auth_decorator.cc +++ b/google/cloud/connectors/v1/internal/connectors_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/connectors/v1/connectors_service.proto #include "google/cloud/connectors/v1/internal/connectors_auth_decorator.h" -#include +#include "google/cloud/connectors/v1/connectors_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace connectors_v1_internal { @@ -380,3 +383,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace connectors_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/connectors/v1/internal/connectors_auth_decorator.h b/google/cloud/connectors/v1/internal/connectors_auth_decorator.h index 285c8f811d54a..d451c984406d8 100644 --- a/google/cloud/connectors/v1/internal/connectors_auth_decorator.h +++ b/google/cloud/connectors/v1/internal/connectors_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/connectors/v1/internal/connectors_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace connectors_v1_internal { @@ -215,4 +218,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONNECTORS_V1_INTERNAL_CONNECTORS_AUTH_DECORATOR_H diff --git a/google/cloud/connectors/v1/internal/connectors_connection_impl.h b/google/cloud/connectors/v1/internal/connectors_connection_impl.h index 8c178d775acc4..219d923b60458 100644 --- a/google/cloud/connectors/v1/internal/connectors_connection_impl.h +++ b/google/cloud/connectors/v1/internal/connectors_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/connectors/v1/internal/connectors_logging_decorator.cc b/google/cloud/connectors/v1/internal/connectors_logging_decorator.cc index cd76a4cd522da..edc5444deb6f6 100644 --- a/google/cloud/connectors/v1/internal/connectors_logging_decorator.cc +++ b/google/cloud/connectors/v1/internal/connectors_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/connectors/v1/connectors_service.proto #include "google/cloud/connectors/v1/internal/connectors_logging_decorator.h" +#include "google/cloud/connectors/v1/connectors_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace connectors_v1_internal { @@ -478,3 +481,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace connectors_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/connectors/v1/internal/connectors_logging_decorator.h b/google/cloud/connectors/v1/internal/connectors_logging_decorator.h index 326d43f60b982..2b0c5d8652d91 100644 --- a/google/cloud/connectors/v1/internal/connectors_logging_decorator.h +++ b/google/cloud/connectors/v1/internal/connectors_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/connectors/v1/internal/connectors_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace connectors_v1_internal { @@ -215,4 +218,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONNECTORS_V1_INTERNAL_CONNECTORS_LOGGING_DECORATOR_H diff --git a/google/cloud/connectors/v1/internal/connectors_metadata_decorator.cc b/google/cloud/connectors/v1/internal/connectors_metadata_decorator.cc index 4e822977184b5..2e0c461480c8a 100644 --- a/google/cloud/connectors/v1/internal/connectors_metadata_decorator.cc +++ b/google/cloud/connectors/v1/internal/connectors_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/connectors/v1/connectors_service.proto #include "google/cloud/connectors/v1/internal/connectors_metadata_decorator.h" +#include "google/cloud/connectors/v1/connectors_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace connectors_v1_internal { @@ -368,3 +372,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace connectors_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/connectors/v1/internal/connectors_metadata_decorator.h b/google/cloud/connectors/v1/internal/connectors_metadata_decorator.h index 9aa8b87ed10aa..13b5234d63f57 100644 --- a/google/cloud/connectors/v1/internal/connectors_metadata_decorator.h +++ b/google/cloud/connectors/v1/internal/connectors_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/connectors/v1/internal/connectors_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace connectors_v1_internal { @@ -220,4 +223,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONNECTORS_V1_INTERNAL_CONNECTORS_METADATA_DECORATOR_H diff --git a/google/cloud/connectors/v1/internal/connectors_option_defaults.cc b/google/cloud/connectors/v1/internal/connectors_option_defaults.cc index ab10343a4db8a..58a4bac7e73a1 100644 --- a/google/cloud/connectors/v1/internal/connectors_option_defaults.cc +++ b/google/cloud/connectors/v1/internal/connectors_option_defaults.cc @@ -41,7 +41,7 @@ Options ConnectorsDefaultOptions(Options options) { if (!options.has()) { options.set( connectors_v1::ConnectorsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/connectors/v1/internal/connectors_stub.cc b/google/cloud/connectors/v1/internal/connectors_stub.cc index 3d9df364f5794..249b272418cf4 100644 --- a/google/cloud/connectors/v1/internal/connectors_stub.cc +++ b/google/cloud/connectors/v1/internal/connectors_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/connectors/v1/connectors_service.proto #include "google/cloud/connectors/v1/internal/connectors_stub.h" +#include "google/cloud/connectors/v1/connectors_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace connectors_v1_internal { @@ -468,3 +471,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace connectors_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/connectors/v1/internal/connectors_stub.h b/google/cloud/connectors/v1/internal/connectors_stub.h index 5ff14c6de401d..dcecfe3d3bdc7 100644 --- a/google/cloud/connectors/v1/internal/connectors_stub.h +++ b/google/cloud/connectors/v1/internal/connectors_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONNECTORS_V1_INTERNAL_CONNECTORS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONNECTORS_V1_INTERNAL_CONNECTORS_STUB_H +#include "google/cloud/connectors/v1/connectors_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace connectors_v1_internal { @@ -409,4 +412,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONNECTORS_V1_INTERNAL_CONNECTORS_STUB_H diff --git a/google/cloud/connectors/v1/internal/connectors_stub_factory.cc b/google/cloud/connectors/v1/internal/connectors_stub_factory.cc index 7a77292b3bb81..fdf50343002b9 100644 --- a/google/cloud/connectors/v1/internal/connectors_stub_factory.cc +++ b/google/cloud/connectors/v1/internal/connectors_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/connectors/v1/connectors_service.proto #include "google/cloud/connectors/v1/internal/connectors_stub_factory.h" +#include "google/cloud/connectors/v1/connectors_service.grpc.pb.h" #include "google/cloud/connectors/v1/internal/connectors_auth_decorator.h" #include "google/cloud/connectors/v1/internal/connectors_logging_decorator.h" #include "google/cloud/connectors/v1/internal/connectors_metadata_decorator.h" #include "google/cloud/connectors/v1/internal/connectors_stub.h" #include "google/cloud/connectors/v1/internal/connectors_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace connectors_v1_internal { @@ -77,3 +80,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace connectors_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/connectors/v1/internal/connectors_stub_factory.h b/google/cloud/connectors/v1/internal/connectors_stub_factory.h index ce6340f3c2786..1a0d293f287b8 100644 --- a/google/cloud/connectors/v1/internal/connectors_stub_factory.h +++ b/google/cloud/connectors/v1/internal/connectors_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace connectors_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONNECTORS_V1_INTERNAL_CONNECTORS_STUB_FACTORY_H diff --git a/google/cloud/connectors/v1/internal/connectors_tracing_connection.cc b/google/cloud/connectors/v1/internal/connectors_tracing_connection.cc index dbd5230433b22..cc62002d8f8af 100644 --- a/google/cloud/connectors/v1/internal/connectors_tracing_connection.cc +++ b/google/cloud/connectors/v1/internal/connectors_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace connectors_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ConnectorsTracingConnection::ConnectorsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -371,16 +369,12 @@ Status ConnectorsTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeConnectorsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/connectors/v1/internal/connectors_tracing_connection.h b/google/cloud/connectors/v1/internal/connectors_tracing_connection.h index 493cc4b0cb4e0..8832e5f9fbc93 100644 --- a/google/cloud/connectors/v1/internal/connectors_tracing_connection.h +++ b/google/cloud/connectors/v1/internal/connectors_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace connectors_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ConnectorsTracingConnection : public connectors_v1::ConnectorsConnection { public: ~ConnectorsTracingConnection() override = default; @@ -173,8 +171,6 @@ class ConnectorsTracingConnection : public connectors_v1::ConnectorsConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/connectors/v1/internal/connectors_tracing_stub.cc b/google/cloud/connectors/v1/internal/connectors_tracing_stub.cc index 7dc6cdbe3d0e8..18a3b16b42e10 100644 --- a/google/cloud/connectors/v1/internal/connectors_tracing_stub.cc +++ b/google/cloud/connectors/v1/internal/connectors_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace connectors_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ConnectorsTracingStub::ConnectorsTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -436,18 +437,14 @@ future ConnectorsTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeConnectorsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace connectors_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/connectors/v1/internal/connectors_tracing_stub.h b/google/cloud/connectors/v1/internal/connectors_tracing_stub.h index fcba16b4a69c3..79d0f1fbbc2b4 100644 --- a/google/cloud/connectors/v1/internal/connectors_tracing_stub.h +++ b/google/cloud/connectors/v1/internal/connectors_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace connectors_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ConnectorsTracingStub : public ConnectorsStub { public: ~ConnectorsTracingStub() override = default; @@ -210,8 +211,6 @@ class ConnectorsTracingStub : public ConnectorsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -226,4 +225,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONNECTORS_V1_INTERNAL_CONNECTORS_TRACING_STUB_H diff --git a/google/cloud/contactcenterinsights/BUILD.bazel b/google/cloud/contactcenterinsights/BUILD.bazel index c900667d6cbf1..224c97c52f581 100644 --- a/google/cloud/contactcenterinsights/BUILD.bazel +++ b/google/cloud/contactcenterinsights/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/contactcenterinsights/v1:contactcenterinsights_cc_grpc", + "@googleapis//google/cloud/contactcenterinsights/v1:contactcenterinsights_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/contactcenterinsights/CMakeLists.txt b/google/cloud/contactcenterinsights/CMakeLists.txt index 33f15b8894b31..8671a704d20ec 100644 --- a/google/cloud/contactcenterinsights/CMakeLists.txt +++ b/google/cloud/contactcenterinsights/CMakeLists.txt @@ -17,8 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library( - contactcenterinsights "Contact Center AI Insights API" - SERVICE_DIRS "__EMPTY__" "v1/") + contactcenterinsights "Contact Center AI Insights API" SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(contactcenterinsights_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/contactcenterinsights/contact_center_insights_client.h b/google/cloud/contactcenterinsights/contact_center_insights_client.h deleted file mode 100644 index 8f61a3f07c1b4..0000000000000 --- a/google/cloud/contactcenterinsights/contact_center_insights_client.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/contactcenterinsights/v1/contact_center_insights.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTACTCENTERINSIGHTS_CONTACT_CENTER_INSIGHTS_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTACTCENTERINSIGHTS_CONTACT_CENTER_INSIGHTS_CLIENT_H - -#include "google/cloud/contactcenterinsights/contact_center_insights_connection.h" -#include "google/cloud/contactcenterinsights/v1/contact_center_insights_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in contactcenterinsights_v1 instead of the aliases defined -/// in this namespace. -namespace contactcenterinsights { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use contactcenterinsights_v1::ContactCenterInsightsClient -/// directly. -using ::google::cloud::contactcenterinsights_v1::ContactCenterInsightsClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace contactcenterinsights -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTACTCENTERINSIGHTS_CONTACT_CENTER_INSIGHTS_CLIENT_H diff --git a/google/cloud/contactcenterinsights/contact_center_insights_connection.h b/google/cloud/contactcenterinsights/contact_center_insights_connection.h deleted file mode 100644 index 6b5c26f9b1a12..0000000000000 --- a/google/cloud/contactcenterinsights/contact_center_insights_connection.h +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/contactcenterinsights/v1/contact_center_insights.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTACTCENTERINSIGHTS_CONTACT_CENTER_INSIGHTS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTACTCENTERINSIGHTS_CONTACT_CENTER_INSIGHTS_CONNECTION_H - -#include "google/cloud/contactcenterinsights/contact_center_insights_connection_idempotency_policy.h" -#include "google/cloud/contactcenterinsights/v1/contact_center_insights_connection.h" - -namespace google { -namespace cloud { -namespace contactcenterinsights { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// contactcenterinsights_v1::MakeContactCenterInsightsConnection directly. -using ::google::cloud::contactcenterinsights_v1:: - MakeContactCenterInsightsConnection; - -/// @deprecated Use contactcenterinsights_v1::ContactCenterInsightsConnection -/// directly. -using ::google::cloud::contactcenterinsights_v1:: - ContactCenterInsightsConnection; - -/// @deprecated Use -/// contactcenterinsights_v1::ContactCenterInsightsLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::contactcenterinsights_v1:: - ContactCenterInsightsLimitedErrorCountRetryPolicy; - -/// @deprecated Use -/// contactcenterinsights_v1::ContactCenterInsightsLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::contactcenterinsights_v1:: - ContactCenterInsightsLimitedTimeRetryPolicy; - -/// @deprecated Use contactcenterinsights_v1::ContactCenterInsightsRetryPolicy -/// directly. -using ::google::cloud::contactcenterinsights_v1:: - ContactCenterInsightsRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace contactcenterinsights -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTACTCENTERINSIGHTS_CONTACT_CENTER_INSIGHTS_CONNECTION_H diff --git a/google/cloud/contactcenterinsights/contact_center_insights_connection_idempotency_policy.h b/google/cloud/contactcenterinsights/contact_center_insights_connection_idempotency_policy.h deleted file mode 100644 index 9bca83667e658..0000000000000 --- a/google/cloud/contactcenterinsights/contact_center_insights_connection_idempotency_policy.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/contactcenterinsights/v1/contact_center_insights.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTACTCENTERINSIGHTS_CONTACT_CENTER_INSIGHTS_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTACTCENTERINSIGHTS_CONTACT_CENTER_INSIGHTS_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/contactcenterinsights/v1/contact_center_insights_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace contactcenterinsights { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// contactcenterinsights_v1::MakeDefaultContactCenterInsightsConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::contactcenterinsights_v1:: - MakeDefaultContactCenterInsightsConnectionIdempotencyPolicy; - -/// @deprecated Use -/// contactcenterinsights_v1::ContactCenterInsightsConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::contactcenterinsights_v1:: - ContactCenterInsightsConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace contactcenterinsights -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTACTCENTERINSIGHTS_CONTACT_CENTER_INSIGHTS_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/contactcenterinsights/contact_center_insights_options.h b/google/cloud/contactcenterinsights/contact_center_insights_options.h deleted file mode 100644 index 5c5654263c91f..0000000000000 --- a/google/cloud/contactcenterinsights/contact_center_insights_options.h +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/contactcenterinsights/v1/contact_center_insights.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTACTCENTERINSIGHTS_CONTACT_CENTER_INSIGHTS_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTACTCENTERINSIGHTS_CONTACT_CENTER_INSIGHTS_OPTIONS_H - -#include "google/cloud/contactcenterinsights/contact_center_insights_connection.h" -#include "google/cloud/contactcenterinsights/contact_center_insights_connection_idempotency_policy.h" -#include "google/cloud/contactcenterinsights/v1/contact_center_insights_options.h" - -namespace google { -namespace cloud { -namespace contactcenterinsights { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// contactcenterinsights_v1::ContactCenterInsightsPollingPolicyOption directly. -using ::google::cloud::contactcenterinsights_v1:: - ContactCenterInsightsPollingPolicyOption; - -/// @deprecated Use -/// contactcenterinsights_v1::ContactCenterInsightsBackoffPolicyOption directly. -using ::google::cloud::contactcenterinsights_v1:: - ContactCenterInsightsBackoffPolicyOption; - -/// @deprecated Use -/// contactcenterinsights_v1::ContactCenterInsightsConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::contactcenterinsights_v1:: - ContactCenterInsightsConnectionIdempotencyPolicyOption; - -/// @deprecated Use -/// contactcenterinsights_v1::ContactCenterInsightsPolicyOptionList directly. -using ::google::cloud::contactcenterinsights_v1:: - ContactCenterInsightsPolicyOptionList; - -/// @deprecated Use -/// contactcenterinsights_v1::ContactCenterInsightsRetryPolicyOption directly. -using ::google::cloud::contactcenterinsights_v1:: - ContactCenterInsightsRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace contactcenterinsights -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTACTCENTERINSIGHTS_CONTACT_CENTER_INSIGHTS_OPTIONS_H diff --git a/google/cloud/contactcenterinsights/mocks/mock_contact_center_insights_connection.h b/google/cloud/contactcenterinsights/mocks/mock_contact_center_insights_connection.h deleted file mode 100644 index 33302ef8d27f6..0000000000000 --- a/google/cloud/contactcenterinsights/mocks/mock_contact_center_insights_connection.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/contactcenterinsights/v1/contact_center_insights.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTACTCENTERINSIGHTS_MOCKS_MOCK_CONTACT_CENTER_INSIGHTS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTACTCENTERINSIGHTS_MOCKS_MOCK_CONTACT_CENTER_INSIGHTS_CONNECTION_H - -#include "google/cloud/contactcenterinsights/contact_center_insights_connection.h" -#include "google/cloud/contactcenterinsights/v1/mocks/mock_contact_center_insights_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in contactcenterinsights_v1_mocks instead of the aliases -/// defined in this namespace. -namespace contactcenterinsights_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// contactcenterinsights_v1_mocks::MockContactCenterInsightsConnection -/// directly. -using ::google::cloud::contactcenterinsights_v1_mocks:: - MockContactCenterInsightsConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace contactcenterinsights_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTACTCENTERINSIGHTS_MOCKS_MOCK_CONTACT_CENTER_INSIGHTS_CONNECTION_H diff --git a/google/cloud/contactcenterinsights/quickstart/.bazelrc b/google/cloud/contactcenterinsights/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/contactcenterinsights/quickstart/.bazelrc +++ b/google/cloud/contactcenterinsights/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/contactcenterinsights/quickstart/CMakeLists.txt b/google/cloud/contactcenterinsights/quickstart/CMakeLists.txt index 2e16ae1ff1606..9b2c3194c6695 100644 --- a/google/cloud/contactcenterinsights/quickstart/CMakeLists.txt +++ b/google/cloud/contactcenterinsights/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Contact Center AI Insights API C++ client # library from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-contactcenterinsights-quickstart CXX) find_package(google_cloud_cpp_contactcenterinsights REQUIRED) diff --git a/google/cloud/contactcenterinsights/v1/contact_center_insights_client.h b/google/cloud/contactcenterinsights/v1/contact_center_insights_client.h index 2ed3a6325c7cf..bd3ad11ea277e 100644 --- a/google/cloud/contactcenterinsights/v1/contact_center_insights_client.h +++ b/google/cloud/contactcenterinsights/v1/contact_center_insights_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/contactcenterinsights/v1/contact_center_insights_connection.h b/google/cloud/contactcenterinsights/v1/contact_center_insights_connection.h index 755d450774296..2285fa0ef52b8 100644 --- a/google/cloud/contactcenterinsights/v1/contact_center_insights_connection.h +++ b/google/cloud/contactcenterinsights/v1/contact_center_insights_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTACTCENTERINSIGHTS_V1_CONTACT_CENTER_INSIGHTS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTACTCENTERINSIGHTS_V1_CONTACT_CENTER_INSIGHTS_CONNECTION_H +#include "google/cloud/contactcenterinsights/v1/contact_center_insights.pb.h" #include "google/cloud/contactcenterinsights/v1/contact_center_insights_connection_idempotency_policy.h" #include "google/cloud/contactcenterinsights/v1/internal/contact_center_insights_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/contactcenterinsights/v1/contact_center_insights_connection_idempotency_policy.h b/google/cloud/contactcenterinsights/v1/contact_center_insights_connection_idempotency_policy.h index 24a1e2cde9571..044877c5dc5b8 100644 --- a/google/cloud/contactcenterinsights/v1/contact_center_insights_connection_idempotency_policy.h +++ b/google/cloud/contactcenterinsights/v1/contact_center_insights_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTACTCENTERINSIGHTS_V1_CONTACT_CENTER_INSIGHTS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTACTCENTERINSIGHTS_V1_CONTACT_CENTER_INSIGHTS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/contactcenterinsights/v1/contact_center_insights.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_auth_decorator.cc b/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_auth_decorator.cc index 872efafbb665c..61df428a4b8ff 100644 --- a/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_auth_decorator.cc +++ b/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/contactcenterinsights/v1/contact_center_insights.proto #include "google/cloud/contactcenterinsights/v1/internal/contact_center_insights_auth_decorator.h" -#include +#include "google/cloud/contactcenterinsights/v1/contact_center_insights.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contactcenterinsights_v1_internal { @@ -1184,3 +1187,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contactcenterinsights_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_auth_decorator.h b/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_auth_decorator.h index 47d371911a3e1..d775f35fcbb29 100644 --- a/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_auth_decorator.h +++ b/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/contactcenterinsights/v1/internal/contact_center_insights_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contactcenterinsights_v1_internal { @@ -600,4 +603,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTACTCENTERINSIGHTS_V1_INTERNAL_CONTACT_CENTER_INSIGHTS_AUTH_DECORATOR_H diff --git a/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_connection_impl.h b/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_connection_impl.h index b1cf65a34c9cd..b69209e1075e8 100644 --- a/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_connection_impl.h +++ b/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_logging_decorator.cc b/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_logging_decorator.cc index 82d612b4df553..6d48bc01a7efe 100644 --- a/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_logging_decorator.cc +++ b/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/contactcenterinsights/v1/contact_center_insights.proto #include "google/cloud/contactcenterinsights/v1/internal/contact_center_insights_logging_decorator.h" +#include "google/cloud/contactcenterinsights/v1/contact_center_insights.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contactcenterinsights_v1_internal { @@ -1486,3 +1489,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contactcenterinsights_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_logging_decorator.h b/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_logging_decorator.h index e1e30db08fa9c..a7c9b0e2ae77d 100644 --- a/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_logging_decorator.h +++ b/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/contactcenterinsights/v1/internal/contact_center_insights_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contactcenterinsights_v1_internal { @@ -600,4 +603,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTACTCENTERINSIGHTS_V1_INTERNAL_CONTACT_CENTER_INSIGHTS_LOGGING_DECORATOR_H diff --git a/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_metadata_decorator.cc b/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_metadata_decorator.cc index 59fd2f11e80e8..a4eaac6d661f0 100644 --- a/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_metadata_decorator.cc +++ b/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/contactcenterinsights/v1/contact_center_insights.proto #include "google/cloud/contactcenterinsights/v1/internal/contact_center_insights_metadata_decorator.h" +#include "google/cloud/contactcenterinsights/v1/contact_center_insights.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contactcenterinsights_v1_internal { @@ -1082,3 +1086,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contactcenterinsights_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_metadata_decorator.h b/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_metadata_decorator.h index c3ee7946ce053..b41591ee6cec4 100644 --- a/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_metadata_decorator.h +++ b/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/contactcenterinsights/v1/internal/contact_center_insights_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contactcenterinsights_v1_internal { @@ -606,4 +609,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTACTCENTERINSIGHTS_V1_INTERNAL_CONTACT_CENTER_INSIGHTS_METADATA_DECORATOR_H diff --git a/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_option_defaults.cc b/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_option_defaults.cc index 5c2980b60a6c7..b4a8fd363fd5e 100644 --- a/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_option_defaults.cc +++ b/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_option_defaults.cc @@ -44,7 +44,7 @@ Options ContactCenterInsightsDefaultOptions(Options options) { options.set< contactcenterinsights_v1::ContactCenterInsightsRetryPolicyOption>( contactcenterinsights_v1::ContactCenterInsightsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contactcenterinsights_v1_internal { @@ -1420,3 +1423,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contactcenterinsights_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_stub.h b/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_stub.h index d5b093e96f8d2..4fc6f7105466f 100644 --- a/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_stub.h +++ b/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTACTCENTERINSIGHTS_V1_INTERNAL_CONTACT_CENTER_INSIGHTS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTACTCENTERINSIGHTS_V1_INTERNAL_CONTACT_CENTER_INSIGHTS_STUB_H +#include "google/cloud/contactcenterinsights/v1/contact_center_insights.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contactcenterinsights_v1_internal { @@ -1191,4 +1194,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTACTCENTERINSIGHTS_V1_INTERNAL_CONTACT_CENTER_INSIGHTS_STUB_H diff --git a/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_stub_factory.cc b/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_stub_factory.cc index cf7539a18ca4a..ef3b9bcc13e65 100644 --- a/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_stub_factory.cc +++ b/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/contactcenterinsights/v1/contact_center_insights.proto #include "google/cloud/contactcenterinsights/v1/internal/contact_center_insights_stub_factory.h" +#include "google/cloud/contactcenterinsights/v1/contact_center_insights.grpc.pb.h" #include "google/cloud/contactcenterinsights/v1/internal/contact_center_insights_auth_decorator.h" #include "google/cloud/contactcenterinsights/v1/internal/contact_center_insights_logging_decorator.h" #include "google/cloud/contactcenterinsights/v1/internal/contact_center_insights_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contactcenterinsights_v1_internal { @@ -74,3 +77,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contactcenterinsights_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_stub_factory.h b/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_stub_factory.h index fb6de5e89f08c..ed8bfeb787484 100644 --- a/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_stub_factory.h +++ b/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contactcenterinsights_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTACTCENTERINSIGHTS_V1_INTERNAL_CONTACT_CENTER_INSIGHTS_STUB_FACTORY_H diff --git a/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_tracing_connection.cc b/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_tracing_connection.cc index fbbf105dcca6a..91b6cb00c3512 100644 --- a/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_tracing_connection.cc +++ b/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace contactcenterinsights_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ContactCenterInsightsTracingConnection::ContactCenterInsightsTracingConnection( std::shared_ptr child) @@ -1318,18 +1316,14 @@ Status ContactCenterInsightsTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeContactCenterInsightsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_tracing_connection.h b/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_tracing_connection.h index d3eee12b54092..593528c2159a6 100644 --- a/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_tracing_connection.h +++ b/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace contactcenterinsights_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ContactCenterInsightsTracingConnection : public contactcenterinsights_v1::ContactCenterInsightsConnection { public: @@ -562,8 +560,6 @@ class ContactCenterInsightsTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_tracing_stub.cc b/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_tracing_stub.cc index 29f6c7280ebfe..273916fda714c 100644 --- a/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_tracing_stub.cc +++ b/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contactcenterinsights_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ContactCenterInsightsTracingStub::ContactCenterInsightsTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -1424,18 +1425,14 @@ future ContactCenterInsightsTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeContactCenterInsightsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contactcenterinsights_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_tracing_stub.h b/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_tracing_stub.h index ab87e8c69b9e0..cfaf060d10b52 100644 --- a/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_tracing_stub.h +++ b/google/cloud/contactcenterinsights/v1/internal/contact_center_insights_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contactcenterinsights_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ContactCenterInsightsTracingStub : public ContactCenterInsightsStub { public: ~ContactCenterInsightsTracingStub() override = default; @@ -596,8 +597,6 @@ class ContactCenterInsightsTracingStub : public ContactCenterInsightsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -612,4 +611,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTACTCENTERINSIGHTS_V1_INTERNAL_CONTACT_CENTER_INSIGHTS_TRACING_STUB_H diff --git a/google/cloud/container/BUILD.bazel b/google/cloud/container/BUILD.bazel index b2d7b3b02cbc1..2434390321951 100644 --- a/google/cloud/container/BUILD.bazel +++ b/google/cloud/container/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/container/v1:container_cc_grpc", + "@googleapis//google/container/v1:container_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/container/CMakeLists.txt b/google/cloud/container/CMakeLists.txt index a48f47b0f5aae..0e59e74c3ec1a 100644 --- a/google/cloud/container/CMakeLists.txt +++ b/google/cloud/container/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(container "Kubernetes Engine API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(container_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/container/cluster_manager_client.h b/google/cloud/container/cluster_manager_client.h deleted file mode 100644 index 2cfc33bb0b1b3..0000000000000 --- a/google/cloud/container/cluster_manager_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/container/v1/cluster_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINER_CLUSTER_MANAGER_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINER_CLUSTER_MANAGER_CLIENT_H - -#include "google/cloud/container/cluster_manager_connection.h" -#include "google/cloud/container/v1/cluster_manager_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in container_v1 instead of the aliases defined in -/// this namespace. -namespace container { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use container_v1::ClusterManagerClient directly. -using ::google::cloud::container_v1::ClusterManagerClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace container -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINER_CLUSTER_MANAGER_CLIENT_H diff --git a/google/cloud/container/cluster_manager_connection.h b/google/cloud/container/cluster_manager_connection.h deleted file mode 100644 index c8d2146e75a5c..0000000000000 --- a/google/cloud/container/cluster_manager_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/container/v1/cluster_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINER_CLUSTER_MANAGER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINER_CLUSTER_MANAGER_CONNECTION_H - -#include "google/cloud/container/cluster_manager_connection_idempotency_policy.h" -#include "google/cloud/container/v1/cluster_manager_connection.h" - -namespace google { -namespace cloud { -namespace container { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use container_v1::MakeClusterManagerConnection directly. -using ::google::cloud::container_v1::MakeClusterManagerConnection; - -/// @deprecated Use container_v1::ClusterManagerConnection directly. -using ::google::cloud::container_v1::ClusterManagerConnection; - -/// @deprecated Use container_v1::ClusterManagerLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::container_v1::ClusterManagerLimitedErrorCountRetryPolicy; - -/// @deprecated Use container_v1::ClusterManagerLimitedTimeRetryPolicy directly. -using ::google::cloud::container_v1::ClusterManagerLimitedTimeRetryPolicy; - -/// @deprecated Use container_v1::ClusterManagerRetryPolicy directly. -using ::google::cloud::container_v1::ClusterManagerRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace container -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINER_CLUSTER_MANAGER_CONNECTION_H diff --git a/google/cloud/container/cluster_manager_connection_idempotency_policy.h b/google/cloud/container/cluster_manager_connection_idempotency_policy.h deleted file mode 100644 index 9476103de4ad0..0000000000000 --- a/google/cloud/container/cluster_manager_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/container/v1/cluster_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINER_CLUSTER_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINER_CLUSTER_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/container/v1/cluster_manager_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace container { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// container_v1::MakeDefaultClusterManagerConnectionIdempotencyPolicy directly. -using ::google::cloud::container_v1:: - MakeDefaultClusterManagerConnectionIdempotencyPolicy; - -/// @deprecated Use container_v1::ClusterManagerConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::container_v1::ClusterManagerConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace container -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINER_CLUSTER_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/container/cluster_manager_options.h b/google/cloud/container/cluster_manager_options.h deleted file mode 100644 index 6e722b4ee47ea..0000000000000 --- a/google/cloud/container/cluster_manager_options.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/container/v1/cluster_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINER_CLUSTER_MANAGER_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINER_CLUSTER_MANAGER_OPTIONS_H - -#include "google/cloud/container/cluster_manager_connection.h" -#include "google/cloud/container/cluster_manager_connection_idempotency_policy.h" -#include "google/cloud/container/v1/cluster_manager_options.h" - -namespace google { -namespace cloud { -namespace container { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use container_v1::ClusterManagerBackoffPolicyOption directly. -using ::google::cloud::container_v1::ClusterManagerBackoffPolicyOption; - -/// @deprecated Use -/// container_v1::ClusterManagerConnectionIdempotencyPolicyOption directly. -using ::google::cloud::container_v1:: - ClusterManagerConnectionIdempotencyPolicyOption; - -/// @deprecated Use container_v1::ClusterManagerPolicyOptionList directly. -using ::google::cloud::container_v1::ClusterManagerPolicyOptionList; - -/// @deprecated Use container_v1::ClusterManagerRetryPolicyOption directly. -using ::google::cloud::container_v1::ClusterManagerRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace container -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINER_CLUSTER_MANAGER_OPTIONS_H diff --git a/google/cloud/container/mocks/mock_cluster_manager_connection.h b/google/cloud/container/mocks/mock_cluster_manager_connection.h deleted file mode 100644 index 17f08ba5a0524..0000000000000 --- a/google/cloud/container/mocks/mock_cluster_manager_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/container/v1/cluster_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINER_MOCKS_MOCK_CLUSTER_MANAGER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINER_MOCKS_MOCK_CLUSTER_MANAGER_CONNECTION_H - -#include "google/cloud/container/cluster_manager_connection.h" -#include "google/cloud/container/v1/mocks/mock_cluster_manager_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in container_v1_mocks instead of the aliases -/// defined in this namespace. -namespace container_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use container_v1_mocks::MockClusterManagerConnection directly. -using ::google::cloud::container_v1_mocks::MockClusterManagerConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace container_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINER_MOCKS_MOCK_CLUSTER_MANAGER_CONNECTION_H diff --git a/google/cloud/container/quickstart/.bazelrc b/google/cloud/container/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/container/quickstart/.bazelrc +++ b/google/cloud/container/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/container/quickstart/CMakeLists.txt b/google/cloud/container/quickstart/CMakeLists.txt index 72c928a4525a8..879fa857902bd 100644 --- a/google/cloud/container/quickstart/CMakeLists.txt +++ b/google/cloud/container/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Kubernetes Engine API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-container-quickstart CXX) find_package(google_cloud_cpp_container REQUIRED) diff --git a/google/cloud/container/v1/cluster_manager_connection.h b/google/cloud/container/v1/cluster_manager_connection.h index 018c91e9a5bbf..103048140a131 100644 --- a/google/cloud/container/v1/cluster_manager_connection.h +++ b/google/cloud/container/v1/cluster_manager_connection.h @@ -27,7 +27,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/container/v1/cluster_service.pb.h" #include namespace google { diff --git a/google/cloud/container/v1/cluster_manager_connection_idempotency_policy.h b/google/cloud/container/v1/cluster_manager_connection_idempotency_policy.h index 0586ff1a7c9bc..738aacec124d7 100644 --- a/google/cloud/container/v1/cluster_manager_connection_idempotency_policy.h +++ b/google/cloud/container/v1/cluster_manager_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/container/v1/cluster_service.grpc.pb.h" #include namespace google { diff --git a/google/cloud/container/v1/internal/cluster_manager_auth_decorator.cc b/google/cloud/container/v1/internal/cluster_manager_auth_decorator.cc index 4f9dd987efdf5..d9015331b8973 100644 --- a/google/cloud/container/v1/internal/cluster_manager_auth_decorator.cc +++ b/google/cloud/container/v1/internal/cluster_manager_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/container/v1/cluster_service.proto #include "google/cloud/container/v1/internal/cluster_manager_auth_decorator.h" -#include +#include "google/container/v1/cluster_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace container_v1_internal { @@ -339,3 +342,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace container_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/container/v1/internal/cluster_manager_auth_decorator.h b/google/cloud/container/v1/internal/cluster_manager_auth_decorator.h index 98f2df2da971b..33dbee27bada8 100644 --- a/google/cloud/container/v1/internal/cluster_manager_auth_decorator.h +++ b/google/cloud/container/v1/internal/cluster_manager_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace container_v1_internal { @@ -204,4 +207,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINER_V1_INTERNAL_CLUSTER_MANAGER_AUTH_DECORATOR_H diff --git a/google/cloud/container/v1/internal/cluster_manager_logging_decorator.cc b/google/cloud/container/v1/internal/cluster_manager_logging_decorator.cc index 960548280ba68..7b6c2446fd0b5 100644 --- a/google/cloud/container/v1/internal/cluster_manager_logging_decorator.cc +++ b/google/cloud/container/v1/internal/cluster_manager_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/container/v1/internal/cluster_manager_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/container/v1/cluster_service.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace container_v1_internal { @@ -468,3 +471,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace container_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/container/v1/internal/cluster_manager_logging_decorator.h b/google/cloud/container/v1/internal/cluster_manager_logging_decorator.h index 6734c047c3244..5b8376db3230e 100644 --- a/google/cloud/container/v1/internal/cluster_manager_logging_decorator.h +++ b/google/cloud/container/v1/internal/cluster_manager_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace container_v1_internal { @@ -204,4 +207,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINER_V1_INTERNAL_CLUSTER_MANAGER_LOGGING_DECORATOR_H diff --git a/google/cloud/container/v1/internal/cluster_manager_metadata_decorator.cc b/google/cloud/container/v1/internal/cluster_manager_metadata_decorator.cc index 35de0110ff0fd..ce4989076f964 100644 --- a/google/cloud/container/v1/internal/cluster_manager_metadata_decorator.cc +++ b/google/cloud/container/v1/internal/cluster_manager_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/container/v1/internal/cluster_manager_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/container/v1/cluster_service.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace container_v1_internal { @@ -377,3 +381,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace container_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/container/v1/internal/cluster_manager_metadata_decorator.h b/google/cloud/container/v1/internal/cluster_manager_metadata_decorator.h index 415abc58a4716..8dd9a2e80f6f9 100644 --- a/google/cloud/container/v1/internal/cluster_manager_metadata_decorator.h +++ b/google/cloud/container/v1/internal/cluster_manager_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace container_v1_internal { @@ -209,4 +212,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINER_V1_INTERNAL_CLUSTER_MANAGER_METADATA_DECORATOR_H diff --git a/google/cloud/container/v1/internal/cluster_manager_option_defaults.cc b/google/cloud/container/v1/internal/cluster_manager_option_defaults.cc index 426a4cd842c00..05535bde33ce1 100644 --- a/google/cloud/container/v1/internal/cluster_manager_option_defaults.cc +++ b/google/cloud/container/v1/internal/cluster_manager_option_defaults.cc @@ -41,7 +41,7 @@ Options ClusterManagerDefaultOptions(Options options) { if (!options.has()) { options.set( container_v1::ClusterManagerLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/container/v1/internal/cluster_manager_stub.cc b/google/cloud/container/v1/internal/cluster_manager_stub.cc index bae1aaee63141..221a7df3ef45d 100644 --- a/google/cloud/container/v1/internal/cluster_manager_stub.cc +++ b/google/cloud/container/v1/internal/cluster_manager_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/container/v1/internal/cluster_manager_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "google/container/v1/cluster_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace container_v1_internal { @@ -468,3 +471,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace container_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/container/v1/internal/cluster_manager_stub.h b/google/cloud/container/v1/internal/cluster_manager_stub.h index 8392d01c4087c..90f803a9c341c 100644 --- a/google/cloud/container/v1/internal/cluster_manager_stub.h +++ b/google/cloud/container/v1/internal/cluster_manager_stub.h @@ -22,10 +22,13 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/container/v1/cluster_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace container_v1_internal { @@ -361,4 +364,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINER_V1_INTERNAL_CLUSTER_MANAGER_STUB_H diff --git a/google/cloud/container/v1/internal/cluster_manager_stub_factory.cc b/google/cloud/container/v1/internal/cluster_manager_stub_factory.cc index 5b3e2419c3890..0ef707042f5d8 100644 --- a/google/cloud/container/v1/internal/cluster_manager_stub_factory.cc +++ b/google/cloud/container/v1/internal/cluster_manager_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/container/v1/cluster_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace container_v1_internal { @@ -69,3 +72,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace container_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/container/v1/internal/cluster_manager_stub_factory.h b/google/cloud/container/v1/internal/cluster_manager_stub_factory.h index cf4930392b4e9..b7a15728355f1 100644 --- a/google/cloud/container/v1/internal/cluster_manager_stub_factory.h +++ b/google/cloud/container/v1/internal/cluster_manager_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace container_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINER_V1_INTERNAL_CLUSTER_MANAGER_STUB_FACTORY_H diff --git a/google/cloud/container/v1/internal/cluster_manager_tracing_connection.cc b/google/cloud/container/v1/internal/cluster_manager_tracing_connection.cc index 9fe9f71cade3e..d1a8a05498bfa 100644 --- a/google/cloud/container/v1/internal/cluster_manager_tracing_connection.cc +++ b/google/cloud/container/v1/internal/cluster_manager_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace container_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ClusterManagerTracingConnection::ClusterManagerTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -357,16 +355,12 @@ ClusterManagerTracingConnection::FetchNodePoolUpgradeInfo( return internal::EndSpan(*span, child_->FetchNodePoolUpgradeInfo(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeClusterManagerTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/container/v1/internal/cluster_manager_tracing_connection.h b/google/cloud/container/v1/internal/cluster_manager_tracing_connection.h index 70897433b7a89..f68f7d980f562 100644 --- a/google/cloud/container/v1/internal/cluster_manager_tracing_connection.h +++ b/google/cloud/container/v1/internal/cluster_manager_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace container_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ClusterManagerTracingConnection : public container_v1::ClusterManagerConnection { public: @@ -162,8 +160,6 @@ class ClusterManagerTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/container/v1/internal/cluster_manager_tracing_stub.cc b/google/cloud/container/v1/internal/cluster_manager_tracing_stub.cc index 1f4f124fe3a78..9df2520823115 100644 --- a/google/cloud/container/v1/internal/cluster_manager_tracing_stub.cc +++ b/google/cloud/container/v1/internal/cluster_manager_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace container_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ClusterManagerTracingStub::ClusterManagerTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -466,18 +467,14 @@ ClusterManagerTracingStub::FetchNodePoolUpgradeInfo( child_->FetchNodePoolUpgradeInfo(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeClusterManagerTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace container_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/container/v1/internal/cluster_manager_tracing_stub.h b/google/cloud/container/v1/internal/cluster_manager_tracing_stub.h index 16c30c99574e5..fb05bd606e83b 100644 --- a/google/cloud/container/v1/internal/cluster_manager_tracing_stub.h +++ b/google/cloud/container/v1/internal/cluster_manager_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace container_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ClusterManagerTracingStub : public ClusterManagerStub { public: ~ClusterManagerTracingStub() override = default; @@ -200,8 +201,6 @@ class ClusterManagerTracingStub : public ClusterManagerStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -216,4 +215,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINER_V1_INTERNAL_CLUSTER_MANAGER_TRACING_STUB_H diff --git a/google/cloud/containeranalysis/BUILD.bazel b/google/cloud/containeranalysis/BUILD.bazel index f4ece6c9cb439..5b9a8a7d1384d 100644 --- a/google/cloud/containeranalysis/BUILD.bazel +++ b/google/cloud/containeranalysis/BUILD.bazel @@ -19,13 +19,12 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/devtools/containeranalysis/v1:containeranalysis_cc_grpc", - "@com_google_googleapis//grafeas/v1:grafeas_cc_grpc", + "@googleapis//google/devtools/containeranalysis/v1:containeranalysis_cc_grpc", + "@googleapis//grafeas/v1:grafeas_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/containeranalysis/CMakeLists.txt b/google/cloud/containeranalysis/CMakeLists.txt index 9a49ae976d0c4..c72d0536edb04 100644 --- a/google/cloud/containeranalysis/CMakeLists.txt +++ b/google/cloud/containeranalysis/CMakeLists.txt @@ -18,7 +18,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library( containeranalysis "Container Analysis API" - SERVICE_DIRS "__EMPTY__" "v1/" + SERVICE_DIRS "v1/" SHARED_PROTO_DEPS "grafeas") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) diff --git a/google/cloud/containeranalysis/container_analysis_client.h b/google/cloud/containeranalysis/container_analysis_client.h deleted file mode 100644 index 3206ecbda3a37..0000000000000 --- a/google/cloud/containeranalysis/container_analysis_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/devtools/containeranalysis/v1/containeranalysis.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_CONTAINER_ANALYSIS_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_CONTAINER_ANALYSIS_CLIENT_H - -#include "google/cloud/containeranalysis/container_analysis_connection.h" -#include "google/cloud/containeranalysis/v1/container_analysis_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in containeranalysis_v1 instead of the aliases defined in -/// this namespace. -namespace containeranalysis { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use containeranalysis_v1::ContainerAnalysisClient directly. -using ::google::cloud::containeranalysis_v1::ContainerAnalysisClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace containeranalysis -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_CONTAINER_ANALYSIS_CLIENT_H diff --git a/google/cloud/containeranalysis/container_analysis_connection.h b/google/cloud/containeranalysis/container_analysis_connection.h deleted file mode 100644 index 5d041a82725af..0000000000000 --- a/google/cloud/containeranalysis/container_analysis_connection.h +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/devtools/containeranalysis/v1/containeranalysis.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_CONTAINER_ANALYSIS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_CONTAINER_ANALYSIS_CONNECTION_H - -#include "google/cloud/containeranalysis/container_analysis_connection_idempotency_policy.h" -#include "google/cloud/containeranalysis/v1/container_analysis_connection.h" - -namespace google { -namespace cloud { -namespace containeranalysis { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use containeranalysis_v1::MakeContainerAnalysisConnection -/// directly. -using ::google::cloud::containeranalysis_v1::MakeContainerAnalysisConnection; - -/// @deprecated Use containeranalysis_v1::ContainerAnalysisConnection directly. -using ::google::cloud::containeranalysis_v1::ContainerAnalysisConnection; - -/// @deprecated Use -/// containeranalysis_v1::ContainerAnalysisLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::containeranalysis_v1:: - ContainerAnalysisLimitedErrorCountRetryPolicy; - -/// @deprecated Use -/// containeranalysis_v1::ContainerAnalysisLimitedTimeRetryPolicy directly. -using ::google::cloud::containeranalysis_v1:: - ContainerAnalysisLimitedTimeRetryPolicy; - -/// @deprecated Use containeranalysis_v1::ContainerAnalysisRetryPolicy directly. -using ::google::cloud::containeranalysis_v1::ContainerAnalysisRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace containeranalysis -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_CONTAINER_ANALYSIS_CONNECTION_H diff --git a/google/cloud/containeranalysis/container_analysis_connection_idempotency_policy.h b/google/cloud/containeranalysis/container_analysis_connection_idempotency_policy.h deleted file mode 100644 index f470e99249080..0000000000000 --- a/google/cloud/containeranalysis/container_analysis_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/devtools/containeranalysis/v1/containeranalysis.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_CONTAINER_ANALYSIS_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_CONTAINER_ANALYSIS_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/containeranalysis/v1/container_analysis_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace containeranalysis { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// containeranalysis_v1::MakeDefaultContainerAnalysisConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::containeranalysis_v1:: - MakeDefaultContainerAnalysisConnectionIdempotencyPolicy; - -/// @deprecated Use -/// containeranalysis_v1::ContainerAnalysisConnectionIdempotencyPolicy directly. -using ::google::cloud::containeranalysis_v1:: - ContainerAnalysisConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace containeranalysis -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_CONTAINER_ANALYSIS_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/containeranalysis/container_analysis_options.h b/google/cloud/containeranalysis/container_analysis_options.h deleted file mode 100644 index 3155dccd131b6..0000000000000 --- a/google/cloud/containeranalysis/container_analysis_options.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/devtools/containeranalysis/v1/containeranalysis.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_CONTAINER_ANALYSIS_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_CONTAINER_ANALYSIS_OPTIONS_H - -#include "google/cloud/containeranalysis/container_analysis_connection.h" -#include "google/cloud/containeranalysis/container_analysis_connection_idempotency_policy.h" -#include "google/cloud/containeranalysis/v1/container_analysis_options.h" - -namespace google { -namespace cloud { -namespace containeranalysis { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use containeranalysis_v1::ContainerAnalysisBackoffPolicyOption -/// directly. -using ::google::cloud::containeranalysis_v1:: - ContainerAnalysisBackoffPolicyOption; - -/// @deprecated Use -/// containeranalysis_v1::ContainerAnalysisConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::containeranalysis_v1:: - ContainerAnalysisConnectionIdempotencyPolicyOption; - -/// @deprecated Use containeranalysis_v1::ContainerAnalysisPolicyOptionList -/// directly. -using ::google::cloud::containeranalysis_v1::ContainerAnalysisPolicyOptionList; - -/// @deprecated Use containeranalysis_v1::ContainerAnalysisRetryPolicyOption -/// directly. -using ::google::cloud::containeranalysis_v1::ContainerAnalysisRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace containeranalysis -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_CONTAINER_ANALYSIS_OPTIONS_H diff --git a/google/cloud/containeranalysis/grafeas_client.h b/google/cloud/containeranalysis/grafeas_client.h deleted file mode 100644 index a0c498a947217..0000000000000 --- a/google/cloud/containeranalysis/grafeas_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: grafeas/v1/grafeas.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_GRAFEAS_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_GRAFEAS_CLIENT_H - -#include "google/cloud/containeranalysis/grafeas_connection.h" -#include "google/cloud/containeranalysis/v1/grafeas_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in containeranalysis_v1 instead of the aliases defined in -/// this namespace. -namespace containeranalysis { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use containeranalysis_v1::GrafeasClient directly. -using ::google::cloud::containeranalysis_v1::GrafeasClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace containeranalysis -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_GRAFEAS_CLIENT_H diff --git a/google/cloud/containeranalysis/grafeas_connection.h b/google/cloud/containeranalysis/grafeas_connection.h deleted file mode 100644 index 5063a359e95eb..0000000000000 --- a/google/cloud/containeranalysis/grafeas_connection.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: grafeas/v1/grafeas.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_GRAFEAS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_GRAFEAS_CONNECTION_H - -#include "google/cloud/containeranalysis/grafeas_connection_idempotency_policy.h" -#include "google/cloud/containeranalysis/v1/grafeas_connection.h" - -namespace google { -namespace cloud { -namespace containeranalysis { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use containeranalysis_v1::MakeGrafeasConnection directly. -using ::google::cloud::containeranalysis_v1::MakeGrafeasConnection; - -/// @deprecated Use containeranalysis_v1::GrafeasConnection directly. -using ::google::cloud::containeranalysis_v1::GrafeasConnection; - -/// @deprecated Use containeranalysis_v1::GrafeasLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::containeranalysis_v1:: - GrafeasLimitedErrorCountRetryPolicy; - -/// @deprecated Use containeranalysis_v1::GrafeasLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::containeranalysis_v1::GrafeasLimitedTimeRetryPolicy; - -/// @deprecated Use containeranalysis_v1::GrafeasRetryPolicy directly. -using ::google::cloud::containeranalysis_v1::GrafeasRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace containeranalysis -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_GRAFEAS_CONNECTION_H diff --git a/google/cloud/containeranalysis/grafeas_connection_idempotency_policy.h b/google/cloud/containeranalysis/grafeas_connection_idempotency_policy.h deleted file mode 100644 index 00119fd153c1b..0000000000000 --- a/google/cloud/containeranalysis/grafeas_connection_idempotency_policy.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: grafeas/v1/grafeas.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_GRAFEAS_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_GRAFEAS_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/containeranalysis/v1/grafeas_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace containeranalysis { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// containeranalysis_v1::MakeDefaultGrafeasConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::containeranalysis_v1:: - MakeDefaultGrafeasConnectionIdempotencyPolicy; - -/// @deprecated Use containeranalysis_v1::GrafeasConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::containeranalysis_v1::GrafeasConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace containeranalysis -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_GRAFEAS_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/containeranalysis/grafeas_options.h b/google/cloud/containeranalysis/grafeas_options.h deleted file mode 100644 index eb401b2f4cb0e..0000000000000 --- a/google/cloud/containeranalysis/grafeas_options.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: grafeas/v1/grafeas.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_GRAFEAS_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_GRAFEAS_OPTIONS_H - -#include "google/cloud/containeranalysis/grafeas_connection.h" -#include "google/cloud/containeranalysis/grafeas_connection_idempotency_policy.h" -#include "google/cloud/containeranalysis/v1/grafeas_options.h" - -namespace google { -namespace cloud { -namespace containeranalysis { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use containeranalysis_v1::GrafeasBackoffPolicyOption directly. -using ::google::cloud::containeranalysis_v1::GrafeasBackoffPolicyOption; - -/// @deprecated Use -/// containeranalysis_v1::GrafeasConnectionIdempotencyPolicyOption directly. -using ::google::cloud::containeranalysis_v1:: - GrafeasConnectionIdempotencyPolicyOption; - -/// @deprecated Use containeranalysis_v1::GrafeasPolicyOptionList directly. -using ::google::cloud::containeranalysis_v1::GrafeasPolicyOptionList; - -/// @deprecated Use containeranalysis_v1::GrafeasRetryPolicyOption directly. -using ::google::cloud::containeranalysis_v1::GrafeasRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace containeranalysis -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_GRAFEAS_OPTIONS_H diff --git a/google/cloud/containeranalysis/mocks/mock_container_analysis_connection.h b/google/cloud/containeranalysis/mocks/mock_container_analysis_connection.h deleted file mode 100644 index 021e4e6267ab1..0000000000000 --- a/google/cloud/containeranalysis/mocks/mock_container_analysis_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/devtools/containeranalysis/v1/containeranalysis.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_MOCKS_MOCK_CONTAINER_ANALYSIS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_MOCKS_MOCK_CONTAINER_ANALYSIS_CONNECTION_H - -#include "google/cloud/containeranalysis/container_analysis_connection.h" -#include "google/cloud/containeranalysis/v1/mocks/mock_container_analysis_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in containeranalysis_v1_mocks instead of the aliases -/// defined in this namespace. -namespace containeranalysis_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use containeranalysis_v1_mocks::MockContainerAnalysisConnection -/// directly. -using ::google::cloud::containeranalysis_v1_mocks:: - MockContainerAnalysisConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace containeranalysis_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_MOCKS_MOCK_CONTAINER_ANALYSIS_CONNECTION_H diff --git a/google/cloud/containeranalysis/mocks/mock_grafeas_connection.h b/google/cloud/containeranalysis/mocks/mock_grafeas_connection.h deleted file mode 100644 index f205f0fca3710..0000000000000 --- a/google/cloud/containeranalysis/mocks/mock_grafeas_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: grafeas/v1/grafeas.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_MOCKS_MOCK_GRAFEAS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_MOCKS_MOCK_GRAFEAS_CONNECTION_H - -#include "google/cloud/containeranalysis/grafeas_connection.h" -#include "google/cloud/containeranalysis/v1/mocks/mock_grafeas_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in containeranalysis_v1_mocks instead of the aliases -/// defined in this namespace. -namespace containeranalysis_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use containeranalysis_v1_mocks::MockGrafeasConnection directly. -using ::google::cloud::containeranalysis_v1_mocks::MockGrafeasConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace containeranalysis_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_MOCKS_MOCK_GRAFEAS_CONNECTION_H diff --git a/google/cloud/containeranalysis/quickstart/.bazelrc b/google/cloud/containeranalysis/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/containeranalysis/quickstart/.bazelrc +++ b/google/cloud/containeranalysis/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/containeranalysis/quickstart/CMakeLists.txt b/google/cloud/containeranalysis/quickstart/CMakeLists.txt index e34c9c2e2cec9..1ea25628e8978 100644 --- a/google/cloud/containeranalysis/quickstart/CMakeLists.txt +++ b/google/cloud/containeranalysis/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Container Analysis API C++ client library from # a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-containeranalysis-quickstart CXX) find_package(google_cloud_cpp_containeranalysis REQUIRED) diff --git a/google/cloud/containeranalysis/v1/container_analysis_connection.h b/google/cloud/containeranalysis/v1/container_analysis_connection.h index 59a64733509e8..ab5907bb62f83 100644 --- a/google/cloud/containeranalysis/v1/container_analysis_connection.h +++ b/google/cloud/containeranalysis/v1/container_analysis_connection.h @@ -26,8 +26,8 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/devtools/containeranalysis/v1/containeranalysis.pb.h" +#include "grafeas/v1/grafeas.pb.h" #include namespace google { diff --git a/google/cloud/containeranalysis/v1/container_analysis_connection_idempotency_policy.h b/google/cloud/containeranalysis/v1/container_analysis_connection_idempotency_policy.h index 1c4559ab3be1c..88efa555588b8 100644 --- a/google/cloud/containeranalysis/v1/container_analysis_connection_idempotency_policy.h +++ b/google/cloud/containeranalysis/v1/container_analysis_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/devtools/containeranalysis/v1/containeranalysis.grpc.pb.h" #include namespace google { diff --git a/google/cloud/containeranalysis/v1/grafeas_connection.h b/google/cloud/containeranalysis/v1/grafeas_connection.h index c5a86effc70f4..bbf752505c335 100644 --- a/google/cloud/containeranalysis/v1/grafeas_connection.h +++ b/google/cloud/containeranalysis/v1/grafeas_connection.h @@ -27,7 +27,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "grafeas/v1/grafeas.pb.h" #include namespace google { diff --git a/google/cloud/containeranalysis/v1/grafeas_connection_idempotency_policy.h b/google/cloud/containeranalysis/v1/grafeas_connection_idempotency_policy.h index 22c02176e5f78..d9f2325e85376 100644 --- a/google/cloud/containeranalysis/v1/grafeas_connection_idempotency_policy.h +++ b/google/cloud/containeranalysis/v1/grafeas_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "grafeas/v1/grafeas.grpc.pb.h" #include namespace google { diff --git a/google/cloud/containeranalysis/v1/internal/container_analysis_auth_decorator.cc b/google/cloud/containeranalysis/v1/internal/container_analysis_auth_decorator.cc index f8dbe7f191f02..e9707374c020d 100644 --- a/google/cloud/containeranalysis/v1/internal/container_analysis_auth_decorator.cc +++ b/google/cloud/containeranalysis/v1/internal/container_analysis_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/devtools/containeranalysis/v1/containeranalysis.proto #include "google/cloud/containeranalysis/v1/internal/container_analysis_auth_decorator.h" -#include +#include "google/devtools/containeranalysis/v1/containeranalysis.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace containeranalysis_v1_internal { @@ -80,3 +83,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace containeranalysis_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/containeranalysis/v1/internal/container_analysis_auth_decorator.h b/google/cloud/containeranalysis/v1/internal/container_analysis_auth_decorator.h index f64f18be254cc..6d3b2c84f9db3 100644 --- a/google/cloud/containeranalysis/v1/internal/container_analysis_auth_decorator.h +++ b/google/cloud/containeranalysis/v1/internal/container_analysis_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace containeranalysis_v1_internal { @@ -72,4 +75,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_V1_INTERNAL_CONTAINER_ANALYSIS_AUTH_DECORATOR_H diff --git a/google/cloud/containeranalysis/v1/internal/container_analysis_logging_decorator.cc b/google/cloud/containeranalysis/v1/internal/container_analysis_logging_decorator.cc index d1144fa9aae2d..e9af3faeca5a5 100644 --- a/google/cloud/containeranalysis/v1/internal/container_analysis_logging_decorator.cc +++ b/google/cloud/containeranalysis/v1/internal/container_analysis_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/containeranalysis/v1/internal/container_analysis_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/devtools/containeranalysis/v1/containeranalysis.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace containeranalysis_v1_internal { @@ -102,3 +105,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace containeranalysis_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/containeranalysis/v1/internal/container_analysis_logging_decorator.h b/google/cloud/containeranalysis/v1/internal/container_analysis_logging_decorator.h index ba2186ac86c21..2be0d93a95a23 100644 --- a/google/cloud/containeranalysis/v1/internal/container_analysis_logging_decorator.h +++ b/google/cloud/containeranalysis/v1/internal/container_analysis_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace containeranalysis_v1_internal { @@ -72,4 +75,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_V1_INTERNAL_CONTAINER_ANALYSIS_LOGGING_DECORATOR_H diff --git a/google/cloud/containeranalysis/v1/internal/container_analysis_metadata_decorator.cc b/google/cloud/containeranalysis/v1/internal/container_analysis_metadata_decorator.cc index cb8b95085b906..9a02886015b2f 100644 --- a/google/cloud/containeranalysis/v1/internal/container_analysis_metadata_decorator.cc +++ b/google/cloud/containeranalysis/v1/internal/container_analysis_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/containeranalysis/v1/internal/container_analysis_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/devtools/containeranalysis/v1/containeranalysis.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace containeranalysis_v1_internal { @@ -109,3 +113,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace containeranalysis_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/containeranalysis/v1/internal/container_analysis_metadata_decorator.h b/google/cloud/containeranalysis/v1/internal/container_analysis_metadata_decorator.h index a78db8ea8973e..772570fba6003 100644 --- a/google/cloud/containeranalysis/v1/internal/container_analysis_metadata_decorator.h +++ b/google/cloud/containeranalysis/v1/internal/container_analysis_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace containeranalysis_v1_internal { @@ -78,4 +81,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_V1_INTERNAL_CONTAINER_ANALYSIS_METADATA_DECORATOR_H diff --git a/google/cloud/containeranalysis/v1/internal/container_analysis_option_defaults.cc b/google/cloud/containeranalysis/v1/internal/container_analysis_option_defaults.cc index b5f5153b1f38e..a443d0ca0f1fb 100644 --- a/google/cloud/containeranalysis/v1/internal/container_analysis_option_defaults.cc +++ b/google/cloud/containeranalysis/v1/internal/container_analysis_option_defaults.cc @@ -43,7 +43,7 @@ Options ContainerAnalysisDefaultOptions(Options options) { .has()) { options.set( containeranalysis_v1::ContainerAnalysisLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/containeranalysis/v1/internal/container_analysis_stub.cc b/google/cloud/containeranalysis/v1/internal/container_analysis_stub.cc index 23073dd60b177..d530172072945 100644 --- a/google/cloud/containeranalysis/v1/internal/container_analysis_stub.cc +++ b/google/cloud/containeranalysis/v1/internal/container_analysis_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/containeranalysis/v1/internal/container_analysis_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "google/devtools/containeranalysis/v1/containeranalysis.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace containeranalysis_v1_internal { @@ -96,3 +99,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace containeranalysis_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/containeranalysis/v1/internal/container_analysis_stub.h b/google/cloud/containeranalysis/v1/internal/container_analysis_stub.h index 06336b4e1fce0..367ce2c46ca23 100644 --- a/google/cloud/containeranalysis/v1/internal/container_analysis_stub.h +++ b/google/cloud/containeranalysis/v1/internal/container_analysis_stub.h @@ -22,11 +22,14 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/devtools/containeranalysis/v1/containeranalysis.grpc.pb.h" +#include "grafeas/v1/grafeas.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace containeranalysis_v1_internal { @@ -105,4 +108,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_V1_INTERNAL_CONTAINER_ANALYSIS_STUB_H diff --git a/google/cloud/containeranalysis/v1/internal/container_analysis_stub_factory.cc b/google/cloud/containeranalysis/v1/internal/container_analysis_stub_factory.cc index 420f44269f365..2b5ece2f747e6 100644 --- a/google/cloud/containeranalysis/v1/internal/container_analysis_stub_factory.cc +++ b/google/cloud/containeranalysis/v1/internal/container_analysis_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/devtools/containeranalysis/v1/containeranalysis.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace containeranalysis_v1_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace containeranalysis_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/containeranalysis/v1/internal/container_analysis_stub_factory.h b/google/cloud/containeranalysis/v1/internal/container_analysis_stub_factory.h index f9e3c0533b0ee..be767f0192170 100644 --- a/google/cloud/containeranalysis/v1/internal/container_analysis_stub_factory.h +++ b/google/cloud/containeranalysis/v1/internal/container_analysis_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace containeranalysis_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_V1_INTERNAL_CONTAINER_ANALYSIS_STUB_FACTORY_H diff --git a/google/cloud/containeranalysis/v1/internal/container_analysis_tracing_connection.cc b/google/cloud/containeranalysis/v1/internal/container_analysis_tracing_connection.cc index fe633be067169..312552a7242df 100644 --- a/google/cloud/containeranalysis/v1/internal/container_analysis_tracing_connection.cc +++ b/google/cloud/containeranalysis/v1/internal/container_analysis_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace containeranalysis_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ContainerAnalysisTracingConnection::ContainerAnalysisTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -81,17 +79,13 @@ ContainerAnalysisTracingConnection::ExportSBOM( return internal::EndSpan(*span, child_->ExportSBOM(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeContainerAnalysisTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/containeranalysis/v1/internal/container_analysis_tracing_connection.h b/google/cloud/containeranalysis/v1/internal/container_analysis_tracing_connection.h index 8554e743456b5..c0b2de2567597 100644 --- a/google/cloud/containeranalysis/v1/internal/container_analysis_tracing_connection.h +++ b/google/cloud/containeranalysis/v1/internal/container_analysis_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace containeranalysis_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ContainerAnalysisTracingConnection : public containeranalysis_v1::ContainerAnalysisConnection { public: @@ -63,8 +61,6 @@ class ContainerAnalysisTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/containeranalysis/v1/internal/container_analysis_tracing_stub.cc b/google/cloud/containeranalysis/v1/internal/container_analysis_tracing_stub.cc index 790b04bf50ebc..491a63bdc9695 100644 --- a/google/cloud/containeranalysis/v1/internal/container_analysis_tracing_stub.cc +++ b/google/cloud/containeranalysis/v1/internal/container_analysis_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace containeranalysis_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ContainerAnalysisTracingStub::ContainerAnalysisTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -95,18 +96,14 @@ ContainerAnalysisTracingStub::ExportSBOM( child_->ExportSBOM(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeContainerAnalysisTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace containeranalysis_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/containeranalysis/v1/internal/container_analysis_tracing_stub.h b/google/cloud/containeranalysis/v1/internal/container_analysis_tracing_stub.h index e3caba67aaf39..5f4bda94c49ea 100644 --- a/google/cloud/containeranalysis/v1/internal/container_analysis_tracing_stub.h +++ b/google/cloud/containeranalysis/v1/internal/container_analysis_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace containeranalysis_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ContainerAnalysisTracingStub : public ContainerAnalysisStub { public: ~ContainerAnalysisTracingStub() override = default; @@ -69,8 +70,6 @@ class ContainerAnalysisTracingStub : public ContainerAnalysisStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -85,4 +84,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_V1_INTERNAL_CONTAINER_ANALYSIS_TRACING_STUB_H diff --git a/google/cloud/containeranalysis/v1/internal/grafeas_auth_decorator.cc b/google/cloud/containeranalysis/v1/internal/grafeas_auth_decorator.cc index 521ca7490bea0..16ef9984eef3e 100644 --- a/google/cloud/containeranalysis/v1/internal/grafeas_auth_decorator.cc +++ b/google/cloud/containeranalysis/v1/internal/grafeas_auth_decorator.cc @@ -17,10 +17,13 @@ // source: grafeas/v1/grafeas.proto #include "google/cloud/containeranalysis/v1/internal/grafeas_auth_decorator.h" -#include +#include "grafeas/v1/grafeas.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace containeranalysis_v1_internal { @@ -149,3 +152,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace containeranalysis_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/containeranalysis/v1/internal/grafeas_auth_decorator.h b/google/cloud/containeranalysis/v1/internal/grafeas_auth_decorator.h index b13518b73587e..f39f8717437f4 100644 --- a/google/cloud/containeranalysis/v1/internal/grafeas_auth_decorator.h +++ b/google/cloud/containeranalysis/v1/internal/grafeas_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace containeranalysis_v1_internal { @@ -103,4 +106,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_V1_INTERNAL_GRAFEAS_AUTH_DECORATOR_H diff --git a/google/cloud/containeranalysis/v1/internal/grafeas_logging_decorator.cc b/google/cloud/containeranalysis/v1/internal/grafeas_logging_decorator.cc index 836b80e8027bd..2391785e20387 100644 --- a/google/cloud/containeranalysis/v1/internal/grafeas_logging_decorator.cc +++ b/google/cloud/containeranalysis/v1/internal/grafeas_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/containeranalysis/v1/internal/grafeas_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "grafeas/v1/grafeas.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace containeranalysis_v1_internal { @@ -196,3 +199,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace containeranalysis_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/containeranalysis/v1/internal/grafeas_logging_decorator.h b/google/cloud/containeranalysis/v1/internal/grafeas_logging_decorator.h index 08c5ea915ff64..af7ecf323e81c 100644 --- a/google/cloud/containeranalysis/v1/internal/grafeas_logging_decorator.h +++ b/google/cloud/containeranalysis/v1/internal/grafeas_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace containeranalysis_v1_internal { @@ -103,4 +106,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_V1_INTERNAL_GRAFEAS_LOGGING_DECORATOR_H diff --git a/google/cloud/containeranalysis/v1/internal/grafeas_metadata_decorator.cc b/google/cloud/containeranalysis/v1/internal/grafeas_metadata_decorator.cc index 589fc9d80fa5a..2f0523c024ec2 100644 --- a/google/cloud/containeranalysis/v1/internal/grafeas_metadata_decorator.cc +++ b/google/cloud/containeranalysis/v1/internal/grafeas_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/containeranalysis/v1/internal/grafeas_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "grafeas/v1/grafeas.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace containeranalysis_v1_internal { @@ -176,3 +180,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace containeranalysis_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/containeranalysis/v1/internal/grafeas_metadata_decorator.h b/google/cloud/containeranalysis/v1/internal/grafeas_metadata_decorator.h index 7041e8dfd4797..0ae85faa8c4b9 100644 --- a/google/cloud/containeranalysis/v1/internal/grafeas_metadata_decorator.h +++ b/google/cloud/containeranalysis/v1/internal/grafeas_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace containeranalysis_v1_internal { @@ -108,4 +111,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_V1_INTERNAL_GRAFEAS_METADATA_DECORATOR_H diff --git a/google/cloud/containeranalysis/v1/internal/grafeas_option_defaults.cc b/google/cloud/containeranalysis/v1/internal/grafeas_option_defaults.cc index 850253aab8dd0..45f40a51ab899 100644 --- a/google/cloud/containeranalysis/v1/internal/grafeas_option_defaults.cc +++ b/google/cloud/containeranalysis/v1/internal/grafeas_option_defaults.cc @@ -41,7 +41,7 @@ Options GrafeasDefaultOptions(Options options) { if (!options.has()) { options.set( containeranalysis_v1::GrafeasLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/containeranalysis/v1/internal/grafeas_stub.cc b/google/cloud/containeranalysis/v1/internal/grafeas_stub.cc index e5e03aeb57d56..5310ffc43b9b1 100644 --- a/google/cloud/containeranalysis/v1/internal/grafeas_stub.cc +++ b/google/cloud/containeranalysis/v1/internal/grafeas_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/containeranalysis/v1/internal/grafeas_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "grafeas/v1/grafeas.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace containeranalysis_v1_internal { @@ -193,3 +196,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace containeranalysis_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/containeranalysis/v1/internal/grafeas_stub.h b/google/cloud/containeranalysis/v1/internal/grafeas_stub.h index 3d5c538a331ab..3bba2789cb6d9 100644 --- a/google/cloud/containeranalysis/v1/internal/grafeas_stub.h +++ b/google/cloud/containeranalysis/v1/internal/grafeas_stub.h @@ -22,11 +22,14 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "grafeas/v1/grafeas.grpc.pb.h" +#include "grafeas/v1/grafeas.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace containeranalysis_v1_internal { @@ -165,4 +168,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_V1_INTERNAL_GRAFEAS_STUB_H diff --git a/google/cloud/containeranalysis/v1/internal/grafeas_stub_factory.cc b/google/cloud/containeranalysis/v1/internal/grafeas_stub_factory.cc index 9a6d3b87fbf6b..11dffe5c426eb 100644 --- a/google/cloud/containeranalysis/v1/internal/grafeas_stub_factory.cc +++ b/google/cloud/containeranalysis/v1/internal/grafeas_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "grafeas/v1/grafeas.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace containeranalysis_v1_internal { @@ -67,3 +70,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace containeranalysis_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/containeranalysis/v1/internal/grafeas_stub_factory.h b/google/cloud/containeranalysis/v1/internal/grafeas_stub_factory.h index 3580185f612f1..4b0c8ebc1e91b 100644 --- a/google/cloud/containeranalysis/v1/internal/grafeas_stub_factory.h +++ b/google/cloud/containeranalysis/v1/internal/grafeas_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace containeranalysis_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_V1_INTERNAL_GRAFEAS_STUB_FACTORY_H diff --git a/google/cloud/containeranalysis/v1/internal/grafeas_tracing_connection.cc b/google/cloud/containeranalysis/v1/internal/grafeas_tracing_connection.cc index 4482c4fa683c6..0e5b38f6c1287 100644 --- a/google/cloud/containeranalysis/v1/internal/grafeas_tracing_connection.cc +++ b/google/cloud/containeranalysis/v1/internal/grafeas_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace containeranalysis_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GrafeasTracingConnection::GrafeasTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -154,16 +152,12 @@ GrafeasTracingConnection::ListNoteOccurrences( std::move(span), std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeGrafeasTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/containeranalysis/v1/internal/grafeas_tracing_connection.h b/google/cloud/containeranalysis/v1/internal/grafeas_tracing_connection.h index 16f7239110651..f0fc0e16dfcdd 100644 --- a/google/cloud/containeranalysis/v1/internal/grafeas_tracing_connection.h +++ b/google/cloud/containeranalysis/v1/internal/grafeas_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace containeranalysis_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class GrafeasTracingConnection : public containeranalysis_v1::GrafeasConnection { public: @@ -85,8 +83,6 @@ class GrafeasTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/containeranalysis/v1/internal/grafeas_tracing_stub.cc b/google/cloud/containeranalysis/v1/internal/grafeas_tracing_stub.cc index 2eb1ed828366f..14217d5589d1b 100644 --- a/google/cloud/containeranalysis/v1/internal/grafeas_tracing_stub.cc +++ b/google/cloud/containeranalysis/v1/internal/grafeas_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace containeranalysis_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GrafeasTracingStub::GrafeasTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -178,18 +179,14 @@ GrafeasTracingStub::ListNoteOccurrences( context, *span, child_->ListNoteOccurrences(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeGrafeasTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace containeranalysis_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/containeranalysis/v1/internal/grafeas_tracing_stub.h b/google/cloud/containeranalysis/v1/internal/grafeas_tracing_stub.h index a0c1933cda188..077a159570067 100644 --- a/google/cloud/containeranalysis/v1/internal/grafeas_tracing_stub.h +++ b/google/cloud/containeranalysis/v1/internal/grafeas_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace containeranalysis_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class GrafeasTracingStub : public GrafeasStub { public: ~GrafeasTracingStub() override = default; @@ -99,8 +100,6 @@ class GrafeasTracingStub : public GrafeasStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -115,4 +114,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTAINERANALYSIS_V1_INTERNAL_GRAFEAS_TRACING_STUB_H diff --git a/google/cloud/contentwarehouse/BUILD.bazel b/google/cloud/contentwarehouse/BUILD.bazel index b5a662ef40055..03f9997275e6f 100644 --- a/google/cloud/contentwarehouse/BUILD.bazel +++ b/google/cloud/contentwarehouse/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/contentwarehouse/v1:contentwarehouse_cc_grpc", + "@googleapis//google/cloud/contentwarehouse/v1:contentwarehouse_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/contentwarehouse/quickstart/.bazelrc b/google/cloud/contentwarehouse/quickstart/.bazelrc index 6777c6b4c95de..ec27511a60add 100644 --- a/google/cloud/contentwarehouse/quickstart/.bazelrc +++ b/google/cloud/contentwarehouse/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/contentwarehouse/quickstart/CMakeLists.txt b/google/cloud/contentwarehouse/quickstart/CMakeLists.txt index be8b29a0c302c..b303a40c283ee 100644 --- a/google/cloud/contentwarehouse/quickstart/CMakeLists.txt +++ b/google/cloud/contentwarehouse/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Document AI Warehouse API C++ client library # from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-contentwarehouse-quickstart CXX) find_package(google_cloud_cpp_contentwarehouse REQUIRED) diff --git a/google/cloud/contentwarehouse/v1/document_connection.h b/google/cloud/contentwarehouse/v1/document_connection.h index 1a0e008da62ff..94189af074f15 100644 --- a/google/cloud/contentwarehouse/v1/document_connection.h +++ b/google/cloud/contentwarehouse/v1/document_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_DOCUMENT_CONNECTION_H #include "google/cloud/contentwarehouse/v1/document_connection_idempotency_policy.h" +#include "google/cloud/contentwarehouse/v1/document_service.pb.h" #include "google/cloud/contentwarehouse/v1/internal/document_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/contentwarehouse/v1/document_connection_idempotency_policy.h b/google/cloud/contentwarehouse/v1/document_connection_idempotency_policy.h index 4e26deb025356..0079dbc52ad0d 100644 --- a/google/cloud/contentwarehouse/v1/document_connection_idempotency_policy.h +++ b/google/cloud/contentwarehouse/v1/document_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_DOCUMENT_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_DOCUMENT_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/contentwarehouse/v1/document_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/contentwarehouse/v1/document_link_connection.h b/google/cloud/contentwarehouse/v1/document_link_connection.h index ea8b4a54c08e3..c24d8c0fba134 100644 --- a/google/cloud/contentwarehouse/v1/document_link_connection.h +++ b/google/cloud/contentwarehouse/v1/document_link_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_DOCUMENT_LINK_CONNECTION_H #include "google/cloud/contentwarehouse/v1/document_link_connection_idempotency_policy.h" +#include "google/cloud/contentwarehouse/v1/document_link_service.pb.h" #include "google/cloud/contentwarehouse/v1/internal/document_link_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/contentwarehouse/v1/document_link_connection_idempotency_policy.h b/google/cloud/contentwarehouse/v1/document_link_connection_idempotency_policy.h index ba62e4baed9bf..be4728b058504 100644 --- a/google/cloud/contentwarehouse/v1/document_link_connection_idempotency_policy.h +++ b/google/cloud/contentwarehouse/v1/document_link_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_DOCUMENT_LINK_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_DOCUMENT_LINK_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/contentwarehouse/v1/document_link_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/contentwarehouse/v1/document_schema_connection.h b/google/cloud/contentwarehouse/v1/document_schema_connection.h index f7155e890b530..39f4c51bca8b0 100644 --- a/google/cloud/contentwarehouse/v1/document_schema_connection.h +++ b/google/cloud/contentwarehouse/v1/document_schema_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_DOCUMENT_SCHEMA_CONNECTION_H #include "google/cloud/contentwarehouse/v1/document_schema_connection_idempotency_policy.h" +#include "google/cloud/contentwarehouse/v1/document_schema_service.pb.h" #include "google/cloud/contentwarehouse/v1/internal/document_schema_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/contentwarehouse/v1/document_schema_connection_idempotency_policy.h b/google/cloud/contentwarehouse/v1/document_schema_connection_idempotency_policy.h index 106a9fb21fcb7..0a165cd774846 100644 --- a/google/cloud/contentwarehouse/v1/document_schema_connection_idempotency_policy.h +++ b/google/cloud/contentwarehouse/v1/document_schema_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_DOCUMENT_SCHEMA_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_DOCUMENT_SCHEMA_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/contentwarehouse/v1/document_schema_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/contentwarehouse/v1/internal/document_auth_decorator.cc b/google/cloud/contentwarehouse/v1/internal/document_auth_decorator.cc index bd096b6e74c46..9059e69aa642a 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_auth_decorator.cc +++ b/google/cloud/contentwarehouse/v1/internal/document_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/contentwarehouse/v1/document_service.proto #include "google/cloud/contentwarehouse/v1/internal/document_auth_decorator.h" -#include +#include "google/cloud/contentwarehouse/v1/document_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -115,3 +118,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/document_auth_decorator.h b/google/cloud/contentwarehouse/v1/internal/document_auth_decorator.h index 074877a10a580..3b3d0846e8fd8 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_auth_decorator.h +++ b/google/cloud/contentwarehouse/v1/internal/document_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -95,4 +98,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_DOCUMENT_AUTH_DECORATOR_H diff --git a/google/cloud/contentwarehouse/v1/internal/document_link_auth_decorator.cc b/google/cloud/contentwarehouse/v1/internal/document_link_auth_decorator.cc index 7e007fb590c60..d3b4a55ec6466 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_link_auth_decorator.cc +++ b/google/cloud/contentwarehouse/v1/internal/document_link_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/contentwarehouse/v1/document_link_service.proto #include "google/cloud/contentwarehouse/v1/internal/document_link_auth_decorator.h" -#include +#include "google/cloud/contentwarehouse/v1/document_link_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -82,3 +85,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/document_link_auth_decorator.h b/google/cloud/contentwarehouse/v1/internal/document_link_auth_decorator.h index c9398bf30ac30..957b1a1d8a5d2 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_link_auth_decorator.h +++ b/google/cloud/contentwarehouse/v1/internal/document_link_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -75,4 +78,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_DOCUMENT_LINK_AUTH_DECORATOR_H diff --git a/google/cloud/contentwarehouse/v1/internal/document_link_logging_decorator.cc b/google/cloud/contentwarehouse/v1/internal/document_link_logging_decorator.cc index c582ca2016a5a..c9c5b58bfcca6 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_link_logging_decorator.cc +++ b/google/cloud/contentwarehouse/v1/internal/document_link_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/contentwarehouse/v1/document_link_service.proto #include "google/cloud/contentwarehouse/v1/internal/document_link_logging_decorator.h" +#include "google/cloud/contentwarehouse/v1/document_link_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -110,3 +113,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/document_link_logging_decorator.h b/google/cloud/contentwarehouse/v1/internal/document_link_logging_decorator.h index 376a542fd47db..3cc21adf37016 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_link_logging_decorator.h +++ b/google/cloud/contentwarehouse/v1/internal/document_link_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -75,4 +78,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_DOCUMENT_LINK_LOGGING_DECORATOR_H diff --git a/google/cloud/contentwarehouse/v1/internal/document_link_metadata_decorator.cc b/google/cloud/contentwarehouse/v1/internal/document_link_metadata_decorator.cc index 86f0fa2a3009f..d9444b00a1d15 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_link_metadata_decorator.cc +++ b/google/cloud/contentwarehouse/v1/internal/document_link_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/contentwarehouse/v1/document_link_service.proto #include "google/cloud/contentwarehouse/v1/internal/document_link_metadata_decorator.h" +#include "google/cloud/contentwarehouse/v1/document_link_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -109,3 +113,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/document_link_metadata_decorator.h b/google/cloud/contentwarehouse/v1/internal/document_link_metadata_decorator.h index 1a555e0c07d19..624ee4fb05d9a 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_link_metadata_decorator.h +++ b/google/cloud/contentwarehouse/v1/internal/document_link_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -81,4 +84,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_DOCUMENT_LINK_METADATA_DECORATOR_H diff --git a/google/cloud/contentwarehouse/v1/internal/document_link_option_defaults.cc b/google/cloud/contentwarehouse/v1/internal/document_link_option_defaults.cc index 4baabc11eb300..b0fe777b79e6d 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_link_option_defaults.cc +++ b/google/cloud/contentwarehouse/v1/internal/document_link_option_defaults.cc @@ -43,7 +43,7 @@ Options DocumentLinkServiceDefaultOptions(Options options) { .has()) { options.set( contentwarehouse_v1::DocumentLinkServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/contentwarehouse/v1/internal/document_link_stub.cc b/google/cloud/contentwarehouse/v1/internal/document_link_stub.cc index 6c35e145b4503..148dbd31ae288 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_link_stub.cc +++ b/google/cloud/contentwarehouse/v1/internal/document_link_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/contentwarehouse/v1/document_link_service.proto #include "google/cloud/contentwarehouse/v1/internal/document_link_stub.h" +#include "google/cloud/contentwarehouse/v1/document_link_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -97,3 +100,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/document_link_stub.h b/google/cloud/contentwarehouse/v1/internal/document_link_stub.h index 5caceb24f9083..2b77749ac940d 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_link_stub.h +++ b/google/cloud/contentwarehouse/v1/internal/document_link_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_DOCUMENT_LINK_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_DOCUMENT_LINK_STUB_H +#include "google/cloud/contentwarehouse/v1/document_link_service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -117,4 +120,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_DOCUMENT_LINK_STUB_H diff --git a/google/cloud/contentwarehouse/v1/internal/document_link_stub_factory.cc b/google/cloud/contentwarehouse/v1/internal/document_link_stub_factory.cc index 729a6b130042f..133d2a045f3e2 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_link_stub_factory.cc +++ b/google/cloud/contentwarehouse/v1/internal/document_link_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/contentwarehouse/v1/document_link_service.proto #include "google/cloud/contentwarehouse/v1/internal/document_link_stub_factory.h" +#include "google/cloud/contentwarehouse/v1/document_link_service.grpc.pb.h" #include "google/cloud/contentwarehouse/v1/internal/document_link_auth_decorator.h" #include "google/cloud/contentwarehouse/v1/internal/document_link_logging_decorator.h" #include "google/cloud/contentwarehouse/v1/internal/document_link_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -74,3 +77,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/document_link_stub_factory.h b/google/cloud/contentwarehouse/v1/internal/document_link_stub_factory.h index 09da8b77cfb3e..390411fe1007b 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_link_stub_factory.h +++ b/google/cloud/contentwarehouse/v1/internal/document_link_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_DOCUMENT_LINK_STUB_FACTORY_H diff --git a/google/cloud/contentwarehouse/v1/internal/document_link_tracing_connection.cc b/google/cloud/contentwarehouse/v1/internal/document_link_tracing_connection.cc index e1c6bdc1fb2dc..5c74a37f9699c 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_link_tracing_connection.cc +++ b/google/cloud/contentwarehouse/v1/internal/document_link_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace contentwarehouse_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DocumentLinkServiceTracingConnection::DocumentLinkServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -83,17 +81,13 @@ DocumentLinkServiceTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDocumentLinkServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/contentwarehouse/v1/internal/document_link_tracing_connection.h b/google/cloud/contentwarehouse/v1/internal/document_link_tracing_connection.h index b75a6924ac05d..026271ad1d422 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_link_tracing_connection.h +++ b/google/cloud/contentwarehouse/v1/internal/document_link_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace contentwarehouse_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DocumentLinkServiceTracingConnection : public contentwarehouse_v1::DocumentLinkServiceConnection { public: @@ -67,8 +65,6 @@ class DocumentLinkServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/contentwarehouse/v1/internal/document_link_tracing_stub.cc b/google/cloud/contentwarehouse/v1/internal/document_link_tracing_stub.cc index 735a8e651cfef..f5a85cbd5ed5d 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_link_tracing_stub.cc +++ b/google/cloud/contentwarehouse/v1/internal/document_link_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DocumentLinkServiceTracingStub::DocumentLinkServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -99,18 +100,14 @@ DocumentLinkServiceTracingStub::GetOperation( child_->GetOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDocumentLinkServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/document_link_tracing_stub.h b/google/cloud/contentwarehouse/v1/internal/document_link_tracing_stub.h index ff1da9d6cf312..389701e83daff 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_link_tracing_stub.h +++ b/google/cloud/contentwarehouse/v1/internal/document_link_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DocumentLinkServiceTracingStub : public DocumentLinkServiceStub { public: ~DocumentLinkServiceTracingStub() override = default; @@ -72,8 +73,6 @@ class DocumentLinkServiceTracingStub : public DocumentLinkServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -88,4 +87,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_DOCUMENT_LINK_TRACING_STUB_H diff --git a/google/cloud/contentwarehouse/v1/internal/document_logging_decorator.cc b/google/cloud/contentwarehouse/v1/internal/document_logging_decorator.cc index a859786f37b36..9f3f18c8d5cea 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_logging_decorator.cc +++ b/google/cloud/contentwarehouse/v1/internal/document_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/contentwarehouse/v1/document_service.proto #include "google/cloud/contentwarehouse/v1/internal/document_logging_decorator.h" +#include "google/cloud/contentwarehouse/v1/document_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -154,3 +157,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/document_logging_decorator.h b/google/cloud/contentwarehouse/v1/internal/document_logging_decorator.h index 6bd8841ee2f24..b77aa472de689 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_logging_decorator.h +++ b/google/cloud/contentwarehouse/v1/internal/document_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -95,4 +98,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_DOCUMENT_LOGGING_DECORATOR_H diff --git a/google/cloud/contentwarehouse/v1/internal/document_metadata_decorator.cc b/google/cloud/contentwarehouse/v1/internal/document_metadata_decorator.cc index edd11702bfe2c..27da802c2db87 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_metadata_decorator.cc +++ b/google/cloud/contentwarehouse/v1/internal/document_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/contentwarehouse/v1/document_service.proto #include "google/cloud/contentwarehouse/v1/internal/document_metadata_decorator.h" +#include "google/cloud/contentwarehouse/v1/document_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -143,3 +147,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/document_metadata_decorator.h b/google/cloud/contentwarehouse/v1/internal/document_metadata_decorator.h index ff9b071cb10a6..ad19ac8a1aec9 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_metadata_decorator.h +++ b/google/cloud/contentwarehouse/v1/internal/document_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -101,4 +104,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_DOCUMENT_METADATA_DECORATOR_H diff --git a/google/cloud/contentwarehouse/v1/internal/document_option_defaults.cc b/google/cloud/contentwarehouse/v1/internal/document_option_defaults.cc index 727b9ea245d1a..65460e2f6a3b9 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_option_defaults.cc +++ b/google/cloud/contentwarehouse/v1/internal/document_option_defaults.cc @@ -42,7 +42,7 @@ Options DocumentServiceDefaultOptions(Options options) { if (!options.has()) { options.set( contentwarehouse_v1::DocumentServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/contentwarehouse/v1/internal/document_schema_auth_decorator.cc b/google/cloud/contentwarehouse/v1/internal/document_schema_auth_decorator.cc index be98a81f23a53..2c350195055ca 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_schema_auth_decorator.cc +++ b/google/cloud/contentwarehouse/v1/internal/document_schema_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/contentwarehouse/v1/document_schema_service.proto #include "google/cloud/contentwarehouse/v1/internal/document_schema_auth_decorator.h" -#include +#include "google/cloud/contentwarehouse/v1/document_schema_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -93,3 +96,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/document_schema_auth_decorator.h b/google/cloud/contentwarehouse/v1/internal/document_schema_auth_decorator.h index 06272dd5e3c22..fc1395d127886 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_schema_auth_decorator.h +++ b/google/cloud/contentwarehouse/v1/internal/document_schema_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -81,4 +84,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_DOCUMENT_SCHEMA_AUTH_DECORATOR_H diff --git a/google/cloud/contentwarehouse/v1/internal/document_schema_logging_decorator.cc b/google/cloud/contentwarehouse/v1/internal/document_schema_logging_decorator.cc index f4280a535b4d4..e29d301f67326 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_schema_logging_decorator.cc +++ b/google/cloud/contentwarehouse/v1/internal/document_schema_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/contentwarehouse/v1/document_schema_service.proto #include "google/cloud/contentwarehouse/v1/internal/document_schema_logging_decorator.h" +#include "google/cloud/contentwarehouse/v1/document_schema_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -122,3 +125,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/document_schema_logging_decorator.h b/google/cloud/contentwarehouse/v1/internal/document_schema_logging_decorator.h index 557bc7b7b8f22..e810b29bd3c54 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_schema_logging_decorator.h +++ b/google/cloud/contentwarehouse/v1/internal/document_schema_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -81,4 +84,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_DOCUMENT_SCHEMA_LOGGING_DECORATOR_H diff --git a/google/cloud/contentwarehouse/v1/internal/document_schema_metadata_decorator.cc b/google/cloud/contentwarehouse/v1/internal/document_schema_metadata_decorator.cc index fa5bfcfb5c70b..f650140093527 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_schema_metadata_decorator.cc +++ b/google/cloud/contentwarehouse/v1/internal/document_schema_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/contentwarehouse/v1/document_schema_service.proto #include "google/cloud/contentwarehouse/v1/internal/document_schema_metadata_decorator.h" +#include "google/cloud/contentwarehouse/v1/document_schema_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -119,3 +123,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/document_schema_metadata_decorator.h b/google/cloud/contentwarehouse/v1/internal/document_schema_metadata_decorator.h index 00048426f3057..082e3e2bdb287 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_schema_metadata_decorator.h +++ b/google/cloud/contentwarehouse/v1/internal/document_schema_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -87,4 +90,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_DOCUMENT_SCHEMA_METADATA_DECORATOR_H diff --git a/google/cloud/contentwarehouse/v1/internal/document_schema_option_defaults.cc b/google/cloud/contentwarehouse/v1/internal/document_schema_option_defaults.cc index cdbdba7f6ef37..b174017cf759d 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_schema_option_defaults.cc +++ b/google/cloud/contentwarehouse/v1/internal/document_schema_option_defaults.cc @@ -43,7 +43,7 @@ Options DocumentSchemaServiceDefaultOptions(Options options) { contentwarehouse_v1::DocumentSchemaServiceRetryPolicyOption>()) { options.set( contentwarehouse_v1::DocumentSchemaServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/contentwarehouse/v1/internal/document_schema_stub.cc b/google/cloud/contentwarehouse/v1/internal/document_schema_stub.cc index b5f90f23da515..3b3323ae6c912 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_schema_stub.cc +++ b/google/cloud/contentwarehouse/v1/internal/document_schema_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/contentwarehouse/v1/document_schema_service.proto #include "google/cloud/contentwarehouse/v1/internal/document_schema_stub.h" +#include "google/cloud/contentwarehouse/v1/document_schema_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -110,3 +113,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/document_schema_stub.h b/google/cloud/contentwarehouse/v1/internal/document_schema_stub.h index fe28d202c138d..46114ec70916f 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_schema_stub.h +++ b/google/cloud/contentwarehouse/v1/internal/document_schema_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_DOCUMENT_SCHEMA_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_DOCUMENT_SCHEMA_STUB_H +#include "google/cloud/contentwarehouse/v1/document_schema_service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -128,4 +131,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_DOCUMENT_SCHEMA_STUB_H diff --git a/google/cloud/contentwarehouse/v1/internal/document_schema_stub_factory.cc b/google/cloud/contentwarehouse/v1/internal/document_schema_stub_factory.cc index c206a6822428a..5a8367409e2ec 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_schema_stub_factory.cc +++ b/google/cloud/contentwarehouse/v1/internal/document_schema_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/contentwarehouse/v1/document_schema_service.proto #include "google/cloud/contentwarehouse/v1/internal/document_schema_stub_factory.h" +#include "google/cloud/contentwarehouse/v1/document_schema_service.grpc.pb.h" #include "google/cloud/contentwarehouse/v1/internal/document_schema_auth_decorator.h" #include "google/cloud/contentwarehouse/v1/internal/document_schema_logging_decorator.h" #include "google/cloud/contentwarehouse/v1/internal/document_schema_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/document_schema_stub_factory.h b/google/cloud/contentwarehouse/v1/internal/document_schema_stub_factory.h index a0b22900e2f55..d16c38778dcb1 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_schema_stub_factory.h +++ b/google/cloud/contentwarehouse/v1/internal/document_schema_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_DOCUMENT_SCHEMA_STUB_FACTORY_H diff --git a/google/cloud/contentwarehouse/v1/internal/document_schema_tracing_connection.cc b/google/cloud/contentwarehouse/v1/internal/document_schema_tracing_connection.cc index 837217d615dbd..a45bc7ad15286 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_schema_tracing_connection.cc +++ b/google/cloud/contentwarehouse/v1/internal/document_schema_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace contentwarehouse_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DocumentSchemaServiceTracingConnection::DocumentSchemaServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -98,18 +96,14 @@ DocumentSchemaServiceTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDocumentSchemaServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/contentwarehouse/v1/internal/document_schema_tracing_connection.h b/google/cloud/contentwarehouse/v1/internal/document_schema_tracing_connection.h index acfc27b0ad6e5..b66a57b9ff67f 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_schema_tracing_connection.h +++ b/google/cloud/contentwarehouse/v1/internal/document_schema_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace contentwarehouse_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DocumentSchemaServiceTracingConnection : public contentwarehouse_v1::DocumentSchemaServiceConnection { public: @@ -72,8 +70,6 @@ class DocumentSchemaServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/contentwarehouse/v1/internal/document_schema_tracing_stub.cc b/google/cloud/contentwarehouse/v1/internal/document_schema_tracing_stub.cc index 046918e125192..a94facca54bb5 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_schema_tracing_stub.cc +++ b/google/cloud/contentwarehouse/v1/internal/document_schema_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DocumentSchemaServiceTracingStub::DocumentSchemaServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -113,18 +114,14 @@ DocumentSchemaServiceTracingStub::GetOperation( child_->GetOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDocumentSchemaServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/document_schema_tracing_stub.h b/google/cloud/contentwarehouse/v1/internal/document_schema_tracing_stub.h index aff71233fe280..3d0b217aa5b6a 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_schema_tracing_stub.h +++ b/google/cloud/contentwarehouse/v1/internal/document_schema_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DocumentSchemaServiceTracingStub : public DocumentSchemaServiceStub { public: ~DocumentSchemaServiceTracingStub() override = default; @@ -78,8 +79,6 @@ class DocumentSchemaServiceTracingStub : public DocumentSchemaServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -94,4 +93,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_DOCUMENT_SCHEMA_TRACING_STUB_H diff --git a/google/cloud/contentwarehouse/v1/internal/document_stub.cc b/google/cloud/contentwarehouse/v1/internal/document_stub.cc index 0056d39943e2b..b534db64fa5ee 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_stub.cc +++ b/google/cloud/contentwarehouse/v1/internal/document_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/contentwarehouse/v1/document_service.proto #include "google/cloud/contentwarehouse/v1/internal/document_stub.h" +#include "google/cloud/contentwarehouse/v1/document_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -142,3 +145,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/document_stub.h b/google/cloud/contentwarehouse/v1/internal/document_stub.h index 1d2b340d5f42c..fa0b25ece4b49 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_stub.h +++ b/google/cloud/contentwarehouse/v1/internal/document_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_DOCUMENT_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_DOCUMENT_STUB_H +#include "google/cloud/contentwarehouse/v1/document_service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -154,4 +157,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_DOCUMENT_STUB_H diff --git a/google/cloud/contentwarehouse/v1/internal/document_stub_factory.cc b/google/cloud/contentwarehouse/v1/internal/document_stub_factory.cc index fce775c02c652..506f66bd8f5a2 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_stub_factory.cc +++ b/google/cloud/contentwarehouse/v1/internal/document_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/contentwarehouse/v1/document_service.proto #include "google/cloud/contentwarehouse/v1/internal/document_stub_factory.h" +#include "google/cloud/contentwarehouse/v1/document_service.grpc.pb.h" #include "google/cloud/contentwarehouse/v1/internal/document_auth_decorator.h" #include "google/cloud/contentwarehouse/v1/internal/document_logging_decorator.h" #include "google/cloud/contentwarehouse/v1/internal/document_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/document_stub_factory.h b/google/cloud/contentwarehouse/v1/internal/document_stub_factory.h index 23d4c0b2b3c60..70dbdf296bd4f 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_stub_factory.h +++ b/google/cloud/contentwarehouse/v1/internal/document_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_DOCUMENT_STUB_FACTORY_H diff --git a/google/cloud/contentwarehouse/v1/internal/document_tracing_connection.cc b/google/cloud/contentwarehouse/v1/internal/document_tracing_connection.cc index df7383aaa15a3..b4fd6cf9182cc 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_tracing_connection.cc +++ b/google/cloud/contentwarehouse/v1/internal/document_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace contentwarehouse_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DocumentServiceTracingConnection::DocumentServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -117,16 +115,12 @@ DocumentServiceTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDocumentServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/contentwarehouse/v1/internal/document_tracing_connection.h b/google/cloud/contentwarehouse/v1/internal/document_tracing_connection.h index 5af3d469fa257..13e8a61d83083 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_tracing_connection.h +++ b/google/cloud/contentwarehouse/v1/internal/document_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace contentwarehouse_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DocumentServiceTracingConnection : public contentwarehouse_v1::DocumentServiceConnection { public: @@ -82,8 +80,6 @@ class DocumentServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/contentwarehouse/v1/internal/document_tracing_stub.cc b/google/cloud/contentwarehouse/v1/internal/document_tracing_stub.cc index 9d3b1616e366a..84c4594ebbf44 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_tracing_stub.cc +++ b/google/cloud/contentwarehouse/v1/internal/document_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DocumentServiceTracingStub::DocumentServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -140,18 +141,14 @@ DocumentServiceTracingStub::GetOperation( child_->GetOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDocumentServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/document_tracing_stub.h b/google/cloud/contentwarehouse/v1/internal/document_tracing_stub.h index 60f94eea40e65..53646f430d1f9 100644 --- a/google/cloud/contentwarehouse/v1/internal/document_tracing_stub.h +++ b/google/cloud/contentwarehouse/v1/internal/document_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DocumentServiceTracingStub : public DocumentServiceStub { public: ~DocumentServiceTracingStub() override = default; @@ -92,8 +93,6 @@ class DocumentServiceTracingStub : public DocumentServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -108,4 +107,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_DOCUMENT_TRACING_STUB_H diff --git a/google/cloud/contentwarehouse/v1/internal/pipeline_auth_decorator.cc b/google/cloud/contentwarehouse/v1/internal/pipeline_auth_decorator.cc index dc0b668dfa452..7ed4b2706cf2d 100644 --- a/google/cloud/contentwarehouse/v1/internal/pipeline_auth_decorator.cc +++ b/google/cloud/contentwarehouse/v1/internal/pipeline_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/contentwarehouse/v1/pipeline_service.proto #include "google/cloud/contentwarehouse/v1/internal/pipeline_auth_decorator.h" -#include +#include "google/cloud/contentwarehouse/v1/pipeline_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -107,3 +110,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/pipeline_auth_decorator.h b/google/cloud/contentwarehouse/v1/internal/pipeline_auth_decorator.h index cf8ba9e1d20ee..3afa7a360ac3a 100644 --- a/google/cloud/contentwarehouse/v1/internal/pipeline_auth_decorator.h +++ b/google/cloud/contentwarehouse/v1/internal/pipeline_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/contentwarehouse/v1/internal/pipeline_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -77,4 +80,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_PIPELINE_AUTH_DECORATOR_H diff --git a/google/cloud/contentwarehouse/v1/internal/pipeline_connection_impl.h b/google/cloud/contentwarehouse/v1/internal/pipeline_connection_impl.h index 3782eb9922589..d0f7a208dce27 100644 --- a/google/cloud/contentwarehouse/v1/internal/pipeline_connection_impl.h +++ b/google/cloud/contentwarehouse/v1/internal/pipeline_connection_impl.h @@ -31,7 +31,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/contentwarehouse/v1/internal/pipeline_logging_decorator.cc b/google/cloud/contentwarehouse/v1/internal/pipeline_logging_decorator.cc index af3d140cad4f6..02a1f936f015c 100644 --- a/google/cloud/contentwarehouse/v1/internal/pipeline_logging_decorator.cc +++ b/google/cloud/contentwarehouse/v1/internal/pipeline_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/contentwarehouse/v1/pipeline_service.proto #include "google/cloud/contentwarehouse/v1/internal/pipeline_logging_decorator.h" +#include "google/cloud/contentwarehouse/v1/pipeline_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -116,3 +119,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/pipeline_logging_decorator.h b/google/cloud/contentwarehouse/v1/internal/pipeline_logging_decorator.h index 5fa75955414de..5b79723bc54c0 100644 --- a/google/cloud/contentwarehouse/v1/internal/pipeline_logging_decorator.h +++ b/google/cloud/contentwarehouse/v1/internal/pipeline_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/contentwarehouse/v1/internal/pipeline_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -77,4 +80,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_PIPELINE_LOGGING_DECORATOR_H diff --git a/google/cloud/contentwarehouse/v1/internal/pipeline_metadata_decorator.cc b/google/cloud/contentwarehouse/v1/internal/pipeline_metadata_decorator.cc index 7ca500b1f6536..1aa6602061334 100644 --- a/google/cloud/contentwarehouse/v1/internal/pipeline_metadata_decorator.cc +++ b/google/cloud/contentwarehouse/v1/internal/pipeline_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/contentwarehouse/v1/pipeline_service.proto #include "google/cloud/contentwarehouse/v1/internal/pipeline_metadata_decorator.h" +#include "google/cloud/contentwarehouse/v1/pipeline_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -112,3 +116,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/pipeline_metadata_decorator.h b/google/cloud/contentwarehouse/v1/internal/pipeline_metadata_decorator.h index 7635e920db968..ca9597120970c 100644 --- a/google/cloud/contentwarehouse/v1/internal/pipeline_metadata_decorator.h +++ b/google/cloud/contentwarehouse/v1/internal/pipeline_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/contentwarehouse/v1/internal/pipeline_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -83,4 +86,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_PIPELINE_METADATA_DECORATOR_H diff --git a/google/cloud/contentwarehouse/v1/internal/pipeline_option_defaults.cc b/google/cloud/contentwarehouse/v1/internal/pipeline_option_defaults.cc index 1bf5987c832c8..b31bee42094e7 100644 --- a/google/cloud/contentwarehouse/v1/internal/pipeline_option_defaults.cc +++ b/google/cloud/contentwarehouse/v1/internal/pipeline_option_defaults.cc @@ -42,7 +42,7 @@ Options PipelineServiceDefaultOptions(Options options) { if (!options.has()) { options.set( contentwarehouse_v1::PipelineServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/contentwarehouse/v1/internal/pipeline_stub.cc b/google/cloud/contentwarehouse/v1/internal/pipeline_stub.cc index 636475244abbf..88ccedc465232 100644 --- a/google/cloud/contentwarehouse/v1/internal/pipeline_stub.cc +++ b/google/cloud/contentwarehouse/v1/internal/pipeline_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/contentwarehouse/v1/pipeline_service.proto #include "google/cloud/contentwarehouse/v1/internal/pipeline_stub.h" +#include "google/cloud/contentwarehouse/v1/pipeline_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -117,3 +120,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/pipeline_stub.h b/google/cloud/contentwarehouse/v1/internal/pipeline_stub.h index 85dc61e3ef989..f304e65d2e2b0 100644 --- a/google/cloud/contentwarehouse/v1/internal/pipeline_stub.h +++ b/google/cloud/contentwarehouse/v1/internal/pipeline_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_PIPELINE_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_PIPELINE_STUB_H +#include "google/cloud/contentwarehouse/v1/pipeline_service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -119,4 +122,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_PIPELINE_STUB_H diff --git a/google/cloud/contentwarehouse/v1/internal/pipeline_stub_factory.cc b/google/cloud/contentwarehouse/v1/internal/pipeline_stub_factory.cc index 84f3b406da6c4..9c280a74c3024 100644 --- a/google/cloud/contentwarehouse/v1/internal/pipeline_stub_factory.cc +++ b/google/cloud/contentwarehouse/v1/internal/pipeline_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/contentwarehouse/v1/internal/pipeline_metadata_decorator.h" #include "google/cloud/contentwarehouse/v1/internal/pipeline_stub.h" #include "google/cloud/contentwarehouse/v1/internal/pipeline_tracing_stub.h" +#include "google/cloud/contentwarehouse/v1/pipeline_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/pipeline_stub_factory.h b/google/cloud/contentwarehouse/v1/internal/pipeline_stub_factory.h index a62b06e1411c3..941144893cc55 100644 --- a/google/cloud/contentwarehouse/v1/internal/pipeline_stub_factory.h +++ b/google/cloud/contentwarehouse/v1/internal/pipeline_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_PIPELINE_STUB_FACTORY_H diff --git a/google/cloud/contentwarehouse/v1/internal/pipeline_tracing_connection.cc b/google/cloud/contentwarehouse/v1/internal/pipeline_tracing_connection.cc index d3de82f3ebb26..4887b91b02380 100644 --- a/google/cloud/contentwarehouse/v1/internal/pipeline_tracing_connection.cc +++ b/google/cloud/contentwarehouse/v1/internal/pipeline_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace contentwarehouse_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PipelineServiceTracingConnection::PipelineServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -69,16 +67,12 @@ PipelineServiceTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePipelineServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/contentwarehouse/v1/internal/pipeline_tracing_connection.h b/google/cloud/contentwarehouse/v1/internal/pipeline_tracing_connection.h index d8d73dec5e33f..973572ce078a4 100644 --- a/google/cloud/contentwarehouse/v1/internal/pipeline_tracing_connection.h +++ b/google/cloud/contentwarehouse/v1/internal/pipeline_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace contentwarehouse_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PipelineServiceTracingConnection : public contentwarehouse_v1::PipelineServiceConnection { public: @@ -59,8 +57,6 @@ class PipelineServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/contentwarehouse/v1/internal/pipeline_tracing_stub.cc b/google/cloud/contentwarehouse/v1/internal/pipeline_tracing_stub.cc index a9556c5946158..585ed82acb148 100644 --- a/google/cloud/contentwarehouse/v1/internal/pipeline_tracing_stub.cc +++ b/google/cloud/contentwarehouse/v1/internal/pipeline_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PipelineServiceTracingStub::PipelineServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -98,18 +99,14 @@ future PipelineServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePipelineServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/pipeline_tracing_stub.h b/google/cloud/contentwarehouse/v1/internal/pipeline_tracing_stub.h index 5eb7b04a69086..6fbf9bab512ae 100644 --- a/google/cloud/contentwarehouse/v1/internal/pipeline_tracing_stub.h +++ b/google/cloud/contentwarehouse/v1/internal/pipeline_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PipelineServiceTracingStub : public PipelineServiceStub { public: ~PipelineServiceTracingStub() override = default; @@ -73,8 +74,6 @@ class PipelineServiceTracingStub : public PipelineServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -89,4 +88,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_PIPELINE_TRACING_STUB_H diff --git a/google/cloud/contentwarehouse/v1/internal/rule_set_auth_decorator.cc b/google/cloud/contentwarehouse/v1/internal/rule_set_auth_decorator.cc index cb7f49891c55a..319d0f3ff4b41 100644 --- a/google/cloud/contentwarehouse/v1/internal/rule_set_auth_decorator.cc +++ b/google/cloud/contentwarehouse/v1/internal/rule_set_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/contentwarehouse/v1/ruleset_service.proto #include "google/cloud/contentwarehouse/v1/internal/rule_set_auth_decorator.h" -#include +#include "google/cloud/contentwarehouse/v1/ruleset_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -87,3 +90,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/rule_set_auth_decorator.h b/google/cloud/contentwarehouse/v1/internal/rule_set_auth_decorator.h index f015e782ba22b..5de27ec5d62cc 100644 --- a/google/cloud/contentwarehouse/v1/internal/rule_set_auth_decorator.h +++ b/google/cloud/contentwarehouse/v1/internal/rule_set_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -77,4 +80,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_RULE_SET_AUTH_DECORATOR_H diff --git a/google/cloud/contentwarehouse/v1/internal/rule_set_logging_decorator.cc b/google/cloud/contentwarehouse/v1/internal/rule_set_logging_decorator.cc index 37420f218df31..864be1d5dd518 100644 --- a/google/cloud/contentwarehouse/v1/internal/rule_set_logging_decorator.cc +++ b/google/cloud/contentwarehouse/v1/internal/rule_set_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/contentwarehouse/v1/ruleset_service.proto #include "google/cloud/contentwarehouse/v1/internal/rule_set_logging_decorator.h" +#include "google/cloud/contentwarehouse/v1/ruleset_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -114,3 +117,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/rule_set_logging_decorator.h b/google/cloud/contentwarehouse/v1/internal/rule_set_logging_decorator.h index 8b6b767b46673..acaf1e2cdb67c 100644 --- a/google/cloud/contentwarehouse/v1/internal/rule_set_logging_decorator.h +++ b/google/cloud/contentwarehouse/v1/internal/rule_set_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -77,4 +80,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_RULE_SET_LOGGING_DECORATOR_H diff --git a/google/cloud/contentwarehouse/v1/internal/rule_set_metadata_decorator.cc b/google/cloud/contentwarehouse/v1/internal/rule_set_metadata_decorator.cc index 6e6edad9f52f3..3c5820657ae99 100644 --- a/google/cloud/contentwarehouse/v1/internal/rule_set_metadata_decorator.cc +++ b/google/cloud/contentwarehouse/v1/internal/rule_set_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/contentwarehouse/v1/ruleset_service.proto #include "google/cloud/contentwarehouse/v1/internal/rule_set_metadata_decorator.h" +#include "google/cloud/contentwarehouse/v1/ruleset_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -113,3 +117,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/rule_set_metadata_decorator.h b/google/cloud/contentwarehouse/v1/internal/rule_set_metadata_decorator.h index 1a28ac7a391a0..f6a5791c7f9fd 100644 --- a/google/cloud/contentwarehouse/v1/internal/rule_set_metadata_decorator.h +++ b/google/cloud/contentwarehouse/v1/internal/rule_set_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -82,4 +85,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_RULE_SET_METADATA_DECORATOR_H diff --git a/google/cloud/contentwarehouse/v1/internal/rule_set_option_defaults.cc b/google/cloud/contentwarehouse/v1/internal/rule_set_option_defaults.cc index 6acde6d027f41..8587d97fd594b 100644 --- a/google/cloud/contentwarehouse/v1/internal/rule_set_option_defaults.cc +++ b/google/cloud/contentwarehouse/v1/internal/rule_set_option_defaults.cc @@ -42,7 +42,7 @@ Options RuleSetServiceDefaultOptions(Options options) { if (!options.has()) { options.set( contentwarehouse_v1::RuleSetServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/contentwarehouse/v1/internal/rule_set_stub.cc b/google/cloud/contentwarehouse/v1/internal/rule_set_stub.cc index 82ee24c4d4b6a..5840dd0301dac 100644 --- a/google/cloud/contentwarehouse/v1/internal/rule_set_stub.cc +++ b/google/cloud/contentwarehouse/v1/internal/rule_set_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/contentwarehouse/v1/ruleset_service.proto #include "google/cloud/contentwarehouse/v1/internal/rule_set_stub.h" +#include "google/cloud/contentwarehouse/v1/ruleset_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -105,3 +108,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/rule_set_stub.h b/google/cloud/contentwarehouse/v1/internal/rule_set_stub.h index 43ae676998869..1ba1f58116a60 100644 --- a/google/cloud/contentwarehouse/v1/internal/rule_set_stub.h +++ b/google/cloud/contentwarehouse/v1/internal/rule_set_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_RULE_SET_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_RULE_SET_STUB_H +#include "google/cloud/contentwarehouse/v1/ruleset_service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -119,4 +122,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_RULE_SET_STUB_H diff --git a/google/cloud/contentwarehouse/v1/internal/rule_set_stub_factory.cc b/google/cloud/contentwarehouse/v1/internal/rule_set_stub_factory.cc index a6bf26af3ab4a..cee766252ec52 100644 --- a/google/cloud/contentwarehouse/v1/internal/rule_set_stub_factory.cc +++ b/google/cloud/contentwarehouse/v1/internal/rule_set_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/contentwarehouse/v1/internal/rule_set_metadata_decorator.h" #include "google/cloud/contentwarehouse/v1/internal/rule_set_stub.h" #include "google/cloud/contentwarehouse/v1/internal/rule_set_tracing_stub.h" +#include "google/cloud/contentwarehouse/v1/ruleset_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/rule_set_stub_factory.h b/google/cloud/contentwarehouse/v1/internal/rule_set_stub_factory.h index 7138198bbf9c2..027a5994f35b3 100644 --- a/google/cloud/contentwarehouse/v1/internal/rule_set_stub_factory.h +++ b/google/cloud/contentwarehouse/v1/internal/rule_set_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_RULE_SET_STUB_FACTORY_H diff --git a/google/cloud/contentwarehouse/v1/internal/rule_set_tracing_connection.cc b/google/cloud/contentwarehouse/v1/internal/rule_set_tracing_connection.cc index 3c4b92ca28914..bb19998db0a38 100644 --- a/google/cloud/contentwarehouse/v1/internal/rule_set_tracing_connection.cc +++ b/google/cloud/contentwarehouse/v1/internal/rule_set_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace contentwarehouse_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RuleSetServiceTracingConnection::RuleSetServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -89,16 +87,12 @@ RuleSetServiceTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRuleSetServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/contentwarehouse/v1/internal/rule_set_tracing_connection.h b/google/cloud/contentwarehouse/v1/internal/rule_set_tracing_connection.h index eab8ad7ff8cbd..5228bddd7ab02 100644 --- a/google/cloud/contentwarehouse/v1/internal/rule_set_tracing_connection.h +++ b/google/cloud/contentwarehouse/v1/internal/rule_set_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace contentwarehouse_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RuleSetServiceTracingConnection : public contentwarehouse_v1::RuleSetServiceConnection { public: @@ -67,8 +65,6 @@ class RuleSetServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/contentwarehouse/v1/internal/rule_set_tracing_stub.cc b/google/cloud/contentwarehouse/v1/internal/rule_set_tracing_stub.cc index c23759fb7d9c7..32bf5017c27b7 100644 --- a/google/cloud/contentwarehouse/v1/internal/rule_set_tracing_stub.cc +++ b/google/cloud/contentwarehouse/v1/internal/rule_set_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RuleSetServiceTracingStub::RuleSetServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -103,18 +104,14 @@ RuleSetServiceTracingStub::GetOperation( child_->GetOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRuleSetServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/rule_set_tracing_stub.h b/google/cloud/contentwarehouse/v1/internal/rule_set_tracing_stub.h index 16cdce7cc9132..a60d7ef6b6e0c 100644 --- a/google/cloud/contentwarehouse/v1/internal/rule_set_tracing_stub.h +++ b/google/cloud/contentwarehouse/v1/internal/rule_set_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RuleSetServiceTracingStub : public RuleSetServiceStub { public: ~RuleSetServiceTracingStub() override = default; @@ -73,8 +74,6 @@ class RuleSetServiceTracingStub : public RuleSetServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -89,4 +88,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_RULE_SET_TRACING_STUB_H diff --git a/google/cloud/contentwarehouse/v1/internal/synonym_set_auth_decorator.cc b/google/cloud/contentwarehouse/v1/internal/synonym_set_auth_decorator.cc index 4edd992bc7c7a..7aef592fd59eb 100644 --- a/google/cloud/contentwarehouse/v1/internal/synonym_set_auth_decorator.cc +++ b/google/cloud/contentwarehouse/v1/internal/synonym_set_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/contentwarehouse/v1/synonymset_service.proto #include "google/cloud/contentwarehouse/v1/internal/synonym_set_auth_decorator.h" -#include +#include "google/cloud/contentwarehouse/v1/synonymset_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -91,3 +94,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/synonym_set_auth_decorator.h b/google/cloud/contentwarehouse/v1/internal/synonym_set_auth_decorator.h index e8b162485a4c2..3b5a616bface1 100644 --- a/google/cloud/contentwarehouse/v1/internal/synonym_set_auth_decorator.h +++ b/google/cloud/contentwarehouse/v1/internal/synonym_set_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -78,4 +81,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_SYNONYM_SET_AUTH_DECORATOR_H diff --git a/google/cloud/contentwarehouse/v1/internal/synonym_set_logging_decorator.cc b/google/cloud/contentwarehouse/v1/internal/synonym_set_logging_decorator.cc index 0d4adcce19d2f..e6743d0ef6fc8 100644 --- a/google/cloud/contentwarehouse/v1/internal/synonym_set_logging_decorator.cc +++ b/google/cloud/contentwarehouse/v1/internal/synonym_set_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/contentwarehouse/v1/synonymset_service.proto #include "google/cloud/contentwarehouse/v1/internal/synonym_set_logging_decorator.h" +#include "google/cloud/contentwarehouse/v1/synonymset_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -118,3 +121,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/synonym_set_logging_decorator.h b/google/cloud/contentwarehouse/v1/internal/synonym_set_logging_decorator.h index 724fce941f5f1..bafb69212966d 100644 --- a/google/cloud/contentwarehouse/v1/internal/synonym_set_logging_decorator.h +++ b/google/cloud/contentwarehouse/v1/internal/synonym_set_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -78,4 +81,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_SYNONYM_SET_LOGGING_DECORATOR_H diff --git a/google/cloud/contentwarehouse/v1/internal/synonym_set_metadata_decorator.cc b/google/cloud/contentwarehouse/v1/internal/synonym_set_metadata_decorator.cc index 0b7f711cb0fd7..5fb6c833ba16e 100644 --- a/google/cloud/contentwarehouse/v1/internal/synonym_set_metadata_decorator.cc +++ b/google/cloud/contentwarehouse/v1/internal/synonym_set_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/contentwarehouse/v1/synonymset_service.proto #include "google/cloud/contentwarehouse/v1/internal/synonym_set_metadata_decorator.h" +#include "google/cloud/contentwarehouse/v1/synonymset_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -118,3 +122,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/synonym_set_metadata_decorator.h b/google/cloud/contentwarehouse/v1/internal/synonym_set_metadata_decorator.h index ccd0100ad5ee1..d43d04a5092d2 100644 --- a/google/cloud/contentwarehouse/v1/internal/synonym_set_metadata_decorator.h +++ b/google/cloud/contentwarehouse/v1/internal/synonym_set_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -84,4 +87,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_SYNONYM_SET_METADATA_DECORATOR_H diff --git a/google/cloud/contentwarehouse/v1/internal/synonym_set_option_defaults.cc b/google/cloud/contentwarehouse/v1/internal/synonym_set_option_defaults.cc index ca95566d7609c..09d505f2084d4 100644 --- a/google/cloud/contentwarehouse/v1/internal/synonym_set_option_defaults.cc +++ b/google/cloud/contentwarehouse/v1/internal/synonym_set_option_defaults.cc @@ -42,7 +42,7 @@ Options SynonymSetServiceDefaultOptions(Options options) { if (!options.has()) { options.set( contentwarehouse_v1::SynonymSetServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/contentwarehouse/v1/internal/synonym_set_stub.cc b/google/cloud/contentwarehouse/v1/internal/synonym_set_stub.cc index ca470a9247428..7c612f92fcc1d 100644 --- a/google/cloud/contentwarehouse/v1/internal/synonym_set_stub.cc +++ b/google/cloud/contentwarehouse/v1/internal/synonym_set_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/contentwarehouse/v1/synonymset_service.proto #include "google/cloud/contentwarehouse/v1/internal/synonym_set_stub.h" +#include "google/cloud/contentwarehouse/v1/synonymset_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -109,3 +112,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/synonym_set_stub.h b/google/cloud/contentwarehouse/v1/internal/synonym_set_stub.h index 8dfc31f47fec7..188177981d021 100644 --- a/google/cloud/contentwarehouse/v1/internal/synonym_set_stub.h +++ b/google/cloud/contentwarehouse/v1/internal/synonym_set_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_SYNONYM_SET_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_SYNONYM_SET_STUB_H +#include "google/cloud/contentwarehouse/v1/synonymset_service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -123,4 +126,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_SYNONYM_SET_STUB_H diff --git a/google/cloud/contentwarehouse/v1/internal/synonym_set_stub_factory.cc b/google/cloud/contentwarehouse/v1/internal/synonym_set_stub_factory.cc index 759edc82ec2dd..69b024ce86d30 100644 --- a/google/cloud/contentwarehouse/v1/internal/synonym_set_stub_factory.cc +++ b/google/cloud/contentwarehouse/v1/internal/synonym_set_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/contentwarehouse/v1/internal/synonym_set_metadata_decorator.h" #include "google/cloud/contentwarehouse/v1/internal/synonym_set_stub.h" #include "google/cloud/contentwarehouse/v1/internal/synonym_set_tracing_stub.h" +#include "google/cloud/contentwarehouse/v1/synonymset_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/synonym_set_stub_factory.h b/google/cloud/contentwarehouse/v1/internal/synonym_set_stub_factory.h index ed8322cd9fb55..3026b32a167e0 100644 --- a/google/cloud/contentwarehouse/v1/internal/synonym_set_stub_factory.h +++ b/google/cloud/contentwarehouse/v1/internal/synonym_set_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_SYNONYM_SET_STUB_FACTORY_H diff --git a/google/cloud/contentwarehouse/v1/internal/synonym_set_tracing_connection.cc b/google/cloud/contentwarehouse/v1/internal/synonym_set_tracing_connection.cc index bb2865afc18ca..27c9aff8b3922 100644 --- a/google/cloud/contentwarehouse/v1/internal/synonym_set_tracing_connection.cc +++ b/google/cloud/contentwarehouse/v1/internal/synonym_set_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace contentwarehouse_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SynonymSetServiceTracingConnection::SynonymSetServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -92,17 +90,13 @@ SynonymSetServiceTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSynonymSetServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/contentwarehouse/v1/internal/synonym_set_tracing_connection.h b/google/cloud/contentwarehouse/v1/internal/synonym_set_tracing_connection.h index 4d6c0995b8d5e..d935bacde1ee5 100644 --- a/google/cloud/contentwarehouse/v1/internal/synonym_set_tracing_connection.h +++ b/google/cloud/contentwarehouse/v1/internal/synonym_set_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace contentwarehouse_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SynonymSetServiceTracingConnection : public contentwarehouse_v1::SynonymSetServiceConnection { public: @@ -67,8 +65,6 @@ class SynonymSetServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/contentwarehouse/v1/internal/synonym_set_tracing_stub.cc b/google/cloud/contentwarehouse/v1/internal/synonym_set_tracing_stub.cc index 62c5c7b891ab8..423605bf2f307 100644 --- a/google/cloud/contentwarehouse/v1/internal/synonym_set_tracing_stub.cc +++ b/google/cloud/contentwarehouse/v1/internal/synonym_set_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SynonymSetServiceTracingStub::SynonymSetServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -107,18 +108,14 @@ SynonymSetServiceTracingStub::GetOperation( child_->GetOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSynonymSetServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace contentwarehouse_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/contentwarehouse/v1/internal/synonym_set_tracing_stub.h b/google/cloud/contentwarehouse/v1/internal/synonym_set_tracing_stub.h index 15a5990dd591f..761c2d5626ea0 100644 --- a/google/cloud/contentwarehouse/v1/internal/synonym_set_tracing_stub.h +++ b/google/cloud/contentwarehouse/v1/internal/synonym_set_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace contentwarehouse_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SynonymSetServiceTracingStub : public SynonymSetServiceStub { public: ~SynonymSetServiceTracingStub() override = default; @@ -75,8 +76,6 @@ class SynonymSetServiceTracingStub : public SynonymSetServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -91,4 +90,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_INTERNAL_SYNONYM_SET_TRACING_STUB_H diff --git a/google/cloud/contentwarehouse/v1/pipeline_client.h b/google/cloud/contentwarehouse/v1/pipeline_client.h index 665989edf0194..55953b08ca558 100644 --- a/google/cloud/contentwarehouse/v1/pipeline_client.h +++ b/google/cloud/contentwarehouse/v1/pipeline_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/contentwarehouse/v1/pipeline_connection.h b/google/cloud/contentwarehouse/v1/pipeline_connection.h index d75a80c18d0b2..7f8b50c0183c1 100644 --- a/google/cloud/contentwarehouse/v1/pipeline_connection.h +++ b/google/cloud/contentwarehouse/v1/pipeline_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/contentwarehouse/v1/internal/pipeline_retry_traits.h" #include "google/cloud/contentwarehouse/v1/pipeline_connection_idempotency_policy.h" +#include "google/cloud/contentwarehouse/v1/pipeline_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -29,8 +30,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/contentwarehouse/v1/pipeline_connection_idempotency_policy.h b/google/cloud/contentwarehouse/v1/pipeline_connection_idempotency_policy.h index 13ceb0191e746..b99816f6ca36a 100644 --- a/google/cloud/contentwarehouse/v1/pipeline_connection_idempotency_policy.h +++ b/google/cloud/contentwarehouse/v1/pipeline_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_PIPELINE_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_PIPELINE_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/contentwarehouse/v1/pipeline_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/contentwarehouse/v1/rule_set_connection.h b/google/cloud/contentwarehouse/v1/rule_set_connection.h index 81c8e9911688b..18f2cf37e6e18 100644 --- a/google/cloud/contentwarehouse/v1/rule_set_connection.h +++ b/google/cloud/contentwarehouse/v1/rule_set_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/contentwarehouse/v1/internal/rule_set_retry_traits.h" #include "google/cloud/contentwarehouse/v1/rule_set_connection_idempotency_policy.h" +#include "google/cloud/contentwarehouse/v1/ruleset_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/contentwarehouse/v1/rule_set_connection_idempotency_policy.h b/google/cloud/contentwarehouse/v1/rule_set_connection_idempotency_policy.h index 5646146b64a6e..743115f6f9e5f 100644 --- a/google/cloud/contentwarehouse/v1/rule_set_connection_idempotency_policy.h +++ b/google/cloud/contentwarehouse/v1/rule_set_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_RULE_SET_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_RULE_SET_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/contentwarehouse/v1/ruleset_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/contentwarehouse/v1/synonym_set_connection.h b/google/cloud/contentwarehouse/v1/synonym_set_connection.h index b0c06ffe7f4e0..3d06ac29d8f3a 100644 --- a/google/cloud/contentwarehouse/v1/synonym_set_connection.h +++ b/google/cloud/contentwarehouse/v1/synonym_set_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/contentwarehouse/v1/internal/synonym_set_retry_traits.h" #include "google/cloud/contentwarehouse/v1/synonym_set_connection_idempotency_policy.h" +#include "google/cloud/contentwarehouse/v1/synonymset_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/contentwarehouse/v1/synonym_set_connection_idempotency_policy.h b/google/cloud/contentwarehouse/v1/synonym_set_connection_idempotency_policy.h index 05e669f491467..41b4aaf313a6d 100644 --- a/google/cloud/contentwarehouse/v1/synonym_set_connection_idempotency_policy.h +++ b/google/cloud/contentwarehouse/v1/synonym_set_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_SYNONYM_SET_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_CONTENTWAREHOUSE_V1_SYNONYM_SET_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/contentwarehouse/v1/synonymset_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/credentials.cc b/google/cloud/credentials.cc index bd7d2c2be7c8b..69a757c62b2ea 100644 --- a/google/cloud/credentials.cc +++ b/google/cloud/credentials.cc @@ -48,7 +48,13 @@ std::shared_ptr MakeImpersonateServiceAccountCredentials( std::shared_ptr MakeServiceAccountCredentials( std::string json_object, Options opts) { return std::make_shared( - std::move(json_object), std::move(opts)); + std::move(json_object), absl::nullopt, std::move(opts)); +} + +std::shared_ptr MakeServiceAccountCredentialsFromFile( + std::string const& file_path, Options opts) { + return std::make_shared( + absl::nullopt, file_path, std::move(opts)); } std::shared_ptr MakeExternalAccountCredentials( diff --git a/google/cloud/credentials.h b/google/cloud/credentials.h index 93166067d1974..29c884c38d640 100644 --- a/google/cloud/credentials.h +++ b/google/cloud/credentials.h @@ -301,6 +301,64 @@ std::shared_ptr MakeImpersonateServiceAccountCredentials( std::shared_ptr MakeServiceAccountCredentials( std::string json_object, Options opts = {}); +/** + * Creates service account credentials from a service account key contained in + * a file. + * + * A [service account] is an account for an application or compute workload + * instead of an individual end user. The recommended practice is to use + * Google Default Credentials, which relies on the configuration of the Google + * Cloud system hosting your application (GCE, GKE, Cloud Run) to authenticate + * your workload or application. But sometimes you may need to create and + * download a [service account key], for example, to use a service account + * when running your application on a system that is not part of Google Cloud. + * + * Service account credentials are used in this latter case. + * + * You can create multiple service account keys for a single service account. + * When you create a service account key, the key is returned as string, in the + * format described by [aip/4112]. This string contains an id for the service + * account, as well as the cryptographical materials (a RSA private key) + * required to authenticate the caller. + * + * Therefore, services account keys should be treated as any other secret + * with security implications. Think of them as unencrypted passwords. Do not + * store them where unauthorized persons or programs may read them. + * + * As stated above, most applications should probably use default credentials, + * maybe pointing them to a file with these contents. Using this function may be + * useful when the service account key is obtained from Cloud Secret Manager or + * a similar service. + * + * [aip/4112]: https://google.aip.dev/auth/4112 + * [service account]: https://cloud.google.com/iam/docs/overview#service_account + * [service account key]: + * https://cloud.google.com/iam/docs/creating-managing-service-account-keys#iam-service-account-keys-create-cpp + * + * Use `ScopesOption` to restrict the authentication scope for the obtained + * credentials. + * + * @ingroup guac + * + * @note While JSON file formats are supported for both REST and gRPC transport, + * PKCS#12 is only supported for REST transport. + * + * @param file_path path to file containing the service account key + * Typically applications read this from a file, or download the contents from + * something like Google's secret manager service. + * @param opts optional configuration values. + * + * `ScopesOption` the scopes to request during the authorization grant. If + * omitted, the cloud-platform scope, defined by + * `GoogleOAuthScopeCloudPlatform()`, is used as a default. + * `SubjectOption` for domain-wide delegation; the email address of the user for + * which to request delegated access. If omitted AND no "subject" is defined + * in the provided file, no "subject" attribute is included in the + * authorization grant. + */ +std::shared_ptr MakeServiceAccountCredentialsFromFile( + std::string const& file_path, Options opts = {}); + /** * Creates credentials based on external accounts. * @@ -406,7 +464,9 @@ struct DelegatesOption { }; /** - * Configure the scopes for `MakeImpersonateServiceAccountCredentials()` + * Configure the scopes for `MakeImpersonateServiceAccountCredentials()`. + * Override the scopes for `MakeServiceAccountCredentials` and + * `MakeServiceAccountCredentialsFromFile()`. * * @ingroup options * @ingroup guac @@ -415,6 +475,17 @@ struct ScopesOption { using Type = std::vector; }; +/** + * Overrides the subject for `MakeServiceAccountCredentials` and + * `MakeServiceAccountCredentialsFromFile()`. + * + * @ingroup options + * @ingroup guac + */ +struct SubjectOption { + using Type = std::string; +}; + /** * Configure the access token lifetime * diff --git a/google/cloud/datacatalog/BUILD.bazel b/google/cloud/datacatalog/BUILD.bazel index a74b7443c852f..33b9439cb6b3d 100644 --- a/google/cloud/datacatalog/BUILD.bazel +++ b/google/cloud/datacatalog/BUILD.bazel @@ -19,14 +19,13 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "lineage/v1/", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/datacatalog/lineage/v1:lineage_cc_grpc", - "@com_google_googleapis//google/cloud/datacatalog/v1:datacatalog_cc_grpc", + "@googleapis//google/cloud/datacatalog/lineage/v1:lineage_cc_grpc", + "@googleapis//google/cloud/datacatalog/v1:datacatalog_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/datacatalog/CMakeLists.txt b/google/cloud/datacatalog/CMakeLists.txt index b4d7349a95348..bb913f2394157 100644 --- a/google/cloud/datacatalog/CMakeLists.txt +++ b/google/cloud/datacatalog/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(datacatalog "Google Cloud Data Catalog API" - SERVICE_DIRS "__EMPTY__" "lineage/v1/" "v1/") + SERVICE_DIRS "lineage/v1/" "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(datacatalog_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/datacatalog/data_catalog_client.h b/google/cloud/datacatalog/data_catalog_client.h deleted file mode 100644 index 15b940e0e6713..0000000000000 --- a/google/cloud/datacatalog/data_catalog_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/datacatalog/v1/datacatalog.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_DATA_CATALOG_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_DATA_CATALOG_CLIENT_H - -#include "google/cloud/datacatalog/data_catalog_connection.h" -#include "google/cloud/datacatalog/v1/data_catalog_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in datacatalog_v1 instead of the aliases defined in -/// this namespace. -namespace datacatalog { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use datacatalog_v1::DataCatalogClient directly. -using ::google::cloud::datacatalog_v1::DataCatalogClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace datacatalog -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_DATA_CATALOG_CLIENT_H diff --git a/google/cloud/datacatalog/data_catalog_connection.h b/google/cloud/datacatalog/data_catalog_connection.h deleted file mode 100644 index 8c475a57951c9..0000000000000 --- a/google/cloud/datacatalog/data_catalog_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/datacatalog/v1/datacatalog.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_DATA_CATALOG_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_DATA_CATALOG_CONNECTION_H - -#include "google/cloud/datacatalog/data_catalog_connection_idempotency_policy.h" -#include "google/cloud/datacatalog/v1/data_catalog_connection.h" - -namespace google { -namespace cloud { -namespace datacatalog { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use datacatalog_v1::MakeDataCatalogConnection directly. -using ::google::cloud::datacatalog_v1::MakeDataCatalogConnection; - -/// @deprecated Use datacatalog_v1::DataCatalogConnection directly. -using ::google::cloud::datacatalog_v1::DataCatalogConnection; - -/// @deprecated Use datacatalog_v1::DataCatalogLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::datacatalog_v1::DataCatalogLimitedErrorCountRetryPolicy; - -/// @deprecated Use datacatalog_v1::DataCatalogLimitedTimeRetryPolicy directly. -using ::google::cloud::datacatalog_v1::DataCatalogLimitedTimeRetryPolicy; - -/// @deprecated Use datacatalog_v1::DataCatalogRetryPolicy directly. -using ::google::cloud::datacatalog_v1::DataCatalogRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace datacatalog -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_DATA_CATALOG_CONNECTION_H diff --git a/google/cloud/datacatalog/data_catalog_connection_idempotency_policy.h b/google/cloud/datacatalog/data_catalog_connection_idempotency_policy.h deleted file mode 100644 index 25b4a013ba3c1..0000000000000 --- a/google/cloud/datacatalog/data_catalog_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/datacatalog/v1/datacatalog.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_DATA_CATALOG_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_DATA_CATALOG_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/datacatalog/v1/data_catalog_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace datacatalog { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// datacatalog_v1::MakeDefaultDataCatalogConnectionIdempotencyPolicy directly. -using ::google::cloud::datacatalog_v1:: - MakeDefaultDataCatalogConnectionIdempotencyPolicy; - -/// @deprecated Use datacatalog_v1::DataCatalogConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::datacatalog_v1::DataCatalogConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace datacatalog -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_DATA_CATALOG_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/datacatalog/data_catalog_options.h b/google/cloud/datacatalog/data_catalog_options.h deleted file mode 100644 index 6bb9d41b0247a..0000000000000 --- a/google/cloud/datacatalog/data_catalog_options.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/datacatalog/v1/datacatalog.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_DATA_CATALOG_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_DATA_CATALOG_OPTIONS_H - -#include "google/cloud/datacatalog/data_catalog_connection.h" -#include "google/cloud/datacatalog/data_catalog_connection_idempotency_policy.h" -#include "google/cloud/datacatalog/v1/data_catalog_options.h" - -namespace google { -namespace cloud { -namespace datacatalog { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use datacatalog_v1::DataCatalogPollingPolicyOption directly. -using ::google::cloud::datacatalog_v1::DataCatalogPollingPolicyOption; - -/// @deprecated Use datacatalog_v1::DataCatalogBackoffPolicyOption directly. -using ::google::cloud::datacatalog_v1::DataCatalogBackoffPolicyOption; - -/// @deprecated Use datacatalog_v1::DataCatalogConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::datacatalog_v1:: - DataCatalogConnectionIdempotencyPolicyOption; - -/// @deprecated Use datacatalog_v1::DataCatalogPolicyOptionList directly. -using ::google::cloud::datacatalog_v1::DataCatalogPolicyOptionList; - -/// @deprecated Use datacatalog_v1::DataCatalogRetryPolicyOption directly. -using ::google::cloud::datacatalog_v1::DataCatalogRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace datacatalog -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_DATA_CATALOG_OPTIONS_H diff --git a/google/cloud/datacatalog/lineage/v1/internal/lineage_auth_decorator.cc b/google/cloud/datacatalog/lineage/v1/internal/lineage_auth_decorator.cc index f599e0e94e085..c434a5913ade8 100644 --- a/google/cloud/datacatalog/lineage/v1/internal/lineage_auth_decorator.cc +++ b/google/cloud/datacatalog/lineage/v1/internal/lineage_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/datacatalog/lineage/v1/lineage.proto #include "google/cloud/datacatalog/lineage/v1/internal/lineage_auth_decorator.h" -#include +#include "google/cloud/datacatalog/lineage/v1/lineage.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_lineage_v1_internal { @@ -303,3 +306,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datacatalog_lineage_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datacatalog/lineage/v1/internal/lineage_auth_decorator.h b/google/cloud/datacatalog/lineage/v1/internal/lineage_auth_decorator.h index 0cc484afb1941..731968c145d83 100644 --- a/google/cloud/datacatalog/lineage/v1/internal/lineage_auth_decorator.h +++ b/google/cloud/datacatalog/lineage/v1/internal/lineage_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/datacatalog/lineage/v1/internal/lineage_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_lineage_v1_internal { @@ -184,4 +187,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_LINEAGE_V1_INTERNAL_LINEAGE_AUTH_DECORATOR_H diff --git a/google/cloud/datacatalog/lineage/v1/internal/lineage_connection_impl.h b/google/cloud/datacatalog/lineage/v1/internal/lineage_connection_impl.h index baa52e9b49665..11eeedc039213 100644 --- a/google/cloud/datacatalog/lineage/v1/internal/lineage_connection_impl.h +++ b/google/cloud/datacatalog/lineage/v1/internal/lineage_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/datacatalog/lineage/v1/internal/lineage_logging_decorator.cc b/google/cloud/datacatalog/lineage/v1/internal/lineage_logging_decorator.cc index f9e9269144195..edf839eda5557 100644 --- a/google/cloud/datacatalog/lineage/v1/internal/lineage_logging_decorator.cc +++ b/google/cloud/datacatalog/lineage/v1/internal/lineage_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/datacatalog/lineage/v1/lineage.proto #include "google/cloud/datacatalog/lineage/v1/internal/lineage_logging_decorator.h" +#include "google/cloud/datacatalog/lineage/v1/lineage.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_lineage_v1_internal { @@ -391,3 +394,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datacatalog_lineage_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datacatalog/lineage/v1/internal/lineage_logging_decorator.h b/google/cloud/datacatalog/lineage/v1/internal/lineage_logging_decorator.h index 419139faa9b8b..b56ea9dc265e3 100644 --- a/google/cloud/datacatalog/lineage/v1/internal/lineage_logging_decorator.h +++ b/google/cloud/datacatalog/lineage/v1/internal/lineage_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/datacatalog/lineage/v1/internal/lineage_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_lineage_v1_internal { @@ -184,4 +187,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_LINEAGE_V1_INTERNAL_LINEAGE_LOGGING_DECORATOR_H diff --git a/google/cloud/datacatalog/lineage/v1/internal/lineage_metadata_decorator.cc b/google/cloud/datacatalog/lineage/v1/internal/lineage_metadata_decorator.cc index dc5f60ecd18c9..a9c3441524fb6 100644 --- a/google/cloud/datacatalog/lineage/v1/internal/lineage_metadata_decorator.cc +++ b/google/cloud/datacatalog/lineage/v1/internal/lineage_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/datacatalog/lineage/v1/lineage.proto #include "google/cloud/datacatalog/lineage/v1/internal/lineage_metadata_decorator.h" +#include "google/cloud/datacatalog/lineage/v1/lineage.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_lineage_v1_internal { @@ -306,3 +310,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datacatalog_lineage_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datacatalog/lineage/v1/internal/lineage_metadata_decorator.h b/google/cloud/datacatalog/lineage/v1/internal/lineage_metadata_decorator.h index d8981eb24fb4e..0c5b0934040d4 100644 --- a/google/cloud/datacatalog/lineage/v1/internal/lineage_metadata_decorator.h +++ b/google/cloud/datacatalog/lineage/v1/internal/lineage_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/datacatalog/lineage/v1/internal/lineage_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_lineage_v1_internal { @@ -189,4 +192,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_LINEAGE_V1_INTERNAL_LINEAGE_METADATA_DECORATOR_H diff --git a/google/cloud/datacatalog/lineage/v1/internal/lineage_option_defaults.cc b/google/cloud/datacatalog/lineage/v1/internal/lineage_option_defaults.cc index 241a4375df96b..b884461d0b575 100644 --- a/google/cloud/datacatalog/lineage/v1/internal/lineage_option_defaults.cc +++ b/google/cloud/datacatalog/lineage/v1/internal/lineage_option_defaults.cc @@ -41,7 +41,7 @@ Options LineageDefaultOptions(Options options) { if (!options.has()) { options.set( datacatalog_lineage_v1::LineageLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/datacatalog/lineage/v1/internal/lineage_stub.cc b/google/cloud/datacatalog/lineage/v1/internal/lineage_stub.cc index 467d84a47a7d9..28e1d78959874 100644 --- a/google/cloud/datacatalog/lineage/v1/internal/lineage_stub.cc +++ b/google/cloud/datacatalog/lineage/v1/internal/lineage_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/datacatalog/lineage/v1/lineage.proto #include "google/cloud/datacatalog/lineage/v1/internal/lineage_stub.h" +#include "google/cloud/datacatalog/lineage/v1/lineage.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_lineage_v1_internal { @@ -377,3 +380,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datacatalog_lineage_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datacatalog/lineage/v1/internal/lineage_stub.h b/google/cloud/datacatalog/lineage/v1/internal/lineage_stub.h index 4a202cfdc2312..a6811ca047ec3 100644 --- a/google/cloud/datacatalog/lineage/v1/internal/lineage_stub.h +++ b/google/cloud/datacatalog/lineage/v1/internal/lineage_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_LINEAGE_V1_INTERNAL_LINEAGE_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_LINEAGE_V1_INTERNAL_LINEAGE_STUB_H +#include "google/cloud/datacatalog/lineage/v1/lineage.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_lineage_v1_internal { @@ -337,4 +340,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_LINEAGE_V1_INTERNAL_LINEAGE_STUB_H diff --git a/google/cloud/datacatalog/lineage/v1/internal/lineage_stub_factory.cc b/google/cloud/datacatalog/lineage/v1/internal/lineage_stub_factory.cc index 4572c83e58e00..27e718084692f 100644 --- a/google/cloud/datacatalog/lineage/v1/internal/lineage_stub_factory.cc +++ b/google/cloud/datacatalog/lineage/v1/internal/lineage_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/datacatalog/lineage/v1/internal/lineage_metadata_decorator.h" #include "google/cloud/datacatalog/lineage/v1/internal/lineage_stub.h" #include "google/cloud/datacatalog/lineage/v1/internal/lineage_tracing_stub.h" +#include "google/cloud/datacatalog/lineage/v1/lineage.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_lineage_v1_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datacatalog_lineage_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datacatalog/lineage/v1/internal/lineage_stub_factory.h b/google/cloud/datacatalog/lineage/v1/internal/lineage_stub_factory.h index 1e5aed97b248a..9856a9ce91dfd 100644 --- a/google/cloud/datacatalog/lineage/v1/internal/lineage_stub_factory.h +++ b/google/cloud/datacatalog/lineage/v1/internal/lineage_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_lineage_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_LINEAGE_V1_INTERNAL_LINEAGE_STUB_FACTORY_H diff --git a/google/cloud/datacatalog/lineage/v1/internal/lineage_tracing_connection.cc b/google/cloud/datacatalog/lineage/v1/internal/lineage_tracing_connection.cc index a4b196313f0f3..6b10058914afa 100644 --- a/google/cloud/datacatalog/lineage/v1/internal/lineage_tracing_connection.cc +++ b/google/cloud/datacatalog/lineage/v1/internal/lineage_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace datacatalog_lineage_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - LineageTracingConnection::LineageTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -282,16 +280,12 @@ Status LineageTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeLineageTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/datacatalog/lineage/v1/internal/lineage_tracing_connection.h b/google/cloud/datacatalog/lineage/v1/internal/lineage_tracing_connection.h index 2f22589aaed79..5a8c7adae6d3c 100644 --- a/google/cloud/datacatalog/lineage/v1/internal/lineage_tracing_connection.h +++ b/google/cloud/datacatalog/lineage/v1/internal/lineage_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace datacatalog_lineage_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class LineageTracingConnection : public datacatalog_lineage_v1::LineageConnection { public: @@ -147,8 +145,6 @@ class LineageTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/datacatalog/lineage/v1/internal/lineage_tracing_stub.cc b/google/cloud/datacatalog/lineage/v1/internal/lineage_tracing_stub.cc index 81b5722aa09b8..9a3186cd4ceb9 100644 --- a/google/cloud/datacatalog/lineage/v1/internal/lineage_tracing_stub.cc +++ b/google/cloud/datacatalog/lineage/v1/internal/lineage_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_lineage_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - LineageTracingStub::LineageTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -351,18 +352,14 @@ future LineageTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeLineageTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datacatalog_lineage_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datacatalog/lineage/v1/internal/lineage_tracing_stub.h b/google/cloud/datacatalog/lineage/v1/internal/lineage_tracing_stub.h index a8d99d6fd2115..7abe8cec882c6 100644 --- a/google/cloud/datacatalog/lineage/v1/internal/lineage_tracing_stub.h +++ b/google/cloud/datacatalog/lineage/v1/internal/lineage_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_lineage_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class LineageTracingStub : public LineageStub { public: ~LineageTracingStub() override = default; @@ -179,8 +180,6 @@ class LineageTracingStub : public LineageStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -195,4 +194,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_LINEAGE_V1_INTERNAL_LINEAGE_TRACING_STUB_H diff --git a/google/cloud/datacatalog/lineage/v1/lineage_client.h b/google/cloud/datacatalog/lineage/v1/lineage_client.h index b944fb1648022..ad0811d09d744 100644 --- a/google/cloud/datacatalog/lineage/v1/lineage_client.h +++ b/google/cloud/datacatalog/lineage/v1/lineage_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/datacatalog/lineage/v1/lineage_connection.h b/google/cloud/datacatalog/lineage/v1/lineage_connection.h index 446363fc6616a..eff6d33e8eabc 100644 --- a/google/cloud/datacatalog/lineage/v1/lineage_connection.h +++ b/google/cloud/datacatalog/lineage/v1/lineage_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_LINEAGE_V1_LINEAGE_CONNECTION_H #include "google/cloud/datacatalog/lineage/v1/internal/lineage_retry_traits.h" +#include "google/cloud/datacatalog/lineage/v1/lineage.pb.h" #include "google/cloud/datacatalog/lineage/v1/lineage_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/datacatalog/lineage/v1/lineage_connection_idempotency_policy.h b/google/cloud/datacatalog/lineage/v1/lineage_connection_idempotency_policy.h index 7140a000c207c..92baca262b953 100644 --- a/google/cloud/datacatalog/lineage/v1/lineage_connection_idempotency_policy.h +++ b/google/cloud/datacatalog/lineage/v1/lineage_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_LINEAGE_V1_LINEAGE_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_LINEAGE_V1_LINEAGE_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/datacatalog/lineage/v1/lineage.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/datacatalog/mocks/mock_data_catalog_connection.h b/google/cloud/datacatalog/mocks/mock_data_catalog_connection.h deleted file mode 100644 index 0aae3a14df6b7..0000000000000 --- a/google/cloud/datacatalog/mocks/mock_data_catalog_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/datacatalog/v1/datacatalog.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_MOCKS_MOCK_DATA_CATALOG_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_MOCKS_MOCK_DATA_CATALOG_CONNECTION_H - -#include "google/cloud/datacatalog/data_catalog_connection.h" -#include "google/cloud/datacatalog/v1/mocks/mock_data_catalog_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in datacatalog_v1_mocks instead of the aliases -/// defined in this namespace. -namespace datacatalog_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use datacatalog_v1_mocks::MockDataCatalogConnection directly. -using ::google::cloud::datacatalog_v1_mocks::MockDataCatalogConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace datacatalog_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_MOCKS_MOCK_DATA_CATALOG_CONNECTION_H diff --git a/google/cloud/datacatalog/mocks/mock_policy_tag_manager_connection.h b/google/cloud/datacatalog/mocks/mock_policy_tag_manager_connection.h deleted file mode 100644 index 528f997ae60c2..0000000000000 --- a/google/cloud/datacatalog/mocks/mock_policy_tag_manager_connection.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/datacatalog/v1/policytagmanager.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_MOCKS_MOCK_POLICY_TAG_MANAGER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_MOCKS_MOCK_POLICY_TAG_MANAGER_CONNECTION_H - -#include "google/cloud/datacatalog/policy_tag_manager_connection.h" -#include "google/cloud/datacatalog/v1/mocks/mock_policy_tag_manager_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in datacatalog_v1_mocks instead of the aliases -/// defined in this namespace. -namespace datacatalog_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use datacatalog_v1_mocks::MockPolicyTagManagerConnection -/// directly. -using ::google::cloud::datacatalog_v1_mocks::MockPolicyTagManagerConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace datacatalog_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_MOCKS_MOCK_POLICY_TAG_MANAGER_CONNECTION_H diff --git a/google/cloud/datacatalog/mocks/mock_policy_tag_manager_serialization_connection.h b/google/cloud/datacatalog/mocks/mock_policy_tag_manager_serialization_connection.h deleted file mode 100644 index 5b22812dd5a08..0000000000000 --- a/google/cloud/datacatalog/mocks/mock_policy_tag_manager_serialization_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/datacatalog/v1/policytagmanagerserialization.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_MOCKS_MOCK_POLICY_TAG_MANAGER_SERIALIZATION_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_MOCKS_MOCK_POLICY_TAG_MANAGER_SERIALIZATION_CONNECTION_H - -#include "google/cloud/datacatalog/policy_tag_manager_serialization_connection.h" -#include "google/cloud/datacatalog/v1/mocks/mock_policy_tag_manager_serialization_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in datacatalog_v1_mocks instead of the aliases -/// defined in this namespace. -namespace datacatalog_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// datacatalog_v1_mocks::MockPolicyTagManagerSerializationConnection directly. -using ::google::cloud::datacatalog_v1_mocks:: - MockPolicyTagManagerSerializationConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace datacatalog_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_MOCKS_MOCK_POLICY_TAG_MANAGER_SERIALIZATION_CONNECTION_H diff --git a/google/cloud/datacatalog/policy_tag_manager_client.h b/google/cloud/datacatalog/policy_tag_manager_client.h deleted file mode 100644 index 27cad84c2632d..0000000000000 --- a/google/cloud/datacatalog/policy_tag_manager_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/datacatalog/v1/policytagmanager.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_POLICY_TAG_MANAGER_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_POLICY_TAG_MANAGER_CLIENT_H - -#include "google/cloud/datacatalog/policy_tag_manager_connection.h" -#include "google/cloud/datacatalog/v1/policy_tag_manager_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in datacatalog_v1 instead of the aliases defined in -/// this namespace. -namespace datacatalog { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use datacatalog_v1::PolicyTagManagerClient directly. -using ::google::cloud::datacatalog_v1::PolicyTagManagerClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace datacatalog -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_POLICY_TAG_MANAGER_CLIENT_H diff --git a/google/cloud/datacatalog/policy_tag_manager_connection.h b/google/cloud/datacatalog/policy_tag_manager_connection.h deleted file mode 100644 index 5e49928394ea5..0000000000000 --- a/google/cloud/datacatalog/policy_tag_manager_connection.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/datacatalog/v1/policytagmanager.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_POLICY_TAG_MANAGER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_POLICY_TAG_MANAGER_CONNECTION_H - -#include "google/cloud/datacatalog/policy_tag_manager_connection_idempotency_policy.h" -#include "google/cloud/datacatalog/v1/policy_tag_manager_connection.h" - -namespace google { -namespace cloud { -namespace datacatalog { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use datacatalog_v1::MakePolicyTagManagerConnection directly. -using ::google::cloud::datacatalog_v1::MakePolicyTagManagerConnection; - -/// @deprecated Use datacatalog_v1::PolicyTagManagerConnection directly. -using ::google::cloud::datacatalog_v1::PolicyTagManagerConnection; - -/// @deprecated Use datacatalog_v1::PolicyTagManagerLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::datacatalog_v1:: - PolicyTagManagerLimitedErrorCountRetryPolicy; - -/// @deprecated Use datacatalog_v1::PolicyTagManagerLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::datacatalog_v1::PolicyTagManagerLimitedTimeRetryPolicy; - -/// @deprecated Use datacatalog_v1::PolicyTagManagerRetryPolicy directly. -using ::google::cloud::datacatalog_v1::PolicyTagManagerRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace datacatalog -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_POLICY_TAG_MANAGER_CONNECTION_H diff --git a/google/cloud/datacatalog/policy_tag_manager_connection_idempotency_policy.h b/google/cloud/datacatalog/policy_tag_manager_connection_idempotency_policy.h deleted file mode 100644 index c18a7f71447c2..0000000000000 --- a/google/cloud/datacatalog/policy_tag_manager_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/datacatalog/v1/policytagmanager.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_POLICY_TAG_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_POLICY_TAG_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/datacatalog/v1/policy_tag_manager_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace datacatalog { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// datacatalog_v1::MakeDefaultPolicyTagManagerConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::datacatalog_v1:: - MakeDefaultPolicyTagManagerConnectionIdempotencyPolicy; - -/// @deprecated Use datacatalog_v1::PolicyTagManagerConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::datacatalog_v1:: - PolicyTagManagerConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace datacatalog -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_POLICY_TAG_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/datacatalog/policy_tag_manager_options.h b/google/cloud/datacatalog/policy_tag_manager_options.h deleted file mode 100644 index d8f7c18f42ba2..0000000000000 --- a/google/cloud/datacatalog/policy_tag_manager_options.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/datacatalog/v1/policytagmanager.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_POLICY_TAG_MANAGER_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_POLICY_TAG_MANAGER_OPTIONS_H - -#include "google/cloud/datacatalog/policy_tag_manager_connection.h" -#include "google/cloud/datacatalog/policy_tag_manager_connection_idempotency_policy.h" -#include "google/cloud/datacatalog/v1/policy_tag_manager_options.h" - -namespace google { -namespace cloud { -namespace datacatalog { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use datacatalog_v1::PolicyTagManagerBackoffPolicyOption -/// directly. -using ::google::cloud::datacatalog_v1::PolicyTagManagerBackoffPolicyOption; - -/// @deprecated Use -/// datacatalog_v1::PolicyTagManagerConnectionIdempotencyPolicyOption directly. -using ::google::cloud::datacatalog_v1:: - PolicyTagManagerConnectionIdempotencyPolicyOption; - -/// @deprecated Use datacatalog_v1::PolicyTagManagerPolicyOptionList directly. -using ::google::cloud::datacatalog_v1::PolicyTagManagerPolicyOptionList; - -/// @deprecated Use datacatalog_v1::PolicyTagManagerRetryPolicyOption directly. -using ::google::cloud::datacatalog_v1::PolicyTagManagerRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace datacatalog -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_POLICY_TAG_MANAGER_OPTIONS_H diff --git a/google/cloud/datacatalog/policy_tag_manager_serialization_client.h b/google/cloud/datacatalog/policy_tag_manager_serialization_client.h deleted file mode 100644 index 5f2bac534fe20..0000000000000 --- a/google/cloud/datacatalog/policy_tag_manager_serialization_client.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/datacatalog/v1/policytagmanagerserialization.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_POLICY_TAG_MANAGER_SERIALIZATION_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_POLICY_TAG_MANAGER_SERIALIZATION_CLIENT_H - -#include "google/cloud/datacatalog/policy_tag_manager_serialization_connection.h" -#include "google/cloud/datacatalog/v1/policy_tag_manager_serialization_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in datacatalog_v1 instead of the aliases defined in -/// this namespace. -namespace datacatalog { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use datacatalog_v1::PolicyTagManagerSerializationClient -/// directly. -using ::google::cloud::datacatalog_v1::PolicyTagManagerSerializationClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace datacatalog -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_POLICY_TAG_MANAGER_SERIALIZATION_CLIENT_H diff --git a/google/cloud/datacatalog/policy_tag_manager_serialization_connection.h b/google/cloud/datacatalog/policy_tag_manager_serialization_connection.h deleted file mode 100644 index bc2440632f89c..0000000000000 --- a/google/cloud/datacatalog/policy_tag_manager_serialization_connection.h +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/datacatalog/v1/policytagmanagerserialization.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_POLICY_TAG_MANAGER_SERIALIZATION_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_POLICY_TAG_MANAGER_SERIALIZATION_CONNECTION_H - -#include "google/cloud/datacatalog/policy_tag_manager_serialization_connection_idempotency_policy.h" -#include "google/cloud/datacatalog/v1/policy_tag_manager_serialization_connection.h" - -namespace google { -namespace cloud { -namespace datacatalog { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use datacatalog_v1::MakePolicyTagManagerSerializationConnection -/// directly. -using ::google::cloud::datacatalog_v1:: - MakePolicyTagManagerSerializationConnection; - -/// @deprecated Use datacatalog_v1::PolicyTagManagerSerializationConnection -/// directly. -using ::google::cloud::datacatalog_v1::PolicyTagManagerSerializationConnection; - -/// @deprecated Use -/// datacatalog_v1::PolicyTagManagerSerializationLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::datacatalog_v1:: - PolicyTagManagerSerializationLimitedErrorCountRetryPolicy; - -/// @deprecated Use -/// datacatalog_v1::PolicyTagManagerSerializationLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::datacatalog_v1:: - PolicyTagManagerSerializationLimitedTimeRetryPolicy; - -/// @deprecated Use datacatalog_v1::PolicyTagManagerSerializationRetryPolicy -/// directly. -using ::google::cloud::datacatalog_v1::PolicyTagManagerSerializationRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace datacatalog -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_POLICY_TAG_MANAGER_SERIALIZATION_CONNECTION_H diff --git a/google/cloud/datacatalog/policy_tag_manager_serialization_connection_idempotency_policy.h b/google/cloud/datacatalog/policy_tag_manager_serialization_connection_idempotency_policy.h deleted file mode 100644 index eb29b0933339d..0000000000000 --- a/google/cloud/datacatalog/policy_tag_manager_serialization_connection_idempotency_policy.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/datacatalog/v1/policytagmanagerserialization.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_POLICY_TAG_MANAGER_SERIALIZATION_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_POLICY_TAG_MANAGER_SERIALIZATION_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/datacatalog/v1/policy_tag_manager_serialization_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace datacatalog { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// datacatalog_v1::MakeDefaultPolicyTagManagerSerializationConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::datacatalog_v1:: - MakeDefaultPolicyTagManagerSerializationConnectionIdempotencyPolicy; - -/// @deprecated Use -/// datacatalog_v1::PolicyTagManagerSerializationConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::datacatalog_v1:: - PolicyTagManagerSerializationConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace datacatalog -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_POLICY_TAG_MANAGER_SERIALIZATION_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/datacatalog/policy_tag_manager_serialization_options.h b/google/cloud/datacatalog/policy_tag_manager_serialization_options.h deleted file mode 100644 index 95bf790320221..0000000000000 --- a/google/cloud/datacatalog/policy_tag_manager_serialization_options.h +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/datacatalog/v1/policytagmanagerserialization.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_POLICY_TAG_MANAGER_SERIALIZATION_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_POLICY_TAG_MANAGER_SERIALIZATION_OPTIONS_H - -#include "google/cloud/datacatalog/policy_tag_manager_serialization_connection.h" -#include "google/cloud/datacatalog/policy_tag_manager_serialization_connection_idempotency_policy.h" -#include "google/cloud/datacatalog/v1/policy_tag_manager_serialization_options.h" - -namespace google { -namespace cloud { -namespace datacatalog { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// datacatalog_v1::PolicyTagManagerSerializationBackoffPolicyOption directly. -using ::google::cloud::datacatalog_v1:: - PolicyTagManagerSerializationBackoffPolicyOption; - -/// @deprecated Use -/// datacatalog_v1::PolicyTagManagerSerializationConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::datacatalog_v1:: - PolicyTagManagerSerializationConnectionIdempotencyPolicyOption; - -/// @deprecated Use -/// datacatalog_v1::PolicyTagManagerSerializationPolicyOptionList directly. -using ::google::cloud::datacatalog_v1:: - PolicyTagManagerSerializationPolicyOptionList; - -/// @deprecated Use -/// datacatalog_v1::PolicyTagManagerSerializationRetryPolicyOption directly. -using ::google::cloud::datacatalog_v1:: - PolicyTagManagerSerializationRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace datacatalog -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_POLICY_TAG_MANAGER_SERIALIZATION_OPTIONS_H diff --git a/google/cloud/datacatalog/quickstart/.bazelrc b/google/cloud/datacatalog/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/datacatalog/quickstart/.bazelrc +++ b/google/cloud/datacatalog/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/datacatalog/quickstart/CMakeLists.txt b/google/cloud/datacatalog/quickstart/CMakeLists.txt index cf40943ded865..1ca8f16d8f765 100644 --- a/google/cloud/datacatalog/quickstart/CMakeLists.txt +++ b/google/cloud/datacatalog/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Google Cloud Data Catalog API C++ client # library from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-datacatalog-quickstart CXX) find_package(google_cloud_cpp_datacatalog REQUIRED) diff --git a/google/cloud/datacatalog/v1/data_catalog_client.h b/google/cloud/datacatalog/v1/data_catalog_client.h index 248ba7592868b..7edcba8771fc6 100644 --- a/google/cloud/datacatalog/v1/data_catalog_client.h +++ b/google/cloud/datacatalog/v1/data_catalog_client.h @@ -28,7 +28,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/datacatalog/v1/data_catalog_connection.h b/google/cloud/datacatalog/v1/data_catalog_connection.h index 1f4eff41b8ee2..3344cb0986954 100644 --- a/google/cloud/datacatalog/v1/data_catalog_connection.h +++ b/google/cloud/datacatalog/v1/data_catalog_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_V1_DATA_CATALOG_CONNECTION_H #include "google/cloud/datacatalog/v1/data_catalog_connection_idempotency_policy.h" +#include "google/cloud/datacatalog/v1/datacatalog.pb.h" #include "google/cloud/datacatalog/v1/internal/data_catalog_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/datacatalog/v1/data_catalog_connection_idempotency_policy.h b/google/cloud/datacatalog/v1/data_catalog_connection_idempotency_policy.h index f275e053522c5..aa45df7d659fb 100644 --- a/google/cloud/datacatalog/v1/data_catalog_connection_idempotency_policy.h +++ b/google/cloud/datacatalog/v1/data_catalog_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_V1_DATA_CATALOG_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_V1_DATA_CATALOG_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/datacatalog/v1/datacatalog.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/datacatalog/v1/internal/data_catalog_auth_decorator.cc b/google/cloud/datacatalog/v1/internal/data_catalog_auth_decorator.cc index d1a1c566bd0a7..2a0a7a402cf5f 100644 --- a/google/cloud/datacatalog/v1/internal/data_catalog_auth_decorator.cc +++ b/google/cloud/datacatalog/v1/internal/data_catalog_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/datacatalog/v1/datacatalog.proto #include "google/cloud/datacatalog/v1/internal/data_catalog_auth_decorator.h" -#include +#include "google/cloud/datacatalog/v1/datacatalog.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { @@ -468,3 +471,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datacatalog_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datacatalog/v1/internal/data_catalog_auth_decorator.h b/google/cloud/datacatalog/v1/internal/data_catalog_auth_decorator.h index 200ef12b5a137..1f17ff9e0ccda 100644 --- a/google/cloud/datacatalog/v1/internal/data_catalog_auth_decorator.h +++ b/google/cloud/datacatalog/v1/internal/data_catalog_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/datacatalog/v1/internal/data_catalog_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { @@ -270,4 +273,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_V1_INTERNAL_DATA_CATALOG_AUTH_DECORATOR_H diff --git a/google/cloud/datacatalog/v1/internal/data_catalog_connection_impl.h b/google/cloud/datacatalog/v1/internal/data_catalog_connection_impl.h index da29c5e4be240..6b664f8a86ece 100644 --- a/google/cloud/datacatalog/v1/internal/data_catalog_connection_impl.h +++ b/google/cloud/datacatalog/v1/internal/data_catalog_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/datacatalog/v1/internal/data_catalog_logging_decorator.cc b/google/cloud/datacatalog/v1/internal/data_catalog_logging_decorator.cc index dbb0359020a45..f79676d8d9ddd 100644 --- a/google/cloud/datacatalog/v1/internal/data_catalog_logging_decorator.cc +++ b/google/cloud/datacatalog/v1/internal/data_catalog_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/datacatalog/v1/datacatalog.proto #include "google/cloud/datacatalog/v1/internal/data_catalog_logging_decorator.h" +#include "google/cloud/datacatalog/v1/datacatalog.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { @@ -625,3 +628,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datacatalog_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datacatalog/v1/internal/data_catalog_logging_decorator.h b/google/cloud/datacatalog/v1/internal/data_catalog_logging_decorator.h index 83db5b8695a2f..7da8b1d623261 100644 --- a/google/cloud/datacatalog/v1/internal/data_catalog_logging_decorator.h +++ b/google/cloud/datacatalog/v1/internal/data_catalog_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/datacatalog/v1/internal/data_catalog_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { @@ -270,4 +273,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_V1_INTERNAL_DATA_CATALOG_LOGGING_DECORATOR_H diff --git a/google/cloud/datacatalog/v1/internal/data_catalog_metadata_decorator.cc b/google/cloud/datacatalog/v1/internal/data_catalog_metadata_decorator.cc index 80c40c24f219b..2c5410ae9ef2a 100644 --- a/google/cloud/datacatalog/v1/internal/data_catalog_metadata_decorator.cc +++ b/google/cloud/datacatalog/v1/internal/data_catalog_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/datacatalog/v1/datacatalog.proto #include "google/cloud/datacatalog/v1/internal/data_catalog_metadata_decorator.h" +#include "google/cloud/datacatalog/v1/datacatalog.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { @@ -473,3 +477,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datacatalog_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datacatalog/v1/internal/data_catalog_metadata_decorator.h b/google/cloud/datacatalog/v1/internal/data_catalog_metadata_decorator.h index 16a76e987369a..63f0a2d7611cc 100644 --- a/google/cloud/datacatalog/v1/internal/data_catalog_metadata_decorator.h +++ b/google/cloud/datacatalog/v1/internal/data_catalog_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/datacatalog/v1/internal/data_catalog_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { @@ -275,4 +278,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_V1_INTERNAL_DATA_CATALOG_METADATA_DECORATOR_H diff --git a/google/cloud/datacatalog/v1/internal/data_catalog_option_defaults.cc b/google/cloud/datacatalog/v1/internal/data_catalog_option_defaults.cc index 6477d731725a4..13bbdb4ea11b6 100644 --- a/google/cloud/datacatalog/v1/internal/data_catalog_option_defaults.cc +++ b/google/cloud/datacatalog/v1/internal/data_catalog_option_defaults.cc @@ -41,7 +41,7 @@ Options DataCatalogDefaultOptions(Options options) { if (!options.has()) { options.set( datacatalog_v1::DataCatalogLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/datacatalog/v1/internal/data_catalog_stub.cc b/google/cloud/datacatalog/v1/internal/data_catalog_stub.cc index 579418305978c..1f907dd747f18 100644 --- a/google/cloud/datacatalog/v1/internal/data_catalog_stub.cc +++ b/google/cloud/datacatalog/v1/internal/data_catalog_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/datacatalog/v1/datacatalog.proto #include "google/cloud/datacatalog/v1/internal/data_catalog_stub.h" +#include "google/cloud/datacatalog/v1/datacatalog.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { @@ -602,3 +605,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datacatalog_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datacatalog/v1/internal/data_catalog_stub.h b/google/cloud/datacatalog/v1/internal/data_catalog_stub.h index 664df2f51dc72..0e6460339653c 100644 --- a/google/cloud/datacatalog/v1/internal/data_catalog_stub.h +++ b/google/cloud/datacatalog/v1/internal/data_catalog_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_V1_INTERNAL_DATA_CATALOG_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_V1_INTERNAL_DATA_CATALOG_STUB_H +#include "google/cloud/datacatalog/v1/datacatalog.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { @@ -500,4 +503,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_V1_INTERNAL_DATA_CATALOG_STUB_H diff --git a/google/cloud/datacatalog/v1/internal/data_catalog_stub_factory.cc b/google/cloud/datacatalog/v1/internal/data_catalog_stub_factory.cc index 0b235bec129f3..86e6750279083 100644 --- a/google/cloud/datacatalog/v1/internal/data_catalog_stub_factory.cc +++ b/google/cloud/datacatalog/v1/internal/data_catalog_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/datacatalog/v1/datacatalog.proto #include "google/cloud/datacatalog/v1/internal/data_catalog_stub_factory.h" +#include "google/cloud/datacatalog/v1/datacatalog.grpc.pb.h" #include "google/cloud/datacatalog/v1/internal/data_catalog_auth_decorator.h" #include "google/cloud/datacatalog/v1/internal/data_catalog_logging_decorator.h" #include "google/cloud/datacatalog/v1/internal/data_catalog_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datacatalog_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datacatalog/v1/internal/data_catalog_stub_factory.h b/google/cloud/datacatalog/v1/internal/data_catalog_stub_factory.h index 73384d2f16ead..69269dd1126a0 100644 --- a/google/cloud/datacatalog/v1/internal/data_catalog_stub_factory.h +++ b/google/cloud/datacatalog/v1/internal/data_catalog_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_V1_INTERNAL_DATA_CATALOG_STUB_FACTORY_H diff --git a/google/cloud/datacatalog/v1/internal/data_catalog_tracing_connection.cc b/google/cloud/datacatalog/v1/internal/data_catalog_tracing_connection.cc index 52b877759e810..2e346e6a88c4e 100644 --- a/google/cloud/datacatalog/v1/internal/data_catalog_tracing_connection.cc +++ b/google/cloud/datacatalog/v1/internal/data_catalog_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace datacatalog_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DataCatalogTracingConnection::DataCatalogTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -450,16 +448,12 @@ Status DataCatalogTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDataCatalogTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/datacatalog/v1/internal/data_catalog_tracing_connection.h b/google/cloud/datacatalog/v1/internal/data_catalog_tracing_connection.h index 058b061dc472d..5ad0b31269b69 100644 --- a/google/cloud/datacatalog/v1/internal/data_catalog_tracing_connection.h +++ b/google/cloud/datacatalog/v1/internal/data_catalog_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace datacatalog_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DataCatalogTracingConnection : public datacatalog_v1::DataCatalogConnection { public: @@ -212,8 +210,6 @@ class DataCatalogTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/datacatalog/v1/internal/data_catalog_tracing_stub.cc b/google/cloud/datacatalog/v1/internal/data_catalog_tracing_stub.cc index 1513b501f091e..464b85030249c 100644 --- a/google/cloud/datacatalog/v1/internal/data_catalog_tracing_stub.cc +++ b/google/cloud/datacatalog/v1/internal/data_catalog_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DataCatalogTracingStub::DataCatalogTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -578,18 +579,14 @@ future DataCatalogTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDataCatalogTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datacatalog_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datacatalog/v1/internal/data_catalog_tracing_stub.h b/google/cloud/datacatalog/v1/internal/data_catalog_tracing_stub.h index dd2d9f58955af..f148e8d7ec1c8 100644 --- a/google/cloud/datacatalog/v1/internal/data_catalog_tracing_stub.h +++ b/google/cloud/datacatalog/v1/internal/data_catalog_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DataCatalogTracingStub : public DataCatalogStub { public: ~DataCatalogTracingStub() override = default; @@ -265,8 +266,6 @@ class DataCatalogTracingStub : public DataCatalogStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -281,4 +280,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_V1_INTERNAL_DATA_CATALOG_TRACING_STUB_H diff --git a/google/cloud/datacatalog/v1/internal/policy_tag_manager_auth_decorator.cc b/google/cloud/datacatalog/v1/internal/policy_tag_manager_auth_decorator.cc index bfadd7de1cc6c..2f90e985af585 100644 --- a/google/cloud/datacatalog/v1/internal/policy_tag_manager_auth_decorator.cc +++ b/google/cloud/datacatalog/v1/internal/policy_tag_manager_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/datacatalog/v1/policytagmanager.proto #include "google/cloud/datacatalog/v1/internal/policy_tag_manager_auth_decorator.h" -#include +#include "google/cloud/datacatalog/v1/policytagmanager.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { @@ -181,3 +184,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datacatalog_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datacatalog/v1/internal/policy_tag_manager_auth_decorator.h b/google/cloud/datacatalog/v1/internal/policy_tag_manager_auth_decorator.h index 5173c57076629..e67e1c34561c2 100644 --- a/google/cloud/datacatalog/v1/internal/policy_tag_manager_auth_decorator.h +++ b/google/cloud/datacatalog/v1/internal/policy_tag_manager_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { @@ -126,4 +129,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_V1_INTERNAL_POLICY_TAG_MANAGER_AUTH_DECORATOR_H diff --git a/google/cloud/datacatalog/v1/internal/policy_tag_manager_logging_decorator.cc b/google/cloud/datacatalog/v1/internal/policy_tag_manager_logging_decorator.cc index 239a8b71f486b..045a67803a472 100644 --- a/google/cloud/datacatalog/v1/internal/policy_tag_manager_logging_decorator.cc +++ b/google/cloud/datacatalog/v1/internal/policy_tag_manager_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/datacatalog/v1/policytagmanager.proto #include "google/cloud/datacatalog/v1/internal/policy_tag_manager_logging_decorator.h" +#include "google/cloud/datacatalog/v1/policytagmanager.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { @@ -246,3 +249,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datacatalog_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datacatalog/v1/internal/policy_tag_manager_logging_decorator.h b/google/cloud/datacatalog/v1/internal/policy_tag_manager_logging_decorator.h index 71d9a7d2fdaad..382f25f86f2fa 100644 --- a/google/cloud/datacatalog/v1/internal/policy_tag_manager_logging_decorator.h +++ b/google/cloud/datacatalog/v1/internal/policy_tag_manager_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { @@ -126,4 +129,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_V1_INTERNAL_POLICY_TAG_MANAGER_LOGGING_DECORATOR_H diff --git a/google/cloud/datacatalog/v1/internal/policy_tag_manager_metadata_decorator.cc b/google/cloud/datacatalog/v1/internal/policy_tag_manager_metadata_decorator.cc index a6d9b68fb98d2..a9add24af16bd 100644 --- a/google/cloud/datacatalog/v1/internal/policy_tag_manager_metadata_decorator.cc +++ b/google/cloud/datacatalog/v1/internal/policy_tag_manager_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/datacatalog/v1/policytagmanager.proto #include "google/cloud/datacatalog/v1/internal/policy_tag_manager_metadata_decorator.h" +#include "google/cloud/datacatalog/v1/policytagmanager.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { @@ -212,3 +216,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datacatalog_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datacatalog/v1/internal/policy_tag_manager_metadata_decorator.h b/google/cloud/datacatalog/v1/internal/policy_tag_manager_metadata_decorator.h index 87cc73c88207b..b995d00514548 100644 --- a/google/cloud/datacatalog/v1/internal/policy_tag_manager_metadata_decorator.h +++ b/google/cloud/datacatalog/v1/internal/policy_tag_manager_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { @@ -132,4 +135,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_V1_INTERNAL_POLICY_TAG_MANAGER_METADATA_DECORATOR_H diff --git a/google/cloud/datacatalog/v1/internal/policy_tag_manager_option_defaults.cc b/google/cloud/datacatalog/v1/internal/policy_tag_manager_option_defaults.cc index 16d0ca6eb6d04..89a31d229d0f0 100644 --- a/google/cloud/datacatalog/v1/internal/policy_tag_manager_option_defaults.cc +++ b/google/cloud/datacatalog/v1/internal/policy_tag_manager_option_defaults.cc @@ -42,7 +42,7 @@ Options PolicyTagManagerDefaultOptions(Options options) { if (!options.has()) { options.set( datacatalog_v1::PolicyTagManagerLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_auth_decorator.cc b/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_auth_decorator.cc index bd618b48985ac..21f6d76b06b98 100644 --- a/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_auth_decorator.cc +++ b/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/datacatalog/v1/policytagmanagerserialization.proto #include "google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_auth_decorator.h" -#include +#include "google/cloud/datacatalog/v1/policytagmanagerserialization.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { @@ -96,3 +99,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datacatalog_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_auth_decorator.h b/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_auth_decorator.h index bab43aac659c5..1857a2510d92f 100644 --- a/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_auth_decorator.h +++ b/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { @@ -82,4 +85,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_V1_INTERNAL_POLICY_TAG_MANAGER_SERIALIZATION_AUTH_DECORATOR_H diff --git a/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_logging_decorator.cc b/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_logging_decorator.cc index 12f75384394f4..0203d9c24f781 100644 --- a/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_logging_decorator.cc +++ b/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/datacatalog/v1/policytagmanagerserialization.proto #include "google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_logging_decorator.h" +#include "google/cloud/datacatalog/v1/policytagmanagerserialization.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { @@ -124,3 +127,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datacatalog_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_logging_decorator.h b/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_logging_decorator.h index d9d69f2b7c06a..e1919beb0b1cc 100644 --- a/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_logging_decorator.h +++ b/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { @@ -82,4 +85,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_V1_INTERNAL_POLICY_TAG_MANAGER_SERIALIZATION_LOGGING_DECORATOR_H diff --git a/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_metadata_decorator.cc b/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_metadata_decorator.cc index 335f9291d99fb..0e92ec70cb67e 100644 --- a/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_metadata_decorator.cc +++ b/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/datacatalog/v1/policytagmanagerserialization.proto #include "google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_metadata_decorator.h" +#include "google/cloud/datacatalog/v1/policytagmanagerserialization.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { @@ -122,3 +126,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datacatalog_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_metadata_decorator.h b/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_metadata_decorator.h index f881dbc55048e..deed5055119f4 100644 --- a/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_metadata_decorator.h +++ b/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { @@ -88,4 +91,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_V1_INTERNAL_POLICY_TAG_MANAGER_SERIALIZATION_METADATA_DECORATOR_H diff --git a/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_option_defaults.cc b/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_option_defaults.cc index 791511552c51f..2d5b806714090 100644 --- a/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_option_defaults.cc +++ b/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_option_defaults.cc @@ -44,7 +44,7 @@ Options PolicyTagManagerSerializationDefaultOptions(Options options) { datacatalog_v1::PolicyTagManagerSerializationRetryPolicyOption>()) { options.set( datacatalog_v1::PolicyTagManagerSerializationLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_stub.cc b/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_stub.cc index 5753a45fd7c69..9fa7822998b38 100644 --- a/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_stub.cc +++ b/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/datacatalog/v1/policytagmanagerserialization.proto #include "google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_stub.h" +#include "google/cloud/datacatalog/v1/policytagmanagerserialization.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { @@ -117,3 +120,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datacatalog_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_stub.h b/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_stub.h index 4c1741e577c40..ad5bdd24b597e 100644 --- a/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_stub.h +++ b/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_V1_INTERNAL_POLICY_TAG_MANAGER_SERIALIZATION_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_V1_INTERNAL_POLICY_TAG_MANAGER_SERIALIZATION_STUB_H +#include "google/cloud/datacatalog/v1/policytagmanagerserialization.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { @@ -128,4 +131,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_V1_INTERNAL_POLICY_TAG_MANAGER_SERIALIZATION_STUB_H diff --git a/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_stub_factory.cc b/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_stub_factory.cc index 149ec45cb211f..f3ad90dfb60b4 100644 --- a/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_stub_factory.cc +++ b/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_metadata_decorator.h" #include "google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_stub.h" #include "google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_tracing_stub.h" +#include "google/cloud/datacatalog/v1/policytagmanagerserialization.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datacatalog_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_stub_factory.h b/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_stub_factory.h index c364f820c0529..2a266f46c663e 100644 --- a/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_stub_factory.h +++ b/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_V1_INTERNAL_POLICY_TAG_MANAGER_SERIALIZATION_STUB_FACTORY_H diff --git a/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_tracing_connection.cc b/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_tracing_connection.cc index 3f073c0164763..24add7e974475 100644 --- a/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_tracing_connection.cc +++ b/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace datacatalog_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PolicyTagManagerSerializationTracingConnection:: PolicyTagManagerSerializationTracingConnection( std::shared_ptr @@ -104,18 +102,14 @@ Status PolicyTagManagerSerializationTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePolicyTagManagerSerializationTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_tracing_connection.h b/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_tracing_connection.h index b34793c502b8a..827062633bb94 100644 --- a/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_tracing_connection.h +++ b/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace datacatalog_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PolicyTagManagerSerializationTracingConnection : public datacatalog_v1::PolicyTagManagerSerializationConnection { public: @@ -72,8 +70,6 @@ class PolicyTagManagerSerializationTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_tracing_stub.cc b/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_tracing_stub.cc index 5122c53afee9a..ae1dca6e38835 100644 --- a/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_tracing_stub.cc +++ b/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PolicyTagManagerSerializationTracingStub:: PolicyTagManagerSerializationTracingStub( std::shared_ptr child) @@ -122,20 +123,16 @@ Status PolicyTagManagerSerializationTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePolicyTagManagerSerializationTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared( std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datacatalog_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_tracing_stub.h b/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_tracing_stub.h index f8396acc2f6e2..ca3861bb9685d 100644 --- a/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_tracing_stub.h +++ b/google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PolicyTagManagerSerializationTracingStub : public PolicyTagManagerSerializationStub { public: @@ -79,8 +80,6 @@ class PolicyTagManagerSerializationTracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -96,4 +95,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_V1_INTERNAL_POLICY_TAG_MANAGER_SERIALIZATION_TRACING_STUB_H diff --git a/google/cloud/datacatalog/v1/internal/policy_tag_manager_stub.cc b/google/cloud/datacatalog/v1/internal/policy_tag_manager_stub.cc index 6046bd327802c..deb6e2ace8af7 100644 --- a/google/cloud/datacatalog/v1/internal/policy_tag_manager_stub.cc +++ b/google/cloud/datacatalog/v1/internal/policy_tag_manager_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/datacatalog/v1/policytagmanager.proto #include "google/cloud/datacatalog/v1/internal/policy_tag_manager_stub.h" +#include "google/cloud/datacatalog/v1/policytagmanager.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { @@ -232,3 +235,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datacatalog_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datacatalog/v1/internal/policy_tag_manager_stub.h b/google/cloud/datacatalog/v1/internal/policy_tag_manager_stub.h index 5e07f2791840c..118483fc2dde7 100644 --- a/google/cloud/datacatalog/v1/internal/policy_tag_manager_stub.h +++ b/google/cloud/datacatalog/v1/internal/policy_tag_manager_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_V1_INTERNAL_POLICY_TAG_MANAGER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_V1_INTERNAL_POLICY_TAG_MANAGER_STUB_H +#include "google/cloud/datacatalog/v1/policytagmanager.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { @@ -213,4 +216,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_V1_INTERNAL_POLICY_TAG_MANAGER_STUB_H diff --git a/google/cloud/datacatalog/v1/internal/policy_tag_manager_stub_factory.cc b/google/cloud/datacatalog/v1/internal/policy_tag_manager_stub_factory.cc index 89bb82319d8b8..32a6831d03fdb 100644 --- a/google/cloud/datacatalog/v1/internal/policy_tag_manager_stub_factory.cc +++ b/google/cloud/datacatalog/v1/internal/policy_tag_manager_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/datacatalog/v1/internal/policy_tag_manager_metadata_decorator.h" #include "google/cloud/datacatalog/v1/internal/policy_tag_manager_stub.h" #include "google/cloud/datacatalog/v1/internal/policy_tag_manager_tracing_stub.h" +#include "google/cloud/datacatalog/v1/policytagmanager.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datacatalog_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datacatalog/v1/internal/policy_tag_manager_stub_factory.h b/google/cloud/datacatalog/v1/internal/policy_tag_manager_stub_factory.h index 62621cd983056..56afd66c5e914 100644 --- a/google/cloud/datacatalog/v1/internal/policy_tag_manager_stub_factory.h +++ b/google/cloud/datacatalog/v1/internal/policy_tag_manager_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_V1_INTERNAL_POLICY_TAG_MANAGER_STUB_FACTORY_H diff --git a/google/cloud/datacatalog/v1/internal/policy_tag_manager_tracing_connection.cc b/google/cloud/datacatalog/v1/internal/policy_tag_manager_tracing_connection.cc index d2f79e86df8e9..a4ac7beb1afb5 100644 --- a/google/cloud/datacatalog/v1/internal/policy_tag_manager_tracing_connection.cc +++ b/google/cloud/datacatalog/v1/internal/policy_tag_manager_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace datacatalog_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PolicyTagManagerTracingConnection::PolicyTagManagerTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -189,16 +187,12 @@ Status PolicyTagManagerTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePolicyTagManagerTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/datacatalog/v1/internal/policy_tag_manager_tracing_connection.h b/google/cloud/datacatalog/v1/internal/policy_tag_manager_tracing_connection.h index 65551da106834..30c44a85a3583 100644 --- a/google/cloud/datacatalog/v1/internal/policy_tag_manager_tracing_connection.h +++ b/google/cloud/datacatalog/v1/internal/policy_tag_manager_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace datacatalog_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PolicyTagManagerTracingConnection : public datacatalog_v1::PolicyTagManagerConnection { public: @@ -103,8 +101,6 @@ class PolicyTagManagerTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/datacatalog/v1/internal/policy_tag_manager_tracing_stub.cc b/google/cloud/datacatalog/v1/internal/policy_tag_manager_tracing_stub.cc index b1550cdf7374a..f94fb337c3bae 100644 --- a/google/cloud/datacatalog/v1/internal/policy_tag_manager_tracing_stub.cc +++ b/google/cloud/datacatalog/v1/internal/policy_tag_manager_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PolicyTagManagerTracingStub::PolicyTagManagerTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -230,18 +231,14 @@ Status PolicyTagManagerTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePolicyTagManagerTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datacatalog_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datacatalog/v1/internal/policy_tag_manager_tracing_stub.h b/google/cloud/datacatalog/v1/internal/policy_tag_manager_tracing_stub.h index 78c3c9977137e..3fe8edfb0f6d5 100644 --- a/google/cloud/datacatalog/v1/internal/policy_tag_manager_tracing_stub.h +++ b/google/cloud/datacatalog/v1/internal/policy_tag_manager_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datacatalog_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PolicyTagManagerTracingStub : public PolicyTagManagerStub { public: ~PolicyTagManagerTracingStub() override = default; @@ -123,8 +124,6 @@ class PolicyTagManagerTracingStub : public PolicyTagManagerStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -139,4 +138,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_V1_INTERNAL_POLICY_TAG_MANAGER_TRACING_STUB_H diff --git a/google/cloud/datacatalog/v1/policy_tag_manager_connection.h b/google/cloud/datacatalog/v1/policy_tag_manager_connection.h index 80c0a2873f408..401e5f3a5c271 100644 --- a/google/cloud/datacatalog/v1/policy_tag_manager_connection.h +++ b/google/cloud/datacatalog/v1/policy_tag_manager_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/datacatalog/v1/internal/policy_tag_manager_retry_traits.h" #include "google/cloud/datacatalog/v1/policy_tag_manager_connection_idempotency_policy.h" +#include "google/cloud/datacatalog/v1/policytagmanager.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/datacatalog/v1/policy_tag_manager_connection_idempotency_policy.h b/google/cloud/datacatalog/v1/policy_tag_manager_connection_idempotency_policy.h index fed5d1f9f4ea3..1b780b3526ee0 100644 --- a/google/cloud/datacatalog/v1/policy_tag_manager_connection_idempotency_policy.h +++ b/google/cloud/datacatalog/v1/policy_tag_manager_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_V1_POLICY_TAG_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_V1_POLICY_TAG_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/datacatalog/v1/policytagmanager.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/datacatalog/v1/policy_tag_manager_serialization_connection.h b/google/cloud/datacatalog/v1/policy_tag_manager_serialization_connection.h index d1c99dfec7d74..6ec50bcf0ef2d 100644 --- a/google/cloud/datacatalog/v1/policy_tag_manager_serialization_connection.h +++ b/google/cloud/datacatalog/v1/policy_tag_manager_serialization_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/datacatalog/v1/internal/policy_tag_manager_serialization_retry_traits.h" #include "google/cloud/datacatalog/v1/policy_tag_manager_serialization_connection_idempotency_policy.h" +#include "google/cloud/datacatalog/v1/policytagmanagerserialization.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/datacatalog/v1/policy_tag_manager_serialization_connection_idempotency_policy.h b/google/cloud/datacatalog/v1/policy_tag_manager_serialization_connection_idempotency_policy.h index d1877fb198986..7fd3842597c1a 100644 --- a/google/cloud/datacatalog/v1/policy_tag_manager_serialization_connection_idempotency_policy.h +++ b/google/cloud/datacatalog/v1/policy_tag_manager_serialization_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_V1_POLICY_TAG_MANAGER_SERIALIZATION_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATACATALOG_V1_POLICY_TAG_MANAGER_SERIALIZATION_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/datacatalog/v1/policytagmanagerserialization.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dataform/BUILD.bazel b/google/cloud/dataform/BUILD.bazel index 6830f5cbb51b4..7737258985b5f 100644 --- a/google/cloud/dataform/BUILD.bazel +++ b/google/cloud/dataform/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/dataform/v1:dataform_cc_grpc", + "@googleapis//google/cloud/dataform/v1:dataform_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/dataform/quickstart/CMakeLists.txt b/google/cloud/dataform/quickstart/CMakeLists.txt index be8a1c9c4c448..aa9e72e50fe0b 100644 --- a/google/cloud/dataform/quickstart/CMakeLists.txt +++ b/google/cloud/dataform/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Dataform API C++ client library from a larger # CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-dataform-quickstart CXX) find_package(google_cloud_cpp_dataform REQUIRED) diff --git a/google/cloud/dataform/v1/dataform_connection.h b/google/cloud/dataform/v1/dataform_connection.h index 9d0fa117219c6..d78d54adcf8a8 100644 --- a/google/cloud/dataform/v1/dataform_connection.h +++ b/google/cloud/dataform/v1/dataform_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAFORM_V1_DATAFORM_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAFORM_V1_DATAFORM_CONNECTION_H +#include "google/cloud/dataform/v1/dataform.pb.h" #include "google/cloud/dataform/v1/dataform_connection_idempotency_policy.h" #include "google/cloud/dataform/v1/internal/dataform_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/dataform/v1/dataform_connection_idempotency_policy.h b/google/cloud/dataform/v1/dataform_connection_idempotency_policy.h index 0082bd6b45684..12612259e46de 100644 --- a/google/cloud/dataform/v1/dataform_connection_idempotency_policy.h +++ b/google/cloud/dataform/v1/dataform_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAFORM_V1_DATAFORM_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAFORM_V1_DATAFORM_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dataform/v1/dataform.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dataform/v1/internal/dataform_auth_decorator.cc b/google/cloud/dataform/v1/internal/dataform_auth_decorator.cc index 0e3e3a7300ad4..683a683bb4340 100644 --- a/google/cloud/dataform/v1/internal/dataform_auth_decorator.cc +++ b/google/cloud/dataform/v1/internal/dataform_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dataform/v1/dataform.proto #include "google/cloud/dataform/v1/internal/dataform_auth_decorator.h" -#include +#include "google/cloud/dataform/v1/dataform.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataform_v1_internal { @@ -562,3 +565,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataform/v1/internal/dataform_auth_decorator.h b/google/cloud/dataform/v1/internal/dataform_auth_decorator.h index b92f9b4c59e2b..de6a6f726531e 100644 --- a/google/cloud/dataform/v1/internal/dataform_auth_decorator.h +++ b/google/cloud/dataform/v1/internal/dataform_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataform_v1_internal { @@ -354,4 +357,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAFORM_V1_INTERNAL_DATAFORM_AUTH_DECORATOR_H diff --git a/google/cloud/dataform/v1/internal/dataform_logging_decorator.cc b/google/cloud/dataform/v1/internal/dataform_logging_decorator.cc index a095eb986e252..e39a5c24ce3a0 100644 --- a/google/cloud/dataform/v1/internal/dataform_logging_decorator.cc +++ b/google/cloud/dataform/v1/internal/dataform_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dataform/v1/dataform.proto #include "google/cloud/dataform/v1/internal/dataform_logging_decorator.h" +#include "google/cloud/dataform/v1/dataform.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataform_v1_internal { @@ -792,3 +795,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataform/v1/internal/dataform_logging_decorator.h b/google/cloud/dataform/v1/internal/dataform_logging_decorator.h index 402f63f58596c..8fc0ac484fda1 100644 --- a/google/cloud/dataform/v1/internal/dataform_logging_decorator.h +++ b/google/cloud/dataform/v1/internal/dataform_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataform_v1_internal { @@ -354,4 +357,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAFORM_V1_INTERNAL_DATAFORM_LOGGING_DECORATOR_H diff --git a/google/cloud/dataform/v1/internal/dataform_metadata_decorator.cc b/google/cloud/dataform/v1/internal/dataform_metadata_decorator.cc index f6909febb3c50..b81efbaa79ed7 100644 --- a/google/cloud/dataform/v1/internal/dataform_metadata_decorator.cc +++ b/google/cloud/dataform/v1/internal/dataform_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dataform/v1/dataform.proto #include "google/cloud/dataform/v1/internal/dataform_metadata_decorator.h" +#include "google/cloud/dataform/v1/dataform.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataform_v1_internal { @@ -612,3 +616,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataform/v1/internal/dataform_metadata_decorator.h b/google/cloud/dataform/v1/internal/dataform_metadata_decorator.h index af404da057ba7..9d14c0596375a 100644 --- a/google/cloud/dataform/v1/internal/dataform_metadata_decorator.h +++ b/google/cloud/dataform/v1/internal/dataform_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataform_v1_internal { @@ -359,4 +362,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAFORM_V1_INTERNAL_DATAFORM_METADATA_DECORATOR_H diff --git a/google/cloud/dataform/v1/internal/dataform_option_defaults.cc b/google/cloud/dataform/v1/internal/dataform_option_defaults.cc index 000d2ae922f44..db65d4f7bb608 100644 --- a/google/cloud/dataform/v1/internal/dataform_option_defaults.cc +++ b/google/cloud/dataform/v1/internal/dataform_option_defaults.cc @@ -40,7 +40,7 @@ Options DataformDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - dataform_v1::DataformLimitedTimeRetryPolicy(std::chrono::minutes(30)) + dataform_v1::DataformLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dataform/v1/internal/dataform_stub.cc b/google/cloud/dataform/v1/internal/dataform_stub.cc index 14f3779c500ab..062ab327efcdf 100644 --- a/google/cloud/dataform/v1/internal/dataform_stub.cc +++ b/google/cloud/dataform/v1/internal/dataform_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/dataform/v1/dataform.proto #include "google/cloud/dataform/v1/internal/dataform_stub.h" +#include "google/cloud/dataform/v1/dataform.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataform_v1_internal { @@ -760,3 +763,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataform/v1/internal/dataform_stub.h b/google/cloud/dataform/v1/internal/dataform_stub.h index 66b69fea33f36..14f4ac36a5705 100644 --- a/google/cloud/dataform/v1/internal/dataform_stub.h +++ b/google/cloud/dataform/v1/internal/dataform_stub.h @@ -19,15 +19,18 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAFORM_V1_INTERNAL_DATAFORM_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAFORM_V1_INTERNAL_DATAFORM_STUB_H +#include "google/cloud/dataform/v1/dataform.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataform_v1_internal { @@ -679,4 +682,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAFORM_V1_INTERNAL_DATAFORM_STUB_H diff --git a/google/cloud/dataform/v1/internal/dataform_stub_factory.cc b/google/cloud/dataform/v1/internal/dataform_stub_factory.cc index cc2e12d96752e..ebaea9036848e 100644 --- a/google/cloud/dataform/v1/internal/dataform_stub_factory.cc +++ b/google/cloud/dataform/v1/internal/dataform_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dataform/v1/dataform.proto #include "google/cloud/dataform/v1/internal/dataform_stub_factory.h" +#include "google/cloud/dataform/v1/dataform.grpc.pb.h" #include "google/cloud/dataform/v1/internal/dataform_auth_decorator.h" #include "google/cloud/dataform/v1/internal/dataform_logging_decorator.h" #include "google/cloud/dataform/v1/internal/dataform_metadata_decorator.h" #include "google/cloud/dataform/v1/internal/dataform_stub.h" #include "google/cloud/dataform/v1/internal/dataform_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataform_v1_internal { @@ -74,3 +77,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataform/v1/internal/dataform_stub_factory.h b/google/cloud/dataform/v1/internal/dataform_stub_factory.h index a252e615daf24..47ccb13b41f88 100644 --- a/google/cloud/dataform/v1/internal/dataform_stub_factory.h +++ b/google/cloud/dataform/v1/internal/dataform_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataform_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAFORM_V1_INTERNAL_DATAFORM_STUB_FACTORY_H diff --git a/google/cloud/dataform/v1/internal/dataform_tracing_connection.cc b/google/cloud/dataform/v1/internal/dataform_tracing_connection.cc index a6867e1fa6bbb..2994f131c85e0 100644 --- a/google/cloud/dataform/v1/internal/dataform_tracing_connection.cc +++ b/google/cloud/dataform/v1/internal/dataform_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dataform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DataformTracingConnection::DataformTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -598,15 +596,11 @@ DataformTracingConnection::TestIamPermissions( return internal::EndSpan(*span, child_->TestIamPermissions(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDataformTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dataform/v1/internal/dataform_tracing_connection.h b/google/cloud/dataform/v1/internal/dataform_tracing_connection.h index 15ba1bc4bb1ed..315c3fad6325b 100644 --- a/google/cloud/dataform/v1/internal/dataform_tracing_connection.h +++ b/google/cloud/dataform/v1/internal/dataform_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dataform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DataformTracingConnection : public dataform_v1::DataformConnection { public: ~DataformTracingConnection() override = default; @@ -283,8 +281,6 @@ class DataformTracingConnection : public dataform_v1::DataformConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dataform/v1/internal/dataform_tracing_stub.cc b/google/cloud/dataform/v1/internal/dataform_tracing_stub.cc index ceaccdf86123a..ef66162ed85f3 100644 --- a/google/cloud/dataform/v1/internal/dataform_tracing_stub.cc +++ b/google/cloud/dataform/v1/internal/dataform_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DataformTracingStub::DataformTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -754,18 +755,14 @@ DataformTracingStub::TestIamPermissions( context, *span, child_->TestIamPermissions(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDataformTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataform_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataform/v1/internal/dataform_tracing_stub.h b/google/cloud/dataform/v1/internal/dataform_tracing_stub.h index 73b48d3c34868..c53c8eb32f529 100644 --- a/google/cloud/dataform/v1/internal/dataform_tracing_stub.h +++ b/google/cloud/dataform/v1/internal/dataform_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataform_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DataformTracingStub : public DataformStub { public: ~DataformTracingStub() override = default; @@ -350,8 +351,6 @@ class DataformTracingStub : public DataformStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -366,4 +365,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAFORM_V1_INTERNAL_DATAFORM_TRACING_STUB_H diff --git a/google/cloud/datafusion/BUILD.bazel b/google/cloud/datafusion/BUILD.bazel index e0f625fcaf941..2f17c36f3b050 100644 --- a/google/cloud/datafusion/BUILD.bazel +++ b/google/cloud/datafusion/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/datafusion/v1:datafusion_cc_grpc", + "@googleapis//google/cloud/datafusion/v1:datafusion_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/datafusion/quickstart/.bazelrc b/google/cloud/datafusion/quickstart/.bazelrc index 6777c6b4c95de..ec27511a60add 100644 --- a/google/cloud/datafusion/quickstart/.bazelrc +++ b/google/cloud/datafusion/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/datafusion/quickstart/CMakeLists.txt b/google/cloud/datafusion/quickstart/CMakeLists.txt index 73aea975d1026..7204feeb9f998 100644 --- a/google/cloud/datafusion/quickstart/CMakeLists.txt +++ b/google/cloud/datafusion/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Data Fusion API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-datafusion-quickstart CXX) find_package(google_cloud_cpp_datafusion REQUIRED) diff --git a/google/cloud/datafusion/v1/data_fusion_client.h b/google/cloud/datafusion/v1/data_fusion_client.h index e8d1adef95792..78f47a5fe5708 100644 --- a/google/cloud/datafusion/v1/data_fusion_client.h +++ b/google/cloud/datafusion/v1/data_fusion_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/datafusion/v1/data_fusion_connection.h b/google/cloud/datafusion/v1/data_fusion_connection.h index 6dace44ec720d..67ef49ab4892f 100644 --- a/google/cloud/datafusion/v1/data_fusion_connection.h +++ b/google/cloud/datafusion/v1/data_fusion_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAFUSION_V1_DATA_FUSION_CONNECTION_H #include "google/cloud/datafusion/v1/data_fusion_connection_idempotency_policy.h" +#include "google/cloud/datafusion/v1/datafusion.pb.h" #include "google/cloud/datafusion/v1/internal/data_fusion_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/datafusion/v1/data_fusion_connection_idempotency_policy.h b/google/cloud/datafusion/v1/data_fusion_connection_idempotency_policy.h index 0ca1675580b36..0378e65924c1f 100644 --- a/google/cloud/datafusion/v1/data_fusion_connection_idempotency_policy.h +++ b/google/cloud/datafusion/v1/data_fusion_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAFUSION_V1_DATA_FUSION_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAFUSION_V1_DATA_FUSION_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/datafusion/v1/datafusion.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/datafusion/v1/internal/data_fusion_auth_decorator.cc b/google/cloud/datafusion/v1/internal/data_fusion_auth_decorator.cc index d8285e3b368cc..d9a9723ed2783 100644 --- a/google/cloud/datafusion/v1/internal/data_fusion_auth_decorator.cc +++ b/google/cloud/datafusion/v1/internal/data_fusion_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/datafusion/v1/datafusion.proto #include "google/cloud/datafusion/v1/internal/data_fusion_auth_decorator.h" -#include +#include "google/cloud/datafusion/v1/datafusion.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datafusion_v1_internal { @@ -210,3 +213,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datafusion_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datafusion/v1/internal/data_fusion_auth_decorator.h b/google/cloud/datafusion/v1/internal/data_fusion_auth_decorator.h index 0895715a7a6b9..aa81f3a0a2b57 100644 --- a/google/cloud/datafusion/v1/internal/data_fusion_auth_decorator.h +++ b/google/cloud/datafusion/v1/internal/data_fusion_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/datafusion/v1/internal/data_fusion_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datafusion_v1_internal { @@ -125,4 +128,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAFUSION_V1_INTERNAL_DATA_FUSION_AUTH_DECORATOR_H diff --git a/google/cloud/datafusion/v1/internal/data_fusion_connection_impl.h b/google/cloud/datafusion/v1/internal/data_fusion_connection_impl.h index 0ddfa4aedc3c2..95e917d17e3e1 100644 --- a/google/cloud/datafusion/v1/internal/data_fusion_connection_impl.h +++ b/google/cloud/datafusion/v1/internal/data_fusion_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/datafusion/v1/internal/data_fusion_logging_decorator.cc b/google/cloud/datafusion/v1/internal/data_fusion_logging_decorator.cc index adc84dc4aa6e1..902a70e45bc9d 100644 --- a/google/cloud/datafusion/v1/internal/data_fusion_logging_decorator.cc +++ b/google/cloud/datafusion/v1/internal/data_fusion_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/datafusion/v1/datafusion.proto #include "google/cloud/datafusion/v1/internal/data_fusion_logging_decorator.h" +#include "google/cloud/datafusion/v1/datafusion.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datafusion_v1_internal { @@ -237,3 +240,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datafusion_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datafusion/v1/internal/data_fusion_logging_decorator.h b/google/cloud/datafusion/v1/internal/data_fusion_logging_decorator.h index 1d9a19916d891..6285b5d98e66b 100644 --- a/google/cloud/datafusion/v1/internal/data_fusion_logging_decorator.h +++ b/google/cloud/datafusion/v1/internal/data_fusion_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/datafusion/v1/internal/data_fusion_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datafusion_v1_internal { @@ -125,4 +128,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAFUSION_V1_INTERNAL_DATA_FUSION_LOGGING_DECORATOR_H diff --git a/google/cloud/datafusion/v1/internal/data_fusion_metadata_decorator.cc b/google/cloud/datafusion/v1/internal/data_fusion_metadata_decorator.cc index 24926ccaf78a3..d7d530c9dad40 100644 --- a/google/cloud/datafusion/v1/internal/data_fusion_metadata_decorator.cc +++ b/google/cloud/datafusion/v1/internal/data_fusion_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/datafusion/v1/datafusion.proto #include "google/cloud/datafusion/v1/internal/data_fusion_metadata_decorator.h" +#include "google/cloud/datafusion/v1/datafusion.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datafusion_v1_internal { @@ -194,3 +198,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datafusion_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datafusion/v1/internal/data_fusion_metadata_decorator.h b/google/cloud/datafusion/v1/internal/data_fusion_metadata_decorator.h index 0014b869fbc91..ff95aca0c89ea 100644 --- a/google/cloud/datafusion/v1/internal/data_fusion_metadata_decorator.h +++ b/google/cloud/datafusion/v1/internal/data_fusion_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/datafusion/v1/internal/data_fusion_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datafusion_v1_internal { @@ -130,4 +133,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAFUSION_V1_INTERNAL_DATA_FUSION_METADATA_DECORATOR_H diff --git a/google/cloud/datafusion/v1/internal/data_fusion_option_defaults.cc b/google/cloud/datafusion/v1/internal/data_fusion_option_defaults.cc index 4e7fc6e93acca..dfcec84cf1367 100644 --- a/google/cloud/datafusion/v1/internal/data_fusion_option_defaults.cc +++ b/google/cloud/datafusion/v1/internal/data_fusion_option_defaults.cc @@ -41,7 +41,7 @@ Options DataFusionDefaultOptions(Options options) { if (!options.has()) { options.set( datafusion_v1::DataFusionLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/datafusion/v1/internal/data_fusion_stub.cc b/google/cloud/datafusion/v1/internal/data_fusion_stub.cc index 5f8d35c679980..1e98a2d7de0fc 100644 --- a/google/cloud/datafusion/v1/internal/data_fusion_stub.cc +++ b/google/cloud/datafusion/v1/internal/data_fusion_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/datafusion/v1/datafusion.proto #include "google/cloud/datafusion/v1/internal/data_fusion_stub.h" +#include "google/cloud/datafusion/v1/datafusion.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datafusion_v1_internal { @@ -231,3 +234,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datafusion_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datafusion/v1/internal/data_fusion_stub.h b/google/cloud/datafusion/v1/internal/data_fusion_stub.h index 9632710614bc4..3ad65b6412364 100644 --- a/google/cloud/datafusion/v1/internal/data_fusion_stub.h +++ b/google/cloud/datafusion/v1/internal/data_fusion_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAFUSION_V1_INTERNAL_DATA_FUSION_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAFUSION_V1_INTERNAL_DATA_FUSION_STUB_H +#include "google/cloud/datafusion/v1/datafusion.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datafusion_v1_internal { @@ -204,4 +207,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAFUSION_V1_INTERNAL_DATA_FUSION_STUB_H diff --git a/google/cloud/datafusion/v1/internal/data_fusion_stub_factory.cc b/google/cloud/datafusion/v1/internal/data_fusion_stub_factory.cc index e12249e2c1bcc..f9912f6f1cce8 100644 --- a/google/cloud/datafusion/v1/internal/data_fusion_stub_factory.cc +++ b/google/cloud/datafusion/v1/internal/data_fusion_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/datafusion/v1/datafusion.proto #include "google/cloud/datafusion/v1/internal/data_fusion_stub_factory.h" +#include "google/cloud/datafusion/v1/datafusion.grpc.pb.h" #include "google/cloud/datafusion/v1/internal/data_fusion_auth_decorator.h" #include "google/cloud/datafusion/v1/internal/data_fusion_logging_decorator.h" #include "google/cloud/datafusion/v1/internal/data_fusion_metadata_decorator.h" @@ -28,10 +29,12 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datafusion_v1_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datafusion_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datafusion/v1/internal/data_fusion_stub_factory.h b/google/cloud/datafusion/v1/internal/data_fusion_stub_factory.h index a47ae647857fd..7d7d5f019f6ab 100644 --- a/google/cloud/datafusion/v1/internal/data_fusion_stub_factory.h +++ b/google/cloud/datafusion/v1/internal/data_fusion_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datafusion_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAFUSION_V1_INTERNAL_DATA_FUSION_STUB_FACTORY_H diff --git a/google/cloud/datafusion/v1/internal/data_fusion_tracing_connection.cc b/google/cloud/datafusion/v1/internal/data_fusion_tracing_connection.cc index 8792fb01f7e48..10cefdecd5782 100644 --- a/google/cloud/datafusion/v1/internal/data_fusion_tracing_connection.cc +++ b/google/cloud/datafusion/v1/internal/data_fusion_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace datafusion_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DataFusionTracingConnection::DataFusionTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -180,16 +178,12 @@ DataFusionTracingConnection::RestartInstance( return internal::EndSpan(std::move(span), child_->RestartInstance(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDataFusionTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/datafusion/v1/internal/data_fusion_tracing_connection.h b/google/cloud/datafusion/v1/internal/data_fusion_tracing_connection.h index 9eb8ab1a3d669..1df8a64f6d73c 100644 --- a/google/cloud/datafusion/v1/internal/data_fusion_tracing_connection.h +++ b/google/cloud/datafusion/v1/internal/data_fusion_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace datafusion_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DataFusionTracingConnection : public datafusion_v1::DataFusionConnection { public: ~DataFusionTracingConnection() override = default; @@ -102,8 +100,6 @@ class DataFusionTracingConnection : public datafusion_v1::DataFusionConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/datafusion/v1/internal/data_fusion_tracing_stub.cc b/google/cloud/datafusion/v1/internal/data_fusion_tracing_stub.cc index bd0002b7ed9f1..1183f63e97eca 100644 --- a/google/cloud/datafusion/v1/internal/data_fusion_tracing_stub.cc +++ b/google/cloud/datafusion/v1/internal/data_fusion_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datafusion_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DataFusionTracingStub::DataFusionTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -201,18 +202,14 @@ future DataFusionTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDataFusionTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datafusion_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datafusion/v1/internal/data_fusion_tracing_stub.h b/google/cloud/datafusion/v1/internal/data_fusion_tracing_stub.h index 39dc3e4745f72..fbf8ae84f6f7b 100644 --- a/google/cloud/datafusion/v1/internal/data_fusion_tracing_stub.h +++ b/google/cloud/datafusion/v1/internal/data_fusion_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datafusion_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DataFusionTracingStub : public DataFusionStub { public: ~DataFusionTracingStub() override = default; @@ -120,8 +121,6 @@ class DataFusionTracingStub : public DataFusionStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -136,4 +135,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAFUSION_V1_INTERNAL_DATA_FUSION_TRACING_STUB_H diff --git a/google/cloud/datamigration/BUILD.bazel b/google/cloud/datamigration/BUILD.bazel index 2e50d98b52e8b..d4dc162637afc 100644 --- a/google/cloud/datamigration/BUILD.bazel +++ b/google/cloud/datamigration/BUILD.bazel @@ -19,13 +19,12 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/clouddms/logging/v1:logging_cc_grpc", - "@com_google_googleapis//google/cloud/clouddms/v1:clouddms_cc_grpc", + "@googleapis//google/cloud/clouddms/logging/v1:logging_cc_grpc", + "@googleapis//google/cloud/clouddms/v1:clouddms_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/datamigration/CMakeLists.txt b/google/cloud/datamigration/CMakeLists.txt index f8a58f2775cd5..98905df924456 100644 --- a/google/cloud/datamigration/CMakeLists.txt +++ b/google/cloud/datamigration/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(datamigration "Database Migration API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(datamigration_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/datamigration/data_migration_client.h b/google/cloud/datamigration/data_migration_client.h deleted file mode 100644 index 4ddf58b668a24..0000000000000 --- a/google/cloud/datamigration/data_migration_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/clouddms/v1/clouddms.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAMIGRATION_DATA_MIGRATION_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAMIGRATION_DATA_MIGRATION_CLIENT_H - -#include "google/cloud/datamigration/data_migration_connection.h" -#include "google/cloud/datamigration/v1/data_migration_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in datamigration_v1 instead of the aliases defined in -/// this namespace. -namespace datamigration { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use datamigration_v1::DataMigrationServiceClient directly. -using ::google::cloud::datamigration_v1::DataMigrationServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace datamigration -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAMIGRATION_DATA_MIGRATION_CLIENT_H diff --git a/google/cloud/datamigration/data_migration_connection.h b/google/cloud/datamigration/data_migration_connection.h deleted file mode 100644 index 56e2e5041a5b2..0000000000000 --- a/google/cloud/datamigration/data_migration_connection.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/clouddms/v1/clouddms.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAMIGRATION_DATA_MIGRATION_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAMIGRATION_DATA_MIGRATION_CONNECTION_H - -#include "google/cloud/datamigration/data_migration_connection_idempotency_policy.h" -#include "google/cloud/datamigration/v1/data_migration_connection.h" - -namespace google { -namespace cloud { -namespace datamigration { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use datamigration_v1::MakeDataMigrationServiceConnection -/// directly. -using ::google::cloud::datamigration_v1::MakeDataMigrationServiceConnection; - -/// @deprecated Use datamigration_v1::DataMigrationServiceConnection directly. -using ::google::cloud::datamigration_v1::DataMigrationServiceConnection; - -/// @deprecated Use -/// datamigration_v1::DataMigrationServiceLimitedErrorCountRetryPolicy directly. -using ::google::cloud::datamigration_v1:: - DataMigrationServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use datamigration_v1::DataMigrationServiceLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::datamigration_v1:: - DataMigrationServiceLimitedTimeRetryPolicy; - -/// @deprecated Use datamigration_v1::DataMigrationServiceRetryPolicy directly. -using ::google::cloud::datamigration_v1::DataMigrationServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace datamigration -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAMIGRATION_DATA_MIGRATION_CONNECTION_H diff --git a/google/cloud/datamigration/data_migration_connection_idempotency_policy.h b/google/cloud/datamigration/data_migration_connection_idempotency_policy.h deleted file mode 100644 index 3105678972b21..0000000000000 --- a/google/cloud/datamigration/data_migration_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/clouddms/v1/clouddms.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAMIGRATION_DATA_MIGRATION_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAMIGRATION_DATA_MIGRATION_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/datamigration/v1/data_migration_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace datamigration { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// datamigration_v1::MakeDefaultDataMigrationServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::datamigration_v1:: - MakeDefaultDataMigrationServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// datamigration_v1::DataMigrationServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::datamigration_v1:: - DataMigrationServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace datamigration -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAMIGRATION_DATA_MIGRATION_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/datamigration/data_migration_options.h b/google/cloud/datamigration/data_migration_options.h deleted file mode 100644 index a62307a49afe3..0000000000000 --- a/google/cloud/datamigration/data_migration_options.h +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/clouddms/v1/clouddms.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAMIGRATION_DATA_MIGRATION_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAMIGRATION_DATA_MIGRATION_OPTIONS_H - -#include "google/cloud/datamigration/data_migration_connection.h" -#include "google/cloud/datamigration/data_migration_connection_idempotency_policy.h" -#include "google/cloud/datamigration/v1/data_migration_options.h" - -namespace google { -namespace cloud { -namespace datamigration { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use datamigration_v1::DataMigrationServicePollingPolicyOption -/// directly. -using ::google::cloud::datamigration_v1:: - DataMigrationServicePollingPolicyOption; - -/// @deprecated Use datamigration_v1::DataMigrationServiceBackoffPolicyOption -/// directly. -using ::google::cloud::datamigration_v1:: - DataMigrationServiceBackoffPolicyOption; - -/// @deprecated Use -/// datamigration_v1::DataMigrationServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::datamigration_v1:: - DataMigrationServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use datamigration_v1::DataMigrationServicePolicyOptionList -/// directly. -using ::google::cloud::datamigration_v1::DataMigrationServicePolicyOptionList; - -/// @deprecated Use datamigration_v1::DataMigrationServiceRetryPolicyOption -/// directly. -using ::google::cloud::datamigration_v1::DataMigrationServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace datamigration -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAMIGRATION_DATA_MIGRATION_OPTIONS_H diff --git a/google/cloud/datamigration/mocks/mock_data_migration_connection.h b/google/cloud/datamigration/mocks/mock_data_migration_connection.h deleted file mode 100644 index 868c5502db110..0000000000000 --- a/google/cloud/datamigration/mocks/mock_data_migration_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/clouddms/v1/clouddms.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAMIGRATION_MOCKS_MOCK_DATA_MIGRATION_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAMIGRATION_MOCKS_MOCK_DATA_MIGRATION_CONNECTION_H - -#include "google/cloud/datamigration/data_migration_connection.h" -#include "google/cloud/datamigration/v1/mocks/mock_data_migration_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in datamigration_v1_mocks instead of the aliases -/// defined in this namespace. -namespace datamigration_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use datamigration_v1_mocks::MockDataMigrationServiceConnection -/// directly. -using ::google::cloud::datamigration_v1_mocks:: - MockDataMigrationServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace datamigration_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAMIGRATION_MOCKS_MOCK_DATA_MIGRATION_CONNECTION_H diff --git a/google/cloud/datamigration/quickstart/.bazelrc b/google/cloud/datamigration/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/datamigration/quickstart/.bazelrc +++ b/google/cloud/datamigration/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/datamigration/quickstart/CMakeLists.txt b/google/cloud/datamigration/quickstart/CMakeLists.txt index 829d0b3219cfd..4aac1acf858d1 100644 --- a/google/cloud/datamigration/quickstart/CMakeLists.txt +++ b/google/cloud/datamigration/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Database Migration API C++ client library from # a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-datamigration-quickstart CXX) find_package(google_cloud_cpp_datamigration REQUIRED) diff --git a/google/cloud/datamigration/v1/data_migration_client.h b/google/cloud/datamigration/v1/data_migration_client.h index 25eea0193f26b..5ba2030063c9e 100644 --- a/google/cloud/datamigration/v1/data_migration_client.h +++ b/google/cloud/datamigration/v1/data_migration_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/datamigration/v1/data_migration_connection.h b/google/cloud/datamigration/v1/data_migration_connection.h index 517f2a4811957..86135d332f0bc 100644 --- a/google/cloud/datamigration/v1/data_migration_connection.h +++ b/google/cloud/datamigration/v1/data_migration_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAMIGRATION_V1_DATA_MIGRATION_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAMIGRATION_V1_DATA_MIGRATION_CONNECTION_H +#include "google/cloud/clouddms/v1/clouddms.pb.h" #include "google/cloud/datamigration/v1/data_migration_connection_idempotency_policy.h" #include "google/cloud/datamigration/v1/internal/data_migration_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/datamigration/v1/data_migration_connection_idempotency_policy.h b/google/cloud/datamigration/v1/data_migration_connection_idempotency_policy.h index aece26df12a81..05f6ae62d19ae 100644 --- a/google/cloud/datamigration/v1/data_migration_connection_idempotency_policy.h +++ b/google/cloud/datamigration/v1/data_migration_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAMIGRATION_V1_DATA_MIGRATION_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAMIGRATION_V1_DATA_MIGRATION_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/clouddms/v1/clouddms.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/datamigration/v1/internal/data_migration_auth_decorator.cc b/google/cloud/datamigration/v1/internal/data_migration_auth_decorator.cc index 902bcf9b69935..589c96a523ff8 100644 --- a/google/cloud/datamigration/v1/internal/data_migration_auth_decorator.cc +++ b/google/cloud/datamigration/v1/internal/data_migration_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/clouddms/v1/clouddms.proto #include "google/cloud/datamigration/v1/internal/data_migration_auth_decorator.h" -#include +#include "google/cloud/clouddms/v1/clouddms.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datamigration_v1_internal { @@ -1006,3 +1009,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datamigration_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datamigration/v1/internal/data_migration_auth_decorator.h b/google/cloud/datamigration/v1/internal/data_migration_auth_decorator.h index a68f05bcef3f3..a0b2a889d03bb 100644 --- a/google/cloud/datamigration/v1/internal/data_migration_auth_decorator.h +++ b/google/cloud/datamigration/v1/internal/data_migration_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/datamigration/v1/internal/data_migration_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datamigration_v1_internal { @@ -478,4 +481,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAMIGRATION_V1_INTERNAL_DATA_MIGRATION_AUTH_DECORATOR_H diff --git a/google/cloud/datamigration/v1/internal/data_migration_connection_impl.h b/google/cloud/datamigration/v1/internal/data_migration_connection_impl.h index f8590abbd190c..da6355d62f8d1 100644 --- a/google/cloud/datamigration/v1/internal/data_migration_connection_impl.h +++ b/google/cloud/datamigration/v1/internal/data_migration_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/datamigration/v1/internal/data_migration_logging_decorator.cc b/google/cloud/datamigration/v1/internal/data_migration_logging_decorator.cc index 28adce0a2aa17..6dff90116fef0 100644 --- a/google/cloud/datamigration/v1/internal/data_migration_logging_decorator.cc +++ b/google/cloud/datamigration/v1/internal/data_migration_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/clouddms/v1/clouddms.proto #include "google/cloud/datamigration/v1/internal/data_migration_logging_decorator.h" +#include "google/cloud/clouddms/v1/clouddms.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datamigration_v1_internal { @@ -1190,3 +1193,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datamigration_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datamigration/v1/internal/data_migration_logging_decorator.h b/google/cloud/datamigration/v1/internal/data_migration_logging_decorator.h index d93993e2116e4..575d8312fc916 100644 --- a/google/cloud/datamigration/v1/internal/data_migration_logging_decorator.h +++ b/google/cloud/datamigration/v1/internal/data_migration_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/datamigration/v1/internal/data_migration_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datamigration_v1_internal { @@ -478,4 +481,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAMIGRATION_V1_INTERNAL_DATA_MIGRATION_LOGGING_DECORATOR_H diff --git a/google/cloud/datamigration/v1/internal/data_migration_metadata_decorator.cc b/google/cloud/datamigration/v1/internal/data_migration_metadata_decorator.cc index f9c664ab5aab2..a063ebccade78 100644 --- a/google/cloud/datamigration/v1/internal/data_migration_metadata_decorator.cc +++ b/google/cloud/datamigration/v1/internal/data_migration_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/clouddms/v1/clouddms.proto #include "google/cloud/datamigration/v1/internal/data_migration_metadata_decorator.h" +#include "google/cloud/clouddms/v1/clouddms.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datamigration_v1_internal { @@ -859,3 +863,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datamigration_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datamigration/v1/internal/data_migration_metadata_decorator.h b/google/cloud/datamigration/v1/internal/data_migration_metadata_decorator.h index 532aca3c38b57..6851ec280371e 100644 --- a/google/cloud/datamigration/v1/internal/data_migration_metadata_decorator.h +++ b/google/cloud/datamigration/v1/internal/data_migration_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/datamigration/v1/internal/data_migration_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datamigration_v1_internal { @@ -484,4 +487,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAMIGRATION_V1_INTERNAL_DATA_MIGRATION_METADATA_DECORATOR_H diff --git a/google/cloud/datamigration/v1/internal/data_migration_option_defaults.cc b/google/cloud/datamigration/v1/internal/data_migration_option_defaults.cc index e9d9b905c10e4..2e7b7ada949b9 100644 --- a/google/cloud/datamigration/v1/internal/data_migration_option_defaults.cc +++ b/google/cloud/datamigration/v1/internal/data_migration_option_defaults.cc @@ -42,7 +42,7 @@ Options DataMigrationServiceDefaultOptions(Options options) { if (!options.has()) { options.set( datamigration_v1::DataMigrationServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/datamigration/v1/internal/data_migration_stub.cc b/google/cloud/datamigration/v1/internal/data_migration_stub.cc index 3244738fc8d0c..27a803de02cc0 100644 --- a/google/cloud/datamigration/v1/internal/data_migration_stub.cc +++ b/google/cloud/datamigration/v1/internal/data_migration_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/clouddms/v1/clouddms.proto #include "google/cloud/datamigration/v1/internal/data_migration_stub.h" +#include "google/cloud/clouddms/v1/clouddms.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datamigration_v1_internal { @@ -1166,3 +1169,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datamigration_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datamigration/v1/internal/data_migration_stub.h b/google/cloud/datamigration/v1/internal/data_migration_stub.h index 4495f33620185..d3a17aee66a0c 100644 --- a/google/cloud/datamigration/v1/internal/data_migration_stub.h +++ b/google/cloud/datamigration/v1/internal/data_migration_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAMIGRATION_V1_INTERNAL_DATA_MIGRATION_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAMIGRATION_V1_INTERNAL_DATA_MIGRATION_STUB_H +#include "google/cloud/clouddms/v1/clouddms.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datamigration_v1_internal { @@ -945,4 +948,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAMIGRATION_V1_INTERNAL_DATA_MIGRATION_STUB_H diff --git a/google/cloud/datamigration/v1/internal/data_migration_stub_factory.cc b/google/cloud/datamigration/v1/internal/data_migration_stub_factory.cc index 4b4b698d5da11..d83013ab303aa 100644 --- a/google/cloud/datamigration/v1/internal/data_migration_stub_factory.cc +++ b/google/cloud/datamigration/v1/internal/data_migration_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/clouddms/v1/clouddms.proto #include "google/cloud/datamigration/v1/internal/data_migration_stub_factory.h" +#include "google/cloud/clouddms/v1/clouddms.grpc.pb.h" #include "google/cloud/datamigration/v1/internal/data_migration_auth_decorator.h" #include "google/cloud/datamigration/v1/internal/data_migration_logging_decorator.h" #include "google/cloud/datamigration/v1/internal/data_migration_metadata_decorator.h" #include "google/cloud/datamigration/v1/internal/data_migration_stub.h" #include "google/cloud/datamigration/v1/internal/data_migration_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datamigration_v1_internal { @@ -78,3 +81,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datamigration_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datamigration/v1/internal/data_migration_stub_factory.h b/google/cloud/datamigration/v1/internal/data_migration_stub_factory.h index 9f96af8e836c8..ff52215b5ebd1 100644 --- a/google/cloud/datamigration/v1/internal/data_migration_stub_factory.h +++ b/google/cloud/datamigration/v1/internal/data_migration_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datamigration_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAMIGRATION_V1_INTERNAL_DATA_MIGRATION_STUB_FACTORY_H diff --git a/google/cloud/datamigration/v1/internal/data_migration_tracing_connection.cc b/google/cloud/datamigration/v1/internal/data_migration_tracing_connection.cc index 236e26b6cc244..17834db95713b 100644 --- a/google/cloud/datamigration/v1/internal/data_migration_tracing_connection.cc +++ b/google/cloud/datamigration/v1/internal/data_migration_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace datamigration_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DataMigrationServiceTracingConnection::DataMigrationServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -1081,17 +1079,13 @@ Status DataMigrationServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDataMigrationServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/datamigration/v1/internal/data_migration_tracing_connection.h b/google/cloud/datamigration/v1/internal/data_migration_tracing_connection.h index bdc6c1466c642..0b234c7455d43 100644 --- a/google/cloud/datamigration/v1/internal/data_migration_tracing_connection.h +++ b/google/cloud/datamigration/v1/internal/data_migration_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace datamigration_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DataMigrationServiceTracingConnection : public datamigration_v1::DataMigrationServiceConnection { public: @@ -458,8 +456,6 @@ class DataMigrationServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/datamigration/v1/internal/data_migration_tracing_stub.cc b/google/cloud/datamigration/v1/internal/data_migration_tracing_stub.cc index 32662986945db..d93843821304a 100644 --- a/google/cloud/datamigration/v1/internal/data_migration_tracing_stub.cc +++ b/google/cloud/datamigration/v1/internal/data_migration_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datamigration_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DataMigrationServiceTracingStub::DataMigrationServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -1083,18 +1084,14 @@ future DataMigrationServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDataMigrationServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datamigration_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datamigration/v1/internal/data_migration_tracing_stub.h b/google/cloud/datamigration/v1/internal/data_migration_tracing_stub.h index 2e51226287ccb..815eb9070c330 100644 --- a/google/cloud/datamigration/v1/internal/data_migration_tracing_stub.h +++ b/google/cloud/datamigration/v1/internal/data_migration_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datamigration_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DataMigrationServiceTracingStub : public DataMigrationServiceStub { public: ~DataMigrationServiceTracingStub() override = default; @@ -474,8 +475,6 @@ class DataMigrationServiceTracingStub : public DataMigrationServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -490,4 +489,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAMIGRATION_V1_INTERNAL_DATA_MIGRATION_TRACING_STUB_H diff --git a/google/cloud/dataplex/BUILD.bazel b/google/cloud/dataplex/BUILD.bazel index df24c92c4cee0..9452165e490ac 100644 --- a/google/cloud/dataplex/BUILD.bazel +++ b/google/cloud/dataplex/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/dataplex/v1:dataplex_cc_grpc", + "@googleapis//google/cloud/dataplex/v1:dataplex_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/dataplex/CMakeLists.txt b/google/cloud/dataplex/CMakeLists.txt index c749a81416852..ec4d0c413ae8c 100644 --- a/google/cloud/dataplex/CMakeLists.txt +++ b/google/cloud/dataplex/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(dataplex "Cloud Dataplex API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(dataplex_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/dataplex/content_client.h b/google/cloud/dataplex/content_client.h deleted file mode 100644 index e543583aef8f0..0000000000000 --- a/google/cloud/dataplex/content_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataplex/v1/content.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_CONTENT_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_CONTENT_CLIENT_H - -#include "google/cloud/dataplex/content_connection.h" -#include "google/cloud/dataplex/v1/content_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in dataplex_v1 instead of the aliases defined in -/// this namespace. -namespace dataplex { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dataplex_v1::ContentServiceClient directly. -using ::google::cloud::dataplex_v1::ContentServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataplex -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_CONTENT_CLIENT_H diff --git a/google/cloud/dataplex/content_connection.h b/google/cloud/dataplex/content_connection.h deleted file mode 100644 index f21b1a7c56d6f..0000000000000 --- a/google/cloud/dataplex/content_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataplex/v1/content.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_CONTENT_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_CONTENT_CONNECTION_H - -#include "google/cloud/dataplex/content_connection_idempotency_policy.h" -#include "google/cloud/dataplex/v1/content_connection.h" - -namespace google { -namespace cloud { -namespace dataplex { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dataplex_v1::MakeContentServiceConnection directly. -using ::google::cloud::dataplex_v1::MakeContentServiceConnection; - -/// @deprecated Use dataplex_v1::ContentServiceConnection directly. -using ::google::cloud::dataplex_v1::ContentServiceConnection; - -/// @deprecated Use dataplex_v1::ContentServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::dataplex_v1::ContentServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use dataplex_v1::ContentServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::dataplex_v1::ContentServiceLimitedTimeRetryPolicy; - -/// @deprecated Use dataplex_v1::ContentServiceRetryPolicy directly. -using ::google::cloud::dataplex_v1::ContentServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataplex -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_CONTENT_CONNECTION_H diff --git a/google/cloud/dataplex/content_connection_idempotency_policy.h b/google/cloud/dataplex/content_connection_idempotency_policy.h deleted file mode 100644 index 2b9fdaaa02913..0000000000000 --- a/google/cloud/dataplex/content_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataplex/v1/content.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_CONTENT_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_CONTENT_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/dataplex/v1/content_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace dataplex { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// dataplex_v1::MakeDefaultContentServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::dataplex_v1:: - MakeDefaultContentServiceConnectionIdempotencyPolicy; - -/// @deprecated Use dataplex_v1::ContentServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::dataplex_v1::ContentServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataplex -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_CONTENT_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/dataplex/content_options.h b/google/cloud/dataplex/content_options.h deleted file mode 100644 index b2e4272b3247d..0000000000000 --- a/google/cloud/dataplex/content_options.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataplex/v1/content.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_CONTENT_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_CONTENT_OPTIONS_H - -#include "google/cloud/dataplex/content_connection.h" -#include "google/cloud/dataplex/content_connection_idempotency_policy.h" -#include "google/cloud/dataplex/v1/content_options.h" - -namespace google { -namespace cloud { -namespace dataplex { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dataplex_v1::ContentServiceBackoffPolicyOption directly. -using ::google::cloud::dataplex_v1::ContentServiceBackoffPolicyOption; - -/// @deprecated Use dataplex_v1::ContentServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::dataplex_v1:: - ContentServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use dataplex_v1::ContentServicePolicyOptionList directly. -using ::google::cloud::dataplex_v1::ContentServicePolicyOptionList; - -/// @deprecated Use dataplex_v1::ContentServiceRetryPolicyOption directly. -using ::google::cloud::dataplex_v1::ContentServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataplex -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_CONTENT_OPTIONS_H diff --git a/google/cloud/dataplex/dataplex_client.h b/google/cloud/dataplex/dataplex_client.h deleted file mode 100644 index 739cac37619be..0000000000000 --- a/google/cloud/dataplex/dataplex_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataplex/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_DATAPLEX_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_DATAPLEX_CLIENT_H - -#include "google/cloud/dataplex/dataplex_connection.h" -#include "google/cloud/dataplex/v1/dataplex_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in dataplex_v1 instead of the aliases defined in -/// this namespace. -namespace dataplex { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dataplex_v1::DataplexServiceClient directly. -using ::google::cloud::dataplex_v1::DataplexServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataplex -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_DATAPLEX_CLIENT_H diff --git a/google/cloud/dataplex/dataplex_connection.h b/google/cloud/dataplex/dataplex_connection.h deleted file mode 100644 index 9cf367b268f7c..0000000000000 --- a/google/cloud/dataplex/dataplex_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataplex/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_DATAPLEX_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_DATAPLEX_CONNECTION_H - -#include "google/cloud/dataplex/dataplex_connection_idempotency_policy.h" -#include "google/cloud/dataplex/v1/dataplex_connection.h" - -namespace google { -namespace cloud { -namespace dataplex { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dataplex_v1::MakeDataplexServiceConnection directly. -using ::google::cloud::dataplex_v1::MakeDataplexServiceConnection; - -/// @deprecated Use dataplex_v1::DataplexServiceConnection directly. -using ::google::cloud::dataplex_v1::DataplexServiceConnection; - -/// @deprecated Use dataplex_v1::DataplexServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::dataplex_v1::DataplexServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use dataplex_v1::DataplexServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::dataplex_v1::DataplexServiceLimitedTimeRetryPolicy; - -/// @deprecated Use dataplex_v1::DataplexServiceRetryPolicy directly. -using ::google::cloud::dataplex_v1::DataplexServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataplex -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_DATAPLEX_CONNECTION_H diff --git a/google/cloud/dataplex/dataplex_connection_idempotency_policy.h b/google/cloud/dataplex/dataplex_connection_idempotency_policy.h deleted file mode 100644 index 5be5941da8fed..0000000000000 --- a/google/cloud/dataplex/dataplex_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataplex/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_DATAPLEX_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_DATAPLEX_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/dataplex/v1/dataplex_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace dataplex { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// dataplex_v1::MakeDefaultDataplexServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::dataplex_v1:: - MakeDefaultDataplexServiceConnectionIdempotencyPolicy; - -/// @deprecated Use dataplex_v1::DataplexServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::dataplex_v1::DataplexServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataplex -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_DATAPLEX_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/dataplex/dataplex_options.h b/google/cloud/dataplex/dataplex_options.h deleted file mode 100644 index a1977fe3e3a1d..0000000000000 --- a/google/cloud/dataplex/dataplex_options.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataplex/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_DATAPLEX_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_DATAPLEX_OPTIONS_H - -#include "google/cloud/dataplex/dataplex_connection.h" -#include "google/cloud/dataplex/dataplex_connection_idempotency_policy.h" -#include "google/cloud/dataplex/v1/dataplex_options.h" - -namespace google { -namespace cloud { -namespace dataplex { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dataplex_v1::DataplexServicePollingPolicyOption directly. -using ::google::cloud::dataplex_v1::DataplexServicePollingPolicyOption; - -/// @deprecated Use dataplex_v1::DataplexServiceBackoffPolicyOption directly. -using ::google::cloud::dataplex_v1::DataplexServiceBackoffPolicyOption; - -/// @deprecated Use -/// dataplex_v1::DataplexServiceConnectionIdempotencyPolicyOption directly. -using ::google::cloud::dataplex_v1:: - DataplexServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use dataplex_v1::DataplexServicePolicyOptionList directly. -using ::google::cloud::dataplex_v1::DataplexServicePolicyOptionList; - -/// @deprecated Use dataplex_v1::DataplexServiceRetryPolicyOption directly. -using ::google::cloud::dataplex_v1::DataplexServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataplex -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_DATAPLEX_OPTIONS_H diff --git a/google/cloud/dataplex/metadata_client.h b/google/cloud/dataplex/metadata_client.h deleted file mode 100644 index cfc4fad6c5624..0000000000000 --- a/google/cloud/dataplex/metadata_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataplex/v1/metadata.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_METADATA_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_METADATA_CLIENT_H - -#include "google/cloud/dataplex/metadata_connection.h" -#include "google/cloud/dataplex/v1/metadata_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in dataplex_v1 instead of the aliases defined in -/// this namespace. -namespace dataplex { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dataplex_v1::MetadataServiceClient directly. -using ::google::cloud::dataplex_v1::MetadataServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataplex -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_METADATA_CLIENT_H diff --git a/google/cloud/dataplex/metadata_connection.h b/google/cloud/dataplex/metadata_connection.h deleted file mode 100644 index c52b005997f46..0000000000000 --- a/google/cloud/dataplex/metadata_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataplex/v1/metadata.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_METADATA_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_METADATA_CONNECTION_H - -#include "google/cloud/dataplex/metadata_connection_idempotency_policy.h" -#include "google/cloud/dataplex/v1/metadata_connection.h" - -namespace google { -namespace cloud { -namespace dataplex { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dataplex_v1::MakeMetadataServiceConnection directly. -using ::google::cloud::dataplex_v1::MakeMetadataServiceConnection; - -/// @deprecated Use dataplex_v1::MetadataServiceConnection directly. -using ::google::cloud::dataplex_v1::MetadataServiceConnection; - -/// @deprecated Use dataplex_v1::MetadataServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::dataplex_v1::MetadataServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use dataplex_v1::MetadataServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::dataplex_v1::MetadataServiceLimitedTimeRetryPolicy; - -/// @deprecated Use dataplex_v1::MetadataServiceRetryPolicy directly. -using ::google::cloud::dataplex_v1::MetadataServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataplex -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_METADATA_CONNECTION_H diff --git a/google/cloud/dataplex/metadata_connection_idempotency_policy.h b/google/cloud/dataplex/metadata_connection_idempotency_policy.h deleted file mode 100644 index 7677da69a9ac8..0000000000000 --- a/google/cloud/dataplex/metadata_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataplex/v1/metadata.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_METADATA_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_METADATA_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/dataplex/v1/metadata_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace dataplex { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// dataplex_v1::MakeDefaultMetadataServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::dataplex_v1:: - MakeDefaultMetadataServiceConnectionIdempotencyPolicy; - -/// @deprecated Use dataplex_v1::MetadataServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::dataplex_v1::MetadataServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataplex -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_METADATA_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/dataplex/metadata_options.h b/google/cloud/dataplex/metadata_options.h deleted file mode 100644 index a6c4a2e7130bd..0000000000000 --- a/google/cloud/dataplex/metadata_options.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataplex/v1/metadata.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_METADATA_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_METADATA_OPTIONS_H - -#include "google/cloud/dataplex/metadata_connection.h" -#include "google/cloud/dataplex/metadata_connection_idempotency_policy.h" -#include "google/cloud/dataplex/v1/metadata_options.h" - -namespace google { -namespace cloud { -namespace dataplex { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dataplex_v1::MetadataServiceBackoffPolicyOption directly. -using ::google::cloud::dataplex_v1::MetadataServiceBackoffPolicyOption; - -/// @deprecated Use -/// dataplex_v1::MetadataServiceConnectionIdempotencyPolicyOption directly. -using ::google::cloud::dataplex_v1:: - MetadataServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use dataplex_v1::MetadataServicePolicyOptionList directly. -using ::google::cloud::dataplex_v1::MetadataServicePolicyOptionList; - -/// @deprecated Use dataplex_v1::MetadataServiceRetryPolicyOption directly. -using ::google::cloud::dataplex_v1::MetadataServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataplex -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_METADATA_OPTIONS_H diff --git a/google/cloud/dataplex/mocks/mock_content_connection.h b/google/cloud/dataplex/mocks/mock_content_connection.h deleted file mode 100644 index d2fb4aa834cbb..0000000000000 --- a/google/cloud/dataplex/mocks/mock_content_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataplex/v1/content.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_MOCKS_MOCK_CONTENT_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_MOCKS_MOCK_CONTENT_CONNECTION_H - -#include "google/cloud/dataplex/content_connection.h" -#include "google/cloud/dataplex/v1/mocks/mock_content_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in dataplex_v1_mocks instead of the aliases -/// defined in this namespace. -namespace dataplex_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dataplex_v1_mocks::MockContentServiceConnection directly. -using ::google::cloud::dataplex_v1_mocks::MockContentServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataplex_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_MOCKS_MOCK_CONTENT_CONNECTION_H diff --git a/google/cloud/dataplex/mocks/mock_dataplex_connection.h b/google/cloud/dataplex/mocks/mock_dataplex_connection.h deleted file mode 100644 index a2c220ba8d874..0000000000000 --- a/google/cloud/dataplex/mocks/mock_dataplex_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataplex/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_MOCKS_MOCK_DATAPLEX_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_MOCKS_MOCK_DATAPLEX_CONNECTION_H - -#include "google/cloud/dataplex/dataplex_connection.h" -#include "google/cloud/dataplex/v1/mocks/mock_dataplex_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in dataplex_v1_mocks instead of the aliases -/// defined in this namespace. -namespace dataplex_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dataplex_v1_mocks::MockDataplexServiceConnection directly. -using ::google::cloud::dataplex_v1_mocks::MockDataplexServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataplex_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_MOCKS_MOCK_DATAPLEX_CONNECTION_H diff --git a/google/cloud/dataplex/mocks/mock_metadata_connection.h b/google/cloud/dataplex/mocks/mock_metadata_connection.h deleted file mode 100644 index df37b51ff45cb..0000000000000 --- a/google/cloud/dataplex/mocks/mock_metadata_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataplex/v1/metadata.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_MOCKS_MOCK_METADATA_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_MOCKS_MOCK_METADATA_CONNECTION_H - -#include "google/cloud/dataplex/metadata_connection.h" -#include "google/cloud/dataplex/v1/mocks/mock_metadata_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in dataplex_v1_mocks instead of the aliases -/// defined in this namespace. -namespace dataplex_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dataplex_v1_mocks::MockMetadataServiceConnection directly. -using ::google::cloud::dataplex_v1_mocks::MockMetadataServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataplex_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_MOCKS_MOCK_METADATA_CONNECTION_H diff --git a/google/cloud/dataplex/quickstart/.bazelrc b/google/cloud/dataplex/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/dataplex/quickstart/.bazelrc +++ b/google/cloud/dataplex/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/dataplex/quickstart/CMakeLists.txt b/google/cloud/dataplex/quickstart/CMakeLists.txt index 01c007e6ce594..4295f47f38361 100644 --- a/google/cloud/dataplex/quickstart/CMakeLists.txt +++ b/google/cloud/dataplex/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Dataplex API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-dataplex-quickstart CXX) find_package(google_cloud_cpp_dataplex REQUIRED) diff --git a/google/cloud/dataplex/v1/catalog_client.h b/google/cloud/dataplex/v1/catalog_client.h index 88691c4df19ff..8bcb1400464b9 100644 --- a/google/cloud/dataplex/v1/catalog_client.h +++ b/google/cloud/dataplex/v1/catalog_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/dataplex/v1/catalog_connection.h b/google/cloud/dataplex/v1/catalog_connection.h index 02d94ae968f1f..8119d1f1ed3f8 100644 --- a/google/cloud/dataplex/v1/catalog_connection.h +++ b/google/cloud/dataplex/v1/catalog_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_CATALOG_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_CATALOG_CONNECTION_H +#include "google/cloud/dataplex/v1/catalog.pb.h" #include "google/cloud/dataplex/v1/catalog_connection_idempotency_policy.h" #include "google/cloud/dataplex/v1/internal/catalog_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dataplex/v1/catalog_connection_idempotency_policy.h b/google/cloud/dataplex/v1/catalog_connection_idempotency_policy.h index 5e0bac3b64708..3734e2cd0bc15 100644 --- a/google/cloud/dataplex/v1/catalog_connection_idempotency_policy.h +++ b/google/cloud/dataplex/v1/catalog_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_CATALOG_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_CATALOG_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dataplex/v1/catalog.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dataplex/v1/content_connection.h b/google/cloud/dataplex/v1/content_connection.h index 82c10a1e4ceac..e997af66e7d1b 100644 --- a/google/cloud/dataplex/v1/content_connection.h +++ b/google/cloud/dataplex/v1/content_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_CONTENT_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_CONTENT_CONNECTION_H +#include "google/cloud/dataplex/v1/content.pb.h" #include "google/cloud/dataplex/v1/content_connection_idempotency_policy.h" #include "google/cloud/dataplex/v1/internal/content_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/dataplex/v1/content_connection_idempotency_policy.h b/google/cloud/dataplex/v1/content_connection_idempotency_policy.h index 1525c33859c9c..f51ff1c5c539b 100644 --- a/google/cloud/dataplex/v1/content_connection_idempotency_policy.h +++ b/google/cloud/dataplex/v1/content_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_CONTENT_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_CONTENT_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dataplex/v1/content.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dataplex/v1/data_scan_client.h b/google/cloud/dataplex/v1/data_scan_client.h index 53845c9d3d58a..525454d90b35c 100644 --- a/google/cloud/dataplex/v1/data_scan_client.h +++ b/google/cloud/dataplex/v1/data_scan_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/dataplex/v1/data_scan_connection.h b/google/cloud/dataplex/v1/data_scan_connection.h index f6412c4dccc26..0f86864f684db 100644 --- a/google/cloud/dataplex/v1/data_scan_connection.h +++ b/google/cloud/dataplex/v1/data_scan_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_DATA_SCAN_CONNECTION_H #include "google/cloud/dataplex/v1/data_scan_connection_idempotency_policy.h" +#include "google/cloud/dataplex/v1/datascans.pb.h" #include "google/cloud/dataplex/v1/internal/data_scan_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dataplex/v1/data_scan_connection_idempotency_policy.h b/google/cloud/dataplex/v1/data_scan_connection_idempotency_policy.h index ed6353877727b..a62483907e217 100644 --- a/google/cloud/dataplex/v1/data_scan_connection_idempotency_policy.h +++ b/google/cloud/dataplex/v1/data_scan_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_DATA_SCAN_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_DATA_SCAN_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dataplex/v1/datascans.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dataplex/v1/data_taxonomy_client.h b/google/cloud/dataplex/v1/data_taxonomy_client.h index 3db827d88befd..afc10755cfea1 100644 --- a/google/cloud/dataplex/v1/data_taxonomy_client.h +++ b/google/cloud/dataplex/v1/data_taxonomy_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/dataplex/v1/data_taxonomy_connection.h b/google/cloud/dataplex/v1/data_taxonomy_connection.h index 69eef81d52593..323779c28198c 100644 --- a/google/cloud/dataplex/v1/data_taxonomy_connection.h +++ b/google/cloud/dataplex/v1/data_taxonomy_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_DATA_TAXONOMY_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_DATA_TAXONOMY_CONNECTION_H +#include "google/cloud/dataplex/v1/data_taxonomy.pb.h" #include "google/cloud/dataplex/v1/data_taxonomy_connection_idempotency_policy.h" #include "google/cloud/dataplex/v1/internal/data_taxonomy_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dataplex/v1/data_taxonomy_connection_idempotency_policy.h b/google/cloud/dataplex/v1/data_taxonomy_connection_idempotency_policy.h index eb80386005071..22cda43da4908 100644 --- a/google/cloud/dataplex/v1/data_taxonomy_connection_idempotency_policy.h +++ b/google/cloud/dataplex/v1/data_taxonomy_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_DATA_TAXONOMY_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_DATA_TAXONOMY_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dataplex/v1/data_taxonomy.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dataplex/v1/dataplex_client.h b/google/cloud/dataplex/v1/dataplex_client.h index 89fd114720b7b..c7d3b35b92b29 100644 --- a/google/cloud/dataplex/v1/dataplex_client.h +++ b/google/cloud/dataplex/v1/dataplex_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/dataplex/v1/dataplex_connection.h b/google/cloud/dataplex/v1/dataplex_connection.h index 250d46e6a4409..d2fd77f3b1016 100644 --- a/google/cloud/dataplex/v1/dataplex_connection.h +++ b/google/cloud/dataplex/v1/dataplex_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/dataplex/v1/dataplex_connection_idempotency_policy.h" #include "google/cloud/dataplex/v1/internal/dataplex_retry_traits.h" +#include "google/cloud/dataplex/v1/service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dataplex/v1/dataplex_connection_idempotency_policy.h b/google/cloud/dataplex/v1/dataplex_connection_idempotency_policy.h index 509c0e2ff4ece..bc5dc34d9394b 100644 --- a/google/cloud/dataplex/v1/dataplex_connection_idempotency_policy.h +++ b/google/cloud/dataplex/v1/dataplex_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_DATAPLEX_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_DATAPLEX_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dataplex/v1/service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dataplex/v1/internal/catalog_auth_decorator.cc b/google/cloud/dataplex/v1/internal/catalog_auth_decorator.cc index 6858481895158..8fc912aa4437b 100644 --- a/google/cloud/dataplex/v1/internal/catalog_auth_decorator.cc +++ b/google/cloud/dataplex/v1/internal/catalog_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dataplex/v1/catalog.proto #include "google/cloud/dataplex/v1/internal/catalog_auth_decorator.h" -#include +#include "google/cloud/dataplex/v1/catalog.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -591,3 +594,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/catalog_auth_decorator.h b/google/cloud/dataplex/v1/internal/catalog_auth_decorator.h index 733eb9391df89..00da6b25a7879 100644 --- a/google/cloud/dataplex/v1/internal/catalog_auth_decorator.h +++ b/google/cloud/dataplex/v1/internal/catalog_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dataplex/v1/internal/catalog_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -304,4 +307,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_CATALOG_AUTH_DECORATOR_H diff --git a/google/cloud/dataplex/v1/internal/catalog_connection_impl.h b/google/cloud/dataplex/v1/internal/catalog_connection_impl.h index a3ed5e05af288..7e950afa4ab68 100644 --- a/google/cloud/dataplex/v1/internal/catalog_connection_impl.h +++ b/google/cloud/dataplex/v1/internal/catalog_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dataplex/v1/internal/catalog_logging_decorator.cc b/google/cloud/dataplex/v1/internal/catalog_logging_decorator.cc index 2321c302c7483..0faa4bd05d314 100644 --- a/google/cloud/dataplex/v1/internal/catalog_logging_decorator.cc +++ b/google/cloud/dataplex/v1/internal/catalog_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dataplex/v1/catalog.proto #include "google/cloud/dataplex/v1/internal/catalog_logging_decorator.h" +#include "google/cloud/dataplex/v1/catalog.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -723,3 +726,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/catalog_logging_decorator.h b/google/cloud/dataplex/v1/internal/catalog_logging_decorator.h index 5ea639270b087..a425cb9d02a90 100644 --- a/google/cloud/dataplex/v1/internal/catalog_logging_decorator.h +++ b/google/cloud/dataplex/v1/internal/catalog_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dataplex/v1/internal/catalog_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -304,4 +307,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_CATALOG_LOGGING_DECORATOR_H diff --git a/google/cloud/dataplex/v1/internal/catalog_metadata_decorator.cc b/google/cloud/dataplex/v1/internal/catalog_metadata_decorator.cc index e417862cf8d4f..1916f4231e4a6 100644 --- a/google/cloud/dataplex/v1/internal/catalog_metadata_decorator.cc +++ b/google/cloud/dataplex/v1/internal/catalog_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dataplex/v1/catalog.proto #include "google/cloud/dataplex/v1/internal/catalog_metadata_decorator.h" +#include "google/cloud/dataplex/v1/catalog.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -548,3 +552,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/catalog_metadata_decorator.h b/google/cloud/dataplex/v1/internal/catalog_metadata_decorator.h index 2aaaf48276a5b..331c466b18c79 100644 --- a/google/cloud/dataplex/v1/internal/catalog_metadata_decorator.h +++ b/google/cloud/dataplex/v1/internal/catalog_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dataplex/v1/internal/catalog_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -309,4 +312,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_CATALOG_METADATA_DECORATOR_H diff --git a/google/cloud/dataplex/v1/internal/catalog_option_defaults.cc b/google/cloud/dataplex/v1/internal/catalog_option_defaults.cc index a9bb844e49ba5..d7ab7adc55664 100644 --- a/google/cloud/dataplex/v1/internal/catalog_option_defaults.cc +++ b/google/cloud/dataplex/v1/internal/catalog_option_defaults.cc @@ -41,7 +41,7 @@ Options CatalogServiceDefaultOptions(Options options) { if (!options.has()) { options.set( dataplex_v1::CatalogServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dataplex/v1/internal/catalog_stub.cc b/google/cloud/dataplex/v1/internal/catalog_stub.cc index 012a1a04ddd2c..4266e9939754f 100644 --- a/google/cloud/dataplex/v1/internal/catalog_stub.cc +++ b/google/cloud/dataplex/v1/internal/catalog_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/dataplex/v1/catalog.proto #include "google/cloud/dataplex/v1/internal/catalog_stub.h" +#include "google/cloud/dataplex/v1/catalog.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -713,3 +716,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/catalog_stub.h b/google/cloud/dataplex/v1/internal/catalog_stub.h index 169f3e2259e65..583312999000c 100644 --- a/google/cloud/dataplex/v1/internal/catalog_stub.h +++ b/google/cloud/dataplex/v1/internal/catalog_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_CATALOG_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_CATALOG_STUB_H +#include "google/cloud/dataplex/v1/catalog.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -566,4 +569,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_CATALOG_STUB_H diff --git a/google/cloud/dataplex/v1/internal/catalog_stub_factory.cc b/google/cloud/dataplex/v1/internal/catalog_stub_factory.cc index 030575b8f6763..14e478c907a80 100644 --- a/google/cloud/dataplex/v1/internal/catalog_stub_factory.cc +++ b/google/cloud/dataplex/v1/internal/catalog_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/dataplex/v1/catalog.proto #include "google/cloud/dataplex/v1/internal/catalog_stub_factory.h" +#include "google/cloud/dataplex/v1/catalog.grpc.pb.h" #include "google/cloud/dataplex/v1/internal/catalog_auth_decorator.h" #include "google/cloud/dataplex/v1/internal/catalog_logging_decorator.h" #include "google/cloud/dataplex/v1/internal/catalog_metadata_decorator.h" #include "google/cloud/dataplex/v1/internal/catalog_stub.h" #include "google/cloud/dataplex/v1/internal/catalog_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -78,3 +81,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/catalog_stub_factory.h b/google/cloud/dataplex/v1/internal/catalog_stub_factory.h index 9d83ff95e4068..768d861d250a6 100644 --- a/google/cloud/dataplex/v1/internal/catalog_stub_factory.h +++ b/google/cloud/dataplex/v1/internal/catalog_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_CATALOG_STUB_FACTORY_H diff --git a/google/cloud/dataplex/v1/internal/catalog_tracing_connection.cc b/google/cloud/dataplex/v1/internal/catalog_tracing_connection.cc index 7b99a20d41902..47339903c3fea 100644 --- a/google/cloud/dataplex/v1/internal/catalog_tracing_connection.cc +++ b/google/cloud/dataplex/v1/internal/catalog_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dataplex_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CatalogServiceTracingConnection::CatalogServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -594,16 +592,12 @@ Status CatalogServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCatalogServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dataplex/v1/internal/catalog_tracing_connection.h b/google/cloud/dataplex/v1/internal/catalog_tracing_connection.h index b4fd403e2417f..96b35191dcf98 100644 --- a/google/cloud/dataplex/v1/internal/catalog_tracing_connection.h +++ b/google/cloud/dataplex/v1/internal/catalog_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dataplex_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CatalogServiceTracingConnection : public dataplex_v1::CatalogServiceConnection { public: @@ -254,8 +252,6 @@ class CatalogServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dataplex/v1/internal/catalog_tracing_stub.cc b/google/cloud/dataplex/v1/internal/catalog_tracing_stub.cc index d18490c669c5e..04e8eac7cdd9f 100644 --- a/google/cloud/dataplex/v1/internal/catalog_tracing_stub.cc +++ b/google/cloud/dataplex/v1/internal/catalog_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CatalogServiceTracingStub::CatalogServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -661,18 +662,14 @@ future CatalogServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCatalogServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/catalog_tracing_stub.h b/google/cloud/dataplex/v1/internal/catalog_tracing_stub.h index 48ca1171ff65a..b297204c424bc 100644 --- a/google/cloud/dataplex/v1/internal/catalog_tracing_stub.h +++ b/google/cloud/dataplex/v1/internal/catalog_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CatalogServiceTracingStub : public CatalogServiceStub { public: ~CatalogServiceTracingStub() override = default; @@ -299,8 +300,6 @@ class CatalogServiceTracingStub : public CatalogServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -315,4 +314,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_CATALOG_TRACING_STUB_H diff --git a/google/cloud/dataplex/v1/internal/content_auth_decorator.cc b/google/cloud/dataplex/v1/internal/content_auth_decorator.cc index 623c29b692aa6..755af384da048 100644 --- a/google/cloud/dataplex/v1/internal/content_auth_decorator.cc +++ b/google/cloud/dataplex/v1/internal/content_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dataplex/v1/content.proto #include "google/cloud/dataplex/v1/internal/content_auth_decorator.h" -#include +#include "google/cloud/dataplex/v1/content.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -153,3 +156,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/content_auth_decorator.h b/google/cloud/dataplex/v1/internal/content_auth_decorator.h index 1f5316080cc0f..db54fd6e8aee1 100644 --- a/google/cloud/dataplex/v1/internal/content_auth_decorator.h +++ b/google/cloud/dataplex/v1/internal/content_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -106,4 +109,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_CONTENT_AUTH_DECORATOR_H diff --git a/google/cloud/dataplex/v1/internal/content_logging_decorator.cc b/google/cloud/dataplex/v1/internal/content_logging_decorator.cc index c6cce6e433c35..1830eaca16b02 100644 --- a/google/cloud/dataplex/v1/internal/content_logging_decorator.cc +++ b/google/cloud/dataplex/v1/internal/content_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dataplex/v1/content.proto #include "google/cloud/dataplex/v1/internal/content_logging_decorator.h" +#include "google/cloud/dataplex/v1/content.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -200,3 +203,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/content_logging_decorator.h b/google/cloud/dataplex/v1/internal/content_logging_decorator.h index 51677930a4578..51d7850d86b2e 100644 --- a/google/cloud/dataplex/v1/internal/content_logging_decorator.h +++ b/google/cloud/dataplex/v1/internal/content_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -106,4 +109,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_CONTENT_LOGGING_DECORATOR_H diff --git a/google/cloud/dataplex/v1/internal/content_metadata_decorator.cc b/google/cloud/dataplex/v1/internal/content_metadata_decorator.cc index 1820620905183..0aaa6ab53c796 100644 --- a/google/cloud/dataplex/v1/internal/content_metadata_decorator.cc +++ b/google/cloud/dataplex/v1/internal/content_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dataplex/v1/content.proto #include "google/cloud/dataplex/v1/internal/content_metadata_decorator.h" +#include "google/cloud/dataplex/v1/content.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -184,3 +188,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/content_metadata_decorator.h b/google/cloud/dataplex/v1/internal/content_metadata_decorator.h index 293f3d7d47527..e534bbeda8126 100644 --- a/google/cloud/dataplex/v1/internal/content_metadata_decorator.h +++ b/google/cloud/dataplex/v1/internal/content_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -111,4 +114,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_CONTENT_METADATA_DECORATOR_H diff --git a/google/cloud/dataplex/v1/internal/content_option_defaults.cc b/google/cloud/dataplex/v1/internal/content_option_defaults.cc index fe3cedb7d0794..b7341aa8c056d 100644 --- a/google/cloud/dataplex/v1/internal/content_option_defaults.cc +++ b/google/cloud/dataplex/v1/internal/content_option_defaults.cc @@ -41,7 +41,7 @@ Options ContentServiceDefaultOptions(Options options) { if (!options.has()) { options.set( dataplex_v1::ContentServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dataplex/v1/internal/content_stub.cc b/google/cloud/dataplex/v1/internal/content_stub.cc index f1d82d59dfa0f..f652271af7d9a 100644 --- a/google/cloud/dataplex/v1/internal/content_stub.cc +++ b/google/cloud/dataplex/v1/internal/content_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/dataplex/v1/content.proto #include "google/cloud/dataplex/v1/internal/content_stub.h" +#include "google/cloud/dataplex/v1/content.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -197,3 +200,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/content_stub.h b/google/cloud/dataplex/v1/internal/content_stub.h index ebb66fef88d2b..d0336000a16f5 100644 --- a/google/cloud/dataplex/v1/internal/content_stub.h +++ b/google/cloud/dataplex/v1/internal/content_stub.h @@ -19,15 +19,18 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_CONTENT_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_CONTENT_STUB_H +#include "google/cloud/dataplex/v1/content.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -183,4 +186,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_CONTENT_STUB_H diff --git a/google/cloud/dataplex/v1/internal/content_stub_factory.cc b/google/cloud/dataplex/v1/internal/content_stub_factory.cc index 93a6c1992b2ba..3fccdef898b79 100644 --- a/google/cloud/dataplex/v1/internal/content_stub_factory.cc +++ b/google/cloud/dataplex/v1/internal/content_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dataplex/v1/content.proto #include "google/cloud/dataplex/v1/internal/content_stub_factory.h" +#include "google/cloud/dataplex/v1/content.grpc.pb.h" #include "google/cloud/dataplex/v1/internal/content_auth_decorator.h" #include "google/cloud/dataplex/v1/internal/content_logging_decorator.h" #include "google/cloud/dataplex/v1/internal/content_metadata_decorator.h" #include "google/cloud/dataplex/v1/internal/content_stub.h" #include "google/cloud/dataplex/v1/internal/content_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -77,3 +80,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/content_stub_factory.h b/google/cloud/dataplex/v1/internal/content_stub_factory.h index a27639f935441..33fcf7c4526bd 100644 --- a/google/cloud/dataplex/v1/internal/content_stub_factory.h +++ b/google/cloud/dataplex/v1/internal/content_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_CONTENT_STUB_FACTORY_H diff --git a/google/cloud/dataplex/v1/internal/content_tracing_connection.cc b/google/cloud/dataplex/v1/internal/content_tracing_connection.cc index d29319e81dde2..cf64f1fe0f323 100644 --- a/google/cloud/dataplex/v1/internal/content_tracing_connection.cc +++ b/google/cloud/dataplex/v1/internal/content_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dataplex_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ContentServiceTracingConnection::ContentServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -160,16 +158,12 @@ Status ContentServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeContentServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dataplex/v1/internal/content_tracing_connection.h b/google/cloud/dataplex/v1/internal/content_tracing_connection.h index 7dca58d364786..7e0b8a8b60fa7 100644 --- a/google/cloud/dataplex/v1/internal/content_tracing_connection.h +++ b/google/cloud/dataplex/v1/internal/content_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dataplex_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ContentServiceTracingConnection : public dataplex_v1::ContentServiceConnection { public: @@ -88,8 +86,6 @@ class ContentServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dataplex/v1/internal/content_tracing_stub.cc b/google/cloud/dataplex/v1/internal/content_tracing_stub.cc index c4a2382f6d30c..0861e9c0d533c 100644 --- a/google/cloud/dataplex/v1/internal/content_tracing_stub.cc +++ b/google/cloud/dataplex/v1/internal/content_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ContentServiceTracingStub::ContentServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -195,18 +196,14 @@ Status ContentServiceTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeContentServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/content_tracing_stub.h b/google/cloud/dataplex/v1/internal/content_tracing_stub.h index 11217eabb333c..7f824737ba8f3 100644 --- a/google/cloud/dataplex/v1/internal/content_tracing_stub.h +++ b/google/cloud/dataplex/v1/internal/content_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ContentServiceTracingStub : public ContentServiceStub { public: ~ContentServiceTracingStub() override = default; @@ -102,8 +103,6 @@ class ContentServiceTracingStub : public ContentServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -118,4 +117,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_CONTENT_TRACING_STUB_H diff --git a/google/cloud/dataplex/v1/internal/data_scan_auth_decorator.cc b/google/cloud/dataplex/v1/internal/data_scan_auth_decorator.cc index 3caffb9e2c1f8..d20935131622f 100644 --- a/google/cloud/dataplex/v1/internal/data_scan_auth_decorator.cc +++ b/google/cloud/dataplex/v1/internal/data_scan_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dataplex/v1/datascans.proto #include "google/cloud/dataplex/v1/internal/data_scan_auth_decorator.h" -#include +#include "google/cloud/dataplex/v1/datascans.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -285,3 +288,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/data_scan_auth_decorator.h b/google/cloud/dataplex/v1/internal/data_scan_auth_decorator.h index b57041e746802..63fcddeb88b1b 100644 --- a/google/cloud/dataplex/v1/internal/data_scan_auth_decorator.h +++ b/google/cloud/dataplex/v1/internal/data_scan_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dataplex/v1/internal/data_scan_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -162,4 +165,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_DATA_SCAN_AUTH_DECORATOR_H diff --git a/google/cloud/dataplex/v1/internal/data_scan_connection_impl.h b/google/cloud/dataplex/v1/internal/data_scan_connection_impl.h index cd3c80919b6b3..f26390a9fc5fd 100644 --- a/google/cloud/dataplex/v1/internal/data_scan_connection_impl.h +++ b/google/cloud/dataplex/v1/internal/data_scan_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dataplex/v1/internal/data_scan_logging_decorator.cc b/google/cloud/dataplex/v1/internal/data_scan_logging_decorator.cc index b07ac282941ed..5449c72864b0c 100644 --- a/google/cloud/dataplex/v1/internal/data_scan_logging_decorator.cc +++ b/google/cloud/dataplex/v1/internal/data_scan_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dataplex/v1/datascans.proto #include "google/cloud/dataplex/v1/internal/data_scan_logging_decorator.h" +#include "google/cloud/dataplex/v1/datascans.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -345,3 +348,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/data_scan_logging_decorator.h b/google/cloud/dataplex/v1/internal/data_scan_logging_decorator.h index f444b1150c98c..8d819c58f036b 100644 --- a/google/cloud/dataplex/v1/internal/data_scan_logging_decorator.h +++ b/google/cloud/dataplex/v1/internal/data_scan_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dataplex/v1/internal/data_scan_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -162,4 +165,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_DATA_SCAN_LOGGING_DECORATOR_H diff --git a/google/cloud/dataplex/v1/internal/data_scan_metadata_decorator.cc b/google/cloud/dataplex/v1/internal/data_scan_metadata_decorator.cc index a5a24befd80cb..916f737ebb2d5 100644 --- a/google/cloud/dataplex/v1/internal/data_scan_metadata_decorator.cc +++ b/google/cloud/dataplex/v1/internal/data_scan_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dataplex/v1/datascans.proto #include "google/cloud/dataplex/v1/internal/data_scan_metadata_decorator.h" +#include "google/cloud/dataplex/v1/datascans.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -283,3 +287,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/data_scan_metadata_decorator.h b/google/cloud/dataplex/v1/internal/data_scan_metadata_decorator.h index 826b700b75135..ab3a8a747c13b 100644 --- a/google/cloud/dataplex/v1/internal/data_scan_metadata_decorator.h +++ b/google/cloud/dataplex/v1/internal/data_scan_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dataplex/v1/internal/data_scan_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -168,4 +171,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_DATA_SCAN_METADATA_DECORATOR_H diff --git a/google/cloud/dataplex/v1/internal/data_scan_option_defaults.cc b/google/cloud/dataplex/v1/internal/data_scan_option_defaults.cc index df13d82ab3815..352e75410448c 100644 --- a/google/cloud/dataplex/v1/internal/data_scan_option_defaults.cc +++ b/google/cloud/dataplex/v1/internal/data_scan_option_defaults.cc @@ -42,7 +42,7 @@ Options DataScanServiceDefaultOptions(Options options) { if (!options.has()) { options.set( dataplex_v1::DataScanServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dataplex/v1/internal/data_scan_stub.cc b/google/cloud/dataplex/v1/internal/data_scan_stub.cc index e07e76f68f99d..e86b6ebc90051 100644 --- a/google/cloud/dataplex/v1/internal/data_scan_stub.cc +++ b/google/cloud/dataplex/v1/internal/data_scan_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/dataplex/v1/datascans.proto #include "google/cloud/dataplex/v1/internal/data_scan_stub.h" +#include "google/cloud/dataplex/v1/datascans.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -343,3 +346,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/data_scan_stub.h b/google/cloud/dataplex/v1/internal/data_scan_stub.h index 8194d87aec372..0c763bfbb1ee5 100644 --- a/google/cloud/dataplex/v1/internal/data_scan_stub.h +++ b/google/cloud/dataplex/v1/internal/data_scan_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_DATA_SCAN_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_DATA_SCAN_STUB_H +#include "google/cloud/dataplex/v1/datascans.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -295,4 +298,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_DATA_SCAN_STUB_H diff --git a/google/cloud/dataplex/v1/internal/data_scan_stub_factory.cc b/google/cloud/dataplex/v1/internal/data_scan_stub_factory.cc index 22f30c6fc01dc..6c74deb2b8576 100644 --- a/google/cloud/dataplex/v1/internal/data_scan_stub_factory.cc +++ b/google/cloud/dataplex/v1/internal/data_scan_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/dataplex/v1/datascans.proto #include "google/cloud/dataplex/v1/internal/data_scan_stub_factory.h" +#include "google/cloud/dataplex/v1/datascans.grpc.pb.h" #include "google/cloud/dataplex/v1/internal/data_scan_auth_decorator.h" #include "google/cloud/dataplex/v1/internal/data_scan_logging_decorator.h" #include "google/cloud/dataplex/v1/internal/data_scan_metadata_decorator.h" #include "google/cloud/dataplex/v1/internal/data_scan_stub.h" #include "google/cloud/dataplex/v1/internal/data_scan_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -78,3 +81,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/data_scan_stub_factory.h b/google/cloud/dataplex/v1/internal/data_scan_stub_factory.h index ecaeaa9efa732..9b041d479b5be 100644 --- a/google/cloud/dataplex/v1/internal/data_scan_stub_factory.h +++ b/google/cloud/dataplex/v1/internal/data_scan_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_DATA_SCAN_STUB_FACTORY_H diff --git a/google/cloud/dataplex/v1/internal/data_scan_tracing_connection.cc b/google/cloud/dataplex/v1/internal/data_scan_tracing_connection.cc index 8c95fbd7ea0ee..be856afb0a5c0 100644 --- a/google/cloud/dataplex/v1/internal/data_scan_tracing_connection.cc +++ b/google/cloud/dataplex/v1/internal/data_scan_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dataplex_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DataScanServiceTracingConnection::DataScanServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -262,16 +260,12 @@ Status DataScanServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDataScanServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dataplex/v1/internal/data_scan_tracing_connection.h b/google/cloud/dataplex/v1/internal/data_scan_tracing_connection.h index 5eb629adc7121..b60d94ef13cb9 100644 --- a/google/cloud/dataplex/v1/internal/data_scan_tracing_connection.h +++ b/google/cloud/dataplex/v1/internal/data_scan_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dataplex_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DataScanServiceTracingConnection : public dataplex_v1::DataScanServiceConnection { public: @@ -128,8 +126,6 @@ class DataScanServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dataplex/v1/internal/data_scan_tracing_stub.cc b/google/cloud/dataplex/v1/internal/data_scan_tracing_stub.cc index be3c6d908f33c..ca8ce1d9fb306 100644 --- a/google/cloud/dataplex/v1/internal/data_scan_tracing_stub.cc +++ b/google/cloud/dataplex/v1/internal/data_scan_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DataScanServiceTracingStub::DataScanServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -319,18 +320,14 @@ future DataScanServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDataScanServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/data_scan_tracing_stub.h b/google/cloud/dataplex/v1/internal/data_scan_tracing_stub.h index 18e5f31aa8ae3..999f33cd0da3c 100644 --- a/google/cloud/dataplex/v1/internal/data_scan_tracing_stub.h +++ b/google/cloud/dataplex/v1/internal/data_scan_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DataScanServiceTracingStub : public DataScanServiceStub { public: ~DataScanServiceTracingStub() override = default; @@ -158,8 +159,6 @@ class DataScanServiceTracingStub : public DataScanServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -174,4 +173,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_DATA_SCAN_TRACING_STUB_H diff --git a/google/cloud/dataplex/v1/internal/data_taxonomy_auth_decorator.cc b/google/cloud/dataplex/v1/internal/data_taxonomy_auth_decorator.cc index 177781b94cc0b..f482c03828aff 100644 --- a/google/cloud/dataplex/v1/internal/data_taxonomy_auth_decorator.cc +++ b/google/cloud/dataplex/v1/internal/data_taxonomy_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dataplex/v1/data_taxonomy.proto #include "google/cloud/dataplex/v1/internal/data_taxonomy_auth_decorator.h" -#include +#include "google/cloud/dataplex/v1/data_taxonomy.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -470,3 +473,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/data_taxonomy_auth_decorator.h b/google/cloud/dataplex/v1/internal/data_taxonomy_auth_decorator.h index 48ca9d750e177..c8005ff92d3bf 100644 --- a/google/cloud/dataplex/v1/internal/data_taxonomy_auth_decorator.h +++ b/google/cloud/dataplex/v1/internal/data_taxonomy_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dataplex/v1/internal/data_taxonomy_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -242,4 +245,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_DATA_TAXONOMY_AUTH_DECORATOR_H diff --git a/google/cloud/dataplex/v1/internal/data_taxonomy_connection_impl.h b/google/cloud/dataplex/v1/internal/data_taxonomy_connection_impl.h index 61eb83f336960..eac2af035a718 100644 --- a/google/cloud/dataplex/v1/internal/data_taxonomy_connection_impl.h +++ b/google/cloud/dataplex/v1/internal/data_taxonomy_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dataplex/v1/internal/data_taxonomy_logging_decorator.cc b/google/cloud/dataplex/v1/internal/data_taxonomy_logging_decorator.cc index 63da576503f42..b16780227182d 100644 --- a/google/cloud/dataplex/v1/internal/data_taxonomy_logging_decorator.cc +++ b/google/cloud/dataplex/v1/internal/data_taxonomy_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dataplex/v1/data_taxonomy.proto #include "google/cloud/dataplex/v1/internal/data_taxonomy_logging_decorator.h" +#include "google/cloud/dataplex/v1/data_taxonomy.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -559,3 +562,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/data_taxonomy_logging_decorator.h b/google/cloud/dataplex/v1/internal/data_taxonomy_logging_decorator.h index 8b02a4936371b..0348c2d12e6fa 100644 --- a/google/cloud/dataplex/v1/internal/data_taxonomy_logging_decorator.h +++ b/google/cloud/dataplex/v1/internal/data_taxonomy_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dataplex/v1/internal/data_taxonomy_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -242,4 +245,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_DATA_TAXONOMY_LOGGING_DECORATOR_H diff --git a/google/cloud/dataplex/v1/internal/data_taxonomy_metadata_decorator.cc b/google/cloud/dataplex/v1/internal/data_taxonomy_metadata_decorator.cc index cd384264fb317..758caa96348b8 100644 --- a/google/cloud/dataplex/v1/internal/data_taxonomy_metadata_decorator.cc +++ b/google/cloud/dataplex/v1/internal/data_taxonomy_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dataplex/v1/data_taxonomy.proto #include "google/cloud/dataplex/v1/internal/data_taxonomy_metadata_decorator.h" +#include "google/cloud/dataplex/v1/data_taxonomy.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -427,3 +431,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/data_taxonomy_metadata_decorator.h b/google/cloud/dataplex/v1/internal/data_taxonomy_metadata_decorator.h index d224f2898bd0f..64213cf3d64b0 100644 --- a/google/cloud/dataplex/v1/internal/data_taxonomy_metadata_decorator.h +++ b/google/cloud/dataplex/v1/internal/data_taxonomy_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dataplex/v1/internal/data_taxonomy_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -248,4 +251,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_DATA_TAXONOMY_METADATA_DECORATOR_H diff --git a/google/cloud/dataplex/v1/internal/data_taxonomy_option_defaults.cc b/google/cloud/dataplex/v1/internal/data_taxonomy_option_defaults.cc index c4bc8871fa31b..313e014c42e91 100644 --- a/google/cloud/dataplex/v1/internal/data_taxonomy_option_defaults.cc +++ b/google/cloud/dataplex/v1/internal/data_taxonomy_option_defaults.cc @@ -42,7 +42,7 @@ Options DataTaxonomyServiceDefaultOptions(Options options) { if (!options.has()) { options.set( dataplex_v1::DataTaxonomyServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dataplex/v1/internal/data_taxonomy_stub.cc b/google/cloud/dataplex/v1/internal/data_taxonomy_stub.cc index e2ed351342439..27cdbabc29634 100644 --- a/google/cloud/dataplex/v1/internal/data_taxonomy_stub.cc +++ b/google/cloud/dataplex/v1/internal/data_taxonomy_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/dataplex/v1/data_taxonomy.proto #include "google/cloud/dataplex/v1/internal/data_taxonomy_stub.h" +#include "google/cloud/dataplex/v1/data_taxonomy.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -549,3 +552,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/data_taxonomy_stub.h b/google/cloud/dataplex/v1/internal/data_taxonomy_stub.h index ed8199fcf4994..1732dd4c45632 100644 --- a/google/cloud/dataplex/v1/internal/data_taxonomy_stub.h +++ b/google/cloud/dataplex/v1/internal/data_taxonomy_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_DATA_TAXONOMY_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_DATA_TAXONOMY_STUB_H +#include "google/cloud/dataplex/v1/data_taxonomy.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -466,4 +469,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_DATA_TAXONOMY_STUB_H diff --git a/google/cloud/dataplex/v1/internal/data_taxonomy_stub_factory.cc b/google/cloud/dataplex/v1/internal/data_taxonomy_stub_factory.cc index 8b022a9791757..7088c562f635d 100644 --- a/google/cloud/dataplex/v1/internal/data_taxonomy_stub_factory.cc +++ b/google/cloud/dataplex/v1/internal/data_taxonomy_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/dataplex/v1/data_taxonomy.proto #include "google/cloud/dataplex/v1/internal/data_taxonomy_stub_factory.h" +#include "google/cloud/dataplex/v1/data_taxonomy.grpc.pb.h" #include "google/cloud/dataplex/v1/internal/data_taxonomy_auth_decorator.h" #include "google/cloud/dataplex/v1/internal/data_taxonomy_logging_decorator.h" #include "google/cloud/dataplex/v1/internal/data_taxonomy_metadata_decorator.h" #include "google/cloud/dataplex/v1/internal/data_taxonomy_stub.h" #include "google/cloud/dataplex/v1/internal/data_taxonomy_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -78,3 +81,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/data_taxonomy_stub_factory.h b/google/cloud/dataplex/v1/internal/data_taxonomy_stub_factory.h index cd5413db502e7..ab126ffa9372e 100644 --- a/google/cloud/dataplex/v1/internal/data_taxonomy_stub_factory.h +++ b/google/cloud/dataplex/v1/internal/data_taxonomy_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_DATA_TAXONOMY_STUB_FACTORY_H diff --git a/google/cloud/dataplex/v1/internal/data_taxonomy_tracing_connection.cc b/google/cloud/dataplex/v1/internal/data_taxonomy_tracing_connection.cc index 0006a14ec6c35..f74b1f29fcbb6 100644 --- a/google/cloud/dataplex/v1/internal/data_taxonomy_tracing_connection.cc +++ b/google/cloud/dataplex/v1/internal/data_taxonomy_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dataplex_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DataTaxonomyServiceTracingConnection::DataTaxonomyServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -465,17 +463,13 @@ Status DataTaxonomyServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDataTaxonomyServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dataplex/v1/internal/data_taxonomy_tracing_connection.h b/google/cloud/dataplex/v1/internal/data_taxonomy_tracing_connection.h index a7c456744ec4b..08a1d0b33a376 100644 --- a/google/cloud/dataplex/v1/internal/data_taxonomy_tracing_connection.h +++ b/google/cloud/dataplex/v1/internal/data_taxonomy_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dataplex_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DataTaxonomyServiceTracingConnection : public dataplex_v1::DataTaxonomyServiceConnection { public: @@ -215,8 +213,6 @@ class DataTaxonomyServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dataplex/v1/internal/data_taxonomy_tracing_stub.cc b/google/cloud/dataplex/v1/internal/data_taxonomy_tracing_stub.cc index 689db83e3d457..77ad86ef6b4e0 100644 --- a/google/cloud/dataplex/v1/internal/data_taxonomy_tracing_stub.cc +++ b/google/cloud/dataplex/v1/internal/data_taxonomy_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DataTaxonomyServiceTracingStub::DataTaxonomyServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -500,18 +501,14 @@ future DataTaxonomyServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDataTaxonomyServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/data_taxonomy_tracing_stub.h b/google/cloud/dataplex/v1/internal/data_taxonomy_tracing_stub.h index ff196826e1557..b28ce70de7882 100644 --- a/google/cloud/dataplex/v1/internal/data_taxonomy_tracing_stub.h +++ b/google/cloud/dataplex/v1/internal/data_taxonomy_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DataTaxonomyServiceTracingStub : public DataTaxonomyServiceStub { public: ~DataTaxonomyServiceTracingStub() override = default; @@ -238,8 +239,6 @@ class DataTaxonomyServiceTracingStub : public DataTaxonomyServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -254,4 +253,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_DATA_TAXONOMY_TRACING_STUB_H diff --git a/google/cloud/dataplex/v1/internal/dataplex_auth_decorator.cc b/google/cloud/dataplex/v1/internal/dataplex_auth_decorator.cc index a92508ba657d6..a6f7adffeff9b 100644 --- a/google/cloud/dataplex/v1/internal/dataplex_auth_decorator.cc +++ b/google/cloud/dataplex/v1/internal/dataplex_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dataplex/v1/service.proto #include "google/cloud/dataplex/v1/internal/dataplex_auth_decorator.h" -#include +#include "google/cloud/dataplex/v1/service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -722,3 +725,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/dataplex_auth_decorator.h b/google/cloud/dataplex/v1/internal/dataplex_auth_decorator.h index 806044ec00d1e..3acaf9c024d28 100644 --- a/google/cloud/dataplex/v1/internal/dataplex_auth_decorator.h +++ b/google/cloud/dataplex/v1/internal/dataplex_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dataplex/v1/internal/dataplex_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -330,4 +333,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_DATAPLEX_AUTH_DECORATOR_H diff --git a/google/cloud/dataplex/v1/internal/dataplex_connection_impl.h b/google/cloud/dataplex/v1/internal/dataplex_connection_impl.h index 0103c766fc611..675c010be6415 100644 --- a/google/cloud/dataplex/v1/internal/dataplex_connection_impl.h +++ b/google/cloud/dataplex/v1/internal/dataplex_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dataplex/v1/internal/dataplex_logging_decorator.cc b/google/cloud/dataplex/v1/internal/dataplex_logging_decorator.cc index deee104d94539..1a477124bcf9a 100644 --- a/google/cloud/dataplex/v1/internal/dataplex_logging_decorator.cc +++ b/google/cloud/dataplex/v1/internal/dataplex_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dataplex/v1/service.proto #include "google/cloud/dataplex/v1/internal/dataplex_logging_decorator.h" +#include "google/cloud/dataplex/v1/service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -835,3 +838,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/dataplex_logging_decorator.h b/google/cloud/dataplex/v1/internal/dataplex_logging_decorator.h index 508c3f78e371b..dc4850ec69668 100644 --- a/google/cloud/dataplex/v1/internal/dataplex_logging_decorator.h +++ b/google/cloud/dataplex/v1/internal/dataplex_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dataplex/v1/internal/dataplex_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -330,4 +333,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_DATAPLEX_LOGGING_DECORATOR_H diff --git a/google/cloud/dataplex/v1/internal/dataplex_metadata_decorator.cc b/google/cloud/dataplex/v1/internal/dataplex_metadata_decorator.cc index 2745afd776409..93757caecf4b2 100644 --- a/google/cloud/dataplex/v1/internal/dataplex_metadata_decorator.cc +++ b/google/cloud/dataplex/v1/internal/dataplex_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dataplex/v1/service.proto #include "google/cloud/dataplex/v1/internal/dataplex_metadata_decorator.h" +#include "google/cloud/dataplex/v1/service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -632,3 +636,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/dataplex_metadata_decorator.h b/google/cloud/dataplex/v1/internal/dataplex_metadata_decorator.h index 1aed7959892a7..2217fc01527c6 100644 --- a/google/cloud/dataplex/v1/internal/dataplex_metadata_decorator.h +++ b/google/cloud/dataplex/v1/internal/dataplex_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dataplex/v1/internal/dataplex_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -336,4 +339,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_DATAPLEX_METADATA_DECORATOR_H diff --git a/google/cloud/dataplex/v1/internal/dataplex_option_defaults.cc b/google/cloud/dataplex/v1/internal/dataplex_option_defaults.cc index fb30290141e84..ad9158e44cbfe 100644 --- a/google/cloud/dataplex/v1/internal/dataplex_option_defaults.cc +++ b/google/cloud/dataplex/v1/internal/dataplex_option_defaults.cc @@ -41,7 +41,7 @@ Options DataplexServiceDefaultOptions(Options options) { if (!options.has()) { options.set( dataplex_v1::DataplexServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dataplex/v1/internal/dataplex_stub.cc b/google/cloud/dataplex/v1/internal/dataplex_stub.cc index 6bcc28b96ff6d..f2a33bbc55925 100644 --- a/google/cloud/dataplex/v1/internal/dataplex_stub.cc +++ b/google/cloud/dataplex/v1/internal/dataplex_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/dataplex/v1/service.proto #include "google/cloud/dataplex/v1/internal/dataplex_stub.h" +#include "google/cloud/dataplex/v1/service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -834,3 +837,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/dataplex_stub.h b/google/cloud/dataplex/v1/internal/dataplex_stub.h index 8f93b59e4d487..a2802f1c858b9 100644 --- a/google/cloud/dataplex/v1/internal/dataplex_stub.h +++ b/google/cloud/dataplex/v1/internal/dataplex_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_DATAPLEX_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_DATAPLEX_STUB_H +#include "google/cloud/dataplex/v1/service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -633,4 +636,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_DATAPLEX_STUB_H diff --git a/google/cloud/dataplex/v1/internal/dataplex_stub_factory.cc b/google/cloud/dataplex/v1/internal/dataplex_stub_factory.cc index c77cb9d46279c..f4e7dad9e2374 100644 --- a/google/cloud/dataplex/v1/internal/dataplex_stub_factory.cc +++ b/google/cloud/dataplex/v1/internal/dataplex_stub_factory.cc @@ -22,19 +22,22 @@ #include "google/cloud/dataplex/v1/internal/dataplex_metadata_decorator.h" #include "google/cloud/dataplex/v1/internal/dataplex_stub.h" #include "google/cloud/dataplex/v1/internal/dataplex_tracing_stub.h" +#include "google/cloud/dataplex/v1/service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -78,3 +81,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/dataplex_stub_factory.h b/google/cloud/dataplex/v1/internal/dataplex_stub_factory.h index 7394633f54bbe..4e552b928404a 100644 --- a/google/cloud/dataplex/v1/internal/dataplex_stub_factory.h +++ b/google/cloud/dataplex/v1/internal/dataplex_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_DATAPLEX_STUB_FACTORY_H diff --git a/google/cloud/dataplex/v1/internal/dataplex_tracing_connection.cc b/google/cloud/dataplex/v1/internal/dataplex_tracing_connection.cc index 32f5b04babdee..ec6045b2380bc 100644 --- a/google/cloud/dataplex/v1/internal/dataplex_tracing_connection.cc +++ b/google/cloud/dataplex/v1/internal/dataplex_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dataplex_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DataplexServiceTracingConnection::DataplexServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -714,16 +712,12 @@ Status DataplexServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDataplexServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dataplex/v1/internal/dataplex_tracing_connection.h b/google/cloud/dataplex/v1/internal/dataplex_tracing_connection.h index abe90dd27735b..72b25980b9468 100644 --- a/google/cloud/dataplex/v1/internal/dataplex_tracing_connection.h +++ b/google/cloud/dataplex/v1/internal/dataplex_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dataplex_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DataplexServiceTracingConnection : public dataplex_v1::DataplexServiceConnection { public: @@ -282,8 +280,6 @@ class DataplexServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dataplex/v1/internal/dataplex_tracing_stub.cc b/google/cloud/dataplex/v1/internal/dataplex_tracing_stub.cc index 6492eb83c7fc0..730d01172bf23 100644 --- a/google/cloud/dataplex/v1/internal/dataplex_tracing_stub.cc +++ b/google/cloud/dataplex/v1/internal/dataplex_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DataplexServiceTracingStub::DataplexServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -759,18 +760,14 @@ future DataplexServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDataplexServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/dataplex_tracing_stub.h b/google/cloud/dataplex/v1/internal/dataplex_tracing_stub.h index c12e67cca3a91..4dd95d5458185 100644 --- a/google/cloud/dataplex/v1/internal/dataplex_tracing_stub.h +++ b/google/cloud/dataplex/v1/internal/dataplex_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DataplexServiceTracingStub : public DataplexServiceStub { public: ~DataplexServiceTracingStub() override = default; @@ -326,8 +327,6 @@ class DataplexServiceTracingStub : public DataplexServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -342,4 +341,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_DATAPLEX_TRACING_STUB_H diff --git a/google/cloud/dataplex/v1/internal/metadata_auth_decorator.cc b/google/cloud/dataplex/v1/internal/metadata_auth_decorator.cc index 7e0a06b072dae..b20b0e0be032e 100644 --- a/google/cloud/dataplex/v1/internal/metadata_auth_decorator.cc +++ b/google/cloud/dataplex/v1/internal/metadata_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dataplex/v1/metadata.proto #include "google/cloud/dataplex/v1/internal/metadata_auth_decorator.h" -#include +#include "google/cloud/dataplex/v1/metadata.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -186,3 +189,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/metadata_auth_decorator.h b/google/cloud/dataplex/v1/internal/metadata_auth_decorator.h index c2cf972495f6c..1d54e82c20266 100644 --- a/google/cloud/dataplex/v1/internal/metadata_auth_decorator.h +++ b/google/cloud/dataplex/v1/internal/metadata_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -123,4 +126,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_METADATA_AUTH_DECORATOR_H diff --git a/google/cloud/dataplex/v1/internal/metadata_logging_decorator.cc b/google/cloud/dataplex/v1/internal/metadata_logging_decorator.cc index 15858bd0d8234..d9608256ed3e0 100644 --- a/google/cloud/dataplex/v1/internal/metadata_logging_decorator.cc +++ b/google/cloud/dataplex/v1/internal/metadata_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dataplex/v1/metadata.proto #include "google/cloud/dataplex/v1/internal/metadata_logging_decorator.h" +#include "google/cloud/dataplex/v1/metadata.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -249,3 +252,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/metadata_logging_decorator.h b/google/cloud/dataplex/v1/internal/metadata_logging_decorator.h index 786be757ab6bf..7153ebea37285 100644 --- a/google/cloud/dataplex/v1/internal/metadata_logging_decorator.h +++ b/google/cloud/dataplex/v1/internal/metadata_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -123,4 +126,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_METADATA_LOGGING_DECORATOR_H diff --git a/google/cloud/dataplex/v1/internal/metadata_metadata_decorator.cc b/google/cloud/dataplex/v1/internal/metadata_metadata_decorator.cc index 90b610f69f31b..48c8c0a2791ae 100644 --- a/google/cloud/dataplex/v1/internal/metadata_metadata_decorator.cc +++ b/google/cloud/dataplex/v1/internal/metadata_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dataplex/v1/metadata.proto #include "google/cloud/dataplex/v1/internal/metadata_metadata_decorator.h" +#include "google/cloud/dataplex/v1/metadata.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -220,3 +224,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/metadata_metadata_decorator.h b/google/cloud/dataplex/v1/internal/metadata_metadata_decorator.h index 24503f968c317..cf51fab00d52b 100644 --- a/google/cloud/dataplex/v1/internal/metadata_metadata_decorator.h +++ b/google/cloud/dataplex/v1/internal/metadata_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -129,4 +132,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_METADATA_METADATA_DECORATOR_H diff --git a/google/cloud/dataplex/v1/internal/metadata_option_defaults.cc b/google/cloud/dataplex/v1/internal/metadata_option_defaults.cc index e56fb16c079a6..f76bd4593d22e 100644 --- a/google/cloud/dataplex/v1/internal/metadata_option_defaults.cc +++ b/google/cloud/dataplex/v1/internal/metadata_option_defaults.cc @@ -41,7 +41,7 @@ Options MetadataServiceDefaultOptions(Options options) { if (!options.has()) { options.set( dataplex_v1::MetadataServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dataplex/v1/internal/metadata_stub.cc b/google/cloud/dataplex/v1/internal/metadata_stub.cc index 42391f6a483e1..a4c33b05b8382 100644 --- a/google/cloud/dataplex/v1/internal/metadata_stub.cc +++ b/google/cloud/dataplex/v1/internal/metadata_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/dataplex/v1/metadata.proto #include "google/cloud/dataplex/v1/internal/metadata_stub.h" +#include "google/cloud/dataplex/v1/metadata.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -245,3 +248,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/metadata_stub.h b/google/cloud/dataplex/v1/internal/metadata_stub.h index 987c7a1d06834..313182a5f3209 100644 --- a/google/cloud/dataplex/v1/internal/metadata_stub.h +++ b/google/cloud/dataplex/v1/internal/metadata_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_METADATA_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_METADATA_STUB_H +#include "google/cloud/dataplex/v1/metadata.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -221,4 +224,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_METADATA_STUB_H diff --git a/google/cloud/dataplex/v1/internal/metadata_stub_factory.cc b/google/cloud/dataplex/v1/internal/metadata_stub_factory.cc index a9d33ef63353e..f42de38093e93 100644 --- a/google/cloud/dataplex/v1/internal/metadata_stub_factory.cc +++ b/google/cloud/dataplex/v1/internal/metadata_stub_factory.cc @@ -22,19 +22,22 @@ #include "google/cloud/dataplex/v1/internal/metadata_metadata_decorator.h" #include "google/cloud/dataplex/v1/internal/metadata_stub.h" #include "google/cloud/dataplex/v1/internal/metadata_tracing_stub.h" +#include "google/cloud/dataplex/v1/metadata.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -79,3 +82,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/metadata_stub_factory.h b/google/cloud/dataplex/v1/internal/metadata_stub_factory.h index 68646c0668791..8823b4afce604 100644 --- a/google/cloud/dataplex/v1/internal/metadata_stub_factory.h +++ b/google/cloud/dataplex/v1/internal/metadata_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_METADATA_STUB_FACTORY_H diff --git a/google/cloud/dataplex/v1/internal/metadata_tracing_connection.cc b/google/cloud/dataplex/v1/internal/metadata_tracing_connection.cc index 2ed4ace9cd05a..b77e8863dd984 100644 --- a/google/cloud/dataplex/v1/internal/metadata_tracing_connection.cc +++ b/google/cloud/dataplex/v1/internal/metadata_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dataplex_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - MetadataServiceTracingConnection::MetadataServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -199,16 +197,12 @@ Status MetadataServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeMetadataServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dataplex/v1/internal/metadata_tracing_connection.h b/google/cloud/dataplex/v1/internal/metadata_tracing_connection.h index b703eec1cfa2a..e4c1ee933fc7f 100644 --- a/google/cloud/dataplex/v1/internal/metadata_tracing_connection.h +++ b/google/cloud/dataplex/v1/internal/metadata_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dataplex_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class MetadataServiceTracingConnection : public dataplex_v1::MetadataServiceConnection { public: @@ -100,8 +98,6 @@ class MetadataServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dataplex/v1/internal/metadata_tracing_stub.cc b/google/cloud/dataplex/v1/internal/metadata_tracing_stub.cc index bff040df06516..3aafc92119f85 100644 --- a/google/cloud/dataplex/v1/internal/metadata_tracing_stub.cc +++ b/google/cloud/dataplex/v1/internal/metadata_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - MetadataServiceTracingStub::MetadataServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -242,18 +243,14 @@ Status MetadataServiceTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeMetadataServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataplex_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataplex/v1/internal/metadata_tracing_stub.h b/google/cloud/dataplex/v1/internal/metadata_tracing_stub.h index 43bd2d4b51804..8e5f9df34302d 100644 --- a/google/cloud/dataplex/v1/internal/metadata_tracing_stub.h +++ b/google/cloud/dataplex/v1/internal/metadata_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataplex_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class MetadataServiceTracingStub : public MetadataServiceStub { public: ~MetadataServiceTracingStub() override = default; @@ -120,8 +121,6 @@ class MetadataServiceTracingStub : public MetadataServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -136,4 +135,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_INTERNAL_METADATA_TRACING_STUB_H diff --git a/google/cloud/dataplex/v1/metadata_connection.h b/google/cloud/dataplex/v1/metadata_connection.h index 4bc74ba4b82aa..2524e1d5dcff9 100644 --- a/google/cloud/dataplex/v1/metadata_connection.h +++ b/google/cloud/dataplex/v1/metadata_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_METADATA_CONNECTION_H #include "google/cloud/dataplex/v1/internal/metadata_retry_traits.h" +#include "google/cloud/dataplex/v1/metadata.pb.h" #include "google/cloud/dataplex/v1/metadata_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/dataplex/v1/metadata_connection_idempotency_policy.h b/google/cloud/dataplex/v1/metadata_connection_idempotency_policy.h index 981d20cc77cbf..9d6423f496939 100644 --- a/google/cloud/dataplex/v1/metadata_connection_idempotency_policy.h +++ b/google/cloud/dataplex/v1/metadata_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_METADATA_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPLEX_V1_METADATA_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dataplex/v1/metadata.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dataproc/BUILD.bazel b/google/cloud/dataproc/BUILD.bazel index 995a3c6c8aa79..d0ed32571c296 100644 --- a/google/cloud/dataproc/BUILD.bazel +++ b/google/cloud/dataproc/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/dataproc/v1:dataproc_cc_grpc", + "@googleapis//google/cloud/dataproc/v1:dataproc_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/dataproc/CMakeLists.txt b/google/cloud/dataproc/CMakeLists.txt index b49c7ddf0216f..b19f3a6af2cc0 100644 --- a/google/cloud/dataproc/CMakeLists.txt +++ b/google/cloud/dataproc/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(dataproc "Cloud Dataproc API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(dataproc_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/dataproc/autoscaling_policy_client.h b/google/cloud/dataproc/autoscaling_policy_client.h deleted file mode 100644 index f5e12a6a7390e..0000000000000 --- a/google/cloud/dataproc/autoscaling_policy_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataproc/v1/autoscaling_policies.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_AUTOSCALING_POLICY_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_AUTOSCALING_POLICY_CLIENT_H - -#include "google/cloud/dataproc/autoscaling_policy_connection.h" -#include "google/cloud/dataproc/v1/autoscaling_policy_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in dataproc_v1 instead of the aliases defined in -/// this namespace. -namespace dataproc { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dataproc_v1::AutoscalingPolicyServiceClient directly. -using ::google::cloud::dataproc_v1::AutoscalingPolicyServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataproc -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_AUTOSCALING_POLICY_CLIENT_H diff --git a/google/cloud/dataproc/autoscaling_policy_connection.h b/google/cloud/dataproc/autoscaling_policy_connection.h deleted file mode 100644 index 44132df27d903..0000000000000 --- a/google/cloud/dataproc/autoscaling_policy_connection.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataproc/v1/autoscaling_policies.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_AUTOSCALING_POLICY_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_AUTOSCALING_POLICY_CONNECTION_H - -#include "google/cloud/dataproc/autoscaling_policy_connection_idempotency_policy.h" -#include "google/cloud/dataproc/v1/autoscaling_policy_connection.h" - -namespace google { -namespace cloud { -namespace dataproc { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dataproc_v1::MakeAutoscalingPolicyServiceConnection -/// directly. -using ::google::cloud::dataproc_v1::MakeAutoscalingPolicyServiceConnection; - -/// @deprecated Use dataproc_v1::AutoscalingPolicyServiceConnection directly. -using ::google::cloud::dataproc_v1::AutoscalingPolicyServiceConnection; - -/// @deprecated Use -/// dataproc_v1::AutoscalingPolicyServiceLimitedErrorCountRetryPolicy directly. -using ::google::cloud::dataproc_v1:: - AutoscalingPolicyServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use dataproc_v1::AutoscalingPolicyServiceLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::dataproc_v1:: - AutoscalingPolicyServiceLimitedTimeRetryPolicy; - -/// @deprecated Use dataproc_v1::AutoscalingPolicyServiceRetryPolicy directly. -using ::google::cloud::dataproc_v1::AutoscalingPolicyServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataproc -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_AUTOSCALING_POLICY_CONNECTION_H diff --git a/google/cloud/dataproc/autoscaling_policy_connection_idempotency_policy.h b/google/cloud/dataproc/autoscaling_policy_connection_idempotency_policy.h deleted file mode 100644 index a2bad9f973914..0000000000000 --- a/google/cloud/dataproc/autoscaling_policy_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataproc/v1/autoscaling_policies.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_AUTOSCALING_POLICY_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_AUTOSCALING_POLICY_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/dataproc/v1/autoscaling_policy_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace dataproc { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// dataproc_v1::MakeDefaultAutoscalingPolicyServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::dataproc_v1:: - MakeDefaultAutoscalingPolicyServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// dataproc_v1::AutoscalingPolicyServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::dataproc_v1:: - AutoscalingPolicyServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataproc -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_AUTOSCALING_POLICY_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/dataproc/autoscaling_policy_options.h b/google/cloud/dataproc/autoscaling_policy_options.h deleted file mode 100644 index 340bceeab9a9b..0000000000000 --- a/google/cloud/dataproc/autoscaling_policy_options.h +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataproc/v1/autoscaling_policies.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_AUTOSCALING_POLICY_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_AUTOSCALING_POLICY_OPTIONS_H - -#include "google/cloud/dataproc/autoscaling_policy_connection.h" -#include "google/cloud/dataproc/autoscaling_policy_connection_idempotency_policy.h" -#include "google/cloud/dataproc/v1/autoscaling_policy_options.h" - -namespace google { -namespace cloud { -namespace dataproc { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dataproc_v1::AutoscalingPolicyServiceBackoffPolicyOption -/// directly. -using ::google::cloud::dataproc_v1::AutoscalingPolicyServiceBackoffPolicyOption; - -/// @deprecated Use -/// dataproc_v1::AutoscalingPolicyServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::dataproc_v1:: - AutoscalingPolicyServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use dataproc_v1::AutoscalingPolicyServicePolicyOptionList -/// directly. -using ::google::cloud::dataproc_v1::AutoscalingPolicyServicePolicyOptionList; - -/// @deprecated Use dataproc_v1::AutoscalingPolicyServiceRetryPolicyOption -/// directly. -using ::google::cloud::dataproc_v1::AutoscalingPolicyServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataproc -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_AUTOSCALING_POLICY_OPTIONS_H diff --git a/google/cloud/dataproc/batch_controller_client.h b/google/cloud/dataproc/batch_controller_client.h deleted file mode 100644 index e87117e47ea03..0000000000000 --- a/google/cloud/dataproc/batch_controller_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataproc/v1/batches.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_BATCH_CONTROLLER_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_BATCH_CONTROLLER_CLIENT_H - -#include "google/cloud/dataproc/batch_controller_connection.h" -#include "google/cloud/dataproc/v1/batch_controller_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in dataproc_v1 instead of the aliases defined in -/// this namespace. -namespace dataproc { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dataproc_v1::BatchControllerClient directly. -using ::google::cloud::dataproc_v1::BatchControllerClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataproc -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_BATCH_CONTROLLER_CLIENT_H diff --git a/google/cloud/dataproc/batch_controller_connection.h b/google/cloud/dataproc/batch_controller_connection.h deleted file mode 100644 index c7e1ac545cdbb..0000000000000 --- a/google/cloud/dataproc/batch_controller_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataproc/v1/batches.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_BATCH_CONTROLLER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_BATCH_CONTROLLER_CONNECTION_H - -#include "google/cloud/dataproc/batch_controller_connection_idempotency_policy.h" -#include "google/cloud/dataproc/v1/batch_controller_connection.h" - -namespace google { -namespace cloud { -namespace dataproc { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dataproc_v1::MakeBatchControllerConnection directly. -using ::google::cloud::dataproc_v1::MakeBatchControllerConnection; - -/// @deprecated Use dataproc_v1::BatchControllerConnection directly. -using ::google::cloud::dataproc_v1::BatchControllerConnection; - -/// @deprecated Use dataproc_v1::BatchControllerLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::dataproc_v1::BatchControllerLimitedErrorCountRetryPolicy; - -/// @deprecated Use dataproc_v1::BatchControllerLimitedTimeRetryPolicy directly. -using ::google::cloud::dataproc_v1::BatchControllerLimitedTimeRetryPolicy; - -/// @deprecated Use dataproc_v1::BatchControllerRetryPolicy directly. -using ::google::cloud::dataproc_v1::BatchControllerRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataproc -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_BATCH_CONTROLLER_CONNECTION_H diff --git a/google/cloud/dataproc/batch_controller_connection_idempotency_policy.h b/google/cloud/dataproc/batch_controller_connection_idempotency_policy.h deleted file mode 100644 index 02c222cb71b5b..0000000000000 --- a/google/cloud/dataproc/batch_controller_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataproc/v1/batches.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_BATCH_CONTROLLER_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_BATCH_CONTROLLER_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/dataproc/v1/batch_controller_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace dataproc { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// dataproc_v1::MakeDefaultBatchControllerConnectionIdempotencyPolicy directly. -using ::google::cloud::dataproc_v1:: - MakeDefaultBatchControllerConnectionIdempotencyPolicy; - -/// @deprecated Use dataproc_v1::BatchControllerConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::dataproc_v1::BatchControllerConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataproc -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_BATCH_CONTROLLER_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/dataproc/batch_controller_options.h b/google/cloud/dataproc/batch_controller_options.h deleted file mode 100644 index 45903839728c4..0000000000000 --- a/google/cloud/dataproc/batch_controller_options.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataproc/v1/batches.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_BATCH_CONTROLLER_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_BATCH_CONTROLLER_OPTIONS_H - -#include "google/cloud/dataproc/batch_controller_connection.h" -#include "google/cloud/dataproc/batch_controller_connection_idempotency_policy.h" -#include "google/cloud/dataproc/v1/batch_controller_options.h" - -namespace google { -namespace cloud { -namespace dataproc { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dataproc_v1::BatchControllerPollingPolicyOption directly. -using ::google::cloud::dataproc_v1::BatchControllerPollingPolicyOption; - -/// @deprecated Use dataproc_v1::BatchControllerBackoffPolicyOption directly. -using ::google::cloud::dataproc_v1::BatchControllerBackoffPolicyOption; - -/// @deprecated Use -/// dataproc_v1::BatchControllerConnectionIdempotencyPolicyOption directly. -using ::google::cloud::dataproc_v1:: - BatchControllerConnectionIdempotencyPolicyOption; - -/// @deprecated Use dataproc_v1::BatchControllerPolicyOptionList directly. -using ::google::cloud::dataproc_v1::BatchControllerPolicyOptionList; - -/// @deprecated Use dataproc_v1::BatchControllerRetryPolicyOption directly. -using ::google::cloud::dataproc_v1::BatchControllerRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataproc -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_BATCH_CONTROLLER_OPTIONS_H diff --git a/google/cloud/dataproc/cluster_controller_client.h b/google/cloud/dataproc/cluster_controller_client.h deleted file mode 100644 index 83c38621c244e..0000000000000 --- a/google/cloud/dataproc/cluster_controller_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataproc/v1/clusters.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_CLUSTER_CONTROLLER_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_CLUSTER_CONTROLLER_CLIENT_H - -#include "google/cloud/dataproc/cluster_controller_connection.h" -#include "google/cloud/dataproc/v1/cluster_controller_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in dataproc_v1 instead of the aliases defined in -/// this namespace. -namespace dataproc { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dataproc_v1::ClusterControllerClient directly. -using ::google::cloud::dataproc_v1::ClusterControllerClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataproc -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_CLUSTER_CONTROLLER_CLIENT_H diff --git a/google/cloud/dataproc/cluster_controller_connection.h b/google/cloud/dataproc/cluster_controller_connection.h deleted file mode 100644 index d0e87428a0741..0000000000000 --- a/google/cloud/dataproc/cluster_controller_connection.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataproc/v1/clusters.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_CLUSTER_CONTROLLER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_CLUSTER_CONTROLLER_CONNECTION_H - -#include "google/cloud/dataproc/cluster_controller_connection_idempotency_policy.h" -#include "google/cloud/dataproc/v1/cluster_controller_connection.h" - -namespace google { -namespace cloud { -namespace dataproc { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dataproc_v1::MakeClusterControllerConnection directly. -using ::google::cloud::dataproc_v1::MakeClusterControllerConnection; - -/// @deprecated Use dataproc_v1::ClusterControllerConnection directly. -using ::google::cloud::dataproc_v1::ClusterControllerConnection; - -/// @deprecated Use dataproc_v1::ClusterControllerLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::dataproc_v1:: - ClusterControllerLimitedErrorCountRetryPolicy; - -/// @deprecated Use dataproc_v1::ClusterControllerLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::dataproc_v1::ClusterControllerLimitedTimeRetryPolicy; - -/// @deprecated Use dataproc_v1::ClusterControllerRetryPolicy directly. -using ::google::cloud::dataproc_v1::ClusterControllerRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataproc -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_CLUSTER_CONTROLLER_CONNECTION_H diff --git a/google/cloud/dataproc/cluster_controller_connection_idempotency_policy.h b/google/cloud/dataproc/cluster_controller_connection_idempotency_policy.h deleted file mode 100644 index bed79b2d48f8d..0000000000000 --- a/google/cloud/dataproc/cluster_controller_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataproc/v1/clusters.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_CLUSTER_CONTROLLER_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_CLUSTER_CONTROLLER_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/dataproc/v1/cluster_controller_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace dataproc { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// dataproc_v1::MakeDefaultClusterControllerConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::dataproc_v1:: - MakeDefaultClusterControllerConnectionIdempotencyPolicy; - -/// @deprecated Use dataproc_v1::ClusterControllerConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::dataproc_v1:: - ClusterControllerConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataproc -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_CLUSTER_CONTROLLER_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/dataproc/cluster_controller_options.h b/google/cloud/dataproc/cluster_controller_options.h deleted file mode 100644 index 8ae4dd0d332f3..0000000000000 --- a/google/cloud/dataproc/cluster_controller_options.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataproc/v1/clusters.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_CLUSTER_CONTROLLER_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_CLUSTER_CONTROLLER_OPTIONS_H - -#include "google/cloud/dataproc/cluster_controller_connection.h" -#include "google/cloud/dataproc/cluster_controller_connection_idempotency_policy.h" -#include "google/cloud/dataproc/v1/cluster_controller_options.h" - -namespace google { -namespace cloud { -namespace dataproc { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dataproc_v1::ClusterControllerPollingPolicyOption directly. -using ::google::cloud::dataproc_v1::ClusterControllerPollingPolicyOption; - -/// @deprecated Use dataproc_v1::ClusterControllerBackoffPolicyOption directly. -using ::google::cloud::dataproc_v1::ClusterControllerBackoffPolicyOption; - -/// @deprecated Use -/// dataproc_v1::ClusterControllerConnectionIdempotencyPolicyOption directly. -using ::google::cloud::dataproc_v1:: - ClusterControllerConnectionIdempotencyPolicyOption; - -/// @deprecated Use dataproc_v1::ClusterControllerPolicyOptionList directly. -using ::google::cloud::dataproc_v1::ClusterControllerPolicyOptionList; - -/// @deprecated Use dataproc_v1::ClusterControllerRetryPolicyOption directly. -using ::google::cloud::dataproc_v1::ClusterControllerRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataproc -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_CLUSTER_CONTROLLER_OPTIONS_H diff --git a/google/cloud/dataproc/job_controller_client.h b/google/cloud/dataproc/job_controller_client.h deleted file mode 100644 index 0a89036c04fe4..0000000000000 --- a/google/cloud/dataproc/job_controller_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataproc/v1/jobs.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_JOB_CONTROLLER_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_JOB_CONTROLLER_CLIENT_H - -#include "google/cloud/dataproc/job_controller_connection.h" -#include "google/cloud/dataproc/v1/job_controller_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in dataproc_v1 instead of the aliases defined in -/// this namespace. -namespace dataproc { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dataproc_v1::JobControllerClient directly. -using ::google::cloud::dataproc_v1::JobControllerClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataproc -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_JOB_CONTROLLER_CLIENT_H diff --git a/google/cloud/dataproc/job_controller_connection.h b/google/cloud/dataproc/job_controller_connection.h deleted file mode 100644 index a43952619b904..0000000000000 --- a/google/cloud/dataproc/job_controller_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataproc/v1/jobs.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_JOB_CONTROLLER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_JOB_CONTROLLER_CONNECTION_H - -#include "google/cloud/dataproc/job_controller_connection_idempotency_policy.h" -#include "google/cloud/dataproc/v1/job_controller_connection.h" - -namespace google { -namespace cloud { -namespace dataproc { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dataproc_v1::MakeJobControllerConnection directly. -using ::google::cloud::dataproc_v1::MakeJobControllerConnection; - -/// @deprecated Use dataproc_v1::JobControllerConnection directly. -using ::google::cloud::dataproc_v1::JobControllerConnection; - -/// @deprecated Use dataproc_v1::JobControllerLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::dataproc_v1::JobControllerLimitedErrorCountRetryPolicy; - -/// @deprecated Use dataproc_v1::JobControllerLimitedTimeRetryPolicy directly. -using ::google::cloud::dataproc_v1::JobControllerLimitedTimeRetryPolicy; - -/// @deprecated Use dataproc_v1::JobControllerRetryPolicy directly. -using ::google::cloud::dataproc_v1::JobControllerRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataproc -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_JOB_CONTROLLER_CONNECTION_H diff --git a/google/cloud/dataproc/job_controller_connection_idempotency_policy.h b/google/cloud/dataproc/job_controller_connection_idempotency_policy.h deleted file mode 100644 index 93c55dd89ba63..0000000000000 --- a/google/cloud/dataproc/job_controller_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataproc/v1/jobs.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_JOB_CONTROLLER_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_JOB_CONTROLLER_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/dataproc/v1/job_controller_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace dataproc { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// dataproc_v1::MakeDefaultJobControllerConnectionIdempotencyPolicy directly. -using ::google::cloud::dataproc_v1:: - MakeDefaultJobControllerConnectionIdempotencyPolicy; - -/// @deprecated Use dataproc_v1::JobControllerConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::dataproc_v1::JobControllerConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataproc -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_JOB_CONTROLLER_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/dataproc/job_controller_options.h b/google/cloud/dataproc/job_controller_options.h deleted file mode 100644 index cc39bc908a9d4..0000000000000 --- a/google/cloud/dataproc/job_controller_options.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataproc/v1/jobs.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_JOB_CONTROLLER_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_JOB_CONTROLLER_OPTIONS_H - -#include "google/cloud/dataproc/job_controller_connection.h" -#include "google/cloud/dataproc/job_controller_connection_idempotency_policy.h" -#include "google/cloud/dataproc/v1/job_controller_options.h" - -namespace google { -namespace cloud { -namespace dataproc { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dataproc_v1::JobControllerPollingPolicyOption directly. -using ::google::cloud::dataproc_v1::JobControllerPollingPolicyOption; - -/// @deprecated Use dataproc_v1::JobControllerBackoffPolicyOption directly. -using ::google::cloud::dataproc_v1::JobControllerBackoffPolicyOption; - -/// @deprecated Use dataproc_v1::JobControllerConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::dataproc_v1:: - JobControllerConnectionIdempotencyPolicyOption; - -/// @deprecated Use dataproc_v1::JobControllerPolicyOptionList directly. -using ::google::cloud::dataproc_v1::JobControllerPolicyOptionList; - -/// @deprecated Use dataproc_v1::JobControllerRetryPolicyOption directly. -using ::google::cloud::dataproc_v1::JobControllerRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataproc -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_JOB_CONTROLLER_OPTIONS_H diff --git a/google/cloud/dataproc/mocks/mock_autoscaling_policy_connection.h b/google/cloud/dataproc/mocks/mock_autoscaling_policy_connection.h deleted file mode 100644 index 606b48a9bbeb5..0000000000000 --- a/google/cloud/dataproc/mocks/mock_autoscaling_policy_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataproc/v1/autoscaling_policies.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_MOCKS_MOCK_AUTOSCALING_POLICY_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_MOCKS_MOCK_AUTOSCALING_POLICY_CONNECTION_H - -#include "google/cloud/dataproc/autoscaling_policy_connection.h" -#include "google/cloud/dataproc/v1/mocks/mock_autoscaling_policy_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in dataproc_v1_mocks instead of the aliases -/// defined in this namespace. -namespace dataproc_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dataproc_v1_mocks::MockAutoscalingPolicyServiceConnection -/// directly. -using ::google::cloud::dataproc_v1_mocks:: - MockAutoscalingPolicyServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataproc_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_MOCKS_MOCK_AUTOSCALING_POLICY_CONNECTION_H diff --git a/google/cloud/dataproc/mocks/mock_batch_controller_connection.h b/google/cloud/dataproc/mocks/mock_batch_controller_connection.h deleted file mode 100644 index 2d4cfb7149e4c..0000000000000 --- a/google/cloud/dataproc/mocks/mock_batch_controller_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataproc/v1/batches.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_MOCKS_MOCK_BATCH_CONTROLLER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_MOCKS_MOCK_BATCH_CONTROLLER_CONNECTION_H - -#include "google/cloud/dataproc/batch_controller_connection.h" -#include "google/cloud/dataproc/v1/mocks/mock_batch_controller_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in dataproc_v1_mocks instead of the aliases -/// defined in this namespace. -namespace dataproc_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dataproc_v1_mocks::MockBatchControllerConnection directly. -using ::google::cloud::dataproc_v1_mocks::MockBatchControllerConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataproc_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_MOCKS_MOCK_BATCH_CONTROLLER_CONNECTION_H diff --git a/google/cloud/dataproc/mocks/mock_cluster_controller_connection.h b/google/cloud/dataproc/mocks/mock_cluster_controller_connection.h deleted file mode 100644 index bdbb619cc9a81..0000000000000 --- a/google/cloud/dataproc/mocks/mock_cluster_controller_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataproc/v1/clusters.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_MOCKS_MOCK_CLUSTER_CONTROLLER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_MOCKS_MOCK_CLUSTER_CONTROLLER_CONNECTION_H - -#include "google/cloud/dataproc/cluster_controller_connection.h" -#include "google/cloud/dataproc/v1/mocks/mock_cluster_controller_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in dataproc_v1_mocks instead of the aliases -/// defined in this namespace. -namespace dataproc_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dataproc_v1_mocks::MockClusterControllerConnection directly. -using ::google::cloud::dataproc_v1_mocks::MockClusterControllerConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataproc_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_MOCKS_MOCK_CLUSTER_CONTROLLER_CONNECTION_H diff --git a/google/cloud/dataproc/mocks/mock_job_controller_connection.h b/google/cloud/dataproc/mocks/mock_job_controller_connection.h deleted file mode 100644 index 34dbf77570b5f..0000000000000 --- a/google/cloud/dataproc/mocks/mock_job_controller_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataproc/v1/jobs.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_MOCKS_MOCK_JOB_CONTROLLER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_MOCKS_MOCK_JOB_CONTROLLER_CONNECTION_H - -#include "google/cloud/dataproc/job_controller_connection.h" -#include "google/cloud/dataproc/v1/mocks/mock_job_controller_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in dataproc_v1_mocks instead of the aliases -/// defined in this namespace. -namespace dataproc_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dataproc_v1_mocks::MockJobControllerConnection directly. -using ::google::cloud::dataproc_v1_mocks::MockJobControllerConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataproc_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_MOCKS_MOCK_JOB_CONTROLLER_CONNECTION_H diff --git a/google/cloud/dataproc/mocks/mock_workflow_template_connection.h b/google/cloud/dataproc/mocks/mock_workflow_template_connection.h deleted file mode 100644 index 511c74567f417..0000000000000 --- a/google/cloud/dataproc/mocks/mock_workflow_template_connection.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataproc/v1/workflow_templates.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_MOCKS_MOCK_WORKFLOW_TEMPLATE_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_MOCKS_MOCK_WORKFLOW_TEMPLATE_CONNECTION_H - -#include "google/cloud/dataproc/v1/mocks/mock_workflow_template_connection.h" -#include "google/cloud/dataproc/workflow_template_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in dataproc_v1_mocks instead of the aliases -/// defined in this namespace. -namespace dataproc_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dataproc_v1_mocks::MockWorkflowTemplateServiceConnection -/// directly. -using ::google::cloud::dataproc_v1_mocks::MockWorkflowTemplateServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataproc_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_MOCKS_MOCK_WORKFLOW_TEMPLATE_CONNECTION_H diff --git a/google/cloud/dataproc/quickstart/.bazelrc b/google/cloud/dataproc/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/dataproc/quickstart/.bazelrc +++ b/google/cloud/dataproc/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/dataproc/quickstart/CMakeLists.txt b/google/cloud/dataproc/quickstart/CMakeLists.txt index 8e5f4ae5ee87e..264c92c2b4a5d 100644 --- a/google/cloud/dataproc/quickstart/CMakeLists.txt +++ b/google/cloud/dataproc/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Dataproc API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-dataproc-quickstart CXX) find_package(google_cloud_cpp_dataproc REQUIRED) diff --git a/google/cloud/dataproc/v1/autoscaling_policy_connection.h b/google/cloud/dataproc/v1/autoscaling_policy_connection.h index e424723450680..229f082092d46 100644 --- a/google/cloud/dataproc/v1/autoscaling_policy_connection.h +++ b/google/cloud/dataproc/v1/autoscaling_policy_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_AUTOSCALING_POLICY_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_AUTOSCALING_POLICY_CONNECTION_H +#include "google/cloud/dataproc/v1/autoscaling_policies.pb.h" #include "google/cloud/dataproc/v1/autoscaling_policy_connection_idempotency_policy.h" #include "google/cloud/dataproc/v1/internal/autoscaling_policy_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/dataproc/v1/autoscaling_policy_connection_idempotency_policy.h b/google/cloud/dataproc/v1/autoscaling_policy_connection_idempotency_policy.h index 16474827e5bc3..b1652a05bd96a 100644 --- a/google/cloud/dataproc/v1/autoscaling_policy_connection_idempotency_policy.h +++ b/google/cloud/dataproc/v1/autoscaling_policy_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_AUTOSCALING_POLICY_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_AUTOSCALING_POLICY_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dataproc/v1/autoscaling_policies.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dataproc/v1/batch_controller_client.h b/google/cloud/dataproc/v1/batch_controller_client.h index 8e81a3379d04f..3b7e5082d1334 100644 --- a/google/cloud/dataproc/v1/batch_controller_client.h +++ b/google/cloud/dataproc/v1/batch_controller_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/dataproc/v1/batch_controller_connection.h b/google/cloud/dataproc/v1/batch_controller_connection.h index 27880fb14d3e1..a484f14a1599f 100644 --- a/google/cloud/dataproc/v1/batch_controller_connection.h +++ b/google/cloud/dataproc/v1/batch_controller_connection.h @@ -20,7 +20,9 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_BATCH_CONTROLLER_CONNECTION_H #include "google/cloud/dataproc/v1/batch_controller_connection_idempotency_policy.h" +#include "google/cloud/dataproc/v1/batches.pb.h" #include "google/cloud/dataproc/v1/internal/batch_controller_retry_traits.h" +#include "google/cloud/dataproc/v1/operations.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,9 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/dataproc/v1/batch_controller_connection_idempotency_policy.h b/google/cloud/dataproc/v1/batch_controller_connection_idempotency_policy.h index 944402f868bf5..6ffb2b1f95a5f 100644 --- a/google/cloud/dataproc/v1/batch_controller_connection_idempotency_policy.h +++ b/google/cloud/dataproc/v1/batch_controller_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_BATCH_CONTROLLER_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_BATCH_CONTROLLER_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dataproc/v1/batches.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dataproc/v1/cluster_controller_client.h b/google/cloud/dataproc/v1/cluster_controller_client.h index 85e521a2116f5..20a6b2379fbe9 100644 --- a/google/cloud/dataproc/v1/cluster_controller_client.h +++ b/google/cloud/dataproc/v1/cluster_controller_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/dataproc/v1/cluster_controller_connection.h b/google/cloud/dataproc/v1/cluster_controller_connection.h index bd5bb4d20f1c8..ca0cd3bbebc8a 100644 --- a/google/cloud/dataproc/v1/cluster_controller_connection.h +++ b/google/cloud/dataproc/v1/cluster_controller_connection.h @@ -20,7 +20,9 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_CLUSTER_CONTROLLER_CONNECTION_H #include "google/cloud/dataproc/v1/cluster_controller_connection_idempotency_policy.h" +#include "google/cloud/dataproc/v1/clusters.pb.h" #include "google/cloud/dataproc/v1/internal/cluster_controller_retry_traits.h" +#include "google/cloud/dataproc/v1/operations.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,9 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/dataproc/v1/cluster_controller_connection_idempotency_policy.h b/google/cloud/dataproc/v1/cluster_controller_connection_idempotency_policy.h index c2f7b2bc1cb3d..33f683ba8e2a5 100644 --- a/google/cloud/dataproc/v1/cluster_controller_connection_idempotency_policy.h +++ b/google/cloud/dataproc/v1/cluster_controller_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_CLUSTER_CONTROLLER_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_CLUSTER_CONTROLLER_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dataproc/v1/clusters.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dataproc/v1/internal/autoscaling_policy_auth_decorator.cc b/google/cloud/dataproc/v1/internal/autoscaling_policy_auth_decorator.cc index 49b27322226d7..849bf3717c0ba 100644 --- a/google/cloud/dataproc/v1/internal/autoscaling_policy_auth_decorator.cc +++ b/google/cloud/dataproc/v1/internal/autoscaling_policy_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dataproc/v1/autoscaling_policies.proto #include "google/cloud/dataproc/v1/internal/autoscaling_policy_auth_decorator.h" -#include +#include "google/cloud/dataproc/v1/autoscaling_policies.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -142,3 +145,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/autoscaling_policy_auth_decorator.h b/google/cloud/dataproc/v1/internal/autoscaling_policy_auth_decorator.h index a070c5aa7659d..9fdb070e7cec2 100644 --- a/google/cloud/dataproc/v1/internal/autoscaling_policy_auth_decorator.h +++ b/google/cloud/dataproc/v1/internal/autoscaling_policy_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -104,4 +107,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_AUTOSCALING_POLICY_AUTH_DECORATOR_H diff --git a/google/cloud/dataproc/v1/internal/autoscaling_policy_logging_decorator.cc b/google/cloud/dataproc/v1/internal/autoscaling_policy_logging_decorator.cc index 0c2b8302455db..66e832470f6cb 100644 --- a/google/cloud/dataproc/v1/internal/autoscaling_policy_logging_decorator.cc +++ b/google/cloud/dataproc/v1/internal/autoscaling_policy_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dataproc/v1/autoscaling_policies.proto #include "google/cloud/dataproc/v1/internal/autoscaling_policy_logging_decorator.h" +#include "google/cloud/dataproc/v1/autoscaling_policies.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -187,3 +190,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/autoscaling_policy_logging_decorator.h b/google/cloud/dataproc/v1/internal/autoscaling_policy_logging_decorator.h index 25058834028dc..edcf0a3407eee 100644 --- a/google/cloud/dataproc/v1/internal/autoscaling_policy_logging_decorator.h +++ b/google/cloud/dataproc/v1/internal/autoscaling_policy_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -104,4 +107,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_AUTOSCALING_POLICY_LOGGING_DECORATOR_H diff --git a/google/cloud/dataproc/v1/internal/autoscaling_policy_metadata_decorator.cc b/google/cloud/dataproc/v1/internal/autoscaling_policy_metadata_decorator.cc index 62406e0ec4f0a..6356248ed8136 100644 --- a/google/cloud/dataproc/v1/internal/autoscaling_policy_metadata_decorator.cc +++ b/google/cloud/dataproc/v1/internal/autoscaling_policy_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dataproc/v1/autoscaling_policies.proto #include "google/cloud/dataproc/v1/internal/autoscaling_policy_metadata_decorator.h" +#include "google/cloud/dataproc/v1/autoscaling_policies.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -174,3 +178,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/autoscaling_policy_metadata_decorator.h b/google/cloud/dataproc/v1/internal/autoscaling_policy_metadata_decorator.h index b65e030bd3d7c..9ec75c4454250 100644 --- a/google/cloud/dataproc/v1/internal/autoscaling_policy_metadata_decorator.h +++ b/google/cloud/dataproc/v1/internal/autoscaling_policy_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -110,4 +113,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_AUTOSCALING_POLICY_METADATA_DECORATOR_H diff --git a/google/cloud/dataproc/v1/internal/autoscaling_policy_option_defaults.cc b/google/cloud/dataproc/v1/internal/autoscaling_policy_option_defaults.cc index bc38e7737b8b5..7a3527ff7eceb 100644 --- a/google/cloud/dataproc/v1/internal/autoscaling_policy_option_defaults.cc +++ b/google/cloud/dataproc/v1/internal/autoscaling_policy_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dataproc/v1/internal/autoscaling_policy_option_defaults.h" #include "google/cloud/dataproc/v1/autoscaling_policy_connection.h" #include "google/cloud/dataproc/v1/autoscaling_policy_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -46,7 +46,7 @@ Options AutoscalingPolicyServiceDefaultOptions(std::string const& location, if (!options.has()) { options.set( dataproc_v1::AutoscalingPolicyServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/dataproc/v1/internal/autoscaling_policy_stub.cc b/google/cloud/dataproc/v1/internal/autoscaling_policy_stub.cc index ed499879af17f..473368d5b612e 100644 --- a/google/cloud/dataproc/v1/internal/autoscaling_policy_stub.cc +++ b/google/cloud/dataproc/v1/internal/autoscaling_policy_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/dataproc/v1/autoscaling_policies.proto #include "google/cloud/dataproc/v1/internal/autoscaling_policy_stub.h" +#include "google/cloud/dataproc/v1/autoscaling_policies.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -184,3 +187,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/autoscaling_policy_stub.h b/google/cloud/dataproc/v1/internal/autoscaling_policy_stub.h index f962b8a63191c..7a403583f91c3 100644 --- a/google/cloud/dataproc/v1/internal/autoscaling_policy_stub.h +++ b/google/cloud/dataproc/v1/internal/autoscaling_policy_stub.h @@ -19,15 +19,18 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_AUTOSCALING_POLICY_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_AUTOSCALING_POLICY_STUB_H +#include "google/cloud/dataproc/v1/autoscaling_policies.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -180,4 +183,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_AUTOSCALING_POLICY_STUB_H diff --git a/google/cloud/dataproc/v1/internal/autoscaling_policy_stub_factory.cc b/google/cloud/dataproc/v1/internal/autoscaling_policy_stub_factory.cc index eda924a21d7dc..39bdb9c6d5944 100644 --- a/google/cloud/dataproc/v1/internal/autoscaling_policy_stub_factory.cc +++ b/google/cloud/dataproc/v1/internal/autoscaling_policy_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/dataproc/v1/autoscaling_policies.proto #include "google/cloud/dataproc/v1/internal/autoscaling_policy_stub_factory.h" +#include "google/cloud/dataproc/v1/autoscaling_policies.grpc.pb.h" #include "google/cloud/dataproc/v1/internal/autoscaling_policy_auth_decorator.h" #include "google/cloud/dataproc/v1/internal/autoscaling_policy_logging_decorator.h" #include "google/cloud/dataproc/v1/internal/autoscaling_policy_metadata_decorator.h" @@ -28,12 +29,14 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -77,3 +80,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/autoscaling_policy_stub_factory.h b/google/cloud/dataproc/v1/internal/autoscaling_policy_stub_factory.h index 293d76c3274ca..82c338eff2f6d 100644 --- a/google/cloud/dataproc/v1/internal/autoscaling_policy_stub_factory.h +++ b/google/cloud/dataproc/v1/internal/autoscaling_policy_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_AUTOSCALING_POLICY_STUB_FACTORY_H diff --git a/google/cloud/dataproc/v1/internal/autoscaling_policy_tracing_connection.cc b/google/cloud/dataproc/v1/internal/autoscaling_policy_tracing_connection.cc index a1d6409113248..98f1c2be3428b 100644 --- a/google/cloud/dataproc/v1/internal/autoscaling_policy_tracing_connection.cc +++ b/google/cloud/dataproc/v1/internal/autoscaling_policy_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dataproc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AutoscalingPolicyServiceTracingConnection:: AutoscalingPolicyServiceTracingConnection( std::shared_ptr child) @@ -151,17 +149,13 @@ Status AutoscalingPolicyServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAutoscalingPolicyServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dataproc/v1/internal/autoscaling_policy_tracing_connection.h b/google/cloud/dataproc/v1/internal/autoscaling_policy_tracing_connection.h index 03f05d5deb716..b0e08f876e8c3 100644 --- a/google/cloud/dataproc/v1/internal/autoscaling_policy_tracing_connection.h +++ b/google/cloud/dataproc/v1/internal/autoscaling_policy_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dataproc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AutoscalingPolicyServiceTracingConnection : public dataproc_v1::AutoscalingPolicyServiceConnection { public: @@ -88,8 +86,6 @@ class AutoscalingPolicyServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dataproc/v1/internal/autoscaling_policy_tracing_stub.cc b/google/cloud/dataproc/v1/internal/autoscaling_policy_tracing_stub.cc index 79467ae253115..af0ac4d261450 100644 --- a/google/cloud/dataproc/v1/internal/autoscaling_policy_tracing_stub.cc +++ b/google/cloud/dataproc/v1/internal/autoscaling_policy_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AutoscalingPolicyServiceTracingStub::AutoscalingPolicyServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -187,19 +188,15 @@ Status AutoscalingPolicyServiceTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAutoscalingPolicyServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/autoscaling_policy_tracing_stub.h b/google/cloud/dataproc/v1/internal/autoscaling_policy_tracing_stub.h index 43b4cfa209acf..d61c7062cf33d 100644 --- a/google/cloud/dataproc/v1/internal/autoscaling_policy_tracing_stub.h +++ b/google/cloud/dataproc/v1/internal/autoscaling_policy_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AutoscalingPolicyServiceTracingStub : public AutoscalingPolicyServiceStub { public: @@ -102,8 +103,6 @@ class AutoscalingPolicyServiceTracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -119,4 +118,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_AUTOSCALING_POLICY_TRACING_STUB_H diff --git a/google/cloud/dataproc/v1/internal/batch_controller_auth_decorator.cc b/google/cloud/dataproc/v1/internal/batch_controller_auth_decorator.cc index c1cc8ded95c75..f16b5a11d3fc9 100644 --- a/google/cloud/dataproc/v1/internal/batch_controller_auth_decorator.cc +++ b/google/cloud/dataproc/v1/internal/batch_controller_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dataproc/v1/batches.proto #include "google/cloud/dataproc/v1/internal/batch_controller_auth_decorator.h" -#include +#include "google/cloud/dataproc/v1/batches.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -182,3 +185,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/batch_controller_auth_decorator.h b/google/cloud/dataproc/v1/internal/batch_controller_auth_decorator.h index bc234de0ea28c..cabef1be4558f 100644 --- a/google/cloud/dataproc/v1/internal/batch_controller_auth_decorator.h +++ b/google/cloud/dataproc/v1/internal/batch_controller_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dataproc/v1/internal/batch_controller_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -111,4 +114,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_BATCH_CONTROLLER_AUTH_DECORATOR_H diff --git a/google/cloud/dataproc/v1/internal/batch_controller_connection_impl.h b/google/cloud/dataproc/v1/internal/batch_controller_connection_impl.h index 8073eebe8c34f..9a741948c21ae 100644 --- a/google/cloud/dataproc/v1/internal/batch_controller_connection_impl.h +++ b/google/cloud/dataproc/v1/internal/batch_controller_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dataproc/v1/internal/batch_controller_logging_decorator.cc b/google/cloud/dataproc/v1/internal/batch_controller_logging_decorator.cc index 9c269cdafc1b2..49ff0820186a2 100644 --- a/google/cloud/dataproc/v1/internal/batch_controller_logging_decorator.cc +++ b/google/cloud/dataproc/v1/internal/batch_controller_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dataproc/v1/batches.proto #include "google/cloud/dataproc/v1/internal/batch_controller_logging_decorator.h" +#include "google/cloud/dataproc/v1/batches.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -216,3 +219,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/batch_controller_logging_decorator.h b/google/cloud/dataproc/v1/internal/batch_controller_logging_decorator.h index c80938dee2e18..a79df426312af 100644 --- a/google/cloud/dataproc/v1/internal/batch_controller_logging_decorator.h +++ b/google/cloud/dataproc/v1/internal/batch_controller_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dataproc/v1/internal/batch_controller_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -111,4 +114,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_BATCH_CONTROLLER_LOGGING_DECORATOR_H diff --git a/google/cloud/dataproc/v1/internal/batch_controller_metadata_decorator.cc b/google/cloud/dataproc/v1/internal/batch_controller_metadata_decorator.cc index 56887d7672e68..08057e5d0f577 100644 --- a/google/cloud/dataproc/v1/internal/batch_controller_metadata_decorator.cc +++ b/google/cloud/dataproc/v1/internal/batch_controller_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dataproc/v1/batches.proto #include "google/cloud/dataproc/v1/internal/batch_controller_metadata_decorator.h" +#include "google/cloud/dataproc/v1/batches.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -190,3 +194,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/batch_controller_metadata_decorator.h b/google/cloud/dataproc/v1/internal/batch_controller_metadata_decorator.h index 09aa631709906..9272c1be08890 100644 --- a/google/cloud/dataproc/v1/internal/batch_controller_metadata_decorator.h +++ b/google/cloud/dataproc/v1/internal/batch_controller_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dataproc/v1/internal/batch_controller_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -117,4 +120,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_BATCH_CONTROLLER_METADATA_DECORATOR_H diff --git a/google/cloud/dataproc/v1/internal/batch_controller_option_defaults.cc b/google/cloud/dataproc/v1/internal/batch_controller_option_defaults.cc index a996da8659a22..87ccd3996a502 100644 --- a/google/cloud/dataproc/v1/internal/batch_controller_option_defaults.cc +++ b/google/cloud/dataproc/v1/internal/batch_controller_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dataproc/v1/internal/batch_controller_option_defaults.h" #include "google/cloud/dataproc/v1/batch_controller_connection.h" #include "google/cloud/dataproc/v1/batch_controller_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -45,7 +45,7 @@ Options BatchControllerDefaultOptions(std::string const& location, if (!options.has()) { options.set( dataproc_v1::BatchControllerLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dataproc/v1/internal/batch_controller_stub.cc b/google/cloud/dataproc/v1/internal/batch_controller_stub.cc index 41f138ae07125..baedab61970fe 100644 --- a/google/cloud/dataproc/v1/internal/batch_controller_stub.cc +++ b/google/cloud/dataproc/v1/internal/batch_controller_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/dataproc/v1/batches.proto #include "google/cloud/dataproc/v1/internal/batch_controller_stub.h" +#include "google/cloud/dataproc/v1/batches.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -220,3 +223,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/batch_controller_stub.h b/google/cloud/dataproc/v1/internal/batch_controller_stub.h index 671c8a668d575..079ba0a2e1db0 100644 --- a/google/cloud/dataproc/v1/internal/batch_controller_stub.h +++ b/google/cloud/dataproc/v1/internal/batch_controller_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_BATCH_CONTROLLER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_BATCH_CONTROLLER_STUB_H +#include "google/cloud/dataproc/v1/batches.grpc.pb.h" +#include "google/cloud/dataproc/v1/operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -193,4 +196,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_BATCH_CONTROLLER_STUB_H diff --git a/google/cloud/dataproc/v1/internal/batch_controller_stub_factory.cc b/google/cloud/dataproc/v1/internal/batch_controller_stub_factory.cc index ec5d6fc7cea66..a715b0452e71a 100644 --- a/google/cloud/dataproc/v1/internal/batch_controller_stub_factory.cc +++ b/google/cloud/dataproc/v1/internal/batch_controller_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/dataproc/v1/batches.proto #include "google/cloud/dataproc/v1/internal/batch_controller_stub_factory.h" +#include "google/cloud/dataproc/v1/batches.grpc.pb.h" #include "google/cloud/dataproc/v1/internal/batch_controller_auth_decorator.h" #include "google/cloud/dataproc/v1/internal/batch_controller_logging_decorator.h" #include "google/cloud/dataproc/v1/internal/batch_controller_metadata_decorator.h" @@ -28,12 +29,14 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -74,3 +77,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/batch_controller_stub_factory.h b/google/cloud/dataproc/v1/internal/batch_controller_stub_factory.h index 3072bb4c01242..3d78d83dc0a48 100644 --- a/google/cloud/dataproc/v1/internal/batch_controller_stub_factory.h +++ b/google/cloud/dataproc/v1/internal/batch_controller_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_BATCH_CONTROLLER_STUB_FACTORY_H diff --git a/google/cloud/dataproc/v1/internal/batch_controller_tracing_connection.cc b/google/cloud/dataproc/v1/internal/batch_controller_tracing_connection.cc index 71043b5bfda2b..49035ed334745 100644 --- a/google/cloud/dataproc/v1/internal/batch_controller_tracing_connection.cc +++ b/google/cloud/dataproc/v1/internal/batch_controller_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dataproc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - BatchControllerTracingConnection::BatchControllerTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -152,16 +150,12 @@ Status BatchControllerTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeBatchControllerTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dataproc/v1/internal/batch_controller_tracing_connection.h b/google/cloud/dataproc/v1/internal/batch_controller_tracing_connection.h index 1c224784bfc1a..fc69309bb4c56 100644 --- a/google/cloud/dataproc/v1/internal/batch_controller_tracing_connection.h +++ b/google/cloud/dataproc/v1/internal/batch_controller_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dataproc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class BatchControllerTracingConnection : public dataproc_v1::BatchControllerConnection { public: @@ -84,8 +82,6 @@ class BatchControllerTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dataproc/v1/internal/batch_controller_tracing_stub.cc b/google/cloud/dataproc/v1/internal/batch_controller_tracing_stub.cc index 41d547c3d735e..996791c39dfbc 100644 --- a/google/cloud/dataproc/v1/internal/batch_controller_tracing_stub.cc +++ b/google/cloud/dataproc/v1/internal/batch_controller_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - BatchControllerTracingStub::BatchControllerTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -201,18 +202,14 @@ future BatchControllerTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeBatchControllerTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/batch_controller_tracing_stub.h b/google/cloud/dataproc/v1/internal/batch_controller_tracing_stub.h index a7b7a1e90b022..971009ecd45cb 100644 --- a/google/cloud/dataproc/v1/internal/batch_controller_tracing_stub.h +++ b/google/cloud/dataproc/v1/internal/batch_controller_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class BatchControllerTracingStub : public BatchControllerStub { public: ~BatchControllerTracingStub() override = default; @@ -107,8 +108,6 @@ class BatchControllerTracingStub : public BatchControllerStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -123,4 +122,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_BATCH_CONTROLLER_TRACING_STUB_H diff --git a/google/cloud/dataproc/v1/internal/cluster_controller_auth_decorator.cc b/google/cloud/dataproc/v1/internal/cluster_controller_auth_decorator.cc index a6db7ae55da62..7b2590d3e98ec 100644 --- a/google/cloud/dataproc/v1/internal/cluster_controller_auth_decorator.cc +++ b/google/cloud/dataproc/v1/internal/cluster_controller_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dataproc/v1/clusters.proto #include "google/cloud/dataproc/v1/internal/cluster_controller_auth_decorator.h" -#include +#include "google/cloud/dataproc/v1/clusters.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -315,3 +318,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/cluster_controller_auth_decorator.h b/google/cloud/dataproc/v1/internal/cluster_controller_auth_decorator.h index 439ec36437505..219fdd8e31209 100644 --- a/google/cloud/dataproc/v1/internal/cluster_controller_auth_decorator.h +++ b/google/cloud/dataproc/v1/internal/cluster_controller_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dataproc/v1/internal/cluster_controller_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -165,4 +168,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_CLUSTER_CONTROLLER_AUTH_DECORATOR_H diff --git a/google/cloud/dataproc/v1/internal/cluster_controller_connection_impl.h b/google/cloud/dataproc/v1/internal/cluster_controller_connection_impl.h index cf57a2f758e78..24456ce55d2ca 100644 --- a/google/cloud/dataproc/v1/internal/cluster_controller_connection_impl.h +++ b/google/cloud/dataproc/v1/internal/cluster_controller_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dataproc/v1/internal/cluster_controller_logging_decorator.cc b/google/cloud/dataproc/v1/internal/cluster_controller_logging_decorator.cc index 0dfb7d8de30ef..e81d5cbc508a1 100644 --- a/google/cloud/dataproc/v1/internal/cluster_controller_logging_decorator.cc +++ b/google/cloud/dataproc/v1/internal/cluster_controller_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dataproc/v1/clusters.proto #include "google/cloud/dataproc/v1/internal/cluster_controller_logging_decorator.h" +#include "google/cloud/dataproc/v1/clusters.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -357,3 +360,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/cluster_controller_logging_decorator.h b/google/cloud/dataproc/v1/internal/cluster_controller_logging_decorator.h index 8a943fa61c232..61a1836c2fdff 100644 --- a/google/cloud/dataproc/v1/internal/cluster_controller_logging_decorator.h +++ b/google/cloud/dataproc/v1/internal/cluster_controller_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dataproc/v1/internal/cluster_controller_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -165,4 +168,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_CLUSTER_CONTROLLER_LOGGING_DECORATOR_H diff --git a/google/cloud/dataproc/v1/internal/cluster_controller_metadata_decorator.cc b/google/cloud/dataproc/v1/internal/cluster_controller_metadata_decorator.cc index 5010d64ed38a6..92c17551de3fb 100644 --- a/google/cloud/dataproc/v1/internal/cluster_controller_metadata_decorator.cc +++ b/google/cloud/dataproc/v1/internal/cluster_controller_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dataproc/v1/clusters.proto #include "google/cloud/dataproc/v1/internal/cluster_controller_metadata_decorator.h" +#include "google/cloud/dataproc/v1/clusters.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -339,3 +343,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/cluster_controller_metadata_decorator.h b/google/cloud/dataproc/v1/internal/cluster_controller_metadata_decorator.h index 5911c4fae85ca..9c7a076a4868b 100644 --- a/google/cloud/dataproc/v1/internal/cluster_controller_metadata_decorator.h +++ b/google/cloud/dataproc/v1/internal/cluster_controller_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dataproc/v1/internal/cluster_controller_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -171,4 +174,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_CLUSTER_CONTROLLER_METADATA_DECORATOR_H diff --git a/google/cloud/dataproc/v1/internal/cluster_controller_option_defaults.cc b/google/cloud/dataproc/v1/internal/cluster_controller_option_defaults.cc index ed769a307a33c..4630cbf9643b7 100644 --- a/google/cloud/dataproc/v1/internal/cluster_controller_option_defaults.cc +++ b/google/cloud/dataproc/v1/internal/cluster_controller_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dataproc/v1/internal/cluster_controller_option_defaults.h" #include "google/cloud/dataproc/v1/cluster_controller_connection.h" #include "google/cloud/dataproc/v1/cluster_controller_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -45,7 +45,7 @@ Options ClusterControllerDefaultOptions(std::string const& location, if (!options.has()) { options.set( dataproc_v1::ClusterControllerLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dataproc/v1/internal/cluster_controller_stub.cc b/google/cloud/dataproc/v1/internal/cluster_controller_stub.cc index 490cbd0cd299f..adc12a34c10f7 100644 --- a/google/cloud/dataproc/v1/internal/cluster_controller_stub.cc +++ b/google/cloud/dataproc/v1/internal/cluster_controller_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/dataproc/v1/clusters.proto #include "google/cloud/dataproc/v1/internal/cluster_controller_stub.h" +#include "google/cloud/dataproc/v1/clusters.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -359,3 +362,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/cluster_controller_stub.h b/google/cloud/dataproc/v1/internal/cluster_controller_stub.h index 153f8ccae188c..eb1cfb2aff1e8 100644 --- a/google/cloud/dataproc/v1/internal/cluster_controller_stub.h +++ b/google/cloud/dataproc/v1/internal/cluster_controller_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_CLUSTER_CONTROLLER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_CLUSTER_CONTROLLER_STUB_H +#include "google/cloud/dataproc/v1/clusters.grpc.pb.h" +#include "google/cloud/dataproc/v1/operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -293,4 +296,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_CLUSTER_CONTROLLER_STUB_H diff --git a/google/cloud/dataproc/v1/internal/cluster_controller_stub_factory.cc b/google/cloud/dataproc/v1/internal/cluster_controller_stub_factory.cc index 1c1c63261e50d..02ca8dd114b73 100644 --- a/google/cloud/dataproc/v1/internal/cluster_controller_stub_factory.cc +++ b/google/cloud/dataproc/v1/internal/cluster_controller_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/dataproc/v1/clusters.proto #include "google/cloud/dataproc/v1/internal/cluster_controller_stub_factory.h" +#include "google/cloud/dataproc/v1/clusters.grpc.pb.h" #include "google/cloud/dataproc/v1/internal/cluster_controller_auth_decorator.h" #include "google/cloud/dataproc/v1/internal/cluster_controller_logging_decorator.h" #include "google/cloud/dataproc/v1/internal/cluster_controller_metadata_decorator.h" @@ -28,12 +29,14 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -74,3 +77,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/cluster_controller_stub_factory.h b/google/cloud/dataproc/v1/internal/cluster_controller_stub_factory.h index 269cf655747d5..cd4657bae2060 100644 --- a/google/cloud/dataproc/v1/internal/cluster_controller_stub_factory.h +++ b/google/cloud/dataproc/v1/internal/cluster_controller_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_CLUSTER_CONTROLLER_STUB_FACTORY_H diff --git a/google/cloud/dataproc/v1/internal/cluster_controller_tracing_connection.cc b/google/cloud/dataproc/v1/internal/cluster_controller_tracing_connection.cc index 6cfacd0d78bf3..cd0b9729f4e74 100644 --- a/google/cloud/dataproc/v1/internal/cluster_controller_tracing_connection.cc +++ b/google/cloud/dataproc/v1/internal/cluster_controller_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dataproc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ClusterControllerTracingConnection::ClusterControllerTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -285,17 +283,13 @@ Status ClusterControllerTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeClusterControllerTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dataproc/v1/internal/cluster_controller_tracing_connection.h b/google/cloud/dataproc/v1/internal/cluster_controller_tracing_connection.h index 39e7f150022d8..9340c9c22e43c 100644 --- a/google/cloud/dataproc/v1/internal/cluster_controller_tracing_connection.h +++ b/google/cloud/dataproc/v1/internal/cluster_controller_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dataproc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ClusterControllerTracingConnection : public dataproc_v1::ClusterControllerConnection { public: @@ -139,8 +137,6 @@ class ClusterControllerTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dataproc/v1/internal/cluster_controller_tracing_stub.cc b/google/cloud/dataproc/v1/internal/cluster_controller_tracing_stub.cc index 667e86c5e8cfb..3508a1ef35b6d 100644 --- a/google/cloud/dataproc/v1/internal/cluster_controller_tracing_stub.cc +++ b/google/cloud/dataproc/v1/internal/cluster_controller_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ClusterControllerTracingStub::ClusterControllerTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -321,18 +322,14 @@ future ClusterControllerTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeClusterControllerTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/cluster_controller_tracing_stub.h b/google/cloud/dataproc/v1/internal/cluster_controller_tracing_stub.h index 5aff2cb6c8891..0edd4ed9ba76e 100644 --- a/google/cloud/dataproc/v1/internal/cluster_controller_tracing_stub.h +++ b/google/cloud/dataproc/v1/internal/cluster_controller_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ClusterControllerTracingStub : public ClusterControllerStub { public: ~ClusterControllerTracingStub() override = default; @@ -161,8 +162,6 @@ class ClusterControllerTracingStub : public ClusterControllerStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -177,4 +176,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_CLUSTER_CONTROLLER_TRACING_STUB_H diff --git a/google/cloud/dataproc/v1/internal/job_controller_auth_decorator.cc b/google/cloud/dataproc/v1/internal/job_controller_auth_decorator.cc index a8e8c9d3ee654..faed846e8b3c1 100644 --- a/google/cloud/dataproc/v1/internal/job_controller_auth_decorator.cc +++ b/google/cloud/dataproc/v1/internal/job_controller_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dataproc/v1/jobs.proto #include "google/cloud/dataproc/v1/internal/job_controller_auth_decorator.h" -#include +#include "google/cloud/dataproc/v1/jobs.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -207,3 +210,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/job_controller_auth_decorator.h b/google/cloud/dataproc/v1/internal/job_controller_auth_decorator.h index 2bd9967d5a427..b30ab97711ff9 100644 --- a/google/cloud/dataproc/v1/internal/job_controller_auth_decorator.h +++ b/google/cloud/dataproc/v1/internal/job_controller_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dataproc/v1/internal/job_controller_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -123,4 +126,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_JOB_CONTROLLER_AUTH_DECORATOR_H diff --git a/google/cloud/dataproc/v1/internal/job_controller_connection_impl.h b/google/cloud/dataproc/v1/internal/job_controller_connection_impl.h index f9ab1f12f364f..6eb200056ed5e 100644 --- a/google/cloud/dataproc/v1/internal/job_controller_connection_impl.h +++ b/google/cloud/dataproc/v1/internal/job_controller_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dataproc/v1/internal/job_controller_logging_decorator.cc b/google/cloud/dataproc/v1/internal/job_controller_logging_decorator.cc index 305bfdc7f6779..0309f639e0a74 100644 --- a/google/cloud/dataproc/v1/internal/job_controller_logging_decorator.cc +++ b/google/cloud/dataproc/v1/internal/job_controller_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dataproc/v1/jobs.proto #include "google/cloud/dataproc/v1/internal/job_controller_logging_decorator.h" +#include "google/cloud/dataproc/v1/jobs.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -250,3 +253,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/job_controller_logging_decorator.h b/google/cloud/dataproc/v1/internal/job_controller_logging_decorator.h index cc06e148689da..0ca94302360a6 100644 --- a/google/cloud/dataproc/v1/internal/job_controller_logging_decorator.h +++ b/google/cloud/dataproc/v1/internal/job_controller_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dataproc/v1/internal/job_controller_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -123,4 +126,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_JOB_CONTROLLER_LOGGING_DECORATOR_H diff --git a/google/cloud/dataproc/v1/internal/job_controller_metadata_decorator.cc b/google/cloud/dataproc/v1/internal/job_controller_metadata_decorator.cc index 9765d358a7f91..3ea59809286cc 100644 --- a/google/cloud/dataproc/v1/internal/job_controller_metadata_decorator.cc +++ b/google/cloud/dataproc/v1/internal/job_controller_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dataproc/v1/jobs.proto #include "google/cloud/dataproc/v1/internal/job_controller_metadata_decorator.h" +#include "google/cloud/dataproc/v1/jobs.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -235,3 +239,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/job_controller_metadata_decorator.h b/google/cloud/dataproc/v1/internal/job_controller_metadata_decorator.h index bb9dcc6ab5d7d..50402ccec55f1 100644 --- a/google/cloud/dataproc/v1/internal/job_controller_metadata_decorator.h +++ b/google/cloud/dataproc/v1/internal/job_controller_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dataproc/v1/internal/job_controller_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -128,4 +131,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_JOB_CONTROLLER_METADATA_DECORATOR_H diff --git a/google/cloud/dataproc/v1/internal/job_controller_option_defaults.cc b/google/cloud/dataproc/v1/internal/job_controller_option_defaults.cc index 269735ea40230..7b49661b8664d 100644 --- a/google/cloud/dataproc/v1/internal/job_controller_option_defaults.cc +++ b/google/cloud/dataproc/v1/internal/job_controller_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dataproc/v1/internal/job_controller_option_defaults.h" #include "google/cloud/dataproc/v1/job_controller_connection.h" #include "google/cloud/dataproc/v1/job_controller_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -45,7 +45,7 @@ Options JobControllerDefaultOptions(std::string const& location, if (!options.has()) { options.set( dataproc_v1::JobControllerLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dataproc/v1/internal/job_controller_stub.cc b/google/cloud/dataproc/v1/internal/job_controller_stub.cc index 128adaea218e9..bfb2a4446617c 100644 --- a/google/cloud/dataproc/v1/internal/job_controller_stub.cc +++ b/google/cloud/dataproc/v1/internal/job_controller_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/dataproc/v1/jobs.proto #include "google/cloud/dataproc/v1/internal/job_controller_stub.h" +#include "google/cloud/dataproc/v1/jobs.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -251,3 +254,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/job_controller_stub.h b/google/cloud/dataproc/v1/internal/job_controller_stub.h index c400280c5ccdb..e8a97db27bb1c 100644 --- a/google/cloud/dataproc/v1/internal/job_controller_stub.h +++ b/google/cloud/dataproc/v1/internal/job_controller_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_JOB_CONTROLLER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_JOB_CONTROLLER_STUB_H +#include "google/cloud/dataproc/v1/jobs.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -215,4 +218,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_JOB_CONTROLLER_STUB_H diff --git a/google/cloud/dataproc/v1/internal/job_controller_stub_factory.cc b/google/cloud/dataproc/v1/internal/job_controller_stub_factory.cc index ee48edc105cd7..d5c509c221bce 100644 --- a/google/cloud/dataproc/v1/internal/job_controller_stub_factory.cc +++ b/google/cloud/dataproc/v1/internal/job_controller_stub_factory.cc @@ -22,18 +22,21 @@ #include "google/cloud/dataproc/v1/internal/job_controller_metadata_decorator.h" #include "google/cloud/dataproc/v1/internal/job_controller_stub.h" #include "google/cloud/dataproc/v1/internal/job_controller_tracing_stub.h" +#include "google/cloud/dataproc/v1/jobs.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -74,3 +77,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/job_controller_stub_factory.h b/google/cloud/dataproc/v1/internal/job_controller_stub_factory.h index b1c281aa28022..c797523291c50 100644 --- a/google/cloud/dataproc/v1/internal/job_controller_stub_factory.h +++ b/google/cloud/dataproc/v1/internal/job_controller_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_JOB_CONTROLLER_STUB_FACTORY_H diff --git a/google/cloud/dataproc/v1/internal/job_controller_tracing_connection.cc b/google/cloud/dataproc/v1/internal/job_controller_tracing_connection.cc index 5e2daa808e3c3..ee69442d44bd7 100644 --- a/google/cloud/dataproc/v1/internal/job_controller_tracing_connection.cc +++ b/google/cloud/dataproc/v1/internal/job_controller_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dataproc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - JobControllerTracingConnection::JobControllerTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -179,16 +177,12 @@ Status JobControllerTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeJobControllerTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dataproc/v1/internal/job_controller_tracing_connection.h b/google/cloud/dataproc/v1/internal/job_controller_tracing_connection.h index 66ffbabed5b78..ef6904b1b920e 100644 --- a/google/cloud/dataproc/v1/internal/job_controller_tracing_connection.h +++ b/google/cloud/dataproc/v1/internal/job_controller_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dataproc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class JobControllerTracingConnection : public dataproc_v1::JobControllerConnection { public: @@ -93,8 +91,6 @@ class JobControllerTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dataproc/v1/internal/job_controller_tracing_stub.cc b/google/cloud/dataproc/v1/internal/job_controller_tracing_stub.cc index 3107041fd1872..08ca9ad81bf8a 100644 --- a/google/cloud/dataproc/v1/internal/job_controller_tracing_stub.cc +++ b/google/cloud/dataproc/v1/internal/job_controller_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - JobControllerTracingStub::JobControllerTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -233,18 +234,14 @@ future JobControllerTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeJobControllerTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/job_controller_tracing_stub.h b/google/cloud/dataproc/v1/internal/job_controller_tracing_stub.h index 28ffa483c5513..02bdbc4c69b7c 100644 --- a/google/cloud/dataproc/v1/internal/job_controller_tracing_stub.h +++ b/google/cloud/dataproc/v1/internal/job_controller_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class JobControllerTracingStub : public JobControllerStub { public: ~JobControllerTracingStub() override = default; @@ -118,8 +119,6 @@ class JobControllerTracingStub : public JobControllerStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -134,4 +133,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_JOB_CONTROLLER_TRACING_STUB_H diff --git a/google/cloud/dataproc/v1/internal/node_group_controller_auth_decorator.cc b/google/cloud/dataproc/v1/internal/node_group_controller_auth_decorator.cc index 76b2bf2bc5b24..9844611687727 100644 --- a/google/cloud/dataproc/v1/internal/node_group_controller_auth_decorator.cc +++ b/google/cloud/dataproc/v1/internal/node_group_controller_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dataproc/v1/node_groups.proto #include "google/cloud/dataproc/v1/internal/node_group_controller_auth_decorator.h" -#include +#include "google/cloud/dataproc/v1/node_groups.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -196,3 +199,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/node_group_controller_auth_decorator.h b/google/cloud/dataproc/v1/internal/node_group_controller_auth_decorator.h index 17a245666056f..0a9de2f5371ef 100644 --- a/google/cloud/dataproc/v1/internal/node_group_controller_auth_decorator.h +++ b/google/cloud/dataproc/v1/internal/node_group_controller_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dataproc/v1/internal/node_group_controller_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -117,4 +120,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_NODE_GROUP_CONTROLLER_AUTH_DECORATOR_H diff --git a/google/cloud/dataproc/v1/internal/node_group_controller_connection_impl.h b/google/cloud/dataproc/v1/internal/node_group_controller_connection_impl.h index 7943478eb9c89..a24b6b88d3d56 100644 --- a/google/cloud/dataproc/v1/internal/node_group_controller_connection_impl.h +++ b/google/cloud/dataproc/v1/internal/node_group_controller_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dataproc/v1/internal/node_group_controller_logging_decorator.cc b/google/cloud/dataproc/v1/internal/node_group_controller_logging_decorator.cc index 7db9bd2346aa3..54966594be4cc 100644 --- a/google/cloud/dataproc/v1/internal/node_group_controller_logging_decorator.cc +++ b/google/cloud/dataproc/v1/internal/node_group_controller_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dataproc/v1/node_groups.proto #include "google/cloud/dataproc/v1/internal/node_group_controller_logging_decorator.h" +#include "google/cloud/dataproc/v1/node_groups.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -230,3 +233,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/node_group_controller_logging_decorator.h b/google/cloud/dataproc/v1/internal/node_group_controller_logging_decorator.h index 8fb3ad669a139..6133e14ab939c 100644 --- a/google/cloud/dataproc/v1/internal/node_group_controller_logging_decorator.h +++ b/google/cloud/dataproc/v1/internal/node_group_controller_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dataproc/v1/internal/node_group_controller_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -117,4 +120,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_NODE_GROUP_CONTROLLER_LOGGING_DECORATOR_H diff --git a/google/cloud/dataproc/v1/internal/node_group_controller_metadata_decorator.cc b/google/cloud/dataproc/v1/internal/node_group_controller_metadata_decorator.cc index ad077d8c1dc71..35b8a0264e686 100644 --- a/google/cloud/dataproc/v1/internal/node_group_controller_metadata_decorator.cc +++ b/google/cloud/dataproc/v1/internal/node_group_controller_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dataproc/v1/node_groups.proto #include "google/cloud/dataproc/v1/internal/node_group_controller_metadata_decorator.h" +#include "google/cloud/dataproc/v1/node_groups.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -197,3 +201,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/node_group_controller_metadata_decorator.h b/google/cloud/dataproc/v1/internal/node_group_controller_metadata_decorator.h index 37ff1a33ac928..1af1ec3f27bc6 100644 --- a/google/cloud/dataproc/v1/internal/node_group_controller_metadata_decorator.h +++ b/google/cloud/dataproc/v1/internal/node_group_controller_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dataproc/v1/internal/node_group_controller_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -123,4 +126,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_NODE_GROUP_CONTROLLER_METADATA_DECORATOR_H diff --git a/google/cloud/dataproc/v1/internal/node_group_controller_option_defaults.cc b/google/cloud/dataproc/v1/internal/node_group_controller_option_defaults.cc index 9818622a4af40..7fe7bfe38c603 100644 --- a/google/cloud/dataproc/v1/internal/node_group_controller_option_defaults.cc +++ b/google/cloud/dataproc/v1/internal/node_group_controller_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dataproc/v1/internal/node_group_controller_option_defaults.h" #include "google/cloud/dataproc/v1/node_group_controller_connection.h" #include "google/cloud/dataproc/v1/node_group_controller_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -44,7 +44,7 @@ Options NodeGroupControllerDefaultOptions(std::string const& location, if (!options.has()) { options.set( dataproc_v1::NodeGroupControllerLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dataproc/v1/internal/node_group_controller_stub.cc b/google/cloud/dataproc/v1/internal/node_group_controller_stub.cc index 0dfe8a387f321..79027cd8ae20b 100644 --- a/google/cloud/dataproc/v1/internal/node_group_controller_stub.cc +++ b/google/cloud/dataproc/v1/internal/node_group_controller_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/dataproc/v1/node_groups.proto #include "google/cloud/dataproc/v1/internal/node_group_controller_stub.h" +#include "google/cloud/dataproc/v1/node_groups.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -227,3 +230,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/node_group_controller_stub.h b/google/cloud/dataproc/v1/internal/node_group_controller_stub.h index 47054c7d25bf6..46298c9d442db 100644 --- a/google/cloud/dataproc/v1/internal/node_group_controller_stub.h +++ b/google/cloud/dataproc/v1/internal/node_group_controller_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_NODE_GROUP_CONTROLLER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_NODE_GROUP_CONTROLLER_STUB_H +#include "google/cloud/dataproc/v1/node_groups.grpc.pb.h" +#include "google/cloud/dataproc/v1/operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -201,4 +204,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_NODE_GROUP_CONTROLLER_STUB_H diff --git a/google/cloud/dataproc/v1/internal/node_group_controller_stub_factory.cc b/google/cloud/dataproc/v1/internal/node_group_controller_stub_factory.cc index 003bfde28a3e1..655f84efcd839 100644 --- a/google/cloud/dataproc/v1/internal/node_group_controller_stub_factory.cc +++ b/google/cloud/dataproc/v1/internal/node_group_controller_stub_factory.cc @@ -22,18 +22,21 @@ #include "google/cloud/dataproc/v1/internal/node_group_controller_metadata_decorator.h" #include "google/cloud/dataproc/v1/internal/node_group_controller_stub.h" #include "google/cloud/dataproc/v1/internal/node_group_controller_tracing_stub.h" +#include "google/cloud/dataproc/v1/node_groups.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -74,3 +77,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/node_group_controller_stub_factory.h b/google/cloud/dataproc/v1/internal/node_group_controller_stub_factory.h index 35d2af10a0227..1c952690782bb 100644 --- a/google/cloud/dataproc/v1/internal/node_group_controller_stub_factory.h +++ b/google/cloud/dataproc/v1/internal/node_group_controller_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_NODE_GROUP_CONTROLLER_STUB_FACTORY_H diff --git a/google/cloud/dataproc/v1/internal/node_group_controller_tracing_connection.cc b/google/cloud/dataproc/v1/internal/node_group_controller_tracing_connection.cc index 6c062b8815e9b..4ef8158efd4b4 100644 --- a/google/cloud/dataproc/v1/internal/node_group_controller_tracing_connection.cc +++ b/google/cloud/dataproc/v1/internal/node_group_controller_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dataproc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - NodeGroupControllerTracingConnection::NodeGroupControllerTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -163,17 +161,13 @@ Status NodeGroupControllerTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeNodeGroupControllerTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dataproc/v1/internal/node_group_controller_tracing_connection.h b/google/cloud/dataproc/v1/internal/node_group_controller_tracing_connection.h index 54cce1456d2e6..1650a7e2e627a 100644 --- a/google/cloud/dataproc/v1/internal/node_group_controller_tracing_connection.h +++ b/google/cloud/dataproc/v1/internal/node_group_controller_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dataproc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class NodeGroupControllerTracingConnection : public dataproc_v1::NodeGroupControllerConnection { public: @@ -92,8 +90,6 @@ class NodeGroupControllerTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dataproc/v1/internal/node_group_controller_tracing_stub.cc b/google/cloud/dataproc/v1/internal/node_group_controller_tracing_stub.cc index 71ce41ea885d0..a98cdb355f3ab 100644 --- a/google/cloud/dataproc/v1/internal/node_group_controller_tracing_stub.cc +++ b/google/cloud/dataproc/v1/internal/node_group_controller_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - NodeGroupControllerTracingStub::NodeGroupControllerTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -206,18 +207,14 @@ future NodeGroupControllerTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeNodeGroupControllerTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/node_group_controller_tracing_stub.h b/google/cloud/dataproc/v1/internal/node_group_controller_tracing_stub.h index 1220209b98671..59694b9bb75f7 100644 --- a/google/cloud/dataproc/v1/internal/node_group_controller_tracing_stub.h +++ b/google/cloud/dataproc/v1/internal/node_group_controller_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class NodeGroupControllerTracingStub : public NodeGroupControllerStub { public: ~NodeGroupControllerTracingStub() override = default; @@ -113,8 +114,6 @@ class NodeGroupControllerTracingStub : public NodeGroupControllerStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -129,4 +128,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_NODE_GROUP_CONTROLLER_TRACING_STUB_H diff --git a/google/cloud/dataproc/v1/internal/session_controller_auth_decorator.cc b/google/cloud/dataproc/v1/internal/session_controller_auth_decorator.cc index 70f81ebf7fa0e..1ea63c4b4c14c 100644 --- a/google/cloud/dataproc/v1/internal/session_controller_auth_decorator.cc +++ b/google/cloud/dataproc/v1/internal/session_controller_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dataproc/v1/sessions.proto #include "google/cloud/dataproc/v1/internal/session_controller_auth_decorator.h" -#include +#include "google/cloud/dataproc/v1/sessions.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -232,3 +235,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/session_controller_auth_decorator.h b/google/cloud/dataproc/v1/internal/session_controller_auth_decorator.h index 8d01076b0e2da..24795baeca8b7 100644 --- a/google/cloud/dataproc/v1/internal/session_controller_auth_decorator.h +++ b/google/cloud/dataproc/v1/internal/session_controller_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dataproc/v1/internal/session_controller_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -133,4 +136,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_SESSION_CONTROLLER_AUTH_DECORATOR_H diff --git a/google/cloud/dataproc/v1/internal/session_controller_connection_impl.h b/google/cloud/dataproc/v1/internal/session_controller_connection_impl.h index 0a2f18128008e..8dc90b77bc40e 100644 --- a/google/cloud/dataproc/v1/internal/session_controller_connection_impl.h +++ b/google/cloud/dataproc/v1/internal/session_controller_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dataproc/v1/internal/session_controller_logging_decorator.cc b/google/cloud/dataproc/v1/internal/session_controller_logging_decorator.cc index 3c1cfe37af4b6..21c63c306e84b 100644 --- a/google/cloud/dataproc/v1/internal/session_controller_logging_decorator.cc +++ b/google/cloud/dataproc/v1/internal/session_controller_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dataproc/v1/sessions.proto #include "google/cloud/dataproc/v1/internal/session_controller_logging_decorator.h" +#include "google/cloud/dataproc/v1/sessions.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -269,3 +272,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/session_controller_logging_decorator.h b/google/cloud/dataproc/v1/internal/session_controller_logging_decorator.h index 122cd5f867d3a..9dfdf77e8b831 100644 --- a/google/cloud/dataproc/v1/internal/session_controller_logging_decorator.h +++ b/google/cloud/dataproc/v1/internal/session_controller_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dataproc/v1/internal/session_controller_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -133,4 +136,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_SESSION_CONTROLLER_LOGGING_DECORATOR_H diff --git a/google/cloud/dataproc/v1/internal/session_controller_metadata_decorator.cc b/google/cloud/dataproc/v1/internal/session_controller_metadata_decorator.cc index 19b878b1fde04..d7facb1a3a9a5 100644 --- a/google/cloud/dataproc/v1/internal/session_controller_metadata_decorator.cc +++ b/google/cloud/dataproc/v1/internal/session_controller_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dataproc/v1/sessions.proto #include "google/cloud/dataproc/v1/internal/session_controller_metadata_decorator.h" +#include "google/cloud/dataproc/v1/sessions.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -227,3 +231,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/session_controller_metadata_decorator.h b/google/cloud/dataproc/v1/internal/session_controller_metadata_decorator.h index 3e688938cb4d8..bf9c720cf83a5 100644 --- a/google/cloud/dataproc/v1/internal/session_controller_metadata_decorator.h +++ b/google/cloud/dataproc/v1/internal/session_controller_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dataproc/v1/internal/session_controller_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -139,4 +142,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_SESSION_CONTROLLER_METADATA_DECORATOR_H diff --git a/google/cloud/dataproc/v1/internal/session_controller_option_defaults.cc b/google/cloud/dataproc/v1/internal/session_controller_option_defaults.cc index 2ae49f5d57f33..bfe11c008bdea 100644 --- a/google/cloud/dataproc/v1/internal/session_controller_option_defaults.cc +++ b/google/cloud/dataproc/v1/internal/session_controller_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dataproc/v1/internal/session_controller_option_defaults.h" #include "google/cloud/dataproc/v1/session_controller_connection.h" #include "google/cloud/dataproc/v1/session_controller_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -44,7 +44,7 @@ Options SessionControllerDefaultOptions(std::string const& location, if (!options.has()) { options.set( dataproc_v1::SessionControllerLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dataproc/v1/internal/session_controller_stub.cc b/google/cloud/dataproc/v1/internal/session_controller_stub.cc index ad369e5969203..127645a62027c 100644 --- a/google/cloud/dataproc/v1/internal/session_controller_stub.cc +++ b/google/cloud/dataproc/v1/internal/session_controller_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/dataproc/v1/sessions.proto #include "google/cloud/dataproc/v1/internal/session_controller_stub.h" +#include "google/cloud/dataproc/v1/sessions.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -270,3 +273,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/session_controller_stub.h b/google/cloud/dataproc/v1/internal/session_controller_stub.h index 89bc759e3e5e0..21385f67c29a4 100644 --- a/google/cloud/dataproc/v1/internal/session_controller_stub.h +++ b/google/cloud/dataproc/v1/internal/session_controller_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_SESSION_CONTROLLER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_SESSION_CONTROLLER_STUB_H +#include "google/cloud/dataproc/v1/operations.pb.h" +#include "google/cloud/dataproc/v1/sessions.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -232,4 +235,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_SESSION_CONTROLLER_STUB_H diff --git a/google/cloud/dataproc/v1/internal/session_controller_stub_factory.cc b/google/cloud/dataproc/v1/internal/session_controller_stub_factory.cc index 6d68ad906a4de..93297806e307c 100644 --- a/google/cloud/dataproc/v1/internal/session_controller_stub_factory.cc +++ b/google/cloud/dataproc/v1/internal/session_controller_stub_factory.cc @@ -22,18 +22,21 @@ #include "google/cloud/dataproc/v1/internal/session_controller_metadata_decorator.h" #include "google/cloud/dataproc/v1/internal/session_controller_stub.h" #include "google/cloud/dataproc/v1/internal/session_controller_tracing_stub.h" +#include "google/cloud/dataproc/v1/sessions.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -74,3 +77,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/session_controller_stub_factory.h b/google/cloud/dataproc/v1/internal/session_controller_stub_factory.h index 4809747ec2b2c..18c1379a2d4be 100644 --- a/google/cloud/dataproc/v1/internal/session_controller_stub_factory.h +++ b/google/cloud/dataproc/v1/internal/session_controller_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_SESSION_CONTROLLER_STUB_FACTORY_H diff --git a/google/cloud/dataproc/v1/internal/session_controller_tracing_connection.cc b/google/cloud/dataproc/v1/internal/session_controller_tracing_connection.cc index 274a7e8f4f539..9eab4ea686c66 100644 --- a/google/cloud/dataproc/v1/internal/session_controller_tracing_connection.cc +++ b/google/cloud/dataproc/v1/internal/session_controller_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dataproc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SessionControllerTracingConnection::SessionControllerTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -202,17 +200,13 @@ Status SessionControllerTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSessionControllerTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dataproc/v1/internal/session_controller_tracing_connection.h b/google/cloud/dataproc/v1/internal/session_controller_tracing_connection.h index 3af4be9d7533e..e25283d62753b 100644 --- a/google/cloud/dataproc/v1/internal/session_controller_tracing_connection.h +++ b/google/cloud/dataproc/v1/internal/session_controller_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dataproc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SessionControllerTracingConnection : public dataproc_v1::SessionControllerConnection { public: @@ -107,8 +105,6 @@ class SessionControllerTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dataproc/v1/internal/session_controller_tracing_stub.cc b/google/cloud/dataproc/v1/internal/session_controller_tracing_stub.cc index 60757189b9a75..fa9416efc91e3 100644 --- a/google/cloud/dataproc/v1/internal/session_controller_tracing_stub.cc +++ b/google/cloud/dataproc/v1/internal/session_controller_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SessionControllerTracingStub::SessionControllerTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -243,18 +244,14 @@ future SessionControllerTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSessionControllerTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/session_controller_tracing_stub.h b/google/cloud/dataproc/v1/internal/session_controller_tracing_stub.h index 65018a37f381c..4ca839d50b421 100644 --- a/google/cloud/dataproc/v1/internal/session_controller_tracing_stub.h +++ b/google/cloud/dataproc/v1/internal/session_controller_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SessionControllerTracingStub : public SessionControllerStub { public: ~SessionControllerTracingStub() override = default; @@ -129,8 +130,6 @@ class SessionControllerTracingStub : public SessionControllerStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -145,4 +144,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_SESSION_CONTROLLER_TRACING_STUB_H diff --git a/google/cloud/dataproc/v1/internal/session_template_controller_auth_decorator.cc b/google/cloud/dataproc/v1/internal/session_template_controller_auth_decorator.cc index 0147315f67049..a6443589bac86 100644 --- a/google/cloud/dataproc/v1/internal/session_template_controller_auth_decorator.cc +++ b/google/cloud/dataproc/v1/internal/session_template_controller_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dataproc/v1/session_templates.proto #include "google/cloud/dataproc/v1/internal/session_template_controller_auth_decorator.h" -#include +#include "google/cloud/dataproc/v1/session_templates.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -138,3 +141,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/session_template_controller_auth_decorator.h b/google/cloud/dataproc/v1/internal/session_template_controller_auth_decorator.h index 7275f8b862b34..25535cc193f1a 100644 --- a/google/cloud/dataproc/v1/internal/session_template_controller_auth_decorator.h +++ b/google/cloud/dataproc/v1/internal/session_template_controller_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -102,4 +105,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_SESSION_TEMPLATE_CONTROLLER_AUTH_DECORATOR_H diff --git a/google/cloud/dataproc/v1/internal/session_template_controller_logging_decorator.cc b/google/cloud/dataproc/v1/internal/session_template_controller_logging_decorator.cc index ae438c8262458..7af95daa43655 100644 --- a/google/cloud/dataproc/v1/internal/session_template_controller_logging_decorator.cc +++ b/google/cloud/dataproc/v1/internal/session_template_controller_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dataproc/v1/session_templates.proto #include "google/cloud/dataproc/v1/internal/session_template_controller_logging_decorator.h" +#include "google/cloud/dataproc/v1/session_templates.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -185,3 +188,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/session_template_controller_logging_decorator.h b/google/cloud/dataproc/v1/internal/session_template_controller_logging_decorator.h index 75da20626f4f2..6536895c72b79 100644 --- a/google/cloud/dataproc/v1/internal/session_template_controller_logging_decorator.h +++ b/google/cloud/dataproc/v1/internal/session_template_controller_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -102,4 +105,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_SESSION_TEMPLATE_CONTROLLER_LOGGING_DECORATOR_H diff --git a/google/cloud/dataproc/v1/internal/session_template_controller_metadata_decorator.cc b/google/cloud/dataproc/v1/internal/session_template_controller_metadata_decorator.cc index 4ea4f02821ed5..bb6e78e8686c6 100644 --- a/google/cloud/dataproc/v1/internal/session_template_controller_metadata_decorator.cc +++ b/google/cloud/dataproc/v1/internal/session_template_controller_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dataproc/v1/session_templates.proto #include "google/cloud/dataproc/v1/internal/session_template_controller_metadata_decorator.h" +#include "google/cloud/dataproc/v1/session_templates.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -171,3 +175,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/session_template_controller_metadata_decorator.h b/google/cloud/dataproc/v1/internal/session_template_controller_metadata_decorator.h index 86019ed3fbb9f..d4429038bfc9b 100644 --- a/google/cloud/dataproc/v1/internal/session_template_controller_metadata_decorator.h +++ b/google/cloud/dataproc/v1/internal/session_template_controller_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -108,4 +111,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_SESSION_TEMPLATE_CONTROLLER_METADATA_DECORATOR_H diff --git a/google/cloud/dataproc/v1/internal/session_template_controller_option_defaults.cc b/google/cloud/dataproc/v1/internal/session_template_controller_option_defaults.cc index 79d4541047f7d..78072fcfd06d8 100644 --- a/google/cloud/dataproc/v1/internal/session_template_controller_option_defaults.cc +++ b/google/cloud/dataproc/v1/internal/session_template_controller_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dataproc/v1/internal/session_template_controller_option_defaults.h" #include "google/cloud/dataproc/v1/session_template_controller_connection.h" #include "google/cloud/dataproc/v1/session_template_controller_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -45,7 +45,7 @@ Options SessionTemplateControllerDefaultOptions(std::string const& location, if (!options.has()) { options.set( dataproc_v1::SessionTemplateControllerLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/dataproc/v1/internal/session_template_controller_stub.cc b/google/cloud/dataproc/v1/internal/session_template_controller_stub.cc index 139fab44f6140..a2f408c20b35e 100644 --- a/google/cloud/dataproc/v1/internal/session_template_controller_stub.cc +++ b/google/cloud/dataproc/v1/internal/session_template_controller_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/dataproc/v1/session_templates.proto #include "google/cloud/dataproc/v1/internal/session_template_controller_stub.h" +#include "google/cloud/dataproc/v1/session_templates.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -176,3 +179,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/session_template_controller_stub.h b/google/cloud/dataproc/v1/internal/session_template_controller_stub.h index dc0a9d4b809fa..a1c095296a582 100644 --- a/google/cloud/dataproc/v1/internal/session_template_controller_stub.h +++ b/google/cloud/dataproc/v1/internal/session_template_controller_stub.h @@ -19,15 +19,18 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_SESSION_TEMPLATE_CONTROLLER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_SESSION_TEMPLATE_CONTROLLER_STUB_H +#include "google/cloud/dataproc/v1/session_templates.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -178,4 +181,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_SESSION_TEMPLATE_CONTROLLER_STUB_H diff --git a/google/cloud/dataproc/v1/internal/session_template_controller_stub_factory.cc b/google/cloud/dataproc/v1/internal/session_template_controller_stub_factory.cc index 26a7268b8513f..3347176966429 100644 --- a/google/cloud/dataproc/v1/internal/session_template_controller_stub_factory.cc +++ b/google/cloud/dataproc/v1/internal/session_template_controller_stub_factory.cc @@ -22,18 +22,21 @@ #include "google/cloud/dataproc/v1/internal/session_template_controller_metadata_decorator.h" #include "google/cloud/dataproc/v1/internal/session_template_controller_stub.h" #include "google/cloud/dataproc/v1/internal/session_template_controller_tracing_stub.h" +#include "google/cloud/dataproc/v1/session_templates.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -77,3 +80,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/session_template_controller_stub_factory.h b/google/cloud/dataproc/v1/internal/session_template_controller_stub_factory.h index 4153ef5b5932b..433d7e6c28b5a 100644 --- a/google/cloud/dataproc/v1/internal/session_template_controller_stub_factory.h +++ b/google/cloud/dataproc/v1/internal/session_template_controller_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_SESSION_TEMPLATE_CONTROLLER_STUB_FACTORY_H diff --git a/google/cloud/dataproc/v1/internal/session_template_controller_tracing_connection.cc b/google/cloud/dataproc/v1/internal/session_template_controller_tracing_connection.cc index bc93ce5f179b5..3a87b35cf55b8 100644 --- a/google/cloud/dataproc/v1/internal/session_template_controller_tracing_connection.cc +++ b/google/cloud/dataproc/v1/internal/session_template_controller_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dataproc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SessionTemplateControllerTracingConnection:: SessionTemplateControllerTracingConnection( std::shared_ptr child) @@ -147,17 +145,13 @@ Status SessionTemplateControllerTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSessionTemplateControllerTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dataproc/v1/internal/session_template_controller_tracing_connection.h b/google/cloud/dataproc/v1/internal/session_template_controller_tracing_connection.h index 405b531b22470..a557af4393b58 100644 --- a/google/cloud/dataproc/v1/internal/session_template_controller_tracing_connection.h +++ b/google/cloud/dataproc/v1/internal/session_template_controller_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dataproc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SessionTemplateControllerTracingConnection : public dataproc_v1::SessionTemplateControllerConnection { public: @@ -85,8 +83,6 @@ class SessionTemplateControllerTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dataproc/v1/internal/session_template_controller_tracing_stub.cc b/google/cloud/dataproc/v1/internal/session_template_controller_tracing_stub.cc index ed797220cb2f8..9e0fda5f7ebc8 100644 --- a/google/cloud/dataproc/v1/internal/session_template_controller_tracing_stub.cc +++ b/google/cloud/dataproc/v1/internal/session_template_controller_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SessionTemplateControllerTracingStub::SessionTemplateControllerTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -179,20 +180,16 @@ Status SessionTemplateControllerTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSessionTemplateControllerTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared( std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/session_template_controller_tracing_stub.h b/google/cloud/dataproc/v1/internal/session_template_controller_tracing_stub.h index 02ed759e87ca9..75746c40b65f7 100644 --- a/google/cloud/dataproc/v1/internal/session_template_controller_tracing_stub.h +++ b/google/cloud/dataproc/v1/internal/session_template_controller_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SessionTemplateControllerTracingStub : public SessionTemplateControllerStub { public: @@ -100,8 +101,6 @@ class SessionTemplateControllerTracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -117,4 +116,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_SESSION_TEMPLATE_CONTROLLER_TRACING_STUB_H diff --git a/google/cloud/dataproc/v1/internal/workflow_template_auth_decorator.cc b/google/cloud/dataproc/v1/internal/workflow_template_auth_decorator.cc index 898fe096026b0..ade04b4706063 100644 --- a/google/cloud/dataproc/v1/internal/workflow_template_auth_decorator.cc +++ b/google/cloud/dataproc/v1/internal/workflow_template_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dataproc/v1/workflow_templates.proto #include "google/cloud/dataproc/v1/internal/workflow_template_auth_decorator.h" -#include +#include "google/cloud/dataproc/v1/workflow_templates.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -236,3 +239,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/workflow_template_auth_decorator.h b/google/cloud/dataproc/v1/internal/workflow_template_auth_decorator.h index 61ef2f7f40646..fc20cc4fbd142 100644 --- a/google/cloud/dataproc/v1/internal/workflow_template_auth_decorator.h +++ b/google/cloud/dataproc/v1/internal/workflow_template_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dataproc/v1/internal/workflow_template_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -143,4 +146,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_WORKFLOW_TEMPLATE_AUTH_DECORATOR_H diff --git a/google/cloud/dataproc/v1/internal/workflow_template_connection_impl.h b/google/cloud/dataproc/v1/internal/workflow_template_connection_impl.h index 9a694690d314c..c29d80f959f5e 100644 --- a/google/cloud/dataproc/v1/internal/workflow_template_connection_impl.h +++ b/google/cloud/dataproc/v1/internal/workflow_template_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dataproc/v1/internal/workflow_template_logging_decorator.cc b/google/cloud/dataproc/v1/internal/workflow_template_logging_decorator.cc index 9792c046b33a0..8d7168a9f94f5 100644 --- a/google/cloud/dataproc/v1/internal/workflow_template_logging_decorator.cc +++ b/google/cloud/dataproc/v1/internal/workflow_template_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dataproc/v1/workflow_templates.proto #include "google/cloud/dataproc/v1/internal/workflow_template_logging_decorator.h" +#include "google/cloud/dataproc/v1/workflow_templates.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -289,3 +292,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/workflow_template_logging_decorator.h b/google/cloud/dataproc/v1/internal/workflow_template_logging_decorator.h index 8e98b02c450d5..c7764ce0a9bbc 100644 --- a/google/cloud/dataproc/v1/internal/workflow_template_logging_decorator.h +++ b/google/cloud/dataproc/v1/internal/workflow_template_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dataproc/v1/internal/workflow_template_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -143,4 +146,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_WORKFLOW_TEMPLATE_LOGGING_DECORATOR_H diff --git a/google/cloud/dataproc/v1/internal/workflow_template_metadata_decorator.cc b/google/cloud/dataproc/v1/internal/workflow_template_metadata_decorator.cc index 5aef8d0bf8caa..40afc8e8b815b 100644 --- a/google/cloud/dataproc/v1/internal/workflow_template_metadata_decorator.cc +++ b/google/cloud/dataproc/v1/internal/workflow_template_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dataproc/v1/workflow_templates.proto #include "google/cloud/dataproc/v1/internal/workflow_template_metadata_decorator.h" +#include "google/cloud/dataproc/v1/workflow_templates.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -237,3 +241,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/workflow_template_metadata_decorator.h b/google/cloud/dataproc/v1/internal/workflow_template_metadata_decorator.h index df9ccfa612a2e..40906ef9d6628 100644 --- a/google/cloud/dataproc/v1/internal/workflow_template_metadata_decorator.h +++ b/google/cloud/dataproc/v1/internal/workflow_template_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dataproc/v1/internal/workflow_template_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -149,4 +152,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_WORKFLOW_TEMPLATE_METADATA_DECORATOR_H diff --git a/google/cloud/dataproc/v1/internal/workflow_template_option_defaults.cc b/google/cloud/dataproc/v1/internal/workflow_template_option_defaults.cc index 565292cbcac26..b17d662867c70 100644 --- a/google/cloud/dataproc/v1/internal/workflow_template_option_defaults.cc +++ b/google/cloud/dataproc/v1/internal/workflow_template_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dataproc/v1/internal/workflow_template_option_defaults.h" #include "google/cloud/dataproc/v1/workflow_template_connection.h" #include "google/cloud/dataproc/v1/workflow_template_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -45,7 +45,7 @@ Options WorkflowTemplateServiceDefaultOptions(std::string const& location, if (!options.has()) { options.set( dataproc_v1::WorkflowTemplateServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dataproc/v1/internal/workflow_template_stub.cc b/google/cloud/dataproc/v1/internal/workflow_template_stub.cc index c67c534831df6..3ce8d117ad516 100644 --- a/google/cloud/dataproc/v1/internal/workflow_template_stub.cc +++ b/google/cloud/dataproc/v1/internal/workflow_template_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/dataproc/v1/workflow_templates.proto #include "google/cloud/dataproc/v1/internal/workflow_template_stub.h" +#include "google/cloud/dataproc/v1/workflow_templates.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -290,3 +293,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/workflow_template_stub.h b/google/cloud/dataproc/v1/internal/workflow_template_stub.h index a1c77143f0b67..fd876d86b2e04 100644 --- a/google/cloud/dataproc/v1/internal/workflow_template_stub.h +++ b/google/cloud/dataproc/v1/internal/workflow_template_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_WORKFLOW_TEMPLATE_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_WORKFLOW_TEMPLATE_STUB_H +#include "google/cloud/dataproc/v1/workflow_templates.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -258,4 +261,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_WORKFLOW_TEMPLATE_STUB_H diff --git a/google/cloud/dataproc/v1/internal/workflow_template_stub_factory.cc b/google/cloud/dataproc/v1/internal/workflow_template_stub_factory.cc index 6426cf1ed81e3..123e20d66c837 100644 --- a/google/cloud/dataproc/v1/internal/workflow_template_stub_factory.cc +++ b/google/cloud/dataproc/v1/internal/workflow_template_stub_factory.cc @@ -22,18 +22,21 @@ #include "google/cloud/dataproc/v1/internal/workflow_template_metadata_decorator.h" #include "google/cloud/dataproc/v1/internal/workflow_template_stub.h" #include "google/cloud/dataproc/v1/internal/workflow_template_tracing_stub.h" +#include "google/cloud/dataproc/v1/workflow_templates.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/workflow_template_stub_factory.h b/google/cloud/dataproc/v1/internal/workflow_template_stub_factory.h index 5b1a55e1f9edd..22dd9e6b458fc 100644 --- a/google/cloud/dataproc/v1/internal/workflow_template_stub_factory.h +++ b/google/cloud/dataproc/v1/internal/workflow_template_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_WORKFLOW_TEMPLATE_STUB_FACTORY_H diff --git a/google/cloud/dataproc/v1/internal/workflow_template_tracing_connection.cc b/google/cloud/dataproc/v1/internal/workflow_template_tracing_connection.cc index 7be38e142f184..810e5b5fea8b9 100644 --- a/google/cloud/dataproc/v1/internal/workflow_template_tracing_connection.cc +++ b/google/cloud/dataproc/v1/internal/workflow_template_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dataproc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - WorkflowTemplateServiceTracingConnection:: WorkflowTemplateServiceTracingConnection( std::shared_ptr child) @@ -216,17 +214,13 @@ Status WorkflowTemplateServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeWorkflowTemplateServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dataproc/v1/internal/workflow_template_tracing_connection.h b/google/cloud/dataproc/v1/internal/workflow_template_tracing_connection.h index 46d0d65857234..e74d0afe9f0f9 100644 --- a/google/cloud/dataproc/v1/internal/workflow_template_tracing_connection.h +++ b/google/cloud/dataproc/v1/internal/workflow_template_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dataproc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class WorkflowTemplateServiceTracingConnection : public dataproc_v1::WorkflowTemplateServiceConnection { public: @@ -116,8 +114,6 @@ class WorkflowTemplateServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dataproc/v1/internal/workflow_template_tracing_stub.cc b/google/cloud/dataproc/v1/internal/workflow_template_tracing_stub.cc index 36082746dae86..008f4f18a0eae 100644 --- a/google/cloud/dataproc/v1/internal/workflow_template_tracing_stub.cc +++ b/google/cloud/dataproc/v1/internal/workflow_template_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - WorkflowTemplateServiceTracingStub::WorkflowTemplateServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -273,19 +274,15 @@ future WorkflowTemplateServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeWorkflowTemplateServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dataproc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dataproc/v1/internal/workflow_template_tracing_stub.h b/google/cloud/dataproc/v1/internal/workflow_template_tracing_stub.h index 6e3a6c6a65126..a4dd3b626c0db 100644 --- a/google/cloud/dataproc/v1/internal/workflow_template_tracing_stub.h +++ b/google/cloud/dataproc/v1/internal/workflow_template_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dataproc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class WorkflowTemplateServiceTracingStub : public WorkflowTemplateServiceStub { public: ~WorkflowTemplateServiceTracingStub() override = default; @@ -139,8 +140,6 @@ class WorkflowTemplateServiceTracingStub : public WorkflowTemplateServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -156,4 +155,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_INTERNAL_WORKFLOW_TEMPLATE_TRACING_STUB_H diff --git a/google/cloud/dataproc/v1/job_controller_client.h b/google/cloud/dataproc/v1/job_controller_client.h index a0488c39774bd..888519648d4fe 100644 --- a/google/cloud/dataproc/v1/job_controller_client.h +++ b/google/cloud/dataproc/v1/job_controller_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/dataproc/v1/job_controller_connection.h b/google/cloud/dataproc/v1/job_controller_connection.h index f4edb69373c41..4be9fba86163e 100644 --- a/google/cloud/dataproc/v1/job_controller_connection.h +++ b/google/cloud/dataproc/v1/job_controller_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/dataproc/v1/internal/job_controller_retry_traits.h" #include "google/cloud/dataproc/v1/job_controller_connection_idempotency_policy.h" +#include "google/cloud/dataproc/v1/jobs.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/dataproc/v1/job_controller_connection_idempotency_policy.h b/google/cloud/dataproc/v1/job_controller_connection_idempotency_policy.h index c21f42ad595f0..40004c0585667 100644 --- a/google/cloud/dataproc/v1/job_controller_connection_idempotency_policy.h +++ b/google/cloud/dataproc/v1/job_controller_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_JOB_CONTROLLER_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_JOB_CONTROLLER_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dataproc/v1/jobs.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dataproc/v1/node_group_controller_client.h b/google/cloud/dataproc/v1/node_group_controller_client.h index 7f8cf9206ee6b..e59cc1eb2d6b4 100644 --- a/google/cloud/dataproc/v1/node_group_controller_client.h +++ b/google/cloud/dataproc/v1/node_group_controller_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/dataproc/v1/node_group_controller_connection.h b/google/cloud/dataproc/v1/node_group_controller_connection.h index e1ea0c480821e..bbe5f2fc0ec82 100644 --- a/google/cloud/dataproc/v1/node_group_controller_connection.h +++ b/google/cloud/dataproc/v1/node_group_controller_connection.h @@ -21,6 +21,8 @@ #include "google/cloud/dataproc/v1/internal/node_group_controller_retry_traits.h" #include "google/cloud/dataproc/v1/node_group_controller_connection_idempotency_policy.h" +#include "google/cloud/dataproc/v1/node_groups.pb.h" +#include "google/cloud/dataproc/v1/operations.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,9 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/dataproc/v1/node_group_controller_connection_idempotency_policy.h b/google/cloud/dataproc/v1/node_group_controller_connection_idempotency_policy.h index 2005d1a34183c..def8b10be0c87 100644 --- a/google/cloud/dataproc/v1/node_group_controller_connection_idempotency_policy.h +++ b/google/cloud/dataproc/v1/node_group_controller_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_NODE_GROUP_CONTROLLER_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_NODE_GROUP_CONTROLLER_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dataproc/v1/node_groups.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dataproc/v1/session_controller_client.h b/google/cloud/dataproc/v1/session_controller_client.h index 511adf5658a23..c0c7899d4761e 100644 --- a/google/cloud/dataproc/v1/session_controller_client.h +++ b/google/cloud/dataproc/v1/session_controller_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/dataproc/v1/session_controller_connection.h b/google/cloud/dataproc/v1/session_controller_connection.h index 36345ea402e0d..0156c5b32b62e 100644 --- a/google/cloud/dataproc/v1/session_controller_connection.h +++ b/google/cloud/dataproc/v1/session_controller_connection.h @@ -20,7 +20,9 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_SESSION_CONTROLLER_CONNECTION_H #include "google/cloud/dataproc/v1/internal/session_controller_retry_traits.h" +#include "google/cloud/dataproc/v1/operations.pb.h" #include "google/cloud/dataproc/v1/session_controller_connection_idempotency_policy.h" +#include "google/cloud/dataproc/v1/sessions.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,9 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/dataproc/v1/session_controller_connection_idempotency_policy.h b/google/cloud/dataproc/v1/session_controller_connection_idempotency_policy.h index 2923d64dc5b06..662b28bc56ca2 100644 --- a/google/cloud/dataproc/v1/session_controller_connection_idempotency_policy.h +++ b/google/cloud/dataproc/v1/session_controller_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_SESSION_CONTROLLER_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_SESSION_CONTROLLER_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dataproc/v1/sessions.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dataproc/v1/session_template_controller_connection.h b/google/cloud/dataproc/v1/session_template_controller_connection.h index 688ff76299b60..7cfa2029c0e0e 100644 --- a/google/cloud/dataproc/v1/session_template_controller_connection.h +++ b/google/cloud/dataproc/v1/session_template_controller_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/dataproc/v1/internal/session_template_controller_retry_traits.h" #include "google/cloud/dataproc/v1/session_template_controller_connection_idempotency_policy.h" +#include "google/cloud/dataproc/v1/session_templates.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/dataproc/v1/session_template_controller_connection_idempotency_policy.h b/google/cloud/dataproc/v1/session_template_controller_connection_idempotency_policy.h index 2a641c638f8e1..75c484c9e33ac 100644 --- a/google/cloud/dataproc/v1/session_template_controller_connection_idempotency_policy.h +++ b/google/cloud/dataproc/v1/session_template_controller_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_SESSION_TEMPLATE_CONTROLLER_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_SESSION_TEMPLATE_CONTROLLER_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dataproc/v1/session_templates.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dataproc/v1/workflow_template_client.h b/google/cloud/dataproc/v1/workflow_template_client.h index 3645bf1b3245f..6b5068f653a08 100644 --- a/google/cloud/dataproc/v1/workflow_template_client.h +++ b/google/cloud/dataproc/v1/workflow_template_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/dataproc/v1/workflow_template_connection.h b/google/cloud/dataproc/v1/workflow_template_connection.h index 44ed8e1cfbe07..9beca4f4b6a9f 100644 --- a/google/cloud/dataproc/v1/workflow_template_connection.h +++ b/google/cloud/dataproc/v1/workflow_template_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/dataproc/v1/internal/workflow_template_retry_traits.h" #include "google/cloud/dataproc/v1/workflow_template_connection_idempotency_policy.h" +#include "google/cloud/dataproc/v1/workflow_templates.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/dataproc/v1/workflow_template_connection_idempotency_policy.h b/google/cloud/dataproc/v1/workflow_template_connection_idempotency_policy.h index 86c46bc8cac38..93db3715f791b 100644 --- a/google/cloud/dataproc/v1/workflow_template_connection_idempotency_policy.h +++ b/google/cloud/dataproc/v1/workflow_template_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_WORKFLOW_TEMPLATE_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_V1_WORKFLOW_TEMPLATE_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dataproc/v1/workflow_templates.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dataproc/workflow_template_client.h b/google/cloud/dataproc/workflow_template_client.h deleted file mode 100644 index b5f00a555072a..0000000000000 --- a/google/cloud/dataproc/workflow_template_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataproc/v1/workflow_templates.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_WORKFLOW_TEMPLATE_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_WORKFLOW_TEMPLATE_CLIENT_H - -#include "google/cloud/dataproc/v1/workflow_template_client.h" -#include "google/cloud/dataproc/workflow_template_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in dataproc_v1 instead of the aliases defined in -/// this namespace. -namespace dataproc { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dataproc_v1::WorkflowTemplateServiceClient directly. -using ::google::cloud::dataproc_v1::WorkflowTemplateServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataproc -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_WORKFLOW_TEMPLATE_CLIENT_H diff --git a/google/cloud/dataproc/workflow_template_connection.h b/google/cloud/dataproc/workflow_template_connection.h deleted file mode 100644 index 0b2f944da8bd0..0000000000000 --- a/google/cloud/dataproc/workflow_template_connection.h +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataproc/v1/workflow_templates.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_WORKFLOW_TEMPLATE_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_WORKFLOW_TEMPLATE_CONNECTION_H - -#include "google/cloud/dataproc/v1/workflow_template_connection.h" -#include "google/cloud/dataproc/workflow_template_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace dataproc { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dataproc_v1::MakeWorkflowTemplateServiceConnection directly. -using ::google::cloud::dataproc_v1::MakeWorkflowTemplateServiceConnection; - -/// @deprecated Use dataproc_v1::WorkflowTemplateServiceConnection directly. -using ::google::cloud::dataproc_v1::WorkflowTemplateServiceConnection; - -/// @deprecated Use -/// dataproc_v1::WorkflowTemplateServiceLimitedErrorCountRetryPolicy directly. -using ::google::cloud::dataproc_v1:: - WorkflowTemplateServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use dataproc_v1::WorkflowTemplateServiceLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::dataproc_v1:: - WorkflowTemplateServiceLimitedTimeRetryPolicy; - -/// @deprecated Use dataproc_v1::WorkflowTemplateServiceRetryPolicy directly. -using ::google::cloud::dataproc_v1::WorkflowTemplateServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataproc -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_WORKFLOW_TEMPLATE_CONNECTION_H diff --git a/google/cloud/dataproc/workflow_template_connection_idempotency_policy.h b/google/cloud/dataproc/workflow_template_connection_idempotency_policy.h deleted file mode 100644 index 9eba029026560..0000000000000 --- a/google/cloud/dataproc/workflow_template_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataproc/v1/workflow_templates.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_WORKFLOW_TEMPLATE_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_WORKFLOW_TEMPLATE_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/dataproc/v1/workflow_template_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace dataproc { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// dataproc_v1::MakeDefaultWorkflowTemplateServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::dataproc_v1:: - MakeDefaultWorkflowTemplateServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// dataproc_v1::WorkflowTemplateServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::dataproc_v1:: - WorkflowTemplateServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataproc -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_WORKFLOW_TEMPLATE_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/dataproc/workflow_template_options.h b/google/cloud/dataproc/workflow_template_options.h deleted file mode 100644 index 551f29c9c8167..0000000000000 --- a/google/cloud/dataproc/workflow_template_options.h +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/dataproc/v1/workflow_templates.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_WORKFLOW_TEMPLATE_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_WORKFLOW_TEMPLATE_OPTIONS_H - -#include "google/cloud/dataproc/v1/workflow_template_options.h" -#include "google/cloud/dataproc/workflow_template_connection.h" -#include "google/cloud/dataproc/workflow_template_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace dataproc { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dataproc_v1::WorkflowTemplateServicePollingPolicyOption -/// directly. -using ::google::cloud::dataproc_v1::WorkflowTemplateServicePollingPolicyOption; - -/// @deprecated Use dataproc_v1::WorkflowTemplateServiceBackoffPolicyOption -/// directly. -using ::google::cloud::dataproc_v1::WorkflowTemplateServiceBackoffPolicyOption; - -/// @deprecated Use -/// dataproc_v1::WorkflowTemplateServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::dataproc_v1:: - WorkflowTemplateServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use dataproc_v1::WorkflowTemplateServicePolicyOptionList -/// directly. -using ::google::cloud::dataproc_v1::WorkflowTemplateServicePolicyOptionList; - -/// @deprecated Use dataproc_v1::WorkflowTemplateServiceRetryPolicyOption -/// directly. -using ::google::cloud::dataproc_v1::WorkflowTemplateServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dataproc -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATAPROC_WORKFLOW_TEMPLATE_OPTIONS_H diff --git a/google/cloud/datastore/BUILD.bazel b/google/cloud/datastore/BUILD.bazel index 7dd59551f7cb6..2e35b12614b8d 100644 --- a/google/cloud/datastore/BUILD.bazel +++ b/google/cloud/datastore/BUILD.bazel @@ -24,7 +24,7 @@ service_dirs = [ ] googleapis_deps = [ - "@com_google_googleapis//google/datastore/v1:datastore_cc_grpc", + "@googleapis//google/datastore/v1:datastore_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/datastore/admin/v1/datastore_admin_client.h b/google/cloud/datastore/admin/v1/datastore_admin_client.h index ea9a131878b8c..0187365b0cd68 100644 --- a/google/cloud/datastore/admin/v1/datastore_admin_client.h +++ b/google/cloud/datastore/admin/v1/datastore_admin_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/datastore/admin/v1/datastore_admin_connection.h b/google/cloud/datastore/admin/v1/datastore_admin_connection.h index c9099e4d3d219..103a89ccbee99 100644 --- a/google/cloud/datastore/admin/v1/datastore_admin_connection.h +++ b/google/cloud/datastore/admin/v1/datastore_admin_connection.h @@ -30,8 +30,8 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/datastore/admin/v1/datastore_admin.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/datastore/admin/v1/datastore_admin_connection_idempotency_policy.h b/google/cloud/datastore/admin/v1/datastore_admin_connection_idempotency_policy.h index d78abe1cd49ba..da8562b1d7271 100644 --- a/google/cloud/datastore/admin/v1/datastore_admin_connection_idempotency_policy.h +++ b/google/cloud/datastore/admin/v1/datastore_admin_connection_idempotency_policy.h @@ -21,8 +21,8 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/datastore/admin/v1/datastore_admin.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/datastore/admin/v1/internal/datastore_admin_auth_decorator.cc b/google/cloud/datastore/admin/v1/internal/datastore_admin_auth_decorator.cc index 50fc0ee8b3c64..ad6d399462a85 100644 --- a/google/cloud/datastore/admin/v1/internal/datastore_admin_auth_decorator.cc +++ b/google/cloud/datastore/admin/v1/internal/datastore_admin_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/datastore/admin/v1/datastore_admin.proto #include "google/cloud/datastore/admin/v1/internal/datastore_admin_auth_decorator.h" -#include +#include "google/datastore/admin/v1/datastore_admin.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastore_admin_v1_internal { @@ -233,3 +236,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datastore_admin_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datastore/admin/v1/internal/datastore_admin_auth_decorator.h b/google/cloud/datastore/admin/v1/internal/datastore_admin_auth_decorator.h index 4c4c2666859b1..86e442a940e5a 100644 --- a/google/cloud/datastore/admin/v1/internal/datastore_admin_auth_decorator.h +++ b/google/cloud/datastore/admin/v1/internal/datastore_admin_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/datastore/admin/v1/internal/datastore_admin_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastore_admin_v1_internal { @@ -129,4 +132,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTORE_ADMIN_V1_INTERNAL_DATASTORE_ADMIN_AUTH_DECORATOR_H diff --git a/google/cloud/datastore/admin/v1/internal/datastore_admin_connection_impl.h b/google/cloud/datastore/admin/v1/internal/datastore_admin_connection_impl.h index f541a356bc2b6..621cf39ac9263 100644 --- a/google/cloud/datastore/admin/v1/internal/datastore_admin_connection_impl.h +++ b/google/cloud/datastore/admin/v1/internal/datastore_admin_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/datastore/admin/v1/internal/datastore_admin_logging_decorator.cc b/google/cloud/datastore/admin/v1/internal/datastore_admin_logging_decorator.cc index 0e6b75596b449..00e2aec166080 100644 --- a/google/cloud/datastore/admin/v1/internal/datastore_admin_logging_decorator.cc +++ b/google/cloud/datastore/admin/v1/internal/datastore_admin_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/datastore/admin/v1/internal/datastore_admin_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/datastore/admin/v1/datastore_admin.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastore_admin_v1_internal { @@ -262,3 +265,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datastore_admin_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datastore/admin/v1/internal/datastore_admin_logging_decorator.h b/google/cloud/datastore/admin/v1/internal/datastore_admin_logging_decorator.h index 41cebc3dbde67..d5cae052e2440 100644 --- a/google/cloud/datastore/admin/v1/internal/datastore_admin_logging_decorator.h +++ b/google/cloud/datastore/admin/v1/internal/datastore_admin_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/datastore/admin/v1/internal/datastore_admin_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastore_admin_v1_internal { @@ -129,4 +132,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTORE_ADMIN_V1_INTERNAL_DATASTORE_ADMIN_LOGGING_DECORATOR_H diff --git a/google/cloud/datastore/admin/v1/internal/datastore_admin_metadata_decorator.cc b/google/cloud/datastore/admin/v1/internal/datastore_admin_metadata_decorator.cc index 50fcd44fc5be0..d3809a8bf8559 100644 --- a/google/cloud/datastore/admin/v1/internal/datastore_admin_metadata_decorator.cc +++ b/google/cloud/datastore/admin/v1/internal/datastore_admin_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/datastore/admin/v1/internal/datastore_admin_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/datastore/admin/v1/datastore_admin.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastore_admin_v1_internal { @@ -227,3 +231,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datastore_admin_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datastore/admin/v1/internal/datastore_admin_metadata_decorator.h b/google/cloud/datastore/admin/v1/internal/datastore_admin_metadata_decorator.h index 8884cb69ff0d5..b418ee4e3c4db 100644 --- a/google/cloud/datastore/admin/v1/internal/datastore_admin_metadata_decorator.h +++ b/google/cloud/datastore/admin/v1/internal/datastore_admin_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/datastore/admin/v1/internal/datastore_admin_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastore_admin_v1_internal { @@ -134,4 +137,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTORE_ADMIN_V1_INTERNAL_DATASTORE_ADMIN_METADATA_DECORATOR_H diff --git a/google/cloud/datastore/admin/v1/internal/datastore_admin_option_defaults.cc b/google/cloud/datastore/admin/v1/internal/datastore_admin_option_defaults.cc index 3b1e5447bb05b..469e4947fd78a 100644 --- a/google/cloud/datastore/admin/v1/internal/datastore_admin_option_defaults.cc +++ b/google/cloud/datastore/admin/v1/internal/datastore_admin_option_defaults.cc @@ -42,7 +42,7 @@ Options DatastoreAdminDefaultOptions(Options options) { if (!options.has()) { options.set( datastore_admin_v1::DatastoreAdminLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/datastore/admin/v1/internal/datastore_admin_stub.cc b/google/cloud/datastore/admin/v1/internal/datastore_admin_stub.cc index a0f65d13304d6..ff1cf02aee97e 100644 --- a/google/cloud/datastore/admin/v1/internal/datastore_admin_stub.cc +++ b/google/cloud/datastore/admin/v1/internal/datastore_admin_stub.cc @@ -19,11 +19,14 @@ #include "google/cloud/datastore/admin/v1/internal/datastore_admin_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/datastore/admin/v1/datastore_admin.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastore_admin_v1_internal { @@ -262,3 +265,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datastore_admin_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datastore/admin/v1/internal/datastore_admin_stub.h b/google/cloud/datastore/admin/v1/internal/datastore_admin_stub.h index 2265f2417937e..4a7dc26a33a70 100644 --- a/google/cloud/datastore/admin/v1/internal/datastore_admin_stub.h +++ b/google/cloud/datastore/admin/v1/internal/datastore_admin_stub.h @@ -24,11 +24,14 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/datastore/admin/v1/datastore_admin.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastore_admin_v1_internal { @@ -219,4 +222,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTORE_ADMIN_V1_INTERNAL_DATASTORE_ADMIN_STUB_H diff --git a/google/cloud/datastore/admin/v1/internal/datastore_admin_stub_factory.cc b/google/cloud/datastore/admin/v1/internal/datastore_admin_stub_factory.cc index 3bc370a35ff10..53f8ee3389c2a 100644 --- a/google/cloud/datastore/admin/v1/internal/datastore_admin_stub_factory.cc +++ b/google/cloud/datastore/admin/v1/internal/datastore_admin_stub_factory.cc @@ -28,11 +28,14 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/datastore/admin/v1/datastore_admin.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastore_admin_v1_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datastore_admin_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datastore/admin/v1/internal/datastore_admin_stub_factory.h b/google/cloud/datastore/admin/v1/internal/datastore_admin_stub_factory.h index fa31f6e6e340a..61a203ca3af6d 100644 --- a/google/cloud/datastore/admin/v1/internal/datastore_admin_stub_factory.h +++ b/google/cloud/datastore/admin/v1/internal/datastore_admin_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastore_admin_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTORE_ADMIN_V1_INTERNAL_DATASTORE_ADMIN_STUB_FACTORY_H diff --git a/google/cloud/datastore/admin/v1/internal/datastore_admin_tracing_connection.cc b/google/cloud/datastore/admin/v1/internal/datastore_admin_tracing_connection.cc index 1bf2e5beba331..cc55fecc9aa88 100644 --- a/google/cloud/datastore/admin/v1/internal/datastore_admin_tracing_connection.cc +++ b/google/cloud/datastore/admin/v1/internal/datastore_admin_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace datastore_admin_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DatastoreAdminTracingConnection::DatastoreAdminTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -203,16 +201,12 @@ Status DatastoreAdminTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDatastoreAdminTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/datastore/admin/v1/internal/datastore_admin_tracing_connection.h b/google/cloud/datastore/admin/v1/internal/datastore_admin_tracing_connection.h index cc75bbe19c420..18baf26e2af5e 100644 --- a/google/cloud/datastore/admin/v1/internal/datastore_admin_tracing_connection.h +++ b/google/cloud/datastore/admin/v1/internal/datastore_admin_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace datastore_admin_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DatastoreAdminTracingConnection : public datastore_admin_v1::DatastoreAdminConnection { public: @@ -106,8 +104,6 @@ class DatastoreAdminTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/datastore/admin/v1/internal/datastore_admin_tracing_stub.cc b/google/cloud/datastore/admin/v1/internal/datastore_admin_tracing_stub.cc index 6206228035d4a..7957f44ccc1d6 100644 --- a/google/cloud/datastore/admin/v1/internal/datastore_admin_tracing_stub.cc +++ b/google/cloud/datastore/admin/v1/internal/datastore_admin_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastore_admin_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DatastoreAdminTracingStub::DatastoreAdminTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -234,18 +235,14 @@ future DatastoreAdminTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDatastoreAdminTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datastore_admin_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datastore/admin/v1/internal/datastore_admin_tracing_stub.h b/google/cloud/datastore/admin/v1/internal/datastore_admin_tracing_stub.h index 10d180880c4e1..eb9d85dd4f28d 100644 --- a/google/cloud/datastore/admin/v1/internal/datastore_admin_tracing_stub.h +++ b/google/cloud/datastore/admin/v1/internal/datastore_admin_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastore_admin_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DatastoreAdminTracingStub : public DatastoreAdminStub { public: ~DatastoreAdminTracingStub() override = default; @@ -124,8 +125,6 @@ class DatastoreAdminTracingStub : public DatastoreAdminStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -140,4 +139,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTORE_ADMIN_V1_INTERNAL_DATASTORE_ADMIN_TRACING_STUB_H diff --git a/google/cloud/datastore/quickstart/.bazelrc b/google/cloud/datastore/quickstart/.bazelrc index 6777c6b4c95de..ec27511a60add 100644 --- a/google/cloud/datastore/quickstart/.bazelrc +++ b/google/cloud/datastore/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/datastore/quickstart/CMakeLists.txt b/google/cloud/datastore/quickstart/CMakeLists.txt index faea20bebf6e1..321cb9280941f 100644 --- a/google/cloud/datastore/quickstart/CMakeLists.txt +++ b/google/cloud/datastore/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Datastore API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-datastore-quickstart CXX) find_package(google_cloud_cpp_datastore REQUIRED) diff --git a/google/cloud/datastore/v1/datastore_connection.h b/google/cloud/datastore/v1/datastore_connection.h index 06e36424b98a4..46a1cc970670f 100644 --- a/google/cloud/datastore/v1/datastore_connection.h +++ b/google/cloud/datastore/v1/datastore_connection.h @@ -27,7 +27,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/datastore/v1/datastore.pb.h" #include namespace google { diff --git a/google/cloud/datastore/v1/datastore_connection_idempotency_policy.h b/google/cloud/datastore/v1/datastore_connection_idempotency_policy.h index 339f92870f611..0752442af1aa4 100644 --- a/google/cloud/datastore/v1/datastore_connection_idempotency_policy.h +++ b/google/cloud/datastore/v1/datastore_connection_idempotency_policy.h @@ -21,8 +21,8 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/datastore/v1/datastore.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/datastore/v1/internal/datastore_auth_decorator.cc b/google/cloud/datastore/v1/internal/datastore_auth_decorator.cc index dc753020aefd7..4bea4bbbd12d1 100644 --- a/google/cloud/datastore/v1/internal/datastore_auth_decorator.cc +++ b/google/cloud/datastore/v1/internal/datastore_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/datastore/v1/datastore.proto #include "google/cloud/datastore/v1/internal/datastore_auth_decorator.h" -#include +#include "google/datastore/v1/datastore.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastore_v1_internal { @@ -134,3 +137,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datastore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datastore/v1/internal/datastore_auth_decorator.h b/google/cloud/datastore/v1/internal/datastore_auth_decorator.h index 34ebff80e7215..af33c72e21f40 100644 --- a/google/cloud/datastore/v1/internal/datastore_auth_decorator.h +++ b/google/cloud/datastore/v1/internal/datastore_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastore_v1_internal { @@ -97,4 +100,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTORE_V1_INTERNAL_DATASTORE_AUTH_DECORATOR_H diff --git a/google/cloud/datastore/v1/internal/datastore_logging_decorator.cc b/google/cloud/datastore/v1/internal/datastore_logging_decorator.cc index ae2aff0b08191..9f3fb67c69f8f 100644 --- a/google/cloud/datastore/v1/internal/datastore_logging_decorator.cc +++ b/google/cloud/datastore/v1/internal/datastore_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/datastore/v1/internal/datastore_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/datastore/v1/datastore.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastore_v1_internal { @@ -176,3 +179,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datastore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datastore/v1/internal/datastore_logging_decorator.h b/google/cloud/datastore/v1/internal/datastore_logging_decorator.h index 3fe5acb27c08a..058070244b3d1 100644 --- a/google/cloud/datastore/v1/internal/datastore_logging_decorator.h +++ b/google/cloud/datastore/v1/internal/datastore_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastore_v1_internal { @@ -97,4 +100,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTORE_V1_INTERNAL_DATASTORE_LOGGING_DECORATOR_H diff --git a/google/cloud/datastore/v1/internal/datastore_metadata_decorator.cc b/google/cloud/datastore/v1/internal/datastore_metadata_decorator.cc index 28ec5bff2f177..1842eb1f274f1 100644 --- a/google/cloud/datastore/v1/internal/datastore_metadata_decorator.cc +++ b/google/cloud/datastore/v1/internal/datastore_metadata_decorator.cc @@ -18,18 +18,21 @@ #include "google/cloud/datastore/v1/internal/datastore_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/routing_matcher.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/datastore/v1/datastore.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastore_v1_internal { @@ -292,3 +295,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datastore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datastore/v1/internal/datastore_metadata_decorator.h b/google/cloud/datastore/v1/internal/datastore_metadata_decorator.h index ed4e7e77e87cb..d6eaa392abd82 100644 --- a/google/cloud/datastore/v1/internal/datastore_metadata_decorator.h +++ b/google/cloud/datastore/v1/internal/datastore_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastore_v1_internal { @@ -102,4 +105,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTORE_V1_INTERNAL_DATASTORE_METADATA_DECORATOR_H diff --git a/google/cloud/datastore/v1/internal/datastore_option_defaults.cc b/google/cloud/datastore/v1/internal/datastore_option_defaults.cc index d685127f29137..4b1b3d3263293 100644 --- a/google/cloud/datastore/v1/internal/datastore_option_defaults.cc +++ b/google/cloud/datastore/v1/internal/datastore_option_defaults.cc @@ -41,7 +41,7 @@ Options DatastoreDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - datastore_v1::DatastoreLimitedTimeRetryPolicy(std::chrono::minutes(30)) + datastore_v1::DatastoreLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/datastore/v1/internal/datastore_stub.cc b/google/cloud/datastore/v1/internal/datastore_stub.cc index 0ef6628f24e0f..d7c626c3c0b8a 100644 --- a/google/cloud/datastore/v1/internal/datastore_stub.cc +++ b/google/cloud/datastore/v1/internal/datastore_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/datastore/v1/internal/datastore_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "google/datastore/v1/datastore.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastore_v1_internal { @@ -173,3 +176,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datastore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datastore/v1/internal/datastore_stub.h b/google/cloud/datastore/v1/internal/datastore_stub.h index 89b6d51c4d392..3a83b831100b3 100644 --- a/google/cloud/datastore/v1/internal/datastore_stub.h +++ b/google/cloud/datastore/v1/internal/datastore_stub.h @@ -22,11 +22,14 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/datastore/v1/datastore.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastore_v1_internal { @@ -157,4 +160,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTORE_V1_INTERNAL_DATASTORE_STUB_H diff --git a/google/cloud/datastore/v1/internal/datastore_stub_factory.cc b/google/cloud/datastore/v1/internal/datastore_stub_factory.cc index c6c447e9afe51..bdd5ea30d7ca5 100644 --- a/google/cloud/datastore/v1/internal/datastore_stub_factory.cc +++ b/google/cloud/datastore/v1/internal/datastore_stub_factory.cc @@ -28,11 +28,14 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/datastore/v1/datastore.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastore_v1_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datastore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datastore/v1/internal/datastore_stub_factory.h b/google/cloud/datastore/v1/internal/datastore_stub_factory.h index 59ff8fda1651b..354bfb8a4216b 100644 --- a/google/cloud/datastore/v1/internal/datastore_stub_factory.h +++ b/google/cloud/datastore/v1/internal/datastore_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastore_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTORE_V1_INTERNAL_DATASTORE_STUB_FACTORY_H diff --git a/google/cloud/datastore/v1/internal/datastore_tracing_connection.cc b/google/cloud/datastore/v1/internal/datastore_tracing_connection.cc index d4f4b8375f692..06cad33326eea 100644 --- a/google/cloud/datastore/v1/internal/datastore_tracing_connection.cc +++ b/google/cloud/datastore/v1/internal/datastore_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace datastore_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DatastoreTracingConnection::DatastoreTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -137,16 +135,12 @@ Status DatastoreTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDatastoreTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/datastore/v1/internal/datastore_tracing_connection.h b/google/cloud/datastore/v1/internal/datastore_tracing_connection.h index aa91ac9fad0eb..ed4689bcfc712 100644 --- a/google/cloud/datastore/v1/internal/datastore_tracing_connection.h +++ b/google/cloud/datastore/v1/internal/datastore_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace datastore_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DatastoreTracingConnection : public datastore_v1::DatastoreConnection { public: ~DatastoreTracingConnection() override = default; @@ -80,8 +78,6 @@ class DatastoreTracingConnection : public datastore_v1::DatastoreConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/datastore/v1/internal/datastore_tracing_stub.cc b/google/cloud/datastore/v1/internal/datastore_tracing_stub.cc index 2a2f172352050..3c814b707c33c 100644 --- a/google/cloud/datastore/v1/internal/datastore_tracing_stub.cc +++ b/google/cloud/datastore/v1/internal/datastore_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastore_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DatastoreTracingStub::DatastoreTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -168,18 +169,14 @@ Status DatastoreTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDatastoreTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datastore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datastore/v1/internal/datastore_tracing_stub.h b/google/cloud/datastore/v1/internal/datastore_tracing_stub.h index d18386e8fce74..d01a2a7e6f472 100644 --- a/google/cloud/datastore/v1/internal/datastore_tracing_stub.h +++ b/google/cloud/datastore/v1/internal/datastore_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastore_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DatastoreTracingStub : public DatastoreStub { public: ~DatastoreTracingStub() override = default; @@ -93,8 +94,6 @@ class DatastoreTracingStub : public DatastoreStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -109,4 +108,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTORE_V1_INTERNAL_DATASTORE_TRACING_STUB_H diff --git a/google/cloud/datastream/BUILD.bazel b/google/cloud/datastream/BUILD.bazel index 4971ef90eba7d..f41c27dcf4992 100644 --- a/google/cloud/datastream/BUILD.bazel +++ b/google/cloud/datastream/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/datastream/v1:datastream_cc_grpc", + "@googleapis//google/cloud/datastream/v1:datastream_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/datastream/CMakeLists.txt b/google/cloud/datastream/CMakeLists.txt index 7d1f1647a60d6..e59ba3ab14e63 100644 --- a/google/cloud/datastream/CMakeLists.txt +++ b/google/cloud/datastream/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(datastream "Datastream API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(datastream_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/datastream/datastream_client.h b/google/cloud/datastream/datastream_client.h deleted file mode 100644 index 05a31759875aa..0000000000000 --- a/google/cloud/datastream/datastream_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/datastream/v1/datastream.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTREAM_DATASTREAM_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTREAM_DATASTREAM_CLIENT_H - -#include "google/cloud/datastream/datastream_connection.h" -#include "google/cloud/datastream/v1/datastream_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in datastream_v1 instead of the aliases defined in -/// this namespace. -namespace datastream { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use datastream_v1::DatastreamClient directly. -using ::google::cloud::datastream_v1::DatastreamClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace datastream -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTREAM_DATASTREAM_CLIENT_H diff --git a/google/cloud/datastream/datastream_connection.h b/google/cloud/datastream/datastream_connection.h deleted file mode 100644 index dd0f934ecb2d6..0000000000000 --- a/google/cloud/datastream/datastream_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/datastream/v1/datastream.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTREAM_DATASTREAM_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTREAM_DATASTREAM_CONNECTION_H - -#include "google/cloud/datastream/datastream_connection_idempotency_policy.h" -#include "google/cloud/datastream/v1/datastream_connection.h" - -namespace google { -namespace cloud { -namespace datastream { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use datastream_v1::MakeDatastreamConnection directly. -using ::google::cloud::datastream_v1::MakeDatastreamConnection; - -/// @deprecated Use datastream_v1::DatastreamConnection directly. -using ::google::cloud::datastream_v1::DatastreamConnection; - -/// @deprecated Use datastream_v1::DatastreamLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::datastream_v1::DatastreamLimitedErrorCountRetryPolicy; - -/// @deprecated Use datastream_v1::DatastreamLimitedTimeRetryPolicy directly. -using ::google::cloud::datastream_v1::DatastreamLimitedTimeRetryPolicy; - -/// @deprecated Use datastream_v1::DatastreamRetryPolicy directly. -using ::google::cloud::datastream_v1::DatastreamRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace datastream -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTREAM_DATASTREAM_CONNECTION_H diff --git a/google/cloud/datastream/datastream_connection_idempotency_policy.h b/google/cloud/datastream/datastream_connection_idempotency_policy.h deleted file mode 100644 index d64567b1c1d4f..0000000000000 --- a/google/cloud/datastream/datastream_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/datastream/v1/datastream.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTREAM_DATASTREAM_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTREAM_DATASTREAM_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/datastream/v1/datastream_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace datastream { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// datastream_v1::MakeDefaultDatastreamConnectionIdempotencyPolicy directly. -using ::google::cloud::datastream_v1:: - MakeDefaultDatastreamConnectionIdempotencyPolicy; - -/// @deprecated Use datastream_v1::DatastreamConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::datastream_v1::DatastreamConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace datastream -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTREAM_DATASTREAM_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/datastream/datastream_options.h b/google/cloud/datastream/datastream_options.h deleted file mode 100644 index 51ddcafce2463..0000000000000 --- a/google/cloud/datastream/datastream_options.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/datastream/v1/datastream.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTREAM_DATASTREAM_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTREAM_DATASTREAM_OPTIONS_H - -#include "google/cloud/datastream/datastream_connection.h" -#include "google/cloud/datastream/datastream_connection_idempotency_policy.h" -#include "google/cloud/datastream/v1/datastream_options.h" - -namespace google { -namespace cloud { -namespace datastream { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use datastream_v1::DatastreamPollingPolicyOption directly. -using ::google::cloud::datastream_v1::DatastreamPollingPolicyOption; - -/// @deprecated Use datastream_v1::DatastreamBackoffPolicyOption directly. -using ::google::cloud::datastream_v1::DatastreamBackoffPolicyOption; - -/// @deprecated Use datastream_v1::DatastreamConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::datastream_v1:: - DatastreamConnectionIdempotencyPolicyOption; - -/// @deprecated Use datastream_v1::DatastreamPolicyOptionList directly. -using ::google::cloud::datastream_v1::DatastreamPolicyOptionList; - -/// @deprecated Use datastream_v1::DatastreamRetryPolicyOption directly. -using ::google::cloud::datastream_v1::DatastreamRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace datastream -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTREAM_DATASTREAM_OPTIONS_H diff --git a/google/cloud/datastream/mocks/mock_datastream_connection.h b/google/cloud/datastream/mocks/mock_datastream_connection.h deleted file mode 100644 index 31451dc76b8e1..0000000000000 --- a/google/cloud/datastream/mocks/mock_datastream_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/datastream/v1/datastream.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTREAM_MOCKS_MOCK_DATASTREAM_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTREAM_MOCKS_MOCK_DATASTREAM_CONNECTION_H - -#include "google/cloud/datastream/datastream_connection.h" -#include "google/cloud/datastream/v1/mocks/mock_datastream_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in datastream_v1_mocks instead of the aliases -/// defined in this namespace. -namespace datastream_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use datastream_v1_mocks::MockDatastreamConnection directly. -using ::google::cloud::datastream_v1_mocks::MockDatastreamConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace datastream_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTREAM_MOCKS_MOCK_DATASTREAM_CONNECTION_H diff --git a/google/cloud/datastream/quickstart/.bazelrc b/google/cloud/datastream/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/datastream/quickstart/.bazelrc +++ b/google/cloud/datastream/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/datastream/quickstart/CMakeLists.txt b/google/cloud/datastream/quickstart/CMakeLists.txt index e1add349e9928..9df1675dbdcec 100644 --- a/google/cloud/datastream/quickstart/CMakeLists.txt +++ b/google/cloud/datastream/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Datastream API C++ client library from a larger # CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-datastream-quickstart CXX) find_package(google_cloud_cpp_datastream REQUIRED) diff --git a/google/cloud/datastream/v1/datastream_client.h b/google/cloud/datastream/v1/datastream_client.h index 9004c02c24906..00348d3b5a124 100644 --- a/google/cloud/datastream/v1/datastream_client.h +++ b/google/cloud/datastream/v1/datastream_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/datastream/v1/datastream_connection.h b/google/cloud/datastream/v1/datastream_connection.h index 972cfe39f5a70..065f7b559cc07 100644 --- a/google/cloud/datastream/v1/datastream_connection.h +++ b/google/cloud/datastream/v1/datastream_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTREAM_V1_DATASTREAM_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTREAM_V1_DATASTREAM_CONNECTION_H +#include "google/cloud/datastream/v1/datastream.pb.h" #include "google/cloud/datastream/v1/datastream_connection_idempotency_policy.h" #include "google/cloud/datastream/v1/internal/datastream_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/datastream/v1/datastream_connection_idempotency_policy.h b/google/cloud/datastream/v1/datastream_connection_idempotency_policy.h index 218721fd12df2..0f6d6a407bae1 100644 --- a/google/cloud/datastream/v1/datastream_connection_idempotency_policy.h +++ b/google/cloud/datastream/v1/datastream_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTREAM_V1_DATASTREAM_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTREAM_V1_DATASTREAM_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/datastream/v1/datastream.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/datastream/v1/internal/datastream_auth_decorator.cc b/google/cloud/datastream/v1/internal/datastream_auth_decorator.cc index 10dafd93da01f..1e8cb39aa97e1 100644 --- a/google/cloud/datastream/v1/internal/datastream_auth_decorator.cc +++ b/google/cloud/datastream/v1/internal/datastream_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/datastream/v1/datastream.proto #include "google/cloud/datastream/v1/internal/datastream_auth_decorator.h" -#include +#include "google/cloud/datastream/v1/datastream.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastream_v1_internal { @@ -579,3 +582,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datastream_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datastream/v1/internal/datastream_auth_decorator.h b/google/cloud/datastream/v1/internal/datastream_auth_decorator.h index 241732273d01d..f1fe66bb02f5c 100644 --- a/google/cloud/datastream/v1/internal/datastream_auth_decorator.h +++ b/google/cloud/datastream/v1/internal/datastream_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/datastream/v1/internal/datastream_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastream_v1_internal { @@ -293,4 +296,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTREAM_V1_INTERNAL_DATASTREAM_AUTH_DECORATOR_H diff --git a/google/cloud/datastream/v1/internal/datastream_connection_impl.h b/google/cloud/datastream/v1/internal/datastream_connection_impl.h index 95bd3eabcc5b7..7f2d3e2f5b8fb 100644 --- a/google/cloud/datastream/v1/internal/datastream_connection_impl.h +++ b/google/cloud/datastream/v1/internal/datastream_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/datastream/v1/internal/datastream_logging_decorator.cc b/google/cloud/datastream/v1/internal/datastream_logging_decorator.cc index 20e6289c26df2..c85771cf9d271 100644 --- a/google/cloud/datastream/v1/internal/datastream_logging_decorator.cc +++ b/google/cloud/datastream/v1/internal/datastream_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/datastream/v1/datastream.proto #include "google/cloud/datastream/v1/internal/datastream_logging_decorator.h" +#include "google/cloud/datastream/v1/datastream.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastream_v1_internal { @@ -695,3 +698,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datastream_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datastream/v1/internal/datastream_logging_decorator.h b/google/cloud/datastream/v1/internal/datastream_logging_decorator.h index 84020d3685403..1d2ad8558f6e7 100644 --- a/google/cloud/datastream/v1/internal/datastream_logging_decorator.h +++ b/google/cloud/datastream/v1/internal/datastream_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/datastream/v1/internal/datastream_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastream_v1_internal { @@ -293,4 +296,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTREAM_V1_INTERNAL_DATASTREAM_LOGGING_DECORATOR_H diff --git a/google/cloud/datastream/v1/internal/datastream_metadata_decorator.cc b/google/cloud/datastream/v1/internal/datastream_metadata_decorator.cc index e44f48abdfcd5..1ea5b80aed626 100644 --- a/google/cloud/datastream/v1/internal/datastream_metadata_decorator.cc +++ b/google/cloud/datastream/v1/internal/datastream_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/datastream/v1/datastream.proto #include "google/cloud/datastream/v1/internal/datastream_metadata_decorator.h" +#include "google/cloud/datastream/v1/datastream.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastream_v1_internal { @@ -511,3 +515,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datastream_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datastream/v1/internal/datastream_metadata_decorator.h b/google/cloud/datastream/v1/internal/datastream_metadata_decorator.h index a04f014b1851d..e6cf0fca4a24c 100644 --- a/google/cloud/datastream/v1/internal/datastream_metadata_decorator.h +++ b/google/cloud/datastream/v1/internal/datastream_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/datastream/v1/internal/datastream_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastream_v1_internal { @@ -298,4 +301,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTREAM_V1_INTERNAL_DATASTREAM_METADATA_DECORATOR_H diff --git a/google/cloud/datastream/v1/internal/datastream_option_defaults.cc b/google/cloud/datastream/v1/internal/datastream_option_defaults.cc index 182e71d48e0b8..e3491464078bd 100644 --- a/google/cloud/datastream/v1/internal/datastream_option_defaults.cc +++ b/google/cloud/datastream/v1/internal/datastream_option_defaults.cc @@ -41,7 +41,7 @@ Options DatastreamDefaultOptions(Options options) { if (!options.has()) { options.set( datastream_v1::DatastreamLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/datastream/v1/internal/datastream_stub.cc b/google/cloud/datastream/v1/internal/datastream_stub.cc index c9ee81c7c940b..6fb7c62ab860f 100644 --- a/google/cloud/datastream/v1/internal/datastream_stub.cc +++ b/google/cloud/datastream/v1/internal/datastream_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/datastream/v1/datastream.proto #include "google/cloud/datastream/v1/internal/datastream_stub.h" +#include "google/cloud/datastream/v1/datastream.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastream_v1_internal { @@ -676,3 +679,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datastream_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datastream/v1/internal/datastream_stub.h b/google/cloud/datastream/v1/internal/datastream_stub.h index 736d46fb60334..d2f10890646f0 100644 --- a/google/cloud/datastream/v1/internal/datastream_stub.h +++ b/google/cloud/datastream/v1/internal/datastream_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTREAM_V1_INTERNAL_DATASTREAM_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTREAM_V1_INTERNAL_DATASTREAM_STUB_H +#include "google/cloud/datastream/v1/datastream.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastream_v1_internal { @@ -555,4 +558,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTREAM_V1_INTERNAL_DATASTREAM_STUB_H diff --git a/google/cloud/datastream/v1/internal/datastream_stub_factory.cc b/google/cloud/datastream/v1/internal/datastream_stub_factory.cc index 67a346705683f..d58de1a5f7404 100644 --- a/google/cloud/datastream/v1/internal/datastream_stub_factory.cc +++ b/google/cloud/datastream/v1/internal/datastream_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/datastream/v1/datastream.proto #include "google/cloud/datastream/v1/internal/datastream_stub_factory.h" +#include "google/cloud/datastream/v1/datastream.grpc.pb.h" #include "google/cloud/datastream/v1/internal/datastream_auth_decorator.h" #include "google/cloud/datastream/v1/internal/datastream_logging_decorator.h" #include "google/cloud/datastream/v1/internal/datastream_metadata_decorator.h" #include "google/cloud/datastream/v1/internal/datastream_stub.h" #include "google/cloud/datastream/v1/internal/datastream_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastream_v1_internal { @@ -74,3 +77,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datastream_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datastream/v1/internal/datastream_stub_factory.h b/google/cloud/datastream/v1/internal/datastream_stub_factory.h index 0445d8c93604e..473275b5b8ab4 100644 --- a/google/cloud/datastream/v1/internal/datastream_stub_factory.h +++ b/google/cloud/datastream/v1/internal/datastream_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastream_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTREAM_V1_INTERNAL_DATASTREAM_STUB_FACTORY_H diff --git a/google/cloud/datastream/v1/internal/datastream_tracing_connection.cc b/google/cloud/datastream/v1/internal/datastream_tracing_connection.cc index a032d3bf82332..48e77e0cf177a 100644 --- a/google/cloud/datastream/v1/internal/datastream_tracing_connection.cc +++ b/google/cloud/datastream/v1/internal/datastream_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace datastream_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DatastreamTracingConnection::DatastreamTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -571,16 +569,12 @@ Status DatastreamTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDatastreamTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/datastream/v1/internal/datastream_tracing_connection.h b/google/cloud/datastream/v1/internal/datastream_tracing_connection.h index 65e6cccafd2bb..76c9db8d2fe09 100644 --- a/google/cloud/datastream/v1/internal/datastream_tracing_connection.h +++ b/google/cloud/datastream/v1/internal/datastream_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace datastream_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DatastreamTracingConnection : public datastream_v1::DatastreamConnection { public: ~DatastreamTracingConnection() override = default; @@ -260,8 +258,6 @@ class DatastreamTracingConnection : public datastream_v1::DatastreamConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/datastream/v1/internal/datastream_tracing_stub.cc b/google/cloud/datastream/v1/internal/datastream_tracing_stub.cc index aab8abe8be698..6a5e31fb5f9ec 100644 --- a/google/cloud/datastream/v1/internal/datastream_tracing_stub.cc +++ b/google/cloud/datastream/v1/internal/datastream_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastream_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DatastreamTracingStub::DatastreamTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -613,18 +614,14 @@ future DatastreamTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDatastreamTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace datastream_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/datastream/v1/internal/datastream_tracing_stub.h b/google/cloud/datastream/v1/internal/datastream_tracing_stub.h index 9b8e5503a8857..3d265fbe5a315 100644 --- a/google/cloud/datastream/v1/internal/datastream_tracing_stub.h +++ b/google/cloud/datastream/v1/internal/datastream_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace datastream_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DatastreamTracingStub : public DatastreamStub { public: ~DatastreamTracingStub() override = default; @@ -288,8 +289,6 @@ class DatastreamTracingStub : public DatastreamStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -304,4 +303,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DATASTREAM_V1_INTERNAL_DATASTREAM_TRACING_STUB_H diff --git a/google/cloud/deploy/BUILD.bazel b/google/cloud/deploy/BUILD.bazel index 7d2b0d82079bc..48b8fee93430a 100644 --- a/google/cloud/deploy/BUILD.bazel +++ b/google/cloud/deploy/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/deploy/v1:deploy_cc_grpc", + "@googleapis//google/cloud/deploy/v1:deploy_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/deploy/CMakeLists.txt b/google/cloud/deploy/CMakeLists.txt index 54b8843ba6edb..aca4ff1c43874 100644 --- a/google/cloud/deploy/CMakeLists.txt +++ b/google/cloud/deploy/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(deploy "Google Cloud Deploy API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(deploy_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/deploy/cloud_deploy_client.h b/google/cloud/deploy/cloud_deploy_client.h deleted file mode 100644 index 22f428899a9a0..0000000000000 --- a/google/cloud/deploy/cloud_deploy_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/deploy/v1/cloud_deploy.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEPLOY_CLOUD_DEPLOY_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEPLOY_CLOUD_DEPLOY_CLIENT_H - -#include "google/cloud/deploy/cloud_deploy_connection.h" -#include "google/cloud/deploy/v1/cloud_deploy_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in deploy_v1 instead of the aliases defined in -/// this namespace. -namespace deploy { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use deploy_v1::CloudDeployClient directly. -using ::google::cloud::deploy_v1::CloudDeployClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace deploy -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEPLOY_CLOUD_DEPLOY_CLIENT_H diff --git a/google/cloud/deploy/cloud_deploy_connection.h b/google/cloud/deploy/cloud_deploy_connection.h deleted file mode 100644 index 07ac72b2d7c99..0000000000000 --- a/google/cloud/deploy/cloud_deploy_connection.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/deploy/v1/cloud_deploy.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEPLOY_CLOUD_DEPLOY_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEPLOY_CLOUD_DEPLOY_CONNECTION_H - -#include "google/cloud/deploy/cloud_deploy_connection_idempotency_policy.h" -#include "google/cloud/deploy/v1/cloud_deploy_connection.h" - -namespace google { -namespace cloud { -namespace deploy { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use deploy_v1::MakeCloudDeployConnection directly. -using ::google::cloud::deploy_v1::MakeCloudDeployConnection; - -/// @deprecated Use deploy_v1::CloudDeployConnection directly. -using ::google::cloud::deploy_v1::CloudDeployConnection; - -/// @deprecated Use deploy_v1::CloudDeployLimitedErrorCountRetryPolicy directly. -using ::google::cloud::deploy_v1::CloudDeployLimitedErrorCountRetryPolicy; - -/// @deprecated Use deploy_v1::CloudDeployLimitedTimeRetryPolicy directly. -using ::google::cloud::deploy_v1::CloudDeployLimitedTimeRetryPolicy; - -/// @deprecated Use deploy_v1::CloudDeployRetryPolicy directly. -using ::google::cloud::deploy_v1::CloudDeployRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace deploy -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEPLOY_CLOUD_DEPLOY_CONNECTION_H diff --git a/google/cloud/deploy/cloud_deploy_connection_idempotency_policy.h b/google/cloud/deploy/cloud_deploy_connection_idempotency_policy.h deleted file mode 100644 index b3dc187055cdc..0000000000000 --- a/google/cloud/deploy/cloud_deploy_connection_idempotency_policy.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/deploy/v1/cloud_deploy.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEPLOY_CLOUD_DEPLOY_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEPLOY_CLOUD_DEPLOY_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/deploy/v1/cloud_deploy_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace deploy { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use deploy_v1::MakeDefaultCloudDeployConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::deploy_v1:: - MakeDefaultCloudDeployConnectionIdempotencyPolicy; - -/// @deprecated Use deploy_v1::CloudDeployConnectionIdempotencyPolicy directly. -using ::google::cloud::deploy_v1::CloudDeployConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace deploy -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEPLOY_CLOUD_DEPLOY_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/deploy/cloud_deploy_options.h b/google/cloud/deploy/cloud_deploy_options.h deleted file mode 100644 index d63ae04a36d4e..0000000000000 --- a/google/cloud/deploy/cloud_deploy_options.h +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/deploy/v1/cloud_deploy.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEPLOY_CLOUD_DEPLOY_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEPLOY_CLOUD_DEPLOY_OPTIONS_H - -#include "google/cloud/deploy/cloud_deploy_connection.h" -#include "google/cloud/deploy/cloud_deploy_connection_idempotency_policy.h" -#include "google/cloud/deploy/v1/cloud_deploy_options.h" - -namespace google { -namespace cloud { -namespace deploy { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use deploy_v1::CloudDeployPollingPolicyOption directly. -using ::google::cloud::deploy_v1::CloudDeployPollingPolicyOption; - -/// @deprecated Use deploy_v1::CloudDeployBackoffPolicyOption directly. -using ::google::cloud::deploy_v1::CloudDeployBackoffPolicyOption; - -/// @deprecated Use deploy_v1::CloudDeployConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::deploy_v1::CloudDeployConnectionIdempotencyPolicyOption; - -/// @deprecated Use deploy_v1::CloudDeployPolicyOptionList directly. -using ::google::cloud::deploy_v1::CloudDeployPolicyOptionList; - -/// @deprecated Use deploy_v1::CloudDeployRetryPolicyOption directly. -using ::google::cloud::deploy_v1::CloudDeployRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace deploy -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEPLOY_CLOUD_DEPLOY_OPTIONS_H diff --git a/google/cloud/deploy/mocks/mock_cloud_deploy_connection.h b/google/cloud/deploy/mocks/mock_cloud_deploy_connection.h deleted file mode 100644 index 3365dbcd64b1c..0000000000000 --- a/google/cloud/deploy/mocks/mock_cloud_deploy_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/deploy/v1/cloud_deploy.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEPLOY_MOCKS_MOCK_CLOUD_DEPLOY_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEPLOY_MOCKS_MOCK_CLOUD_DEPLOY_CONNECTION_H - -#include "google/cloud/deploy/cloud_deploy_connection.h" -#include "google/cloud/deploy/v1/mocks/mock_cloud_deploy_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in deploy_v1_mocks instead of the aliases -/// defined in this namespace. -namespace deploy_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use deploy_v1_mocks::MockCloudDeployConnection directly. -using ::google::cloud::deploy_v1_mocks::MockCloudDeployConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace deploy_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEPLOY_MOCKS_MOCK_CLOUD_DEPLOY_CONNECTION_H diff --git a/google/cloud/deploy/quickstart/.bazelrc b/google/cloud/deploy/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/deploy/quickstart/.bazelrc +++ b/google/cloud/deploy/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/deploy/quickstart/CMakeLists.txt b/google/cloud/deploy/quickstart/CMakeLists.txt index c84703393717b..ce266969c5022 100644 --- a/google/cloud/deploy/quickstart/CMakeLists.txt +++ b/google/cloud/deploy/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Google Cloud Deploy API C++ client library from # a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-deploy-quickstart CXX) find_package(google_cloud_cpp_deploy REQUIRED) diff --git a/google/cloud/deploy/v1/cloud_deploy_client.h b/google/cloud/deploy/v1/cloud_deploy_client.h index 8964fa67b5902..859a2c2f6b81d 100644 --- a/google/cloud/deploy/v1/cloud_deploy_client.h +++ b/google/cloud/deploy/v1/cloud_deploy_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/deploy/v1/cloud_deploy_connection.h b/google/cloud/deploy/v1/cloud_deploy_connection.h index 6d7447ba2d586..7257727ce2170 100644 --- a/google/cloud/deploy/v1/cloud_deploy_connection.h +++ b/google/cloud/deploy/v1/cloud_deploy_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEPLOY_V1_CLOUD_DEPLOY_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEPLOY_V1_CLOUD_DEPLOY_CONNECTION_H +#include "google/cloud/deploy/v1/cloud_deploy.pb.h" #include "google/cloud/deploy/v1/cloud_deploy_connection_idempotency_policy.h" #include "google/cloud/deploy/v1/internal/cloud_deploy_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/deploy/v1/cloud_deploy_connection_idempotency_policy.h b/google/cloud/deploy/v1/cloud_deploy_connection_idempotency_policy.h index 767b331dec13f..12c1a03b9de7d 100644 --- a/google/cloud/deploy/v1/cloud_deploy_connection_idempotency_policy.h +++ b/google/cloud/deploy/v1/cloud_deploy_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEPLOY_V1_CLOUD_DEPLOY_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEPLOY_V1_CLOUD_DEPLOY_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/deploy/v1/cloud_deploy.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/deploy/v1/internal/cloud_deploy_auth_decorator.cc b/google/cloud/deploy/v1/internal/cloud_deploy_auth_decorator.cc index 55a72a29d4493..c963dfa83f123 100644 --- a/google/cloud/deploy/v1/internal/cloud_deploy_auth_decorator.cc +++ b/google/cloud/deploy/v1/internal/cloud_deploy_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/deploy/v1/cloud_deploy.proto #include "google/cloud/deploy/v1/internal/cloud_deploy_auth_decorator.h" -#include +#include "google/cloud/deploy/v1/cloud_deploy.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace deploy_v1_internal { @@ -873,3 +876,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace deploy_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/deploy/v1/internal/cloud_deploy_auth_decorator.h b/google/cloud/deploy/v1/internal/cloud_deploy_auth_decorator.h index 2ca503747a946..1e30006927d3d 100644 --- a/google/cloud/deploy/v1/internal/cloud_deploy_auth_decorator.h +++ b/google/cloud/deploy/v1/internal/cloud_deploy_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/deploy/v1/internal/cloud_deploy_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace deploy_v1_internal { @@ -417,4 +420,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEPLOY_V1_INTERNAL_CLOUD_DEPLOY_AUTH_DECORATOR_H diff --git a/google/cloud/deploy/v1/internal/cloud_deploy_connection_impl.h b/google/cloud/deploy/v1/internal/cloud_deploy_connection_impl.h index 8756f82e492b6..f68b921055336 100644 --- a/google/cloud/deploy/v1/internal/cloud_deploy_connection_impl.h +++ b/google/cloud/deploy/v1/internal/cloud_deploy_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/deploy/v1/internal/cloud_deploy_logging_decorator.cc b/google/cloud/deploy/v1/internal/cloud_deploy_logging_decorator.cc index d468ececdd34b..755dcdd76020d 100644 --- a/google/cloud/deploy/v1/internal/cloud_deploy_logging_decorator.cc +++ b/google/cloud/deploy/v1/internal/cloud_deploy_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/deploy/v1/cloud_deploy.proto #include "google/cloud/deploy/v1/internal/cloud_deploy_logging_decorator.h" +#include "google/cloud/deploy/v1/cloud_deploy.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace deploy_v1_internal { @@ -1038,3 +1041,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace deploy_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/deploy/v1/internal/cloud_deploy_logging_decorator.h b/google/cloud/deploy/v1/internal/cloud_deploy_logging_decorator.h index e35a11c6eee43..723900d387336 100644 --- a/google/cloud/deploy/v1/internal/cloud_deploy_logging_decorator.h +++ b/google/cloud/deploy/v1/internal/cloud_deploy_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/deploy/v1/internal/cloud_deploy_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace deploy_v1_internal { @@ -417,4 +420,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEPLOY_V1_INTERNAL_CLOUD_DEPLOY_LOGGING_DECORATOR_H diff --git a/google/cloud/deploy/v1/internal/cloud_deploy_metadata_decorator.cc b/google/cloud/deploy/v1/internal/cloud_deploy_metadata_decorator.cc index ad88e4eacf4a7..e956ad75d67a0 100644 --- a/google/cloud/deploy/v1/internal/cloud_deploy_metadata_decorator.cc +++ b/google/cloud/deploy/v1/internal/cloud_deploy_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/deploy/v1/cloud_deploy.proto #include "google/cloud/deploy/v1/internal/cloud_deploy_metadata_decorator.h" +#include "google/cloud/deploy/v1/cloud_deploy.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace deploy_v1_internal { @@ -774,3 +778,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace deploy_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/deploy/v1/internal/cloud_deploy_metadata_decorator.h b/google/cloud/deploy/v1/internal/cloud_deploy_metadata_decorator.h index d940d90904680..8823af6255199 100644 --- a/google/cloud/deploy/v1/internal/cloud_deploy_metadata_decorator.h +++ b/google/cloud/deploy/v1/internal/cloud_deploy_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/deploy/v1/internal/cloud_deploy_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace deploy_v1_internal { @@ -422,4 +425,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEPLOY_V1_INTERNAL_CLOUD_DEPLOY_METADATA_DECORATOR_H diff --git a/google/cloud/deploy/v1/internal/cloud_deploy_option_defaults.cc b/google/cloud/deploy/v1/internal/cloud_deploy_option_defaults.cc index 911b25bf97f49..6de3330fa37a4 100644 --- a/google/cloud/deploy/v1/internal/cloud_deploy_option_defaults.cc +++ b/google/cloud/deploy/v1/internal/cloud_deploy_option_defaults.cc @@ -40,7 +40,7 @@ Options CloudDeployDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - deploy_v1::CloudDeployLimitedTimeRetryPolicy(std::chrono::minutes(30)) + deploy_v1::CloudDeployLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/deploy/v1/internal/cloud_deploy_stub.cc b/google/cloud/deploy/v1/internal/cloud_deploy_stub.cc index 0bb035dee2c1b..374939dbaa133 100644 --- a/google/cloud/deploy/v1/internal/cloud_deploy_stub.cc +++ b/google/cloud/deploy/v1/internal/cloud_deploy_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/deploy/v1/cloud_deploy.proto #include "google/cloud/deploy/v1/internal/cloud_deploy_stub.h" +#include "google/cloud/deploy/v1/cloud_deploy.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace deploy_v1_internal { @@ -1028,3 +1031,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace deploy_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/deploy/v1/internal/cloud_deploy_stub.h b/google/cloud/deploy/v1/internal/cloud_deploy_stub.h index 4e84fdb382db5..ee3a7393c4393 100644 --- a/google/cloud/deploy/v1/internal/cloud_deploy_stub.h +++ b/google/cloud/deploy/v1/internal/cloud_deploy_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEPLOY_V1_INTERNAL_CLOUD_DEPLOY_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEPLOY_V1_INTERNAL_CLOUD_DEPLOY_STUB_H +#include "google/cloud/deploy/v1/cloud_deploy.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace deploy_v1_internal { @@ -813,4 +816,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEPLOY_V1_INTERNAL_CLOUD_DEPLOY_STUB_H diff --git a/google/cloud/deploy/v1/internal/cloud_deploy_stub_factory.cc b/google/cloud/deploy/v1/internal/cloud_deploy_stub_factory.cc index fdeb8c2193a85..562fb91436fe8 100644 --- a/google/cloud/deploy/v1/internal/cloud_deploy_stub_factory.cc +++ b/google/cloud/deploy/v1/internal/cloud_deploy_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/deploy/v1/cloud_deploy.proto #include "google/cloud/deploy/v1/internal/cloud_deploy_stub_factory.h" +#include "google/cloud/deploy/v1/cloud_deploy.grpc.pb.h" #include "google/cloud/deploy/v1/internal/cloud_deploy_auth_decorator.h" #include "google/cloud/deploy/v1/internal/cloud_deploy_logging_decorator.h" #include "google/cloud/deploy/v1/internal/cloud_deploy_metadata_decorator.h" #include "google/cloud/deploy/v1/internal/cloud_deploy_stub.h" #include "google/cloud/deploy/v1/internal/cloud_deploy_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace deploy_v1_internal { @@ -77,3 +80,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace deploy_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/deploy/v1/internal/cloud_deploy_stub_factory.h b/google/cloud/deploy/v1/internal/cloud_deploy_stub_factory.h index ea50c54f3cb94..b7efd6e8f202a 100644 --- a/google/cloud/deploy/v1/internal/cloud_deploy_stub_factory.h +++ b/google/cloud/deploy/v1/internal/cloud_deploy_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace deploy_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEPLOY_V1_INTERNAL_CLOUD_DEPLOY_STUB_FACTORY_H diff --git a/google/cloud/deploy/v1/internal/cloud_deploy_tracing_connection.cc b/google/cloud/deploy/v1/internal/cloud_deploy_tracing_connection.cc index 657e2beaaedd4..9495348707e29 100644 --- a/google/cloud/deploy/v1/internal/cloud_deploy_tracing_connection.cc +++ b/google/cloud/deploy/v1/internal/cloud_deploy_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace deploy_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudDeployTracingConnection::CloudDeployTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -887,16 +885,12 @@ Status CloudDeployTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCloudDeployTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/deploy/v1/internal/cloud_deploy_tracing_connection.h b/google/cloud/deploy/v1/internal/cloud_deploy_tracing_connection.h index 1910f08b2c1d8..f8ccd60608cf8 100644 --- a/google/cloud/deploy/v1/internal/cloud_deploy_tracing_connection.h +++ b/google/cloud/deploy/v1/internal/cloud_deploy_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace deploy_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudDeployTracingConnection : public deploy_v1::CloudDeployConnection { public: ~CloudDeployTracingConnection() override = default; @@ -369,8 +367,6 @@ class CloudDeployTracingConnection : public deploy_v1::CloudDeployConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/deploy/v1/internal/cloud_deploy_tracing_stub.cc b/google/cloud/deploy/v1/internal/cloud_deploy_tracing_stub.cc index ee4128b749ed4..89c7a78a51f33 100644 --- a/google/cloud/deploy/v1/internal/cloud_deploy_tracing_stub.cc +++ b/google/cloud/deploy/v1/internal/cloud_deploy_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace deploy_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudDeployTracingStub::CloudDeployTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -948,18 +949,14 @@ future CloudDeployTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCloudDeployTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace deploy_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/deploy/v1/internal/cloud_deploy_tracing_stub.h b/google/cloud/deploy/v1/internal/cloud_deploy_tracing_stub.h index 3e66bee10026d..5e3bd98360003 100644 --- a/google/cloud/deploy/v1/internal/cloud_deploy_tracing_stub.h +++ b/google/cloud/deploy/v1/internal/cloud_deploy_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace deploy_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudDeployTracingStub : public CloudDeployStub { public: ~CloudDeployTracingStub() override = default; @@ -412,8 +413,6 @@ class CloudDeployTracingStub : public CloudDeployStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -428,4 +427,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEPLOY_V1_INTERNAL_CLOUD_DEPLOY_TRACING_STUB_H diff --git a/google/cloud/developerconnect/BUILD.bazel b/google/cloud/developerconnect/BUILD.bazel index 22c1f45ea2f9a..1daf84dc05b87 100644 --- a/google/cloud/developerconnect/BUILD.bazel +++ b/google/cloud/developerconnect/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/developerconnect/v1:developerconnect_cc_grpc", + "@googleapis//google/cloud/developerconnect/v1:developerconnect_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/developerconnect/quickstart/.bazelrc b/google/cloud/developerconnect/quickstart/.bazelrc index 15d5c055db074..343e7f623d628 100644 --- a/google/cloud/developerconnect/quickstart/.bazelrc +++ b/google/cloud/developerconnect/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/developerconnect/quickstart/CMakeLists.txt b/google/cloud/developerconnect/quickstart/CMakeLists.txt index 81f6555382b97..1ecf6f64568b6 100644 --- a/google/cloud/developerconnect/quickstart/CMakeLists.txt +++ b/google/cloud/developerconnect/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Developer Connect API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-developerconnect-quickstart CXX) find_package(google_cloud_cpp_developerconnect REQUIRED) diff --git a/google/cloud/developerconnect/v1/developer_connect_client.h b/google/cloud/developerconnect/v1/developer_connect_client.h index e1f4adace6d44..9eec0b4d201f8 100644 --- a/google/cloud/developerconnect/v1/developer_connect_client.h +++ b/google/cloud/developerconnect/v1/developer_connect_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/developerconnect/v1/developer_connect_connection.h b/google/cloud/developerconnect/v1/developer_connect_connection.h index 8a991e3932d78..ff5cc6e3f9477 100644 --- a/google/cloud/developerconnect/v1/developer_connect_connection.h +++ b/google/cloud/developerconnect/v1/developer_connect_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEVELOPERCONNECT_V1_DEVELOPER_CONNECT_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEVELOPERCONNECT_V1_DEVELOPER_CONNECT_CONNECTION_H +#include "google/cloud/developerconnect/v1/developer_connect.pb.h" #include "google/cloud/developerconnect/v1/developer_connect_connection_idempotency_policy.h" #include "google/cloud/developerconnect/v1/internal/developer_connect_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/developerconnect/v1/developer_connect_connection_idempotency_policy.h b/google/cloud/developerconnect/v1/developer_connect_connection_idempotency_policy.h index 1aa210279f95a..940aefd4db2c6 100644 --- a/google/cloud/developerconnect/v1/developer_connect_connection_idempotency_policy.h +++ b/google/cloud/developerconnect/v1/developer_connect_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEVELOPERCONNECT_V1_DEVELOPER_CONNECT_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEVELOPERCONNECT_V1_DEVELOPER_CONNECT_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/developerconnect/v1/developer_connect.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/developerconnect/v1/internal/developer_connect_auth_decorator.cc b/google/cloud/developerconnect/v1/internal/developer_connect_auth_decorator.cc index df61a374a48a6..9a495d3d4caf1 100644 --- a/google/cloud/developerconnect/v1/internal/developer_connect_auth_decorator.cc +++ b/google/cloud/developerconnect/v1/internal/developer_connect_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/developerconnect/v1/developer_connect.proto #include "google/cloud/developerconnect/v1/internal/developer_connect_auth_decorator.h" -#include +#include "google/cloud/developerconnect/v1/developer_connect.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace developerconnect_v1_internal { @@ -558,3 +561,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace developerconnect_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/developerconnect/v1/internal/developer_connect_auth_decorator.h b/google/cloud/developerconnect/v1/internal/developer_connect_auth_decorator.h index c0e6ab5c1a8c7..0ea44c457d3ef 100644 --- a/google/cloud/developerconnect/v1/internal/developer_connect_auth_decorator.h +++ b/google/cloud/developerconnect/v1/internal/developer_connect_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/developerconnect/v1/internal/developer_connect_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace developerconnect_v1_internal { @@ -287,4 +290,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEVELOPERCONNECT_V1_INTERNAL_DEVELOPER_CONNECT_AUTH_DECORATOR_H diff --git a/google/cloud/developerconnect/v1/internal/developer_connect_connection_impl.h b/google/cloud/developerconnect/v1/internal/developer_connect_connection_impl.h index 80d10ea4ff264..cbcc34aca4902 100644 --- a/google/cloud/developerconnect/v1/internal/developer_connect_connection_impl.h +++ b/google/cloud/developerconnect/v1/internal/developer_connect_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/developerconnect/v1/internal/developer_connect_logging_decorator.cc b/google/cloud/developerconnect/v1/internal/developer_connect_logging_decorator.cc index 39e7b17b9a6db..2b9b49d4fd21b 100644 --- a/google/cloud/developerconnect/v1/internal/developer_connect_logging_decorator.cc +++ b/google/cloud/developerconnect/v1/internal/developer_connect_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/developerconnect/v1/developer_connect.proto #include "google/cloud/developerconnect/v1/internal/developer_connect_logging_decorator.h" +#include "google/cloud/developerconnect/v1/developer_connect.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace developerconnect_v1_internal { @@ -671,3 +674,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace developerconnect_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/developerconnect/v1/internal/developer_connect_logging_decorator.h b/google/cloud/developerconnect/v1/internal/developer_connect_logging_decorator.h index 84e7cbaef9730..2c15dfe5e4d51 100644 --- a/google/cloud/developerconnect/v1/internal/developer_connect_logging_decorator.h +++ b/google/cloud/developerconnect/v1/internal/developer_connect_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/developerconnect/v1/internal/developer_connect_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace developerconnect_v1_internal { @@ -287,4 +290,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEVELOPERCONNECT_V1_INTERNAL_DEVELOPER_CONNECT_LOGGING_DECORATOR_H diff --git a/google/cloud/developerconnect/v1/internal/developer_connect_metadata_decorator.cc b/google/cloud/developerconnect/v1/internal/developer_connect_metadata_decorator.cc index 3acfe6524b33e..45d226221083b 100644 --- a/google/cloud/developerconnect/v1/internal/developer_connect_metadata_decorator.cc +++ b/google/cloud/developerconnect/v1/internal/developer_connect_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/developerconnect/v1/developer_connect.proto #include "google/cloud/developerconnect/v1/internal/developer_connect_metadata_decorator.h" +#include "google/cloud/developerconnect/v1/developer_connect.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace developerconnect_v1_internal { @@ -507,3 +511,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace developerconnect_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/developerconnect/v1/internal/developer_connect_metadata_decorator.h b/google/cloud/developerconnect/v1/internal/developer_connect_metadata_decorator.h index c95f807c30ab7..c30693d0e2b9a 100644 --- a/google/cloud/developerconnect/v1/internal/developer_connect_metadata_decorator.h +++ b/google/cloud/developerconnect/v1/internal/developer_connect_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/developerconnect/v1/internal/developer_connect_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace developerconnect_v1_internal { @@ -293,4 +296,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEVELOPERCONNECT_V1_INTERNAL_DEVELOPER_CONNECT_METADATA_DECORATOR_H diff --git a/google/cloud/developerconnect/v1/internal/developer_connect_option_defaults.cc b/google/cloud/developerconnect/v1/internal/developer_connect_option_defaults.cc index ece038a3a3a68..85d768e9b4ca1 100644 --- a/google/cloud/developerconnect/v1/internal/developer_connect_option_defaults.cc +++ b/google/cloud/developerconnect/v1/internal/developer_connect_option_defaults.cc @@ -42,7 +42,7 @@ Options DeveloperConnectDefaultOptions(Options options) { if (!options.has()) { options.set( developerconnect_v1::DeveloperConnectLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/developerconnect/v1/internal/developer_connect_stub.cc b/google/cloud/developerconnect/v1/internal/developer_connect_stub.cc index 5431f4285cee5..8e2cd8b42b021 100644 --- a/google/cloud/developerconnect/v1/internal/developer_connect_stub.cc +++ b/google/cloud/developerconnect/v1/internal/developer_connect_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/developerconnect/v1/developer_connect.proto #include "google/cloud/developerconnect/v1/internal/developer_connect_stub.h" +#include "google/cloud/developerconnect/v1/developer_connect.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace developerconnect_v1_internal { @@ -658,3 +661,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace developerconnect_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/developerconnect/v1/internal/developer_connect_stub.h b/google/cloud/developerconnect/v1/internal/developer_connect_stub.h index b6acc6d64b31c..a7c25c9a1d1db 100644 --- a/google/cloud/developerconnect/v1/internal/developer_connect_stub.h +++ b/google/cloud/developerconnect/v1/internal/developer_connect_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEVELOPERCONNECT_V1_INTERNAL_DEVELOPER_CONNECT_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEVELOPERCONNECT_V1_INTERNAL_DEVELOPER_CONNECT_STUB_H +#include "google/cloud/developerconnect/v1/developer_connect.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace developerconnect_v1_internal { @@ -557,4 +560,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEVELOPERCONNECT_V1_INTERNAL_DEVELOPER_CONNECT_STUB_H diff --git a/google/cloud/developerconnect/v1/internal/developer_connect_stub_factory.cc b/google/cloud/developerconnect/v1/internal/developer_connect_stub_factory.cc index 76533bf4e8237..385e7e96b1fb1 100644 --- a/google/cloud/developerconnect/v1/internal/developer_connect_stub_factory.cc +++ b/google/cloud/developerconnect/v1/internal/developer_connect_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/developerconnect/v1/developer_connect.proto #include "google/cloud/developerconnect/v1/internal/developer_connect_stub_factory.h" +#include "google/cloud/developerconnect/v1/developer_connect.grpc.pb.h" #include "google/cloud/developerconnect/v1/internal/developer_connect_auth_decorator.h" #include "google/cloud/developerconnect/v1/internal/developer_connect_logging_decorator.h" #include "google/cloud/developerconnect/v1/internal/developer_connect_metadata_decorator.h" #include "google/cloud/developerconnect/v1/internal/developer_connect_stub.h" #include "google/cloud/developerconnect/v1/internal/developer_connect_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace developerconnect_v1_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace developerconnect_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/developerconnect/v1/internal/developer_connect_stub_factory.h b/google/cloud/developerconnect/v1/internal/developer_connect_stub_factory.h index 6b3d99da5005d..1732c56984aa4 100644 --- a/google/cloud/developerconnect/v1/internal/developer_connect_stub_factory.h +++ b/google/cloud/developerconnect/v1/internal/developer_connect_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace developerconnect_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEVELOPERCONNECT_V1_INTERNAL_DEVELOPER_CONNECT_STUB_FACTORY_H diff --git a/google/cloud/developerconnect/v1/internal/developer_connect_tracing_connection.cc b/google/cloud/developerconnect/v1/internal/developer_connect_tracing_connection.cc index e3559c494d770..9a4c8c33744e1 100644 --- a/google/cloud/developerconnect/v1/internal/developer_connect_tracing_connection.cc +++ b/google/cloud/developerconnect/v1/internal/developer_connect_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace developerconnect_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DeveloperConnectTracingConnection::DeveloperConnectTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -573,16 +571,12 @@ Status DeveloperConnectTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDeveloperConnectTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/developerconnect/v1/internal/developer_connect_tracing_connection.h b/google/cloud/developerconnect/v1/internal/developer_connect_tracing_connection.h index 58ee29cb2a0d7..188cf8dd34836 100644 --- a/google/cloud/developerconnect/v1/internal/developer_connect_tracing_connection.h +++ b/google/cloud/developerconnect/v1/internal/developer_connect_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace developerconnect_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DeveloperConnectTracingConnection : public developerconnect_v1::DeveloperConnectConnection { public: @@ -260,8 +258,6 @@ class DeveloperConnectTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/developerconnect/v1/internal/developer_connect_tracing_stub.cc b/google/cloud/developerconnect/v1/internal/developer_connect_tracing_stub.cc index c12b8e93613f1..ae25b585a5276 100644 --- a/google/cloud/developerconnect/v1/internal/developer_connect_tracing_stub.cc +++ b/google/cloud/developerconnect/v1/internal/developer_connect_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace developerconnect_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DeveloperConnectTracingStub::DeveloperConnectTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -617,18 +618,14 @@ future DeveloperConnectTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDeveloperConnectTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace developerconnect_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/developerconnect/v1/internal/developer_connect_tracing_stub.h b/google/cloud/developerconnect/v1/internal/developer_connect_tracing_stub.h index c62c8f2e02b20..de09195f5bac1 100644 --- a/google/cloud/developerconnect/v1/internal/developer_connect_tracing_stub.h +++ b/google/cloud/developerconnect/v1/internal/developer_connect_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace developerconnect_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DeveloperConnectTracingStub : public DeveloperConnectStub { public: ~DeveloperConnectTracingStub() override = default; @@ -283,8 +284,6 @@ class DeveloperConnectTracingStub : public DeveloperConnectStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -299,4 +298,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEVELOPERCONNECT_V1_INTERNAL_DEVELOPER_CONNECT_TRACING_STUB_H diff --git a/google/cloud/devicestreaming/BUILD.bazel b/google/cloud/devicestreaming/BUILD.bazel index 78dc8d385fc9a..b5631c2d8f900 100644 --- a/google/cloud/devicestreaming/BUILD.bazel +++ b/google/cloud/devicestreaming/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/devicestreaming/v1:devicestreaming_cc_grpc", + "@googleapis//google/cloud/devicestreaming/v1:devicestreaming_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/devicestreaming/quickstart/CMakeLists.txt b/google/cloud/devicestreaming/quickstart/CMakeLists.txt index 0283ff05a9068..f40c1e4a7ef0d 100644 --- a/google/cloud/devicestreaming/quickstart/CMakeLists.txt +++ b/google/cloud/devicestreaming/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Device Streaming API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-devicestreaming-quickstart CXX) find_package(google_cloud_cpp_devicestreaming REQUIRED) diff --git a/google/cloud/devicestreaming/v1/direct_access_connection.h b/google/cloud/devicestreaming/v1/direct_access_connection.h index 2ceb1056e83ee..1fe7995f416e7 100644 --- a/google/cloud/devicestreaming/v1/direct_access_connection.h +++ b/google/cloud/devicestreaming/v1/direct_access_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/devicestreaming/v1/direct_access_connection_idempotency_policy.h" #include "google/cloud/devicestreaming/v1/internal/direct_access_retry_traits.h" +#include "google/cloud/devicestreaming/v1/service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/async_read_write_stream_impl.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -28,7 +29,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/devicestreaming/v1/direct_access_connection_idempotency_policy.h b/google/cloud/devicestreaming/v1/direct_access_connection_idempotency_policy.h index 89bb2ddd6c7a1..c9d65f2d3ffcb 100644 --- a/google/cloud/devicestreaming/v1/direct_access_connection_idempotency_policy.h +++ b/google/cloud/devicestreaming/v1/direct_access_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEVICESTREAMING_V1_DIRECT_ACCESS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEVICESTREAMING_V1_DIRECT_ACCESS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/devicestreaming/v1/service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/devicestreaming/v1/internal/direct_access_auth_decorator.cc b/google/cloud/devicestreaming/v1/internal/direct_access_auth_decorator.cc index 6c36051cd92b5..00f4e353f6bd4 100644 --- a/google/cloud/devicestreaming/v1/internal/direct_access_auth_decorator.cc +++ b/google/cloud/devicestreaming/v1/internal/direct_access_auth_decorator.cc @@ -17,11 +17,14 @@ // source: google/cloud/devicestreaming/v1/service.proto #include "google/cloud/devicestreaming/v1/internal/direct_access_auth_decorator.h" +#include "google/cloud/devicestreaming/v1/service.grpc.pb.h" #include "google/cloud/internal/async_read_write_stream_auth.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace devicestreaming_v1_internal { @@ -104,3 +107,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace devicestreaming_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/devicestreaming/v1/internal/direct_access_auth_decorator.h b/google/cloud/devicestreaming/v1/internal/direct_access_auth_decorator.h index 9ac7a703825d8..7dfa9ef4ead2f 100644 --- a/google/cloud/devicestreaming/v1/internal/direct_access_auth_decorator.h +++ b/google/cloud/devicestreaming/v1/internal/direct_access_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace devicestreaming_v1_internal { @@ -83,4 +86,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEVICESTREAMING_V1_INTERNAL_DIRECT_ACCESS_AUTH_DECORATOR_H diff --git a/google/cloud/devicestreaming/v1/internal/direct_access_logging_decorator.cc b/google/cloud/devicestreaming/v1/internal/direct_access_logging_decorator.cc index 650f0d055bf5d..b79a7867bb3f2 100644 --- a/google/cloud/devicestreaming/v1/internal/direct_access_logging_decorator.cc +++ b/google/cloud/devicestreaming/v1/internal/direct_access_logging_decorator.cc @@ -17,15 +17,18 @@ // source: google/cloud/devicestreaming/v1/service.proto #include "google/cloud/devicestreaming/v1/internal/direct_access_logging_decorator.h" +#include "google/cloud/devicestreaming/v1/service.grpc.pb.h" #include "google/cloud/internal/async_read_write_stream_logging.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace devicestreaming_v1_internal { @@ -138,3 +141,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace devicestreaming_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/devicestreaming/v1/internal/direct_access_logging_decorator.h b/google/cloud/devicestreaming/v1/internal/direct_access_logging_decorator.h index e66c5655b3fba..904bb02150f2e 100644 --- a/google/cloud/devicestreaming/v1/internal/direct_access_logging_decorator.h +++ b/google/cloud/devicestreaming/v1/internal/direct_access_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace devicestreaming_v1_internal { @@ -84,4 +87,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEVICESTREAMING_V1_INTERNAL_DIRECT_ACCESS_LOGGING_DECORATOR_H diff --git a/google/cloud/devicestreaming/v1/internal/direct_access_metadata_decorator.cc b/google/cloud/devicestreaming/v1/internal/direct_access_metadata_decorator.cc index 72dfb9f07e801..e06ddd2e8e9fa 100644 --- a/google/cloud/devicestreaming/v1/internal/direct_access_metadata_decorator.cc +++ b/google/cloud/devicestreaming/v1/internal/direct_access_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/devicestreaming/v1/service.proto #include "google/cloud/devicestreaming/v1/internal/direct_access_metadata_decorator.h" +#include "google/cloud/devicestreaming/v1/service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace devicestreaming_v1_internal { @@ -123,3 +127,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace devicestreaming_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/devicestreaming/v1/internal/direct_access_metadata_decorator.h b/google/cloud/devicestreaming/v1/internal/direct_access_metadata_decorator.h index 7ea1efea526bf..6b0f899abf9ac 100644 --- a/google/cloud/devicestreaming/v1/internal/direct_access_metadata_decorator.h +++ b/google/cloud/devicestreaming/v1/internal/direct_access_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace devicestreaming_v1_internal { @@ -89,4 +92,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEVICESTREAMING_V1_INTERNAL_DIRECT_ACCESS_METADATA_DECORATOR_H diff --git a/google/cloud/devicestreaming/v1/internal/direct_access_option_defaults.cc b/google/cloud/devicestreaming/v1/internal/direct_access_option_defaults.cc index 49924d813f8ac..85002122d2867 100644 --- a/google/cloud/devicestreaming/v1/internal/direct_access_option_defaults.cc +++ b/google/cloud/devicestreaming/v1/internal/direct_access_option_defaults.cc @@ -43,7 +43,7 @@ Options DirectAccessServiceDefaultOptions(Options options) { .has()) { options.set( devicestreaming_v1::DirectAccessServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/devicestreaming/v1/internal/direct_access_stub.cc b/google/cloud/devicestreaming/v1/internal/direct_access_stub.cc index 1d69c186e8ef5..b9639618b30ef 100644 --- a/google/cloud/devicestreaming/v1/internal/direct_access_stub.cc +++ b/google/cloud/devicestreaming/v1/internal/direct_access_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/devicestreaming/v1/service.proto #include "google/cloud/devicestreaming/v1/internal/direct_access_stub.h" +#include "google/cloud/devicestreaming/v1/service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/internal/async_read_write_stream_impl.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace devicestreaming_v1_internal { @@ -115,3 +118,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace devicestreaming_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/devicestreaming/v1/internal/direct_access_stub.h b/google/cloud/devicestreaming/v1/internal/direct_access_stub.h index b28276d2e73e0..11d5c94ba6f8a 100644 --- a/google/cloud/devicestreaming/v1/internal/direct_access_stub.h +++ b/google/cloud/devicestreaming/v1/internal/direct_access_stub.h @@ -19,15 +19,18 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEVICESTREAMING_V1_INTERNAL_DIRECT_ACCESS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEVICESTREAMING_V1_INTERNAL_DIRECT_ACCESS_STUB_H +#include "google/cloud/devicestreaming/v1/service.grpc.pb.h" #include "google/cloud/async_streaming_read_write_rpc.h" #include "google/cloud/completion_queue.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace devicestreaming_v1_internal { @@ -129,4 +132,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEVICESTREAMING_V1_INTERNAL_DIRECT_ACCESS_STUB_H diff --git a/google/cloud/devicestreaming/v1/internal/direct_access_stub_factory.cc b/google/cloud/devicestreaming/v1/internal/direct_access_stub_factory.cc index c74f8c2a02aa4..fb43b7a6b7876 100644 --- a/google/cloud/devicestreaming/v1/internal/direct_access_stub_factory.cc +++ b/google/cloud/devicestreaming/v1/internal/direct_access_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/devicestreaming/v1/internal/direct_access_metadata_decorator.h" #include "google/cloud/devicestreaming/v1/internal/direct_access_stub.h" #include "google/cloud/devicestreaming/v1/internal/direct_access_tracing_stub.h" +#include "google/cloud/devicestreaming/v1/service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace devicestreaming_v1_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace devicestreaming_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/devicestreaming/v1/internal/direct_access_stub_factory.h b/google/cloud/devicestreaming/v1/internal/direct_access_stub_factory.h index af7013a448e35..0f7d248463ce2 100644 --- a/google/cloud/devicestreaming/v1/internal/direct_access_stub_factory.h +++ b/google/cloud/devicestreaming/v1/internal/direct_access_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace devicestreaming_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEVICESTREAMING_V1_INTERNAL_DIRECT_ACCESS_STUB_FACTORY_H diff --git a/google/cloud/devicestreaming/v1/internal/direct_access_tracing_connection.cc b/google/cloud/devicestreaming/v1/internal/direct_access_tracing_connection.cc index 710cdd2c40a0a..1f5d8b9631ecc 100644 --- a/google/cloud/devicestreaming/v1/internal/direct_access_tracing_connection.cc +++ b/google/cloud/devicestreaming/v1/internal/direct_access_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace devicestreaming_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DirectAccessServiceTracingConnection::DirectAccessServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -91,17 +89,13 @@ DirectAccessServiceTracingConnection::AsyncAdbConnect() { return child_->AsyncAdbConnect(); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDirectAccessServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/devicestreaming/v1/internal/direct_access_tracing_connection.h b/google/cloud/devicestreaming/v1/internal/direct_access_tracing_connection.h index bb4ed007044fc..034cffd194abb 100644 --- a/google/cloud/devicestreaming/v1/internal/direct_access_tracing_connection.h +++ b/google/cloud/devicestreaming/v1/internal/direct_access_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace devicestreaming_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DirectAccessServiceTracingConnection : public devicestreaming_v1::DirectAccessServiceConnection { public: @@ -72,8 +70,6 @@ class DirectAccessServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/devicestreaming/v1/internal/direct_access_tracing_stub.cc b/google/cloud/devicestreaming/v1/internal/direct_access_tracing_stub.cc index a36f9db21ac87..49097bbf64a15 100644 --- a/google/cloud/devicestreaming/v1/internal/direct_access_tracing_stub.cc +++ b/google/cloud/devicestreaming/v1/internal/direct_access_tracing_stub.cc @@ -22,13 +22,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace devicestreaming_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DirectAccessServiceTracingStub::DirectAccessServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -119,18 +120,14 @@ DirectAccessServiceTracingStub::AsyncAdbConnect( std::move(context), std::move(stream), std::move(span)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDirectAccessServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace devicestreaming_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/devicestreaming/v1/internal/direct_access_tracing_stub.h b/google/cloud/devicestreaming/v1/internal/direct_access_tracing_stub.h index debd060c9bcc9..a239851cca408 100644 --- a/google/cloud/devicestreaming/v1/internal/direct_access_tracing_stub.h +++ b/google/cloud/devicestreaming/v1/internal/direct_access_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace devicestreaming_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DirectAccessServiceTracingStub : public DirectAccessServiceStub { public: ~DirectAccessServiceTracingStub() override = default; @@ -80,8 +81,6 @@ class DirectAccessServiceTracingStub : public DirectAccessServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -96,4 +95,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DEVICESTREAMING_V1_INTERNAL_DIRECT_ACCESS_TRACING_STUB_H diff --git a/google/cloud/dialogflow_cx/BUILD.bazel b/google/cloud/dialogflow_cx/BUILD.bazel index 4c8a6bba0c1d8..abde82fd7e771 100644 --- a/google/cloud/dialogflow_cx/BUILD.bazel +++ b/google/cloud/dialogflow_cx/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = [""] googleapis_deps = [ - "@com_google_googleapis//google/cloud/dialogflow/cx/v3:cx_cc_grpc", + "@googleapis//google/cloud/dialogflow/cx/v3:cx_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/dialogflow_cx/agents_client.h b/google/cloud/dialogflow_cx/agents_client.h index e0b3766d29671..878c42d016584 100644 --- a/google/cloud/dialogflow_cx/agents_client.h +++ b/google/cloud/dialogflow_cx/agents_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/dialogflow_cx/agents_connection.h b/google/cloud/dialogflow_cx/agents_connection.h index 12e30dd0b7552..73ef8e09877aa 100644 --- a/google/cloud/dialogflow_cx/agents_connection.h +++ b/google/cloud/dialogflow_cx/agents_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_AGENTS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_AGENTS_CONNECTION_H +#include "google/cloud/dialogflow/cx/v3/agent.pb.h" #include "google/cloud/dialogflow_cx/agents_connection_idempotency_policy.h" #include "google/cloud/dialogflow_cx/internal/agents_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,9 +31,8 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/protobuf/struct.pb.h" #include #include diff --git a/google/cloud/dialogflow_cx/agents_connection_idempotency_policy.h b/google/cloud/dialogflow_cx/agents_connection_idempotency_policy.h index e1f6482cd48e9..1217d966c722c 100644 --- a/google/cloud/dialogflow_cx/agents_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_cx/agents_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_AGENTS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_AGENTS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/cx/v3/agent.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_cx/changelogs_connection.h b/google/cloud/dialogflow_cx/changelogs_connection.h index a72380a2e8c29..6578355f68cae 100644 --- a/google/cloud/dialogflow_cx/changelogs_connection.h +++ b/google/cloud/dialogflow_cx/changelogs_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_CHANGELOGS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_CHANGELOGS_CONNECTION_H +#include "google/cloud/dialogflow/cx/v3/changelog.pb.h" #include "google/cloud/dialogflow_cx/changelogs_connection_idempotency_policy.h" #include "google/cloud/dialogflow_cx/internal/changelogs_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/dialogflow_cx/changelogs_connection_idempotency_policy.h b/google/cloud/dialogflow_cx/changelogs_connection_idempotency_policy.h index 426681eb00136..b7342c66ef9be 100644 --- a/google/cloud/dialogflow_cx/changelogs_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_cx/changelogs_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_CHANGELOGS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_CHANGELOGS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/cx/v3/changelog.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_cx/deployments_connection.h b/google/cloud/dialogflow_cx/deployments_connection.h index 04eb0b90a8285..3fbc9c288e0cb 100644 --- a/google/cloud/dialogflow_cx/deployments_connection.h +++ b/google/cloud/dialogflow_cx/deployments_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_DEPLOYMENTS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_DEPLOYMENTS_CONNECTION_H +#include "google/cloud/dialogflow/cx/v3/deployment.pb.h" #include "google/cloud/dialogflow_cx/deployments_connection_idempotency_policy.h" #include "google/cloud/dialogflow_cx/internal/deployments_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/dialogflow_cx/deployments_connection_idempotency_policy.h b/google/cloud/dialogflow_cx/deployments_connection_idempotency_policy.h index 65b7bdd9debde..99a921449c806 100644 --- a/google/cloud/dialogflow_cx/deployments_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_cx/deployments_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_DEPLOYMENTS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_DEPLOYMENTS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/cx/v3/deployment.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_cx/entity_types_client.h b/google/cloud/dialogflow_cx/entity_types_client.h index e3afcc032058f..0ef6f7a8e43c7 100644 --- a/google/cloud/dialogflow_cx/entity_types_client.h +++ b/google/cloud/dialogflow_cx/entity_types_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/dialogflow_cx/entity_types_connection.h b/google/cloud/dialogflow_cx/entity_types_connection.h index 0d6785404a4f4..e177b21ebfa3e 100644 --- a/google/cloud/dialogflow_cx/entity_types_connection.h +++ b/google/cloud/dialogflow_cx/entity_types_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_ENTITY_TYPES_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_ENTITY_TYPES_CONNECTION_H +#include "google/cloud/dialogflow/cx/v3/entity_type.pb.h" #include "google/cloud/dialogflow_cx/entity_types_connection_idempotency_policy.h" #include "google/cloud/dialogflow_cx/internal/entity_types_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/dialogflow_cx/entity_types_connection_idempotency_policy.h b/google/cloud/dialogflow_cx/entity_types_connection_idempotency_policy.h index b074f11f7c526..4e9721a225fe4 100644 --- a/google/cloud/dialogflow_cx/entity_types_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_cx/entity_types_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_ENTITY_TYPES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_ENTITY_TYPES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/cx/v3/entity_type.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_cx/environments_client.h b/google/cloud/dialogflow_cx/environments_client.h index 2393e156adc00..fec6f85c93c4f 100644 --- a/google/cloud/dialogflow_cx/environments_client.h +++ b/google/cloud/dialogflow_cx/environments_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/dialogflow_cx/environments_connection.h b/google/cloud/dialogflow_cx/environments_connection.h index ac43a6c2e18cd..4aac8739a817f 100644 --- a/google/cloud/dialogflow_cx/environments_connection.h +++ b/google/cloud/dialogflow_cx/environments_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_ENVIRONMENTS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_ENVIRONMENTS_CONNECTION_H +#include "google/cloud/dialogflow/cx/v3/environment.pb.h" #include "google/cloud/dialogflow_cx/environments_connection_idempotency_policy.h" #include "google/cloud/dialogflow_cx/internal/environments_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,9 +31,8 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/protobuf/struct.pb.h" #include #include diff --git a/google/cloud/dialogflow_cx/environments_connection_idempotency_policy.h b/google/cloud/dialogflow_cx/environments_connection_idempotency_policy.h index 384e08ace0f51..a96e15cd28087 100644 --- a/google/cloud/dialogflow_cx/environments_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_cx/environments_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_ENVIRONMENTS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_ENVIRONMENTS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/cx/v3/environment.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_cx/experiments_connection.h b/google/cloud/dialogflow_cx/experiments_connection.h index ec98ef7b63f98..c8a39caf0dac6 100644 --- a/google/cloud/dialogflow_cx/experiments_connection.h +++ b/google/cloud/dialogflow_cx/experiments_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_EXPERIMENTS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_EXPERIMENTS_CONNECTION_H +#include "google/cloud/dialogflow/cx/v3/experiment.pb.h" #include "google/cloud/dialogflow_cx/experiments_connection_idempotency_policy.h" #include "google/cloud/dialogflow_cx/internal/experiments_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/dialogflow_cx/experiments_connection_idempotency_policy.h b/google/cloud/dialogflow_cx/experiments_connection_idempotency_policy.h index 8e8178baa1bbb..d7ed25935a220 100644 --- a/google/cloud/dialogflow_cx/experiments_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_cx/experiments_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_EXPERIMENTS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_EXPERIMENTS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/cx/v3/experiment.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_cx/flows_client.h b/google/cloud/dialogflow_cx/flows_client.h index 4199f31ca29dd..36aa32e585a8c 100644 --- a/google/cloud/dialogflow_cx/flows_client.h +++ b/google/cloud/dialogflow_cx/flows_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/dialogflow_cx/flows_connection.h b/google/cloud/dialogflow_cx/flows_connection.h index 88872e88dd4d7..a7349b3fc44ab 100644 --- a/google/cloud/dialogflow_cx/flows_connection.h +++ b/google/cloud/dialogflow_cx/flows_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_FLOWS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_FLOWS_CONNECTION_H +#include "google/cloud/dialogflow/cx/v3/flow.pb.h" #include "google/cloud/dialogflow_cx/flows_connection_idempotency_policy.h" #include "google/cloud/dialogflow_cx/internal/flows_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,9 +31,8 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/protobuf/struct.pb.h" #include #include diff --git a/google/cloud/dialogflow_cx/flows_connection_idempotency_policy.h b/google/cloud/dialogflow_cx/flows_connection_idempotency_policy.h index 7528205402957..c05cc32c5e84e 100644 --- a/google/cloud/dialogflow_cx/flows_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_cx/flows_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_FLOWS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_FLOWS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/cx/v3/flow.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_cx/generators_connection.h b/google/cloud/dialogflow_cx/generators_connection.h index 9af589083b776..cf6f4f38310c5 100644 --- a/google/cloud/dialogflow_cx/generators_connection.h +++ b/google/cloud/dialogflow_cx/generators_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_GENERATORS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_GENERATORS_CONNECTION_H +#include "google/cloud/dialogflow/cx/v3/generator.pb.h" #include "google/cloud/dialogflow_cx/generators_connection_idempotency_policy.h" #include "google/cloud/dialogflow_cx/internal/generators_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/dialogflow_cx/generators_connection_idempotency_policy.h b/google/cloud/dialogflow_cx/generators_connection_idempotency_policy.h index 86b5206882115..028a57d9eb7ac 100644 --- a/google/cloud/dialogflow_cx/generators_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_cx/generators_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_GENERATORS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_GENERATORS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/cx/v3/generator.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_cx/intents_client.h b/google/cloud/dialogflow_cx/intents_client.h index b13b17d616110..1f5d798fcbf64 100644 --- a/google/cloud/dialogflow_cx/intents_client.h +++ b/google/cloud/dialogflow_cx/intents_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/dialogflow_cx/intents_connection.h b/google/cloud/dialogflow_cx/intents_connection.h index 8aad39120d489..0ecf95ce8b763 100644 --- a/google/cloud/dialogflow_cx/intents_connection.h +++ b/google/cloud/dialogflow_cx/intents_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTENTS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTENTS_CONNECTION_H +#include "google/cloud/dialogflow/cx/v3/intent.pb.h" #include "google/cloud/dialogflow_cx/intents_connection_idempotency_policy.h" #include "google/cloud/dialogflow_cx/internal/intents_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/dialogflow_cx/intents_connection_idempotency_policy.h b/google/cloud/dialogflow_cx/intents_connection_idempotency_policy.h index 415a6dac52a97..83bbb3176878b 100644 --- a/google/cloud/dialogflow_cx/intents_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_cx/intents_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTENTS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTENTS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/cx/v3/intent.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_cx/internal/agents_auth_decorator.cc b/google/cloud/dialogflow_cx/internal/agents_auth_decorator.cc index dadf71aeb7af7..04de740947308 100644 --- a/google/cloud/dialogflow_cx/internal/agents_auth_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/agents_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dialogflow/cx/v3/agent.proto #include "google/cloud/dialogflow_cx/internal/agents_auth_decorator.h" -#include +#include "google/cloud/dialogflow/cx/v3/agent.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -246,3 +249,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/agents_auth_decorator.h b/google/cloud/dialogflow_cx/internal/agents_auth_decorator.h index 486fb77262c33..751141db40d98 100644 --- a/google/cloud/dialogflow_cx/internal/agents_auth_decorator.h +++ b/google/cloud/dialogflow_cx/internal/agents_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_cx/internal/agents_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -153,4 +156,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_AGENTS_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/agents_connection_impl.h b/google/cloud/dialogflow_cx/internal/agents_connection_impl.h index d6eeb119fb407..a8a6d5acc3bf7 100644 --- a/google/cloud/dialogflow_cx/internal/agents_connection_impl.h +++ b/google/cloud/dialogflow_cx/internal/agents_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_cx/internal/agents_logging_decorator.cc b/google/cloud/dialogflow_cx/internal/agents_logging_decorator.cc index e0803efbe9d21..7e19ca39a6832 100644 --- a/google/cloud/dialogflow_cx/internal/agents_logging_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/agents_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dialogflow/cx/v3/agent.proto #include "google/cloud/dialogflow_cx/internal/agents_logging_decorator.h" +#include "google/cloud/dialogflow/cx/v3/agent.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -310,3 +313,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/agents_logging_decorator.h b/google/cloud/dialogflow_cx/internal/agents_logging_decorator.h index fa06b8deb7f36..b83d2e01c36e3 100644 --- a/google/cloud/dialogflow_cx/internal/agents_logging_decorator.h +++ b/google/cloud/dialogflow_cx/internal/agents_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_cx/internal/agents_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -153,4 +156,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_AGENTS_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/agents_metadata_decorator.cc b/google/cloud/dialogflow_cx/internal/agents_metadata_decorator.cc index 29b158a00a099..bf7120b52f5a0 100644 --- a/google/cloud/dialogflow_cx/internal/agents_metadata_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/agents_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/cx/v3/agent.proto #include "google/cloud/dialogflow_cx/internal/agents_metadata_decorator.h" +#include "google/cloud/dialogflow/cx/v3/agent.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -249,3 +253,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/agents_metadata_decorator.h b/google/cloud/dialogflow_cx/internal/agents_metadata_decorator.h index 1149dcab4b146..7558e13bf22ab 100644 --- a/google/cloud/dialogflow_cx/internal/agents_metadata_decorator.h +++ b/google/cloud/dialogflow_cx/internal/agents_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_cx/internal/agents_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -158,4 +161,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_AGENTS_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/agents_option_defaults.cc b/google/cloud/dialogflow_cx/internal/agents_option_defaults.cc index 5ea54c448a0f1..850fa96b7704d 100644 --- a/google/cloud/dialogflow_cx/internal/agents_option_defaults.cc +++ b/google/cloud/dialogflow_cx/internal/agents_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_cx/internal/agents_option_defaults.h" #include "google/cloud/dialogflow_cx/agents_connection.h" #include "google/cloud/dialogflow_cx/agents_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -43,7 +43,7 @@ Options AgentsDefaultOptions(std::string const& location, Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - dialogflow_cx::AgentsLimitedTimeRetryPolicy(std::chrono::minutes(30)) + dialogflow_cx::AgentsLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_cx/internal/agents_stub.cc b/google/cloud/dialogflow_cx/internal/agents_stub.cc index 4a55e1aa0899d..cae9cb5a1467a 100644 --- a/google/cloud/dialogflow_cx/internal/agents_stub.cc +++ b/google/cloud/dialogflow_cx/internal/agents_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/dialogflow/cx/v3/agent.proto #include "google/cloud/dialogflow_cx/internal/agents_stub.h" +#include "google/cloud/dialogflow/cx/v3/agent.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -302,3 +305,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/agents_stub.h b/google/cloud/dialogflow_cx/internal/agents_stub.h index 9e4f91c087016..8f3d79507ee0c 100644 --- a/google/cloud/dialogflow_cx/internal/agents_stub.h +++ b/google/cloud/dialogflow_cx/internal/agents_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_AGENTS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_AGENTS_STUB_H +#include "google/cloud/dialogflow/cx/v3/agent.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/protobuf/struct.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -271,4 +274,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_AGENTS_STUB_H diff --git a/google/cloud/dialogflow_cx/internal/agents_stub_factory.cc b/google/cloud/dialogflow_cx/internal/agents_stub_factory.cc index e8e17f0752a14..8965a810447af 100644 --- a/google/cloud/dialogflow_cx/internal/agents_stub_factory.cc +++ b/google/cloud/dialogflow_cx/internal/agents_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/cx/v3/agent.proto #include "google/cloud/dialogflow_cx/internal/agents_stub_factory.h" +#include "google/cloud/dialogflow/cx/v3/agent.grpc.pb.h" #include "google/cloud/dialogflow_cx/internal/agents_auth_decorator.h" #include "google/cloud/dialogflow_cx/internal/agents_logging_decorator.h" #include "google/cloud/dialogflow_cx/internal/agents_metadata_decorator.h" #include "google/cloud/dialogflow_cx/internal/agents_stub.h" #include "google/cloud/dialogflow_cx/internal/agents_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/agents_stub_factory.h b/google/cloud/dialogflow_cx/internal/agents_stub_factory.h index 204e937fef589..dccf8208487a8 100644 --- a/google/cloud/dialogflow_cx/internal/agents_stub_factory.h +++ b/google/cloud/dialogflow_cx/internal/agents_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_AGENTS_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_cx/internal/agents_tracing_connection.cc b/google/cloud/dialogflow_cx/internal/agents_tracing_connection.cc index cd8fbdd8b22c7..155d772db2a90 100644 --- a/google/cloud/dialogflow_cx/internal/agents_tracing_connection.cc +++ b/google/cloud/dialogflow_cx/internal/agents_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AgentsTracingConnection::AgentsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -217,15 +215,11 @@ Status AgentsTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAgentsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_cx/internal/agents_tracing_connection.h b/google/cloud/dialogflow_cx/internal/agents_tracing_connection.h index 2cc05d29086b7..aa94f1a4776d8 100644 --- a/google/cloud/dialogflow_cx/internal/agents_tracing_connection.h +++ b/google/cloud/dialogflow_cx/internal/agents_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AgentsTracingConnection : public dialogflow_cx::AgentsConnection { public: ~AgentsTracingConnection() override = default; @@ -120,8 +118,6 @@ class AgentsTracingConnection : public dialogflow_cx::AgentsConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_cx/internal/agents_tracing_stub.cc b/google/cloud/dialogflow_cx/internal/agents_tracing_stub.cc index 32b950043890c..6b8a04afe8a90 100644 --- a/google/cloud/dialogflow_cx/internal/agents_tracing_stub.cc +++ b/google/cloud/dialogflow_cx/internal/agents_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AgentsTracingStub::AgentsTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -277,18 +278,14 @@ future AgentsTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAgentsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/agents_tracing_stub.h b/google/cloud/dialogflow_cx/internal/agents_tracing_stub.h index 5ae16ab41577e..38f2f93261173 100644 --- a/google/cloud/dialogflow_cx/internal/agents_tracing_stub.h +++ b/google/cloud/dialogflow_cx/internal/agents_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AgentsTracingStub : public AgentsStub { public: ~AgentsTracingStub() override = default; @@ -148,8 +149,6 @@ class AgentsTracingStub : public AgentsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -164,4 +163,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_AGENTS_TRACING_STUB_H diff --git a/google/cloud/dialogflow_cx/internal/changelogs_auth_decorator.cc b/google/cloud/dialogflow_cx/internal/changelogs_auth_decorator.cc index 01be514c6b38c..52c3b96a360ba 100644 --- a/google/cloud/dialogflow_cx/internal/changelogs_auth_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/changelogs_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dialogflow/cx/v3/changelog.proto #include "google/cloud/dialogflow_cx/internal/changelogs_auth_decorator.h" -#include +#include "google/cloud/dialogflow/cx/v3/changelog.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -95,3 +98,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/changelogs_auth_decorator.h b/google/cloud/dialogflow_cx/internal/changelogs_auth_decorator.h index 7e5af2c0a95fa..96a48eb4addd1 100644 --- a/google/cloud/dialogflow_cx/internal/changelogs_auth_decorator.h +++ b/google/cloud/dialogflow_cx/internal/changelogs_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -78,4 +81,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_CHANGELOGS_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/changelogs_logging_decorator.cc b/google/cloud/dialogflow_cx/internal/changelogs_logging_decorator.cc index 3ddfccf3d1e89..7e33665eedb63 100644 --- a/google/cloud/dialogflow_cx/internal/changelogs_logging_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/changelogs_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dialogflow/cx/v3/changelog.proto #include "google/cloud/dialogflow_cx/internal/changelogs_logging_decorator.h" +#include "google/cloud/dialogflow/cx/v3/changelog.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -122,3 +125,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/changelogs_logging_decorator.h b/google/cloud/dialogflow_cx/internal/changelogs_logging_decorator.h index 1b002506f56ba..7f953679a3f50 100644 --- a/google/cloud/dialogflow_cx/internal/changelogs_logging_decorator.h +++ b/google/cloud/dialogflow_cx/internal/changelogs_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -78,4 +81,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_CHANGELOGS_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/changelogs_metadata_decorator.cc b/google/cloud/dialogflow_cx/internal/changelogs_metadata_decorator.cc index 7629efea8ef85..bb88889fe7c48 100644 --- a/google/cloud/dialogflow_cx/internal/changelogs_metadata_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/changelogs_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/cx/v3/changelog.proto #include "google/cloud/dialogflow_cx/internal/changelogs_metadata_decorator.h" +#include "google/cloud/dialogflow/cx/v3/changelog.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -121,3 +125,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/changelogs_metadata_decorator.h b/google/cloud/dialogflow_cx/internal/changelogs_metadata_decorator.h index ef0f1ce9eada0..23d79ec59c31f 100644 --- a/google/cloud/dialogflow_cx/internal/changelogs_metadata_decorator.h +++ b/google/cloud/dialogflow_cx/internal/changelogs_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -83,4 +86,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_CHANGELOGS_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/changelogs_option_defaults.cc b/google/cloud/dialogflow_cx/internal/changelogs_option_defaults.cc index bf8178a965533..7e54b3326491e 100644 --- a/google/cloud/dialogflow_cx/internal/changelogs_option_defaults.cc +++ b/google/cloud/dialogflow_cx/internal/changelogs_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_cx/internal/changelogs_option_defaults.h" #include "google/cloud/dialogflow_cx/changelogs_connection.h" #include "google/cloud/dialogflow_cx/changelogs_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -44,7 +44,7 @@ Options ChangelogsDefaultOptions(std::string const& location, Options options) { if (!options.has()) { options.set( dialogflow_cx::ChangelogsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_cx/internal/changelogs_stub.cc b/google/cloud/dialogflow_cx/internal/changelogs_stub.cc index 8beab905b3efa..d59ab3a4ac919 100644 --- a/google/cloud/dialogflow_cx/internal/changelogs_stub.cc +++ b/google/cloud/dialogflow_cx/internal/changelogs_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/dialogflow/cx/v3/changelog.proto #include "google/cloud/dialogflow_cx/internal/changelogs_stub.h" +#include "google/cloud/dialogflow/cx/v3/changelog.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -115,3 +118,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/changelogs_stub.h b/google/cloud/dialogflow_cx/internal/changelogs_stub.h index cd58b0dbab3ba..7ace71ca462a6 100644 --- a/google/cloud/dialogflow_cx/internal/changelogs_stub.h +++ b/google/cloud/dialogflow_cx/internal/changelogs_stub.h @@ -19,15 +19,18 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_CHANGELOGS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_CHANGELOGS_STUB_H +#include "google/cloud/dialogflow/cx/v3/changelog.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -127,4 +130,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_CHANGELOGS_STUB_H diff --git a/google/cloud/dialogflow_cx/internal/changelogs_stub_factory.cc b/google/cloud/dialogflow_cx/internal/changelogs_stub_factory.cc index 56232069d55b0..5908f41470c29 100644 --- a/google/cloud/dialogflow_cx/internal/changelogs_stub_factory.cc +++ b/google/cloud/dialogflow_cx/internal/changelogs_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/cx/v3/changelog.proto #include "google/cloud/dialogflow_cx/internal/changelogs_stub_factory.h" +#include "google/cloud/dialogflow/cx/v3/changelog.grpc.pb.h" #include "google/cloud/dialogflow_cx/internal/changelogs_auth_decorator.h" #include "google/cloud/dialogflow_cx/internal/changelogs_logging_decorator.h" #include "google/cloud/dialogflow_cx/internal/changelogs_metadata_decorator.h" #include "google/cloud/dialogflow_cx/internal/changelogs_stub.h" #include "google/cloud/dialogflow_cx/internal/changelogs_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -76,3 +79,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/changelogs_stub_factory.h b/google/cloud/dialogflow_cx/internal/changelogs_stub_factory.h index 0f06e89240d7c..5e7744998e592 100644 --- a/google/cloud/dialogflow_cx/internal/changelogs_stub_factory.h +++ b/google/cloud/dialogflow_cx/internal/changelogs_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_CHANGELOGS_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_cx/internal/changelogs_tracing_connection.cc b/google/cloud/dialogflow_cx/internal/changelogs_tracing_connection.cc index f30a1142a85a4..848d553b0de32 100644 --- a/google/cloud/dialogflow_cx/internal/changelogs_tracing_connection.cc +++ b/google/cloud/dialogflow_cx/internal/changelogs_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ChangelogsTracingConnection::ChangelogsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -102,16 +100,12 @@ Status ChangelogsTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeChangelogsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_cx/internal/changelogs_tracing_connection.h b/google/cloud/dialogflow_cx/internal/changelogs_tracing_connection.h index 7af01c4067dce..21b23cfe01efd 100644 --- a/google/cloud/dialogflow_cx/internal/changelogs_tracing_connection.h +++ b/google/cloud/dialogflow_cx/internal/changelogs_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ChangelogsTracingConnection : public dialogflow_cx::ChangelogsConnection { public: ~ChangelogsTracingConnection() override = default; @@ -66,8 +64,6 @@ class ChangelogsTracingConnection : public dialogflow_cx::ChangelogsConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_cx/internal/changelogs_tracing_stub.cc b/google/cloud/dialogflow_cx/internal/changelogs_tracing_stub.cc index e731c16051979..0a84cee293da1 100644 --- a/google/cloud/dialogflow_cx/internal/changelogs_tracing_stub.cc +++ b/google/cloud/dialogflow_cx/internal/changelogs_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ChangelogsTracingStub::ChangelogsTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -113,18 +114,14 @@ Status ChangelogsTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeChangelogsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/changelogs_tracing_stub.h b/google/cloud/dialogflow_cx/internal/changelogs_tracing_stub.h index 34eff99a81c9a..7b5c59458717c 100644 --- a/google/cloud/dialogflow_cx/internal/changelogs_tracing_stub.h +++ b/google/cloud/dialogflow_cx/internal/changelogs_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ChangelogsTracingStub : public ChangelogsStub { public: ~ChangelogsTracingStub() override = default; @@ -74,8 +75,6 @@ class ChangelogsTracingStub : public ChangelogsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -90,4 +89,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_CHANGELOGS_TRACING_STUB_H diff --git a/google/cloud/dialogflow_cx/internal/deployments_auth_decorator.cc b/google/cloud/dialogflow_cx/internal/deployments_auth_decorator.cc index 18b2832b7d246..1a42883ff6b0f 100644 --- a/google/cloud/dialogflow_cx/internal/deployments_auth_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/deployments_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dialogflow/cx/v3/deployment.proto #include "google/cloud/dialogflow_cx/internal/deployments_auth_decorator.h" -#include +#include "google/cloud/dialogflow/cx/v3/deployment.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -95,3 +98,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/deployments_auth_decorator.h b/google/cloud/dialogflow_cx/internal/deployments_auth_decorator.h index 29eabf3644578..0c7acdf20be9b 100644 --- a/google/cloud/dialogflow_cx/internal/deployments_auth_decorator.h +++ b/google/cloud/dialogflow_cx/internal/deployments_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -79,4 +82,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_DEPLOYMENTS_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/deployments_logging_decorator.cc b/google/cloud/dialogflow_cx/internal/deployments_logging_decorator.cc index a336798505c40..a34e09d9795fb 100644 --- a/google/cloud/dialogflow_cx/internal/deployments_logging_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/deployments_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dialogflow/cx/v3/deployment.proto #include "google/cloud/dialogflow_cx/internal/deployments_logging_decorator.h" +#include "google/cloud/dialogflow/cx/v3/deployment.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -122,3 +125,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/deployments_logging_decorator.h b/google/cloud/dialogflow_cx/internal/deployments_logging_decorator.h index aa27d593cff4b..a74811756c413 100644 --- a/google/cloud/dialogflow_cx/internal/deployments_logging_decorator.h +++ b/google/cloud/dialogflow_cx/internal/deployments_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -79,4 +82,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_DEPLOYMENTS_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/deployments_metadata_decorator.cc b/google/cloud/dialogflow_cx/internal/deployments_metadata_decorator.cc index 5c2fe17f2eef5..466277b811883 100644 --- a/google/cloud/dialogflow_cx/internal/deployments_metadata_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/deployments_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/cx/v3/deployment.proto #include "google/cloud/dialogflow_cx/internal/deployments_metadata_decorator.h" +#include "google/cloud/dialogflow/cx/v3/deployment.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -121,3 +125,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/deployments_metadata_decorator.h b/google/cloud/dialogflow_cx/internal/deployments_metadata_decorator.h index 18017116abb59..5765e30a2f935 100644 --- a/google/cloud/dialogflow_cx/internal/deployments_metadata_decorator.h +++ b/google/cloud/dialogflow_cx/internal/deployments_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -84,4 +87,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_DEPLOYMENTS_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/deployments_option_defaults.cc b/google/cloud/dialogflow_cx/internal/deployments_option_defaults.cc index e99d806e90ca8..7a2a594e6ccfb 100644 --- a/google/cloud/dialogflow_cx/internal/deployments_option_defaults.cc +++ b/google/cloud/dialogflow_cx/internal/deployments_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_cx/internal/deployments_option_defaults.h" #include "google/cloud/dialogflow_cx/deployments_connection.h" #include "google/cloud/dialogflow_cx/deployments_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -45,7 +45,7 @@ Options DeploymentsDefaultOptions(std::string const& location, if (!options.has()) { options.set( dialogflow_cx::DeploymentsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_cx/internal/deployments_stub.cc b/google/cloud/dialogflow_cx/internal/deployments_stub.cc index 05b277edd2a3f..af06b9595641e 100644 --- a/google/cloud/dialogflow_cx/internal/deployments_stub.cc +++ b/google/cloud/dialogflow_cx/internal/deployments_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/dialogflow/cx/v3/deployment.proto #include "google/cloud/dialogflow_cx/internal/deployments_stub.h" +#include "google/cloud/dialogflow/cx/v3/deployment.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -115,3 +118,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/deployments_stub.h b/google/cloud/dialogflow_cx/internal/deployments_stub.h index 2d6777b56eb0f..0bd60067a7bb2 100644 --- a/google/cloud/dialogflow_cx/internal/deployments_stub.h +++ b/google/cloud/dialogflow_cx/internal/deployments_stub.h @@ -19,15 +19,18 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_DEPLOYMENTS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_DEPLOYMENTS_STUB_H +#include "google/cloud/dialogflow/cx/v3/deployment.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -129,4 +132,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_DEPLOYMENTS_STUB_H diff --git a/google/cloud/dialogflow_cx/internal/deployments_stub_factory.cc b/google/cloud/dialogflow_cx/internal/deployments_stub_factory.cc index 726f44a15a279..71a17f60c21d0 100644 --- a/google/cloud/dialogflow_cx/internal/deployments_stub_factory.cc +++ b/google/cloud/dialogflow_cx/internal/deployments_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/cx/v3/deployment.proto #include "google/cloud/dialogflow_cx/internal/deployments_stub_factory.h" +#include "google/cloud/dialogflow/cx/v3/deployment.grpc.pb.h" #include "google/cloud/dialogflow_cx/internal/deployments_auth_decorator.h" #include "google/cloud/dialogflow_cx/internal/deployments_logging_decorator.h" #include "google/cloud/dialogflow_cx/internal/deployments_metadata_decorator.h" #include "google/cloud/dialogflow_cx/internal/deployments_stub.h" #include "google/cloud/dialogflow_cx/internal/deployments_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -76,3 +79,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/deployments_stub_factory.h b/google/cloud/dialogflow_cx/internal/deployments_stub_factory.h index 1ead352135be5..edbd47f9b71a7 100644 --- a/google/cloud/dialogflow_cx/internal/deployments_stub_factory.h +++ b/google/cloud/dialogflow_cx/internal/deployments_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_DEPLOYMENTS_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_cx/internal/deployments_tracing_connection.cc b/google/cloud/dialogflow_cx/internal/deployments_tracing_connection.cc index 13cc319073a48..a0d1bf20b709c 100644 --- a/google/cloud/dialogflow_cx/internal/deployments_tracing_connection.cc +++ b/google/cloud/dialogflow_cx/internal/deployments_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DeploymentsTracingConnection::DeploymentsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -102,16 +100,12 @@ Status DeploymentsTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDeploymentsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_cx/internal/deployments_tracing_connection.h b/google/cloud/dialogflow_cx/internal/deployments_tracing_connection.h index 3cf7a578678df..7b2856c3a2180 100644 --- a/google/cloud/dialogflow_cx/internal/deployments_tracing_connection.h +++ b/google/cloud/dialogflow_cx/internal/deployments_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DeploymentsTracingConnection : public dialogflow_cx::DeploymentsConnection { public: @@ -67,8 +65,6 @@ class DeploymentsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_cx/internal/deployments_tracing_stub.cc b/google/cloud/dialogflow_cx/internal/deployments_tracing_stub.cc index 6d0167f14d928..7f205cab3cfaa 100644 --- a/google/cloud/dialogflow_cx/internal/deployments_tracing_stub.cc +++ b/google/cloud/dialogflow_cx/internal/deployments_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DeploymentsTracingStub::DeploymentsTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -113,18 +114,14 @@ Status DeploymentsTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDeploymentsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/deployments_tracing_stub.h b/google/cloud/dialogflow_cx/internal/deployments_tracing_stub.h index 24e9b53708bad..eb4b1b3436d5d 100644 --- a/google/cloud/dialogflow_cx/internal/deployments_tracing_stub.h +++ b/google/cloud/dialogflow_cx/internal/deployments_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DeploymentsTracingStub : public DeploymentsStub { public: ~DeploymentsTracingStub() override = default; @@ -75,8 +76,6 @@ class DeploymentsTracingStub : public DeploymentsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -91,4 +90,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_DEPLOYMENTS_TRACING_STUB_H diff --git a/google/cloud/dialogflow_cx/internal/entity_types_auth_decorator.cc b/google/cloud/dialogflow_cx/internal/entity_types_auth_decorator.cc index a861ee8ca988f..e2801065bd862 100644 --- a/google/cloud/dialogflow_cx/internal/entity_types_auth_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/entity_types_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dialogflow/cx/v3/entity_type.proto #include "google/cloud/dialogflow_cx/internal/entity_types_auth_decorator.h" -#include +#include "google/cloud/dialogflow/cx/v3/entity_type.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -217,3 +220,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/entity_types_auth_decorator.h b/google/cloud/dialogflow_cx/internal/entity_types_auth_decorator.h index a910505f05f61..538e10ff99401 100644 --- a/google/cloud/dialogflow_cx/internal/entity_types_auth_decorator.h +++ b/google/cloud/dialogflow_cx/internal/entity_types_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_cx/internal/entity_types_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -131,4 +134,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_ENTITY_TYPES_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/entity_types_connection_impl.h b/google/cloud/dialogflow_cx/internal/entity_types_connection_impl.h index abbdab069dd47..0ab2f926ad982 100644 --- a/google/cloud/dialogflow_cx/internal/entity_types_connection_impl.h +++ b/google/cloud/dialogflow_cx/internal/entity_types_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_cx/internal/entity_types_logging_decorator.cc b/google/cloud/dialogflow_cx/internal/entity_types_logging_decorator.cc index 308b3da57a4a8..bb6a67e583486 100644 --- a/google/cloud/dialogflow_cx/internal/entity_types_logging_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/entity_types_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dialogflow/cx/v3/entity_type.proto #include "google/cloud/dialogflow_cx/internal/entity_types_logging_decorator.h" +#include "google/cloud/dialogflow/cx/v3/entity_type.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -261,3 +264,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/entity_types_logging_decorator.h b/google/cloud/dialogflow_cx/internal/entity_types_logging_decorator.h index 0ebea1600ed04..7bd598decada5 100644 --- a/google/cloud/dialogflow_cx/internal/entity_types_logging_decorator.h +++ b/google/cloud/dialogflow_cx/internal/entity_types_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_cx/internal/entity_types_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -131,4 +134,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_ENTITY_TYPES_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/entity_types_metadata_decorator.cc b/google/cloud/dialogflow_cx/internal/entity_types_metadata_decorator.cc index 305fa1edaa33a..62604f10bed18 100644 --- a/google/cloud/dialogflow_cx/internal/entity_types_metadata_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/entity_types_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/cx/v3/entity_type.proto #include "google/cloud/dialogflow_cx/internal/entity_types_metadata_decorator.h" +#include "google/cloud/dialogflow/cx/v3/entity_type.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -215,3 +219,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/entity_types_metadata_decorator.h b/google/cloud/dialogflow_cx/internal/entity_types_metadata_decorator.h index 7a61f5708f391..2a9bb0d05dc37 100644 --- a/google/cloud/dialogflow_cx/internal/entity_types_metadata_decorator.h +++ b/google/cloud/dialogflow_cx/internal/entity_types_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_cx/internal/entity_types_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -136,4 +139,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_ENTITY_TYPES_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/entity_types_option_defaults.cc b/google/cloud/dialogflow_cx/internal/entity_types_option_defaults.cc index 6486718b990e9..6233b5f5d3af0 100644 --- a/google/cloud/dialogflow_cx/internal/entity_types_option_defaults.cc +++ b/google/cloud/dialogflow_cx/internal/entity_types_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_cx/internal/entity_types_option_defaults.h" #include "google/cloud/dialogflow_cx/entity_types_connection.h" #include "google/cloud/dialogflow_cx/entity_types_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -45,7 +45,7 @@ Options EntityTypesDefaultOptions(std::string const& location, if (!options.has()) { options.set( dialogflow_cx::EntityTypesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_cx/internal/entity_types_stub.cc b/google/cloud/dialogflow_cx/internal/entity_types_stub.cc index a2c08b990a0a6..24810d5fab432 100644 --- a/google/cloud/dialogflow_cx/internal/entity_types_stub.cc +++ b/google/cloud/dialogflow_cx/internal/entity_types_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/dialogflow/cx/v3/entity_type.proto #include "google/cloud/dialogflow_cx/internal/entity_types_stub.h" +#include "google/cloud/dialogflow/cx/v3/entity_type.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -256,3 +259,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/entity_types_stub.h b/google/cloud/dialogflow_cx/internal/entity_types_stub.h index 898b19e3e4a6f..4ac0694d4a9bc 100644 --- a/google/cloud/dialogflow_cx/internal/entity_types_stub.h +++ b/google/cloud/dialogflow_cx/internal/entity_types_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_ENTITY_TYPES_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_ENTITY_TYPES_STUB_H +#include "google/cloud/dialogflow/cx/v3/entity_type.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -237,4 +240,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_ENTITY_TYPES_STUB_H diff --git a/google/cloud/dialogflow_cx/internal/entity_types_stub_factory.cc b/google/cloud/dialogflow_cx/internal/entity_types_stub_factory.cc index 93d1fd496defc..a63efc53ac6bd 100644 --- a/google/cloud/dialogflow_cx/internal/entity_types_stub_factory.cc +++ b/google/cloud/dialogflow_cx/internal/entity_types_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/cx/v3/entity_type.proto #include "google/cloud/dialogflow_cx/internal/entity_types_stub_factory.h" +#include "google/cloud/dialogflow/cx/v3/entity_type.grpc.pb.h" #include "google/cloud/dialogflow_cx/internal/entity_types_auth_decorator.h" #include "google/cloud/dialogflow_cx/internal/entity_types_logging_decorator.h" #include "google/cloud/dialogflow_cx/internal/entity_types_metadata_decorator.h" #include "google/cloud/dialogflow_cx/internal/entity_types_stub.h" #include "google/cloud/dialogflow_cx/internal/entity_types_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -74,3 +77,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/entity_types_stub_factory.h b/google/cloud/dialogflow_cx/internal/entity_types_stub_factory.h index aec0dcdeee408..c28aae29f30b5 100644 --- a/google/cloud/dialogflow_cx/internal/entity_types_stub_factory.h +++ b/google/cloud/dialogflow_cx/internal/entity_types_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_ENTITY_TYPES_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_cx/internal/entity_types_tracing_connection.cc b/google/cloud/dialogflow_cx/internal/entity_types_tracing_connection.cc index 2819ff5fb640c..a5e5d48bfe8cf 100644 --- a/google/cloud/dialogflow_cx/internal/entity_types_tracing_connection.cc +++ b/google/cloud/dialogflow_cx/internal/entity_types_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - EntityTypesTracingConnection::EntityTypesTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -192,16 +190,12 @@ Status EntityTypesTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeEntityTypesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_cx/internal/entity_types_tracing_connection.h b/google/cloud/dialogflow_cx/internal/entity_types_tracing_connection.h index 5d06913176635..a2c5d40a00555 100644 --- a/google/cloud/dialogflow_cx/internal/entity_types_tracing_connection.h +++ b/google/cloud/dialogflow_cx/internal/entity_types_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class EntityTypesTracingConnection : public dialogflow_cx::EntityTypesConnection { public: @@ -105,8 +103,6 @@ class EntityTypesTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_cx/internal/entity_types_tracing_stub.cc b/google/cloud/dialogflow_cx/internal/entity_types_tracing_stub.cc index 7748fe4a567e6..3bc65f478c7e0 100644 --- a/google/cloud/dialogflow_cx/internal/entity_types_tracing_stub.cc +++ b/google/cloud/dialogflow_cx/internal/entity_types_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - EntityTypesTracingStub::EntityTypesTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -234,18 +235,14 @@ future EntityTypesTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeEntityTypesTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/entity_types_tracing_stub.h b/google/cloud/dialogflow_cx/internal/entity_types_tracing_stub.h index e3a16393be881..ad1fcf2ed4212 100644 --- a/google/cloud/dialogflow_cx/internal/entity_types_tracing_stub.h +++ b/google/cloud/dialogflow_cx/internal/entity_types_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class EntityTypesTracingStub : public EntityTypesStub { public: ~EntityTypesTracingStub() override = default; @@ -126,8 +127,6 @@ class EntityTypesTracingStub : public EntityTypesStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -142,4 +141,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_ENTITY_TYPES_TRACING_STUB_H diff --git a/google/cloud/dialogflow_cx/internal/environments_auth_decorator.cc b/google/cloud/dialogflow_cx/internal/environments_auth_decorator.cc index ac44b31bc8eb9..b0dd7bf9ed596 100644 --- a/google/cloud/dialogflow_cx/internal/environments_auth_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/environments_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dialogflow/cx/v3/environment.proto #include "google/cloud/dialogflow_cx/internal/environments_auth_decorator.h" -#include +#include "google/cloud/dialogflow/cx/v3/environment.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -278,3 +281,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/environments_auth_decorator.h b/google/cloud/dialogflow_cx/internal/environments_auth_decorator.h index 57cf489dc6203..a875114227efd 100644 --- a/google/cloud/dialogflow_cx/internal/environments_auth_decorator.h +++ b/google/cloud/dialogflow_cx/internal/environments_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_cx/internal/environments_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -157,4 +160,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_ENVIRONMENTS_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/environments_connection_impl.h b/google/cloud/dialogflow_cx/internal/environments_connection_impl.h index a0f501b53e027..4e7b496588c1a 100644 --- a/google/cloud/dialogflow_cx/internal/environments_connection_impl.h +++ b/google/cloud/dialogflow_cx/internal/environments_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_cx/internal/environments_logging_decorator.cc b/google/cloud/dialogflow_cx/internal/environments_logging_decorator.cc index d2b62810277c3..8b9d713b236d6 100644 --- a/google/cloud/dialogflow_cx/internal/environments_logging_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/environments_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dialogflow/cx/v3/environment.proto #include "google/cloud/dialogflow_cx/internal/environments_logging_decorator.h" +#include "google/cloud/dialogflow/cx/v3/environment.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -328,3 +331,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/environments_logging_decorator.h b/google/cloud/dialogflow_cx/internal/environments_logging_decorator.h index 3fb6804fff21e..ffc031b039787 100644 --- a/google/cloud/dialogflow_cx/internal/environments_logging_decorator.h +++ b/google/cloud/dialogflow_cx/internal/environments_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_cx/internal/environments_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -157,4 +160,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_ENVIRONMENTS_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/environments_metadata_decorator.cc b/google/cloud/dialogflow_cx/internal/environments_metadata_decorator.cc index c4e2af0b31768..c336aeb180024 100644 --- a/google/cloud/dialogflow_cx/internal/environments_metadata_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/environments_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/cx/v3/environment.proto #include "google/cloud/dialogflow_cx/internal/environments_metadata_decorator.h" +#include "google/cloud/dialogflow/cx/v3/environment.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -268,3 +272,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/environments_metadata_decorator.h b/google/cloud/dialogflow_cx/internal/environments_metadata_decorator.h index 8eb436b84d2dd..46137debee54a 100644 --- a/google/cloud/dialogflow_cx/internal/environments_metadata_decorator.h +++ b/google/cloud/dialogflow_cx/internal/environments_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_cx/internal/environments_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -162,4 +165,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_ENVIRONMENTS_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/environments_option_defaults.cc b/google/cloud/dialogflow_cx/internal/environments_option_defaults.cc index d590fb729b29d..4c42dd6c1c55f 100644 --- a/google/cloud/dialogflow_cx/internal/environments_option_defaults.cc +++ b/google/cloud/dialogflow_cx/internal/environments_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_cx/internal/environments_option_defaults.h" #include "google/cloud/dialogflow_cx/environments_connection.h" #include "google/cloud/dialogflow_cx/environments_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -45,7 +45,7 @@ Options EnvironmentsDefaultOptions(std::string const& location, if (!options.has()) { options.set( dialogflow_cx::EnvironmentsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_cx/internal/environments_stub.cc b/google/cloud/dialogflow_cx/internal/environments_stub.cc index a791dfc01384a..550242467b239 100644 --- a/google/cloud/dialogflow_cx/internal/environments_stub.cc +++ b/google/cloud/dialogflow_cx/internal/environments_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/dialogflow/cx/v3/environment.proto #include "google/cloud/dialogflow_cx/internal/environments_stub.h" +#include "google/cloud/dialogflow/cx/v3/environment.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -325,3 +328,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/environments_stub.h b/google/cloud/dialogflow_cx/internal/environments_stub.h index 2f3dccf245290..81f0bebca4015 100644 --- a/google/cloud/dialogflow_cx/internal/environments_stub.h +++ b/google/cloud/dialogflow_cx/internal/environments_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_ENVIRONMENTS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_ENVIRONMENTS_STUB_H +#include "google/cloud/dialogflow/cx/v3/environment.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/protobuf/struct.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -290,4 +293,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_ENVIRONMENTS_STUB_H diff --git a/google/cloud/dialogflow_cx/internal/environments_stub_factory.cc b/google/cloud/dialogflow_cx/internal/environments_stub_factory.cc index 027be8f1cb724..5a37e51b1585a 100644 --- a/google/cloud/dialogflow_cx/internal/environments_stub_factory.cc +++ b/google/cloud/dialogflow_cx/internal/environments_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/cx/v3/environment.proto #include "google/cloud/dialogflow_cx/internal/environments_stub_factory.h" +#include "google/cloud/dialogflow/cx/v3/environment.grpc.pb.h" #include "google/cloud/dialogflow_cx/internal/environments_auth_decorator.h" #include "google/cloud/dialogflow_cx/internal/environments_logging_decorator.h" #include "google/cloud/dialogflow_cx/internal/environments_metadata_decorator.h" #include "google/cloud/dialogflow_cx/internal/environments_stub.h" #include "google/cloud/dialogflow_cx/internal/environments_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -74,3 +77,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/environments_stub_factory.h b/google/cloud/dialogflow_cx/internal/environments_stub_factory.h index 03cc1442ff75e..5699d2280ef98 100644 --- a/google/cloud/dialogflow_cx/internal/environments_stub_factory.h +++ b/google/cloud/dialogflow_cx/internal/environments_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_ENVIRONMENTS_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_cx/internal/environments_tracing_connection.cc b/google/cloud/dialogflow_cx/internal/environments_tracing_connection.cc index 99407f0c60f4b..c7413da5a6351 100644 --- a/google/cloud/dialogflow_cx/internal/environments_tracing_connection.cc +++ b/google/cloud/dialogflow_cx/internal/environments_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - EnvironmentsTracingConnection::EnvironmentsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -261,16 +259,12 @@ Status EnvironmentsTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeEnvironmentsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_cx/internal/environments_tracing_connection.h b/google/cloud/dialogflow_cx/internal/environments_tracing_connection.h index 88c66c23ef022..0eacdfc7c3d2f 100644 --- a/google/cloud/dialogflow_cx/internal/environments_tracing_connection.h +++ b/google/cloud/dialogflow_cx/internal/environments_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class EnvironmentsTracingConnection : public dialogflow_cx::EnvironmentsConnection { public: @@ -132,8 +130,6 @@ class EnvironmentsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_cx/internal/environments_tracing_stub.cc b/google/cloud/dialogflow_cx/internal/environments_tracing_stub.cc index 3d263a6567f75..a376155b1082c 100644 --- a/google/cloud/dialogflow_cx/internal/environments_tracing_stub.cc +++ b/google/cloud/dialogflow_cx/internal/environments_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - EnvironmentsTracingStub::EnvironmentsTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -295,18 +296,14 @@ future EnvironmentsTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeEnvironmentsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/environments_tracing_stub.h b/google/cloud/dialogflow_cx/internal/environments_tracing_stub.h index 317eacb796ab6..0d1be4e47e85f 100644 --- a/google/cloud/dialogflow_cx/internal/environments_tracing_stub.h +++ b/google/cloud/dialogflow_cx/internal/environments_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class EnvironmentsTracingStub : public EnvironmentsStub { public: ~EnvironmentsTracingStub() override = default; @@ -152,8 +153,6 @@ class EnvironmentsTracingStub : public EnvironmentsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -168,4 +167,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_ENVIRONMENTS_TRACING_STUB_H diff --git a/google/cloud/dialogflow_cx/internal/experiments_auth_decorator.cc b/google/cloud/dialogflow_cx/internal/experiments_auth_decorator.cc index 6fb163d0aff35..7edb01437cd30 100644 --- a/google/cloud/dialogflow_cx/internal/experiments_auth_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/experiments_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dialogflow/cx/v3/experiment.proto #include "google/cloud/dialogflow_cx/internal/experiments_auth_decorator.h" -#include +#include "google/cloud/dialogflow/cx/v3/experiment.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -139,3 +142,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/experiments_auth_decorator.h b/google/cloud/dialogflow_cx/internal/experiments_auth_decorator.h index 1aea7c80f0f4a..5c44d84855a64 100644 --- a/google/cloud/dialogflow_cx/internal/experiments_auth_decorator.h +++ b/google/cloud/dialogflow_cx/internal/experiments_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -104,4 +107,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_EXPERIMENTS_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/experiments_logging_decorator.cc b/google/cloud/dialogflow_cx/internal/experiments_logging_decorator.cc index a44bd6699461e..d11de7c355f66 100644 --- a/google/cloud/dialogflow_cx/internal/experiments_logging_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/experiments_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dialogflow/cx/v3/experiment.proto #include "google/cloud/dialogflow_cx/internal/experiments_logging_decorator.h" +#include "google/cloud/dialogflow/cx/v3/experiment.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -186,3 +189,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/experiments_logging_decorator.h b/google/cloud/dialogflow_cx/internal/experiments_logging_decorator.h index 7db6a9a7efdb8..979de3ed7fc69 100644 --- a/google/cloud/dialogflow_cx/internal/experiments_logging_decorator.h +++ b/google/cloud/dialogflow_cx/internal/experiments_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -104,4 +107,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_EXPERIMENTS_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/experiments_metadata_decorator.cc b/google/cloud/dialogflow_cx/internal/experiments_metadata_decorator.cc index 7369c0a0cedfc..bcb1bdaae121d 100644 --- a/google/cloud/dialogflow_cx/internal/experiments_metadata_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/experiments_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/cx/v3/experiment.proto #include "google/cloud/dialogflow_cx/internal/experiments_metadata_decorator.h" +#include "google/cloud/dialogflow/cx/v3/experiment.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -166,3 +170,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/experiments_metadata_decorator.h b/google/cloud/dialogflow_cx/internal/experiments_metadata_decorator.h index faac8780fdd36..bb68b3007f8f2 100644 --- a/google/cloud/dialogflow_cx/internal/experiments_metadata_decorator.h +++ b/google/cloud/dialogflow_cx/internal/experiments_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -109,4 +112,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_EXPERIMENTS_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/experiments_option_defaults.cc b/google/cloud/dialogflow_cx/internal/experiments_option_defaults.cc index 99bb0ff998455..d90d3adca099b 100644 --- a/google/cloud/dialogflow_cx/internal/experiments_option_defaults.cc +++ b/google/cloud/dialogflow_cx/internal/experiments_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_cx/internal/experiments_option_defaults.h" #include "google/cloud/dialogflow_cx/experiments_connection.h" #include "google/cloud/dialogflow_cx/experiments_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -45,7 +45,7 @@ Options ExperimentsDefaultOptions(std::string const& location, if (!options.has()) { options.set( dialogflow_cx::ExperimentsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_cx/internal/experiments_stub.cc b/google/cloud/dialogflow_cx/internal/experiments_stub.cc index 4be081005316e..50fc94903e859 100644 --- a/google/cloud/dialogflow_cx/internal/experiments_stub.cc +++ b/google/cloud/dialogflow_cx/internal/experiments_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/dialogflow/cx/v3/experiment.proto #include "google/cloud/dialogflow_cx/internal/experiments_stub.h" +#include "google/cloud/dialogflow/cx/v3/experiment.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -174,3 +177,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/experiments_stub.h b/google/cloud/dialogflow_cx/internal/experiments_stub.h index 0236cf1e595a9..128dd262aae37 100644 --- a/google/cloud/dialogflow_cx/internal/experiments_stub.h +++ b/google/cloud/dialogflow_cx/internal/experiments_stub.h @@ -19,15 +19,18 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_EXPERIMENTS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_EXPERIMENTS_STUB_H +#include "google/cloud/dialogflow/cx/v3/experiment.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -182,4 +185,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_EXPERIMENTS_STUB_H diff --git a/google/cloud/dialogflow_cx/internal/experiments_stub_factory.cc b/google/cloud/dialogflow_cx/internal/experiments_stub_factory.cc index e400f880f2e7c..fc60e551315b4 100644 --- a/google/cloud/dialogflow_cx/internal/experiments_stub_factory.cc +++ b/google/cloud/dialogflow_cx/internal/experiments_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/cx/v3/experiment.proto #include "google/cloud/dialogflow_cx/internal/experiments_stub_factory.h" +#include "google/cloud/dialogflow/cx/v3/experiment.grpc.pb.h" #include "google/cloud/dialogflow_cx/internal/experiments_auth_decorator.h" #include "google/cloud/dialogflow_cx/internal/experiments_logging_decorator.h" #include "google/cloud/dialogflow_cx/internal/experiments_metadata_decorator.h" #include "google/cloud/dialogflow_cx/internal/experiments_stub.h" #include "google/cloud/dialogflow_cx/internal/experiments_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -76,3 +79,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/experiments_stub_factory.h b/google/cloud/dialogflow_cx/internal/experiments_stub_factory.h index 3f9f5b394d9e4..5c409a2e5c8cc 100644 --- a/google/cloud/dialogflow_cx/internal/experiments_stub_factory.h +++ b/google/cloud/dialogflow_cx/internal/experiments_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_EXPERIMENTS_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_cx/internal/experiments_tracing_connection.cc b/google/cloud/dialogflow_cx/internal/experiments_tracing_connection.cc index 78679007d7662..d24dfe1f379f4 100644 --- a/google/cloud/dialogflow_cx/internal/experiments_tracing_connection.cc +++ b/google/cloud/dialogflow_cx/internal/experiments_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ExperimentsTracingConnection::ExperimentsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -146,16 +144,12 @@ Status ExperimentsTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeExperimentsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_cx/internal/experiments_tracing_connection.h b/google/cloud/dialogflow_cx/internal/experiments_tracing_connection.h index 8e5c7a3d0bdc5..0ae6229956956 100644 --- a/google/cloud/dialogflow_cx/internal/experiments_tracing_connection.h +++ b/google/cloud/dialogflow_cx/internal/experiments_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ExperimentsTracingConnection : public dialogflow_cx::ExperimentsConnection { public: @@ -87,8 +85,6 @@ class ExperimentsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_cx/internal/experiments_tracing_stub.cc b/google/cloud/dialogflow_cx/internal/experiments_tracing_stub.cc index 36b6b78c20751..8cf6df99ad259 100644 --- a/google/cloud/dialogflow_cx/internal/experiments_tracing_stub.cc +++ b/google/cloud/dialogflow_cx/internal/experiments_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ExperimentsTracingStub::ExperimentsTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -172,18 +173,14 @@ Status ExperimentsTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeExperimentsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/experiments_tracing_stub.h b/google/cloud/dialogflow_cx/internal/experiments_tracing_stub.h index 88ed681e031ca..b55eb3eda71a1 100644 --- a/google/cloud/dialogflow_cx/internal/experiments_tracing_stub.h +++ b/google/cloud/dialogflow_cx/internal/experiments_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ExperimentsTracingStub : public ExperimentsStub { public: ~ExperimentsTracingStub() override = default; @@ -100,8 +101,6 @@ class ExperimentsTracingStub : public ExperimentsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -116,4 +115,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_EXPERIMENTS_TRACING_STUB_H diff --git a/google/cloud/dialogflow_cx/internal/flows_auth_decorator.cc b/google/cloud/dialogflow_cx/internal/flows_auth_decorator.cc index 5db6e1de4ac53..9fbc27c4ed30b 100644 --- a/google/cloud/dialogflow_cx/internal/flows_auth_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/flows_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dialogflow/cx/v3/flow.proto #include "google/cloud/dialogflow_cx/internal/flows_auth_decorator.h" -#include +#include "google/cloud/dialogflow/cx/v3/flow.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -252,3 +255,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/flows_auth_decorator.h b/google/cloud/dialogflow_cx/internal/flows_auth_decorator.h index a0d9b334bd820..a1c92f60dbe79 100644 --- a/google/cloud/dialogflow_cx/internal/flows_auth_decorator.h +++ b/google/cloud/dialogflow_cx/internal/flows_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_cx/internal/flows_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -152,4 +155,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_FLOWS_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/flows_connection_impl.h b/google/cloud/dialogflow_cx/internal/flows_connection_impl.h index 4438302af31e7..e309b7eaec089 100644 --- a/google/cloud/dialogflow_cx/internal/flows_connection_impl.h +++ b/google/cloud/dialogflow_cx/internal/flows_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_cx/internal/flows_logging_decorator.cc b/google/cloud/dialogflow_cx/internal/flows_logging_decorator.cc index 074e3a69b5c3b..033221209e00e 100644 --- a/google/cloud/dialogflow_cx/internal/flows_logging_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/flows_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dialogflow/cx/v3/flow.proto #include "google/cloud/dialogflow_cx/internal/flows_logging_decorator.h" +#include "google/cloud/dialogflow/cx/v3/flow.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -308,3 +311,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/flows_logging_decorator.h b/google/cloud/dialogflow_cx/internal/flows_logging_decorator.h index ecea7850eb805..8a0c188358c37 100644 --- a/google/cloud/dialogflow_cx/internal/flows_logging_decorator.h +++ b/google/cloud/dialogflow_cx/internal/flows_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_cx/internal/flows_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -151,4 +154,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_FLOWS_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/flows_metadata_decorator.cc b/google/cloud/dialogflow_cx/internal/flows_metadata_decorator.cc index 958064c72847f..ec79bf4c79b85 100644 --- a/google/cloud/dialogflow_cx/internal/flows_metadata_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/flows_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/cx/v3/flow.proto #include "google/cloud/dialogflow_cx/internal/flows_metadata_decorator.h" +#include "google/cloud/dialogflow/cx/v3/flow.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -244,3 +248,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/flows_metadata_decorator.h b/google/cloud/dialogflow_cx/internal/flows_metadata_decorator.h index f152047448ae4..c2ec4383b592e 100644 --- a/google/cloud/dialogflow_cx/internal/flows_metadata_decorator.h +++ b/google/cloud/dialogflow_cx/internal/flows_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_cx/internal/flows_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -157,4 +160,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_FLOWS_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/flows_option_defaults.cc b/google/cloud/dialogflow_cx/internal/flows_option_defaults.cc index d1a4a03b3e87c..34a49d778b9da 100644 --- a/google/cloud/dialogflow_cx/internal/flows_option_defaults.cc +++ b/google/cloud/dialogflow_cx/internal/flows_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_cx/internal/flows_option_defaults.h" #include "google/cloud/dialogflow_cx/flows_connection.h" #include "google/cloud/dialogflow_cx/flows_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -43,7 +43,7 @@ Options FlowsDefaultOptions(std::string const& location, Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - dialogflow_cx::FlowsLimitedTimeRetryPolicy(std::chrono::minutes(30)) + dialogflow_cx::FlowsLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_cx/internal/flows_stub.cc b/google/cloud/dialogflow_cx/internal/flows_stub.cc index b6d178b804618..060e2d549db2b 100644 --- a/google/cloud/dialogflow_cx/internal/flows_stub.cc +++ b/google/cloud/dialogflow_cx/internal/flows_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/dialogflow/cx/v3/flow.proto #include "google/cloud/dialogflow_cx/internal/flows_stub.h" +#include "google/cloud/dialogflow/cx/v3/flow.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -302,3 +305,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/flows_stub.h b/google/cloud/dialogflow_cx/internal/flows_stub.h index 569730071d37b..657398cdaeacf 100644 --- a/google/cloud/dialogflow_cx/internal/flows_stub.h +++ b/google/cloud/dialogflow_cx/internal/flows_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_FLOWS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_FLOWS_STUB_H +#include "google/cloud/dialogflow/cx/v3/flow.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/protobuf/struct.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -266,4 +269,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_FLOWS_STUB_H diff --git a/google/cloud/dialogflow_cx/internal/flows_stub_factory.cc b/google/cloud/dialogflow_cx/internal/flows_stub_factory.cc index e7fbac9ded224..59aba0839ed8c 100644 --- a/google/cloud/dialogflow_cx/internal/flows_stub_factory.cc +++ b/google/cloud/dialogflow_cx/internal/flows_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/cx/v3/flow.proto #include "google/cloud/dialogflow_cx/internal/flows_stub_factory.h" +#include "google/cloud/dialogflow/cx/v3/flow.grpc.pb.h" #include "google/cloud/dialogflow_cx/internal/flows_auth_decorator.h" #include "google/cloud/dialogflow_cx/internal/flows_logging_decorator.h" #include "google/cloud/dialogflow_cx/internal/flows_metadata_decorator.h" #include "google/cloud/dialogflow_cx/internal/flows_stub.h" #include "google/cloud/dialogflow_cx/internal/flows_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/flows_stub_factory.h b/google/cloud/dialogflow_cx/internal/flows_stub_factory.h index 4080345154e41..056ce74ad6b0e 100644 --- a/google/cloud/dialogflow_cx/internal/flows_stub_factory.h +++ b/google/cloud/dialogflow_cx/internal/flows_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_FLOWS_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_cx/internal/flows_tracing_connection.cc b/google/cloud/dialogflow_cx/internal/flows_tracing_connection.cc index 2ba436177489a..7407edc28a0bb 100644 --- a/google/cloud/dialogflow_cx/internal/flows_tracing_connection.cc +++ b/google/cloud/dialogflow_cx/internal/flows_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - FlowsTracingConnection::FlowsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -208,15 +206,11 @@ Status FlowsTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeFlowsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_cx/internal/flows_tracing_connection.h b/google/cloud/dialogflow_cx/internal/flows_tracing_connection.h index 3c27aba0eef82..9cd262de0d57e 100644 --- a/google/cloud/dialogflow_cx/internal/flows_tracing_connection.h +++ b/google/cloud/dialogflow_cx/internal/flows_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class FlowsTracingConnection : public dialogflow_cx::FlowsConnection { public: ~FlowsTracingConnection() override = default; @@ -121,8 +119,6 @@ class FlowsTracingConnection : public dialogflow_cx::FlowsConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_cx/internal/flows_tracing_stub.cc b/google/cloud/dialogflow_cx/internal/flows_tracing_stub.cc index a2319941a89b2..ae0710453c21e 100644 --- a/google/cloud/dialogflow_cx/internal/flows_tracing_stub.cc +++ b/google/cloud/dialogflow_cx/internal/flows_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - FlowsTracingStub::FlowsTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -273,18 +274,14 @@ future FlowsTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeFlowsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/flows_tracing_stub.h b/google/cloud/dialogflow_cx/internal/flows_tracing_stub.h index 6cb42fa58dc4b..78e0911c51113 100644 --- a/google/cloud/dialogflow_cx/internal/flows_tracing_stub.h +++ b/google/cloud/dialogflow_cx/internal/flows_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class FlowsTracingStub : public FlowsStub { public: ~FlowsTracingStub() override = default; @@ -147,8 +148,6 @@ class FlowsTracingStub : public FlowsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -163,4 +162,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_FLOWS_TRACING_STUB_H diff --git a/google/cloud/dialogflow_cx/internal/generators_auth_decorator.cc b/google/cloud/dialogflow_cx/internal/generators_auth_decorator.cc index bc81446a29aae..e66d759aadf11 100644 --- a/google/cloud/dialogflow_cx/internal/generators_auth_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/generators_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dialogflow/cx/v3/generator.proto #include "google/cloud/dialogflow_cx/internal/generators_auth_decorator.h" -#include +#include "google/cloud/dialogflow/cx/v3/generator.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -121,3 +124,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/generators_auth_decorator.h b/google/cloud/dialogflow_cx/internal/generators_auth_decorator.h index e6a8296adde1f..50dcb561a1320 100644 --- a/google/cloud/dialogflow_cx/internal/generators_auth_decorator.h +++ b/google/cloud/dialogflow_cx/internal/generators_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -93,4 +96,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_GENERATORS_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/generators_logging_decorator.cc b/google/cloud/dialogflow_cx/internal/generators_logging_decorator.cc index 0b1cdbc2eeff6..9a998dc67ce92 100644 --- a/google/cloud/dialogflow_cx/internal/generators_logging_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/generators_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dialogflow/cx/v3/generator.proto #include "google/cloud/dialogflow_cx/internal/generators_logging_decorator.h" +#include "google/cloud/dialogflow/cx/v3/generator.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -160,3 +163,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/generators_logging_decorator.h b/google/cloud/dialogflow_cx/internal/generators_logging_decorator.h index e1893da93d88b..dc487ccac5fed 100644 --- a/google/cloud/dialogflow_cx/internal/generators_logging_decorator.h +++ b/google/cloud/dialogflow_cx/internal/generators_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -93,4 +96,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_GENERATORS_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/generators_metadata_decorator.cc b/google/cloud/dialogflow_cx/internal/generators_metadata_decorator.cc index 25240f4f0eb06..7ce157f0d2954 100644 --- a/google/cloud/dialogflow_cx/internal/generators_metadata_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/generators_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/cx/v3/generator.proto #include "google/cloud/dialogflow_cx/internal/generators_metadata_decorator.h" +#include "google/cloud/dialogflow/cx/v3/generator.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -148,3 +152,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/generators_metadata_decorator.h b/google/cloud/dialogflow_cx/internal/generators_metadata_decorator.h index 6393282bf709d..2c3891ed9bb23 100644 --- a/google/cloud/dialogflow_cx/internal/generators_metadata_decorator.h +++ b/google/cloud/dialogflow_cx/internal/generators_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -98,4 +101,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_GENERATORS_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/generators_option_defaults.cc b/google/cloud/dialogflow_cx/internal/generators_option_defaults.cc index 37cc78a21ae9d..ab4bc1690e024 100644 --- a/google/cloud/dialogflow_cx/internal/generators_option_defaults.cc +++ b/google/cloud/dialogflow_cx/internal/generators_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_cx/internal/generators_option_defaults.h" #include "google/cloud/dialogflow_cx/generators_connection.h" #include "google/cloud/dialogflow_cx/generators_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -43,7 +43,7 @@ Options GeneratorsDefaultOptions(std::string const& location, Options options) { if (!options.has()) { options.set( dialogflow_cx::GeneratorsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_cx/internal/generators_stub.cc b/google/cloud/dialogflow_cx/internal/generators_stub.cc index 38fa773d742d2..8724523e98ab4 100644 --- a/google/cloud/dialogflow_cx/internal/generators_stub.cc +++ b/google/cloud/dialogflow_cx/internal/generators_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/dialogflow/cx/v3/generator.proto #include "google/cloud/dialogflow_cx/internal/generators_stub.h" +#include "google/cloud/dialogflow/cx/v3/generator.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -150,3 +153,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/generators_stub.h b/google/cloud/dialogflow_cx/internal/generators_stub.h index 5bd16ec421a1e..ae6553ebead59 100644 --- a/google/cloud/dialogflow_cx/internal/generators_stub.h +++ b/google/cloud/dialogflow_cx/internal/generators_stub.h @@ -19,15 +19,18 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_GENERATORS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_GENERATORS_STUB_H +#include "google/cloud/dialogflow/cx/v3/generator.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -159,4 +162,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_GENERATORS_STUB_H diff --git a/google/cloud/dialogflow_cx/internal/generators_stub_factory.cc b/google/cloud/dialogflow_cx/internal/generators_stub_factory.cc index 7b6a6c6a8521c..d214417c1fb9d 100644 --- a/google/cloud/dialogflow_cx/internal/generators_stub_factory.cc +++ b/google/cloud/dialogflow_cx/internal/generators_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/cx/v3/generator.proto #include "google/cloud/dialogflow_cx/internal/generators_stub_factory.h" +#include "google/cloud/dialogflow/cx/v3/generator.grpc.pb.h" #include "google/cloud/dialogflow_cx/internal/generators_auth_decorator.h" #include "google/cloud/dialogflow_cx/internal/generators_logging_decorator.h" #include "google/cloud/dialogflow_cx/internal/generators_metadata_decorator.h" #include "google/cloud/dialogflow_cx/internal/generators_stub.h" #include "google/cloud/dialogflow_cx/internal/generators_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -76,3 +79,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/generators_stub_factory.h b/google/cloud/dialogflow_cx/internal/generators_stub_factory.h index ac4e72b92f2d3..5661bcc0d90ef 100644 --- a/google/cloud/dialogflow_cx/internal/generators_stub_factory.h +++ b/google/cloud/dialogflow_cx/internal/generators_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_GENERATORS_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_cx/internal/generators_tracing_connection.cc b/google/cloud/dialogflow_cx/internal/generators_tracing_connection.cc index 6c80a4ba30ca3..d54210e237892 100644 --- a/google/cloud/dialogflow_cx/internal/generators_tracing_connection.cc +++ b/google/cloud/dialogflow_cx/internal/generators_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GeneratorsTracingConnection::GeneratorsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -128,16 +126,12 @@ Status GeneratorsTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeGeneratorsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_cx/internal/generators_tracing_connection.h b/google/cloud/dialogflow_cx/internal/generators_tracing_connection.h index 188b7f8d5cd30..ac0674926b22f 100644 --- a/google/cloud/dialogflow_cx/internal/generators_tracing_connection.h +++ b/google/cloud/dialogflow_cx/internal/generators_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class GeneratorsTracingConnection : public dialogflow_cx::GeneratorsConnection { public: ~GeneratorsTracingConnection() override = default; @@ -78,8 +76,6 @@ class GeneratorsTracingConnection : public dialogflow_cx::GeneratorsConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_cx/internal/generators_tracing_stub.cc b/google/cloud/dialogflow_cx/internal/generators_tracing_stub.cc index ead9f1e37b0f5..851876bd53145 100644 --- a/google/cloud/dialogflow_cx/internal/generators_tracing_stub.cc +++ b/google/cloud/dialogflow_cx/internal/generators_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GeneratorsTracingStub::GeneratorsTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -148,18 +149,14 @@ Status GeneratorsTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeGeneratorsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/generators_tracing_stub.h b/google/cloud/dialogflow_cx/internal/generators_tracing_stub.h index fd82370195351..25528db9a9070 100644 --- a/google/cloud/dialogflow_cx/internal/generators_tracing_stub.h +++ b/google/cloud/dialogflow_cx/internal/generators_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class GeneratorsTracingStub : public GeneratorsStub { public: ~GeneratorsTracingStub() override = default; @@ -89,8 +90,6 @@ class GeneratorsTracingStub : public GeneratorsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -105,4 +104,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_GENERATORS_TRACING_STUB_H diff --git a/google/cloud/dialogflow_cx/internal/intents_auth_decorator.cc b/google/cloud/dialogflow_cx/internal/intents_auth_decorator.cc index d2e33abc66021..96d3d36cd49c3 100644 --- a/google/cloud/dialogflow_cx/internal/intents_auth_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/intents_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dialogflow/cx/v3/intent.proto #include "google/cloud/dialogflow_cx/internal/intents_auth_decorator.h" -#include +#include "google/cloud/dialogflow/cx/v3/intent.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -209,3 +212,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/intents_auth_decorator.h b/google/cloud/dialogflow_cx/internal/intents_auth_decorator.h index b7363c81baa2d..ea012fcfabf8e 100644 --- a/google/cloud/dialogflow_cx/internal/intents_auth_decorator.h +++ b/google/cloud/dialogflow_cx/internal/intents_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_cx/internal/intents_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -130,4 +133,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_INTENTS_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/intents_connection_impl.h b/google/cloud/dialogflow_cx/internal/intents_connection_impl.h index 58d2cc474994b..0af1536631afb 100644 --- a/google/cloud/dialogflow_cx/internal/intents_connection_impl.h +++ b/google/cloud/dialogflow_cx/internal/intents_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_cx/internal/intents_logging_decorator.cc b/google/cloud/dialogflow_cx/internal/intents_logging_decorator.cc index 11e02e606afb7..822e5f35166c5 100644 --- a/google/cloud/dialogflow_cx/internal/intents_logging_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/intents_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dialogflow/cx/v3/intent.proto #include "google/cloud/dialogflow_cx/internal/intents_logging_decorator.h" +#include "google/cloud/dialogflow/cx/v3/intent.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -256,3 +259,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/intents_logging_decorator.h b/google/cloud/dialogflow_cx/internal/intents_logging_decorator.h index 4158494a072bf..a3bce35c2c6e1 100644 --- a/google/cloud/dialogflow_cx/internal/intents_logging_decorator.h +++ b/google/cloud/dialogflow_cx/internal/intents_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_cx/internal/intents_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -130,4 +133,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_INTENTS_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/intents_metadata_decorator.cc b/google/cloud/dialogflow_cx/internal/intents_metadata_decorator.cc index dc3b6fb2f2a68..a95a72acf4f07 100644 --- a/google/cloud/dialogflow_cx/internal/intents_metadata_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/intents_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/cx/v3/intent.proto #include "google/cloud/dialogflow_cx/internal/intents_metadata_decorator.h" +#include "google/cloud/dialogflow/cx/v3/intent.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -210,3 +214,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/intents_metadata_decorator.h b/google/cloud/dialogflow_cx/internal/intents_metadata_decorator.h index 8b1907c955c0b..edee170a5177c 100644 --- a/google/cloud/dialogflow_cx/internal/intents_metadata_decorator.h +++ b/google/cloud/dialogflow_cx/internal/intents_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_cx/internal/intents_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -135,4 +138,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_INTENTS_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/intents_option_defaults.cc b/google/cloud/dialogflow_cx/internal/intents_option_defaults.cc index 6e77cdc85f246..4b2d64a108a07 100644 --- a/google/cloud/dialogflow_cx/internal/intents_option_defaults.cc +++ b/google/cloud/dialogflow_cx/internal/intents_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_cx/internal/intents_option_defaults.h" #include "google/cloud/dialogflow_cx/intents_connection.h" #include "google/cloud/dialogflow_cx/intents_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -43,7 +43,7 @@ Options IntentsDefaultOptions(std::string const& location, Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - dialogflow_cx::IntentsLimitedTimeRetryPolicy(std::chrono::minutes(30)) + dialogflow_cx::IntentsLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_cx/internal/intents_stub.cc b/google/cloud/dialogflow_cx/internal/intents_stub.cc index ba731b07e5820..c7a970968a281 100644 --- a/google/cloud/dialogflow_cx/internal/intents_stub.cc +++ b/google/cloud/dialogflow_cx/internal/intents_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/dialogflow/cx/v3/intent.proto #include "google/cloud/dialogflow_cx/internal/intents_stub.h" +#include "google/cloud/dialogflow/cx/v3/intent.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -250,3 +253,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/intents_stub.h b/google/cloud/dialogflow_cx/internal/intents_stub.h index cf2d49a28c2a6..bb9a0ac422a5c 100644 --- a/google/cloud/dialogflow_cx/internal/intents_stub.h +++ b/google/cloud/dialogflow_cx/internal/intents_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_INTENTS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_INTENTS_STUB_H +#include "google/cloud/dialogflow/cx/v3/intent.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -229,4 +232,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_INTENTS_STUB_H diff --git a/google/cloud/dialogflow_cx/internal/intents_stub_factory.cc b/google/cloud/dialogflow_cx/internal/intents_stub_factory.cc index 5d041ebdcef7b..b348dc6f08b6e 100644 --- a/google/cloud/dialogflow_cx/internal/intents_stub_factory.cc +++ b/google/cloud/dialogflow_cx/internal/intents_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/cx/v3/intent.proto #include "google/cloud/dialogflow_cx/internal/intents_stub_factory.h" +#include "google/cloud/dialogflow/cx/v3/intent.grpc.pb.h" #include "google/cloud/dialogflow_cx/internal/intents_auth_decorator.h" #include "google/cloud/dialogflow_cx/internal/intents_logging_decorator.h" #include "google/cloud/dialogflow_cx/internal/intents_metadata_decorator.h" #include "google/cloud/dialogflow_cx/internal/intents_stub.h" #include "google/cloud/dialogflow_cx/internal/intents_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/intents_stub_factory.h b/google/cloud/dialogflow_cx/internal/intents_stub_factory.h index 3f3d1e40689ef..b0178449882ac 100644 --- a/google/cloud/dialogflow_cx/internal/intents_stub_factory.h +++ b/google/cloud/dialogflow_cx/internal/intents_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_INTENTS_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_cx/internal/intents_tracing_connection.cc b/google/cloud/dialogflow_cx/internal/intents_tracing_connection.cc index 8401b6a96cdc2..db02ba2dd18c5 100644 --- a/google/cloud/dialogflow_cx/internal/intents_tracing_connection.cc +++ b/google/cloud/dialogflow_cx/internal/intents_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - IntentsTracingConnection::IntentsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -182,15 +180,11 @@ Status IntentsTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeIntentsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_cx/internal/intents_tracing_connection.h b/google/cloud/dialogflow_cx/internal/intents_tracing_connection.h index fec29bfa741e3..6d9d413ec744a 100644 --- a/google/cloud/dialogflow_cx/internal/intents_tracing_connection.h +++ b/google/cloud/dialogflow_cx/internal/intents_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class IntentsTracingConnection : public dialogflow_cx::IntentsConnection { public: ~IntentsTracingConnection() override = default; @@ -101,8 +99,6 @@ class IntentsTracingConnection : public dialogflow_cx::IntentsConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_cx/internal/intents_tracing_stub.cc b/google/cloud/dialogflow_cx/internal/intents_tracing_stub.cc index 33dc34730dffc..a53224969977e 100644 --- a/google/cloud/dialogflow_cx/internal/intents_tracing_stub.cc +++ b/google/cloud/dialogflow_cx/internal/intents_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - IntentsTracingStub::IntentsTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -225,18 +226,14 @@ future IntentsTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeIntentsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/intents_tracing_stub.h b/google/cloud/dialogflow_cx/internal/intents_tracing_stub.h index 81a6c743a755c..c505f21ddbaab 100644 --- a/google/cloud/dialogflow_cx/internal/intents_tracing_stub.h +++ b/google/cloud/dialogflow_cx/internal/intents_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class IntentsTracingStub : public IntentsStub { public: ~IntentsTracingStub() override = default; @@ -125,8 +126,6 @@ class IntentsTracingStub : public IntentsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -141,4 +140,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_INTENTS_TRACING_STUB_H diff --git a/google/cloud/dialogflow_cx/internal/pages_auth_decorator.cc b/google/cloud/dialogflow_cx/internal/pages_auth_decorator.cc index 8f85473a90b5e..4e6bf84c235dc 100644 --- a/google/cloud/dialogflow_cx/internal/pages_auth_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/pages_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dialogflow/cx/v3/page.proto #include "google/cloud/dialogflow_cx/internal/pages_auth_decorator.h" -#include +#include "google/cloud/dialogflow/cx/v3/page.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -117,3 +120,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/pages_auth_decorator.h b/google/cloud/dialogflow_cx/internal/pages_auth_decorator.h index 6d20463aa0006..b8952d9ae0c19 100644 --- a/google/cloud/dialogflow_cx/internal/pages_auth_decorator.h +++ b/google/cloud/dialogflow_cx/internal/pages_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -92,4 +95,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_PAGES_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/pages_logging_decorator.cc b/google/cloud/dialogflow_cx/internal/pages_logging_decorator.cc index f83e7a3b425a2..819119425d39c 100644 --- a/google/cloud/dialogflow_cx/internal/pages_logging_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/pages_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dialogflow/cx/v3/page.proto #include "google/cloud/dialogflow_cx/internal/pages_logging_decorator.h" +#include "google/cloud/dialogflow/cx/v3/page.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -156,3 +159,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/pages_logging_decorator.h b/google/cloud/dialogflow_cx/internal/pages_logging_decorator.h index 63d3ca8b6eec5..db5069e78d596 100644 --- a/google/cloud/dialogflow_cx/internal/pages_logging_decorator.h +++ b/google/cloud/dialogflow_cx/internal/pages_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -91,4 +94,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_PAGES_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/pages_metadata_decorator.cc b/google/cloud/dialogflow_cx/internal/pages_metadata_decorator.cc index d13c67f371459..92e69cd5b7dcc 100644 --- a/google/cloud/dialogflow_cx/internal/pages_metadata_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/pages_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/cx/v3/page.proto #include "google/cloud/dialogflow_cx/internal/pages_metadata_decorator.h" +#include "google/cloud/dialogflow/cx/v3/page.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -145,3 +149,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/pages_metadata_decorator.h b/google/cloud/dialogflow_cx/internal/pages_metadata_decorator.h index e071f45e876d1..3f73cd964b4ed 100644 --- a/google/cloud/dialogflow_cx/internal/pages_metadata_decorator.h +++ b/google/cloud/dialogflow_cx/internal/pages_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -97,4 +100,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_PAGES_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/pages_option_defaults.cc b/google/cloud/dialogflow_cx/internal/pages_option_defaults.cc index d8c3b9c91ab71..68cbdc4180a46 100644 --- a/google/cloud/dialogflow_cx/internal/pages_option_defaults.cc +++ b/google/cloud/dialogflow_cx/internal/pages_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_cx/internal/pages_option_defaults.h" #include "google/cloud/dialogflow_cx/pages_connection.h" #include "google/cloud/dialogflow_cx/pages_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -43,7 +43,7 @@ Options PagesDefaultOptions(std::string const& location, Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - dialogflow_cx::PagesLimitedTimeRetryPolicy(std::chrono::minutes(30)) + dialogflow_cx::PagesLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_cx/internal/pages_stub.cc b/google/cloud/dialogflow_cx/internal/pages_stub.cc index 9712b36720241..29aca24ca5811 100644 --- a/google/cloud/dialogflow_cx/internal/pages_stub.cc +++ b/google/cloud/dialogflow_cx/internal/pages_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/dialogflow/cx/v3/page.proto #include "google/cloud/dialogflow_cx/internal/pages_stub.h" +#include "google/cloud/dialogflow/cx/v3/page.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -147,3 +150,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/pages_stub.h b/google/cloud/dialogflow_cx/internal/pages_stub.h index 55da130c4c8f7..9c2d6301b2816 100644 --- a/google/cloud/dialogflow_cx/internal/pages_stub.h +++ b/google/cloud/dialogflow_cx/internal/pages_stub.h @@ -19,15 +19,18 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_PAGES_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_PAGES_STUB_H +#include "google/cloud/dialogflow/cx/v3/page.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -151,4 +154,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_PAGES_STUB_H diff --git a/google/cloud/dialogflow_cx/internal/pages_stub_factory.cc b/google/cloud/dialogflow_cx/internal/pages_stub_factory.cc index b2b4442bcd1d3..22b3d48641b4e 100644 --- a/google/cloud/dialogflow_cx/internal/pages_stub_factory.cc +++ b/google/cloud/dialogflow_cx/internal/pages_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/cx/v3/page.proto #include "google/cloud/dialogflow_cx/internal/pages_stub_factory.h" +#include "google/cloud/dialogflow/cx/v3/page.grpc.pb.h" #include "google/cloud/dialogflow_cx/internal/pages_auth_decorator.h" #include "google/cloud/dialogflow_cx/internal/pages_logging_decorator.h" #include "google/cloud/dialogflow_cx/internal/pages_metadata_decorator.h" #include "google/cloud/dialogflow_cx/internal/pages_stub.h" #include "google/cloud/dialogflow_cx/internal/pages_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/pages_stub_factory.h b/google/cloud/dialogflow_cx/internal/pages_stub_factory.h index 55ddadcc44ac5..7423940ce88dd 100644 --- a/google/cloud/dialogflow_cx/internal/pages_stub_factory.h +++ b/google/cloud/dialogflow_cx/internal/pages_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_PAGES_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_cx/internal/pages_tracing_connection.cc b/google/cloud/dialogflow_cx/internal/pages_tracing_connection.cc index 53ca82aac59cb..4fea6cb2afd12 100644 --- a/google/cloud/dialogflow_cx/internal/pages_tracing_connection.cc +++ b/google/cloud/dialogflow_cx/internal/pages_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PagesTracingConnection::PagesTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -119,15 +117,11 @@ Status PagesTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePagesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_cx/internal/pages_tracing_connection.h b/google/cloud/dialogflow_cx/internal/pages_tracing_connection.h index 4992da370f381..7949408c90bc0 100644 --- a/google/cloud/dialogflow_cx/internal/pages_tracing_connection.h +++ b/google/cloud/dialogflow_cx/internal/pages_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PagesTracingConnection : public dialogflow_cx::PagesConnection { public: ~PagesTracingConnection() override = default; @@ -76,8 +74,6 @@ class PagesTracingConnection : public dialogflow_cx::PagesConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_cx/internal/pages_tracing_stub.cc b/google/cloud/dialogflow_cx/internal/pages_tracing_stub.cc index 414a9dac21184..ba51176eae0fe 100644 --- a/google/cloud/dialogflow_cx/internal/pages_tracing_stub.cc +++ b/google/cloud/dialogflow_cx/internal/pages_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PagesTracingStub::PagesTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -144,18 +145,14 @@ Status PagesTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePagesTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/pages_tracing_stub.h b/google/cloud/dialogflow_cx/internal/pages_tracing_stub.h index 70dfc762c0318..4fa48cf3ba092 100644 --- a/google/cloud/dialogflow_cx/internal/pages_tracing_stub.h +++ b/google/cloud/dialogflow_cx/internal/pages_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PagesTracingStub : public PagesStub { public: ~PagesTracingStub() override = default; @@ -88,8 +89,6 @@ class PagesTracingStub : public PagesStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -104,4 +103,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_PAGES_TRACING_STUB_H diff --git a/google/cloud/dialogflow_cx/internal/security_settings_auth_decorator.cc b/google/cloud/dialogflow_cx/internal/security_settings_auth_decorator.cc index 2c2aaf0d53b73..6301e7ae0b6fa 100644 --- a/google/cloud/dialogflow_cx/internal/security_settings_auth_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/security_settings_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dialogflow/cx/v3/security_settings.proto #include "google/cloud/dialogflow_cx/internal/security_settings_auth_decorator.h" -#include +#include "google/cloud/dialogflow/cx/v3/security_settings.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -128,3 +131,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/security_settings_auth_decorator.h b/google/cloud/dialogflow_cx/internal/security_settings_auth_decorator.h index 6fd8730dca1be..f6b402aca3a82 100644 --- a/google/cloud/dialogflow_cx/internal/security_settings_auth_decorator.h +++ b/google/cloud/dialogflow_cx/internal/security_settings_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -97,4 +100,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_SECURITY_SETTINGS_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/security_settings_logging_decorator.cc b/google/cloud/dialogflow_cx/internal/security_settings_logging_decorator.cc index 7aa5e99c754f5..8d414ea69e4bf 100644 --- a/google/cloud/dialogflow_cx/internal/security_settings_logging_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/security_settings_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dialogflow/cx/v3/security_settings.proto #include "google/cloud/dialogflow_cx/internal/security_settings_logging_decorator.h" +#include "google/cloud/dialogflow/cx/v3/security_settings.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -169,3 +172,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/security_settings_logging_decorator.h b/google/cloud/dialogflow_cx/internal/security_settings_logging_decorator.h index 27aa40064688e..a58ec0bc7cbf9 100644 --- a/google/cloud/dialogflow_cx/internal/security_settings_logging_decorator.h +++ b/google/cloud/dialogflow_cx/internal/security_settings_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -97,4 +100,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_SECURITY_SETTINGS_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/security_settings_metadata_decorator.cc b/google/cloud/dialogflow_cx/internal/security_settings_metadata_decorator.cc index 5ea146c4ce05b..fd489cfcd764e 100644 --- a/google/cloud/dialogflow_cx/internal/security_settings_metadata_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/security_settings_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/cx/v3/security_settings.proto #include "google/cloud/dialogflow_cx/internal/security_settings_metadata_decorator.h" +#include "google/cloud/dialogflow/cx/v3/security_settings.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -156,3 +160,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/security_settings_metadata_decorator.h b/google/cloud/dialogflow_cx/internal/security_settings_metadata_decorator.h index 4bb894c9d4cb1..7bb8c979f96eb 100644 --- a/google/cloud/dialogflow_cx/internal/security_settings_metadata_decorator.h +++ b/google/cloud/dialogflow_cx/internal/security_settings_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -103,4 +106,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_SECURITY_SETTINGS_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/security_settings_option_defaults.cc b/google/cloud/dialogflow_cx/internal/security_settings_option_defaults.cc index fcb818ea1a6c8..f61eccd756899 100644 --- a/google/cloud/dialogflow_cx/internal/security_settings_option_defaults.cc +++ b/google/cloud/dialogflow_cx/internal/security_settings_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_cx/internal/security_settings_option_defaults.h" #include "google/cloud/dialogflow_cx/security_settings_connection.h" #include "google/cloud/dialogflow_cx/security_settings_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -45,7 +45,7 @@ Options SecuritySettingsServiceDefaultOptions(std::string const& location, if (!options.has()) { options.set( dialogflow_cx::SecuritySettingsServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/dialogflow_cx/internal/security_settings_stub.cc b/google/cloud/dialogflow_cx/internal/security_settings_stub.cc index 9a95efdd234a4..2ea2d067a54af 100644 --- a/google/cloud/dialogflow_cx/internal/security_settings_stub.cc +++ b/google/cloud/dialogflow_cx/internal/security_settings_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/dialogflow/cx/v3/security_settings.proto #include "google/cloud/dialogflow_cx/internal/security_settings_stub.h" +#include "google/cloud/dialogflow/cx/v3/security_settings.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -160,3 +163,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/security_settings_stub.h b/google/cloud/dialogflow_cx/internal/security_settings_stub.h index 5d2d0390e3d4e..9a9d749d12d2f 100644 --- a/google/cloud/dialogflow_cx/internal/security_settings_stub.h +++ b/google/cloud/dialogflow_cx/internal/security_settings_stub.h @@ -19,15 +19,18 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_SECURITY_SETTINGS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_SECURITY_SETTINGS_STUB_H +#include "google/cloud/dialogflow/cx/v3/security_settings.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -167,4 +170,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_SECURITY_SETTINGS_STUB_H diff --git a/google/cloud/dialogflow_cx/internal/security_settings_stub_factory.cc b/google/cloud/dialogflow_cx/internal/security_settings_stub_factory.cc index 638e04b548de0..8c287fe8903b5 100644 --- a/google/cloud/dialogflow_cx/internal/security_settings_stub_factory.cc +++ b/google/cloud/dialogflow_cx/internal/security_settings_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/cx/v3/security_settings.proto #include "google/cloud/dialogflow_cx/internal/security_settings_stub_factory.h" +#include "google/cloud/dialogflow/cx/v3/security_settings.grpc.pb.h" #include "google/cloud/dialogflow_cx/internal/security_settings_auth_decorator.h" #include "google/cloud/dialogflow_cx/internal/security_settings_logging_decorator.h" #include "google/cloud/dialogflow_cx/internal/security_settings_metadata_decorator.h" #include "google/cloud/dialogflow_cx/internal/security_settings_stub.h" #include "google/cloud/dialogflow_cx/internal/security_settings_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -79,3 +82,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/security_settings_stub_factory.h b/google/cloud/dialogflow_cx/internal/security_settings_stub_factory.h index 065a18a9c60e4..b973d82cb8e53 100644 --- a/google/cloud/dialogflow_cx/internal/security_settings_stub_factory.h +++ b/google/cloud/dialogflow_cx/internal/security_settings_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_SECURITY_SETTINGS_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_cx/internal/security_settings_tracing_connection.cc b/google/cloud/dialogflow_cx/internal/security_settings_tracing_connection.cc index fb11953ba28bb..7a09d1de098d5 100644 --- a/google/cloud/dialogflow_cx/internal/security_settings_tracing_connection.cc +++ b/google/cloud/dialogflow_cx/internal/security_settings_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SecuritySettingsServiceTracingConnection:: SecuritySettingsServiceTracingConnection( std::shared_ptr child) @@ -136,17 +134,13 @@ Status SecuritySettingsServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSecuritySettingsServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_cx/internal/security_settings_tracing_connection.h b/google/cloud/dialogflow_cx/internal/security_settings_tracing_connection.h index ba1db15830778..519977ad18846 100644 --- a/google/cloud/dialogflow_cx/internal/security_settings_tracing_connection.h +++ b/google/cloud/dialogflow_cx/internal/security_settings_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SecuritySettingsServiceTracingConnection : public dialogflow_cx::SecuritySettingsServiceConnection { public: @@ -83,8 +81,6 @@ class SecuritySettingsServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_cx/internal/security_settings_tracing_stub.cc b/google/cloud/dialogflow_cx/internal/security_settings_tracing_stub.cc index 5db71ed18a828..627875a5c64a4 100644 --- a/google/cloud/dialogflow_cx/internal/security_settings_tracing_stub.cc +++ b/google/cloud/dialogflow_cx/internal/security_settings_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SecuritySettingsServiceTracingStub::SecuritySettingsServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -165,19 +166,15 @@ Status SecuritySettingsServiceTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSecuritySettingsServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/security_settings_tracing_stub.h b/google/cloud/dialogflow_cx/internal/security_settings_tracing_stub.h index b61970d9abb71..6d9357a1e4f2b 100644 --- a/google/cloud/dialogflow_cx/internal/security_settings_tracing_stub.h +++ b/google/cloud/dialogflow_cx/internal/security_settings_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SecuritySettingsServiceTracingStub : public SecuritySettingsServiceStub { public: ~SecuritySettingsServiceTracingStub() override = default; @@ -94,8 +95,6 @@ class SecuritySettingsServiceTracingStub : public SecuritySettingsServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -111,4 +110,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_SECURITY_SETTINGS_TRACING_STUB_H diff --git a/google/cloud/dialogflow_cx/internal/session_entity_types_auth_decorator.cc b/google/cloud/dialogflow_cx/internal/session_entity_types_auth_decorator.cc index 300e67bcb0a0e..fa6e9a898ea88 100644 --- a/google/cloud/dialogflow_cx/internal/session_entity_types_auth_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/session_entity_types_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dialogflow/cx/v3/session_entity_type.proto #include "google/cloud/dialogflow_cx/internal/session_entity_types_auth_decorator.h" -#include +#include "google/cloud/dialogflow/cx/v3/session_entity_type.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -126,3 +129,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/session_entity_types_auth_decorator.h b/google/cloud/dialogflow_cx/internal/session_entity_types_auth_decorator.h index 035eb3d8c9b4f..26e9674e4f4d0 100644 --- a/google/cloud/dialogflow_cx/internal/session_entity_types_auth_decorator.h +++ b/google/cloud/dialogflow_cx/internal/session_entity_types_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -97,4 +100,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_SESSION_ENTITY_TYPES_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/session_entity_types_logging_decorator.cc b/google/cloud/dialogflow_cx/internal/session_entity_types_logging_decorator.cc index 6d6fb9908a2fc..30b92ae158c6c 100644 --- a/google/cloud/dialogflow_cx/internal/session_entity_types_logging_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/session_entity_types_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dialogflow/cx/v3/session_entity_type.proto #include "google/cloud/dialogflow_cx/internal/session_entity_types_logging_decorator.h" +#include "google/cloud/dialogflow/cx/v3/session_entity_type.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -168,3 +171,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/session_entity_types_logging_decorator.h b/google/cloud/dialogflow_cx/internal/session_entity_types_logging_decorator.h index d12b7963c606e..89ea2bab3985b 100644 --- a/google/cloud/dialogflow_cx/internal/session_entity_types_logging_decorator.h +++ b/google/cloud/dialogflow_cx/internal/session_entity_types_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -97,4 +100,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_SESSION_ENTITY_TYPES_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/session_entity_types_metadata_decorator.cc b/google/cloud/dialogflow_cx/internal/session_entity_types_metadata_decorator.cc index 082fe6d4d80e1..b84d8b7d70e0f 100644 --- a/google/cloud/dialogflow_cx/internal/session_entity_types_metadata_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/session_entity_types_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/cx/v3/session_entity_type.proto #include "google/cloud/dialogflow_cx/internal/session_entity_types_metadata_decorator.h" +#include "google/cloud/dialogflow/cx/v3/session_entity_type.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -156,3 +160,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/session_entity_types_metadata_decorator.h b/google/cloud/dialogflow_cx/internal/session_entity_types_metadata_decorator.h index 26522eb897403..e7f28f18081e3 100644 --- a/google/cloud/dialogflow_cx/internal/session_entity_types_metadata_decorator.h +++ b/google/cloud/dialogflow_cx/internal/session_entity_types_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -103,4 +106,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_SESSION_ENTITY_TYPES_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/session_entity_types_option_defaults.cc b/google/cloud/dialogflow_cx/internal/session_entity_types_option_defaults.cc index 1fa0c7d777e50..0ae26f26a0b56 100644 --- a/google/cloud/dialogflow_cx/internal/session_entity_types_option_defaults.cc +++ b/google/cloud/dialogflow_cx/internal/session_entity_types_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_cx/internal/session_entity_types_option_defaults.h" #include "google/cloud/dialogflow_cx/session_entity_types_connection.h" #include "google/cloud/dialogflow_cx/session_entity_types_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -45,7 +45,7 @@ Options SessionEntityTypesDefaultOptions(std::string const& location, if (!options.has()) { options.set( dialogflow_cx::SessionEntityTypesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_cx/internal/session_entity_types_stub.cc b/google/cloud/dialogflow_cx/internal/session_entity_types_stub.cc index f821d91b480cd..22994ab2745dc 100644 --- a/google/cloud/dialogflow_cx/internal/session_entity_types_stub.cc +++ b/google/cloud/dialogflow_cx/internal/session_entity_types_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/dialogflow/cx/v3/session_entity_type.proto #include "google/cloud/dialogflow_cx/internal/session_entity_types_stub.h" +#include "google/cloud/dialogflow/cx/v3/session_entity_type.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -161,3 +164,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/session_entity_types_stub.h b/google/cloud/dialogflow_cx/internal/session_entity_types_stub.h index d64d3b5ab40eb..0c3f01fa766f3 100644 --- a/google/cloud/dialogflow_cx/internal/session_entity_types_stub.h +++ b/google/cloud/dialogflow_cx/internal/session_entity_types_stub.h @@ -19,15 +19,18 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_SESSION_ENTITY_TYPES_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_SESSION_ENTITY_TYPES_STUB_H +#include "google/cloud/dialogflow/cx/v3/session_entity_type.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -167,4 +170,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_SESSION_ENTITY_TYPES_STUB_H diff --git a/google/cloud/dialogflow_cx/internal/session_entity_types_stub_factory.cc b/google/cloud/dialogflow_cx/internal/session_entity_types_stub_factory.cc index 81e91f05f3a4a..ac5f342a30df5 100644 --- a/google/cloud/dialogflow_cx/internal/session_entity_types_stub_factory.cc +++ b/google/cloud/dialogflow_cx/internal/session_entity_types_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/cx/v3/session_entity_type.proto #include "google/cloud/dialogflow_cx/internal/session_entity_types_stub_factory.h" +#include "google/cloud/dialogflow/cx/v3/session_entity_type.grpc.pb.h" #include "google/cloud/dialogflow_cx/internal/session_entity_types_auth_decorator.h" #include "google/cloud/dialogflow_cx/internal/session_entity_types_logging_decorator.h" #include "google/cloud/dialogflow_cx/internal/session_entity_types_metadata_decorator.h" #include "google/cloud/dialogflow_cx/internal/session_entity_types_stub.h" #include "google/cloud/dialogflow_cx/internal/session_entity_types_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -77,3 +80,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/session_entity_types_stub_factory.h b/google/cloud/dialogflow_cx/internal/session_entity_types_stub_factory.h index c627e00672c5a..a3829a331e4bd 100644 --- a/google/cloud/dialogflow_cx/internal/session_entity_types_stub_factory.h +++ b/google/cloud/dialogflow_cx/internal/session_entity_types_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_SESSION_ENTITY_TYPES_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_cx/internal/session_entity_types_tracing_connection.cc b/google/cloud/dialogflow_cx/internal/session_entity_types_tracing_connection.cc index b455a0009aa2e..f7536a92a3683 100644 --- a/google/cloud/dialogflow_cx/internal/session_entity_types_tracing_connection.cc +++ b/google/cloud/dialogflow_cx/internal/session_entity_types_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SessionEntityTypesTracingConnection::SessionEntityTypesTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -132,17 +130,13 @@ Status SessionEntityTypesTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSessionEntityTypesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_cx/internal/session_entity_types_tracing_connection.h b/google/cloud/dialogflow_cx/internal/session_entity_types_tracing_connection.h index 7299ae45339f1..a26dc6610bc79 100644 --- a/google/cloud/dialogflow_cx/internal/session_entity_types_tracing_connection.h +++ b/google/cloud/dialogflow_cx/internal/session_entity_types_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SessionEntityTypesTracingConnection : public dialogflow_cx::SessionEntityTypesConnection { public: @@ -83,8 +81,6 @@ class SessionEntityTypesTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_cx/internal/session_entity_types_tracing_stub.cc b/google/cloud/dialogflow_cx/internal/session_entity_types_tracing_stub.cc index 95f2650e485e7..f438e5e06eb34 100644 --- a/google/cloud/dialogflow_cx/internal/session_entity_types_tracing_stub.cc +++ b/google/cloud/dialogflow_cx/internal/session_entity_types_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SessionEntityTypesTracingStub::SessionEntityTypesTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -164,18 +165,14 @@ Status SessionEntityTypesTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSessionEntityTypesTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/session_entity_types_tracing_stub.h b/google/cloud/dialogflow_cx/internal/session_entity_types_tracing_stub.h index 103e2ae0b4bbd..17997e59f24d2 100644 --- a/google/cloud/dialogflow_cx/internal/session_entity_types_tracing_stub.h +++ b/google/cloud/dialogflow_cx/internal/session_entity_types_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SessionEntityTypesTracingStub : public SessionEntityTypesStub { public: ~SessionEntityTypesTracingStub() override = default; @@ -94,8 +95,6 @@ class SessionEntityTypesTracingStub : public SessionEntityTypesStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -110,4 +109,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_SESSION_ENTITY_TYPES_TRACING_STUB_H diff --git a/google/cloud/dialogflow_cx/internal/sessions_auth_decorator.cc b/google/cloud/dialogflow_cx/internal/sessions_auth_decorator.cc index e5d9c8b1dbdb0..6738840bfbc46 100644 --- a/google/cloud/dialogflow_cx/internal/sessions_auth_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/sessions_auth_decorator.cc @@ -17,11 +17,14 @@ // source: google/cloud/dialogflow/cx/v3/session.proto #include "google/cloud/dialogflow_cx/internal/sessions_auth_decorator.h" +#include "google/cloud/dialogflow/cx/v3/session.grpc.pb.h" #include "google/cloud/internal/async_read_write_stream_auth.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -147,3 +150,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/sessions_auth_decorator.h b/google/cloud/dialogflow_cx/internal/sessions_auth_decorator.h index 14ed21263a431..f0176519886e5 100644 --- a/google/cloud/dialogflow_cx/internal/sessions_auth_decorator.h +++ b/google/cloud/dialogflow_cx/internal/sessions_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -104,4 +107,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_SESSIONS_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/sessions_logging_decorator.cc b/google/cloud/dialogflow_cx/internal/sessions_logging_decorator.cc index 7e2bf47261b8e..d8ae5ca707af1 100644 --- a/google/cloud/dialogflow_cx/internal/sessions_logging_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/sessions_logging_decorator.cc @@ -17,16 +17,19 @@ // source: google/cloud/dialogflow/cx/v3/session.proto #include "google/cloud/dialogflow_cx/internal/sessions_logging_decorator.h" +#include "google/cloud/dialogflow/cx/v3/session.grpc.pb.h" #include "google/cloud/internal/async_read_write_stream_logging.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/internal/streaming_read_rpc_logging.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -202,3 +205,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/sessions_logging_decorator.h b/google/cloud/dialogflow_cx/internal/sessions_logging_decorator.h index 2f87fba252897..6492c7a6ddbb6 100644 --- a/google/cloud/dialogflow_cx/internal/sessions_logging_decorator.h +++ b/google/cloud/dialogflow_cx/internal/sessions_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -105,4 +108,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_SESSIONS_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/sessions_metadata_decorator.cc b/google/cloud/dialogflow_cx/internal/sessions_metadata_decorator.cc index e374054aa9478..d00ad0765e7b3 100644 --- a/google/cloud/dialogflow_cx/internal/sessions_metadata_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/sessions_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/cx/v3/session.proto #include "google/cloud/dialogflow_cx/internal/sessions_metadata_decorator.h" +#include "google/cloud/dialogflow/cx/v3/session.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -165,3 +169,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/sessions_metadata_decorator.h b/google/cloud/dialogflow_cx/internal/sessions_metadata_decorator.h index 2f54604fecce1..5c82abfb7cabc 100644 --- a/google/cloud/dialogflow_cx/internal/sessions_metadata_decorator.h +++ b/google/cloud/dialogflow_cx/internal/sessions_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -109,4 +112,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_SESSIONS_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/sessions_option_defaults.cc b/google/cloud/dialogflow_cx/internal/sessions_option_defaults.cc index 93b2b775da298..428d8903990ea 100644 --- a/google/cloud/dialogflow_cx/internal/sessions_option_defaults.cc +++ b/google/cloud/dialogflow_cx/internal/sessions_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_cx/internal/sessions_option_defaults.h" #include "google/cloud/dialogflow_cx/sessions_connection.h" #include "google/cloud/dialogflow_cx/sessions_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -43,7 +43,7 @@ Options SessionsDefaultOptions(std::string const& location, Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - dialogflow_cx::SessionsLimitedTimeRetryPolicy(std::chrono::minutes(30)) + dialogflow_cx::SessionsLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_cx/internal/sessions_stub.cc b/google/cloud/dialogflow_cx/internal/sessions_stub.cc index af2c81bb4e383..665b1c373eacc 100644 --- a/google/cloud/dialogflow_cx/internal/sessions_stub.cc +++ b/google/cloud/dialogflow_cx/internal/sessions_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/dialogflow/cx/v3/session.proto #include "google/cloud/dialogflow_cx/internal/sessions_stub.h" +#include "google/cloud/dialogflow/cx/v3/session.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/internal/async_read_write_stream_impl.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -168,3 +171,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/sessions_stub.h b/google/cloud/dialogflow_cx/internal/sessions_stub.h index d83fcdc30edbd..d0c9f8672aec1 100644 --- a/google/cloud/dialogflow_cx/internal/sessions_stub.h +++ b/google/cloud/dialogflow_cx/internal/sessions_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_SESSIONS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_SESSIONS_STUB_H +#include "google/cloud/dialogflow/cx/v3/session.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/async_streaming_read_write_rpc.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/streaming_read_rpc.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -182,4 +185,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_SESSIONS_STUB_H diff --git a/google/cloud/dialogflow_cx/internal/sessions_stub_factory.cc b/google/cloud/dialogflow_cx/internal/sessions_stub_factory.cc index 2d66f32a3a41f..952b121527d59 100644 --- a/google/cloud/dialogflow_cx/internal/sessions_stub_factory.cc +++ b/google/cloud/dialogflow_cx/internal/sessions_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/cx/v3/session.proto #include "google/cloud/dialogflow_cx/internal/sessions_stub_factory.h" +#include "google/cloud/dialogflow/cx/v3/session.grpc.pb.h" #include "google/cloud/dialogflow_cx/internal/sessions_auth_decorator.h" #include "google/cloud/dialogflow_cx/internal/sessions_logging_decorator.h" #include "google/cloud/dialogflow_cx/internal/sessions_metadata_decorator.h" #include "google/cloud/dialogflow_cx/internal/sessions_stub.h" #include "google/cloud/dialogflow_cx/internal/sessions_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/sessions_stub_factory.h b/google/cloud/dialogflow_cx/internal/sessions_stub_factory.h index 422a992e5dbdb..6495e5a5335d7 100644 --- a/google/cloud/dialogflow_cx/internal/sessions_stub_factory.h +++ b/google/cloud/dialogflow_cx/internal/sessions_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_SESSIONS_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_cx/internal/sessions_tracing_connection.cc b/google/cloud/dialogflow_cx/internal/sessions_tracing_connection.cc index f09aba810d24b..76a80afd3437b 100644 --- a/google/cloud/dialogflow_cx/internal/sessions_tracing_connection.cc +++ b/google/cloud/dialogflow_cx/internal/sessions_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SessionsTracingConnection::SessionsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -136,16 +134,12 @@ Status SessionsTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSessionsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_cx/internal/sessions_tracing_connection.h b/google/cloud/dialogflow_cx/internal/sessions_tracing_connection.h index e8b81e6e4d877..2ec11f1be56d4 100644 --- a/google/cloud/dialogflow_cx/internal/sessions_tracing_connection.h +++ b/google/cloud/dialogflow_cx/internal/sessions_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SessionsTracingConnection : public dialogflow_cx::SessionsConnection { public: ~SessionsTracingConnection() override = default; @@ -85,8 +83,6 @@ class SessionsTracingConnection : public dialogflow_cx::SessionsConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_cx/internal/sessions_tracing_stub.cc b/google/cloud/dialogflow_cx/internal/sessions_tracing_stub.cc index 0b77cc2e8f0fe..8a71ce2a75612 100644 --- a/google/cloud/dialogflow_cx/internal/sessions_tracing_stub.cc +++ b/google/cloud/dialogflow_cx/internal/sessions_tracing_stub.cc @@ -23,13 +23,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SessionsTracingStub::SessionsTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -172,18 +173,14 @@ Status SessionsTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSessionsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/sessions_tracing_stub.h b/google/cloud/dialogflow_cx/internal/sessions_tracing_stub.h index 9df8634c2176d..c68c274542b6f 100644 --- a/google/cloud/dialogflow_cx/internal/sessions_tracing_stub.h +++ b/google/cloud/dialogflow_cx/internal/sessions_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SessionsTracingStub : public SessionsStub { public: ~SessionsTracingStub() override = default; @@ -100,8 +101,6 @@ class SessionsTracingStub : public SessionsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -116,4 +115,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_SESSIONS_TRACING_STUB_H diff --git a/google/cloud/dialogflow_cx/internal/test_cases_auth_decorator.cc b/google/cloud/dialogflow_cx/internal/test_cases_auth_decorator.cc index 1f9981010aec7..432e83b6c8891 100644 --- a/google/cloud/dialogflow_cx/internal/test_cases_auth_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/test_cases_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dialogflow/cx/v3/test_case.proto #include "google/cloud/dialogflow_cx/internal/test_cases_auth_decorator.h" -#include +#include "google/cloud/dialogflow/cx/v3/test_case.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -302,3 +305,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/test_cases_auth_decorator.h b/google/cloud/dialogflow_cx/internal/test_cases_auth_decorator.h index d5216f19f5720..a41ffa1afd6a3 100644 --- a/google/cloud/dialogflow_cx/internal/test_cases_auth_decorator.h +++ b/google/cloud/dialogflow_cx/internal/test_cases_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_cx/internal/test_cases_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -171,4 +174,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_TEST_CASES_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/test_cases_connection_impl.h b/google/cloud/dialogflow_cx/internal/test_cases_connection_impl.h index 32661cc36ecd5..8192c7e3aec12 100644 --- a/google/cloud/dialogflow_cx/internal/test_cases_connection_impl.h +++ b/google/cloud/dialogflow_cx/internal/test_cases_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_cx/internal/test_cases_logging_decorator.cc b/google/cloud/dialogflow_cx/internal/test_cases_logging_decorator.cc index f103d19b0630a..313e36fdb6b71 100644 --- a/google/cloud/dialogflow_cx/internal/test_cases_logging_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/test_cases_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dialogflow/cx/v3/test_case.proto #include "google/cloud/dialogflow_cx/internal/test_cases_logging_decorator.h" +#include "google/cloud/dialogflow/cx/v3/test_case.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -366,3 +369,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/test_cases_logging_decorator.h b/google/cloud/dialogflow_cx/internal/test_cases_logging_decorator.h index 883be0ff23d0f..a84d838181e9d 100644 --- a/google/cloud/dialogflow_cx/internal/test_cases_logging_decorator.h +++ b/google/cloud/dialogflow_cx/internal/test_cases_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_cx/internal/test_cases_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -171,4 +174,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_TEST_CASES_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/test_cases_metadata_decorator.cc b/google/cloud/dialogflow_cx/internal/test_cases_metadata_decorator.cc index 57578122bdd87..6adf0e114086b 100644 --- a/google/cloud/dialogflow_cx/internal/test_cases_metadata_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/test_cases_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/cx/v3/test_case.proto #include "google/cloud/dialogflow_cx/internal/test_cases_metadata_decorator.h" +#include "google/cloud/dialogflow/cx/v3/test_case.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -284,3 +288,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/test_cases_metadata_decorator.h b/google/cloud/dialogflow_cx/internal/test_cases_metadata_decorator.h index 8ed1ba64d7c96..c44e2b6c01899 100644 --- a/google/cloud/dialogflow_cx/internal/test_cases_metadata_decorator.h +++ b/google/cloud/dialogflow_cx/internal/test_cases_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_cx/internal/test_cases_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -176,4 +179,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_TEST_CASES_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/test_cases_option_defaults.cc b/google/cloud/dialogflow_cx/internal/test_cases_option_defaults.cc index 712af073f9ee6..506941ae54a77 100644 --- a/google/cloud/dialogflow_cx/internal/test_cases_option_defaults.cc +++ b/google/cloud/dialogflow_cx/internal/test_cases_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_cx/internal/test_cases_option_defaults.h" #include "google/cloud/dialogflow_cx/test_cases_connection.h" #include "google/cloud/dialogflow_cx/test_cases_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -43,7 +43,7 @@ Options TestCasesDefaultOptions(std::string const& location, Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - dialogflow_cx::TestCasesLimitedTimeRetryPolicy(std::chrono::minutes(30)) + dialogflow_cx::TestCasesLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_cx/internal/test_cases_stub.cc b/google/cloud/dialogflow_cx/internal/test_cases_stub.cc index 7cc653abdd904..4a726f29219a4 100644 --- a/google/cloud/dialogflow_cx/internal/test_cases_stub.cc +++ b/google/cloud/dialogflow_cx/internal/test_cases_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/dialogflow/cx/v3/test_case.proto #include "google/cloud/dialogflow_cx/internal/test_cases_stub.h" +#include "google/cloud/dialogflow/cx/v3/test_case.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -353,3 +356,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/test_cases_stub.h b/google/cloud/dialogflow_cx/internal/test_cases_stub.h index 4666e4eee91fc..42c2170d94173 100644 --- a/google/cloud/dialogflow_cx/internal/test_cases_stub.h +++ b/google/cloud/dialogflow_cx/internal/test_cases_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_TEST_CASES_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_TEST_CASES_STUB_H +#include "google/cloud/dialogflow/cx/v3/test_case.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -313,4 +316,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_TEST_CASES_STUB_H diff --git a/google/cloud/dialogflow_cx/internal/test_cases_stub_factory.cc b/google/cloud/dialogflow_cx/internal/test_cases_stub_factory.cc index 0bc3ca4878bf6..1370103f31a5a 100644 --- a/google/cloud/dialogflow_cx/internal/test_cases_stub_factory.cc +++ b/google/cloud/dialogflow_cx/internal/test_cases_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/cx/v3/test_case.proto #include "google/cloud/dialogflow_cx/internal/test_cases_stub_factory.h" +#include "google/cloud/dialogflow/cx/v3/test_case.grpc.pb.h" #include "google/cloud/dialogflow_cx/internal/test_cases_auth_decorator.h" #include "google/cloud/dialogflow_cx/internal/test_cases_logging_decorator.h" #include "google/cloud/dialogflow_cx/internal/test_cases_metadata_decorator.h" #include "google/cloud/dialogflow_cx/internal/test_cases_stub.h" #include "google/cloud/dialogflow_cx/internal/test_cases_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/test_cases_stub_factory.h b/google/cloud/dialogflow_cx/internal/test_cases_stub_factory.h index 3cb94b872b41f..35280159bda06 100644 --- a/google/cloud/dialogflow_cx/internal/test_cases_stub_factory.h +++ b/google/cloud/dialogflow_cx/internal/test_cases_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_TEST_CASES_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_cx/internal/test_cases_tracing_connection.cc b/google/cloud/dialogflow_cx/internal/test_cases_tracing_connection.cc index a9ed9c69fee3a..183aff5246fd0 100644 --- a/google/cloud/dialogflow_cx/internal/test_cases_tracing_connection.cc +++ b/google/cloud/dialogflow_cx/internal/test_cases_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TestCasesTracingConnection::TestCasesTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -279,16 +277,12 @@ Status TestCasesTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTestCasesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_cx/internal/test_cases_tracing_connection.h b/google/cloud/dialogflow_cx/internal/test_cases_tracing_connection.h index 2568d3ab2fb01..1ff1e3b91e2dd 100644 --- a/google/cloud/dialogflow_cx/internal/test_cases_tracing_connection.h +++ b/google/cloud/dialogflow_cx/internal/test_cases_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TestCasesTracingConnection : public dialogflow_cx::TestCasesConnection { public: ~TestCasesTracingConnection() override = default; @@ -142,8 +140,6 @@ class TestCasesTracingConnection : public dialogflow_cx::TestCasesConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_cx/internal/test_cases_tracing_stub.cc b/google/cloud/dialogflow_cx/internal/test_cases_tracing_stub.cc index 2393b4bdad6e8..f9e5cf3a092a4 100644 --- a/google/cloud/dialogflow_cx/internal/test_cases_tracing_stub.cc +++ b/google/cloud/dialogflow_cx/internal/test_cases_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TestCasesTracingStub::TestCasesTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -321,18 +322,14 @@ future TestCasesTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTestCasesTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/test_cases_tracing_stub.h b/google/cloud/dialogflow_cx/internal/test_cases_tracing_stub.h index d6a12429b5af4..504d8284eab31 100644 --- a/google/cloud/dialogflow_cx/internal/test_cases_tracing_stub.h +++ b/google/cloud/dialogflow_cx/internal/test_cases_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TestCasesTracingStub : public TestCasesStub { public: ~TestCasesTracingStub() override = default; @@ -166,8 +167,6 @@ class TestCasesTracingStub : public TestCasesStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -182,4 +181,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_TEST_CASES_TRACING_STUB_H diff --git a/google/cloud/dialogflow_cx/internal/transition_route_groups_auth_decorator.cc b/google/cloud/dialogflow_cx/internal/transition_route_groups_auth_decorator.cc index 7f585279ab85c..1ef147d8b8f4f 100644 --- a/google/cloud/dialogflow_cx/internal/transition_route_groups_auth_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/transition_route_groups_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dialogflow/cx/v3/transition_route_group.proto #include "google/cloud/dialogflow_cx/internal/transition_route_groups_auth_decorator.h" -#include +#include "google/cloud/dialogflow/cx/v3/transition_route_group.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -128,3 +131,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/transition_route_groups_auth_decorator.h b/google/cloud/dialogflow_cx/internal/transition_route_groups_auth_decorator.h index 3f895483e22f6..b527e1bb6c417 100644 --- a/google/cloud/dialogflow_cx/internal/transition_route_groups_auth_decorator.h +++ b/google/cloud/dialogflow_cx/internal/transition_route_groups_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -97,4 +100,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_TRANSITION_ROUTE_GROUPS_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/transition_route_groups_logging_decorator.cc b/google/cloud/dialogflow_cx/internal/transition_route_groups_logging_decorator.cc index 6280787768d5b..6e892e7599f89 100644 --- a/google/cloud/dialogflow_cx/internal/transition_route_groups_logging_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/transition_route_groups_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dialogflow/cx/v3/transition_route_group.proto #include "google/cloud/dialogflow_cx/internal/transition_route_groups_logging_decorator.h" +#include "google/cloud/dialogflow/cx/v3/transition_route_group.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -167,3 +170,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/transition_route_groups_logging_decorator.h b/google/cloud/dialogflow_cx/internal/transition_route_groups_logging_decorator.h index 6750dd2221478..9d66af7f4417b 100644 --- a/google/cloud/dialogflow_cx/internal/transition_route_groups_logging_decorator.h +++ b/google/cloud/dialogflow_cx/internal/transition_route_groups_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -97,4 +100,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_TRANSITION_ROUTE_GROUPS_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/transition_route_groups_metadata_decorator.cc b/google/cloud/dialogflow_cx/internal/transition_route_groups_metadata_decorator.cc index efcd5c33634a6..9cf725dff6199 100644 --- a/google/cloud/dialogflow_cx/internal/transition_route_groups_metadata_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/transition_route_groups_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/cx/v3/transition_route_group.proto #include "google/cloud/dialogflow_cx/internal/transition_route_groups_metadata_decorator.h" +#include "google/cloud/dialogflow/cx/v3/transition_route_group.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -156,3 +160,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/transition_route_groups_metadata_decorator.h b/google/cloud/dialogflow_cx/internal/transition_route_groups_metadata_decorator.h index d0d3bc69a6bd5..0ed4db3a0675b 100644 --- a/google/cloud/dialogflow_cx/internal/transition_route_groups_metadata_decorator.h +++ b/google/cloud/dialogflow_cx/internal/transition_route_groups_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -103,4 +106,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_TRANSITION_ROUTE_GROUPS_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/transition_route_groups_option_defaults.cc b/google/cloud/dialogflow_cx/internal/transition_route_groups_option_defaults.cc index 7d39da29b9952..5d4976d86b9e1 100644 --- a/google/cloud/dialogflow_cx/internal/transition_route_groups_option_defaults.cc +++ b/google/cloud/dialogflow_cx/internal/transition_route_groups_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_cx/internal/transition_route_groups_option_defaults.h" #include "google/cloud/dialogflow_cx/transition_route_groups_connection.h" #include "google/cloud/dialogflow_cx/transition_route_groups_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -45,7 +45,7 @@ Options TransitionRouteGroupsDefaultOptions(std::string const& location, if (!options.has()) { options.set( dialogflow_cx::TransitionRouteGroupsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_cx/internal/transition_route_groups_stub.cc b/google/cloud/dialogflow_cx/internal/transition_route_groups_stub.cc index 3339652de96b5..51b6014ffd946 100644 --- a/google/cloud/dialogflow_cx/internal/transition_route_groups_stub.cc +++ b/google/cloud/dialogflow_cx/internal/transition_route_groups_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/dialogflow/cx/v3/transition_route_group.proto #include "google/cloud/dialogflow_cx/internal/transition_route_groups_stub.h" +#include "google/cloud/dialogflow/cx/v3/transition_route_group.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -162,3 +165,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/transition_route_groups_stub.h b/google/cloud/dialogflow_cx/internal/transition_route_groups_stub.h index f9ec1278c2c1d..715d787ba4c03 100644 --- a/google/cloud/dialogflow_cx/internal/transition_route_groups_stub.h +++ b/google/cloud/dialogflow_cx/internal/transition_route_groups_stub.h @@ -19,15 +19,18 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_TRANSITION_ROUTE_GROUPS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_TRANSITION_ROUTE_GROUPS_STUB_H +#include "google/cloud/dialogflow/cx/v3/transition_route_group.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -167,4 +170,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_TRANSITION_ROUTE_GROUPS_STUB_H diff --git a/google/cloud/dialogflow_cx/internal/transition_route_groups_stub_factory.cc b/google/cloud/dialogflow_cx/internal/transition_route_groups_stub_factory.cc index 62e3e5e34e814..dd4e01a7c9c6b 100644 --- a/google/cloud/dialogflow_cx/internal/transition_route_groups_stub_factory.cc +++ b/google/cloud/dialogflow_cx/internal/transition_route_groups_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/cx/v3/transition_route_group.proto #include "google/cloud/dialogflow_cx/internal/transition_route_groups_stub_factory.h" +#include "google/cloud/dialogflow/cx/v3/transition_route_group.grpc.pb.h" #include "google/cloud/dialogflow_cx/internal/transition_route_groups_auth_decorator.h" #include "google/cloud/dialogflow_cx/internal/transition_route_groups_logging_decorator.h" #include "google/cloud/dialogflow_cx/internal/transition_route_groups_metadata_decorator.h" #include "google/cloud/dialogflow_cx/internal/transition_route_groups_stub.h" #include "google/cloud/dialogflow_cx/internal/transition_route_groups_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -79,3 +82,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/transition_route_groups_stub_factory.h b/google/cloud/dialogflow_cx/internal/transition_route_groups_stub_factory.h index 97a74117adf92..d221b002b1c33 100644 --- a/google/cloud/dialogflow_cx/internal/transition_route_groups_stub_factory.h +++ b/google/cloud/dialogflow_cx/internal/transition_route_groups_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_TRANSITION_ROUTE_GROUPS_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_cx/internal/transition_route_groups_tracing_connection.cc b/google/cloud/dialogflow_cx/internal/transition_route_groups_tracing_connection.cc index cff83eaba9f6c..801da52381797 100644 --- a/google/cloud/dialogflow_cx/internal/transition_route_groups_tracing_connection.cc +++ b/google/cloud/dialogflow_cx/internal/transition_route_groups_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TransitionRouteGroupsTracingConnection::TransitionRouteGroupsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -138,17 +136,13 @@ Status TransitionRouteGroupsTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTransitionRouteGroupsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_cx/internal/transition_route_groups_tracing_connection.h b/google/cloud/dialogflow_cx/internal/transition_route_groups_tracing_connection.h index 07bc2a4b3036e..68d6841e0f394 100644 --- a/google/cloud/dialogflow_cx/internal/transition_route_groups_tracing_connection.h +++ b/google/cloud/dialogflow_cx/internal/transition_route_groups_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TransitionRouteGroupsTracingConnection : public dialogflow_cx::TransitionRouteGroupsConnection { public: @@ -83,8 +81,6 @@ class TransitionRouteGroupsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_cx/internal/transition_route_groups_tracing_stub.cc b/google/cloud/dialogflow_cx/internal/transition_route_groups_tracing_stub.cc index d4b31dc216e2c..4058600462e18 100644 --- a/google/cloud/dialogflow_cx/internal/transition_route_groups_tracing_stub.cc +++ b/google/cloud/dialogflow_cx/internal/transition_route_groups_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TransitionRouteGroupsTracingStub::TransitionRouteGroupsTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -165,18 +166,14 @@ Status TransitionRouteGroupsTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTransitionRouteGroupsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/transition_route_groups_tracing_stub.h b/google/cloud/dialogflow_cx/internal/transition_route_groups_tracing_stub.h index 14d9fe781cb9d..fa0920e71f5db 100644 --- a/google/cloud/dialogflow_cx/internal/transition_route_groups_tracing_stub.h +++ b/google/cloud/dialogflow_cx/internal/transition_route_groups_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TransitionRouteGroupsTracingStub : public TransitionRouteGroupsStub { public: ~TransitionRouteGroupsTracingStub() override = default; @@ -94,8 +95,6 @@ class TransitionRouteGroupsTracingStub : public TransitionRouteGroupsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -110,4 +109,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_TRANSITION_ROUTE_GROUPS_TRACING_STUB_H diff --git a/google/cloud/dialogflow_cx/internal/versions_auth_decorator.cc b/google/cloud/dialogflow_cx/internal/versions_auth_decorator.cc index 8d0a07a2b3f4b..a3b27e389c44a 100644 --- a/google/cloud/dialogflow_cx/internal/versions_auth_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/versions_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dialogflow/cx/v3/version.proto #include "google/cloud/dialogflow_cx/internal/versions_auth_decorator.h" -#include +#include "google/cloud/dialogflow/cx/v3/version.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -211,3 +214,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/versions_auth_decorator.h b/google/cloud/dialogflow_cx/internal/versions_auth_decorator.h index 2bda16edea3cb..835567c22f16f 100644 --- a/google/cloud/dialogflow_cx/internal/versions_auth_decorator.h +++ b/google/cloud/dialogflow_cx/internal/versions_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_cx/internal/versions_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -131,4 +134,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_VERSIONS_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/versions_connection_impl.h b/google/cloud/dialogflow_cx/internal/versions_connection_impl.h index 776fe5ba812bd..92400a4361253 100644 --- a/google/cloud/dialogflow_cx/internal/versions_connection_impl.h +++ b/google/cloud/dialogflow_cx/internal/versions_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_cx/internal/versions_logging_decorator.cc b/google/cloud/dialogflow_cx/internal/versions_logging_decorator.cc index 2e22558caa989..090e4fd9643a4 100644 --- a/google/cloud/dialogflow_cx/internal/versions_logging_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/versions_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dialogflow/cx/v3/version.proto #include "google/cloud/dialogflow_cx/internal/versions_logging_decorator.h" +#include "google/cloud/dialogflow/cx/v3/version.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -257,3 +260,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/versions_logging_decorator.h b/google/cloud/dialogflow_cx/internal/versions_logging_decorator.h index 167ef0917c36a..0246b1fd8356c 100644 --- a/google/cloud/dialogflow_cx/internal/versions_logging_decorator.h +++ b/google/cloud/dialogflow_cx/internal/versions_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_cx/internal/versions_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -131,4 +134,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_VERSIONS_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/versions_metadata_decorator.cc b/google/cloud/dialogflow_cx/internal/versions_metadata_decorator.cc index 955105677eb06..b9a52618f5fb2 100644 --- a/google/cloud/dialogflow_cx/internal/versions_metadata_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/versions_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/cx/v3/version.proto #include "google/cloud/dialogflow_cx/internal/versions_metadata_decorator.h" +#include "google/cloud/dialogflow/cx/v3/version.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -212,3 +216,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/versions_metadata_decorator.h b/google/cloud/dialogflow_cx/internal/versions_metadata_decorator.h index 338a8579588a7..b246d5fb136e2 100644 --- a/google/cloud/dialogflow_cx/internal/versions_metadata_decorator.h +++ b/google/cloud/dialogflow_cx/internal/versions_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_cx/internal/versions_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -136,4 +139,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_VERSIONS_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/versions_option_defaults.cc b/google/cloud/dialogflow_cx/internal/versions_option_defaults.cc index 8973a99bab94a..283348d07da97 100644 --- a/google/cloud/dialogflow_cx/internal/versions_option_defaults.cc +++ b/google/cloud/dialogflow_cx/internal/versions_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_cx/internal/versions_option_defaults.h" #include "google/cloud/dialogflow_cx/versions_connection.h" #include "google/cloud/dialogflow_cx/versions_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -43,7 +43,7 @@ Options VersionsDefaultOptions(std::string const& location, Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - dialogflow_cx::VersionsLimitedTimeRetryPolicy(std::chrono::minutes(30)) + dialogflow_cx::VersionsLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_cx/internal/versions_stub.cc b/google/cloud/dialogflow_cx/internal/versions_stub.cc index 442ebb64bf6a1..cc625ef3feb9f 100644 --- a/google/cloud/dialogflow_cx/internal/versions_stub.cc +++ b/google/cloud/dialogflow_cx/internal/versions_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/dialogflow/cx/v3/version.proto #include "google/cloud/dialogflow_cx/internal/versions_stub.h" +#include "google/cloud/dialogflow/cx/v3/version.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -250,3 +253,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/versions_stub.h b/google/cloud/dialogflow_cx/internal/versions_stub.h index b5b3d202cc9fc..4b14a75b588dd 100644 --- a/google/cloud/dialogflow_cx/internal/versions_stub.h +++ b/google/cloud/dialogflow_cx/internal/versions_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_VERSIONS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_VERSIONS_STUB_H +#include "google/cloud/dialogflow/cx/v3/version.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/protobuf/struct.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -231,4 +234,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_VERSIONS_STUB_H diff --git a/google/cloud/dialogflow_cx/internal/versions_stub_factory.cc b/google/cloud/dialogflow_cx/internal/versions_stub_factory.cc index 900ac939e0b0b..64586b98ea548 100644 --- a/google/cloud/dialogflow_cx/internal/versions_stub_factory.cc +++ b/google/cloud/dialogflow_cx/internal/versions_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/cx/v3/version.proto #include "google/cloud/dialogflow_cx/internal/versions_stub_factory.h" +#include "google/cloud/dialogflow/cx/v3/version.grpc.pb.h" #include "google/cloud/dialogflow_cx/internal/versions_auth_decorator.h" #include "google/cloud/dialogflow_cx/internal/versions_logging_decorator.h" #include "google/cloud/dialogflow_cx/internal/versions_metadata_decorator.h" #include "google/cloud/dialogflow_cx/internal/versions_stub.h" #include "google/cloud/dialogflow_cx/internal/versions_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/versions_stub_factory.h b/google/cloud/dialogflow_cx/internal/versions_stub_factory.h index 27496ff8e59c0..d920215a984b3 100644 --- a/google/cloud/dialogflow_cx/internal/versions_stub_factory.h +++ b/google/cloud/dialogflow_cx/internal/versions_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_VERSIONS_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_cx/internal/versions_tracing_connection.cc b/google/cloud/dialogflow_cx/internal/versions_tracing_connection.cc index 882cd39d84753..654cc840eae83 100644 --- a/google/cloud/dialogflow_cx/internal/versions_tracing_connection.cc +++ b/google/cloud/dialogflow_cx/internal/versions_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - VersionsTracingConnection::VersionsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -183,16 +181,12 @@ Status VersionsTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeVersionsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_cx/internal/versions_tracing_connection.h b/google/cloud/dialogflow_cx/internal/versions_tracing_connection.h index 691ca1ab1a87e..ad6e9c5bf5cf1 100644 --- a/google/cloud/dialogflow_cx/internal/versions_tracing_connection.h +++ b/google/cloud/dialogflow_cx/internal/versions_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class VersionsTracingConnection : public dialogflow_cx::VersionsConnection { public: ~VersionsTracingConnection() override = default; @@ -102,8 +100,6 @@ class VersionsTracingConnection : public dialogflow_cx::VersionsConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_cx/internal/versions_tracing_stub.cc b/google/cloud/dialogflow_cx/internal/versions_tracing_stub.cc index 425fa673543ff..cce59139ae771 100644 --- a/google/cloud/dialogflow_cx/internal/versions_tracing_stub.cc +++ b/google/cloud/dialogflow_cx/internal/versions_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - VersionsTracingStub::VersionsTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -225,18 +226,14 @@ future VersionsTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeVersionsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/versions_tracing_stub.h b/google/cloud/dialogflow_cx/internal/versions_tracing_stub.h index e03112a2207ba..aeb6666eb26e2 100644 --- a/google/cloud/dialogflow_cx/internal/versions_tracing_stub.h +++ b/google/cloud/dialogflow_cx/internal/versions_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class VersionsTracingStub : public VersionsStub { public: ~VersionsTracingStub() override = default; @@ -126,8 +127,6 @@ class VersionsTracingStub : public VersionsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -142,4 +141,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_VERSIONS_TRACING_STUB_H diff --git a/google/cloud/dialogflow_cx/internal/webhooks_auth_decorator.cc b/google/cloud/dialogflow_cx/internal/webhooks_auth_decorator.cc index 9272dbd8ed069..1c47ca68bd6e5 100644 --- a/google/cloud/dialogflow_cx/internal/webhooks_auth_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/webhooks_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dialogflow/cx/v3/webhook.proto #include "google/cloud/dialogflow_cx/internal/webhooks_auth_decorator.h" -#include +#include "google/cloud/dialogflow/cx/v3/webhook.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -120,3 +123,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/webhooks_auth_decorator.h b/google/cloud/dialogflow_cx/internal/webhooks_auth_decorator.h index 3690d2ac9c546..59e6f55da9413 100644 --- a/google/cloud/dialogflow_cx/internal/webhooks_auth_decorator.h +++ b/google/cloud/dialogflow_cx/internal/webhooks_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -93,4 +96,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_WEBHOOKS_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/webhooks_logging_decorator.cc b/google/cloud/dialogflow_cx/internal/webhooks_logging_decorator.cc index 8f2c07d392975..f7c62136dbb43 100644 --- a/google/cloud/dialogflow_cx/internal/webhooks_logging_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/webhooks_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dialogflow/cx/v3/webhook.proto #include "google/cloud/dialogflow_cx/internal/webhooks_logging_decorator.h" +#include "google/cloud/dialogflow/cx/v3/webhook.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -160,3 +163,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/webhooks_logging_decorator.h b/google/cloud/dialogflow_cx/internal/webhooks_logging_decorator.h index cbd0f5f40a30c..13b9239576a83 100644 --- a/google/cloud/dialogflow_cx/internal/webhooks_logging_decorator.h +++ b/google/cloud/dialogflow_cx/internal/webhooks_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -93,4 +96,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_WEBHOOKS_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/webhooks_metadata_decorator.cc b/google/cloud/dialogflow_cx/internal/webhooks_metadata_decorator.cc index d8495d3445acb..a4872bc34a172 100644 --- a/google/cloud/dialogflow_cx/internal/webhooks_metadata_decorator.cc +++ b/google/cloud/dialogflow_cx/internal/webhooks_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/cx/v3/webhook.proto #include "google/cloud/dialogflow_cx/internal/webhooks_metadata_decorator.h" +#include "google/cloud/dialogflow/cx/v3/webhook.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -148,3 +152,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/webhooks_metadata_decorator.h b/google/cloud/dialogflow_cx/internal/webhooks_metadata_decorator.h index f0d96236c9f93..e3d3a9c6c670c 100644 --- a/google/cloud/dialogflow_cx/internal/webhooks_metadata_decorator.h +++ b/google/cloud/dialogflow_cx/internal/webhooks_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -98,4 +101,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_WEBHOOKS_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_cx/internal/webhooks_option_defaults.cc b/google/cloud/dialogflow_cx/internal/webhooks_option_defaults.cc index 204f4c8a3d9c6..8fffc8ea1c3b4 100644 --- a/google/cloud/dialogflow_cx/internal/webhooks_option_defaults.cc +++ b/google/cloud/dialogflow_cx/internal/webhooks_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_cx/internal/webhooks_option_defaults.h" #include "google/cloud/dialogflow_cx/webhooks_connection.h" #include "google/cloud/dialogflow_cx/webhooks_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -43,7 +43,7 @@ Options WebhooksDefaultOptions(std::string const& location, Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - dialogflow_cx::WebhooksLimitedTimeRetryPolicy(std::chrono::minutes(30)) + dialogflow_cx::WebhooksLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_cx/internal/webhooks_stub.cc b/google/cloud/dialogflow_cx/internal/webhooks_stub.cc index ce4efa306c110..cb67d8b9ee3cd 100644 --- a/google/cloud/dialogflow_cx/internal/webhooks_stub.cc +++ b/google/cloud/dialogflow_cx/internal/webhooks_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/dialogflow/cx/v3/webhook.proto #include "google/cloud/dialogflow_cx/internal/webhooks_stub.h" +#include "google/cloud/dialogflow/cx/v3/webhook.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -150,3 +153,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/webhooks_stub.h b/google/cloud/dialogflow_cx/internal/webhooks_stub.h index 54669df1256e5..0a3236db84b6a 100644 --- a/google/cloud/dialogflow_cx/internal/webhooks_stub.h +++ b/google/cloud/dialogflow_cx/internal/webhooks_stub.h @@ -19,15 +19,18 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_WEBHOOKS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_WEBHOOKS_STUB_H +#include "google/cloud/dialogflow/cx/v3/webhook.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -156,4 +159,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_WEBHOOKS_STUB_H diff --git a/google/cloud/dialogflow_cx/internal/webhooks_stub_factory.cc b/google/cloud/dialogflow_cx/internal/webhooks_stub_factory.cc index aa6627b1aff05..8ea9f74b537c2 100644 --- a/google/cloud/dialogflow_cx/internal/webhooks_stub_factory.cc +++ b/google/cloud/dialogflow_cx/internal/webhooks_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/cx/v3/webhook.proto #include "google/cloud/dialogflow_cx/internal/webhooks_stub_factory.h" +#include "google/cloud/dialogflow/cx/v3/webhook.grpc.pb.h" #include "google/cloud/dialogflow_cx/internal/webhooks_auth_decorator.h" #include "google/cloud/dialogflow_cx/internal/webhooks_logging_decorator.h" #include "google/cloud/dialogflow_cx/internal/webhooks_metadata_decorator.h" #include "google/cloud/dialogflow_cx/internal/webhooks_stub.h" #include "google/cloud/dialogflow_cx/internal/webhooks_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/webhooks_stub_factory.h b/google/cloud/dialogflow_cx/internal/webhooks_stub_factory.h index 4fd8a6fb431b1..0ec33e30512ad 100644 --- a/google/cloud/dialogflow_cx/internal/webhooks_stub_factory.h +++ b/google/cloud/dialogflow_cx/internal/webhooks_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_WEBHOOKS_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_cx/internal/webhooks_tracing_connection.cc b/google/cloud/dialogflow_cx/internal/webhooks_tracing_connection.cc index 078b02d68cb93..3fba25769349b 100644 --- a/google/cloud/dialogflow_cx/internal/webhooks_tracing_connection.cc +++ b/google/cloud/dialogflow_cx/internal/webhooks_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - WebhooksTracingConnection::WebhooksTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -128,16 +126,12 @@ Status WebhooksTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeWebhooksTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_cx/internal/webhooks_tracing_connection.h b/google/cloud/dialogflow_cx/internal/webhooks_tracing_connection.h index c2c3e6851bed1..5c3560e87253d 100644 --- a/google/cloud/dialogflow_cx/internal/webhooks_tracing_connection.h +++ b/google/cloud/dialogflow_cx/internal/webhooks_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class WebhooksTracingConnection : public dialogflow_cx::WebhooksConnection { public: ~WebhooksTracingConnection() override = default; @@ -77,8 +75,6 @@ class WebhooksTracingConnection : public dialogflow_cx::WebhooksConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_cx/internal/webhooks_tracing_stub.cc b/google/cloud/dialogflow_cx/internal/webhooks_tracing_stub.cc index f1a64d8b68bfb..ccdf373832025 100644 --- a/google/cloud/dialogflow_cx/internal/webhooks_tracing_stub.cc +++ b/google/cloud/dialogflow_cx/internal/webhooks_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - WebhooksTracingStub::WebhooksTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -147,18 +148,14 @@ Status WebhooksTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeWebhooksTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_cx_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_cx/internal/webhooks_tracing_stub.h b/google/cloud/dialogflow_cx/internal/webhooks_tracing_stub.h index 6a31da520bfcb..767073ac4f570 100644 --- a/google/cloud/dialogflow_cx/internal/webhooks_tracing_stub.h +++ b/google/cloud/dialogflow_cx/internal/webhooks_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_cx_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class WebhooksTracingStub : public WebhooksStub { public: ~WebhooksTracingStub() override = default; @@ -89,8 +90,6 @@ class WebhooksTracingStub : public WebhooksStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -105,4 +104,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_INTERNAL_WEBHOOKS_TRACING_STUB_H diff --git a/google/cloud/dialogflow_cx/pages_connection.h b/google/cloud/dialogflow_cx/pages_connection.h index ba69f6c944709..2ad6bd33d9c57 100644 --- a/google/cloud/dialogflow_cx/pages_connection.h +++ b/google/cloud/dialogflow_cx/pages_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_PAGES_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_PAGES_CONNECTION_H +#include "google/cloud/dialogflow/cx/v3/page.pb.h" #include "google/cloud/dialogflow_cx/internal/pages_retry_traits.h" #include "google/cloud/dialogflow_cx/pages_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/dialogflow_cx/pages_connection_idempotency_policy.h b/google/cloud/dialogflow_cx/pages_connection_idempotency_policy.h index 54133958ec11c..fbcbff1308106 100644 --- a/google/cloud/dialogflow_cx/pages_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_cx/pages_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_PAGES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_PAGES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/cx/v3/page.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_cx/quickstart/.bazelrc b/google/cloud/dialogflow_cx/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/dialogflow_cx/quickstart/.bazelrc +++ b/google/cloud/dialogflow_cx/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/dialogflow_cx/quickstart/CMakeLists.txt b/google/cloud/dialogflow_cx/quickstart/CMakeLists.txt index 8782e8b34f7e9..f497064f3b92b 100644 --- a/google/cloud/dialogflow_cx/quickstart/CMakeLists.txt +++ b/google/cloud/dialogflow_cx/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Dialogflow API C++ client library from a larger # CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-dialogflow_cx-quickstart CXX) find_package(google_cloud_cpp_dialogflow_cx REQUIRED) diff --git a/google/cloud/dialogflow_cx/security_settings_connection.h b/google/cloud/dialogflow_cx/security_settings_connection.h index 1db1e120e3f61..c4e63ac5df60f 100644 --- a/google/cloud/dialogflow_cx/security_settings_connection.h +++ b/google/cloud/dialogflow_cx/security_settings_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_SECURITY_SETTINGS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_SECURITY_SETTINGS_CONNECTION_H +#include "google/cloud/dialogflow/cx/v3/security_settings.pb.h" #include "google/cloud/dialogflow_cx/internal/security_settings_retry_traits.h" #include "google/cloud/dialogflow_cx/security_settings_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/dialogflow_cx/security_settings_connection_idempotency_policy.h b/google/cloud/dialogflow_cx/security_settings_connection_idempotency_policy.h index 8625fd8c1f072..032f1a8f7790e 100644 --- a/google/cloud/dialogflow_cx/security_settings_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_cx/security_settings_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_SECURITY_SETTINGS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_SECURITY_SETTINGS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/cx/v3/security_settings.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_cx/session_entity_types_connection.h b/google/cloud/dialogflow_cx/session_entity_types_connection.h index c5e885ff37970..e6b19ec426079 100644 --- a/google/cloud/dialogflow_cx/session_entity_types_connection.h +++ b/google/cloud/dialogflow_cx/session_entity_types_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_SESSION_ENTITY_TYPES_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_SESSION_ENTITY_TYPES_CONNECTION_H +#include "google/cloud/dialogflow/cx/v3/session_entity_type.pb.h" #include "google/cloud/dialogflow_cx/internal/session_entity_types_retry_traits.h" #include "google/cloud/dialogflow_cx/session_entity_types_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/dialogflow_cx/session_entity_types_connection_idempotency_policy.h b/google/cloud/dialogflow_cx/session_entity_types_connection_idempotency_policy.h index 0ecdf38336c8b..694c6802227f6 100644 --- a/google/cloud/dialogflow_cx/session_entity_types_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_cx/session_entity_types_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_SESSION_ENTITY_TYPES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_SESSION_ENTITY_TYPES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/cx/v3/session_entity_type.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_cx/sessions_connection.h b/google/cloud/dialogflow_cx/sessions_connection.h index 69767c2305b09..3d84d8a2fe208 100644 --- a/google/cloud/dialogflow_cx/sessions_connection.h +++ b/google/cloud/dialogflow_cx/sessions_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_SESSIONS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_SESSIONS_CONNECTION_H +#include "google/cloud/dialogflow/cx/v3/session.pb.h" #include "google/cloud/dialogflow_cx/internal/sessions_retry_traits.h" #include "google/cloud/dialogflow_cx/sessions_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -28,7 +29,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/dialogflow_cx/sessions_connection_idempotency_policy.h b/google/cloud/dialogflow_cx/sessions_connection_idempotency_policy.h index 018abe47b3c81..84619b4463918 100644 --- a/google/cloud/dialogflow_cx/sessions_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_cx/sessions_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_SESSIONS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_SESSIONS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/cx/v3/session.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_cx/test_cases_client.h b/google/cloud/dialogflow_cx/test_cases_client.h index 29d3fc99542a7..4c73a33d22fe6 100644 --- a/google/cloud/dialogflow_cx/test_cases_client.h +++ b/google/cloud/dialogflow_cx/test_cases_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/dialogflow_cx/test_cases_connection.h b/google/cloud/dialogflow_cx/test_cases_connection.h index 03b2b58d8e5dd..21921a3be243c 100644 --- a/google/cloud/dialogflow_cx/test_cases_connection.h +++ b/google/cloud/dialogflow_cx/test_cases_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_TEST_CASES_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_TEST_CASES_CONNECTION_H +#include "google/cloud/dialogflow/cx/v3/test_case.pb.h" #include "google/cloud/dialogflow_cx/internal/test_cases_retry_traits.h" #include "google/cloud/dialogflow_cx/test_cases_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/dialogflow_cx/test_cases_connection_idempotency_policy.h b/google/cloud/dialogflow_cx/test_cases_connection_idempotency_policy.h index 58a00f42b2dc3..2c065c52edfe1 100644 --- a/google/cloud/dialogflow_cx/test_cases_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_cx/test_cases_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_TEST_CASES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_TEST_CASES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/cx/v3/test_case.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_cx/transition_route_groups_connection.h b/google/cloud/dialogflow_cx/transition_route_groups_connection.h index 59649117d382d..3cad847992f72 100644 --- a/google/cloud/dialogflow_cx/transition_route_groups_connection.h +++ b/google/cloud/dialogflow_cx/transition_route_groups_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_TRANSITION_ROUTE_GROUPS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_TRANSITION_ROUTE_GROUPS_CONNECTION_H +#include "google/cloud/dialogflow/cx/v3/transition_route_group.pb.h" #include "google/cloud/dialogflow_cx/internal/transition_route_groups_retry_traits.h" #include "google/cloud/dialogflow_cx/transition_route_groups_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/dialogflow_cx/transition_route_groups_connection_idempotency_policy.h b/google/cloud/dialogflow_cx/transition_route_groups_connection_idempotency_policy.h index 267f3b226ec66..4dcd54a51e2b0 100644 --- a/google/cloud/dialogflow_cx/transition_route_groups_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_cx/transition_route_groups_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_TRANSITION_ROUTE_GROUPS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_TRANSITION_ROUTE_GROUPS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/cx/v3/transition_route_group.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_cx/versions_client.h b/google/cloud/dialogflow_cx/versions_client.h index 30fff3002664b..1d145e1298236 100644 --- a/google/cloud/dialogflow_cx/versions_client.h +++ b/google/cloud/dialogflow_cx/versions_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/dialogflow_cx/versions_connection.h b/google/cloud/dialogflow_cx/versions_connection.h index 13f2cc295e699..a320bab2ca436 100644 --- a/google/cloud/dialogflow_cx/versions_connection.h +++ b/google/cloud/dialogflow_cx/versions_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_VERSIONS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_VERSIONS_CONNECTION_H +#include "google/cloud/dialogflow/cx/v3/version.pb.h" #include "google/cloud/dialogflow_cx/internal/versions_retry_traits.h" #include "google/cloud/dialogflow_cx/versions_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -30,9 +31,8 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/protobuf/struct.pb.h" #include #include diff --git a/google/cloud/dialogflow_cx/versions_connection_idempotency_policy.h b/google/cloud/dialogflow_cx/versions_connection_idempotency_policy.h index 7dacaff9f166a..8469f13376ded 100644 --- a/google/cloud/dialogflow_cx/versions_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_cx/versions_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_VERSIONS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_VERSIONS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/cx/v3/version.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_cx/webhooks_connection.h b/google/cloud/dialogflow_cx/webhooks_connection.h index 656e5de808058..c8a35ac3e9ab8 100644 --- a/google/cloud/dialogflow_cx/webhooks_connection.h +++ b/google/cloud/dialogflow_cx/webhooks_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_WEBHOOKS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_WEBHOOKS_CONNECTION_H +#include "google/cloud/dialogflow/cx/v3/webhook.pb.h" #include "google/cloud/dialogflow_cx/internal/webhooks_retry_traits.h" #include "google/cloud/dialogflow_cx/webhooks_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/dialogflow_cx/webhooks_connection_idempotency_policy.h b/google/cloud/dialogflow_cx/webhooks_connection_idempotency_policy.h index 9f131147cf944..8c6b7b9fe2a0f 100644 --- a/google/cloud/dialogflow_cx/webhooks_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_cx/webhooks_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_WEBHOOKS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_CX_WEBHOOKS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/cx/v3/webhook.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_es/BUILD.bazel b/google/cloud/dialogflow_es/BUILD.bazel index 891db088da2ec..34b4e49287673 100644 --- a/google/cloud/dialogflow_es/BUILD.bazel +++ b/google/cloud/dialogflow_es/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = [""] googleapis_deps = [ - "@com_google_googleapis//google/cloud/dialogflow/v2:dialogflow_cc_grpc", + "@googleapis//google/cloud/dialogflow/v2:dialogflow_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/dialogflow_es/agents_client.h b/google/cloud/dialogflow_es/agents_client.h index bd176d10d8590..6dd2a5a5a404a 100644 --- a/google/cloud/dialogflow_es/agents_client.h +++ b/google/cloud/dialogflow_es/agents_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/dialogflow_es/agents_connection.h b/google/cloud/dialogflow_es/agents_connection.h index 75a34a8e493f7..65562a4d17597 100644 --- a/google/cloud/dialogflow_es/agents_connection.h +++ b/google/cloud/dialogflow_es/agents_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_AGENTS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_AGENTS_CONNECTION_H +#include "google/cloud/dialogflow/v2/agent.pb.h" #include "google/cloud/dialogflow_es/agents_connection_idempotency_policy.h" #include "google/cloud/dialogflow_es/internal/agents_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,9 +31,8 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/protobuf/struct.pb.h" #include #include diff --git a/google/cloud/dialogflow_es/agents_connection_idempotency_policy.h b/google/cloud/dialogflow_es/agents_connection_idempotency_policy.h index b1a59cd22b0e0..cab4320727978 100644 --- a/google/cloud/dialogflow_es/agents_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_es/agents_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_AGENTS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_AGENTS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/v2/agent.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_es/answer_records_connection.h b/google/cloud/dialogflow_es/answer_records_connection.h index 0420e3ccca703..b0cc19b818d78 100644 --- a/google/cloud/dialogflow_es/answer_records_connection.h +++ b/google/cloud/dialogflow_es/answer_records_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_ANSWER_RECORDS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_ANSWER_RECORDS_CONNECTION_H +#include "google/cloud/dialogflow/v2/answer_record.pb.h" #include "google/cloud/dialogflow_es/answer_records_connection_idempotency_policy.h" #include "google/cloud/dialogflow_es/internal/answer_records_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/dialogflow_es/answer_records_connection_idempotency_policy.h b/google/cloud/dialogflow_es/answer_records_connection_idempotency_policy.h index 058e1eabb5859..c22be1c8a22a0 100644 --- a/google/cloud/dialogflow_es/answer_records_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_es/answer_records_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_ANSWER_RECORDS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_ANSWER_RECORDS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/v2/answer_record.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_es/contexts_connection.h b/google/cloud/dialogflow_es/contexts_connection.h index 24cbc38c4016c..c6680cd1609d6 100644 --- a/google/cloud/dialogflow_es/contexts_connection.h +++ b/google/cloud/dialogflow_es/contexts_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_CONTEXTS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_CONTEXTS_CONNECTION_H +#include "google/cloud/dialogflow/v2/context.pb.h" #include "google/cloud/dialogflow_es/contexts_connection_idempotency_policy.h" #include "google/cloud/dialogflow_es/internal/contexts_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/dialogflow_es/contexts_connection_idempotency_policy.h b/google/cloud/dialogflow_es/contexts_connection_idempotency_policy.h index 5c32a64cce4e7..553ab1448cf18 100644 --- a/google/cloud/dialogflow_es/contexts_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_es/contexts_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_CONTEXTS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_CONTEXTS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/v2/context.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_es/conversation_datasets_client.h b/google/cloud/dialogflow_es/conversation_datasets_client.h index a161a65f4db22..7b3fdfdccfcc9 100644 --- a/google/cloud/dialogflow_es/conversation_datasets_client.h +++ b/google/cloud/dialogflow_es/conversation_datasets_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/dialogflow_es/conversation_datasets_connection.h b/google/cloud/dialogflow_es/conversation_datasets_connection.h index fa99430519956..44da840ab5869 100644 --- a/google/cloud/dialogflow_es/conversation_datasets_connection.h +++ b/google/cloud/dialogflow_es/conversation_datasets_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_CONVERSATION_DATASETS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_CONVERSATION_DATASETS_CONNECTION_H +#include "google/cloud/dialogflow/v2/conversation_dataset.pb.h" #include "google/cloud/dialogflow_es/conversation_datasets_connection_idempotency_policy.h" #include "google/cloud/dialogflow_es/internal/conversation_datasets_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/dialogflow_es/conversation_datasets_connection_idempotency_policy.h b/google/cloud/dialogflow_es/conversation_datasets_connection_idempotency_policy.h index 91f66c445a335..c46074ddb5dd0 100644 --- a/google/cloud/dialogflow_es/conversation_datasets_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_es/conversation_datasets_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_CONVERSATION_DATASETS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_CONVERSATION_DATASETS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/v2/conversation_dataset.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_es/conversation_models_client.h b/google/cloud/dialogflow_es/conversation_models_client.h index c5ce44040cbb0..7904c8c03b5a2 100644 --- a/google/cloud/dialogflow_es/conversation_models_client.h +++ b/google/cloud/dialogflow_es/conversation_models_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/dialogflow_es/conversation_models_connection.h b/google/cloud/dialogflow_es/conversation_models_connection.h index 8bda5ccaab45c..235a784048f7f 100644 --- a/google/cloud/dialogflow_es/conversation_models_connection.h +++ b/google/cloud/dialogflow_es/conversation_models_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_CONVERSATION_MODELS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_CONVERSATION_MODELS_CONNECTION_H +#include "google/cloud/dialogflow/v2/conversation_model.pb.h" #include "google/cloud/dialogflow_es/conversation_models_connection_idempotency_policy.h" #include "google/cloud/dialogflow_es/internal/conversation_models_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/dialogflow_es/conversation_models_connection_idempotency_policy.h b/google/cloud/dialogflow_es/conversation_models_connection_idempotency_policy.h index b6a90141cfa1c..4eec02306292f 100644 --- a/google/cloud/dialogflow_es/conversation_models_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_es/conversation_models_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_CONVERSATION_MODELS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_CONVERSATION_MODELS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/v2/conversation_model.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_es/conversation_profiles_client.h b/google/cloud/dialogflow_es/conversation_profiles_client.h index 5ce2fec49ad32..5b5d2f864c351 100644 --- a/google/cloud/dialogflow_es/conversation_profiles_client.h +++ b/google/cloud/dialogflow_es/conversation_profiles_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/dialogflow_es/conversation_profiles_connection.h b/google/cloud/dialogflow_es/conversation_profiles_connection.h index 75eafc20599f0..fb6f9ded7f156 100644 --- a/google/cloud/dialogflow_es/conversation_profiles_connection.h +++ b/google/cloud/dialogflow_es/conversation_profiles_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_CONVERSATION_PROFILES_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_CONVERSATION_PROFILES_CONNECTION_H +#include "google/cloud/dialogflow/v2/conversation_profile.pb.h" #include "google/cloud/dialogflow_es/conversation_profiles_connection_idempotency_policy.h" #include "google/cloud/dialogflow_es/internal/conversation_profiles_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/dialogflow_es/conversation_profiles_connection_idempotency_policy.h b/google/cloud/dialogflow_es/conversation_profiles_connection_idempotency_policy.h index 613836222d388..c845e528171dc 100644 --- a/google/cloud/dialogflow_es/conversation_profiles_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_es/conversation_profiles_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_CONVERSATION_PROFILES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_CONVERSATION_PROFILES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/v2/conversation_profile.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_es/conversations_connection.h b/google/cloud/dialogflow_es/conversations_connection.h index c84b7ed7cd744..d1109cc6fc705 100644 --- a/google/cloud/dialogflow_es/conversations_connection.h +++ b/google/cloud/dialogflow_es/conversations_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_CONVERSATIONS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_CONVERSATIONS_CONNECTION_H +#include "google/cloud/dialogflow/v2/conversation.pb.h" #include "google/cloud/dialogflow_es/conversations_connection_idempotency_policy.h" #include "google/cloud/dialogflow_es/internal/conversations_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/dialogflow_es/conversations_connection_idempotency_policy.h b/google/cloud/dialogflow_es/conversations_connection_idempotency_policy.h index ff63bfbde9d6d..783d6bb089192 100644 --- a/google/cloud/dialogflow_es/conversations_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_es/conversations_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_CONVERSATIONS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_CONVERSATIONS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/v2/conversation.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_es/documents_client.h b/google/cloud/dialogflow_es/documents_client.h index 97f9b8229e036..06efc7bb18e75 100644 --- a/google/cloud/dialogflow_es/documents_client.h +++ b/google/cloud/dialogflow_es/documents_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/dialogflow_es/documents_connection.h b/google/cloud/dialogflow_es/documents_connection.h index 4fea6e998b960..006915733738d 100644 --- a/google/cloud/dialogflow_es/documents_connection.h +++ b/google/cloud/dialogflow_es/documents_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_DOCUMENTS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_DOCUMENTS_CONNECTION_H +#include "google/cloud/dialogflow/v2/document.pb.h" #include "google/cloud/dialogflow_es/documents_connection_idempotency_policy.h" #include "google/cloud/dialogflow_es/internal/documents_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/dialogflow_es/documents_connection_idempotency_policy.h b/google/cloud/dialogflow_es/documents_connection_idempotency_policy.h index df6e2052946c9..088840d2da999 100644 --- a/google/cloud/dialogflow_es/documents_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_es/documents_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_DOCUMENTS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_DOCUMENTS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/v2/document.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_es/encryption_spec_client.h b/google/cloud/dialogflow_es/encryption_spec_client.h index d663cb64de21b..88a8f2e607f30 100644 --- a/google/cloud/dialogflow_es/encryption_spec_client.h +++ b/google/cloud/dialogflow_es/encryption_spec_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/dialogflow_es/encryption_spec_connection.h b/google/cloud/dialogflow_es/encryption_spec_connection.h index 244c0b4851dc4..90a0acb0dd526 100644 --- a/google/cloud/dialogflow_es/encryption_spec_connection.h +++ b/google/cloud/dialogflow_es/encryption_spec_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_ENCRYPTION_SPEC_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_ENCRYPTION_SPEC_CONNECTION_H +#include "google/cloud/dialogflow/v2/encryption_spec.pb.h" #include "google/cloud/dialogflow_es/encryption_spec_connection_idempotency_policy.h" #include "google/cloud/dialogflow_es/internal/encryption_spec_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/dialogflow_es/encryption_spec_connection_idempotency_policy.h b/google/cloud/dialogflow_es/encryption_spec_connection_idempotency_policy.h index 4cf9115040e4b..a7a79ff2e975c 100644 --- a/google/cloud/dialogflow_es/encryption_spec_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_es/encryption_spec_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_ENCRYPTION_SPEC_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_ENCRYPTION_SPEC_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/v2/encryption_spec.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_es/entity_types_client.h b/google/cloud/dialogflow_es/entity_types_client.h index a59cdaaff8a98..03723b8853e34 100644 --- a/google/cloud/dialogflow_es/entity_types_client.h +++ b/google/cloud/dialogflow_es/entity_types_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/dialogflow_es/entity_types_connection.h b/google/cloud/dialogflow_es/entity_types_connection.h index b44c5b2393efa..7722b2a9bcd47 100644 --- a/google/cloud/dialogflow_es/entity_types_connection.h +++ b/google/cloud/dialogflow_es/entity_types_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_ENTITY_TYPES_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_ENTITY_TYPES_CONNECTION_H +#include "google/cloud/dialogflow/v2/entity_type.pb.h" #include "google/cloud/dialogflow_es/entity_types_connection_idempotency_policy.h" #include "google/cloud/dialogflow_es/internal/entity_types_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,9 +31,8 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/protobuf/struct.pb.h" #include #include diff --git a/google/cloud/dialogflow_es/entity_types_connection_idempotency_policy.h b/google/cloud/dialogflow_es/entity_types_connection_idempotency_policy.h index 7e896ea74d661..e47ee45d1eb87 100644 --- a/google/cloud/dialogflow_es/entity_types_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_es/entity_types_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_ENTITY_TYPES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_ENTITY_TYPES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/v2/entity_type.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_es/environments_connection.h b/google/cloud/dialogflow_es/environments_connection.h index 7a2c937b529de..1b0c84690e5e2 100644 --- a/google/cloud/dialogflow_es/environments_connection.h +++ b/google/cloud/dialogflow_es/environments_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_ENVIRONMENTS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_ENVIRONMENTS_CONNECTION_H +#include "google/cloud/dialogflow/v2/environment.pb.h" #include "google/cloud/dialogflow_es/environments_connection_idempotency_policy.h" #include "google/cloud/dialogflow_es/internal/environments_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/dialogflow_es/environments_connection_idempotency_policy.h b/google/cloud/dialogflow_es/environments_connection_idempotency_policy.h index 5ce5ef5ac37d4..1b7a5dd732c82 100644 --- a/google/cloud/dialogflow_es/environments_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_es/environments_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_ENVIRONMENTS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_ENVIRONMENTS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/v2/environment.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_es/fulfillments_connection.h b/google/cloud/dialogflow_es/fulfillments_connection.h index 048dc448411c2..c184c481827dc 100644 --- a/google/cloud/dialogflow_es/fulfillments_connection.h +++ b/google/cloud/dialogflow_es/fulfillments_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_FULFILLMENTS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_FULFILLMENTS_CONNECTION_H +#include "google/cloud/dialogflow/v2/fulfillment.pb.h" #include "google/cloud/dialogflow_es/fulfillments_connection_idempotency_policy.h" #include "google/cloud/dialogflow_es/internal/fulfillments_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/dialogflow_es/fulfillments_connection_idempotency_policy.h b/google/cloud/dialogflow_es/fulfillments_connection_idempotency_policy.h index 5e6e3dc407104..f42465e910fc7 100644 --- a/google/cloud/dialogflow_es/fulfillments_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_es/fulfillments_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_FULFILLMENTS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_FULFILLMENTS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/v2/fulfillment.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_es/generators_connection.h b/google/cloud/dialogflow_es/generators_connection.h index 3b9bd277d6632..33e2c05b66c45 100644 --- a/google/cloud/dialogflow_es/generators_connection.h +++ b/google/cloud/dialogflow_es/generators_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_GENERATORS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_GENERATORS_CONNECTION_H +#include "google/cloud/dialogflow/v2/generator.pb.h" #include "google/cloud/dialogflow_es/generators_connection_idempotency_policy.h" #include "google/cloud/dialogflow_es/internal/generators_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/dialogflow_es/generators_connection_idempotency_policy.h b/google/cloud/dialogflow_es/generators_connection_idempotency_policy.h index 089858fc6949a..5a37b374b5f12 100644 --- a/google/cloud/dialogflow_es/generators_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_es/generators_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_GENERATORS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_GENERATORS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/v2/generator.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_es/intents_client.h b/google/cloud/dialogflow_es/intents_client.h index c1751613400ff..545db73bce79d 100644 --- a/google/cloud/dialogflow_es/intents_client.h +++ b/google/cloud/dialogflow_es/intents_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/dialogflow_es/intents_connection.h b/google/cloud/dialogflow_es/intents_connection.h index b198d3f2bddab..62996a5d04b2a 100644 --- a/google/cloud/dialogflow_es/intents_connection.h +++ b/google/cloud/dialogflow_es/intents_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTENTS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTENTS_CONNECTION_H +#include "google/cloud/dialogflow/v2/intent.pb.h" #include "google/cloud/dialogflow_es/intents_connection_idempotency_policy.h" #include "google/cloud/dialogflow_es/internal/intents_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,9 +31,8 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/protobuf/struct.pb.h" #include #include diff --git a/google/cloud/dialogflow_es/intents_connection_idempotency_policy.h b/google/cloud/dialogflow_es/intents_connection_idempotency_policy.h index ce1be9ae11824..c5b2e99312deb 100644 --- a/google/cloud/dialogflow_es/intents_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_es/intents_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTENTS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTENTS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/v2/intent.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_es/internal/agents_auth_decorator.cc b/google/cloud/dialogflow_es/internal/agents_auth_decorator.cc index f886bc170b823..7aec3b6e2c80b 100644 --- a/google/cloud/dialogflow_es/internal/agents_auth_decorator.cc +++ b/google/cloud/dialogflow_es/internal/agents_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dialogflow/v2/agent.proto #include "google/cloud/dialogflow_es/internal/agents_auth_decorator.h" -#include +#include "google/cloud/dialogflow/v2/agent.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -262,3 +265,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/agents_auth_decorator.h b/google/cloud/dialogflow_es/internal/agents_auth_decorator.h index 60a1c64685fed..9d8ef54e45cb4 100644 --- a/google/cloud/dialogflow_es/internal/agents_auth_decorator.h +++ b/google/cloud/dialogflow_es/internal/agents_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_es/internal/agents_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -149,4 +152,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_AGENTS_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/agents_connection_impl.h b/google/cloud/dialogflow_es/internal/agents_connection_impl.h index 780687645c700..a846a1dba54c0 100644 --- a/google/cloud/dialogflow_es/internal/agents_connection_impl.h +++ b/google/cloud/dialogflow_es/internal/agents_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_es/internal/agents_logging_decorator.cc b/google/cloud/dialogflow_es/internal/agents_logging_decorator.cc index eb7df10f992db..77e800c186ada 100644 --- a/google/cloud/dialogflow_es/internal/agents_logging_decorator.cc +++ b/google/cloud/dialogflow_es/internal/agents_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dialogflow/v2/agent.proto #include "google/cloud/dialogflow_es/internal/agents_logging_decorator.h" +#include "google/cloud/dialogflow/v2/agent.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -307,3 +310,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/agents_logging_decorator.h b/google/cloud/dialogflow_es/internal/agents_logging_decorator.h index 80f19c5ccbece..44aead3ad4554 100644 --- a/google/cloud/dialogflow_es/internal/agents_logging_decorator.h +++ b/google/cloud/dialogflow_es/internal/agents_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_es/internal/agents_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -149,4 +152,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_AGENTS_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/agents_metadata_decorator.cc b/google/cloud/dialogflow_es/internal/agents_metadata_decorator.cc index 3613340f24fc2..8232335df47cc 100644 --- a/google/cloud/dialogflow_es/internal/agents_metadata_decorator.cc +++ b/google/cloud/dialogflow_es/internal/agents_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/v2/agent.proto #include "google/cloud/dialogflow_es/internal/agents_metadata_decorator.h" +#include "google/cloud/dialogflow/v2/agent.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -249,3 +253,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/agents_metadata_decorator.h b/google/cloud/dialogflow_es/internal/agents_metadata_decorator.h index 4ed41e60e0826..ded8079b67a96 100644 --- a/google/cloud/dialogflow_es/internal/agents_metadata_decorator.h +++ b/google/cloud/dialogflow_es/internal/agents_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_es/internal/agents_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -154,4 +157,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_AGENTS_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/agents_option_defaults.cc b/google/cloud/dialogflow_es/internal/agents_option_defaults.cc index 7ab12ed41b7a8..b95ed00945511 100644 --- a/google/cloud/dialogflow_es/internal/agents_option_defaults.cc +++ b/google/cloud/dialogflow_es/internal/agents_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_es/internal/agents_option_defaults.h" #include "google/cloud/dialogflow_es/agents_connection.h" #include "google/cloud/dialogflow_es/agents_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -43,7 +43,7 @@ Options AgentsDefaultOptions(std::string const& location, Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - dialogflow_es::AgentsLimitedTimeRetryPolicy(std::chrono::minutes(30)) + dialogflow_es::AgentsLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_es/internal/agents_stub.cc b/google/cloud/dialogflow_es/internal/agents_stub.cc index 29cdea7fcf52c..bf6b2faa42263 100644 --- a/google/cloud/dialogflow_es/internal/agents_stub.cc +++ b/google/cloud/dialogflow_es/internal/agents_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/dialogflow/v2/agent.proto #include "google/cloud/dialogflow_es/internal/agents_stub.h" +#include "google/cloud/dialogflow/v2/agent.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -304,3 +307,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/agents_stub.h b/google/cloud/dialogflow_es/internal/agents_stub.h index 5dd099fec530f..451d9a7c67f79 100644 --- a/google/cloud/dialogflow_es/internal/agents_stub.h +++ b/google/cloud/dialogflow_es/internal/agents_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_AGENTS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_AGENTS_STUB_H +#include "google/cloud/dialogflow/v2/agent.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/protobuf/struct.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -264,4 +267,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_AGENTS_STUB_H diff --git a/google/cloud/dialogflow_es/internal/agents_stub_factory.cc b/google/cloud/dialogflow_es/internal/agents_stub_factory.cc index ef6eac42e88e2..1b93928142f66 100644 --- a/google/cloud/dialogflow_es/internal/agents_stub_factory.cc +++ b/google/cloud/dialogflow_es/internal/agents_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/v2/agent.proto #include "google/cloud/dialogflow_es/internal/agents_stub_factory.h" +#include "google/cloud/dialogflow/v2/agent.grpc.pb.h" #include "google/cloud/dialogflow_es/internal/agents_auth_decorator.h" #include "google/cloud/dialogflow_es/internal/agents_logging_decorator.h" #include "google/cloud/dialogflow_es/internal/agents_metadata_decorator.h" #include "google/cloud/dialogflow_es/internal/agents_stub.h" #include "google/cloud/dialogflow_es/internal/agents_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/agents_stub_factory.h b/google/cloud/dialogflow_es/internal/agents_stub_factory.h index 519f9e27bd1f9..30ecc965f6324 100644 --- a/google/cloud/dialogflow_es/internal/agents_stub_factory.h +++ b/google/cloud/dialogflow_es/internal/agents_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_AGENTS_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_es/internal/agents_tracing_connection.cc b/google/cloud/dialogflow_es/internal/agents_tracing_connection.cc index ce20dd6f8af5e..50626bdf3b7e5 100644 --- a/google/cloud/dialogflow_es/internal/agents_tracing_connection.cc +++ b/google/cloud/dialogflow_es/internal/agents_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AgentsTracingConnection::AgentsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -225,15 +223,11 @@ Status AgentsTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAgentsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_es/internal/agents_tracing_connection.h b/google/cloud/dialogflow_es/internal/agents_tracing_connection.h index 01f3d4b5d2a15..5f36e62fd81a5 100644 --- a/google/cloud/dialogflow_es/internal/agents_tracing_connection.h +++ b/google/cloud/dialogflow_es/internal/agents_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AgentsTracingConnection : public dialogflow_es::AgentsConnection { public: ~AgentsTracingConnection() override = default; @@ -120,8 +118,6 @@ class AgentsTracingConnection : public dialogflow_es::AgentsConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_es/internal/agents_tracing_stub.cc b/google/cloud/dialogflow_es/internal/agents_tracing_stub.cc index d0d7ff8dd5606..d51db1620445f 100644 --- a/google/cloud/dialogflow_es/internal/agents_tracing_stub.cc +++ b/google/cloud/dialogflow_es/internal/agents_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AgentsTracingStub::AgentsTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -273,18 +274,14 @@ future AgentsTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAgentsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/agents_tracing_stub.h b/google/cloud/dialogflow_es/internal/agents_tracing_stub.h index f822514aa1635..f96ca39072013 100644 --- a/google/cloud/dialogflow_es/internal/agents_tracing_stub.h +++ b/google/cloud/dialogflow_es/internal/agents_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AgentsTracingStub : public AgentsStub { public: ~AgentsTracingStub() override = default; @@ -144,8 +145,6 @@ class AgentsTracingStub : public AgentsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -160,4 +159,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_AGENTS_TRACING_STUB_H diff --git a/google/cloud/dialogflow_es/internal/answer_records_auth_decorator.cc b/google/cloud/dialogflow_es/internal/answer_records_auth_decorator.cc index e7eb32a9b5b5e..1354b406e28e8 100644 --- a/google/cloud/dialogflow_es/internal/answer_records_auth_decorator.cc +++ b/google/cloud/dialogflow_es/internal/answer_records_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dialogflow/v2/answer_record.proto #include "google/cloud/dialogflow_es/internal/answer_records_auth_decorator.h" -#include +#include "google/cloud/dialogflow/v2/answer_record.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -95,3 +98,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/answer_records_auth_decorator.h b/google/cloud/dialogflow_es/internal/answer_records_auth_decorator.h index 9c8914a680960..c406a59afce5d 100644 --- a/google/cloud/dialogflow_es/internal/answer_records_auth_decorator.h +++ b/google/cloud/dialogflow_es/internal/answer_records_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -79,4 +82,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_ANSWER_RECORDS_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/answer_records_logging_decorator.cc b/google/cloud/dialogflow_es/internal/answer_records_logging_decorator.cc index 3d228f681f4c9..f6684f7843ab9 100644 --- a/google/cloud/dialogflow_es/internal/answer_records_logging_decorator.cc +++ b/google/cloud/dialogflow_es/internal/answer_records_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dialogflow/v2/answer_record.proto #include "google/cloud/dialogflow_es/internal/answer_records_logging_decorator.h" +#include "google/cloud/dialogflow/v2/answer_record.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -122,3 +125,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/answer_records_logging_decorator.h b/google/cloud/dialogflow_es/internal/answer_records_logging_decorator.h index 19d3068dcfd86..bd70b280e63f2 100644 --- a/google/cloud/dialogflow_es/internal/answer_records_logging_decorator.h +++ b/google/cloud/dialogflow_es/internal/answer_records_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -79,4 +82,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_ANSWER_RECORDS_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/answer_records_metadata_decorator.cc b/google/cloud/dialogflow_es/internal/answer_records_metadata_decorator.cc index 9a67143f97cd4..2573f78bea30b 100644 --- a/google/cloud/dialogflow_es/internal/answer_records_metadata_decorator.cc +++ b/google/cloud/dialogflow_es/internal/answer_records_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/v2/answer_record.proto #include "google/cloud/dialogflow_es/internal/answer_records_metadata_decorator.h" +#include "google/cloud/dialogflow/v2/answer_record.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -123,3 +127,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/answer_records_metadata_decorator.h b/google/cloud/dialogflow_es/internal/answer_records_metadata_decorator.h index 294eb6df4ad08..aea55005b627d 100644 --- a/google/cloud/dialogflow_es/internal/answer_records_metadata_decorator.h +++ b/google/cloud/dialogflow_es/internal/answer_records_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -84,4 +87,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_ANSWER_RECORDS_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/answer_records_option_defaults.cc b/google/cloud/dialogflow_es/internal/answer_records_option_defaults.cc index 7f07e2033bd05..02a460b66380a 100644 --- a/google/cloud/dialogflow_es/internal/answer_records_option_defaults.cc +++ b/google/cloud/dialogflow_es/internal/answer_records_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_es/internal/answer_records_option_defaults.h" #include "google/cloud/dialogflow_es/answer_records_connection.h" #include "google/cloud/dialogflow_es/answer_records_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -45,7 +45,7 @@ Options AnswerRecordsDefaultOptions(std::string const& location, if (!options.has()) { options.set( dialogflow_es::AnswerRecordsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_es/internal/answer_records_stub.cc b/google/cloud/dialogflow_es/internal/answer_records_stub.cc index 5eefeb85545ed..03218b7cc3fbd 100644 --- a/google/cloud/dialogflow_es/internal/answer_records_stub.cc +++ b/google/cloud/dialogflow_es/internal/answer_records_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/dialogflow/v2/answer_record.proto #include "google/cloud/dialogflow_es/internal/answer_records_stub.h" +#include "google/cloud/dialogflow/v2/answer_record.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -116,3 +119,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/answer_records_stub.h b/google/cloud/dialogflow_es/internal/answer_records_stub.h index b5d2e25113524..ee05d16ccb104 100644 --- a/google/cloud/dialogflow_es/internal/answer_records_stub.h +++ b/google/cloud/dialogflow_es/internal/answer_records_stub.h @@ -19,15 +19,18 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_ANSWER_RECORDS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_ANSWER_RECORDS_STUB_H +#include "google/cloud/dialogflow/v2/answer_record.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -130,4 +133,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_ANSWER_RECORDS_STUB_H diff --git a/google/cloud/dialogflow_es/internal/answer_records_stub_factory.cc b/google/cloud/dialogflow_es/internal/answer_records_stub_factory.cc index ad318881d723c..918050ff19173 100644 --- a/google/cloud/dialogflow_es/internal/answer_records_stub_factory.cc +++ b/google/cloud/dialogflow_es/internal/answer_records_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/v2/answer_record.proto #include "google/cloud/dialogflow_es/internal/answer_records_stub_factory.h" +#include "google/cloud/dialogflow/v2/answer_record.grpc.pb.h" #include "google/cloud/dialogflow_es/internal/answer_records_auth_decorator.h" #include "google/cloud/dialogflow_es/internal/answer_records_logging_decorator.h" #include "google/cloud/dialogflow_es/internal/answer_records_metadata_decorator.h" #include "google/cloud/dialogflow_es/internal/answer_records_stub.h" #include "google/cloud/dialogflow_es/internal/answer_records_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -77,3 +80,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/answer_records_stub_factory.h b/google/cloud/dialogflow_es/internal/answer_records_stub_factory.h index 34688bbdb6d72..5a398d08b583c 100644 --- a/google/cloud/dialogflow_es/internal/answer_records_stub_factory.h +++ b/google/cloud/dialogflow_es/internal/answer_records_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_ANSWER_RECORDS_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_es/internal/answer_records_tracing_connection.cc b/google/cloud/dialogflow_es/internal/answer_records_tracing_connection.cc index 017760478a98b..8f0e07d0cc0fd 100644 --- a/google/cloud/dialogflow_es/internal/answer_records_tracing_connection.cc +++ b/google/cloud/dialogflow_es/internal/answer_records_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AnswerRecordsTracingConnection::AnswerRecordsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -102,16 +100,12 @@ Status AnswerRecordsTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAnswerRecordsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_es/internal/answer_records_tracing_connection.h b/google/cloud/dialogflow_es/internal/answer_records_tracing_connection.h index 053a893330b28..10cb9f93ea2ea 100644 --- a/google/cloud/dialogflow_es/internal/answer_records_tracing_connection.h +++ b/google/cloud/dialogflow_es/internal/answer_records_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AnswerRecordsTracingConnection : public dialogflow_es::AnswerRecordsConnection { public: @@ -66,8 +64,6 @@ class AnswerRecordsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_es/internal/answer_records_tracing_stub.cc b/google/cloud/dialogflow_es/internal/answer_records_tracing_stub.cc index f3cf17b00bd9b..897bc1db83c55 100644 --- a/google/cloud/dialogflow_es/internal/answer_records_tracing_stub.cc +++ b/google/cloud/dialogflow_es/internal/answer_records_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AnswerRecordsTracingStub::AnswerRecordsTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -114,18 +115,14 @@ Status AnswerRecordsTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAnswerRecordsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/answer_records_tracing_stub.h b/google/cloud/dialogflow_es/internal/answer_records_tracing_stub.h index 4a25399c4bcaf..b95d8d7ac728e 100644 --- a/google/cloud/dialogflow_es/internal/answer_records_tracing_stub.h +++ b/google/cloud/dialogflow_es/internal/answer_records_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AnswerRecordsTracingStub : public AnswerRecordsStub { public: ~AnswerRecordsTracingStub() override = default; @@ -75,8 +76,6 @@ class AnswerRecordsTracingStub : public AnswerRecordsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -91,4 +90,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_ANSWER_RECORDS_TRACING_STUB_H diff --git a/google/cloud/dialogflow_es/internal/contexts_auth_decorator.cc b/google/cloud/dialogflow_es/internal/contexts_auth_decorator.cc index f41fea037d147..b45d8db9370aa 100644 --- a/google/cloud/dialogflow_es/internal/contexts_auth_decorator.cc +++ b/google/cloud/dialogflow_es/internal/contexts_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dialogflow/v2/context.proto #include "google/cloud/dialogflow_es/internal/contexts_auth_decorator.h" -#include +#include "google/cloud/dialogflow/v2/context.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -126,3 +129,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/contexts_auth_decorator.h b/google/cloud/dialogflow_es/internal/contexts_auth_decorator.h index 948b923b60eac..c0f4e54a19dac 100644 --- a/google/cloud/dialogflow_es/internal/contexts_auth_decorator.h +++ b/google/cloud/dialogflow_es/internal/contexts_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -97,4 +100,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONTEXTS_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/contexts_logging_decorator.cc b/google/cloud/dialogflow_es/internal/contexts_logging_decorator.cc index fe66c6e82f291..c6ba06c72feaa 100644 --- a/google/cloud/dialogflow_es/internal/contexts_logging_decorator.cc +++ b/google/cloud/dialogflow_es/internal/contexts_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dialogflow/v2/context.proto #include "google/cloud/dialogflow_es/internal/contexts_logging_decorator.h" +#include "google/cloud/dialogflow/v2/context.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -168,3 +171,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/contexts_logging_decorator.h b/google/cloud/dialogflow_es/internal/contexts_logging_decorator.h index 7e5977dbbeeb7..ee0eadab98c77 100644 --- a/google/cloud/dialogflow_es/internal/contexts_logging_decorator.h +++ b/google/cloud/dialogflow_es/internal/contexts_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -97,4 +100,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONTEXTS_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/contexts_metadata_decorator.cc b/google/cloud/dialogflow_es/internal/contexts_metadata_decorator.cc index 2f43012a9c0be..8cbb7c3dae555 100644 --- a/google/cloud/dialogflow_es/internal/contexts_metadata_decorator.cc +++ b/google/cloud/dialogflow_es/internal/contexts_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/v2/context.proto #include "google/cloud/dialogflow_es/internal/contexts_metadata_decorator.h" +#include "google/cloud/dialogflow/v2/context.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -155,3 +159,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/contexts_metadata_decorator.h b/google/cloud/dialogflow_es/internal/contexts_metadata_decorator.h index 7ce93cb189d2a..a6c2bd0e4524d 100644 --- a/google/cloud/dialogflow_es/internal/contexts_metadata_decorator.h +++ b/google/cloud/dialogflow_es/internal/contexts_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -102,4 +105,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONTEXTS_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/contexts_option_defaults.cc b/google/cloud/dialogflow_es/internal/contexts_option_defaults.cc index e246ea0b809b7..2215309bea1a3 100644 --- a/google/cloud/dialogflow_es/internal/contexts_option_defaults.cc +++ b/google/cloud/dialogflow_es/internal/contexts_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_es/internal/contexts_option_defaults.h" #include "google/cloud/dialogflow_es/contexts_connection.h" #include "google/cloud/dialogflow_es/contexts_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -43,7 +43,7 @@ Options ContextsDefaultOptions(std::string const& location, Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - dialogflow_es::ContextsLimitedTimeRetryPolicy(std::chrono::minutes(30)) + dialogflow_es::ContextsLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_es/internal/contexts_stub.cc b/google/cloud/dialogflow_es/internal/contexts_stub.cc index 69d6806604a97..104901bacfff9 100644 --- a/google/cloud/dialogflow_es/internal/contexts_stub.cc +++ b/google/cloud/dialogflow_es/internal/contexts_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/dialogflow/v2/context.proto #include "google/cloud/dialogflow_es/internal/contexts_stub.h" +#include "google/cloud/dialogflow/v2/context.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -161,3 +164,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/contexts_stub.h b/google/cloud/dialogflow_es/internal/contexts_stub.h index 22b8dbf264a08..9783db429f95a 100644 --- a/google/cloud/dialogflow_es/internal/contexts_stub.h +++ b/google/cloud/dialogflow_es/internal/contexts_stub.h @@ -19,15 +19,18 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONTEXTS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONTEXTS_STUB_H +#include "google/cloud/dialogflow/v2/context.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -161,4 +164,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONTEXTS_STUB_H diff --git a/google/cloud/dialogflow_es/internal/contexts_stub_factory.cc b/google/cloud/dialogflow_es/internal/contexts_stub_factory.cc index 729866f97cee2..41666dd768d9d 100644 --- a/google/cloud/dialogflow_es/internal/contexts_stub_factory.cc +++ b/google/cloud/dialogflow_es/internal/contexts_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/v2/context.proto #include "google/cloud/dialogflow_es/internal/contexts_stub_factory.h" +#include "google/cloud/dialogflow/v2/context.grpc.pb.h" #include "google/cloud/dialogflow_es/internal/contexts_auth_decorator.h" #include "google/cloud/dialogflow_es/internal/contexts_logging_decorator.h" #include "google/cloud/dialogflow_es/internal/contexts_metadata_decorator.h" #include "google/cloud/dialogflow_es/internal/contexts_stub.h" #include "google/cloud/dialogflow_es/internal/contexts_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/contexts_stub_factory.h b/google/cloud/dialogflow_es/internal/contexts_stub_factory.h index 58817a5492c28..6f70389581d3e 100644 --- a/google/cloud/dialogflow_es/internal/contexts_stub_factory.h +++ b/google/cloud/dialogflow_es/internal/contexts_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONTEXTS_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_es/internal/contexts_tracing_connection.cc b/google/cloud/dialogflow_es/internal/contexts_tracing_connection.cc index f41d06741313e..25264417dd9ac 100644 --- a/google/cloud/dialogflow_es/internal/contexts_tracing_connection.cc +++ b/google/cloud/dialogflow_es/internal/contexts_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ContextsTracingConnection::ContextsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -135,16 +133,12 @@ Status ContextsTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeContextsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_es/internal/contexts_tracing_connection.h b/google/cloud/dialogflow_es/internal/contexts_tracing_connection.h index 96ea4b943c562..826b421215cc6 100644 --- a/google/cloud/dialogflow_es/internal/contexts_tracing_connection.h +++ b/google/cloud/dialogflow_es/internal/contexts_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ContextsTracingConnection : public dialogflow_es::ContextsConnection { public: ~ContextsTracingConnection() override = default; @@ -80,8 +78,6 @@ class ContextsTracingConnection : public dialogflow_es::ContextsConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_es/internal/contexts_tracing_stub.cc b/google/cloud/dialogflow_es/internal/contexts_tracing_stub.cc index f03a75f891c53..1af6149e74aeb 100644 --- a/google/cloud/dialogflow_es/internal/contexts_tracing_stub.cc +++ b/google/cloud/dialogflow_es/internal/contexts_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ContextsTracingStub::ContextsTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -158,18 +159,14 @@ Status ContextsTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeContextsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/contexts_tracing_stub.h b/google/cloud/dialogflow_es/internal/contexts_tracing_stub.h index 87fe72f5074c8..5f3d0a193c6f7 100644 --- a/google/cloud/dialogflow_es/internal/contexts_tracing_stub.h +++ b/google/cloud/dialogflow_es/internal/contexts_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ContextsTracingStub : public ContextsStub { public: ~ContextsTracingStub() override = default; @@ -93,8 +94,6 @@ class ContextsTracingStub : public ContextsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -109,4 +108,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONTEXTS_TRACING_STUB_H diff --git a/google/cloud/dialogflow_es/internal/conversation_datasets_auth_decorator.cc b/google/cloud/dialogflow_es/internal/conversation_datasets_auth_decorator.cc index f3ada29605abf..c3909bd67ef63 100644 --- a/google/cloud/dialogflow_es/internal/conversation_datasets_auth_decorator.cc +++ b/google/cloud/dialogflow_es/internal/conversation_datasets_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dialogflow/v2/conversation_dataset.proto #include "google/cloud/dialogflow_es/internal/conversation_datasets_auth_decorator.h" -#include +#include "google/cloud/dialogflow/v2/conversation_dataset.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -227,3 +230,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/conversation_datasets_auth_decorator.h b/google/cloud/dialogflow_es/internal/conversation_datasets_auth_decorator.h index 2667217e7180c..81daa13ae90cf 100644 --- a/google/cloud/dialogflow_es/internal/conversation_datasets_auth_decorator.h +++ b/google/cloud/dialogflow_es/internal/conversation_datasets_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_es/internal/conversation_datasets_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -131,4 +134,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONVERSATION_DATASETS_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/conversation_datasets_connection_impl.h b/google/cloud/dialogflow_es/internal/conversation_datasets_connection_impl.h index 8d2b57f45589a..78a38964ea823 100644 --- a/google/cloud/dialogflow_es/internal/conversation_datasets_connection_impl.h +++ b/google/cloud/dialogflow_es/internal/conversation_datasets_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_es/internal/conversation_datasets_logging_decorator.cc b/google/cloud/dialogflow_es/internal/conversation_datasets_logging_decorator.cc index 6e7962f40d20f..c8f8c6e25d04a 100644 --- a/google/cloud/dialogflow_es/internal/conversation_datasets_logging_decorator.cc +++ b/google/cloud/dialogflow_es/internal/conversation_datasets_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dialogflow/v2/conversation_dataset.proto #include "google/cloud/dialogflow_es/internal/conversation_datasets_logging_decorator.h" +#include "google/cloud/dialogflow/v2/conversation_dataset.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -268,3 +271,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/conversation_datasets_logging_decorator.h b/google/cloud/dialogflow_es/internal/conversation_datasets_logging_decorator.h index e9a949fd6cc31..8ef7e31449542 100644 --- a/google/cloud/dialogflow_es/internal/conversation_datasets_logging_decorator.h +++ b/google/cloud/dialogflow_es/internal/conversation_datasets_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_es/internal/conversation_datasets_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -131,4 +134,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONVERSATION_DATASETS_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/conversation_datasets_metadata_decorator.cc b/google/cloud/dialogflow_es/internal/conversation_datasets_metadata_decorator.cc index 824bee67453af..7ffa04f9553d8 100644 --- a/google/cloud/dialogflow_es/internal/conversation_datasets_metadata_decorator.cc +++ b/google/cloud/dialogflow_es/internal/conversation_datasets_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/v2/conversation_dataset.proto #include "google/cloud/dialogflow_es/internal/conversation_datasets_metadata_decorator.h" +#include "google/cloud/dialogflow/v2/conversation_dataset.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -217,3 +221,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/conversation_datasets_metadata_decorator.h b/google/cloud/dialogflow_es/internal/conversation_datasets_metadata_decorator.h index 48774ba5427d0..3bb0fdce353f2 100644 --- a/google/cloud/dialogflow_es/internal/conversation_datasets_metadata_decorator.h +++ b/google/cloud/dialogflow_es/internal/conversation_datasets_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_es/internal/conversation_datasets_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -137,4 +140,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONVERSATION_DATASETS_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/conversation_datasets_option_defaults.cc b/google/cloud/dialogflow_es/internal/conversation_datasets_option_defaults.cc index 4d9fbb6fb19c9..6f5afda0f02a9 100644 --- a/google/cloud/dialogflow_es/internal/conversation_datasets_option_defaults.cc +++ b/google/cloud/dialogflow_es/internal/conversation_datasets_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_es/internal/conversation_datasets_option_defaults.h" #include "google/cloud/dialogflow_es/conversation_datasets_connection.h" #include "google/cloud/dialogflow_es/conversation_datasets_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -45,7 +45,7 @@ Options ConversationDatasetsDefaultOptions(std::string const& location, if (!options.has()) { options.set( dialogflow_es::ConversationDatasetsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_es/internal/conversation_datasets_stub.cc b/google/cloud/dialogflow_es/internal/conversation_datasets_stub.cc index a6871b3669eaf..1f1aa890b21eb 100644 --- a/google/cloud/dialogflow_es/internal/conversation_datasets_stub.cc +++ b/google/cloud/dialogflow_es/internal/conversation_datasets_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/dialogflow/v2/conversation_dataset.proto #include "google/cloud/dialogflow_es/internal/conversation_datasets_stub.h" +#include "google/cloud/dialogflow/v2/conversation_dataset.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -265,3 +268,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/conversation_datasets_stub.h b/google/cloud/dialogflow_es/internal/conversation_datasets_stub.h index e81ee6255998f..bd54ae64a5d08 100644 --- a/google/cloud/dialogflow_es/internal/conversation_datasets_stub.h +++ b/google/cloud/dialogflow_es/internal/conversation_datasets_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONVERSATION_DATASETS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONVERSATION_DATASETS_STUB_H +#include "google/cloud/dialogflow/v2/conversation_dataset.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -236,4 +239,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONVERSATION_DATASETS_STUB_H diff --git a/google/cloud/dialogflow_es/internal/conversation_datasets_stub_factory.cc b/google/cloud/dialogflow_es/internal/conversation_datasets_stub_factory.cc index 736bd848375a9..dc073d576a0a2 100644 --- a/google/cloud/dialogflow_es/internal/conversation_datasets_stub_factory.cc +++ b/google/cloud/dialogflow_es/internal/conversation_datasets_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/v2/conversation_dataset.proto #include "google/cloud/dialogflow_es/internal/conversation_datasets_stub_factory.h" +#include "google/cloud/dialogflow/v2/conversation_dataset.grpc.pb.h" #include "google/cloud/dialogflow_es/internal/conversation_datasets_auth_decorator.h" #include "google/cloud/dialogflow_es/internal/conversation_datasets_logging_decorator.h" #include "google/cloud/dialogflow_es/internal/conversation_datasets_metadata_decorator.h" #include "google/cloud/dialogflow_es/internal/conversation_datasets_stub.h" #include "google/cloud/dialogflow_es/internal/conversation_datasets_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/conversation_datasets_stub_factory.h b/google/cloud/dialogflow_es/internal/conversation_datasets_stub_factory.h index e96c3623df077..5ce7458bf7ea4 100644 --- a/google/cloud/dialogflow_es/internal/conversation_datasets_stub_factory.h +++ b/google/cloud/dialogflow_es/internal/conversation_datasets_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONVERSATION_DATASETS_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_es/internal/conversation_datasets_tracing_connection.cc b/google/cloud/dialogflow_es/internal/conversation_datasets_tracing_connection.cc index d9cc70dc3e7f2..e0fdf0cbff90f 100644 --- a/google/cloud/dialogflow_es/internal/conversation_datasets_tracing_connection.cc +++ b/google/cloud/dialogflow_es/internal/conversation_datasets_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ConversationDatasetsTracingConnection::ConversationDatasetsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -213,17 +211,13 @@ Status ConversationDatasetsTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeConversationDatasetsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_es/internal/conversation_datasets_tracing_connection.h b/google/cloud/dialogflow_es/internal/conversation_datasets_tracing_connection.h index 48920e83f816d..7b6cded789e6d 100644 --- a/google/cloud/dialogflow_es/internal/conversation_datasets_tracing_connection.h +++ b/google/cloud/dialogflow_es/internal/conversation_datasets_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ConversationDatasetsTracingConnection : public dialogflow_es::ConversationDatasetsConnection { public: @@ -115,8 +113,6 @@ class ConversationDatasetsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_es/internal/conversation_datasets_tracing_stub.cc b/google/cloud/dialogflow_es/internal/conversation_datasets_tracing_stub.cc index 7dead452e5ea5..30d1d5cf8ff40 100644 --- a/google/cloud/dialogflow_es/internal/conversation_datasets_tracing_stub.cc +++ b/google/cloud/dialogflow_es/internal/conversation_datasets_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ConversationDatasetsTracingStub::ConversationDatasetsTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -245,18 +246,14 @@ future ConversationDatasetsTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeConversationDatasetsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/conversation_datasets_tracing_stub.h b/google/cloud/dialogflow_es/internal/conversation_datasets_tracing_stub.h index 8d42999214a57..cd7967afd8336 100644 --- a/google/cloud/dialogflow_es/internal/conversation_datasets_tracing_stub.h +++ b/google/cloud/dialogflow_es/internal/conversation_datasets_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ConversationDatasetsTracingStub : public ConversationDatasetsStub { public: ~ConversationDatasetsTracingStub() override = default; @@ -127,8 +128,6 @@ class ConversationDatasetsTracingStub : public ConversationDatasetsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -143,4 +142,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONVERSATION_DATASETS_TRACING_STUB_H diff --git a/google/cloud/dialogflow_es/internal/conversation_models_auth_decorator.cc b/google/cloud/dialogflow_es/internal/conversation_models_auth_decorator.cc index aae3b5e7796a9..99ab5cc8b21a8 100644 --- a/google/cloud/dialogflow_es/internal/conversation_models_auth_decorator.cc +++ b/google/cloud/dialogflow_es/internal/conversation_models_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dialogflow/v2/conversation_model.proto #include "google/cloud/dialogflow_es/internal/conversation_models_auth_decorator.h" -#include +#include "google/cloud/dialogflow/v2/conversation_model.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -308,3 +311,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/conversation_models_auth_decorator.h b/google/cloud/dialogflow_es/internal/conversation_models_auth_decorator.h index 65965652491ea..77204749bab13 100644 --- a/google/cloud/dialogflow_es/internal/conversation_models_auth_decorator.h +++ b/google/cloud/dialogflow_es/internal/conversation_models_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_es/internal/conversation_models_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -168,4 +171,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONVERSATION_MODELS_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/conversation_models_connection_impl.h b/google/cloud/dialogflow_es/internal/conversation_models_connection_impl.h index de3fdd28ff5ce..831c50a1a5762 100644 --- a/google/cloud/dialogflow_es/internal/conversation_models_connection_impl.h +++ b/google/cloud/dialogflow_es/internal/conversation_models_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_es/internal/conversation_models_logging_decorator.cc b/google/cloud/dialogflow_es/internal/conversation_models_logging_decorator.cc index e1d7777fef097..4effb27d36bba 100644 --- a/google/cloud/dialogflow_es/internal/conversation_models_logging_decorator.cc +++ b/google/cloud/dialogflow_es/internal/conversation_models_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dialogflow/v2/conversation_model.proto #include "google/cloud/dialogflow_es/internal/conversation_models_logging_decorator.h" +#include "google/cloud/dialogflow/v2/conversation_model.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -370,3 +373,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/conversation_models_logging_decorator.h b/google/cloud/dialogflow_es/internal/conversation_models_logging_decorator.h index 1c5ac09d0bd3b..d56abdad94034 100644 --- a/google/cloud/dialogflow_es/internal/conversation_models_logging_decorator.h +++ b/google/cloud/dialogflow_es/internal/conversation_models_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_es/internal/conversation_models_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -168,4 +171,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONVERSATION_MODELS_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/conversation_models_metadata_decorator.cc b/google/cloud/dialogflow_es/internal/conversation_models_metadata_decorator.cc index 8c35ce72ee964..654e75ff45280 100644 --- a/google/cloud/dialogflow_es/internal/conversation_models_metadata_decorator.cc +++ b/google/cloud/dialogflow_es/internal/conversation_models_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/v2/conversation_model.proto #include "google/cloud/dialogflow_es/internal/conversation_models_metadata_decorator.h" +#include "google/cloud/dialogflow/v2/conversation_model.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -283,3 +287,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/conversation_models_metadata_decorator.h b/google/cloud/dialogflow_es/internal/conversation_models_metadata_decorator.h index ee1827b663aa7..16c53e8dc18cb 100644 --- a/google/cloud/dialogflow_es/internal/conversation_models_metadata_decorator.h +++ b/google/cloud/dialogflow_es/internal/conversation_models_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_es/internal/conversation_models_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -174,4 +177,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONVERSATION_MODELS_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/conversation_models_option_defaults.cc b/google/cloud/dialogflow_es/internal/conversation_models_option_defaults.cc index e023dbc02e734..0aa886ac791be 100644 --- a/google/cloud/dialogflow_es/internal/conversation_models_option_defaults.cc +++ b/google/cloud/dialogflow_es/internal/conversation_models_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_es/internal/conversation_models_option_defaults.h" #include "google/cloud/dialogflow_es/conversation_models_connection.h" #include "google/cloud/dialogflow_es/conversation_models_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -45,7 +45,7 @@ Options ConversationModelsDefaultOptions(std::string const& location, if (!options.has()) { options.set( dialogflow_es::ConversationModelsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_es/internal/conversation_models_stub.cc b/google/cloud/dialogflow_es/internal/conversation_models_stub.cc index 7ec52c36c1ed8..90c13c852d353 100644 --- a/google/cloud/dialogflow_es/internal/conversation_models_stub.cc +++ b/google/cloud/dialogflow_es/internal/conversation_models_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/dialogflow/v2/conversation_model.proto #include "google/cloud/dialogflow_es/internal/conversation_models_stub.h" +#include "google/cloud/dialogflow/v2/conversation_model.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -364,3 +367,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/conversation_models_stub.h b/google/cloud/dialogflow_es/internal/conversation_models_stub.h index b06aedf3e20e7..43c3e8ef46c70 100644 --- a/google/cloud/dialogflow_es/internal/conversation_models_stub.h +++ b/google/cloud/dialogflow_es/internal/conversation_models_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONVERSATION_MODELS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONVERSATION_MODELS_STUB_H +#include "google/cloud/dialogflow/v2/conversation_model.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -313,4 +316,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONVERSATION_MODELS_STUB_H diff --git a/google/cloud/dialogflow_es/internal/conversation_models_stub_factory.cc b/google/cloud/dialogflow_es/internal/conversation_models_stub_factory.cc index b9588a62a1527..679ea6cf8ef51 100644 --- a/google/cloud/dialogflow_es/internal/conversation_models_stub_factory.cc +++ b/google/cloud/dialogflow_es/internal/conversation_models_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/v2/conversation_model.proto #include "google/cloud/dialogflow_es/internal/conversation_models_stub_factory.h" +#include "google/cloud/dialogflow/v2/conversation_model.grpc.pb.h" #include "google/cloud/dialogflow_es/internal/conversation_models_auth_decorator.h" #include "google/cloud/dialogflow_es/internal/conversation_models_logging_decorator.h" #include "google/cloud/dialogflow_es/internal/conversation_models_metadata_decorator.h" #include "google/cloud/dialogflow_es/internal/conversation_models_stub.h" #include "google/cloud/dialogflow_es/internal/conversation_models_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/conversation_models_stub_factory.h b/google/cloud/dialogflow_es/internal/conversation_models_stub_factory.h index 2d85555097645..57063bdbd8746 100644 --- a/google/cloud/dialogflow_es/internal/conversation_models_stub_factory.h +++ b/google/cloud/dialogflow_es/internal/conversation_models_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONVERSATION_MODELS_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_es/internal/conversation_models_tracing_connection.cc b/google/cloud/dialogflow_es/internal/conversation_models_tracing_connection.cc index 5afa2351d1a59..db8334434acb3 100644 --- a/google/cloud/dialogflow_es/internal/conversation_models_tracing_connection.cc +++ b/google/cloud/dialogflow_es/internal/conversation_models_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ConversationModelsTracingConnection::ConversationModelsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -301,17 +299,13 @@ Status ConversationModelsTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeConversationModelsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_es/internal/conversation_models_tracing_connection.h b/google/cloud/dialogflow_es/internal/conversation_models_tracing_connection.h index 441c40a290e11..e646cc5777b6e 100644 --- a/google/cloud/dialogflow_es/internal/conversation_models_tracing_connection.h +++ b/google/cloud/dialogflow_es/internal/conversation_models_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ConversationModelsTracingConnection : public dialogflow_es::ConversationModelsConnection { public: @@ -155,8 +153,6 @@ class ConversationModelsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_es/internal/conversation_models_tracing_stub.cc b/google/cloud/dialogflow_es/internal/conversation_models_tracing_stub.cc index 9f1e7af19914c..088ec335f88ae 100644 --- a/google/cloud/dialogflow_es/internal/conversation_models_tracing_stub.cc +++ b/google/cloud/dialogflow_es/internal/conversation_models_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ConversationModelsTracingStub::ConversationModelsTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -337,18 +338,14 @@ future ConversationModelsTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeConversationModelsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/conversation_models_tracing_stub.h b/google/cloud/dialogflow_es/internal/conversation_models_tracing_stub.h index 6ab727cd8f9e2..3492826b798ef 100644 --- a/google/cloud/dialogflow_es/internal/conversation_models_tracing_stub.h +++ b/google/cloud/dialogflow_es/internal/conversation_models_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ConversationModelsTracingStub : public ConversationModelsStub { public: ~ConversationModelsTracingStub() override = default; @@ -164,8 +165,6 @@ class ConversationModelsTracingStub : public ConversationModelsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -180,4 +179,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONVERSATION_MODELS_TRACING_STUB_H diff --git a/google/cloud/dialogflow_es/internal/conversation_profiles_auth_decorator.cc b/google/cloud/dialogflow_es/internal/conversation_profiles_auth_decorator.cc index 8cf6b4fd78450..c1f138893ed30 100644 --- a/google/cloud/dialogflow_es/internal/conversation_profiles_auth_decorator.cc +++ b/google/cloud/dialogflow_es/internal/conversation_profiles_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dialogflow/v2/conversation_profile.proto #include "google/cloud/dialogflow_es/internal/conversation_profiles_auth_decorator.h" -#include +#include "google/cloud/dialogflow/v2/conversation_profile.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -225,3 +228,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/conversation_profiles_auth_decorator.h b/google/cloud/dialogflow_es/internal/conversation_profiles_auth_decorator.h index a52ea337d249e..08d34bad1de21 100644 --- a/google/cloud/dialogflow_es/internal/conversation_profiles_auth_decorator.h +++ b/google/cloud/dialogflow_es/internal/conversation_profiles_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_es/internal/conversation_profiles_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -136,4 +139,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONVERSATION_PROFILES_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/conversation_profiles_connection_impl.h b/google/cloud/dialogflow_es/internal/conversation_profiles_connection_impl.h index ba2829b44a97c..ea9c66f545f14 100644 --- a/google/cloud/dialogflow_es/internal/conversation_profiles_connection_impl.h +++ b/google/cloud/dialogflow_es/internal/conversation_profiles_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_es/internal/conversation_profiles_logging_decorator.cc b/google/cloud/dialogflow_es/internal/conversation_profiles_logging_decorator.cc index 64140d2088831..a433437c72511 100644 --- a/google/cloud/dialogflow_es/internal/conversation_profiles_logging_decorator.cc +++ b/google/cloud/dialogflow_es/internal/conversation_profiles_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dialogflow/v2/conversation_profile.proto #include "google/cloud/dialogflow_es/internal/conversation_profiles_logging_decorator.h" +#include "google/cloud/dialogflow/v2/conversation_profile.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -274,3 +277,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/conversation_profiles_logging_decorator.h b/google/cloud/dialogflow_es/internal/conversation_profiles_logging_decorator.h index a0f85a9e3e494..7861595ed72fd 100644 --- a/google/cloud/dialogflow_es/internal/conversation_profiles_logging_decorator.h +++ b/google/cloud/dialogflow_es/internal/conversation_profiles_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_es/internal/conversation_profiles_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -136,4 +139,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONVERSATION_PROFILES_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/conversation_profiles_metadata_decorator.cc b/google/cloud/dialogflow_es/internal/conversation_profiles_metadata_decorator.cc index bbc01deac5cc4..7b0f5ce7703e8 100644 --- a/google/cloud/dialogflow_es/internal/conversation_profiles_metadata_decorator.cc +++ b/google/cloud/dialogflow_es/internal/conversation_profiles_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/v2/conversation_profile.proto #include "google/cloud/dialogflow_es/internal/conversation_profiles_metadata_decorator.h" +#include "google/cloud/dialogflow/v2/conversation_profile.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -233,3 +237,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/conversation_profiles_metadata_decorator.h b/google/cloud/dialogflow_es/internal/conversation_profiles_metadata_decorator.h index ce623f0bc6ead..f8338376dff1d 100644 --- a/google/cloud/dialogflow_es/internal/conversation_profiles_metadata_decorator.h +++ b/google/cloud/dialogflow_es/internal/conversation_profiles_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_es/internal/conversation_profiles_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -142,4 +145,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONVERSATION_PROFILES_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/conversation_profiles_option_defaults.cc b/google/cloud/dialogflow_es/internal/conversation_profiles_option_defaults.cc index 24d8d1bad3023..c769872880c61 100644 --- a/google/cloud/dialogflow_es/internal/conversation_profiles_option_defaults.cc +++ b/google/cloud/dialogflow_es/internal/conversation_profiles_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_es/internal/conversation_profiles_option_defaults.h" #include "google/cloud/dialogflow_es/conversation_profiles_connection.h" #include "google/cloud/dialogflow_es/conversation_profiles_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -45,7 +45,7 @@ Options ConversationProfilesDefaultOptions(std::string const& location, if (!options.has()) { options.set( dialogflow_es::ConversationProfilesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_es/internal/conversation_profiles_stub.cc b/google/cloud/dialogflow_es/internal/conversation_profiles_stub.cc index 738c66e6d2e1e..fd4f8144ba50c 100644 --- a/google/cloud/dialogflow_es/internal/conversation_profiles_stub.cc +++ b/google/cloud/dialogflow_es/internal/conversation_profiles_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/dialogflow/v2/conversation_profile.proto #include "google/cloud/dialogflow_es/internal/conversation_profiles_stub.h" +#include "google/cloud/dialogflow/v2/conversation_profile.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -272,3 +275,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/conversation_profiles_stub.h b/google/cloud/dialogflow_es/internal/conversation_profiles_stub.h index 95a6150935be2..058bcb9ded154 100644 --- a/google/cloud/dialogflow_es/internal/conversation_profiles_stub.h +++ b/google/cloud/dialogflow_es/internal/conversation_profiles_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONVERSATION_PROFILES_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONVERSATION_PROFILES_STUB_H +#include "google/cloud/dialogflow/v2/conversation_profile.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -245,4 +248,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONVERSATION_PROFILES_STUB_H diff --git a/google/cloud/dialogflow_es/internal/conversation_profiles_stub_factory.cc b/google/cloud/dialogflow_es/internal/conversation_profiles_stub_factory.cc index 9c8701f862472..a2f963264140d 100644 --- a/google/cloud/dialogflow_es/internal/conversation_profiles_stub_factory.cc +++ b/google/cloud/dialogflow_es/internal/conversation_profiles_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/v2/conversation_profile.proto #include "google/cloud/dialogflow_es/internal/conversation_profiles_stub_factory.h" +#include "google/cloud/dialogflow/v2/conversation_profile.grpc.pb.h" #include "google/cloud/dialogflow_es/internal/conversation_profiles_auth_decorator.h" #include "google/cloud/dialogflow_es/internal/conversation_profiles_logging_decorator.h" #include "google/cloud/dialogflow_es/internal/conversation_profiles_metadata_decorator.h" #include "google/cloud/dialogflow_es/internal/conversation_profiles_stub.h" #include "google/cloud/dialogflow_es/internal/conversation_profiles_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/conversation_profiles_stub_factory.h b/google/cloud/dialogflow_es/internal/conversation_profiles_stub_factory.h index d775b39fd564e..df716c83e28af 100644 --- a/google/cloud/dialogflow_es/internal/conversation_profiles_stub_factory.h +++ b/google/cloud/dialogflow_es/internal/conversation_profiles_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONVERSATION_PROFILES_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_es/internal/conversation_profiles_tracing_connection.cc b/google/cloud/dialogflow_es/internal/conversation_profiles_tracing_connection.cc index 514db7e718199..15b8bb840a0d7 100644 --- a/google/cloud/dialogflow_es/internal/conversation_profiles_tracing_connection.cc +++ b/google/cloud/dialogflow_es/internal/conversation_profiles_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ConversationProfilesTracingConnection::ConversationProfilesTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -208,17 +206,13 @@ Status ConversationProfilesTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeConversationProfilesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_es/internal/conversation_profiles_tracing_connection.h b/google/cloud/dialogflow_es/internal/conversation_profiles_tracing_connection.h index 5a994ec4737d0..c7ceb3d29d55a 100644 --- a/google/cloud/dialogflow_es/internal/conversation_profiles_tracing_connection.h +++ b/google/cloud/dialogflow_es/internal/conversation_profiles_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ConversationProfilesTracingConnection : public dialogflow_es::ConversationProfilesConnection { public: @@ -111,8 +109,6 @@ class ConversationProfilesTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_es/internal/conversation_profiles_tracing_stub.cc b/google/cloud/dialogflow_es/internal/conversation_profiles_tracing_stub.cc index 6445f6e6e9873..1d16c931a079e 100644 --- a/google/cloud/dialogflow_es/internal/conversation_profiles_tracing_stub.cc +++ b/google/cloud/dialogflow_es/internal/conversation_profiles_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ConversationProfilesTracingStub::ConversationProfilesTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -257,18 +258,14 @@ future ConversationProfilesTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeConversationProfilesTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/conversation_profiles_tracing_stub.h b/google/cloud/dialogflow_es/internal/conversation_profiles_tracing_stub.h index 9994722b6a7d5..e99dc184fae79 100644 --- a/google/cloud/dialogflow_es/internal/conversation_profiles_tracing_stub.h +++ b/google/cloud/dialogflow_es/internal/conversation_profiles_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ConversationProfilesTracingStub : public ConversationProfilesStub { public: ~ConversationProfilesTracingStub() override = default; @@ -132,8 +133,6 @@ class ConversationProfilesTracingStub : public ConversationProfilesStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -148,4 +147,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONVERSATION_PROFILES_TRACING_STUB_H diff --git a/google/cloud/dialogflow_es/internal/conversations_auth_decorator.cc b/google/cloud/dialogflow_es/internal/conversations_auth_decorator.cc index 51e5850f67b1e..42d3edcf39eb3 100644 --- a/google/cloud/dialogflow_es/internal/conversations_auth_decorator.cc +++ b/google/cloud/dialogflow_es/internal/conversations_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dialogflow/v2/conversation.proto #include "google/cloud/dialogflow_es/internal/conversations_auth_decorator.h" -#include +#include "google/cloud/dialogflow/v2/conversation.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -180,3 +183,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/conversations_auth_decorator.h b/google/cloud/dialogflow_es/internal/conversations_auth_decorator.h index bf73f843358f8..1fa4a18a9f47f 100644 --- a/google/cloud/dialogflow_es/internal/conversations_auth_decorator.h +++ b/google/cloud/dialogflow_es/internal/conversations_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -129,4 +132,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONVERSATIONS_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/conversations_logging_decorator.cc b/google/cloud/dialogflow_es/internal/conversations_logging_decorator.cc index 7b4b17d87bb2c..9213169fe5a83 100644 --- a/google/cloud/dialogflow_es/internal/conversations_logging_decorator.cc +++ b/google/cloud/dialogflow_es/internal/conversations_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dialogflow/v2/conversation.proto #include "google/cloud/dialogflow_es/internal/conversations_logging_decorator.h" +#include "google/cloud/dialogflow/v2/conversation.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -245,3 +248,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/conversations_logging_decorator.h b/google/cloud/dialogflow_es/internal/conversations_logging_decorator.h index ca2e5438c173c..07b96b862b631 100644 --- a/google/cloud/dialogflow_es/internal/conversations_logging_decorator.h +++ b/google/cloud/dialogflow_es/internal/conversations_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -129,4 +132,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONVERSATIONS_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/conversations_metadata_decorator.cc b/google/cloud/dialogflow_es/internal/conversations_metadata_decorator.cc index 756b5da85f48f..10e1b79b5d2ad 100644 --- a/google/cloud/dialogflow_es/internal/conversations_metadata_decorator.cc +++ b/google/cloud/dialogflow_es/internal/conversations_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/v2/conversation.proto #include "google/cloud/dialogflow_es/internal/conversations_metadata_decorator.h" +#include "google/cloud/dialogflow/v2/conversation.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -211,3 +215,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/conversations_metadata_decorator.h b/google/cloud/dialogflow_es/internal/conversations_metadata_decorator.h index cb899d3fe9fd5..b00575920dd0d 100644 --- a/google/cloud/dialogflow_es/internal/conversations_metadata_decorator.h +++ b/google/cloud/dialogflow_es/internal/conversations_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -134,4 +137,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONVERSATIONS_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/conversations_option_defaults.cc b/google/cloud/dialogflow_es/internal/conversations_option_defaults.cc index a16fac8026da8..b91d819ca62b8 100644 --- a/google/cloud/dialogflow_es/internal/conversations_option_defaults.cc +++ b/google/cloud/dialogflow_es/internal/conversations_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_es/internal/conversations_option_defaults.h" #include "google/cloud/dialogflow_es/conversations_connection.h" #include "google/cloud/dialogflow_es/conversations_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -45,7 +45,7 @@ Options ConversationsDefaultOptions(std::string const& location, if (!options.has()) { options.set( dialogflow_es::ConversationsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_es/internal/conversations_stub.cc b/google/cloud/dialogflow_es/internal/conversations_stub.cc index 375c6000f5bf2..b5e160ef71d5d 100644 --- a/google/cloud/dialogflow_es/internal/conversations_stub.cc +++ b/google/cloud/dialogflow_es/internal/conversations_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/dialogflow/v2/conversation.proto #include "google/cloud/dialogflow_es/internal/conversations_stub.h" +#include "google/cloud/dialogflow/v2/conversation.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -232,3 +235,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/conversations_stub.h b/google/cloud/dialogflow_es/internal/conversations_stub.h index 702fcc7d1884f..4edd3ccc95d94 100644 --- a/google/cloud/dialogflow_es/internal/conversations_stub.h +++ b/google/cloud/dialogflow_es/internal/conversations_stub.h @@ -19,15 +19,18 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONVERSATIONS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONVERSATIONS_STUB_H +#include "google/cloud/dialogflow/v2/conversation.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -234,4 +237,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONVERSATIONS_STUB_H diff --git a/google/cloud/dialogflow_es/internal/conversations_stub_factory.cc b/google/cloud/dialogflow_es/internal/conversations_stub_factory.cc index 4d91f838a99c1..8d589b2f36e7a 100644 --- a/google/cloud/dialogflow_es/internal/conversations_stub_factory.cc +++ b/google/cloud/dialogflow_es/internal/conversations_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/v2/conversation.proto #include "google/cloud/dialogflow_es/internal/conversations_stub_factory.h" +#include "google/cloud/dialogflow/v2/conversation.grpc.pb.h" #include "google/cloud/dialogflow_es/internal/conversations_auth_decorator.h" #include "google/cloud/dialogflow_es/internal/conversations_logging_decorator.h" #include "google/cloud/dialogflow_es/internal/conversations_metadata_decorator.h" #include "google/cloud/dialogflow_es/internal/conversations_stub.h" #include "google/cloud/dialogflow_es/internal/conversations_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -77,3 +80,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/conversations_stub_factory.h b/google/cloud/dialogflow_es/internal/conversations_stub_factory.h index b4ce90fa08223..c437c76069af8 100644 --- a/google/cloud/dialogflow_es/internal/conversations_stub_factory.h +++ b/google/cloud/dialogflow_es/internal/conversations_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONVERSATIONS_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_es/internal/conversations_tracing_connection.cc b/google/cloud/dialogflow_es/internal/conversations_tracing_connection.cc index 541c63c872d0f..7c96b871fe577 100644 --- a/google/cloud/dialogflow_es/internal/conversations_tracing_connection.cc +++ b/google/cloud/dialogflow_es/internal/conversations_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ConversationsTracingConnection::ConversationsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -189,16 +187,12 @@ Status ConversationsTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeConversationsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_es/internal/conversations_tracing_connection.h b/google/cloud/dialogflow_es/internal/conversations_tracing_connection.h index 35109ca60d333..aff2e8830bc1e 100644 --- a/google/cloud/dialogflow_es/internal/conversations_tracing_connection.h +++ b/google/cloud/dialogflow_es/internal/conversations_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ConversationsTracingConnection : public dialogflow_es::ConversationsConnection { public: @@ -106,8 +104,6 @@ class ConversationsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_es/internal/conversations_tracing_stub.cc b/google/cloud/dialogflow_es/internal/conversations_tracing_stub.cc index 6330763910d3f..4fdbd0cb018ee 100644 --- a/google/cloud/dialogflow_es/internal/conversations_tracing_stub.cc +++ b/google/cloud/dialogflow_es/internal/conversations_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ConversationsTracingStub::ConversationsTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -230,18 +231,14 @@ Status ConversationsTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeConversationsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/conversations_tracing_stub.h b/google/cloud/dialogflow_es/internal/conversations_tracing_stub.h index 59be254a438ea..9b47303185a88 100644 --- a/google/cloud/dialogflow_es/internal/conversations_tracing_stub.h +++ b/google/cloud/dialogflow_es/internal/conversations_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ConversationsTracingStub : public ConversationsStub { public: ~ConversationsTracingStub() override = default; @@ -125,8 +126,6 @@ class ConversationsTracingStub : public ConversationsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -141,4 +140,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_CONVERSATIONS_TRACING_STUB_H diff --git a/google/cloud/dialogflow_es/internal/documents_auth_decorator.cc b/google/cloud/dialogflow_es/internal/documents_auth_decorator.cc index 251c9ecb6e744..b6085ef67637e 100644 --- a/google/cloud/dialogflow_es/internal/documents_auth_decorator.cc +++ b/google/cloud/dialogflow_es/internal/documents_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dialogflow/v2/document.proto #include "google/cloud/dialogflow_es/internal/documents_auth_decorator.h" -#include +#include "google/cloud/dialogflow/v2/document.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -298,3 +301,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/documents_auth_decorator.h b/google/cloud/dialogflow_es/internal/documents_auth_decorator.h index fe7d36473fd79..6138f273b14e5 100644 --- a/google/cloud/dialogflow_es/internal/documents_auth_decorator.h +++ b/google/cloud/dialogflow_es/internal/documents_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_es/internal/documents_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -163,4 +166,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_DOCUMENTS_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/documents_connection_impl.h b/google/cloud/dialogflow_es/internal/documents_connection_impl.h index c753e4c642757..7633b82253c4e 100644 --- a/google/cloud/dialogflow_es/internal/documents_connection_impl.h +++ b/google/cloud/dialogflow_es/internal/documents_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_es/internal/documents_logging_decorator.cc b/google/cloud/dialogflow_es/internal/documents_logging_decorator.cc index 657a9b07f70d4..0020be8c5923b 100644 --- a/google/cloud/dialogflow_es/internal/documents_logging_decorator.cc +++ b/google/cloud/dialogflow_es/internal/documents_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dialogflow/v2/document.proto #include "google/cloud/dialogflow_es/internal/documents_logging_decorator.h" +#include "google/cloud/dialogflow/v2/document.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -341,3 +344,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/documents_logging_decorator.h b/google/cloud/dialogflow_es/internal/documents_logging_decorator.h index ea5a5fe94d2ae..2f054bfcc113f 100644 --- a/google/cloud/dialogflow_es/internal/documents_logging_decorator.h +++ b/google/cloud/dialogflow_es/internal/documents_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_es/internal/documents_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -163,4 +166,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_DOCUMENTS_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/documents_metadata_decorator.cc b/google/cloud/dialogflow_es/internal/documents_metadata_decorator.cc index e39a8d4b9875d..f995e942c76d7 100644 --- a/google/cloud/dialogflow_es/internal/documents_metadata_decorator.cc +++ b/google/cloud/dialogflow_es/internal/documents_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/v2/document.proto #include "google/cloud/dialogflow_es/internal/documents_metadata_decorator.h" +#include "google/cloud/dialogflow/v2/document.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -266,3 +270,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/documents_metadata_decorator.h b/google/cloud/dialogflow_es/internal/documents_metadata_decorator.h index e7d7390fa1011..ebcd991969a39 100644 --- a/google/cloud/dialogflow_es/internal/documents_metadata_decorator.h +++ b/google/cloud/dialogflow_es/internal/documents_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_es/internal/documents_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -168,4 +171,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_DOCUMENTS_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/documents_option_defaults.cc b/google/cloud/dialogflow_es/internal/documents_option_defaults.cc index 1abba8c7ec876..b0dd7cbfa17a8 100644 --- a/google/cloud/dialogflow_es/internal/documents_option_defaults.cc +++ b/google/cloud/dialogflow_es/internal/documents_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_es/internal/documents_option_defaults.h" #include "google/cloud/dialogflow_es/documents_connection.h" #include "google/cloud/dialogflow_es/documents_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -43,7 +43,7 @@ Options DocumentsDefaultOptions(std::string const& location, Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - dialogflow_es::DocumentsLimitedTimeRetryPolicy(std::chrono::minutes(30)) + dialogflow_es::DocumentsLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_es/internal/documents_stub.cc b/google/cloud/dialogflow_es/internal/documents_stub.cc index 75d7de091e12d..fc964fb7c5da9 100644 --- a/google/cloud/dialogflow_es/internal/documents_stub.cc +++ b/google/cloud/dialogflow_es/internal/documents_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/dialogflow/v2/document.proto #include "google/cloud/dialogflow_es/internal/documents_stub.h" +#include "google/cloud/dialogflow/v2/document.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -335,3 +338,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/documents_stub.h b/google/cloud/dialogflow_es/internal/documents_stub.h index f50bb26d6c28c..bc98844502e81 100644 --- a/google/cloud/dialogflow_es/internal/documents_stub.h +++ b/google/cloud/dialogflow_es/internal/documents_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_DOCUMENTS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_DOCUMENTS_STUB_H +#include "google/cloud/dialogflow/v2/document.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -283,4 +286,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_DOCUMENTS_STUB_H diff --git a/google/cloud/dialogflow_es/internal/documents_stub_factory.cc b/google/cloud/dialogflow_es/internal/documents_stub_factory.cc index 2c80903dd0bd1..88a7eb9f092a8 100644 --- a/google/cloud/dialogflow_es/internal/documents_stub_factory.cc +++ b/google/cloud/dialogflow_es/internal/documents_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/v2/document.proto #include "google/cloud/dialogflow_es/internal/documents_stub_factory.h" +#include "google/cloud/dialogflow/v2/document.grpc.pb.h" #include "google/cloud/dialogflow_es/internal/documents_auth_decorator.h" #include "google/cloud/dialogflow_es/internal/documents_logging_decorator.h" #include "google/cloud/dialogflow_es/internal/documents_metadata_decorator.h" #include "google/cloud/dialogflow_es/internal/documents_stub.h" #include "google/cloud/dialogflow_es/internal/documents_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/documents_stub_factory.h b/google/cloud/dialogflow_es/internal/documents_stub_factory.h index 3d836f8c2fe8d..c118bd1f42841 100644 --- a/google/cloud/dialogflow_es/internal/documents_stub_factory.h +++ b/google/cloud/dialogflow_es/internal/documents_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_DOCUMENTS_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_es/internal/documents_tracing_connection.cc b/google/cloud/dialogflow_es/internal/documents_tracing_connection.cc index 310bd2aebfcc6..a1ff1a285a224 100644 --- a/google/cloud/dialogflow_es/internal/documents_tracing_connection.cc +++ b/google/cloud/dialogflow_es/internal/documents_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DocumentsTracingConnection::DocumentsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -275,16 +273,12 @@ Status DocumentsTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDocumentsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_es/internal/documents_tracing_connection.h b/google/cloud/dialogflow_es/internal/documents_tracing_connection.h index 75fde695e6d68..5aef5bdb83483 100644 --- a/google/cloud/dialogflow_es/internal/documents_tracing_connection.h +++ b/google/cloud/dialogflow_es/internal/documents_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DocumentsTracingConnection : public dialogflow_es::DocumentsConnection { public: ~DocumentsTracingConnection() override = default; @@ -137,8 +135,6 @@ class DocumentsTracingConnection : public dialogflow_es::DocumentsConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_es/internal/documents_tracing_stub.cc b/google/cloud/dialogflow_es/internal/documents_tracing_stub.cc index 515bf7b8a7cea..4ca46e37ebcc6 100644 --- a/google/cloud/dialogflow_es/internal/documents_tracing_stub.cc +++ b/google/cloud/dialogflow_es/internal/documents_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DocumentsTracingStub::DocumentsTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -296,18 +297,14 @@ future DocumentsTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDocumentsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/documents_tracing_stub.h b/google/cloud/dialogflow_es/internal/documents_tracing_stub.h index 5927be7b7d580..41174f4e8c389 100644 --- a/google/cloud/dialogflow_es/internal/documents_tracing_stub.h +++ b/google/cloud/dialogflow_es/internal/documents_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DocumentsTracingStub : public DocumentsStub { public: ~DocumentsTracingStub() override = default; @@ -158,8 +159,6 @@ class DocumentsTracingStub : public DocumentsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -174,4 +173,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_DOCUMENTS_TRACING_STUB_H diff --git a/google/cloud/dialogflow_es/internal/encryption_spec_auth_decorator.cc b/google/cloud/dialogflow_es/internal/encryption_spec_auth_decorator.cc index b6d9c4e6376e0..d7ff35c5daa4b 100644 --- a/google/cloud/dialogflow_es/internal/encryption_spec_auth_decorator.cc +++ b/google/cloud/dialogflow_es/internal/encryption_spec_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dialogflow/v2/encryption_spec.proto #include "google/cloud/dialogflow_es/internal/encryption_spec_auth_decorator.h" -#include +#include "google/cloud/dialogflow/v2/encryption_spec.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -155,3 +158,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/encryption_spec_auth_decorator.h b/google/cloud/dialogflow_es/internal/encryption_spec_auth_decorator.h index 813bcccb81cff..7fd14845b826c 100644 --- a/google/cloud/dialogflow_es/internal/encryption_spec_auth_decorator.h +++ b/google/cloud/dialogflow_es/internal/encryption_spec_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_es/internal/encryption_spec_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -99,4 +102,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_ENCRYPTION_SPEC_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/encryption_spec_connection_impl.h b/google/cloud/dialogflow_es/internal/encryption_spec_connection_impl.h index 9449b6d22b968..527568f90164e 100644 --- a/google/cloud/dialogflow_es/internal/encryption_spec_connection_impl.h +++ b/google/cloud/dialogflow_es/internal/encryption_spec_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_es/internal/encryption_spec_logging_decorator.cc b/google/cloud/dialogflow_es/internal/encryption_spec_logging_decorator.cc index a8cc61d3d5ccf..445bfbaa50656 100644 --- a/google/cloud/dialogflow_es/internal/encryption_spec_logging_decorator.cc +++ b/google/cloud/dialogflow_es/internal/encryption_spec_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dialogflow/v2/encryption_spec.proto #include "google/cloud/dialogflow_es/internal/encryption_spec_logging_decorator.h" +#include "google/cloud/dialogflow/v2/encryption_spec.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -182,3 +185,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/encryption_spec_logging_decorator.h b/google/cloud/dialogflow_es/internal/encryption_spec_logging_decorator.h index 596e426bdf21b..06ed58840472b 100644 --- a/google/cloud/dialogflow_es/internal/encryption_spec_logging_decorator.h +++ b/google/cloud/dialogflow_es/internal/encryption_spec_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_es/internal/encryption_spec_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -99,4 +102,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_ENCRYPTION_SPEC_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/encryption_spec_metadata_decorator.cc b/google/cloud/dialogflow_es/internal/encryption_spec_metadata_decorator.cc index c73e8569b7df7..acf3867bde9e4 100644 --- a/google/cloud/dialogflow_es/internal/encryption_spec_metadata_decorator.cc +++ b/google/cloud/dialogflow_es/internal/encryption_spec_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/v2/encryption_spec.proto #include "google/cloud/dialogflow_es/internal/encryption_spec_metadata_decorator.h" +#include "google/cloud/dialogflow/v2/encryption_spec.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -164,3 +168,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/encryption_spec_metadata_decorator.h b/google/cloud/dialogflow_es/internal/encryption_spec_metadata_decorator.h index 6cd0409429ccb..25331c1ef6ce0 100644 --- a/google/cloud/dialogflow_es/internal/encryption_spec_metadata_decorator.h +++ b/google/cloud/dialogflow_es/internal/encryption_spec_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_es/internal/encryption_spec_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -105,4 +108,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_ENCRYPTION_SPEC_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/encryption_spec_option_defaults.cc b/google/cloud/dialogflow_es/internal/encryption_spec_option_defaults.cc index 75d861b6a65b0..77c7143c5db30 100644 --- a/google/cloud/dialogflow_es/internal/encryption_spec_option_defaults.cc +++ b/google/cloud/dialogflow_es/internal/encryption_spec_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_es/internal/encryption_spec_option_defaults.h" #include "google/cloud/dialogflow_es/encryption_spec_connection.h" #include "google/cloud/dialogflow_es/encryption_spec_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -45,7 +45,7 @@ Options EncryptionSpecServiceDefaultOptions(std::string const& location, if (!options.has()) { options.set( dialogflow_es::EncryptionSpecServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_es/internal/encryption_spec_stub.cc b/google/cloud/dialogflow_es/internal/encryption_spec_stub.cc index 491be95e26fa0..b2a24b33a0a22 100644 --- a/google/cloud/dialogflow_es/internal/encryption_spec_stub.cc +++ b/google/cloud/dialogflow_es/internal/encryption_spec_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/dialogflow/v2/encryption_spec.proto #include "google/cloud/dialogflow_es/internal/encryption_spec_stub.h" +#include "google/cloud/dialogflow/v2/encryption_spec.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -180,3 +183,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/encryption_spec_stub.h b/google/cloud/dialogflow_es/internal/encryption_spec_stub.h index 260f3cf97bc00..af4bd980042bd 100644 --- a/google/cloud/dialogflow_es/internal/encryption_spec_stub.h +++ b/google/cloud/dialogflow_es/internal/encryption_spec_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_ENCRYPTION_SPEC_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_ENCRYPTION_SPEC_STUB_H +#include "google/cloud/dialogflow/v2/encryption_spec.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -171,4 +174,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_ENCRYPTION_SPEC_STUB_H diff --git a/google/cloud/dialogflow_es/internal/encryption_spec_stub_factory.cc b/google/cloud/dialogflow_es/internal/encryption_spec_stub_factory.cc index e04be4a282aee..798c0e4292687 100644 --- a/google/cloud/dialogflow_es/internal/encryption_spec_stub_factory.cc +++ b/google/cloud/dialogflow_es/internal/encryption_spec_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/v2/encryption_spec.proto #include "google/cloud/dialogflow_es/internal/encryption_spec_stub_factory.h" +#include "google/cloud/dialogflow/v2/encryption_spec.grpc.pb.h" #include "google/cloud/dialogflow_es/internal/encryption_spec_auth_decorator.h" #include "google/cloud/dialogflow_es/internal/encryption_spec_logging_decorator.h" #include "google/cloud/dialogflow_es/internal/encryption_spec_metadata_decorator.h" #include "google/cloud/dialogflow_es/internal/encryption_spec_stub.h" #include "google/cloud/dialogflow_es/internal/encryption_spec_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -76,3 +79,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/encryption_spec_stub_factory.h b/google/cloud/dialogflow_es/internal/encryption_spec_stub_factory.h index 03c68029d77cf..3a2e7968672a0 100644 --- a/google/cloud/dialogflow_es/internal/encryption_spec_stub_factory.h +++ b/google/cloud/dialogflow_es/internal/encryption_spec_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_ENCRYPTION_SPEC_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_es/internal/encryption_spec_tracing_connection.cc b/google/cloud/dialogflow_es/internal/encryption_spec_tracing_connection.cc index df5bcd78fba87..6ae98c97a3d7a 100644 --- a/google/cloud/dialogflow_es/internal/encryption_spec_tracing_connection.cc +++ b/google/cloud/dialogflow_es/internal/encryption_spec_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - EncryptionSpecServiceTracingConnection::EncryptionSpecServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -128,17 +126,13 @@ Status EncryptionSpecServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeEncryptionSpecServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_es/internal/encryption_spec_tracing_connection.h b/google/cloud/dialogflow_es/internal/encryption_spec_tracing_connection.h index 35a34fcc9bf42..c0beb5e6b59d2 100644 --- a/google/cloud/dialogflow_es/internal/encryption_spec_tracing_connection.h +++ b/google/cloud/dialogflow_es/internal/encryption_spec_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class EncryptionSpecServiceTracingConnection : public dialogflow_es::EncryptionSpecServiceConnection { public: @@ -79,8 +77,6 @@ class EncryptionSpecServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_es/internal/encryption_spec_tracing_stub.cc b/google/cloud/dialogflow_es/internal/encryption_spec_tracing_stub.cc index cd53ed068fb78..9ea5a358fde82 100644 --- a/google/cloud/dialogflow_es/internal/encryption_spec_tracing_stub.cc +++ b/google/cloud/dialogflow_es/internal/encryption_spec_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - EncryptionSpecServiceTracingStub::EncryptionSpecServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -163,18 +164,14 @@ future EncryptionSpecServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeEncryptionSpecServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/encryption_spec_tracing_stub.h b/google/cloud/dialogflow_es/internal/encryption_spec_tracing_stub.h index 71fd6f2e3e5f1..5b1c29fdd2977 100644 --- a/google/cloud/dialogflow_es/internal/encryption_spec_tracing_stub.h +++ b/google/cloud/dialogflow_es/internal/encryption_spec_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class EncryptionSpecServiceTracingStub : public EncryptionSpecServiceStub { public: ~EncryptionSpecServiceTracingStub() override = default; @@ -95,8 +96,6 @@ class EncryptionSpecServiceTracingStub : public EncryptionSpecServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -111,4 +110,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_ENCRYPTION_SPEC_TRACING_STUB_H diff --git a/google/cloud/dialogflow_es/internal/entity_types_auth_decorator.cc b/google/cloud/dialogflow_es/internal/entity_types_auth_decorator.cc index e18b96df1208b..1c017d86b31ad 100644 --- a/google/cloud/dialogflow_es/internal/entity_types_auth_decorator.cc +++ b/google/cloud/dialogflow_es/internal/entity_types_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dialogflow/v2/entity_type.proto #include "google/cloud/dialogflow_es/internal/entity_types_auth_decorator.h" -#include +#include "google/cloud/dialogflow/v2/entity_type.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -303,3 +306,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/entity_types_auth_decorator.h b/google/cloud/dialogflow_es/internal/entity_types_auth_decorator.h index 698a8a8a4428a..2d9d9856e6cb1 100644 --- a/google/cloud/dialogflow_es/internal/entity_types_auth_decorator.h +++ b/google/cloud/dialogflow_es/internal/entity_types_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_es/internal/entity_types_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -166,4 +169,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_ENTITY_TYPES_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/entity_types_connection_impl.h b/google/cloud/dialogflow_es/internal/entity_types_connection_impl.h index 4a9280b2e717e..5c87379d5a259 100644 --- a/google/cloud/dialogflow_es/internal/entity_types_connection_impl.h +++ b/google/cloud/dialogflow_es/internal/entity_types_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_es/internal/entity_types_logging_decorator.cc b/google/cloud/dialogflow_es/internal/entity_types_logging_decorator.cc index 3ed5626d268c0..8d5a0beab9052 100644 --- a/google/cloud/dialogflow_es/internal/entity_types_logging_decorator.cc +++ b/google/cloud/dialogflow_es/internal/entity_types_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dialogflow/v2/entity_type.proto #include "google/cloud/dialogflow_es/internal/entity_types_logging_decorator.h" +#include "google/cloud/dialogflow/v2/entity_type.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -359,3 +362,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/entity_types_logging_decorator.h b/google/cloud/dialogflow_es/internal/entity_types_logging_decorator.h index a1710cabff46e..a0096bbaca827 100644 --- a/google/cloud/dialogflow_es/internal/entity_types_logging_decorator.h +++ b/google/cloud/dialogflow_es/internal/entity_types_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_es/internal/entity_types_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -166,4 +169,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_ENTITY_TYPES_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/entity_types_metadata_decorator.cc b/google/cloud/dialogflow_es/internal/entity_types_metadata_decorator.cc index a66c2633812b1..b507efce2670e 100644 --- a/google/cloud/dialogflow_es/internal/entity_types_metadata_decorator.cc +++ b/google/cloud/dialogflow_es/internal/entity_types_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/v2/entity_type.proto #include "google/cloud/dialogflow_es/internal/entity_types_metadata_decorator.h" +#include "google/cloud/dialogflow/v2/entity_type.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -280,3 +284,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/entity_types_metadata_decorator.h b/google/cloud/dialogflow_es/internal/entity_types_metadata_decorator.h index 05cc16bc3db4c..23cf9f427971a 100644 --- a/google/cloud/dialogflow_es/internal/entity_types_metadata_decorator.h +++ b/google/cloud/dialogflow_es/internal/entity_types_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_es/internal/entity_types_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -171,4 +174,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_ENTITY_TYPES_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/entity_types_option_defaults.cc b/google/cloud/dialogflow_es/internal/entity_types_option_defaults.cc index bc44186dca0ad..ea8036a406f79 100644 --- a/google/cloud/dialogflow_es/internal/entity_types_option_defaults.cc +++ b/google/cloud/dialogflow_es/internal/entity_types_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_es/internal/entity_types_option_defaults.h" #include "google/cloud/dialogflow_es/entity_types_connection.h" #include "google/cloud/dialogflow_es/entity_types_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -45,7 +45,7 @@ Options EntityTypesDefaultOptions(std::string const& location, if (!options.has()) { options.set( dialogflow_es::EntityTypesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_es/internal/entity_types_stub.cc b/google/cloud/dialogflow_es/internal/entity_types_stub.cc index 88d39297fbd93..9bf7896b52d0e 100644 --- a/google/cloud/dialogflow_es/internal/entity_types_stub.cc +++ b/google/cloud/dialogflow_es/internal/entity_types_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/dialogflow/v2/entity_type.proto #include "google/cloud/dialogflow_es/internal/entity_types_stub.h" +#include "google/cloud/dialogflow/v2/entity_type.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -351,3 +354,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/entity_types_stub.h b/google/cloud/dialogflow_es/internal/entity_types_stub.h index fea939fcab29b..c6d69f7ad8301 100644 --- a/google/cloud/dialogflow_es/internal/entity_types_stub.h +++ b/google/cloud/dialogflow_es/internal/entity_types_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_ENTITY_TYPES_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_ENTITY_TYPES_STUB_H +#include "google/cloud/dialogflow/v2/entity_type.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/protobuf/struct.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -307,4 +310,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_ENTITY_TYPES_STUB_H diff --git a/google/cloud/dialogflow_es/internal/entity_types_stub_factory.cc b/google/cloud/dialogflow_es/internal/entity_types_stub_factory.cc index ebbe7dac4011f..11f8cc9cd56b8 100644 --- a/google/cloud/dialogflow_es/internal/entity_types_stub_factory.cc +++ b/google/cloud/dialogflow_es/internal/entity_types_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/v2/entity_type.proto #include "google/cloud/dialogflow_es/internal/entity_types_stub_factory.h" +#include "google/cloud/dialogflow/v2/entity_type.grpc.pb.h" #include "google/cloud/dialogflow_es/internal/entity_types_auth_decorator.h" #include "google/cloud/dialogflow_es/internal/entity_types_logging_decorator.h" #include "google/cloud/dialogflow_es/internal/entity_types_metadata_decorator.h" #include "google/cloud/dialogflow_es/internal/entity_types_stub.h" #include "google/cloud/dialogflow_es/internal/entity_types_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -74,3 +77,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/entity_types_stub_factory.h b/google/cloud/dialogflow_es/internal/entity_types_stub_factory.h index 9428bfc382a92..1f2ae01741709 100644 --- a/google/cloud/dialogflow_es/internal/entity_types_stub_factory.h +++ b/google/cloud/dialogflow_es/internal/entity_types_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_ENTITY_TYPES_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_es/internal/entity_types_tracing_connection.cc b/google/cloud/dialogflow_es/internal/entity_types_tracing_connection.cc index 9b25e9c24b759..80ae416f589da 100644 --- a/google/cloud/dialogflow_es/internal/entity_types_tracing_connection.cc +++ b/google/cloud/dialogflow_es/internal/entity_types_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - EntityTypesTracingConnection::EntityTypesTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -287,16 +285,12 @@ Status EntityTypesTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeEntityTypesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_es/internal/entity_types_tracing_connection.h b/google/cloud/dialogflow_es/internal/entity_types_tracing_connection.h index c7a451a91bdca..3214539d82bb7 100644 --- a/google/cloud/dialogflow_es/internal/entity_types_tracing_connection.h +++ b/google/cloud/dialogflow_es/internal/entity_types_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class EntityTypesTracingConnection : public dialogflow_es::EntityTypesConnection { public: @@ -142,8 +140,6 @@ class EntityTypesTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_es/internal/entity_types_tracing_stub.cc b/google/cloud/dialogflow_es/internal/entity_types_tracing_stub.cc index 2bf773d17b70e..743a52e1e9029 100644 --- a/google/cloud/dialogflow_es/internal/entity_types_tracing_stub.cc +++ b/google/cloud/dialogflow_es/internal/entity_types_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - EntityTypesTracingStub::EntityTypesTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -317,18 +318,14 @@ future EntityTypesTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeEntityTypesTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/entity_types_tracing_stub.h b/google/cloud/dialogflow_es/internal/entity_types_tracing_stub.h index 7757f7f17f880..fce8a1fd8bba8 100644 --- a/google/cloud/dialogflow_es/internal/entity_types_tracing_stub.h +++ b/google/cloud/dialogflow_es/internal/entity_types_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class EntityTypesTracingStub : public EntityTypesStub { public: ~EntityTypesTracingStub() override = default; @@ -161,8 +162,6 @@ class EntityTypesTracingStub : public EntityTypesStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -177,4 +176,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_ENTITY_TYPES_TRACING_STUB_H diff --git a/google/cloud/dialogflow_es/internal/environments_auth_decorator.cc b/google/cloud/dialogflow_es/internal/environments_auth_decorator.cc index 3894d472a633f..382e39246e0c1 100644 --- a/google/cloud/dialogflow_es/internal/environments_auth_decorator.cc +++ b/google/cloud/dialogflow_es/internal/environments_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dialogflow/v2/environment.proto #include "google/cloud/dialogflow_es/internal/environments_auth_decorator.h" -#include +#include "google/cloud/dialogflow/v2/environment.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -131,3 +134,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/environments_auth_decorator.h b/google/cloud/dialogflow_es/internal/environments_auth_decorator.h index f9b95c96e86f4..fc185ff91352a 100644 --- a/google/cloud/dialogflow_es/internal/environments_auth_decorator.h +++ b/google/cloud/dialogflow_es/internal/environments_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -99,4 +102,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_ENVIRONMENTS_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/environments_logging_decorator.cc b/google/cloud/dialogflow_es/internal/environments_logging_decorator.cc index 355d13a9e34bf..b96060b54ab52 100644 --- a/google/cloud/dialogflow_es/internal/environments_logging_decorator.cc +++ b/google/cloud/dialogflow_es/internal/environments_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dialogflow/v2/environment.proto #include "google/cloud/dialogflow_es/internal/environments_logging_decorator.h" +#include "google/cloud/dialogflow/v2/environment.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -174,3 +177,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/environments_logging_decorator.h b/google/cloud/dialogflow_es/internal/environments_logging_decorator.h index c2311c4b90923..5ed5560ae1c40 100644 --- a/google/cloud/dialogflow_es/internal/environments_logging_decorator.h +++ b/google/cloud/dialogflow_es/internal/environments_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -99,4 +102,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_ENVIRONMENTS_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/environments_metadata_decorator.cc b/google/cloud/dialogflow_es/internal/environments_metadata_decorator.cc index 4ef5ba01da821..d7c8d7c60143f 100644 --- a/google/cloud/dialogflow_es/internal/environments_metadata_decorator.cc +++ b/google/cloud/dialogflow_es/internal/environments_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/v2/environment.proto #include "google/cloud/dialogflow_es/internal/environments_metadata_decorator.h" +#include "google/cloud/dialogflow/v2/environment.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -158,3 +162,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/environments_metadata_decorator.h b/google/cloud/dialogflow_es/internal/environments_metadata_decorator.h index c6dad4613df88..45166c0f374cf 100644 --- a/google/cloud/dialogflow_es/internal/environments_metadata_decorator.h +++ b/google/cloud/dialogflow_es/internal/environments_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -104,4 +107,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_ENVIRONMENTS_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/environments_option_defaults.cc b/google/cloud/dialogflow_es/internal/environments_option_defaults.cc index 0ed2fec3ab491..3d29cc7a11bdf 100644 --- a/google/cloud/dialogflow_es/internal/environments_option_defaults.cc +++ b/google/cloud/dialogflow_es/internal/environments_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_es/internal/environments_option_defaults.h" #include "google/cloud/dialogflow_es/environments_connection.h" #include "google/cloud/dialogflow_es/environments_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -45,7 +45,7 @@ Options EnvironmentsDefaultOptions(std::string const& location, if (!options.has()) { options.set( dialogflow_es::EnvironmentsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_es/internal/environments_stub.cc b/google/cloud/dialogflow_es/internal/environments_stub.cc index c01f4d3e37be0..2e92ecf8d9e8a 100644 --- a/google/cloud/dialogflow_es/internal/environments_stub.cc +++ b/google/cloud/dialogflow_es/internal/environments_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/dialogflow/v2/environment.proto #include "google/cloud/dialogflow_es/internal/environments_stub.h" +#include "google/cloud/dialogflow/v2/environment.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -164,3 +167,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/environments_stub.h b/google/cloud/dialogflow_es/internal/environments_stub.h index 32bdc10b6c32f..79b11dba641e3 100644 --- a/google/cloud/dialogflow_es/internal/environments_stub.h +++ b/google/cloud/dialogflow_es/internal/environments_stub.h @@ -19,15 +19,18 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_ENVIRONMENTS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_ENVIRONMENTS_STUB_H +#include "google/cloud/dialogflow/v2/environment.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -170,4 +173,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_ENVIRONMENTS_STUB_H diff --git a/google/cloud/dialogflow_es/internal/environments_stub_factory.cc b/google/cloud/dialogflow_es/internal/environments_stub_factory.cc index 5697432bbd7b9..050a52fd0479c 100644 --- a/google/cloud/dialogflow_es/internal/environments_stub_factory.cc +++ b/google/cloud/dialogflow_es/internal/environments_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/v2/environment.proto #include "google/cloud/dialogflow_es/internal/environments_stub_factory.h" +#include "google/cloud/dialogflow/v2/environment.grpc.pb.h" #include "google/cloud/dialogflow_es/internal/environments_auth_decorator.h" #include "google/cloud/dialogflow_es/internal/environments_logging_decorator.h" #include "google/cloud/dialogflow_es/internal/environments_metadata_decorator.h" #include "google/cloud/dialogflow_es/internal/environments_stub.h" #include "google/cloud/dialogflow_es/internal/environments_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -76,3 +79,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/environments_stub_factory.h b/google/cloud/dialogflow_es/internal/environments_stub_factory.h index 8e2e618ab9bab..86733d21bf17e 100644 --- a/google/cloud/dialogflow_es/internal/environments_stub_factory.h +++ b/google/cloud/dialogflow_es/internal/environments_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_ENVIRONMENTS_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_es/internal/environments_tracing_connection.cc b/google/cloud/dialogflow_es/internal/environments_tracing_connection.cc index 6291b4e4d33fe..902eb255bc62b 100644 --- a/google/cloud/dialogflow_es/internal/environments_tracing_connection.cc +++ b/google/cloud/dialogflow_es/internal/environments_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - EnvironmentsTracingConnection::EnvironmentsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -140,16 +138,12 @@ Status EnvironmentsTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeEnvironmentsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_es/internal/environments_tracing_connection.h b/google/cloud/dialogflow_es/internal/environments_tracing_connection.h index 16477692b18b8..4cbe821654ea3 100644 --- a/google/cloud/dialogflow_es/internal/environments_tracing_connection.h +++ b/google/cloud/dialogflow_es/internal/environments_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class EnvironmentsTracingConnection : public dialogflow_es::EnvironmentsConnection { public: @@ -83,8 +81,6 @@ class EnvironmentsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_es/internal/environments_tracing_stub.cc b/google/cloud/dialogflow_es/internal/environments_tracing_stub.cc index 68f7fe39b4c2c..b33f62c1ce540 100644 --- a/google/cloud/dialogflow_es/internal/environments_tracing_stub.cc +++ b/google/cloud/dialogflow_es/internal/environments_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - EnvironmentsTracingStub::EnvironmentsTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -162,18 +163,14 @@ Status EnvironmentsTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeEnvironmentsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/environments_tracing_stub.h b/google/cloud/dialogflow_es/internal/environments_tracing_stub.h index 4a283c83d2c48..ce0086683cb72 100644 --- a/google/cloud/dialogflow_es/internal/environments_tracing_stub.h +++ b/google/cloud/dialogflow_es/internal/environments_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class EnvironmentsTracingStub : public EnvironmentsStub { public: ~EnvironmentsTracingStub() override = default; @@ -95,8 +96,6 @@ class EnvironmentsTracingStub : public EnvironmentsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -111,4 +110,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_ENVIRONMENTS_TRACING_STUB_H diff --git a/google/cloud/dialogflow_es/internal/fulfillments_auth_decorator.cc b/google/cloud/dialogflow_es/internal/fulfillments_auth_decorator.cc index 973acdea5c2f9..52f9207e60eb4 100644 --- a/google/cloud/dialogflow_es/internal/fulfillments_auth_decorator.cc +++ b/google/cloud/dialogflow_es/internal/fulfillments_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dialogflow/v2/fulfillment.proto #include "google/cloud/dialogflow_es/internal/fulfillments_auth_decorator.h" -#include +#include "google/cloud/dialogflow/v2/fulfillment.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -95,3 +98,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/fulfillments_auth_decorator.h b/google/cloud/dialogflow_es/internal/fulfillments_auth_decorator.h index 35bb253d26fe8..38cc3dc68c5d3 100644 --- a/google/cloud/dialogflow_es/internal/fulfillments_auth_decorator.h +++ b/google/cloud/dialogflow_es/internal/fulfillments_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -78,4 +81,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_FULFILLMENTS_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/fulfillments_logging_decorator.cc b/google/cloud/dialogflow_es/internal/fulfillments_logging_decorator.cc index 4b8568f60b4b2..e140de54f801f 100644 --- a/google/cloud/dialogflow_es/internal/fulfillments_logging_decorator.cc +++ b/google/cloud/dialogflow_es/internal/fulfillments_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dialogflow/v2/fulfillment.proto #include "google/cloud/dialogflow_es/internal/fulfillments_logging_decorator.h" +#include "google/cloud/dialogflow/v2/fulfillment.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -122,3 +125,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/fulfillments_logging_decorator.h b/google/cloud/dialogflow_es/internal/fulfillments_logging_decorator.h index e8c0e5948a5c1..69dc9cd68a43d 100644 --- a/google/cloud/dialogflow_es/internal/fulfillments_logging_decorator.h +++ b/google/cloud/dialogflow_es/internal/fulfillments_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -78,4 +81,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_FULFILLMENTS_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/fulfillments_metadata_decorator.cc b/google/cloud/dialogflow_es/internal/fulfillments_metadata_decorator.cc index 22e4a27f1de05..d9826bb59cf02 100644 --- a/google/cloud/dialogflow_es/internal/fulfillments_metadata_decorator.cc +++ b/google/cloud/dialogflow_es/internal/fulfillments_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/v2/fulfillment.proto #include "google/cloud/dialogflow_es/internal/fulfillments_metadata_decorator.h" +#include "google/cloud/dialogflow/v2/fulfillment.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -122,3 +126,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/fulfillments_metadata_decorator.h b/google/cloud/dialogflow_es/internal/fulfillments_metadata_decorator.h index 939310378cbf7..d2f68e7d89e46 100644 --- a/google/cloud/dialogflow_es/internal/fulfillments_metadata_decorator.h +++ b/google/cloud/dialogflow_es/internal/fulfillments_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -83,4 +86,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_FULFILLMENTS_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/fulfillments_option_defaults.cc b/google/cloud/dialogflow_es/internal/fulfillments_option_defaults.cc index 59e6b951f8422..8694d8ae85f3d 100644 --- a/google/cloud/dialogflow_es/internal/fulfillments_option_defaults.cc +++ b/google/cloud/dialogflow_es/internal/fulfillments_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_es/internal/fulfillments_option_defaults.h" #include "google/cloud/dialogflow_es/fulfillments_connection.h" #include "google/cloud/dialogflow_es/fulfillments_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -45,7 +45,7 @@ Options FulfillmentsDefaultOptions(std::string const& location, if (!options.has()) { options.set( dialogflow_es::FulfillmentsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_es/internal/fulfillments_stub.cc b/google/cloud/dialogflow_es/internal/fulfillments_stub.cc index 4f9ec79825ee9..03b071c5dde5c 100644 --- a/google/cloud/dialogflow_es/internal/fulfillments_stub.cc +++ b/google/cloud/dialogflow_es/internal/fulfillments_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/dialogflow/v2/fulfillment.proto #include "google/cloud/dialogflow_es/internal/fulfillments_stub.h" +#include "google/cloud/dialogflow/v2/fulfillment.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -116,3 +119,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/fulfillments_stub.h b/google/cloud/dialogflow_es/internal/fulfillments_stub.h index 98a3fd3619b0f..463ae7da1dfa7 100644 --- a/google/cloud/dialogflow_es/internal/fulfillments_stub.h +++ b/google/cloud/dialogflow_es/internal/fulfillments_stub.h @@ -19,15 +19,18 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_FULFILLMENTS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_FULFILLMENTS_STUB_H +#include "google/cloud/dialogflow/v2/fulfillment.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -127,4 +130,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_FULFILLMENTS_STUB_H diff --git a/google/cloud/dialogflow_es/internal/fulfillments_stub_factory.cc b/google/cloud/dialogflow_es/internal/fulfillments_stub_factory.cc index 28937e87773c8..bbf40264daad2 100644 --- a/google/cloud/dialogflow_es/internal/fulfillments_stub_factory.cc +++ b/google/cloud/dialogflow_es/internal/fulfillments_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/v2/fulfillment.proto #include "google/cloud/dialogflow_es/internal/fulfillments_stub_factory.h" +#include "google/cloud/dialogflow/v2/fulfillment.grpc.pb.h" #include "google/cloud/dialogflow_es/internal/fulfillments_auth_decorator.h" #include "google/cloud/dialogflow_es/internal/fulfillments_logging_decorator.h" #include "google/cloud/dialogflow_es/internal/fulfillments_metadata_decorator.h" #include "google/cloud/dialogflow_es/internal/fulfillments_stub.h" #include "google/cloud/dialogflow_es/internal/fulfillments_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -76,3 +79,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/fulfillments_stub_factory.h b/google/cloud/dialogflow_es/internal/fulfillments_stub_factory.h index ec42b7c7dab58..45b8773336f25 100644 --- a/google/cloud/dialogflow_es/internal/fulfillments_stub_factory.h +++ b/google/cloud/dialogflow_es/internal/fulfillments_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_FULFILLMENTS_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_es/internal/fulfillments_tracing_connection.cc b/google/cloud/dialogflow_es/internal/fulfillments_tracing_connection.cc index 3641d3ab3c3cd..43e2ae1bd0142 100644 --- a/google/cloud/dialogflow_es/internal/fulfillments_tracing_connection.cc +++ b/google/cloud/dialogflow_es/internal/fulfillments_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - FulfillmentsTracingConnection::FulfillmentsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -99,16 +97,12 @@ Status FulfillmentsTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeFulfillmentsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_es/internal/fulfillments_tracing_connection.h b/google/cloud/dialogflow_es/internal/fulfillments_tracing_connection.h index 5869d851822db..bde9f70678662 100644 --- a/google/cloud/dialogflow_es/internal/fulfillments_tracing_connection.h +++ b/google/cloud/dialogflow_es/internal/fulfillments_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class FulfillmentsTracingConnection : public dialogflow_es::FulfillmentsConnection { public: @@ -67,8 +65,6 @@ class FulfillmentsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_es/internal/fulfillments_tracing_stub.cc b/google/cloud/dialogflow_es/internal/fulfillments_tracing_stub.cc index c2e87d582c952..f02551c8c57c1 100644 --- a/google/cloud/dialogflow_es/internal/fulfillments_tracing_stub.cc +++ b/google/cloud/dialogflow_es/internal/fulfillments_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - FulfillmentsTracingStub::FulfillmentsTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -114,18 +115,14 @@ Status FulfillmentsTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeFulfillmentsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/fulfillments_tracing_stub.h b/google/cloud/dialogflow_es/internal/fulfillments_tracing_stub.h index ba698cd5887f4..04133531ec91d 100644 --- a/google/cloud/dialogflow_es/internal/fulfillments_tracing_stub.h +++ b/google/cloud/dialogflow_es/internal/fulfillments_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class FulfillmentsTracingStub : public FulfillmentsStub { public: ~FulfillmentsTracingStub() override = default; @@ -74,8 +75,6 @@ class FulfillmentsTracingStub : public FulfillmentsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -90,4 +89,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_FULFILLMENTS_TRACING_STUB_H diff --git a/google/cloud/dialogflow_es/internal/generators_auth_decorator.cc b/google/cloud/dialogflow_es/internal/generators_auth_decorator.cc index edf2a0a966732..43d70e7c595fd 100644 --- a/google/cloud/dialogflow_es/internal/generators_auth_decorator.cc +++ b/google/cloud/dialogflow_es/internal/generators_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dialogflow/v2/generator.proto #include "google/cloud/dialogflow_es/internal/generators_auth_decorator.h" -#include +#include "google/cloud/dialogflow/v2/generator.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -120,3 +123,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/generators_auth_decorator.h b/google/cloud/dialogflow_es/internal/generators_auth_decorator.h index aa4656a76b83a..d22404311f58f 100644 --- a/google/cloud/dialogflow_es/internal/generators_auth_decorator.h +++ b/google/cloud/dialogflow_es/internal/generators_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -93,4 +96,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_GENERATORS_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/generators_logging_decorator.cc b/google/cloud/dialogflow_es/internal/generators_logging_decorator.cc index 10427994b6c97..0a80c104dfc41 100644 --- a/google/cloud/dialogflow_es/internal/generators_logging_decorator.cc +++ b/google/cloud/dialogflow_es/internal/generators_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dialogflow/v2/generator.proto #include "google/cloud/dialogflow_es/internal/generators_logging_decorator.h" +#include "google/cloud/dialogflow/v2/generator.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -160,3 +163,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/generators_logging_decorator.h b/google/cloud/dialogflow_es/internal/generators_logging_decorator.h index 6bf19efb9066b..84d6342772645 100644 --- a/google/cloud/dialogflow_es/internal/generators_logging_decorator.h +++ b/google/cloud/dialogflow_es/internal/generators_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -93,4 +96,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_GENERATORS_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/generators_metadata_decorator.cc b/google/cloud/dialogflow_es/internal/generators_metadata_decorator.cc index 2effbf1cc48bb..dea5d8b81dbf3 100644 --- a/google/cloud/dialogflow_es/internal/generators_metadata_decorator.cc +++ b/google/cloud/dialogflow_es/internal/generators_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/v2/generator.proto #include "google/cloud/dialogflow_es/internal/generators_metadata_decorator.h" +#include "google/cloud/dialogflow/v2/generator.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -148,3 +152,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/generators_metadata_decorator.h b/google/cloud/dialogflow_es/internal/generators_metadata_decorator.h index 03f34796b2b12..15b7962003151 100644 --- a/google/cloud/dialogflow_es/internal/generators_metadata_decorator.h +++ b/google/cloud/dialogflow_es/internal/generators_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -98,4 +101,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_GENERATORS_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/generators_option_defaults.cc b/google/cloud/dialogflow_es/internal/generators_option_defaults.cc index 0ea700de25d2f..f63b70e0cbd07 100644 --- a/google/cloud/dialogflow_es/internal/generators_option_defaults.cc +++ b/google/cloud/dialogflow_es/internal/generators_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_es/internal/generators_option_defaults.h" #include "google/cloud/dialogflow_es/generators_connection.h" #include "google/cloud/dialogflow_es/generators_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -44,7 +44,7 @@ Options GeneratorsDefaultOptions(std::string const& location, Options options) { if (!options.has()) { options.set( dialogflow_es::GeneratorsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_es/internal/generators_stub.cc b/google/cloud/dialogflow_es/internal/generators_stub.cc index 33a55cbc7baa1..298127fcd3062 100644 --- a/google/cloud/dialogflow_es/internal/generators_stub.cc +++ b/google/cloud/dialogflow_es/internal/generators_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/dialogflow/v2/generator.proto #include "google/cloud/dialogflow_es/internal/generators_stub.h" +#include "google/cloud/dialogflow/v2/generator.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -150,3 +153,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/generators_stub.h b/google/cloud/dialogflow_es/internal/generators_stub.h index 0516f218b58cb..a831b42b197dc 100644 --- a/google/cloud/dialogflow_es/internal/generators_stub.h +++ b/google/cloud/dialogflow_es/internal/generators_stub.h @@ -19,15 +19,18 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_GENERATORS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_GENERATORS_STUB_H +#include "google/cloud/dialogflow/v2/generator.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -152,4 +155,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_GENERATORS_STUB_H diff --git a/google/cloud/dialogflow_es/internal/generators_stub_factory.cc b/google/cloud/dialogflow_es/internal/generators_stub_factory.cc index 6331fa105a118..a8866e52595af 100644 --- a/google/cloud/dialogflow_es/internal/generators_stub_factory.cc +++ b/google/cloud/dialogflow_es/internal/generators_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/v2/generator.proto #include "google/cloud/dialogflow_es/internal/generators_stub_factory.h" +#include "google/cloud/dialogflow/v2/generator.grpc.pb.h" #include "google/cloud/dialogflow_es/internal/generators_auth_decorator.h" #include "google/cloud/dialogflow_es/internal/generators_logging_decorator.h" #include "google/cloud/dialogflow_es/internal/generators_metadata_decorator.h" #include "google/cloud/dialogflow_es/internal/generators_stub.h" #include "google/cloud/dialogflow_es/internal/generators_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -76,3 +79,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/generators_stub_factory.h b/google/cloud/dialogflow_es/internal/generators_stub_factory.h index f5c8d33125a62..4d16b9b0e7b43 100644 --- a/google/cloud/dialogflow_es/internal/generators_stub_factory.h +++ b/google/cloud/dialogflow_es/internal/generators_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_GENERATORS_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_es/internal/generators_tracing_connection.cc b/google/cloud/dialogflow_es/internal/generators_tracing_connection.cc index cd0fb508222f9..6592612070cc6 100644 --- a/google/cloud/dialogflow_es/internal/generators_tracing_connection.cc +++ b/google/cloud/dialogflow_es/internal/generators_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GeneratorsTracingConnection::GeneratorsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -127,16 +125,12 @@ Status GeneratorsTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeGeneratorsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_es/internal/generators_tracing_connection.h b/google/cloud/dialogflow_es/internal/generators_tracing_connection.h index 8a35e70b932ec..3dff2f30ae0b1 100644 --- a/google/cloud/dialogflow_es/internal/generators_tracing_connection.h +++ b/google/cloud/dialogflow_es/internal/generators_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class GeneratorsTracingConnection : public dialogflow_es::GeneratorsConnection { public: ~GeneratorsTracingConnection() override = default; @@ -77,8 +75,6 @@ class GeneratorsTracingConnection : public dialogflow_es::GeneratorsConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_es/internal/generators_tracing_stub.cc b/google/cloud/dialogflow_es/internal/generators_tracing_stub.cc index 400f5ebe0f4cc..9aadba2c1e3fa 100644 --- a/google/cloud/dialogflow_es/internal/generators_tracing_stub.cc +++ b/google/cloud/dialogflow_es/internal/generators_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GeneratorsTracingStub::GeneratorsTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -148,18 +149,14 @@ Status GeneratorsTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeGeneratorsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/generators_tracing_stub.h b/google/cloud/dialogflow_es/internal/generators_tracing_stub.h index 053912a1c3aad..3c2600d199210 100644 --- a/google/cloud/dialogflow_es/internal/generators_tracing_stub.h +++ b/google/cloud/dialogflow_es/internal/generators_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class GeneratorsTracingStub : public GeneratorsStub { public: ~GeneratorsTracingStub() override = default; @@ -89,8 +90,6 @@ class GeneratorsTracingStub : public GeneratorsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -105,4 +104,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_GENERATORS_TRACING_STUB_H diff --git a/google/cloud/dialogflow_es/internal/intents_auth_decorator.cc b/google/cloud/dialogflow_es/internal/intents_auth_decorator.cc index 0af9d2c103958..73df792c0ad71 100644 --- a/google/cloud/dialogflow_es/internal/intents_auth_decorator.cc +++ b/google/cloud/dialogflow_es/internal/intents_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dialogflow/v2/intent.proto #include "google/cloud/dialogflow_es/internal/intents_auth_decorator.h" -#include +#include "google/cloud/dialogflow/v2/intent.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -209,3 +212,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/intents_auth_decorator.h b/google/cloud/dialogflow_es/internal/intents_auth_decorator.h index d2442a656e49f..4f2111be67584 100644 --- a/google/cloud/dialogflow_es/internal/intents_auth_decorator.h +++ b/google/cloud/dialogflow_es/internal/intents_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_es/internal/intents_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -128,4 +131,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_INTENTS_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/intents_connection_impl.h b/google/cloud/dialogflow_es/internal/intents_connection_impl.h index c1e9033b3d0c2..a70b7454ae157 100644 --- a/google/cloud/dialogflow_es/internal/intents_connection_impl.h +++ b/google/cloud/dialogflow_es/internal/intents_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_es/internal/intents_logging_decorator.cc b/google/cloud/dialogflow_es/internal/intents_logging_decorator.cc index cfa978149ba31..786c242e423b2 100644 --- a/google/cloud/dialogflow_es/internal/intents_logging_decorator.cc +++ b/google/cloud/dialogflow_es/internal/intents_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dialogflow/v2/intent.proto #include "google/cloud/dialogflow_es/internal/intents_logging_decorator.h" +#include "google/cloud/dialogflow/v2/intent.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -252,3 +255,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/intents_logging_decorator.h b/google/cloud/dialogflow_es/internal/intents_logging_decorator.h index b84600c33876d..ac1cabc598df9 100644 --- a/google/cloud/dialogflow_es/internal/intents_logging_decorator.h +++ b/google/cloud/dialogflow_es/internal/intents_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_es/internal/intents_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -128,4 +131,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_INTENTS_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/intents_metadata_decorator.cc b/google/cloud/dialogflow_es/internal/intents_metadata_decorator.cc index a632500b1ef25..1e881c83ec53d 100644 --- a/google/cloud/dialogflow_es/internal/intents_metadata_decorator.cc +++ b/google/cloud/dialogflow_es/internal/intents_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/v2/intent.proto #include "google/cloud/dialogflow_es/internal/intents_metadata_decorator.h" +#include "google/cloud/dialogflow/v2/intent.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -208,3 +212,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/intents_metadata_decorator.h b/google/cloud/dialogflow_es/internal/intents_metadata_decorator.h index a0b83da70e180..4057aad9b50cc 100644 --- a/google/cloud/dialogflow_es/internal/intents_metadata_decorator.h +++ b/google/cloud/dialogflow_es/internal/intents_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/dialogflow_es/internal/intents_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -133,4 +136,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_INTENTS_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/intents_option_defaults.cc b/google/cloud/dialogflow_es/internal/intents_option_defaults.cc index afe667b1c7213..ab79fd2d19819 100644 --- a/google/cloud/dialogflow_es/internal/intents_option_defaults.cc +++ b/google/cloud/dialogflow_es/internal/intents_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_es/internal/intents_option_defaults.h" #include "google/cloud/dialogflow_es/intents_connection.h" #include "google/cloud/dialogflow_es/intents_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -43,7 +43,7 @@ Options IntentsDefaultOptions(std::string const& location, Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - dialogflow_es::IntentsLimitedTimeRetryPolicy(std::chrono::minutes(30)) + dialogflow_es::IntentsLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_es/internal/intents_stub.cc b/google/cloud/dialogflow_es/internal/intents_stub.cc index eecf78a0e437d..8f312832b37d6 100644 --- a/google/cloud/dialogflow_es/internal/intents_stub.cc +++ b/google/cloud/dialogflow_es/internal/intents_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/dialogflow/v2/intent.proto #include "google/cloud/dialogflow_es/internal/intents_stub.h" +#include "google/cloud/dialogflow/v2/intent.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -249,3 +252,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/intents_stub.h b/google/cloud/dialogflow_es/internal/intents_stub.h index 60f357412e85e..d8735be3705ac 100644 --- a/google/cloud/dialogflow_es/internal/intents_stub.h +++ b/google/cloud/dialogflow_es/internal/intents_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_INTENTS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_INTENTS_STUB_H +#include "google/cloud/dialogflow/v2/intent.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/protobuf/struct.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -227,4 +230,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_INTENTS_STUB_H diff --git a/google/cloud/dialogflow_es/internal/intents_stub_factory.cc b/google/cloud/dialogflow_es/internal/intents_stub_factory.cc index 83fea3c9d75b7..342f680c2e9ad 100644 --- a/google/cloud/dialogflow_es/internal/intents_stub_factory.cc +++ b/google/cloud/dialogflow_es/internal/intents_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/v2/intent.proto #include "google/cloud/dialogflow_es/internal/intents_stub_factory.h" +#include "google/cloud/dialogflow/v2/intent.grpc.pb.h" #include "google/cloud/dialogflow_es/internal/intents_auth_decorator.h" #include "google/cloud/dialogflow_es/internal/intents_logging_decorator.h" #include "google/cloud/dialogflow_es/internal/intents_metadata_decorator.h" #include "google/cloud/dialogflow_es/internal/intents_stub.h" #include "google/cloud/dialogflow_es/internal/intents_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/intents_stub_factory.h b/google/cloud/dialogflow_es/internal/intents_stub_factory.h index 3dddb1b118967..475ba93ab553a 100644 --- a/google/cloud/dialogflow_es/internal/intents_stub_factory.h +++ b/google/cloud/dialogflow_es/internal/intents_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_INTENTS_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_es/internal/intents_tracing_connection.cc b/google/cloud/dialogflow_es/internal/intents_tracing_connection.cc index 64549db776ed6..f236591267e51 100644 --- a/google/cloud/dialogflow_es/internal/intents_tracing_connection.cc +++ b/google/cloud/dialogflow_es/internal/intents_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - IntentsTracingConnection::IntentsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -187,15 +185,11 @@ Status IntentsTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeIntentsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_es/internal/intents_tracing_connection.h b/google/cloud/dialogflow_es/internal/intents_tracing_connection.h index 105ad30b9531f..7203b4f368dfd 100644 --- a/google/cloud/dialogflow_es/internal/intents_tracing_connection.h +++ b/google/cloud/dialogflow_es/internal/intents_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class IntentsTracingConnection : public dialogflow_es::IntentsConnection { public: ~IntentsTracingConnection() override = default; @@ -100,8 +98,6 @@ class IntentsTracingConnection : public dialogflow_es::IntentsConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_es/internal/intents_tracing_stub.cc b/google/cloud/dialogflow_es/internal/intents_tracing_stub.cc index 4fb9e6900e691..01485d64c6daa 100644 --- a/google/cloud/dialogflow_es/internal/intents_tracing_stub.cc +++ b/google/cloud/dialogflow_es/internal/intents_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - IntentsTracingStub::IntentsTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -226,18 +227,14 @@ future IntentsTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeIntentsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/intents_tracing_stub.h b/google/cloud/dialogflow_es/internal/intents_tracing_stub.h index 9bcca67edc1d8..990e99e2bf305 100644 --- a/google/cloud/dialogflow_es/internal/intents_tracing_stub.h +++ b/google/cloud/dialogflow_es/internal/intents_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class IntentsTracingStub : public IntentsStub { public: ~IntentsTracingStub() override = default; @@ -123,8 +124,6 @@ class IntentsTracingStub : public IntentsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -139,4 +138,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_INTENTS_TRACING_STUB_H diff --git a/google/cloud/dialogflow_es/internal/knowledge_bases_auth_decorator.cc b/google/cloud/dialogflow_es/internal/knowledge_bases_auth_decorator.cc index 0ed5f8fd9bd15..47f70bc1dbf76 100644 --- a/google/cloud/dialogflow_es/internal/knowledge_bases_auth_decorator.cc +++ b/google/cloud/dialogflow_es/internal/knowledge_bases_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dialogflow/v2/knowledge_base.proto #include "google/cloud/dialogflow_es/internal/knowledge_bases_auth_decorator.h" -#include +#include "google/cloud/dialogflow/v2/knowledge_base.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -121,3 +124,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/knowledge_bases_auth_decorator.h b/google/cloud/dialogflow_es/internal/knowledge_bases_auth_decorator.h index 888e50a318238..7427971ec45f4 100644 --- a/google/cloud/dialogflow_es/internal/knowledge_bases_auth_decorator.h +++ b/google/cloud/dialogflow_es/internal/knowledge_bases_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -94,4 +97,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_KNOWLEDGE_BASES_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/knowledge_bases_logging_decorator.cc b/google/cloud/dialogflow_es/internal/knowledge_bases_logging_decorator.cc index 5132d91036f2d..8ea7e6b53ae2c 100644 --- a/google/cloud/dialogflow_es/internal/knowledge_bases_logging_decorator.cc +++ b/google/cloud/dialogflow_es/internal/knowledge_bases_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dialogflow/v2/knowledge_base.proto #include "google/cloud/dialogflow_es/internal/knowledge_bases_logging_decorator.h" +#include "google/cloud/dialogflow/v2/knowledge_base.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -160,3 +163,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/knowledge_bases_logging_decorator.h b/google/cloud/dialogflow_es/internal/knowledge_bases_logging_decorator.h index f1f961adfac80..769d6156738ef 100644 --- a/google/cloud/dialogflow_es/internal/knowledge_bases_logging_decorator.h +++ b/google/cloud/dialogflow_es/internal/knowledge_bases_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -94,4 +97,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_KNOWLEDGE_BASES_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/knowledge_bases_metadata_decorator.cc b/google/cloud/dialogflow_es/internal/knowledge_bases_metadata_decorator.cc index eba56e2ac0f9e..8fd8dd28297b8 100644 --- a/google/cloud/dialogflow_es/internal/knowledge_bases_metadata_decorator.cc +++ b/google/cloud/dialogflow_es/internal/knowledge_bases_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/v2/knowledge_base.proto #include "google/cloud/dialogflow_es/internal/knowledge_bases_metadata_decorator.h" +#include "google/cloud/dialogflow/v2/knowledge_base.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -149,3 +153,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/knowledge_bases_metadata_decorator.h b/google/cloud/dialogflow_es/internal/knowledge_bases_metadata_decorator.h index c53fa6dee7c8a..ddb1be9be9e99 100644 --- a/google/cloud/dialogflow_es/internal/knowledge_bases_metadata_decorator.h +++ b/google/cloud/dialogflow_es/internal/knowledge_bases_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -99,4 +102,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_KNOWLEDGE_BASES_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/knowledge_bases_option_defaults.cc b/google/cloud/dialogflow_es/internal/knowledge_bases_option_defaults.cc index 5d230f4e6a4e8..2d5b90c9a628c 100644 --- a/google/cloud/dialogflow_es/internal/knowledge_bases_option_defaults.cc +++ b/google/cloud/dialogflow_es/internal/knowledge_bases_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_es/internal/knowledge_bases_option_defaults.h" #include "google/cloud/dialogflow_es/knowledge_bases_connection.h" #include "google/cloud/dialogflow_es/knowledge_bases_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -45,7 +45,7 @@ Options KnowledgeBasesDefaultOptions(std::string const& location, if (!options.has()) { options.set( dialogflow_es::KnowledgeBasesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_es/internal/knowledge_bases_stub.cc b/google/cloud/dialogflow_es/internal/knowledge_bases_stub.cc index 214805c605279..bfd7c92246c9d 100644 --- a/google/cloud/dialogflow_es/internal/knowledge_bases_stub.cc +++ b/google/cloud/dialogflow_es/internal/knowledge_bases_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/dialogflow/v2/knowledge_base.proto #include "google/cloud/dialogflow_es/internal/knowledge_bases_stub.h" +#include "google/cloud/dialogflow/v2/knowledge_base.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -152,3 +155,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/knowledge_bases_stub.h b/google/cloud/dialogflow_es/internal/knowledge_bases_stub.h index 4581fd452a0f2..010d7009637be 100644 --- a/google/cloud/dialogflow_es/internal/knowledge_bases_stub.h +++ b/google/cloud/dialogflow_es/internal/knowledge_bases_stub.h @@ -19,15 +19,18 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_KNOWLEDGE_BASES_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_KNOWLEDGE_BASES_STUB_H +#include "google/cloud/dialogflow/v2/knowledge_base.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -161,4 +164,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_KNOWLEDGE_BASES_STUB_H diff --git a/google/cloud/dialogflow_es/internal/knowledge_bases_stub_factory.cc b/google/cloud/dialogflow_es/internal/knowledge_bases_stub_factory.cc index f3343f081f766..cb115b1670603 100644 --- a/google/cloud/dialogflow_es/internal/knowledge_bases_stub_factory.cc +++ b/google/cloud/dialogflow_es/internal/knowledge_bases_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/v2/knowledge_base.proto #include "google/cloud/dialogflow_es/internal/knowledge_bases_stub_factory.h" +#include "google/cloud/dialogflow/v2/knowledge_base.grpc.pb.h" #include "google/cloud/dialogflow_es/internal/knowledge_bases_auth_decorator.h" #include "google/cloud/dialogflow_es/internal/knowledge_bases_logging_decorator.h" #include "google/cloud/dialogflow_es/internal/knowledge_bases_metadata_decorator.h" #include "google/cloud/dialogflow_es/internal/knowledge_bases_stub.h" #include "google/cloud/dialogflow_es/internal/knowledge_bases_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -77,3 +80,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/knowledge_bases_stub_factory.h b/google/cloud/dialogflow_es/internal/knowledge_bases_stub_factory.h index 01414adc4ed1c..434d9071d5dc1 100644 --- a/google/cloud/dialogflow_es/internal/knowledge_bases_stub_factory.h +++ b/google/cloud/dialogflow_es/internal/knowledge_bases_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_KNOWLEDGE_BASES_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_es/internal/knowledge_bases_tracing_connection.cc b/google/cloud/dialogflow_es/internal/knowledge_bases_tracing_connection.cc index e54a3e978e39a..5498b616dfa9a 100644 --- a/google/cloud/dialogflow_es/internal/knowledge_bases_tracing_connection.cc +++ b/google/cloud/dialogflow_es/internal/knowledge_bases_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - KnowledgeBasesTracingConnection::KnowledgeBasesTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -128,16 +126,12 @@ Status KnowledgeBasesTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeKnowledgeBasesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_es/internal/knowledge_bases_tracing_connection.h b/google/cloud/dialogflow_es/internal/knowledge_bases_tracing_connection.h index 31fdc8108611b..594283daed039 100644 --- a/google/cloud/dialogflow_es/internal/knowledge_bases_tracing_connection.h +++ b/google/cloud/dialogflow_es/internal/knowledge_bases_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class KnowledgeBasesTracingConnection : public dialogflow_es::KnowledgeBasesConnection { public: @@ -79,8 +77,6 @@ class KnowledgeBasesTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_es/internal/knowledge_bases_tracing_stub.cc b/google/cloud/dialogflow_es/internal/knowledge_bases_tracing_stub.cc index bb2ff686c9f1c..a295a0aa02623 100644 --- a/google/cloud/dialogflow_es/internal/knowledge_bases_tracing_stub.cc +++ b/google/cloud/dialogflow_es/internal/knowledge_bases_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - KnowledgeBasesTracingStub::KnowledgeBasesTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -150,18 +151,14 @@ Status KnowledgeBasesTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeKnowledgeBasesTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/knowledge_bases_tracing_stub.h b/google/cloud/dialogflow_es/internal/knowledge_bases_tracing_stub.h index be8598e83ca3a..c19d5b181dcc7 100644 --- a/google/cloud/dialogflow_es/internal/knowledge_bases_tracing_stub.h +++ b/google/cloud/dialogflow_es/internal/knowledge_bases_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class KnowledgeBasesTracingStub : public KnowledgeBasesStub { public: ~KnowledgeBasesTracingStub() override = default; @@ -90,8 +91,6 @@ class KnowledgeBasesTracingStub : public KnowledgeBasesStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -106,4 +105,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_KNOWLEDGE_BASES_TRACING_STUB_H diff --git a/google/cloud/dialogflow_es/internal/participants_auth_decorator.cc b/google/cloud/dialogflow_es/internal/participants_auth_decorator.cc index ae14125c9717f..64cc018c51248 100644 --- a/google/cloud/dialogflow_es/internal/participants_auth_decorator.cc +++ b/google/cloud/dialogflow_es/internal/participants_auth_decorator.cc @@ -17,11 +17,14 @@ // source: google/cloud/dialogflow/v2/participant.proto #include "google/cloud/dialogflow_es/internal/participants_auth_decorator.h" +#include "google/cloud/dialogflow/v2/participant.grpc.pb.h" #include "google/cloud/internal/async_read_write_stream_auth.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -179,3 +182,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/participants_auth_decorator.h b/google/cloud/dialogflow_es/internal/participants_auth_decorator.h index 2db3ed9ce02e7..d22d4971ae248 100644 --- a/google/cloud/dialogflow_es/internal/participants_auth_decorator.h +++ b/google/cloud/dialogflow_es/internal/participants_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -124,4 +127,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_PARTICIPANTS_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/participants_logging_decorator.cc b/google/cloud/dialogflow_es/internal/participants_logging_decorator.cc index e9a4ff83fb719..b3b5571b83747 100644 --- a/google/cloud/dialogflow_es/internal/participants_logging_decorator.cc +++ b/google/cloud/dialogflow_es/internal/participants_logging_decorator.cc @@ -17,15 +17,18 @@ // source: google/cloud/dialogflow/v2/participant.proto #include "google/cloud/dialogflow_es/internal/participants_logging_decorator.h" +#include "google/cloud/dialogflow/v2/participant.grpc.pb.h" #include "google/cloud/internal/async_read_write_stream_logging.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -240,3 +243,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/participants_logging_decorator.h b/google/cloud/dialogflow_es/internal/participants_logging_decorator.h index e5e2038fa35b0..e17ffa32b173c 100644 --- a/google/cloud/dialogflow_es/internal/participants_logging_decorator.h +++ b/google/cloud/dialogflow_es/internal/participants_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -125,4 +128,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_PARTICIPANTS_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/participants_metadata_decorator.cc b/google/cloud/dialogflow_es/internal/participants_metadata_decorator.cc index 3c85881422804..58df15d869f2c 100644 --- a/google/cloud/dialogflow_es/internal/participants_metadata_decorator.cc +++ b/google/cloud/dialogflow_es/internal/participants_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/v2/participant.proto #include "google/cloud/dialogflow_es/internal/participants_metadata_decorator.h" +#include "google/cloud/dialogflow/v2/participant.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -199,3 +203,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/participants_metadata_decorator.h b/google/cloud/dialogflow_es/internal/participants_metadata_decorator.h index 6550b502f86d5..dbb9976eca1cd 100644 --- a/google/cloud/dialogflow_es/internal/participants_metadata_decorator.h +++ b/google/cloud/dialogflow_es/internal/participants_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -129,4 +132,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_PARTICIPANTS_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/participants_option_defaults.cc b/google/cloud/dialogflow_es/internal/participants_option_defaults.cc index e05b9b3b3db5e..e4e7c77c85cfd 100644 --- a/google/cloud/dialogflow_es/internal/participants_option_defaults.cc +++ b/google/cloud/dialogflow_es/internal/participants_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_es/internal/participants_option_defaults.h" #include "google/cloud/dialogflow_es/participants_connection.h" #include "google/cloud/dialogflow_es/participants_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -45,7 +45,7 @@ Options ParticipantsDefaultOptions(std::string const& location, if (!options.has()) { options.set( dialogflow_es::ParticipantsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_es/internal/participants_stub.cc b/google/cloud/dialogflow_es/internal/participants_stub.cc index 3ee8c6fda21a1..f023b610a9353 100644 --- a/google/cloud/dialogflow_es/internal/participants_stub.cc +++ b/google/cloud/dialogflow_es/internal/participants_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/dialogflow/v2/participant.proto #include "google/cloud/dialogflow_es/internal/participants_stub.h" +#include "google/cloud/dialogflow/v2/participant.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/internal/async_read_write_stream_impl.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -219,3 +222,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/participants_stub.h b/google/cloud/dialogflow_es/internal/participants_stub.h index a3efb4ea23804..b5494af2ac689 100644 --- a/google/cloud/dialogflow_es/internal/participants_stub.h +++ b/google/cloud/dialogflow_es/internal/participants_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_PARTICIPANTS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_PARTICIPANTS_STUB_H +#include "google/cloud/dialogflow/v2/participant.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/async_streaming_read_write_rpc.h" #include "google/cloud/completion_queue.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -223,4 +226,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_PARTICIPANTS_STUB_H diff --git a/google/cloud/dialogflow_es/internal/participants_stub_factory.cc b/google/cloud/dialogflow_es/internal/participants_stub_factory.cc index 8e11801eee331..a427947d27012 100644 --- a/google/cloud/dialogflow_es/internal/participants_stub_factory.cc +++ b/google/cloud/dialogflow_es/internal/participants_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/v2/participant.proto #include "google/cloud/dialogflow_es/internal/participants_stub_factory.h" +#include "google/cloud/dialogflow/v2/participant.grpc.pb.h" #include "google/cloud/dialogflow_es/internal/participants_auth_decorator.h" #include "google/cloud/dialogflow_es/internal/participants_logging_decorator.h" #include "google/cloud/dialogflow_es/internal/participants_metadata_decorator.h" #include "google/cloud/dialogflow_es/internal/participants_stub.h" #include "google/cloud/dialogflow_es/internal/participants_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -76,3 +79,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/participants_stub_factory.h b/google/cloud/dialogflow_es/internal/participants_stub_factory.h index 2716045979a73..f47f3f0bde54e 100644 --- a/google/cloud/dialogflow_es/internal/participants_stub_factory.h +++ b/google/cloud/dialogflow_es/internal/participants_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_PARTICIPANTS_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_es/internal/participants_tracing_connection.cc b/google/cloud/dialogflow_es/internal/participants_tracing_connection.cc index 728220911761d..df70bafe9c2b7 100644 --- a/google/cloud/dialogflow_es/internal/participants_tracing_connection.cc +++ b/google/cloud/dialogflow_es/internal/participants_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ParticipantsTracingConnection::ParticipantsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -173,16 +171,12 @@ Status ParticipantsTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeParticipantsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_es/internal/participants_tracing_connection.h b/google/cloud/dialogflow_es/internal/participants_tracing_connection.h index 236ee7f7bb93f..a914ea6aaa76b 100644 --- a/google/cloud/dialogflow_es/internal/participants_tracing_connection.h +++ b/google/cloud/dialogflow_es/internal/participants_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ParticipantsTracingConnection : public dialogflow_es::ParticipantsConnection { public: @@ -102,8 +100,6 @@ class ParticipantsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_es/internal/participants_tracing_stub.cc b/google/cloud/dialogflow_es/internal/participants_tracing_stub.cc index 1f6ff0d466454..aae7e43897a5e 100644 --- a/google/cloud/dialogflow_es/internal/participants_tracing_stub.cc +++ b/google/cloud/dialogflow_es/internal/participants_tracing_stub.cc @@ -22,13 +22,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ParticipantsTracingStub::ParticipantsTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -219,18 +220,14 @@ Status ParticipantsTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeParticipantsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/participants_tracing_stub.h b/google/cloud/dialogflow_es/internal/participants_tracing_stub.h index 234cc47f9b3d1..9372f1db6c157 100644 --- a/google/cloud/dialogflow_es/internal/participants_tracing_stub.h +++ b/google/cloud/dialogflow_es/internal/participants_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ParticipantsTracingStub : public ParticipantsStub { public: ~ParticipantsTracingStub() override = default; @@ -120,8 +121,6 @@ class ParticipantsTracingStub : public ParticipantsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -136,4 +135,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_PARTICIPANTS_TRACING_STUB_H diff --git a/google/cloud/dialogflow_es/internal/session_entity_types_auth_decorator.cc b/google/cloud/dialogflow_es/internal/session_entity_types_auth_decorator.cc index 4f88141007125..15205ee6d5a87 100644 --- a/google/cloud/dialogflow_es/internal/session_entity_types_auth_decorator.cc +++ b/google/cloud/dialogflow_es/internal/session_entity_types_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dialogflow/v2/session_entity_type.proto #include "google/cloud/dialogflow_es/internal/session_entity_types_auth_decorator.h" -#include +#include "google/cloud/dialogflow/v2/session_entity_type.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -125,3 +128,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/session_entity_types_auth_decorator.h b/google/cloud/dialogflow_es/internal/session_entity_types_auth_decorator.h index fbfeb8640c151..4794b65532348 100644 --- a/google/cloud/dialogflow_es/internal/session_entity_types_auth_decorator.h +++ b/google/cloud/dialogflow_es/internal/session_entity_types_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -97,4 +100,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_SESSION_ENTITY_TYPES_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/session_entity_types_logging_decorator.cc b/google/cloud/dialogflow_es/internal/session_entity_types_logging_decorator.cc index 505061365240b..7b8293de7806c 100644 --- a/google/cloud/dialogflow_es/internal/session_entity_types_logging_decorator.cc +++ b/google/cloud/dialogflow_es/internal/session_entity_types_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dialogflow/v2/session_entity_type.proto #include "google/cloud/dialogflow_es/internal/session_entity_types_logging_decorator.h" +#include "google/cloud/dialogflow/v2/session_entity_type.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -169,3 +172,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/session_entity_types_logging_decorator.h b/google/cloud/dialogflow_es/internal/session_entity_types_logging_decorator.h index c1c7871ea6d23..158a956bdb60a 100644 --- a/google/cloud/dialogflow_es/internal/session_entity_types_logging_decorator.h +++ b/google/cloud/dialogflow_es/internal/session_entity_types_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -97,4 +100,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_SESSION_ENTITY_TYPES_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/session_entity_types_metadata_decorator.cc b/google/cloud/dialogflow_es/internal/session_entity_types_metadata_decorator.cc index f01fa8c8d131c..5350687709106 100644 --- a/google/cloud/dialogflow_es/internal/session_entity_types_metadata_decorator.cc +++ b/google/cloud/dialogflow_es/internal/session_entity_types_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/v2/session_entity_type.proto #include "google/cloud/dialogflow_es/internal/session_entity_types_metadata_decorator.h" +#include "google/cloud/dialogflow/v2/session_entity_type.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -155,3 +159,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/session_entity_types_metadata_decorator.h b/google/cloud/dialogflow_es/internal/session_entity_types_metadata_decorator.h index 654b451209b53..e22d7fe616087 100644 --- a/google/cloud/dialogflow_es/internal/session_entity_types_metadata_decorator.h +++ b/google/cloud/dialogflow_es/internal/session_entity_types_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -103,4 +106,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_SESSION_ENTITY_TYPES_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/session_entity_types_option_defaults.cc b/google/cloud/dialogflow_es/internal/session_entity_types_option_defaults.cc index ff10adb60e330..d11e01c2dc7ef 100644 --- a/google/cloud/dialogflow_es/internal/session_entity_types_option_defaults.cc +++ b/google/cloud/dialogflow_es/internal/session_entity_types_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_es/internal/session_entity_types_option_defaults.h" #include "google/cloud/dialogflow_es/session_entity_types_connection.h" #include "google/cloud/dialogflow_es/session_entity_types_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -45,7 +45,7 @@ Options SessionEntityTypesDefaultOptions(std::string const& location, if (!options.has()) { options.set( dialogflow_es::SessionEntityTypesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_es/internal/session_entity_types_stub.cc b/google/cloud/dialogflow_es/internal/session_entity_types_stub.cc index cbab06dba02e0..37cdbde327e5a 100644 --- a/google/cloud/dialogflow_es/internal/session_entity_types_stub.cc +++ b/google/cloud/dialogflow_es/internal/session_entity_types_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/dialogflow/v2/session_entity_type.proto #include "google/cloud/dialogflow_es/internal/session_entity_types_stub.h" +#include "google/cloud/dialogflow/v2/session_entity_type.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -160,3 +163,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/session_entity_types_stub.h b/google/cloud/dialogflow_es/internal/session_entity_types_stub.h index 7c73d34c1186d..7fb000452d63b 100644 --- a/google/cloud/dialogflow_es/internal/session_entity_types_stub.h +++ b/google/cloud/dialogflow_es/internal/session_entity_types_stub.h @@ -19,15 +19,18 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_SESSION_ENTITY_TYPES_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_SESSION_ENTITY_TYPES_STUB_H +#include "google/cloud/dialogflow/v2/session_entity_type.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -167,4 +170,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_SESSION_ENTITY_TYPES_STUB_H diff --git a/google/cloud/dialogflow_es/internal/session_entity_types_stub_factory.cc b/google/cloud/dialogflow_es/internal/session_entity_types_stub_factory.cc index 937b169e71910..7ae1b4c51db83 100644 --- a/google/cloud/dialogflow_es/internal/session_entity_types_stub_factory.cc +++ b/google/cloud/dialogflow_es/internal/session_entity_types_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/v2/session_entity_type.proto #include "google/cloud/dialogflow_es/internal/session_entity_types_stub_factory.h" +#include "google/cloud/dialogflow/v2/session_entity_type.grpc.pb.h" #include "google/cloud/dialogflow_es/internal/session_entity_types_auth_decorator.h" #include "google/cloud/dialogflow_es/internal/session_entity_types_logging_decorator.h" #include "google/cloud/dialogflow_es/internal/session_entity_types_metadata_decorator.h" #include "google/cloud/dialogflow_es/internal/session_entity_types_stub.h" #include "google/cloud/dialogflow_es/internal/session_entity_types_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -77,3 +80,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/session_entity_types_stub_factory.h b/google/cloud/dialogflow_es/internal/session_entity_types_stub_factory.h index 4cdd17d892c3e..225a17ebd1e02 100644 --- a/google/cloud/dialogflow_es/internal/session_entity_types_stub_factory.h +++ b/google/cloud/dialogflow_es/internal/session_entity_types_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_SESSION_ENTITY_TYPES_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_es/internal/session_entity_types_tracing_connection.cc b/google/cloud/dialogflow_es/internal/session_entity_types_tracing_connection.cc index c67408487b7c6..64bc3aa3a12ca 100644 --- a/google/cloud/dialogflow_es/internal/session_entity_types_tracing_connection.cc +++ b/google/cloud/dialogflow_es/internal/session_entity_types_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SessionEntityTypesTracingConnection::SessionEntityTypesTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -131,17 +129,13 @@ Status SessionEntityTypesTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSessionEntityTypesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_es/internal/session_entity_types_tracing_connection.h b/google/cloud/dialogflow_es/internal/session_entity_types_tracing_connection.h index f48041dba7723..08ed6091cd0b5 100644 --- a/google/cloud/dialogflow_es/internal/session_entity_types_tracing_connection.h +++ b/google/cloud/dialogflow_es/internal/session_entity_types_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SessionEntityTypesTracingConnection : public dialogflow_es::SessionEntityTypesConnection { public: @@ -83,8 +81,6 @@ class SessionEntityTypesTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_es/internal/session_entity_types_tracing_stub.cc b/google/cloud/dialogflow_es/internal/session_entity_types_tracing_stub.cc index 1628fc9d17afc..aa6a6cd041ff3 100644 --- a/google/cloud/dialogflow_es/internal/session_entity_types_tracing_stub.cc +++ b/google/cloud/dialogflow_es/internal/session_entity_types_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SessionEntityTypesTracingStub::SessionEntityTypesTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -162,18 +163,14 @@ Status SessionEntityTypesTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSessionEntityTypesTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/session_entity_types_tracing_stub.h b/google/cloud/dialogflow_es/internal/session_entity_types_tracing_stub.h index 5399cd0010daf..8a9f594cff465 100644 --- a/google/cloud/dialogflow_es/internal/session_entity_types_tracing_stub.h +++ b/google/cloud/dialogflow_es/internal/session_entity_types_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SessionEntityTypesTracingStub : public SessionEntityTypesStub { public: ~SessionEntityTypesTracingStub() override = default; @@ -94,8 +95,6 @@ class SessionEntityTypesTracingStub : public SessionEntityTypesStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -110,4 +109,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_SESSION_ENTITY_TYPES_TRACING_STUB_H diff --git a/google/cloud/dialogflow_es/internal/sessions_auth_decorator.cc b/google/cloud/dialogflow_es/internal/sessions_auth_decorator.cc index fde13dcac5733..7576fcd29936f 100644 --- a/google/cloud/dialogflow_es/internal/sessions_auth_decorator.cc +++ b/google/cloud/dialogflow_es/internal/sessions_auth_decorator.cc @@ -17,11 +17,14 @@ // source: google/cloud/dialogflow/v2/session.proto #include "google/cloud/dialogflow_es/internal/sessions_auth_decorator.h" +#include "google/cloud/dialogflow/v2/session.grpc.pb.h" #include "google/cloud/internal/async_read_write_stream_auth.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -106,3 +109,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/sessions_auth_decorator.h b/google/cloud/dialogflow_es/internal/sessions_auth_decorator.h index 5640fed848288..3161280855f41 100644 --- a/google/cloud/dialogflow_es/internal/sessions_auth_decorator.h +++ b/google/cloud/dialogflow_es/internal/sessions_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -81,4 +84,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_SESSIONS_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/sessions_logging_decorator.cc b/google/cloud/dialogflow_es/internal/sessions_logging_decorator.cc index 7ff27c2052d9e..efd5ecc5a0d9c 100644 --- a/google/cloud/dialogflow_es/internal/sessions_logging_decorator.cc +++ b/google/cloud/dialogflow_es/internal/sessions_logging_decorator.cc @@ -17,15 +17,18 @@ // source: google/cloud/dialogflow/v2/session.proto #include "google/cloud/dialogflow_es/internal/sessions_logging_decorator.h" +#include "google/cloud/dialogflow/v2/session.grpc.pb.h" #include "google/cloud/internal/async_read_write_stream_logging.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -135,3 +138,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/sessions_logging_decorator.h b/google/cloud/dialogflow_es/internal/sessions_logging_decorator.h index 1234454d4dd95..3ed963ad41bfe 100644 --- a/google/cloud/dialogflow_es/internal/sessions_logging_decorator.h +++ b/google/cloud/dialogflow_es/internal/sessions_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -82,4 +85,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_SESSIONS_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/sessions_metadata_decorator.cc b/google/cloud/dialogflow_es/internal/sessions_metadata_decorator.cc index 2a652b601a431..582542ec76500 100644 --- a/google/cloud/dialogflow_es/internal/sessions_metadata_decorator.cc +++ b/google/cloud/dialogflow_es/internal/sessions_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/v2/session.proto #include "google/cloud/dialogflow_es/internal/sessions_metadata_decorator.h" +#include "google/cloud/dialogflow/v2/session.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -124,3 +128,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/sessions_metadata_decorator.h b/google/cloud/dialogflow_es/internal/sessions_metadata_decorator.h index ddaa4f045eef7..4480028efdec7 100644 --- a/google/cloud/dialogflow_es/internal/sessions_metadata_decorator.h +++ b/google/cloud/dialogflow_es/internal/sessions_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -86,4 +89,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_SESSIONS_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/sessions_option_defaults.cc b/google/cloud/dialogflow_es/internal/sessions_option_defaults.cc index 7ffd7c1933957..538d53c194aee 100644 --- a/google/cloud/dialogflow_es/internal/sessions_option_defaults.cc +++ b/google/cloud/dialogflow_es/internal/sessions_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_es/internal/sessions_option_defaults.h" #include "google/cloud/dialogflow_es/sessions_connection.h" #include "google/cloud/dialogflow_es/sessions_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -43,7 +43,7 @@ Options SessionsDefaultOptions(std::string const& location, Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - dialogflow_es::SessionsLimitedTimeRetryPolicy(std::chrono::minutes(30)) + dialogflow_es::SessionsLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_es/internal/sessions_stub.cc b/google/cloud/dialogflow_es/internal/sessions_stub.cc index 98506692d7848..00111bad703ec 100644 --- a/google/cloud/dialogflow_es/internal/sessions_stub.cc +++ b/google/cloud/dialogflow_es/internal/sessions_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/dialogflow/v2/session.proto #include "google/cloud/dialogflow_es/internal/sessions_stub.h" +#include "google/cloud/dialogflow/v2/session.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/internal/async_read_write_stream_impl.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -120,3 +123,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/sessions_stub.h b/google/cloud/dialogflow_es/internal/sessions_stub.h index a31887e2ac812..dfeb9ef7b0b07 100644 --- a/google/cloud/dialogflow_es/internal/sessions_stub.h +++ b/google/cloud/dialogflow_es/internal/sessions_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_SESSIONS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_SESSIONS_STUB_H +#include "google/cloud/dialogflow/v2/session.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/async_streaming_read_write_rpc.h" #include "google/cloud/completion_queue.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -134,4 +137,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_SESSIONS_STUB_H diff --git a/google/cloud/dialogflow_es/internal/sessions_stub_factory.cc b/google/cloud/dialogflow_es/internal/sessions_stub_factory.cc index 9f9f41adf1073..b330e1f3d26df 100644 --- a/google/cloud/dialogflow_es/internal/sessions_stub_factory.cc +++ b/google/cloud/dialogflow_es/internal/sessions_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/v2/session.proto #include "google/cloud/dialogflow_es/internal/sessions_stub_factory.h" +#include "google/cloud/dialogflow/v2/session.grpc.pb.h" #include "google/cloud/dialogflow_es/internal/sessions_auth_decorator.h" #include "google/cloud/dialogflow_es/internal/sessions_logging_decorator.h" #include "google/cloud/dialogflow_es/internal/sessions_metadata_decorator.h" #include "google/cloud/dialogflow_es/internal/sessions_stub.h" #include "google/cloud/dialogflow_es/internal/sessions_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/sessions_stub_factory.h b/google/cloud/dialogflow_es/internal/sessions_stub_factory.h index bd4b331a011f1..a3d76858481b9 100644 --- a/google/cloud/dialogflow_es/internal/sessions_stub_factory.h +++ b/google/cloud/dialogflow_es/internal/sessions_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_SESSIONS_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_es/internal/sessions_tracing_connection.cc b/google/cloud/dialogflow_es/internal/sessions_tracing_connection.cc index cdd034ce46a73..8d8e3d0b3a958 100644 --- a/google/cloud/dialogflow_es/internal/sessions_tracing_connection.cc +++ b/google/cloud/dialogflow_es/internal/sessions_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SessionsTracingConnection::SessionsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -97,16 +95,12 @@ Status SessionsTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSessionsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_es/internal/sessions_tracing_connection.h b/google/cloud/dialogflow_es/internal/sessions_tracing_connection.h index 9e709e59ecd9d..98015b5009a20 100644 --- a/google/cloud/dialogflow_es/internal/sessions_tracing_connection.h +++ b/google/cloud/dialogflow_es/internal/sessions_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SessionsTracingConnection : public dialogflow_es::SessionsConnection { public: ~SessionsTracingConnection() override = default; @@ -67,8 +65,6 @@ class SessionsTracingConnection : public dialogflow_es::SessionsConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_es/internal/sessions_tracing_stub.cc b/google/cloud/dialogflow_es/internal/sessions_tracing_stub.cc index 2382ab17231f4..735d63a0dc1ed 100644 --- a/google/cloud/dialogflow_es/internal/sessions_tracing_stub.cc +++ b/google/cloud/dialogflow_es/internal/sessions_tracing_stub.cc @@ -22,13 +22,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SessionsTracingStub::SessionsTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -119,18 +120,14 @@ Status SessionsTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSessionsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/sessions_tracing_stub.h b/google/cloud/dialogflow_es/internal/sessions_tracing_stub.h index 2373cbdaa9477..6e9c2bb2e0a67 100644 --- a/google/cloud/dialogflow_es/internal/sessions_tracing_stub.h +++ b/google/cloud/dialogflow_es/internal/sessions_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SessionsTracingStub : public SessionsStub { public: ~SessionsTracingStub() override = default; @@ -77,8 +78,6 @@ class SessionsTracingStub : public SessionsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -93,4 +92,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_SESSIONS_TRACING_STUB_H diff --git a/google/cloud/dialogflow_es/internal/versions_auth_decorator.cc b/google/cloud/dialogflow_es/internal/versions_auth_decorator.cc index 886bd1c6f07a3..7b9b624a09ae0 100644 --- a/google/cloud/dialogflow_es/internal/versions_auth_decorator.cc +++ b/google/cloud/dialogflow_es/internal/versions_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/dialogflow/v2/version.proto #include "google/cloud/dialogflow_es/internal/versions_auth_decorator.h" -#include +#include "google/cloud/dialogflow/v2/version.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -118,3 +121,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/versions_auth_decorator.h b/google/cloud/dialogflow_es/internal/versions_auth_decorator.h index 54857f41bc6aa..0f4845cc45bcc 100644 --- a/google/cloud/dialogflow_es/internal/versions_auth_decorator.h +++ b/google/cloud/dialogflow_es/internal/versions_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -92,4 +95,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_VERSIONS_AUTH_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/versions_logging_decorator.cc b/google/cloud/dialogflow_es/internal/versions_logging_decorator.cc index 223869f10aaef..626d7357ee233 100644 --- a/google/cloud/dialogflow_es/internal/versions_logging_decorator.cc +++ b/google/cloud/dialogflow_es/internal/versions_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/dialogflow/v2/version.proto #include "google/cloud/dialogflow_es/internal/versions_logging_decorator.h" +#include "google/cloud/dialogflow/v2/version.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -156,3 +159,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/versions_logging_decorator.h b/google/cloud/dialogflow_es/internal/versions_logging_decorator.h index 63445f4e7516c..f720033cd7438 100644 --- a/google/cloud/dialogflow_es/internal/versions_logging_decorator.h +++ b/google/cloud/dialogflow_es/internal/versions_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -92,4 +95,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_VERSIONS_LOGGING_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/versions_metadata_decorator.cc b/google/cloud/dialogflow_es/internal/versions_metadata_decorator.cc index caefaf1313e08..14666f016484c 100644 --- a/google/cloud/dialogflow_es/internal/versions_metadata_decorator.cc +++ b/google/cloud/dialogflow_es/internal/versions_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/dialogflow/v2/version.proto #include "google/cloud/dialogflow_es/internal/versions_metadata_decorator.h" +#include "google/cloud/dialogflow/v2/version.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -147,3 +151,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/versions_metadata_decorator.h b/google/cloud/dialogflow_es/internal/versions_metadata_decorator.h index d79bef069e196..079b1ddd73c6d 100644 --- a/google/cloud/dialogflow_es/internal/versions_metadata_decorator.h +++ b/google/cloud/dialogflow_es/internal/versions_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -97,4 +100,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_VERSIONS_METADATA_DECORATOR_H diff --git a/google/cloud/dialogflow_es/internal/versions_option_defaults.cc b/google/cloud/dialogflow_es/internal/versions_option_defaults.cc index 1e4c09787a043..df1443c8a68fd 100644 --- a/google/cloud/dialogflow_es/internal/versions_option_defaults.cc +++ b/google/cloud/dialogflow_es/internal/versions_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/dialogflow_es/internal/versions_option_defaults.h" #include "google/cloud/dialogflow_es/versions_connection.h" #include "google/cloud/dialogflow_es/versions_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -43,7 +43,7 @@ Options VersionsDefaultOptions(std::string const& location, Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - dialogflow_es::VersionsLimitedTimeRetryPolicy(std::chrono::minutes(30)) + dialogflow_es::VersionsLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dialogflow_es/internal/versions_stub.cc b/google/cloud/dialogflow_es/internal/versions_stub.cc index 737849e7469e0..085b73b62e7df 100644 --- a/google/cloud/dialogflow_es/internal/versions_stub.cc +++ b/google/cloud/dialogflow_es/internal/versions_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/dialogflow/v2/version.proto #include "google/cloud/dialogflow_es/internal/versions_stub.h" +#include "google/cloud/dialogflow/v2/version.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -150,3 +153,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/versions_stub.h b/google/cloud/dialogflow_es/internal/versions_stub.h index f292d03d777f4..881485c7cac88 100644 --- a/google/cloud/dialogflow_es/internal/versions_stub.h +++ b/google/cloud/dialogflow_es/internal/versions_stub.h @@ -19,15 +19,18 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_VERSIONS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_VERSIONS_STUB_H +#include "google/cloud/dialogflow/v2/version.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -151,4 +154,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_VERSIONS_STUB_H diff --git a/google/cloud/dialogflow_es/internal/versions_stub_factory.cc b/google/cloud/dialogflow_es/internal/versions_stub_factory.cc index 5a35f880b7f75..3130accd01c2d 100644 --- a/google/cloud/dialogflow_es/internal/versions_stub_factory.cc +++ b/google/cloud/dialogflow_es/internal/versions_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/dialogflow/v2/version.proto #include "google/cloud/dialogflow_es/internal/versions_stub_factory.h" +#include "google/cloud/dialogflow/v2/version.grpc.pb.h" #include "google/cloud/dialogflow_es/internal/versions_auth_decorator.h" #include "google/cloud/dialogflow_es/internal/versions_logging_decorator.h" #include "google/cloud/dialogflow_es/internal/versions_metadata_decorator.h" #include "google/cloud/dialogflow_es/internal/versions_stub.h" #include "google/cloud/dialogflow_es/internal/versions_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/versions_stub_factory.h b/google/cloud/dialogflow_es/internal/versions_stub_factory.h index 0229c64ed206f..86994f1bb72ef 100644 --- a/google/cloud/dialogflow_es/internal/versions_stub_factory.h +++ b/google/cloud/dialogflow_es/internal/versions_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_VERSIONS_STUB_FACTORY_H diff --git a/google/cloud/dialogflow_es/internal/versions_tracing_connection.cc b/google/cloud/dialogflow_es/internal/versions_tracing_connection.cc index 74f76fc5aece3..b98337246c6e8 100644 --- a/google/cloud/dialogflow_es/internal/versions_tracing_connection.cc +++ b/google/cloud/dialogflow_es/internal/versions_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - VersionsTracingConnection::VersionsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -127,16 +125,12 @@ Status VersionsTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeVersionsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dialogflow_es/internal/versions_tracing_connection.h b/google/cloud/dialogflow_es/internal/versions_tracing_connection.h index 9add177d8d782..8ac39b326309f 100644 --- a/google/cloud/dialogflow_es/internal/versions_tracing_connection.h +++ b/google/cloud/dialogflow_es/internal/versions_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class VersionsTracingConnection : public dialogflow_es::VersionsConnection { public: ~VersionsTracingConnection() override = default; @@ -76,8 +74,6 @@ class VersionsTracingConnection : public dialogflow_es::VersionsConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dialogflow_es/internal/versions_tracing_stub.cc b/google/cloud/dialogflow_es/internal/versions_tracing_stub.cc index 354012cf4225e..d69bee3b939c9 100644 --- a/google/cloud/dialogflow_es/internal/versions_tracing_stub.cc +++ b/google/cloud/dialogflow_es/internal/versions_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - VersionsTracingStub::VersionsTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -147,18 +148,14 @@ Status VersionsTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeVersionsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dialogflow_es_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dialogflow_es/internal/versions_tracing_stub.h b/google/cloud/dialogflow_es/internal/versions_tracing_stub.h index 329f3539086d6..5f397ee889d4b 100644 --- a/google/cloud/dialogflow_es/internal/versions_tracing_stub.h +++ b/google/cloud/dialogflow_es/internal/versions_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dialogflow_es_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class VersionsTracingStub : public VersionsStub { public: ~VersionsTracingStub() override = default; @@ -88,8 +89,6 @@ class VersionsTracingStub : public VersionsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -104,4 +103,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_INTERNAL_VERSIONS_TRACING_STUB_H diff --git a/google/cloud/dialogflow_es/knowledge_bases_connection.h b/google/cloud/dialogflow_es/knowledge_bases_connection.h index d99bd477ef388..8cf65f238e221 100644 --- a/google/cloud/dialogflow_es/knowledge_bases_connection.h +++ b/google/cloud/dialogflow_es/knowledge_bases_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_KNOWLEDGE_BASES_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_KNOWLEDGE_BASES_CONNECTION_H +#include "google/cloud/dialogflow/v2/knowledge_base.pb.h" #include "google/cloud/dialogflow_es/internal/knowledge_bases_retry_traits.h" #include "google/cloud/dialogflow_es/knowledge_bases_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/dialogflow_es/knowledge_bases_connection_idempotency_policy.h b/google/cloud/dialogflow_es/knowledge_bases_connection_idempotency_policy.h index 19ee297dad4c4..e079e30e388c6 100644 --- a/google/cloud/dialogflow_es/knowledge_bases_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_es/knowledge_bases_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_KNOWLEDGE_BASES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_KNOWLEDGE_BASES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/v2/knowledge_base.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_es/participants_connection.h b/google/cloud/dialogflow_es/participants_connection.h index 6172d262c32bd..fde1a2b471bcf 100644 --- a/google/cloud/dialogflow_es/participants_connection.h +++ b/google/cloud/dialogflow_es/participants_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_PARTICIPANTS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_PARTICIPANTS_CONNECTION_H +#include "google/cloud/dialogflow/v2/participant.pb.h" #include "google/cloud/dialogflow_es/internal/participants_retry_traits.h" #include "google/cloud/dialogflow_es/participants_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -28,7 +29,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/dialogflow_es/participants_connection_idempotency_policy.h b/google/cloud/dialogflow_es/participants_connection_idempotency_policy.h index 951ebd091422a..3df8057038019 100644 --- a/google/cloud/dialogflow_es/participants_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_es/participants_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_PARTICIPANTS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_PARTICIPANTS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/v2/participant.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_es/quickstart/.bazelrc b/google/cloud/dialogflow_es/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/dialogflow_es/quickstart/.bazelrc +++ b/google/cloud/dialogflow_es/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/dialogflow_es/quickstart/CMakeLists.txt b/google/cloud/dialogflow_es/quickstart/CMakeLists.txt index dcc0fa7b26cdb..c75ac7f210e55 100644 --- a/google/cloud/dialogflow_es/quickstart/CMakeLists.txt +++ b/google/cloud/dialogflow_es/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Dialogflow API C++ client library from a larger # CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-dialogflow_es-quickstart CXX) find_package(google_cloud_cpp_dialogflow_es REQUIRED) diff --git a/google/cloud/dialogflow_es/session_entity_types_connection.h b/google/cloud/dialogflow_es/session_entity_types_connection.h index 671a4c84c1042..acdc0d0a7ab1b 100644 --- a/google/cloud/dialogflow_es/session_entity_types_connection.h +++ b/google/cloud/dialogflow_es/session_entity_types_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_SESSION_ENTITY_TYPES_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_SESSION_ENTITY_TYPES_CONNECTION_H +#include "google/cloud/dialogflow/v2/session_entity_type.pb.h" #include "google/cloud/dialogflow_es/internal/session_entity_types_retry_traits.h" #include "google/cloud/dialogflow_es/session_entity_types_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/dialogflow_es/session_entity_types_connection_idempotency_policy.h b/google/cloud/dialogflow_es/session_entity_types_connection_idempotency_policy.h index 40f4b88783f8a..7a3aaed78f3e1 100644 --- a/google/cloud/dialogflow_es/session_entity_types_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_es/session_entity_types_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_SESSION_ENTITY_TYPES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_SESSION_ENTITY_TYPES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/v2/session_entity_type.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_es/sessions_connection.h b/google/cloud/dialogflow_es/sessions_connection.h index 87045e2e46e7b..1bc3e1f32ae4b 100644 --- a/google/cloud/dialogflow_es/sessions_connection.h +++ b/google/cloud/dialogflow_es/sessions_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_SESSIONS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_SESSIONS_CONNECTION_H +#include "google/cloud/dialogflow/v2/session.pb.h" #include "google/cloud/dialogflow_es/internal/sessions_retry_traits.h" #include "google/cloud/dialogflow_es/sessions_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -28,7 +29,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/dialogflow_es/sessions_connection_idempotency_policy.h b/google/cloud/dialogflow_es/sessions_connection_idempotency_policy.h index 55f650c2d6ca7..31e945c2a749a 100644 --- a/google/cloud/dialogflow_es/sessions_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_es/sessions_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_SESSIONS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_SESSIONS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/v2/session.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dialogflow_es/versions_connection.h b/google/cloud/dialogflow_es/versions_connection.h index 18a57548c0c5d..1f6670fcd7b55 100644 --- a/google/cloud/dialogflow_es/versions_connection.h +++ b/google/cloud/dialogflow_es/versions_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_VERSIONS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_VERSIONS_CONNECTION_H +#include "google/cloud/dialogflow/v2/version.pb.h" #include "google/cloud/dialogflow_es/internal/versions_retry_traits.h" #include "google/cloud/dialogflow_es/versions_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/dialogflow_es/versions_connection_idempotency_policy.h b/google/cloud/dialogflow_es/versions_connection_idempotency_policy.h index 3288acda73a9e..6962038f43aef 100644 --- a/google/cloud/dialogflow_es/versions_connection_idempotency_policy.h +++ b/google/cloud/dialogflow_es/versions_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_VERSIONS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DIALOGFLOW_ES_VERSIONS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/dialogflow/v2/version.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/discoveryengine/BUILD.bazel b/google/cloud/discoveryengine/BUILD.bazel index 3670e12cae5ab..4e00cdb5fb071 100644 --- a/google/cloud/discoveryengine/BUILD.bazel +++ b/google/cloud/discoveryengine/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/discoveryengine/v1:discoveryengine_cc_grpc", + "@googleapis//google/cloud/discoveryengine/v1:discoveryengine_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/discoveryengine/quickstart/.bazelrc b/google/cloud/discoveryengine/quickstart/.bazelrc index 6777c6b4c95de..ec27511a60add 100644 --- a/google/cloud/discoveryengine/quickstart/.bazelrc +++ b/google/cloud/discoveryengine/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/discoveryengine/quickstart/CMakeLists.txt b/google/cloud/discoveryengine/quickstart/CMakeLists.txt index cebf2a6828052..8558b10359396 100644 --- a/google/cloud/discoveryengine/quickstart/CMakeLists.txt +++ b/google/cloud/discoveryengine/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Discovery Engine API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-discoveryengine-quickstart CXX) find_package(google_cloud_cpp_discoveryengine REQUIRED) diff --git a/google/cloud/discoveryengine/v1/completion_client.h b/google/cloud/discoveryengine/v1/completion_client.h index 0d82e290d0592..14d32507e21aa 100644 --- a/google/cloud/discoveryengine/v1/completion_client.h +++ b/google/cloud/discoveryengine/v1/completion_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/discoveryengine/v1/completion_connection.h b/google/cloud/discoveryengine/v1/completion_connection.h index 999c873e60f35..c987880ffb52a 100644 --- a/google/cloud/discoveryengine/v1/completion_connection.h +++ b/google/cloud/discoveryengine/v1/completion_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_COMPLETION_CONNECTION_H #include "google/cloud/discoveryengine/v1/completion_connection_idempotency_policy.h" +#include "google/cloud/discoveryengine/v1/completion_service.pb.h" #include "google/cloud/discoveryengine/v1/internal/completion_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/discoveryengine/v1/completion_connection_idempotency_policy.h b/google/cloud/discoveryengine/v1/completion_connection_idempotency_policy.h index 3f34fec1ed967..aea26257eadcf 100644 --- a/google/cloud/discoveryengine/v1/completion_connection_idempotency_policy.h +++ b/google/cloud/discoveryengine/v1/completion_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_COMPLETION_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_COMPLETION_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/discoveryengine/v1/completion_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/discoveryengine/v1/control_connection.h b/google/cloud/discoveryengine/v1/control_connection.h index 059a4e1b2dcdd..309d9eecdbd43 100644 --- a/google/cloud/discoveryengine/v1/control_connection.h +++ b/google/cloud/discoveryengine/v1/control_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_CONTROL_CONNECTION_H #include "google/cloud/discoveryengine/v1/control_connection_idempotency_policy.h" +#include "google/cloud/discoveryengine/v1/control_service.pb.h" #include "google/cloud/discoveryengine/v1/internal/control_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/discoveryengine/v1/control_connection_idempotency_policy.h b/google/cloud/discoveryengine/v1/control_connection_idempotency_policy.h index 2b7ca3d82f4e3..4a97bea1ecc75 100644 --- a/google/cloud/discoveryengine/v1/control_connection_idempotency_policy.h +++ b/google/cloud/discoveryengine/v1/control_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_CONTROL_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_CONTROL_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/discoveryengine/v1/control_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/discoveryengine/v1/conversational_search_connection.h b/google/cloud/discoveryengine/v1/conversational_search_connection.h index 40550f69dbc58..0e7dc0f3938a9 100644 --- a/google/cloud/discoveryengine/v1/conversational_search_connection.h +++ b/google/cloud/discoveryengine/v1/conversational_search_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_CONVERSATIONAL_SEARCH_CONNECTION_H #include "google/cloud/discoveryengine/v1/conversational_search_connection_idempotency_policy.h" +#include "google/cloud/discoveryengine/v1/conversational_search_service.pb.h" #include "google/cloud/discoveryengine/v1/internal/conversational_search_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/discoveryengine/v1/conversational_search_connection_idempotency_policy.h b/google/cloud/discoveryengine/v1/conversational_search_connection_idempotency_policy.h index 59d29955967a3..813a34a74bbaa 100644 --- a/google/cloud/discoveryengine/v1/conversational_search_connection_idempotency_policy.h +++ b/google/cloud/discoveryengine/v1/conversational_search_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_CONVERSATIONAL_SEARCH_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_CONVERSATIONAL_SEARCH_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/discoveryengine/v1/conversational_search_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/discoveryengine/v1/data_store_client.h b/google/cloud/discoveryengine/v1/data_store_client.h index bdc1454257ded..2246f1da5ed89 100644 --- a/google/cloud/discoveryengine/v1/data_store_client.h +++ b/google/cloud/discoveryengine/v1/data_store_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/discoveryengine/v1/data_store_connection.h b/google/cloud/discoveryengine/v1/data_store_connection.h index 1d7c007f4c0d2..37e2edcbf0563 100644 --- a/google/cloud/discoveryengine/v1/data_store_connection.h +++ b/google/cloud/discoveryengine/v1/data_store_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_DATA_STORE_CONNECTION_H #include "google/cloud/discoveryengine/v1/data_store_connection_idempotency_policy.h" +#include "google/cloud/discoveryengine/v1/data_store_service.pb.h" #include "google/cloud/discoveryengine/v1/internal/data_store_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/discoveryengine/v1/data_store_connection_idempotency_policy.h b/google/cloud/discoveryengine/v1/data_store_connection_idempotency_policy.h index f51cc65dd0063..4eecdaff2daea 100644 --- a/google/cloud/discoveryengine/v1/data_store_connection_idempotency_policy.h +++ b/google/cloud/discoveryengine/v1/data_store_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_DATA_STORE_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_DATA_STORE_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/discoveryengine/v1/data_store_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/discoveryengine/v1/document_client.h b/google/cloud/discoveryengine/v1/document_client.h index 33b23cc39014e..04f437afa6e13 100644 --- a/google/cloud/discoveryengine/v1/document_client.h +++ b/google/cloud/discoveryengine/v1/document_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/discoveryengine/v1/document_connection.h b/google/cloud/discoveryengine/v1/document_connection.h index aef2c44d58c39..6260954c3c4ca 100644 --- a/google/cloud/discoveryengine/v1/document_connection.h +++ b/google/cloud/discoveryengine/v1/document_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_DOCUMENT_CONNECTION_H #include "google/cloud/discoveryengine/v1/document_connection_idempotency_policy.h" +#include "google/cloud/discoveryengine/v1/document_service.pb.h" #include "google/cloud/discoveryengine/v1/internal/document_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/discoveryengine/v1/document_connection_idempotency_policy.h b/google/cloud/discoveryengine/v1/document_connection_idempotency_policy.h index 3bb76b6005f31..e8a6c883d20be 100644 --- a/google/cloud/discoveryengine/v1/document_connection_idempotency_policy.h +++ b/google/cloud/discoveryengine/v1/document_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_DOCUMENT_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_DOCUMENT_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/discoveryengine/v1/document_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/discoveryengine/v1/engine_client.h b/google/cloud/discoveryengine/v1/engine_client.h index 26dc988e8b86e..b0ae5eca997e7 100644 --- a/google/cloud/discoveryengine/v1/engine_client.h +++ b/google/cloud/discoveryengine/v1/engine_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/discoveryengine/v1/engine_connection.h b/google/cloud/discoveryengine/v1/engine_connection.h index e4537710a2e39..6bd554fc42eb1 100644 --- a/google/cloud/discoveryengine/v1/engine_connection.h +++ b/google/cloud/discoveryengine/v1/engine_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_ENGINE_CONNECTION_H #include "google/cloud/discoveryengine/v1/engine_connection_idempotency_policy.h" +#include "google/cloud/discoveryengine/v1/engine_service.pb.h" #include "google/cloud/discoveryengine/v1/internal/engine_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/discoveryengine/v1/engine_connection_idempotency_policy.h b/google/cloud/discoveryengine/v1/engine_connection_idempotency_policy.h index 18ce8f89ec45b..3502974a7052c 100644 --- a/google/cloud/discoveryengine/v1/engine_connection_idempotency_policy.h +++ b/google/cloud/discoveryengine/v1/engine_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_ENGINE_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_ENGINE_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/discoveryengine/v1/engine_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/discoveryengine/v1/grounded_generation_connection.h b/google/cloud/discoveryengine/v1/grounded_generation_connection.h index c87846c0421a3..abc9e7aaebffb 100644 --- a/google/cloud/discoveryengine/v1/grounded_generation_connection.h +++ b/google/cloud/discoveryengine/v1/grounded_generation_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_GROUNDED_GENERATION_CONNECTION_H #include "google/cloud/discoveryengine/v1/grounded_generation_connection_idempotency_policy.h" +#include "google/cloud/discoveryengine/v1/grounded_generation_service.pb.h" #include "google/cloud/discoveryengine/v1/internal/grounded_generation_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/async_read_write_stream_impl.h" @@ -28,7 +29,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/discoveryengine/v1/grounded_generation_connection_idempotency_policy.h b/google/cloud/discoveryengine/v1/grounded_generation_connection_idempotency_policy.h index c053980f13811..e23cc6b28cdcf 100644 --- a/google/cloud/discoveryengine/v1/grounded_generation_connection_idempotency_policy.h +++ b/google/cloud/discoveryengine/v1/grounded_generation_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_GROUNDED_GENERATION_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_GROUNDED_GENERATION_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/discoveryengine/v1/grounded_generation_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/discoveryengine/v1/internal/completion_auth_decorator.cc b/google/cloud/discoveryengine/v1/internal/completion_auth_decorator.cc index 6bf0b7a2b26f4..89023dfe31b38 100644 --- a/google/cloud/discoveryengine/v1/internal/completion_auth_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/completion_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/discoveryengine/v1/completion_service.proto #include "google/cloud/discoveryengine/v1/internal/completion_auth_decorator.h" -#include +#include "google/cloud/discoveryengine/v1/completion_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -229,3 +232,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/completion_auth_decorator.h b/google/cloud/discoveryengine/v1/internal/completion_auth_decorator.h index b579fff646e2b..66c4e70dd7069 100644 --- a/google/cloud/discoveryengine/v1/internal/completion_auth_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/completion_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/discoveryengine/v1/internal/completion_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -130,4 +133,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_COMPLETION_AUTH_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/completion_connection_impl.h b/google/cloud/discoveryengine/v1/internal/completion_connection_impl.h index 780a784739eba..213e808e987f1 100644 --- a/google/cloud/discoveryengine/v1/internal/completion_connection_impl.h +++ b/google/cloud/discoveryengine/v1/internal/completion_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/discoveryengine/v1/internal/completion_logging_decorator.cc b/google/cloud/discoveryengine/v1/internal/completion_logging_decorator.cc index cbc546d4eea97..efbcc27b34cc8 100644 --- a/google/cloud/discoveryengine/v1/internal/completion_logging_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/completion_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/discoveryengine/v1/completion_service.proto #include "google/cloud/discoveryengine/v1/internal/completion_logging_decorator.h" +#include "google/cloud/discoveryengine/v1/completion_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -259,3 +262,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/completion_logging_decorator.h b/google/cloud/discoveryengine/v1/internal/completion_logging_decorator.h index 3eb930926a316..e24c054a97b0e 100644 --- a/google/cloud/discoveryengine/v1/internal/completion_logging_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/completion_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/discoveryengine/v1/internal/completion_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -130,4 +133,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_COMPLETION_LOGGING_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/completion_metadata_decorator.cc b/google/cloud/discoveryengine/v1/internal/completion_metadata_decorator.cc index e4743faf27ade..7c6c38b9f4a8c 100644 --- a/google/cloud/discoveryengine/v1/internal/completion_metadata_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/completion_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/discoveryengine/v1/completion_service.proto #include "google/cloud/discoveryengine/v1/internal/completion_metadata_decorator.h" +#include "google/cloud/discoveryengine/v1/completion_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -212,3 +216,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/completion_metadata_decorator.h b/google/cloud/discoveryengine/v1/internal/completion_metadata_decorator.h index f6c3b30e55abf..e027294c76bc9 100644 --- a/google/cloud/discoveryengine/v1/internal/completion_metadata_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/completion_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/discoveryengine/v1/internal/completion_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -136,4 +139,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_COMPLETION_METADATA_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/completion_option_defaults.cc b/google/cloud/discoveryengine/v1/internal/completion_option_defaults.cc index 412ef7b70ea54..2c22b600c8a5f 100644 --- a/google/cloud/discoveryengine/v1/internal/completion_option_defaults.cc +++ b/google/cloud/discoveryengine/v1/internal/completion_option_defaults.cc @@ -42,7 +42,7 @@ Options CompletionServiceDefaultOptions(Options options) { if (!options.has()) { options.set( discoveryengine_v1::CompletionServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/discoveryengine/v1/internal/completion_stub.cc b/google/cloud/discoveryengine/v1/internal/completion_stub.cc index a34b063ab96ab..e097a47a82244 100644 --- a/google/cloud/discoveryengine/v1/internal/completion_stub.cc +++ b/google/cloud/discoveryengine/v1/internal/completion_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/discoveryengine/v1/completion_service.proto #include "google/cloud/discoveryengine/v1/internal/completion_stub.h" +#include "google/cloud/discoveryengine/v1/completion_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -261,3 +264,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/completion_stub.h b/google/cloud/discoveryengine/v1/internal/completion_stub.h index 209aac0ab06b7..fcc6f0f70b643 100644 --- a/google/cloud/discoveryengine/v1/internal/completion_stub.h +++ b/google/cloud/discoveryengine/v1/internal/completion_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_COMPLETION_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_COMPLETION_STUB_H +#include "google/cloud/discoveryengine/v1/completion_service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -227,4 +230,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_COMPLETION_STUB_H diff --git a/google/cloud/discoveryengine/v1/internal/completion_stub_factory.cc b/google/cloud/discoveryengine/v1/internal/completion_stub_factory.cc index e68387de4dba8..f0a5ea09748e2 100644 --- a/google/cloud/discoveryengine/v1/internal/completion_stub_factory.cc +++ b/google/cloud/discoveryengine/v1/internal/completion_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/discoveryengine/v1/completion_service.proto #include "google/cloud/discoveryengine/v1/internal/completion_stub_factory.h" +#include "google/cloud/discoveryengine/v1/completion_service.grpc.pb.h" #include "google/cloud/discoveryengine/v1/internal/completion_auth_decorator.h" #include "google/cloud/discoveryengine/v1/internal/completion_logging_decorator.h" #include "google/cloud/discoveryengine/v1/internal/completion_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/completion_stub_factory.h b/google/cloud/discoveryengine/v1/internal/completion_stub_factory.h index 8e8531066be9f..c313ebef78372 100644 --- a/google/cloud/discoveryengine/v1/internal/completion_stub_factory.h +++ b/google/cloud/discoveryengine/v1/internal/completion_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_COMPLETION_STUB_FACTORY_H diff --git a/google/cloud/discoveryengine/v1/internal/completion_tracing_connection.cc b/google/cloud/discoveryengine/v1/internal/completion_tracing_connection.cc index 7fda420a235fa..464a9734d9f1e 100644 --- a/google/cloud/discoveryengine/v1/internal/completion_tracing_connection.cc +++ b/google/cloud/discoveryengine/v1/internal/completion_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CompletionServiceTracingConnection::CompletionServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -219,17 +217,13 @@ Status CompletionServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCompletionServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/discoveryengine/v1/internal/completion_tracing_connection.h b/google/cloud/discoveryengine/v1/internal/completion_tracing_connection.h index 86becac3c7514..857485bbe3335 100644 --- a/google/cloud/discoveryengine/v1/internal/completion_tracing_connection.h +++ b/google/cloud/discoveryengine/v1/internal/completion_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CompletionServiceTracingConnection : public discoveryengine_v1::CompletionServiceConnection { public: @@ -121,8 +119,6 @@ class CompletionServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/discoveryengine/v1/internal/completion_tracing_stub.cc b/google/cloud/discoveryengine/v1/internal/completion_tracing_stub.cc index 515d3004e538e..c4424dd73e9fc 100644 --- a/google/cloud/discoveryengine/v1/internal/completion_tracing_stub.cc +++ b/google/cloud/discoveryengine/v1/internal/completion_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CompletionServiceTracingStub::CompletionServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -235,18 +236,14 @@ future CompletionServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCompletionServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/completion_tracing_stub.h b/google/cloud/discoveryengine/v1/internal/completion_tracing_stub.h index 5ab758f63daf2..1df9c1ebad99b 100644 --- a/google/cloud/discoveryengine/v1/internal/completion_tracing_stub.h +++ b/google/cloud/discoveryengine/v1/internal/completion_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CompletionServiceTracingStub : public CompletionServiceStub { public: ~CompletionServiceTracingStub() override = default; @@ -126,8 +127,6 @@ class CompletionServiceTracingStub : public CompletionServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -142,4 +141,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_COMPLETION_TRACING_STUB_H diff --git a/google/cloud/discoveryengine/v1/internal/control_auth_decorator.cc b/google/cloud/discoveryengine/v1/internal/control_auth_decorator.cc index c2a3e884b39de..52c3269eb0953 100644 --- a/google/cloud/discoveryengine/v1/internal/control_auth_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/control_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/discoveryengine/v1/control_service.proto #include "google/cloud/discoveryengine/v1/internal/control_auth_decorator.h" -#include +#include "google/cloud/discoveryengine/v1/control_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -104,3 +107,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/control_auth_decorator.h b/google/cloud/discoveryengine/v1/internal/control_auth_decorator.h index 9ef9cc89beea6..ac49050df2ad3 100644 --- a/google/cloud/discoveryengine/v1/internal/control_auth_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/control_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -85,4 +88,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_CONTROL_AUTH_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/control_logging_decorator.cc b/google/cloud/discoveryengine/v1/internal/control_logging_decorator.cc index 655e3ff7eb887..78c39cd7d0292 100644 --- a/google/cloud/discoveryengine/v1/internal/control_logging_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/control_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/discoveryengine/v1/control_service.proto #include "google/cloud/discoveryengine/v1/internal/control_logging_decorator.h" +#include "google/cloud/discoveryengine/v1/control_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -137,3 +140,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/control_logging_decorator.h b/google/cloud/discoveryengine/v1/internal/control_logging_decorator.h index 956951a5f64e3..004463165af20 100644 --- a/google/cloud/discoveryengine/v1/internal/control_logging_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/control_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -85,4 +88,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_CONTROL_LOGGING_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/control_metadata_decorator.cc b/google/cloud/discoveryengine/v1/internal/control_metadata_decorator.cc index 53d28c78999e7..0f46296e01e36 100644 --- a/google/cloud/discoveryengine/v1/internal/control_metadata_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/control_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/discoveryengine/v1/control_service.proto #include "google/cloud/discoveryengine/v1/internal/control_metadata_decorator.h" +#include "google/cloud/discoveryengine/v1/control_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -131,3 +135,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/control_metadata_decorator.h b/google/cloud/discoveryengine/v1/internal/control_metadata_decorator.h index b21540d41e45f..d7d78b57a6035 100644 --- a/google/cloud/discoveryengine/v1/internal/control_metadata_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/control_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -90,4 +93,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_CONTROL_METADATA_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/control_option_defaults.cc b/google/cloud/discoveryengine/v1/internal/control_option_defaults.cc index 9620f2debf21e..96d726df14ce8 100644 --- a/google/cloud/discoveryengine/v1/internal/control_option_defaults.cc +++ b/google/cloud/discoveryengine/v1/internal/control_option_defaults.cc @@ -42,7 +42,7 @@ Options ControlServiceDefaultOptions(Options options) { if (!options.has()) { options.set( discoveryengine_v1::ControlServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/discoveryengine/v1/internal/control_stub.cc b/google/cloud/discoveryengine/v1/internal/control_stub.cc index 24726010f87c6..4980f8d539c66 100644 --- a/google/cloud/discoveryengine/v1/internal/control_stub.cc +++ b/google/cloud/discoveryengine/v1/internal/control_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/discoveryengine/v1/control_service.proto #include "google/cloud/discoveryengine/v1/internal/control_stub.h" +#include "google/cloud/discoveryengine/v1/control_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -128,3 +131,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/control_stub.h b/google/cloud/discoveryengine/v1/internal/control_stub.h index dd1e2c7342023..ba3e0f425dfbc 100644 --- a/google/cloud/discoveryengine/v1/internal/control_stub.h +++ b/google/cloud/discoveryengine/v1/internal/control_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_CONTROL_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_CONTROL_STUB_H +#include "google/cloud/discoveryengine/v1/control_service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -134,4 +137,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_CONTROL_STUB_H diff --git a/google/cloud/discoveryengine/v1/internal/control_stub_factory.cc b/google/cloud/discoveryengine/v1/internal/control_stub_factory.cc index 2f2d4329e8c1a..266dce38b801c 100644 --- a/google/cloud/discoveryengine/v1/internal/control_stub_factory.cc +++ b/google/cloud/discoveryengine/v1/internal/control_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/discoveryengine/v1/control_service.proto #include "google/cloud/discoveryengine/v1/internal/control_stub_factory.h" +#include "google/cloud/discoveryengine/v1/control_service.grpc.pb.h" #include "google/cloud/discoveryengine/v1/internal/control_auth_decorator.h" #include "google/cloud/discoveryengine/v1/internal/control_logging_decorator.h" #include "google/cloud/discoveryengine/v1/internal/control_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/control_stub_factory.h b/google/cloud/discoveryengine/v1/internal/control_stub_factory.h index 60845ee147093..dd23e64f2b7ed 100644 --- a/google/cloud/discoveryengine/v1/internal/control_stub_factory.h +++ b/google/cloud/discoveryengine/v1/internal/control_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_CONTROL_STUB_FACTORY_H diff --git a/google/cloud/discoveryengine/v1/internal/control_tracing_connection.cc b/google/cloud/discoveryengine/v1/internal/control_tracing_connection.cc index 2ff651087b03c..0d060d1548a7f 100644 --- a/google/cloud/discoveryengine/v1/internal/control_tracing_connection.cc +++ b/google/cloud/discoveryengine/v1/internal/control_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ControlServiceTracingConnection::ControlServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -108,16 +106,12 @@ Status ControlServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeControlServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/discoveryengine/v1/internal/control_tracing_connection.h b/google/cloud/discoveryengine/v1/internal/control_tracing_connection.h index dd5a765632857..25d76093bb46b 100644 --- a/google/cloud/discoveryengine/v1/internal/control_tracing_connection.h +++ b/google/cloud/discoveryengine/v1/internal/control_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ControlServiceTracingConnection : public discoveryengine_v1::ControlServiceConnection { public: @@ -72,8 +70,6 @@ class ControlServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/discoveryengine/v1/internal/control_tracing_stub.cc b/google/cloud/discoveryengine/v1/internal/control_tracing_stub.cc index 2c3390052fa18..9e0f04c9d70fc 100644 --- a/google/cloud/discoveryengine/v1/internal/control_tracing_stub.cc +++ b/google/cloud/discoveryengine/v1/internal/control_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ControlServiceTracingStub::ControlServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -126,18 +127,14 @@ Status ControlServiceTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeControlServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/control_tracing_stub.h b/google/cloud/discoveryengine/v1/internal/control_tracing_stub.h index bdf5234864e67..1b7dc62d3233d 100644 --- a/google/cloud/discoveryengine/v1/internal/control_tracing_stub.h +++ b/google/cloud/discoveryengine/v1/internal/control_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ControlServiceTracingStub : public ControlServiceStub { public: ~ControlServiceTracingStub() override = default; @@ -81,8 +82,6 @@ class ControlServiceTracingStub : public ControlServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -97,4 +96,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_CONTROL_TRACING_STUB_H diff --git a/google/cloud/discoveryengine/v1/internal/conversational_search_auth_decorator.cc b/google/cloud/discoveryengine/v1/internal/conversational_search_auth_decorator.cc index cbe072555afd9..6b36fbec3fea4 100644 --- a/google/cloud/discoveryengine/v1/internal/conversational_search_auth_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/conversational_search_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/discoveryengine/v1/conversational_search_service.proto #include "google/cloud/discoveryengine/v1/internal/conversational_search_auth_decorator.h" -#include +#include "google/cloud/discoveryengine/v1/conversational_search_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -193,3 +196,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/conversational_search_auth_decorator.h b/google/cloud/discoveryengine/v1/internal/conversational_search_auth_decorator.h index cc4f468fc4fd9..728940c3842a0 100644 --- a/google/cloud/discoveryengine/v1/internal/conversational_search_auth_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/conversational_search_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -134,4 +137,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_CONVERSATIONAL_SEARCH_AUTH_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/conversational_search_logging_decorator.cc b/google/cloud/discoveryengine/v1/internal/conversational_search_logging_decorator.cc index 7ef505b51a7dd..e5de97db41cd8 100644 --- a/google/cloud/discoveryengine/v1/internal/conversational_search_logging_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/conversational_search_logging_decorator.cc @@ -17,15 +17,18 @@ // source: google/cloud/discoveryengine/v1/conversational_search_service.proto #include "google/cloud/discoveryengine/v1/internal/conversational_search_logging_decorator.h" +#include "google/cloud/discoveryengine/v1/conversational_search_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/internal/streaming_read_rpc_logging.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -278,3 +281,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/conversational_search_logging_decorator.h b/google/cloud/discoveryengine/v1/internal/conversational_search_logging_decorator.h index a11d0ec33ebf3..085268d41c7fb 100644 --- a/google/cloud/discoveryengine/v1/internal/conversational_search_logging_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/conversational_search_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -136,4 +139,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_CONVERSATIONAL_SEARCH_LOGGING_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/conversational_search_metadata_decorator.cc b/google/cloud/discoveryengine/v1/internal/conversational_search_metadata_decorator.cc index 9604bde6ac4b3..f3d4b14c76c46 100644 --- a/google/cloud/discoveryengine/v1/internal/conversational_search_metadata_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/conversational_search_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/discoveryengine/v1/conversational_search_service.proto #include "google/cloud/discoveryengine/v1/internal/conversational_search_metadata_decorator.h" +#include "google/cloud/discoveryengine/v1/conversational_search_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -221,3 +225,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/conversational_search_metadata_decorator.h b/google/cloud/discoveryengine/v1/internal/conversational_search_metadata_decorator.h index 683cdbd877530..8557e34fd70b2 100644 --- a/google/cloud/discoveryengine/v1/internal/conversational_search_metadata_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/conversational_search_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -141,4 +144,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_CONVERSATIONAL_SEARCH_METADATA_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/conversational_search_option_defaults.cc b/google/cloud/discoveryengine/v1/internal/conversational_search_option_defaults.cc index 31981bc366f86..2fdbdbe7164d9 100644 --- a/google/cloud/discoveryengine/v1/internal/conversational_search_option_defaults.cc +++ b/google/cloud/discoveryengine/v1/internal/conversational_search_option_defaults.cc @@ -45,7 +45,7 @@ Options ConversationalSearchServiceDefaultOptions(Options options) { options.set< discoveryengine_v1::ConversationalSearchServiceRetryPolicyOption>( discoveryengine_v1::ConversationalSearchServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -239,3 +242,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/conversational_search_stub.h b/google/cloud/discoveryengine/v1/internal/conversational_search_stub.h index 792ca511ce0a4..2e3b9527ad5f8 100644 --- a/google/cloud/discoveryengine/v1/internal/conversational_search_stub.h +++ b/google/cloud/discoveryengine/v1/internal/conversational_search_stub.h @@ -19,15 +19,18 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_CONVERSATIONAL_SEARCH_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_CONVERSATIONAL_SEARCH_STUB_H +#include "google/cloud/discoveryengine/v1/conversational_search_service.grpc.pb.h" #include "google/cloud/internal/streaming_read_rpc.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -238,4 +241,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_CONVERSATIONAL_SEARCH_STUB_H diff --git a/google/cloud/discoveryengine/v1/internal/conversational_search_stub_factory.cc b/google/cloud/discoveryengine/v1/internal/conversational_search_stub_factory.cc index 9c7cd929071a4..666095e60132f 100644 --- a/google/cloud/discoveryengine/v1/internal/conversational_search_stub_factory.cc +++ b/google/cloud/discoveryengine/v1/internal/conversational_search_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/discoveryengine/v1/conversational_search_service.proto #include "google/cloud/discoveryengine/v1/internal/conversational_search_stub_factory.h" +#include "google/cloud/discoveryengine/v1/conversational_search_service.grpc.pb.h" #include "google/cloud/discoveryengine/v1/internal/conversational_search_auth_decorator.h" #include "google/cloud/discoveryengine/v1/internal/conversational_search_logging_decorator.h" #include "google/cloud/discoveryengine/v1/internal/conversational_search_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/conversational_search_stub_factory.h b/google/cloud/discoveryengine/v1/internal/conversational_search_stub_factory.h index e02c6cfdf4a17..b67f1946ebd1f 100644 --- a/google/cloud/discoveryengine/v1/internal/conversational_search_stub_factory.h +++ b/google/cloud/discoveryengine/v1/internal/conversational_search_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_CONVERSATIONAL_SEARCH_STUB_FACTORY_H diff --git a/google/cloud/discoveryengine/v1/internal/conversational_search_tracing_connection.cc b/google/cloud/discoveryengine/v1/internal/conversational_search_tracing_connection.cc index 595126689e3b7..b8d9bd2ba5e53 100644 --- a/google/cloud/discoveryengine/v1/internal/conversational_search_tracing_connection.cc +++ b/google/cloud/discoveryengine/v1/internal/conversational_search_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ConversationalSearchServiceTracingConnection:: ConversationalSearchServiceTracingConnection( std::shared_ptr< @@ -214,18 +212,14 @@ Status ConversationalSearchServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeConversationalSearchServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/discoveryengine/v1/internal/conversational_search_tracing_connection.h b/google/cloud/discoveryengine/v1/internal/conversational_search_tracing_connection.h index 44ec66491a1fd..be9f459e26011 100644 --- a/google/cloud/discoveryengine/v1/internal/conversational_search_tracing_connection.h +++ b/google/cloud/discoveryengine/v1/internal/conversational_search_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ConversationalSearchServiceTracingConnection : public discoveryengine_v1::ConversationalSearchServiceConnection { public: @@ -112,8 +110,6 @@ class ConversationalSearchServiceTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/discoveryengine/v1/internal/conversational_search_tracing_stub.cc b/google/cloud/discoveryengine/v1/internal/conversational_search_tracing_stub.cc index 9cde5c8b06752..3513b2c17e4fa 100644 --- a/google/cloud/discoveryengine/v1/internal/conversational_search_tracing_stub.cc +++ b/google/cloud/discoveryengine/v1/internal/conversational_search_tracing_stub.cc @@ -22,13 +22,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ConversationalSearchServiceTracingStub::ConversationalSearchServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -259,20 +260,16 @@ Status ConversationalSearchServiceTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeConversationalSearchServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared( std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/conversational_search_tracing_stub.h b/google/cloud/discoveryengine/v1/internal/conversational_search_tracing_stub.h index 655a7ea866c53..6c68949de0c7b 100644 --- a/google/cloud/discoveryengine/v1/internal/conversational_search_tracing_stub.h +++ b/google/cloud/discoveryengine/v1/internal/conversational_search_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ConversationalSearchServiceTracingStub : public ConversationalSearchServiceStub { public: @@ -132,8 +133,6 @@ class ConversationalSearchServiceTracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -149,4 +148,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_CONVERSATIONAL_SEARCH_TRACING_STUB_H diff --git a/google/cloud/discoveryengine/v1/internal/data_store_auth_decorator.cc b/google/cloud/discoveryengine/v1/internal/data_store_auth_decorator.cc index ef6350d3b1f89..756b9a78ed4ef 100644 --- a/google/cloud/discoveryengine/v1/internal/data_store_auth_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/data_store_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/discoveryengine/v1/data_store_service.proto #include "google/cloud/discoveryengine/v1/internal/data_store_auth_decorator.h" -#include +#include "google/cloud/discoveryengine/v1/data_store_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -179,3 +182,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/data_store_auth_decorator.h b/google/cloud/discoveryengine/v1/internal/data_store_auth_decorator.h index 29a8a9412d476..f199bb342002c 100644 --- a/google/cloud/discoveryengine/v1/internal/data_store_auth_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/data_store_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/discoveryengine/v1/internal/data_store_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -113,4 +116,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_DATA_STORE_AUTH_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/data_store_connection_impl.h b/google/cloud/discoveryengine/v1/internal/data_store_connection_impl.h index 0b37285ea6739..9f74a140cec09 100644 --- a/google/cloud/discoveryengine/v1/internal/data_store_connection_impl.h +++ b/google/cloud/discoveryengine/v1/internal/data_store_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/discoveryengine/v1/internal/data_store_logging_decorator.cc b/google/cloud/discoveryengine/v1/internal/data_store_logging_decorator.cc index 82dcff1d19230..3dcc9be161248 100644 --- a/google/cloud/discoveryengine/v1/internal/data_store_logging_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/data_store_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/discoveryengine/v1/data_store_service.proto #include "google/cloud/discoveryengine/v1/internal/data_store_logging_decorator.h" +#include "google/cloud/discoveryengine/v1/data_store_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -211,3 +214,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/data_store_logging_decorator.h b/google/cloud/discoveryengine/v1/internal/data_store_logging_decorator.h index e2e5f5097a01a..2ebcbf62c2a47 100644 --- a/google/cloud/discoveryengine/v1/internal/data_store_logging_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/data_store_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/discoveryengine/v1/internal/data_store_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -113,4 +116,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_DATA_STORE_LOGGING_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/data_store_metadata_decorator.cc b/google/cloud/discoveryengine/v1/internal/data_store_metadata_decorator.cc index d0999c697c84e..d2b10a4708718 100644 --- a/google/cloud/discoveryengine/v1/internal/data_store_metadata_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/data_store_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/discoveryengine/v1/data_store_service.proto #include "google/cloud/discoveryengine/v1/internal/data_store_metadata_decorator.h" +#include "google/cloud/discoveryengine/v1/data_store_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -179,3 +183,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/data_store_metadata_decorator.h b/google/cloud/discoveryengine/v1/internal/data_store_metadata_decorator.h index 5a57b4d68d59b..d5f755798bd1a 100644 --- a/google/cloud/discoveryengine/v1/internal/data_store_metadata_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/data_store_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/discoveryengine/v1/internal/data_store_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -119,4 +122,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_DATA_STORE_METADATA_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/data_store_option_defaults.cc b/google/cloud/discoveryengine/v1/internal/data_store_option_defaults.cc index 1d75f33a352c3..9a1305349d2e9 100644 --- a/google/cloud/discoveryengine/v1/internal/data_store_option_defaults.cc +++ b/google/cloud/discoveryengine/v1/internal/data_store_option_defaults.cc @@ -42,7 +42,7 @@ Options DataStoreServiceDefaultOptions(Options options) { if (!options.has()) { options.set( discoveryengine_v1::DataStoreServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/discoveryengine/v1/internal/data_store_stub.cc b/google/cloud/discoveryengine/v1/internal/data_store_stub.cc index 77adc23b091f8..b4742ee20d023 100644 --- a/google/cloud/discoveryengine/v1/internal/data_store_stub.cc +++ b/google/cloud/discoveryengine/v1/internal/data_store_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/discoveryengine/v1/data_store_service.proto #include "google/cloud/discoveryengine/v1/internal/data_store_stub.h" +#include "google/cloud/discoveryengine/v1/data_store_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -207,3 +210,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/data_store_stub.h b/google/cloud/discoveryengine/v1/internal/data_store_stub.h index 6619c1d598740..c46f1720d269c 100644 --- a/google/cloud/discoveryengine/v1/internal/data_store_stub.h +++ b/google/cloud/discoveryengine/v1/internal/data_store_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_DATA_STORE_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_DATA_STORE_STUB_H +#include "google/cloud/discoveryengine/v1/data_store_service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -192,4 +195,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_DATA_STORE_STUB_H diff --git a/google/cloud/discoveryengine/v1/internal/data_store_stub_factory.cc b/google/cloud/discoveryengine/v1/internal/data_store_stub_factory.cc index b5ae58facd084..474c9d884cef2 100644 --- a/google/cloud/discoveryengine/v1/internal/data_store_stub_factory.cc +++ b/google/cloud/discoveryengine/v1/internal/data_store_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/discoveryengine/v1/data_store_service.proto #include "google/cloud/discoveryengine/v1/internal/data_store_stub_factory.h" +#include "google/cloud/discoveryengine/v1/data_store_service.grpc.pb.h" #include "google/cloud/discoveryengine/v1/internal/data_store_auth_decorator.h" #include "google/cloud/discoveryengine/v1/internal/data_store_logging_decorator.h" #include "google/cloud/discoveryengine/v1/internal/data_store_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/data_store_stub_factory.h b/google/cloud/discoveryengine/v1/internal/data_store_stub_factory.h index 38225eda0ff40..ab70f93a2cfac 100644 --- a/google/cloud/discoveryengine/v1/internal/data_store_stub_factory.h +++ b/google/cloud/discoveryengine/v1/internal/data_store_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_DATA_STORE_STUB_FACTORY_H diff --git a/google/cloud/discoveryengine/v1/internal/data_store_tracing_connection.cc b/google/cloud/discoveryengine/v1/internal/data_store_tracing_connection.cc index 4a0d06ef0c96d..0369c749fc4db 100644 --- a/google/cloud/discoveryengine/v1/internal/data_store_tracing_connection.cc +++ b/google/cloud/discoveryengine/v1/internal/data_store_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DataStoreServiceTracingConnection::DataStoreServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -149,16 +147,12 @@ Status DataStoreServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDataStoreServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/discoveryengine/v1/internal/data_store_tracing_connection.h b/google/cloud/discoveryengine/v1/internal/data_store_tracing_connection.h index bf846f5d6f820..b6f5287cb0ff5 100644 --- a/google/cloud/discoveryengine/v1/internal/data_store_tracing_connection.h +++ b/google/cloud/discoveryengine/v1/internal/data_store_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DataStoreServiceTracingConnection : public discoveryengine_v1::DataStoreServiceConnection { public: @@ -91,8 +89,6 @@ class DataStoreServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/discoveryengine/v1/internal/data_store_tracing_stub.cc b/google/cloud/discoveryengine/v1/internal/data_store_tracing_stub.cc index 0de2d4d8a7cb9..7acc7e6c2a4cc 100644 --- a/google/cloud/discoveryengine/v1/internal/data_store_tracing_stub.cc +++ b/google/cloud/discoveryengine/v1/internal/data_store_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DataStoreServiceTracingStub::DataStoreServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -185,18 +186,14 @@ future DataStoreServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDataStoreServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/data_store_tracing_stub.h b/google/cloud/discoveryengine/v1/internal/data_store_tracing_stub.h index 84684210b514c..6aab740711d6c 100644 --- a/google/cloud/discoveryengine/v1/internal/data_store_tracing_stub.h +++ b/google/cloud/discoveryengine/v1/internal/data_store_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DataStoreServiceTracingStub : public DataStoreServiceStub { public: ~DataStoreServiceTracingStub() override = default; @@ -109,8 +110,6 @@ class DataStoreServiceTracingStub : public DataStoreServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -125,4 +124,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_DATA_STORE_TRACING_STUB_H diff --git a/google/cloud/discoveryengine/v1/internal/document_auth_decorator.cc b/google/cloud/discoveryengine/v1/internal/document_auth_decorator.cc index 0157bcacd7a06..27f9d4a646608 100644 --- a/google/cloud/discoveryengine/v1/internal/document_auth_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/document_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/discoveryengine/v1/document_service.proto #include "google/cloud/discoveryengine/v1/internal/document_auth_decorator.h" -#include +#include "google/cloud/discoveryengine/v1/document_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -206,3 +209,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/document_auth_decorator.h b/google/cloud/discoveryengine/v1/internal/document_auth_decorator.h index f453d9a82bbae..1aa0f6fe29537 100644 --- a/google/cloud/discoveryengine/v1/internal/document_auth_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/document_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/discoveryengine/v1/internal/document_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -129,4 +132,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_DOCUMENT_AUTH_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/document_connection_impl.h b/google/cloud/discoveryengine/v1/internal/document_connection_impl.h index 67a310aebf0e5..ad09378d2d18c 100644 --- a/google/cloud/discoveryengine/v1/internal/document_connection_impl.h +++ b/google/cloud/discoveryengine/v1/internal/document_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/discoveryengine/v1/internal/document_logging_decorator.cc b/google/cloud/discoveryengine/v1/internal/document_logging_decorator.cc index 046f17fe7305f..04d67364ccaaa 100644 --- a/google/cloud/discoveryengine/v1/internal/document_logging_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/document_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/discoveryengine/v1/document_service.proto #include "google/cloud/discoveryengine/v1/internal/document_logging_decorator.h" +#include "google/cloud/discoveryengine/v1/document_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -249,3 +252,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/document_logging_decorator.h b/google/cloud/discoveryengine/v1/internal/document_logging_decorator.h index d723ecbeeb745..07e3f98efb98a 100644 --- a/google/cloud/discoveryengine/v1/internal/document_logging_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/document_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/discoveryengine/v1/internal/document_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -129,4 +132,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_DOCUMENT_LOGGING_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/document_metadata_decorator.cc b/google/cloud/discoveryengine/v1/internal/document_metadata_decorator.cc index 9b2913308adda..12e8c2ec38734 100644 --- a/google/cloud/discoveryengine/v1/internal/document_metadata_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/document_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/discoveryengine/v1/document_service.proto #include "google/cloud/discoveryengine/v1/internal/document_metadata_decorator.h" +#include "google/cloud/discoveryengine/v1/document_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -206,3 +210,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/document_metadata_decorator.h b/google/cloud/discoveryengine/v1/internal/document_metadata_decorator.h index 47d783e65cefd..ffc835dc7fefa 100644 --- a/google/cloud/discoveryengine/v1/internal/document_metadata_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/document_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/discoveryengine/v1/internal/document_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -135,4 +138,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_DOCUMENT_METADATA_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/document_option_defaults.cc b/google/cloud/discoveryengine/v1/internal/document_option_defaults.cc index 11282094b0ef7..d5cc420166a7f 100644 --- a/google/cloud/discoveryengine/v1/internal/document_option_defaults.cc +++ b/google/cloud/discoveryengine/v1/internal/document_option_defaults.cc @@ -42,7 +42,7 @@ Options DocumentServiceDefaultOptions(Options options) { if (!options.has()) { options.set( discoveryengine_v1::DocumentServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/discoveryengine/v1/internal/document_stub.cc b/google/cloud/discoveryengine/v1/internal/document_stub.cc index 1afd2442621eb..3b9ec7b0e83cf 100644 --- a/google/cloud/discoveryengine/v1/internal/document_stub.cc +++ b/google/cloud/discoveryengine/v1/internal/document_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/discoveryengine/v1/document_service.proto #include "google/cloud/discoveryengine/v1/internal/document_stub.h" +#include "google/cloud/discoveryengine/v1/document_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -245,3 +248,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/document_stub.h b/google/cloud/discoveryengine/v1/internal/document_stub.h index 6beea70424212..861d24c332b4c 100644 --- a/google/cloud/discoveryengine/v1/internal/document_stub.h +++ b/google/cloud/discoveryengine/v1/internal/document_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_DOCUMENT_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_DOCUMENT_STUB_H +#include "google/cloud/discoveryengine/v1/document_service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -223,4 +226,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_DOCUMENT_STUB_H diff --git a/google/cloud/discoveryengine/v1/internal/document_stub_factory.cc b/google/cloud/discoveryengine/v1/internal/document_stub_factory.cc index 9bdba67dbe15c..11b41ff711ae1 100644 --- a/google/cloud/discoveryengine/v1/internal/document_stub_factory.cc +++ b/google/cloud/discoveryengine/v1/internal/document_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/discoveryengine/v1/document_service.proto #include "google/cloud/discoveryengine/v1/internal/document_stub_factory.h" +#include "google/cloud/discoveryengine/v1/document_service.grpc.pb.h" #include "google/cloud/discoveryengine/v1/internal/document_auth_decorator.h" #include "google/cloud/discoveryengine/v1/internal/document_logging_decorator.h" #include "google/cloud/discoveryengine/v1/internal/document_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/document_stub_factory.h b/google/cloud/discoveryengine/v1/internal/document_stub_factory.h index eed3fde580c31..1f788c67c989a 100644 --- a/google/cloud/discoveryengine/v1/internal/document_stub_factory.h +++ b/google/cloud/discoveryengine/v1/internal/document_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_DOCUMENT_STUB_FACTORY_H diff --git a/google/cloud/discoveryengine/v1/internal/document_tracing_connection.cc b/google/cloud/discoveryengine/v1/internal/document_tracing_connection.cc index 45ffa8207e82d..b80e319c99443 100644 --- a/google/cloud/discoveryengine/v1/internal/document_tracing_connection.cc +++ b/google/cloud/discoveryengine/v1/internal/document_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DocumentServiceTracingConnection::DocumentServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -177,16 +175,12 @@ Status DocumentServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDocumentServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/discoveryengine/v1/internal/document_tracing_connection.h b/google/cloud/discoveryengine/v1/internal/document_tracing_connection.h index 350dc37e959b3..6717582a37fc5 100644 --- a/google/cloud/discoveryengine/v1/internal/document_tracing_connection.h +++ b/google/cloud/discoveryengine/v1/internal/document_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DocumentServiceTracingConnection : public discoveryengine_v1::DocumentServiceConnection { public: @@ -105,8 +103,6 @@ class DocumentServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/discoveryengine/v1/internal/document_tracing_stub.cc b/google/cloud/discoveryengine/v1/internal/document_tracing_stub.cc index 2023f11c07cea..41d7d7976f467 100644 --- a/google/cloud/discoveryengine/v1/internal/document_tracing_stub.cc +++ b/google/cloud/discoveryengine/v1/internal/document_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DocumentServiceTracingStub::DocumentServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -223,18 +224,14 @@ future DocumentServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDocumentServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/document_tracing_stub.h b/google/cloud/discoveryengine/v1/internal/document_tracing_stub.h index c664b522bb627..1bd450a1170e0 100644 --- a/google/cloud/discoveryengine/v1/internal/document_tracing_stub.h +++ b/google/cloud/discoveryengine/v1/internal/document_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DocumentServiceTracingStub : public DocumentServiceStub { public: ~DocumentServiceTracingStub() override = default; @@ -125,8 +126,6 @@ class DocumentServiceTracingStub : public DocumentServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -141,4 +140,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_DOCUMENT_TRACING_STUB_H diff --git a/google/cloud/discoveryengine/v1/internal/engine_auth_decorator.cc b/google/cloud/discoveryengine/v1/internal/engine_auth_decorator.cc index d5cb0b2c30259..2e7464e0d6c04 100644 --- a/google/cloud/discoveryengine/v1/internal/engine_auth_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/engine_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/discoveryengine/v1/engine_service.proto #include "google/cloud/discoveryengine/v1/internal/engine_auth_decorator.h" -#include +#include "google/cloud/discoveryengine/v1/engine_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -179,3 +182,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/engine_auth_decorator.h b/google/cloud/discoveryengine/v1/internal/engine_auth_decorator.h index 37bea7f19fd56..6b6faf2819df0 100644 --- a/google/cloud/discoveryengine/v1/internal/engine_auth_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/engine_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/discoveryengine/v1/internal/engine_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -112,4 +115,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_ENGINE_AUTH_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/engine_connection_impl.h b/google/cloud/discoveryengine/v1/internal/engine_connection_impl.h index 50011826db5dd..dc05583df4725 100644 --- a/google/cloud/discoveryengine/v1/internal/engine_connection_impl.h +++ b/google/cloud/discoveryengine/v1/internal/engine_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/discoveryengine/v1/internal/engine_logging_decorator.cc b/google/cloud/discoveryengine/v1/internal/engine_logging_decorator.cc index 4dae430faf2eb..5cdc9a875b060 100644 --- a/google/cloud/discoveryengine/v1/internal/engine_logging_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/engine_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/discoveryengine/v1/engine_service.proto #include "google/cloud/discoveryengine/v1/internal/engine_logging_decorator.h" +#include "google/cloud/discoveryengine/v1/engine_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -209,3 +212,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/engine_logging_decorator.h b/google/cloud/discoveryengine/v1/internal/engine_logging_decorator.h index 5b06c27bad3d6..9d0c38fc7763d 100644 --- a/google/cloud/discoveryengine/v1/internal/engine_logging_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/engine_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/discoveryengine/v1/internal/engine_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -112,4 +115,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_ENGINE_LOGGING_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/engine_metadata_decorator.cc b/google/cloud/discoveryengine/v1/internal/engine_metadata_decorator.cc index 7887e8021a255..44956ff23feb7 100644 --- a/google/cloud/discoveryengine/v1/internal/engine_metadata_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/engine_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/discoveryengine/v1/engine_service.proto #include "google/cloud/discoveryengine/v1/internal/engine_metadata_decorator.h" +#include "google/cloud/discoveryengine/v1/engine_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -177,3 +181,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/engine_metadata_decorator.h b/google/cloud/discoveryengine/v1/internal/engine_metadata_decorator.h index 10c0d20333322..b54dd53e2f169 100644 --- a/google/cloud/discoveryengine/v1/internal/engine_metadata_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/engine_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/discoveryengine/v1/internal/engine_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -117,4 +120,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_ENGINE_METADATA_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/engine_option_defaults.cc b/google/cloud/discoveryengine/v1/internal/engine_option_defaults.cc index d9e01d80b6f99..fe4bfed3b168b 100644 --- a/google/cloud/discoveryengine/v1/internal/engine_option_defaults.cc +++ b/google/cloud/discoveryengine/v1/internal/engine_option_defaults.cc @@ -42,7 +42,7 @@ Options EngineServiceDefaultOptions(Options options) { if (!options.has()) { options.set( discoveryengine_v1::EngineServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/discoveryengine/v1/internal/engine_stub.cc b/google/cloud/discoveryengine/v1/internal/engine_stub.cc index 2d15feb2bb232..2576f06c6ee7c 100644 --- a/google/cloud/discoveryengine/v1/internal/engine_stub.cc +++ b/google/cloud/discoveryengine/v1/internal/engine_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/discoveryengine/v1/engine_service.proto #include "google/cloud/discoveryengine/v1/internal/engine_stub.h" +#include "google/cloud/discoveryengine/v1/engine_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -204,3 +207,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/engine_stub.h b/google/cloud/discoveryengine/v1/internal/engine_stub.h index 3b1e021dead75..ce78ca47aa58e 100644 --- a/google/cloud/discoveryengine/v1/internal/engine_stub.h +++ b/google/cloud/discoveryengine/v1/internal/engine_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_ENGINE_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_ENGINE_STUB_H +#include "google/cloud/discoveryengine/v1/engine_service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -188,4 +191,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_ENGINE_STUB_H diff --git a/google/cloud/discoveryengine/v1/internal/engine_stub_factory.cc b/google/cloud/discoveryengine/v1/internal/engine_stub_factory.cc index 98a5a25c1c8e8..ef47fffff5ef2 100644 --- a/google/cloud/discoveryengine/v1/internal/engine_stub_factory.cc +++ b/google/cloud/discoveryengine/v1/internal/engine_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/discoveryengine/v1/engine_service.proto #include "google/cloud/discoveryengine/v1/internal/engine_stub_factory.h" +#include "google/cloud/discoveryengine/v1/engine_service.grpc.pb.h" #include "google/cloud/discoveryengine/v1/internal/engine_auth_decorator.h" #include "google/cloud/discoveryengine/v1/internal/engine_logging_decorator.h" #include "google/cloud/discoveryengine/v1/internal/engine_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/engine_stub_factory.h b/google/cloud/discoveryengine/v1/internal/engine_stub_factory.h index 4a32b266e18ef..9b7f3b4806207 100644 --- a/google/cloud/discoveryengine/v1/internal/engine_stub_factory.h +++ b/google/cloud/discoveryengine/v1/internal/engine_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_ENGINE_STUB_FACTORY_H diff --git a/google/cloud/discoveryengine/v1/internal/engine_tracing_connection.cc b/google/cloud/discoveryengine/v1/internal/engine_tracing_connection.cc index f87adc6628303..bf290baaaf7d9 100644 --- a/google/cloud/discoveryengine/v1/internal/engine_tracing_connection.cc +++ b/google/cloud/discoveryengine/v1/internal/engine_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - EngineServiceTracingConnection::EngineServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -147,16 +145,12 @@ Status EngineServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeEngineServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/discoveryengine/v1/internal/engine_tracing_connection.h b/google/cloud/discoveryengine/v1/internal/engine_tracing_connection.h index 0ca0744ebd2d0..7f973c779e675 100644 --- a/google/cloud/discoveryengine/v1/internal/engine_tracing_connection.h +++ b/google/cloud/discoveryengine/v1/internal/engine_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class EngineServiceTracingConnection : public discoveryengine_v1::EngineServiceConnection { public: @@ -88,8 +86,6 @@ class EngineServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/discoveryengine/v1/internal/engine_tracing_stub.cc b/google/cloud/discoveryengine/v1/internal/engine_tracing_stub.cc index 672c2e3fe17ea..7563a2ab4b293 100644 --- a/google/cloud/discoveryengine/v1/internal/engine_tracing_stub.cc +++ b/google/cloud/discoveryengine/v1/internal/engine_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - EngineServiceTracingStub::EngineServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -180,18 +181,14 @@ future EngineServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeEngineServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/engine_tracing_stub.h b/google/cloud/discoveryengine/v1/internal/engine_tracing_stub.h index fbfeddc505867..b1ca9af855c8f 100644 --- a/google/cloud/discoveryengine/v1/internal/engine_tracing_stub.h +++ b/google/cloud/discoveryengine/v1/internal/engine_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class EngineServiceTracingStub : public EngineServiceStub { public: ~EngineServiceTracingStub() override = default; @@ -107,8 +108,6 @@ class EngineServiceTracingStub : public EngineServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -123,4 +122,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_ENGINE_TRACING_STUB_H diff --git a/google/cloud/discoveryengine/v1/internal/grounded_generation_auth_decorator.cc b/google/cloud/discoveryengine/v1/internal/grounded_generation_auth_decorator.cc index 29b4b91b984c5..71fda9dc9a31b 100644 --- a/google/cloud/discoveryengine/v1/internal/grounded_generation_auth_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/grounded_generation_auth_decorator.cc @@ -17,11 +17,14 @@ // source: google/cloud/discoveryengine/v1/grounded_generation_service.proto #include "google/cloud/discoveryengine/v1/internal/grounded_generation_auth_decorator.h" +#include "google/cloud/discoveryengine/v1/grounded_generation_service.grpc.pb.h" #include "google/cloud/internal/async_read_write_stream_auth.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -101,3 +104,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/grounded_generation_auth_decorator.h b/google/cloud/discoveryengine/v1/internal/grounded_generation_auth_decorator.h index 150af220afc70..25209f554295c 100644 --- a/google/cloud/discoveryengine/v1/internal/grounded_generation_auth_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/grounded_generation_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -80,4 +83,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_GROUNDED_GENERATION_AUTH_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/grounded_generation_logging_decorator.cc b/google/cloud/discoveryengine/v1/internal/grounded_generation_logging_decorator.cc index c5e5e35291e5b..2de2fd74db6d8 100644 --- a/google/cloud/discoveryengine/v1/internal/grounded_generation_logging_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/grounded_generation_logging_decorator.cc @@ -17,15 +17,18 @@ // source: google/cloud/discoveryengine/v1/grounded_generation_service.proto #include "google/cloud/discoveryengine/v1/internal/grounded_generation_logging_decorator.h" +#include "google/cloud/discoveryengine/v1/grounded_generation_service.grpc.pb.h" #include "google/cloud/internal/async_read_write_stream_logging.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -127,3 +130,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/grounded_generation_logging_decorator.h b/google/cloud/discoveryengine/v1/internal/grounded_generation_logging_decorator.h index 2044856c7cf1d..f5210f8da57a6 100644 --- a/google/cloud/discoveryengine/v1/internal/grounded_generation_logging_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/grounded_generation_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -81,4 +84,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_GROUNDED_GENERATION_LOGGING_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/grounded_generation_metadata_decorator.cc b/google/cloud/discoveryengine/v1/internal/grounded_generation_metadata_decorator.cc index 8e71cb18328b0..059e2329fbbd8 100644 --- a/google/cloud/discoveryengine/v1/internal/grounded_generation_metadata_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/grounded_generation_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/discoveryengine/v1/grounded_generation_service.proto #include "google/cloud/discoveryengine/v1/internal/grounded_generation_metadata_decorator.h" +#include "google/cloud/discoveryengine/v1/grounded_generation_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -120,3 +124,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/grounded_generation_metadata_decorator.h b/google/cloud/discoveryengine/v1/internal/grounded_generation_metadata_decorator.h index 424ea76a28ef6..8b493c8eb0bbe 100644 --- a/google/cloud/discoveryengine/v1/internal/grounded_generation_metadata_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/grounded_generation_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -86,4 +89,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_GROUNDED_GENERATION_METADATA_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/grounded_generation_option_defaults.cc b/google/cloud/discoveryengine/v1/internal/grounded_generation_option_defaults.cc index 76561b98b1788..3327a7eff06c5 100644 --- a/google/cloud/discoveryengine/v1/internal/grounded_generation_option_defaults.cc +++ b/google/cloud/discoveryengine/v1/internal/grounded_generation_option_defaults.cc @@ -44,7 +44,7 @@ Options GroundedGenerationServiceDefaultOptions(Options options) { discoveryengine_v1::GroundedGenerationServiceRetryPolicyOption>()) { options.set( discoveryengine_v1::GroundedGenerationServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/discoveryengine/v1/internal/grounded_generation_stub.cc b/google/cloud/discoveryengine/v1/internal/grounded_generation_stub.cc index 694185d99ba1c..c6337d729a4d2 100644 --- a/google/cloud/discoveryengine/v1/internal/grounded_generation_stub.cc +++ b/google/cloud/discoveryengine/v1/internal/grounded_generation_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/discoveryengine/v1/grounded_generation_service.proto #include "google/cloud/discoveryengine/v1/internal/grounded_generation_stub.h" +#include "google/cloud/discoveryengine/v1/grounded_generation_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/internal/async_read_write_stream_impl.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -113,3 +116,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/grounded_generation_stub.h b/google/cloud/discoveryengine/v1/internal/grounded_generation_stub.h index 233077c490a53..b42f2de9254d9 100644 --- a/google/cloud/discoveryengine/v1/internal/grounded_generation_stub.h +++ b/google/cloud/discoveryengine/v1/internal/grounded_generation_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_GROUNDED_GENERATION_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_GROUNDED_GENERATION_STUB_H +#include "google/cloud/discoveryengine/v1/grounded_generation_service.grpc.pb.h" #include "google/cloud/async_streaming_read_write_rpc.h" #include "google/cloud/completion_queue.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -129,4 +132,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_GROUNDED_GENERATION_STUB_H diff --git a/google/cloud/discoveryengine/v1/internal/grounded_generation_stub_factory.cc b/google/cloud/discoveryengine/v1/internal/grounded_generation_stub_factory.cc index 6e3cf8ce27cf7..553278f5bbb97 100644 --- a/google/cloud/discoveryengine/v1/internal/grounded_generation_stub_factory.cc +++ b/google/cloud/discoveryengine/v1/internal/grounded_generation_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/discoveryengine/v1/grounded_generation_service.proto #include "google/cloud/discoveryengine/v1/internal/grounded_generation_stub_factory.h" +#include "google/cloud/discoveryengine/v1/grounded_generation_service.grpc.pb.h" #include "google/cloud/discoveryengine/v1/internal/grounded_generation_auth_decorator.h" #include "google/cloud/discoveryengine/v1/internal/grounded_generation_logging_decorator.h" #include "google/cloud/discoveryengine/v1/internal/grounded_generation_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/grounded_generation_stub_factory.h b/google/cloud/discoveryengine/v1/internal/grounded_generation_stub_factory.h index dd0956ae219e2..35bce94e27515 100644 --- a/google/cloud/discoveryengine/v1/internal/grounded_generation_stub_factory.h +++ b/google/cloud/discoveryengine/v1/internal/grounded_generation_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_GROUNDED_GENERATION_STUB_FACTORY_H diff --git a/google/cloud/discoveryengine/v1/internal/grounded_generation_tracing_connection.cc b/google/cloud/discoveryengine/v1/internal/grounded_generation_tracing_connection.cc index 5cc3ce76790f9..2d16b7ab4a4f7 100644 --- a/google/cloud/discoveryengine/v1/internal/grounded_generation_tracing_connection.cc +++ b/google/cloud/discoveryengine/v1/internal/grounded_generation_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GroundedGenerationServiceTracingConnection:: GroundedGenerationServiceTracingConnection( std::shared_ptr @@ -94,18 +92,14 @@ Status GroundedGenerationServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeGroundedGenerationServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/discoveryengine/v1/internal/grounded_generation_tracing_connection.h b/google/cloud/discoveryengine/v1/internal/grounded_generation_tracing_connection.h index 0718b7e359230..489748bc3e3c7 100644 --- a/google/cloud/discoveryengine/v1/internal/grounded_generation_tracing_connection.h +++ b/google/cloud/discoveryengine/v1/internal/grounded_generation_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class GroundedGenerationServiceTracingConnection : public discoveryengine_v1::GroundedGenerationServiceConnection { public: @@ -70,8 +68,6 @@ class GroundedGenerationServiceTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/discoveryengine/v1/internal/grounded_generation_tracing_stub.cc b/google/cloud/discoveryengine/v1/internal/grounded_generation_tracing_stub.cc index dffa19aed231f..58b0236294099 100644 --- a/google/cloud/discoveryengine/v1/internal/grounded_generation_tracing_stub.cc +++ b/google/cloud/discoveryengine/v1/internal/grounded_generation_tracing_stub.cc @@ -22,13 +22,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GroundedGenerationServiceTracingStub::GroundedGenerationServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -118,20 +119,16 @@ Status GroundedGenerationServiceTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeGroundedGenerationServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared( std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/grounded_generation_tracing_stub.h b/google/cloud/discoveryengine/v1/internal/grounded_generation_tracing_stub.h index 5a9c30d30cb0a..4c8afdb775c21 100644 --- a/google/cloud/discoveryengine/v1/internal/grounded_generation_tracing_stub.h +++ b/google/cloud/discoveryengine/v1/internal/grounded_generation_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class GroundedGenerationServiceTracingStub : public GroundedGenerationServiceStub { public: @@ -78,8 +79,6 @@ class GroundedGenerationServiceTracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -95,4 +94,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_GROUNDED_GENERATION_TRACING_STUB_H diff --git a/google/cloud/discoveryengine/v1/internal/project_auth_decorator.cc b/google/cloud/discoveryengine/v1/internal/project_auth_decorator.cc index 0ca6a327ea1bb..747e4c643a9d1 100644 --- a/google/cloud/discoveryengine/v1/internal/project_auth_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/project_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/discoveryengine/v1/project_service.proto #include "google/cloud/discoveryengine/v1/internal/project_auth_decorator.h" -#include +#include "google/cloud/discoveryengine/v1/project_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -126,3 +129,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/project_auth_decorator.h b/google/cloud/discoveryengine/v1/internal/project_auth_decorator.h index be5cc030ae373..d7c17fdd8b842 100644 --- a/google/cloud/discoveryengine/v1/internal/project_auth_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/project_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/discoveryengine/v1/internal/project_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -85,4 +88,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_PROJECT_AUTH_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/project_connection_impl.h b/google/cloud/discoveryengine/v1/internal/project_connection_impl.h index 59f70bce44f88..bb6378aff04e9 100644 --- a/google/cloud/discoveryengine/v1/internal/project_connection_impl.h +++ b/google/cloud/discoveryengine/v1/internal/project_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/discoveryengine/v1/internal/project_logging_decorator.cc b/google/cloud/discoveryengine/v1/internal/project_logging_decorator.cc index e4325fab2a566..b95fd8347d4cc 100644 --- a/google/cloud/discoveryengine/v1/internal/project_logging_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/project_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/discoveryengine/v1/project_service.proto #include "google/cloud/discoveryengine/v1/internal/project_logging_decorator.h" +#include "google/cloud/discoveryengine/v1/project_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -142,3 +145,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/project_logging_decorator.h b/google/cloud/discoveryengine/v1/internal/project_logging_decorator.h index 1b753de110d96..4352266f55980 100644 --- a/google/cloud/discoveryengine/v1/internal/project_logging_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/project_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/discoveryengine/v1/internal/project_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -85,4 +88,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_PROJECT_LOGGING_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/project_metadata_decorator.cc b/google/cloud/discoveryengine/v1/internal/project_metadata_decorator.cc index d3ee74b157bb9..82de8f92ae877 100644 --- a/google/cloud/discoveryengine/v1/internal/project_metadata_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/project_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/discoveryengine/v1/project_service.proto #include "google/cloud/discoveryengine/v1/internal/project_metadata_decorator.h" +#include "google/cloud/discoveryengine/v1/project_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -132,3 +136,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/project_metadata_decorator.h b/google/cloud/discoveryengine/v1/internal/project_metadata_decorator.h index 4fd4ef9d9584b..c535d4ac7c1cb 100644 --- a/google/cloud/discoveryengine/v1/internal/project_metadata_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/project_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/discoveryengine/v1/internal/project_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -90,4 +93,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_PROJECT_METADATA_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/project_option_defaults.cc b/google/cloud/discoveryengine/v1/internal/project_option_defaults.cc index 8b07e30b875ae..609ac06d551ca 100644 --- a/google/cloud/discoveryengine/v1/internal/project_option_defaults.cc +++ b/google/cloud/discoveryengine/v1/internal/project_option_defaults.cc @@ -42,7 +42,7 @@ Options ProjectServiceDefaultOptions(Options options) { if (!options.has()) { options.set( discoveryengine_v1::ProjectServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/discoveryengine/v1/internal/project_stub.cc b/google/cloud/discoveryengine/v1/internal/project_stub.cc index 5d59bf7362b49..6385dc07c8fc6 100644 --- a/google/cloud/discoveryengine/v1/internal/project_stub.cc +++ b/google/cloud/discoveryengine/v1/internal/project_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/discoveryengine/v1/project_service.proto #include "google/cloud/discoveryengine/v1/internal/project_stub.h" +#include "google/cloud/discoveryengine/v1/project_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -142,3 +145,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/project_stub.h b/google/cloud/discoveryengine/v1/internal/project_stub.h index fd6da5e8aaa5a..1590fe97c0ca1 100644 --- a/google/cloud/discoveryengine/v1/internal/project_stub.h +++ b/google/cloud/discoveryengine/v1/internal/project_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_PROJECT_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_PROJECT_STUB_H +#include "google/cloud/discoveryengine/v1/project_service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -136,4 +139,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_PROJECT_STUB_H diff --git a/google/cloud/discoveryengine/v1/internal/project_stub_factory.cc b/google/cloud/discoveryengine/v1/internal/project_stub_factory.cc index e2ca3b19a60cf..437ea774ff465 100644 --- a/google/cloud/discoveryengine/v1/internal/project_stub_factory.cc +++ b/google/cloud/discoveryengine/v1/internal/project_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/discoveryengine/v1/internal/project_metadata_decorator.h" #include "google/cloud/discoveryengine/v1/internal/project_stub.h" #include "google/cloud/discoveryengine/v1/internal/project_tracing_stub.h" +#include "google/cloud/discoveryengine/v1/project_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/project_stub_factory.h b/google/cloud/discoveryengine/v1/internal/project_stub_factory.h index e35a5c9f5d9ba..8cef778ac3dc0 100644 --- a/google/cloud/discoveryengine/v1/internal/project_stub_factory.h +++ b/google/cloud/discoveryengine/v1/internal/project_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_PROJECT_STUB_FACTORY_H diff --git a/google/cloud/discoveryengine/v1/internal/project_tracing_connection.cc b/google/cloud/discoveryengine/v1/internal/project_tracing_connection.cc index 6211f5c509f5e..a4b2c9d793acb 100644 --- a/google/cloud/discoveryengine/v1/internal/project_tracing_connection.cc +++ b/google/cloud/discoveryengine/v1/internal/project_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ProjectServiceTracingConnection::ProjectServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -93,16 +91,12 @@ Status ProjectServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeProjectServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/discoveryengine/v1/internal/project_tracing_connection.h b/google/cloud/discoveryengine/v1/internal/project_tracing_connection.h index 44b0319842f06..2b9e4172cb7f5 100644 --- a/google/cloud/discoveryengine/v1/internal/project_tracing_connection.h +++ b/google/cloud/discoveryengine/v1/internal/project_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ProjectServiceTracingConnection : public discoveryengine_v1::ProjectServiceConnection { public: @@ -66,8 +64,6 @@ class ProjectServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/discoveryengine/v1/internal/project_tracing_stub.cc b/google/cloud/discoveryengine/v1/internal/project_tracing_stub.cc index aff9e88719194..e6334e5cc1f18 100644 --- a/google/cloud/discoveryengine/v1/internal/project_tracing_stub.cc +++ b/google/cloud/discoveryengine/v1/internal/project_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ProjectServiceTracingStub::ProjectServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -124,18 +125,14 @@ future ProjectServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeProjectServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/project_tracing_stub.h b/google/cloud/discoveryengine/v1/internal/project_tracing_stub.h index 99bce2b450fc9..18bbbdf75800a 100644 --- a/google/cloud/discoveryengine/v1/internal/project_tracing_stub.h +++ b/google/cloud/discoveryengine/v1/internal/project_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ProjectServiceTracingStub : public ProjectServiceStub { public: ~ProjectServiceTracingStub() override = default; @@ -80,8 +81,6 @@ class ProjectServiceTracingStub : public ProjectServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -96,4 +95,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_PROJECT_TRACING_STUB_H diff --git a/google/cloud/discoveryengine/v1/internal/rank_auth_decorator.cc b/google/cloud/discoveryengine/v1/internal/rank_auth_decorator.cc index afbd02d36ac8f..37d2d5a7f08e2 100644 --- a/google/cloud/discoveryengine/v1/internal/rank_auth_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/rank_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/discoveryengine/v1/rank_service.proto #include "google/cloud/discoveryengine/v1/internal/rank_auth_decorator.h" -#include +#include "google/cloud/discoveryengine/v1/rank_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -69,3 +72,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/rank_auth_decorator.h b/google/cloud/discoveryengine/v1/internal/rank_auth_decorator.h index 0a5464f04d85e..9bade3abaaffc 100644 --- a/google/cloud/discoveryengine/v1/internal/rank_auth_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/rank_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -64,4 +67,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_RANK_AUTH_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/rank_logging_decorator.cc b/google/cloud/discoveryengine/v1/internal/rank_logging_decorator.cc index a46b891a73321..4f16ade48a53e 100644 --- a/google/cloud/discoveryengine/v1/internal/rank_logging_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/rank_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/discoveryengine/v1/rank_service.proto #include "google/cloud/discoveryengine/v1/internal/rank_logging_decorator.h" +#include "google/cloud/discoveryengine/v1/rank_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -85,3 +88,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/rank_logging_decorator.h b/google/cloud/discoveryengine/v1/internal/rank_logging_decorator.h index 7ac257e0a45bb..a85e260d485b1 100644 --- a/google/cloud/discoveryengine/v1/internal/rank_logging_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/rank_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -64,4 +67,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_RANK_LOGGING_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/rank_metadata_decorator.cc b/google/cloud/discoveryengine/v1/internal/rank_metadata_decorator.cc index 8ae9eb26bedf6..60a114f59487d 100644 --- a/google/cloud/discoveryengine/v1/internal/rank_metadata_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/rank_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/discoveryengine/v1/rank_service.proto #include "google/cloud/discoveryengine/v1/internal/rank_metadata_decorator.h" +#include "google/cloud/discoveryengine/v1/rank_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -96,3 +100,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/rank_metadata_decorator.h b/google/cloud/discoveryengine/v1/internal/rank_metadata_decorator.h index 665e333c6911f..aec17ad29bcdc 100644 --- a/google/cloud/discoveryengine/v1/internal/rank_metadata_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/rank_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -69,4 +72,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_RANK_METADATA_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/rank_option_defaults.cc b/google/cloud/discoveryengine/v1/internal/rank_option_defaults.cc index 8ee48757d614b..d52d6a5df776f 100644 --- a/google/cloud/discoveryengine/v1/internal/rank_option_defaults.cc +++ b/google/cloud/discoveryengine/v1/internal/rank_option_defaults.cc @@ -42,7 +42,7 @@ Options RankServiceDefaultOptions(Options options) { if (!options.has()) { options.set( discoveryengine_v1::RankServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/discoveryengine/v1/internal/rank_stub.cc b/google/cloud/discoveryengine/v1/internal/rank_stub.cc index c1698914f47f7..1caf53d560ef6 100644 --- a/google/cloud/discoveryengine/v1/internal/rank_stub.cc +++ b/google/cloud/discoveryengine/v1/internal/rank_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/discoveryengine/v1/rank_service.proto #include "google/cloud/discoveryengine/v1/internal/rank_stub.h" +#include "google/cloud/discoveryengine/v1/rank_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -80,3 +83,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/rank_stub.h b/google/cloud/discoveryengine/v1/internal/rank_stub.h index e5de4b4515e43..94080df166678 100644 --- a/google/cloud/discoveryengine/v1/internal/rank_stub.h +++ b/google/cloud/discoveryengine/v1/internal/rank_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_RANK_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_RANK_STUB_H +#include "google/cloud/discoveryengine/v1/rank_service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -93,4 +96,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_RANK_STUB_H diff --git a/google/cloud/discoveryengine/v1/internal/rank_stub_factory.cc b/google/cloud/discoveryengine/v1/internal/rank_stub_factory.cc index 3560b93aac2a8..d3cebb6e25942 100644 --- a/google/cloud/discoveryengine/v1/internal/rank_stub_factory.cc +++ b/google/cloud/discoveryengine/v1/internal/rank_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/discoveryengine/v1/internal/rank_metadata_decorator.h" #include "google/cloud/discoveryengine/v1/internal/rank_stub.h" #include "google/cloud/discoveryengine/v1/internal/rank_tracing_stub.h" +#include "google/cloud/discoveryengine/v1/rank_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/rank_stub_factory.h b/google/cloud/discoveryengine/v1/internal/rank_stub_factory.h index 2f79455adbbc6..b834298759679 100644 --- a/google/cloud/discoveryengine/v1/internal/rank_stub_factory.h +++ b/google/cloud/discoveryengine/v1/internal/rank_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_RANK_STUB_FACTORY_H diff --git a/google/cloud/discoveryengine/v1/internal/rank_tracing_connection.cc b/google/cloud/discoveryengine/v1/internal/rank_tracing_connection.cc index 4c65538171c5f..f711b61875daf 100644 --- a/google/cloud/discoveryengine/v1/internal/rank_tracing_connection.cc +++ b/google/cloud/discoveryengine/v1/internal/rank_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RankServiceTracingConnection::RankServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -70,16 +68,12 @@ Status RankServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRankServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/discoveryengine/v1/internal/rank_tracing_connection.h b/google/cloud/discoveryengine/v1/internal/rank_tracing_connection.h index 01b3665491011..a17a417f016e4 100644 --- a/google/cloud/discoveryengine/v1/internal/rank_tracing_connection.h +++ b/google/cloud/discoveryengine/v1/internal/rank_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RankServiceTracingConnection : public discoveryengine_v1::RankServiceConnection { public: @@ -56,8 +54,6 @@ class RankServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/discoveryengine/v1/internal/rank_tracing_stub.cc b/google/cloud/discoveryengine/v1/internal/rank_tracing_stub.cc index 45ff8ecd3f45e..ac734cb326895 100644 --- a/google/cloud/discoveryengine/v1/internal/rank_tracing_stub.cc +++ b/google/cloud/discoveryengine/v1/internal/rank_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RankServiceTracingStub::RankServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -78,18 +79,14 @@ Status RankServiceTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRankServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/rank_tracing_stub.h b/google/cloud/discoveryengine/v1/internal/rank_tracing_stub.h index a908ee498afba..891ca565f5926 100644 --- a/google/cloud/discoveryengine/v1/internal/rank_tracing_stub.h +++ b/google/cloud/discoveryengine/v1/internal/rank_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RankServiceTracingStub : public RankServiceStub { public: ~RankServiceTracingStub() override = default; @@ -60,8 +61,6 @@ class RankServiceTracingStub : public RankServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -76,4 +75,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_RANK_TRACING_STUB_H diff --git a/google/cloud/discoveryengine/v1/internal/recommendation_auth_decorator.cc b/google/cloud/discoveryengine/v1/internal/recommendation_auth_decorator.cc index ff5b4c990c09f..46a442ba76476 100644 --- a/google/cloud/discoveryengine/v1/internal/recommendation_auth_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/recommendation_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/discoveryengine/v1/recommendation_service.proto #include "google/cloud/discoveryengine/v1/internal/recommendation_auth_decorator.h" -#include +#include "google/cloud/discoveryengine/v1/recommendation_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/recommendation_auth_decorator.h b/google/cloud/discoveryengine/v1/internal/recommendation_auth_decorator.h index 27f756c14d3f9..0f76a383e8a88 100644 --- a/google/cloud/discoveryengine/v1/internal/recommendation_auth_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/recommendation_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -65,4 +68,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_RECOMMENDATION_AUTH_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/recommendation_logging_decorator.cc b/google/cloud/discoveryengine/v1/internal/recommendation_logging_decorator.cc index c76c42f255714..957b6f410ca1b 100644 --- a/google/cloud/discoveryengine/v1/internal/recommendation_logging_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/recommendation_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/discoveryengine/v1/recommendation_service.proto #include "google/cloud/discoveryengine/v1/internal/recommendation_logging_decorator.h" +#include "google/cloud/discoveryengine/v1/recommendation_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -87,3 +90,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/recommendation_logging_decorator.h b/google/cloud/discoveryengine/v1/internal/recommendation_logging_decorator.h index 3539071e225bb..ed76f10ece32a 100644 --- a/google/cloud/discoveryengine/v1/internal/recommendation_logging_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/recommendation_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -65,4 +68,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_RECOMMENDATION_LOGGING_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/recommendation_metadata_decorator.cc b/google/cloud/discoveryengine/v1/internal/recommendation_metadata_decorator.cc index 165a96d52dbd6..8c0de408028cf 100644 --- a/google/cloud/discoveryengine/v1/internal/recommendation_metadata_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/recommendation_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/discoveryengine/v1/recommendation_service.proto #include "google/cloud/discoveryengine/v1/internal/recommendation_metadata_decorator.h" +#include "google/cloud/discoveryengine/v1/recommendation_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -97,3 +101,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/recommendation_metadata_decorator.h b/google/cloud/discoveryengine/v1/internal/recommendation_metadata_decorator.h index f33a6e2e829b9..dd43f59d72681 100644 --- a/google/cloud/discoveryengine/v1/internal/recommendation_metadata_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/recommendation_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -71,4 +74,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_RECOMMENDATION_METADATA_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/recommendation_option_defaults.cc b/google/cloud/discoveryengine/v1/internal/recommendation_option_defaults.cc index ac0ac120a1158..00a2911b57950 100644 --- a/google/cloud/discoveryengine/v1/internal/recommendation_option_defaults.cc +++ b/google/cloud/discoveryengine/v1/internal/recommendation_option_defaults.cc @@ -43,7 +43,7 @@ Options RecommendationServiceDefaultOptions(Options options) { .has()) { options.set( discoveryengine_v1::RecommendationServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/discoveryengine/v1/internal/recommendation_stub.cc b/google/cloud/discoveryengine/v1/internal/recommendation_stub.cc index 5368fdb04542a..35d7dc5915ce8 100644 --- a/google/cloud/discoveryengine/v1/internal/recommendation_stub.cc +++ b/google/cloud/discoveryengine/v1/internal/recommendation_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/discoveryengine/v1/recommendation_service.proto #include "google/cloud/discoveryengine/v1/internal/recommendation_stub.h" +#include "google/cloud/discoveryengine/v1/recommendation_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -81,3 +84,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/recommendation_stub.h b/google/cloud/discoveryengine/v1/internal/recommendation_stub.h index 06e9005151068..b8fc547b12fe0 100644 --- a/google/cloud/discoveryengine/v1/internal/recommendation_stub.h +++ b/google/cloud/discoveryengine/v1/internal/recommendation_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_RECOMMENDATION_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_RECOMMENDATION_STUB_H +#include "google/cloud/discoveryengine/v1/recommendation_service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -95,4 +98,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_RECOMMENDATION_STUB_H diff --git a/google/cloud/discoveryengine/v1/internal/recommendation_stub_factory.cc b/google/cloud/discoveryengine/v1/internal/recommendation_stub_factory.cc index aa5321901a2de..0dc1a4f399222 100644 --- a/google/cloud/discoveryengine/v1/internal/recommendation_stub_factory.cc +++ b/google/cloud/discoveryengine/v1/internal/recommendation_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/discoveryengine/v1/internal/recommendation_metadata_decorator.h" #include "google/cloud/discoveryengine/v1/internal/recommendation_stub.h" #include "google/cloud/discoveryengine/v1/internal/recommendation_tracing_stub.h" +#include "google/cloud/discoveryengine/v1/recommendation_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/recommendation_stub_factory.h b/google/cloud/discoveryengine/v1/internal/recommendation_stub_factory.h index c8be7623bbd50..4f8b7a2502cf3 100644 --- a/google/cloud/discoveryengine/v1/internal/recommendation_stub_factory.h +++ b/google/cloud/discoveryengine/v1/internal/recommendation_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_RECOMMENDATION_STUB_FACTORY_H diff --git a/google/cloud/discoveryengine/v1/internal/recommendation_tracing_connection.cc b/google/cloud/discoveryengine/v1/internal/recommendation_tracing_connection.cc index 56ebdb8f20fe0..81e4bdeb159bd 100644 --- a/google/cloud/discoveryengine/v1/internal/recommendation_tracing_connection.cc +++ b/google/cloud/discoveryengine/v1/internal/recommendation_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RecommendationServiceTracingConnection::RecommendationServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -70,17 +68,13 @@ Status RecommendationServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRecommendationServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/discoveryengine/v1/internal/recommendation_tracing_connection.h b/google/cloud/discoveryengine/v1/internal/recommendation_tracing_connection.h index a0165b3e9cbc5..3e55702f26f7f 100644 --- a/google/cloud/discoveryengine/v1/internal/recommendation_tracing_connection.h +++ b/google/cloud/discoveryengine/v1/internal/recommendation_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RecommendationServiceTracingConnection : public discoveryengine_v1::RecommendationServiceConnection { public: @@ -58,8 +56,6 @@ class RecommendationServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/discoveryengine/v1/internal/recommendation_tracing_stub.cc b/google/cloud/discoveryengine/v1/internal/recommendation_tracing_stub.cc index f3fa9ca14c512..257543b5da1fa 100644 --- a/google/cloud/discoveryengine/v1/internal/recommendation_tracing_stub.cc +++ b/google/cloud/discoveryengine/v1/internal/recommendation_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RecommendationServiceTracingStub::RecommendationServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -81,18 +82,14 @@ Status RecommendationServiceTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRecommendationServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/recommendation_tracing_stub.h b/google/cloud/discoveryengine/v1/internal/recommendation_tracing_stub.h index a2918b9e3b2bf..697e4ea04e73e 100644 --- a/google/cloud/discoveryengine/v1/internal/recommendation_tracing_stub.h +++ b/google/cloud/discoveryengine/v1/internal/recommendation_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RecommendationServiceTracingStub : public RecommendationServiceStub { public: ~RecommendationServiceTracingStub() override = default; @@ -62,8 +63,6 @@ class RecommendationServiceTracingStub : public RecommendationServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -78,4 +77,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_RECOMMENDATION_TRACING_STUB_H diff --git a/google/cloud/discoveryengine/v1/internal/schema_auth_decorator.cc b/google/cloud/discoveryengine/v1/internal/schema_auth_decorator.cc index bc5e120e6ad98..b6266b65a8c2d 100644 --- a/google/cloud/discoveryengine/v1/internal/schema_auth_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/schema_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/discoveryengine/v1/schema_service.proto #include "google/cloud/discoveryengine/v1/internal/schema_auth_decorator.h" -#include +#include "google/cloud/discoveryengine/v1/schema_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -198,3 +201,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/schema_auth_decorator.h b/google/cloud/discoveryengine/v1/internal/schema_auth_decorator.h index ebb9e62f60b82..6a928db420471 100644 --- a/google/cloud/discoveryengine/v1/internal/schema_auth_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/schema_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/discoveryengine/v1/internal/schema_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -119,4 +122,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_SCHEMA_AUTH_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/schema_connection_impl.h b/google/cloud/discoveryengine/v1/internal/schema_connection_impl.h index 08a153668f18c..a6cef5b41853a 100644 --- a/google/cloud/discoveryengine/v1/internal/schema_connection_impl.h +++ b/google/cloud/discoveryengine/v1/internal/schema_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/discoveryengine/v1/internal/schema_logging_decorator.cc b/google/cloud/discoveryengine/v1/internal/schema_logging_decorator.cc index 34bf0c2c3e9fb..78dac25d1d967 100644 --- a/google/cloud/discoveryengine/v1/internal/schema_logging_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/schema_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/discoveryengine/v1/schema_service.proto #include "google/cloud/discoveryengine/v1/internal/schema_logging_decorator.h" +#include "google/cloud/discoveryengine/v1/schema_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -227,3 +230,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/schema_logging_decorator.h b/google/cloud/discoveryengine/v1/internal/schema_logging_decorator.h index 51d498631cffb..91cdff595395e 100644 --- a/google/cloud/discoveryengine/v1/internal/schema_logging_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/schema_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/discoveryengine/v1/internal/schema_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -119,4 +122,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_SCHEMA_LOGGING_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/schema_metadata_decorator.cc b/google/cloud/discoveryengine/v1/internal/schema_metadata_decorator.cc index 83a10a84ac4d4..30d4ccb9c26c3 100644 --- a/google/cloud/discoveryengine/v1/internal/schema_metadata_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/schema_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/discoveryengine/v1/schema_service.proto #include "google/cloud/discoveryengine/v1/internal/schema_metadata_decorator.h" +#include "google/cloud/discoveryengine/v1/schema_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -189,3 +193,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/schema_metadata_decorator.h b/google/cloud/discoveryengine/v1/internal/schema_metadata_decorator.h index 36869f36a7b74..2715f0335db2a 100644 --- a/google/cloud/discoveryengine/v1/internal/schema_metadata_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/schema_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/discoveryengine/v1/internal/schema_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -124,4 +127,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_SCHEMA_METADATA_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/schema_option_defaults.cc b/google/cloud/discoveryengine/v1/internal/schema_option_defaults.cc index ce83dfbe2ea34..11264c0970839 100644 --- a/google/cloud/discoveryengine/v1/internal/schema_option_defaults.cc +++ b/google/cloud/discoveryengine/v1/internal/schema_option_defaults.cc @@ -42,7 +42,7 @@ Options SchemaServiceDefaultOptions(Options options) { if (!options.has()) { options.set( discoveryengine_v1::SchemaServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/discoveryengine/v1/internal/schema_stub.cc b/google/cloud/discoveryengine/v1/internal/schema_stub.cc index 833fb62641cec..2b41ca703da67 100644 --- a/google/cloud/discoveryengine/v1/internal/schema_stub.cc +++ b/google/cloud/discoveryengine/v1/internal/schema_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/discoveryengine/v1/schema_service.proto #include "google/cloud/discoveryengine/v1/internal/schema_stub.h" +#include "google/cloud/discoveryengine/v1/schema_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -222,3 +225,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/schema_stub.h b/google/cloud/discoveryengine/v1/internal/schema_stub.h index 9df5d222e280c..a641909b0115a 100644 --- a/google/cloud/discoveryengine/v1/internal/schema_stub.h +++ b/google/cloud/discoveryengine/v1/internal/schema_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_SCHEMA_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_SCHEMA_STUB_H +#include "google/cloud/discoveryengine/v1/schema_service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -202,4 +205,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_SCHEMA_STUB_H diff --git a/google/cloud/discoveryengine/v1/internal/schema_stub_factory.cc b/google/cloud/discoveryengine/v1/internal/schema_stub_factory.cc index 9173a97a662ce..1fea5ac925d4d 100644 --- a/google/cloud/discoveryengine/v1/internal/schema_stub_factory.cc +++ b/google/cloud/discoveryengine/v1/internal/schema_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/discoveryengine/v1/internal/schema_metadata_decorator.h" #include "google/cloud/discoveryengine/v1/internal/schema_stub.h" #include "google/cloud/discoveryengine/v1/internal/schema_tracing_stub.h" +#include "google/cloud/discoveryengine/v1/schema_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/schema_stub_factory.h b/google/cloud/discoveryengine/v1/internal/schema_stub_factory.h index 4818a43486c56..67f48c45da346 100644 --- a/google/cloud/discoveryengine/v1/internal/schema_stub_factory.h +++ b/google/cloud/discoveryengine/v1/internal/schema_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_SCHEMA_STUB_FACTORY_H diff --git a/google/cloud/discoveryengine/v1/internal/schema_tracing_connection.cc b/google/cloud/discoveryengine/v1/internal/schema_tracing_connection.cc index 157ba629ae1e1..a2327a7e60345 100644 --- a/google/cloud/discoveryengine/v1/internal/schema_tracing_connection.cc +++ b/google/cloud/discoveryengine/v1/internal/schema_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SchemaServiceTracingConnection::SchemaServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -166,16 +164,12 @@ Status SchemaServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSchemaServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/discoveryengine/v1/internal/schema_tracing_connection.h b/google/cloud/discoveryengine/v1/internal/schema_tracing_connection.h index a24d8204ab138..8eb7ab8180172 100644 --- a/google/cloud/discoveryengine/v1/internal/schema_tracing_connection.h +++ b/google/cloud/discoveryengine/v1/internal/schema_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SchemaServiceTracingConnection : public discoveryengine_v1::SchemaServiceConnection { public: @@ -96,8 +94,6 @@ class SchemaServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/discoveryengine/v1/internal/schema_tracing_stub.cc b/google/cloud/discoveryengine/v1/internal/schema_tracing_stub.cc index fba3138c5a9c8..9c4a35487b45a 100644 --- a/google/cloud/discoveryengine/v1/internal/schema_tracing_stub.cc +++ b/google/cloud/discoveryengine/v1/internal/schema_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SchemaServiceTracingStub::SchemaServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -193,18 +194,14 @@ future SchemaServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSchemaServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/schema_tracing_stub.h b/google/cloud/discoveryengine/v1/internal/schema_tracing_stub.h index 00d91f29f4ee4..3797aecfe6407 100644 --- a/google/cloud/discoveryengine/v1/internal/schema_tracing_stub.h +++ b/google/cloud/discoveryengine/v1/internal/schema_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SchemaServiceTracingStub : public SchemaServiceStub { public: ~SchemaServiceTracingStub() override = default; @@ -114,8 +115,6 @@ class SchemaServiceTracingStub : public SchemaServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -130,4 +129,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_SCHEMA_TRACING_STUB_H diff --git a/google/cloud/discoveryengine/v1/internal/search_auth_decorator.cc b/google/cloud/discoveryengine/v1/internal/search_auth_decorator.cc index 23c4d6e7409eb..976a03f05bcad 100644 --- a/google/cloud/discoveryengine/v1/internal/search_auth_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/search_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/discoveryengine/v1/search_service.proto #include "google/cloud/discoveryengine/v1/internal/search_auth_decorator.h" -#include +#include "google/cloud/discoveryengine/v1/search_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -78,3 +81,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/search_auth_decorator.h b/google/cloud/discoveryengine/v1/internal/search_auth_decorator.h index 3196840aa802b..96b2d339bdb64 100644 --- a/google/cloud/discoveryengine/v1/internal/search_auth_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/search_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -70,4 +73,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_SEARCH_AUTH_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/search_logging_decorator.cc b/google/cloud/discoveryengine/v1/internal/search_logging_decorator.cc index 7ce4583aabb54..e45f8e85979b6 100644 --- a/google/cloud/discoveryengine/v1/internal/search_logging_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/search_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/discoveryengine/v1/search_service.proto #include "google/cloud/discoveryengine/v1/internal/search_logging_decorator.h" +#include "google/cloud/discoveryengine/v1/search_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -97,3 +100,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/search_logging_decorator.h b/google/cloud/discoveryengine/v1/internal/search_logging_decorator.h index 6894995cae1be..59f6fd856f46d 100644 --- a/google/cloud/discoveryengine/v1/internal/search_logging_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/search_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -70,4 +73,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_SEARCH_LOGGING_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/search_metadata_decorator.cc b/google/cloud/discoveryengine/v1/internal/search_metadata_decorator.cc index 52f777dd88124..dac34306815d6 100644 --- a/google/cloud/discoveryengine/v1/internal/search_metadata_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/search_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/discoveryengine/v1/search_service.proto #include "google/cloud/discoveryengine/v1/internal/search_metadata_decorator.h" +#include "google/cloud/discoveryengine/v1/search_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -106,3 +110,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/search_metadata_decorator.h b/google/cloud/discoveryengine/v1/internal/search_metadata_decorator.h index 064d4c0cf7b8d..2a5699ac21e39 100644 --- a/google/cloud/discoveryengine/v1/internal/search_metadata_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/search_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -75,4 +78,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_SEARCH_METADATA_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/search_option_defaults.cc b/google/cloud/discoveryengine/v1/internal/search_option_defaults.cc index faa490f05ef94..ffb89e26c550f 100644 --- a/google/cloud/discoveryengine/v1/internal/search_option_defaults.cc +++ b/google/cloud/discoveryengine/v1/internal/search_option_defaults.cc @@ -42,7 +42,7 @@ Options SearchServiceDefaultOptions(Options options) { if (!options.has()) { options.set( discoveryengine_v1::SearchServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/discoveryengine/v1/internal/search_stub.cc b/google/cloud/discoveryengine/v1/internal/search_stub.cc index cf9f2e1ad55fe..cb220271838b7 100644 --- a/google/cloud/discoveryengine/v1/internal/search_stub.cc +++ b/google/cloud/discoveryengine/v1/internal/search_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/discoveryengine/v1/search_service.proto #include "google/cloud/discoveryengine/v1/internal/search_stub.h" +#include "google/cloud/discoveryengine/v1/search_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -92,3 +95,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/search_stub.h b/google/cloud/discoveryengine/v1/internal/search_stub.h index c28b0ee5eaf55..9517696cebb4e 100644 --- a/google/cloud/discoveryengine/v1/internal/search_stub.h +++ b/google/cloud/discoveryengine/v1/internal/search_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_SEARCH_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_SEARCH_STUB_H +#include "google/cloud/discoveryengine/v1/search_service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -104,4 +107,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_SEARCH_STUB_H diff --git a/google/cloud/discoveryengine/v1/internal/search_stub_factory.cc b/google/cloud/discoveryengine/v1/internal/search_stub_factory.cc index 76617f7cb15e1..f577a8176de3b 100644 --- a/google/cloud/discoveryengine/v1/internal/search_stub_factory.cc +++ b/google/cloud/discoveryengine/v1/internal/search_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/discoveryengine/v1/internal/search_metadata_decorator.h" #include "google/cloud/discoveryengine/v1/internal/search_stub.h" #include "google/cloud/discoveryengine/v1/internal/search_tracing_stub.h" +#include "google/cloud/discoveryengine/v1/search_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/search_stub_factory.h b/google/cloud/discoveryengine/v1/internal/search_stub_factory.h index b345ed5fcd807..97e171a9d4c69 100644 --- a/google/cloud/discoveryengine/v1/internal/search_stub_factory.h +++ b/google/cloud/discoveryengine/v1/internal/search_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_SEARCH_STUB_FACTORY_H diff --git a/google/cloud/discoveryengine/v1/internal/search_tracing_connection.cc b/google/cloud/discoveryengine/v1/internal/search_tracing_connection.cc index 2855e8133aa53..a083de4803088 100644 --- a/google/cloud/discoveryengine/v1/internal/search_tracing_connection.cc +++ b/google/cloud/discoveryengine/v1/internal/search_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SearchServiceTracingConnection::SearchServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -85,16 +83,12 @@ Status SearchServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSearchServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/discoveryengine/v1/internal/search_tracing_connection.h b/google/cloud/discoveryengine/v1/internal/search_tracing_connection.h index 97e108232c77b..67203515e3a1f 100644 --- a/google/cloud/discoveryengine/v1/internal/search_tracing_connection.h +++ b/google/cloud/discoveryengine/v1/internal/search_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SearchServiceTracingConnection : public discoveryengine_v1::SearchServiceConnection { public: @@ -60,8 +58,6 @@ class SearchServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/discoveryengine/v1/internal/search_tracing_stub.cc b/google/cloud/discoveryengine/v1/internal/search_tracing_stub.cc index dd9cbe5ce9ecb..13f0bd281b020 100644 --- a/google/cloud/discoveryengine/v1/internal/search_tracing_stub.cc +++ b/google/cloud/discoveryengine/v1/internal/search_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SearchServiceTracingStub::SearchServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -90,18 +91,14 @@ Status SearchServiceTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSearchServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/search_tracing_stub.h b/google/cloud/discoveryengine/v1/internal/search_tracing_stub.h index 05c591bf48ea2..00dd2c8f8f077 100644 --- a/google/cloud/discoveryengine/v1/internal/search_tracing_stub.h +++ b/google/cloud/discoveryengine/v1/internal/search_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SearchServiceTracingStub : public SearchServiceStub { public: ~SearchServiceTracingStub() override = default; @@ -66,8 +67,6 @@ class SearchServiceTracingStub : public SearchServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -82,4 +81,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_SEARCH_TRACING_STUB_H diff --git a/google/cloud/discoveryengine/v1/internal/site_search_engine_auth_decorator.cc b/google/cloud/discoveryengine/v1/internal/site_search_engine_auth_decorator.cc index d4115520873a5..c57883d41ff97 100644 --- a/google/cloud/discoveryengine/v1/internal/site_search_engine_auth_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/site_search_engine_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/discoveryengine/v1/site_search_engine_service.proto #include "google/cloud/discoveryengine/v1/internal/site_search_engine_auth_decorator.h" -#include +#include "google/cloud/discoveryengine/v1/site_search_engine_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -449,3 +452,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/site_search_engine_auth_decorator.h b/google/cloud/discoveryengine/v1/internal/site_search_engine_auth_decorator.h index dd689f58b8566..90c90f06a2d6f 100644 --- a/google/cloud/discoveryengine/v1/internal/site_search_engine_auth_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/site_search_engine_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/discoveryengine/v1/internal/site_search_engine_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -224,4 +227,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_SITE_SEARCH_ENGINE_AUTH_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/site_search_engine_connection_impl.h b/google/cloud/discoveryengine/v1/internal/site_search_engine_connection_impl.h index a0f88453cec86..0d96bff555555 100644 --- a/google/cloud/discoveryengine/v1/internal/site_search_engine_connection_impl.h +++ b/google/cloud/discoveryengine/v1/internal/site_search_engine_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/discoveryengine/v1/internal/site_search_engine_logging_decorator.cc b/google/cloud/discoveryengine/v1/internal/site_search_engine_logging_decorator.cc index f2bfd3cd47df2..249c3291aeb00 100644 --- a/google/cloud/discoveryengine/v1/internal/site_search_engine_logging_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/site_search_engine_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/discoveryengine/v1/site_search_engine_service.proto #include "google/cloud/discoveryengine/v1/internal/site_search_engine_logging_decorator.h" +#include "google/cloud/discoveryengine/v1/site_search_engine_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -512,3 +515,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/site_search_engine_logging_decorator.h b/google/cloud/discoveryengine/v1/internal/site_search_engine_logging_decorator.h index 893eecf0be0f6..ce0a42a9c1e00 100644 --- a/google/cloud/discoveryengine/v1/internal/site_search_engine_logging_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/site_search_engine_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/discoveryengine/v1/internal/site_search_engine_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -224,4 +227,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_SITE_SEARCH_ENGINE_LOGGING_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/site_search_engine_metadata_decorator.cc b/google/cloud/discoveryengine/v1/internal/site_search_engine_metadata_decorator.cc index 6cd5c4614ba5d..a5778988d7aa6 100644 --- a/google/cloud/discoveryengine/v1/internal/site_search_engine_metadata_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/site_search_engine_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/discoveryengine/v1/site_search_engine_service.proto #include "google/cloud/discoveryengine/v1/internal/site_search_engine_metadata_decorator.h" +#include "google/cloud/discoveryengine/v1/site_search_engine_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -391,3 +395,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/site_search_engine_metadata_decorator.h b/google/cloud/discoveryengine/v1/internal/site_search_engine_metadata_decorator.h index e2d20a908dd5e..9a3eb49ee4bbf 100644 --- a/google/cloud/discoveryengine/v1/internal/site_search_engine_metadata_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/site_search_engine_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/discoveryengine/v1/internal/site_search_engine_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -230,4 +233,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_SITE_SEARCH_ENGINE_METADATA_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/site_search_engine_option_defaults.cc b/google/cloud/discoveryengine/v1/internal/site_search_engine_option_defaults.cc index be9cb87671fd6..ba1c2db698548 100644 --- a/google/cloud/discoveryengine/v1/internal/site_search_engine_option_defaults.cc +++ b/google/cloud/discoveryengine/v1/internal/site_search_engine_option_defaults.cc @@ -44,7 +44,7 @@ Options SiteSearchEngineServiceDefaultOptions(Options options) { discoveryengine_v1::SiteSearchEngineServiceRetryPolicyOption>()) { options.set( discoveryengine_v1::SiteSearchEngineServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/discoveryengine/v1/internal/site_search_engine_stub.cc b/google/cloud/discoveryengine/v1/internal/site_search_engine_stub.cc index 02495f5f6255c..4e5ea7c74ee5c 100644 --- a/google/cloud/discoveryengine/v1/internal/site_search_engine_stub.cc +++ b/google/cloud/discoveryengine/v1/internal/site_search_engine_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/discoveryengine/v1/site_search_engine_service.proto #include "google/cloud/discoveryengine/v1/internal/site_search_engine_stub.h" +#include "google/cloud/discoveryengine/v1/site_search_engine_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -502,3 +505,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/site_search_engine_stub.h b/google/cloud/discoveryengine/v1/internal/site_search_engine_stub.h index 375af980e396d..1b018381266eb 100644 --- a/google/cloud/discoveryengine/v1/internal/site_search_engine_stub.h +++ b/google/cloud/discoveryengine/v1/internal/site_search_engine_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_SITE_SEARCH_ENGINE_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_SITE_SEARCH_ENGINE_STUB_H +#include "google/cloud/discoveryengine/v1/site_search_engine_service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -418,4 +421,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_SITE_SEARCH_ENGINE_STUB_H diff --git a/google/cloud/discoveryengine/v1/internal/site_search_engine_stub_factory.cc b/google/cloud/discoveryengine/v1/internal/site_search_engine_stub_factory.cc index f1b61082ee684..c69b9924936e0 100644 --- a/google/cloud/discoveryengine/v1/internal/site_search_engine_stub_factory.cc +++ b/google/cloud/discoveryengine/v1/internal/site_search_engine_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/discoveryengine/v1/internal/site_search_engine_metadata_decorator.h" #include "google/cloud/discoveryengine/v1/internal/site_search_engine_stub.h" #include "google/cloud/discoveryengine/v1/internal/site_search_engine_tracing_stub.h" +#include "google/cloud/discoveryengine/v1/site_search_engine_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -74,3 +77,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/site_search_engine_stub_factory.h b/google/cloud/discoveryengine/v1/internal/site_search_engine_stub_factory.h index bc6a136610020..5b69f93b2db07 100644 --- a/google/cloud/discoveryengine/v1/internal/site_search_engine_stub_factory.h +++ b/google/cloud/discoveryengine/v1/internal/site_search_engine_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_SITE_SEARCH_ENGINE_STUB_FACTORY_H diff --git a/google/cloud/discoveryengine/v1/internal/site_search_engine_tracing_connection.cc b/google/cloud/discoveryengine/v1/internal/site_search_engine_tracing_connection.cc index 4a7bc41665321..46797dd0dca98 100644 --- a/google/cloud/discoveryengine/v1/internal/site_search_engine_tracing_connection.cc +++ b/google/cloud/discoveryengine/v1/internal/site_search_engine_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SiteSearchEngineServiceTracingConnection:: SiteSearchEngineServiceTracingConnection( std::shared_ptr @@ -459,18 +457,14 @@ Status SiteSearchEngineServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSiteSearchEngineServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/discoveryengine/v1/internal/site_search_engine_tracing_connection.h b/google/cloud/discoveryengine/v1/internal/site_search_engine_tracing_connection.h index 95aaeca1080c2..ef6f6189577ec 100644 --- a/google/cloud/discoveryengine/v1/internal/site_search_engine_tracing_connection.h +++ b/google/cloud/discoveryengine/v1/internal/site_search_engine_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SiteSearchEngineServiceTracingConnection : public discoveryengine_v1::SiteSearchEngineServiceConnection { public: @@ -214,8 +212,6 @@ class SiteSearchEngineServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/discoveryengine/v1/internal/site_search_engine_tracing_stub.cc b/google/cloud/discoveryengine/v1/internal/site_search_engine_tracing_stub.cc index 0b71308719d60..d9dea9ade663b 100644 --- a/google/cloud/discoveryengine/v1/internal/site_search_engine_tracing_stub.cc +++ b/google/cloud/discoveryengine/v1/internal/site_search_engine_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SiteSearchEngineServiceTracingStub::SiteSearchEngineServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -470,19 +471,15 @@ future SiteSearchEngineServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSiteSearchEngineServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/site_search_engine_tracing_stub.h b/google/cloud/discoveryengine/v1/internal/site_search_engine_tracing_stub.h index e3f4862e8514b..dc7e62134a988 100644 --- a/google/cloud/discoveryengine/v1/internal/site_search_engine_tracing_stub.h +++ b/google/cloud/discoveryengine/v1/internal/site_search_engine_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SiteSearchEngineServiceTracingStub : public SiteSearchEngineServiceStub { public: ~SiteSearchEngineServiceTracingStub() override = default; @@ -220,8 +221,6 @@ class SiteSearchEngineServiceTracingStub : public SiteSearchEngineServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -237,4 +236,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_SITE_SEARCH_ENGINE_TRACING_STUB_H diff --git a/google/cloud/discoveryengine/v1/internal/user_event_auth_decorator.cc b/google/cloud/discoveryengine/v1/internal/user_event_auth_decorator.cc index e0568a9bfb438..c0e38904d4c7d 100644 --- a/google/cloud/discoveryengine/v1/internal/user_event_auth_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/user_event_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/discoveryengine/v1/user_event_service.proto #include "google/cloud/discoveryengine/v1/internal/user_event_auth_decorator.h" -#include +#include "google/cloud/discoveryengine/v1/user_event_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -172,3 +175,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/user_event_auth_decorator.h b/google/cloud/discoveryengine/v1/internal/user_event_auth_decorator.h index 3185c3a5f8944..936397003ec02 100644 --- a/google/cloud/discoveryengine/v1/internal/user_event_auth_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/user_event_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/discoveryengine/v1/internal/user_event_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -107,4 +110,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_USER_EVENT_AUTH_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/user_event_connection_impl.h b/google/cloud/discoveryengine/v1/internal/user_event_connection_impl.h index aaf515f2b790e..14351c26c603f 100644 --- a/google/cloud/discoveryengine/v1/internal/user_event_connection_impl.h +++ b/google/cloud/discoveryengine/v1/internal/user_event_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/discoveryengine/v1/internal/user_event_logging_decorator.cc b/google/cloud/discoveryengine/v1/internal/user_event_logging_decorator.cc index 23e57604203bc..ab772b0b4d476 100644 --- a/google/cloud/discoveryengine/v1/internal/user_event_logging_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/user_event_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/discoveryengine/v1/user_event_service.proto #include "google/cloud/discoveryengine/v1/internal/user_event_logging_decorator.h" +#include "google/cloud/discoveryengine/v1/user_event_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -200,3 +203,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/user_event_logging_decorator.h b/google/cloud/discoveryengine/v1/internal/user_event_logging_decorator.h index 0c5b0349fe465..a32f8a0df3d08 100644 --- a/google/cloud/discoveryengine/v1/internal/user_event_logging_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/user_event_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/discoveryengine/v1/internal/user_event_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -107,4 +110,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_USER_EVENT_LOGGING_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/user_event_metadata_decorator.cc b/google/cloud/discoveryengine/v1/internal/user_event_metadata_decorator.cc index 7f1102d644e8b..d2b71e2edb877 100644 --- a/google/cloud/discoveryengine/v1/internal/user_event_metadata_decorator.cc +++ b/google/cloud/discoveryengine/v1/internal/user_event_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/discoveryengine/v1/user_event_service.proto #include "google/cloud/discoveryengine/v1/internal/user_event_metadata_decorator.h" +#include "google/cloud/discoveryengine/v1/user_event_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -171,3 +175,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/user_event_metadata_decorator.h b/google/cloud/discoveryengine/v1/internal/user_event_metadata_decorator.h index c2eae82a9a33d..718ffa6ae3e27 100644 --- a/google/cloud/discoveryengine/v1/internal/user_event_metadata_decorator.h +++ b/google/cloud/discoveryengine/v1/internal/user_event_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/discoveryengine/v1/internal/user_event_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -113,4 +116,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_USER_EVENT_METADATA_DECORATOR_H diff --git a/google/cloud/discoveryengine/v1/internal/user_event_option_defaults.cc b/google/cloud/discoveryengine/v1/internal/user_event_option_defaults.cc index 40047f7c38438..f0d657d2a446d 100644 --- a/google/cloud/discoveryengine/v1/internal/user_event_option_defaults.cc +++ b/google/cloud/discoveryengine/v1/internal/user_event_option_defaults.cc @@ -42,7 +42,7 @@ Options UserEventServiceDefaultOptions(Options options) { if (!options.has()) { options.set( discoveryengine_v1::UserEventServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/discoveryengine/v1/internal/user_event_stub.cc b/google/cloud/discoveryengine/v1/internal/user_event_stub.cc index f9394dd5cdaf7..488e62c63c494 100644 --- a/google/cloud/discoveryengine/v1/internal/user_event_stub.cc +++ b/google/cloud/discoveryengine/v1/internal/user_event_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/discoveryengine/v1/user_event_service.proto #include "google/cloud/discoveryengine/v1/internal/user_event_stub.h" +#include "google/cloud/discoveryengine/v1/user_event_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -197,3 +200,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/user_event_stub.h b/google/cloud/discoveryengine/v1/internal/user_event_stub.h index b086feb43de1e..8fbcaf83b68fb 100644 --- a/google/cloud/discoveryengine/v1/internal/user_event_stub.h +++ b/google/cloud/discoveryengine/v1/internal/user_event_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_USER_EVENT_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_USER_EVENT_STUB_H +#include "google/cloud/discoveryengine/v1/user_event_service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -181,4 +184,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_USER_EVENT_STUB_H diff --git a/google/cloud/discoveryengine/v1/internal/user_event_stub_factory.cc b/google/cloud/discoveryengine/v1/internal/user_event_stub_factory.cc index 664c38fc50bff..e233e5b77cbef 100644 --- a/google/cloud/discoveryengine/v1/internal/user_event_stub_factory.cc +++ b/google/cloud/discoveryengine/v1/internal/user_event_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/discoveryengine/v1/internal/user_event_metadata_decorator.h" #include "google/cloud/discoveryengine/v1/internal/user_event_stub.h" #include "google/cloud/discoveryengine/v1/internal/user_event_tracing_stub.h" +#include "google/cloud/discoveryengine/v1/user_event_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/user_event_stub_factory.h b/google/cloud/discoveryengine/v1/internal/user_event_stub_factory.h index bae4962954be8..38344f977325a 100644 --- a/google/cloud/discoveryengine/v1/internal/user_event_stub_factory.h +++ b/google/cloud/discoveryengine/v1/internal/user_event_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_USER_EVENT_STUB_FACTORY_H diff --git a/google/cloud/discoveryengine/v1/internal/user_event_tracing_connection.cc b/google/cloud/discoveryengine/v1/internal/user_event_tracing_connection.cc index 9edadeb70eeeb..dd5fc466c5eb4 100644 --- a/google/cloud/discoveryengine/v1/internal/user_event_tracing_connection.cc +++ b/google/cloud/discoveryengine/v1/internal/user_event_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - UserEventServiceTracingConnection::UserEventServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -141,16 +139,12 @@ Status UserEventServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeUserEventServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/discoveryengine/v1/internal/user_event_tracing_connection.h b/google/cloud/discoveryengine/v1/internal/user_event_tracing_connection.h index da12e973a21f1..cefdb6b810432 100644 --- a/google/cloud/discoveryengine/v1/internal/user_event_tracing_connection.h +++ b/google/cloud/discoveryengine/v1/internal/user_event_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class UserEventServiceTracingConnection : public discoveryengine_v1::UserEventServiceConnection { public: @@ -87,8 +85,6 @@ class UserEventServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/discoveryengine/v1/internal/user_event_tracing_stub.cc b/google/cloud/discoveryengine/v1/internal/user_event_tracing_stub.cc index a2550ab6825d5..b94035b6657d1 100644 --- a/google/cloud/discoveryengine/v1/internal/user_event_tracing_stub.cc +++ b/google/cloud/discoveryengine/v1/internal/user_event_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - UserEventServiceTracingStub::UserEventServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -175,18 +176,14 @@ future UserEventServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeUserEventServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace discoveryengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/discoveryengine/v1/internal/user_event_tracing_stub.h b/google/cloud/discoveryengine/v1/internal/user_event_tracing_stub.h index 598ad60a35b3f..0a752eed93c35 100644 --- a/google/cloud/discoveryengine/v1/internal/user_event_tracing_stub.h +++ b/google/cloud/discoveryengine/v1/internal/user_event_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace discoveryengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class UserEventServiceTracingStub : public UserEventServiceStub { public: ~UserEventServiceTracingStub() override = default; @@ -103,8 +104,6 @@ class UserEventServiceTracingStub : public UserEventServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -119,4 +118,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_INTERNAL_USER_EVENT_TRACING_STUB_H diff --git a/google/cloud/discoveryengine/v1/project_client.h b/google/cloud/discoveryengine/v1/project_client.h index ef677619e4789..adf178f9f0434 100644 --- a/google/cloud/discoveryengine/v1/project_client.h +++ b/google/cloud/discoveryengine/v1/project_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/discoveryengine/v1/project_connection.h b/google/cloud/discoveryengine/v1/project_connection.h index a28f8b7e1a7b7..061a466a9c615 100644 --- a/google/cloud/discoveryengine/v1/project_connection.h +++ b/google/cloud/discoveryengine/v1/project_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/discoveryengine/v1/internal/project_retry_traits.h" #include "google/cloud/discoveryengine/v1/project_connection_idempotency_policy.h" +#include "google/cloud/discoveryengine/v1/project_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/discoveryengine/v1/project_connection_idempotency_policy.h b/google/cloud/discoveryengine/v1/project_connection_idempotency_policy.h index f23a997ef84f0..e5a4b851f8cc0 100644 --- a/google/cloud/discoveryengine/v1/project_connection_idempotency_policy.h +++ b/google/cloud/discoveryengine/v1/project_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_PROJECT_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_PROJECT_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/discoveryengine/v1/project_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/discoveryengine/v1/rank_connection.h b/google/cloud/discoveryengine/v1/rank_connection.h index bc33559841400..735177ee4fd2d 100644 --- a/google/cloud/discoveryengine/v1/rank_connection.h +++ b/google/cloud/discoveryengine/v1/rank_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/discoveryengine/v1/internal/rank_retry_traits.h" #include "google/cloud/discoveryengine/v1/rank_connection_idempotency_policy.h" +#include "google/cloud/discoveryengine/v1/rank_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/discoveryengine/v1/rank_connection_idempotency_policy.h b/google/cloud/discoveryengine/v1/rank_connection_idempotency_policy.h index e7dee987bb412..8182ecd3f2f90 100644 --- a/google/cloud/discoveryengine/v1/rank_connection_idempotency_policy.h +++ b/google/cloud/discoveryengine/v1/rank_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_RANK_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_RANK_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/discoveryengine/v1/rank_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/discoveryengine/v1/recommendation_connection.h b/google/cloud/discoveryengine/v1/recommendation_connection.h index 21b04ff237ae5..c1a7e8b4491e2 100644 --- a/google/cloud/discoveryengine/v1/recommendation_connection.h +++ b/google/cloud/discoveryengine/v1/recommendation_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/discoveryengine/v1/internal/recommendation_retry_traits.h" #include "google/cloud/discoveryengine/v1/recommendation_connection_idempotency_policy.h" +#include "google/cloud/discoveryengine/v1/recommendation_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/discoveryengine/v1/recommendation_connection_idempotency_policy.h b/google/cloud/discoveryengine/v1/recommendation_connection_idempotency_policy.h index e09ce0d7ecc3a..e7de9607d6f7a 100644 --- a/google/cloud/discoveryengine/v1/recommendation_connection_idempotency_policy.h +++ b/google/cloud/discoveryengine/v1/recommendation_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_RECOMMENDATION_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_RECOMMENDATION_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/discoveryengine/v1/recommendation_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/discoveryengine/v1/schema_client.h b/google/cloud/discoveryengine/v1/schema_client.h index c1a285d3b36c3..5bdc265147c54 100644 --- a/google/cloud/discoveryengine/v1/schema_client.h +++ b/google/cloud/discoveryengine/v1/schema_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/discoveryengine/v1/schema_connection.h b/google/cloud/discoveryengine/v1/schema_connection.h index 0c2f1d9fae0bf..8c6ea3285708f 100644 --- a/google/cloud/discoveryengine/v1/schema_connection.h +++ b/google/cloud/discoveryengine/v1/schema_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/discoveryengine/v1/internal/schema_retry_traits.h" #include "google/cloud/discoveryengine/v1/schema_connection_idempotency_policy.h" +#include "google/cloud/discoveryengine/v1/schema_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/discoveryengine/v1/schema_connection_idempotency_policy.h b/google/cloud/discoveryengine/v1/schema_connection_idempotency_policy.h index 6ed0d0d34c6a2..561a07c5bfdbf 100644 --- a/google/cloud/discoveryengine/v1/schema_connection_idempotency_policy.h +++ b/google/cloud/discoveryengine/v1/schema_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_SCHEMA_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_SCHEMA_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/discoveryengine/v1/schema_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/discoveryengine/v1/search_connection.h b/google/cloud/discoveryengine/v1/search_connection.h index 2b5fea462f6d1..d955474d0c4a6 100644 --- a/google/cloud/discoveryengine/v1/search_connection.h +++ b/google/cloud/discoveryengine/v1/search_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/discoveryengine/v1/internal/search_retry_traits.h" #include "google/cloud/discoveryengine/v1/search_connection_idempotency_policy.h" +#include "google/cloud/discoveryengine/v1/search_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/discoveryengine/v1/search_connection_idempotency_policy.h b/google/cloud/discoveryengine/v1/search_connection_idempotency_policy.h index 01643cee194eb..83513e3361c99 100644 --- a/google/cloud/discoveryengine/v1/search_connection_idempotency_policy.h +++ b/google/cloud/discoveryengine/v1/search_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_SEARCH_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_SEARCH_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/discoveryengine/v1/search_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/discoveryengine/v1/site_search_engine_client.h b/google/cloud/discoveryengine/v1/site_search_engine_client.h index 7f0b47dfdaafc..3c786dd352d5f 100644 --- a/google/cloud/discoveryengine/v1/site_search_engine_client.h +++ b/google/cloud/discoveryengine/v1/site_search_engine_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/discoveryengine/v1/site_search_engine_connection.h b/google/cloud/discoveryengine/v1/site_search_engine_connection.h index 4d374e2bddad2..8e8b7ec3ea6fb 100644 --- a/google/cloud/discoveryengine/v1/site_search_engine_connection.h +++ b/google/cloud/discoveryengine/v1/site_search_engine_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/discoveryengine/v1/internal/site_search_engine_retry_traits.h" #include "google/cloud/discoveryengine/v1/site_search_engine_connection_idempotency_policy.h" +#include "google/cloud/discoveryengine/v1/site_search_engine_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/discoveryengine/v1/site_search_engine_connection_idempotency_policy.h b/google/cloud/discoveryengine/v1/site_search_engine_connection_idempotency_policy.h index 9cb7beadc17e1..e79f43930f49b 100644 --- a/google/cloud/discoveryengine/v1/site_search_engine_connection_idempotency_policy.h +++ b/google/cloud/discoveryengine/v1/site_search_engine_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_SITE_SEARCH_ENGINE_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_SITE_SEARCH_ENGINE_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/discoveryengine/v1/site_search_engine_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/discoveryengine/v1/user_event_client.h b/google/cloud/discoveryengine/v1/user_event_client.h index 38170801c8ad1..524b6036bc47d 100644 --- a/google/cloud/discoveryengine/v1/user_event_client.h +++ b/google/cloud/discoveryengine/v1/user_event_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/discoveryengine/v1/user_event_connection.h b/google/cloud/discoveryengine/v1/user_event_connection.h index 84aeb7aa59f33..c7d999e09a79b 100644 --- a/google/cloud/discoveryengine/v1/user_event_connection.h +++ b/google/cloud/discoveryengine/v1/user_event_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/discoveryengine/v1/internal/user_event_retry_traits.h" #include "google/cloud/discoveryengine/v1/user_event_connection_idempotency_policy.h" +#include "google/cloud/discoveryengine/v1/user_event_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/discoveryengine/v1/user_event_connection_idempotency_policy.h b/google/cloud/discoveryengine/v1/user_event_connection_idempotency_policy.h index 990b3b5b9f151..458dff949ec1d 100644 --- a/google/cloud/discoveryengine/v1/user_event_connection_idempotency_policy.h +++ b/google/cloud/discoveryengine/v1/user_event_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_USER_EVENT_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DISCOVERYENGINE_V1_USER_EVENT_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/discoveryengine/v1/user_event_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dlp/BUILD.bazel b/google/cloud/dlp/BUILD.bazel index b1826b24b1f30..8d5b3cbbca474 100644 --- a/google/cloud/dlp/BUILD.bazel +++ b/google/cloud/dlp/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v2/", ] googleapis_deps = [ - "@com_google_googleapis//google/privacy/dlp/v2:dlp_cc_grpc", + "@googleapis//google/privacy/dlp/v2:dlp_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/dlp/CMakeLists.txt b/google/cloud/dlp/CMakeLists.txt index 14c3dcf46b4b0..86ee7955928ce 100644 --- a/google/cloud/dlp/CMakeLists.txt +++ b/google/cloud/dlp/CMakeLists.txt @@ -27,7 +27,7 @@ endif () include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(dlp "Cloud Data Loss Prevention (DLP) API" - SERVICE_DIRS "__EMPTY__" "v2/") + SERVICE_DIRS "v2/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(dlp_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/dlp/dlp_client.h b/google/cloud/dlp/dlp_client.h deleted file mode 100644 index db3ad018391e1..0000000000000 --- a/google/cloud/dlp/dlp_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/privacy/dlp/v2/dlp.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DLP_DLP_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DLP_DLP_CLIENT_H - -#include "google/cloud/dlp/dlp_connection.h" -#include "google/cloud/dlp/v2/dlp_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in dlp_v2 instead of the aliases defined in -/// this namespace. -namespace dlp { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dlp_v2::DlpServiceClient directly. -using ::google::cloud::dlp_v2::DlpServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dlp -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DLP_DLP_CLIENT_H diff --git a/google/cloud/dlp/dlp_connection.h b/google/cloud/dlp/dlp_connection.h deleted file mode 100644 index 770d6ea21e895..0000000000000 --- a/google/cloud/dlp/dlp_connection.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/privacy/dlp/v2/dlp.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DLP_DLP_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DLP_DLP_CONNECTION_H - -#include "google/cloud/dlp/dlp_connection_idempotency_policy.h" -#include "google/cloud/dlp/v2/dlp_connection.h" - -namespace google { -namespace cloud { -namespace dlp { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dlp_v2::MakeDlpServiceConnection directly. -using ::google::cloud::dlp_v2::MakeDlpServiceConnection; - -/// @deprecated Use dlp_v2::DlpServiceConnection directly. -using ::google::cloud::dlp_v2::DlpServiceConnection; - -/// @deprecated Use dlp_v2::DlpServiceLimitedErrorCountRetryPolicy directly. -using ::google::cloud::dlp_v2::DlpServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use dlp_v2::DlpServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::dlp_v2::DlpServiceLimitedTimeRetryPolicy; - -/// @deprecated Use dlp_v2::DlpServiceRetryPolicy directly. -using ::google::cloud::dlp_v2::DlpServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dlp -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DLP_DLP_CONNECTION_H diff --git a/google/cloud/dlp/dlp_connection_idempotency_policy.h b/google/cloud/dlp/dlp_connection_idempotency_policy.h deleted file mode 100644 index 27fd24fe34b9e..0000000000000 --- a/google/cloud/dlp/dlp_connection_idempotency_policy.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/privacy/dlp/v2/dlp.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DLP_DLP_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DLP_DLP_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/dlp/v2/dlp_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace dlp { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dlp_v2::MakeDefaultDlpServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::dlp_v2::MakeDefaultDlpServiceConnectionIdempotencyPolicy; - -/// @deprecated Use dlp_v2::DlpServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::dlp_v2::DlpServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dlp -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DLP_DLP_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/dlp/dlp_options.h b/google/cloud/dlp/dlp_options.h deleted file mode 100644 index 349e32c5ba3b7..0000000000000 --- a/google/cloud/dlp/dlp_options.h +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/privacy/dlp/v2/dlp.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DLP_DLP_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DLP_DLP_OPTIONS_H - -#include "google/cloud/dlp/dlp_connection.h" -#include "google/cloud/dlp/dlp_connection_idempotency_policy.h" -#include "google/cloud/dlp/v2/dlp_options.h" - -namespace google { -namespace cloud { -namespace dlp { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dlp_v2::DlpServiceBackoffPolicyOption directly. -using ::google::cloud::dlp_v2::DlpServiceBackoffPolicyOption; - -/// @deprecated Use dlp_v2::DlpServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::dlp_v2::DlpServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use dlp_v2::DlpServicePolicyOptionList directly. -using ::google::cloud::dlp_v2::DlpServicePolicyOptionList; - -/// @deprecated Use dlp_v2::DlpServiceRetryPolicyOption directly. -using ::google::cloud::dlp_v2::DlpServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dlp -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DLP_DLP_OPTIONS_H diff --git a/google/cloud/dlp/mocks/mock_dlp_connection.h b/google/cloud/dlp/mocks/mock_dlp_connection.h deleted file mode 100644 index fee457d1c4851..0000000000000 --- a/google/cloud/dlp/mocks/mock_dlp_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/privacy/dlp/v2/dlp.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DLP_MOCKS_MOCK_DLP_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DLP_MOCKS_MOCK_DLP_CONNECTION_H - -#include "google/cloud/dlp/dlp_connection.h" -#include "google/cloud/dlp/v2/mocks/mock_dlp_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in dlp_v2_mocks instead of the aliases -/// defined in this namespace. -namespace dlp_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use dlp_v2_mocks::MockDlpServiceConnection directly. -using ::google::cloud::dlp_v2_mocks::MockDlpServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace dlp_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DLP_MOCKS_MOCK_DLP_CONNECTION_H diff --git a/google/cloud/dlp/quickstart/.bazelrc b/google/cloud/dlp/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/dlp/quickstart/.bazelrc +++ b/google/cloud/dlp/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/dlp/quickstart/CMakeLists.txt b/google/cloud/dlp/quickstart/CMakeLists.txt index aa2359c767898..d9401af1f860c 100644 --- a/google/cloud/dlp/quickstart/CMakeLists.txt +++ b/google/cloud/dlp/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Data Loss Prevention (DLP) API C++ client # library from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-dlp-quickstart CXX) find_package(google_cloud_cpp_dlp REQUIRED) diff --git a/google/cloud/dlp/v2/dlp_connection.h b/google/cloud/dlp/v2/dlp_connection.h index 09a2b450bc241..9b5e8cd58c853 100644 --- a/google/cloud/dlp/v2/dlp_connection.h +++ b/google/cloud/dlp/v2/dlp_connection.h @@ -27,7 +27,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/privacy/dlp/v2/dlp.pb.h" #include namespace google { diff --git a/google/cloud/dlp/v2/dlp_connection_idempotency_policy.h b/google/cloud/dlp/v2/dlp_connection_idempotency_policy.h index a5604c4f0867e..2d4d544e19839 100644 --- a/google/cloud/dlp/v2/dlp_connection_idempotency_policy.h +++ b/google/cloud/dlp/v2/dlp_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/privacy/dlp/v2/dlp.grpc.pb.h" #include namespace google { diff --git a/google/cloud/dlp/v2/internal/dlp_auth_decorator.cc b/google/cloud/dlp/v2/internal/dlp_auth_decorator.cc index ea054408d0d19..23888183c19dd 100644 --- a/google/cloud/dlp/v2/internal/dlp_auth_decorator.cc +++ b/google/cloud/dlp/v2/internal/dlp_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/privacy/dlp/v2/dlp.proto #include "google/cloud/dlp/v2/internal/dlp_auth_decorator.h" -#include +#include "google/privacy/dlp/v2/dlp.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dlp_v2_internal { @@ -511,3 +514,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dlp_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dlp/v2/internal/dlp_auth_decorator.h b/google/cloud/dlp/v2/internal/dlp_auth_decorator.h index d5c736a5b101a..603a855e24660 100644 --- a/google/cloud/dlp/v2/internal/dlp_auth_decorator.h +++ b/google/cloud/dlp/v2/internal/dlp_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dlp_v2_internal { @@ -322,4 +325,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DLP_V2_INTERNAL_DLP_AUTH_DECORATOR_H diff --git a/google/cloud/dlp/v2/internal/dlp_logging_decorator.cc b/google/cloud/dlp/v2/internal/dlp_logging_decorator.cc index 383768bd9ccdb..6c4b0b0320b6f 100644 --- a/google/cloud/dlp/v2/internal/dlp_logging_decorator.cc +++ b/google/cloud/dlp/v2/internal/dlp_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/dlp/v2/internal/dlp_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/privacy/dlp/v2/dlp.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dlp_v2_internal { @@ -721,3 +724,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dlp_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dlp/v2/internal/dlp_logging_decorator.h b/google/cloud/dlp/v2/internal/dlp_logging_decorator.h index 2b0d569ca7d2d..9d5facc719d67 100644 --- a/google/cloud/dlp/v2/internal/dlp_logging_decorator.h +++ b/google/cloud/dlp/v2/internal/dlp_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dlp_v2_internal { @@ -322,4 +325,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DLP_V2_INTERNAL_DLP_LOGGING_DECORATOR_H diff --git a/google/cloud/dlp/v2/internal/dlp_metadata_decorator.cc b/google/cloud/dlp/v2/internal/dlp_metadata_decorator.cc index 6de5caba1bc03..2a34bbe148e53 100644 --- a/google/cloud/dlp/v2/internal/dlp_metadata_decorator.cc +++ b/google/cloud/dlp/v2/internal/dlp_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/dlp/v2/internal/dlp_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/privacy/dlp/v2/dlp.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dlp_v2_internal { @@ -543,3 +547,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dlp_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dlp/v2/internal/dlp_metadata_decorator.h b/google/cloud/dlp/v2/internal/dlp_metadata_decorator.h index 5b37d8caa9607..0edb0100727de 100644 --- a/google/cloud/dlp/v2/internal/dlp_metadata_decorator.h +++ b/google/cloud/dlp/v2/internal/dlp_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dlp_v2_internal { @@ -327,4 +330,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DLP_V2_INTERNAL_DLP_METADATA_DECORATOR_H diff --git a/google/cloud/dlp/v2/internal/dlp_option_defaults.cc b/google/cloud/dlp/v2/internal/dlp_option_defaults.cc index 6af319baa96bf..aa8bb69698be7 100644 --- a/google/cloud/dlp/v2/internal/dlp_option_defaults.cc +++ b/google/cloud/dlp/v2/internal/dlp_option_defaults.cc @@ -40,7 +40,7 @@ Options DlpServiceDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - dlp_v2::DlpServiceLimitedTimeRetryPolicy(std::chrono::minutes(30)) + dlp_v2::DlpServiceLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/dlp/v2/internal/dlp_stub.cc b/google/cloud/dlp/v2/internal/dlp_stub.cc index 4a305fa973459..69a4df32b2a88 100644 --- a/google/cloud/dlp/v2/internal/dlp_stub.cc +++ b/google/cloud/dlp/v2/internal/dlp_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/dlp/v2/internal/dlp_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "google/privacy/dlp/v2/dlp.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dlp_v2_internal { @@ -693,3 +696,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dlp_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dlp/v2/internal/dlp_stub.h b/google/cloud/dlp/v2/internal/dlp_stub.h index 360fbe7f6a7eb..47d81069e21bd 100644 --- a/google/cloud/dlp/v2/internal/dlp_stub.h +++ b/google/cloud/dlp/v2/internal/dlp_stub.h @@ -22,10 +22,13 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/privacy/dlp/v2/dlp.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dlp_v2_internal { @@ -599,4 +602,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DLP_V2_INTERNAL_DLP_STUB_H diff --git a/google/cloud/dlp/v2/internal/dlp_stub_factory.cc b/google/cloud/dlp/v2/internal/dlp_stub_factory.cc index a393929f1aabb..725fe6d312e1f 100644 --- a/google/cloud/dlp/v2/internal/dlp_stub_factory.cc +++ b/google/cloud/dlp/v2/internal/dlp_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/privacy/dlp/v2/dlp.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dlp_v2_internal { @@ -68,3 +71,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dlp_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dlp/v2/internal/dlp_stub_factory.h b/google/cloud/dlp/v2/internal/dlp_stub_factory.h index aae11853d3a73..4ea4a05286d6f 100644 --- a/google/cloud/dlp/v2/internal/dlp_stub_factory.h +++ b/google/cloud/dlp/v2/internal/dlp_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dlp_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DLP_V2_INTERNAL_DLP_STUB_FACTORY_H diff --git a/google/cloud/dlp/v2/internal/dlp_tracing_connection.cc b/google/cloud/dlp/v2/internal/dlp_tracing_connection.cc index 748eaf3957d37..3f1ce169cff35 100644 --- a/google/cloud/dlp/v2/internal/dlp_tracing_connection.cc +++ b/google/cloud/dlp/v2/internal/dlp_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace dlp_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DlpServiceTracingConnection::DlpServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -539,15 +537,11 @@ DlpServiceTracingConnection::UpdateConnection( return internal::EndSpan(*span, child_->UpdateConnection(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDlpServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/dlp/v2/internal/dlp_tracing_connection.h b/google/cloud/dlp/v2/internal/dlp_tracing_connection.h index 70f88970265c6..a6885502808c8 100644 --- a/google/cloud/dlp/v2/internal/dlp_tracing_connection.h +++ b/google/cloud/dlp/v2/internal/dlp_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace dlp_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DlpServiceTracingConnection : public dlp_v2::DlpServiceConnection { public: ~DlpServiceTracingConnection() override = default; @@ -252,8 +250,6 @@ class DlpServiceTracingConnection : public dlp_v2::DlpServiceConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/dlp/v2/internal/dlp_tracing_stub.cc b/google/cloud/dlp/v2/internal/dlp_tracing_stub.cc index 82dad418e03a9..5d7c586ca23ec 100644 --- a/google/cloud/dlp/v2/internal/dlp_tracing_stub.cc +++ b/google/cloud/dlp/v2/internal/dlp_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dlp_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DlpServiceTracingStub::DlpServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -691,18 +692,14 @@ DlpServiceTracingStub::UpdateConnection( child_->UpdateConnection(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDlpServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace dlp_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/dlp/v2/internal/dlp_tracing_stub.h b/google/cloud/dlp/v2/internal/dlp_tracing_stub.h index 063f21dc7b086..f35a3d2a183e2 100644 --- a/google/cloud/dlp/v2/internal/dlp_tracing_stub.h +++ b/google/cloud/dlp/v2/internal/dlp_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace dlp_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DlpServiceTracingStub : public DlpServiceStub { public: ~DlpServiceTracingStub() override = default; @@ -318,8 +319,6 @@ class DlpServiceTracingStub : public DlpServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -334,4 +333,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DLP_V2_INTERNAL_DLP_TRACING_STUB_H diff --git a/google/cloud/documentai/BUILD.bazel b/google/cloud/documentai/BUILD.bazel index cbc64b17a5a32..4201e94aae79f 100644 --- a/google/cloud/documentai/BUILD.bazel +++ b/google/cloud/documentai/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/documentai/v1:documentai_cc_grpc", + "@googleapis//google/cloud/documentai/v1:documentai_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/documentai/CMakeLists.txt b/google/cloud/documentai/CMakeLists.txt index 445b94c30a9a6..2c2cd950edea3 100644 --- a/google/cloud/documentai/CMakeLists.txt +++ b/google/cloud/documentai/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(documentai "Cloud Document AI API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(documentai_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/documentai/document_processor_client.h b/google/cloud/documentai/document_processor_client.h deleted file mode 100644 index 4f4bc078cb5c1..0000000000000 --- a/google/cloud/documentai/document_processor_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/documentai/v1/document_processor_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOCUMENTAI_DOCUMENT_PROCESSOR_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOCUMENTAI_DOCUMENT_PROCESSOR_CLIENT_H - -#include "google/cloud/documentai/document_processor_connection.h" -#include "google/cloud/documentai/v1/document_processor_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in documentai_v1 instead of the aliases defined in -/// this namespace. -namespace documentai { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use documentai_v1::DocumentProcessorServiceClient directly. -using ::google::cloud::documentai_v1::DocumentProcessorServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace documentai -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOCUMENTAI_DOCUMENT_PROCESSOR_CLIENT_H diff --git a/google/cloud/documentai/document_processor_connection.h b/google/cloud/documentai/document_processor_connection.h deleted file mode 100644 index 11f9069d037d4..0000000000000 --- a/google/cloud/documentai/document_processor_connection.h +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/documentai/v1/document_processor_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOCUMENTAI_DOCUMENT_PROCESSOR_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOCUMENTAI_DOCUMENT_PROCESSOR_CONNECTION_H - -#include "google/cloud/documentai/document_processor_connection_idempotency_policy.h" -#include "google/cloud/documentai/v1/document_processor_connection.h" - -namespace google { -namespace cloud { -namespace documentai { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use documentai_v1::MakeDocumentProcessorServiceConnection -/// directly. -using ::google::cloud::documentai_v1::MakeDocumentProcessorServiceConnection; - -/// @deprecated Use documentai_v1::DocumentProcessorServiceConnection directly. -using ::google::cloud::documentai_v1::DocumentProcessorServiceConnection; - -/// @deprecated Use -/// documentai_v1::DocumentProcessorServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::documentai_v1:: - DocumentProcessorServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use -/// documentai_v1::DocumentProcessorServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::documentai_v1:: - DocumentProcessorServiceLimitedTimeRetryPolicy; - -/// @deprecated Use documentai_v1::DocumentProcessorServiceRetryPolicy directly. -using ::google::cloud::documentai_v1::DocumentProcessorServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace documentai -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOCUMENTAI_DOCUMENT_PROCESSOR_CONNECTION_H diff --git a/google/cloud/documentai/document_processor_connection_idempotency_policy.h b/google/cloud/documentai/document_processor_connection_idempotency_policy.h deleted file mode 100644 index 80f0a5b3940ab..0000000000000 --- a/google/cloud/documentai/document_processor_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/documentai/v1/document_processor_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOCUMENTAI_DOCUMENT_PROCESSOR_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOCUMENTAI_DOCUMENT_PROCESSOR_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/documentai/v1/document_processor_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace documentai { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// documentai_v1::MakeDefaultDocumentProcessorServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::documentai_v1:: - MakeDefaultDocumentProcessorServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// documentai_v1::DocumentProcessorServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::documentai_v1:: - DocumentProcessorServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace documentai -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOCUMENTAI_DOCUMENT_PROCESSOR_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/documentai/document_processor_options.h b/google/cloud/documentai/document_processor_options.h deleted file mode 100644 index 8b9ac2825a251..0000000000000 --- a/google/cloud/documentai/document_processor_options.h +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/documentai/v1/document_processor_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOCUMENTAI_DOCUMENT_PROCESSOR_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOCUMENTAI_DOCUMENT_PROCESSOR_OPTIONS_H - -#include "google/cloud/documentai/document_processor_connection.h" -#include "google/cloud/documentai/document_processor_connection_idempotency_policy.h" -#include "google/cloud/documentai/v1/document_processor_options.h" - -namespace google { -namespace cloud { -namespace documentai { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use documentai_v1::DocumentProcessorServicePollingPolicyOption -/// directly. -using ::google::cloud::documentai_v1:: - DocumentProcessorServicePollingPolicyOption; - -/// @deprecated Use documentai_v1::DocumentProcessorServiceBackoffPolicyOption -/// directly. -using ::google::cloud::documentai_v1:: - DocumentProcessorServiceBackoffPolicyOption; - -/// @deprecated Use -/// documentai_v1::DocumentProcessorServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::documentai_v1:: - DocumentProcessorServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use documentai_v1::DocumentProcessorServicePolicyOptionList -/// directly. -using ::google::cloud::documentai_v1::DocumentProcessorServicePolicyOptionList; - -/// @deprecated Use documentai_v1::DocumentProcessorServiceRetryPolicyOption -/// directly. -using ::google::cloud::documentai_v1::DocumentProcessorServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace documentai -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOCUMENTAI_DOCUMENT_PROCESSOR_OPTIONS_H diff --git a/google/cloud/documentai/mocks/mock_document_processor_connection.h b/google/cloud/documentai/mocks/mock_document_processor_connection.h deleted file mode 100644 index 012da8fd15fae..0000000000000 --- a/google/cloud/documentai/mocks/mock_document_processor_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/documentai/v1/document_processor_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOCUMENTAI_MOCKS_MOCK_DOCUMENT_PROCESSOR_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOCUMENTAI_MOCKS_MOCK_DOCUMENT_PROCESSOR_CONNECTION_H - -#include "google/cloud/documentai/document_processor_connection.h" -#include "google/cloud/documentai/v1/mocks/mock_document_processor_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in documentai_v1_mocks instead of the aliases -/// defined in this namespace. -namespace documentai_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use documentai_v1_mocks::MockDocumentProcessorServiceConnection -/// directly. -using ::google::cloud::documentai_v1_mocks:: - MockDocumentProcessorServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace documentai_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOCUMENTAI_MOCKS_MOCK_DOCUMENT_PROCESSOR_CONNECTION_H diff --git a/google/cloud/documentai/quickstart/.bazelrc b/google/cloud/documentai/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/documentai/quickstart/.bazelrc +++ b/google/cloud/documentai/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/documentai/quickstart/CMakeLists.txt b/google/cloud/documentai/quickstart/CMakeLists.txt index 88715f752227a..aefda9b4a1769 100644 --- a/google/cloud/documentai/quickstart/CMakeLists.txt +++ b/google/cloud/documentai/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Document AI API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-documentai-quickstart CXX) find_package(google_cloud_cpp_documentai REQUIRED) diff --git a/google/cloud/documentai/v1/document_processor_client.h b/google/cloud/documentai/v1/document_processor_client.h index 9ef93233f72a2..210012c145a14 100644 --- a/google/cloud/documentai/v1/document_processor_client.h +++ b/google/cloud/documentai/v1/document_processor_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/documentai/v1/document_processor_connection.h b/google/cloud/documentai/v1/document_processor_connection.h index 18cddb7c9cdf4..b50ebfd3d8f83 100644 --- a/google/cloud/documentai/v1/document_processor_connection.h +++ b/google/cloud/documentai/v1/document_processor_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOCUMENTAI_V1_DOCUMENT_PROCESSOR_CONNECTION_H #include "google/cloud/documentai/v1/document_processor_connection_idempotency_policy.h" +#include "google/cloud/documentai/v1/document_processor_service.pb.h" #include "google/cloud/documentai/v1/internal/document_processor_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/documentai/v1/document_processor_connection_idempotency_policy.h b/google/cloud/documentai/v1/document_processor_connection_idempotency_policy.h index f310f188407d4..a236f8cacbbb1 100644 --- a/google/cloud/documentai/v1/document_processor_connection_idempotency_policy.h +++ b/google/cloud/documentai/v1/document_processor_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOCUMENTAI_V1_DOCUMENT_PROCESSOR_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOCUMENTAI_V1_DOCUMENT_PROCESSOR_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/documentai/v1/document_processor_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/documentai/v1/internal/document_processor_auth_decorator.cc b/google/cloud/documentai/v1/internal/document_processor_auth_decorator.cc index 327811b08d911..f315a1a2e8809 100644 --- a/google/cloud/documentai/v1/internal/document_processor_auth_decorator.cc +++ b/google/cloud/documentai/v1/internal/document_processor_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/documentai/v1/document_processor_service.proto #include "google/cloud/documentai/v1/internal/document_processor_auth_decorator.h" -#include +#include "google/cloud/documentai/v1/document_processor_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace documentai_v1_internal { @@ -546,3 +549,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace documentai_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/documentai/v1/internal/document_processor_auth_decorator.h b/google/cloud/documentai/v1/internal/document_processor_auth_decorator.h index 53a5552813526..a9871e445b141 100644 --- a/google/cloud/documentai/v1/internal/document_processor_auth_decorator.h +++ b/google/cloud/documentai/v1/internal/document_processor_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/documentai/v1/internal/document_processor_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace documentai_v1_internal { @@ -273,4 +276,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOCUMENTAI_V1_INTERNAL_DOCUMENT_PROCESSOR_AUTH_DECORATOR_H diff --git a/google/cloud/documentai/v1/internal/document_processor_connection_impl.h b/google/cloud/documentai/v1/internal/document_processor_connection_impl.h index 419bfcb8ad486..79ea030025654 100644 --- a/google/cloud/documentai/v1/internal/document_processor_connection_impl.h +++ b/google/cloud/documentai/v1/internal/document_processor_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/documentai/v1/internal/document_processor_logging_decorator.cc b/google/cloud/documentai/v1/internal/document_processor_logging_decorator.cc index 497019b4cbdb3..b2b2e5c0cb38d 100644 --- a/google/cloud/documentai/v1/internal/document_processor_logging_decorator.cc +++ b/google/cloud/documentai/v1/internal/document_processor_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/documentai/v1/document_processor_service.proto #include "google/cloud/documentai/v1/internal/document_processor_logging_decorator.h" +#include "google/cloud/documentai/v1/document_processor_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace documentai_v1_internal { @@ -644,3 +647,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace documentai_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/documentai/v1/internal/document_processor_logging_decorator.h b/google/cloud/documentai/v1/internal/document_processor_logging_decorator.h index c8f99ebbb5bf6..34eb262c59854 100644 --- a/google/cloud/documentai/v1/internal/document_processor_logging_decorator.h +++ b/google/cloud/documentai/v1/internal/document_processor_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/documentai/v1/internal/document_processor_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace documentai_v1_internal { @@ -273,4 +276,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOCUMENTAI_V1_INTERNAL_DOCUMENT_PROCESSOR_LOGGING_DECORATOR_H diff --git a/google/cloud/documentai/v1/internal/document_processor_metadata_decorator.cc b/google/cloud/documentai/v1/internal/document_processor_metadata_decorator.cc index 656a05dc841f3..c9d98f668b562 100644 --- a/google/cloud/documentai/v1/internal/document_processor_metadata_decorator.cc +++ b/google/cloud/documentai/v1/internal/document_processor_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/documentai/v1/document_processor_service.proto #include "google/cloud/documentai/v1/internal/document_processor_metadata_decorator.h" +#include "google/cloud/documentai/v1/document_processor_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace documentai_v1_internal { @@ -477,3 +481,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace documentai_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/documentai/v1/internal/document_processor_metadata_decorator.h b/google/cloud/documentai/v1/internal/document_processor_metadata_decorator.h index 3c593e945a903..2fb6941486762 100644 --- a/google/cloud/documentai/v1/internal/document_processor_metadata_decorator.h +++ b/google/cloud/documentai/v1/internal/document_processor_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/documentai/v1/internal/document_processor_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace documentai_v1_internal { @@ -279,4 +282,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOCUMENTAI_V1_INTERNAL_DOCUMENT_PROCESSOR_METADATA_DECORATOR_H diff --git a/google/cloud/documentai/v1/internal/document_processor_option_defaults.cc b/google/cloud/documentai/v1/internal/document_processor_option_defaults.cc index 435da86ad9510..d0d362287023d 100644 --- a/google/cloud/documentai/v1/internal/document_processor_option_defaults.cc +++ b/google/cloud/documentai/v1/internal/document_processor_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/documentai/v1/internal/document_processor_option_defaults.h" #include "google/cloud/documentai/v1/document_processor_connection.h" #include "google/cloud/documentai/v1/document_processor_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -47,7 +47,7 @@ Options DocumentProcessorServiceDefaultOptions(std::string const& location, .has()) { options.set( documentai_v1::DocumentProcessorServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/documentai/v1/internal/document_processor_stub.cc b/google/cloud/documentai/v1/internal/document_processor_stub.cc index 59d0ded16abc4..a88d8c1010399 100644 --- a/google/cloud/documentai/v1/internal/document_processor_stub.cc +++ b/google/cloud/documentai/v1/internal/document_processor_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/documentai/v1/document_processor_service.proto #include "google/cloud/documentai/v1/internal/document_processor_stub.h" +#include "google/cloud/documentai/v1/document_processor_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace documentai_v1_internal { @@ -626,3 +629,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace documentai_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/documentai/v1/internal/document_processor_stub.h b/google/cloud/documentai/v1/internal/document_processor_stub.h index cbb68f71430e7..c3d6364bfe068 100644 --- a/google/cloud/documentai/v1/internal/document_processor_stub.h +++ b/google/cloud/documentai/v1/internal/document_processor_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOCUMENTAI_V1_INTERNAL_DOCUMENT_PROCESSOR_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOCUMENTAI_V1_INTERNAL_DOCUMENT_PROCESSOR_STUB_H +#include "google/cloud/documentai/v1/document_processor_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace documentai_v1_internal { @@ -515,4 +518,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOCUMENTAI_V1_INTERNAL_DOCUMENT_PROCESSOR_STUB_H diff --git a/google/cloud/documentai/v1/internal/document_processor_stub_factory.cc b/google/cloud/documentai/v1/internal/document_processor_stub_factory.cc index c035d14a16940..6841ef1dfcc42 100644 --- a/google/cloud/documentai/v1/internal/document_processor_stub_factory.cc +++ b/google/cloud/documentai/v1/internal/document_processor_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/documentai/v1/document_processor_service.proto #include "google/cloud/documentai/v1/internal/document_processor_stub_factory.h" +#include "google/cloud/documentai/v1/document_processor_service.grpc.pb.h" #include "google/cloud/documentai/v1/internal/document_processor_auth_decorator.h" #include "google/cloud/documentai/v1/internal/document_processor_logging_decorator.h" #include "google/cloud/documentai/v1/internal/document_processor_metadata_decorator.h" #include "google/cloud/documentai/v1/internal/document_processor_stub.h" #include "google/cloud/documentai/v1/internal/document_processor_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace documentai_v1_internal { @@ -76,3 +79,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace documentai_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/documentai/v1/internal/document_processor_stub_factory.h b/google/cloud/documentai/v1/internal/document_processor_stub_factory.h index defa828177fa7..a0d8bc69e308a 100644 --- a/google/cloud/documentai/v1/internal/document_processor_stub_factory.h +++ b/google/cloud/documentai/v1/internal/document_processor_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace documentai_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOCUMENTAI_V1_INTERNAL_DOCUMENT_PROCESSOR_STUB_FACTORY_H diff --git a/google/cloud/documentai/v1/internal/document_processor_tracing_connection.cc b/google/cloud/documentai/v1/internal/document_processor_tracing_connection.cc index 1717db82317ea..83d3c7b03a8ac 100644 --- a/google/cloud/documentai/v1/internal/document_processor_tracing_connection.cc +++ b/google/cloud/documentai/v1/internal/document_processor_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace documentai_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DocumentProcessorServiceTracingConnection:: DocumentProcessorServiceTracingConnection( std::shared_ptr @@ -567,17 +565,13 @@ Status DocumentProcessorServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDocumentProcessorServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/documentai/v1/internal/document_processor_tracing_connection.h b/google/cloud/documentai/v1/internal/document_processor_tracing_connection.h index 272063c2d51e3..ec5c7c92c6ae2 100644 --- a/google/cloud/documentai/v1/internal/document_processor_tracing_connection.h +++ b/google/cloud/documentai/v1/internal/document_processor_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace documentai_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DocumentProcessorServiceTracingConnection : public documentai_v1::DocumentProcessorServiceConnection { public: @@ -258,8 +256,6 @@ class DocumentProcessorServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/documentai/v1/internal/document_processor_tracing_stub.cc b/google/cloud/documentai/v1/internal/document_processor_tracing_stub.cc index b70041e041f91..ea28898ae0ed7 100644 --- a/google/cloud/documentai/v1/internal/document_processor_tracing_stub.cc +++ b/google/cloud/documentai/v1/internal/document_processor_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace documentai_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DocumentProcessorServiceTracingStub::DocumentProcessorServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -587,19 +588,15 @@ future DocumentProcessorServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDocumentProcessorServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace documentai_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/documentai/v1/internal/document_processor_tracing_stub.h b/google/cloud/documentai/v1/internal/document_processor_tracing_stub.h index dde6da384237f..51f3d5c0838a2 100644 --- a/google/cloud/documentai/v1/internal/document_processor_tracing_stub.h +++ b/google/cloud/documentai/v1/internal/document_processor_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace documentai_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DocumentProcessorServiceTracingStub : public DocumentProcessorServiceStub { public: @@ -270,8 +271,6 @@ class DocumentProcessorServiceTracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -287,4 +286,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOCUMENTAI_V1_INTERNAL_DOCUMENT_PROCESSOR_TRACING_STUB_H diff --git a/google/cloud/domains/BUILD.bazel b/google/cloud/domains/BUILD.bazel index 652bd9f403d81..42424ef8cbcd2 100644 --- a/google/cloud/domains/BUILD.bazel +++ b/google/cloud/domains/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/domains/v1:domains_cc_grpc", + "@googleapis//google/cloud/domains/v1:domains_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/domains/quickstart/.bazelrc b/google/cloud/domains/quickstart/.bazelrc index 6777c6b4c95de..ec27511a60add 100644 --- a/google/cloud/domains/quickstart/.bazelrc +++ b/google/cloud/domains/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/domains/quickstart/CMakeLists.txt b/google/cloud/domains/quickstart/CMakeLists.txt index 453521e81381d..4e0bbb7dcb410 100644 --- a/google/cloud/domains/quickstart/CMakeLists.txt +++ b/google/cloud/domains/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Domains API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-domains-quickstart CXX) find_package(google_cloud_cpp_domains REQUIRED) diff --git a/google/cloud/domains/v1/domains_client.h b/google/cloud/domains/v1/domains_client.h index 170f0d6b83b33..0eaf865ae0566 100644 --- a/google/cloud/domains/v1/domains_client.h +++ b/google/cloud/domains/v1/domains_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/domains/v1/domains_connection.h b/google/cloud/domains/v1/domains_connection.h index 7aa4aefb45a06..b237168c0f105 100644 --- a/google/cloud/domains/v1/domains_connection.h +++ b/google/cloud/domains/v1/domains_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOMAINS_V1_DOMAINS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOMAINS_V1_DOMAINS_CONNECTION_H +#include "google/cloud/domains/v1/domains.pb.h" #include "google/cloud/domains/v1/domains_connection_idempotency_policy.h" #include "google/cloud/domains/v1/internal/domains_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/domains/v1/domains_connection_idempotency_policy.h b/google/cloud/domains/v1/domains_connection_idempotency_policy.h index 1c8581d0bd484..e076694c646cb 100644 --- a/google/cloud/domains/v1/domains_connection_idempotency_policy.h +++ b/google/cloud/domains/v1/domains_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOMAINS_V1_DOMAINS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOMAINS_V1_DOMAINS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/domains/v1/domains.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/domains/v1/internal/domains_auth_decorator.cc b/google/cloud/domains/v1/internal/domains_auth_decorator.cc index d077f08296ddf..dfe52977f91fd 100644 --- a/google/cloud/domains/v1/internal/domains_auth_decorator.cc +++ b/google/cloud/domains/v1/internal/domains_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/domains/v1/domains.proto #include "google/cloud/domains/v1/internal/domains_auth_decorator.h" -#include +#include "google/cloud/domains/v1/domains.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace domains_v1_internal { @@ -364,3 +367,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace domains_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/domains/v1/internal/domains_auth_decorator.h b/google/cloud/domains/v1/internal/domains_auth_decorator.h index d7e0a9ac95225..f1f5196750dea 100644 --- a/google/cloud/domains/v1/internal/domains_auth_decorator.h +++ b/google/cloud/domains/v1/internal/domains_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/domains/v1/internal/domains_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace domains_v1_internal { @@ -197,4 +200,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOMAINS_V1_INTERNAL_DOMAINS_AUTH_DECORATOR_H diff --git a/google/cloud/domains/v1/internal/domains_connection_impl.h b/google/cloud/domains/v1/internal/domains_connection_impl.h index 3f0b728475e50..068d7d0493c57 100644 --- a/google/cloud/domains/v1/internal/domains_connection_impl.h +++ b/google/cloud/domains/v1/internal/domains_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/domains/v1/internal/domains_logging_decorator.cc b/google/cloud/domains/v1/internal/domains_logging_decorator.cc index c3c6e770bd489..71a18520fb0a5 100644 --- a/google/cloud/domains/v1/internal/domains_logging_decorator.cc +++ b/google/cloud/domains/v1/internal/domains_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/domains/v1/domains.proto #include "google/cloud/domains/v1/internal/domains_logging_decorator.h" +#include "google/cloud/domains/v1/domains.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace domains_v1_internal { @@ -421,3 +424,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace domains_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/domains/v1/internal/domains_logging_decorator.h b/google/cloud/domains/v1/internal/domains_logging_decorator.h index 0a9d97b73877a..3117974a1fde7 100644 --- a/google/cloud/domains/v1/internal/domains_logging_decorator.h +++ b/google/cloud/domains/v1/internal/domains_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/domains/v1/internal/domains_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace domains_v1_internal { @@ -197,4 +200,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOMAINS_V1_INTERNAL_DOMAINS_LOGGING_DECORATOR_H diff --git a/google/cloud/domains/v1/internal/domains_metadata_decorator.cc b/google/cloud/domains/v1/internal/domains_metadata_decorator.cc index 7123eb0148ee1..30cec7ed506ae 100644 --- a/google/cloud/domains/v1/internal/domains_metadata_decorator.cc +++ b/google/cloud/domains/v1/internal/domains_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/domains/v1/domains.proto #include "google/cloud/domains/v1/internal/domains_metadata_decorator.h" +#include "google/cloud/domains/v1/domains.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace domains_v1_internal { @@ -329,3 +333,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace domains_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/domains/v1/internal/domains_metadata_decorator.h b/google/cloud/domains/v1/internal/domains_metadata_decorator.h index f7e92e8b03358..b343e311b70c3 100644 --- a/google/cloud/domains/v1/internal/domains_metadata_decorator.h +++ b/google/cloud/domains/v1/internal/domains_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/domains/v1/internal/domains_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace domains_v1_internal { @@ -202,4 +205,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOMAINS_V1_INTERNAL_DOMAINS_METADATA_DECORATOR_H diff --git a/google/cloud/domains/v1/internal/domains_option_defaults.cc b/google/cloud/domains/v1/internal/domains_option_defaults.cc index a16e0e7e81c65..d99f2bc11072c 100644 --- a/google/cloud/domains/v1/internal/domains_option_defaults.cc +++ b/google/cloud/domains/v1/internal/domains_option_defaults.cc @@ -40,7 +40,7 @@ Options DomainsDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - domains_v1::DomainsLimitedTimeRetryPolicy(std::chrono::minutes(30)) + domains_v1::DomainsLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/domains/v1/internal/domains_stub.cc b/google/cloud/domains/v1/internal/domains_stub.cc index a8cf6bdf465c4..932d577d34d0a 100644 --- a/google/cloud/domains/v1/internal/domains_stub.cc +++ b/google/cloud/domains/v1/internal/domains_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/domains/v1/domains.proto #include "google/cloud/domains/v1/internal/domains_stub.h" +#include "google/cloud/domains/v1/domains.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace domains_v1_internal { @@ -414,3 +417,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace domains_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/domains/v1/internal/domains_stub.h b/google/cloud/domains/v1/internal/domains_stub.h index 4e1eb80ec975d..cf681c2780c49 100644 --- a/google/cloud/domains/v1/internal/domains_stub.h +++ b/google/cloud/domains/v1/internal/domains_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOMAINS_V1_INTERNAL_DOMAINS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOMAINS_V1_INTERNAL_DOMAINS_STUB_H +#include "google/cloud/domains/v1/domains.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace domains_v1_internal { @@ -353,4 +356,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOMAINS_V1_INTERNAL_DOMAINS_STUB_H diff --git a/google/cloud/domains/v1/internal/domains_stub_factory.cc b/google/cloud/domains/v1/internal/domains_stub_factory.cc index a6ac4a4fc6909..0e8b09a3f98c6 100644 --- a/google/cloud/domains/v1/internal/domains_stub_factory.cc +++ b/google/cloud/domains/v1/internal/domains_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/domains/v1/domains.proto #include "google/cloud/domains/v1/internal/domains_stub_factory.h" +#include "google/cloud/domains/v1/domains.grpc.pb.h" #include "google/cloud/domains/v1/internal/domains_auth_decorator.h" #include "google/cloud/domains/v1/internal/domains_logging_decorator.h" #include "google/cloud/domains/v1/internal/domains_metadata_decorator.h" @@ -28,10 +29,12 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace domains_v1_internal { @@ -69,3 +72,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace domains_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/domains/v1/internal/domains_stub_factory.h b/google/cloud/domains/v1/internal/domains_stub_factory.h index b9bb04b6e95eb..4371b14c235ee 100644 --- a/google/cloud/domains/v1/internal/domains_stub_factory.h +++ b/google/cloud/domains/v1/internal/domains_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace domains_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOMAINS_V1_INTERNAL_DOMAINS_STUB_FACTORY_H diff --git a/google/cloud/domains/v1/internal/domains_tracing_connection.cc b/google/cloud/domains/v1/internal/domains_tracing_connection.cc index cfd7403a3271c..157e7af74ab24 100644 --- a/google/cloud/domains/v1/internal/domains_tracing_connection.cc +++ b/google/cloud/domains/v1/internal/domains_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace domains_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DomainsTracingConnection::DomainsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -349,15 +347,11 @@ DomainsTracingConnection::ResetAuthorizationCode( return internal::EndSpan(*span, child_->ResetAuthorizationCode(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDomainsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/domains/v1/internal/domains_tracing_connection.h b/google/cloud/domains/v1/internal/domains_tracing_connection.h index 1266d85827aea..e1d62354f9dc5 100644 --- a/google/cloud/domains/v1/internal/domains_tracing_connection.h +++ b/google/cloud/domains/v1/internal/domains_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace domains_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DomainsTracingConnection : public domains_v1::DomainsConnection { public: ~DomainsTracingConnection() override = default; @@ -176,8 +174,6 @@ class DomainsTracingConnection : public domains_v1::DomainsConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/domains/v1/internal/domains_tracing_stub.cc b/google/cloud/domains/v1/internal/domains_tracing_stub.cc index 57b175a48f6a7..8bf01a62391b6 100644 --- a/google/cloud/domains/v1/internal/domains_tracing_stub.cc +++ b/google/cloud/domains/v1/internal/domains_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace domains_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DomainsTracingStub::DomainsTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -367,18 +368,14 @@ future DomainsTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDomainsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace domains_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/domains/v1/internal/domains_tracing_stub.h b/google/cloud/domains/v1/internal/domains_tracing_stub.h index 4a0eb2cecacb4..fdae47679b256 100644 --- a/google/cloud/domains/v1/internal/domains_tracing_stub.h +++ b/google/cloud/domains/v1/internal/domains_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace domains_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DomainsTracingStub : public DomainsStub { public: ~DomainsTracingStub() override = default; @@ -192,8 +193,6 @@ class DomainsTracingStub : public DomainsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -208,4 +207,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_DOMAINS_V1_INTERNAL_DOMAINS_TRACING_STUB_H diff --git a/google/cloud/edgecontainer/BUILD.bazel b/google/cloud/edgecontainer/BUILD.bazel index e6a738d6d2f8b..513ce4136443b 100644 --- a/google/cloud/edgecontainer/BUILD.bazel +++ b/google/cloud/edgecontainer/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/edgecontainer/v1:edgecontainer_cc_grpc", + "@googleapis//google/cloud/edgecontainer/v1:edgecontainer_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/edgecontainer/CMakeLists.txt b/google/cloud/edgecontainer/CMakeLists.txt index 4dfc9ffa12273..1d46458ae47fa 100644 --- a/google/cloud/edgecontainer/CMakeLists.txt +++ b/google/cloud/edgecontainer/CMakeLists.txt @@ -17,8 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library( - edgecontainer "Distributed Cloud Edge Container API" - SERVICE_DIRS "__EMPTY__" "v1/") + edgecontainer "Distributed Cloud Edge Container API" SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(edgecontainer_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/edgecontainer/edge_container_client.h b/google/cloud/edgecontainer/edge_container_client.h deleted file mode 100644 index d026eb46bfe13..0000000000000 --- a/google/cloud/edgecontainer/edge_container_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/edgecontainer/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGECONTAINER_EDGE_CONTAINER_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGECONTAINER_EDGE_CONTAINER_CLIENT_H - -#include "google/cloud/edgecontainer/edge_container_connection.h" -#include "google/cloud/edgecontainer/v1/edge_container_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in edgecontainer_v1 instead of the aliases defined in -/// this namespace. -namespace edgecontainer { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use edgecontainer_v1::EdgeContainerClient directly. -using ::google::cloud::edgecontainer_v1::EdgeContainerClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace edgecontainer -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGECONTAINER_EDGE_CONTAINER_CLIENT_H diff --git a/google/cloud/edgecontainer/edge_container_connection.h b/google/cloud/edgecontainer/edge_container_connection.h deleted file mode 100644 index 002afd66bfca1..0000000000000 --- a/google/cloud/edgecontainer/edge_container_connection.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/edgecontainer/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGECONTAINER_EDGE_CONTAINER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGECONTAINER_EDGE_CONTAINER_CONNECTION_H - -#include "google/cloud/edgecontainer/edge_container_connection_idempotency_policy.h" -#include "google/cloud/edgecontainer/v1/edge_container_connection.h" - -namespace google { -namespace cloud { -namespace edgecontainer { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use edgecontainer_v1::MakeEdgeContainerConnection directly. -using ::google::cloud::edgecontainer_v1::MakeEdgeContainerConnection; - -/// @deprecated Use edgecontainer_v1::EdgeContainerConnection directly. -using ::google::cloud::edgecontainer_v1::EdgeContainerConnection; - -/// @deprecated Use edgecontainer_v1::EdgeContainerLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::edgecontainer_v1:: - EdgeContainerLimitedErrorCountRetryPolicy; - -/// @deprecated Use edgecontainer_v1::EdgeContainerLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::edgecontainer_v1::EdgeContainerLimitedTimeRetryPolicy; - -/// @deprecated Use edgecontainer_v1::EdgeContainerRetryPolicy directly. -using ::google::cloud::edgecontainer_v1::EdgeContainerRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace edgecontainer -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGECONTAINER_EDGE_CONTAINER_CONNECTION_H diff --git a/google/cloud/edgecontainer/edge_container_connection_idempotency_policy.h b/google/cloud/edgecontainer/edge_container_connection_idempotency_policy.h deleted file mode 100644 index 77fac618d73a2..0000000000000 --- a/google/cloud/edgecontainer/edge_container_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/edgecontainer/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGECONTAINER_EDGE_CONTAINER_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGECONTAINER_EDGE_CONTAINER_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/edgecontainer/v1/edge_container_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace edgecontainer { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// edgecontainer_v1::MakeDefaultEdgeContainerConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::edgecontainer_v1:: - MakeDefaultEdgeContainerConnectionIdempotencyPolicy; - -/// @deprecated Use edgecontainer_v1::EdgeContainerConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::edgecontainer_v1:: - EdgeContainerConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace edgecontainer -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGECONTAINER_EDGE_CONTAINER_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/edgecontainer/edge_container_options.h b/google/cloud/edgecontainer/edge_container_options.h deleted file mode 100644 index 3c09eae2f5089..0000000000000 --- a/google/cloud/edgecontainer/edge_container_options.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/edgecontainer/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGECONTAINER_EDGE_CONTAINER_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGECONTAINER_EDGE_CONTAINER_OPTIONS_H - -#include "google/cloud/edgecontainer/edge_container_connection.h" -#include "google/cloud/edgecontainer/edge_container_connection_idempotency_policy.h" -#include "google/cloud/edgecontainer/v1/edge_container_options.h" - -namespace google { -namespace cloud { -namespace edgecontainer { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use edgecontainer_v1::EdgeContainerPollingPolicyOption directly. -using ::google::cloud::edgecontainer_v1::EdgeContainerPollingPolicyOption; - -/// @deprecated Use edgecontainer_v1::EdgeContainerBackoffPolicyOption directly. -using ::google::cloud::edgecontainer_v1::EdgeContainerBackoffPolicyOption; - -/// @deprecated Use -/// edgecontainer_v1::EdgeContainerConnectionIdempotencyPolicyOption directly. -using ::google::cloud::edgecontainer_v1:: - EdgeContainerConnectionIdempotencyPolicyOption; - -/// @deprecated Use edgecontainer_v1::EdgeContainerPolicyOptionList directly. -using ::google::cloud::edgecontainer_v1::EdgeContainerPolicyOptionList; - -/// @deprecated Use edgecontainer_v1::EdgeContainerRetryPolicyOption directly. -using ::google::cloud::edgecontainer_v1::EdgeContainerRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace edgecontainer -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGECONTAINER_EDGE_CONTAINER_OPTIONS_H diff --git a/google/cloud/edgecontainer/mocks/mock_edge_container_connection.h b/google/cloud/edgecontainer/mocks/mock_edge_container_connection.h deleted file mode 100644 index 0b909b6410b58..0000000000000 --- a/google/cloud/edgecontainer/mocks/mock_edge_container_connection.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/edgecontainer/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGECONTAINER_MOCKS_MOCK_EDGE_CONTAINER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGECONTAINER_MOCKS_MOCK_EDGE_CONTAINER_CONNECTION_H - -#include "google/cloud/edgecontainer/edge_container_connection.h" -#include "google/cloud/edgecontainer/v1/mocks/mock_edge_container_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in edgecontainer_v1_mocks instead of the aliases -/// defined in this namespace. -namespace edgecontainer_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use edgecontainer_v1_mocks::MockEdgeContainerConnection -/// directly. -using ::google::cloud::edgecontainer_v1_mocks::MockEdgeContainerConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace edgecontainer_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGECONTAINER_MOCKS_MOCK_EDGE_CONTAINER_CONNECTION_H diff --git a/google/cloud/edgecontainer/quickstart/.bazelrc b/google/cloud/edgecontainer/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/edgecontainer/quickstart/.bazelrc +++ b/google/cloud/edgecontainer/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/edgecontainer/quickstart/CMakeLists.txt b/google/cloud/edgecontainer/quickstart/CMakeLists.txt index e58aa6fb4731a..028c300d91a8b 100644 --- a/google/cloud/edgecontainer/quickstart/CMakeLists.txt +++ b/google/cloud/edgecontainer/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Distributed Cloud Edge Container API C++ client # library from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-edgecontainer-quickstart CXX) find_package(google_cloud_cpp_edgecontainer REQUIRED) diff --git a/google/cloud/edgecontainer/v1/edge_container_client.h b/google/cloud/edgecontainer/v1/edge_container_client.h index 289715a35f619..1f52aec4a1d3d 100644 --- a/google/cloud/edgecontainer/v1/edge_container_client.h +++ b/google/cloud/edgecontainer/v1/edge_container_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/edgecontainer/v1/edge_container_connection.h b/google/cloud/edgecontainer/v1/edge_container_connection.h index 89d819babd56f..ba743a0301338 100644 --- a/google/cloud/edgecontainer/v1/edge_container_connection.h +++ b/google/cloud/edgecontainer/v1/edge_container_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/edgecontainer/v1/edge_container_connection_idempotency_policy.h" #include "google/cloud/edgecontainer/v1/internal/edge_container_retry_traits.h" +#include "google/cloud/edgecontainer/v1/service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/edgecontainer/v1/edge_container_connection_idempotency_policy.h b/google/cloud/edgecontainer/v1/edge_container_connection_idempotency_policy.h index 30a678ab26f40..36d23eff181fd 100644 --- a/google/cloud/edgecontainer/v1/edge_container_connection_idempotency_policy.h +++ b/google/cloud/edgecontainer/v1/edge_container_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGECONTAINER_V1_EDGE_CONTAINER_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGECONTAINER_V1_EDGE_CONTAINER_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/edgecontainer/v1/service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/edgecontainer/v1/internal/edge_container_auth_decorator.cc b/google/cloud/edgecontainer/v1/internal/edge_container_auth_decorator.cc index 0bca6312d2faa..245c40589a966 100644 --- a/google/cloud/edgecontainer/v1/internal/edge_container_auth_decorator.cc +++ b/google/cloud/edgecontainer/v1/internal/edge_container_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/edgecontainer/v1/service.proto #include "google/cloud/edgecontainer/v1/internal/edge_container_auth_decorator.h" -#include +#include "google/cloud/edgecontainer/v1/service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace edgecontainer_v1_internal { @@ -479,3 +482,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace edgecontainer_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/edgecontainer/v1/internal/edge_container_auth_decorator.h b/google/cloud/edgecontainer/v1/internal/edge_container_auth_decorator.h index 227eb71b20a9a..639476e1cca0a 100644 --- a/google/cloud/edgecontainer/v1/internal/edge_container_auth_decorator.h +++ b/google/cloud/edgecontainer/v1/internal/edge_container_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/edgecontainer/v1/internal/edge_container_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace edgecontainer_v1_internal { @@ -251,4 +254,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGECONTAINER_V1_INTERNAL_EDGE_CONTAINER_AUTH_DECORATOR_H diff --git a/google/cloud/edgecontainer/v1/internal/edge_container_connection_impl.h b/google/cloud/edgecontainer/v1/internal/edge_container_connection_impl.h index 90f49aa80a4fc..e1bc102ca78c0 100644 --- a/google/cloud/edgecontainer/v1/internal/edge_container_connection_impl.h +++ b/google/cloud/edgecontainer/v1/internal/edge_container_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/edgecontainer/v1/internal/edge_container_logging_decorator.cc b/google/cloud/edgecontainer/v1/internal/edge_container_logging_decorator.cc index f94252a304109..52159a7fddf96 100644 --- a/google/cloud/edgecontainer/v1/internal/edge_container_logging_decorator.cc +++ b/google/cloud/edgecontainer/v1/internal/edge_container_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/edgecontainer/v1/service.proto #include "google/cloud/edgecontainer/v1/internal/edge_container_logging_decorator.h" +#include "google/cloud/edgecontainer/v1/service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace edgecontainer_v1_internal { @@ -573,3 +576,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace edgecontainer_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/edgecontainer/v1/internal/edge_container_logging_decorator.h b/google/cloud/edgecontainer/v1/internal/edge_container_logging_decorator.h index 47fef0d683305..36eeb3382257d 100644 --- a/google/cloud/edgecontainer/v1/internal/edge_container_logging_decorator.h +++ b/google/cloud/edgecontainer/v1/internal/edge_container_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/edgecontainer/v1/internal/edge_container_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace edgecontainer_v1_internal { @@ -251,4 +254,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGECONTAINER_V1_INTERNAL_EDGE_CONTAINER_LOGGING_DECORATOR_H diff --git a/google/cloud/edgecontainer/v1/internal/edge_container_metadata_decorator.cc b/google/cloud/edgecontainer/v1/internal/edge_container_metadata_decorator.cc index 5bfa0a28422f3..06505878a0c46 100644 --- a/google/cloud/edgecontainer/v1/internal/edge_container_metadata_decorator.cc +++ b/google/cloud/edgecontainer/v1/internal/edge_container_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/edgecontainer/v1/service.proto #include "google/cloud/edgecontainer/v1/internal/edge_container_metadata_decorator.h" +#include "google/cloud/edgecontainer/v1/service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace edgecontainer_v1_internal { @@ -426,3 +430,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace edgecontainer_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/edgecontainer/v1/internal/edge_container_metadata_decorator.h b/google/cloud/edgecontainer/v1/internal/edge_container_metadata_decorator.h index af21b19661149..0a6de54803254 100644 --- a/google/cloud/edgecontainer/v1/internal/edge_container_metadata_decorator.h +++ b/google/cloud/edgecontainer/v1/internal/edge_container_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/edgecontainer/v1/internal/edge_container_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace edgecontainer_v1_internal { @@ -256,4 +259,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGECONTAINER_V1_INTERNAL_EDGE_CONTAINER_METADATA_DECORATOR_H diff --git a/google/cloud/edgecontainer/v1/internal/edge_container_option_defaults.cc b/google/cloud/edgecontainer/v1/internal/edge_container_option_defaults.cc index c911e1f96d67c..d57254de4d5f9 100644 --- a/google/cloud/edgecontainer/v1/internal/edge_container_option_defaults.cc +++ b/google/cloud/edgecontainer/v1/internal/edge_container_option_defaults.cc @@ -42,7 +42,7 @@ Options EdgeContainerDefaultOptions(Options options) { if (!options.has()) { options.set( edgecontainer_v1::EdgeContainerLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/edgecontainer/v1/internal/edge_container_stub.cc b/google/cloud/edgecontainer/v1/internal/edge_container_stub.cc index 8baddf499d022..5ea0d134f73a7 100644 --- a/google/cloud/edgecontainer/v1/internal/edge_container_stub.cc +++ b/google/cloud/edgecontainer/v1/internal/edge_container_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/edgecontainer/v1/service.proto #include "google/cloud/edgecontainer/v1/internal/edge_container_stub.h" +#include "google/cloud/edgecontainer/v1/service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace edgecontainer_v1_internal { @@ -562,3 +565,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace edgecontainer_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/edgecontainer/v1/internal/edge_container_stub.h b/google/cloud/edgecontainer/v1/internal/edge_container_stub.h index 65d2470933710..86bcf1c4544b0 100644 --- a/google/cloud/edgecontainer/v1/internal/edge_container_stub.h +++ b/google/cloud/edgecontainer/v1/internal/edge_container_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGECONTAINER_V1_INTERNAL_EDGE_CONTAINER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGECONTAINER_V1_INTERNAL_EDGE_CONTAINER_STUB_H +#include "google/cloud/edgecontainer/v1/service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace edgecontainer_v1_internal { @@ -477,4 +480,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGECONTAINER_V1_INTERNAL_EDGE_CONTAINER_STUB_H diff --git a/google/cloud/edgecontainer/v1/internal/edge_container_stub_factory.cc b/google/cloud/edgecontainer/v1/internal/edge_container_stub_factory.cc index a00a8a42569cf..9da036ec53ade 100644 --- a/google/cloud/edgecontainer/v1/internal/edge_container_stub_factory.cc +++ b/google/cloud/edgecontainer/v1/internal/edge_container_stub_factory.cc @@ -22,18 +22,21 @@ #include "google/cloud/edgecontainer/v1/internal/edge_container_metadata_decorator.h" #include "google/cloud/edgecontainer/v1/internal/edge_container_stub.h" #include "google/cloud/edgecontainer/v1/internal/edge_container_tracing_stub.h" +#include "google/cloud/edgecontainer/v1/service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace edgecontainer_v1_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace edgecontainer_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/edgecontainer/v1/internal/edge_container_stub_factory.h b/google/cloud/edgecontainer/v1/internal/edge_container_stub_factory.h index 9cfb0f0023eb3..43b03ce5a85fa 100644 --- a/google/cloud/edgecontainer/v1/internal/edge_container_stub_factory.h +++ b/google/cloud/edgecontainer/v1/internal/edge_container_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace edgecontainer_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGECONTAINER_V1_INTERNAL_EDGE_CONTAINER_STUB_FACTORY_H diff --git a/google/cloud/edgecontainer/v1/internal/edge_container_tracing_connection.cc b/google/cloud/edgecontainer/v1/internal/edge_container_tracing_connection.cc index 0ae731a45bae8..1418f62515d23 100644 --- a/google/cloud/edgecontainer/v1/internal/edge_container_tracing_connection.cc +++ b/google/cloud/edgecontainer/v1/internal/edge_container_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace edgecontainer_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - EdgeContainerTracingConnection::EdgeContainerTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -468,16 +466,12 @@ Status EdgeContainerTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeEdgeContainerTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/edgecontainer/v1/internal/edge_container_tracing_connection.h b/google/cloud/edgecontainer/v1/internal/edge_container_tracing_connection.h index 8d930e3fe39a3..94e13b50a26c4 100644 --- a/google/cloud/edgecontainer/v1/internal/edge_container_tracing_connection.h +++ b/google/cloud/edgecontainer/v1/internal/edge_container_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace edgecontainer_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class EdgeContainerTracingConnection : public edgecontainer_v1::EdgeContainerConnection { public: @@ -215,8 +213,6 @@ class EdgeContainerTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/edgecontainer/v1/internal/edge_container_tracing_stub.cc b/google/cloud/edgecontainer/v1/internal/edge_container_tracing_stub.cc index c6ea7b0d88da8..983135928c69d 100644 --- a/google/cloud/edgecontainer/v1/internal/edge_container_tracing_stub.cc +++ b/google/cloud/edgecontainer/v1/internal/edge_container_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace edgecontainer_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - EdgeContainerTracingStub::EdgeContainerTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -510,18 +511,14 @@ future EdgeContainerTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeEdgeContainerTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace edgecontainer_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/edgecontainer/v1/internal/edge_container_tracing_stub.h b/google/cloud/edgecontainer/v1/internal/edge_container_tracing_stub.h index aca685e333d6d..9ff2d75d513cc 100644 --- a/google/cloud/edgecontainer/v1/internal/edge_container_tracing_stub.h +++ b/google/cloud/edgecontainer/v1/internal/edge_container_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace edgecontainer_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class EdgeContainerTracingStub : public EdgeContainerStub { public: ~EdgeContainerTracingStub() override = default; @@ -246,8 +247,6 @@ class EdgeContainerTracingStub : public EdgeContainerStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -262,4 +261,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGECONTAINER_V1_INTERNAL_EDGE_CONTAINER_TRACING_STUB_H diff --git a/google/cloud/edgenetwork/BUILD.bazel b/google/cloud/edgenetwork/BUILD.bazel index b0640f61a0395..b3b66dafba138 100644 --- a/google/cloud/edgenetwork/BUILD.bazel +++ b/google/cloud/edgenetwork/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/edgenetwork/v1:edgenetwork_cc_grpc", + "@googleapis//google/cloud/edgenetwork/v1:edgenetwork_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/edgenetwork/quickstart/.bazelrc b/google/cloud/edgenetwork/quickstart/.bazelrc index 6777c6b4c95de..ec27511a60add 100644 --- a/google/cloud/edgenetwork/quickstart/.bazelrc +++ b/google/cloud/edgenetwork/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/edgenetwork/quickstart/CMakeLists.txt b/google/cloud/edgenetwork/quickstart/CMakeLists.txt index ba17a53963ff8..69f624fa10c46 100644 --- a/google/cloud/edgenetwork/quickstart/CMakeLists.txt +++ b/google/cloud/edgenetwork/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Distributed Cloud Edge Network API C++ client # library from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-edgenetwork-quickstart CXX) find_package(google_cloud_cpp_edgenetwork REQUIRED) diff --git a/google/cloud/edgenetwork/v1/edge_network_client.h b/google/cloud/edgenetwork/v1/edge_network_client.h index 6dd59ab3d995e..50e8fff1e52d5 100644 --- a/google/cloud/edgenetwork/v1/edge_network_client.h +++ b/google/cloud/edgenetwork/v1/edge_network_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/edgenetwork/v1/edge_network_connection.h b/google/cloud/edgenetwork/v1/edge_network_connection.h index aad99778e57f1..a54f6ed04151d 100644 --- a/google/cloud/edgenetwork/v1/edge_network_connection.h +++ b/google/cloud/edgenetwork/v1/edge_network_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/edgenetwork/v1/edge_network_connection_idempotency_policy.h" #include "google/cloud/edgenetwork/v1/internal/edge_network_retry_traits.h" +#include "google/cloud/edgenetwork/v1/service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/edgenetwork/v1/edge_network_connection_idempotency_policy.h b/google/cloud/edgenetwork/v1/edge_network_connection_idempotency_policy.h index 6b03944054395..84470cba1af3f 100644 --- a/google/cloud/edgenetwork/v1/edge_network_connection_idempotency_policy.h +++ b/google/cloud/edgenetwork/v1/edge_network_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGENETWORK_V1_EDGE_NETWORK_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGENETWORK_V1_EDGE_NETWORK_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/edgenetwork/v1/service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/edgenetwork/v1/internal/edge_network_auth_decorator.cc b/google/cloud/edgenetwork/v1/internal/edge_network_auth_decorator.cc index cca71df9bf2b5..949028455dce5 100644 --- a/google/cloud/edgenetwork/v1/internal/edge_network_auth_decorator.cc +++ b/google/cloud/edgenetwork/v1/internal/edge_network_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/edgenetwork/v1/service.proto #include "google/cloud/edgenetwork/v1/internal/edge_network_auth_decorator.h" -#include +#include "google/cloud/edgenetwork/v1/service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace edgenetwork_v1_internal { @@ -550,3 +553,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace edgenetwork_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/edgenetwork/v1/internal/edge_network_auth_decorator.h b/google/cloud/edgenetwork/v1/internal/edge_network_auth_decorator.h index 6edf1f3b57c17..0662ea80e6838 100644 --- a/google/cloud/edgenetwork/v1/internal/edge_network_auth_decorator.h +++ b/google/cloud/edgenetwork/v1/internal/edge_network_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/edgenetwork/v1/internal/edge_network_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace edgenetwork_v1_internal { @@ -287,4 +290,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGENETWORK_V1_INTERNAL_EDGE_NETWORK_AUTH_DECORATOR_H diff --git a/google/cloud/edgenetwork/v1/internal/edge_network_connection_impl.h b/google/cloud/edgenetwork/v1/internal/edge_network_connection_impl.h index 98aa413619412..1c8fe1b0c404a 100644 --- a/google/cloud/edgenetwork/v1/internal/edge_network_connection_impl.h +++ b/google/cloud/edgenetwork/v1/internal/edge_network_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/edgenetwork/v1/internal/edge_network_logging_decorator.cc b/google/cloud/edgenetwork/v1/internal/edge_network_logging_decorator.cc index b455d1c5fb61e..2fdb7bd1c9a31 100644 --- a/google/cloud/edgenetwork/v1/internal/edge_network_logging_decorator.cc +++ b/google/cloud/edgenetwork/v1/internal/edge_network_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/edgenetwork/v1/service.proto #include "google/cloud/edgenetwork/v1/internal/edge_network_logging_decorator.h" +#include "google/cloud/edgenetwork/v1/service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace edgenetwork_v1_internal { @@ -661,3 +664,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace edgenetwork_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/edgenetwork/v1/internal/edge_network_logging_decorator.h b/google/cloud/edgenetwork/v1/internal/edge_network_logging_decorator.h index d6ba5b8f9eb63..77209db2353b6 100644 --- a/google/cloud/edgenetwork/v1/internal/edge_network_logging_decorator.h +++ b/google/cloud/edgenetwork/v1/internal/edge_network_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/edgenetwork/v1/internal/edge_network_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace edgenetwork_v1_internal { @@ -287,4 +290,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGENETWORK_V1_INTERNAL_EDGE_NETWORK_LOGGING_DECORATOR_H diff --git a/google/cloud/edgenetwork/v1/internal/edge_network_metadata_decorator.cc b/google/cloud/edgenetwork/v1/internal/edge_network_metadata_decorator.cc index cae664591acba..4b7b8660ba20f 100644 --- a/google/cloud/edgenetwork/v1/internal/edge_network_metadata_decorator.cc +++ b/google/cloud/edgenetwork/v1/internal/edge_network_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/edgenetwork/v1/service.proto #include "google/cloud/edgenetwork/v1/internal/edge_network_metadata_decorator.h" +#include "google/cloud/edgenetwork/v1/service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace edgenetwork_v1_internal { @@ -488,3 +492,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace edgenetwork_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/edgenetwork/v1/internal/edge_network_metadata_decorator.h b/google/cloud/edgenetwork/v1/internal/edge_network_metadata_decorator.h index 99b598b7df4ac..541151debd935 100644 --- a/google/cloud/edgenetwork/v1/internal/edge_network_metadata_decorator.h +++ b/google/cloud/edgenetwork/v1/internal/edge_network_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/edgenetwork/v1/internal/edge_network_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace edgenetwork_v1_internal { @@ -292,4 +295,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGENETWORK_V1_INTERNAL_EDGE_NETWORK_METADATA_DECORATOR_H diff --git a/google/cloud/edgenetwork/v1/internal/edge_network_option_defaults.cc b/google/cloud/edgenetwork/v1/internal/edge_network_option_defaults.cc index cffb888c32079..44be437191c47 100644 --- a/google/cloud/edgenetwork/v1/internal/edge_network_option_defaults.cc +++ b/google/cloud/edgenetwork/v1/internal/edge_network_option_defaults.cc @@ -41,7 +41,7 @@ Options EdgeNetworkDefaultOptions(Options options) { if (!options.has()) { options.set( edgenetwork_v1::EdgeNetworkLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/edgenetwork/v1/internal/edge_network_stub.cc b/google/cloud/edgenetwork/v1/internal/edge_network_stub.cc index 7e9a87379c071..4c16a0c81c319 100644 --- a/google/cloud/edgenetwork/v1/internal/edge_network_stub.cc +++ b/google/cloud/edgenetwork/v1/internal/edge_network_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/edgenetwork/v1/service.proto #include "google/cloud/edgenetwork/v1/internal/edge_network_stub.h" +#include "google/cloud/edgenetwork/v1/service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace edgenetwork_v1_internal { @@ -642,3 +645,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace edgenetwork_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/edgenetwork/v1/internal/edge_network_stub.h b/google/cloud/edgenetwork/v1/internal/edge_network_stub.h index 13169918cde90..fc7b227da2ff5 100644 --- a/google/cloud/edgenetwork/v1/internal/edge_network_stub.h +++ b/google/cloud/edgenetwork/v1/internal/edge_network_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGENETWORK_V1_INTERNAL_EDGE_NETWORK_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGENETWORK_V1_INTERNAL_EDGE_NETWORK_STUB_H +#include "google/cloud/edgenetwork/v1/service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace edgenetwork_v1_internal { @@ -529,4 +532,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGENETWORK_V1_INTERNAL_EDGE_NETWORK_STUB_H diff --git a/google/cloud/edgenetwork/v1/internal/edge_network_stub_factory.cc b/google/cloud/edgenetwork/v1/internal/edge_network_stub_factory.cc index 8a15568c1b9e8..0fd376c29cd69 100644 --- a/google/cloud/edgenetwork/v1/internal/edge_network_stub_factory.cc +++ b/google/cloud/edgenetwork/v1/internal/edge_network_stub_factory.cc @@ -22,18 +22,21 @@ #include "google/cloud/edgenetwork/v1/internal/edge_network_metadata_decorator.h" #include "google/cloud/edgenetwork/v1/internal/edge_network_stub.h" #include "google/cloud/edgenetwork/v1/internal/edge_network_tracing_stub.h" +#include "google/cloud/edgenetwork/v1/service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace edgenetwork_v1_internal { @@ -74,3 +77,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace edgenetwork_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/edgenetwork/v1/internal/edge_network_stub_factory.h b/google/cloud/edgenetwork/v1/internal/edge_network_stub_factory.h index e244040e14b62..055b905580e5b 100644 --- a/google/cloud/edgenetwork/v1/internal/edge_network_stub_factory.h +++ b/google/cloud/edgenetwork/v1/internal/edge_network_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace edgenetwork_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGENETWORK_V1_INTERNAL_EDGE_NETWORK_STUB_FACTORY_H diff --git a/google/cloud/edgenetwork/v1/internal/edge_network_tracing_connection.cc b/google/cloud/edgenetwork/v1/internal/edge_network_tracing_connection.cc index 68bdb47f84190..c0f112a14f7b2 100644 --- a/google/cloud/edgenetwork/v1/internal/edge_network_tracing_connection.cc +++ b/google/cloud/edgenetwork/v1/internal/edge_network_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace edgenetwork_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - EdgeNetworkTracingConnection::EdgeNetworkTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -540,16 +538,12 @@ Status EdgeNetworkTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeEdgeNetworkTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/edgenetwork/v1/internal/edge_network_tracing_connection.h b/google/cloud/edgenetwork/v1/internal/edge_network_tracing_connection.h index ba6913930e6b8..f2ce6fa373f7f 100644 --- a/google/cloud/edgenetwork/v1/internal/edge_network_tracing_connection.h +++ b/google/cloud/edgenetwork/v1/internal/edge_network_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace edgenetwork_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class EdgeNetworkTracingConnection : public edgenetwork_v1::EdgeNetworkConnection { public: @@ -246,8 +244,6 @@ class EdgeNetworkTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/edgenetwork/v1/internal/edge_network_tracing_stub.cc b/google/cloud/edgenetwork/v1/internal/edge_network_tracing_stub.cc index 17d120363ac11..97007a29e1a5d 100644 --- a/google/cloud/edgenetwork/v1/internal/edge_network_tracing_stub.cc +++ b/google/cloud/edgenetwork/v1/internal/edge_network_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace edgenetwork_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - EdgeNetworkTracingStub::EdgeNetworkTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -584,18 +585,14 @@ future EdgeNetworkTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeEdgeNetworkTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace edgenetwork_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/edgenetwork/v1/internal/edge_network_tracing_stub.h b/google/cloud/edgenetwork/v1/internal/edge_network_tracing_stub.h index 3cfe7c3c3e3a5..e64f6d5bdf381 100644 --- a/google/cloud/edgenetwork/v1/internal/edge_network_tracing_stub.h +++ b/google/cloud/edgenetwork/v1/internal/edge_network_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace edgenetwork_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class EdgeNetworkTracingStub : public EdgeNetworkStub { public: ~EdgeNetworkTracingStub() override = default; @@ -282,8 +283,6 @@ class EdgeNetworkTracingStub : public EdgeNetworkStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -298,4 +297,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EDGENETWORK_V1_INTERNAL_EDGE_NETWORK_TRACING_STUB_H diff --git a/google/cloud/essentialcontacts/BUILD.bazel b/google/cloud/essentialcontacts/BUILD.bazel index 6c9c69eb07c18..12173833dcb15 100644 --- a/google/cloud/essentialcontacts/BUILD.bazel +++ b/google/cloud/essentialcontacts/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/essentialcontacts/v1:essentialcontacts_cc_grpc", + "@googleapis//google/cloud/essentialcontacts/v1:essentialcontacts_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/essentialcontacts/quickstart/.bazelrc b/google/cloud/essentialcontacts/quickstart/.bazelrc index 6777c6b4c95de..ec27511a60add 100644 --- a/google/cloud/essentialcontacts/quickstart/.bazelrc +++ b/google/cloud/essentialcontacts/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/essentialcontacts/quickstart/CMakeLists.txt b/google/cloud/essentialcontacts/quickstart/CMakeLists.txt index 61c5bdb8e2273..7a7c71e913097 100644 --- a/google/cloud/essentialcontacts/quickstart/CMakeLists.txt +++ b/google/cloud/essentialcontacts/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Essential Contacts API C++ client library from # a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-essentialcontacts-quickstart CXX) find_package(google_cloud_cpp_essentialcontacts REQUIRED) diff --git a/google/cloud/essentialcontacts/v1/essential_contacts_connection.h b/google/cloud/essentialcontacts/v1/essential_contacts_connection.h index 3ee8524a52e4a..e46e8f76d352d 100644 --- a/google/cloud/essentialcontacts/v1/essential_contacts_connection.h +++ b/google/cloud/essentialcontacts/v1/essential_contacts_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/essentialcontacts/v1/essential_contacts_connection_idempotency_policy.h" #include "google/cloud/essentialcontacts/v1/internal/essential_contacts_retry_traits.h" +#include "google/cloud/essentialcontacts/v1/service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/essentialcontacts/v1/essential_contacts_connection_idempotency_policy.h b/google/cloud/essentialcontacts/v1/essential_contacts_connection_idempotency_policy.h index 5a60688aebbdb..d8a9f7b184ad4 100644 --- a/google/cloud/essentialcontacts/v1/essential_contacts_connection_idempotency_policy.h +++ b/google/cloud/essentialcontacts/v1/essential_contacts_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ESSENTIALCONTACTS_V1_ESSENTIAL_CONTACTS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ESSENTIALCONTACTS_V1_ESSENTIAL_CONTACTS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/essentialcontacts/v1/service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/essentialcontacts/v1/internal/essential_contacts_auth_decorator.cc b/google/cloud/essentialcontacts/v1/internal/essential_contacts_auth_decorator.cc index b9b69ca3806ff..6422905b4cc3f 100644 --- a/google/cloud/essentialcontacts/v1/internal/essential_contacts_auth_decorator.cc +++ b/google/cloud/essentialcontacts/v1/internal/essential_contacts_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/essentialcontacts/v1/service.proto #include "google/cloud/essentialcontacts/v1/internal/essential_contacts_auth_decorator.h" -#include +#include "google/cloud/essentialcontacts/v1/service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace essentialcontacts_v1_internal { @@ -98,3 +101,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace essentialcontacts_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/essentialcontacts/v1/internal/essential_contacts_auth_decorator.h b/google/cloud/essentialcontacts/v1/internal/essential_contacts_auth_decorator.h index e4d150c2c47ee..5a3b0e1a0f75b 100644 --- a/google/cloud/essentialcontacts/v1/internal/essential_contacts_auth_decorator.h +++ b/google/cloud/essentialcontacts/v1/internal/essential_contacts_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace essentialcontacts_v1_internal { @@ -84,4 +87,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ESSENTIALCONTACTS_V1_INTERNAL_ESSENTIAL_CONTACTS_AUTH_DECORATOR_H diff --git a/google/cloud/essentialcontacts/v1/internal/essential_contacts_logging_decorator.cc b/google/cloud/essentialcontacts/v1/internal/essential_contacts_logging_decorator.cc index 46478b81cf283..beb4d4805a78c 100644 --- a/google/cloud/essentialcontacts/v1/internal/essential_contacts_logging_decorator.cc +++ b/google/cloud/essentialcontacts/v1/internal/essential_contacts_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/essentialcontacts/v1/service.proto #include "google/cloud/essentialcontacts/v1/internal/essential_contacts_logging_decorator.h" +#include "google/cloud/essentialcontacts/v1/service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace essentialcontacts_v1_internal { @@ -130,3 +133,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace essentialcontacts_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/essentialcontacts/v1/internal/essential_contacts_logging_decorator.h b/google/cloud/essentialcontacts/v1/internal/essential_contacts_logging_decorator.h index 90e2b288298d0..e9dc1be5f2e1f 100644 --- a/google/cloud/essentialcontacts/v1/internal/essential_contacts_logging_decorator.h +++ b/google/cloud/essentialcontacts/v1/internal/essential_contacts_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace essentialcontacts_v1_internal { @@ -84,4 +87,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ESSENTIALCONTACTS_V1_INTERNAL_ESSENTIAL_CONTACTS_LOGGING_DECORATOR_H diff --git a/google/cloud/essentialcontacts/v1/internal/essential_contacts_metadata_decorator.cc b/google/cloud/essentialcontacts/v1/internal/essential_contacts_metadata_decorator.cc index efaa8c1ccc24b..cc2a4af3b8534 100644 --- a/google/cloud/essentialcontacts/v1/internal/essential_contacts_metadata_decorator.cc +++ b/google/cloud/essentialcontacts/v1/internal/essential_contacts_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/essentialcontacts/v1/service.proto #include "google/cloud/essentialcontacts/v1/internal/essential_contacts_metadata_decorator.h" +#include "google/cloud/essentialcontacts/v1/service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace essentialcontacts_v1_internal { @@ -126,3 +130,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace essentialcontacts_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/essentialcontacts/v1/internal/essential_contacts_metadata_decorator.h b/google/cloud/essentialcontacts/v1/internal/essential_contacts_metadata_decorator.h index 6ad49c66c3d54..436d6bb009b39 100644 --- a/google/cloud/essentialcontacts/v1/internal/essential_contacts_metadata_decorator.h +++ b/google/cloud/essentialcontacts/v1/internal/essential_contacts_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace essentialcontacts_v1_internal { @@ -90,4 +93,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ESSENTIALCONTACTS_V1_INTERNAL_ESSENTIAL_CONTACTS_METADATA_DECORATOR_H diff --git a/google/cloud/essentialcontacts/v1/internal/essential_contacts_option_defaults.cc b/google/cloud/essentialcontacts/v1/internal/essential_contacts_option_defaults.cc index 8e51740fdb364..56d3be087060f 100644 --- a/google/cloud/essentialcontacts/v1/internal/essential_contacts_option_defaults.cc +++ b/google/cloud/essentialcontacts/v1/internal/essential_contacts_option_defaults.cc @@ -45,7 +45,7 @@ Options EssentialContactsServiceDefaultOptions(Options options) { options.set< essentialcontacts_v1::EssentialContactsServiceRetryPolicyOption>( essentialcontacts_v1::EssentialContactsServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace essentialcontacts_v1_internal { @@ -118,3 +121,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace essentialcontacts_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/essentialcontacts/v1/internal/essential_contacts_stub.h b/google/cloud/essentialcontacts/v1/internal/essential_contacts_stub.h index 6defc538cab0b..39a72607d89ff 100644 --- a/google/cloud/essentialcontacts/v1/internal/essential_contacts_stub.h +++ b/google/cloud/essentialcontacts/v1/internal/essential_contacts_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ESSENTIALCONTACTS_V1_INTERNAL_ESSENTIAL_CONTACTS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ESSENTIALCONTACTS_V1_INTERNAL_ESSENTIAL_CONTACTS_STUB_H +#include "google/cloud/essentialcontacts/v1/service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace essentialcontacts_v1_internal { @@ -129,4 +132,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ESSENTIALCONTACTS_V1_INTERNAL_ESSENTIAL_CONTACTS_STUB_H diff --git a/google/cloud/essentialcontacts/v1/internal/essential_contacts_stub_factory.cc b/google/cloud/essentialcontacts/v1/internal/essential_contacts_stub_factory.cc index 1317f891f8905..d7064847d8561 100644 --- a/google/cloud/essentialcontacts/v1/internal/essential_contacts_stub_factory.cc +++ b/google/cloud/essentialcontacts/v1/internal/essential_contacts_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/essentialcontacts/v1/internal/essential_contacts_metadata_decorator.h" #include "google/cloud/essentialcontacts/v1/internal/essential_contacts_stub.h" #include "google/cloud/essentialcontacts/v1/internal/essential_contacts_tracing_stub.h" +#include "google/cloud/essentialcontacts/v1/service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace essentialcontacts_v1_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace essentialcontacts_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/essentialcontacts/v1/internal/essential_contacts_stub_factory.h b/google/cloud/essentialcontacts/v1/internal/essential_contacts_stub_factory.h index 702f5fcca90c7..a359b4972b3a0 100644 --- a/google/cloud/essentialcontacts/v1/internal/essential_contacts_stub_factory.h +++ b/google/cloud/essentialcontacts/v1/internal/essential_contacts_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace essentialcontacts_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ESSENTIALCONTACTS_V1_INTERNAL_ESSENTIAL_CONTACTS_STUB_FACTORY_H diff --git a/google/cloud/essentialcontacts/v1/internal/essential_contacts_tracing_connection.cc b/google/cloud/essentialcontacts/v1/internal/essential_contacts_tracing_connection.cc index c4520653e0294..e78a919dd1271 100644 --- a/google/cloud/essentialcontacts/v1/internal/essential_contacts_tracing_connection.cc +++ b/google/cloud/essentialcontacts/v1/internal/essential_contacts_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace essentialcontacts_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - EssentialContactsServiceTracingConnection:: EssentialContactsServiceTracingConnection( std::shared_ptr< @@ -109,18 +107,14 @@ Status EssentialContactsServiceTracingConnection::SendTestMessage( return internal::EndSpan(*span, child_->SendTestMessage(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeEssentialContactsServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/essentialcontacts/v1/internal/essential_contacts_tracing_connection.h b/google/cloud/essentialcontacts/v1/internal/essential_contacts_tracing_connection.h index d9314b153b8c6..ca9f0d1cc5109 100644 --- a/google/cloud/essentialcontacts/v1/internal/essential_contacts_tracing_connection.h +++ b/google/cloud/essentialcontacts/v1/internal/essential_contacts_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace essentialcontacts_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class EssentialContactsServiceTracingConnection : public essentialcontacts_v1::EssentialContactsServiceConnection { public: @@ -74,8 +72,6 @@ class EssentialContactsServiceTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/essentialcontacts/v1/internal/essential_contacts_tracing_stub.cc b/google/cloud/essentialcontacts/v1/internal/essential_contacts_tracing_stub.cc index 193170b30a107..109fb93b7f57b 100644 --- a/google/cloud/essentialcontacts/v1/internal/essential_contacts_tracing_stub.cc +++ b/google/cloud/essentialcontacts/v1/internal/essential_contacts_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace essentialcontacts_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - EssentialContactsServiceTracingStub::EssentialContactsServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -123,19 +124,15 @@ Status EssentialContactsServiceTracingStub::SendTestMessage( child_->SendTestMessage(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeEssentialContactsServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace essentialcontacts_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/essentialcontacts/v1/internal/essential_contacts_tracing_stub.h b/google/cloud/essentialcontacts/v1/internal/essential_contacts_tracing_stub.h index 9005bd66de998..15a684ae6217d 100644 --- a/google/cloud/essentialcontacts/v1/internal/essential_contacts_tracing_stub.h +++ b/google/cloud/essentialcontacts/v1/internal/essential_contacts_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace essentialcontacts_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class EssentialContactsServiceTracingStub : public EssentialContactsServiceStub { public: @@ -82,8 +83,6 @@ class EssentialContactsServiceTracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -99,4 +98,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ESSENTIALCONTACTS_V1_INTERNAL_ESSENTIAL_CONTACTS_TRACING_STUB_H diff --git a/google/cloud/eventarc/BUILD.bazel b/google/cloud/eventarc/BUILD.bazel index 9ce87af2e1f78..8f372ffbfbdf9 100644 --- a/google/cloud/eventarc/BUILD.bazel +++ b/google/cloud/eventarc/BUILD.bazel @@ -19,14 +19,13 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "publishing/v1/", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/eventarc/publishing/v1:publishing_cc_grpc", - "@com_google_googleapis//google/cloud/eventarc/v1:eventarc_cc_grpc", + "@googleapis//google/cloud/eventarc/publishing/v1:publishing_cc_grpc", + "@googleapis//google/cloud/eventarc/v1:eventarc_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/eventarc/CMakeLists.txt b/google/cloud/eventarc/CMakeLists.txt index 65b1f628c842f..fc7def70c0de4 100644 --- a/google/cloud/eventarc/CMakeLists.txt +++ b/google/cloud/eventarc/CMakeLists.txt @@ -16,8 +16,8 @@ include(GoogleCloudCppLibrary) -google_cloud_cpp_add_gapic_library( - eventarc "Eventarc API" SERVICE_DIRS "__EMPTY__" "publishing/v1/" "v1/") +google_cloud_cpp_add_gapic_library(eventarc "Eventarc API" + SERVICE_DIRS "publishing/v1/" "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(eventarc_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/eventarc/eventarc_client.h b/google/cloud/eventarc/eventarc_client.h deleted file mode 100644 index d2c70fd4f8acf..0000000000000 --- a/google/cloud/eventarc/eventarc_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/eventarc/v1/eventarc.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_EVENTARC_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_EVENTARC_CLIENT_H - -#include "google/cloud/eventarc/eventarc_connection.h" -#include "google/cloud/eventarc/v1/eventarc_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in eventarc_v1 instead of the aliases defined in -/// this namespace. -namespace eventarc { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use eventarc_v1::EventarcClient directly. -using ::google::cloud::eventarc_v1::EventarcClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace eventarc -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_EVENTARC_CLIENT_H diff --git a/google/cloud/eventarc/eventarc_connection.h b/google/cloud/eventarc/eventarc_connection.h deleted file mode 100644 index 49529ce2e4ac6..0000000000000 --- a/google/cloud/eventarc/eventarc_connection.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/eventarc/v1/eventarc.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_EVENTARC_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_EVENTARC_CONNECTION_H - -#include "google/cloud/eventarc/eventarc_connection_idempotency_policy.h" -#include "google/cloud/eventarc/v1/eventarc_connection.h" - -namespace google { -namespace cloud { -namespace eventarc { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use eventarc_v1::MakeEventarcConnection directly. -using ::google::cloud::eventarc_v1::MakeEventarcConnection; - -/// @deprecated Use eventarc_v1::EventarcConnection directly. -using ::google::cloud::eventarc_v1::EventarcConnection; - -/// @deprecated Use eventarc_v1::EventarcLimitedErrorCountRetryPolicy directly. -using ::google::cloud::eventarc_v1::EventarcLimitedErrorCountRetryPolicy; - -/// @deprecated Use eventarc_v1::EventarcLimitedTimeRetryPolicy directly. -using ::google::cloud::eventarc_v1::EventarcLimitedTimeRetryPolicy; - -/// @deprecated Use eventarc_v1::EventarcRetryPolicy directly. -using ::google::cloud::eventarc_v1::EventarcRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace eventarc -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_EVENTARC_CONNECTION_H diff --git a/google/cloud/eventarc/eventarc_connection_idempotency_policy.h b/google/cloud/eventarc/eventarc_connection_idempotency_policy.h deleted file mode 100644 index 1b4965d213d1c..0000000000000 --- a/google/cloud/eventarc/eventarc_connection_idempotency_policy.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/eventarc/v1/eventarc.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_EVENTARC_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_EVENTARC_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/eventarc/v1/eventarc_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace eventarc { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use eventarc_v1::MakeDefaultEventarcConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::eventarc_v1:: - MakeDefaultEventarcConnectionIdempotencyPolicy; - -/// @deprecated Use eventarc_v1::EventarcConnectionIdempotencyPolicy directly. -using ::google::cloud::eventarc_v1::EventarcConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace eventarc -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_EVENTARC_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/eventarc/eventarc_options.h b/google/cloud/eventarc/eventarc_options.h deleted file mode 100644 index 6c0360bcb57b8..0000000000000 --- a/google/cloud/eventarc/eventarc_options.h +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/eventarc/v1/eventarc.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_EVENTARC_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_EVENTARC_OPTIONS_H - -#include "google/cloud/eventarc/eventarc_connection.h" -#include "google/cloud/eventarc/eventarc_connection_idempotency_policy.h" -#include "google/cloud/eventarc/v1/eventarc_options.h" - -namespace google { -namespace cloud { -namespace eventarc { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use eventarc_v1::EventarcPollingPolicyOption directly. -using ::google::cloud::eventarc_v1::EventarcPollingPolicyOption; - -/// @deprecated Use eventarc_v1::EventarcBackoffPolicyOption directly. -using ::google::cloud::eventarc_v1::EventarcBackoffPolicyOption; - -/// @deprecated Use eventarc_v1::EventarcConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::eventarc_v1::EventarcConnectionIdempotencyPolicyOption; - -/// @deprecated Use eventarc_v1::EventarcPolicyOptionList directly. -using ::google::cloud::eventarc_v1::EventarcPolicyOptionList; - -/// @deprecated Use eventarc_v1::EventarcRetryPolicyOption directly. -using ::google::cloud::eventarc_v1::EventarcRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace eventarc -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_EVENTARC_OPTIONS_H diff --git a/google/cloud/eventarc/mocks/mock_eventarc_connection.h b/google/cloud/eventarc/mocks/mock_eventarc_connection.h deleted file mode 100644 index ab9ec3d702a12..0000000000000 --- a/google/cloud/eventarc/mocks/mock_eventarc_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/eventarc/v1/eventarc.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_MOCKS_MOCK_EVENTARC_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_MOCKS_MOCK_EVENTARC_CONNECTION_H - -#include "google/cloud/eventarc/eventarc_connection.h" -#include "google/cloud/eventarc/v1/mocks/mock_eventarc_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in eventarc_v1_mocks instead of the aliases -/// defined in this namespace. -namespace eventarc_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use eventarc_v1_mocks::MockEventarcConnection directly. -using ::google::cloud::eventarc_v1_mocks::MockEventarcConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace eventarc_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_MOCKS_MOCK_EVENTARC_CONNECTION_H diff --git a/google/cloud/eventarc/mocks/mock_publisher_connection.h b/google/cloud/eventarc/mocks/mock_publisher_connection.h deleted file mode 100644 index 692235ccd2b99..0000000000000 --- a/google/cloud/eventarc/mocks/mock_publisher_connection.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/eventarc/publishing/v1/publisher.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_MOCKS_MOCK_PUBLISHER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_MOCKS_MOCK_PUBLISHER_CONNECTION_H - -#include "google/cloud/eventarc/publisher_connection.h" -#include "google/cloud/eventarc/publishing/v1/mocks/mock_publisher_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in eventarc_publishing_v1_mocks instead of the aliases -/// defined in this namespace. -namespace eventarc_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use eventarc_publishing_v1_mocks::MockPublisherConnection -/// directly. -using ::google::cloud::eventarc_publishing_v1_mocks::MockPublisherConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace eventarc_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_MOCKS_MOCK_PUBLISHER_CONNECTION_H diff --git a/google/cloud/eventarc/publisher_client.h b/google/cloud/eventarc/publisher_client.h deleted file mode 100644 index 1e209fb951f89..0000000000000 --- a/google/cloud/eventarc/publisher_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/eventarc/publishing/v1/publisher.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_PUBLISHER_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_PUBLISHER_CLIENT_H - -#include "google/cloud/eventarc/publisher_connection.h" -#include "google/cloud/eventarc/publishing/v1/publisher_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in eventarc_publishing_v1 instead of the aliases defined -/// in this namespace. -namespace eventarc { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use eventarc_publishing_v1::PublisherClient directly. -using ::google::cloud::eventarc_publishing_v1::PublisherClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace eventarc -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_PUBLISHER_CLIENT_H diff --git a/google/cloud/eventarc/publisher_connection.h b/google/cloud/eventarc/publisher_connection.h deleted file mode 100644 index 9b5a6a49e882a..0000000000000 --- a/google/cloud/eventarc/publisher_connection.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/eventarc/publishing/v1/publisher.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_PUBLISHER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_PUBLISHER_CONNECTION_H - -#include "google/cloud/eventarc/publisher_connection_idempotency_policy.h" -#include "google/cloud/eventarc/publishing/v1/publisher_connection.h" - -namespace google { -namespace cloud { -namespace eventarc { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use eventarc_publishing_v1::MakePublisherConnection directly. -using ::google::cloud::eventarc_publishing_v1::MakePublisherConnection; - -/// @deprecated Use eventarc_publishing_v1::PublisherConnection directly. -using ::google::cloud::eventarc_publishing_v1::PublisherConnection; - -/// @deprecated Use -/// eventarc_publishing_v1::PublisherLimitedErrorCountRetryPolicy directly. -using ::google::cloud::eventarc_publishing_v1:: - PublisherLimitedErrorCountRetryPolicy; - -/// @deprecated Use eventarc_publishing_v1::PublisherLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::eventarc_publishing_v1::PublisherLimitedTimeRetryPolicy; - -/// @deprecated Use eventarc_publishing_v1::PublisherRetryPolicy directly. -using ::google::cloud::eventarc_publishing_v1::PublisherRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace eventarc -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_PUBLISHER_CONNECTION_H diff --git a/google/cloud/eventarc/publisher_connection_idempotency_policy.h b/google/cloud/eventarc/publisher_connection_idempotency_policy.h deleted file mode 100644 index d17e0f928b59e..0000000000000 --- a/google/cloud/eventarc/publisher_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/eventarc/publishing/v1/publisher.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_PUBLISHER_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_PUBLISHER_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/eventarc/publishing/v1/publisher_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace eventarc { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// eventarc_publishing_v1::MakeDefaultPublisherConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::eventarc_publishing_v1:: - MakeDefaultPublisherConnectionIdempotencyPolicy; - -/// @deprecated Use eventarc_publishing_v1::PublisherConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::eventarc_publishing_v1:: - PublisherConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace eventarc -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_PUBLISHER_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/eventarc/publisher_options.h b/google/cloud/eventarc/publisher_options.h deleted file mode 100644 index 9030867f851b9..0000000000000 --- a/google/cloud/eventarc/publisher_options.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/eventarc/publishing/v1/publisher.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_PUBLISHER_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_PUBLISHER_OPTIONS_H - -#include "google/cloud/eventarc/publisher_connection.h" -#include "google/cloud/eventarc/publisher_connection_idempotency_policy.h" -#include "google/cloud/eventarc/publishing/v1/publisher_options.h" - -namespace google { -namespace cloud { -namespace eventarc { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use eventarc_publishing_v1::PublisherBackoffPolicyOption -/// directly. -using ::google::cloud::eventarc_publishing_v1::PublisherBackoffPolicyOption; - -/// @deprecated Use -/// eventarc_publishing_v1::PublisherConnectionIdempotencyPolicyOption directly. -using ::google::cloud::eventarc_publishing_v1:: - PublisherConnectionIdempotencyPolicyOption; - -/// @deprecated Use eventarc_publishing_v1::PublisherPolicyOptionList directly. -using ::google::cloud::eventarc_publishing_v1::PublisherPolicyOptionList; - -/// @deprecated Use eventarc_publishing_v1::PublisherRetryPolicyOption directly. -using ::google::cloud::eventarc_publishing_v1::PublisherRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace eventarc -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_PUBLISHER_OPTIONS_H diff --git a/google/cloud/eventarc/publishing/v1/internal/publisher_auth_decorator.cc b/google/cloud/eventarc/publishing/v1/internal/publisher_auth_decorator.cc index 83e6398a21a2f..86b468cb86025 100644 --- a/google/cloud/eventarc/publishing/v1/internal/publisher_auth_decorator.cc +++ b/google/cloud/eventarc/publishing/v1/internal/publisher_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/eventarc/publishing/v1/publisher.proto #include "google/cloud/eventarc/publishing/v1/internal/publisher_auth_decorator.h" -#include +#include "google/cloud/eventarc/publishing/v1/publisher.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace eventarc_publishing_v1_internal { @@ -65,3 +68,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace eventarc_publishing_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/eventarc/publishing/v1/internal/publisher_auth_decorator.h b/google/cloud/eventarc/publishing/v1/internal/publisher_auth_decorator.h index 103eea955b82a..2666428c6dfe1 100644 --- a/google/cloud/eventarc/publishing/v1/internal/publisher_auth_decorator.h +++ b/google/cloud/eventarc/publishing/v1/internal/publisher_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace eventarc_publishing_v1_internal { @@ -66,4 +69,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_PUBLISHING_V1_INTERNAL_PUBLISHER_AUTH_DECORATOR_H diff --git a/google/cloud/eventarc/publishing/v1/internal/publisher_logging_decorator.cc b/google/cloud/eventarc/publishing/v1/internal/publisher_logging_decorator.cc index 5faa6117e62df..535db88b26c5c 100644 --- a/google/cloud/eventarc/publishing/v1/internal/publisher_logging_decorator.cc +++ b/google/cloud/eventarc/publishing/v1/internal/publisher_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/eventarc/publishing/v1/publisher.proto #include "google/cloud/eventarc/publishing/v1/internal/publisher_logging_decorator.h" +#include "google/cloud/eventarc/publishing/v1/publisher.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace eventarc_publishing_v1_internal { @@ -83,3 +86,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace eventarc_publishing_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/eventarc/publishing/v1/internal/publisher_logging_decorator.h b/google/cloud/eventarc/publishing/v1/internal/publisher_logging_decorator.h index 0b8faeb2aa9e3..18530a6a3341d 100644 --- a/google/cloud/eventarc/publishing/v1/internal/publisher_logging_decorator.h +++ b/google/cloud/eventarc/publishing/v1/internal/publisher_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace eventarc_publishing_v1_internal { @@ -66,4 +69,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_PUBLISHING_V1_INTERNAL_PUBLISHER_LOGGING_DECORATOR_H diff --git a/google/cloud/eventarc/publishing/v1/internal/publisher_metadata_decorator.cc b/google/cloud/eventarc/publishing/v1/internal/publisher_metadata_decorator.cc index 99a5e03cef57d..266b39f245a37 100644 --- a/google/cloud/eventarc/publishing/v1/internal/publisher_metadata_decorator.cc +++ b/google/cloud/eventarc/publishing/v1/internal/publisher_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/eventarc/publishing/v1/publisher.proto #include "google/cloud/eventarc/publishing/v1/internal/publisher_metadata_decorator.h" +#include "google/cloud/eventarc/publishing/v1/publisher.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace eventarc_publishing_v1_internal { @@ -93,3 +97,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace eventarc_publishing_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/eventarc/publishing/v1/internal/publisher_metadata_decorator.h b/google/cloud/eventarc/publishing/v1/internal/publisher_metadata_decorator.h index 024277f58222f..682fdeecb278a 100644 --- a/google/cloud/eventarc/publishing/v1/internal/publisher_metadata_decorator.h +++ b/google/cloud/eventarc/publishing/v1/internal/publisher_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace eventarc_publishing_v1_internal { @@ -71,4 +74,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_PUBLISHING_V1_INTERNAL_PUBLISHER_METADATA_DECORATOR_H diff --git a/google/cloud/eventarc/publishing/v1/internal/publisher_option_defaults.cc b/google/cloud/eventarc/publishing/v1/internal/publisher_option_defaults.cc index 216104339d6c9..6013cc86445b8 100644 --- a/google/cloud/eventarc/publishing/v1/internal/publisher_option_defaults.cc +++ b/google/cloud/eventarc/publishing/v1/internal/publisher_option_defaults.cc @@ -42,7 +42,7 @@ Options PublisherDefaultOptions(Options options) { if (!options.has()) { options.set( eventarc_publishing_v1::PublisherLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/eventarc/publishing/v1/internal/publisher_stub.cc b/google/cloud/eventarc/publishing/v1/internal/publisher_stub.cc index 9dd65e39bcb6f..baaadb8920e7d 100644 --- a/google/cloud/eventarc/publishing/v1/internal/publisher_stub.cc +++ b/google/cloud/eventarc/publishing/v1/internal/publisher_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/eventarc/publishing/v1/publisher.proto #include "google/cloud/eventarc/publishing/v1/internal/publisher_stub.h" +#include "google/cloud/eventarc/publishing/v1/publisher.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace eventarc_publishing_v1_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace eventarc_publishing_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/eventarc/publishing/v1/internal/publisher_stub.h b/google/cloud/eventarc/publishing/v1/internal/publisher_stub.h index 8656329f30d4a..3f33a0a7b5e27 100644 --- a/google/cloud/eventarc/publishing/v1/internal/publisher_stub.h +++ b/google/cloud/eventarc/publishing/v1/internal/publisher_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_PUBLISHING_V1_INTERNAL_PUBLISHER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_PUBLISHING_V1_INTERNAL_PUBLISHER_STUB_H +#include "google/cloud/eventarc/publishing/v1/publisher.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace eventarc_publishing_v1_internal { @@ -92,4 +95,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_PUBLISHING_V1_INTERNAL_PUBLISHER_STUB_H diff --git a/google/cloud/eventarc/publishing/v1/internal/publisher_stub_factory.cc b/google/cloud/eventarc/publishing/v1/internal/publisher_stub_factory.cc index 52ec12775bcab..66ee07a42d467 100644 --- a/google/cloud/eventarc/publishing/v1/internal/publisher_stub_factory.cc +++ b/google/cloud/eventarc/publishing/v1/internal/publisher_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/eventarc/publishing/v1/internal/publisher_metadata_decorator.h" #include "google/cloud/eventarc/publishing/v1/internal/publisher_stub.h" #include "google/cloud/eventarc/publishing/v1/internal/publisher_tracing_stub.h" +#include "google/cloud/eventarc/publishing/v1/publisher.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace eventarc_publishing_v1_internal { @@ -68,3 +71,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace eventarc_publishing_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/eventarc/publishing/v1/internal/publisher_stub_factory.h b/google/cloud/eventarc/publishing/v1/internal/publisher_stub_factory.h index eac2419426604..aeb19d53890c5 100644 --- a/google/cloud/eventarc/publishing/v1/internal/publisher_stub_factory.h +++ b/google/cloud/eventarc/publishing/v1/internal/publisher_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace eventarc_publishing_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_PUBLISHING_V1_INTERNAL_PUBLISHER_STUB_FACTORY_H diff --git a/google/cloud/eventarc/publishing/v1/internal/publisher_tracing_connection.cc b/google/cloud/eventarc/publishing/v1/internal/publisher_tracing_connection.cc index f84756caeba7d..a2df5c54e45ef 100644 --- a/google/cloud/eventarc/publishing/v1/internal/publisher_tracing_connection.cc +++ b/google/cloud/eventarc/publishing/v1/internal/publisher_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace eventarc_publishing_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PublisherTracingConnection::PublisherTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -64,16 +62,12 @@ PublisherTracingConnection::Publish( return internal::EndSpan(*span, child_->Publish(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePublisherTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/eventarc/publishing/v1/internal/publisher_tracing_connection.h b/google/cloud/eventarc/publishing/v1/internal/publisher_tracing_connection.h index 373de26ec0924..e8f56076f36da 100644 --- a/google/cloud/eventarc/publishing/v1/internal/publisher_tracing_connection.h +++ b/google/cloud/eventarc/publishing/v1/internal/publisher_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace eventarc_publishing_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PublisherTracingConnection : public eventarc_publishing_v1::PublisherConnection { public: @@ -59,8 +57,6 @@ class PublisherTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/eventarc/publishing/v1/internal/publisher_tracing_stub.cc b/google/cloud/eventarc/publishing/v1/internal/publisher_tracing_stub.cc index 640f69dc965c4..0e4fc9011c305 100644 --- a/google/cloud/eventarc/publishing/v1/internal/publisher_tracing_stub.cc +++ b/google/cloud/eventarc/publishing/v1/internal/publisher_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace eventarc_publishing_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PublisherTracingStub::PublisherTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -72,18 +73,14 @@ PublisherTracingStub::Publish( child_->Publish(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePublisherTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace eventarc_publishing_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/eventarc/publishing/v1/internal/publisher_tracing_stub.h b/google/cloud/eventarc/publishing/v1/internal/publisher_tracing_stub.h index d9d81e3b4b101..8b20445babeb0 100644 --- a/google/cloud/eventarc/publishing/v1/internal/publisher_tracing_stub.h +++ b/google/cloud/eventarc/publishing/v1/internal/publisher_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace eventarc_publishing_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PublisherTracingStub : public PublisherStub { public: ~PublisherTracingStub() override = default; @@ -62,8 +63,6 @@ class PublisherTracingStub : public PublisherStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -78,4 +77,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_PUBLISHING_V1_INTERNAL_PUBLISHER_TRACING_STUB_H diff --git a/google/cloud/eventarc/publishing/v1/publisher_connection.h b/google/cloud/eventarc/publishing/v1/publisher_connection.h index fb8e45d8f0049..d244cc64c66d7 100644 --- a/google/cloud/eventarc/publishing/v1/publisher_connection.h +++ b/google/cloud/eventarc/publishing/v1/publisher_connection.h @@ -20,13 +20,13 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_PUBLISHING_V1_PUBLISHER_CONNECTION_H #include "google/cloud/eventarc/publishing/v1/internal/publisher_retry_traits.h" +#include "google/cloud/eventarc/publishing/v1/publisher.pb.h" #include "google/cloud/eventarc/publishing/v1/publisher_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/eventarc/publishing/v1/publisher_connection_idempotency_policy.h b/google/cloud/eventarc/publishing/v1/publisher_connection_idempotency_policy.h index 434139b972be4..90ac3a790c80c 100644 --- a/google/cloud/eventarc/publishing/v1/publisher_connection_idempotency_policy.h +++ b/google/cloud/eventarc/publishing/v1/publisher_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_PUBLISHING_V1_PUBLISHER_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_PUBLISHING_V1_PUBLISHER_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/eventarc/publishing/v1/publisher.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/eventarc/quickstart/.bazelrc b/google/cloud/eventarc/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/eventarc/quickstart/.bazelrc +++ b/google/cloud/eventarc/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/eventarc/quickstart/CMakeLists.txt b/google/cloud/eventarc/quickstart/CMakeLists.txt index 9e661d39fb00b..e73032cabf4ef 100644 --- a/google/cloud/eventarc/quickstart/CMakeLists.txt +++ b/google/cloud/eventarc/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Eventarc API C++ client library from a larger # CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-eventarc-quickstart CXX) find_package(google_cloud_cpp_eventarc REQUIRED) diff --git a/google/cloud/eventarc/v1/eventarc_client.h b/google/cloud/eventarc/v1/eventarc_client.h index 64b3bbf3217af..4203dafcc29d8 100644 --- a/google/cloud/eventarc/v1/eventarc_client.h +++ b/google/cloud/eventarc/v1/eventarc_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/eventarc/v1/eventarc_connection.h b/google/cloud/eventarc/v1/eventarc_connection.h index 9dabae034cb3e..edbfa2593217b 100644 --- a/google/cloud/eventarc/v1/eventarc_connection.h +++ b/google/cloud/eventarc/v1/eventarc_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_V1_EVENTARC_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_V1_EVENTARC_CONNECTION_H +#include "google/cloud/eventarc/v1/eventarc.pb.h" #include "google/cloud/eventarc/v1/eventarc_connection_idempotency_policy.h" #include "google/cloud/eventarc/v1/internal/eventarc_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/eventarc/v1/eventarc_connection_idempotency_policy.h b/google/cloud/eventarc/v1/eventarc_connection_idempotency_policy.h index b7cdcc7cdf041..8e14bdec7792e 100644 --- a/google/cloud/eventarc/v1/eventarc_connection_idempotency_policy.h +++ b/google/cloud/eventarc/v1/eventarc_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_V1_EVENTARC_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_V1_EVENTARC_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/eventarc/v1/eventarc.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/eventarc/v1/internal/eventarc_auth_decorator.cc b/google/cloud/eventarc/v1/internal/eventarc_auth_decorator.cc index a93180cfcaab4..feee71d6149da 100644 --- a/google/cloud/eventarc/v1/internal/eventarc_auth_decorator.cc +++ b/google/cloud/eventarc/v1/internal/eventarc_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/eventarc/v1/eventarc.proto #include "google/cloud/eventarc/v1/internal/eventarc_auth_decorator.h" -#include +#include "google/cloud/eventarc/v1/eventarc.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace eventarc_v1_internal { @@ -877,3 +880,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace eventarc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/eventarc/v1/internal/eventarc_auth_decorator.h b/google/cloud/eventarc/v1/internal/eventarc_auth_decorator.h index 99a3b4ce81e32..49628689d5d88 100644 --- a/google/cloud/eventarc/v1/internal/eventarc_auth_decorator.h +++ b/google/cloud/eventarc/v1/internal/eventarc_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/eventarc/v1/internal/eventarc_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace eventarc_v1_internal { @@ -431,4 +434,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_V1_INTERNAL_EVENTARC_AUTH_DECORATOR_H diff --git a/google/cloud/eventarc/v1/internal/eventarc_connection_impl.h b/google/cloud/eventarc/v1/internal/eventarc_connection_impl.h index faff91f54fa5e..0a4d42cb2b34f 100644 --- a/google/cloud/eventarc/v1/internal/eventarc_connection_impl.h +++ b/google/cloud/eventarc/v1/internal/eventarc_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/eventarc/v1/internal/eventarc_logging_decorator.cc b/google/cloud/eventarc/v1/internal/eventarc_logging_decorator.cc index 01d8be8d0a083..f830e65fec9c5 100644 --- a/google/cloud/eventarc/v1/internal/eventarc_logging_decorator.cc +++ b/google/cloud/eventarc/v1/internal/eventarc_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/eventarc/v1/eventarc.proto #include "google/cloud/eventarc/v1/internal/eventarc_logging_decorator.h" +#include "google/cloud/eventarc/v1/eventarc.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace eventarc_v1_internal { @@ -1027,3 +1030,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace eventarc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/eventarc/v1/internal/eventarc_logging_decorator.h b/google/cloud/eventarc/v1/internal/eventarc_logging_decorator.h index 76c00c32a365a..8dccce2b1e6f4 100644 --- a/google/cloud/eventarc/v1/internal/eventarc_logging_decorator.h +++ b/google/cloud/eventarc/v1/internal/eventarc_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/eventarc/v1/internal/eventarc_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace eventarc_v1_internal { @@ -431,4 +434,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_V1_INTERNAL_EVENTARC_LOGGING_DECORATOR_H diff --git a/google/cloud/eventarc/v1/internal/eventarc_metadata_decorator.cc b/google/cloud/eventarc/v1/internal/eventarc_metadata_decorator.cc index 904ee344da28f..ea011b28ecf77 100644 --- a/google/cloud/eventarc/v1/internal/eventarc_metadata_decorator.cc +++ b/google/cloud/eventarc/v1/internal/eventarc_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/eventarc/v1/eventarc.proto #include "google/cloud/eventarc/v1/internal/eventarc_metadata_decorator.h" +#include "google/cloud/eventarc/v1/eventarc.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace eventarc_v1_internal { @@ -756,3 +760,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace eventarc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/eventarc/v1/internal/eventarc_metadata_decorator.h b/google/cloud/eventarc/v1/internal/eventarc_metadata_decorator.h index ff0dd43f13aa6..4cf9259277c4e 100644 --- a/google/cloud/eventarc/v1/internal/eventarc_metadata_decorator.h +++ b/google/cloud/eventarc/v1/internal/eventarc_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/eventarc/v1/internal/eventarc_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace eventarc_v1_internal { @@ -436,4 +439,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_V1_INTERNAL_EVENTARC_METADATA_DECORATOR_H diff --git a/google/cloud/eventarc/v1/internal/eventarc_option_defaults.cc b/google/cloud/eventarc/v1/internal/eventarc_option_defaults.cc index cf4bb927f804a..a08cda59c6c4f 100644 --- a/google/cloud/eventarc/v1/internal/eventarc_option_defaults.cc +++ b/google/cloud/eventarc/v1/internal/eventarc_option_defaults.cc @@ -40,7 +40,7 @@ Options EventarcDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - eventarc_v1::EventarcLimitedTimeRetryPolicy(std::chrono::minutes(30)) + eventarc_v1::EventarcLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/eventarc/v1/internal/eventarc_stub.cc b/google/cloud/eventarc/v1/internal/eventarc_stub.cc index 620a8e0d06f47..ffdaa7eb195c4 100644 --- a/google/cloud/eventarc/v1/internal/eventarc_stub.cc +++ b/google/cloud/eventarc/v1/internal/eventarc_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/eventarc/v1/eventarc.proto #include "google/cloud/eventarc/v1/internal/eventarc_stub.h" +#include "google/cloud/eventarc/v1/eventarc.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace eventarc_v1_internal { @@ -1011,3 +1014,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace eventarc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/eventarc/v1/internal/eventarc_stub.h b/google/cloud/eventarc/v1/internal/eventarc_stub.h index e1749f688a997..554cdfdfa8d1c 100644 --- a/google/cloud/eventarc/v1/internal/eventarc_stub.h +++ b/google/cloud/eventarc/v1/internal/eventarc_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_V1_INTERNAL_EVENTARC_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_V1_INTERNAL_EVENTARC_STUB_H +#include "google/cloud/eventarc/v1/eventarc.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace eventarc_v1_internal { @@ -821,4 +824,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_V1_INTERNAL_EVENTARC_STUB_H diff --git a/google/cloud/eventarc/v1/internal/eventarc_stub_factory.cc b/google/cloud/eventarc/v1/internal/eventarc_stub_factory.cc index 65a39d991e077..83e2534b91b93 100644 --- a/google/cloud/eventarc/v1/internal/eventarc_stub_factory.cc +++ b/google/cloud/eventarc/v1/internal/eventarc_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/eventarc/v1/eventarc.proto #include "google/cloud/eventarc/v1/internal/eventarc_stub_factory.h" +#include "google/cloud/eventarc/v1/eventarc.grpc.pb.h" #include "google/cloud/eventarc/v1/internal/eventarc_auth_decorator.h" #include "google/cloud/eventarc/v1/internal/eventarc_logging_decorator.h" #include "google/cloud/eventarc/v1/internal/eventarc_metadata_decorator.h" #include "google/cloud/eventarc/v1/internal/eventarc_stub.h" #include "google/cloud/eventarc/v1/internal/eventarc_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace eventarc_v1_internal { @@ -76,3 +79,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace eventarc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/eventarc/v1/internal/eventarc_stub_factory.h b/google/cloud/eventarc/v1/internal/eventarc_stub_factory.h index 4cbc6b0c33d58..00063b13c8ff1 100644 --- a/google/cloud/eventarc/v1/internal/eventarc_stub_factory.h +++ b/google/cloud/eventarc/v1/internal/eventarc_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace eventarc_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_V1_INTERNAL_EVENTARC_STUB_FACTORY_H diff --git a/google/cloud/eventarc/v1/internal/eventarc_tracing_connection.cc b/google/cloud/eventarc/v1/internal/eventarc_tracing_connection.cc index 3f6d30d082780..7c3e157bb3de5 100644 --- a/google/cloud/eventarc/v1/internal/eventarc_tracing_connection.cc +++ b/google/cloud/eventarc/v1/internal/eventarc_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace eventarc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - EventarcTracingConnection::EventarcTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -897,15 +895,11 @@ Status EventarcTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeEventarcTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/eventarc/v1/internal/eventarc_tracing_connection.h b/google/cloud/eventarc/v1/internal/eventarc_tracing_connection.h index 64fffcb127045..22776eb2b7b05 100644 --- a/google/cloud/eventarc/v1/internal/eventarc_tracing_connection.h +++ b/google/cloud/eventarc/v1/internal/eventarc_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace eventarc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class EventarcTracingConnection : public eventarc_v1::EventarcConnection { public: ~EventarcTracingConnection() override = default; @@ -390,8 +388,6 @@ class EventarcTracingConnection : public eventarc_v1::EventarcConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/eventarc/v1/internal/eventarc_tracing_stub.cc b/google/cloud/eventarc/v1/internal/eventarc_tracing_stub.cc index 59628619797f5..833eef69c97fa 100644 --- a/google/cloud/eventarc/v1/internal/eventarc_tracing_stub.cc +++ b/google/cloud/eventarc/v1/internal/eventarc_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace eventarc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - EventarcTracingStub::EventarcTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -918,18 +919,14 @@ future EventarcTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeEventarcTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace eventarc_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/eventarc/v1/internal/eventarc_tracing_stub.h b/google/cloud/eventarc/v1/internal/eventarc_tracing_stub.h index 17a97fa70d08b..6e0e932dff0f0 100644 --- a/google/cloud/eventarc/v1/internal/eventarc_tracing_stub.h +++ b/google/cloud/eventarc/v1/internal/eventarc_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace eventarc_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class EventarcTracingStub : public EventarcStub { public: ~EventarcTracingStub() override = default; @@ -426,8 +427,6 @@ class EventarcTracingStub : public EventarcStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -442,4 +441,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_EVENTARC_V1_INTERNAL_EVENTARC_TRACING_STUB_H diff --git a/google/cloud/filestore/BUILD.bazel b/google/cloud/filestore/BUILD.bazel index d90f41dfd7641..e40b464141386 100644 --- a/google/cloud/filestore/BUILD.bazel +++ b/google/cloud/filestore/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/filestore/v1:filestore_cc_grpc", + "@googleapis//google/cloud/filestore/v1:filestore_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/filestore/CMakeLists.txt b/google/cloud/filestore/CMakeLists.txt index 57cc0ea26d1ef..de307654a145c 100644 --- a/google/cloud/filestore/CMakeLists.txt +++ b/google/cloud/filestore/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(filestore "Cloud Filestore API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(filestore_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/filestore/cloud_filestore_manager_client.h b/google/cloud/filestore/cloud_filestore_manager_client.h deleted file mode 100644 index 9ea078b9d49fa..0000000000000 --- a/google/cloud/filestore/cloud_filestore_manager_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FILESTORE_CLOUD_FILESTORE_MANAGER_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FILESTORE_CLOUD_FILESTORE_MANAGER_CLIENT_H - -#include "google/cloud/filestore/cloud_filestore_manager_connection.h" -#include "google/cloud/filestore/v1/cloud_filestore_manager_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in filestore_v1 instead of the aliases defined in -/// this namespace. -namespace filestore { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use filestore_v1::CloudFilestoreManagerClient directly. -using ::google::cloud::filestore_v1::CloudFilestoreManagerClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace filestore -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FILESTORE_CLOUD_FILESTORE_MANAGER_CLIENT_H diff --git a/google/cloud/filestore/cloud_filestore_manager_connection.h b/google/cloud/filestore/cloud_filestore_manager_connection.h deleted file mode 100644 index 12109e51a218f..0000000000000 --- a/google/cloud/filestore/cloud_filestore_manager_connection.h +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FILESTORE_CLOUD_FILESTORE_MANAGER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FILESTORE_CLOUD_FILESTORE_MANAGER_CONNECTION_H - -#include "google/cloud/filestore/cloud_filestore_manager_connection_idempotency_policy.h" -#include "google/cloud/filestore/v1/cloud_filestore_manager_connection.h" - -namespace google { -namespace cloud { -namespace filestore { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use filestore_v1::MakeCloudFilestoreManagerConnection directly. -using ::google::cloud::filestore_v1::MakeCloudFilestoreManagerConnection; - -/// @deprecated Use filestore_v1::CloudFilestoreManagerConnection directly. -using ::google::cloud::filestore_v1::CloudFilestoreManagerConnection; - -/// @deprecated Use -/// filestore_v1::CloudFilestoreManagerLimitedErrorCountRetryPolicy directly. -using ::google::cloud::filestore_v1:: - CloudFilestoreManagerLimitedErrorCountRetryPolicy; - -/// @deprecated Use filestore_v1::CloudFilestoreManagerLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::filestore_v1:: - CloudFilestoreManagerLimitedTimeRetryPolicy; - -/// @deprecated Use filestore_v1::CloudFilestoreManagerRetryPolicy directly. -using ::google::cloud::filestore_v1::CloudFilestoreManagerRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace filestore -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FILESTORE_CLOUD_FILESTORE_MANAGER_CONNECTION_H diff --git a/google/cloud/filestore/cloud_filestore_manager_connection_idempotency_policy.h b/google/cloud/filestore/cloud_filestore_manager_connection_idempotency_policy.h deleted file mode 100644 index 4049f83b6dd94..0000000000000 --- a/google/cloud/filestore/cloud_filestore_manager_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FILESTORE_CLOUD_FILESTORE_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FILESTORE_CLOUD_FILESTORE_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/filestore/v1/cloud_filestore_manager_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace filestore { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// filestore_v1::MakeDefaultCloudFilestoreManagerConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::filestore_v1:: - MakeDefaultCloudFilestoreManagerConnectionIdempotencyPolicy; - -/// @deprecated Use -/// filestore_v1::CloudFilestoreManagerConnectionIdempotencyPolicy directly. -using ::google::cloud::filestore_v1:: - CloudFilestoreManagerConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace filestore -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FILESTORE_CLOUD_FILESTORE_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/filestore/cloud_filestore_manager_options.h b/google/cloud/filestore/cloud_filestore_manager_options.h deleted file mode 100644 index f3be83d935c33..0000000000000 --- a/google/cloud/filestore/cloud_filestore_manager_options.h +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FILESTORE_CLOUD_FILESTORE_MANAGER_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FILESTORE_CLOUD_FILESTORE_MANAGER_OPTIONS_H - -#include "google/cloud/filestore/cloud_filestore_manager_connection.h" -#include "google/cloud/filestore/cloud_filestore_manager_connection_idempotency_policy.h" -#include "google/cloud/filestore/v1/cloud_filestore_manager_options.h" - -namespace google { -namespace cloud { -namespace filestore { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use filestore_v1::CloudFilestoreManagerPollingPolicyOption -/// directly. -using ::google::cloud::filestore_v1::CloudFilestoreManagerPollingPolicyOption; - -/// @deprecated Use filestore_v1::CloudFilestoreManagerBackoffPolicyOption -/// directly. -using ::google::cloud::filestore_v1::CloudFilestoreManagerBackoffPolicyOption; - -/// @deprecated Use -/// filestore_v1::CloudFilestoreManagerConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::filestore_v1:: - CloudFilestoreManagerConnectionIdempotencyPolicyOption; - -/// @deprecated Use filestore_v1::CloudFilestoreManagerPolicyOptionList -/// directly. -using ::google::cloud::filestore_v1::CloudFilestoreManagerPolicyOptionList; - -/// @deprecated Use filestore_v1::CloudFilestoreManagerRetryPolicyOption -/// directly. -using ::google::cloud::filestore_v1::CloudFilestoreManagerRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace filestore -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FILESTORE_CLOUD_FILESTORE_MANAGER_OPTIONS_H diff --git a/google/cloud/filestore/mocks/mock_cloud_filestore_manager_connection.h b/google/cloud/filestore/mocks/mock_cloud_filestore_manager_connection.h deleted file mode 100644 index 1b6660805a7d8..0000000000000 --- a/google/cloud/filestore/mocks/mock_cloud_filestore_manager_connection.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/filestore/v1/cloud_filestore_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FILESTORE_MOCKS_MOCK_CLOUD_FILESTORE_MANAGER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FILESTORE_MOCKS_MOCK_CLOUD_FILESTORE_MANAGER_CONNECTION_H - -#include "google/cloud/filestore/cloud_filestore_manager_connection.h" -#include "google/cloud/filestore/v1/mocks/mock_cloud_filestore_manager_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in filestore_v1_mocks instead of the aliases -/// defined in this namespace. -namespace filestore_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use filestore_v1_mocks::MockCloudFilestoreManagerConnection -/// directly. -using ::google::cloud::filestore_v1_mocks::MockCloudFilestoreManagerConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace filestore_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FILESTORE_MOCKS_MOCK_CLOUD_FILESTORE_MANAGER_CONNECTION_H diff --git a/google/cloud/filestore/quickstart/.bazelrc b/google/cloud/filestore/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/filestore/quickstart/.bazelrc +++ b/google/cloud/filestore/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/filestore/quickstart/CMakeLists.txt b/google/cloud/filestore/quickstart/CMakeLists.txt index d32f3dcbef89d..730f7fc3c781d 100644 --- a/google/cloud/filestore/quickstart/CMakeLists.txt +++ b/google/cloud/filestore/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Filestore API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-filestore-quickstart CXX) find_package(google_cloud_cpp_filestore REQUIRED) diff --git a/google/cloud/filestore/v1/cloud_filestore_manager_client.h b/google/cloud/filestore/v1/cloud_filestore_manager_client.h index b04f15a7d5a22..c21a9053e7e2c 100644 --- a/google/cloud/filestore/v1/cloud_filestore_manager_client.h +++ b/google/cloud/filestore/v1/cloud_filestore_manager_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/filestore/v1/cloud_filestore_manager_connection.h b/google/cloud/filestore/v1/cloud_filestore_manager_connection.h index 3c5b5228abfd5..b4bd8c9e66460 100644 --- a/google/cloud/filestore/v1/cloud_filestore_manager_connection.h +++ b/google/cloud/filestore/v1/cloud_filestore_manager_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FILESTORE_V1_CLOUD_FILESTORE_MANAGER_CONNECTION_H #include "google/cloud/filestore/v1/cloud_filestore_manager_connection_idempotency_policy.h" +#include "google/cloud/filestore/v1/cloud_filestore_service.pb.h" #include "google/cloud/filestore/v1/internal/cloud_filestore_manager_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/filestore/v1/cloud_filestore_manager_connection_idempotency_policy.h b/google/cloud/filestore/v1/cloud_filestore_manager_connection_idempotency_policy.h index e7fef04ec55ca..7f6bec8b7df55 100644 --- a/google/cloud/filestore/v1/cloud_filestore_manager_connection_idempotency_policy.h +++ b/google/cloud/filestore/v1/cloud_filestore_manager_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FILESTORE_V1_CLOUD_FILESTORE_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FILESTORE_V1_CLOUD_FILESTORE_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/filestore/v1/cloud_filestore_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/filestore/v1/internal/cloud_filestore_manager_auth_decorator.cc b/google/cloud/filestore/v1/internal/cloud_filestore_manager_auth_decorator.cc index b26f6682fe086..3392ec4a39335 100644 --- a/google/cloud/filestore/v1/internal/cloud_filestore_manager_auth_decorator.cc +++ b/google/cloud/filestore/v1/internal/cloud_filestore_manager_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/filestore/v1/cloud_filestore_service.proto #include "google/cloud/filestore/v1/internal/cloud_filestore_manager_auth_decorator.h" -#include +#include "google/cloud/filestore/v1/cloud_filestore_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace filestore_v1_internal { @@ -525,3 +528,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace filestore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/filestore/v1/internal/cloud_filestore_manager_auth_decorator.h b/google/cloud/filestore/v1/internal/cloud_filestore_manager_auth_decorator.h index 58e5fc25a1ada..d077b107c3126 100644 --- a/google/cloud/filestore/v1/internal/cloud_filestore_manager_auth_decorator.h +++ b/google/cloud/filestore/v1/internal/cloud_filestore_manager_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/filestore/v1/internal/cloud_filestore_manager_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace filestore_v1_internal { @@ -255,4 +258,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FILESTORE_V1_INTERNAL_CLOUD_FILESTORE_MANAGER_AUTH_DECORATOR_H diff --git a/google/cloud/filestore/v1/internal/cloud_filestore_manager_connection_impl.h b/google/cloud/filestore/v1/internal/cloud_filestore_manager_connection_impl.h index d266b169bf9f8..0ded94a964573 100644 --- a/google/cloud/filestore/v1/internal/cloud_filestore_manager_connection_impl.h +++ b/google/cloud/filestore/v1/internal/cloud_filestore_manager_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/filestore/v1/internal/cloud_filestore_manager_logging_decorator.cc b/google/cloud/filestore/v1/internal/cloud_filestore_manager_logging_decorator.cc index a2811504a8f20..fdb5337c58ca8 100644 --- a/google/cloud/filestore/v1/internal/cloud_filestore_manager_logging_decorator.cc +++ b/google/cloud/filestore/v1/internal/cloud_filestore_manager_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/filestore/v1/cloud_filestore_service.proto #include "google/cloud/filestore/v1/internal/cloud_filestore_manager_logging_decorator.h" +#include "google/cloud/filestore/v1/cloud_filestore_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace filestore_v1_internal { @@ -596,3 +599,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace filestore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/filestore/v1/internal/cloud_filestore_manager_logging_decorator.h b/google/cloud/filestore/v1/internal/cloud_filestore_manager_logging_decorator.h index 011d3001fa3fe..478ab0ffa0d0d 100644 --- a/google/cloud/filestore/v1/internal/cloud_filestore_manager_logging_decorator.h +++ b/google/cloud/filestore/v1/internal/cloud_filestore_manager_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/filestore/v1/internal/cloud_filestore_manager_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace filestore_v1_internal { @@ -255,4 +258,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FILESTORE_V1_INTERNAL_CLOUD_FILESTORE_MANAGER_LOGGING_DECORATOR_H diff --git a/google/cloud/filestore/v1/internal/cloud_filestore_manager_metadata_decorator.cc b/google/cloud/filestore/v1/internal/cloud_filestore_manager_metadata_decorator.cc index 64b3ed52f76a2..a49cefb8b8de8 100644 --- a/google/cloud/filestore/v1/internal/cloud_filestore_manager_metadata_decorator.cc +++ b/google/cloud/filestore/v1/internal/cloud_filestore_manager_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/filestore/v1/cloud_filestore_service.proto #include "google/cloud/filestore/v1/internal/cloud_filestore_manager_metadata_decorator.h" +#include "google/cloud/filestore/v1/cloud_filestore_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace filestore_v1_internal { @@ -448,3 +452,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace filestore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/filestore/v1/internal/cloud_filestore_manager_metadata_decorator.h b/google/cloud/filestore/v1/internal/cloud_filestore_manager_metadata_decorator.h index fbae8b82ac89c..1ca9abaf2a6fd 100644 --- a/google/cloud/filestore/v1/internal/cloud_filestore_manager_metadata_decorator.h +++ b/google/cloud/filestore/v1/internal/cloud_filestore_manager_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/filestore/v1/internal/cloud_filestore_manager_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace filestore_v1_internal { @@ -261,4 +264,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FILESTORE_V1_INTERNAL_CLOUD_FILESTORE_MANAGER_METADATA_DECORATOR_H diff --git a/google/cloud/filestore/v1/internal/cloud_filestore_manager_option_defaults.cc b/google/cloud/filestore/v1/internal/cloud_filestore_manager_option_defaults.cc index a3e34227b40f9..5372e2af8fe85 100644 --- a/google/cloud/filestore/v1/internal/cloud_filestore_manager_option_defaults.cc +++ b/google/cloud/filestore/v1/internal/cloud_filestore_manager_option_defaults.cc @@ -42,7 +42,7 @@ Options CloudFilestoreManagerDefaultOptions(Options options) { if (!options.has()) { options.set( filestore_v1::CloudFilestoreManagerLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/filestore/v1/internal/cloud_filestore_manager_stub.cc b/google/cloud/filestore/v1/internal/cloud_filestore_manager_stub.cc index 3fe80ad5e9b3d..b58b50ad306d1 100644 --- a/google/cloud/filestore/v1/internal/cloud_filestore_manager_stub.cc +++ b/google/cloud/filestore/v1/internal/cloud_filestore_manager_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/filestore/v1/cloud_filestore_service.proto #include "google/cloud/filestore/v1/internal/cloud_filestore_manager_stub.h" +#include "google/cloud/filestore/v1/cloud_filestore_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace filestore_v1_internal { @@ -577,3 +580,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace filestore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/filestore/v1/internal/cloud_filestore_manager_stub.h b/google/cloud/filestore/v1/internal/cloud_filestore_manager_stub.h index 506032533d3b8..57bcd22711a25 100644 --- a/google/cloud/filestore/v1/internal/cloud_filestore_manager_stub.h +++ b/google/cloud/filestore/v1/internal/cloud_filestore_manager_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FILESTORE_V1_INTERNAL_CLOUD_FILESTORE_MANAGER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FILESTORE_V1_INTERNAL_CLOUD_FILESTORE_MANAGER_STUB_H +#include "google/cloud/filestore/v1/cloud_filestore_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace filestore_v1_internal { @@ -459,4 +462,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FILESTORE_V1_INTERNAL_CLOUD_FILESTORE_MANAGER_STUB_H diff --git a/google/cloud/filestore/v1/internal/cloud_filestore_manager_stub_factory.cc b/google/cloud/filestore/v1/internal/cloud_filestore_manager_stub_factory.cc index aa34d6f270200..78d14de1b3536 100644 --- a/google/cloud/filestore/v1/internal/cloud_filestore_manager_stub_factory.cc +++ b/google/cloud/filestore/v1/internal/cloud_filestore_manager_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/filestore/v1/cloud_filestore_service.proto #include "google/cloud/filestore/v1/internal/cloud_filestore_manager_stub_factory.h" +#include "google/cloud/filestore/v1/cloud_filestore_service.grpc.pb.h" #include "google/cloud/filestore/v1/internal/cloud_filestore_manager_auth_decorator.h" #include "google/cloud/filestore/v1/internal/cloud_filestore_manager_logging_decorator.h" #include "google/cloud/filestore/v1/internal/cloud_filestore_manager_metadata_decorator.h" #include "google/cloud/filestore/v1/internal/cloud_filestore_manager_stub.h" #include "google/cloud/filestore/v1/internal/cloud_filestore_manager_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace filestore_v1_internal { @@ -76,3 +79,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace filestore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/filestore/v1/internal/cloud_filestore_manager_stub_factory.h b/google/cloud/filestore/v1/internal/cloud_filestore_manager_stub_factory.h index ed60e085d0114..8a3bce2539c4f 100644 --- a/google/cloud/filestore/v1/internal/cloud_filestore_manager_stub_factory.h +++ b/google/cloud/filestore/v1/internal/cloud_filestore_manager_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace filestore_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FILESTORE_V1_INTERNAL_CLOUD_FILESTORE_MANAGER_STUB_FACTORY_H diff --git a/google/cloud/filestore/v1/internal/cloud_filestore_manager_tracing_connection.cc b/google/cloud/filestore/v1/internal/cloud_filestore_manager_tracing_connection.cc index 7bfe7fbaa1083..d67b09651f8e1 100644 --- a/google/cloud/filestore/v1/internal/cloud_filestore_manager_tracing_connection.cc +++ b/google/cloud/filestore/v1/internal/cloud_filestore_manager_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace filestore_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudFilestoreManagerTracingConnection::CloudFilestoreManagerTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -494,17 +492,13 @@ Status CloudFilestoreManagerTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCloudFilestoreManagerTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/filestore/v1/internal/cloud_filestore_manager_tracing_connection.h b/google/cloud/filestore/v1/internal/cloud_filestore_manager_tracing_connection.h index 263132117c35d..e22a0b5a311f7 100644 --- a/google/cloud/filestore/v1/internal/cloud_filestore_manager_tracing_connection.h +++ b/google/cloud/filestore/v1/internal/cloud_filestore_manager_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace filestore_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudFilestoreManagerTracingConnection : public filestore_v1::CloudFilestoreManagerConnection { public: @@ -224,8 +222,6 @@ class CloudFilestoreManagerTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/filestore/v1/internal/cloud_filestore_manager_tracing_stub.cc b/google/cloud/filestore/v1/internal/cloud_filestore_manager_tracing_stub.cc index da7c583aca451..e389f6723b22e 100644 --- a/google/cloud/filestore/v1/internal/cloud_filestore_manager_tracing_stub.cc +++ b/google/cloud/filestore/v1/internal/cloud_filestore_manager_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace filestore_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudFilestoreManagerTracingStub::CloudFilestoreManagerTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -523,18 +524,14 @@ future CloudFilestoreManagerTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCloudFilestoreManagerTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace filestore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/filestore/v1/internal/cloud_filestore_manager_tracing_stub.h b/google/cloud/filestore/v1/internal/cloud_filestore_manager_tracing_stub.h index dbecfe6c64135..88f41fa2248cc 100644 --- a/google/cloud/filestore/v1/internal/cloud_filestore_manager_tracing_stub.h +++ b/google/cloud/filestore/v1/internal/cloud_filestore_manager_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace filestore_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudFilestoreManagerTracingStub : public CloudFilestoreManagerStub { public: ~CloudFilestoreManagerTracingStub() override = default; @@ -251,8 +252,6 @@ class CloudFilestoreManagerTracingStub : public CloudFilestoreManagerStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -267,4 +266,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FILESTORE_V1_INTERNAL_CLOUD_FILESTORE_MANAGER_TRACING_STUB_H diff --git a/google/cloud/financialservices/BUILD.bazel b/google/cloud/financialservices/BUILD.bazel index 48abe87cc2b9e..b3923fbc2ec5f 100644 --- a/google/cloud/financialservices/BUILD.bazel +++ b/google/cloud/financialservices/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/financialservices/v1:financialservices_cc_grpc", + "@googleapis//google/cloud/financialservices/v1:financialservices_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/financialservices/quickstart/CMakeLists.txt b/google/cloud/financialservices/quickstart/CMakeLists.txt index 496cd651e6717..dfd042956daf0 100644 --- a/google/cloud/financialservices/quickstart/CMakeLists.txt +++ b/google/cloud/financialservices/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Financial Services API C++ client library from # a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-financialservices-quickstart CXX) find_package(google_cloud_cpp_financialservices REQUIRED) diff --git a/google/cloud/financialservices/v1/aml_client.h b/google/cloud/financialservices/v1/aml_client.h index f5f75eafb5cb5..c0f1dcbe8f893 100644 --- a/google/cloud/financialservices/v1/aml_client.h +++ b/google/cloud/financialservices/v1/aml_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/financialservices/v1/aml_connection.h b/google/cloud/financialservices/v1/aml_connection.h index 80f2d830419f6..8ceb19974231b 100644 --- a/google/cloud/financialservices/v1/aml_connection.h +++ b/google/cloud/financialservices/v1/aml_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/financialservices/v1/aml_connection_idempotency_policy.h" #include "google/cloud/financialservices/v1/internal/aml_retry_traits.h" +#include "google/cloud/financialservices/v1/service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/financialservices/v1/aml_connection_idempotency_policy.h b/google/cloud/financialservices/v1/aml_connection_idempotency_policy.h index 3eea78edc8fcf..df420eb654d4e 100644 --- a/google/cloud/financialservices/v1/aml_connection_idempotency_policy.h +++ b/google/cloud/financialservices/v1/aml_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FINANCIALSERVICES_V1_AML_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FINANCIALSERVICES_V1_AML_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/financialservices/v1/service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/financialservices/v1/internal/aml_auth_decorator.cc b/google/cloud/financialservices/v1/internal/aml_auth_decorator.cc index 384ac2c136f35..4fc0f8830fecc 100644 --- a/google/cloud/financialservices/v1/internal/aml_auth_decorator.cc +++ b/google/cloud/financialservices/v1/internal/aml_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/financialservices/v1/service.proto #include "google/cloud/financialservices/v1/internal/aml_auth_decorator.h" -#include +#include "google/cloud/financialservices/v1/service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace financialservices_v1_internal { @@ -949,3 +952,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace financialservices_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/financialservices/v1/internal/aml_auth_decorator.h b/google/cloud/financialservices/v1/internal/aml_auth_decorator.h index 24309fc6a0bd9..274861d3ed804 100644 --- a/google/cloud/financialservices/v1/internal/aml_auth_decorator.h +++ b/google/cloud/financialservices/v1/internal/aml_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/financialservices/v1/internal/aml_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace financialservices_v1_internal { @@ -454,4 +457,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FINANCIALSERVICES_V1_INTERNAL_AML_AUTH_DECORATOR_H diff --git a/google/cloud/financialservices/v1/internal/aml_connection_impl.h b/google/cloud/financialservices/v1/internal/aml_connection_impl.h index 287594ed47c77..2b0fd0a6e88a6 100644 --- a/google/cloud/financialservices/v1/internal/aml_connection_impl.h +++ b/google/cloud/financialservices/v1/internal/aml_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/financialservices/v1/internal/aml_logging_decorator.cc b/google/cloud/financialservices/v1/internal/aml_logging_decorator.cc index 3e82b5bf591cf..2f6f2fbf24265 100644 --- a/google/cloud/financialservices/v1/internal/aml_logging_decorator.cc +++ b/google/cloud/financialservices/v1/internal/aml_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/financialservices/v1/service.proto #include "google/cloud/financialservices/v1/internal/aml_logging_decorator.h" +#include "google/cloud/financialservices/v1/service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace financialservices_v1_internal { @@ -1116,3 +1119,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace financialservices_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/financialservices/v1/internal/aml_logging_decorator.h b/google/cloud/financialservices/v1/internal/aml_logging_decorator.h index c9fe5e3ac72a1..ce904e02a3d1d 100644 --- a/google/cloud/financialservices/v1/internal/aml_logging_decorator.h +++ b/google/cloud/financialservices/v1/internal/aml_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/financialservices/v1/internal/aml_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace financialservices_v1_internal { @@ -453,4 +456,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FINANCIALSERVICES_V1_INTERNAL_AML_LOGGING_DECORATOR_H diff --git a/google/cloud/financialservices/v1/internal/aml_metadata_decorator.cc b/google/cloud/financialservices/v1/internal/aml_metadata_decorator.cc index 8fe9c2a109d5d..7a4309bbfb6f7 100644 --- a/google/cloud/financialservices/v1/internal/aml_metadata_decorator.cc +++ b/google/cloud/financialservices/v1/internal/aml_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/financialservices/v1/service.proto #include "google/cloud/financialservices/v1/internal/aml_metadata_decorator.h" +#include "google/cloud/financialservices/v1/service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace financialservices_v1_internal { @@ -804,3 +808,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace financialservices_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/financialservices/v1/internal/aml_metadata_decorator.h b/google/cloud/financialservices/v1/internal/aml_metadata_decorator.h index 55f09f85019ff..291daf6efe8e5 100644 --- a/google/cloud/financialservices/v1/internal/aml_metadata_decorator.h +++ b/google/cloud/financialservices/v1/internal/aml_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/financialservices/v1/internal/aml_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace financialservices_v1_internal { @@ -459,4 +462,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FINANCIALSERVICES_V1_INTERNAL_AML_METADATA_DECORATOR_H diff --git a/google/cloud/financialservices/v1/internal/aml_option_defaults.cc b/google/cloud/financialservices/v1/internal/aml_option_defaults.cc index 26f205cf64dc2..249a5a490d07a 100644 --- a/google/cloud/financialservices/v1/internal/aml_option_defaults.cc +++ b/google/cloud/financialservices/v1/internal/aml_option_defaults.cc @@ -41,7 +41,7 @@ Options AMLDefaultOptions(Options options) { if (!options.has()) { options.set( financialservices_v1::AMLLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/financialservices/v1/internal/aml_stub.cc b/google/cloud/financialservices/v1/internal/aml_stub.cc index 6e1cfed90b4e0..8a11a67f08218 100644 --- a/google/cloud/financialservices/v1/internal/aml_stub.cc +++ b/google/cloud/financialservices/v1/internal/aml_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/financialservices/v1/service.proto #include "google/cloud/financialservices/v1/internal/aml_stub.h" +#include "google/cloud/financialservices/v1/service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace financialservices_v1_internal { @@ -1092,3 +1095,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace financialservices_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/financialservices/v1/internal/aml_stub.h b/google/cloud/financialservices/v1/internal/aml_stub.h index 5af27c9421f2c..50fdd18681c99 100644 --- a/google/cloud/financialservices/v1/internal/aml_stub.h +++ b/google/cloud/financialservices/v1/internal/aml_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FINANCIALSERVICES_V1_INTERNAL_AML_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FINANCIALSERVICES_V1_INTERNAL_AML_STUB_H +#include "google/cloud/financialservices/v1/service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace financialservices_v1_internal { @@ -895,4 +898,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FINANCIALSERVICES_V1_INTERNAL_AML_STUB_H diff --git a/google/cloud/financialservices/v1/internal/aml_stub_factory.cc b/google/cloud/financialservices/v1/internal/aml_stub_factory.cc index 961859ed78580..860a362f01cd3 100644 --- a/google/cloud/financialservices/v1/internal/aml_stub_factory.cc +++ b/google/cloud/financialservices/v1/internal/aml_stub_factory.cc @@ -22,18 +22,21 @@ #include "google/cloud/financialservices/v1/internal/aml_metadata_decorator.h" #include "google/cloud/financialservices/v1/internal/aml_stub.h" #include "google/cloud/financialservices/v1/internal/aml_tracing_stub.h" +#include "google/cloud/financialservices/v1/service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace financialservices_v1_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace financialservices_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/financialservices/v1/internal/aml_stub_factory.h b/google/cloud/financialservices/v1/internal/aml_stub_factory.h index 7113c032050f7..0c23d3b75cc31 100644 --- a/google/cloud/financialservices/v1/internal/aml_stub_factory.h +++ b/google/cloud/financialservices/v1/internal/aml_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace financialservices_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FINANCIALSERVICES_V1_INTERNAL_AML_STUB_FACTORY_H diff --git a/google/cloud/financialservices/v1/internal/aml_tracing_connection.cc b/google/cloud/financialservices/v1/internal/aml_tracing_connection.cc index 572faf72bce34..3888ef9edcc61 100644 --- a/google/cloud/financialservices/v1/internal/aml_tracing_connection.cc +++ b/google/cloud/financialservices/v1/internal/aml_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace financialservices_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AMLTracingConnection::AMLTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -995,15 +993,11 @@ Status AMLTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAMLTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/financialservices/v1/internal/aml_tracing_connection.h b/google/cloud/financialservices/v1/internal/aml_tracing_connection.h index a9c678ff98acb..9d3fa9ae9c402 100644 --- a/google/cloud/financialservices/v1/internal/aml_tracing_connection.h +++ b/google/cloud/financialservices/v1/internal/aml_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace financialservices_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AMLTracingConnection : public financialservices_v1::AMLConnection { public: ~AMLTracingConnection() override = default; @@ -451,8 +449,6 @@ class AMLTracingConnection : public financialservices_v1::AMLConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/financialservices/v1/internal/aml_tracing_stub.cc b/google/cloud/financialservices/v1/internal/aml_tracing_stub.cc index a26d273f122fe..3aed59c4db67d 100644 --- a/google/cloud/financialservices/v1/internal/aml_tracing_stub.cc +++ b/google/cloud/financialservices/v1/internal/aml_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace financialservices_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AMLTracingStub::AMLTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -969,17 +970,13 @@ future AMLTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAMLTracingStub(std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace financialservices_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/financialservices/v1/internal/aml_tracing_stub.h b/google/cloud/financialservices/v1/internal/aml_tracing_stub.h index b50169d3069b1..ceda5a89e5964 100644 --- a/google/cloud/financialservices/v1/internal/aml_tracing_stub.h +++ b/google/cloud/financialservices/v1/internal/aml_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace financialservices_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AMLTracingStub : public AMLStub { public: ~AMLTracingStub() override = default; @@ -449,8 +450,6 @@ class AMLTracingStub : public AMLStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -464,4 +463,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FINANCIALSERVICES_V1_INTERNAL_AML_TRACING_STUB_H diff --git a/google/cloud/functions/BUILD.bazel b/google/cloud/functions/BUILD.bazel index 6cc8a2816c353..d2b20a38463b4 100644 --- a/google/cloud/functions/BUILD.bazel +++ b/google/cloud/functions/BUILD.bazel @@ -19,14 +19,13 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", "v2/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/functions/v1:functions_cc_grpc", - "@com_google_googleapis//google/cloud/functions/v2:functions_cc_grpc", + "@googleapis//google/cloud/functions/v1:functions_cc_grpc", + "@googleapis//google/cloud/functions/v2:functions_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/functions/CMakeLists.txt b/google/cloud/functions/CMakeLists.txt index 8833af98be455..79478486547bf 100644 --- a/google/cloud/functions/CMakeLists.txt +++ b/google/cloud/functions/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(functions "Cloud Functions API" - SERVICE_DIRS "__EMPTY__" "v1/" "v2/") + SERVICE_DIRS "v1/" "v2/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(functions_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/functions/cloud_functions_client.h b/google/cloud/functions/cloud_functions_client.h deleted file mode 100644 index 4eba2dbee7ebc..0000000000000 --- a/google/cloud/functions/cloud_functions_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/functions/v1/functions.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_CLOUD_FUNCTIONS_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_CLOUD_FUNCTIONS_CLIENT_H - -#include "google/cloud/functions/cloud_functions_connection.h" -#include "google/cloud/functions/v1/cloud_functions_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in functions_v1 instead of the aliases defined in -/// this namespace. -namespace functions { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use functions_v1::CloudFunctionsServiceClient directly. -using ::google::cloud::functions_v1::CloudFunctionsServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace functions -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_CLOUD_FUNCTIONS_CLIENT_H diff --git a/google/cloud/functions/cloud_functions_connection.h b/google/cloud/functions/cloud_functions_connection.h deleted file mode 100644 index 5e81aca5245a0..0000000000000 --- a/google/cloud/functions/cloud_functions_connection.h +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/functions/v1/functions.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_CLOUD_FUNCTIONS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_CLOUD_FUNCTIONS_CONNECTION_H - -#include "google/cloud/functions/cloud_functions_connection_idempotency_policy.h" -#include "google/cloud/functions/v1/cloud_functions_connection.h" - -namespace google { -namespace cloud { -namespace functions { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use functions_v1::MakeCloudFunctionsServiceConnection directly. -using ::google::cloud::functions_v1::MakeCloudFunctionsServiceConnection; - -/// @deprecated Use functions_v1::CloudFunctionsServiceConnection directly. -using ::google::cloud::functions_v1::CloudFunctionsServiceConnection; - -/// @deprecated Use -/// functions_v1::CloudFunctionsServiceLimitedErrorCountRetryPolicy directly. -using ::google::cloud::functions_v1:: - CloudFunctionsServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use functions_v1::CloudFunctionsServiceLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::functions_v1:: - CloudFunctionsServiceLimitedTimeRetryPolicy; - -/// @deprecated Use functions_v1::CloudFunctionsServiceRetryPolicy directly. -using ::google::cloud::functions_v1::CloudFunctionsServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace functions -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_CLOUD_FUNCTIONS_CONNECTION_H diff --git a/google/cloud/functions/cloud_functions_connection_idempotency_policy.h b/google/cloud/functions/cloud_functions_connection_idempotency_policy.h deleted file mode 100644 index bc16bcc0a9e66..0000000000000 --- a/google/cloud/functions/cloud_functions_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/functions/v1/functions.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_CLOUD_FUNCTIONS_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_CLOUD_FUNCTIONS_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/functions/v1/cloud_functions_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace functions { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// functions_v1::MakeDefaultCloudFunctionsServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::functions_v1:: - MakeDefaultCloudFunctionsServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// functions_v1::CloudFunctionsServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::functions_v1:: - CloudFunctionsServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace functions -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_CLOUD_FUNCTIONS_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/functions/cloud_functions_options.h b/google/cloud/functions/cloud_functions_options.h deleted file mode 100644 index 72c4b4d5c279d..0000000000000 --- a/google/cloud/functions/cloud_functions_options.h +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/functions/v1/functions.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_CLOUD_FUNCTIONS_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_CLOUD_FUNCTIONS_OPTIONS_H - -#include "google/cloud/functions/cloud_functions_connection.h" -#include "google/cloud/functions/cloud_functions_connection_idempotency_policy.h" -#include "google/cloud/functions/v1/cloud_functions_options.h" - -namespace google { -namespace cloud { -namespace functions { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use functions_v1::CloudFunctionsServicePollingPolicyOption -/// directly. -using ::google::cloud::functions_v1::CloudFunctionsServicePollingPolicyOption; - -/// @deprecated Use functions_v1::CloudFunctionsServiceBackoffPolicyOption -/// directly. -using ::google::cloud::functions_v1::CloudFunctionsServiceBackoffPolicyOption; - -/// @deprecated Use -/// functions_v1::CloudFunctionsServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::functions_v1:: - CloudFunctionsServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use functions_v1::CloudFunctionsServicePolicyOptionList -/// directly. -using ::google::cloud::functions_v1::CloudFunctionsServicePolicyOptionList; - -/// @deprecated Use functions_v1::CloudFunctionsServiceRetryPolicyOption -/// directly. -using ::google::cloud::functions_v1::CloudFunctionsServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace functions -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_CLOUD_FUNCTIONS_OPTIONS_H diff --git a/google/cloud/functions/mocks/mock_cloud_functions_connection.h b/google/cloud/functions/mocks/mock_cloud_functions_connection.h deleted file mode 100644 index 99ba612380279..0000000000000 --- a/google/cloud/functions/mocks/mock_cloud_functions_connection.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/functions/v1/functions.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_MOCKS_MOCK_CLOUD_FUNCTIONS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_MOCKS_MOCK_CLOUD_FUNCTIONS_CONNECTION_H - -#include "google/cloud/functions/cloud_functions_connection.h" -#include "google/cloud/functions/v1/mocks/mock_cloud_functions_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in functions_v1_mocks instead of the aliases -/// defined in this namespace. -namespace functions_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use functions_v1_mocks::MockCloudFunctionsServiceConnection -/// directly. -using ::google::cloud::functions_v1_mocks::MockCloudFunctionsServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace functions_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_MOCKS_MOCK_CLOUD_FUNCTIONS_CONNECTION_H diff --git a/google/cloud/functions/quickstart/.bazelrc b/google/cloud/functions/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/functions/quickstart/.bazelrc +++ b/google/cloud/functions/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/functions/quickstart/CMakeLists.txt b/google/cloud/functions/quickstart/CMakeLists.txt index 1d88e9a85143f..45226baf2c057 100644 --- a/google/cloud/functions/quickstart/CMakeLists.txt +++ b/google/cloud/functions/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Functions API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-functions-quickstart CXX) find_package(google_cloud_cpp_functions REQUIRED) diff --git a/google/cloud/functions/v1/cloud_functions_client.h b/google/cloud/functions/v1/cloud_functions_client.h index e116b3013d810..9df9587855a81 100644 --- a/google/cloud/functions/v1/cloud_functions_client.h +++ b/google/cloud/functions/v1/cloud_functions_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/functions/v1/cloud_functions_connection.h b/google/cloud/functions/v1/cloud_functions_connection.h index 5148126e8e3c7..e137fef704cef 100644 --- a/google/cloud/functions/v1/cloud_functions_connection.h +++ b/google/cloud/functions/v1/cloud_functions_connection.h @@ -20,7 +20,9 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_V1_CLOUD_FUNCTIONS_CONNECTION_H #include "google/cloud/functions/v1/cloud_functions_connection_idempotency_policy.h" +#include "google/cloud/functions/v1/functions.pb.h" #include "google/cloud/functions/v1/internal/cloud_functions_retry_traits.h" +#include "google/cloud/functions/v1/operations.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,9 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/functions/v1/cloud_functions_connection_idempotency_policy.h b/google/cloud/functions/v1/cloud_functions_connection_idempotency_policy.h index dbf704d99ea47..d009d41cff41b 100644 --- a/google/cloud/functions/v1/cloud_functions_connection_idempotency_policy.h +++ b/google/cloud/functions/v1/cloud_functions_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_V1_CLOUD_FUNCTIONS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_V1_CLOUD_FUNCTIONS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/functions/v1/functions.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/functions/v1/internal/cloud_functions_auth_decorator.cc b/google/cloud/functions/v1/internal/cloud_functions_auth_decorator.cc index 8f9395bc74818..ef91b90872bef 100644 --- a/google/cloud/functions/v1/internal/cloud_functions_auth_decorator.cc +++ b/google/cloud/functions/v1/internal/cloud_functions_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/functions/v1/functions.proto #include "google/cloud/functions/v1/internal/cloud_functions_auth_decorator.h" -#include +#include "google/cloud/functions/v1/functions.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace functions_v1_internal { @@ -255,3 +258,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace functions_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/functions/v1/internal/cloud_functions_auth_decorator.h b/google/cloud/functions/v1/internal/cloud_functions_auth_decorator.h index 46314a2382d5c..52ee4d2fe69fe 100644 --- a/google/cloud/functions/v1/internal/cloud_functions_auth_decorator.h +++ b/google/cloud/functions/v1/internal/cloud_functions_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/functions/v1/internal/cloud_functions_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace functions_v1_internal { @@ -147,4 +150,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_V1_INTERNAL_CLOUD_FUNCTIONS_AUTH_DECORATOR_H diff --git a/google/cloud/functions/v1/internal/cloud_functions_connection_impl.h b/google/cloud/functions/v1/internal/cloud_functions_connection_impl.h index 92772b028fd0b..253cae4fe10d7 100644 --- a/google/cloud/functions/v1/internal/cloud_functions_connection_impl.h +++ b/google/cloud/functions/v1/internal/cloud_functions_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/functions/v1/internal/cloud_functions_logging_decorator.cc b/google/cloud/functions/v1/internal/cloud_functions_logging_decorator.cc index de8615cf4ff1d..a5b63b9519b29 100644 --- a/google/cloud/functions/v1/internal/cloud_functions_logging_decorator.cc +++ b/google/cloud/functions/v1/internal/cloud_functions_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/functions/v1/functions.proto #include "google/cloud/functions/v1/internal/cloud_functions_logging_decorator.h" +#include "google/cloud/functions/v1/functions.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace functions_v1_internal { @@ -303,3 +306,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace functions_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/functions/v1/internal/cloud_functions_logging_decorator.h b/google/cloud/functions/v1/internal/cloud_functions_logging_decorator.h index aecc062de652d..b2b7461b7b2fe 100644 --- a/google/cloud/functions/v1/internal/cloud_functions_logging_decorator.h +++ b/google/cloud/functions/v1/internal/cloud_functions_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/functions/v1/internal/cloud_functions_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace functions_v1_internal { @@ -147,4 +150,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_V1_INTERNAL_CLOUD_FUNCTIONS_LOGGING_DECORATOR_H diff --git a/google/cloud/functions/v1/internal/cloud_functions_metadata_decorator.cc b/google/cloud/functions/v1/internal/cloud_functions_metadata_decorator.cc index 7d817465da42d..d35e65b587a20 100644 --- a/google/cloud/functions/v1/internal/cloud_functions_metadata_decorator.cc +++ b/google/cloud/functions/v1/internal/cloud_functions_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/functions/v1/functions.proto #include "google/cloud/functions/v1/internal/cloud_functions_metadata_decorator.h" +#include "google/cloud/functions/v1/functions.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace functions_v1_internal { @@ -250,3 +254,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace functions_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/functions/v1/internal/cloud_functions_metadata_decorator.h b/google/cloud/functions/v1/internal/cloud_functions_metadata_decorator.h index 57b57419a0eeb..398fc95415a59 100644 --- a/google/cloud/functions/v1/internal/cloud_functions_metadata_decorator.h +++ b/google/cloud/functions/v1/internal/cloud_functions_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/functions/v1/internal/cloud_functions_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace functions_v1_internal { @@ -153,4 +156,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_V1_INTERNAL_CLOUD_FUNCTIONS_METADATA_DECORATOR_H diff --git a/google/cloud/functions/v1/internal/cloud_functions_option_defaults.cc b/google/cloud/functions/v1/internal/cloud_functions_option_defaults.cc index 2947a05131879..719f33c62cbac 100644 --- a/google/cloud/functions/v1/internal/cloud_functions_option_defaults.cc +++ b/google/cloud/functions/v1/internal/cloud_functions_option_defaults.cc @@ -42,7 +42,7 @@ Options CloudFunctionsServiceDefaultOptions(Options options) { if (!options.has()) { options.set( functions_v1::CloudFunctionsServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/functions/v1/internal/cloud_functions_stub.cc b/google/cloud/functions/v1/internal/cloud_functions_stub.cc index 7651b9abc0cfa..daa299a8baa93 100644 --- a/google/cloud/functions/v1/internal/cloud_functions_stub.cc +++ b/google/cloud/functions/v1/internal/cloud_functions_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/functions/v1/functions.proto #include "google/cloud/functions/v1/internal/cloud_functions_stub.h" +#include "google/cloud/functions/v1/functions.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace functions_v1_internal { @@ -296,3 +299,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace functions_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/functions/v1/internal/cloud_functions_stub.h b/google/cloud/functions/v1/internal/cloud_functions_stub.h index 76f6e3c0917cb..1900f68351172 100644 --- a/google/cloud/functions/v1/internal/cloud_functions_stub.h +++ b/google/cloud/functions/v1/internal/cloud_functions_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_V1_INTERNAL_CLOUD_FUNCTIONS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_V1_INTERNAL_CLOUD_FUNCTIONS_STUB_H +#include "google/cloud/functions/v1/functions.grpc.pb.h" +#include "google/cloud/functions/v1/operations.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace functions_v1_internal { @@ -262,4 +265,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_V1_INTERNAL_CLOUD_FUNCTIONS_STUB_H diff --git a/google/cloud/functions/v1/internal/cloud_functions_stub_factory.cc b/google/cloud/functions/v1/internal/cloud_functions_stub_factory.cc index 325ff130ddb14..98e33ba5a61c8 100644 --- a/google/cloud/functions/v1/internal/cloud_functions_stub_factory.cc +++ b/google/cloud/functions/v1/internal/cloud_functions_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/functions/v1/functions.proto #include "google/cloud/functions/v1/internal/cloud_functions_stub_factory.h" +#include "google/cloud/functions/v1/functions.grpc.pb.h" #include "google/cloud/functions/v1/internal/cloud_functions_auth_decorator.h" #include "google/cloud/functions/v1/internal/cloud_functions_logging_decorator.h" #include "google/cloud/functions/v1/internal/cloud_functions_metadata_decorator.h" #include "google/cloud/functions/v1/internal/cloud_functions_stub.h" #include "google/cloud/functions/v1/internal/cloud_functions_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace functions_v1_internal { @@ -76,3 +79,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace functions_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/functions/v1/internal/cloud_functions_stub_factory.h b/google/cloud/functions/v1/internal/cloud_functions_stub_factory.h index 5ba08508b8e60..49992c1333c6d 100644 --- a/google/cloud/functions/v1/internal/cloud_functions_stub_factory.h +++ b/google/cloud/functions/v1/internal/cloud_functions_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace functions_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_V1_INTERNAL_CLOUD_FUNCTIONS_STUB_FACTORY_H diff --git a/google/cloud/functions/v1/internal/cloud_functions_tracing_connection.cc b/google/cloud/functions/v1/internal/cloud_functions_tracing_connection.cc index 89898fae8b7c1..912466a80482c 100644 --- a/google/cloud/functions/v1/internal/cloud_functions_tracing_connection.cc +++ b/google/cloud/functions/v1/internal/cloud_functions_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace functions_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudFunctionsServiceTracingConnection::CloudFunctionsServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -226,17 +224,13 @@ CloudFunctionsServiceTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCloudFunctionsServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/functions/v1/internal/cloud_functions_tracing_connection.h b/google/cloud/functions/v1/internal/cloud_functions_tracing_connection.h index 800874f7b74d1..aaa7ab4e437af 100644 --- a/google/cloud/functions/v1/internal/cloud_functions_tracing_connection.h +++ b/google/cloud/functions/v1/internal/cloud_functions_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace functions_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudFunctionsServiceTracingConnection : public functions_v1::CloudFunctionsServiceConnection { public: @@ -118,8 +116,6 @@ class CloudFunctionsServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/functions/v1/internal/cloud_functions_tracing_stub.cc b/google/cloud/functions/v1/internal/cloud_functions_tracing_stub.cc index ab6dd00a64f65..393e58de066ce 100644 --- a/google/cloud/functions/v1/internal/cloud_functions_tracing_stub.cc +++ b/google/cloud/functions/v1/internal/cloud_functions_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace functions_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudFunctionsServiceTracingStub::CloudFunctionsServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -273,18 +274,14 @@ future CloudFunctionsServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCloudFunctionsServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace functions_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/functions/v1/internal/cloud_functions_tracing_stub.h b/google/cloud/functions/v1/internal/cloud_functions_tracing_stub.h index 561bc57abe08a..8da56c63aa4d8 100644 --- a/google/cloud/functions/v1/internal/cloud_functions_tracing_stub.h +++ b/google/cloud/functions/v1/internal/cloud_functions_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace functions_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudFunctionsServiceTracingStub : public CloudFunctionsServiceStub { public: ~CloudFunctionsServiceTracingStub() override = default; @@ -143,8 +144,6 @@ class CloudFunctionsServiceTracingStub : public CloudFunctionsServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -159,4 +158,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_V1_INTERNAL_CLOUD_FUNCTIONS_TRACING_STUB_H diff --git a/google/cloud/functions/v2/function_client.h b/google/cloud/functions/v2/function_client.h index fac880133abfe..dc37c21ad77a9 100644 --- a/google/cloud/functions/v2/function_client.h +++ b/google/cloud/functions/v2/function_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/functions/v2/function_connection.h b/google/cloud/functions/v2/function_connection.h index 659f016d80800..c0bef604e9e50 100644 --- a/google/cloud/functions/v2/function_connection.h +++ b/google/cloud/functions/v2/function_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_V2_FUNCTION_CONNECTION_H #include "google/cloud/functions/v2/function_connection_idempotency_policy.h" +#include "google/cloud/functions/v2/functions.pb.h" #include "google/cloud/functions/v2/internal/function_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/functions/v2/function_connection_idempotency_policy.h b/google/cloud/functions/v2/function_connection_idempotency_policy.h index c4de7695a2295..dcec773ffb722 100644 --- a/google/cloud/functions/v2/function_connection_idempotency_policy.h +++ b/google/cloud/functions/v2/function_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_V2_FUNCTION_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_V2_FUNCTION_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/functions/v2/functions.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/functions/v2/internal/function_auth_decorator.cc b/google/cloud/functions/v2/internal/function_auth_decorator.cc index 24a6647e9085e..7e2d5fc839831 100644 --- a/google/cloud/functions/v2/internal/function_auth_decorator.cc +++ b/google/cloud/functions/v2/internal/function_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/functions/v2/functions.proto #include "google/cloud/functions/v2/internal/function_auth_decorator.h" -#include +#include "google/cloud/functions/v2/functions.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace functions_v2_internal { @@ -251,3 +254,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace functions_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/functions/v2/internal/function_auth_decorator.h b/google/cloud/functions/v2/internal/function_auth_decorator.h index 618439e61377e..a725cce75a89f 100644 --- a/google/cloud/functions/v2/internal/function_auth_decorator.h +++ b/google/cloud/functions/v2/internal/function_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/functions/v2/internal/function_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace functions_v2_internal { @@ -147,4 +150,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_V2_INTERNAL_FUNCTION_AUTH_DECORATOR_H diff --git a/google/cloud/functions/v2/internal/function_connection_impl.h b/google/cloud/functions/v2/internal/function_connection_impl.h index 8cac7d09ef637..e577e4e73e350 100644 --- a/google/cloud/functions/v2/internal/function_connection_impl.h +++ b/google/cloud/functions/v2/internal/function_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/functions/v2/internal/function_logging_decorator.cc b/google/cloud/functions/v2/internal/function_logging_decorator.cc index 0cb12ff8e9a3b..6867828d7a9c9 100644 --- a/google/cloud/functions/v2/internal/function_logging_decorator.cc +++ b/google/cloud/functions/v2/internal/function_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/functions/v2/functions.proto #include "google/cloud/functions/v2/internal/function_logging_decorator.h" +#include "google/cloud/functions/v2/functions.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace functions_v2_internal { @@ -299,3 +302,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace functions_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/functions/v2/internal/function_logging_decorator.h b/google/cloud/functions/v2/internal/function_logging_decorator.h index 47ab7ad1eb567..ace90b8570980 100644 --- a/google/cloud/functions/v2/internal/function_logging_decorator.h +++ b/google/cloud/functions/v2/internal/function_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/functions/v2/internal/function_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace functions_v2_internal { @@ -147,4 +150,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_V2_INTERNAL_FUNCTION_LOGGING_DECORATOR_H diff --git a/google/cloud/functions/v2/internal/function_metadata_decorator.cc b/google/cloud/functions/v2/internal/function_metadata_decorator.cc index 9caa21fe31ef9..588013bf757fb 100644 --- a/google/cloud/functions/v2/internal/function_metadata_decorator.cc +++ b/google/cloud/functions/v2/internal/function_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/functions/v2/functions.proto #include "google/cloud/functions/v2/internal/function_metadata_decorator.h" +#include "google/cloud/functions/v2/functions.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace functions_v2_internal { @@ -248,3 +252,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace functions_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/functions/v2/internal/function_metadata_decorator.h b/google/cloud/functions/v2/internal/function_metadata_decorator.h index fa804a69afc4e..207aa97909a8c 100644 --- a/google/cloud/functions/v2/internal/function_metadata_decorator.h +++ b/google/cloud/functions/v2/internal/function_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/functions/v2/internal/function_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace functions_v2_internal { @@ -153,4 +156,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_V2_INTERNAL_FUNCTION_METADATA_DECORATOR_H diff --git a/google/cloud/functions/v2/internal/function_option_defaults.cc b/google/cloud/functions/v2/internal/function_option_defaults.cc index 3d75131e4794f..e449e70d6afa8 100644 --- a/google/cloud/functions/v2/internal/function_option_defaults.cc +++ b/google/cloud/functions/v2/internal/function_option_defaults.cc @@ -42,7 +42,7 @@ Options FunctionServiceDefaultOptions(Options options) { if (!options.has()) { options.set( functions_v2::FunctionServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/functions/v2/internal/function_stub.cc b/google/cloud/functions/v2/internal/function_stub.cc index c8f6e47f536ec..3c86eb1d443ac 100644 --- a/google/cloud/functions/v2/internal/function_stub.cc +++ b/google/cloud/functions/v2/internal/function_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/functions/v2/functions.proto #include "google/cloud/functions/v2/internal/function_stub.h" +#include "google/cloud/functions/v2/functions.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace functions_v2_internal { @@ -295,3 +298,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace functions_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/functions/v2/internal/function_stub.h b/google/cloud/functions/v2/internal/function_stub.h index ec66b556d7fb2..90f5f7b358eb7 100644 --- a/google/cloud/functions/v2/internal/function_stub.h +++ b/google/cloud/functions/v2/internal/function_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_V2_INTERNAL_FUNCTION_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_V2_INTERNAL_FUNCTION_STUB_H +#include "google/cloud/functions/v2/functions.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace functions_v2_internal { @@ -264,4 +267,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_V2_INTERNAL_FUNCTION_STUB_H diff --git a/google/cloud/functions/v2/internal/function_stub_factory.cc b/google/cloud/functions/v2/internal/function_stub_factory.cc index 46308b77b82ae..a57b32786e851 100644 --- a/google/cloud/functions/v2/internal/function_stub_factory.cc +++ b/google/cloud/functions/v2/internal/function_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/functions/v2/functions.proto #include "google/cloud/functions/v2/internal/function_stub_factory.h" +#include "google/cloud/functions/v2/functions.grpc.pb.h" #include "google/cloud/functions/v2/internal/function_auth_decorator.h" #include "google/cloud/functions/v2/internal/function_logging_decorator.h" #include "google/cloud/functions/v2/internal/function_metadata_decorator.h" #include "google/cloud/functions/v2/internal/function_stub.h" #include "google/cloud/functions/v2/internal/function_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace functions_v2_internal { @@ -78,3 +81,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace functions_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/functions/v2/internal/function_stub_factory.h b/google/cloud/functions/v2/internal/function_stub_factory.h index 8961315db2b2e..3bad2288ed444 100644 --- a/google/cloud/functions/v2/internal/function_stub_factory.h +++ b/google/cloud/functions/v2/internal/function_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace functions_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_V2_INTERNAL_FUNCTION_STUB_FACTORY_H diff --git a/google/cloud/functions/v2/internal/function_tracing_connection.cc b/google/cloud/functions/v2/internal/function_tracing_connection.cc index 903893bf801d8..364270b72b18c 100644 --- a/google/cloud/functions/v2/internal/function_tracing_connection.cc +++ b/google/cloud/functions/v2/internal/function_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace functions_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - FunctionServiceTracingConnection::FunctionServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -225,16 +223,12 @@ FunctionServiceTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeFunctionServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/functions/v2/internal/function_tracing_connection.h b/google/cloud/functions/v2/internal/function_tracing_connection.h index eff24648fa6cd..f9d8295ef2c01 100644 --- a/google/cloud/functions/v2/internal/function_tracing_connection.h +++ b/google/cloud/functions/v2/internal/function_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace functions_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class FunctionServiceTracingConnection : public functions_v2::FunctionServiceConnection { public: @@ -118,8 +116,6 @@ class FunctionServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/functions/v2/internal/function_tracing_stub.cc b/google/cloud/functions/v2/internal/function_tracing_stub.cc index 549b3e3113481..8b4107f11e12a 100644 --- a/google/cloud/functions/v2/internal/function_tracing_stub.cc +++ b/google/cloud/functions/v2/internal/function_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace functions_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - FunctionServiceTracingStub::FunctionServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -271,18 +272,14 @@ future FunctionServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeFunctionServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace functions_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/functions/v2/internal/function_tracing_stub.h b/google/cloud/functions/v2/internal/function_tracing_stub.h index aec1e7f0f8ed2..ab72a2e7fcebb 100644 --- a/google/cloud/functions/v2/internal/function_tracing_stub.h +++ b/google/cloud/functions/v2/internal/function_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace functions_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class FunctionServiceTracingStub : public FunctionServiceStub { public: ~FunctionServiceTracingStub() override = default; @@ -143,8 +144,6 @@ class FunctionServiceTracingStub : public FunctionServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -159,4 +158,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_FUNCTIONS_V2_INTERNAL_FUNCTION_TRACING_STUB_H diff --git a/google/cloud/gkebackup/BUILD.bazel b/google/cloud/gkebackup/BUILD.bazel index 8a288759bd8e3..b8f01aa36d207 100644 --- a/google/cloud/gkebackup/BUILD.bazel +++ b/google/cloud/gkebackup/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/gkebackup/v1:gkebackup_cc_grpc", + "@googleapis//google/cloud/gkebackup/v1:gkebackup_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/gkebackup/quickstart/.bazelrc b/google/cloud/gkebackup/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/gkebackup/quickstart/.bazelrc +++ b/google/cloud/gkebackup/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/gkebackup/quickstart/CMakeLists.txt b/google/cloud/gkebackup/quickstart/CMakeLists.txt index a9917b497ec6b..4ed167d062731 100644 --- a/google/cloud/gkebackup/quickstart/CMakeLists.txt +++ b/google/cloud/gkebackup/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Backup for GKE API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-gkebackup-quickstart CXX) find_package(google_cloud_cpp_gkebackup REQUIRED) diff --git a/google/cloud/gkebackup/v1/backup_for_gke_client.h b/google/cloud/gkebackup/v1/backup_for_gke_client.h index 4d1d11dece224..0111576cc8442 100644 --- a/google/cloud/gkebackup/v1/backup_for_gke_client.h +++ b/google/cloud/gkebackup/v1/backup_for_gke_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/gkebackup/v1/backup_for_gke_connection.h b/google/cloud/gkebackup/v1/backup_for_gke_connection.h index 9468b0a0370e4..fbf18ca108fe3 100644 --- a/google/cloud/gkebackup/v1/backup_for_gke_connection.h +++ b/google/cloud/gkebackup/v1/backup_for_gke_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEBACKUP_V1_BACKUP_FOR_GKE_CONNECTION_H #include "google/cloud/gkebackup/v1/backup_for_gke_connection_idempotency_policy.h" +#include "google/cloud/gkebackup/v1/gkebackup.pb.h" #include "google/cloud/gkebackup/v1/internal/backup_for_gke_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/gkebackup/v1/backup_for_gke_connection_idempotency_policy.h b/google/cloud/gkebackup/v1/backup_for_gke_connection_idempotency_policy.h index 2533656d8c920..c9daaba1393c9 100644 --- a/google/cloud/gkebackup/v1/backup_for_gke_connection_idempotency_policy.h +++ b/google/cloud/gkebackup/v1/backup_for_gke_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEBACKUP_V1_BACKUP_FOR_GKE_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEBACKUP_V1_BACKUP_FOR_GKE_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/gkebackup/v1/gkebackup.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/gkebackup/v1/internal/backup_for_gke_auth_decorator.cc b/google/cloud/gkebackup/v1/internal/backup_for_gke_auth_decorator.cc index 946f09430517d..a1c18a44760e7 100644 --- a/google/cloud/gkebackup/v1/internal/backup_for_gke_auth_decorator.cc +++ b/google/cloud/gkebackup/v1/internal/backup_for_gke_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/gkebackup/v1/gkebackup.proto #include "google/cloud/gkebackup/v1/internal/backup_for_gke_auth_decorator.h" -#include +#include "google/cloud/gkebackup/v1/gkebackup.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkebackup_v1_internal { @@ -840,3 +843,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkebackup_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkebackup/v1/internal/backup_for_gke_auth_decorator.h b/google/cloud/gkebackup/v1/internal/backup_for_gke_auth_decorator.h index 699de79cef6ea..f125d6c7c708a 100644 --- a/google/cloud/gkebackup/v1/internal/backup_for_gke_auth_decorator.h +++ b/google/cloud/gkebackup/v1/internal/backup_for_gke_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/gkebackup/v1/internal/backup_for_gke_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkebackup_v1_internal { @@ -424,4 +427,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEBACKUP_V1_INTERNAL_BACKUP_FOR_GKE_AUTH_DECORATOR_H diff --git a/google/cloud/gkebackup/v1/internal/backup_for_gke_connection_impl.h b/google/cloud/gkebackup/v1/internal/backup_for_gke_connection_impl.h index eedc5b4518933..b43f6c805c33c 100644 --- a/google/cloud/gkebackup/v1/internal/backup_for_gke_connection_impl.h +++ b/google/cloud/gkebackup/v1/internal/backup_for_gke_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/gkebackup/v1/internal/backup_for_gke_logging_decorator.cc b/google/cloud/gkebackup/v1/internal/backup_for_gke_logging_decorator.cc index 4209c8643539a..e857589765364 100644 --- a/google/cloud/gkebackup/v1/internal/backup_for_gke_logging_decorator.cc +++ b/google/cloud/gkebackup/v1/internal/backup_for_gke_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/gkebackup/v1/gkebackup.proto #include "google/cloud/gkebackup/v1/internal/backup_for_gke_logging_decorator.h" +#include "google/cloud/gkebackup/v1/gkebackup.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkebackup_v1_internal { @@ -1005,3 +1008,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkebackup_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkebackup/v1/internal/backup_for_gke_logging_decorator.h b/google/cloud/gkebackup/v1/internal/backup_for_gke_logging_decorator.h index 9f13314f97a7a..abb03bfb94804 100644 --- a/google/cloud/gkebackup/v1/internal/backup_for_gke_logging_decorator.h +++ b/google/cloud/gkebackup/v1/internal/backup_for_gke_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/gkebackup/v1/internal/backup_for_gke_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkebackup_v1_internal { @@ -424,4 +427,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEBACKUP_V1_INTERNAL_BACKUP_FOR_GKE_LOGGING_DECORATOR_H diff --git a/google/cloud/gkebackup/v1/internal/backup_for_gke_metadata_decorator.cc b/google/cloud/gkebackup/v1/internal/backup_for_gke_metadata_decorator.cc index 0442a0953e3a2..08068583c5a4f 100644 --- a/google/cloud/gkebackup/v1/internal/backup_for_gke_metadata_decorator.cc +++ b/google/cloud/gkebackup/v1/internal/backup_for_gke_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/gkebackup/v1/gkebackup.proto #include "google/cloud/gkebackup/v1/internal/backup_for_gke_metadata_decorator.h" +#include "google/cloud/gkebackup/v1/gkebackup.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkebackup_v1_internal { @@ -738,3 +742,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkebackup_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkebackup/v1/internal/backup_for_gke_metadata_decorator.h b/google/cloud/gkebackup/v1/internal/backup_for_gke_metadata_decorator.h index 3141a0834afec..11b0a452044dc 100644 --- a/google/cloud/gkebackup/v1/internal/backup_for_gke_metadata_decorator.h +++ b/google/cloud/gkebackup/v1/internal/backup_for_gke_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/gkebackup/v1/internal/backup_for_gke_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkebackup_v1_internal { @@ -429,4 +432,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEBACKUP_V1_INTERNAL_BACKUP_FOR_GKE_METADATA_DECORATOR_H diff --git a/google/cloud/gkebackup/v1/internal/backup_for_gke_option_defaults.cc b/google/cloud/gkebackup/v1/internal/backup_for_gke_option_defaults.cc index b853d3424527e..f22c5cdcfcbaf 100644 --- a/google/cloud/gkebackup/v1/internal/backup_for_gke_option_defaults.cc +++ b/google/cloud/gkebackup/v1/internal/backup_for_gke_option_defaults.cc @@ -41,7 +41,7 @@ Options BackupForGKEDefaultOptions(Options options) { if (!options.has()) { options.set( gkebackup_v1::BackupForGKELimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/gkebackup/v1/internal/backup_for_gke_stub.cc b/google/cloud/gkebackup/v1/internal/backup_for_gke_stub.cc index 7ba2224adc835..5b8f8816675ec 100644 --- a/google/cloud/gkebackup/v1/internal/backup_for_gke_stub.cc +++ b/google/cloud/gkebackup/v1/internal/backup_for_gke_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/gkebackup/v1/gkebackup.proto #include "google/cloud/gkebackup/v1/internal/backup_for_gke_stub.h" +#include "google/cloud/gkebackup/v1/gkebackup.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkebackup_v1_internal { @@ -982,3 +985,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkebackup_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkebackup/v1/internal/backup_for_gke_stub.h b/google/cloud/gkebackup/v1/internal/backup_for_gke_stub.h index 84c5aec8daa1e..44c72598b1ed6 100644 --- a/google/cloud/gkebackup/v1/internal/backup_for_gke_stub.h +++ b/google/cloud/gkebackup/v1/internal/backup_for_gke_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEBACKUP_V1_INTERNAL_BACKUP_FOR_GKE_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEBACKUP_V1_INTERNAL_BACKUP_FOR_GKE_STUB_H +#include "google/cloud/gkebackup/v1/gkebackup.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkebackup_v1_internal { @@ -818,4 +821,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEBACKUP_V1_INTERNAL_BACKUP_FOR_GKE_STUB_H diff --git a/google/cloud/gkebackup/v1/internal/backup_for_gke_stub_factory.cc b/google/cloud/gkebackup/v1/internal/backup_for_gke_stub_factory.cc index 8301ee879d929..4cbde66ac4837 100644 --- a/google/cloud/gkebackup/v1/internal/backup_for_gke_stub_factory.cc +++ b/google/cloud/gkebackup/v1/internal/backup_for_gke_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/gkebackup/v1/gkebackup.proto #include "google/cloud/gkebackup/v1/internal/backup_for_gke_stub_factory.h" +#include "google/cloud/gkebackup/v1/gkebackup.grpc.pb.h" #include "google/cloud/gkebackup/v1/internal/backup_for_gke_auth_decorator.h" #include "google/cloud/gkebackup/v1/internal/backup_for_gke_logging_decorator.h" #include "google/cloud/gkebackup/v1/internal/backup_for_gke_metadata_decorator.h" #include "google/cloud/gkebackup/v1/internal/backup_for_gke_stub.h" #include "google/cloud/gkebackup/v1/internal/backup_for_gke_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkebackup_v1_internal { @@ -77,3 +80,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkebackup_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkebackup/v1/internal/backup_for_gke_stub_factory.h b/google/cloud/gkebackup/v1/internal/backup_for_gke_stub_factory.h index f0df7d998ef70..eeda1fc859020 100644 --- a/google/cloud/gkebackup/v1/internal/backup_for_gke_stub_factory.h +++ b/google/cloud/gkebackup/v1/internal/backup_for_gke_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkebackup_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEBACKUP_V1_INTERNAL_BACKUP_FOR_GKE_STUB_FACTORY_H diff --git a/google/cloud/gkebackup/v1/internal/backup_for_gke_tracing_connection.cc b/google/cloud/gkebackup/v1/internal/backup_for_gke_tracing_connection.cc index 5eb1a272a1e37..d39bf76bf57f2 100644 --- a/google/cloud/gkebackup/v1/internal/backup_for_gke_tracing_connection.cc +++ b/google/cloud/gkebackup/v1/internal/backup_for_gke_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace gkebackup_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - BackupForGKETracingConnection::BackupForGKETracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -865,16 +863,12 @@ Status BackupForGKETracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeBackupForGKETracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/gkebackup/v1/internal/backup_for_gke_tracing_connection.h b/google/cloud/gkebackup/v1/internal/backup_for_gke_tracing_connection.h index dd7ac1ab4bb0e..ff51dc211ac2b 100644 --- a/google/cloud/gkebackup/v1/internal/backup_for_gke_tracing_connection.h +++ b/google/cloud/gkebackup/v1/internal/backup_for_gke_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace gkebackup_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class BackupForGKETracingConnection : public gkebackup_v1::BackupForGKEConnection { public: @@ -377,8 +375,6 @@ class BackupForGKETracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/gkebackup/v1/internal/backup_for_gke_tracing_stub.cc b/google/cloud/gkebackup/v1/internal/backup_for_gke_tracing_stub.cc index 68143e42fb58a..537138da14188 100644 --- a/google/cloud/gkebackup/v1/internal/backup_for_gke_tracing_stub.cc +++ b/google/cloud/gkebackup/v1/internal/backup_for_gke_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkebackup_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - BackupForGKETracingStub::BackupForGKETracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -895,18 +896,14 @@ future BackupForGKETracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeBackupForGKETracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkebackup_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkebackup/v1/internal/backup_for_gke_tracing_stub.h b/google/cloud/gkebackup/v1/internal/backup_for_gke_tracing_stub.h index c5d0a0ef2d631..eb4ad9980118a 100644 --- a/google/cloud/gkebackup/v1/internal/backup_for_gke_tracing_stub.h +++ b/google/cloud/gkebackup/v1/internal/backup_for_gke_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkebackup_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class BackupForGKETracingStub : public BackupForGKEStub { public: ~BackupForGKETracingStub() override = default; @@ -419,8 +420,6 @@ class BackupForGKETracingStub : public BackupForGKEStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -435,4 +434,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEBACKUP_V1_INTERNAL_BACKUP_FOR_GKE_TRACING_STUB_H diff --git a/google/cloud/gkeconnect/BUILD.bazel b/google/cloud/gkeconnect/BUILD.bazel index 261e6fe5d10db..f4b07554bd4a8 100644 --- a/google/cloud/gkeconnect/BUILD.bazel +++ b/google/cloud/gkeconnect/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["gateway/v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/gkeconnect/gateway/v1:gateway_cc_proto", + "@googleapis//google/cloud/gkeconnect/gateway/v1:gateway_cc_proto", ] cc_gapic_library( diff --git a/google/cloud/gkeconnect/gateway/v1/gateway_control_connection.h b/google/cloud/gkeconnect/gateway/v1/gateway_control_connection.h index 8a89cc3b1b49b..d89ea71250698 100644 --- a/google/cloud/gkeconnect/gateway/v1/gateway_control_connection.h +++ b/google/cloud/gkeconnect/gateway/v1/gateway_control_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKECONNECT_GATEWAY_V1_GATEWAY_CONTROL_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKECONNECT_GATEWAY_V1_GATEWAY_CONTROL_CONNECTION_H +#include "google/cloud/gkeconnect/gateway/v1/control.pb.h" #include "google/cloud/gkeconnect/gateway/v1/gateway_control_connection_idempotency_policy.h" #include "google/cloud/gkeconnect/gateway/v1/internal/gateway_control_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -26,7 +27,6 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/gkeconnect/gateway/v1/gateway_control_connection_idempotency_policy.h b/google/cloud/gkeconnect/gateway/v1/gateway_control_connection_idempotency_policy.h index cfb48ccdff9a6..9c4a9e0ece5bb 100644 --- a/google/cloud/gkeconnect/gateway/v1/gateway_control_connection_idempotency_policy.h +++ b/google/cloud/gkeconnect/gateway/v1/gateway_control_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKECONNECT_GATEWAY_V1_GATEWAY_CONTROL_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKECONNECT_GATEWAY_V1_GATEWAY_CONTROL_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/gkeconnect/gateway/v1/control.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/gkeconnect/gateway/v1/internal/gateway_control_option_defaults.cc b/google/cloud/gkeconnect/gateway/v1/internal/gateway_control_option_defaults.cc index 52e73baae3970..58400a7d83b19 100644 --- a/google/cloud/gkeconnect/gateway/v1/internal/gateway_control_option_defaults.cc +++ b/google/cloud/gkeconnect/gateway/v1/internal/gateway_control_option_defaults.cc @@ -42,7 +42,7 @@ Options GatewayControlDefaultOptions(Options options) { if (!options.has()) { options.set( gkeconnect_gateway_v1::GatewayControlLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/gkeconnect/gateway/v1/internal/gateway_control_rest_logging_decorator.h b/google/cloud/gkeconnect/gateway/v1/internal/gateway_control_rest_logging_decorator.h index ab0a20fa4a9ce..93efbb5bcdd2d 100644 --- a/google/cloud/gkeconnect/gateway/v1/internal/gateway_control_rest_logging_decorator.h +++ b/google/cloud/gkeconnect/gateway/v1/internal/gateway_control_rest_logging_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKECONNECT_GATEWAY_V1_INTERNAL_GATEWAY_CONTROL_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKECONNECT_GATEWAY_V1_INTERNAL_GATEWAY_CONTROL_REST_LOGGING_DECORATOR_H +#include "google/cloud/gkeconnect/gateway/v1/control.pb.h" #include "google/cloud/gkeconnect/gateway/v1/internal/gateway_control_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include #include #include #include diff --git a/google/cloud/gkeconnect/gateway/v1/internal/gateway_control_rest_metadata_decorator.cc b/google/cloud/gkeconnect/gateway/v1/internal/gateway_control_rest_metadata_decorator.cc index 59296349c9550..b82b214f95022 100644 --- a/google/cloud/gkeconnect/gateway/v1/internal/gateway_control_rest_metadata_decorator.cc +++ b/google/cloud/gkeconnect/gateway/v1/internal/gateway_control_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/gkeconnect/gateway/v1/control.proto #include "google/cloud/gkeconnect/gateway/v1/internal/gateway_control_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/gkeconnect/gateway/v1/internal/gateway_control_rest_metadata_decorator.h b/google/cloud/gkeconnect/gateway/v1/internal/gateway_control_rest_metadata_decorator.h index 8f329c6df9183..dc9a6afe1b536 100644 --- a/google/cloud/gkeconnect/gateway/v1/internal/gateway_control_rest_metadata_decorator.h +++ b/google/cloud/gkeconnect/gateway/v1/internal/gateway_control_rest_metadata_decorator.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKECONNECT_GATEWAY_V1_INTERNAL_GATEWAY_CONTROL_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKECONNECT_GATEWAY_V1_INTERNAL_GATEWAY_CONTROL_REST_METADATA_DECORATOR_H +#include "google/cloud/gkeconnect/gateway/v1/control.pb.h" #include "google/cloud/gkeconnect/gateway/v1/internal/gateway_control_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/gkeconnect/gateway/v1/internal/gateway_control_rest_stub.cc b/google/cloud/gkeconnect/gateway/v1/internal/gateway_control_rest_stub.cc index a1e2d2c97c7c2..b1193120b3b69 100644 --- a/google/cloud/gkeconnect/gateway/v1/internal/gateway_control_rest_stub.cc +++ b/google/cloud/gkeconnect/gateway/v1/internal/gateway_control_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/gkeconnect/gateway/v1/control.proto #include "google/cloud/gkeconnect/gateway/v1/internal/gateway_control_rest_stub.h" +#include "google/cloud/gkeconnect/gateway/v1/control.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/gkeconnect/gateway/v1/internal/gateway_control_rest_stub.h b/google/cloud/gkeconnect/gateway/v1/internal/gateway_control_rest_stub.h index 07ca3b054ae73..e21908d93893a 100644 --- a/google/cloud/gkeconnect/gateway/v1/internal/gateway_control_rest_stub.h +++ b/google/cloud/gkeconnect/gateway/v1/internal/gateway_control_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKECONNECT_GATEWAY_V1_INTERNAL_GATEWAY_CONTROL_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKECONNECT_GATEWAY_V1_INTERNAL_GATEWAY_CONTROL_REST_STUB_H +#include "google/cloud/gkeconnect/gateway/v1/control.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/gkeconnect/gateway/v1/internal/gateway_control_tracing_connection.cc b/google/cloud/gkeconnect/gateway/v1/internal/gateway_control_tracing_connection.cc index ff35f16b8fc39..5f2d0fc2e004b 100644 --- a/google/cloud/gkeconnect/gateway/v1/internal/gateway_control_tracing_connection.cc +++ b/google/cloud/gkeconnect/gateway/v1/internal/gateway_control_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace gkeconnect_gateway_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GatewayControlTracingConnection::GatewayControlTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -42,16 +40,12 @@ GatewayControlTracingConnection::GenerateCredentials( return internal::EndSpan(*span, child_->GenerateCredentials(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeGatewayControlTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/gkeconnect/gateway/v1/internal/gateway_control_tracing_connection.h b/google/cloud/gkeconnect/gateway/v1/internal/gateway_control_tracing_connection.h index 96a153f93c7ee..bebbca68cf8f7 100644 --- a/google/cloud/gkeconnect/gateway/v1/internal/gateway_control_tracing_connection.h +++ b/google/cloud/gkeconnect/gateway/v1/internal/gateway_control_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace gkeconnect_gateway_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class GatewayControlTracingConnection : public gkeconnect_gateway_v1::GatewayControlConnection { public: @@ -49,8 +47,6 @@ class GatewayControlTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/gkeconnect/quickstart/.bazelrc b/google/cloud/gkeconnect/quickstart/.bazelrc index e676fbffccb52..d313ebed860ce 100644 --- a/google/cloud/gkeconnect/quickstart/.bazelrc +++ b/google/cloud/gkeconnect/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds diff --git a/google/cloud/gkeconnect/quickstart/CMakeLists.txt b/google/cloud/gkeconnect/quickstart/CMakeLists.txt index b0ca518700bc1..103c5148a6345 100644 --- a/google/cloud/gkeconnect/quickstart/CMakeLists.txt +++ b/google/cloud/gkeconnect/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Connect Gateway API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-gkeconnect-quickstart CXX) find_package(google_cloud_cpp_gkeconnect REQUIRED) diff --git a/google/cloud/gkehub/BUILD.bazel b/google/cloud/gkehub/BUILD.bazel index 45d1e842363c2..3982f69a77512 100644 --- a/google/cloud/gkehub/BUILD.bazel +++ b/google/cloud/gkehub/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/gkehub/v1:gkehub_cc_grpc", + "@googleapis//google/cloud/gkehub/v1:gkehub_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/gkehub/CMakeLists.txt b/google/cloud/gkehub/CMakeLists.txt index 04cc750e9d5a3..88670cfbdf966 100644 --- a/google/cloud/gkehub/CMakeLists.txt +++ b/google/cloud/gkehub/CMakeLists.txt @@ -16,8 +16,7 @@ include(GoogleCloudCppLibrary) -google_cloud_cpp_add_gapic_library(gkehub "GKE Hub" SERVICE_DIRS "__EMPTY__" - "v1/") +google_cloud_cpp_add_gapic_library(gkehub "GKE Hub" SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(gkehub_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/gkehub/gke_hub_client.h b/google/cloud/gkehub/gke_hub_client.h deleted file mode 100644 index c938ec76d1e33..0000000000000 --- a/google/cloud/gkehub/gke_hub_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/gkehub/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEHUB_GKE_HUB_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEHUB_GKE_HUB_CLIENT_H - -#include "google/cloud/gkehub/gke_hub_connection.h" -#include "google/cloud/gkehub/v1/gke_hub_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in gkehub_v1 instead of the aliases defined in -/// this namespace. -namespace gkehub { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use gkehub_v1::GkeHubClient directly. -using ::google::cloud::gkehub_v1::GkeHubClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace gkehub -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEHUB_GKE_HUB_CLIENT_H diff --git a/google/cloud/gkehub/gke_hub_connection.h b/google/cloud/gkehub/gke_hub_connection.h deleted file mode 100644 index c0cc2a3065739..0000000000000 --- a/google/cloud/gkehub/gke_hub_connection.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/gkehub/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEHUB_GKE_HUB_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEHUB_GKE_HUB_CONNECTION_H - -#include "google/cloud/gkehub/gke_hub_connection_idempotency_policy.h" -#include "google/cloud/gkehub/v1/gke_hub_connection.h" - -namespace google { -namespace cloud { -namespace gkehub { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use gkehub_v1::MakeGkeHubConnection directly. -using ::google::cloud::gkehub_v1::MakeGkeHubConnection; - -/// @deprecated Use gkehub_v1::GkeHubConnection directly. -using ::google::cloud::gkehub_v1::GkeHubConnection; - -/// @deprecated Use gkehub_v1::GkeHubLimitedErrorCountRetryPolicy directly. -using ::google::cloud::gkehub_v1::GkeHubLimitedErrorCountRetryPolicy; - -/// @deprecated Use gkehub_v1::GkeHubLimitedTimeRetryPolicy directly. -using ::google::cloud::gkehub_v1::GkeHubLimitedTimeRetryPolicy; - -/// @deprecated Use gkehub_v1::GkeHubRetryPolicy directly. -using ::google::cloud::gkehub_v1::GkeHubRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace gkehub -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEHUB_GKE_HUB_CONNECTION_H diff --git a/google/cloud/gkehub/gke_hub_connection_idempotency_policy.h b/google/cloud/gkehub/gke_hub_connection_idempotency_policy.h deleted file mode 100644 index 6a8b93f300b6b..0000000000000 --- a/google/cloud/gkehub/gke_hub_connection_idempotency_policy.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/gkehub/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEHUB_GKE_HUB_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEHUB_GKE_HUB_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/gkehub/v1/gke_hub_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace gkehub { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use gkehub_v1::MakeDefaultGkeHubConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::gkehub_v1::MakeDefaultGkeHubConnectionIdempotencyPolicy; - -/// @deprecated Use gkehub_v1::GkeHubConnectionIdempotencyPolicy directly. -using ::google::cloud::gkehub_v1::GkeHubConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace gkehub -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEHUB_GKE_HUB_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/gkehub/gke_hub_options.h b/google/cloud/gkehub/gke_hub_options.h deleted file mode 100644 index fbb801c9033b7..0000000000000 --- a/google/cloud/gkehub/gke_hub_options.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/gkehub/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEHUB_GKE_HUB_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEHUB_GKE_HUB_OPTIONS_H - -#include "google/cloud/gkehub/gke_hub_connection.h" -#include "google/cloud/gkehub/gke_hub_connection_idempotency_policy.h" -#include "google/cloud/gkehub/v1/gke_hub_options.h" - -namespace google { -namespace cloud { -namespace gkehub { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use gkehub_v1::GkeHubPollingPolicyOption directly. -using ::google::cloud::gkehub_v1::GkeHubPollingPolicyOption; - -/// @deprecated Use gkehub_v1::GkeHubBackoffPolicyOption directly. -using ::google::cloud::gkehub_v1::GkeHubBackoffPolicyOption; - -/// @deprecated Use gkehub_v1::GkeHubConnectionIdempotencyPolicyOption directly. -using ::google::cloud::gkehub_v1::GkeHubConnectionIdempotencyPolicyOption; - -/// @deprecated Use gkehub_v1::GkeHubPolicyOptionList directly. -using ::google::cloud::gkehub_v1::GkeHubPolicyOptionList; - -/// @deprecated Use gkehub_v1::GkeHubRetryPolicyOption directly. -using ::google::cloud::gkehub_v1::GkeHubRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace gkehub -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEHUB_GKE_HUB_OPTIONS_H diff --git a/google/cloud/gkehub/mocks/mock_gke_hub_connection.h b/google/cloud/gkehub/mocks/mock_gke_hub_connection.h deleted file mode 100644 index 05b28ca5ca551..0000000000000 --- a/google/cloud/gkehub/mocks/mock_gke_hub_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/gkehub/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEHUB_MOCKS_MOCK_GKE_HUB_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEHUB_MOCKS_MOCK_GKE_HUB_CONNECTION_H - -#include "google/cloud/gkehub/gke_hub_connection.h" -#include "google/cloud/gkehub/v1/mocks/mock_gke_hub_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in gkehub_v1_mocks instead of the aliases -/// defined in this namespace. -namespace gkehub_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use gkehub_v1_mocks::MockGkeHubConnection directly. -using ::google::cloud::gkehub_v1_mocks::MockGkeHubConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace gkehub_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEHUB_MOCKS_MOCK_GKE_HUB_CONNECTION_H diff --git a/google/cloud/gkehub/quickstart/.bazelrc b/google/cloud/gkehub/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/gkehub/quickstart/.bazelrc +++ b/google/cloud/gkehub/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/gkehub/quickstart/CMakeLists.txt b/google/cloud/gkehub/quickstart/CMakeLists.txt index f8d4f0844e48d..0fff3a654422a 100644 --- a/google/cloud/gkehub/quickstart/CMakeLists.txt +++ b/google/cloud/gkehub/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the GKE Hub C++ client library from a larger CMake # project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-gkehub-quickstart CXX) find_package(google_cloud_cpp_gkehub REQUIRED) diff --git a/google/cloud/gkehub/v1/gke_hub_client.h b/google/cloud/gkehub/v1/gke_hub_client.h index 64fc34e31f235..78d2bf0504773 100644 --- a/google/cloud/gkehub/v1/gke_hub_client.h +++ b/google/cloud/gkehub/v1/gke_hub_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/gkehub/v1/gke_hub_connection.h b/google/cloud/gkehub/v1/gke_hub_connection.h index ea7eaca78469b..c5f5cf4e9373c 100644 --- a/google/cloud/gkehub/v1/gke_hub_connection.h +++ b/google/cloud/gkehub/v1/gke_hub_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/gkehub/v1/gke_hub_connection_idempotency_policy.h" #include "google/cloud/gkehub/v1/internal/gke_hub_retry_traits.h" +#include "google/cloud/gkehub/v1/service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/gkehub/v1/gke_hub_connection_idempotency_policy.h b/google/cloud/gkehub/v1/gke_hub_connection_idempotency_policy.h index 52ca8fd282b8b..ed3b048ad6e35 100644 --- a/google/cloud/gkehub/v1/gke_hub_connection_idempotency_policy.h +++ b/google/cloud/gkehub/v1/gke_hub_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEHUB_V1_GKE_HUB_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEHUB_V1_GKE_HUB_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/gkehub/v1/service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/gkehub/v1/internal/gke_hub_auth_decorator.cc b/google/cloud/gkehub/v1/internal/gke_hub_auth_decorator.cc index 30151da6d361c..0d22e1e50b3f6 100644 --- a/google/cloud/gkehub/v1/internal/gke_hub_auth_decorator.cc +++ b/google/cloud/gkehub/v1/internal/gke_hub_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/gkehub/v1/service.proto #include "google/cloud/gkehub/v1/internal/gke_hub_auth_decorator.h" -#include +#include "google/cloud/gkehub/v1/service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkehub_v1_internal { @@ -278,3 +281,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkehub_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkehub/v1/internal/gke_hub_auth_decorator.h b/google/cloud/gkehub/v1/internal/gke_hub_auth_decorator.h index d8c6cee5ed743..82ffd11dccfbc 100644 --- a/google/cloud/gkehub/v1/internal/gke_hub_auth_decorator.h +++ b/google/cloud/gkehub/v1/internal/gke_hub_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/gkehub/v1/internal/gke_hub_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkehub_v1_internal { @@ -150,4 +153,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEHUB_V1_INTERNAL_GKE_HUB_AUTH_DECORATOR_H diff --git a/google/cloud/gkehub/v1/internal/gke_hub_connection_impl.h b/google/cloud/gkehub/v1/internal/gke_hub_connection_impl.h index bcb6f9314c17c..a72fa5c93dd9e 100644 --- a/google/cloud/gkehub/v1/internal/gke_hub_connection_impl.h +++ b/google/cloud/gkehub/v1/internal/gke_hub_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/gkehub/v1/internal/gke_hub_logging_decorator.cc b/google/cloud/gkehub/v1/internal/gke_hub_logging_decorator.cc index a5ebda98ce7e4..4dc3d2a21047f 100644 --- a/google/cloud/gkehub/v1/internal/gke_hub_logging_decorator.cc +++ b/google/cloud/gkehub/v1/internal/gke_hub_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/gkehub/v1/service.proto #include "google/cloud/gkehub/v1/internal/gke_hub_logging_decorator.h" +#include "google/cloud/gkehub/v1/service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkehub_v1_internal { @@ -313,3 +316,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkehub_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkehub/v1/internal/gke_hub_logging_decorator.h b/google/cloud/gkehub/v1/internal/gke_hub_logging_decorator.h index a15a9df983385..425d400afbb35 100644 --- a/google/cloud/gkehub/v1/internal/gke_hub_logging_decorator.h +++ b/google/cloud/gkehub/v1/internal/gke_hub_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/gkehub/v1/internal/gke_hub_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkehub_v1_internal { @@ -150,4 +153,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEHUB_V1_INTERNAL_GKE_HUB_LOGGING_DECORATOR_H diff --git a/google/cloud/gkehub/v1/internal/gke_hub_metadata_decorator.cc b/google/cloud/gkehub/v1/internal/gke_hub_metadata_decorator.cc index e29fda5f0d754..4cce0bf630499 100644 --- a/google/cloud/gkehub/v1/internal/gke_hub_metadata_decorator.cc +++ b/google/cloud/gkehub/v1/internal/gke_hub_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/gkehub/v1/service.proto #include "google/cloud/gkehub/v1/internal/gke_hub_metadata_decorator.h" +#include "google/cloud/gkehub/v1/service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkehub_v1_internal { @@ -247,3 +251,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkehub_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkehub/v1/internal/gke_hub_metadata_decorator.h b/google/cloud/gkehub/v1/internal/gke_hub_metadata_decorator.h index 89304ca5e359c..60cd2b2678f99 100644 --- a/google/cloud/gkehub/v1/internal/gke_hub_metadata_decorator.h +++ b/google/cloud/gkehub/v1/internal/gke_hub_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/gkehub/v1/internal/gke_hub_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkehub_v1_internal { @@ -155,4 +158,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEHUB_V1_INTERNAL_GKE_HUB_METADATA_DECORATOR_H diff --git a/google/cloud/gkehub/v1/internal/gke_hub_option_defaults.cc b/google/cloud/gkehub/v1/internal/gke_hub_option_defaults.cc index be6b818d12e47..d710ccf72a7d3 100644 --- a/google/cloud/gkehub/v1/internal/gke_hub_option_defaults.cc +++ b/google/cloud/gkehub/v1/internal/gke_hub_option_defaults.cc @@ -40,7 +40,7 @@ Options GkeHubDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - gkehub_v1::GkeHubLimitedTimeRetryPolicy(std::chrono::minutes(30)) + gkehub_v1::GkeHubLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/gkehub/v1/internal/gke_hub_stub.cc b/google/cloud/gkehub/v1/internal/gke_hub_stub.cc index ba6daca946c4c..51656fa46cf37 100644 --- a/google/cloud/gkehub/v1/internal/gke_hub_stub.cc +++ b/google/cloud/gkehub/v1/internal/gke_hub_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/gkehub/v1/service.proto #include "google/cloud/gkehub/v1/internal/gke_hub_stub.h" +#include "google/cloud/gkehub/v1/service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkehub_v1_internal { @@ -308,3 +311,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkehub_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkehub/v1/internal/gke_hub_stub.h b/google/cloud/gkehub/v1/internal/gke_hub_stub.h index 99e9e570b8986..a2d19847d06e9 100644 --- a/google/cloud/gkehub/v1/internal/gke_hub_stub.h +++ b/google/cloud/gkehub/v1/internal/gke_hub_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEHUB_V1_INTERNAL_GKE_HUB_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEHUB_V1_INTERNAL_GKE_HUB_STUB_H +#include "google/cloud/gkehub/v1/service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkehub_v1_internal { @@ -260,4 +263,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEHUB_V1_INTERNAL_GKE_HUB_STUB_H diff --git a/google/cloud/gkehub/v1/internal/gke_hub_stub_factory.cc b/google/cloud/gkehub/v1/internal/gke_hub_stub_factory.cc index 7b771eccde711..a1f9c75b11953 100644 --- a/google/cloud/gkehub/v1/internal/gke_hub_stub_factory.cc +++ b/google/cloud/gkehub/v1/internal/gke_hub_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/gkehub/v1/internal/gke_hub_metadata_decorator.h" #include "google/cloud/gkehub/v1/internal/gke_hub_stub.h" #include "google/cloud/gkehub/v1/internal/gke_hub_tracing_stub.h" +#include "google/cloud/gkehub/v1/service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkehub_v1_internal { @@ -68,3 +71,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkehub_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkehub/v1/internal/gke_hub_stub_factory.h b/google/cloud/gkehub/v1/internal/gke_hub_stub_factory.h index e71af8512715e..d28491f740218 100644 --- a/google/cloud/gkehub/v1/internal/gke_hub_stub_factory.h +++ b/google/cloud/gkehub/v1/internal/gke_hub_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkehub_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEHUB_V1_INTERNAL_GKE_HUB_STUB_FACTORY_H diff --git a/google/cloud/gkehub/v1/internal/gke_hub_tracing_connection.cc b/google/cloud/gkehub/v1/internal/gke_hub_tracing_connection.cc index 3bc02d3fb30ee..2d55094264f77 100644 --- a/google/cloud/gkehub/v1/internal/gke_hub_tracing_connection.cc +++ b/google/cloud/gkehub/v1/internal/gke_hub_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace gkehub_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GkeHubTracingConnection::GkeHubTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -241,15 +239,11 @@ GkeHubTracingConnection::GenerateConnectManifest( return internal::EndSpan(*span, child_->GenerateConnectManifest(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeGkeHubTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/gkehub/v1/internal/gke_hub_tracing_connection.h b/google/cloud/gkehub/v1/internal/gke_hub_tracing_connection.h index f468068931d04..2c0283d111e1b 100644 --- a/google/cloud/gkehub/v1/internal/gke_hub_tracing_connection.h +++ b/google/cloud/gkehub/v1/internal/gke_hub_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace gkehub_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class GkeHubTracingConnection : public gkehub_v1::GkeHubConnection { public: ~GkeHubTracingConnection() override = default; @@ -126,8 +124,6 @@ class GkeHubTracingConnection : public gkehub_v1::GkeHubConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/gkehub/v1/internal/gke_hub_tracing_stub.cc b/google/cloud/gkehub/v1/internal/gke_hub_tracing_stub.cc index d146f4ba204b2..1ddee0ae481f3 100644 --- a/google/cloud/gkehub/v1/internal/gke_hub_tracing_stub.cc +++ b/google/cloud/gkehub/v1/internal/gke_hub_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkehub_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GkeHubTracingStub::GkeHubTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -272,18 +273,14 @@ future GkeHubTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeGkeHubTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkehub_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkehub/v1/internal/gke_hub_tracing_stub.h b/google/cloud/gkehub/v1/internal/gke_hub_tracing_stub.h index 3fd23539413a5..e44d012dfa907 100644 --- a/google/cloud/gkehub/v1/internal/gke_hub_tracing_stub.h +++ b/google/cloud/gkehub/v1/internal/gke_hub_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkehub_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class GkeHubTracingStub : public GkeHubStub { public: ~GkeHubTracingStub() override = default; @@ -145,8 +146,6 @@ class GkeHubTracingStub : public GkeHubStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -161,4 +160,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEHUB_V1_INTERNAL_GKE_HUB_TRACING_STUB_H diff --git a/google/cloud/gkemulticloud/BUILD.bazel b/google/cloud/gkemulticloud/BUILD.bazel index 99f253e0c7805..5a571bc693826 100644 --- a/google/cloud/gkemulticloud/BUILD.bazel +++ b/google/cloud/gkemulticloud/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/gkemulticloud/v1:gkemulticloud_cc_grpc", + "@googleapis//google/cloud/gkemulticloud/v1:gkemulticloud_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/gkemulticloud/quickstart/.bazelrc b/google/cloud/gkemulticloud/quickstart/.bazelrc index 6777c6b4c95de..ec27511a60add 100644 --- a/google/cloud/gkemulticloud/quickstart/.bazelrc +++ b/google/cloud/gkemulticloud/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/gkemulticloud/quickstart/CMakeLists.txt b/google/cloud/gkemulticloud/quickstart/CMakeLists.txt index 73795e1a33029..7624e261771cd 100644 --- a/google/cloud/gkemulticloud/quickstart/CMakeLists.txt +++ b/google/cloud/gkemulticloud/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Anthos Multi-Cloud API C++ client library from # a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-gkemulticloud-quickstart CXX) find_package(google_cloud_cpp_gkemulticloud REQUIRED) diff --git a/google/cloud/gkemulticloud/v1/attached_clusters_client.h b/google/cloud/gkemulticloud/v1/attached_clusters_client.h index afc169b49b55b..4cc9017252d00 100644 --- a/google/cloud/gkemulticloud/v1/attached_clusters_client.h +++ b/google/cloud/gkemulticloud/v1/attached_clusters_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/gkemulticloud/v1/attached_clusters_connection.h b/google/cloud/gkemulticloud/v1/attached_clusters_connection.h index ca17124d77b07..d788925f48c91 100644 --- a/google/cloud/gkemulticloud/v1/attached_clusters_connection.h +++ b/google/cloud/gkemulticloud/v1/attached_clusters_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEMULTICLOUD_V1_ATTACHED_CLUSTERS_CONNECTION_H #include "google/cloud/gkemulticloud/v1/attached_clusters_connection_idempotency_policy.h" +#include "google/cloud/gkemulticloud/v1/attached_service.pb.h" #include "google/cloud/gkemulticloud/v1/internal/attached_clusters_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/gkemulticloud/v1/attached_clusters_connection_idempotency_policy.h b/google/cloud/gkemulticloud/v1/attached_clusters_connection_idempotency_policy.h index 560d371e2aeef..ee1e5a593e04c 100644 --- a/google/cloud/gkemulticloud/v1/attached_clusters_connection_idempotency_policy.h +++ b/google/cloud/gkemulticloud/v1/attached_clusters_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEMULTICLOUD_V1_ATTACHED_CLUSTERS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEMULTICLOUD_V1_ATTACHED_CLUSTERS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/gkemulticloud/v1/attached_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/gkemulticloud/v1/aws_clusters_client.h b/google/cloud/gkemulticloud/v1/aws_clusters_client.h index 53c66cbadd83c..dfd792afbf77a 100644 --- a/google/cloud/gkemulticloud/v1/aws_clusters_client.h +++ b/google/cloud/gkemulticloud/v1/aws_clusters_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/gkemulticloud/v1/aws_clusters_connection.h b/google/cloud/gkemulticloud/v1/aws_clusters_connection.h index 8aa2f8ef2a2ba..065801f466420 100644 --- a/google/cloud/gkemulticloud/v1/aws_clusters_connection.h +++ b/google/cloud/gkemulticloud/v1/aws_clusters_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEMULTICLOUD_V1_AWS_CLUSTERS_CONNECTION_H #include "google/cloud/gkemulticloud/v1/aws_clusters_connection_idempotency_policy.h" +#include "google/cloud/gkemulticloud/v1/aws_service.pb.h" #include "google/cloud/gkemulticloud/v1/internal/aws_clusters_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/gkemulticloud/v1/aws_clusters_connection_idempotency_policy.h b/google/cloud/gkemulticloud/v1/aws_clusters_connection_idempotency_policy.h index 078a5c4c5b1f0..1d58d13cc9a3d 100644 --- a/google/cloud/gkemulticloud/v1/aws_clusters_connection_idempotency_policy.h +++ b/google/cloud/gkemulticloud/v1/aws_clusters_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEMULTICLOUD_V1_AWS_CLUSTERS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEMULTICLOUD_V1_AWS_CLUSTERS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/gkemulticloud/v1/aws_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/gkemulticloud/v1/azure_clusters_client.h b/google/cloud/gkemulticloud/v1/azure_clusters_client.h index 8e5852b19683c..da8e04ba88dbf 100644 --- a/google/cloud/gkemulticloud/v1/azure_clusters_client.h +++ b/google/cloud/gkemulticloud/v1/azure_clusters_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/gkemulticloud/v1/azure_clusters_connection.h b/google/cloud/gkemulticloud/v1/azure_clusters_connection.h index dd0cdb8975a5d..cba4e00dbc475 100644 --- a/google/cloud/gkemulticloud/v1/azure_clusters_connection.h +++ b/google/cloud/gkemulticloud/v1/azure_clusters_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEMULTICLOUD_V1_AZURE_CLUSTERS_CONNECTION_H #include "google/cloud/gkemulticloud/v1/azure_clusters_connection_idempotency_policy.h" +#include "google/cloud/gkemulticloud/v1/azure_service.pb.h" #include "google/cloud/gkemulticloud/v1/internal/azure_clusters_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/gkemulticloud/v1/azure_clusters_connection_idempotency_policy.h b/google/cloud/gkemulticloud/v1/azure_clusters_connection_idempotency_policy.h index 1e2fd0d1371cf..802b407a87053 100644 --- a/google/cloud/gkemulticloud/v1/azure_clusters_connection_idempotency_policy.h +++ b/google/cloud/gkemulticloud/v1/azure_clusters_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEMULTICLOUD_V1_AZURE_CLUSTERS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEMULTICLOUD_V1_AZURE_CLUSTERS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/gkemulticloud/v1/azure_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/gkemulticloud/v1/internal/attached_clusters_auth_decorator.cc b/google/cloud/gkemulticloud/v1/internal/attached_clusters_auth_decorator.cc index 357e70bbeb82f..7bf2f192d5816 100644 --- a/google/cloud/gkemulticloud/v1/internal/attached_clusters_auth_decorator.cc +++ b/google/cloud/gkemulticloud/v1/internal/attached_clusters_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/gkemulticloud/v1/attached_service.proto #include "google/cloud/gkemulticloud/v1/internal/attached_clusters_auth_decorator.h" -#include +#include "google/cloud/gkemulticloud/v1/attached_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { @@ -281,3 +284,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkemulticloud_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkemulticloud/v1/internal/attached_clusters_auth_decorator.h b/google/cloud/gkemulticloud/v1/internal/attached_clusters_auth_decorator.h index 5c4a108b325ee..bee71814f1bdf 100644 --- a/google/cloud/gkemulticloud/v1/internal/attached_clusters_auth_decorator.h +++ b/google/cloud/gkemulticloud/v1/internal/attached_clusters_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/gkemulticloud/v1/internal/attached_clusters_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { @@ -158,4 +161,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEMULTICLOUD_V1_INTERNAL_ATTACHED_CLUSTERS_AUTH_DECORATOR_H diff --git a/google/cloud/gkemulticloud/v1/internal/attached_clusters_connection_impl.h b/google/cloud/gkemulticloud/v1/internal/attached_clusters_connection_impl.h index 48e5b4e0400d5..e9768d97506dc 100644 --- a/google/cloud/gkemulticloud/v1/internal/attached_clusters_connection_impl.h +++ b/google/cloud/gkemulticloud/v1/internal/attached_clusters_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/gkemulticloud/v1/internal/attached_clusters_logging_decorator.cc b/google/cloud/gkemulticloud/v1/internal/attached_clusters_logging_decorator.cc index f036ace8760f4..07a606d02e6cf 100644 --- a/google/cloud/gkemulticloud/v1/internal/attached_clusters_logging_decorator.cc +++ b/google/cloud/gkemulticloud/v1/internal/attached_clusters_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/gkemulticloud/v1/attached_service.proto #include "google/cloud/gkemulticloud/v1/internal/attached_clusters_logging_decorator.h" +#include "google/cloud/gkemulticloud/v1/attached_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { @@ -338,3 +341,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkemulticloud_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkemulticloud/v1/internal/attached_clusters_logging_decorator.h b/google/cloud/gkemulticloud/v1/internal/attached_clusters_logging_decorator.h index 41601b292649b..3c30e20d69621 100644 --- a/google/cloud/gkemulticloud/v1/internal/attached_clusters_logging_decorator.h +++ b/google/cloud/gkemulticloud/v1/internal/attached_clusters_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/gkemulticloud/v1/internal/attached_clusters_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { @@ -158,4 +161,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEMULTICLOUD_V1_INTERNAL_ATTACHED_CLUSTERS_LOGGING_DECORATOR_H diff --git a/google/cloud/gkemulticloud/v1/internal/attached_clusters_metadata_decorator.cc b/google/cloud/gkemulticloud/v1/internal/attached_clusters_metadata_decorator.cc index 86feb109333cd..82ca69f8272e6 100644 --- a/google/cloud/gkemulticloud/v1/internal/attached_clusters_metadata_decorator.cc +++ b/google/cloud/gkemulticloud/v1/internal/attached_clusters_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/gkemulticloud/v1/attached_service.proto #include "google/cloud/gkemulticloud/v1/internal/attached_clusters_metadata_decorator.h" +#include "google/cloud/gkemulticloud/v1/attached_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { @@ -267,3 +271,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkemulticloud_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkemulticloud/v1/internal/attached_clusters_metadata_decorator.h b/google/cloud/gkemulticloud/v1/internal/attached_clusters_metadata_decorator.h index 4fd89d2e92e84..1d33a77e41ce3 100644 --- a/google/cloud/gkemulticloud/v1/internal/attached_clusters_metadata_decorator.h +++ b/google/cloud/gkemulticloud/v1/internal/attached_clusters_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/gkemulticloud/v1/internal/attached_clusters_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { @@ -164,4 +167,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEMULTICLOUD_V1_INTERNAL_ATTACHED_CLUSTERS_METADATA_DECORATOR_H diff --git a/google/cloud/gkemulticloud/v1/internal/attached_clusters_option_defaults.cc b/google/cloud/gkemulticloud/v1/internal/attached_clusters_option_defaults.cc index 36d743d3bf8fb..442843d84f426 100644 --- a/google/cloud/gkemulticloud/v1/internal/attached_clusters_option_defaults.cc +++ b/google/cloud/gkemulticloud/v1/internal/attached_clusters_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/gkemulticloud/v1/internal/attached_clusters_option_defaults.h" #include "google/cloud/gkemulticloud/v1/attached_clusters_connection.h" #include "google/cloud/gkemulticloud/v1/attached_clusters_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -44,7 +44,7 @@ Options AttachedClustersDefaultOptions(std::string const& location, if (!options.has()) { options.set( gkemulticloud_v1::AttachedClustersLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/gkemulticloud/v1/internal/attached_clusters_stub.cc b/google/cloud/gkemulticloud/v1/internal/attached_clusters_stub.cc index feb606bddf18e..034eee9b835fd 100644 --- a/google/cloud/gkemulticloud/v1/internal/attached_clusters_stub.cc +++ b/google/cloud/gkemulticloud/v1/internal/attached_clusters_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/gkemulticloud/v1/attached_service.proto #include "google/cloud/gkemulticloud/v1/internal/attached_clusters_stub.h" +#include "google/cloud/gkemulticloud/v1/attached_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { @@ -328,3 +331,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkemulticloud_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkemulticloud/v1/internal/attached_clusters_stub.h b/google/cloud/gkemulticloud/v1/internal/attached_clusters_stub.h index 6e6315dcf91d9..5958120c04211 100644 --- a/google/cloud/gkemulticloud/v1/internal/attached_clusters_stub.h +++ b/google/cloud/gkemulticloud/v1/internal/attached_clusters_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEMULTICLOUD_V1_INTERNAL_ATTACHED_CLUSTERS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEMULTICLOUD_V1_INTERNAL_ATTACHED_CLUSTERS_STUB_H +#include "google/cloud/gkemulticloud/v1/attached_service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { @@ -285,4 +288,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEMULTICLOUD_V1_INTERNAL_ATTACHED_CLUSTERS_STUB_H diff --git a/google/cloud/gkemulticloud/v1/internal/attached_clusters_stub_factory.cc b/google/cloud/gkemulticloud/v1/internal/attached_clusters_stub_factory.cc index 9c45b6608d7de..dfe4f029d3f6d 100644 --- a/google/cloud/gkemulticloud/v1/internal/attached_clusters_stub_factory.cc +++ b/google/cloud/gkemulticloud/v1/internal/attached_clusters_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/gkemulticloud/v1/attached_service.proto #include "google/cloud/gkemulticloud/v1/internal/attached_clusters_stub_factory.h" +#include "google/cloud/gkemulticloud/v1/attached_service.grpc.pb.h" #include "google/cloud/gkemulticloud/v1/internal/attached_clusters_auth_decorator.h" #include "google/cloud/gkemulticloud/v1/internal/attached_clusters_logging_decorator.h" #include "google/cloud/gkemulticloud/v1/internal/attached_clusters_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkemulticloud_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkemulticloud/v1/internal/attached_clusters_stub_factory.h b/google/cloud/gkemulticloud/v1/internal/attached_clusters_stub_factory.h index a147512ebcdcc..b7d4d32b948f2 100644 --- a/google/cloud/gkemulticloud/v1/internal/attached_clusters_stub_factory.h +++ b/google/cloud/gkemulticloud/v1/internal/attached_clusters_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEMULTICLOUD_V1_INTERNAL_ATTACHED_CLUSTERS_STUB_FACTORY_H diff --git a/google/cloud/gkemulticloud/v1/internal/attached_clusters_tracing_connection.cc b/google/cloud/gkemulticloud/v1/internal/attached_clusters_tracing_connection.cc index c66551b2fa4c4..cfcadc58044f1 100644 --- a/google/cloud/gkemulticloud/v1/internal/attached_clusters_tracing_connection.cc +++ b/google/cloud/gkemulticloud/v1/internal/attached_clusters_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace gkemulticloud_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AttachedClustersTracingConnection::AttachedClustersTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -259,16 +257,12 @@ Status AttachedClustersTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAttachedClustersTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/gkemulticloud/v1/internal/attached_clusters_tracing_connection.h b/google/cloud/gkemulticloud/v1/internal/attached_clusters_tracing_connection.h index 520e14e599ded..0491b3d771286 100644 --- a/google/cloud/gkemulticloud/v1/internal/attached_clusters_tracing_connection.h +++ b/google/cloud/gkemulticloud/v1/internal/attached_clusters_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace gkemulticloud_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AttachedClustersTracingConnection : public gkemulticloud_v1::AttachedClustersConnection { public: @@ -140,8 +138,6 @@ class AttachedClustersTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/gkemulticloud/v1/internal/attached_clusters_tracing_stub.cc b/google/cloud/gkemulticloud/v1/internal/attached_clusters_tracing_stub.cc index eab7411ae8f87..06d1c823f0790 100644 --- a/google/cloud/gkemulticloud/v1/internal/attached_clusters_tracing_stub.cc +++ b/google/cloud/gkemulticloud/v1/internal/attached_clusters_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AttachedClustersTracingStub::AttachedClustersTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -303,18 +304,14 @@ future AttachedClustersTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAttachedClustersTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkemulticloud_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkemulticloud/v1/internal/attached_clusters_tracing_stub.h b/google/cloud/gkemulticloud/v1/internal/attached_clusters_tracing_stub.h index 6f3167213db9e..e3d1585037d37 100644 --- a/google/cloud/gkemulticloud/v1/internal/attached_clusters_tracing_stub.h +++ b/google/cloud/gkemulticloud/v1/internal/attached_clusters_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AttachedClustersTracingStub : public AttachedClustersStub { public: ~AttachedClustersTracingStub() override = default; @@ -154,8 +155,6 @@ class AttachedClustersTracingStub : public AttachedClustersStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -170,4 +169,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEMULTICLOUD_V1_INTERNAL_ATTACHED_CLUSTERS_TRACING_STUB_H diff --git a/google/cloud/gkemulticloud/v1/internal/aws_clusters_auth_decorator.cc b/google/cloud/gkemulticloud/v1/internal/aws_clusters_auth_decorator.cc index a0a593e64c6c2..f50ef84f816a6 100644 --- a/google/cloud/gkemulticloud/v1/internal/aws_clusters_auth_decorator.cc +++ b/google/cloud/gkemulticloud/v1/internal/aws_clusters_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/gkemulticloud/v1/aws_service.proto #include "google/cloud/gkemulticloud/v1/internal/aws_clusters_auth_decorator.h" -#include +#include "google/cloud/gkemulticloud/v1/aws_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { @@ -388,3 +391,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkemulticloud_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkemulticloud/v1/internal/aws_clusters_auth_decorator.h b/google/cloud/gkemulticloud/v1/internal/aws_clusters_auth_decorator.h index 701d6b13de85d..76d8223b65358 100644 --- a/google/cloud/gkemulticloud/v1/internal/aws_clusters_auth_decorator.h +++ b/google/cloud/gkemulticloud/v1/internal/aws_clusters_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/gkemulticloud/v1/internal/aws_clusters_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { @@ -214,4 +217,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEMULTICLOUD_V1_INTERNAL_AWS_CLUSTERS_AUTH_DECORATOR_H diff --git a/google/cloud/gkemulticloud/v1/internal/aws_clusters_connection_impl.h b/google/cloud/gkemulticloud/v1/internal/aws_clusters_connection_impl.h index e7af3fa9bec0b..0fb3140f85690 100644 --- a/google/cloud/gkemulticloud/v1/internal/aws_clusters_connection_impl.h +++ b/google/cloud/gkemulticloud/v1/internal/aws_clusters_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/gkemulticloud/v1/internal/aws_clusters_logging_decorator.cc b/google/cloud/gkemulticloud/v1/internal/aws_clusters_logging_decorator.cc index 179a782c9998f..84299b4af9d17 100644 --- a/google/cloud/gkemulticloud/v1/internal/aws_clusters_logging_decorator.cc +++ b/google/cloud/gkemulticloud/v1/internal/aws_clusters_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/gkemulticloud/v1/aws_service.proto #include "google/cloud/gkemulticloud/v1/internal/aws_clusters_logging_decorator.h" +#include "google/cloud/gkemulticloud/v1/aws_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { @@ -461,3 +464,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkemulticloud_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkemulticloud/v1/internal/aws_clusters_logging_decorator.h b/google/cloud/gkemulticloud/v1/internal/aws_clusters_logging_decorator.h index bbe9600c70b0a..3117943a9ea21 100644 --- a/google/cloud/gkemulticloud/v1/internal/aws_clusters_logging_decorator.h +++ b/google/cloud/gkemulticloud/v1/internal/aws_clusters_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/gkemulticloud/v1/internal/aws_clusters_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { @@ -214,4 +217,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEMULTICLOUD_V1_INTERNAL_AWS_CLUSTERS_LOGGING_DECORATOR_H diff --git a/google/cloud/gkemulticloud/v1/internal/aws_clusters_metadata_decorator.cc b/google/cloud/gkemulticloud/v1/internal/aws_clusters_metadata_decorator.cc index 659a7e9088046..9a0ac55962087 100644 --- a/google/cloud/gkemulticloud/v1/internal/aws_clusters_metadata_decorator.cc +++ b/google/cloud/gkemulticloud/v1/internal/aws_clusters_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/gkemulticloud/v1/aws_service.proto #include "google/cloud/gkemulticloud/v1/internal/aws_clusters_metadata_decorator.h" +#include "google/cloud/gkemulticloud/v1/aws_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { @@ -355,3 +359,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkemulticloud_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkemulticloud/v1/internal/aws_clusters_metadata_decorator.h b/google/cloud/gkemulticloud/v1/internal/aws_clusters_metadata_decorator.h index 843c075fc3485..5a3eb16d08193 100644 --- a/google/cloud/gkemulticloud/v1/internal/aws_clusters_metadata_decorator.h +++ b/google/cloud/gkemulticloud/v1/internal/aws_clusters_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/gkemulticloud/v1/internal/aws_clusters_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { @@ -219,4 +222,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEMULTICLOUD_V1_INTERNAL_AWS_CLUSTERS_METADATA_DECORATOR_H diff --git a/google/cloud/gkemulticloud/v1/internal/aws_clusters_option_defaults.cc b/google/cloud/gkemulticloud/v1/internal/aws_clusters_option_defaults.cc index 62a37ed454f6f..f0fab4e335d8b 100644 --- a/google/cloud/gkemulticloud/v1/internal/aws_clusters_option_defaults.cc +++ b/google/cloud/gkemulticloud/v1/internal/aws_clusters_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/gkemulticloud/v1/internal/aws_clusters_option_defaults.h" #include "google/cloud/gkemulticloud/v1/aws_clusters_connection.h" #include "google/cloud/gkemulticloud/v1/aws_clusters_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -44,7 +44,7 @@ Options AwsClustersDefaultOptions(std::string const& location, if (!options.has()) { options.set( gkemulticloud_v1::AwsClustersLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/gkemulticloud/v1/internal/aws_clusters_stub.cc b/google/cloud/gkemulticloud/v1/internal/aws_clusters_stub.cc index 4ec0aa0de4e4d..789f49a2a4bc6 100644 --- a/google/cloud/gkemulticloud/v1/internal/aws_clusters_stub.cc +++ b/google/cloud/gkemulticloud/v1/internal/aws_clusters_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/gkemulticloud/v1/aws_service.proto #include "google/cloud/gkemulticloud/v1/internal/aws_clusters_stub.h" +#include "google/cloud/gkemulticloud/v1/aws_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { @@ -454,3 +457,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkemulticloud_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkemulticloud/v1/internal/aws_clusters_stub.h b/google/cloud/gkemulticloud/v1/internal/aws_clusters_stub.h index b4ab4c5e7fea6..305fd4a984560 100644 --- a/google/cloud/gkemulticloud/v1/internal/aws_clusters_stub.h +++ b/google/cloud/gkemulticloud/v1/internal/aws_clusters_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEMULTICLOUD_V1_INTERNAL_AWS_CLUSTERS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEMULTICLOUD_V1_INTERNAL_AWS_CLUSTERS_STUB_H +#include "google/cloud/gkemulticloud/v1/aws_service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { @@ -400,4 +403,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEMULTICLOUD_V1_INTERNAL_AWS_CLUSTERS_STUB_H diff --git a/google/cloud/gkemulticloud/v1/internal/aws_clusters_stub_factory.cc b/google/cloud/gkemulticloud/v1/internal/aws_clusters_stub_factory.cc index 4bdd085079315..0a38ab4427983 100644 --- a/google/cloud/gkemulticloud/v1/internal/aws_clusters_stub_factory.cc +++ b/google/cloud/gkemulticloud/v1/internal/aws_clusters_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/gkemulticloud/v1/aws_service.proto #include "google/cloud/gkemulticloud/v1/internal/aws_clusters_stub_factory.h" +#include "google/cloud/gkemulticloud/v1/aws_service.grpc.pb.h" #include "google/cloud/gkemulticloud/v1/internal/aws_clusters_auth_decorator.h" #include "google/cloud/gkemulticloud/v1/internal/aws_clusters_logging_decorator.h" #include "google/cloud/gkemulticloud/v1/internal/aws_clusters_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkemulticloud_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkemulticloud/v1/internal/aws_clusters_stub_factory.h b/google/cloud/gkemulticloud/v1/internal/aws_clusters_stub_factory.h index 17c7df911fb24..9beb9522e4ea2 100644 --- a/google/cloud/gkemulticloud/v1/internal/aws_clusters_stub_factory.h +++ b/google/cloud/gkemulticloud/v1/internal/aws_clusters_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEMULTICLOUD_V1_INTERNAL_AWS_CLUSTERS_STUB_FACTORY_H diff --git a/google/cloud/gkemulticloud/v1/internal/aws_clusters_tracing_connection.cc b/google/cloud/gkemulticloud/v1/internal/aws_clusters_tracing_connection.cc index 28db0f1acfa31..f4c81f693d045 100644 --- a/google/cloud/gkemulticloud/v1/internal/aws_clusters_tracing_connection.cc +++ b/google/cloud/gkemulticloud/v1/internal/aws_clusters_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace gkemulticloud_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AwsClustersTracingConnection::AwsClustersTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -374,16 +372,12 @@ Status AwsClustersTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAwsClustersTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/gkemulticloud/v1/internal/aws_clusters_tracing_connection.h b/google/cloud/gkemulticloud/v1/internal/aws_clusters_tracing_connection.h index 3088dd3fdb166..092a587e5bf98 100644 --- a/google/cloud/gkemulticloud/v1/internal/aws_clusters_tracing_connection.h +++ b/google/cloud/gkemulticloud/v1/internal/aws_clusters_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace gkemulticloud_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AwsClustersTracingConnection : public gkemulticloud_v1::AwsClustersConnection { public: @@ -189,8 +187,6 @@ class AwsClustersTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/gkemulticloud/v1/internal/aws_clusters_tracing_stub.cc b/google/cloud/gkemulticloud/v1/internal/aws_clusters_tracing_stub.cc index e64946ef4bae2..5fd906ec3fd25 100644 --- a/google/cloud/gkemulticloud/v1/internal/aws_clusters_tracing_stub.cc +++ b/google/cloud/gkemulticloud/v1/internal/aws_clusters_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AwsClustersTracingStub::AwsClustersTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -412,18 +413,14 @@ future AwsClustersTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAwsClustersTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkemulticloud_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkemulticloud/v1/internal/aws_clusters_tracing_stub.h b/google/cloud/gkemulticloud/v1/internal/aws_clusters_tracing_stub.h index 47543c32eccd9..1d3b2b59a5541 100644 --- a/google/cloud/gkemulticloud/v1/internal/aws_clusters_tracing_stub.h +++ b/google/cloud/gkemulticloud/v1/internal/aws_clusters_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AwsClustersTracingStub : public AwsClustersStub { public: ~AwsClustersTracingStub() override = default; @@ -209,8 +210,6 @@ class AwsClustersTracingStub : public AwsClustersStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -225,4 +224,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEMULTICLOUD_V1_INTERNAL_AWS_CLUSTERS_TRACING_STUB_H diff --git a/google/cloud/gkemulticloud/v1/internal/azure_clusters_auth_decorator.cc b/google/cloud/gkemulticloud/v1/internal/azure_clusters_auth_decorator.cc index 6513c1bf3a639..3b7388a13f9be 100644 --- a/google/cloud/gkemulticloud/v1/internal/azure_clusters_auth_decorator.cc +++ b/google/cloud/gkemulticloud/v1/internal/azure_clusters_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/gkemulticloud/v1/azure_service.proto #include "google/cloud/gkemulticloud/v1/internal/azure_clusters_auth_decorator.h" -#include +#include "google/cloud/gkemulticloud/v1/azure_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { @@ -446,3 +449,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkemulticloud_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkemulticloud/v1/internal/azure_clusters_auth_decorator.h b/google/cloud/gkemulticloud/v1/internal/azure_clusters_auth_decorator.h index 40e523e49b80f..527da927d5993 100644 --- a/google/cloud/gkemulticloud/v1/internal/azure_clusters_auth_decorator.h +++ b/google/cloud/gkemulticloud/v1/internal/azure_clusters_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/gkemulticloud/v1/internal/azure_clusters_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { @@ -237,4 +240,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEMULTICLOUD_V1_INTERNAL_AZURE_CLUSTERS_AUTH_DECORATOR_H diff --git a/google/cloud/gkemulticloud/v1/internal/azure_clusters_connection_impl.h b/google/cloud/gkemulticloud/v1/internal/azure_clusters_connection_impl.h index 54059df5b4e00..8e48200227a28 100644 --- a/google/cloud/gkemulticloud/v1/internal/azure_clusters_connection_impl.h +++ b/google/cloud/gkemulticloud/v1/internal/azure_clusters_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/gkemulticloud/v1/internal/azure_clusters_logging_decorator.cc b/google/cloud/gkemulticloud/v1/internal/azure_clusters_logging_decorator.cc index 38021f53bd782..8561440b92c16 100644 --- a/google/cloud/gkemulticloud/v1/internal/azure_clusters_logging_decorator.cc +++ b/google/cloud/gkemulticloud/v1/internal/azure_clusters_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/gkemulticloud/v1/azure_service.proto #include "google/cloud/gkemulticloud/v1/internal/azure_clusters_logging_decorator.h" +#include "google/cloud/gkemulticloud/v1/azure_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { @@ -540,3 +543,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkemulticloud_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkemulticloud/v1/internal/azure_clusters_logging_decorator.h b/google/cloud/gkemulticloud/v1/internal/azure_clusters_logging_decorator.h index c2fa1cedeb190..d84e13da4d08d 100644 --- a/google/cloud/gkemulticloud/v1/internal/azure_clusters_logging_decorator.h +++ b/google/cloud/gkemulticloud/v1/internal/azure_clusters_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/gkemulticloud/v1/internal/azure_clusters_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { @@ -237,4 +240,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEMULTICLOUD_V1_INTERNAL_AZURE_CLUSTERS_LOGGING_DECORATOR_H diff --git a/google/cloud/gkemulticloud/v1/internal/azure_clusters_metadata_decorator.cc b/google/cloud/gkemulticloud/v1/internal/azure_clusters_metadata_decorator.cc index f1770609da468..13f0b9794022f 100644 --- a/google/cloud/gkemulticloud/v1/internal/azure_clusters_metadata_decorator.cc +++ b/google/cloud/gkemulticloud/v1/internal/azure_clusters_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/gkemulticloud/v1/azure_service.proto #include "google/cloud/gkemulticloud/v1/internal/azure_clusters_metadata_decorator.h" +#include "google/cloud/gkemulticloud/v1/azure_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { @@ -415,3 +419,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkemulticloud_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkemulticloud/v1/internal/azure_clusters_metadata_decorator.h b/google/cloud/gkemulticloud/v1/internal/azure_clusters_metadata_decorator.h index 15e846d3299df..c63d3281db843 100644 --- a/google/cloud/gkemulticloud/v1/internal/azure_clusters_metadata_decorator.h +++ b/google/cloud/gkemulticloud/v1/internal/azure_clusters_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/gkemulticloud/v1/internal/azure_clusters_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { @@ -242,4 +245,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEMULTICLOUD_V1_INTERNAL_AZURE_CLUSTERS_METADATA_DECORATOR_H diff --git a/google/cloud/gkemulticloud/v1/internal/azure_clusters_option_defaults.cc b/google/cloud/gkemulticloud/v1/internal/azure_clusters_option_defaults.cc index 3a5b5e0192c51..e3b696927caee 100644 --- a/google/cloud/gkemulticloud/v1/internal/azure_clusters_option_defaults.cc +++ b/google/cloud/gkemulticloud/v1/internal/azure_clusters_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/gkemulticloud/v1/internal/azure_clusters_option_defaults.h" #include "google/cloud/gkemulticloud/v1/azure_clusters_connection.h" #include "google/cloud/gkemulticloud/v1/azure_clusters_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -44,7 +44,7 @@ Options AzureClustersDefaultOptions(std::string const& location, if (!options.has()) { options.set( gkemulticloud_v1::AzureClustersLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/gkemulticloud/v1/internal/azure_clusters_stub.cc b/google/cloud/gkemulticloud/v1/internal/azure_clusters_stub.cc index b822947551440..08eccb10dfabc 100644 --- a/google/cloud/gkemulticloud/v1/internal/azure_clusters_stub.cc +++ b/google/cloud/gkemulticloud/v1/internal/azure_clusters_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/gkemulticloud/v1/azure_service.proto #include "google/cloud/gkemulticloud/v1/internal/azure_clusters_stub.h" +#include "google/cloud/gkemulticloud/v1/azure_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { @@ -521,3 +524,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkemulticloud_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkemulticloud/v1/internal/azure_clusters_stub.h b/google/cloud/gkemulticloud/v1/internal/azure_clusters_stub.h index dcff4271e4239..eeedc539ef855 100644 --- a/google/cloud/gkemulticloud/v1/internal/azure_clusters_stub.h +++ b/google/cloud/gkemulticloud/v1/internal/azure_clusters_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEMULTICLOUD_V1_INTERNAL_AZURE_CLUSTERS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEMULTICLOUD_V1_INTERNAL_AZURE_CLUSTERS_STUB_H +#include "google/cloud/gkemulticloud/v1/azure_service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { @@ -450,4 +453,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEMULTICLOUD_V1_INTERNAL_AZURE_CLUSTERS_STUB_H diff --git a/google/cloud/gkemulticloud/v1/internal/azure_clusters_stub_factory.cc b/google/cloud/gkemulticloud/v1/internal/azure_clusters_stub_factory.cc index 4986128276710..2ab5fafb425c5 100644 --- a/google/cloud/gkemulticloud/v1/internal/azure_clusters_stub_factory.cc +++ b/google/cloud/gkemulticloud/v1/internal/azure_clusters_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/gkemulticloud/v1/azure_service.proto #include "google/cloud/gkemulticloud/v1/internal/azure_clusters_stub_factory.h" +#include "google/cloud/gkemulticloud/v1/azure_service.grpc.pb.h" #include "google/cloud/gkemulticloud/v1/internal/azure_clusters_auth_decorator.h" #include "google/cloud/gkemulticloud/v1/internal/azure_clusters_logging_decorator.h" #include "google/cloud/gkemulticloud/v1/internal/azure_clusters_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkemulticloud_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkemulticloud/v1/internal/azure_clusters_stub_factory.h b/google/cloud/gkemulticloud/v1/internal/azure_clusters_stub_factory.h index 7f008886f53e7..42bebb93d3170 100644 --- a/google/cloud/gkemulticloud/v1/internal/azure_clusters_stub_factory.h +++ b/google/cloud/gkemulticloud/v1/internal/azure_clusters_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEMULTICLOUD_V1_INTERNAL_AZURE_CLUSTERS_STUB_FACTORY_H diff --git a/google/cloud/gkemulticloud/v1/internal/azure_clusters_tracing_connection.cc b/google/cloud/gkemulticloud/v1/internal/azure_clusters_tracing_connection.cc index 6a238f10a9e51..d010b49d6f929 100644 --- a/google/cloud/gkemulticloud/v1/internal/azure_clusters_tracing_connection.cc +++ b/google/cloud/gkemulticloud/v1/internal/azure_clusters_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace gkemulticloud_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AzureClustersTracingConnection::AzureClustersTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -443,16 +441,12 @@ Status AzureClustersTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAzureClustersTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/gkemulticloud/v1/internal/azure_clusters_tracing_connection.h b/google/cloud/gkemulticloud/v1/internal/azure_clusters_tracing_connection.h index cd07b735fa9fd..13e9b4815d941 100644 --- a/google/cloud/gkemulticloud/v1/internal/azure_clusters_tracing_connection.h +++ b/google/cloud/gkemulticloud/v1/internal/azure_clusters_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace gkemulticloud_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AzureClustersTracingConnection : public gkemulticloud_v1::AzureClustersConnection { public: @@ -210,8 +208,6 @@ class AzureClustersTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/gkemulticloud/v1/internal/azure_clusters_tracing_stub.cc b/google/cloud/gkemulticloud/v1/internal/azure_clusters_tracing_stub.cc index f438bddcfeba5..cc819d2407929 100644 --- a/google/cloud/gkemulticloud/v1/internal/azure_clusters_tracing_stub.cc +++ b/google/cloud/gkemulticloud/v1/internal/azure_clusters_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AzureClustersTracingStub::AzureClustersTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -476,18 +477,14 @@ future AzureClustersTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAzureClustersTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkemulticloud_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkemulticloud/v1/internal/azure_clusters_tracing_stub.h b/google/cloud/gkemulticloud/v1/internal/azure_clusters_tracing_stub.h index 7dfd868eef17a..0169dac565392 100644 --- a/google/cloud/gkemulticloud/v1/internal/azure_clusters_tracing_stub.h +++ b/google/cloud/gkemulticloud/v1/internal/azure_clusters_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkemulticloud_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AzureClustersTracingStub : public AzureClustersStub { public: ~AzureClustersTracingStub() override = default; @@ -232,8 +233,6 @@ class AzureClustersTracingStub : public AzureClustersStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -248,4 +247,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKEMULTICLOUD_V1_INTERNAL_AZURE_CLUSTERS_TRACING_STUB_H diff --git a/google/cloud/gkerecommender/BUILD.bazel b/google/cloud/gkerecommender/BUILD.bazel index eea417d306c8d..421ba61473dfb 100644 --- a/google/cloud/gkerecommender/BUILD.bazel +++ b/google/cloud/gkerecommender/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/gkerecommender/v1:gkerecommender_cc_grpc", + "@googleapis//google/cloud/gkerecommender/v1:gkerecommender_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/gkerecommender/quickstart/CMakeLists.txt b/google/cloud/gkerecommender/quickstart/CMakeLists.txt index 4dde70cf2d145..f55d9527a9a2c 100644 --- a/google/cloud/gkerecommender/quickstart/CMakeLists.txt +++ b/google/cloud/gkerecommender/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the GKE Recommender API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-gkerecommender-quickstart CXX) find_package(google_cloud_cpp_gkerecommender REQUIRED) diff --git a/google/cloud/gkerecommender/v1/gke_inference_quickstart_connection.h b/google/cloud/gkerecommender/v1/gke_inference_quickstart_connection.h index c163e2055c0e1..d53c8876088ac 100644 --- a/google/cloud/gkerecommender/v1/gke_inference_quickstart_connection.h +++ b/google/cloud/gkerecommender/v1/gke_inference_quickstart_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKERECOMMENDER_V1_GKE_INFERENCE_QUICKSTART_CONNECTION_H #include "google/cloud/gkerecommender/v1/gke_inference_quickstart_connection_idempotency_policy.h" +#include "google/cloud/gkerecommender/v1/gkerecommender.pb.h" #include "google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/gkerecommender/v1/gke_inference_quickstart_connection_idempotency_policy.h b/google/cloud/gkerecommender/v1/gke_inference_quickstart_connection_idempotency_policy.h index 3b2934fce60e0..301ed10d4e799 100644 --- a/google/cloud/gkerecommender/v1/gke_inference_quickstart_connection_idempotency_policy.h +++ b/google/cloud/gkerecommender/v1/gke_inference_quickstart_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKERECOMMENDER_V1_GKE_INFERENCE_QUICKSTART_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKERECOMMENDER_V1_GKE_INFERENCE_QUICKSTART_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/gkerecommender/v1/gkerecommender.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_auth_decorator.cc b/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_auth_decorator.cc index eb65d5deaac4e..dcea78cb0af79 100644 --- a/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_auth_decorator.cc +++ b/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/gkerecommender/v1/gkerecommender.proto #include "google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_auth_decorator.h" -#include +#include "google/cloud/gkerecommender/v1/gkerecommender.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkerecommender_v1_internal { @@ -93,3 +96,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkerecommender_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_auth_decorator.h b/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_auth_decorator.h index 29049bbe338ae..7a116e51c1c18 100644 --- a/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_auth_decorator.h +++ b/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkerecommender_v1_internal { @@ -82,4 +85,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKERECOMMENDER_V1_INTERNAL_GKE_INFERENCE_QUICKSTART_AUTH_DECORATOR_H diff --git a/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_logging_decorator.cc b/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_logging_decorator.cc index 7fdd24ee7bcb5..06227ad0a573e 100644 --- a/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_logging_decorator.cc +++ b/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/gkerecommender/v1/gkerecommender.proto #include "google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_logging_decorator.h" +#include "google/cloud/gkerecommender/v1/gkerecommender.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkerecommender_v1_internal { @@ -122,3 +125,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkerecommender_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_logging_decorator.h b/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_logging_decorator.h index bb9a3a7e579af..b6f0d55c12e35 100644 --- a/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_logging_decorator.h +++ b/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkerecommender_v1_internal { @@ -82,4 +85,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKERECOMMENDER_V1_INTERNAL_GKE_INFERENCE_QUICKSTART_LOGGING_DECORATOR_H diff --git a/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_metadata_decorator.cc b/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_metadata_decorator.cc index e2493751fda7a..e72390181bbc6 100644 --- a/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_metadata_decorator.cc +++ b/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/gkerecommender/v1/gkerecommender.proto #include "google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_metadata_decorator.h" +#include "google/cloud/gkerecommender/v1/gkerecommender.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkerecommender_v1_internal { @@ -113,3 +117,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkerecommender_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_metadata_decorator.h b/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_metadata_decorator.h index 75dc9dba73ccf..3762751207d8c 100644 --- a/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_metadata_decorator.h +++ b/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkerecommender_v1_internal { @@ -88,4 +91,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKERECOMMENDER_V1_INTERNAL_GKE_INFERENCE_QUICKSTART_METADATA_DECORATOR_H diff --git a/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_option_defaults.cc b/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_option_defaults.cc index 574e8eff44c6c..954ec5c88b44c 100644 --- a/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_option_defaults.cc +++ b/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_option_defaults.cc @@ -43,7 +43,7 @@ Options GkeInferenceQuickstartDefaultOptions(Options options) { .has()) { options.set( gkerecommender_v1::GkeInferenceQuickstartLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_stub.cc b/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_stub.cc index 78d41f105910e..7160865b644d5 100644 --- a/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_stub.cc +++ b/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/gkerecommender/v1/gkerecommender.proto #include "google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_stub.h" +#include "google/cloud/gkerecommender/v1/gkerecommender.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkerecommender_v1_internal { @@ -112,3 +115,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkerecommender_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_stub.h b/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_stub.h index 41ef3fbc37c34..8cd2ca163404a 100644 --- a/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_stub.h +++ b/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKERECOMMENDER_V1_INTERNAL_GKE_INFERENCE_QUICKSTART_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKERECOMMENDER_V1_INTERNAL_GKE_INFERENCE_QUICKSTART_STUB_H +#include "google/cloud/gkerecommender/v1/gkerecommender.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkerecommender_v1_internal { @@ -126,4 +129,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKERECOMMENDER_V1_INTERNAL_GKE_INFERENCE_QUICKSTART_STUB_H diff --git a/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_stub_factory.cc b/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_stub_factory.cc index 68054fa43f2a1..c250f25d8b12e 100644 --- a/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_stub_factory.cc +++ b/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/gkerecommender/v1/gkerecommender.proto #include "google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_stub_factory.h" +#include "google/cloud/gkerecommender/v1/gkerecommender.grpc.pb.h" #include "google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_auth_decorator.h" #include "google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_logging_decorator.h" #include "google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_metadata_decorator.h" @@ -28,10 +29,12 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkerecommender_v1_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkerecommender_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_stub_factory.h b/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_stub_factory.h index 6abdd95568b12..2888bd18d1202 100644 --- a/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_stub_factory.h +++ b/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkerecommender_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKERECOMMENDER_V1_INTERNAL_GKE_INFERENCE_QUICKSTART_STUB_FACTORY_H diff --git a/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_tracing_connection.cc b/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_tracing_connection.cc index e3d5419e1c47c..139be7908a895 100644 --- a/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_tracing_connection.cc +++ b/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace gkerecommender_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GkeInferenceQuickstartTracingConnection:: GkeInferenceQuickstartTracingConnection( std::shared_ptr @@ -103,17 +101,13 @@ GkeInferenceQuickstartTracingConnection::FetchBenchmarkingData( return internal::EndSpan(*span, child_->FetchBenchmarkingData(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeGkeInferenceQuickstartTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_tracing_connection.h b/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_tracing_connection.h index dbcf6bd8b3d75..b4d5fe691c72f 100644 --- a/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_tracing_connection.h +++ b/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace gkerecommender_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class GkeInferenceQuickstartTracingConnection : public gkerecommender_v1::GkeInferenceQuickstartConnection { public: @@ -69,8 +67,6 @@ class GkeInferenceQuickstartTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_tracing_stub.cc b/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_tracing_stub.cc index d7da6bbaa16d9..145e6591dc13f 100644 --- a/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_tracing_stub.cc +++ b/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkerecommender_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GkeInferenceQuickstartTracingStub::GkeInferenceQuickstartTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -114,19 +115,15 @@ GkeInferenceQuickstartTracingStub::FetchBenchmarkingData( context, *span, child_->FetchBenchmarkingData(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeGkeInferenceQuickstartTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace gkerecommender_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_tracing_stub.h b/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_tracing_stub.h index 08434ac60b6c0..16ceb4bd01e78 100644 --- a/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_tracing_stub.h +++ b/google/cloud/gkerecommender/v1/internal/gke_inference_quickstart_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace gkerecommender_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class GkeInferenceQuickstartTracingStub : public GkeInferenceQuickstartStub { public: ~GkeInferenceQuickstartTracingStub() override = default; @@ -79,8 +80,6 @@ class GkeInferenceQuickstartTracingStub : public GkeInferenceQuickstartStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -96,4 +95,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GKERECOMMENDER_V1_INTERNAL_GKE_INFERENCE_QUICKSTART_TRACING_STUB_H diff --git a/google/cloud/google_cloud_cpp_common.bzl b/google/cloud/google_cloud_cpp_common.bzl index 2201aa030ef8d..450a070542af9 100644 --- a/google/cloud/google_cloud_cpp_common.bzl +++ b/google/cloud/google_cloud_cpp_common.bzl @@ -26,9 +26,6 @@ google_cloud_cpp_common_hdrs = [ "future_generic.h", "future_void.h", "idempotency.h", - "internal/absl_str_cat_quiet.h", - "internal/absl_str_join_quiet.h", - "internal/absl_str_replace_quiet.h", "internal/algorithm.h", "internal/api_client_header.h", "internal/attributes.h", @@ -104,6 +101,8 @@ google_cloud_cpp_common_hdrs = [ "optional.h", "options.h", "polling_policy.h", + "ports_def.inc", + "ports_undef.inc", "project.h", "retry_policy.h", "rpc_metadata.h", diff --git a/google/cloud/google_cloud_cpp_common.cmake b/google/cloud/google_cloud_cpp_common.cmake index 773857ef720d1..a3f11bb04ac9c 100644 --- a/google/cloud/google_cloud_cpp_common.cmake +++ b/google/cloud/google_cloud_cpp_common.cmake @@ -42,9 +42,6 @@ add_library( future_generic.h future_void.h idempotency.h - internal/absl_str_cat_quiet.h - internal/absl_str_join_quiet.h - internal/absl_str_replace_quiet.h internal/algorithm.h internal/api_client_header.cc internal/api_client_header.h @@ -163,6 +160,8 @@ add_library( options.cc options.h polling_policy.h + ports_def.inc + ports_undef.inc project.cc project.h retry_policy.h @@ -202,10 +201,6 @@ if (opentelemetry IN_LIST GOOGLE_CLOUD_CPP_ENABLE) if (opentelemetry-cpp_FOUND) target_link_libraries(google_cloud_cpp_common PUBLIC opentelemetry-cpp::api) - target_compile_definitions( - google_cloud_cpp_common - PUBLIC # Enable OpenTelemetry features in google-cloud-cpp - GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY) set(GOOGLE_CLOUD_CPP_FIND_OPTIONAL_DEPENDENCIES "find_dependency(opentelemetry-cpp)") set(GOOGLE_CLOUD_CPP_OPENTELEMETRY_API "opentelemetry_api") diff --git a/google/cloud/google_cloud_cpp_grpc_utils.bzl b/google/cloud/google_cloud_cpp_grpc_utils.bzl index d54df10510c40..9d4a6ddfc514a 100644 --- a/google/cloud/google_cloud_cpp_grpc_utils.bzl +++ b/google/cloud/google_cloud_cpp_grpc_utils.bzl @@ -24,10 +24,6 @@ google_cloud_cpp_grpc_utils_hdrs = [ "connection_options.h", "grpc_error_delegate.h", "grpc_options.h", - "grpc_utils/async_operation.h", - "grpc_utils/completion_queue.h", - "grpc_utils/grpc_error_delegate.h", - "grpc_utils/version.h", "iam_updater.h", "internal/async_connection_ready.h", "internal/async_long_running_operation.h", diff --git a/google/cloud/google_cloud_cpp_grpc_utils.cmake b/google/cloud/google_cloud_cpp_grpc_utils.cmake index f73a7d81e09b2..47094c6f146ef 100644 --- a/google/cloud/google_cloud_cpp_grpc_utils.cmake +++ b/google/cloud/google_cloud_cpp_grpc_utils.cmake @@ -28,10 +28,6 @@ add_library( grpc_error_delegate.h grpc_options.cc grpc_options.h - grpc_utils/async_operation.h - grpc_utils/completion_queue.h - grpc_utils/grpc_error_delegate.h - grpc_utils/version.h iam_updater.h internal/async_connection_ready.cc internal/async_connection_ready.h @@ -190,9 +186,8 @@ google_cloud_cpp_add_pkgconfig( "absl_time_zone" "absl_variant" "openssl") - # Create and install the CMake configuration files. -configure_file("grpc_utils/config.cmake.in" +configure_file("config-grpc-utils.cmake.in" "google_cloud_cpp_grpc_utils-config.cmake" @ONLY) write_basic_package_version_file( "google_cloud_cpp_grpc_utils-config-version.cmake" diff --git a/google/cloud/google_cloud_cpp_rest_internal.cmake b/google/cloud/google_cloud_cpp_rest_internal.cmake index fd8187f4f44ec..3d38991523870 100644 --- a/google/cloud/google_cloud_cpp_rest_internal.cmake +++ b/google/cloud/google_cloud_cpp_rest_internal.cmake @@ -14,7 +14,7 @@ # limitations under the License. # ~~~ -include(IncludeNlohmannJson) +find_package(nlohmann_json CONFIG REQUIRED) find_package(CURL REQUIRED) if (NOT WIN32) find_package(OpenSSL REQUIRED) diff --git a/google/cloud/grpc_error_delegate.cc b/google/cloud/grpc_error_delegate.cc index 27816aa7a9f4b..fcda02086e17c 100644 --- a/google/cloud/grpc_error_delegate.cc +++ b/google/cloud/grpc_error_delegate.cc @@ -15,9 +15,9 @@ #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/internal/status_payload_keys.h" #include "absl/types/optional.h" -#include +#include "google/protobuf/any.pb.h" +#include "google/rpc/error_details.pb.h" #include -#include namespace google { namespace cloud { diff --git a/google/cloud/grpc_error_delegate.h b/google/cloud/grpc_error_delegate.h index a2c91ceb2ec87..f1b7151f5c8a9 100644 --- a/google/cloud/grpc_error_delegate.h +++ b/google/cloud/grpc_error_delegate.h @@ -17,7 +17,7 @@ #include "google/cloud/status.h" #include "google/cloud/version.h" -#include +#include "google/rpc/status.pb.h" #include #include diff --git a/google/cloud/grpc_error_delegate_test.cc b/google/cloud/grpc_error_delegate_test.cc index 2a9ac50374800..3c8c80991fa20 100644 --- a/google/cloud/grpc_error_delegate_test.cc +++ b/google/cloud/grpc_error_delegate_test.cc @@ -15,7 +15,7 @@ #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/internal/status_payload_keys.h" #include "google/cloud/internal/time_utils.h" -#include +#include "google/rpc/error_details.pb.h" #include namespace google { diff --git a/google/cloud/grpc_options.cc b/google/cloud/grpc_options.cc index c5f42ed01c0f9..322bf2cc57213 100644 --- a/google/cloud/grpc_options.cc +++ b/google/cloud/grpc_options.cc @@ -14,9 +14,9 @@ #include "google/cloud/grpc_options.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/background_threads_impl.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" namespace google { namespace cloud { diff --git a/google/cloud/grpc_utils/BUILD.bazel b/google/cloud/grpc_utils/BUILD.bazel deleted file mode 100644 index b1e4f6752a3ba..0000000000000 --- a/google/cloud/grpc_utils/BUILD.bazel +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 2020 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) # Apache 2.0 - -# TODO(#3932) - remove the backwards compatibility target. -cc_library( - name = "google_cloud_cpp_grpc_utils", - srcs = [], - hdrs = [ - "async_operation.h", - "completion_queue.h", - "grpc_error_delegate.h", - "version.h", - ], - deprecation = ( - "please use //:grpc_utils instead." + - " This target will be removed on or about 2023-01-01. More details at" + - " https://github.com/googleapis/google-cloud-cpp/issues/3932" - ), - tags = ["manual"], - deps = [ - "//:common", - "//:grpc_utils", - ], -) diff --git a/google/cloud/grpc_utils/async_operation.h b/google/cloud/grpc_utils/async_operation.h deleted file mode 100644 index 0ff2e3fbd432a..0000000000000 --- a/google/cloud/grpc_utils/async_operation.h +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GRPC_UTILS_ASYNC_OPERATION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GRPC_UTILS_ASYNC_OPERATION_H - -#include "google/cloud/async_operation.h" -#include "google/cloud/version.h" -#warning \ - "We moved the helpers in the google::cloud::grpc_utils namespace to " \ - "`google::cloud`, please use them directly. The aliases to maintain " \ - "backwards compatibility will be removed on or about 2023-01-01. " \ - "More details at " \ - "https://github.com/googleapis/google-cloud-cpp/issues/3932") - -namespace google { -namespace cloud { -namespace grpc_utils { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -/// Use a type alias to maintain API backwards compatibility. -using AsyncOperation = ::google::cloud::AsyncOperation; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace grpc_utils -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GRPC_UTILS_ASYNC_OPERATION_H diff --git a/google/cloud/grpc_utils/completion_queue.h b/google/cloud/grpc_utils/completion_queue.h deleted file mode 100644 index 0871a5e9dc205..0000000000000 --- a/google/cloud/grpc_utils/completion_queue.h +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GRPC_UTILS_COMPLETION_QUEUE_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GRPC_UTILS_COMPLETION_QUEUE_H - -#include "google/cloud/completion_queue.h" -#include "google/cloud/version.h" -#warning \ - "We moved the helpers in the google::cloud::grpc_utils namespace to " \ - "`google::cloud`, please use them directly. The aliases to maintain " \ - "backwards compatibility will be removed on or about 2023-01-01. " \ - "More details at " \ - "https://github.com/googleapis/google-cloud-cpp/issues/3932") - -namespace google { -namespace cloud { -namespace grpc_utils { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -/// Use a type alias to maintain API backwards compatibility. -using CompletionQueue = ::google::cloud::CompletionQueue; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace grpc_utils -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GRPC_UTILS_COMPLETION_QUEUE_H diff --git a/google/cloud/grpc_utils/grpc_error_delegate.h b/google/cloud/grpc_utils/grpc_error_delegate.h deleted file mode 100644 index 1e7f40d08c220..0000000000000 --- a/google/cloud/grpc_utils/grpc_error_delegate.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GRPC_UTILS_GRPC_ERROR_DELEGATE_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GRPC_UTILS_GRPC_ERROR_DELEGATE_H - -#include "google/cloud/grpc_error_delegate.h" -#include "google/cloud/version.h" -#warning \ - "We moved the helpers in the google::cloud::grpc_utils namespace to " \ - "`google::cloud`, please use them directly. The aliases to maintain " \ - "backwards compatibility will be removed on or about 2023-01-01. " \ - "More details at " \ - "https://github.com/googleapis/google-cloud-cpp/issues/3932") - -namespace google { -namespace cloud { -namespace grpc_utils { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -using ::google::cloud::MakeStatusFromRpcError; -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace grpc_utils -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GRPC_UTILS_GRPC_ERROR_DELEGATE_H diff --git a/google/cloud/grpc_utils/version.h b/google/cloud/grpc_utils/version.h deleted file mode 100644 index dfce119503478..0000000000000 --- a/google/cloud/grpc_utils/version.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GRPC_UTILS_VERSION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GRPC_UTILS_VERSION_H - -#include "google/cloud/version.h" -#warning \ - "We moved the helpers in the google::cloud::grpc_utils namespace to " \ - "`google::cloud`, please use them directly. The aliases to maintain " \ - "backwards compatibility will be removed on or about 2023-01-01. " \ - "More details at " \ - "https://github.com/googleapis/google-cloud-cpp/issues/3932") - -namespace google { -namespace cloud { -/** - * Contains all the Cloud C++ gRPC Utilities APIs. - */ -namespace grpc_utils { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -using ::google::cloud::version; -using ::google::cloud::version_major; -using ::google::cloud::version_minor; -using ::google::cloud::version_patch; -using ::google::cloud::version_string; -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -// TODO(#7463) - remove backwards compatibility namespaces -namespace v1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) -} // namespace grpc_utils -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_GRPC_UTILS_VERSION_H diff --git a/google/cloud/iam/BUILD.bazel b/google/cloud/iam/BUILD.bazel index 48bd99fa12405..ed04e614cbe5e 100644 --- a/google/cloud/iam/BUILD.bazel +++ b/google/cloud/iam/BUILD.bazel @@ -19,7 +19,6 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "admin/v1/", "credentials/v1/", "v1/", @@ -28,11 +27,11 @@ service_dirs = [ ] googleapis_deps = [ - "@com_google_googleapis//google/iam/admin/v1:admin_cc_grpc", - "@com_google_googleapis//google/iam/credentials/v1:credentials_cc_grpc", - "@com_google_googleapis//google/iam/v1:iam_cc_grpc", - "@com_google_googleapis//google/iam/v2:iam_cc_grpc", - "@com_google_googleapis//google/iam/v3:iam_cc_grpc", + "@googleapis//google/iam/admin/v1:admin_cc_grpc", + "@googleapis//google/iam/credentials/v1:credentials_cc_grpc", + "@googleapis//google/iam/v1:iam_cc_grpc", + "@googleapis//google/iam/v2:iam_cc_grpc", + "@googleapis//google/iam/v3:iam_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/iam/admin/v1/iam_client.h b/google/cloud/iam/admin/v1/iam_client.h index bcdedfe5a3e92..d3c0306f2dbf5 100644 --- a/google/cloud/iam/admin/v1/iam_client.h +++ b/google/cloud/iam/admin/v1/iam_client.h @@ -1650,7 +1650,6 @@ class IAMClient { }; GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace iam_admin_v1 } // namespace cloud } // namespace google diff --git a/google/cloud/iam/admin/v1/iam_connection.h b/google/cloud/iam/admin/v1/iam_connection.h index 3873617ccde5a..72f80251bf024 100644 --- a/google/cloud/iam/admin/v1/iam_connection.h +++ b/google/cloud/iam/admin/v1/iam_connection.h @@ -27,7 +27,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/iam/admin/v1/iam.pb.h" #include namespace google { @@ -295,7 +295,6 @@ class IAMConnection { std::shared_ptr MakeIAMConnection(Options options = {}); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace iam_admin_v1 } // namespace cloud } // namespace google diff --git a/google/cloud/iam/admin/v1/iam_connection_idempotency_policy.h b/google/cloud/iam/admin/v1/iam_connection_idempotency_policy.h index 1d6b9246208b7..2705171f46e52 100644 --- a/google/cloud/iam/admin/v1/iam_connection_idempotency_policy.h +++ b/google/cloud/iam/admin/v1/iam_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/iam/admin/v1/iam.grpc.pb.h" #include namespace google { @@ -125,7 +125,6 @@ std::unique_ptr MakeDefaultIAMConnectionIdempotencyPolicy(); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace iam_admin_v1 } // namespace cloud } // namespace google diff --git a/google/cloud/iam/admin/v1/internal/iam_auth_decorator.cc b/google/cloud/iam/admin/v1/internal/iam_auth_decorator.cc index 7b690d41410c8..17e51bb53cc25 100644 --- a/google/cloud/iam/admin/v1/internal/iam_auth_decorator.cc +++ b/google/cloud/iam/admin/v1/internal/iam_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/iam/admin/v1/iam.proto #include "google/cloud/iam/admin/v1/internal/iam_auth_decorator.h" -#include +#include "google/iam/admin/v1/iam.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_admin_v1_internal { @@ -269,3 +272,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_admin_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/admin/v1/internal/iam_auth_decorator.h b/google/cloud/iam/admin/v1/internal/iam_auth_decorator.h index 3f50d5529497a..ed9a592ad94cb 100644 --- a/google/cloud/iam/admin/v1/internal/iam_auth_decorator.h +++ b/google/cloud/iam/admin/v1/internal/iam_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_admin_v1_internal { @@ -177,9 +180,10 @@ class IAMAuth : public IAMStub { }; GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace iam_admin_v1_internal } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_ADMIN_V1_INTERNAL_IAM_AUTH_DECORATOR_H diff --git a/google/cloud/iam/admin/v1/internal/iam_connection_impl.h b/google/cloud/iam/admin/v1/internal/iam_connection_impl.h index 048326533a4cc..5a84ac7d72c72 100644 --- a/google/cloud/iam/admin/v1/internal/iam_connection_impl.h +++ b/google/cloud/iam/admin/v1/internal/iam_connection_impl.h @@ -155,7 +155,6 @@ class IAMConnectionImpl : public iam_admin_v1::IAMConnection { }; GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace iam_admin_v1_internal } // namespace cloud } // namespace google diff --git a/google/cloud/iam/admin/v1/internal/iam_logging_decorator.cc b/google/cloud/iam/admin/v1/internal/iam_logging_decorator.cc index 49e6fdae1fbc2..06e5ee8bd6a96 100644 --- a/google/cloud/iam/admin/v1/internal/iam_logging_decorator.cc +++ b/google/cloud/iam/admin/v1/internal/iam_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/iam/admin/v1/internal/iam_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/iam/admin/v1/iam.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_admin_v1_internal { @@ -376,3 +379,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_admin_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/admin/v1/internal/iam_logging_decorator.h b/google/cloud/iam/admin/v1/internal/iam_logging_decorator.h index febd5ddcfc571..39debd6b7d2f0 100644 --- a/google/cloud/iam/admin/v1/internal/iam_logging_decorator.h +++ b/google/cloud/iam/admin/v1/internal/iam_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_admin_v1_internal { @@ -176,9 +179,10 @@ class IAMLogging : public IAMStub { }; // IAMLogging GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace iam_admin_v1_internal } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_ADMIN_V1_INTERNAL_IAM_LOGGING_DECORATOR_H diff --git a/google/cloud/iam/admin/v1/internal/iam_metadata_decorator.cc b/google/cloud/iam/admin/v1/internal/iam_metadata_decorator.cc index f7ab740582eb0..d033788561b9f 100644 --- a/google/cloud/iam/admin/v1/internal/iam_metadata_decorator.cc +++ b/google/cloud/iam/admin/v1/internal/iam_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/iam/admin/v1/internal/iam_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/iam/admin/v1/iam.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_admin_v1_internal { @@ -296,3 +300,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_admin_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/admin/v1/internal/iam_metadata_decorator.h b/google/cloud/iam/admin/v1/internal/iam_metadata_decorator.h index 722b34678e5df..9d38c61dee7b5 100644 --- a/google/cloud/iam/admin/v1/internal/iam_metadata_decorator.h +++ b/google/cloud/iam/admin/v1/internal/iam_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_admin_v1_internal { @@ -182,9 +185,10 @@ class IAMMetadata : public IAMStub { }; GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace iam_admin_v1_internal } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_ADMIN_V1_INTERNAL_IAM_METADATA_DECORATOR_H diff --git a/google/cloud/iam/admin/v1/internal/iam_option_defaults.cc b/google/cloud/iam/admin/v1/internal/iam_option_defaults.cc index 1e6f7626343c2..40dced5245669 100644 --- a/google/cloud/iam/admin/v1/internal/iam_option_defaults.cc +++ b/google/cloud/iam/admin/v1/internal/iam_option_defaults.cc @@ -40,7 +40,7 @@ Options IAMDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - iam_admin_v1::IAMLimitedTimeRetryPolicy(std::chrono::minutes(30)) + iam_admin_v1::IAMLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/iam/admin/v1/internal/iam_option_defaults.h b/google/cloud/iam/admin/v1/internal/iam_option_defaults.h index af91062bca504..4fc915fcd45ae 100644 --- a/google/cloud/iam/admin/v1/internal/iam_option_defaults.h +++ b/google/cloud/iam/admin/v1/internal/iam_option_defaults.h @@ -30,7 +30,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN Options IAMDefaultOptions(Options options); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace iam_admin_v1_internal } // namespace cloud } // namespace google diff --git a/google/cloud/iam/admin/v1/internal/iam_stub.cc b/google/cloud/iam/admin/v1/internal/iam_stub.cc index 5105f16d92efd..9eb9ff83cf527 100644 --- a/google/cloud/iam/admin/v1/internal/iam_stub.cc +++ b/google/cloud/iam/admin/v1/internal/iam_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/iam/admin/v1/internal/iam_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "google/iam/admin/v1/iam.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_admin_v1_internal { @@ -364,3 +367,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_admin_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/admin/v1/internal/iam_stub.h b/google/cloud/iam/admin/v1/internal/iam_stub.h index 24b97c5f0c9d2..9b29e46712e46 100644 --- a/google/cloud/iam/admin/v1/internal/iam_stub.h +++ b/google/cloud/iam/admin/v1/internal/iam_stub.h @@ -22,10 +22,13 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/iam/admin/v1/iam.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_admin_v1_internal { @@ -308,9 +311,10 @@ class DefaultIAMStub : public IAMStub { }; GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace iam_admin_v1_internal } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_ADMIN_V1_INTERNAL_IAM_STUB_H diff --git a/google/cloud/iam/admin/v1/internal/iam_stub_factory.cc b/google/cloud/iam/admin/v1/internal/iam_stub_factory.cc index cff409db68694..735a38645c738 100644 --- a/google/cloud/iam/admin/v1/internal/iam_stub_factory.cc +++ b/google/cloud/iam/admin/v1/internal/iam_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/iam/admin/v1/iam.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_admin_v1_internal { @@ -67,3 +70,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_admin_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/admin/v1/internal/iam_stub_factory.h b/google/cloud/iam/admin/v1/internal/iam_stub_factory.h index c9b9ae8d6bc0d..38a1624a3d727 100644 --- a/google/cloud/iam/admin/v1/internal/iam_stub_factory.h +++ b/google/cloud/iam/admin/v1/internal/iam_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_admin_v1_internal { @@ -35,9 +38,10 @@ std::shared_ptr CreateDefaultIAMStub( Options const& options); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace iam_admin_v1_internal } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_ADMIN_V1_INTERNAL_IAM_STUB_FACTORY_H diff --git a/google/cloud/iam/admin/v1/internal/iam_tracing_connection.cc b/google/cloud/iam/admin/v1/internal/iam_tracing_connection.cc index e165d4236e924..81dee2ed7151a 100644 --- a/google/cloud/iam/admin/v1/internal/iam_tracing_connection.cc +++ b/google/cloud/iam/admin/v1/internal/iam_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace iam_admin_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - IAMTracingConnection::IAMTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -270,15 +268,11 @@ IAMTracingConnection::LintPolicy( return internal::EndSpan(*span, child_->LintPolicy(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeIAMTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/iam/admin/v1/internal/iam_tracing_connection.h b/google/cloud/iam/admin/v1/internal/iam_tracing_connection.h index 1874a9182e543..90e8d10eb52bb 100644 --- a/google/cloud/iam/admin/v1/internal/iam_tracing_connection.h +++ b/google/cloud/iam/admin/v1/internal/iam_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace iam_admin_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class IAMTracingConnection : public iam_admin_v1::IAMConnection { public: ~IAMTracingConnection() override = default; @@ -144,8 +142,6 @@ class IAMTracingConnection : public iam_admin_v1::IAMConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * @@ -156,7 +152,6 @@ std::shared_ptr MakeIAMTracingConnection( std::shared_ptr conn); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace iam_admin_v1_internal } // namespace cloud } // namespace google diff --git a/google/cloud/iam/admin/v1/internal/iam_tracing_stub.cc b/google/cloud/iam/admin/v1/internal/iam_tracing_stub.cc index 58d2edf267da8..abca6226482f5 100644 --- a/google/cloud/iam/admin/v1/internal/iam_tracing_stub.cc +++ b/google/cloud/iam/admin/v1/internal/iam_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_admin_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - IAMTracingStub::IAMTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -352,17 +353,13 @@ StatusOr IAMTracingStub::LintPolicy( child_->LintPolicy(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeIAMTracingStub(std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_admin_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/admin/v1/internal/iam_tracing_stub.h b/google/cloud/iam/admin/v1/internal/iam_tracing_stub.h index 4139678a37786..f7efa96f07485 100644 --- a/google/cloud/iam/admin/v1/internal/iam_tracing_stub.h +++ b/google/cloud/iam/admin/v1/internal/iam_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_admin_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class IAMTracingStub : public IAMStub { public: ~IAMTracingStub() override = default; @@ -177,8 +178,6 @@ class IAMTracingStub : public IAMStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -188,9 +187,10 @@ class IAMTracingStub : public IAMStub { std::shared_ptr MakeIAMTracingStub(std::shared_ptr stub); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace iam_admin_v1_internal } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_ADMIN_V1_INTERNAL_IAM_TRACING_STUB_H diff --git a/google/cloud/iam/credentials/v1/iam_credentials_client.h b/google/cloud/iam/credentials/v1/iam_credentials_client.h index 30faa73be5c64..2b86040f00888 100644 --- a/google/cloud/iam/credentials/v1/iam_credentials_client.h +++ b/google/cloud/iam/credentials/v1/iam_credentials_client.h @@ -25,7 +25,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/protobuf/duration.pb.h" #include #include @@ -401,7 +401,6 @@ class IAMCredentialsClient { }; GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace iam_credentials_v1 } // namespace cloud } // namespace google diff --git a/google/cloud/iam/credentials/v1/iam_credentials_connection.h b/google/cloud/iam/credentials/v1/iam_credentials_connection.h index 130c86a4ba7eb..86551b00c8b60 100644 --- a/google/cloud/iam/credentials/v1/iam_credentials_connection.h +++ b/google/cloud/iam/credentials/v1/iam_credentials_connection.h @@ -26,7 +26,7 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/iam/credentials/v1/iamcredentials.pb.h" #include namespace google { @@ -221,7 +221,6 @@ std::shared_ptr MakeIAMCredentialsConnection( Options options = {}); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace iam_credentials_v1 } // namespace cloud } // namespace google diff --git a/google/cloud/iam/credentials/v1/iam_credentials_connection_idempotency_policy.h b/google/cloud/iam/credentials/v1/iam_credentials_connection_idempotency_policy.h index 0c49f3392aece..0e0d229ac4b32 100644 --- a/google/cloud/iam/credentials/v1/iam_credentials_connection_idempotency_policy.h +++ b/google/cloud/iam/credentials/v1/iam_credentials_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/iam/credentials/v1/iamcredentials.grpc.pb.h" #include namespace google { @@ -54,7 +54,6 @@ std::unique_ptr MakeDefaultIAMCredentialsConnectionIdempotencyPolicy(); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace iam_credentials_v1 } // namespace cloud } // namespace google diff --git a/google/cloud/iam/credentials/v1/internal/iam_credentials_auth_decorator.cc b/google/cloud/iam/credentials/v1/internal/iam_credentials_auth_decorator.cc index ae89b3945566f..278799d107ce4 100644 --- a/google/cloud/iam/credentials/v1/internal/iam_credentials_auth_decorator.cc +++ b/google/cloud/iam/credentials/v1/internal/iam_credentials_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/iam/credentials/v1/iamcredentials.proto #include "google/cloud/iam/credentials/v1/internal/iam_credentials_auth_decorator.h" -#include +#include "google/iam/credentials/v1/iamcredentials.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_credentials_v1_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_credentials_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/credentials/v1/internal/iam_credentials_auth_decorator.h b/google/cloud/iam/credentials/v1/internal/iam_credentials_auth_decorator.h index b71c8e01b91e6..664cd7aa39beb 100644 --- a/google/cloud/iam/credentials/v1/internal/iam_credentials_auth_decorator.h +++ b/google/cloud/iam/credentials/v1/internal/iam_credentials_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_credentials_v1_internal { @@ -63,9 +66,10 @@ class IAMCredentialsAuth : public IAMCredentialsStub { }; GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace iam_credentials_v1_internal } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_CREDENTIALS_V1_INTERNAL_IAM_CREDENTIALS_AUTH_DECORATOR_H diff --git a/google/cloud/iam/credentials/v1/internal/iam_credentials_connection_impl.h b/google/cloud/iam/credentials/v1/internal/iam_credentials_connection_impl.h index b5ab2ff0bd4b2..32c7aaa26b7cf 100644 --- a/google/cloud/iam/credentials/v1/internal/iam_credentials_connection_impl.h +++ b/google/cloud/iam/credentials/v1/internal/iam_credentials_connection_impl.h @@ -70,7 +70,6 @@ class IAMCredentialsConnectionImpl }; GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace iam_credentials_v1_internal } // namespace cloud } // namespace google diff --git a/google/cloud/iam/credentials/v1/internal/iam_credentials_logging_decorator.cc b/google/cloud/iam/credentials/v1/internal/iam_credentials_logging_decorator.cc index 69a0f3bae9abf..e5ea3f7cad43e 100644 --- a/google/cloud/iam/credentials/v1/internal/iam_credentials_logging_decorator.cc +++ b/google/cloud/iam/credentials/v1/internal/iam_credentials_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/iam/credentials/v1/internal/iam_credentials_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/iam/credentials/v1/iamcredentials.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_credentials_v1_internal { @@ -89,3 +92,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_credentials_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/credentials/v1/internal/iam_credentials_logging_decorator.h b/google/cloud/iam/credentials/v1/internal/iam_credentials_logging_decorator.h index 12d7b03a275fd..d6f4674543c35 100644 --- a/google/cloud/iam/credentials/v1/internal/iam_credentials_logging_decorator.h +++ b/google/cloud/iam/credentials/v1/internal/iam_credentials_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_credentials_v1_internal { @@ -63,9 +66,10 @@ class IAMCredentialsLogging : public IAMCredentialsStub { }; // IAMCredentialsLogging GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace iam_credentials_v1_internal } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_CREDENTIALS_V1_INTERNAL_IAM_CREDENTIALS_LOGGING_DECORATOR_H diff --git a/google/cloud/iam/credentials/v1/internal/iam_credentials_metadata_decorator.cc b/google/cloud/iam/credentials/v1/internal/iam_credentials_metadata_decorator.cc index 76ca7e292da99..1aaa71e24d030 100644 --- a/google/cloud/iam/credentials/v1/internal/iam_credentials_metadata_decorator.cc +++ b/google/cloud/iam/credentials/v1/internal/iam_credentials_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/iam/credentials/v1/internal/iam_credentials_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/iam/credentials/v1/iamcredentials.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_credentials_v1_internal { @@ -97,3 +101,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_credentials_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/credentials/v1/internal/iam_credentials_metadata_decorator.h b/google/cloud/iam/credentials/v1/internal/iam_credentials_metadata_decorator.h index 08356fa2d86d2..4a7b996cd4578 100644 --- a/google/cloud/iam/credentials/v1/internal/iam_credentials_metadata_decorator.h +++ b/google/cloud/iam/credentials/v1/internal/iam_credentials_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_credentials_v1_internal { @@ -68,9 +71,10 @@ class IAMCredentialsMetadata : public IAMCredentialsStub { }; GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace iam_credentials_v1_internal } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_CREDENTIALS_V1_INTERNAL_IAM_CREDENTIALS_METADATA_DECORATOR_H diff --git a/google/cloud/iam/credentials/v1/internal/iam_credentials_option_defaults.cc b/google/cloud/iam/credentials/v1/internal/iam_credentials_option_defaults.cc index d8bde53bb4994..48c9be0898cd5 100644 --- a/google/cloud/iam/credentials/v1/internal/iam_credentials_option_defaults.cc +++ b/google/cloud/iam/credentials/v1/internal/iam_credentials_option_defaults.cc @@ -42,7 +42,7 @@ Options IAMCredentialsDefaultOptions(Options options) { if (!options.has()) { options.set( iam_credentials_v1::IAMCredentialsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/iam/credentials/v1/internal/iam_credentials_option_defaults.h b/google/cloud/iam/credentials/v1/internal/iam_credentials_option_defaults.h index 2fed954c9835b..9424d1df4a886 100644 --- a/google/cloud/iam/credentials/v1/internal/iam_credentials_option_defaults.h +++ b/google/cloud/iam/credentials/v1/internal/iam_credentials_option_defaults.h @@ -30,7 +30,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN Options IAMCredentialsDefaultOptions(Options options); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace iam_credentials_v1_internal } // namespace cloud } // namespace google diff --git a/google/cloud/iam/credentials/v1/internal/iam_credentials_stub.cc b/google/cloud/iam/credentials/v1/internal/iam_credentials_stub.cc index 4a11d60880502..2d97730b9ddac 100644 --- a/google/cloud/iam/credentials/v1/internal/iam_credentials_stub.cc +++ b/google/cloud/iam/credentials/v1/internal/iam_credentials_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/iam/credentials/v1/internal/iam_credentials_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "google/iam/credentials/v1/iamcredentials.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_credentials_v1_internal { @@ -82,3 +85,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_credentials_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/credentials/v1/internal/iam_credentials_stub.h b/google/cloud/iam/credentials/v1/internal/iam_credentials_stub.h index 9635c77561a23..388c17701c74d 100644 --- a/google/cloud/iam/credentials/v1/internal/iam_credentials_stub.h +++ b/google/cloud/iam/credentials/v1/internal/iam_credentials_stub.h @@ -22,10 +22,13 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/iam/credentials/v1/iamcredentials.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_credentials_v1_internal { @@ -88,9 +91,10 @@ class DefaultIAMCredentialsStub : public IAMCredentialsStub { }; GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace iam_credentials_v1_internal } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_CREDENTIALS_V1_INTERNAL_IAM_CREDENTIALS_STUB_H diff --git a/google/cloud/iam/credentials/v1/internal/iam_credentials_stub_factory.cc b/google/cloud/iam/credentials/v1/internal/iam_credentials_stub_factory.cc index 8e739a536c58a..622bec8d90e61 100644 --- a/google/cloud/iam/credentials/v1/internal/iam_credentials_stub_factory.cc +++ b/google/cloud/iam/credentials/v1/internal/iam_credentials_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/iam/credentials/v1/iamcredentials.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_credentials_v1_internal { @@ -69,3 +72,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_credentials_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/credentials/v1/internal/iam_credentials_stub_factory.h b/google/cloud/iam/credentials/v1/internal/iam_credentials_stub_factory.h index b0aff46a54d01..2036bd10771a9 100644 --- a/google/cloud/iam/credentials/v1/internal/iam_credentials_stub_factory.h +++ b/google/cloud/iam/credentials/v1/internal/iam_credentials_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_credentials_v1_internal { @@ -35,9 +38,10 @@ std::shared_ptr CreateDefaultIAMCredentialsStub( Options const& options); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace iam_credentials_v1_internal } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_CREDENTIALS_V1_INTERNAL_IAM_CREDENTIALS_STUB_FACTORY_H diff --git a/google/cloud/iam/credentials/v1/internal/iam_credentials_tracing_connection.cc b/google/cloud/iam/credentials/v1/internal/iam_credentials_tracing_connection.cc index 893fc849e1dc4..07738af9cf7bd 100644 --- a/google/cloud/iam/credentials/v1/internal/iam_credentials_tracing_connection.cc +++ b/google/cloud/iam/credentials/v1/internal/iam_credentials_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace iam_credentials_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - IAMCredentialsTracingConnection::IAMCredentialsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -68,16 +66,12 @@ IAMCredentialsTracingConnection::SignJwt( return internal::EndSpan(*span, child_->SignJwt(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeIAMCredentialsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/iam/credentials/v1/internal/iam_credentials_tracing_connection.h b/google/cloud/iam/credentials/v1/internal/iam_credentials_tracing_connection.h index 43a8128ef65ea..06725a0a2269b 100644 --- a/google/cloud/iam/credentials/v1/internal/iam_credentials_tracing_connection.h +++ b/google/cloud/iam/credentials/v1/internal/iam_credentials_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace iam_credentials_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class IAMCredentialsTracingConnection : public iam_credentials_v1::IAMCredentialsConnection { public: @@ -59,8 +57,6 @@ class IAMCredentialsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * @@ -72,7 +68,6 @@ MakeIAMCredentialsTracingConnection( std::shared_ptr conn); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace iam_credentials_v1_internal } // namespace cloud } // namespace google diff --git a/google/cloud/iam/credentials/v1/internal/iam_credentials_tracing_stub.cc b/google/cloud/iam/credentials/v1/internal/iam_credentials_tracing_stub.cc index 58bf22013b352..bb68a4a689701 100644 --- a/google/cloud/iam/credentials/v1/internal/iam_credentials_tracing_stub.cc +++ b/google/cloud/iam/credentials/v1/internal/iam_credentials_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_credentials_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - IAMCredentialsTracingStub::IAMCredentialsTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -80,18 +81,14 @@ IAMCredentialsTracingStub::SignJwt( child_->SignJwt(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeIAMCredentialsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_credentials_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/credentials/v1/internal/iam_credentials_tracing_stub.h b/google/cloud/iam/credentials/v1/internal/iam_credentials_tracing_stub.h index 407510bda9ad9..08a39851062ad 100644 --- a/google/cloud/iam/credentials/v1/internal/iam_credentials_tracing_stub.h +++ b/google/cloud/iam/credentials/v1/internal/iam_credentials_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_credentials_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class IAMCredentialsTracingStub : public IAMCredentialsStub { public: ~IAMCredentialsTracingStub() override = default; @@ -63,8 +64,6 @@ class IAMCredentialsTracingStub : public IAMCredentialsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -75,9 +74,10 @@ std::shared_ptr MakeIAMCredentialsTracingStub( std::shared_ptr stub); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace iam_credentials_v1_internal } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_CREDENTIALS_V1_INTERNAL_IAM_CREDENTIALS_TRACING_STUB_H diff --git a/google/cloud/iam/iam_client.h b/google/cloud/iam/iam_client.h deleted file mode 100644 index 23d466ef181cf..0000000000000 --- a/google/cloud/iam/iam_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/iam/admin/v1/iam.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_CLIENT_H - -#include "google/cloud/iam/admin/v1/iam_client.h" -#include "google/cloud/iam/iam_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in iam_admin_v1 instead of the aliases defined in -/// this namespace. -namespace iam { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use iam_admin_v1::IAMClient directly. -using ::google::cloud::iam_admin_v1::IAMClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace iam -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_CLIENT_H diff --git a/google/cloud/iam/iam_connection.h b/google/cloud/iam/iam_connection.h deleted file mode 100644 index 7b9fa24f1d8c1..0000000000000 --- a/google/cloud/iam/iam_connection.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/iam/admin/v1/iam.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_CONNECTION_H - -#include "google/cloud/iam/admin/v1/iam_connection.h" -#include "google/cloud/iam/iam_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace iam { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use iam_admin_v1::MakeIAMConnection directly. -using ::google::cloud::iam_admin_v1::MakeIAMConnection; - -/// @deprecated Use iam_admin_v1::IAMConnection directly. -using ::google::cloud::iam_admin_v1::IAMConnection; - -/// @deprecated Use iam_admin_v1::IAMLimitedErrorCountRetryPolicy directly. -using ::google::cloud::iam_admin_v1::IAMLimitedErrorCountRetryPolicy; - -/// @deprecated Use iam_admin_v1::IAMLimitedTimeRetryPolicy directly. -using ::google::cloud::iam_admin_v1::IAMLimitedTimeRetryPolicy; - -/// @deprecated Use iam_admin_v1::IAMRetryPolicy directly. -using ::google::cloud::iam_admin_v1::IAMRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace iam -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_CONNECTION_H diff --git a/google/cloud/iam/iam_connection_idempotency_policy.h b/google/cloud/iam/iam_connection_idempotency_policy.h deleted file mode 100644 index b6fac9be2b1a4..0000000000000 --- a/google/cloud/iam/iam_connection_idempotency_policy.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/iam/admin/v1/iam.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/iam/admin/v1/iam_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace iam { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use iam_admin_v1::MakeDefaultIAMConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::iam_admin_v1::MakeDefaultIAMConnectionIdempotencyPolicy; - -/// @deprecated Use iam_admin_v1::IAMConnectionIdempotencyPolicy directly. -using ::google::cloud::iam_admin_v1::IAMConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace iam -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/iam/iam_credentials_client.h b/google/cloud/iam/iam_credentials_client.h deleted file mode 100644 index 58d28aeae891a..0000000000000 --- a/google/cloud/iam/iam_credentials_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/iam/credentials/v1/iamcredentials.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_CREDENTIALS_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_CREDENTIALS_CLIENT_H - -#include "google/cloud/iam/credentials/v1/iam_credentials_client.h" -#include "google/cloud/iam/iam_credentials_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in iam_credentials_v1 instead of the aliases defined in -/// this namespace. -namespace iam { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use iam_credentials_v1::IAMCredentialsClient directly. -using ::google::cloud::iam_credentials_v1::IAMCredentialsClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace iam -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_CREDENTIALS_CLIENT_H diff --git a/google/cloud/iam/iam_credentials_connection.h b/google/cloud/iam/iam_credentials_connection.h deleted file mode 100644 index 69c82ac73d1fb..0000000000000 --- a/google/cloud/iam/iam_credentials_connection.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/iam/credentials/v1/iamcredentials.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_CREDENTIALS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_CREDENTIALS_CONNECTION_H - -#include "google/cloud/iam/credentials/v1/iam_credentials_connection.h" -#include "google/cloud/iam/iam_credentials_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace iam { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use iam_credentials_v1::MakeIAMCredentialsConnection directly. -using ::google::cloud::iam_credentials_v1::MakeIAMCredentialsConnection; - -/// @deprecated Use iam_credentials_v1::IAMCredentialsConnection directly. -using ::google::cloud::iam_credentials_v1::IAMCredentialsConnection; - -/// @deprecated Use -/// iam_credentials_v1::IAMCredentialsLimitedErrorCountRetryPolicy directly. -using ::google::cloud::iam_credentials_v1:: - IAMCredentialsLimitedErrorCountRetryPolicy; - -/// @deprecated Use iam_credentials_v1::IAMCredentialsLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::iam_credentials_v1::IAMCredentialsLimitedTimeRetryPolicy; - -/// @deprecated Use iam_credentials_v1::IAMCredentialsRetryPolicy directly. -using ::google::cloud::iam_credentials_v1::IAMCredentialsRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace iam -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_CREDENTIALS_CONNECTION_H diff --git a/google/cloud/iam/iam_credentials_connection_idempotency_policy.h b/google/cloud/iam/iam_credentials_connection_idempotency_policy.h deleted file mode 100644 index 8e2bb6e032b7e..0000000000000 --- a/google/cloud/iam/iam_credentials_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/iam/credentials/v1/iamcredentials.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_CREDENTIALS_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_CREDENTIALS_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/iam/credentials/v1/iam_credentials_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace iam { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// iam_credentials_v1::MakeDefaultIAMCredentialsConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::iam_credentials_v1:: - MakeDefaultIAMCredentialsConnectionIdempotencyPolicy; - -/// @deprecated Use -/// iam_credentials_v1::IAMCredentialsConnectionIdempotencyPolicy directly. -using ::google::cloud::iam_credentials_v1:: - IAMCredentialsConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace iam -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_CREDENTIALS_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/iam/iam_credentials_options.h b/google/cloud/iam/iam_credentials_options.h deleted file mode 100644 index 349212e767b53..0000000000000 --- a/google/cloud/iam/iam_credentials_options.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/iam/credentials/v1/iamcredentials.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_CREDENTIALS_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_CREDENTIALS_OPTIONS_H - -#include "google/cloud/iam/credentials/v1/iam_credentials_options.h" -#include "google/cloud/iam/iam_credentials_connection.h" -#include "google/cloud/iam/iam_credentials_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace iam { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use iam_credentials_v1::IAMCredentialsBackoffPolicyOption -/// directly. -using ::google::cloud::iam_credentials_v1::IAMCredentialsBackoffPolicyOption; - -/// @deprecated Use -/// iam_credentials_v1::IAMCredentialsConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::iam_credentials_v1:: - IAMCredentialsConnectionIdempotencyPolicyOption; - -/// @deprecated Use iam_credentials_v1::IAMCredentialsPolicyOptionList directly. -using ::google::cloud::iam_credentials_v1::IAMCredentialsPolicyOptionList; - -/// @deprecated Use iam_credentials_v1::IAMCredentialsRetryPolicyOption -/// directly. -using ::google::cloud::iam_credentials_v1::IAMCredentialsRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace iam -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_CREDENTIALS_OPTIONS_H diff --git a/google/cloud/iam/iam_options.h b/google/cloud/iam/iam_options.h deleted file mode 100644 index 62308f44db96c..0000000000000 --- a/google/cloud/iam/iam_options.h +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/iam/admin/v1/iam.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_OPTIONS_H - -#include "google/cloud/iam/admin/v1/iam_options.h" -#include "google/cloud/iam/iam_connection.h" -#include "google/cloud/iam/iam_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace iam { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use iam_admin_v1::IAMBackoffPolicyOption directly. -using ::google::cloud::iam_admin_v1::IAMBackoffPolicyOption; - -/// @deprecated Use iam_admin_v1::IAMConnectionIdempotencyPolicyOption directly. -using ::google::cloud::iam_admin_v1::IAMConnectionIdempotencyPolicyOption; - -/// @deprecated Use iam_admin_v1::IAMPolicyOptionList directly. -using ::google::cloud::iam_admin_v1::IAMPolicyOptionList; - -/// @deprecated Use iam_admin_v1::IAMRetryPolicyOption directly. -using ::google::cloud::iam_admin_v1::IAMRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace iam -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_OPTIONS_H diff --git a/google/cloud/iam/iam_policy_client.h b/google/cloud/iam/iam_policy_client.h deleted file mode 100644 index 6f0c8d00d998c..0000000000000 --- a/google/cloud/iam/iam_policy_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/iam/v1/iam_policy.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_POLICY_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_POLICY_CLIENT_H - -#include "google/cloud/iam/iam_policy_connection.h" -#include "google/cloud/iam/v1/iam_policy_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in iam_v1 instead of the aliases defined in -/// this namespace. -namespace iam { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use iam_v1::IAMPolicyClient directly. -using ::google::cloud::iam_v1::IAMPolicyClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace iam -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_POLICY_CLIENT_H diff --git a/google/cloud/iam/iam_policy_connection.h b/google/cloud/iam/iam_policy_connection.h deleted file mode 100644 index 96c252989d305..0000000000000 --- a/google/cloud/iam/iam_policy_connection.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/iam/v1/iam_policy.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_POLICY_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_POLICY_CONNECTION_H - -#include "google/cloud/iam/iam_policy_connection_idempotency_policy.h" -#include "google/cloud/iam/v1/iam_policy_connection.h" - -namespace google { -namespace cloud { -namespace iam { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use iam_v1::MakeIAMPolicyConnection directly. -using ::google::cloud::iam_v1::MakeIAMPolicyConnection; - -/// @deprecated Use iam_v1::IAMPolicyConnection directly. -using ::google::cloud::iam_v1::IAMPolicyConnection; - -/// @deprecated Use iam_v1::IAMPolicyLimitedErrorCountRetryPolicy directly. -using ::google::cloud::iam_v1::IAMPolicyLimitedErrorCountRetryPolicy; - -/// @deprecated Use iam_v1::IAMPolicyLimitedTimeRetryPolicy directly. -using ::google::cloud::iam_v1::IAMPolicyLimitedTimeRetryPolicy; - -/// @deprecated Use iam_v1::IAMPolicyRetryPolicy directly. -using ::google::cloud::iam_v1::IAMPolicyRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace iam -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_POLICY_CONNECTION_H diff --git a/google/cloud/iam/iam_policy_connection_idempotency_policy.h b/google/cloud/iam/iam_policy_connection_idempotency_policy.h deleted file mode 100644 index 2b379ec37eea9..0000000000000 --- a/google/cloud/iam/iam_policy_connection_idempotency_policy.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/iam/v1/iam_policy.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_POLICY_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_POLICY_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/iam/v1/iam_policy_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace iam { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use iam_v1::MakeDefaultIAMPolicyConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::iam_v1::MakeDefaultIAMPolicyConnectionIdempotencyPolicy; - -/// @deprecated Use iam_v1::IAMPolicyConnectionIdempotencyPolicy directly. -using ::google::cloud::iam_v1::IAMPolicyConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace iam -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_POLICY_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/iam/iam_policy_options.h b/google/cloud/iam/iam_policy_options.h deleted file mode 100644 index d0e82715d2e5e..0000000000000 --- a/google/cloud/iam/iam_policy_options.h +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/iam/v1/iam_policy.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_POLICY_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_POLICY_OPTIONS_H - -#include "google/cloud/iam/iam_policy_connection.h" -#include "google/cloud/iam/iam_policy_connection_idempotency_policy.h" -#include "google/cloud/iam/v1/iam_policy_options.h" - -namespace google { -namespace cloud { -namespace iam { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use iam_v1::IAMPolicyBackoffPolicyOption directly. -using ::google::cloud::iam_v1::IAMPolicyBackoffPolicyOption; - -/// @deprecated Use iam_v1::IAMPolicyConnectionIdempotencyPolicyOption directly. -using ::google::cloud::iam_v1::IAMPolicyConnectionIdempotencyPolicyOption; - -/// @deprecated Use iam_v1::IAMPolicyPolicyOptionList directly. -using ::google::cloud::iam_v1::IAMPolicyPolicyOptionList; - -/// @deprecated Use iam_v1::IAMPolicyRetryPolicyOption directly. -using ::google::cloud::iam_v1::IAMPolicyRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace iam -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_IAM_POLICY_OPTIONS_H diff --git a/google/cloud/iam/mocks/mock_iam_connection.h b/google/cloud/iam/mocks/mock_iam_connection.h deleted file mode 100644 index df785c272b924..0000000000000 --- a/google/cloud/iam/mocks/mock_iam_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/iam/admin/v1/iam.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_MOCKS_MOCK_IAM_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_MOCKS_MOCK_IAM_CONNECTION_H - -#include "google/cloud/iam/admin/v1/mocks/mock_iam_connection.h" -#include "google/cloud/iam/iam_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in iam_admin_v1_mocks instead of the aliases -/// defined in this namespace. -namespace iam_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use iam_admin_v1_mocks::MockIAMConnection directly. -using ::google::cloud::iam_admin_v1_mocks::MockIAMConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace iam_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_MOCKS_MOCK_IAM_CONNECTION_H diff --git a/google/cloud/iam/mocks/mock_iam_credentials_connection.h b/google/cloud/iam/mocks/mock_iam_credentials_connection.h deleted file mode 100644 index 64f3534d55567..0000000000000 --- a/google/cloud/iam/mocks/mock_iam_credentials_connection.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/iam/credentials/v1/iamcredentials.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_MOCKS_MOCK_IAM_CREDENTIALS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_MOCKS_MOCK_IAM_CREDENTIALS_CONNECTION_H - -#include "google/cloud/iam/credentials/v1/mocks/mock_iam_credentials_connection.h" -#include "google/cloud/iam/iam_credentials_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in iam_credentials_v1_mocks instead of the aliases -/// defined in this namespace. -namespace iam_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use iam_credentials_v1_mocks::MockIAMCredentialsConnection -/// directly. -using ::google::cloud::iam_credentials_v1_mocks::MockIAMCredentialsConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace iam_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_MOCKS_MOCK_IAM_CREDENTIALS_CONNECTION_H diff --git a/google/cloud/iam/mocks/mock_iam_policy_connection.h b/google/cloud/iam/mocks/mock_iam_policy_connection.h deleted file mode 100644 index cb6d8120d8548..0000000000000 --- a/google/cloud/iam/mocks/mock_iam_policy_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/iam/v1/iam_policy.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_MOCKS_MOCK_IAM_POLICY_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_MOCKS_MOCK_IAM_POLICY_CONNECTION_H - -#include "google/cloud/iam/iam_policy_connection.h" -#include "google/cloud/iam/v1/mocks/mock_iam_policy_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in iam_v1_mocks instead of the aliases -/// defined in this namespace. -namespace iam_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use iam_v1_mocks::MockIAMPolicyConnection directly. -using ::google::cloud::iam_v1_mocks::MockIAMPolicyConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace iam_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_MOCKS_MOCK_IAM_POLICY_CONNECTION_H diff --git a/google/cloud/iam/quickstart/.bazelrc b/google/cloud/iam/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/iam/quickstart/.bazelrc +++ b/google/cloud/iam/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/iam/quickstart/CMakeLists.txt b/google/cloud/iam/quickstart/CMakeLists.txt index 583ca86facafc..8c2092d92cc0f 100644 --- a/google/cloud/iam/quickstart/CMakeLists.txt +++ b/google/cloud/iam/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # A minimal CMakeList.txt showing how to use the Cloud IAM C++ client library in # CMake-based projects. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-iam-quickstart CXX) find_package(google_cloud_cpp_iam REQUIRED) diff --git a/google/cloud/iam/retry_traits.h b/google/cloud/iam/retry_traits.h deleted file mode 100644 index 963f4491785b5..0000000000000 --- a/google/cloud/iam/retry_traits.h +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_RETRY_TRAITS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_RETRY_TRAITS_H - -#include "google/cloud/iam/admin/v1/internal/iam_retry_traits.h" -#include "google/cloud/iam/credentials/v1/internal/iam_credentials_retry_traits.h" -#warning "This header is deprecated, it only provided internal symbols" - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_RETRY_TRAITS_H diff --git a/google/cloud/iam/samples/iam_credentials_samples.cc b/google/cloud/iam/samples/iam_credentials_samples.cc index b56f1b283604b..d6ad38ccb5f3f 100644 --- a/google/cloud/iam/samples/iam_credentials_samples.cc +++ b/google/cloud/iam/samples/iam_credentials_samples.cc @@ -13,9 +13,9 @@ // limitations under the License. #include "google/cloud/iam/credentials/v1/iam_credentials_client.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/testing_util/example_driver.h" +#include "absl/strings/str_cat.h" namespace { diff --git a/google/cloud/iam/samples/iam_samples.cc b/google/cloud/iam/samples/iam_samples.cc index 1d2e19e179c02..893caecca0a9c 100644 --- a/google/cloud/iam/samples/iam_samples.cc +++ b/google/cloud/iam/samples/iam_samples.cc @@ -13,10 +13,10 @@ // limitations under the License. #include "google/cloud/iam/admin/v1/iam_client.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/internal/random.h" #include "google/cloud/testing_util/example_driver.h" +#include "absl/strings/str_cat.h" #include "absl/time/clock.h" #include "absl/time/time.h" #include diff --git a/google/cloud/iam/v1/iam_policy_connection.h b/google/cloud/iam/v1/iam_policy_connection.h index 80a1fca3574c4..05f4cb6d5f835 100644 --- a/google/cloud/iam/v1/iam_policy_connection.h +++ b/google/cloud/iam/v1/iam_policy_connection.h @@ -26,7 +26,7 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/iam/v1/iam_policy.pb.h" #include namespace google { diff --git a/google/cloud/iam/v1/iam_policy_connection_idempotency_policy.h b/google/cloud/iam/v1/iam_policy_connection_idempotency_policy.h index fb699a0001edb..e945d69feb8a8 100644 --- a/google/cloud/iam/v1/iam_policy_connection_idempotency_policy.h +++ b/google/cloud/iam/v1/iam_policy_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" #include namespace google { diff --git a/google/cloud/iam/v1/internal/iam_policy_auth_decorator.cc b/google/cloud/iam/v1/internal/iam_policy_auth_decorator.cc index 132c820ef4348..54502b88735c7 100644 --- a/google/cloud/iam/v1/internal/iam_policy_auth_decorator.cc +++ b/google/cloud/iam/v1/internal/iam_policy_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/iam/v1/iam_policy.proto #include "google/cloud/iam/v1/internal/iam_policy_auth_decorator.h" -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v1_internal { @@ -60,3 +63,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/v1/internal/iam_policy_auth_decorator.h b/google/cloud/iam/v1/internal/iam_policy_auth_decorator.h index 322ebc99b922d..f8c7f9bbfd938 100644 --- a/google/cloud/iam/v1/internal/iam_policy_auth_decorator.h +++ b/google/cloud/iam/v1/internal/iam_policy_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v1_internal { @@ -60,4 +63,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_V1_INTERNAL_IAM_POLICY_AUTH_DECORATOR_H diff --git a/google/cloud/iam/v1/internal/iam_policy_logging_decorator.cc b/google/cloud/iam/v1/internal/iam_policy_logging_decorator.cc index 329bb9e72bcf5..bbd5b1d3ceb50 100644 --- a/google/cloud/iam/v1/internal/iam_policy_logging_decorator.cc +++ b/google/cloud/iam/v1/internal/iam_policy_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/iam/v1/internal/iam_policy_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v1_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/v1/internal/iam_policy_logging_decorator.h b/google/cloud/iam/v1/internal/iam_policy_logging_decorator.h index c3b77a56bbe06..e52dc804dcfba 100644 --- a/google/cloud/iam/v1/internal/iam_policy_logging_decorator.h +++ b/google/cloud/iam/v1/internal/iam_policy_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v1_internal { @@ -60,4 +63,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_V1_INTERNAL_IAM_POLICY_LOGGING_DECORATOR_H diff --git a/google/cloud/iam/v1/internal/iam_policy_metadata_decorator.cc b/google/cloud/iam/v1/internal/iam_policy_metadata_decorator.cc index 298becde94ff8..d3a49292f049b 100644 --- a/google/cloud/iam/v1/internal/iam_policy_metadata_decorator.cc +++ b/google/cloud/iam/v1/internal/iam_policy_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/iam/v1/internal/iam_policy_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/iam/v1/iam_policy.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v1_internal { @@ -89,3 +93,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/v1/internal/iam_policy_metadata_decorator.h b/google/cloud/iam/v1/internal/iam_policy_metadata_decorator.h index ed5b417222335..82320aea07f8b 100644 --- a/google/cloud/iam/v1/internal/iam_policy_metadata_decorator.h +++ b/google/cloud/iam/v1/internal/iam_policy_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v1_internal { @@ -65,4 +68,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_V1_INTERNAL_IAM_POLICY_METADATA_DECORATOR_H diff --git a/google/cloud/iam/v1/internal/iam_policy_option_defaults.cc b/google/cloud/iam/v1/internal/iam_policy_option_defaults.cc index f9ef336571308..97b3593a18342 100644 --- a/google/cloud/iam/v1/internal/iam_policy_option_defaults.cc +++ b/google/cloud/iam/v1/internal/iam_policy_option_defaults.cc @@ -40,7 +40,7 @@ Options IAMPolicyDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - iam_v1::IAMPolicyLimitedTimeRetryPolicy(std::chrono::minutes(30)) + iam_v1::IAMPolicyLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/iam/v1/internal/iam_policy_stub.cc b/google/cloud/iam/v1/internal/iam_policy_stub.cc index c8dd08d63e973..2341d87bda527 100644 --- a/google/cloud/iam/v1/internal/iam_policy_stub.cc +++ b/google/cloud/iam/v1/internal/iam_policy_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/iam/v1/internal/iam_policy_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v1_internal { @@ -68,3 +71,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/v1/internal/iam_policy_stub.h b/google/cloud/iam/v1/internal/iam_policy_stub.h index 84764974b5d0b..9bc43fd7e405e 100644 --- a/google/cloud/iam/v1/internal/iam_policy_stub.h +++ b/google/cloud/iam/v1/internal/iam_policy_stub.h @@ -22,10 +22,13 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v1_internal { @@ -76,4 +79,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_V1_INTERNAL_IAM_POLICY_STUB_H diff --git a/google/cloud/iam/v1/internal/iam_policy_stub_factory.cc b/google/cloud/iam/v1/internal/iam_policy_stub_factory.cc index d8e33dfbb4861..d9f11a285d937 100644 --- a/google/cloud/iam/v1/internal/iam_policy_stub_factory.cc +++ b/google/cloud/iam/v1/internal/iam_policy_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v1_internal { @@ -67,3 +70,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/v1/internal/iam_policy_stub_factory.h b/google/cloud/iam/v1/internal/iam_policy_stub_factory.h index 4882001fc4f7f..99232115d3b4b 100644 --- a/google/cloud/iam/v1/internal/iam_policy_stub_factory.h +++ b/google/cloud/iam/v1/internal/iam_policy_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_V1_INTERNAL_IAM_POLICY_STUB_FACTORY_H diff --git a/google/cloud/iam/v1/internal/iam_policy_tracing_connection.cc b/google/cloud/iam/v1/internal/iam_policy_tracing_connection.cc index ec90d506736e5..80444fd03ef50 100644 --- a/google/cloud/iam/v1/internal/iam_policy_tracing_connection.cc +++ b/google/cloud/iam/v1/internal/iam_policy_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace iam_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - IAMPolicyTracingConnection::IAMPolicyTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -55,15 +53,11 @@ IAMPolicyTracingConnection::TestIamPermissions( return internal::EndSpan(*span, child_->TestIamPermissions(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeIAMPolicyTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/iam/v1/internal/iam_policy_tracing_connection.h b/google/cloud/iam/v1/internal/iam_policy_tracing_connection.h index 4ee8c9154e52b..0dd3009b0f3ec 100644 --- a/google/cloud/iam/v1/internal/iam_policy_tracing_connection.h +++ b/google/cloud/iam/v1/internal/iam_policy_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace iam_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class IAMPolicyTracingConnection : public iam_v1::IAMPolicyConnection { public: ~IAMPolicyTracingConnection() override = default; @@ -52,8 +50,6 @@ class IAMPolicyTracingConnection : public iam_v1::IAMPolicyConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/iam/v1/internal/iam_policy_tracing_stub.cc b/google/cloud/iam/v1/internal/iam_policy_tracing_stub.cc index 6e7c73b747951..827df9ecc59f0 100644 --- a/google/cloud/iam/v1/internal/iam_policy_tracing_stub.cc +++ b/google/cloud/iam/v1/internal/iam_policy_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - IAMPolicyTracingStub::IAMPolicyTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -63,18 +64,14 @@ IAMPolicyTracingStub::TestIamPermissions( context, *span, child_->TestIamPermissions(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeIAMPolicyTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/v1/internal/iam_policy_tracing_stub.h b/google/cloud/iam/v1/internal/iam_policy_tracing_stub.h index 5305c06757ad2..d0b5b47a095e3 100644 --- a/google/cloud/iam/v1/internal/iam_policy_tracing_stub.h +++ b/google/cloud/iam/v1/internal/iam_policy_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class IAMPolicyTracingStub : public IAMPolicyStub { public: ~IAMPolicyTracingStub() override = default; @@ -56,8 +57,6 @@ class IAMPolicyTracingStub : public IAMPolicyStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -72,4 +71,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_V1_INTERNAL_IAM_POLICY_TRACING_STUB_H diff --git a/google/cloud/iam/v2/internal/policies_auth_decorator.cc b/google/cloud/iam/v2/internal/policies_auth_decorator.cc index af9f6d2f7218c..051ca906fc31a 100644 --- a/google/cloud/iam/v2/internal/policies_auth_decorator.cc +++ b/google/cloud/iam/v2/internal/policies_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/iam/v2/policy.proto #include "google/cloud/iam/v2/internal/policies_auth_decorator.h" -#include +#include "google/iam/v2/policy.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v2_internal { @@ -179,3 +182,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/v2/internal/policies_auth_decorator.h b/google/cloud/iam/v2/internal/policies_auth_decorator.h index a17107127e74e..46bf0587f1b5f 100644 --- a/google/cloud/iam/v2/internal/policies_auth_decorator.h +++ b/google/cloud/iam/v2/internal/policies_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/iam/v2/internal/policies_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v2_internal { @@ -103,4 +106,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_V2_INTERNAL_POLICIES_AUTH_DECORATOR_H diff --git a/google/cloud/iam/v2/internal/policies_connection_impl.h b/google/cloud/iam/v2/internal/policies_connection_impl.h index e8359f1e3cf05..392ac6cb99e37 100644 --- a/google/cloud/iam/v2/internal/policies_connection_impl.h +++ b/google/cloud/iam/v2/internal/policies_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/iam/v2/internal/policies_logging_decorator.cc b/google/cloud/iam/v2/internal/policies_logging_decorator.cc index f2089d6ea058f..dbd1fc338629e 100644 --- a/google/cloud/iam/v2/internal/policies_logging_decorator.cc +++ b/google/cloud/iam/v2/internal/policies_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/iam/v2/internal/policies_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/iam/v2/policy.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v2_internal { @@ -194,3 +197,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/v2/internal/policies_logging_decorator.h b/google/cloud/iam/v2/internal/policies_logging_decorator.h index 20aaaee39f299..f450cca2cd3f5 100644 --- a/google/cloud/iam/v2/internal/policies_logging_decorator.h +++ b/google/cloud/iam/v2/internal/policies_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/iam/v2/internal/policies_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v2_internal { @@ -103,4 +106,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_V2_INTERNAL_POLICIES_LOGGING_DECORATOR_H diff --git a/google/cloud/iam/v2/internal/policies_metadata_decorator.cc b/google/cloud/iam/v2/internal/policies_metadata_decorator.cc index b2e38d4e46d44..9fc80e16dccba 100644 --- a/google/cloud/iam/v2/internal/policies_metadata_decorator.cc +++ b/google/cloud/iam/v2/internal/policies_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/iam/v2/internal/policies_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/iam/v2/policy.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v2_internal { @@ -170,3 +174,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/v2/internal/policies_metadata_decorator.h b/google/cloud/iam/v2/internal/policies_metadata_decorator.h index 3144b3f5ddd6b..282d51602ffa7 100644 --- a/google/cloud/iam/v2/internal/policies_metadata_decorator.h +++ b/google/cloud/iam/v2/internal/policies_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/iam/v2/internal/policies_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v2_internal { @@ -108,4 +111,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_V2_INTERNAL_POLICIES_METADATA_DECORATOR_H diff --git a/google/cloud/iam/v2/internal/policies_option_defaults.cc b/google/cloud/iam/v2/internal/policies_option_defaults.cc index b673c6db3267b..c676aeecfec69 100644 --- a/google/cloud/iam/v2/internal/policies_option_defaults.cc +++ b/google/cloud/iam/v2/internal/policies_option_defaults.cc @@ -40,7 +40,7 @@ Options PoliciesDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - iam_v2::PoliciesLimitedTimeRetryPolicy(std::chrono::minutes(30)) + iam_v2::PoliciesLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/iam/v2/internal/policies_stub.cc b/google/cloud/iam/v2/internal/policies_stub.cc index 868fefa73c4da..90bad90682859 100644 --- a/google/cloud/iam/v2/internal/policies_stub.cc +++ b/google/cloud/iam/v2/internal/policies_stub.cc @@ -19,11 +19,14 @@ #include "google/cloud/iam/v2/internal/policies_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/iam/v2/policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v2_internal { @@ -192,3 +195,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/v2/internal/policies_stub.h b/google/cloud/iam/v2/internal/policies_stub.h index 2d472fe15ddf5..ed967e6470e95 100644 --- a/google/cloud/iam/v2/internal/policies_stub.h +++ b/google/cloud/iam/v2/internal/policies_stub.h @@ -24,11 +24,14 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/iam/v2/policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v2_internal { @@ -167,4 +170,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_V2_INTERNAL_POLICIES_STUB_H diff --git a/google/cloud/iam/v2/internal/policies_stub_factory.cc b/google/cloud/iam/v2/internal/policies_stub_factory.cc index 9c17295d5b073..cfc9fa8c00031 100644 --- a/google/cloud/iam/v2/internal/policies_stub_factory.cc +++ b/google/cloud/iam/v2/internal/policies_stub_factory.cc @@ -28,11 +28,14 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/iam/v2/policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v2_internal { @@ -69,3 +72,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/v2/internal/policies_stub_factory.h b/google/cloud/iam/v2/internal/policies_stub_factory.h index 398b6b3d2fa5f..bc5bb338a6e2c 100644 --- a/google/cloud/iam/v2/internal/policies_stub_factory.h +++ b/google/cloud/iam/v2/internal/policies_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_V2_INTERNAL_POLICIES_STUB_FACTORY_H diff --git a/google/cloud/iam/v2/internal/policies_tracing_connection.cc b/google/cloud/iam/v2/internal/policies_tracing_connection.cc index 82c488c45ec00..ef87c14d40bc3 100644 --- a/google/cloud/iam/v2/internal/policies_tracing_connection.cc +++ b/google/cloud/iam/v2/internal/policies_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace iam_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PoliciesTracingConnection::PoliciesTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -129,15 +127,11 @@ PoliciesTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePoliciesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/iam/v2/internal/policies_tracing_connection.h b/google/cloud/iam/v2/internal/policies_tracing_connection.h index 8f7c74bd5a0c1..84adf255cdc53 100644 --- a/google/cloud/iam/v2/internal/policies_tracing_connection.h +++ b/google/cloud/iam/v2/internal/policies_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace iam_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PoliciesTracingConnection : public iam_v2::PoliciesConnection { public: ~PoliciesTracingConnection() override = default; @@ -79,8 +77,6 @@ class PoliciesTracingConnection : public iam_v2::PoliciesConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/iam/v2/internal/policies_tracing_stub.cc b/google/cloud/iam/v2/internal/policies_tracing_stub.cc index bfc1c57ce57d8..a21db44803a55 100644 --- a/google/cloud/iam/v2/internal/policies_tracing_stub.cc +++ b/google/cloud/iam/v2/internal/policies_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PoliciesTracingStub::PoliciesTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -159,18 +160,14 @@ future PoliciesTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePoliciesTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/v2/internal/policies_tracing_stub.h b/google/cloud/iam/v2/internal/policies_tracing_stub.h index 90b49071b1f8d..e7ef9d3afce04 100644 --- a/google/cloud/iam/v2/internal/policies_tracing_stub.h +++ b/google/cloud/iam/v2/internal/policies_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PoliciesTracingStub : public PoliciesStub { public: ~PoliciesTracingStub() override = default; @@ -98,8 +99,6 @@ class PoliciesTracingStub : public PoliciesStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -114,4 +113,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_V2_INTERNAL_POLICIES_TRACING_STUB_H diff --git a/google/cloud/iam/v2/policies_client.h b/google/cloud/iam/v2/policies_client.h index d536953120891..73a52a72362d9 100644 --- a/google/cloud/iam/v2/policies_client.h +++ b/google/cloud/iam/v2/policies_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/iam/v2/policies_connection.h b/google/cloud/iam/v2/policies_connection.h index fe20aec0e7c99..f01f20979d336 100644 --- a/google/cloud/iam/v2/policies_connection.h +++ b/google/cloud/iam/v2/policies_connection.h @@ -30,8 +30,8 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/iam/v2/policy.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/iam/v2/policies_connection_idempotency_policy.h b/google/cloud/iam/v2/policies_connection_idempotency_policy.h index 611fc49d61c21..e033ae9445c3b 100644 --- a/google/cloud/iam/v2/policies_connection_idempotency_policy.h +++ b/google/cloud/iam/v2/policies_connection_idempotency_policy.h @@ -21,8 +21,8 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/iam/v2/policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/iam/v3/internal/policy_bindings_auth_decorator.cc b/google/cloud/iam/v3/internal/policy_bindings_auth_decorator.cc index 21f2cf5984a01..6932ad1e223e6 100644 --- a/google/cloud/iam/v3/internal/policy_bindings_auth_decorator.cc +++ b/google/cloud/iam/v3/internal/policy_bindings_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/iam/v3/policy_bindings_service.proto #include "google/cloud/iam/v3/internal/policy_bindings_auth_decorator.h" -#include +#include "google/iam/v3/policy_bindings_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v3_internal { @@ -192,3 +195,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/v3/internal/policy_bindings_auth_decorator.h b/google/cloud/iam/v3/internal/policy_bindings_auth_decorator.h index d93b241d9d2f7..f68073f0ce31d 100644 --- a/google/cloud/iam/v3/internal/policy_bindings_auth_decorator.h +++ b/google/cloud/iam/v3/internal/policy_bindings_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/iam/v3/internal/policy_bindings_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v3_internal { @@ -109,4 +112,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_V3_INTERNAL_POLICY_BINDINGS_AUTH_DECORATOR_H diff --git a/google/cloud/iam/v3/internal/policy_bindings_connection_impl.h b/google/cloud/iam/v3/internal/policy_bindings_connection_impl.h index 6e1d75d0e0506..1dbb6004dcfe4 100644 --- a/google/cloud/iam/v3/internal/policy_bindings_connection_impl.h +++ b/google/cloud/iam/v3/internal/policy_bindings_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/iam/v3/internal/policy_bindings_logging_decorator.cc b/google/cloud/iam/v3/internal/policy_bindings_logging_decorator.cc index 19e38541dba59..86168722d0336 100644 --- a/google/cloud/iam/v3/internal/policy_bindings_logging_decorator.cc +++ b/google/cloud/iam/v3/internal/policy_bindings_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/iam/v3/internal/policy_bindings_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/iam/v3/policy_bindings_service.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v3_internal { @@ -212,3 +215,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/v3/internal/policy_bindings_logging_decorator.h b/google/cloud/iam/v3/internal/policy_bindings_logging_decorator.h index f7d48ec1bd76d..3849f72624af1 100644 --- a/google/cloud/iam/v3/internal/policy_bindings_logging_decorator.h +++ b/google/cloud/iam/v3/internal/policy_bindings_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/iam/v3/internal/policy_bindings_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v3_internal { @@ -109,4 +112,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_V3_INTERNAL_POLICY_BINDINGS_LOGGING_DECORATOR_H diff --git a/google/cloud/iam/v3/internal/policy_bindings_metadata_decorator.cc b/google/cloud/iam/v3/internal/policy_bindings_metadata_decorator.cc index ec19246c0cf40..7830fc0e30be3 100644 --- a/google/cloud/iam/v3/internal/policy_bindings_metadata_decorator.cc +++ b/google/cloud/iam/v3/internal/policy_bindings_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/iam/v3/internal/policy_bindings_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/iam/v3/policy_bindings_service.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v3_internal { @@ -186,3 +190,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/v3/internal/policy_bindings_metadata_decorator.h b/google/cloud/iam/v3/internal/policy_bindings_metadata_decorator.h index 3ccd82185f4aa..155f1e550cdd7 100644 --- a/google/cloud/iam/v3/internal/policy_bindings_metadata_decorator.h +++ b/google/cloud/iam/v3/internal/policy_bindings_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/iam/v3/internal/policy_bindings_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v3_internal { @@ -114,4 +117,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_V3_INTERNAL_POLICY_BINDINGS_METADATA_DECORATOR_H diff --git a/google/cloud/iam/v3/internal/policy_bindings_option_defaults.cc b/google/cloud/iam/v3/internal/policy_bindings_option_defaults.cc index 67f08d3892321..7630cdf4b3921 100644 --- a/google/cloud/iam/v3/internal/policy_bindings_option_defaults.cc +++ b/google/cloud/iam/v3/internal/policy_bindings_option_defaults.cc @@ -40,7 +40,7 @@ Options PolicyBindingsDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - iam_v3::PolicyBindingsLimitedTimeRetryPolicy(std::chrono::minutes(30)) + iam_v3::PolicyBindingsLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/iam/v3/internal/policy_bindings_stub.cc b/google/cloud/iam/v3/internal/policy_bindings_stub.cc index 625aab21a7f23..cab7623b00edc 100644 --- a/google/cloud/iam/v3/internal/policy_bindings_stub.cc +++ b/google/cloud/iam/v3/internal/policy_bindings_stub.cc @@ -19,11 +19,14 @@ #include "google/cloud/iam/v3/internal/policy_bindings_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/iam/v3/policy_bindings_service.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v3_internal { @@ -210,3 +213,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/v3/internal/policy_bindings_stub.h b/google/cloud/iam/v3/internal/policy_bindings_stub.h index 8ba9339dd6f54..bd63096c3cdfa 100644 --- a/google/cloud/iam/v3/internal/policy_bindings_stub.h +++ b/google/cloud/iam/v3/internal/policy_bindings_stub.h @@ -24,11 +24,14 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/iam/v3/policy_bindings_service.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v3_internal { @@ -182,4 +185,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_V3_INTERNAL_POLICY_BINDINGS_STUB_H diff --git a/google/cloud/iam/v3/internal/policy_bindings_stub_factory.cc b/google/cloud/iam/v3/internal/policy_bindings_stub_factory.cc index 8a67bad0d46a4..49c987c9bc3c2 100644 --- a/google/cloud/iam/v3/internal/policy_bindings_stub_factory.cc +++ b/google/cloud/iam/v3/internal/policy_bindings_stub_factory.cc @@ -28,11 +28,14 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/iam/v3/policy_bindings_service.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v3_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/v3/internal/policy_bindings_stub_factory.h b/google/cloud/iam/v3/internal/policy_bindings_stub_factory.h index ca261b13e60e2..7c98ccae28a15 100644 --- a/google/cloud/iam/v3/internal/policy_bindings_stub_factory.h +++ b/google/cloud/iam/v3/internal/policy_bindings_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v3_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_V3_INTERNAL_POLICY_BINDINGS_STUB_FACTORY_H diff --git a/google/cloud/iam/v3/internal/policy_bindings_tracing_connection.cc b/google/cloud/iam/v3/internal/policy_bindings_tracing_connection.cc index f587893f2dee4..d2739fd32c860 100644 --- a/google/cloud/iam/v3/internal/policy_bindings_tracing_connection.cc +++ b/google/cloud/iam/v3/internal/policy_bindings_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace iam_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PolicyBindingsTracingConnection::PolicyBindingsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -163,16 +161,12 @@ PolicyBindingsTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePolicyBindingsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/iam/v3/internal/policy_bindings_tracing_connection.h b/google/cloud/iam/v3/internal/policy_bindings_tracing_connection.h index 8733c0aa3fbd2..3b83b6d1f523d 100644 --- a/google/cloud/iam/v3/internal/policy_bindings_tracing_connection.h +++ b/google/cloud/iam/v3/internal/policy_bindings_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace iam_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PolicyBindingsTracingConnection : public iam_v3::PolicyBindingsConnection { public: @@ -86,8 +84,6 @@ class PolicyBindingsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/iam/v3/internal/policy_bindings_tracing_stub.cc b/google/cloud/iam/v3/internal/policy_bindings_tracing_stub.cc index e0d6e3a47acf8..278c296054f78 100644 --- a/google/cloud/iam/v3/internal/policy_bindings_tracing_stub.cc +++ b/google/cloud/iam/v3/internal/policy_bindings_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PolicyBindingsTracingStub::PolicyBindingsTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -190,18 +191,14 @@ future PolicyBindingsTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePolicyBindingsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/v3/internal/policy_bindings_tracing_stub.h b/google/cloud/iam/v3/internal/policy_bindings_tracing_stub.h index 69d89d0bb9665..c277c309ef10d 100644 --- a/google/cloud/iam/v3/internal/policy_bindings_tracing_stub.h +++ b/google/cloud/iam/v3/internal/policy_bindings_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PolicyBindingsTracingStub : public PolicyBindingsStub { public: ~PolicyBindingsTracingStub() override = default; @@ -104,8 +105,6 @@ class PolicyBindingsTracingStub : public PolicyBindingsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -120,4 +119,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_V3_INTERNAL_POLICY_BINDINGS_TRACING_STUB_H diff --git a/google/cloud/iam/v3/internal/principal_access_boundary_policies_auth_decorator.cc b/google/cloud/iam/v3/internal/principal_access_boundary_policies_auth_decorator.cc index 67a5e835c3835..fa43fdfbcc83e 100644 --- a/google/cloud/iam/v3/internal/principal_access_boundary_policies_auth_decorator.cc +++ b/google/cloud/iam/v3/internal/principal_access_boundary_policies_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/iam/v3/principal_access_boundary_policies_service.proto #include "google/cloud/iam/v3/internal/principal_access_boundary_policies_auth_decorator.h" -#include +#include "google/iam/v3/principal_access_boundary_policies_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v3_internal { @@ -204,3 +207,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/v3/internal/principal_access_boundary_policies_auth_decorator.h b/google/cloud/iam/v3/internal/principal_access_boundary_policies_auth_decorator.h index 5afdb6b511a8f..a65defead176b 100644 --- a/google/cloud/iam/v3/internal/principal_access_boundary_policies_auth_decorator.h +++ b/google/cloud/iam/v3/internal/principal_access_boundary_policies_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/iam/v3/internal/principal_access_boundary_policies_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v3_internal { @@ -123,4 +126,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_V3_INTERNAL_PRINCIPAL_ACCESS_BOUNDARY_POLICIES_AUTH_DECORATOR_H diff --git a/google/cloud/iam/v3/internal/principal_access_boundary_policies_connection_impl.h b/google/cloud/iam/v3/internal/principal_access_boundary_policies_connection_impl.h index 10cb8c364979d..ea0a2b6b4d5c8 100644 --- a/google/cloud/iam/v3/internal/principal_access_boundary_policies_connection_impl.h +++ b/google/cloud/iam/v3/internal/principal_access_boundary_policies_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/iam/v3/internal/principal_access_boundary_policies_logging_decorator.cc b/google/cloud/iam/v3/internal/principal_access_boundary_policies_logging_decorator.cc index a58318c46f9aa..e7a4b2bef6259 100644 --- a/google/cloud/iam/v3/internal/principal_access_boundary_policies_logging_decorator.cc +++ b/google/cloud/iam/v3/internal/principal_access_boundary_policies_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/iam/v3/internal/principal_access_boundary_policies_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/iam/v3/principal_access_boundary_policies_service.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v3_internal { @@ -240,3 +243,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/v3/internal/principal_access_boundary_policies_logging_decorator.h b/google/cloud/iam/v3/internal/principal_access_boundary_policies_logging_decorator.h index 60b42cb6554ba..04bf23f3c649f 100644 --- a/google/cloud/iam/v3/internal/principal_access_boundary_policies_logging_decorator.h +++ b/google/cloud/iam/v3/internal/principal_access_boundary_policies_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/iam/v3/internal/principal_access_boundary_policies_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v3_internal { @@ -123,4 +126,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_V3_INTERNAL_PRINCIPAL_ACCESS_BOUNDARY_POLICIES_LOGGING_DECORATOR_H diff --git a/google/cloud/iam/v3/internal/principal_access_boundary_policies_metadata_decorator.cc b/google/cloud/iam/v3/internal/principal_access_boundary_policies_metadata_decorator.cc index 04383197af513..d6f81141962d2 100644 --- a/google/cloud/iam/v3/internal/principal_access_boundary_policies_metadata_decorator.cc +++ b/google/cloud/iam/v3/internal/principal_access_boundary_policies_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/iam/v3/internal/principal_access_boundary_policies_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/iam/v3/principal_access_boundary_policies_service.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v3_internal { @@ -203,3 +207,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/v3/internal/principal_access_boundary_policies_metadata_decorator.h b/google/cloud/iam/v3/internal/principal_access_boundary_policies_metadata_decorator.h index f59528c0aa034..8f35897d2ebaf 100644 --- a/google/cloud/iam/v3/internal/principal_access_boundary_policies_metadata_decorator.h +++ b/google/cloud/iam/v3/internal/principal_access_boundary_policies_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/iam/v3/internal/principal_access_boundary_policies_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v3_internal { @@ -129,4 +132,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_V3_INTERNAL_PRINCIPAL_ACCESS_BOUNDARY_POLICIES_METADATA_DECORATOR_H diff --git a/google/cloud/iam/v3/internal/principal_access_boundary_policies_option_defaults.cc b/google/cloud/iam/v3/internal/principal_access_boundary_policies_option_defaults.cc index c8626c455d1f6..5c5186e19c412 100644 --- a/google/cloud/iam/v3/internal/principal_access_boundary_policies_option_defaults.cc +++ b/google/cloud/iam/v3/internal/principal_access_boundary_policies_option_defaults.cc @@ -44,7 +44,7 @@ Options PrincipalAccessBoundaryPoliciesDefaultOptions(Options options) { .has()) { options.set( iam_v3::PrincipalAccessBoundaryPoliciesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/iam/v3/internal/principal_access_boundary_policies_stub.cc b/google/cloud/iam/v3/internal/principal_access_boundary_policies_stub.cc index 8013ddfe32f1b..c8fe7b7f583e3 100644 --- a/google/cloud/iam/v3/internal/principal_access_boundary_policies_stub.cc +++ b/google/cloud/iam/v3/internal/principal_access_boundary_policies_stub.cc @@ -19,11 +19,14 @@ #include "google/cloud/iam/v3/internal/principal_access_boundary_policies_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/iam/v3/principal_access_boundary_policies_service.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v3_internal { @@ -237,3 +240,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/v3/internal/principal_access_boundary_policies_stub.h b/google/cloud/iam/v3/internal/principal_access_boundary_policies_stub.h index e80d4c14de174..2168b9f5a7882 100644 --- a/google/cloud/iam/v3/internal/principal_access_boundary_policies_stub.h +++ b/google/cloud/iam/v3/internal/principal_access_boundary_policies_stub.h @@ -24,11 +24,14 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/iam/v3/principal_access_boundary_policies_service.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v3_internal { @@ -214,4 +217,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_V3_INTERNAL_PRINCIPAL_ACCESS_BOUNDARY_POLICIES_STUB_H diff --git a/google/cloud/iam/v3/internal/principal_access_boundary_policies_stub_factory.cc b/google/cloud/iam/v3/internal/principal_access_boundary_policies_stub_factory.cc index 05a8494d50c0d..ecc446440d892 100644 --- a/google/cloud/iam/v3/internal/principal_access_boundary_policies_stub_factory.cc +++ b/google/cloud/iam/v3/internal/principal_access_boundary_policies_stub_factory.cc @@ -28,11 +28,14 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/iam/v3/principal_access_boundary_policies_service.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v3_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/v3/internal/principal_access_boundary_policies_stub_factory.h b/google/cloud/iam/v3/internal/principal_access_boundary_policies_stub_factory.h index 9ba1fe6f41240..f1eba01ffa0a3 100644 --- a/google/cloud/iam/v3/internal/principal_access_boundary_policies_stub_factory.h +++ b/google/cloud/iam/v3/internal/principal_access_boundary_policies_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v3_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_V3_INTERNAL_PRINCIPAL_ACCESS_BOUNDARY_POLICIES_STUB_FACTORY_H diff --git a/google/cloud/iam/v3/internal/principal_access_boundary_policies_tracing_connection.cc b/google/cloud/iam/v3/internal/principal_access_boundary_policies_tracing_connection.cc index 040a2432b9562..e351669c5b600 100644 --- a/google/cloud/iam/v3/internal/principal_access_boundary_policies_tracing_connection.cc +++ b/google/cloud/iam/v3/internal/principal_access_boundary_policies_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace iam_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PrincipalAccessBoundaryPoliciesTracingConnection:: PrincipalAccessBoundaryPoliciesTracingConnection( std::shared_ptr @@ -203,17 +201,13 @@ PrincipalAccessBoundaryPoliciesTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePrincipalAccessBoundaryPoliciesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/iam/v3/internal/principal_access_boundary_policies_tracing_connection.h b/google/cloud/iam/v3/internal/principal_access_boundary_policies_tracing_connection.h index d9a17537bebeb..1f12b9164883b 100644 --- a/google/cloud/iam/v3/internal/principal_access_boundary_policies_tracing_connection.h +++ b/google/cloud/iam/v3/internal/principal_access_boundary_policies_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace iam_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PrincipalAccessBoundaryPoliciesTracingConnection : public iam_v3::PrincipalAccessBoundaryPoliciesConnection { public: @@ -104,8 +102,6 @@ class PrincipalAccessBoundaryPoliciesTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/iam/v3/internal/principal_access_boundary_policies_tracing_stub.cc b/google/cloud/iam/v3/internal/principal_access_boundary_policies_tracing_stub.cc index 5f3501a7b14c1..70054fa65d5ae 100644 --- a/google/cloud/iam/v3/internal/principal_access_boundary_policies_tracing_stub.cc +++ b/google/cloud/iam/v3/internal/principal_access_boundary_policies_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PrincipalAccessBoundaryPoliciesTracingStub:: PrincipalAccessBoundaryPoliciesTracingStub( std::shared_ptr child) @@ -217,20 +218,16 @@ future PrincipalAccessBoundaryPoliciesTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePrincipalAccessBoundaryPoliciesTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared( std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iam_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iam/v3/internal/principal_access_boundary_policies_tracing_stub.h b/google/cloud/iam/v3/internal/principal_access_boundary_policies_tracing_stub.h index 24e3a5edfd9ea..d725cfb3e59d6 100644 --- a/google/cloud/iam/v3/internal/principal_access_boundary_policies_tracing_stub.h +++ b/google/cloud/iam/v3/internal/principal_access_boundary_policies_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iam_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PrincipalAccessBoundaryPoliciesTracingStub : public PrincipalAccessBoundaryPoliciesStub { public: @@ -119,8 +120,6 @@ class PrincipalAccessBoundaryPoliciesTracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -136,4 +135,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAM_V3_INTERNAL_PRINCIPAL_ACCESS_BOUNDARY_POLICIES_TRACING_STUB_H diff --git a/google/cloud/iam/v3/policy_bindings_client.h b/google/cloud/iam/v3/policy_bindings_client.h index 2db14742ad3e2..a4c0866338d81 100644 --- a/google/cloud/iam/v3/policy_bindings_client.h +++ b/google/cloud/iam/v3/policy_bindings_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/iam/v3/policy_bindings_connection.h b/google/cloud/iam/v3/policy_bindings_connection.h index 6d453c83287bf..680f82f7c4cba 100644 --- a/google/cloud/iam/v3/policy_bindings_connection.h +++ b/google/cloud/iam/v3/policy_bindings_connection.h @@ -30,8 +30,8 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/iam/v3/policy_bindings_service.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/iam/v3/policy_bindings_connection_idempotency_policy.h b/google/cloud/iam/v3/policy_bindings_connection_idempotency_policy.h index 8de979d27948d..d23d802983df7 100644 --- a/google/cloud/iam/v3/policy_bindings_connection_idempotency_policy.h +++ b/google/cloud/iam/v3/policy_bindings_connection_idempotency_policy.h @@ -21,8 +21,8 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/iam/v3/policy_bindings_service.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/iam/v3/principal_access_boundary_policies_client.h b/google/cloud/iam/v3/principal_access_boundary_policies_client.h index 16e018934b20d..602e1514c685d 100644 --- a/google/cloud/iam/v3/principal_access_boundary_policies_client.h +++ b/google/cloud/iam/v3/principal_access_boundary_policies_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/iam/v3/principal_access_boundary_policies_connection.h b/google/cloud/iam/v3/principal_access_boundary_policies_connection.h index 035298c08ee25..49c7918fdf7be 100644 --- a/google/cloud/iam/v3/principal_access_boundary_policies_connection.h +++ b/google/cloud/iam/v3/principal_access_boundary_policies_connection.h @@ -30,8 +30,8 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/iam/v3/principal_access_boundary_policies_service.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/iam/v3/principal_access_boundary_policies_connection_idempotency_policy.h b/google/cloud/iam/v3/principal_access_boundary_policies_connection_idempotency_policy.h index 729f61e806940..af36a8da9a7a7 100644 --- a/google/cloud/iam/v3/principal_access_boundary_policies_connection_idempotency_policy.h +++ b/google/cloud/iam/v3/principal_access_boundary_policies_connection_idempotency_policy.h @@ -21,8 +21,8 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/iam/v3/principal_access_boundary_policies_service.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/iam_updater.h b/google/cloud/iam_updater.h index 193e4f43923fd..6914b6c273c8c 100644 --- a/google/cloud/iam_updater.h +++ b/google/cloud/iam_updater.h @@ -17,7 +17,7 @@ #include "google/cloud/version.h" #include "absl/types/optional.h" -#include +#include "google/iam/v1/policy.pb.h" #include namespace google { diff --git a/google/cloud/iap/BUILD.bazel b/google/cloud/iap/BUILD.bazel index ac78a2e546db1..b8d8b7e93fef9 100644 --- a/google/cloud/iap/BUILD.bazel +++ b/google/cloud/iap/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/iap/v1:iap_cc_grpc", + "@googleapis//google/cloud/iap/v1:iap_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/iap/CMakeLists.txt b/google/cloud/iap/CMakeLists.txt index 4d1655d136d76..1e97995697cb1 100644 --- a/google/cloud/iap/CMakeLists.txt +++ b/google/cloud/iap/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(iap "Cloud Identity-Aware Proxy API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(iap_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/iap/identity_aware_proxy_admin_client.h b/google/cloud/iap/identity_aware_proxy_admin_client.h deleted file mode 100644 index 48826510ce14e..0000000000000 --- a/google/cloud/iap/identity_aware_proxy_admin_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/iap/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_IDENTITY_AWARE_PROXY_ADMIN_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_IDENTITY_AWARE_PROXY_ADMIN_CLIENT_H - -#include "google/cloud/iap/identity_aware_proxy_admin_connection.h" -#include "google/cloud/iap/v1/identity_aware_proxy_admin_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in iap_v1 instead of the aliases defined in -/// this namespace. -namespace iap { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use iap_v1::IdentityAwareProxyAdminServiceClient directly. -using ::google::cloud::iap_v1::IdentityAwareProxyAdminServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace iap -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_IDENTITY_AWARE_PROXY_ADMIN_CLIENT_H diff --git a/google/cloud/iap/identity_aware_proxy_admin_connection.h b/google/cloud/iap/identity_aware_proxy_admin_connection.h deleted file mode 100644 index 02db3605890d8..0000000000000 --- a/google/cloud/iap/identity_aware_proxy_admin_connection.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/iap/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_IDENTITY_AWARE_PROXY_ADMIN_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_IDENTITY_AWARE_PROXY_ADMIN_CONNECTION_H - -#include "google/cloud/iap/identity_aware_proxy_admin_connection_idempotency_policy.h" -#include "google/cloud/iap/v1/identity_aware_proxy_admin_connection.h" - -namespace google { -namespace cloud { -namespace iap { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use iap_v1::MakeIdentityAwareProxyAdminServiceConnection -/// directly. -using ::google::cloud::iap_v1::MakeIdentityAwareProxyAdminServiceConnection; - -/// @deprecated Use iap_v1::IdentityAwareProxyAdminServiceConnection directly. -using ::google::cloud::iap_v1::IdentityAwareProxyAdminServiceConnection; - -/// @deprecated Use -/// iap_v1::IdentityAwareProxyAdminServiceLimitedErrorCountRetryPolicy directly. -using ::google::cloud::iap_v1:: - IdentityAwareProxyAdminServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use iap_v1::IdentityAwareProxyAdminServiceLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::iap_v1:: - IdentityAwareProxyAdminServiceLimitedTimeRetryPolicy; - -/// @deprecated Use iap_v1::IdentityAwareProxyAdminServiceRetryPolicy directly. -using ::google::cloud::iap_v1::IdentityAwareProxyAdminServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace iap -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_IDENTITY_AWARE_PROXY_ADMIN_CONNECTION_H diff --git a/google/cloud/iap/identity_aware_proxy_admin_connection_idempotency_policy.h b/google/cloud/iap/identity_aware_proxy_admin_connection_idempotency_policy.h deleted file mode 100644 index 3f912c0b19689..0000000000000 --- a/google/cloud/iap/identity_aware_proxy_admin_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/iap/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_IDENTITY_AWARE_PROXY_ADMIN_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_IDENTITY_AWARE_PROXY_ADMIN_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/iap/v1/identity_aware_proxy_admin_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace iap { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// iap_v1::MakeDefaultIdentityAwareProxyAdminServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::iap_v1:: - MakeDefaultIdentityAwareProxyAdminServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// iap_v1::IdentityAwareProxyAdminServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::iap_v1:: - IdentityAwareProxyAdminServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace iap -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_IDENTITY_AWARE_PROXY_ADMIN_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/iap/identity_aware_proxy_admin_options.h b/google/cloud/iap/identity_aware_proxy_admin_options.h deleted file mode 100644 index 004bde51d63ce..0000000000000 --- a/google/cloud/iap/identity_aware_proxy_admin_options.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/iap/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_IDENTITY_AWARE_PROXY_ADMIN_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_IDENTITY_AWARE_PROXY_ADMIN_OPTIONS_H - -#include "google/cloud/iap/identity_aware_proxy_admin_connection.h" -#include "google/cloud/iap/identity_aware_proxy_admin_connection_idempotency_policy.h" -#include "google/cloud/iap/v1/identity_aware_proxy_admin_options.h" - -namespace google { -namespace cloud { -namespace iap { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use iap_v1::IdentityAwareProxyAdminServiceBackoffPolicyOption -/// directly. -using ::google::cloud::iap_v1:: - IdentityAwareProxyAdminServiceBackoffPolicyOption; - -/// @deprecated Use -/// iap_v1::IdentityAwareProxyAdminServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::iap_v1:: - IdentityAwareProxyAdminServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use iap_v1::IdentityAwareProxyAdminServicePolicyOptionList -/// directly. -using ::google::cloud::iap_v1::IdentityAwareProxyAdminServicePolicyOptionList; - -/// @deprecated Use iap_v1::IdentityAwareProxyAdminServiceRetryPolicyOption -/// directly. -using ::google::cloud::iap_v1::IdentityAwareProxyAdminServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace iap -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_IDENTITY_AWARE_PROXY_ADMIN_OPTIONS_H diff --git a/google/cloud/iap/identity_aware_proxy_o_auth_client.h b/google/cloud/iap/identity_aware_proxy_o_auth_client.h deleted file mode 100644 index 4afb153b76f4f..0000000000000 --- a/google/cloud/iap/identity_aware_proxy_o_auth_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/iap/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_IDENTITY_AWARE_PROXY_O_AUTH_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_IDENTITY_AWARE_PROXY_O_AUTH_CLIENT_H - -#include "google/cloud/iap/identity_aware_proxy_o_auth_connection.h" -#include "google/cloud/iap/v1/identity_aware_proxy_o_auth_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in iap_v1 instead of the aliases defined in -/// this namespace. -namespace iap { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use iap_v1::IdentityAwareProxyOAuthServiceClient directly. -using ::google::cloud::iap_v1::IdentityAwareProxyOAuthServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace iap -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_IDENTITY_AWARE_PROXY_O_AUTH_CLIENT_H diff --git a/google/cloud/iap/identity_aware_proxy_o_auth_connection.h b/google/cloud/iap/identity_aware_proxy_o_auth_connection.h deleted file mode 100644 index 784d3421b8550..0000000000000 --- a/google/cloud/iap/identity_aware_proxy_o_auth_connection.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/iap/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_IDENTITY_AWARE_PROXY_O_AUTH_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_IDENTITY_AWARE_PROXY_O_AUTH_CONNECTION_H - -#include "google/cloud/iap/identity_aware_proxy_o_auth_connection_idempotency_policy.h" -#include "google/cloud/iap/v1/identity_aware_proxy_o_auth_connection.h" - -namespace google { -namespace cloud { -namespace iap { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use iap_v1::MakeIdentityAwareProxyOAuthServiceConnection -/// directly. -using ::google::cloud::iap_v1::MakeIdentityAwareProxyOAuthServiceConnection; - -/// @deprecated Use iap_v1::IdentityAwareProxyOAuthServiceConnection directly. -using ::google::cloud::iap_v1::IdentityAwareProxyOAuthServiceConnection; - -/// @deprecated Use -/// iap_v1::IdentityAwareProxyOAuthServiceLimitedErrorCountRetryPolicy directly. -using ::google::cloud::iap_v1:: - IdentityAwareProxyOAuthServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use iap_v1::IdentityAwareProxyOAuthServiceLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::iap_v1:: - IdentityAwareProxyOAuthServiceLimitedTimeRetryPolicy; - -/// @deprecated Use iap_v1::IdentityAwareProxyOAuthServiceRetryPolicy directly. -using ::google::cloud::iap_v1::IdentityAwareProxyOAuthServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace iap -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_IDENTITY_AWARE_PROXY_O_AUTH_CONNECTION_H diff --git a/google/cloud/iap/identity_aware_proxy_o_auth_connection_idempotency_policy.h b/google/cloud/iap/identity_aware_proxy_o_auth_connection_idempotency_policy.h deleted file mode 100644 index ea22c9d76f71a..0000000000000 --- a/google/cloud/iap/identity_aware_proxy_o_auth_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/iap/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_IDENTITY_AWARE_PROXY_O_AUTH_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_IDENTITY_AWARE_PROXY_O_AUTH_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/iap/v1/identity_aware_proxy_o_auth_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace iap { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// iap_v1::MakeDefaultIdentityAwareProxyOAuthServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::iap_v1:: - MakeDefaultIdentityAwareProxyOAuthServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// iap_v1::IdentityAwareProxyOAuthServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::iap_v1:: - IdentityAwareProxyOAuthServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace iap -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_IDENTITY_AWARE_PROXY_O_AUTH_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/iap/identity_aware_proxy_o_auth_options.h b/google/cloud/iap/identity_aware_proxy_o_auth_options.h deleted file mode 100644 index fb186efd50ceb..0000000000000 --- a/google/cloud/iap/identity_aware_proxy_o_auth_options.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/iap/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_IDENTITY_AWARE_PROXY_O_AUTH_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_IDENTITY_AWARE_PROXY_O_AUTH_OPTIONS_H - -#include "google/cloud/iap/identity_aware_proxy_o_auth_connection.h" -#include "google/cloud/iap/identity_aware_proxy_o_auth_connection_idempotency_policy.h" -#include "google/cloud/iap/v1/identity_aware_proxy_o_auth_options.h" - -namespace google { -namespace cloud { -namespace iap { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use iap_v1::IdentityAwareProxyOAuthServiceBackoffPolicyOption -/// directly. -using ::google::cloud::iap_v1:: - IdentityAwareProxyOAuthServiceBackoffPolicyOption; - -/// @deprecated Use -/// iap_v1::IdentityAwareProxyOAuthServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::iap_v1:: - IdentityAwareProxyOAuthServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use iap_v1::IdentityAwareProxyOAuthServicePolicyOptionList -/// directly. -using ::google::cloud::iap_v1::IdentityAwareProxyOAuthServicePolicyOptionList; - -/// @deprecated Use iap_v1::IdentityAwareProxyOAuthServiceRetryPolicyOption -/// directly. -using ::google::cloud::iap_v1::IdentityAwareProxyOAuthServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace iap -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_IDENTITY_AWARE_PROXY_O_AUTH_OPTIONS_H diff --git a/google/cloud/iap/mocks/mock_identity_aware_proxy_admin_connection.h b/google/cloud/iap/mocks/mock_identity_aware_proxy_admin_connection.h deleted file mode 100644 index c37621478748b..0000000000000 --- a/google/cloud/iap/mocks/mock_identity_aware_proxy_admin_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/iap/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_MOCKS_MOCK_IDENTITY_AWARE_PROXY_ADMIN_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_MOCKS_MOCK_IDENTITY_AWARE_PROXY_ADMIN_CONNECTION_H - -#include "google/cloud/iap/identity_aware_proxy_admin_connection.h" -#include "google/cloud/iap/v1/mocks/mock_identity_aware_proxy_admin_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in iap_v1_mocks instead of the aliases -/// defined in this namespace. -namespace iap_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use iap_v1_mocks::MockIdentityAwareProxyAdminServiceConnection -/// directly. -using ::google::cloud::iap_v1_mocks:: - MockIdentityAwareProxyAdminServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace iap_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_MOCKS_MOCK_IDENTITY_AWARE_PROXY_ADMIN_CONNECTION_H diff --git a/google/cloud/iap/mocks/mock_identity_aware_proxy_o_auth_connection.h b/google/cloud/iap/mocks/mock_identity_aware_proxy_o_auth_connection.h deleted file mode 100644 index 928b029397cd2..0000000000000 --- a/google/cloud/iap/mocks/mock_identity_aware_proxy_o_auth_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/iap/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_MOCKS_MOCK_IDENTITY_AWARE_PROXY_O_AUTH_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_MOCKS_MOCK_IDENTITY_AWARE_PROXY_O_AUTH_CONNECTION_H - -#include "google/cloud/iap/identity_aware_proxy_o_auth_connection.h" -#include "google/cloud/iap/v1/mocks/mock_identity_aware_proxy_o_auth_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in iap_v1_mocks instead of the aliases -/// defined in this namespace. -namespace iap_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use iap_v1_mocks::MockIdentityAwareProxyOAuthServiceConnection -/// directly. -using ::google::cloud::iap_v1_mocks:: - MockIdentityAwareProxyOAuthServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace iap_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_MOCKS_MOCK_IDENTITY_AWARE_PROXY_O_AUTH_CONNECTION_H diff --git a/google/cloud/iap/quickstart/.bazelrc b/google/cloud/iap/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/iap/quickstart/.bazelrc +++ b/google/cloud/iap/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/iap/quickstart/CMakeLists.txt b/google/cloud/iap/quickstart/CMakeLists.txt index 515729b23370c..3ea213c38db3f 100644 --- a/google/cloud/iap/quickstart/CMakeLists.txt +++ b/google/cloud/iap/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Identity-Aware Proxy API C++ client # library from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-iap-quickstart CXX) find_package(google_cloud_cpp_iap REQUIRED) diff --git a/google/cloud/iap/v1/identity_aware_proxy_admin_connection.h b/google/cloud/iap/v1/identity_aware_proxy_admin_connection.h index effc98a72f5fe..887e2a7baa370 100644 --- a/google/cloud/iap/v1/identity_aware_proxy_admin_connection.h +++ b/google/cloud/iap/v1/identity_aware_proxy_admin_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/iap/v1/identity_aware_proxy_admin_connection_idempotency_policy.h" #include "google/cloud/iap/v1/internal/identity_aware_proxy_admin_retry_traits.h" +#include "google/cloud/iap/v1/service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/iap/v1/identity_aware_proxy_admin_connection_idempotency_policy.h b/google/cloud/iap/v1/identity_aware_proxy_admin_connection_idempotency_policy.h index eefc5f435a78c..40ef30e9352be 100644 --- a/google/cloud/iap/v1/identity_aware_proxy_admin_connection_idempotency_policy.h +++ b/google/cloud/iap/v1/identity_aware_proxy_admin_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_V1_IDENTITY_AWARE_PROXY_ADMIN_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_V1_IDENTITY_AWARE_PROXY_ADMIN_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/iap/v1/service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/iap/v1/identity_aware_proxy_o_auth_connection.h b/google/cloud/iap/v1/identity_aware_proxy_o_auth_connection.h index 740202818b9f2..fcef95f83e58f 100644 --- a/google/cloud/iap/v1/identity_aware_proxy_o_auth_connection.h +++ b/google/cloud/iap/v1/identity_aware_proxy_o_auth_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/iap/v1/identity_aware_proxy_o_auth_connection_idempotency_policy.h" #include "google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_retry_traits.h" +#include "google/cloud/iap/v1/service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/iap/v1/identity_aware_proxy_o_auth_connection_idempotency_policy.h b/google/cloud/iap/v1/identity_aware_proxy_o_auth_connection_idempotency_policy.h index ea300eb061f5d..830c8b4f2a888 100644 --- a/google/cloud/iap/v1/identity_aware_proxy_o_auth_connection_idempotency_policy.h +++ b/google/cloud/iap/v1/identity_aware_proxy_o_auth_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_V1_IDENTITY_AWARE_PROXY_O_AUTH_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_V1_IDENTITY_AWARE_PROXY_O_AUTH_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/iap/v1/service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/iap/v1/internal/identity_aware_proxy_admin_auth_decorator.cc b/google/cloud/iap/v1/internal/identity_aware_proxy_admin_auth_decorator.cc index 175d58ae74818..261e3ddf28d0b 100644 --- a/google/cloud/iap/v1/internal/identity_aware_proxy_admin_auth_decorator.cc +++ b/google/cloud/iap/v1/internal/identity_aware_proxy_admin_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/iap/v1/service.proto #include "google/cloud/iap/v1/internal/identity_aware_proxy_admin_auth_decorator.h" -#include +#include "google/cloud/iap/v1/service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iap_v1_internal { @@ -134,3 +137,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iap_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iap/v1/internal/identity_aware_proxy_admin_auth_decorator.h b/google/cloud/iap/v1/internal/identity_aware_proxy_admin_auth_decorator.h index 243ca2f7d48d9..3dd1acbb27f10 100644 --- a/google/cloud/iap/v1/internal/identity_aware_proxy_admin_auth_decorator.h +++ b/google/cloud/iap/v1/internal/identity_aware_proxy_admin_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iap_v1_internal { @@ -101,4 +104,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_V1_INTERNAL_IDENTITY_AWARE_PROXY_ADMIN_AUTH_DECORATOR_H diff --git a/google/cloud/iap/v1/internal/identity_aware_proxy_admin_logging_decorator.cc b/google/cloud/iap/v1/internal/identity_aware_proxy_admin_logging_decorator.cc index ebc9718f06f12..90bf5d8a7316b 100644 --- a/google/cloud/iap/v1/internal/identity_aware_proxy_admin_logging_decorator.cc +++ b/google/cloud/iap/v1/internal/identity_aware_proxy_admin_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/iap/v1/service.proto #include "google/cloud/iap/v1/internal/identity_aware_proxy_admin_logging_decorator.h" +#include "google/cloud/iap/v1/service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iap_v1_internal { @@ -178,3 +181,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iap_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iap/v1/internal/identity_aware_proxy_admin_logging_decorator.h b/google/cloud/iap/v1/internal/identity_aware_proxy_admin_logging_decorator.h index 9e44556952fea..69bffe3fac748 100644 --- a/google/cloud/iap/v1/internal/identity_aware_proxy_admin_logging_decorator.h +++ b/google/cloud/iap/v1/internal/identity_aware_proxy_admin_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iap_v1_internal { @@ -101,4 +104,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_V1_INTERNAL_IDENTITY_AWARE_PROXY_ADMIN_LOGGING_DECORATOR_H diff --git a/google/cloud/iap/v1/internal/identity_aware_proxy_admin_metadata_decorator.cc b/google/cloud/iap/v1/internal/identity_aware_proxy_admin_metadata_decorator.cc index 43e63c023cde6..4540bfe764ccb 100644 --- a/google/cloud/iap/v1/internal/identity_aware_proxy_admin_metadata_decorator.cc +++ b/google/cloud/iap/v1/internal/identity_aware_proxy_admin_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/iap/v1/service.proto #include "google/cloud/iap/v1/internal/identity_aware_proxy_admin_metadata_decorator.h" +#include "google/cloud/iap/v1/service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iap_v1_internal { @@ -166,3 +170,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iap_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iap/v1/internal/identity_aware_proxy_admin_metadata_decorator.h b/google/cloud/iap/v1/internal/identity_aware_proxy_admin_metadata_decorator.h index 76865f2bf0b52..9e5efddf7d5c4 100644 --- a/google/cloud/iap/v1/internal/identity_aware_proxy_admin_metadata_decorator.h +++ b/google/cloud/iap/v1/internal/identity_aware_proxy_admin_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iap_v1_internal { @@ -107,4 +110,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_V1_INTERNAL_IDENTITY_AWARE_PROXY_ADMIN_METADATA_DECORATOR_H diff --git a/google/cloud/iap/v1/internal/identity_aware_proxy_admin_option_defaults.cc b/google/cloud/iap/v1/internal/identity_aware_proxy_admin_option_defaults.cc index 5934f0aae92b7..40b6f49ece2bb 100644 --- a/google/cloud/iap/v1/internal/identity_aware_proxy_admin_option_defaults.cc +++ b/google/cloud/iap/v1/internal/identity_aware_proxy_admin_option_defaults.cc @@ -43,7 +43,7 @@ Options IdentityAwareProxyAdminServiceDefaultOptions(Options options) { if (!options.has()) { options.set( iap_v1::IdentityAwareProxyAdminServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/iap/v1/internal/identity_aware_proxy_admin_stub.cc b/google/cloud/iap/v1/internal/identity_aware_proxy_admin_stub.cc index b7c1a4d5fbab5..bdfa03ee55e7f 100644 --- a/google/cloud/iap/v1/internal/identity_aware_proxy_admin_stub.cc +++ b/google/cloud/iap/v1/internal/identity_aware_proxy_admin_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/iap/v1/service.proto #include "google/cloud/iap/v1/internal/identity_aware_proxy_admin_stub.h" +#include "google/cloud/iap/v1/service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iap_v1_internal { @@ -168,3 +171,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iap_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iap/v1/internal/identity_aware_proxy_admin_stub.h b/google/cloud/iap/v1/internal/identity_aware_proxy_admin_stub.h index bc822f47ee6ac..94525522bb506 100644 --- a/google/cloud/iap/v1/internal/identity_aware_proxy_admin_stub.h +++ b/google/cloud/iap/v1/internal/identity_aware_proxy_admin_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_V1_INTERNAL_IDENTITY_AWARE_PROXY_ADMIN_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_V1_INTERNAL_IDENTITY_AWARE_PROXY_ADMIN_STUB_H +#include "google/cloud/iap/v1/service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iap_v1_internal { @@ -159,4 +162,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_V1_INTERNAL_IDENTITY_AWARE_PROXY_ADMIN_STUB_H diff --git a/google/cloud/iap/v1/internal/identity_aware_proxy_admin_stub_factory.cc b/google/cloud/iap/v1/internal/identity_aware_proxy_admin_stub_factory.cc index d67e68bb4598f..998c9742bc20f 100644 --- a/google/cloud/iap/v1/internal/identity_aware_proxy_admin_stub_factory.cc +++ b/google/cloud/iap/v1/internal/identity_aware_proxy_admin_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/iap/v1/internal/identity_aware_proxy_admin_metadata_decorator.h" #include "google/cloud/iap/v1/internal/identity_aware_proxy_admin_stub.h" #include "google/cloud/iap/v1/internal/identity_aware_proxy_admin_tracing_stub.h" +#include "google/cloud/iap/v1/service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iap_v1_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iap_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iap/v1/internal/identity_aware_proxy_admin_stub_factory.h b/google/cloud/iap/v1/internal/identity_aware_proxy_admin_stub_factory.h index a90c09ae28535..ff99d0fffa92c 100644 --- a/google/cloud/iap/v1/internal/identity_aware_proxy_admin_stub_factory.h +++ b/google/cloud/iap/v1/internal/identity_aware_proxy_admin_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iap_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_V1_INTERNAL_IDENTITY_AWARE_PROXY_ADMIN_STUB_FACTORY_H diff --git a/google/cloud/iap/v1/internal/identity_aware_proxy_admin_tracing_connection.cc b/google/cloud/iap/v1/internal/identity_aware_proxy_admin_tracing_connection.cc index c945e0cb31aa5..9afa62ac24727 100644 --- a/google/cloud/iap/v1/internal/identity_aware_proxy_admin_tracing_connection.cc +++ b/google/cloud/iap/v1/internal/identity_aware_proxy_admin_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace iap_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - IdentityAwareProxyAdminServiceTracingConnection:: IdentityAwareProxyAdminServiceTracingConnection( std::shared_ptr child) @@ -140,17 +138,13 @@ IdentityAwareProxyAdminServiceTracingConnection::UpdateTunnelDestGroup( return internal::EndSpan(*span, child_->UpdateTunnelDestGroup(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeIdentityAwareProxyAdminServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/iap/v1/internal/identity_aware_proxy_admin_tracing_connection.h b/google/cloud/iap/v1/internal/identity_aware_proxy_admin_tracing_connection.h index 972cf3064342f..ee4e3c7afad01 100644 --- a/google/cloud/iap/v1/internal/identity_aware_proxy_admin_tracing_connection.h +++ b/google/cloud/iap/v1/internal/identity_aware_proxy_admin_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace iap_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class IdentityAwareProxyAdminServiceTracingConnection : public iap_v1::IdentityAwareProxyAdminServiceConnection { public: @@ -83,8 +81,6 @@ class IdentityAwareProxyAdminServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/iap/v1/internal/identity_aware_proxy_admin_tracing_stub.cc b/google/cloud/iap/v1/internal/identity_aware_proxy_admin_tracing_stub.cc index fdb2998f1958a..aa3a40652a75e 100644 --- a/google/cloud/iap/v1/internal/identity_aware_proxy_admin_tracing_stub.cc +++ b/google/cloud/iap/v1/internal/identity_aware_proxy_admin_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iap_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - IdentityAwareProxyAdminServiceTracingStub:: IdentityAwareProxyAdminServiceTracingStub( std::shared_ptr child) @@ -174,20 +175,16 @@ IdentityAwareProxyAdminServiceTracingStub::UpdateTunnelDestGroup( context, *span, child_->UpdateTunnelDestGroup(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeIdentityAwareProxyAdminServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared( std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iap_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iap/v1/internal/identity_aware_proxy_admin_tracing_stub.h b/google/cloud/iap/v1/internal/identity_aware_proxy_admin_tracing_stub.h index 062a9343b643b..a41e525501e2c 100644 --- a/google/cloud/iap/v1/internal/identity_aware_proxy_admin_tracing_stub.h +++ b/google/cloud/iap/v1/internal/identity_aware_proxy_admin_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iap_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class IdentityAwareProxyAdminServiceTracingStub : public IdentityAwareProxyAdminServiceStub { public: @@ -98,8 +99,6 @@ class IdentityAwareProxyAdminServiceTracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -115,4 +114,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_V1_INTERNAL_IDENTITY_AWARE_PROXY_ADMIN_TRACING_STUB_H diff --git a/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_auth_decorator.cc b/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_auth_decorator.cc index 126fa9edf501c..712b31bb124b1 100644 --- a/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_auth_decorator.cc +++ b/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/iap/v1/service.proto #include "google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_auth_decorator.h" -#include +#include "google/cloud/iap/v1/service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iap_v1_internal { @@ -110,3 +113,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iap_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_auth_decorator.h b/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_auth_decorator.h index 56112ad70f392..35abb9eda4b19 100644 --- a/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_auth_decorator.h +++ b/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iap_v1_internal { @@ -90,4 +93,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_V1_INTERNAL_IDENTITY_AWARE_PROXY_O_AUTH_AUTH_DECORATOR_H diff --git a/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_logging_decorator.cc b/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_logging_decorator.cc index 8c54b9b90a8c2..79a08ca0e3f5b 100644 --- a/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_logging_decorator.cc +++ b/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/iap/v1/service.proto #include "google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_logging_decorator.h" +#include "google/cloud/iap/v1/service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iap_v1_internal { @@ -148,3 +151,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iap_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_logging_decorator.h b/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_logging_decorator.h index 43c77730c95df..bb60bc5b16857 100644 --- a/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_logging_decorator.h +++ b/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iap_v1_internal { @@ -90,4 +93,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_V1_INTERNAL_IDENTITY_AWARE_PROXY_O_AUTH_LOGGING_DECORATOR_H diff --git a/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_metadata_decorator.cc b/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_metadata_decorator.cc index 699077b7a60b6..9fba0670115e9 100644 --- a/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_metadata_decorator.cc +++ b/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/iap/v1/service.proto #include "google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_metadata_decorator.h" +#include "google/cloud/iap/v1/service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iap_v1_internal { @@ -136,3 +140,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iap_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_metadata_decorator.h b/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_metadata_decorator.h index a61af7727b784..18b3be021e6e9 100644 --- a/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_metadata_decorator.h +++ b/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iap_v1_internal { @@ -96,4 +99,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_V1_INTERNAL_IDENTITY_AWARE_PROXY_O_AUTH_METADATA_DECORATOR_H diff --git a/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_option_defaults.cc b/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_option_defaults.cc index 509fe4b18b8ac..53a62150966ec 100644 --- a/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_option_defaults.cc +++ b/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_option_defaults.cc @@ -43,7 +43,7 @@ Options IdentityAwareProxyOAuthServiceDefaultOptions(Options options) { if (!options.has()) { options.set( iap_v1::IdentityAwareProxyOAuthServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_stub.cc b/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_stub.cc index ad380b20bd646..b21b6042d85e1 100644 --- a/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_stub.cc +++ b/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/iap/v1/service.proto #include "google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_stub.h" +#include "google/cloud/iap/v1/service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iap_v1_internal { @@ -140,3 +143,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iap_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_stub.h b/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_stub.h index 79f15328024e7..d6e8e2597aecc 100644 --- a/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_stub.h +++ b/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_V1_INTERNAL_IDENTITY_AWARE_PROXY_O_AUTH_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_V1_INTERNAL_IDENTITY_AWARE_PROXY_O_AUTH_STUB_H +#include "google/cloud/iap/v1/service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iap_v1_internal { @@ -139,4 +142,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_V1_INTERNAL_IDENTITY_AWARE_PROXY_O_AUTH_STUB_H diff --git a/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_stub_factory.cc b/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_stub_factory.cc index 101788428ad97..2850ce5ca249a 100644 --- a/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_stub_factory.cc +++ b/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_metadata_decorator.h" #include "google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_stub.h" #include "google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_tracing_stub.h" +#include "google/cloud/iap/v1/service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iap_v1_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iap_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_stub_factory.h b/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_stub_factory.h index 97a0a20a48bcd..90d88075d5a0d 100644 --- a/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_stub_factory.h +++ b/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iap_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_V1_INTERNAL_IDENTITY_AWARE_PROXY_O_AUTH_STUB_FACTORY_H diff --git a/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_tracing_connection.cc b/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_tracing_connection.cc index a081bbceffd59..94d8e338d6913 100644 --- a/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_tracing_connection.cc +++ b/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace iap_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - IdentityAwareProxyOAuthServiceTracingConnection:: IdentityAwareProxyOAuthServiceTracingConnection( std::shared_ptr child) @@ -121,17 +119,13 @@ IdentityAwareProxyOAuthServiceTracingConnection::DeleteIdentityAwareProxyClient( child_->DeleteIdentityAwareProxyClient(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeIdentityAwareProxyOAuthServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_tracing_connection.h b/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_tracing_connection.h index e98b9031cacd5..b710686a4acd9 100644 --- a/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_tracing_connection.h +++ b/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace iap_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class IdentityAwareProxyOAuthServiceTracingConnection : public iap_v1::IdentityAwareProxyOAuthServiceConnection { public: @@ -77,8 +75,6 @@ class IdentityAwareProxyOAuthServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_tracing_stub.cc b/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_tracing_stub.cc index 72fafa37d8896..ff9243eb0bf04 100644 --- a/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_tracing_stub.cc +++ b/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iap_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - IdentityAwareProxyOAuthServiceTracingStub:: IdentityAwareProxyOAuthServiceTracingStub( std::shared_ptr child) @@ -143,20 +144,16 @@ IdentityAwareProxyOAuthServiceTracingStub::DeleteIdentityAwareProxyClient( child_->DeleteIdentityAwareProxyClient(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeIdentityAwareProxyOAuthServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared( std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace iap_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_tracing_stub.h b/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_tracing_stub.h index 0a326dfc7bec8..5f2f46d795788 100644 --- a/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_tracing_stub.h +++ b/google/cloud/iap/v1/internal/identity_aware_proxy_o_auth_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace iap_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class IdentityAwareProxyOAuthServiceTracingStub : public IdentityAwareProxyOAuthServiceStub { public: @@ -87,8 +88,6 @@ class IdentityAwareProxyOAuthServiceTracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -104,4 +103,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IAP_V1_INTERNAL_IDENTITY_AWARE_PROXY_O_AUTH_TRACING_STUB_H diff --git a/google/cloud/ids/BUILD.bazel b/google/cloud/ids/BUILD.bazel index 7efeeb7c5919f..a51b24e2fdc45 100644 --- a/google/cloud/ids/BUILD.bazel +++ b/google/cloud/ids/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/ids/v1:ids_cc_grpc", + "@googleapis//google/cloud/ids/v1:ids_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/ids/CMakeLists.txt b/google/cloud/ids/CMakeLists.txt index 5e3df422f96b9..a4c1257eaf7a6 100644 --- a/google/cloud/ids/CMakeLists.txt +++ b/google/cloud/ids/CMakeLists.txt @@ -16,8 +16,7 @@ include(GoogleCloudCppLibrary) -google_cloud_cpp_add_gapic_library(ids "Cloud IDS API" SERVICE_DIRS "__EMPTY__" - "v1/") +google_cloud_cpp_add_gapic_library(ids "Cloud IDS API" SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(ids_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/ids/ids_client.h b/google/cloud/ids/ids_client.h deleted file mode 100644 index e351ee08b2a9e..0000000000000 --- a/google/cloud/ids/ids_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/ids/v1/ids.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IDS_IDS_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IDS_IDS_CLIENT_H - -#include "google/cloud/ids/ids_connection.h" -#include "google/cloud/ids/v1/ids_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in ids_v1 instead of the aliases defined in -/// this namespace. -namespace ids { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use ids_v1::IDSClient directly. -using ::google::cloud::ids_v1::IDSClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace ids -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IDS_IDS_CLIENT_H diff --git a/google/cloud/ids/ids_connection.h b/google/cloud/ids/ids_connection.h deleted file mode 100644 index 96d3cc1ff9a5b..0000000000000 --- a/google/cloud/ids/ids_connection.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/ids/v1/ids.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IDS_IDS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IDS_IDS_CONNECTION_H - -#include "google/cloud/ids/ids_connection_idempotency_policy.h" -#include "google/cloud/ids/v1/ids_connection.h" - -namespace google { -namespace cloud { -namespace ids { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use ids_v1::MakeIDSConnection directly. -using ::google::cloud::ids_v1::MakeIDSConnection; - -/// @deprecated Use ids_v1::IDSConnection directly. -using ::google::cloud::ids_v1::IDSConnection; - -/// @deprecated Use ids_v1::IDSLimitedErrorCountRetryPolicy directly. -using ::google::cloud::ids_v1::IDSLimitedErrorCountRetryPolicy; - -/// @deprecated Use ids_v1::IDSLimitedTimeRetryPolicy directly. -using ::google::cloud::ids_v1::IDSLimitedTimeRetryPolicy; - -/// @deprecated Use ids_v1::IDSRetryPolicy directly. -using ::google::cloud::ids_v1::IDSRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace ids -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IDS_IDS_CONNECTION_H diff --git a/google/cloud/ids/ids_connection_idempotency_policy.h b/google/cloud/ids/ids_connection_idempotency_policy.h deleted file mode 100644 index 86dc42850632d..0000000000000 --- a/google/cloud/ids/ids_connection_idempotency_policy.h +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/ids/v1/ids.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IDS_IDS_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IDS_IDS_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/ids/v1/ids_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace ids { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use ids_v1::MakeDefaultIDSConnectionIdempotencyPolicy directly. -using ::google::cloud::ids_v1::MakeDefaultIDSConnectionIdempotencyPolicy; - -/// @deprecated Use ids_v1::IDSConnectionIdempotencyPolicy directly. -using ::google::cloud::ids_v1::IDSConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace ids -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IDS_IDS_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/ids/ids_options.h b/google/cloud/ids/ids_options.h deleted file mode 100644 index b7c81f070b0ea..0000000000000 --- a/google/cloud/ids/ids_options.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/ids/v1/ids.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IDS_IDS_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IDS_IDS_OPTIONS_H - -#include "google/cloud/ids/ids_connection.h" -#include "google/cloud/ids/ids_connection_idempotency_policy.h" -#include "google/cloud/ids/v1/ids_options.h" - -namespace google { -namespace cloud { -namespace ids { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use ids_v1::IDSPollingPolicyOption directly. -using ::google::cloud::ids_v1::IDSPollingPolicyOption; - -/// @deprecated Use ids_v1::IDSBackoffPolicyOption directly. -using ::google::cloud::ids_v1::IDSBackoffPolicyOption; - -/// @deprecated Use ids_v1::IDSConnectionIdempotencyPolicyOption directly. -using ::google::cloud::ids_v1::IDSConnectionIdempotencyPolicyOption; - -/// @deprecated Use ids_v1::IDSPolicyOptionList directly. -using ::google::cloud::ids_v1::IDSPolicyOptionList; - -/// @deprecated Use ids_v1::IDSRetryPolicyOption directly. -using ::google::cloud::ids_v1::IDSRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace ids -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IDS_IDS_OPTIONS_H diff --git a/google/cloud/ids/mocks/mock_ids_connection.h b/google/cloud/ids/mocks/mock_ids_connection.h deleted file mode 100644 index a292e01ec5a96..0000000000000 --- a/google/cloud/ids/mocks/mock_ids_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/ids/v1/ids.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IDS_MOCKS_MOCK_IDS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IDS_MOCKS_MOCK_IDS_CONNECTION_H - -#include "google/cloud/ids/ids_connection.h" -#include "google/cloud/ids/v1/mocks/mock_ids_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in ids_v1_mocks instead of the aliases -/// defined in this namespace. -namespace ids_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use ids_v1_mocks::MockIDSConnection directly. -using ::google::cloud::ids_v1_mocks::MockIDSConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace ids_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IDS_MOCKS_MOCK_IDS_CONNECTION_H diff --git a/google/cloud/ids/quickstart/.bazelrc b/google/cloud/ids/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/ids/quickstart/.bazelrc +++ b/google/cloud/ids/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/ids/quickstart/CMakeLists.txt b/google/cloud/ids/quickstart/CMakeLists.txt index b43da5f161d15..3d89395c2c5cf 100644 --- a/google/cloud/ids/quickstart/CMakeLists.txt +++ b/google/cloud/ids/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud IDS API C++ client library from a larger # CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-ids-quickstart CXX) find_package(google_cloud_cpp_ids REQUIRED) diff --git a/google/cloud/ids/v1/ids_client.h b/google/cloud/ids/v1/ids_client.h index e2ebce0b66249..492759959b9b0 100644 --- a/google/cloud/ids/v1/ids_client.h +++ b/google/cloud/ids/v1/ids_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/ids/v1/ids_connection.h b/google/cloud/ids/v1/ids_connection.h index aa1e7bd826901..845fb739121d0 100644 --- a/google/cloud/ids/v1/ids_connection.h +++ b/google/cloud/ids/v1/ids_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IDS_V1_IDS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IDS_V1_IDS_CONNECTION_H +#include "google/cloud/ids/v1/ids.pb.h" #include "google/cloud/ids/v1/ids_connection_idempotency_policy.h" #include "google/cloud/ids/v1/internal/ids_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/ids/v1/ids_connection_idempotency_policy.h b/google/cloud/ids/v1/ids_connection_idempotency_policy.h index fa608add2e93d..460ee0798e4a1 100644 --- a/google/cloud/ids/v1/ids_connection_idempotency_policy.h +++ b/google/cloud/ids/v1/ids_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IDS_V1_IDS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IDS_V1_IDS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/ids/v1/ids.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/ids/v1/internal/ids_auth_decorator.cc b/google/cloud/ids/v1/internal/ids_auth_decorator.cc index 09be60a2d0611..9d4ddd21fed48 100644 --- a/google/cloud/ids/v1/internal/ids_auth_decorator.cc +++ b/google/cloud/ids/v1/internal/ids_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/ids/v1/ids.proto #include "google/cloud/ids/v1/internal/ids_auth_decorator.h" -#include +#include "google/cloud/ids/v1/ids.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace ids_v1_internal { @@ -140,3 +143,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace ids_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/ids/v1/internal/ids_auth_decorator.h b/google/cloud/ids/v1/internal/ids_auth_decorator.h index 5f31e62baa4d3..8a0fa27b16a72 100644 --- a/google/cloud/ids/v1/internal/ids_auth_decorator.h +++ b/google/cloud/ids/v1/internal/ids_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/ids/v1/internal/ids_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace ids_v1_internal { @@ -89,4 +92,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IDS_V1_INTERNAL_IDS_AUTH_DECORATOR_H diff --git a/google/cloud/ids/v1/internal/ids_connection_impl.h b/google/cloud/ids/v1/internal/ids_connection_impl.h index db0e866cc5623..70cddf4bbfe41 100644 --- a/google/cloud/ids/v1/internal/ids_connection_impl.h +++ b/google/cloud/ids/v1/internal/ids_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/ids/v1/internal/ids_logging_decorator.cc b/google/cloud/ids/v1/internal/ids_logging_decorator.cc index af4c83396f9c5..568e043130b58 100644 --- a/google/cloud/ids/v1/internal/ids_logging_decorator.cc +++ b/google/cloud/ids/v1/internal/ids_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/ids/v1/ids.proto #include "google/cloud/ids/v1/internal/ids_logging_decorator.h" +#include "google/cloud/ids/v1/ids.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace ids_v1_internal { @@ -154,3 +157,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace ids_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/ids/v1/internal/ids_logging_decorator.h b/google/cloud/ids/v1/internal/ids_logging_decorator.h index cb16b40f81280..f2841eca61d20 100644 --- a/google/cloud/ids/v1/internal/ids_logging_decorator.h +++ b/google/cloud/ids/v1/internal/ids_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/ids/v1/internal/ids_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace ids_v1_internal { @@ -88,4 +91,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IDS_V1_INTERNAL_IDS_LOGGING_DECORATOR_H diff --git a/google/cloud/ids/v1/internal/ids_metadata_decorator.cc b/google/cloud/ids/v1/internal/ids_metadata_decorator.cc index 1ebfc98b7d7db..18a7ca76d7a95 100644 --- a/google/cloud/ids/v1/internal/ids_metadata_decorator.cc +++ b/google/cloud/ids/v1/internal/ids_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/ids/v1/ids.proto #include "google/cloud/ids/v1/internal/ids_metadata_decorator.h" +#include "google/cloud/ids/v1/ids.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace ids_v1_internal { @@ -139,3 +143,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace ids_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/ids/v1/internal/ids_metadata_decorator.h b/google/cloud/ids/v1/internal/ids_metadata_decorator.h index f5c95747d705f..14136cefa72be 100644 --- a/google/cloud/ids/v1/internal/ids_metadata_decorator.h +++ b/google/cloud/ids/v1/internal/ids_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/ids/v1/internal/ids_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace ids_v1_internal { @@ -94,4 +97,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IDS_V1_INTERNAL_IDS_METADATA_DECORATOR_H diff --git a/google/cloud/ids/v1/internal/ids_option_defaults.cc b/google/cloud/ids/v1/internal/ids_option_defaults.cc index 2ecb3c934f8b4..6ddd0eec048db 100644 --- a/google/cloud/ids/v1/internal/ids_option_defaults.cc +++ b/google/cloud/ids/v1/internal/ids_option_defaults.cc @@ -40,7 +40,7 @@ Options IDSDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - ids_v1::IDSLimitedTimeRetryPolicy(std::chrono::minutes(30)).clone()); + ids_v1::IDSLimitedTimeRetryPolicy(std::chrono::minutes(10)).clone()); } if (!options.has()) { options.set( diff --git a/google/cloud/ids/v1/internal/ids_stub.cc b/google/cloud/ids/v1/internal/ids_stub.cc index d46d5cfb5bb1d..c81e012bd4ebb 100644 --- a/google/cloud/ids/v1/internal/ids_stub.cc +++ b/google/cloud/ids/v1/internal/ids_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/ids/v1/ids.proto #include "google/cloud/ids/v1/internal/ids_stub.h" +#include "google/cloud/ids/v1/ids.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace ids_v1_internal { @@ -155,3 +158,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace ids_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/ids/v1/internal/ids_stub.h b/google/cloud/ids/v1/internal/ids_stub.h index b40f25e5a66a1..6efb12c1a2290 100644 --- a/google/cloud/ids/v1/internal/ids_stub.h +++ b/google/cloud/ids/v1/internal/ids_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IDS_V1_INTERNAL_IDS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IDS_V1_INTERNAL_IDS_STUB_H +#include "google/cloud/ids/v1/ids.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace ids_v1_internal { @@ -139,4 +142,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IDS_V1_INTERNAL_IDS_STUB_H diff --git a/google/cloud/ids/v1/internal/ids_stub_factory.cc b/google/cloud/ids/v1/internal/ids_stub_factory.cc index 20d54015e4f1a..104af0bd169e5 100644 --- a/google/cloud/ids/v1/internal/ids_stub_factory.cc +++ b/google/cloud/ids/v1/internal/ids_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/ids/v1/ids.proto #include "google/cloud/ids/v1/internal/ids_stub_factory.h" +#include "google/cloud/ids/v1/ids.grpc.pb.h" #include "google/cloud/ids/v1/internal/ids_auth_decorator.h" #include "google/cloud/ids/v1/internal/ids_logging_decorator.h" #include "google/cloud/ids/v1/internal/ids_metadata_decorator.h" @@ -28,10 +29,12 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace ids_v1_internal { @@ -68,3 +71,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace ids_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/ids/v1/internal/ids_stub_factory.h b/google/cloud/ids/v1/internal/ids_stub_factory.h index 4a16750c4e642..c1c1e6832cb91 100644 --- a/google/cloud/ids/v1/internal/ids_stub_factory.h +++ b/google/cloud/ids/v1/internal/ids_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace ids_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IDS_V1_INTERNAL_IDS_STUB_FACTORY_H diff --git a/google/cloud/ids/v1/internal/ids_tracing_connection.cc b/google/cloud/ids/v1/internal/ids_tracing_connection.cc index 2bae57defe769..316aec04fded7 100644 --- a/google/cloud/ids/v1/internal/ids_tracing_connection.cc +++ b/google/cloud/ids/v1/internal/ids_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace ids_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - IDSTracingConnection::IDSTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -98,15 +96,11 @@ IDSTracingConnection::DeleteEndpoint( return internal::EndSpan(std::move(span), child_->DeleteEndpoint(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeIDSTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/ids/v1/internal/ids_tracing_connection.h b/google/cloud/ids/v1/internal/ids_tracing_connection.h index 9672699cd80fa..148993e004737 100644 --- a/google/cloud/ids/v1/internal/ids_tracing_connection.h +++ b/google/cloud/ids/v1/internal/ids_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace ids_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class IDSTracingConnection : public ids_v1::IDSConnection { public: ~IDSTracingConnection() override = default; @@ -68,8 +66,6 @@ class IDSTracingConnection : public ids_v1::IDSConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/ids/v1/internal/ids_tracing_stub.cc b/google/cloud/ids/v1/internal/ids_tracing_stub.cc index 8f4353b02d34a..c12f5611d4f11 100644 --- a/google/cloud/ids/v1/internal/ids_tracing_stub.cc +++ b/google/cloud/ids/v1/internal/ids_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace ids_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - IDSTracingStub::IDSTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -133,17 +134,13 @@ future IDSTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeIDSTracingStub(std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace ids_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/ids/v1/internal/ids_tracing_stub.h b/google/cloud/ids/v1/internal/ids_tracing_stub.h index 8428c029ca76f..648750aac95e1 100644 --- a/google/cloud/ids/v1/internal/ids_tracing_stub.h +++ b/google/cloud/ids/v1/internal/ids_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace ids_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class IDSTracingStub : public IDSStub { public: ~IDSTracingStub() override = default; @@ -84,8 +85,6 @@ class IDSTracingStub : public IDSStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -99,4 +98,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_IDS_V1_INTERNAL_IDS_TRACING_STUB_H diff --git a/google/cloud/internal/absl_str_cat_quiet.h b/google/cloud/internal/absl_str_cat_quiet.h deleted file mode 100644 index a916af000e4a5..0000000000000 --- a/google/cloud/internal/absl_str_cat_quiet.h +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_ABSL_STR_CAT_QUIET_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_ABSL_STR_CAT_QUIET_H - -/** - * @file refactor the code to disable the warnings generated by - * "absl/strings/str_cat.h", include said header and re-enable the warnings. - * - * @see https://github.com/googleapis/google-cloud-cpp/issues/4501 for details - * as to why this is needed. - */ - -// TODO(#4501) - this file can be removed if #include works -#include "google/cloud/internal/diagnostics_push.inc" -#if _MSC_VER -#pragma warning(disable : 4244) -#endif // _MSC_VER -#include "absl/strings/str_cat.h" -// TODO(#4501) - end -#include "google/cloud/internal/diagnostics_pop.inc" - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_ABSL_STR_CAT_QUIET_H diff --git a/google/cloud/internal/absl_str_join_quiet.h b/google/cloud/internal/absl_str_join_quiet.h deleted file mode 100644 index 7ea1bef195b2a..0000000000000 --- a/google/cloud/internal/absl_str_join_quiet.h +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_ABSL_STR_JOIN_QUIET_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_ABSL_STR_JOIN_QUIET_H - -/** - * @file refactor the code to disable the warnings generated by - * "absl/strings/str_join.h", include said header and re-enable the warnings. - * - * @see https://github.com/googleapis/google-cloud-cpp/issues/4501 for details - * as to why this is needed. - */ - -// TODO(#4501) - this file can be removed if #include works -#include "google/cloud/internal/diagnostics_push.inc" -#if _MSC_VER -#pragma warning(disable : 4244) -#endif // _MSC_VER -#include "absl/strings/str_join.h" -// TODO(#4501) - end -#include "google/cloud/internal/diagnostics_pop.inc" - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_ABSL_STR_JOIN_QUIET_H diff --git a/google/cloud/internal/absl_str_replace_quiet.h b/google/cloud/internal/absl_str_replace_quiet.h deleted file mode 100644 index c47252a03afdf..0000000000000 --- a/google/cloud/internal/absl_str_replace_quiet.h +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_ABSL_STR_REPLACE_QUIET_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_ABSL_STR_REPLACE_QUIET_H - -/** - * @file refactor the code to disable the warnings generated by - * "absl/strings/str_replace.h", include said header and re-enable the - * warnings. - * - * @see https://github.com/googleapis/google-cloud-cpp/issues/4501 for details - * as to why this is needed. - */ - -// TODO(#4501) - this file can be removed if #include works -#include "google/cloud/internal/diagnostics_push.inc" -#if _MSC_VER -#pragma warning(disable : 4244) -#endif // _MSC_VER -#include "absl/strings/str_replace.h" -// TODO(#4501) - end -#include "google/cloud/internal/diagnostics_pop.inc" - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_ABSL_STR_REPLACE_QUIET_H diff --git a/google/cloud/internal/api_client_header.cc b/google/cloud/internal/api_client_header.cc index f68fa51865783..d3d482c7a65f2 100644 --- a/google/cloud/internal/api_client_header.cc +++ b/google/cloud/internal/api_client_header.cc @@ -13,8 +13,8 @@ // limitations under the License. #include "google/cloud/internal/api_client_header.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/compiler_info.h" +#include "absl/strings/str_cat.h" namespace google { namespace cloud { diff --git a/google/cloud/internal/async_connection_ready_test.cc b/google/cloud/internal/async_connection_ready_test.cc index fbf6feca8ba59..6dfe8a528bd26 100644 --- a/google/cloud/internal/async_connection_ready_test.cc +++ b/google/cloud/internal/async_connection_ready_test.cc @@ -100,8 +100,6 @@ TEST(CompletionQueueTest, SuccessfulWaitingForConnection) { cli_thread.join(); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TEST(CompletionQueueTest, PropagateCallContext) { auto span_catcher = testing_util::InstallSpanCatcher(); @@ -137,8 +135,6 @@ TEST(CompletionQueueTest, PropagateCallContext) { t.join(); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - } // namespace } // namespace internal GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END diff --git a/google/cloud/internal/async_long_running_operation.h b/google/cloud/internal/async_long_running_operation.h index f0b493bfe2ee9..dccd184c51521 100644 --- a/google/cloud/internal/async_long_running_operation.h +++ b/google/cloud/internal/async_long_running_operation.h @@ -25,7 +25,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/version.h" #include "absl/functional/function_ref.h" -#include +#include "google/longrunning/operations.pb.h" #include #include #include diff --git a/google/cloud/internal/async_long_running_operation_test.cc b/google/cloud/internal/async_long_running_operation_test.cc index f4f87d7aaa8ec..98a689a38e44c 100644 --- a/google/cloud/internal/async_long_running_operation_test.cc +++ b/google/cloud/internal/async_long_running_operation_test.cc @@ -19,8 +19,8 @@ #include "google/cloud/testing_util/is_proto_equal.h" #include "google/cloud/testing_util/mock_completion_queue_impl.h" #include "google/cloud/testing_util/status_matchers.h" -#include -#include +#include "google/protobuf/duration.pb.h" +#include "google/protobuf/timestamp.pb.h" #include #include diff --git a/google/cloud/internal/async_polling_loop.h b/google/cloud/internal/async_polling_loop.h index 69867c6ca93e2..19831cd85eaa5 100644 --- a/google/cloud/internal/async_polling_loop.h +++ b/google/cloud/internal/async_polling_loop.h @@ -21,7 +21,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.pb.h" #include #include #include diff --git a/google/cloud/internal/async_polling_loop_test.cc b/google/cloud/internal/async_polling_loop_test.cc index abb8f22a3e8e9..2ca520c9efb99 100644 --- a/google/cloud/internal/async_polling_loop_test.cc +++ b/google/cloud/internal/async_polling_loop_test.cc @@ -21,7 +21,7 @@ #include "google/cloud/testing_util/mock_completion_queue_impl.h" #include "google/cloud/testing_util/opentelemetry_matchers.h" #include "google/cloud/testing_util/status_matchers.h" -#include +#include "google/protobuf/timestamp.pb.h" #include #include @@ -642,7 +642,6 @@ TEST(AsyncPollingLoopTest, ConfigurePollContext) { HasSubstr("operation cancelled")))); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::EnableTracing; using ::google::cloud::testing_util::IsActive; using ::google::cloud::testing_util::OTelAttribute; @@ -773,8 +772,6 @@ TEST(AsyncPollingLoopTest, TraceCapturesOperationName) { "gl-cpp.LRO_name", "test-op-name"))))); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - } // namespace } // namespace internal GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END diff --git a/google/cloud/internal/async_read_write_stream_impl_test.cc b/google/cloud/internal/async_read_write_stream_impl_test.cc index f35ddf4925594..908e85294a8a5 100644 --- a/google/cloud/internal/async_read_write_stream_impl_test.cc +++ b/google/cloud/internal/async_read_write_stream_impl_test.cc @@ -215,8 +215,6 @@ TEST(AsyncReadWriteStreamingRpcTest, Error) { EXPECT_THAT(metadata.trailers, IsEmpty()); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - using ::google::cloud::testing_util::IsActive; TEST(AsyncReadWriteStreamingRpcTest, SpanActiveAcrossAsyncGrpcOperations) { @@ -330,8 +328,6 @@ TEST(AsyncReadWriteStreamingRpcTest, SpanActiveAcrossAsyncGrpcOperations) { (void)finish.get(); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - } // namespace } // namespace internal GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END diff --git a/google/cloud/internal/async_read_write_stream_logging_test.cc b/google/cloud/internal/async_read_write_stream_logging_test.cc index ded195054fa07..f481505262ef3 100644 --- a/google/cloud/internal/async_read_write_stream_logging_test.cc +++ b/google/cloud/internal/async_read_write_stream_logging_test.cc @@ -19,8 +19,8 @@ #include "google/cloud/testing_util/scoped_log.h" #include "google/cloud/testing_util/status_matchers.h" #include "google/cloud/tracing_options.h" -#include -#include +#include "google/protobuf/duration.pb.h" +#include "google/protobuf/timestamp.pb.h" #include namespace google { diff --git a/google/cloud/internal/async_read_write_stream_tracing.h b/google/cloud/internal/async_read_write_stream_tracing.h index 8d6be0a09541d..707daa4962fc5 100644 --- a/google/cloud/internal/async_read_write_stream_tracing.h +++ b/google/cloud/internal/async_read_write_stream_tracing.h @@ -15,7 +15,6 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_ASYNC_READ_WRITE_STREAM_TRACING_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_ASYNC_READ_WRITE_STREAM_TRACING_H -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/internal/async_read_write_stream_impl.h" #include "google/cloud/internal/grpc_opentelemetry.h" #include "google/cloud/version.h" @@ -132,6 +131,5 @@ class AsyncStreamingReadWriteRpcTracing GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_ASYNC_READ_WRITE_STREAM_TRACING_H diff --git a/google/cloud/internal/async_read_write_stream_tracing_test.cc b/google/cloud/internal/async_read_write_stream_tracing_test.cc index 8476e4b649fa4..3ea59eab6990d 100644 --- a/google/cloud/internal/async_read_write_stream_tracing_test.cc +++ b/google/cloud/internal/async_read_write_stream_tracing_test.cc @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/internal/async_read_write_stream_tracing.h" #include "google/cloud/mocks/mock_async_streaming_read_write_rpc.h" #include "google/cloud/internal/make_status.h" @@ -390,4 +389,3 @@ TEST(AsyncStreamingReadWriteRpcTracing, StartedStreamShouldExtractMetadata) { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/internal/async_rest_long_running_operation.h b/google/cloud/internal/async_rest_long_running_operation.h index 8f3b01f9453da..94bac4eb6119f 100644 --- a/google/cloud/internal/async_rest_long_running_operation.h +++ b/google/cloud/internal/async_rest_long_running_operation.h @@ -22,7 +22,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.pb.h" #include #include #include diff --git a/google/cloud/internal/async_rest_long_running_operation_custom_test.cc b/google/cloud/internal/async_rest_long_running_operation_custom_test.cc index 3fd0e2bf3328f..a23543ef657d6 100644 --- a/google/cloud/internal/async_rest_long_running_operation_custom_test.cc +++ b/google/cloud/internal/async_rest_long_running_operation_custom_test.cc @@ -20,8 +20,8 @@ #include "google/cloud/testing_util/is_proto_equal.h" #include "google/cloud/testing_util/mock_completion_queue_impl.h" #include "google/cloud/testing_util/status_matchers.h" -#include -#include +#include "google/protobuf/duration.pb.h" +#include "google/protobuf/timestamp.pb.h" #include #include diff --git a/google/cloud/internal/async_rest_long_running_operation_test.cc b/google/cloud/internal/async_rest_long_running_operation_test.cc index 6be56145b8661..1a91521dd118c 100644 --- a/google/cloud/internal/async_rest_long_running_operation_test.cc +++ b/google/cloud/internal/async_rest_long_running_operation_test.cc @@ -20,8 +20,8 @@ #include "google/cloud/testing_util/is_proto_equal.h" #include "google/cloud/testing_util/mock_completion_queue_impl.h" #include "google/cloud/testing_util/status_matchers.h" -#include -#include +#include "google/protobuf/duration.pb.h" +#include "google/protobuf/timestamp.pb.h" #include #include diff --git a/google/cloud/internal/async_rest_polling_loop.cc b/google/cloud/internal/async_rest_polling_loop.cc index 0d9e76a47a928..aa6a35d403b14 100644 --- a/google/cloud/internal/async_rest_polling_loop.cc +++ b/google/cloud/internal/async_rest_polling_loop.cc @@ -19,7 +19,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.pb.h" #include #include diff --git a/google/cloud/internal/async_rest_polling_loop.h b/google/cloud/internal/async_rest_polling_loop.h index b19d95e8aadfd..a4f7cf7377ae3 100644 --- a/google/cloud/internal/async_rest_polling_loop.h +++ b/google/cloud/internal/async_rest_polling_loop.h @@ -25,7 +25,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.pb.h" #include #include #include diff --git a/google/cloud/internal/async_rest_polling_loop_custom.h b/google/cloud/internal/async_rest_polling_loop_custom.h index fca11d85f2baf..2ef337c6d5b7d 100644 --- a/google/cloud/internal/async_rest_polling_loop_custom.h +++ b/google/cloud/internal/async_rest_polling_loop_custom.h @@ -27,7 +27,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.pb.h" #include #include #include diff --git a/google/cloud/internal/async_rest_polling_loop_custom_test.cc b/google/cloud/internal/async_rest_polling_loop_custom_test.cc index 316c4d8492b82..fdecfe0710172 100644 --- a/google/cloud/internal/async_rest_polling_loop_custom_test.cc +++ b/google/cloud/internal/async_rest_polling_loop_custom_test.cc @@ -16,8 +16,8 @@ #include "google/cloud/internal/make_status.h" #include "google/cloud/testing_util/mock_completion_queue_impl.h" #include "google/cloud/testing_util/status_matchers.h" -#include -#include +#include "google/protobuf/duration.pb.h" +#include "google/protobuf/timestamp.pb.h" #include namespace google { diff --git a/google/cloud/internal/async_rest_polling_loop_test.cc b/google/cloud/internal/async_rest_polling_loop_test.cc index 41b99ef54517f..b382b427bf8be 100644 --- a/google/cloud/internal/async_rest_polling_loop_test.cc +++ b/google/cloud/internal/async_rest_polling_loop_test.cc @@ -20,8 +20,8 @@ #include "google/cloud/testing_util/mock_completion_queue_impl.h" #include "google/cloud/testing_util/opentelemetry_matchers.h" #include "google/cloud/testing_util/status_matchers.h" -#include -#include +#include "google/protobuf/duration.pb.h" +#include "google/protobuf/timestamp.pb.h" #include namespace google { @@ -588,7 +588,6 @@ TEST(AsyncRestPollingLoopTest, PollThenCancelDuringPoll) { HasSubstr("operation cancelled")))); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::EnableTracing; using ::google::cloud::testing_util::IsActive; using ::google::cloud::testing_util::OTelAttribute; @@ -724,8 +723,6 @@ TEST(AsyncRestPollingLoopTest, TraceCapturesOperationName) { "gl-cpp.LRO_name", "test-op-name"))))); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace rest_internal diff --git a/google/cloud/internal/async_rest_retry_loop_test.cc b/google/cloud/internal/async_rest_retry_loop_test.cc index 1fa7e50cae506..092daf90b63e6 100644 --- a/google/cloud/internal/async_rest_retry_loop_test.cc +++ b/google/cloud/internal/async_rest_retry_loop_test.cc @@ -559,7 +559,6 @@ TEST_F(AsyncRestRetryLoopCancelTest, ShutdownDuringTimer) { Contains(Pair("gcloud-cpp.retry.function", "test-location"))); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::EnableTracing; using ::google::cloud::testing_util::IsActive; using ::google::cloud::testing_util::SpanNamed; @@ -615,8 +614,6 @@ TEST(AsyncRestRetryLoopTest, CallSpanActiveDuringCancel) { (void)actual.get(); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace rest_internal diff --git a/google/cloud/internal/async_retry_loop.h b/google/cloud/internal/async_retry_loop.h index 9866947c5b4d3..1d121d05902df 100644 --- a/google/cloud/internal/async_retry_loop.h +++ b/google/cloud/internal/async_retry_loop.h @@ -170,16 +170,23 @@ struct FutureValueType> { * functions. If the value is visible, the retry loop will stop on the next * callback and/or before the next request or timer is issued. */ -template +template < + typename Functor, typename Request, typename RetryPolicyType, + typename ReturnType = google::cloud::internal::invoke_result_t< + Functor, google::cloud::CompletionQueue&, + std::shared_ptr, ImmutableOptions, Request const&>> class AsyncRetryLoopImpl : public std::enable_shared_from_this< AsyncRetryLoopImpl> { public: - AsyncRetryLoopImpl(std::unique_ptr retry_policy, - std::unique_ptr backoff_policy, - Idempotency idempotency, google::cloud::CompletionQueue cq, - Functor&& functor, ImmutableOptions options, - Request request, char const* location) + AsyncRetryLoopImpl( + std::unique_ptr retry_policy, + std::unique_ptr backoff_policy, Idempotency idempotency, + google::cloud::CompletionQueue cq, Functor&& functor, + ImmutableOptions options, Request request, char const* location, + std::function< + bool(typename FutureValueType::value_type const&)> + attempt_predicate = {}) : retry_policy_(std::move(retry_policy)), backoff_policy_(std::move(backoff_policy)), idempotency_(idempotency), @@ -188,11 +195,9 @@ class AsyncRetryLoopImpl functor_(std::forward(functor)), request_(std::move(request)), location_(location), - call_context_(std::move(options)) {} + call_context_(std::move(options)), + attempt_predicate_(std::move(attempt_predicate)) {} - using ReturnType = ::google::cloud::internal::invoke_result_t< - Functor, google::cloud::CompletionQueue&, - std::shared_ptr, ImmutableOptions, Request const&>; using T = typename FutureValueType::value_type; future Start() { @@ -256,8 +261,11 @@ class AsyncRetryLoopImpl } void OnAttempt(T result) { - // A successful attempt, set the value and finish the loop. - if (result.ok()) return SetDone(std::move(result)); + // If the attempt is successful and satisfies the attempt predicate, if + // provided, set the value and finish the loop. + if (result.ok() && (!attempt_predicate_ || attempt_predicate_(result))) { + return SetDone(std::move(result)); + } // Some kind of failure, first verify that it is retryable. last_status_ = GetResultStatus(std::move(result)); auto delay = @@ -325,6 +333,8 @@ class AsyncRetryLoopImpl CallContext call_context_; Status last_status_; promise result_; + std::function::value_type const&)> + attempt_predicate_; // Only the following variables require synchronization, as they coordinate // the work between the retry loop (which would be lock-free) and the cancel @@ -339,17 +349,23 @@ class AsyncRetryLoopImpl /** * Create the right AsyncRetryLoopImpl object and start the retry loop on it. */ -template , - ImmutableOptions, Request const&>::value, - int> = 0> -auto AsyncRetryLoop(std::unique_ptr retry_policy, - std::unique_ptr backoff_policy, - Idempotency idempotency, google::cloud::CompletionQueue cq, - Functor&& functor, ImmutableOptions options, - Request request, char const* location) +template < + typename Functor, typename Request, typename RetryPolicyType, + std::enable_if_t, ImmutableOptions, + Request const&>::value, + int> = 0, + typename ReturnType = google::cloud::internal::invoke_result_t< + Functor, google::cloud::CompletionQueue&, + std::shared_ptr, ImmutableOptions, Request const&>> +auto AsyncRetryLoop( + std::unique_ptr retry_policy, + std::unique_ptr backoff_policy, Idempotency idempotency, + google::cloud::CompletionQueue cq, Functor&& functor, + ImmutableOptions options, Request request, char const* location, + std::function::value_type const&)> + attempt_predicate = {}) -> google::cloud::internal::invoke_result_t< Functor, google::cloud::CompletionQueue&, std::shared_ptr, ImmutableOptions, @@ -358,7 +374,7 @@ auto AsyncRetryLoop(std::unique_ptr retry_policy, std::make_shared>( std::move(retry_policy), std::move(backoff_policy), idempotency, std::move(cq), std::forward(functor), options, - std::move(request), location); + std::move(request), location, std::move(attempt_predicate)); return loop->Start(); } diff --git a/google/cloud/internal/async_retry_loop_test.cc b/google/cloud/internal/async_retry_loop_test.cc index 679c06f5da4e4..98f77b68ff07e 100644 --- a/google/cloud/internal/async_retry_loop_test.cc +++ b/google/cloud/internal/async_retry_loop_test.cc @@ -160,6 +160,32 @@ TEST(AsyncRetryLoopTest, TransientThenSuccess) { EXPECT_EQ(84, *actual); } +TEST(AsyncRetryLoopTest, TransientPredicateThenSuccess) { + AutomaticallyCreatedBackgroundThreads background; + ::testing::MockFunction)> mock_predicate; + EXPECT_CALL(mock_predicate, Call) + .WillOnce([](StatusOr const&) { return false; }) + .WillOnce([](StatusOr const&) { return false; }) + .WillOnce([](StatusOr const&) { return true; }); + + auto pending = AsyncRetryLoop( + TestRetryPolicy(), TestBackoffPolicy(), Idempotency::kIdempotent, + background.cq(), + [&](google::cloud::CompletionQueue&, auto, + ImmutableOptions const& options, int request) { + EXPECT_EQ(options->get(), "TransientPredicateThenSuccess"); + return make_ready_future(StatusOr(2 * request)); + }, + MakeImmutableOptions( + Options{}.set("TransientPredicateThenSuccess")), + 42, "error message", mock_predicate.AsStdFunction()); + + OptionsSpan overlay(Options{}.set("uh-oh")); + StatusOr actual = pending.get(); + ASSERT_THAT(actual.status(), IsOk()); + EXPECT_EQ(84, *actual); +} + TEST(AsyncRetryLoopTest, ReturnJustStatus) { int counter = 0; AutomaticallyCreatedBackgroundThreads background; @@ -604,7 +630,6 @@ TEST_F(AsyncRetryLoopCancelTest, ShutdownDuringTimer) { Contains(Pair("gcloud-cpp.retry.function", "test-location"))); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::EnableTracing; using ::google::cloud::testing_util::IsActive; using ::google::cloud::testing_util::SpanNamed; @@ -658,8 +683,6 @@ TEST(AsyncRetryLoopTest, CallSpanActiveDuringCancel) { (void)actual.get(); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - } // namespace } // namespace internal GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END diff --git a/google/cloud/internal/async_retry_unary_rpc.h b/google/cloud/internal/async_retry_unary_rpc.h index b9f0fa367f317..930ccf4773581 100644 --- a/google/cloud/internal/async_retry_unary_rpc.h +++ b/google/cloud/internal/async_retry_unary_rpc.h @@ -21,7 +21,7 @@ #include "google/cloud/internal/setup_context.h" #include "google/cloud/retry_policy.h" #include "google/cloud/version.h" -#include +#include "google/protobuf/empty.pb.h" #include #include diff --git a/google/cloud/internal/async_retry_unary_rpc_test.cc b/google/cloud/internal/async_retry_unary_rpc_test.cc index dcd6b43af8c66..4c1d6cf21307f 100644 --- a/google/cloud/internal/async_retry_unary_rpc_test.cc +++ b/google/cloud/internal/async_retry_unary_rpc_test.cc @@ -19,8 +19,8 @@ #include "google/cloud/testing_util/fake_completion_queue_impl.h" #include "google/cloud/testing_util/mock_async_response_reader.h" #include "google/cloud/testing_util/status_matchers.h" -#include -#include +#include "google/protobuf/duration.pb.h" +#include "google/protobuf/timestamp.pb.h" #include #include diff --git a/google/cloud/internal/async_streaming_read_rpc_impl_test.cc b/google/cloud/internal/async_streaming_read_rpc_impl_test.cc index 31ec5c6eb3309..e8a1fbfaede47 100644 --- a/google/cloud/internal/async_streaming_read_rpc_impl_test.cc +++ b/google/cloud/internal/async_streaming_read_rpc_impl_test.cc @@ -172,8 +172,6 @@ TEST(AsyncStreamingReadRpcTest, Error) { stream.Finish().get()); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - using ::google::cloud::testing_util::IsActive; TEST(AsyncStreamingReadRpcTest, SpanActiveAcrossAsyncGrpcOperations) { @@ -262,8 +260,6 @@ TEST(AsyncStreamingReadRpcTest, SpanActiveAcrossAsyncGrpcOperations) { (void)finish.get(); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - } // namespace } // namespace internal GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END diff --git a/google/cloud/internal/async_streaming_read_rpc_logging.h b/google/cloud/internal/async_streaming_read_rpc_logging.h index efc23b67a88d0..112f68dc9d2e0 100644 --- a/google/cloud/internal/async_streaming_read_rpc_logging.h +++ b/google/cloud/internal/async_streaming_read_rpc_logging.h @@ -15,12 +15,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_ASYNC_STREAMING_READ_RPC_LOGGING_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_ASYNC_STREAMING_READ_RPC_LOGGING_H -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/async_streaming_read_rpc.h" #include "google/cloud/internal/grpc_request_metadata.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" +#include "absl/strings/str_join.h" namespace google { namespace cloud { diff --git a/google/cloud/internal/async_streaming_read_rpc_logging_test.cc b/google/cloud/internal/async_streaming_read_rpc_logging_test.cc index b2b7ec9825be6..55cf6fc41ca98 100644 --- a/google/cloud/internal/async_streaming_read_rpc_logging_test.cc +++ b/google/cloud/internal/async_streaming_read_rpc_logging_test.cc @@ -18,7 +18,7 @@ #include "google/cloud/testing_util/scoped_log.h" #include "google/cloud/testing_util/status_matchers.h" #include "google/cloud/tracing_options.h" -#include +#include "google/protobuf/duration.pb.h" #include namespace google { diff --git a/google/cloud/internal/async_streaming_read_rpc_tracing.h b/google/cloud/internal/async_streaming_read_rpc_tracing.h index 71e77f2d02732..2099531b2754d 100644 --- a/google/cloud/internal/async_streaming_read_rpc_tracing.h +++ b/google/cloud/internal/async_streaming_read_rpc_tracing.h @@ -15,7 +15,6 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_ASYNC_STREAMING_READ_RPC_TRACING_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_ASYNC_STREAMING_READ_RPC_TRACING_H -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/internal/async_streaming_read_rpc.h" #include "google/cloud/internal/grpc_opentelemetry.h" #include "google/cloud/version.h" @@ -108,6 +107,5 @@ class AsyncStreamingReadRpcTracing : public AsyncStreamingReadRpc { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_ASYNC_STREAMING_READ_RPC_TRACING_H diff --git a/google/cloud/internal/async_streaming_read_rpc_tracing_test.cc b/google/cloud/internal/async_streaming_read_rpc_tracing_test.cc index 8879d4882af90..52113a5ccb225 100644 --- a/google/cloud/internal/async_streaming_read_rpc_tracing_test.cc +++ b/google/cloud/internal/async_streaming_read_rpc_tracing_test.cc @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/internal/async_streaming_read_rpc_tracing.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/internal/opentelemetry.h" @@ -266,4 +265,3 @@ TEST(AsyncStreamingReadRpcTracing, StartedStreamShouldExtractMetadata) { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/internal/async_streaming_write_rpc_impl_test.cc b/google/cloud/internal/async_streaming_write_rpc_impl_test.cc index 235a2939c22b9..b065dec84d8bf 100644 --- a/google/cloud/internal/async_streaming_write_rpc_impl_test.cc +++ b/google/cloud/internal/async_streaming_write_rpc_impl_test.cc @@ -184,8 +184,6 @@ TEST(AsyncStreamingWriteRpcTest, Error) { stream.Finish().get().status()); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - using ::google::cloud::testing_util::IsActive; TEST(AsyncStreamingWriteRpcTest, SpanActiveAcrossAsyncGrpcOperations) { @@ -287,8 +285,6 @@ TEST(AsyncStreamingWriteRpcTest, SpanActiveAcrossAsyncGrpcOperations) { (void)finish.get(); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - } // namespace } // namespace internal GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END diff --git a/google/cloud/internal/async_streaming_write_rpc_logging.h b/google/cloud/internal/async_streaming_write_rpc_logging.h index 4f33ec409f460..268ee3224e14b 100644 --- a/google/cloud/internal/async_streaming_write_rpc_logging.h +++ b/google/cloud/internal/async_streaming_write_rpc_logging.h @@ -15,12 +15,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_ASYNC_STREAMING_WRITE_RPC_LOGGING_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_ASYNC_STREAMING_WRITE_RPC_LOGGING_H -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/async_streaming_write_rpc.h" #include "google/cloud/internal/grpc_request_metadata.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" +#include "absl/strings/str_join.h" namespace google { namespace cloud { diff --git a/google/cloud/internal/async_streaming_write_rpc_logging_test.cc b/google/cloud/internal/async_streaming_write_rpc_logging_test.cc index 2838c0ce1bbba..4097c0dd884d4 100644 --- a/google/cloud/internal/async_streaming_write_rpc_logging_test.cc +++ b/google/cloud/internal/async_streaming_write_rpc_logging_test.cc @@ -18,8 +18,8 @@ #include "google/cloud/testing_util/scoped_log.h" #include "google/cloud/testing_util/status_matchers.h" #include "google/cloud/tracing_options.h" -#include -#include +#include "google/protobuf/duration.pb.h" +#include "google/protobuf/timestamp.pb.h" #include namespace google { diff --git a/google/cloud/internal/async_streaming_write_rpc_tracing.h b/google/cloud/internal/async_streaming_write_rpc_tracing.h index e962f7ac95c41..de64ccc9306e0 100644 --- a/google/cloud/internal/async_streaming_write_rpc_tracing.h +++ b/google/cloud/internal/async_streaming_write_rpc_tracing.h @@ -15,7 +15,6 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_ASYNC_STREAMING_WRITE_RPC_TRACING_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_ASYNC_STREAMING_WRITE_RPC_TRACING_H -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/internal/async_streaming_write_rpc.h" #include "google/cloud/internal/grpc_opentelemetry.h" #include "google/cloud/version.h" @@ -122,6 +121,5 @@ class AsyncStreamingWriteRpcTracing GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_ASYNC_STREAMING_WRITE_RPC_TRACING_H diff --git a/google/cloud/internal/async_streaming_write_rpc_tracing_test.cc b/google/cloud/internal/async_streaming_write_rpc_tracing_test.cc index f7906db2982c5..960c0affac56c 100644 --- a/google/cloud/internal/async_streaming_write_rpc_tracing_test.cc +++ b/google/cloud/internal/async_streaming_write_rpc_tracing_test.cc @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/internal/async_streaming_write_rpc_tracing.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/internal/opentelemetry.h" @@ -293,4 +292,3 @@ TEST(AsyncStreamingWriteRpcTracing, StartedStreamShouldExtractMetadata) { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/internal/base64_transforms.cc b/google/cloud/internal/base64_transforms.cc index 3a8d5c52155ef..d7a33201142ff 100644 --- a/google/cloud/internal/base64_transforms.cc +++ b/google/cloud/internal/base64_transforms.cc @@ -13,8 +13,8 @@ // limitations under the License. #include "google/cloud/internal/base64_transforms.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/make_status.h" +#include "absl/strings/str_cat.h" #include namespace google { diff --git a/google/cloud/internal/call_context.h b/google/cloud/internal/call_context.h index eb6575f0aab47..0134614de518e 100644 --- a/google/cloud/internal/call_context.h +++ b/google/cloud/internal/call_context.h @@ -18,11 +18,9 @@ #include "google/cloud/internal/opentelemetry_context.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include #include #include -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include #include @@ -44,9 +42,7 @@ struct CallContext { CallContext() : CallContext(SaveCurrentOptions()) {} ImmutableOptions options; -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY OTelContext otel_context = CurrentOTelContext(); -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY }; /** @@ -58,13 +54,10 @@ class ScopedCallContext { public: explicit ScopedCallContext(CallContext call_context) : options_span_(std::move(call_context.options)) -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY // clang-format off , scoped_otel_context_(std::move(call_context.otel_context)) // clang-format on -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - { - } + {} // `ScopedCallContext` should not be copied/moved. ScopedCallContext(ScopedCallContext const&) = delete; @@ -78,9 +71,7 @@ class ScopedCallContext { private: OptionsSpan options_span_; -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY ScopedOTelContext scoped_otel_context_; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY }; } // namespace internal diff --git a/google/cloud/internal/call_context_test.cc b/google/cloud/internal/call_context_test.cc index 79e1c2c2c74fb..d05231e8ce817 100644 --- a/google/cloud/internal/call_context_test.cc +++ b/google/cloud/internal/call_context_test.cc @@ -44,7 +44,6 @@ TEST(CallContext, Options) { EXPECT_FALSE(CallContext().options->has()); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::testing::ElementsAre; using ::testing::IsEmpty; @@ -67,8 +66,6 @@ TEST(CallContext, OTel) { EXPECT_THAT(CallContext().otel_context, IsEmpty()); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - } // namespace } // namespace internal GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END diff --git a/google/cloud/internal/credentials_impl.cc b/google/cloud/internal/credentials_impl.cc index e7c1fd2f82a90..f3a4b8ee9e515 100644 --- a/google/cloud/internal/credentials_impl.cc +++ b/google/cloud/internal/credentials_impl.cc @@ -87,9 +87,11 @@ std::vector const& ImpersonateServiceAccountConfig::delegates() return options_.get(); } -ServiceAccountConfig::ServiceAccountConfig(std::string json_object, - Options opts) +ServiceAccountConfig::ServiceAccountConfig( + absl::optional json_object, + absl::optional file_path, Options opts) : json_object_(std::move(json_object)), + file_path_(std::move(file_path)), options_(PopulateAuthOptions(std::move(opts))) {} ExternalAccountConfig::ExternalAccountConfig(std::string json_object, diff --git a/google/cloud/internal/credentials_impl.h b/google/cloud/internal/credentials_impl.h index 94af7f2e40b89..4b7eea36ab21e 100644 --- a/google/cloud/internal/credentials_impl.h +++ b/google/cloud/internal/credentials_impl.h @@ -144,15 +144,23 @@ class ImpersonateServiceAccountConfig : public Credentials { class ServiceAccountConfig : public Credentials { public: - ServiceAccountConfig(std::string json_object, Options opts); - - std::string const& json_object() const { return json_object_; } + // Only one of json_object or file_path should have a value. + // TODO(#15886): Use the C++ type system to make better constructors that + // enforces this comment. + ServiceAccountConfig(absl::optional json_object, + absl::optional file_path, Options opts); + + absl::optional const& json_object() const { + return json_object_; + } + absl::optional const& file_path() const { return file_path_; } Options const& options() const { return options_; } private: void dispatch(CredentialsVisitor& v) const override { v.visit(*this); } - std::string json_object_; + absl::optional json_object_; + absl::optional file_path_; Options options_; }; diff --git a/google/cloud/internal/curl_impl.cc b/google/cloud/internal/curl_impl.cc index a5218bb547b0a..c20667a4b5b3d 100644 --- a/google/cloud/internal/curl_impl.cc +++ b/google/cloud/internal/curl_impl.cc @@ -15,8 +15,6 @@ #include "google/cloud/internal/curl_impl.h" #include "google/cloud/common_options.h" #include "google/cloud/credentials.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/curl_options.h" #include "google/cloud/internal/curl_writev.h" @@ -26,6 +24,8 @@ #include "google/cloud/log.h" #include "google/cloud/rest_options.h" #include "absl/strings/match.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include "absl/strings/strip.h" #include #include diff --git a/google/cloud/internal/curl_rest_client.cc b/google/cloud/internal/curl_rest_client.cc index d0abda63df0b9..04f5ec98cea6b 100644 --- a/google/cloud/internal/curl_rest_client.cc +++ b/google/cloud/internal/curl_rest_client.cc @@ -15,8 +15,6 @@ #include "google/cloud/internal/curl_rest_client.h" #include "google/cloud/common_options.h" #include "google/cloud/credentials.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/curl_handle_factory.h" #include "google/cloud/internal/curl_impl.h" #include "google/cloud/internal/curl_options.h" @@ -26,6 +24,8 @@ #include "google/cloud/internal/tracing_rest_client.h" #include "google/cloud/internal/unified_rest_credentials.h" #include "absl/strings/match.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include "absl/strings/strip.h" namespace google { diff --git a/google/cloud/internal/curl_wrappers.cc b/google/cloud/internal/curl_wrappers.cc index c886f54725421..ef3bb59e4f066 100644 --- a/google/cloud/internal/curl_wrappers.cc +++ b/google/cloud/internal/curl_wrappers.cc @@ -13,12 +13,12 @@ // limitations under the License. #include "google/cloud/internal/curl_wrappers.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_replace_quiet.h" #include "google/cloud/internal/curl_options.h" #include "google/cloud/internal/throw_delegate.h" #include "google/cloud/log.h" #include "absl/strings/match.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_replace.h" #include "absl/strings/str_split.h" #ifndef _WIN32 #include diff --git a/google/cloud/internal/debug_string.h b/google/cloud/internal/debug_string.h index fb4631ada7dbc..3c9f60d0de2b7 100644 --- a/google/cloud/internal/debug_string.h +++ b/google/cloud/internal/debug_string.h @@ -15,9 +15,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_DEBUG_STRING_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_DEBUG_STRING_H -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" +#include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include "absl/time/time.h" #include "absl/types/optional.h" diff --git a/google/cloud/internal/debug_string_protobuf.cc b/google/cloud/internal/debug_string_protobuf.cc index 30e6412e6d3a3..e652d2458bbd5 100644 --- a/google/cloud/internal/debug_string_protobuf.cc +++ b/google/cloud/internal/debug_string_protobuf.cc @@ -13,11 +13,11 @@ // limitations under the License. #include "google/cloud/internal/debug_string_protobuf.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" +#include "absl/strings/str_cat.h" #include "absl/time/time.h" -#include +#include "google/protobuf/duration.pb.h" +#include "google/protobuf/timestamp.pb.h" #include -#include namespace google { namespace cloud { diff --git a/google/cloud/internal/debug_string_protobuf_test.cc b/google/cloud/internal/debug_string_protobuf_test.cc index bc23db2879b78..bb6bfed365c57 100644 --- a/google/cloud/internal/debug_string_protobuf_test.cc +++ b/google/cloud/internal/debug_string_protobuf_test.cc @@ -15,10 +15,10 @@ #include "google/cloud/internal/debug_string_protobuf.h" #include "google/cloud/testing_util/scoped_log.h" #include "google/cloud/tracing_options.h" -#include -#include +#include "google/iam/v1/policy.pb.h" +#include "google/protobuf/duration.pb.h" +#include "google/protobuf/timestamp.pb.h" #include -#include #include namespace google { diff --git a/google/cloud/internal/debug_string_status.cc b/google/cloud/internal/debug_string_status.cc index 4f6655e2862eb..1ef72d76bffa0 100644 --- a/google/cloud/internal/debug_string_status.cc +++ b/google/cloud/internal/debug_string_status.cc @@ -15,9 +15,9 @@ #include "google/cloud/internal/debug_string_status.h" #include "google/cloud/internal/debug_string_protobuf.h" #include "google/cloud/internal/status_payload_keys.h" -#include -#include -#include +#include "google/protobuf/any.pb.h" +#include "google/rpc/error_details.pb.h" +#include "google/rpc/status.pb.h" #include namespace google { diff --git a/google/cloud/internal/debug_string_status_test.cc b/google/cloud/internal/debug_string_status_test.cc index d1f1bec903442..008605e063309 100644 --- a/google/cloud/internal/debug_string_status_test.cc +++ b/google/cloud/internal/debug_string_status_test.cc @@ -15,8 +15,8 @@ #include "google/cloud/internal/debug_string_status.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/tracing_options.h" -#include -#include +#include "google/rpc/error_details.pb.h" +#include "google/rpc/status.pb.h" #include namespace google { diff --git a/google/cloud/internal/error_context.cc b/google/cloud/internal/error_context.cc index 835029c79c3c7..fe937134ae2a2 100644 --- a/google/cloud/internal/error_context.cc +++ b/google/cloud/internal/error_context.cc @@ -13,8 +13,8 @@ // limitations under the License. #include "google/cloud/internal/error_context.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_join_quiet.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" namespace google { namespace cloud { diff --git a/google/cloud/internal/external_account_source_format.cc b/google/cloud/internal/external_account_source_format.cc index 63b48e9ec0a07..1a65a289d2e3c 100644 --- a/google/cloud/internal/external_account_source_format.cc +++ b/google/cloud/internal/external_account_source_format.cc @@ -13,9 +13,9 @@ // limitations under the License. #include "google/cloud/internal/external_account_source_format.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/json_parsing.h" #include "google/cloud/internal/make_status.h" +#include "absl/strings/str_cat.h" namespace google { namespace cloud { diff --git a/google/cloud/internal/external_account_token_source_aws.cc b/google/cloud/internal/external_account_token_source_aws.cc index 35f066c1b46c9..e79c10ade182a 100644 --- a/google/cloud/internal/external_account_token_source_aws.cc +++ b/google/cloud/internal/external_account_token_source_aws.cc @@ -13,9 +13,6 @@ // limitations under the License. #include "google/cloud/internal/external_account_token_source_aws.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_join_quiet.h" -#include "google/cloud/internal/absl_str_replace_quiet.h" #include "google/cloud/internal/external_account_source_format.h" #include "google/cloud/internal/format_time_point.h" #include "google/cloud/internal/getenv.h" @@ -25,6 +22,9 @@ #include "google/cloud/internal/sha256_hmac.h" #include "google/cloud/internal/url_encode.h" #include "absl/strings/match.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "absl/strings/str_replace.h" #include "absl/strings/str_split.h" #include "absl/strings/string_view.h" #include diff --git a/google/cloud/internal/extract_long_running_result.h b/google/cloud/internal/extract_long_running_result.h index 8ae14cfc9b5d2..15a269513aff0 100644 --- a/google/cloud/internal/extract_long_running_result.h +++ b/google/cloud/internal/extract_long_running_result.h @@ -18,8 +18,8 @@ #include "google/cloud/status_or.h" #include "google/cloud/version.h" #include "absl/functional/function_ref.h" -#include -#include +#include "google/longrunning/operations.pb.h" +#include "google/protobuf/any.pb.h" #include namespace google { diff --git a/google/cloud/internal/extract_long_running_result_test.cc b/google/cloud/internal/extract_long_running_result_test.cc index 8d99f402d261f..7eb810a85416e 100644 --- a/google/cloud/internal/extract_long_running_result_test.cc +++ b/google/cloud/internal/extract_long_running_result_test.cc @@ -16,7 +16,7 @@ #include "google/cloud/testing_util/is_proto_equal.h" #include "google/cloud/testing_util/mock_completion_queue_impl.h" #include "google/cloud/testing_util/status_matchers.h" -#include +#include "google/protobuf/timestamp.pb.h" #include namespace google { diff --git a/google/cloud/internal/future_impl.cc b/google/cloud/internal/future_impl.cc index 388a480d23bd7..066318e49e837 100644 --- a/google/cloud/internal/future_impl.cc +++ b/google/cloud/internal/future_impl.cc @@ -17,46 +17,6 @@ #include "google/cloud/terminate_handler.h" #include -// This function is only needed if exceptions are enabled. -#ifdef GOOGLE_CLOUD_CPP_HAVE_EXCEPTIONS -// TODO(#14152): Remove libC++ hack -// The `std::future_error::future_error(std::future_errc)` constructor is not -// guaranteed to exist until C++17. Fortunately, stdlibc++, MSVC are forgiving, -// and libc++ is forgiving until version 18.1. -#if GOOGLE_CLOUD_CPP_CPP_VERSION >= 201703L || _LIBCPP_VERSION < 180100 - -namespace { -std::future_error MakeFutureErrorImpl(std::future_errc ec) { - return std::future_error(ec); -} -} // namespace - -#else -// We can probably tolerate this terrible hack (which depends on UB) until we -// require C++17. -namespace { -struct OhTheHorrors {}; -} // namespace - -namespace std { -template <> -class promise { - public: - static auto MakeFutureError(std::future_errc ec) { - return std::future_error(std::make_error_code(ec)); - } -}; -} // namespace std - -namespace { -std::future_error MakeFutureErrorImpl(std::future_errc ec) { - return std::promise::MakeFutureError(ec); -} -} // namespace - -#endif -#endif // GOOGLE_CLOUD_CPP_HAVE_EXCEPTIONS - namespace google { namespace cloud { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN @@ -65,7 +25,7 @@ namespace internal { [[noreturn]] void ThrowFutureError(std::future_errc ec, char const* msg) { #ifdef GOOGLE_CLOUD_CPP_HAVE_EXCEPTIONS (void)msg; // disable unused argument warning. - throw MakeFutureErrorImpl(ec); + throw std::future_error(ec); #else std::string full_msg = "future_error["; full_msg += std::make_error_code(ec).message(); @@ -87,7 +47,7 @@ namespace internal { std::exception_ptr MakeFutureError(std::future_errc ec) { #ifdef GOOGLE_CLOUD_CPP_HAVE_EXCEPTIONS - return std::make_exception_ptr(MakeFutureErrorImpl(ec)); + return std::make_exception_ptr(std::future_error(ec)); #else (void)ec; // We cannot create a valid `std::exception_ptr` in this case. It does not diff --git a/google/cloud/internal/grpc_impersonate_service_account_integration_test.cc b/google/cloud/internal/grpc_impersonate_service_account_integration_test.cc index 684a389ea00d6..7f1518a1e1cee 100644 --- a/google/cloud/internal/grpc_impersonate_service_account_integration_test.cc +++ b/google/cloud/internal/grpc_impersonate_service_account_integration_test.cc @@ -22,7 +22,7 @@ #include "google/cloud/log.h" #include "google/cloud/testing_util/integration_test.h" #include "google/cloud/testing_util/status_matchers.h" -#include +#include "google/bigtable/admin/v2/bigtable_table_admin.grpc.pb.h" #include namespace google { diff --git a/google/cloud/internal/grpc_opentelemetry.cc b/google/cloud/internal/grpc_opentelemetry.cc index 0f9308bbab1b1..34917c46791b2 100644 --- a/google/cloud/internal/grpc_opentelemetry.cc +++ b/google/cloud/internal/grpc_opentelemetry.cc @@ -13,7 +13,6 @@ // limitations under the License. #include "google/cloud/internal/grpc_opentelemetry.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/grpc_metadata_view.h" #include "google/cloud/internal/grpc_request_metadata.h" #include "google/cloud/internal/noexcept_action.h" @@ -21,22 +20,20 @@ #include "google/cloud/log.h" #include "google/cloud/options.h" #include "absl/strings/match.h" +#include "absl/strings/str_cat.h" #include -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include #include -#include +#include +#include #include #include -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY namespace google { namespace cloud { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN namespace internal { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - namespace { /** @@ -110,17 +107,17 @@ std::pair MakeAttribute( opentelemetry::nostd::shared_ptr MakeSpanGrpc( opentelemetry::nostd::string_view service, opentelemetry::nostd::string_view method) { - namespace sc = opentelemetry::trace::SemanticConventions; + namespace sc = opentelemetry::semconv; opentelemetry::trace::StartSpanOptions options; options.kind = opentelemetry::trace::SpanKind::kClient; return internal::MakeSpan( absl::StrCat(absl::string_view{service.data(), service.size()}, "/", absl::string_view{method.data(), method.size()}), - {{sc::kRpcSystem, sc::RpcSystemValues::kGrpc}, - {sc::kRpcService, service}, - {sc::kRpcMethod, method}, + {{sc::rpc::kRpcSystem, sc::rpc::RpcSystemValues::kGrpc}, + {sc::rpc::kRpcService, service}, + {sc::rpc::kRpcMethod, method}, {/*sc::kNetworkTransport=*/"network.transport", - sc::NetTransportValues::kIpTcp}, + sc::network::NetworkTransportValues::kTcp}, {"grpc.version", grpc::Version()}}, options); } @@ -165,7 +162,6 @@ future EndSpan( return EndSpan(*s, std::move(t)); }); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } // namespace internal GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END diff --git a/google/cloud/internal/grpc_opentelemetry.h b/google/cloud/internal/grpc_opentelemetry.h index 500e3c67c363f..9ea8bc86a80e2 100644 --- a/google/cloud/internal/grpc_opentelemetry.h +++ b/google/cloud/internal/grpc_opentelemetry.h @@ -22,10 +22,8 @@ #include "google/cloud/options.h" #include "google/cloud/version.h" #include -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include #include -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include #include @@ -34,8 +32,6 @@ namespace cloud { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN namespace internal { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Make a span, setting attributes related to gRPC. * @@ -112,8 +108,6 @@ future> EndSpan( }); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Returns a traced timer, if OpenTelemetry tracing is enabled. */ @@ -121,14 +115,12 @@ template future> TracedAsyncBackoff( CompletionQueue& cq, Options const& options, std::chrono::duration duration, std::string const& name) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (TracingEnabled(options)) { auto span = MakeSpan(name); OTelScope scope(span); auto timer = cq.MakeRelativeTimer(duration); return EndSpan(std::move(span), std::move(timer)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY (void)options; (void)name; return cq.MakeRelativeTimer(duration); diff --git a/google/cloud/internal/grpc_opentelemetry_test.cc b/google/cloud/internal/grpc_opentelemetry_test.cc index 135ce26dabfef..2ad4667b69d0a 100644 --- a/google/cloud/internal/grpc_opentelemetry_test.cc +++ b/google/cloud/internal/grpc_opentelemetry_test.cc @@ -22,10 +22,9 @@ #include "google/cloud/testing_util/validate_propagator.h" #include #include -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include -#include -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY +#include +#include namespace google { namespace cloud { @@ -36,7 +35,6 @@ namespace { using ::testing::ByMove; using ::testing::Return; -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::DisableTracing; using ::google::cloud::testing_util::EnableTracing; using ::google::cloud::testing_util::InstallSpanCatcher; @@ -57,7 +55,7 @@ using ::testing::IsEmpty; using ::testing::Pair; TEST(OpenTelemetry, MakeSpanGrpc) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); auto span = MakeSpanGrpc("google.cloud.foo.v1.Foo", "GetBar"); @@ -70,14 +68,14 @@ TEST(OpenTelemetry, MakeSpanGrpc) { SpanHasInstrumentationScope(), SpanKindIsClient(), SpanNamed("google.cloud.foo.v1.Foo/GetBar"), SpanHasAttributes( - OTelAttribute(sc::kRpcSystem, - sc::RpcSystemValues::kGrpc), - OTelAttribute(sc::kRpcService, + OTelAttribute(sc::rpc::kRpcSystem, + sc::rpc::RpcSystemValues::kGrpc), + OTelAttribute(sc::rpc::kRpcService, "google.cloud.foo.v1.Foo"), - OTelAttribute(sc::kRpcMethod, "GetBar"), + OTelAttribute(sc::rpc::kRpcMethod, "GetBar"), OTelAttribute( /*sc::kNetworkTransport=*/"network.transport", - sc::NetTransportValues::kIpTcp), + sc::network::NetworkTransportValues::kTcp), OTelAttribute("grpc.version", grpc::Version()))))); } @@ -321,22 +319,6 @@ TEST(OpenTelemetry, TracedAsyncBackoffPreservesContext) { SpanNamed("parent"))); } -#else - -TEST(NoOpenTelemetry, TracedAsyncBackoff) { - auto const duration = std::chrono::nanoseconds(100); - auto mock_cq = std::make_shared(); - EXPECT_CALL(*mock_cq, MakeRelativeTimer(duration)) - .WillOnce(Return(ByMove(make_ready_future( - make_status_or(std::chrono::system_clock::now()))))); - CompletionQueue cq(mock_cq); - - auto f = TracedAsyncBackoff(cq, Options{}, duration, "Async Backoff"); - EXPECT_STATUS_OK(f.get()); -} - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - } // namespace } // namespace internal GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END diff --git a/google/cloud/internal/grpc_request_metadata.cc b/google/cloud/internal/grpc_request_metadata.cc index 8cecfd683c287..008877f213a24 100644 --- a/google/cloud/internal/grpc_request_metadata.cc +++ b/google/cloud/internal/grpc_request_metadata.cc @@ -13,9 +13,9 @@ // limitations under the License. #include "google/cloud/internal/grpc_request_metadata.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/grpc_metadata_view.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include namespace google { diff --git a/google/cloud/internal/http_header.cc b/google/cloud/internal/http_header.cc index a1eb507989c36..32d0220797bd9 100644 --- a/google/cloud/internal/http_header.cc +++ b/google/cloud/internal/http_header.cc @@ -13,8 +13,8 @@ // limitations under the License. #include "google/cloud/internal/http_header.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_join_quiet.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include "absl/strings/strip.h" namespace google { diff --git a/google/cloud/internal/json_parsing.cc b/google/cloud/internal/json_parsing.cc index 77eb2ce902ddb..b1e42321debe5 100644 --- a/google/cloud/internal/json_parsing.cc +++ b/google/cloud/internal/json_parsing.cc @@ -13,8 +13,8 @@ // limitations under the License. #include "google/cloud/internal/json_parsing.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/make_status.h" +#include "absl/strings/str_cat.h" namespace google { namespace cloud { diff --git a/google/cloud/internal/log_wrapper_test.cc b/google/cloud/internal/log_wrapper_test.cc index 281fe1be5be4e..da021d88f6e62 100644 --- a/google/cloud/internal/log_wrapper_test.cc +++ b/google/cloud/internal/log_wrapper_test.cc @@ -18,8 +18,8 @@ #include "google/cloud/testing_util/scoped_log.h" #include "google/cloud/testing_util/status_matchers.h" #include "google/cloud/tracing_options.h" -#include -#include +#include "google/protobuf/duration.pb.h" +#include "google/protobuf/timestamp.pb.h" #include #include #include diff --git a/google/cloud/internal/minimal_iam_credentials_stub.cc b/google/cloud/internal/minimal_iam_credentials_stub.cc index d88ca2e5582d3..265e2711eda9b 100644 --- a/google/cloud/internal/minimal_iam_credentials_stub.cc +++ b/google/cloud/internal/minimal_iam_credentials_stub.cc @@ -24,7 +24,7 @@ #include "google/cloud/internal/trace_propagator.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/internal/url_encode.h" -#include +#include "google/iam/credentials/v1/iamcredentials.grpc.pb.h" namespace google { namespace cloud { @@ -161,7 +161,6 @@ class AsyncAccessTokenGeneratorLogging : public MinimalIamCredentialsStub { TracingOptions tracing_options_; }; -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY class AsyncAccessTokenGeneratorTracing : public MinimalIamCredentialsStub { public: explicit AsyncAccessTokenGeneratorTracing( @@ -197,8 +196,6 @@ class AsyncAccessTokenGeneratorTracing : public MinimalIamCredentialsStub { std::shared_ptr propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - } // namespace std::shared_ptr DecorateMinimalIamCredentialsStub( @@ -209,11 +206,9 @@ std::shared_ptr DecorateMinimalIamCredentialsStub( impl = std::make_shared( std::move(impl), options.get()); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (TracingEnabled(options)) { impl = std::make_shared(std::move(impl)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return impl; } diff --git a/google/cloud/internal/minimal_iam_credentials_stub.h b/google/cloud/internal/minimal_iam_credentials_stub.h index b126995c74a75..4c92dd9a0d269 100644 --- a/google/cloud/internal/minimal_iam_credentials_stub.h +++ b/google/cloud/internal/minimal_iam_credentials_stub.h @@ -19,7 +19,7 @@ #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/iam/credentials/v1/iamcredentials.grpc.pb.h" #include namespace google { diff --git a/google/cloud/internal/minimal_iam_credentials_stub_test.cc b/google/cloud/internal/minimal_iam_credentials_stub_test.cc index 953bb03a970e9..1cd3cab0c1638 100644 --- a/google/cloud/internal/minimal_iam_credentials_stub_test.cc +++ b/google/cloud/internal/minimal_iam_credentials_stub_test.cc @@ -25,7 +25,7 @@ #include "google/cloud/testing_util/validate_metadata.h" #include "google/cloud/testing_util/validate_propagator.h" #include "google/cloud/universe_domain_options.h" -#include +#include "google/iam/credentials/v1/iamcredentials.grpc.pb.h" #include namespace google { @@ -219,7 +219,6 @@ TEST_F(MinimalIamCredentialsStubTest, LoggingComponentNames) { } } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::DisableTracing; using ::google::cloud::testing_util::EnableTracing; using ::google::cloud::testing_util::OTelAttribute; @@ -342,7 +341,6 @@ TEST_F(MinimalIamCredentialsStubTest, SignBlobTracing) { OTelAttribute("grpc.peer", _), OTelAttribute("gl-cpp.status_code", kErrorCode))))); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY TEST(MakeMinimalIamCredentialsOptions, Default) { auto o = MakeMinimalIamCredentialsOptions( diff --git a/google/cloud/internal/oauth2_compute_engine_credentials.cc b/google/cloud/internal/oauth2_compute_engine_credentials.cc index 624cc5216ed00..4113e07fb3355 100644 --- a/google/cloud/internal/oauth2_compute_engine_credentials.cc +++ b/google/cloud/internal/oauth2_compute_engine_credentials.cc @@ -13,7 +13,6 @@ // limitations under the License. #include "google/cloud/internal/oauth2_compute_engine_credentials.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/compute_engine_util.h" #include "google/cloud/internal/curl_options.h" #include "google/cloud/internal/make_status.h" @@ -24,6 +23,7 @@ #include "google/cloud/internal/rest_retry_loop.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/universe_domain_options.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_split.h" #include #include diff --git a/google/cloud/internal/oauth2_compute_engine_credentials_test.cc b/google/cloud/internal/oauth2_compute_engine_credentials_test.cc index dab8ef14b6c55..7edb731392d14 100644 --- a/google/cloud/internal/oauth2_compute_engine_credentials_test.cc +++ b/google/cloud/internal/oauth2_compute_engine_credentials_test.cc @@ -13,7 +13,6 @@ // limitations under the License. #include "google/cloud/internal/oauth2_compute_engine_credentials.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/backoff_policy.h" #include "google/cloud/internal/compute_engine_util.h" #include "google/cloud/internal/make_status.h" @@ -23,6 +22,7 @@ #include "google/cloud/testing_util/mock_rest_response.h" #include "google/cloud/testing_util/status_matchers.h" #include "google/cloud/universe_domain_options.h" +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/internal/oauth2_credentials.cc b/google/cloud/internal/oauth2_credentials.cc index 42dd2e760328e..b2f4d53c57d63 100644 --- a/google/cloud/internal/oauth2_credentials.cc +++ b/google/cloud/internal/oauth2_credentials.cc @@ -13,9 +13,9 @@ // limitations under the License. #include "google/cloud/internal/oauth2_credentials.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/internal/oauth2_universe_domain.h" +#include "absl/strings/str_cat.h" namespace google { namespace cloud { diff --git a/google/cloud/internal/oauth2_external_account_credentials.cc b/google/cloud/internal/oauth2_external_account_credentials.cc index c50f7f116bfd9..a9ab92ff1459a 100644 --- a/google/cloud/internal/oauth2_external_account_credentials.cc +++ b/google/cloud/internal/oauth2_external_account_credentials.cc @@ -13,7 +13,6 @@ // limitations under the License. #include "google/cloud/internal/oauth2_external_account_credentials.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/external_account_token_source_aws.h" #include "google/cloud/internal/external_account_token_source_file.h" #include "google/cloud/internal/external_account_token_source_url.h" @@ -24,6 +23,7 @@ #include "google/cloud/internal/oauth2_universe_domain.h" #include "google/cloud/internal/parse_rfc3339.h" #include "google/cloud/internal/rest_client.h" +#include "absl/strings/str_cat.h" #include namespace google { diff --git a/google/cloud/internal/oauth2_minimal_iam_credentials_rest.cc b/google/cloud/internal/oauth2_minimal_iam_credentials_rest.cc index 8a4b415d35b31..46dd95d2d0fa2 100644 --- a/google/cloud/internal/oauth2_minimal_iam_credentials_rest.cc +++ b/google/cloud/internal/oauth2_minimal_iam_credentials_rest.cc @@ -14,8 +14,6 @@ #include "google/cloud/internal/oauth2_minimal_iam_credentials_rest.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/format_time_point.h" #include "google/cloud/internal/json_parsing.h" @@ -26,6 +24,8 @@ #include "google/cloud/internal/rest_response.h" #include "google/cloud/log.h" #include "google/cloud/options.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include namespace google { diff --git a/google/cloud/internal/oauth2_minimal_iam_credentials_rest_test.cc b/google/cloud/internal/oauth2_minimal_iam_credentials_rest_test.cc index 25f60f96585a2..a84e856cec02b 100644 --- a/google/cloud/internal/oauth2_minimal_iam_credentials_rest_test.cc +++ b/google/cloud/internal/oauth2_minimal_iam_credentials_rest_test.cc @@ -13,7 +13,6 @@ // limitations under the License. #include "google/cloud/internal/oauth2_minimal_iam_credentials_rest.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/http_payload.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/internal/rest_request.h" @@ -23,6 +22,7 @@ #include "google/cloud/testing_util/mock_rest_client.h" #include "google/cloud/testing_util/mock_rest_response.h" #include "google/cloud/testing_util/status_matchers.h" +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/internal/oauth2_service_account_credentials.cc b/google/cloud/internal/oauth2_service_account_credentials.cc index d72e803e1d4d4..849f572211bfe 100644 --- a/google/cloud/internal/oauth2_service_account_credentials.cc +++ b/google/cloud/internal/oauth2_service_account_credentials.cc @@ -13,15 +13,18 @@ // limitations under the License. #include "google/cloud/internal/oauth2_service_account_credentials.h" -#include "google/cloud/internal/absl_str_join_quiet.h" +#include "google/cloud/credentials.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/internal/make_jwt_assertion.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/internal/oauth2_google_credentials.h" #include "google/cloud/internal/oauth2_universe_domain.h" +#include "google/cloud/internal/parse_service_account_p12_file.h" #include "google/cloud/internal/rest_response.h" #include "google/cloud/internal/sign_using_sha256.h" +#include "absl/strings/str_join.h" #include +#include #include namespace google { @@ -130,6 +133,19 @@ StatusOr ParseServiceAccountCredentials( return info; } +void ApplyServiceAccountCredentialsInfoOverrides( + Options const& options, ServiceAccountCredentialsInfo& info) { + if (options.has()) { + auto const& s = options.get(); + std::set scopes{s.begin(), s.end()}; + info.scopes = std::move(scopes); + } + + if (options.has()) { + info.subject = options.get(); + } +} + std::pair AssertionComponentsFromInfo( ServiceAccountCredentialsInfo const& info, std::chrono::system_clock::time_point now) { @@ -240,6 +256,63 @@ StatusOr MakeSelfSignedJWT( info.private_key); } +StatusOr> +CreateServiceAccountCredentialsFromJsonContents( + std::string const& contents, Options const& options, + HttpClientFactory client_factory) { + auto info = ParseServiceAccountCredentials(contents, "memory"); + if (!info) return info.status(); + ApplyServiceAccountCredentialsInfoOverrides(options, *info); + // Verify this is usable before returning it. + auto const tp = std::chrono::system_clock::time_point{}; + auto const components = AssertionComponentsFromInfo(*info, tp); + auto jwt = MakeJWTAssertionNoThrow(components.first, components.second, + info->private_key); + if (!jwt) return jwt.status(); + return StatusOr>( + std::make_shared(*info, options, + std::move(client_factory))); +} + +StatusOr> +CreateServiceAccountCredentialsFromJsonFilePath( + std::string const& path, Options const& options, + HttpClientFactory client_factory) { + std::ifstream is(path); + if (!is.is_open()) { + // We use kUnknown here because we don't know if the file does not exist, or + // if we were unable to open it for some other reason. + return internal::UnknownError("Cannot open credentials file " + path, + GCP_ERROR_INFO()); + } + std::string contents(std::istreambuf_iterator{is}, {}); + return CreateServiceAccountCredentialsFromJsonContents( + std::move(contents), options, std::move(client_factory)); +} + +StatusOr> +CreateServiceAccountCredentialsFromP12FilePath( + std::string const& path, Options const& options, + HttpClientFactory client_factory) { + auto info = ParseServiceAccountP12File(path); + if (!info) return std::move(info).status(); + ApplyServiceAccountCredentialsInfoOverrides(options, *info); + return StatusOr>( + std::make_shared(*info, options, + std::move(client_factory))); +} + +StatusOr> +CreateServiceAccountCredentialsFromFilePath(std::string const& path, + Options const& options, + HttpClientFactory client_factory) { + auto credentials = CreateServiceAccountCredentialsFromJsonFilePath( + path, options, client_factory); + if (credentials) return *credentials; + return CreateServiceAccountCredentialsFromP12FilePath( + path, options, std::move(client_factory)); +} + ServiceAccountCredentials::ServiceAccountCredentials( ServiceAccountCredentialsInfo info, Options options, HttpClientFactory client_factory) @@ -313,7 +386,8 @@ bool ServiceAccountUseOAuth(ServiceAccountCredentialsInfo const& info) { } bool ServiceAccountCredentials::UseOAuth() { - return ServiceAccountUseOAuth(info_); + return options_.has() || + ServiceAccountUseOAuth(info_); } StatusOr ServiceAccountCredentials::GetTokenOAuth( diff --git a/google/cloud/internal/oauth2_service_account_credentials.h b/google/cloud/internal/oauth2_service_account_credentials.h index 20957c579337b..6a62388c18ec9 100644 --- a/google/cloud/internal/oauth2_service_account_credentials.h +++ b/google/cloud/internal/oauth2_service_account_credentials.h @@ -24,6 +24,7 @@ #include "absl/types/optional.h" #include #include +#include #include namespace google { @@ -65,6 +66,10 @@ StatusOr ParseServiceAccountCredentials( std::string const& content, std::string const& source, std::string const& default_token_uri = GoogleOAuthRefreshEndpoint()); +/// Applies any overrides contained in `ScopesOption` or `SubjectOption`. +void ApplyServiceAccountCredentialsInfoOverrides( + Options const& options, ServiceAccountCredentialsInfo& info); + /// Parses a refresh response JSON string to create an access token. StatusOr ParseServiceAccountRefreshResponse( rest_internal::RestResponse& response, @@ -127,6 +132,58 @@ StatusOr MakeSelfSignedJWT( ServiceAccountCredentialsInfo const& info, std::chrono::system_clock::time_point tp); +/** + * Creates a ServiceAccountCredentials from a JSON string. + */ +StatusOr> +CreateServiceAccountCredentialsFromJsonContents( + std::string const& contents, Options const& options, + HttpClientFactory client_factory); + +/** + * Creates a ServiceAccountCredentials from a JSON file at the specified path. + */ +StatusOr> +CreateServiceAccountCredentialsFromJsonFilePath( + std::string const& path, Options const& options, + HttpClientFactory client_factory); + +/** + * Creates a ServiceAccountCredentials from a P12 file at the specified path. + */ +StatusOr> +CreateServiceAccountCredentialsFromP12FilePath( + std::string const& path, Options const& options, + HttpClientFactory client_factory); + +/** + * Creates a ServiceAccountCredentials from a file at the specified path. + * + * @note This function automatically detects if the file is a JSON or P12 (aka + * PFX aka PKCS#12) file and tries to load the file as a service account + * credential. We strongly recommend that applications use JSON files for + * service account key files. + * + * These credentials use the cloud-platform OAuth 2.0 scope, defined by + * `GoogleOAuthScopeCloudPlatform()`. To specify alternate scopes, use the + * `google::cloud::ScopesOption`. + */ + +StatusOr> +CreateServiceAccountCredentialsFromFilePath(std::string const& path, + Options const& options, + HttpClientFactory client_factory); + +/** + * Specifying this Option prevents self-signed JWTs from being used. + * + * Some services, namely storage, have more stringent requirements w.r.t. + * self-signed JWTs. + */ +struct DisableSelfSignedJWTOption { + using Type = std::monostate; +}; + /** * Implements service account credentials for REST clients. * diff --git a/google/cloud/internal/oauth2_service_account_credentials_test.cc b/google/cloud/internal/oauth2_service_account_credentials_test.cc index d9a35e9e69cc6..a8bd0b6e23e0d 100644 --- a/google/cloud/internal/oauth2_service_account_credentials_test.cc +++ b/google/cloud/internal/oauth2_service_account_credentials_test.cc @@ -13,6 +13,7 @@ // limitations under the License. #include "google/cloud/internal/oauth2_service_account_credentials.h" +#include "google/cloud/credentials.h" #include "google/cloud/internal/base64_transforms.h" #include "google/cloud/internal/oauth2_credential_constants.h" #include "google/cloud/internal/oauth2_universe_domain.h" @@ -896,6 +897,61 @@ TEST(ServiceAccountCredentialsTest, ParseServiceAccountRefreshResponse) { EXPECT_EQ(token.token, "access-token-r1"); } +TEST(ServiceAccountCredentialsTest, + ApplyServiceAccountCredentialsInfoOverrides) { + auto info = ParseServiceAccountCredentials(MakeTestContents(), "test"); + ASSERT_STATUS_OK(info); + + auto options = Options{} + .set(std::vector( + {"https://www.googleapis.com/auth/userinfo.email", + "https://www.googleapis.com/auth/cloud-platform"})) + .set("my-subject"); + + ApplyServiceAccountCredentialsInfoOverrides(options, *info); + + auto const tp = std::chrono::system_clock::from_time_t(kFixedJwtTimestamp); + auto components = AssertionComponentsFromInfo(*info, tp); + auto assertion = + MakeJWTAssertion(components.first, components.second, info->private_key); + + std::vector actual_tokens = absl::StrSplit(assertion, '.'); + ASSERT_EQ(actual_tokens.size(), 3); + std::vector> decoded(actual_tokens.size()); + std::transform( + actual_tokens.begin(), actual_tokens.end(), decoded.begin(), + [](std::string const& e) { return UrlsafeBase64Decode(e).value(); }); + + // Verify this is a valid key. + auto const signature = + SignUsingSha256(actual_tokens[0] + '.' + actual_tokens[1], kPrivateKey); + ASSERT_STATUS_OK(signature); + EXPECT_EQ(*signature, decoded[2]); + + // Verify the header and payloads are valid. + auto const header = + nlohmann::json::parse(decoded[0].begin(), decoded[0].end()); + auto const expected_header = + nlohmann::json{{"alg", "RS256"}, {"typ", "JWT"}, {"kid", kPrivateKeyId}}; + EXPECT_EQ(header, expected_header); + + auto const payload = nlohmann::json::parse(decoded[1]); + auto const iat = static_cast(kFixedJwtTimestamp); + auto const exp = iat + 3600; + auto const expected_payload = nlohmann::json{ + {"iss", kClientEmail}, + {"scope", + "https://www.googleapis.com/auth/cloud-platform " + "https://www.googleapis.com/auth/userinfo.email"}, + {"aud", kTokenUri}, + {"iat", iat}, + {"exp", exp}, + {"sub", "my-subject"}, + }; + + EXPECT_EQ(payload, expected_payload); +} + } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace oauth2_internal diff --git a/google/cloud/internal/opentelemetry.cc b/google/cloud/internal/opentelemetry.cc index fc21f52abae06..04b0593c1fccc 100644 --- a/google/cloud/internal/opentelemetry.cc +++ b/google/cloud/internal/opentelemetry.cc @@ -15,21 +15,17 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/opentelemetry_options.h" #include "google/cloud/options.h" -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include #include #include #include #include -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY namespace google { namespace cloud { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN namespace internal { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - opentelemetry::nostd::shared_ptr GetTracer( Options const&) { auto provider = opentelemetry::trace::Provider::GetTracerProvider(); @@ -147,26 +143,16 @@ std::string CurrentThreadId() { return std::move(os).str(); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY bool TracingEnabled(Options const& options) { return options.get(); } -#else -bool TracingEnabled(Options const&) { return false; } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY void AddSpanAttribute(Options const& options, std::string const& key, std::string const& value) { if (!TracingEnabled(options)) return; auto span = opentelemetry::trace::Tracer::GetCurrentSpan(); span->SetAttribute(key, value); } -#else -void AddSpanAttribute(Options const&, std::string const&, std::string const&) {} -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } // namespace internal GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END diff --git a/google/cloud/internal/opentelemetry.h b/google/cloud/internal/opentelemetry.h index 375da5125e7bd..bd4ffe84ee42f 100644 --- a/google/cloud/internal/opentelemetry.h +++ b/google/cloud/internal/opentelemetry.h @@ -21,25 +21,21 @@ #include "google/cloud/status.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include #include #include #include #include #include -#include -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include #include +#include namespace google { namespace cloud { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN namespace internal { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Returns a [tracer] to use for creating [spans]. * @@ -234,8 +230,6 @@ std::string ToString(opentelemetry::trace::SpanId const& span_id); /// Gets the current thread id. std::string CurrentThreadId(); -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - bool TracingEnabled(Options const& options); /// Wraps the sleeper in a span, if tracing is enabled. @@ -244,7 +238,6 @@ std::function)> MakeTracedSleeper( Options const& options, std::function)> sleeper, std::string const& name) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (TracingEnabled(options)) { return [name, sleeper = std::move(sleeper)]( std::chrono::duration d) { @@ -255,7 +248,6 @@ std::function)> MakeTracedSleeper( span->End(); }; } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY (void)options; (void)name; return sleeper; diff --git a/google/cloud/internal/opentelemetry_context.cc b/google/cloud/internal/opentelemetry_context.cc index 9afda7f15cec9..44f15067b78d1 100644 --- a/google/cloud/internal/opentelemetry_context.cc +++ b/google/cloud/internal/opentelemetry_context.cc @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/internal/opentelemetry_context.h" #include @@ -76,4 +75,3 @@ OTelScope::~OTelScope() { DetachOTelContext(context_); } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/internal/opentelemetry_context.h b/google/cloud/internal/opentelemetry_context.h index 124715826ed8f..c821a63fc18a9 100644 --- a/google/cloud/internal/opentelemetry_context.h +++ b/google/cloud/internal/opentelemetry_context.h @@ -15,7 +15,6 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_OPENTELEMETRY_CONTEXT_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_OPENTELEMETRY_CONTEXT_H -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/version.h" #include #include @@ -125,6 +124,5 @@ class ScopedOTelContext { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_OPENTELEMETRY_CONTEXT_H diff --git a/google/cloud/internal/opentelemetry_context_test.cc b/google/cloud/internal/opentelemetry_context_test.cc index 06c3a206fe541..dea9890cba137 100644 --- a/google/cloud/internal/opentelemetry_context_test.cc +++ b/google/cloud/internal/opentelemetry_context_test.cc @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/internal/opentelemetry_context.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/testing_util/opentelemetry_matchers.h" @@ -177,4 +176,3 @@ TEST_F(OTelContextTest, ThreadLocalStorage) { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/internal/opentelemetry_test.cc b/google/cloud/internal/opentelemetry_test.cc index 0de694de1df4c..96358259d1712 100644 --- a/google/cloud/internal/opentelemetry_test.cc +++ b/google/cloud/internal/opentelemetry_test.cc @@ -18,10 +18,8 @@ #include "google/cloud/testing_util/opentelemetry_matchers.h" #include "google/cloud/testing_util/status_matchers.h" #include -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include #include -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY namespace google { namespace cloud { @@ -32,7 +30,6 @@ namespace { using ms = std::chrono::milliseconds; using ::testing::MockFunction; -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::DisableTracing; using ::google::cloud::testing_util::EnableTracing; using ::google::cloud::testing_util::InstallSpanCatcher; @@ -447,23 +444,6 @@ TEST(OpenTelemetry, AddSpanAttributeDisabled) { Not(SpanHasAttributes(OTelAttribute("key", "value")))))); } -#else - -TEST(NoOpenTelemetry, TracingEnabled) { - EXPECT_FALSE(TracingEnabled(Options{})); -} - -TEST(NoOpenTelemetry, MakeTracedSleeper) { - MockFunction mock_sleeper; - EXPECT_CALL(mock_sleeper, Call(ms(42))); - - auto sleeper = mock_sleeper.AsStdFunction(); - auto result = MakeTracedSleeper(Options{}, sleeper, "Backoff"); - result(ms(42)); -} - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - } // namespace } // namespace internal GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END diff --git a/google/cloud/internal/populate_common_options.cc b/google/cloud/internal/populate_common_options.cc index 7cce3be8abeb6..597c22177daef 100644 --- a/google/cloud/internal/populate_common_options.cc +++ b/google/cloud/internal/populate_common_options.cc @@ -15,12 +15,12 @@ #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/common_options.h" #include "google/cloud/credentials.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/internal/service_endpoint.h" #include "google/cloud/internal/user_agent_prefix.h" #include "google/cloud/opentelemetry_options.h" #include "google/cloud/universe_domain_options.h" +#include "absl/strings/str_join.h" #include "absl/strings/str_split.h" namespace google { diff --git a/google/cloud/internal/populate_rest_options.cc b/google/cloud/internal/populate_rest_options.cc index d1492f9853f4a..e7d8a47217792 100644 --- a/google/cloud/internal/populate_rest_options.cc +++ b/google/cloud/internal/populate_rest_options.cc @@ -14,13 +14,13 @@ #include "google/cloud/internal/populate_rest_options.h" #include "google/cloud/credentials.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/credentials_impl.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/rest_options.h" #include "google/cloud/rest_options.h" #include "absl/strings/match.h" +#include "absl/strings/str_cat.h" #include "absl/strings/strip.h" namespace google { diff --git a/google/cloud/internal/rest_carrier.cc b/google/cloud/internal/rest_carrier.cc index 7b700fe20db3a..719b966c3a50f 100644 --- a/google/cloud/internal/rest_carrier.cc +++ b/google/cloud/internal/rest_carrier.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/internal/rest_carrier.h" #include "google/cloud/internal/noexcept_action.h" #include "google/cloud/internal/rest_context.h" @@ -44,5 +42,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace rest_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/internal/rest_carrier.h b/google/cloud/internal/rest_carrier.h index f201ee35960c3..a36e721ac3e94 100644 --- a/google/cloud/internal/rest_carrier.h +++ b/google/cloud/internal/rest_carrier.h @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_REST_CARRIER_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_REST_CARRIER_H @@ -53,5 +51,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace google #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_REST_CARRIER_H - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/internal/rest_carrier_test.cc b/google/cloud/internal/rest_carrier_test.cc index b059cbe6f7027..62661b8402e4b 100644 --- a/google/cloud/internal/rest_carrier_test.cc +++ b/google/cloud/internal/rest_carrier_test.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/internal/rest_carrier.h" #include @@ -42,5 +40,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace rest_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/internal/rest_log_wrapper_test.cc b/google/cloud/internal/rest_log_wrapper_test.cc index 901d9de6b117d..e1e8248bbdd9c 100644 --- a/google/cloud/internal/rest_log_wrapper_test.cc +++ b/google/cloud/internal/rest_log_wrapper_test.cc @@ -16,8 +16,8 @@ #include "google/cloud/internal/rest_context.h" #include "google/cloud/testing_util/scoped_log.h" #include "google/cloud/tracing_options.h" -#include -#include +#include "google/protobuf/duration.pb.h" +#include "google/protobuf/timestamp.pb.h" #include namespace google { diff --git a/google/cloud/internal/rest_opentelemetry.cc b/google/cloud/internal/rest_opentelemetry.cc index c59c1382466db..aaf2034dcd2e8 100644 --- a/google/cloud/internal/rest_opentelemetry.cc +++ b/google/cloud/internal/rest_opentelemetry.cc @@ -12,18 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/internal/rest_opentelemetry.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/internal/trace_propagator.h" #include "google/cloud/options.h" #include "absl/strings/match.h" +#include "absl/strings/str_cat.h" #include #include +#include #include -#include #include #include @@ -71,13 +70,13 @@ void InjectTraceContext( opentelemetry::nostd::shared_ptr MakeSpanHttp( RestRequest const& request, opentelemetry::nostd::string_view method) { - namespace sc = opentelemetry::trace::SemanticConventions; + namespace sc = opentelemetry::semconv; opentelemetry::trace::StartSpanOptions options; options.kind = opentelemetry::trace::SpanKind::kClient; auto span = internal::MakeSpan( absl::StrCat("HTTP/", absl::string_view{method.data(), method.size()}), {{/*sc::kNetworkTransport=*/"network.transport", - sc::NetTransportValues::kIpTcp}, + sc::network::NetworkTransportValues::kTcp}, {/*sc::kHttpRequestMethod=*/"http.request.method", method}, {/*sc::kUrlFull=*/"url.full", request.path()}}, options); @@ -100,5 +99,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace rest_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/internal/rest_opentelemetry.h b/google/cloud/internal/rest_opentelemetry.h index 825e70b602701..16c5e74c71991 100644 --- a/google/cloud/internal/rest_opentelemetry.h +++ b/google/cloud/internal/rest_opentelemetry.h @@ -15,7 +15,6 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_REST_OPENTELEMETRY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_REST_OPENTELEMETRY_H -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/internal/rest_request.h" #include "google/cloud/internal/trace_propagator.h" #include "google/cloud/options.h" @@ -61,6 +60,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_REST_OPENTELEMETRY_H diff --git a/google/cloud/internal/rest_opentelemetry_test.cc b/google/cloud/internal/rest_opentelemetry_test.cc index 56aef72e06be1..672e60ab86f03 100644 --- a/google/cloud/internal/rest_opentelemetry_test.cc +++ b/google/cloud/internal/rest_opentelemetry_test.cc @@ -12,12 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/internal/rest_opentelemetry.h" #include "google/cloud/testing_util/opentelemetry_matchers.h" #include "google/cloud/testing_util/status_matchers.h" #include -#include +#include namespace google { namespace cloud { @@ -39,7 +38,7 @@ using ::testing::Gt; using ::testing::Pair; TEST(RestOpentelemetry, MakeSpanHttp) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); auto constexpr kUrl = "https://storage.googleapis.com/storage/v1/b/my-bucket"; @@ -66,7 +65,7 @@ TEST(RestOpentelemetry, MakeSpanHttp) { SpanHasAttributes( OTelAttribute( /*sc::kNetworkTransport=*/"network.transport", - sc::NetTransportValues::kIpTcp), + sc::network::NetworkTransportValues::kTcp), OTelAttribute( /*sc::kHttpRequestMethod=*/"http.request.method", "GET"), OTelAttribute(/*sc::kUrlFull=*/"url.full", kUrl), @@ -101,5 +100,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace rest_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/internal/rest_request.cc b/google/cloud/internal/rest_request.cc index 77f1464c44a75..778fc673b6d82 100644 --- a/google/cloud/internal/rest_request.cc +++ b/google/cloud/internal/rest_request.cc @@ -13,9 +13,9 @@ // limitations under the License. #include "google/cloud/internal/rest_request.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_replace_quiet.h" #include "google/cloud/log.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_replace.h" #include "absl/strings/strip.h" #include diff --git a/google/cloud/internal/rest_retry_loop_test.cc b/google/cloud/internal/rest_retry_loop_test.cc index 79e17cc8dc648..2d98af733e4ee 100644 --- a/google/cloud/internal/rest_retry_loop_test.cc +++ b/google/cloud/internal/rest_retry_loop_test.cc @@ -235,7 +235,6 @@ TEST(RestRetryLoopTest, ExhaustedOnStart) { EXPECT_THAT(metadata, Contains(Pair("gcloud-cpp.retry.function", __func__))); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::DisableTracing; using ::google::cloud::testing_util::EnableTracing; using ::google::cloud::testing_util::SpanNamed; @@ -272,8 +271,6 @@ TEST(RestRetryLoopTest, TracingDisabled) { EXPECT_THAT(spans, IsEmpty()); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace rest_internal diff --git a/google/cloud/internal/rest_set_metadata.cc b/google/cloud/internal/rest_set_metadata.cc index d6adba18ebda8..70dc367242bf0 100644 --- a/google/cloud/internal/rest_set_metadata.cc +++ b/google/cloud/internal/rest_set_metadata.cc @@ -14,10 +14,10 @@ #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/rest_options.h" #include "google/cloud/rest_options.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" namespace google { namespace cloud { diff --git a/google/cloud/internal/rest_stub_helpers_test.cc b/google/cloud/internal/rest_stub_helpers_test.cc index fcf7e5a102fab..caec4dbc1b8c9 100644 --- a/google/cloud/internal/rest_stub_helpers_test.cc +++ b/google/cloud/internal/rest_stub_helpers_test.cc @@ -17,9 +17,9 @@ #include "google/cloud/testing_util/mock_rest_client.h" #include "google/cloud/testing_util/mock_rest_response.h" #include "google/cloud/testing_util/status_matchers.h" -#include -#include -#include +#include "google/longrunning/operations.pb.h" +#include "google/protobuf/duration.pb.h" +#include "google/protobuf/timestamp.pb.h" #include #include #include diff --git a/google/cloud/internal/retry_loop_helpers.cc b/google/cloud/internal/retry_loop_helpers.cc index adbe89acca672..50962dd3341d4 100644 --- a/google/cloud/internal/retry_loop_helpers.cc +++ b/google/cloud/internal/retry_loop_helpers.cc @@ -13,8 +13,8 @@ // limitations under the License. #include "google/cloud/internal/retry_loop_helpers.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/make_status.h" +#include "absl/strings/str_cat.h" namespace google { namespace cloud { diff --git a/google/cloud/internal/retry_loop_test.cc b/google/cloud/internal/retry_loop_test.cc index 2040bbd5a4fc8..e85341d4f4c1a 100644 --- a/google/cloud/internal/retry_loop_test.cc +++ b/google/cloud/internal/retry_loop_test.cc @@ -276,7 +276,6 @@ TEST(RetryLoopTest, ConfigureContext) { /*request=*/0, "error message"); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::DisableTracing; using ::google::cloud::testing_util::EnableTracing; using ::google::cloud::testing_util::SpanNamed; @@ -313,8 +312,6 @@ TEST(RetryLoopTest, TracingDisabled) { EXPECT_THAT(spans, IsEmpty()); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - } // namespace } // namespace internal GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END diff --git a/google/cloud/internal/routing_matcher.h b/google/cloud/internal/routing_matcher.h index efcea9f8b26f1..b438f6fb87d5d 100644 --- a/google/cloud/internal/routing_matcher.h +++ b/google/cloud/internal/routing_matcher.h @@ -15,9 +15,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_ROUTING_MATCHER_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_ROUTING_MATCHER_H -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/version.h" +#include "absl/strings/str_cat.h" #include "absl/types/optional.h" #include #include diff --git a/google/cloud/internal/service_endpoint.cc b/google/cloud/internal/service_endpoint.cc index 29ae05a4dc0a2..0d9e1ea9d5327 100644 --- a/google/cloud/internal/service_endpoint.cc +++ b/google/cloud/internal/service_endpoint.cc @@ -13,8 +13,8 @@ // limitations under the License. #include "google/cloud/internal/service_endpoint.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/universe_domain_options.h" +#include "absl/strings/str_cat.h" #include "absl/strings/strip.h" namespace google { diff --git a/google/cloud/internal/streaming_read_rpc_logging.h b/google/cloud/internal/streaming_read_rpc_logging.h index cb7ff50780b81..8c228e952e406 100644 --- a/google/cloud/internal/streaming_read_rpc_logging.h +++ b/google/cloud/internal/streaming_read_rpc_logging.h @@ -15,13 +15,13 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_STREAMING_READ_RPC_LOGGING_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_STREAMING_READ_RPC_LOGGING_H -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/grpc_request_metadata.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/internal/streaming_read_rpc.h" #include "google/cloud/status.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" +#include "absl/strings/str_cat.h" #include "absl/types/optional.h" #include #include diff --git a/google/cloud/internal/streaming_read_rpc_logging_test.cc b/google/cloud/internal/streaming_read_rpc_logging_test.cc index 324c599de22e3..c2593db8e855c 100644 --- a/google/cloud/internal/streaming_read_rpc_logging_test.cc +++ b/google/cloud/internal/streaming_read_rpc_logging_test.cc @@ -16,8 +16,8 @@ #include "google/cloud/status.h" #include "google/cloud/testing_util/scoped_log.h" #include "google/cloud/tracing_options.h" -#include "absl/types/optional.h" -#include +#include "absl/types/variant.h" +#include "google/protobuf/duration.pb.h" #include namespace google { diff --git a/google/cloud/internal/streaming_read_rpc_tracing.h b/google/cloud/internal/streaming_read_rpc_tracing.h index 36125b12051c7..71c885920fd71 100644 --- a/google/cloud/internal/streaming_read_rpc_tracing.h +++ b/google/cloud/internal/streaming_read_rpc_tracing.h @@ -15,7 +15,6 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_STREAMING_READ_RPC_TRACING_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_STREAMING_READ_RPC_TRACING_H -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/internal/grpc_opentelemetry.h" #include "google/cloud/internal/grpc_request_metadata.h" #include "google/cloud/internal/opentelemetry.h" @@ -77,6 +76,5 @@ class StreamingReadRpcTracing : public StreamingReadRpc { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_STREAMING_READ_RPC_TRACING_H diff --git a/google/cloud/internal/streaming_read_rpc_tracing_test.cc b/google/cloud/internal/streaming_read_rpc_tracing_test.cc index b7f276d42c48b..7f7083adef5ac 100644 --- a/google/cloud/internal/streaming_read_rpc_tracing_test.cc +++ b/google/cloud/internal/streaming_read_rpc_tracing_test.cc @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/internal/streaming_read_rpc_tracing.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/testing_util/opentelemetry_matchers.h" @@ -165,4 +164,3 @@ TEST(StreamingReadRpcTracingTest, SpanEndsOnDestruction) { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/internal/streaming_write_rpc_logging_test.cc b/google/cloud/internal/streaming_write_rpc_logging_test.cc index 93792ea36d335..15ac156aecfc9 100644 --- a/google/cloud/internal/streaming_write_rpc_logging_test.cc +++ b/google/cloud/internal/streaming_write_rpc_logging_test.cc @@ -17,8 +17,8 @@ #include "google/cloud/testing_util/scoped_log.h" #include "google/cloud/testing_util/status_matchers.h" #include "google/cloud/tracing_options.h" -#include -#include +#include "google/protobuf/duration.pb.h" +#include "google/protobuf/timestamp.pb.h" #include namespace google { diff --git a/google/cloud/internal/streaming_write_rpc_tracing.h b/google/cloud/internal/streaming_write_rpc_tracing.h index 695efa7e65620..dc0624e17f77b 100644 --- a/google/cloud/internal/streaming_write_rpc_tracing.h +++ b/google/cloud/internal/streaming_write_rpc_tracing.h @@ -15,7 +15,6 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_STREAMING_WRITE_RPC_TRACING_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_STREAMING_WRITE_RPC_TRACING_H -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/internal/grpc_opentelemetry.h" #include "google/cloud/internal/grpc_request_metadata.h" #include "google/cloud/internal/opentelemetry.h" @@ -82,6 +81,5 @@ class StreamingWriteRpcTracing GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_STREAMING_WRITE_RPC_TRACING_H diff --git a/google/cloud/internal/streaming_write_rpc_tracing_test.cc b/google/cloud/internal/streaming_write_rpc_tracing_test.cc index d2d37ae363fb4..29dd467b59df7 100644 --- a/google/cloud/internal/streaming_write_rpc_tracing_test.cc +++ b/google/cloud/internal/streaming_write_rpc_tracing_test.cc @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/internal/streaming_write_rpc_tracing.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/testing_util/opentelemetry_matchers.h" @@ -180,4 +179,3 @@ TEST(StreamingWriteRpcTracingTest, SpanEndsOnDestruction) { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/internal/time_utils.cc b/google/cloud/internal/time_utils.cc index 82ee1637faf8b..998a3664be90d 100644 --- a/google/cloud/internal/time_utils.cc +++ b/google/cloud/internal/time_utils.cc @@ -13,7 +13,7 @@ // limitations under the License. #include "google/cloud/internal/time_utils.h" -#include +#include "google/protobuf/timestamp.pb.h" #include namespace google { diff --git a/google/cloud/internal/time_utils.h b/google/cloud/internal/time_utils.h index 699a007c2938d..4d6b7915a01fc 100644 --- a/google/cloud/internal/time_utils.h +++ b/google/cloud/internal/time_utils.h @@ -17,8 +17,8 @@ #include "google/cloud/version.h" #include "absl/time/time.h" -#include -#include +#include "google/protobuf/duration.pb.h" +#include "google/protobuf/timestamp.pb.h" #include namespace google { diff --git a/google/cloud/internal/trace_propagator.cc b/google/cloud/internal/trace_propagator.cc index 8e46cacc2cce9..3d02d75e6af88 100644 --- a/google/cloud/internal/trace_propagator.cc +++ b/google/cloud/internal/trace_propagator.cc @@ -12,10 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/internal/trace_propagator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "absl/strings/numbers.h" +#include "absl/strings/str_cat.h" #include #include #include @@ -104,5 +103,3 @@ MakePropagator() { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/internal/trace_propagator.h b/google/cloud/internal/trace_propagator.h index 7a70844e83c85..47accb5ec8820 100644 --- a/google/cloud/internal/trace_propagator.h +++ b/google/cloud/internal/trace_propagator.h @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_TRACE_PROPAGATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_TRACE_PROPAGATOR_H @@ -50,5 +48,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace google #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_TRACE_PROPAGATOR_H - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/internal/trace_propagator_test.cc b/google/cloud/internal/trace_propagator_test.cc index 66e4fba1b3c26..c6c9e17b773a5 100644 --- a/google/cloud/internal/trace_propagator_test.cc +++ b/google/cloud/internal/trace_propagator_test.cc @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/internal/trace_propagator.h" #include #include @@ -114,4 +113,3 @@ TEST(CloudTraceContextPropagator, Fields) { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/internal/traced_stream_range.h b/google/cloud/internal/traced_stream_range.h index e31106e6b6bfc..8342febf24c72 100644 --- a/google/cloud/internal/traced_stream_range.h +++ b/google/cloud/internal/traced_stream_range.h @@ -15,7 +15,6 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_TRACED_STREAM_RANGE_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_TRACED_STREAM_RANGE_H -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/stream_range.h" #include @@ -81,6 +80,5 @@ StreamRange MakeTracedStreamRange( GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_TRACED_STREAM_RANGE_H diff --git a/google/cloud/internal/traced_stream_range_test.cc b/google/cloud/internal/traced_stream_range_test.cc index aef5efd6e5404..e0dafd3a66a49 100644 --- a/google/cloud/internal/traced_stream_range_test.cc +++ b/google/cloud/internal/traced_stream_range_test.cc @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/internal/traced_stream_range.h" #include "google/cloud/mocks/mock_stream_range.h" #include "google/cloud/internal/make_status.h" @@ -129,4 +128,3 @@ TEST(TracedStreamRange, SpanInactiveWhileIterating) { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/internal/tracing_http_payload.cc b/google/cloud/internal/tracing_http_payload.cc index 6f79d864c34b3..b05219f500fd6 100644 --- a/google/cloud/internal/tracing_http_payload.cc +++ b/google/cloud/internal/tracing_http_payload.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/internal/tracing_http_payload.h" #include "google/cloud/internal/opentelemetry.h" #include @@ -66,5 +64,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace rest_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/internal/tracing_http_payload.h b/google/cloud/internal/tracing_http_payload.h index 26af6771ae58b..0b8939ff0ff6c 100644 --- a/google/cloud/internal/tracing_http_payload.h +++ b/google/cloud/internal/tracing_http_payload.h @@ -15,8 +15,6 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_TRACING_HTTP_PAYLOAD_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_TRACING_HTTP_PAYLOAD_H -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/internal/http_payload.h" #include #include @@ -48,6 +46,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_TRACING_HTTP_PAYLOAD_H diff --git a/google/cloud/internal/tracing_http_payload_test.cc b/google/cloud/internal/tracing_http_payload_test.cc index d922052a779b1..24c6ad4dbc607 100644 --- a/google/cloud/internal/tracing_http_payload_test.cc +++ b/google/cloud/internal/tracing_http_payload_test.cc @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/internal/tracing_http_payload.h" #include "google/cloud/internal/rest_opentelemetry.h" #include "google/cloud/testing_util/mock_http_payload.h" @@ -20,7 +19,7 @@ #include "google/cloud/testing_util/status_matchers.h" #include #include -#include +#include namespace google { namespace cloud { @@ -66,7 +65,7 @@ auto MakeReadMatcher(std::int64_t buffer_size) { } TEST(TracingHttpPayload, Success) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); auto impl = MakeMockHttpPayloadSuccess(MockContents()); @@ -86,13 +85,13 @@ TEST(TracingHttpPayload, Success) { SpanKindIsClient(), SpanHasAttributes(OTelAttribute( /*sc::kNetworkTransport=*/"network.transport", - sc::NetTransportValues::kIpTcp)), + sc::network::NetworkTransportValues::kTcp)), SpanHasEvents(MakeReadMatcher(16, 16), MakeReadMatcher(16, 16), MakeReadMatcher(16, 11), MakeReadMatcher(16, 0))))); } TEST(TracingHttpPayload, Failure) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); RestRequest request("https://example.com/ignored"); @@ -120,7 +119,7 @@ TEST(TracingHttpPayload, Failure) { SpanHasAttributes( OTelAttribute( /*sc::kNetworkTransport=*/"network.transport", - sc::NetTransportValues::kIpTcp), + sc::network::NetworkTransportValues::kTcp), OTelAttribute("gl-cpp.status_code", "UNAVAILABLE")), SpanHasEvents(MakeReadMatcher(16, 16), MakeReadMatcher(16))))); } @@ -130,5 +129,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace rest_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/internal/tracing_rest_client.cc b/google/cloud/internal/tracing_rest_client.cc index 0badc6ffeb709..84139c2ef3dd5 100644 --- a/google/cloud/internal/tracing_rest_client.cc +++ b/google/cloud/internal/tracing_rest_client.cc @@ -13,8 +13,6 @@ // limitations under the License. #include "google/cloud/internal/tracing_rest_client.h" -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/internal/rest_opentelemetry.h" #include "google/cloud/internal/trace_propagator.h" @@ -23,6 +21,7 @@ #include "absl/functional/function_ref.h" #include "absl/strings/match.h" #include "absl/strings/numbers.h" +#include "absl/strings/str_cat.h" #include #include @@ -231,22 +230,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace rest_internal } // namespace cloud } // namespace google - -#else - -namespace google { -namespace cloud { -namespace rest_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -std::unique_ptr MakeTracingRestClient( - std::unique_ptr client) { - return client; -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace rest_internal -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/internal/tracing_rest_client_test.cc b/google/cloud/internal/tracing_rest_client_test.cc index 00ef20b9beb5c..9e5994bd4dae3 100644 --- a/google/cloud/internal/tracing_rest_client_test.cc +++ b/google/cloud/internal/tracing_rest_client_test.cc @@ -19,11 +19,9 @@ #include "google/cloud/testing_util/opentelemetry_matchers.h" #include "google/cloud/testing_util/status_matchers.h" #include -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include +#include #include -#include -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY namespace google { namespace cloud { @@ -48,7 +46,6 @@ std::string MockContents() { return "The quick brown fox jumps over the lazy dog"; } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::EventNamed; using ::google::cloud::testing_util::InstallSpanCatcher; using ::google::cloud::testing_util::OTelAttribute; @@ -66,7 +63,7 @@ using ::testing::ResultOf; using ::testing::UnorderedElementsAre; TEST(TracingRestClient, Delete) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); auto impl = std::make_unique(); @@ -107,7 +104,7 @@ TEST(TracingRestClient, Delete) { SpanHasAttributes( OTelAttribute( /*sc::kNetworkTransport=*/"network.transport", - sc::NetTransportValues::kIpTcp), + sc::network::NetworkTransportValues::kTcp), OTelAttribute( /*sc::kHttpRequestMethod=*/"http.request.method", "DELETE"), @@ -209,7 +206,7 @@ TEST(TracingRestClient, PropagatesTraceContext) { } TEST(TracingRestClient, WithRestContextDetails) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); auto impl = std::make_unique(); @@ -256,7 +253,7 @@ TEST(TracingRestClient, WithRestContextDetails) { SpanHasAttributes( OTelAttribute( /*sc::kNetworkTransport=*/"network.transport", - sc::NetTransportValues::kIpTcp), + sc::network::NetworkTransportValues::kTcp), OTelAttribute( /*sc::kHttpRequestMethod=*/"http.request.method", "POST"), OTelAttribute(/*sc::kUrlFull=*/"url.full", kUrl), @@ -360,39 +357,6 @@ TEST(TracingRestClient, CachedConnection) { SpanHasEvents(EventNamed("gl-cpp.curl.connected"))))); } -#else - -TEST(TracingRestClient, NoOpenTelemetry) { - auto impl = std::make_unique(); - EXPECT_CALL(*impl, Delete).WillOnce([](RestContext&, RestRequest const&) { - auto response = std::make_unique(); - EXPECT_CALL(*response, StatusCode) - .WillRepeatedly(Return(HttpStatusCode::kOk)); - EXPECT_CALL(*response, Headers).WillRepeatedly(Return(MockHeaders())); - EXPECT_CALL(std::move(*response), ExtractPayload).WillOnce([] { - return MakeMockHttpPayloadSuccess(MockContents()); - }); - return std::unique_ptr(std::move(response)); - }); - - auto constexpr kUrl = "https://storage.googleapis.com/storage/v1/b/my-bucket"; - RestRequest request(kUrl); - request.AddHeader("x-test-header-3", "value3"); - - auto client = MakeTracingRestClient(std::move(impl)); - rest_internal::RestContext context; - auto r = client->Delete(context, request); - ASSERT_STATUS_OK(r); - auto response = *std::move(r); - ASSERT_THAT(response, NotNull()); - EXPECT_THAT(response->StatusCode(), Eq(HttpStatusCode::kOk)); - EXPECT_THAT(response->Headers(), ElementsAreArray(MockHeaders())); - auto contents = ReadAll(std::move(*response).ExtractPayload()); - EXPECT_THAT(contents, IsOkAndHolds(MockContents())); -} - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace rest_internal diff --git a/google/cloud/internal/tracing_rest_response.cc b/google/cloud/internal/tracing_rest_response.cc index 9e00d853cecd5..f1d15cc326694 100644 --- a/google/cloud/internal/tracing_rest_response.cc +++ b/google/cloud/internal/tracing_rest_response.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/internal/tracing_rest_response.h" #include "google/cloud/internal/tracing_http_payload.h" @@ -40,5 +38,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace rest_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/internal/tracing_rest_response.h b/google/cloud/internal/tracing_rest_response.h index 21f2bd7d9d5ff..177b23e8ce072 100644 --- a/google/cloud/internal/tracing_rest_response.h +++ b/google/cloud/internal/tracing_rest_response.h @@ -15,8 +15,6 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_TRACING_REST_RESPONSE_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_TRACING_REST_RESPONSE_H -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/internal/rest_response.h" #include #include @@ -49,6 +47,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_TRACING_REST_RESPONSE_H diff --git a/google/cloud/internal/tracing_rest_response_test.cc b/google/cloud/internal/tracing_rest_response_test.cc index 722e121ba953d..b2151ee63c732 100644 --- a/google/cloud/internal/tracing_rest_response_test.cc +++ b/google/cloud/internal/tracing_rest_response_test.cc @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/internal/tracing_rest_response.h" #include "google/cloud/internal/rest_opentelemetry.h" #include "google/cloud/testing_util/mock_http_payload.h" @@ -21,7 +20,7 @@ #include "google/cloud/testing_util/status_matchers.h" #include #include -#include +#include namespace google { namespace cloud { @@ -57,7 +56,7 @@ auto MakeReadMatcher(std::int64_t buffer_size, std::int64_t read_size) { } TEST(TracingRestResponseTest, Success) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); RestRequest request("https://example.com/ignored"); @@ -89,7 +88,7 @@ TEST(TracingRestResponseTest, Success) { SpanKindIsClient(), SpanHasAttributes(OTelAttribute( /*sc::kNetworkTransport=*/"network.transport", - sc::NetTransportValues::kIpTcp)), + sc::network::NetworkTransportValues::kTcp)), SpanHasEvents(MakeReadMatcher(kBufferSize, content_size), MakeReadMatcher(kBufferSize, 0))))); } @@ -99,5 +98,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace rest_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/internal/unified_grpc_credentials.cc b/google/cloud/internal/unified_grpc_credentials.cc index 36b42821c6fc0..45851cce620a7 100644 --- a/google/cloud/internal/unified_grpc_credentials.cc +++ b/google/cloud/internal/unified_grpc_credentials.cc @@ -115,8 +115,28 @@ std::shared_ptr CreateAuthenticationStrategy( std::move(options)); } void visit(ServiceAccountConfig const& cfg) override { - result = std::make_unique( - cfg.json_object(), std::move(options)); + if (cfg.file_path().has_value()) { + std::ifstream is(*cfg.file_path()); + if (!is.is_open()) { + // We use kUnknown here because we don't know if the file does not + // exist, or if we were unable to open it for some other reason. + result = std::make_unique( + ErrorCredentialsConfig{UnknownError( + "Cannot open credentials file " + *cfg.file_path(), + GCP_ERROR_INFO())}); + } + std::string contents(std::istreambuf_iterator{is}, {}); + result = std::make_unique( + std::move(contents), std::move(options)); + } else if (cfg.json_object().has_value()) { + result = std::make_unique( + *cfg.json_object(), std::move(options)); + } else { + result = std::make_unique( + ErrorCredentialsConfig{InternalError( + "ServiceAccountConfig has neither json_object nor file_path", + GCP_ERROR_INFO())}); + } } void visit(ExternalAccountConfig const& cfg) override { grpc::SslCredentialsOptions ssl_options; diff --git a/google/cloud/internal/unified_rest_credentials.cc b/google/cloud/internal/unified_rest_credentials.cc index 65f1d873e369c..34c9ef726c53d 100644 --- a/google/cloud/internal/unified_rest_credentials.cc +++ b/google/cloud/internal/unified_rest_credentials.cc @@ -15,6 +15,7 @@ #include "google/cloud/internal/unified_rest_credentials.h" #include "google/cloud/common_options.h" #include "google/cloud/internal/make_jwt_assertion.h" +#include "google/cloud/internal/make_status.h" #include "google/cloud/internal/oauth2_access_token_credentials.h" #include "google/cloud/internal/oauth2_anonymous_credentials.h" #include "google/cloud/internal/oauth2_api_key_credentials.h" @@ -49,25 +50,6 @@ std::shared_ptr MakeErrorCredentials( return std::make_shared(std::move(status)); } -std::shared_ptr -CreateServiceAccountCredentialsFromJsonContents( - std::string const& contents, Options const& options, - oauth2_internal::HttpClientFactory client_factory) { - auto info = - oauth2_internal::ParseServiceAccountCredentials(contents, "memory"); - if (!info) return MakeErrorCredentials(std::move(info).status()); - - // Verify this is usable before returning it. - auto const tp = std::chrono::system_clock::time_point{}; - auto const components = AssertionComponentsFromInfo(*info, tp); - auto jwt = internal::MakeJWTAssertionNoThrow( - components.first, components.second, info->private_key); - if (!jwt) return MakeErrorCredentials(std::move(jwt).status()); - - return std::make_shared( - *info, options, std::move(client_factory)); -} - } // namespace std::shared_ptr MapCredentials( @@ -120,10 +102,25 @@ std::shared_ptr MapCredentials( } void visit(ServiceAccountConfig const& cfg) override { - result = Decorate( - CreateServiceAccountCredentialsFromJsonContents( - cfg.json_object(), cfg.options(), std::move(client_factory_)), - cfg.options()); + StatusOr> creds; + if (cfg.file_path().has_value()) { + creds = oauth2_internal::CreateServiceAccountCredentialsFromFilePath( + *cfg.file_path(), cfg.options(), std::move(client_factory_)); + } else if (cfg.json_object().has_value()) { + creds = + oauth2_internal::CreateServiceAccountCredentialsFromJsonContents( + *cfg.json_object(), cfg.options(), std::move(client_factory_)); + } else { + creds = MakeErrorCredentials(internal::InternalError( + "ServiceAccountConfig has neither json_object nor file_path", + GCP_ERROR_INFO())); + } + + if (creds.ok()) { + result = Decorate(*creds, cfg.options()); + } else { + result = MakeErrorCredentials(std::move(creds).status()); + } } void visit(ExternalAccountConfig const& cfg) override { diff --git a/google/cloud/internal/unified_rest_credentials_test.cc b/google/cloud/internal/unified_rest_credentials_test.cc index 77eaa7ab7c3a8..48760cfa8f0ca 100644 --- a/google/cloud/internal/unified_rest_credentials_test.cc +++ b/google/cloud/internal/unified_rest_credentials_test.cc @@ -13,7 +13,6 @@ // limitations under the License. #include "google/cloud/internal/unified_rest_credentials.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/credentials_impl.h" #include "google/cloud/internal/filesystem.h" #include "google/cloud/internal/oauth2_google_application_default_credentials_file.h" @@ -25,6 +24,7 @@ #include "google/cloud/testing_util/mock_rest_response.h" #include "google/cloud/testing_util/scoped_environment.h" #include "google/cloud/testing_util/status_matchers.h" +#include "absl/strings/str_cat.h" #include #include #include @@ -405,7 +405,7 @@ TEST(UnifiedRestCredentialsTest, ServiceAccount) { EXPECT_CALL(client_factory, Call).Times(0); auto const config = - internal::ServiceAccountConfig(contents.dump(), Options{}); + internal::ServiceAccountConfig(contents.dump(), absl::nullopt, Options{}); auto credentials = MapCredentials(config, client_factory.AsStdFunction()); auto access_token = credentials->GetToken(now); ASSERT_STATUS_OK(access_token); diff --git a/google/cloud/internal/user_agent_prefix.cc b/google/cloud/internal/user_agent_prefix.cc index 5ad2b3949bf7f..f75d7a94c3f36 100644 --- a/google/cloud/internal/user_agent_prefix.cc +++ b/google/cloud/internal/user_agent_prefix.cc @@ -13,8 +13,8 @@ // limitations under the License. #include "google/cloud/internal/user_agent_prefix.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/compiler_info.h" +#include "absl/strings/str_cat.h" namespace google { namespace cloud { diff --git a/google/cloud/internal/version_info.h b/google/cloud/internal/version_info.h index 616e3374f1995..d80ce681132ca 100644 --- a/google/cloud/internal/version_info.h +++ b/google/cloud/internal/version_info.h @@ -16,11 +16,11 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_VERSION_INFO_H // NOLINTNEXTLINE(modernize-macro-to-enum) -#define GOOGLE_CLOUD_CPP_VERSION_MAJOR 2 +#define GOOGLE_CLOUD_CPP_VERSION_MAJOR 3 // NOLINTNEXTLINE(modernize-macro-to-enum) -#define GOOGLE_CLOUD_CPP_VERSION_MINOR 48 +#define GOOGLE_CLOUD_CPP_VERSION_MINOR 1 // NOLINTNEXTLINE(modernize-macro-to-enum) #define GOOGLE_CLOUD_CPP_VERSION_PATCH 0 -#define GOOGLE_CLOUD_CPP_VERSION_PRE_RELEASE "rc" +#define GOOGLE_CLOUD_CPP_VERSION_PRE_RELEASE "" #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_VERSION_INFO_H diff --git a/google/cloud/internal/win32/sign_using_sha256.cc b/google/cloud/internal/win32/sign_using_sha256.cc index 3abcfad869cfc..15ecc6e6f9103 100644 --- a/google/cloud/internal/win32/sign_using_sha256.cc +++ b/google/cloud/internal/win32/sign_using_sha256.cc @@ -14,10 +14,10 @@ #ifdef _WIN32 #include "google/cloud/internal/sign_using_sha256.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/internal/sha256_hash.h" #include "google/cloud/internal/win32/win32_helpers.h" +#include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include #include diff --git a/google/cloud/internal/win32/win32_helpers.h b/google/cloud/internal/win32/win32_helpers.h index bd9384e6432b3..f782a1af41ee1 100644 --- a/google/cloud/internal/win32/win32_helpers.h +++ b/google/cloud/internal/win32/win32_helpers.h @@ -16,9 +16,9 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_INTERNAL_WIN32_WIN32_HELPERS_H #ifdef _WIN32 -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/version.h" #include "absl/functional/function_ref.h" +#include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include diff --git a/google/cloud/kms/BUILD.bazel b/google/cloud/kms/BUILD.bazel index fc09b67a3c903..e75162e2fed41 100644 --- a/google/cloud/kms/BUILD.bazel +++ b/google/cloud/kms/BUILD.bazel @@ -19,14 +19,13 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "inventory/v1/", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/kms/inventory/v1:inventory_cc_grpc", - "@com_google_googleapis//google/cloud/kms/v1:kms_cc_grpc", + "@googleapis//google/cloud/kms/inventory/v1:inventory_cc_grpc", + "@googleapis//google/cloud/kms/v1:kms_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/kms/CMakeLists.txt b/google/cloud/kms/CMakeLists.txt index cea5f8e50e69d..d7b9db41b6856 100644 --- a/google/cloud/kms/CMakeLists.txt +++ b/google/cloud/kms/CMakeLists.txt @@ -16,9 +16,8 @@ include(GoogleCloudCppLibrary) -google_cloud_cpp_add_gapic_library( - kms "Cloud Key Management Service (KMS) API" - SERVICE_DIRS "__EMPTY__" "inventory/v1/" "v1/") +google_cloud_cpp_add_gapic_library(kms "Cloud Key Management Service (KMS) API" + SERVICE_DIRS "inventory/v1/" "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(kms_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/kms/ekm_client.h b/google/cloud/kms/ekm_client.h deleted file mode 100644 index 56faddbd8facb..0000000000000 --- a/google/cloud/kms/ekm_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/kms/v1/ekm_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_EKM_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_EKM_CLIENT_H - -#include "google/cloud/kms/ekm_connection.h" -#include "google/cloud/kms/v1/ekm_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in kms_v1 instead of the aliases defined in -/// this namespace. -namespace kms { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use kms_v1::EkmServiceClient directly. -using ::google::cloud::kms_v1::EkmServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace kms -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_EKM_CLIENT_H diff --git a/google/cloud/kms/ekm_connection.h b/google/cloud/kms/ekm_connection.h deleted file mode 100644 index d6244cc09b5b9..0000000000000 --- a/google/cloud/kms/ekm_connection.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/kms/v1/ekm_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_EKM_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_EKM_CONNECTION_H - -#include "google/cloud/kms/ekm_connection_idempotency_policy.h" -#include "google/cloud/kms/v1/ekm_connection.h" - -namespace google { -namespace cloud { -namespace kms { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use kms_v1::MakeEkmServiceConnection directly. -using ::google::cloud::kms_v1::MakeEkmServiceConnection; - -/// @deprecated Use kms_v1::EkmServiceConnection directly. -using ::google::cloud::kms_v1::EkmServiceConnection; - -/// @deprecated Use kms_v1::EkmServiceLimitedErrorCountRetryPolicy directly. -using ::google::cloud::kms_v1::EkmServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use kms_v1::EkmServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::kms_v1::EkmServiceLimitedTimeRetryPolicy; - -/// @deprecated Use kms_v1::EkmServiceRetryPolicy directly. -using ::google::cloud::kms_v1::EkmServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace kms -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_EKM_CONNECTION_H diff --git a/google/cloud/kms/ekm_connection_idempotency_policy.h b/google/cloud/kms/ekm_connection_idempotency_policy.h deleted file mode 100644 index cf9eb7f54a97e..0000000000000 --- a/google/cloud/kms/ekm_connection_idempotency_policy.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/kms/v1/ekm_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_EKM_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_EKM_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/kms/v1/ekm_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace kms { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use kms_v1::MakeDefaultEkmServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::kms_v1::MakeDefaultEkmServiceConnectionIdempotencyPolicy; - -/// @deprecated Use kms_v1::EkmServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::kms_v1::EkmServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace kms -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_EKM_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/kms/ekm_options.h b/google/cloud/kms/ekm_options.h deleted file mode 100644 index 1e2062d19d97d..0000000000000 --- a/google/cloud/kms/ekm_options.h +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/kms/v1/ekm_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_EKM_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_EKM_OPTIONS_H - -#include "google/cloud/kms/ekm_connection.h" -#include "google/cloud/kms/ekm_connection_idempotency_policy.h" -#include "google/cloud/kms/v1/ekm_options.h" - -namespace google { -namespace cloud { -namespace kms { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use kms_v1::EkmServiceBackoffPolicyOption directly. -using ::google::cloud::kms_v1::EkmServiceBackoffPolicyOption; - -/// @deprecated Use kms_v1::EkmServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::kms_v1::EkmServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use kms_v1::EkmServicePolicyOptionList directly. -using ::google::cloud::kms_v1::EkmServicePolicyOptionList; - -/// @deprecated Use kms_v1::EkmServiceRetryPolicyOption directly. -using ::google::cloud::kms_v1::EkmServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace kms -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_EKM_OPTIONS_H diff --git a/google/cloud/kms/inventory/v1/internal/key_dashboard_auth_decorator.cc b/google/cloud/kms/inventory/v1/internal/key_dashboard_auth_decorator.cc index 01935ee2913c6..9b193302723fd 100644 --- a/google/cloud/kms/inventory/v1/internal/key_dashboard_auth_decorator.cc +++ b/google/cloud/kms/inventory/v1/internal/key_dashboard_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/kms/inventory/v1/key_dashboard_service.proto #include "google/cloud/kms/inventory/v1/internal/key_dashboard_auth_decorator.h" -#include +#include "google/cloud/kms/inventory/v1/key_dashboard_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_inventory_v1_internal { @@ -44,3 +47,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_inventory_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/inventory/v1/internal/key_dashboard_auth_decorator.h b/google/cloud/kms/inventory/v1/internal/key_dashboard_auth_decorator.h index 71c572c3e44ac..0f435ae834744 100644 --- a/google/cloud/kms/inventory/v1/internal/key_dashboard_auth_decorator.h +++ b/google/cloud/kms/inventory/v1/internal/key_dashboard_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_inventory_v1_internal { @@ -53,4 +56,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_INVENTORY_V1_INTERNAL_KEY_DASHBOARD_AUTH_DECORATOR_H diff --git a/google/cloud/kms/inventory/v1/internal/key_dashboard_logging_decorator.cc b/google/cloud/kms/inventory/v1/internal/key_dashboard_logging_decorator.cc index f2ecc058042eb..8fb01d1e1f753 100644 --- a/google/cloud/kms/inventory/v1/internal/key_dashboard_logging_decorator.cc +++ b/google/cloud/kms/inventory/v1/internal/key_dashboard_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/kms/inventory/v1/key_dashboard_service.proto #include "google/cloud/kms/inventory/v1/internal/key_dashboard_logging_decorator.h" +#include "google/cloud/kms/inventory/v1/key_dashboard_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_inventory_v1_internal { @@ -52,3 +55,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_inventory_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/inventory/v1/internal/key_dashboard_logging_decorator.h b/google/cloud/kms/inventory/v1/internal/key_dashboard_logging_decorator.h index 8f6966071ac0a..83409efb5090c 100644 --- a/google/cloud/kms/inventory/v1/internal/key_dashboard_logging_decorator.h +++ b/google/cloud/kms/inventory/v1/internal/key_dashboard_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_inventory_v1_internal { @@ -53,4 +56,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_INVENTORY_V1_INTERNAL_KEY_DASHBOARD_LOGGING_DECORATOR_H diff --git a/google/cloud/kms/inventory/v1/internal/key_dashboard_metadata_decorator.cc b/google/cloud/kms/inventory/v1/internal/key_dashboard_metadata_decorator.cc index c2f9552c79459..9f19243b7e9b0 100644 --- a/google/cloud/kms/inventory/v1/internal/key_dashboard_metadata_decorator.cc +++ b/google/cloud/kms/inventory/v1/internal/key_dashboard_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/kms/inventory/v1/key_dashboard_service.proto #include "google/cloud/kms/inventory/v1/internal/key_dashboard_metadata_decorator.h" +#include "google/cloud/kms/inventory/v1/key_dashboard_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_inventory_v1_internal { @@ -70,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_inventory_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/inventory/v1/internal/key_dashboard_metadata_decorator.h b/google/cloud/kms/inventory/v1/internal/key_dashboard_metadata_decorator.h index e4cfa65caa673..c42f449f8a415 100644 --- a/google/cloud/kms/inventory/v1/internal/key_dashboard_metadata_decorator.h +++ b/google/cloud/kms/inventory/v1/internal/key_dashboard_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_inventory_v1_internal { @@ -59,4 +62,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_INVENTORY_V1_INTERNAL_KEY_DASHBOARD_METADATA_DECORATOR_H diff --git a/google/cloud/kms/inventory/v1/internal/key_dashboard_option_defaults.cc b/google/cloud/kms/inventory/v1/internal/key_dashboard_option_defaults.cc index f3bde7cd84024..6b6fac899c9d6 100644 --- a/google/cloud/kms/inventory/v1/internal/key_dashboard_option_defaults.cc +++ b/google/cloud/kms/inventory/v1/internal/key_dashboard_option_defaults.cc @@ -42,7 +42,7 @@ Options KeyDashboardServiceDefaultOptions(Options options) { if (!options.has()) { options.set( kms_inventory_v1::KeyDashboardServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/kms/inventory/v1/internal/key_dashboard_stub.cc b/google/cloud/kms/inventory/v1/internal/key_dashboard_stub.cc index acafff5237712..4ca2796b536ce 100644 --- a/google/cloud/kms/inventory/v1/internal/key_dashboard_stub.cc +++ b/google/cloud/kms/inventory/v1/internal/key_dashboard_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/kms/inventory/v1/key_dashboard_service.proto #include "google/cloud/kms/inventory/v1/internal/key_dashboard_stub.h" +#include "google/cloud/kms/inventory/v1/key_dashboard_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_inventory_v1_internal { @@ -46,3 +49,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_inventory_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/inventory/v1/internal/key_dashboard_stub.h b/google/cloud/kms/inventory/v1/internal/key_dashboard_stub.h index 481095ce65c62..f215e2ccc3ec5 100644 --- a/google/cloud/kms/inventory/v1/internal/key_dashboard_stub.h +++ b/google/cloud/kms/inventory/v1/internal/key_dashboard_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_INVENTORY_V1_INTERNAL_KEY_DASHBOARD_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_INVENTORY_V1_INTERNAL_KEY_DASHBOARD_STUB_H +#include "google/cloud/kms/inventory/v1/key_dashboard_service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_inventory_v1_internal { @@ -65,4 +68,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_INVENTORY_V1_INTERNAL_KEY_DASHBOARD_STUB_H diff --git a/google/cloud/kms/inventory/v1/internal/key_dashboard_stub_factory.cc b/google/cloud/kms/inventory/v1/internal/key_dashboard_stub_factory.cc index 59c2bc897e724..da797c7d82fc1 100644 --- a/google/cloud/kms/inventory/v1/internal/key_dashboard_stub_factory.cc +++ b/google/cloud/kms/inventory/v1/internal/key_dashboard_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/kms/inventory/v1/internal/key_dashboard_metadata_decorator.h" #include "google/cloud/kms/inventory/v1/internal/key_dashboard_stub.h" #include "google/cloud/kms/inventory/v1/internal/key_dashboard_tracing_stub.h" +#include "google/cloud/kms/inventory/v1/key_dashboard_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_inventory_v1_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_inventory_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/inventory/v1/internal/key_dashboard_stub_factory.h b/google/cloud/kms/inventory/v1/internal/key_dashboard_stub_factory.h index ce65a31ec6dde..3453916614af6 100644 --- a/google/cloud/kms/inventory/v1/internal/key_dashboard_stub_factory.h +++ b/google/cloud/kms/inventory/v1/internal/key_dashboard_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_inventory_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_INVENTORY_V1_INTERNAL_KEY_DASHBOARD_STUB_FACTORY_H diff --git a/google/cloud/kms/inventory/v1/internal/key_dashboard_tracing_connection.cc b/google/cloud/kms/inventory/v1/internal/key_dashboard_tracing_connection.cc index 14c5b74e8b42b..1745e777ebc4a 100644 --- a/google/cloud/kms/inventory/v1/internal/key_dashboard_tracing_connection.cc +++ b/google/cloud/kms/inventory/v1/internal/key_dashboard_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace kms_inventory_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - KeyDashboardServiceTracingConnection::KeyDashboardServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -44,17 +42,13 @@ KeyDashboardServiceTracingConnection::ListCryptoKeys( std::move(span), std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeKeyDashboardServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/kms/inventory/v1/internal/key_dashboard_tracing_connection.h b/google/cloud/kms/inventory/v1/internal/key_dashboard_tracing_connection.h index 38f943c238a33..a15f777e8ac3e 100644 --- a/google/cloud/kms/inventory/v1/internal/key_dashboard_tracing_connection.h +++ b/google/cloud/kms/inventory/v1/internal/key_dashboard_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace kms_inventory_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class KeyDashboardServiceTracingConnection : public kms_inventory_v1::KeyDashboardServiceConnection { public: @@ -48,8 +46,6 @@ class KeyDashboardServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/kms/inventory/v1/internal/key_dashboard_tracing_stub.cc b/google/cloud/kms/inventory/v1/internal/key_dashboard_tracing_stub.cc index 1186cf762a83e..24f5b974b0e14 100644 --- a/google/cloud/kms/inventory/v1/internal/key_dashboard_tracing_stub.cc +++ b/google/cloud/kms/inventory/v1/internal/key_dashboard_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_inventory_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - KeyDashboardServiceTracingStub::KeyDashboardServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -44,18 +45,14 @@ KeyDashboardServiceTracingStub::ListCryptoKeys( child_->ListCryptoKeys(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeKeyDashboardServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_inventory_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/inventory/v1/internal/key_dashboard_tracing_stub.h b/google/cloud/kms/inventory/v1/internal/key_dashboard_tracing_stub.h index cc0796e062914..4fc6357e2a37a 100644 --- a/google/cloud/kms/inventory/v1/internal/key_dashboard_tracing_stub.h +++ b/google/cloud/kms/inventory/v1/internal/key_dashboard_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_inventory_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class KeyDashboardServiceTracingStub : public KeyDashboardServiceStub { public: ~KeyDashboardServiceTracingStub() override = default; @@ -50,8 +51,6 @@ class KeyDashboardServiceTracingStub : public KeyDashboardServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -66,4 +65,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_INVENTORY_V1_INTERNAL_KEY_DASHBOARD_TRACING_STUB_H diff --git a/google/cloud/kms/inventory/v1/internal/key_tracking_auth_decorator.cc b/google/cloud/kms/inventory/v1/internal/key_tracking_auth_decorator.cc index f1c457d99f736..08ce704418189 100644 --- a/google/cloud/kms/inventory/v1/internal/key_tracking_auth_decorator.cc +++ b/google/cloud/kms/inventory/v1/internal/key_tracking_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/kms/inventory/v1/key_tracking_service.proto #include "google/cloud/kms/inventory/v1/internal/key_tracking_auth_decorator.h" -#include +#include "google/cloud/kms/inventory/v1/key_tracking_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_inventory_v1_internal { @@ -55,3 +58,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_inventory_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/inventory/v1/internal/key_tracking_auth_decorator.h b/google/cloud/kms/inventory/v1/internal/key_tracking_auth_decorator.h index 4fc091961c6f4..83dd5bc136867 100644 --- a/google/cloud/kms/inventory/v1/internal/key_tracking_auth_decorator.h +++ b/google/cloud/kms/inventory/v1/internal/key_tracking_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_inventory_v1_internal { @@ -60,4 +63,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_INVENTORY_V1_INTERNAL_KEY_TRACKING_AUTH_DECORATOR_H diff --git a/google/cloud/kms/inventory/v1/internal/key_tracking_logging_decorator.cc b/google/cloud/kms/inventory/v1/internal/key_tracking_logging_decorator.cc index 6d079c9304447..423e461ab5622 100644 --- a/google/cloud/kms/inventory/v1/internal/key_tracking_logging_decorator.cc +++ b/google/cloud/kms/inventory/v1/internal/key_tracking_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/kms/inventory/v1/key_tracking_service.proto #include "google/cloud/kms/inventory/v1/internal/key_tracking_logging_decorator.h" +#include "google/cloud/kms/inventory/v1/key_tracking_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_inventory_v1_internal { @@ -67,3 +70,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_inventory_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/inventory/v1/internal/key_tracking_logging_decorator.h b/google/cloud/kms/inventory/v1/internal/key_tracking_logging_decorator.h index 2e3197ddc681f..e39755ef2d9b8 100644 --- a/google/cloud/kms/inventory/v1/internal/key_tracking_logging_decorator.h +++ b/google/cloud/kms/inventory/v1/internal/key_tracking_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_inventory_v1_internal { @@ -60,4 +63,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_INVENTORY_V1_INTERNAL_KEY_TRACKING_LOGGING_DECORATOR_H diff --git a/google/cloud/kms/inventory/v1/internal/key_tracking_metadata_decorator.cc b/google/cloud/kms/inventory/v1/internal/key_tracking_metadata_decorator.cc index 6655c7074af12..b06c66db00dc8 100644 --- a/google/cloud/kms/inventory/v1/internal/key_tracking_metadata_decorator.cc +++ b/google/cloud/kms/inventory/v1/internal/key_tracking_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/kms/inventory/v1/key_tracking_service.proto #include "google/cloud/kms/inventory/v1/internal/key_tracking_metadata_decorator.h" +#include "google/cloud/kms/inventory/v1/key_tracking_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_inventory_v1_internal { @@ -81,3 +85,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_inventory_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/inventory/v1/internal/key_tracking_metadata_decorator.h b/google/cloud/kms/inventory/v1/internal/key_tracking_metadata_decorator.h index 8970bfc3c092e..167eb7140fa6c 100644 --- a/google/cloud/kms/inventory/v1/internal/key_tracking_metadata_decorator.h +++ b/google/cloud/kms/inventory/v1/internal/key_tracking_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_inventory_v1_internal { @@ -66,4 +69,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_INVENTORY_V1_INTERNAL_KEY_TRACKING_METADATA_DECORATOR_H diff --git a/google/cloud/kms/inventory/v1/internal/key_tracking_option_defaults.cc b/google/cloud/kms/inventory/v1/internal/key_tracking_option_defaults.cc index 03d2f63571352..941e1273432d3 100644 --- a/google/cloud/kms/inventory/v1/internal/key_tracking_option_defaults.cc +++ b/google/cloud/kms/inventory/v1/internal/key_tracking_option_defaults.cc @@ -42,7 +42,7 @@ Options KeyTrackingServiceDefaultOptions(Options options) { if (!options.has()) { options.set( kms_inventory_v1::KeyTrackingServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/kms/inventory/v1/internal/key_tracking_stub.cc b/google/cloud/kms/inventory/v1/internal/key_tracking_stub.cc index 29477a209425c..7e9fdc668deaf 100644 --- a/google/cloud/kms/inventory/v1/internal/key_tracking_stub.cc +++ b/google/cloud/kms/inventory/v1/internal/key_tracking_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/kms/inventory/v1/key_tracking_service.proto #include "google/cloud/kms/inventory/v1/internal/key_tracking_stub.h" +#include "google/cloud/kms/inventory/v1/key_tracking_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_inventory_v1_internal { @@ -62,3 +65,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_inventory_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/inventory/v1/internal/key_tracking_stub.h b/google/cloud/kms/inventory/v1/internal/key_tracking_stub.h index b643d2b4bf6c4..74a8fdf1dc785 100644 --- a/google/cloud/kms/inventory/v1/internal/key_tracking_stub.h +++ b/google/cloud/kms/inventory/v1/internal/key_tracking_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_INVENTORY_V1_INTERNAL_KEY_TRACKING_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_INVENTORY_V1_INTERNAL_KEY_TRACKING_STUB_H +#include "google/cloud/kms/inventory/v1/key_tracking_service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_inventory_v1_internal { @@ -80,4 +83,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_INVENTORY_V1_INTERNAL_KEY_TRACKING_STUB_H diff --git a/google/cloud/kms/inventory/v1/internal/key_tracking_stub_factory.cc b/google/cloud/kms/inventory/v1/internal/key_tracking_stub_factory.cc index 3c984d41c880b..fde2ed4024ea6 100644 --- a/google/cloud/kms/inventory/v1/internal/key_tracking_stub_factory.cc +++ b/google/cloud/kms/inventory/v1/internal/key_tracking_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/kms/inventory/v1/internal/key_tracking_metadata_decorator.h" #include "google/cloud/kms/inventory/v1/internal/key_tracking_stub.h" #include "google/cloud/kms/inventory/v1/internal/key_tracking_tracing_stub.h" +#include "google/cloud/kms/inventory/v1/key_tracking_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_inventory_v1_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_inventory_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/inventory/v1/internal/key_tracking_stub_factory.h b/google/cloud/kms/inventory/v1/internal/key_tracking_stub_factory.h index 433a288342bb4..4d57551d51836 100644 --- a/google/cloud/kms/inventory/v1/internal/key_tracking_stub_factory.h +++ b/google/cloud/kms/inventory/v1/internal/key_tracking_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_inventory_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_INVENTORY_V1_INTERNAL_KEY_TRACKING_STUB_FACTORY_H diff --git a/google/cloud/kms/inventory/v1/internal/key_tracking_tracing_connection.cc b/google/cloud/kms/inventory/v1/internal/key_tracking_tracing_connection.cc index 31a35e20f7402..1c2654a149ffe 100644 --- a/google/cloud/kms/inventory/v1/internal/key_tracking_tracing_connection.cc +++ b/google/cloud/kms/inventory/v1/internal/key_tracking_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace kms_inventory_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - KeyTrackingServiceTracingConnection::KeyTrackingServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -59,17 +57,13 @@ KeyTrackingServiceTracingConnection::SearchProtectedResources( std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeKeyTrackingServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/kms/inventory/v1/internal/key_tracking_tracing_connection.h b/google/cloud/kms/inventory/v1/internal/key_tracking_tracing_connection.h index cfbd2f896bd2f..10aa83f7ab2dc 100644 --- a/google/cloud/kms/inventory/v1/internal/key_tracking_tracing_connection.h +++ b/google/cloud/kms/inventory/v1/internal/key_tracking_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace kms_inventory_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class KeyTrackingServiceTracingConnection : public kms_inventory_v1::KeyTrackingServiceConnection { public: @@ -54,8 +52,6 @@ class KeyTrackingServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/kms/inventory/v1/internal/key_tracking_tracing_stub.cc b/google/cloud/kms/inventory/v1/internal/key_tracking_tracing_stub.cc index 687e5fab6a4c3..9fd70dd43fe22 100644 --- a/google/cloud/kms/inventory/v1/internal/key_tracking_tracing_stub.cc +++ b/google/cloud/kms/inventory/v1/internal/key_tracking_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_inventory_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - KeyTrackingServiceTracingStub::KeyTrackingServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -62,18 +63,14 @@ KeyTrackingServiceTracingStub::SearchProtectedResources( child_->SearchProtectedResources(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeKeyTrackingServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_inventory_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/inventory/v1/internal/key_tracking_tracing_stub.h b/google/cloud/kms/inventory/v1/internal/key_tracking_tracing_stub.h index 6e02b8144f26e..9d32744bf67f9 100644 --- a/google/cloud/kms/inventory/v1/internal/key_tracking_tracing_stub.h +++ b/google/cloud/kms/inventory/v1/internal/key_tracking_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_inventory_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class KeyTrackingServiceTracingStub : public KeyTrackingServiceStub { public: ~KeyTrackingServiceTracingStub() override = default; @@ -57,8 +58,6 @@ class KeyTrackingServiceTracingStub : public KeyTrackingServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -73,4 +72,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_INVENTORY_V1_INTERNAL_KEY_TRACKING_TRACING_STUB_H diff --git a/google/cloud/kms/inventory/v1/key_dashboard_connection.h b/google/cloud/kms/inventory/v1/key_dashboard_connection.h index 3c7f1f238cfc9..d0316ff853704 100644 --- a/google/cloud/kms/inventory/v1/key_dashboard_connection.h +++ b/google/cloud/kms/inventory/v1/key_dashboard_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/kms/inventory/v1/internal/key_dashboard_retry_traits.h" #include "google/cloud/kms/inventory/v1/key_dashboard_connection_idempotency_policy.h" +#include "google/cloud/kms/inventory/v1/key_dashboard_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/kms/inventory/v1/key_dashboard_connection_idempotency_policy.h b/google/cloud/kms/inventory/v1/key_dashboard_connection_idempotency_policy.h index f6d1f740b383a..96276552fbc8d 100644 --- a/google/cloud/kms/inventory/v1/key_dashboard_connection_idempotency_policy.h +++ b/google/cloud/kms/inventory/v1/key_dashboard_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_INVENTORY_V1_KEY_DASHBOARD_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_INVENTORY_V1_KEY_DASHBOARD_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/kms/inventory/v1/key_dashboard_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/kms/inventory/v1/key_tracking_connection.h b/google/cloud/kms/inventory/v1/key_tracking_connection.h index d0664312a00c3..e636ac8428d67 100644 --- a/google/cloud/kms/inventory/v1/key_tracking_connection.h +++ b/google/cloud/kms/inventory/v1/key_tracking_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/kms/inventory/v1/internal/key_tracking_retry_traits.h" #include "google/cloud/kms/inventory/v1/key_tracking_connection_idempotency_policy.h" +#include "google/cloud/kms/inventory/v1/key_tracking_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/kms/inventory/v1/key_tracking_connection_idempotency_policy.h b/google/cloud/kms/inventory/v1/key_tracking_connection_idempotency_policy.h index 30740a4b2aba0..96b4d1223c143 100644 --- a/google/cloud/kms/inventory/v1/key_tracking_connection_idempotency_policy.h +++ b/google/cloud/kms/inventory/v1/key_tracking_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_INVENTORY_V1_KEY_TRACKING_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_INVENTORY_V1_KEY_TRACKING_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/kms/inventory/v1/key_tracking_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/kms/key_management_client.h b/google/cloud/kms/key_management_client.h deleted file mode 100644 index 82b71278498be..0000000000000 --- a/google/cloud/kms/key_management_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/kms/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_KEY_MANAGEMENT_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_KEY_MANAGEMENT_CLIENT_H - -#include "google/cloud/kms/key_management_connection.h" -#include "google/cloud/kms/v1/key_management_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in kms_v1 instead of the aliases defined in -/// this namespace. -namespace kms { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use kms_v1::KeyManagementServiceClient directly. -using ::google::cloud::kms_v1::KeyManagementServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace kms -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_KEY_MANAGEMENT_CLIENT_H diff --git a/google/cloud/kms/key_management_connection.h b/google/cloud/kms/key_management_connection.h deleted file mode 100644 index 8e392c0818f2d..0000000000000 --- a/google/cloud/kms/key_management_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/kms/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_KEY_MANAGEMENT_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_KEY_MANAGEMENT_CONNECTION_H - -#include "google/cloud/kms/key_management_connection_idempotency_policy.h" -#include "google/cloud/kms/v1/key_management_connection.h" - -namespace google { -namespace cloud { -namespace kms { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use kms_v1::MakeKeyManagementServiceConnection directly. -using ::google::cloud::kms_v1::MakeKeyManagementServiceConnection; - -/// @deprecated Use kms_v1::KeyManagementServiceConnection directly. -using ::google::cloud::kms_v1::KeyManagementServiceConnection; - -/// @deprecated Use kms_v1::KeyManagementServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::kms_v1::KeyManagementServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use kms_v1::KeyManagementServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::kms_v1::KeyManagementServiceLimitedTimeRetryPolicy; - -/// @deprecated Use kms_v1::KeyManagementServiceRetryPolicy directly. -using ::google::cloud::kms_v1::KeyManagementServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace kms -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_KEY_MANAGEMENT_CONNECTION_H diff --git a/google/cloud/kms/key_management_connection_idempotency_policy.h b/google/cloud/kms/key_management_connection_idempotency_policy.h deleted file mode 100644 index 76a66df55e3c7..0000000000000 --- a/google/cloud/kms/key_management_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/kms/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_KEY_MANAGEMENT_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_KEY_MANAGEMENT_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/kms/v1/key_management_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace kms { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// kms_v1::MakeDefaultKeyManagementServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::kms_v1:: - MakeDefaultKeyManagementServiceConnectionIdempotencyPolicy; - -/// @deprecated Use kms_v1::KeyManagementServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::kms_v1::KeyManagementServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace kms -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_KEY_MANAGEMENT_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/kms/key_management_options.h b/google/cloud/kms/key_management_options.h deleted file mode 100644 index 6c0a7bbbd500c..0000000000000 --- a/google/cloud/kms/key_management_options.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/kms/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_KEY_MANAGEMENT_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_KEY_MANAGEMENT_OPTIONS_H - -#include "google/cloud/kms/key_management_connection.h" -#include "google/cloud/kms/key_management_connection_idempotency_policy.h" -#include "google/cloud/kms/v1/key_management_options.h" - -namespace google { -namespace cloud { -namespace kms { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use kms_v1::KeyManagementServiceBackoffPolicyOption directly. -using ::google::cloud::kms_v1::KeyManagementServiceBackoffPolicyOption; - -/// @deprecated Use -/// kms_v1::KeyManagementServiceConnectionIdempotencyPolicyOption directly. -using ::google::cloud::kms_v1:: - KeyManagementServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use kms_v1::KeyManagementServicePolicyOptionList directly. -using ::google::cloud::kms_v1::KeyManagementServicePolicyOptionList; - -/// @deprecated Use kms_v1::KeyManagementServiceRetryPolicyOption directly. -using ::google::cloud::kms_v1::KeyManagementServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace kms -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_KEY_MANAGEMENT_OPTIONS_H diff --git a/google/cloud/kms/mocks/mock_ekm_connection.h b/google/cloud/kms/mocks/mock_ekm_connection.h deleted file mode 100644 index 092aec1c2c071..0000000000000 --- a/google/cloud/kms/mocks/mock_ekm_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/kms/v1/ekm_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_MOCKS_MOCK_EKM_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_MOCKS_MOCK_EKM_CONNECTION_H - -#include "google/cloud/kms/ekm_connection.h" -#include "google/cloud/kms/v1/mocks/mock_ekm_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in kms_v1_mocks instead of the aliases -/// defined in this namespace. -namespace kms_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use kms_v1_mocks::MockEkmServiceConnection directly. -using ::google::cloud::kms_v1_mocks::MockEkmServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace kms_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_MOCKS_MOCK_EKM_CONNECTION_H diff --git a/google/cloud/kms/mocks/mock_key_management_connection.h b/google/cloud/kms/mocks/mock_key_management_connection.h deleted file mode 100644 index d9ebb4b3fc861..0000000000000 --- a/google/cloud/kms/mocks/mock_key_management_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/kms/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_MOCKS_MOCK_KEY_MANAGEMENT_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_MOCKS_MOCK_KEY_MANAGEMENT_CONNECTION_H - -#include "google/cloud/kms/key_management_connection.h" -#include "google/cloud/kms/v1/mocks/mock_key_management_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in kms_v1_mocks instead of the aliases -/// defined in this namespace. -namespace kms_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use kms_v1_mocks::MockKeyManagementServiceConnection directly. -using ::google::cloud::kms_v1_mocks::MockKeyManagementServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace kms_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_MOCKS_MOCK_KEY_MANAGEMENT_CONNECTION_H diff --git a/google/cloud/kms/quickstart/.bazelrc b/google/cloud/kms/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/kms/quickstart/.bazelrc +++ b/google/cloud/kms/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/kms/quickstart/CMakeLists.txt b/google/cloud/kms/quickstart/CMakeLists.txt index 3c29b2d24cbbb..c2cca2b625454 100644 --- a/google/cloud/kms/quickstart/CMakeLists.txt +++ b/google/cloud/kms/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Key Management Service (KMS) API C++ # client library from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-kms-quickstart CXX) find_package(google_cloud_cpp_kms REQUIRED) diff --git a/google/cloud/kms/v1/autokey_admin_connection.h b/google/cloud/kms/v1/autokey_admin_connection.h index 8e92ac0316139..eee0d5ac57026 100644 --- a/google/cloud/kms/v1/autokey_admin_connection.h +++ b/google/cloud/kms/v1/autokey_admin_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_AUTOKEY_ADMIN_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_AUTOKEY_ADMIN_CONNECTION_H +#include "google/cloud/kms/v1/autokey_admin.pb.h" #include "google/cloud/kms/v1/autokey_admin_connection_idempotency_policy.h" #include "google/cloud/kms/v1/internal/autokey_admin_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/kms/v1/autokey_admin_connection_idempotency_policy.h b/google/cloud/kms/v1/autokey_admin_connection_idempotency_policy.h index 774d82141df41..b91e80b504aab 100644 --- a/google/cloud/kms/v1/autokey_admin_connection_idempotency_policy.h +++ b/google/cloud/kms/v1/autokey_admin_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_AUTOKEY_ADMIN_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_AUTOKEY_ADMIN_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/kms/v1/autokey_admin.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/kms/v1/autokey_client.h b/google/cloud/kms/v1/autokey_client.h index 808a68d651b09..d38333a982ece 100644 --- a/google/cloud/kms/v1/autokey_client.h +++ b/google/cloud/kms/v1/autokey_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/kms/v1/autokey_connection.h b/google/cloud/kms/v1/autokey_connection.h index e8c7cd4ec0a95..fc1492973ef4a 100644 --- a/google/cloud/kms/v1/autokey_connection.h +++ b/google/cloud/kms/v1/autokey_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_AUTOKEY_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_AUTOKEY_CONNECTION_H +#include "google/cloud/kms/v1/autokey.pb.h" #include "google/cloud/kms/v1/autokey_connection_idempotency_policy.h" #include "google/cloud/kms/v1/internal/autokey_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/kms/v1/autokey_connection_idempotency_policy.h b/google/cloud/kms/v1/autokey_connection_idempotency_policy.h index 108add172e4f0..ccddfc14ac069 100644 --- a/google/cloud/kms/v1/autokey_connection_idempotency_policy.h +++ b/google/cloud/kms/v1/autokey_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_AUTOKEY_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_AUTOKEY_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/kms/v1/autokey.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/kms/v1/ekm_connection.h b/google/cloud/kms/v1/ekm_connection.h index 92535d4663749..138ed40f977b5 100644 --- a/google/cloud/kms/v1/ekm_connection.h +++ b/google/cloud/kms/v1/ekm_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_EKM_CONNECTION_H #include "google/cloud/kms/v1/ekm_connection_idempotency_policy.h" +#include "google/cloud/kms/v1/ekm_service.pb.h" #include "google/cloud/kms/v1/internal/ekm_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/kms/v1/ekm_connection_idempotency_policy.h b/google/cloud/kms/v1/ekm_connection_idempotency_policy.h index 537cb2d02ae6a..ef9279645aae0 100644 --- a/google/cloud/kms/v1/ekm_connection_idempotency_policy.h +++ b/google/cloud/kms/v1/ekm_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_EKM_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_EKM_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/kms/v1/ekm_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/kms/v1/internal/autokey_admin_auth_decorator.cc b/google/cloud/kms/v1/internal/autokey_admin_auth_decorator.cc index e3e60c08619e9..478ddba6fb954 100644 --- a/google/cloud/kms/v1/internal/autokey_admin_auth_decorator.cc +++ b/google/cloud/kms/v1/internal/autokey_admin_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/kms/v1/autokey_admin.proto #include "google/cloud/kms/v1/internal/autokey_admin_auth_decorator.h" -#include +#include "google/cloud/kms/v1/autokey_admin.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -112,3 +115,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/v1/internal/autokey_admin_auth_decorator.h b/google/cloud/kms/v1/internal/autokey_admin_auth_decorator.h index 1f25b3c20c2b9..be868d365b80d 100644 --- a/google/cloud/kms/v1/internal/autokey_admin_auth_decorator.h +++ b/google/cloud/kms/v1/internal/autokey_admin_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -87,4 +90,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_INTERNAL_AUTOKEY_ADMIN_AUTH_DECORATOR_H diff --git a/google/cloud/kms/v1/internal/autokey_admin_logging_decorator.cc b/google/cloud/kms/v1/internal/autokey_admin_logging_decorator.cc index 7de8149529332..9f00ac1b88d83 100644 --- a/google/cloud/kms/v1/internal/autokey_admin_logging_decorator.cc +++ b/google/cloud/kms/v1/internal/autokey_admin_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/kms/v1/autokey_admin.proto #include "google/cloud/kms/v1/internal/autokey_admin_logging_decorator.h" +#include "google/cloud/kms/v1/autokey_admin.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -145,3 +148,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/v1/internal/autokey_admin_logging_decorator.h b/google/cloud/kms/v1/internal/autokey_admin_logging_decorator.h index 7f6d97aa7d8ea..270766d3687b7 100644 --- a/google/cloud/kms/v1/internal/autokey_admin_logging_decorator.h +++ b/google/cloud/kms/v1/internal/autokey_admin_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -87,4 +90,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_INTERNAL_AUTOKEY_ADMIN_LOGGING_DECORATOR_H diff --git a/google/cloud/kms/v1/internal/autokey_admin_metadata_decorator.cc b/google/cloud/kms/v1/internal/autokey_admin_metadata_decorator.cc index 7228b2bbdac5b..d5cf0a767345d 100644 --- a/google/cloud/kms/v1/internal/autokey_admin_metadata_decorator.cc +++ b/google/cloud/kms/v1/internal/autokey_admin_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/kms/v1/autokey_admin.proto #include "google/cloud/kms/v1/internal/autokey_admin_metadata_decorator.h" +#include "google/cloud/kms/v1/autokey_admin.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -143,3 +147,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/v1/internal/autokey_admin_metadata_decorator.h b/google/cloud/kms/v1/internal/autokey_admin_metadata_decorator.h index ebed32e4827ac..6c92880d7c855 100644 --- a/google/cloud/kms/v1/internal/autokey_admin_metadata_decorator.h +++ b/google/cloud/kms/v1/internal/autokey_admin_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -92,4 +95,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_INTERNAL_AUTOKEY_ADMIN_METADATA_DECORATOR_H diff --git a/google/cloud/kms/v1/internal/autokey_admin_option_defaults.cc b/google/cloud/kms/v1/internal/autokey_admin_option_defaults.cc index 37170cbac5e40..53be9f9724901 100644 --- a/google/cloud/kms/v1/internal/autokey_admin_option_defaults.cc +++ b/google/cloud/kms/v1/internal/autokey_admin_option_defaults.cc @@ -40,7 +40,7 @@ Options AutokeyAdminDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - kms_v1::AutokeyAdminLimitedTimeRetryPolicy(std::chrono::minutes(30)) + kms_v1::AutokeyAdminLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/kms/v1/internal/autokey_admin_stub.cc b/google/cloud/kms/v1/internal/autokey_admin_stub.cc index 4acd378b6659c..4d81bef01deaf 100644 --- a/google/cloud/kms/v1/internal/autokey_admin_stub.cc +++ b/google/cloud/kms/v1/internal/autokey_admin_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/kms/v1/autokey_admin.proto #include "google/cloud/kms/v1/internal/autokey_admin_stub.h" +#include "google/cloud/kms/v1/autokey_admin.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -141,3 +144,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/v1/internal/autokey_admin_stub.h b/google/cloud/kms/v1/internal/autokey_admin_stub.h index f66b56cc700bb..ec0db3bcd37a7 100644 --- a/google/cloud/kms/v1/internal/autokey_admin_stub.h +++ b/google/cloud/kms/v1/internal/autokey_admin_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_INTERNAL_AUTOKEY_ADMIN_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_INTERNAL_AUTOKEY_ADMIN_STUB_H +#include "google/cloud/kms/v1/autokey_admin.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -148,4 +151,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_INTERNAL_AUTOKEY_ADMIN_STUB_H diff --git a/google/cloud/kms/v1/internal/autokey_admin_stub_factory.cc b/google/cloud/kms/v1/internal/autokey_admin_stub_factory.cc index 2ff210eb74523..32d412838776e 100644 --- a/google/cloud/kms/v1/internal/autokey_admin_stub_factory.cc +++ b/google/cloud/kms/v1/internal/autokey_admin_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/kms/v1/autokey_admin.proto #include "google/cloud/kms/v1/internal/autokey_admin_stub_factory.h" +#include "google/cloud/kms/v1/autokey_admin.grpc.pb.h" #include "google/cloud/kms/v1/internal/autokey_admin_auth_decorator.h" #include "google/cloud/kms/v1/internal/autokey_admin_logging_decorator.h" #include "google/cloud/kms/v1/internal/autokey_admin_metadata_decorator.h" #include "google/cloud/kms/v1/internal/autokey_admin_stub.h" #include "google/cloud/kms/v1/internal/autokey_admin_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -78,3 +81,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/v1/internal/autokey_admin_stub_factory.h b/google/cloud/kms/v1/internal/autokey_admin_stub_factory.h index e5108ef50f8fd..f7222acdfb18f 100644 --- a/google/cloud/kms/v1/internal/autokey_admin_stub_factory.h +++ b/google/cloud/kms/v1/internal/autokey_admin_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_INTERNAL_AUTOKEY_ADMIN_STUB_FACTORY_H diff --git a/google/cloud/kms/v1/internal/autokey_admin_tracing_connection.cc b/google/cloud/kms/v1/internal/autokey_admin_tracing_connection.cc index 7f85c345c603c..d399c668ae2af 100644 --- a/google/cloud/kms/v1/internal/autokey_admin_tracing_connection.cc +++ b/google/cloud/kms/v1/internal/autokey_admin_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace kms_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AutokeyAdminTracingConnection::AutokeyAdminTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -113,16 +111,12 @@ AutokeyAdminTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAutokeyAdminTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/kms/v1/internal/autokey_admin_tracing_connection.h b/google/cloud/kms/v1/internal/autokey_admin_tracing_connection.h index d8e98bc777852..fee18ef0a5fc6 100644 --- a/google/cloud/kms/v1/internal/autokey_admin_tracing_connection.h +++ b/google/cloud/kms/v1/internal/autokey_admin_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace kms_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AutokeyAdminTracingConnection : public kms_v1::AutokeyAdminConnection { public: ~AutokeyAdminTracingConnection() override = default; @@ -73,8 +71,6 @@ class AutokeyAdminTracingConnection : public kms_v1::AutokeyAdminConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/kms/v1/internal/autokey_admin_tracing_stub.cc b/google/cloud/kms/v1/internal/autokey_admin_tracing_stub.cc index 274dd92d29004..293ec9f875efc 100644 --- a/google/cloud/kms/v1/internal/autokey_admin_tracing_stub.cc +++ b/google/cloud/kms/v1/internal/autokey_admin_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AutokeyAdminTracingStub::AutokeyAdminTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -138,18 +139,14 @@ StatusOr AutokeyAdminTracingStub::GetOperation( child_->GetOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAutokeyAdminTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/v1/internal/autokey_admin_tracing_stub.h b/google/cloud/kms/v1/internal/autokey_admin_tracing_stub.h index 07afb0fc6b378..e8f76cc129b36 100644 --- a/google/cloud/kms/v1/internal/autokey_admin_tracing_stub.h +++ b/google/cloud/kms/v1/internal/autokey_admin_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AutokeyAdminTracingStub : public AutokeyAdminStub { public: ~AutokeyAdminTracingStub() override = default; @@ -83,8 +84,6 @@ class AutokeyAdminTracingStub : public AutokeyAdminStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -99,4 +98,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_INTERNAL_AUTOKEY_ADMIN_TRACING_STUB_H diff --git a/google/cloud/kms/v1/internal/autokey_auth_decorator.cc b/google/cloud/kms/v1/internal/autokey_auth_decorator.cc index c90277179f0f2..5c05f65bea9a8 100644 --- a/google/cloud/kms/v1/internal/autokey_auth_decorator.cc +++ b/google/cloud/kms/v1/internal/autokey_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/kms/v1/autokey.proto #include "google/cloud/kms/v1/internal/autokey_auth_decorator.h" -#include +#include "google/cloud/kms/v1/autokey.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -165,3 +168,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/v1/internal/autokey_auth_decorator.h b/google/cloud/kms/v1/internal/autokey_auth_decorator.h index 0ef61b1b85f86..de76ad5bdc52f 100644 --- a/google/cloud/kms/v1/internal/autokey_auth_decorator.h +++ b/google/cloud/kms/v1/internal/autokey_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/kms/v1/internal/autokey_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -103,4 +106,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_INTERNAL_AUTOKEY_AUTH_DECORATOR_H diff --git a/google/cloud/kms/v1/internal/autokey_connection_impl.h b/google/cloud/kms/v1/internal/autokey_connection_impl.h index 9bba3ccd0919d..6d63f84d00e74 100644 --- a/google/cloud/kms/v1/internal/autokey_connection_impl.h +++ b/google/cloud/kms/v1/internal/autokey_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/kms/v1/internal/autokey_logging_decorator.cc b/google/cloud/kms/v1/internal/autokey_logging_decorator.cc index a5d03d0369c65..9f07efbace6a3 100644 --- a/google/cloud/kms/v1/internal/autokey_logging_decorator.cc +++ b/google/cloud/kms/v1/internal/autokey_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/kms/v1/autokey.proto #include "google/cloud/kms/v1/internal/autokey_logging_decorator.h" +#include "google/cloud/kms/v1/autokey.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -194,3 +197,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/v1/internal/autokey_logging_decorator.h b/google/cloud/kms/v1/internal/autokey_logging_decorator.h index 756005fe77bde..d69b273207662 100644 --- a/google/cloud/kms/v1/internal/autokey_logging_decorator.h +++ b/google/cloud/kms/v1/internal/autokey_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/kms/v1/internal/autokey_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -103,4 +106,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_INTERNAL_AUTOKEY_LOGGING_DECORATOR_H diff --git a/google/cloud/kms/v1/internal/autokey_metadata_decorator.cc b/google/cloud/kms/v1/internal/autokey_metadata_decorator.cc index e57cd9ee68356..496a4f19a5023 100644 --- a/google/cloud/kms/v1/internal/autokey_metadata_decorator.cc +++ b/google/cloud/kms/v1/internal/autokey_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/kms/v1/autokey.proto #include "google/cloud/kms/v1/internal/autokey_metadata_decorator.h" +#include "google/cloud/kms/v1/autokey.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -174,3 +178,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/v1/internal/autokey_metadata_decorator.h b/google/cloud/kms/v1/internal/autokey_metadata_decorator.h index 0841c01f94c79..8ca9159423a14 100644 --- a/google/cloud/kms/v1/internal/autokey_metadata_decorator.h +++ b/google/cloud/kms/v1/internal/autokey_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/kms/v1/internal/autokey_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -108,4 +111,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_INTERNAL_AUTOKEY_METADATA_DECORATOR_H diff --git a/google/cloud/kms/v1/internal/autokey_option_defaults.cc b/google/cloud/kms/v1/internal/autokey_option_defaults.cc index 669228e138cf3..49bde715ef3e3 100644 --- a/google/cloud/kms/v1/internal/autokey_option_defaults.cc +++ b/google/cloud/kms/v1/internal/autokey_option_defaults.cc @@ -40,7 +40,7 @@ Options AutokeyDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - kms_v1::AutokeyLimitedTimeRetryPolicy(std::chrono::minutes(30)) + kms_v1::AutokeyLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/kms/v1/internal/autokey_stub.cc b/google/cloud/kms/v1/internal/autokey_stub.cc index 3d56f0a7ce334..65e01abb2f99a 100644 --- a/google/cloud/kms/v1/internal/autokey_stub.cc +++ b/google/cloud/kms/v1/internal/autokey_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/kms/v1/autokey.proto #include "google/cloud/kms/v1/internal/autokey_stub.h" +#include "google/cloud/kms/v1/autokey.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -195,3 +198,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/v1/internal/autokey_stub.h b/google/cloud/kms/v1/internal/autokey_stub.h index 1835f5888a667..21f58ab0fde47 100644 --- a/google/cloud/kms/v1/internal/autokey_stub.h +++ b/google/cloud/kms/v1/internal/autokey_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_INTERNAL_AUTOKEY_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_INTERNAL_AUTOKEY_STUB_H +#include "google/cloud/kms/v1/autokey.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -180,4 +183,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_INTERNAL_AUTOKEY_STUB_H diff --git a/google/cloud/kms/v1/internal/autokey_stub_factory.cc b/google/cloud/kms/v1/internal/autokey_stub_factory.cc index 910d17cc626da..fcf7869df850c 100644 --- a/google/cloud/kms/v1/internal/autokey_stub_factory.cc +++ b/google/cloud/kms/v1/internal/autokey_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/kms/v1/autokey.proto #include "google/cloud/kms/v1/internal/autokey_stub_factory.h" +#include "google/cloud/kms/v1/autokey.grpc.pb.h" #include "google/cloud/kms/v1/internal/autokey_auth_decorator.h" #include "google/cloud/kms/v1/internal/autokey_logging_decorator.h" #include "google/cloud/kms/v1/internal/autokey_metadata_decorator.h" #include "google/cloud/kms/v1/internal/autokey_stub.h" #include "google/cloud/kms/v1/internal/autokey_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/v1/internal/autokey_stub_factory.h b/google/cloud/kms/v1/internal/autokey_stub_factory.h index 9862f99f892b6..e9f0552dc6a6a 100644 --- a/google/cloud/kms/v1/internal/autokey_stub_factory.h +++ b/google/cloud/kms/v1/internal/autokey_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_INTERNAL_AUTOKEY_STUB_FACTORY_H diff --git a/google/cloud/kms/v1/internal/autokey_tracing_connection.cc b/google/cloud/kms/v1/internal/autokey_tracing_connection.cc index 3226801aa85c2..c8e800941b953 100644 --- a/google/cloud/kms/v1/internal/autokey_tracing_connection.cc +++ b/google/cloud/kms/v1/internal/autokey_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace kms_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AutokeyTracingConnection::AutokeyTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -124,15 +122,11 @@ StatusOr AutokeyTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAutokeyTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/kms/v1/internal/autokey_tracing_connection.h b/google/cloud/kms/v1/internal/autokey_tracing_connection.h index e5b53d0e38bc0..52f838ed0cce5 100644 --- a/google/cloud/kms/v1/internal/autokey_tracing_connection.h +++ b/google/cloud/kms/v1/internal/autokey_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace kms_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AutokeyTracingConnection : public kms_v1::AutokeyConnection { public: ~AutokeyTracingConnection() override = default; @@ -77,8 +75,6 @@ class AutokeyTracingConnection : public kms_v1::AutokeyConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/kms/v1/internal/autokey_tracing_stub.cc b/google/cloud/kms/v1/internal/autokey_tracing_stub.cc index b06fccc5b9492..eaf62146b4ff2 100644 --- a/google/cloud/kms/v1/internal/autokey_tracing_stub.cc +++ b/google/cloud/kms/v1/internal/autokey_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AutokeyTracingStub::AutokeyTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -176,18 +177,14 @@ future AutokeyTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAutokeyTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/v1/internal/autokey_tracing_stub.h b/google/cloud/kms/v1/internal/autokey_tracing_stub.h index 8dff65aa5e343..31d3261f060f0 100644 --- a/google/cloud/kms/v1/internal/autokey_tracing_stub.h +++ b/google/cloud/kms/v1/internal/autokey_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AutokeyTracingStub : public AutokeyStub { public: ~AutokeyTracingStub() override = default; @@ -98,8 +99,6 @@ class AutokeyTracingStub : public AutokeyStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -114,4 +113,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_INTERNAL_AUTOKEY_TRACING_STUB_H diff --git a/google/cloud/kms/v1/internal/ekm_auth_decorator.cc b/google/cloud/kms/v1/internal/ekm_auth_decorator.cc index d938658d47e21..dece1623b93b6 100644 --- a/google/cloud/kms/v1/internal/ekm_auth_decorator.cc +++ b/google/cloud/kms/v1/internal/ekm_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/kms/v1/ekm_service.proto #include "google/cloud/kms/v1/internal/ekm_auth_decorator.h" -#include +#include "google/cloud/kms/v1/ekm_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -146,3 +149,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/v1/internal/ekm_auth_decorator.h b/google/cloud/kms/v1/internal/ekm_auth_decorator.h index b2b46fbc4eb03..5ec174fcfd02e 100644 --- a/google/cloud/kms/v1/internal/ekm_auth_decorator.h +++ b/google/cloud/kms/v1/internal/ekm_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -104,4 +107,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_INTERNAL_EKM_AUTH_DECORATOR_H diff --git a/google/cloud/kms/v1/internal/ekm_logging_decorator.cc b/google/cloud/kms/v1/internal/ekm_logging_decorator.cc index 43b35baad20ac..505b86bc70c56 100644 --- a/google/cloud/kms/v1/internal/ekm_logging_decorator.cc +++ b/google/cloud/kms/v1/internal/ekm_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/kms/v1/ekm_service.proto #include "google/cloud/kms/v1/internal/ekm_logging_decorator.h" +#include "google/cloud/kms/v1/ekm_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -191,3 +194,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/v1/internal/ekm_logging_decorator.h b/google/cloud/kms/v1/internal/ekm_logging_decorator.h index 6bb2dade995f9..4492dbae26cd2 100644 --- a/google/cloud/kms/v1/internal/ekm_logging_decorator.h +++ b/google/cloud/kms/v1/internal/ekm_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -104,4 +107,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_INTERNAL_EKM_LOGGING_DECORATOR_H diff --git a/google/cloud/kms/v1/internal/ekm_metadata_decorator.cc b/google/cloud/kms/v1/internal/ekm_metadata_decorator.cc index 1816c2a1091f2..5de8d3d7add9e 100644 --- a/google/cloud/kms/v1/internal/ekm_metadata_decorator.cc +++ b/google/cloud/kms/v1/internal/ekm_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/kms/v1/ekm_service.proto #include "google/cloud/kms/v1/internal/ekm_metadata_decorator.h" +#include "google/cloud/kms/v1/ekm_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -178,3 +182,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/v1/internal/ekm_metadata_decorator.h b/google/cloud/kms/v1/internal/ekm_metadata_decorator.h index 7960f7f782e43..b642a4eb416ee 100644 --- a/google/cloud/kms/v1/internal/ekm_metadata_decorator.h +++ b/google/cloud/kms/v1/internal/ekm_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -109,4 +112,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_INTERNAL_EKM_METADATA_DECORATOR_H diff --git a/google/cloud/kms/v1/internal/ekm_option_defaults.cc b/google/cloud/kms/v1/internal/ekm_option_defaults.cc index b4a3c3e4cd1b8..ea89c5a764565 100644 --- a/google/cloud/kms/v1/internal/ekm_option_defaults.cc +++ b/google/cloud/kms/v1/internal/ekm_option_defaults.cc @@ -40,7 +40,7 @@ Options EkmServiceDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - kms_v1::EkmServiceLimitedTimeRetryPolicy(std::chrono::minutes(30)) + kms_v1::EkmServiceLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/kms/v1/internal/ekm_stub.cc b/google/cloud/kms/v1/internal/ekm_stub.cc index 1d887b62d66a5..506dd2dff783b 100644 --- a/google/cloud/kms/v1/internal/ekm_stub.cc +++ b/google/cloud/kms/v1/internal/ekm_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/kms/v1/ekm_service.proto #include "google/cloud/kms/v1/internal/ekm_stub.h" +#include "google/cloud/kms/v1/ekm_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -186,3 +189,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/v1/internal/ekm_stub.h b/google/cloud/kms/v1/internal/ekm_stub.h index 77a341dac70e0..6e80a2d1e64ba 100644 --- a/google/cloud/kms/v1/internal/ekm_stub.h +++ b/google/cloud/kms/v1/internal/ekm_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_INTERNAL_EKM_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_INTERNAL_EKM_STUB_H +#include "google/cloud/kms/v1/ekm_service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -180,4 +183,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_INTERNAL_EKM_STUB_H diff --git a/google/cloud/kms/v1/internal/ekm_stub_factory.cc b/google/cloud/kms/v1/internal/ekm_stub_factory.cc index 3ec23155be229..676c36316121c 100644 --- a/google/cloud/kms/v1/internal/ekm_stub_factory.cc +++ b/google/cloud/kms/v1/internal/ekm_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/kms/v1/ekm_service.proto #include "google/cloud/kms/v1/internal/ekm_stub_factory.h" +#include "google/cloud/kms/v1/ekm_service.grpc.pb.h" #include "google/cloud/kms/v1/internal/ekm_auth_decorator.h" #include "google/cloud/kms/v1/internal/ekm_logging_decorator.h" #include "google/cloud/kms/v1/internal/ekm_metadata_decorator.h" #include "google/cloud/kms/v1/internal/ekm_stub.h" #include "google/cloud/kms/v1/internal/ekm_tracing_stub.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -77,3 +80,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/v1/internal/ekm_stub_factory.h b/google/cloud/kms/v1/internal/ekm_stub_factory.h index 3d4e0dfb7abcd..eb67e72819e19 100644 --- a/google/cloud/kms/v1/internal/ekm_stub_factory.h +++ b/google/cloud/kms/v1/internal/ekm_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_INTERNAL_EKM_STUB_FACTORY_H diff --git a/google/cloud/kms/v1/internal/ekm_tracing_connection.cc b/google/cloud/kms/v1/internal/ekm_tracing_connection.cc index 086e949b03ce3..7e741378d017a 100644 --- a/google/cloud/kms/v1/internal/ekm_tracing_connection.cc +++ b/google/cloud/kms/v1/internal/ekm_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace kms_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - EkmServiceTracingConnection::EkmServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -146,15 +144,11 @@ EkmServiceTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeEkmServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/kms/v1/internal/ekm_tracing_connection.h b/google/cloud/kms/v1/internal/ekm_tracing_connection.h index 62d761d8fc37f..5c45cd0384553 100644 --- a/google/cloud/kms/v1/internal/ekm_tracing_connection.h +++ b/google/cloud/kms/v1/internal/ekm_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace kms_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class EkmServiceTracingConnection : public kms_v1::EkmServiceConnection { public: ~EkmServiceTracingConnection() override = default; @@ -85,8 +83,6 @@ class EkmServiceTracingConnection : public kms_v1::EkmServiceConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/kms/v1/internal/ekm_tracing_stub.cc b/google/cloud/kms/v1/internal/ekm_tracing_stub.cc index 61421ad64ff3c..02663eda8e3da 100644 --- a/google/cloud/kms/v1/internal/ekm_tracing_stub.cc +++ b/google/cloud/kms/v1/internal/ekm_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - EkmServiceTracingStub::EkmServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -183,18 +184,14 @@ StatusOr EkmServiceTracingStub::GetOperation( child_->GetOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeEkmServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/v1/internal/ekm_tracing_stub.h b/google/cloud/kms/v1/internal/ekm_tracing_stub.h index 69ed85e476074..8e7531072da15 100644 --- a/google/cloud/kms/v1/internal/ekm_tracing_stub.h +++ b/google/cloud/kms/v1/internal/ekm_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class EkmServiceTracingStub : public EkmServiceStub { public: ~EkmServiceTracingStub() override = default; @@ -100,8 +101,6 @@ class EkmServiceTracingStub : public EkmServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -116,4 +115,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_INTERNAL_EKM_TRACING_STUB_H diff --git a/google/cloud/kms/v1/internal/key_management_auth_decorator.cc b/google/cloud/kms/v1/internal/key_management_auth_decorator.cc index cdbc5dff588fa..deb4441399d2e 100644 --- a/google/cloud/kms/v1/internal/key_management_auth_decorator.cc +++ b/google/cloud/kms/v1/internal/key_management_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/kms/v1/service.proto #include "google/cloud/kms/v1/internal/key_management_auth_decorator.h" -#include +#include "google/cloud/kms/v1/service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -347,3 +350,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/v1/internal/key_management_auth_decorator.h b/google/cloud/kms/v1/internal/key_management_auth_decorator.h index a2161f078f249..ba0f9a52cead0 100644 --- a/google/cloud/kms/v1/internal/key_management_auth_decorator.h +++ b/google/cloud/kms/v1/internal/key_management_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -198,4 +201,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_INTERNAL_KEY_MANAGEMENT_AUTH_DECORATOR_H diff --git a/google/cloud/kms/v1/internal/key_management_logging_decorator.cc b/google/cloud/kms/v1/internal/key_management_logging_decorator.cc index 6a814ab374e46..a8e25d016907a 100644 --- a/google/cloud/kms/v1/internal/key_management_logging_decorator.cc +++ b/google/cloud/kms/v1/internal/key_management_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/kms/v1/service.proto #include "google/cloud/kms/v1/internal/key_management_logging_decorator.h" +#include "google/cloud/kms/v1/service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -467,3 +470,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/v1/internal/key_management_logging_decorator.h b/google/cloud/kms/v1/internal/key_management_logging_decorator.h index faa68abc23b76..d07d5806ee3e9 100644 --- a/google/cloud/kms/v1/internal/key_management_logging_decorator.h +++ b/google/cloud/kms/v1/internal/key_management_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -198,4 +201,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_INTERNAL_KEY_MANAGEMENT_LOGGING_DECORATOR_H diff --git a/google/cloud/kms/v1/internal/key_management_metadata_decorator.cc b/google/cloud/kms/v1/internal/key_management_metadata_decorator.cc index 2e44f20f04df2..d847dd74ce5cc 100644 --- a/google/cloud/kms/v1/internal/key_management_metadata_decorator.cc +++ b/google/cloud/kms/v1/internal/key_management_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/kms/v1/service.proto #include "google/cloud/kms/v1/internal/key_management_metadata_decorator.h" +#include "google/cloud/kms/v1/service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -382,3 +386,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/v1/internal/key_management_metadata_decorator.h b/google/cloud/kms/v1/internal/key_management_metadata_decorator.h index 8db9c1c6a3d0d..bf597d4e9a3d7 100644 --- a/google/cloud/kms/v1/internal/key_management_metadata_decorator.h +++ b/google/cloud/kms/v1/internal/key_management_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -204,4 +207,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_INTERNAL_KEY_MANAGEMENT_METADATA_DECORATOR_H diff --git a/google/cloud/kms/v1/internal/key_management_option_defaults.cc b/google/cloud/kms/v1/internal/key_management_option_defaults.cc index 1e7e12cff6fb1..045b303992b13 100644 --- a/google/cloud/kms/v1/internal/key_management_option_defaults.cc +++ b/google/cloud/kms/v1/internal/key_management_option_defaults.cc @@ -42,7 +42,7 @@ Options KeyManagementServiceDefaultOptions(Options options) { if (!options.has()) { options.set( kms_v1::KeyManagementServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/kms/v1/internal/key_management_stub.cc b/google/cloud/kms/v1/internal/key_management_stub.cc index c9db9fdbd7318..4a2b0f950a753 100644 --- a/google/cloud/kms/v1/internal/key_management_stub.cc +++ b/google/cloud/kms/v1/internal/key_management_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/kms/v1/service.proto #include "google/cloud/kms/v1/internal/key_management_stub.h" +#include "google/cloud/kms/v1/service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -460,3 +463,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/v1/internal/key_management_stub.h b/google/cloud/kms/v1/internal/key_management_stub.h index 0bf8b1bb03f0b..db7a319c576e9 100644 --- a/google/cloud/kms/v1/internal/key_management_stub.h +++ b/google/cloud/kms/v1/internal/key_management_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_INTERNAL_KEY_MANAGEMENT_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_INTERNAL_KEY_MANAGEMENT_STUB_H +#include "google/cloud/kms/v1/service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -378,4 +381,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_INTERNAL_KEY_MANAGEMENT_STUB_H diff --git a/google/cloud/kms/v1/internal/key_management_stub_factory.cc b/google/cloud/kms/v1/internal/key_management_stub_factory.cc index a83adfd1774de..c60c567db2626 100644 --- a/google/cloud/kms/v1/internal/key_management_stub_factory.cc +++ b/google/cloud/kms/v1/internal/key_management_stub_factory.cc @@ -22,19 +22,22 @@ #include "google/cloud/kms/v1/internal/key_management_metadata_decorator.h" #include "google/cloud/kms/v1/internal/key_management_stub.h" #include "google/cloud/kms/v1/internal/key_management_tracing_stub.h" +#include "google/cloud/kms/v1/service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -79,3 +82,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/v1/internal/key_management_stub_factory.h b/google/cloud/kms/v1/internal/key_management_stub_factory.h index 25eba2677959d..ec91f021e7084 100644 --- a/google/cloud/kms/v1/internal/key_management_stub_factory.h +++ b/google/cloud/kms/v1/internal/key_management_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_INTERNAL_KEY_MANAGEMENT_STUB_FACTORY_H diff --git a/google/cloud/kms/v1/internal/key_management_tracing_connection.cc b/google/cloud/kms/v1/internal/key_management_tracing_connection.cc index 6ae03e76d4868..cf22ff8b970e2 100644 --- a/google/cloud/kms/v1/internal/key_management_tracing_connection.cc +++ b/google/cloud/kms/v1/internal/key_management_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace kms_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - KeyManagementServiceTracingConnection::KeyManagementServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -360,17 +358,13 @@ KeyManagementServiceTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeKeyManagementServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/kms/v1/internal/key_management_tracing_connection.h b/google/cloud/kms/v1/internal/key_management_tracing_connection.h index 43ebaafa498f9..48de3735374f7 100644 --- a/google/cloud/kms/v1/internal/key_management_tracing_connection.h +++ b/google/cloud/kms/v1/internal/key_management_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace kms_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class KeyManagementServiceTracingConnection : public kms_v1::KeyManagementServiceConnection { public: @@ -157,8 +155,6 @@ class KeyManagementServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/kms/v1/internal/key_management_tracing_stub.cc b/google/cloud/kms/v1/internal/key_management_tracing_stub.cc index 1a76008c92ddf..692f9eb89d7af 100644 --- a/google/cloud/kms/v1/internal/key_management_tracing_stub.cc +++ b/google/cloud/kms/v1/internal/key_management_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - KeyManagementServiceTracingStub::KeyManagementServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -457,18 +458,14 @@ KeyManagementServiceTracingStub::GetOperation( child_->GetOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeKeyManagementServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace kms_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/kms/v1/internal/key_management_tracing_stub.h b/google/cloud/kms/v1/internal/key_management_tracing_stub.h index 23d9df3e20855..57cd71f7a2df6 100644 --- a/google/cloud/kms/v1/internal/key_management_tracing_stub.h +++ b/google/cloud/kms/v1/internal/key_management_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace kms_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class KeyManagementServiceTracingStub : public KeyManagementServiceStub { public: ~KeyManagementServiceTracingStub() override = default; @@ -195,8 +196,6 @@ class KeyManagementServiceTracingStub : public KeyManagementServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -211,4 +210,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_INTERNAL_KEY_MANAGEMENT_TRACING_STUB_H diff --git a/google/cloud/kms/v1/key_management_connection.h b/google/cloud/kms/v1/key_management_connection.h index 536ceae13ff0a..5706d32040cbe 100644 --- a/google/cloud/kms/v1/key_management_connection.h +++ b/google/cloud/kms/v1/key_management_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/kms/v1/internal/key_management_retry_traits.h" #include "google/cloud/kms/v1/key_management_connection_idempotency_policy.h" +#include "google/cloud/kms/v1/service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/kms/v1/key_management_connection_idempotency_policy.h b/google/cloud/kms/v1/key_management_connection_idempotency_policy.h index a57f3e171bb03..68cd31025907b 100644 --- a/google/cloud/kms/v1/key_management_connection_idempotency_policy.h +++ b/google/cloud/kms/v1/key_management_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_KEY_MANAGEMENT_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_KMS_V1_KEY_MANAGEMENT_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/kms/v1/service.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/language/BUILD.bazel b/google/cloud/language/BUILD.bazel index 659d3c44c475d..db0bc85f2a398 100644 --- a/google/cloud/language/BUILD.bazel +++ b/google/cloud/language/BUILD.bazel @@ -19,14 +19,13 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", "v2/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/language/v1:language_cc_grpc", - "@com_google_googleapis//google/cloud/language/v2:language_cc_grpc", + "@googleapis//google/cloud/language/v1:language_cc_grpc", + "@googleapis//google/cloud/language/v2:language_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/language/CMakeLists.txt b/google/cloud/language/CMakeLists.txt index 7911539230d1c..a199360edfc53 100644 --- a/google/cloud/language/CMakeLists.txt +++ b/google/cloud/language/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(language "Cloud Natural Language API" - SERVICE_DIRS "__EMPTY__" "v1/" "v2/") + SERVICE_DIRS "v1/" "v2/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(language_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/language/language_client.h b/google/cloud/language/language_client.h deleted file mode 100644 index 7659d231f38aa..0000000000000 --- a/google/cloud/language/language_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/language/v1/language_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_LANGUAGE_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_LANGUAGE_CLIENT_H - -#include "google/cloud/language/language_connection.h" -#include "google/cloud/language/v1/language_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in language_v1 instead of the aliases defined in -/// this namespace. -namespace language { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use language_v1::LanguageServiceClient directly. -using ::google::cloud::language_v1::LanguageServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace language -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_LANGUAGE_CLIENT_H diff --git a/google/cloud/language/language_connection.h b/google/cloud/language/language_connection.h deleted file mode 100644 index 25e0235472509..0000000000000 --- a/google/cloud/language/language_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/language/v1/language_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_LANGUAGE_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_LANGUAGE_CONNECTION_H - -#include "google/cloud/language/language_connection_idempotency_policy.h" -#include "google/cloud/language/v1/language_connection.h" - -namespace google { -namespace cloud { -namespace language { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use language_v1::MakeLanguageServiceConnection directly. -using ::google::cloud::language_v1::MakeLanguageServiceConnection; - -/// @deprecated Use language_v1::LanguageServiceConnection directly. -using ::google::cloud::language_v1::LanguageServiceConnection; - -/// @deprecated Use language_v1::LanguageServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::language_v1::LanguageServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use language_v1::LanguageServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::language_v1::LanguageServiceLimitedTimeRetryPolicy; - -/// @deprecated Use language_v1::LanguageServiceRetryPolicy directly. -using ::google::cloud::language_v1::LanguageServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace language -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_LANGUAGE_CONNECTION_H diff --git a/google/cloud/language/language_connection_idempotency_policy.h b/google/cloud/language/language_connection_idempotency_policy.h deleted file mode 100644 index 9df748f4f034b..0000000000000 --- a/google/cloud/language/language_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/language/v1/language_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_LANGUAGE_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_LANGUAGE_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/language/v1/language_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace language { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// language_v1::MakeDefaultLanguageServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::language_v1:: - MakeDefaultLanguageServiceConnectionIdempotencyPolicy; - -/// @deprecated Use language_v1::LanguageServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::language_v1::LanguageServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace language -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_LANGUAGE_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/language/language_options.h b/google/cloud/language/language_options.h deleted file mode 100644 index 21d7791187151..0000000000000 --- a/google/cloud/language/language_options.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/language/v1/language_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_LANGUAGE_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_LANGUAGE_OPTIONS_H - -#include "google/cloud/language/language_connection.h" -#include "google/cloud/language/language_connection_idempotency_policy.h" -#include "google/cloud/language/v1/language_options.h" - -namespace google { -namespace cloud { -namespace language { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use language_v1::LanguageServiceBackoffPolicyOption directly. -using ::google::cloud::language_v1::LanguageServiceBackoffPolicyOption; - -/// @deprecated Use -/// language_v1::LanguageServiceConnectionIdempotencyPolicyOption directly. -using ::google::cloud::language_v1:: - LanguageServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use language_v1::LanguageServicePolicyOptionList directly. -using ::google::cloud::language_v1::LanguageServicePolicyOptionList; - -/// @deprecated Use language_v1::LanguageServiceRetryPolicyOption directly. -using ::google::cloud::language_v1::LanguageServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace language -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_LANGUAGE_OPTIONS_H diff --git a/google/cloud/language/mocks/mock_language_connection.h b/google/cloud/language/mocks/mock_language_connection.h deleted file mode 100644 index 04ffef268396c..0000000000000 --- a/google/cloud/language/mocks/mock_language_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/language/v1/language_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_MOCKS_MOCK_LANGUAGE_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_MOCKS_MOCK_LANGUAGE_CONNECTION_H - -#include "google/cloud/language/language_connection.h" -#include "google/cloud/language/v1/mocks/mock_language_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in language_v1_mocks instead of the aliases -/// defined in this namespace. -namespace language_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use language_v1_mocks::MockLanguageServiceConnection directly. -using ::google::cloud::language_v1_mocks::MockLanguageServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace language_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_MOCKS_MOCK_LANGUAGE_CONNECTION_H diff --git a/google/cloud/language/quickstart/.bazelrc b/google/cloud/language/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/language/quickstart/.bazelrc +++ b/google/cloud/language/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/language/quickstart/CMakeLists.txt b/google/cloud/language/quickstart/CMakeLists.txt index a1ea995dccf4c..0055f8bfdddfc 100644 --- a/google/cloud/language/quickstart/CMakeLists.txt +++ b/google/cloud/language/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Natural Language API C++ client library # from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-language-quickstart CXX) find_package(google_cloud_cpp_language REQUIRED) diff --git a/google/cloud/language/v1/internal/language_auth_decorator.cc b/google/cloud/language/v1/internal/language_auth_decorator.cc index 1640d48c13d85..7699cfc32756c 100644 --- a/google/cloud/language/v1/internal/language_auth_decorator.cc +++ b/google/cloud/language/v1/internal/language_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/language/v1/language_service.proto #include "google/cloud/language/v1/internal/language_auth_decorator.h" -#include +#include "google/cloud/language/v1/language_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace language_v1_internal { @@ -98,3 +101,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace language_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/language/v1/internal/language_auth_decorator.h b/google/cloud/language/v1/internal/language_auth_decorator.h index 2d611384e213a..8418510a3a99d 100644 --- a/google/cloud/language/v1/internal/language_auth_decorator.h +++ b/google/cloud/language/v1/internal/language_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace language_v1_internal { @@ -81,4 +84,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_V1_INTERNAL_LANGUAGE_AUTH_DECORATOR_H diff --git a/google/cloud/language/v1/internal/language_logging_decorator.cc b/google/cloud/language/v1/internal/language_logging_decorator.cc index ed02374013466..ccb950b5131b8 100644 --- a/google/cloud/language/v1/internal/language_logging_decorator.cc +++ b/google/cloud/language/v1/internal/language_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/language/v1/language_service.proto #include "google/cloud/language/v1/internal/language_logging_decorator.h" +#include "google/cloud/language/v1/language_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace language_v1_internal { @@ -126,3 +129,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace language_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/language/v1/internal/language_logging_decorator.h b/google/cloud/language/v1/internal/language_logging_decorator.h index 5013194d257f2..1163c41f47aba 100644 --- a/google/cloud/language/v1/internal/language_logging_decorator.h +++ b/google/cloud/language/v1/internal/language_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace language_v1_internal { @@ -81,4 +84,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_V1_INTERNAL_LANGUAGE_LOGGING_DECORATOR_H diff --git a/google/cloud/language/v1/internal/language_metadata_decorator.cc b/google/cloud/language/v1/internal/language_metadata_decorator.cc index a6479a5ff7e50..e2a3f3e0db7f8 100644 --- a/google/cloud/language/v1/internal/language_metadata_decorator.cc +++ b/google/cloud/language/v1/internal/language_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/language/v1/language_service.proto #include "google/cloud/language/v1/internal/language_metadata_decorator.h" +#include "google/cloud/language/v1/language_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace language_v1_internal { @@ -117,3 +121,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace language_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/language/v1/internal/language_metadata_decorator.h b/google/cloud/language/v1/internal/language_metadata_decorator.h index b9b824155987b..9590ee44891d9 100644 --- a/google/cloud/language/v1/internal/language_metadata_decorator.h +++ b/google/cloud/language/v1/internal/language_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace language_v1_internal { @@ -87,4 +90,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_V1_INTERNAL_LANGUAGE_METADATA_DECORATOR_H diff --git a/google/cloud/language/v1/internal/language_option_defaults.cc b/google/cloud/language/v1/internal/language_option_defaults.cc index d957930d89d04..924a385382973 100644 --- a/google/cloud/language/v1/internal/language_option_defaults.cc +++ b/google/cloud/language/v1/internal/language_option_defaults.cc @@ -41,7 +41,7 @@ Options LanguageServiceDefaultOptions(Options options) { if (!options.has()) { options.set( language_v1::LanguageServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/language/v1/internal/language_stub.cc b/google/cloud/language/v1/internal/language_stub.cc index 089fa92baa873..8a210ceb44f85 100644 --- a/google/cloud/language/v1/internal/language_stub.cc +++ b/google/cloud/language/v1/internal/language_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/language/v1/language_service.proto #include "google/cloud/language/v1/internal/language_stub.h" +#include "google/cloud/language/v1/language_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace language_v1_internal { @@ -119,3 +122,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace language_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/language/v1/internal/language_stub.h b/google/cloud/language/v1/internal/language_stub.h index 80233571e80e6..a634405e40a11 100644 --- a/google/cloud/language/v1/internal/language_stub.h +++ b/google/cloud/language/v1/internal/language_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_V1_INTERNAL_LANGUAGE_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_V1_INTERNAL_LANGUAGE_STUB_H +#include "google/cloud/language/v1/language_service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace language_v1_internal { @@ -123,4 +126,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_V1_INTERNAL_LANGUAGE_STUB_H diff --git a/google/cloud/language/v1/internal/language_stub_factory.cc b/google/cloud/language/v1/internal/language_stub_factory.cc index 8a042e56e72d2..a6a4c0c3853e7 100644 --- a/google/cloud/language/v1/internal/language_stub_factory.cc +++ b/google/cloud/language/v1/internal/language_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/language/v1/internal/language_metadata_decorator.h" #include "google/cloud/language/v1/internal/language_stub.h" #include "google/cloud/language/v1/internal/language_tracing_stub.h" +#include "google/cloud/language/v1/language_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace language_v1_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace language_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/language/v1/internal/language_stub_factory.h b/google/cloud/language/v1/internal/language_stub_factory.h index 78f3fde78bf7e..1454a6ad62b26 100644 --- a/google/cloud/language/v1/internal/language_stub_factory.h +++ b/google/cloud/language/v1/internal/language_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace language_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_V1_INTERNAL_LANGUAGE_STUB_FACTORY_H diff --git a/google/cloud/language/v1/internal/language_tracing_connection.cc b/google/cloud/language/v1/internal/language_tracing_connection.cc index c2a5b3e41be88..db827462f081e 100644 --- a/google/cloud/language/v1/internal/language_tracing_connection.cc +++ b/google/cloud/language/v1/internal/language_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace language_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - LanguageServiceTracingConnection::LanguageServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -95,16 +93,12 @@ LanguageServiceTracingConnection::AnnotateText( return internal::EndSpan(*span, child_->AnnotateText(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeLanguageServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/language/v1/internal/language_tracing_connection.h b/google/cloud/language/v1/internal/language_tracing_connection.h index eb522a54fae84..690a433d6cfd1 100644 --- a/google/cloud/language/v1/internal/language_tracing_connection.h +++ b/google/cloud/language/v1/internal/language_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace language_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class LanguageServiceTracingConnection : public language_v1::LanguageServiceConnection { public: @@ -70,8 +68,6 @@ class LanguageServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/language/v1/internal/language_tracing_stub.cc b/google/cloud/language/v1/internal/language_tracing_stub.cc index a0eed84c18f7a..2bcce3edb3e46 100644 --- a/google/cloud/language/v1/internal/language_tracing_stub.cc +++ b/google/cloud/language/v1/internal/language_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace language_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - LanguageServiceTracingStub::LanguageServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -117,18 +118,14 @@ LanguageServiceTracingStub::AnnotateText( child_->AnnotateText(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeLanguageServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace language_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/language/v1/internal/language_tracing_stub.h b/google/cloud/language/v1/internal/language_tracing_stub.h index 6f283c7450465..fea6305be978b 100644 --- a/google/cloud/language/v1/internal/language_tracing_stub.h +++ b/google/cloud/language/v1/internal/language_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace language_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class LanguageServiceTracingStub : public LanguageServiceStub { public: ~LanguageServiceTracingStub() override = default; @@ -78,8 +79,6 @@ class LanguageServiceTracingStub : public LanguageServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -94,4 +93,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_V1_INTERNAL_LANGUAGE_TRACING_STUB_H diff --git a/google/cloud/language/v1/language_connection.h b/google/cloud/language/v1/language_connection.h index 6fc6e325de570..ba815af74d3c9 100644 --- a/google/cloud/language/v1/language_connection.h +++ b/google/cloud/language/v1/language_connection.h @@ -21,12 +21,12 @@ #include "google/cloud/language/v1/internal/language_retry_traits.h" #include "google/cloud/language/v1/language_connection_idempotency_policy.h" +#include "google/cloud/language/v1/language_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/language/v1/language_connection_idempotency_policy.h b/google/cloud/language/v1/language_connection_idempotency_policy.h index bede577372ebd..f9db8b64bf98a 100644 --- a/google/cloud/language/v1/language_connection_idempotency_policy.h +++ b/google/cloud/language/v1/language_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_V1_LANGUAGE_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_V1_LANGUAGE_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/language/v1/language_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/language/v2/internal/language_auth_decorator.cc b/google/cloud/language/v2/internal/language_auth_decorator.cc index 5dd51ffe50e77..0cccf697f847f 100644 --- a/google/cloud/language/v2/internal/language_auth_decorator.cc +++ b/google/cloud/language/v2/internal/language_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/language/v2/language_service.proto #include "google/cloud/language/v2/internal/language_auth_decorator.h" -#include +#include "google/cloud/language/v2/language_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace language_v2_internal { @@ -80,3 +83,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace language_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/language/v2/internal/language_auth_decorator.h b/google/cloud/language/v2/internal/language_auth_decorator.h index 50fb28cd2e463..5f3b8d96b1132 100644 --- a/google/cloud/language/v2/internal/language_auth_decorator.h +++ b/google/cloud/language/v2/internal/language_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace language_v2_internal { @@ -70,4 +73,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_V2_INTERNAL_LANGUAGE_AUTH_DECORATOR_H diff --git a/google/cloud/language/v2/internal/language_logging_decorator.cc b/google/cloud/language/v2/internal/language_logging_decorator.cc index 45560f0a6f0e9..a3ceebbf32a21 100644 --- a/google/cloud/language/v2/internal/language_logging_decorator.cc +++ b/google/cloud/language/v2/internal/language_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/language/v2/language_service.proto #include "google/cloud/language/v2/internal/language_logging_decorator.h" +#include "google/cloud/language/v2/language_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace language_v2_internal { @@ -101,3 +104,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace language_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/language/v2/internal/language_logging_decorator.h b/google/cloud/language/v2/internal/language_logging_decorator.h index c3313fd5e0478..04a1f4c0c79d0 100644 --- a/google/cloud/language/v2/internal/language_logging_decorator.h +++ b/google/cloud/language/v2/internal/language_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace language_v2_internal { @@ -70,4 +73,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_V2_INTERNAL_LANGUAGE_LOGGING_DECORATOR_H diff --git a/google/cloud/language/v2/internal/language_metadata_decorator.cc b/google/cloud/language/v2/internal/language_metadata_decorator.cc index ba4ddd223001b..9a4b06c61a31a 100644 --- a/google/cloud/language/v2/internal/language_metadata_decorator.cc +++ b/google/cloud/language/v2/internal/language_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/language/v2/language_service.proto #include "google/cloud/language/v2/internal/language_metadata_decorator.h" +#include "google/cloud/language/v2/language_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace language_v2_internal { @@ -101,3 +105,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace language_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/language/v2/internal/language_metadata_decorator.h b/google/cloud/language/v2/internal/language_metadata_decorator.h index e8117cb92543c..e2214cd004514 100644 --- a/google/cloud/language/v2/internal/language_metadata_decorator.h +++ b/google/cloud/language/v2/internal/language_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace language_v2_internal { @@ -76,4 +79,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_V2_INTERNAL_LANGUAGE_METADATA_DECORATOR_H diff --git a/google/cloud/language/v2/internal/language_option_defaults.cc b/google/cloud/language/v2/internal/language_option_defaults.cc index 3f9c3b3cc450a..a98aa644ec210 100644 --- a/google/cloud/language/v2/internal/language_option_defaults.cc +++ b/google/cloud/language/v2/internal/language_option_defaults.cc @@ -41,7 +41,7 @@ Options LanguageServiceDefaultOptions(Options options) { if (!options.has()) { options.set( language_v2::LanguageServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/language/v2/internal/language_stub.cc b/google/cloud/language/v2/internal/language_stub.cc index e722cba911948..69f4648c47a6a 100644 --- a/google/cloud/language/v2/internal/language_stub.cc +++ b/google/cloud/language/v2/internal/language_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/language/v2/language_service.proto #include "google/cloud/language/v2/internal/language_stub.h" +#include "google/cloud/language/v2/language_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace language_v2_internal { @@ -94,3 +97,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace language_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/language/v2/internal/language_stub.h b/google/cloud/language/v2/internal/language_stub.h index c0654619be3d6..91777f8214efc 100644 --- a/google/cloud/language/v2/internal/language_stub.h +++ b/google/cloud/language/v2/internal/language_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_V2_INTERNAL_LANGUAGE_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_V2_INTERNAL_LANGUAGE_STUB_H +#include "google/cloud/language/v2/language_service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace language_v2_internal { @@ -101,4 +104,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_V2_INTERNAL_LANGUAGE_STUB_H diff --git a/google/cloud/language/v2/internal/language_stub_factory.cc b/google/cloud/language/v2/internal/language_stub_factory.cc index e9bba27e23b75..4d7b56e000556 100644 --- a/google/cloud/language/v2/internal/language_stub_factory.cc +++ b/google/cloud/language/v2/internal/language_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/language/v2/internal/language_metadata_decorator.h" #include "google/cloud/language/v2/internal/language_stub.h" #include "google/cloud/language/v2/internal/language_tracing_stub.h" +#include "google/cloud/language/v2/language_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace language_v2_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace language_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/language/v2/internal/language_stub_factory.h b/google/cloud/language/v2/internal/language_stub_factory.h index 263f04b7cca85..23a1c755906d3 100644 --- a/google/cloud/language/v2/internal/language_stub_factory.h +++ b/google/cloud/language/v2/internal/language_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace language_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_V2_INTERNAL_LANGUAGE_STUB_FACTORY_H diff --git a/google/cloud/language/v2/internal/language_tracing_connection.cc b/google/cloud/language/v2/internal/language_tracing_connection.cc index a30c1c31cc787..1296b54f1e894 100644 --- a/google/cloud/language/v2/internal/language_tracing_connection.cc +++ b/google/cloud/language/v2/internal/language_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace language_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - LanguageServiceTracingConnection::LanguageServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -77,16 +75,12 @@ LanguageServiceTracingConnection::AnnotateText( return internal::EndSpan(*span, child_->AnnotateText(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeLanguageServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/language/v2/internal/language_tracing_connection.h b/google/cloud/language/v2/internal/language_tracing_connection.h index 9d79e2d43f7db..8f994b93a6864 100644 --- a/google/cloud/language/v2/internal/language_tracing_connection.h +++ b/google/cloud/language/v2/internal/language_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace language_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class LanguageServiceTracingConnection : public language_v2::LanguageServiceConnection { public: @@ -61,8 +59,6 @@ class LanguageServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/language/v2/internal/language_tracing_stub.cc b/google/cloud/language/v2/internal/language_tracing_stub.cc index 8b9981b5231b5..ee79ffc93732e 100644 --- a/google/cloud/language/v2/internal/language_tracing_stub.cc +++ b/google/cloud/language/v2/internal/language_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace language_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - LanguageServiceTracingStub::LanguageServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -92,18 +93,14 @@ LanguageServiceTracingStub::AnnotateText( child_->AnnotateText(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeLanguageServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace language_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/language/v2/internal/language_tracing_stub.h b/google/cloud/language/v2/internal/language_tracing_stub.h index 0109a98f90df6..5342d489aedfa 100644 --- a/google/cloud/language/v2/internal/language_tracing_stub.h +++ b/google/cloud/language/v2/internal/language_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace language_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class LanguageServiceTracingStub : public LanguageServiceStub { public: ~LanguageServiceTracingStub() override = default; @@ -67,8 +68,6 @@ class LanguageServiceTracingStub : public LanguageServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -83,4 +82,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_V2_INTERNAL_LANGUAGE_TRACING_STUB_H diff --git a/google/cloud/language/v2/language_connection.h b/google/cloud/language/v2/language_connection.h index 0d3a1a236e54b..389158f80853c 100644 --- a/google/cloud/language/v2/language_connection.h +++ b/google/cloud/language/v2/language_connection.h @@ -21,12 +21,12 @@ #include "google/cloud/language/v2/internal/language_retry_traits.h" #include "google/cloud/language/v2/language_connection_idempotency_policy.h" +#include "google/cloud/language/v2/language_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/language/v2/language_connection_idempotency_policy.h b/google/cloud/language/v2/language_connection_idempotency_policy.h index 0d2ab150ed96c..15a79d094f4d0 100644 --- a/google/cloud/language/v2/language_connection_idempotency_policy.h +++ b/google/cloud/language/v2/language_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_V2_LANGUAGE_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LANGUAGE_V2_LANGUAGE_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/language/v2/language_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/licensemanager/BUILD.bazel b/google/cloud/licensemanager/BUILD.bazel index 0f37940349329..40105a46ae331 100644 --- a/google/cloud/licensemanager/BUILD.bazel +++ b/google/cloud/licensemanager/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/licensemanager/v1:licensemanager_cc_grpc", + "@googleapis//google/cloud/licensemanager/v1:licensemanager_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/licensemanager/quickstart/CMakeLists.txt b/google/cloud/licensemanager/quickstart/CMakeLists.txt index a842b149d5dee..a70e1ca00775a 100644 --- a/google/cloud/licensemanager/quickstart/CMakeLists.txt +++ b/google/cloud/licensemanager/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the License Manager API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-licensemanager-quickstart CXX) find_package(google_cloud_cpp_licensemanager REQUIRED) diff --git a/google/cloud/licensemanager/v1/internal/license_manager_auth_decorator.cc b/google/cloud/licensemanager/v1/internal/license_manager_auth_decorator.cc index f71588fe3987c..3205389851e32 100644 --- a/google/cloud/licensemanager/v1/internal/license_manager_auth_decorator.cc +++ b/google/cloud/licensemanager/v1/internal/license_manager_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/licensemanager/v1/licensemanager.proto #include "google/cloud/licensemanager/v1/internal/license_manager_auth_decorator.h" -#include +#include "google/cloud/licensemanager/v1/licensemanager.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace licensemanager_v1_internal { @@ -351,3 +354,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace licensemanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/licensemanager/v1/internal/license_manager_auth_decorator.h b/google/cloud/licensemanager/v1/internal/license_manager_auth_decorator.h index 7d3bc9dc392ea..8dd25beccd3f6 100644 --- a/google/cloud/licensemanager/v1/internal/license_manager_auth_decorator.h +++ b/google/cloud/licensemanager/v1/internal/license_manager_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/licensemanager/v1/internal/license_manager_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace licensemanager_v1_internal { @@ -188,4 +191,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LICENSEMANAGER_V1_INTERNAL_LICENSE_MANAGER_AUTH_DECORATOR_H diff --git a/google/cloud/licensemanager/v1/internal/license_manager_connection_impl.h b/google/cloud/licensemanager/v1/internal/license_manager_connection_impl.h index d1ba9ddc81152..0ab444319e85f 100644 --- a/google/cloud/licensemanager/v1/internal/license_manager_connection_impl.h +++ b/google/cloud/licensemanager/v1/internal/license_manager_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/licensemanager/v1/internal/license_manager_logging_decorator.cc b/google/cloud/licensemanager/v1/internal/license_manager_logging_decorator.cc index 733e6d27317cd..fcd5f18106696 100644 --- a/google/cloud/licensemanager/v1/internal/license_manager_logging_decorator.cc +++ b/google/cloud/licensemanager/v1/internal/license_manager_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/licensemanager/v1/licensemanager.proto #include "google/cloud/licensemanager/v1/internal/license_manager_logging_decorator.h" +#include "google/cloud/licensemanager/v1/licensemanager.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace licensemanager_v1_internal { @@ -426,3 +429,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace licensemanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/licensemanager/v1/internal/license_manager_logging_decorator.h b/google/cloud/licensemanager/v1/internal/license_manager_logging_decorator.h index 2e74aca799234..a37080d84e2c7 100644 --- a/google/cloud/licensemanager/v1/internal/license_manager_logging_decorator.h +++ b/google/cloud/licensemanager/v1/internal/license_manager_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/licensemanager/v1/internal/license_manager_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace licensemanager_v1_internal { @@ -188,4 +191,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LICENSEMANAGER_V1_INTERNAL_LICENSE_MANAGER_LOGGING_DECORATOR_H diff --git a/google/cloud/licensemanager/v1/internal/license_manager_metadata_decorator.cc b/google/cloud/licensemanager/v1/internal/license_manager_metadata_decorator.cc index 43e3f444fd677..7120e34a3c9e5 100644 --- a/google/cloud/licensemanager/v1/internal/license_manager_metadata_decorator.cc +++ b/google/cloud/licensemanager/v1/internal/license_manager_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/licensemanager/v1/licensemanager.proto #include "google/cloud/licensemanager/v1/internal/license_manager_metadata_decorator.h" +#include "google/cloud/licensemanager/v1/licensemanager.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace licensemanager_v1_internal { @@ -328,3 +332,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace licensemanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/licensemanager/v1/internal/license_manager_metadata_decorator.h b/google/cloud/licensemanager/v1/internal/license_manager_metadata_decorator.h index a1779c4eac38a..e5c3275181000 100644 --- a/google/cloud/licensemanager/v1/internal/license_manager_metadata_decorator.h +++ b/google/cloud/licensemanager/v1/internal/license_manager_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/licensemanager/v1/internal/license_manager_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace licensemanager_v1_internal { @@ -193,4 +196,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LICENSEMANAGER_V1_INTERNAL_LICENSE_MANAGER_METADATA_DECORATOR_H diff --git a/google/cloud/licensemanager/v1/internal/license_manager_option_defaults.cc b/google/cloud/licensemanager/v1/internal/license_manager_option_defaults.cc index fe9003b6f64d4..009c816982fd8 100644 --- a/google/cloud/licensemanager/v1/internal/license_manager_option_defaults.cc +++ b/google/cloud/licensemanager/v1/internal/license_manager_option_defaults.cc @@ -42,7 +42,7 @@ Options LicenseManagerDefaultOptions(Options options) { if (!options.has()) { options.set( licensemanager_v1::LicenseManagerLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/licensemanager/v1/internal/license_manager_stub.cc b/google/cloud/licensemanager/v1/internal/license_manager_stub.cc index 9e5a3841c92ff..1bdf39ee9126d 100644 --- a/google/cloud/licensemanager/v1/internal/license_manager_stub.cc +++ b/google/cloud/licensemanager/v1/internal/license_manager_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/licensemanager/v1/licensemanager.proto #include "google/cloud/licensemanager/v1/internal/license_manager_stub.h" +#include "google/cloud/licensemanager/v1/licensemanager.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace licensemanager_v1_internal { @@ -415,3 +418,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace licensemanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/licensemanager/v1/internal/license_manager_stub.h b/google/cloud/licensemanager/v1/internal/license_manager_stub.h index a1cd8f07b3277..41c9116eff1ed 100644 --- a/google/cloud/licensemanager/v1/internal/license_manager_stub.h +++ b/google/cloud/licensemanager/v1/internal/license_manager_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LICENSEMANAGER_V1_INTERNAL_LICENSE_MANAGER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LICENSEMANAGER_V1_INTERNAL_LICENSE_MANAGER_STUB_H +#include "google/cloud/licensemanager/v1/licensemanager.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace licensemanager_v1_internal { @@ -353,4 +356,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LICENSEMANAGER_V1_INTERNAL_LICENSE_MANAGER_STUB_H diff --git a/google/cloud/licensemanager/v1/internal/license_manager_stub_factory.cc b/google/cloud/licensemanager/v1/internal/license_manager_stub_factory.cc index f6bb2abff4011..7280d3dda9882 100644 --- a/google/cloud/licensemanager/v1/internal/license_manager_stub_factory.cc +++ b/google/cloud/licensemanager/v1/internal/license_manager_stub_factory.cc @@ -22,18 +22,21 @@ #include "google/cloud/licensemanager/v1/internal/license_manager_metadata_decorator.h" #include "google/cloud/licensemanager/v1/internal/license_manager_stub.h" #include "google/cloud/licensemanager/v1/internal/license_manager_tracing_stub.h" +#include "google/cloud/licensemanager/v1/licensemanager.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace licensemanager_v1_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace licensemanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/licensemanager/v1/internal/license_manager_stub_factory.h b/google/cloud/licensemanager/v1/internal/license_manager_stub_factory.h index f576fa03de059..bb0ab5078da45 100644 --- a/google/cloud/licensemanager/v1/internal/license_manager_stub_factory.h +++ b/google/cloud/licensemanager/v1/internal/license_manager_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace licensemanager_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LICENSEMANAGER_V1_INTERNAL_LICENSE_MANAGER_STUB_FACTORY_H diff --git a/google/cloud/licensemanager/v1/internal/license_manager_tracing_connection.cc b/google/cloud/licensemanager/v1/internal/license_manager_tracing_connection.cc index 4509c8cd2df1e..9ed3ca035d799 100644 --- a/google/cloud/licensemanager/v1/internal/license_manager_tracing_connection.cc +++ b/google/cloud/licensemanager/v1/internal/license_manager_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace licensemanager_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - LicenseManagerTracingConnection::LicenseManagerTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -341,16 +339,12 @@ Status LicenseManagerTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeLicenseManagerTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/licensemanager/v1/internal/license_manager_tracing_connection.h b/google/cloud/licensemanager/v1/internal/license_manager_tracing_connection.h index f1795d3457518..bc691bc1e4760 100644 --- a/google/cloud/licensemanager/v1/internal/license_manager_tracing_connection.h +++ b/google/cloud/licensemanager/v1/internal/license_manager_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace licensemanager_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class LicenseManagerTracingConnection : public licensemanager_v1::LicenseManagerConnection { public: @@ -162,8 +160,6 @@ class LicenseManagerTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/licensemanager/v1/internal/license_manager_tracing_stub.cc b/google/cloud/licensemanager/v1/internal/license_manager_tracing_stub.cc index 949cdab31f318..39d64ac07e2dc 100644 --- a/google/cloud/licensemanager/v1/internal/license_manager_tracing_stub.cc +++ b/google/cloud/licensemanager/v1/internal/license_manager_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace licensemanager_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - LicenseManagerTracingStub::LicenseManagerTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -382,18 +383,14 @@ future LicenseManagerTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeLicenseManagerTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace licensemanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/licensemanager/v1/internal/license_manager_tracing_stub.h b/google/cloud/licensemanager/v1/internal/license_manager_tracing_stub.h index a71808ceb4c29..9f0194f152687 100644 --- a/google/cloud/licensemanager/v1/internal/license_manager_tracing_stub.h +++ b/google/cloud/licensemanager/v1/internal/license_manager_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace licensemanager_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class LicenseManagerTracingStub : public LicenseManagerStub { public: ~LicenseManagerTracingStub() override = default; @@ -183,8 +184,6 @@ class LicenseManagerTracingStub : public LicenseManagerStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -199,4 +198,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LICENSEMANAGER_V1_INTERNAL_LICENSE_MANAGER_TRACING_STUB_H diff --git a/google/cloud/licensemanager/v1/license_manager_client.h b/google/cloud/licensemanager/v1/license_manager_client.h index c9472aeab9b4b..e6ba530eb27b6 100644 --- a/google/cloud/licensemanager/v1/license_manager_client.h +++ b/google/cloud/licensemanager/v1/license_manager_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/licensemanager/v1/license_manager_connection.h b/google/cloud/licensemanager/v1/license_manager_connection.h index 7954f4e929e83..87ab3a971c8f1 100644 --- a/google/cloud/licensemanager/v1/license_manager_connection.h +++ b/google/cloud/licensemanager/v1/license_manager_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/licensemanager/v1/internal/license_manager_retry_traits.h" #include "google/cloud/licensemanager/v1/license_manager_connection_idempotency_policy.h" +#include "google/cloud/licensemanager/v1/licensemanager.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/licensemanager/v1/license_manager_connection_idempotency_policy.h b/google/cloud/licensemanager/v1/license_manager_connection_idempotency_policy.h index 19e8f5de55d3e..eef3d669f35f4 100644 --- a/google/cloud/licensemanager/v1/license_manager_connection_idempotency_policy.h +++ b/google/cloud/licensemanager/v1/license_manager_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LICENSEMANAGER_V1_LICENSE_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LICENSEMANAGER_V1_LICENSE_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/licensemanager/v1/licensemanager.grpc.pb.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/logging/BUILD.bazel b/google/cloud/logging/BUILD.bazel index 3430666e9a458..c9784acb0deda 100644 --- a/google/cloud/logging/BUILD.bazel +++ b/google/cloud/logging/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v2/", ] googleapis_deps = [ - "@com_google_googleapis//google/logging/v2:logging_cc_grpc", + "@googleapis//google/logging/v2:logging_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/logging/CMakeLists.txt b/google/cloud/logging/CMakeLists.txt index 4ed26c3c0913d..4e94122416f4e 100644 --- a/google/cloud/logging/CMakeLists.txt +++ b/google/cloud/logging/CMakeLists.txt @@ -18,7 +18,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library( logging "Cloud Logging API" - SERVICE_DIRS "__EMPTY__" "v2/" + SERVICE_DIRS "v2/" SHARED_PROTO_DEPS "logging_type" BACKWARDS_COMPAT_PROTO_TARGETS "logging_type_type_protos") diff --git a/google/cloud/logging/integration_tests/BUILD.bazel b/google/cloud/logging/integration_tests/BUILD.bazel index f402f2a7b4433..e2ad738fb83c3 100644 --- a/google/cloud/logging/integration_tests/BUILD.bazel +++ b/google/cloud/logging/integration_tests/BUILD.bazel @@ -30,6 +30,6 @@ licenses(["notice"]) # Apache 2.0 "//:logging", "//google/cloud/testing_util:google_cloud_cpp_testing_grpc_private", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) for test in logging_client_integration_tests] diff --git a/google/cloud/logging/logging_service_v2_client.h b/google/cloud/logging/logging_service_v2_client.h deleted file mode 100644 index 4a63038a2079b..0000000000000 --- a/google/cloud/logging/logging_service_v2_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/logging/v2/logging.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LOGGING_LOGGING_SERVICE_V2_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LOGGING_LOGGING_SERVICE_V2_CLIENT_H - -#include "google/cloud/logging/logging_service_v2_connection.h" -#include "google/cloud/logging/v2/logging_service_v2_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in logging_v2 instead of the aliases defined in -/// this namespace. -namespace logging { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use logging_v2::LoggingServiceV2Client directly. -using ::google::cloud::logging_v2::LoggingServiceV2Client; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace logging -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LOGGING_LOGGING_SERVICE_V2_CLIENT_H diff --git a/google/cloud/logging/logging_service_v2_connection.h b/google/cloud/logging/logging_service_v2_connection.h deleted file mode 100644 index 6e8c6328372f9..0000000000000 --- a/google/cloud/logging/logging_service_v2_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/logging/v2/logging.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LOGGING_LOGGING_SERVICE_V2_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LOGGING_LOGGING_SERVICE_V2_CONNECTION_H - -#include "google/cloud/logging/logging_service_v2_connection_idempotency_policy.h" -#include "google/cloud/logging/v2/logging_service_v2_connection.h" - -namespace google { -namespace cloud { -namespace logging { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use logging_v2::MakeLoggingServiceV2Connection directly. -using ::google::cloud::logging_v2::MakeLoggingServiceV2Connection; - -/// @deprecated Use logging_v2::LoggingServiceV2Connection directly. -using ::google::cloud::logging_v2::LoggingServiceV2Connection; - -/// @deprecated Use logging_v2::LoggingServiceV2LimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::logging_v2::LoggingServiceV2LimitedErrorCountRetryPolicy; - -/// @deprecated Use logging_v2::LoggingServiceV2LimitedTimeRetryPolicy directly. -using ::google::cloud::logging_v2::LoggingServiceV2LimitedTimeRetryPolicy; - -/// @deprecated Use logging_v2::LoggingServiceV2RetryPolicy directly. -using ::google::cloud::logging_v2::LoggingServiceV2RetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace logging -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LOGGING_LOGGING_SERVICE_V2_CONNECTION_H diff --git a/google/cloud/logging/logging_service_v2_connection_idempotency_policy.h b/google/cloud/logging/logging_service_v2_connection_idempotency_policy.h deleted file mode 100644 index bf6becb4dfe59..0000000000000 --- a/google/cloud/logging/logging_service_v2_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/logging/v2/logging.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LOGGING_LOGGING_SERVICE_V2_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LOGGING_LOGGING_SERVICE_V2_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/logging/v2/logging_service_v2_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace logging { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// logging_v2::MakeDefaultLoggingServiceV2ConnectionIdempotencyPolicy directly. -using ::google::cloud::logging_v2:: - MakeDefaultLoggingServiceV2ConnectionIdempotencyPolicy; - -/// @deprecated Use logging_v2::LoggingServiceV2ConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::logging_v2::LoggingServiceV2ConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace logging -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LOGGING_LOGGING_SERVICE_V2_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/logging/logging_service_v2_options.h b/google/cloud/logging/logging_service_v2_options.h deleted file mode 100644 index 4da2887298b94..0000000000000 --- a/google/cloud/logging/logging_service_v2_options.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/logging/v2/logging.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LOGGING_LOGGING_SERVICE_V2_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LOGGING_LOGGING_SERVICE_V2_OPTIONS_H - -#include "google/cloud/logging/logging_service_v2_connection.h" -#include "google/cloud/logging/logging_service_v2_connection_idempotency_policy.h" -#include "google/cloud/logging/v2/logging_service_v2_options.h" - -namespace google { -namespace cloud { -namespace logging { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use logging_v2::LoggingServiceV2BackoffPolicyOption directly. -using ::google::cloud::logging_v2::LoggingServiceV2BackoffPolicyOption; - -/// @deprecated Use -/// logging_v2::LoggingServiceV2ConnectionIdempotencyPolicyOption directly. -using ::google::cloud::logging_v2:: - LoggingServiceV2ConnectionIdempotencyPolicyOption; - -/// @deprecated Use logging_v2::LoggingServiceV2PolicyOptionList directly. -using ::google::cloud::logging_v2::LoggingServiceV2PolicyOptionList; - -/// @deprecated Use logging_v2::LoggingServiceV2RetryPolicyOption directly. -using ::google::cloud::logging_v2::LoggingServiceV2RetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace logging -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LOGGING_LOGGING_SERVICE_V2_OPTIONS_H diff --git a/google/cloud/logging/mocks/mock_logging_service_v2_connection.h b/google/cloud/logging/mocks/mock_logging_service_v2_connection.h deleted file mode 100644 index 0db00ce132177..0000000000000 --- a/google/cloud/logging/mocks/mock_logging_service_v2_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/logging/v2/logging.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LOGGING_MOCKS_MOCK_LOGGING_SERVICE_V2_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LOGGING_MOCKS_MOCK_LOGGING_SERVICE_V2_CONNECTION_H - -#include "google/cloud/logging/logging_service_v2_connection.h" -#include "google/cloud/logging/v2/mocks/mock_logging_service_v2_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in logging_v2_mocks instead of the aliases -/// defined in this namespace. -namespace logging_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use logging_v2_mocks::MockLoggingServiceV2Connection directly. -using ::google::cloud::logging_v2_mocks::MockLoggingServiceV2Connection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace logging_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LOGGING_MOCKS_MOCK_LOGGING_SERVICE_V2_CONNECTION_H diff --git a/google/cloud/logging/quickstart/.bazelrc b/google/cloud/logging/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/logging/quickstart/.bazelrc +++ b/google/cloud/logging/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/logging/quickstart/CMakeLists.txt b/google/cloud/logging/quickstart/CMakeLists.txt index 143d362b67fd7..e57dd2e3f12e6 100644 --- a/google/cloud/logging/quickstart/CMakeLists.txt +++ b/google/cloud/logging/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Logging API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-logging-quickstart CXX) find_package(google_cloud_cpp_logging REQUIRED) diff --git a/google/cloud/logging/v2/config_service_v2_client.h b/google/cloud/logging/v2/config_service_v2_client.h index ddc15f3af74c4..d83861f0f3c04 100644 --- a/google/cloud/logging/v2/config_service_v2_client.h +++ b/google/cloud/logging/v2/config_service_v2_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/logging/v2/config_service_v2_connection.h b/google/cloud/logging/v2/config_service_v2_connection.h index c1fe0ee900387..284cbc8638ea9 100644 --- a/google/cloud/logging/v2/config_service_v2_connection.h +++ b/google/cloud/logging/v2/config_service_v2_connection.h @@ -30,8 +30,8 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/logging/v2/logging_config.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/logging/v2/config_service_v2_connection_idempotency_policy.h b/google/cloud/logging/v2/config_service_v2_connection_idempotency_policy.h index b086d4515e0e4..f1c579a41fe41 100644 --- a/google/cloud/logging/v2/config_service_v2_connection_idempotency_policy.h +++ b/google/cloud/logging/v2/config_service_v2_connection_idempotency_policy.h @@ -21,8 +21,8 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/logging/v2/logging_config.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/logging/v2/internal/config_service_v2_auth_decorator.cc b/google/cloud/logging/v2/internal/config_service_v2_auth_decorator.cc index a41e88d6074c6..b515c32ca1702 100644 --- a/google/cloud/logging/v2/internal/config_service_v2_auth_decorator.cc +++ b/google/cloud/logging/v2/internal/config_service_v2_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/logging/v2/logging_config.proto #include "google/cloud/logging/v2/internal/config_service_v2_auth_decorator.h" -#include +#include "google/logging/v2/logging_config.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { @@ -458,3 +461,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace logging_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/logging/v2/internal/config_service_v2_auth_decorator.h b/google/cloud/logging/v2/internal/config_service_v2_auth_decorator.h index 7a85cecc1b771..b59a3e75b2298 100644 --- a/google/cloud/logging/v2/internal/config_service_v2_auth_decorator.h +++ b/google/cloud/logging/v2/internal/config_service_v2_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/logging/v2/internal/config_service_v2_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { @@ -231,4 +234,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LOGGING_V2_INTERNAL_CONFIG_SERVICE_V2_AUTH_DECORATOR_H diff --git a/google/cloud/logging/v2/internal/config_service_v2_connection_impl.h b/google/cloud/logging/v2/internal/config_service_v2_connection_impl.h index cb37fa6f2df49..f838a8e64d104 100644 --- a/google/cloud/logging/v2/internal/config_service_v2_connection_impl.h +++ b/google/cloud/logging/v2/internal/config_service_v2_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/logging/v2/internal/config_service_v2_logging_decorator.cc b/google/cloud/logging/v2/internal/config_service_v2_logging_decorator.cc index 9ba22e8c2e832..06c07c7364aaf 100644 --- a/google/cloud/logging/v2/internal/config_service_v2_logging_decorator.cc +++ b/google/cloud/logging/v2/internal/config_service_v2_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/logging/v2/internal/config_service_v2_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/logging/v2/logging_config.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { @@ -562,3 +565,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace logging_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/logging/v2/internal/config_service_v2_logging_decorator.h b/google/cloud/logging/v2/internal/config_service_v2_logging_decorator.h index fa97296a8b1f7..0f038b32e66fd 100644 --- a/google/cloud/logging/v2/internal/config_service_v2_logging_decorator.h +++ b/google/cloud/logging/v2/internal/config_service_v2_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/logging/v2/internal/config_service_v2_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { @@ -231,4 +234,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LOGGING_V2_INTERNAL_CONFIG_SERVICE_V2_LOGGING_DECORATOR_H diff --git a/google/cloud/logging/v2/internal/config_service_v2_metadata_decorator.cc b/google/cloud/logging/v2/internal/config_service_v2_metadata_decorator.cc index d66580a221538..d3577f6bc84c2 100644 --- a/google/cloud/logging/v2/internal/config_service_v2_metadata_decorator.cc +++ b/google/cloud/logging/v2/internal/config_service_v2_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/logging/v2/internal/config_service_v2_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/logging/v2/logging_config.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { @@ -439,3 +443,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace logging_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/logging/v2/internal/config_service_v2_metadata_decorator.h b/google/cloud/logging/v2/internal/config_service_v2_metadata_decorator.h index c059e753f9542..b574a3f46785b 100644 --- a/google/cloud/logging/v2/internal/config_service_v2_metadata_decorator.h +++ b/google/cloud/logging/v2/internal/config_service_v2_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/logging/v2/internal/config_service_v2_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { @@ -237,4 +240,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LOGGING_V2_INTERNAL_CONFIG_SERVICE_V2_METADATA_DECORATOR_H diff --git a/google/cloud/logging/v2/internal/config_service_v2_option_defaults.cc b/google/cloud/logging/v2/internal/config_service_v2_option_defaults.cc index a234803c9c55f..8b762fe6342bf 100644 --- a/google/cloud/logging/v2/internal/config_service_v2_option_defaults.cc +++ b/google/cloud/logging/v2/internal/config_service_v2_option_defaults.cc @@ -41,7 +41,7 @@ Options ConfigServiceV2DefaultOptions(Options options) { if (!options.has()) { options.set( logging_v2::ConfigServiceV2LimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/logging/v2/internal/config_service_v2_stub.cc b/google/cloud/logging/v2/internal/config_service_v2_stub.cc index dd297b2acadf0..dc9ac389e50c5 100644 --- a/google/cloud/logging/v2/internal/config_service_v2_stub.cc +++ b/google/cloud/logging/v2/internal/config_service_v2_stub.cc @@ -19,11 +19,14 @@ #include "google/cloud/logging/v2/internal/config_service_v2_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/logging/v2/logging_config.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { @@ -562,3 +565,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace logging_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/logging/v2/internal/config_service_v2_stub.h b/google/cloud/logging/v2/internal/config_service_v2_stub.h index 764a24ac65353..2740ca03d9e74 100644 --- a/google/cloud/logging/v2/internal/config_service_v2_stub.h +++ b/google/cloud/logging/v2/internal/config_service_v2_stub.h @@ -24,11 +24,14 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/logging/v2/logging_config.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { @@ -427,4 +430,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LOGGING_V2_INTERNAL_CONFIG_SERVICE_V2_STUB_H diff --git a/google/cloud/logging/v2/internal/config_service_v2_stub_factory.cc b/google/cloud/logging/v2/internal/config_service_v2_stub_factory.cc index e7a98036aeef6..5198624ed6562 100644 --- a/google/cloud/logging/v2/internal/config_service_v2_stub_factory.cc +++ b/google/cloud/logging/v2/internal/config_service_v2_stub_factory.cc @@ -28,11 +28,14 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/logging/v2/logging_config.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace logging_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/logging/v2/internal/config_service_v2_stub_factory.h b/google/cloud/logging/v2/internal/config_service_v2_stub_factory.h index 9a1e8cf555b48..84324e8d2130d 100644 --- a/google/cloud/logging/v2/internal/config_service_v2_stub_factory.h +++ b/google/cloud/logging/v2/internal/config_service_v2_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LOGGING_V2_INTERNAL_CONFIG_SERVICE_V2_STUB_FACTORY_H diff --git a/google/cloud/logging/v2/internal/config_service_v2_tracing_connection.cc b/google/cloud/logging/v2/internal/config_service_v2_tracing_connection.cc index 298d5c120bce2..d4799098d89af 100644 --- a/google/cloud/logging/v2/internal/config_service_v2_tracing_connection.cc +++ b/google/cloud/logging/v2/internal/config_service_v2_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace logging_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ConfigServiceV2TracingConnection::ConfigServiceV2TracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -448,16 +446,12 @@ Status ConfigServiceV2TracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeConfigServiceV2TracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/logging/v2/internal/config_service_v2_tracing_connection.h b/google/cloud/logging/v2/internal/config_service_v2_tracing_connection.h index c672bdfa5bf8e..5ade530f88dd1 100644 --- a/google/cloud/logging/v2/internal/config_service_v2_tracing_connection.h +++ b/google/cloud/logging/v2/internal/config_service_v2_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace logging_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ConfigServiceV2TracingConnection : public logging_v2::ConfigServiceV2Connection { public: @@ -184,8 +182,6 @@ class ConfigServiceV2TracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/logging/v2/internal/config_service_v2_tracing_stub.cc b/google/cloud/logging/v2/internal/config_service_v2_tracing_stub.cc index 9fc459e9e7392..90b3b12eb469b 100644 --- a/google/cloud/logging/v2/internal/config_service_v2_tracing_stub.cc +++ b/google/cloud/logging/v2/internal/config_service_v2_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ConfigServiceV2TracingStub::ConfigServiceV2TracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -536,18 +537,14 @@ future ConfigServiceV2TracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeConfigServiceV2TracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace logging_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/logging/v2/internal/config_service_v2_tracing_stub.h b/google/cloud/logging/v2/internal/config_service_v2_tracing_stub.h index 6bc90c54f9c39..6cfde095235a1 100644 --- a/google/cloud/logging/v2/internal/config_service_v2_tracing_stub.h +++ b/google/cloud/logging/v2/internal/config_service_v2_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ConfigServiceV2TracingStub : public ConfigServiceV2Stub { public: ~ConfigServiceV2TracingStub() override = default; @@ -227,8 +228,6 @@ class ConfigServiceV2TracingStub : public ConfigServiceV2Stub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -243,4 +242,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LOGGING_V2_INTERNAL_CONFIG_SERVICE_V2_TRACING_STUB_H diff --git a/google/cloud/logging/v2/internal/logging_service_v2_auth_decorator.cc b/google/cloud/logging/v2/internal/logging_service_v2_auth_decorator.cc index abbc49fe4ddaa..13e6225fb4afc 100644 --- a/google/cloud/logging/v2/internal/logging_service_v2_auth_decorator.cc +++ b/google/cloud/logging/v2/internal/logging_service_v2_auth_decorator.cc @@ -18,10 +18,13 @@ #include "google/cloud/logging/v2/internal/logging_service_v2_auth_decorator.h" #include "google/cloud/internal/async_read_write_stream_auth.h" -#include +#include "google/logging/v2/logging.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { @@ -145,3 +148,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace logging_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/logging/v2/internal/logging_service_v2_auth_decorator.h b/google/cloud/logging/v2/internal/logging_service_v2_auth_decorator.h index c1488f0497b3b..3987ce9ca2c92 100644 --- a/google/cloud/logging/v2/internal/logging_service_v2_auth_decorator.h +++ b/google/cloud/logging/v2/internal/logging_service_v2_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { @@ -97,4 +100,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LOGGING_V2_INTERNAL_LOGGING_SERVICE_V2_AUTH_DECORATOR_H diff --git a/google/cloud/logging/v2/internal/logging_service_v2_logging_decorator.cc b/google/cloud/logging/v2/internal/logging_service_v2_logging_decorator.cc index 1f5cc12be4e5d..6f1ec7838ab40 100644 --- a/google/cloud/logging/v2/internal/logging_service_v2_logging_decorator.cc +++ b/google/cloud/logging/v2/internal/logging_service_v2_logging_decorator.cc @@ -20,12 +20,15 @@ #include "google/cloud/internal/async_read_write_stream_logging.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/logging/v2/logging.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { @@ -179,3 +182,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace logging_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/logging/v2/internal/logging_service_v2_logging_decorator.h b/google/cloud/logging/v2/internal/logging_service_v2_logging_decorator.h index c529e5c02c145..71f40c3b41ff5 100644 --- a/google/cloud/logging/v2/internal/logging_service_v2_logging_decorator.h +++ b/google/cloud/logging/v2/internal/logging_service_v2_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { @@ -98,4 +101,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LOGGING_V2_INTERNAL_LOGGING_SERVICE_V2_LOGGING_DECORATOR_H diff --git a/google/cloud/logging/v2/internal/logging_service_v2_metadata_decorator.cc b/google/cloud/logging/v2/internal/logging_service_v2_metadata_decorator.cc index 9ed90374b7e04..e251baf18a728 100644 --- a/google/cloud/logging/v2/internal/logging_service_v2_metadata_decorator.cc +++ b/google/cloud/logging/v2/internal/logging_service_v2_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/logging/v2/internal/logging_service_v2_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/logging/v2/logging.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { @@ -152,3 +156,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace logging_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/logging/v2/internal/logging_service_v2_metadata_decorator.h b/google/cloud/logging/v2/internal/logging_service_v2_metadata_decorator.h index 2de1d3a3f1f6d..3cbd27e819aab 100644 --- a/google/cloud/logging/v2/internal/logging_service_v2_metadata_decorator.h +++ b/google/cloud/logging/v2/internal/logging_service_v2_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { @@ -103,4 +106,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LOGGING_V2_INTERNAL_LOGGING_SERVICE_V2_METADATA_DECORATOR_H diff --git a/google/cloud/logging/v2/internal/logging_service_v2_option_defaults.cc b/google/cloud/logging/v2/internal/logging_service_v2_option_defaults.cc index 3aee543b34a4b..c4408006c6ada 100644 --- a/google/cloud/logging/v2/internal/logging_service_v2_option_defaults.cc +++ b/google/cloud/logging/v2/internal/logging_service_v2_option_defaults.cc @@ -42,7 +42,7 @@ Options LoggingServiceV2DefaultOptions(Options options) { if (!options.has()) { options.set( logging_v2::LoggingServiceV2LimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/logging/v2/internal/logging_service_v2_stub.cc b/google/cloud/logging/v2/internal/logging_service_v2_stub.cc index 7ea868867b99b..75be03eea7e73 100644 --- a/google/cloud/logging/v2/internal/logging_service_v2_stub.cc +++ b/google/cloud/logging/v2/internal/logging_service_v2_stub.cc @@ -20,10 +20,13 @@ #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/internal/async_read_write_stream_impl.h" #include "google/cloud/status_or.h" -#include +#include "google/logging/v2/logging.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { @@ -166,3 +169,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace logging_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/logging/v2/internal/logging_service_v2_stub.h b/google/cloud/logging/v2/internal/logging_service_v2_stub.h index aeed66150c347..10501713bf6ca 100644 --- a/google/cloud/logging/v2/internal/logging_service_v2_stub.h +++ b/google/cloud/logging/v2/internal/logging_service_v2_stub.h @@ -25,11 +25,14 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/logging/v2/logging.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { @@ -161,4 +164,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LOGGING_V2_INTERNAL_LOGGING_SERVICE_V2_STUB_H diff --git a/google/cloud/logging/v2/internal/logging_service_v2_stub_factory.cc b/google/cloud/logging/v2/internal/logging_service_v2_stub_factory.cc index 43364800dfddd..5577d04b5d67e 100644 --- a/google/cloud/logging/v2/internal/logging_service_v2_stub_factory.cc +++ b/google/cloud/logging/v2/internal/logging_service_v2_stub_factory.cc @@ -28,11 +28,14 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/logging/v2/logging.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace logging_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/logging/v2/internal/logging_service_v2_stub_factory.h b/google/cloud/logging/v2/internal/logging_service_v2_stub_factory.h index 1ba74a1b49450..5145dbadcc87d 100644 --- a/google/cloud/logging/v2/internal/logging_service_v2_stub_factory.h +++ b/google/cloud/logging/v2/internal/logging_service_v2_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LOGGING_V2_INTERNAL_LOGGING_SERVICE_V2_STUB_FACTORY_H diff --git a/google/cloud/logging/v2/internal/logging_service_v2_tracing_connection.cc b/google/cloud/logging/v2/internal/logging_service_v2_tracing_connection.cc index 2ac32c950c02c..3aaf90ff3a924 100644 --- a/google/cloud/logging/v2/internal/logging_service_v2_tracing_connection.cc +++ b/google/cloud/logging/v2/internal/logging_service_v2_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace logging_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - LoggingServiceV2TracingConnection::LoggingServiceV2TracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -128,16 +126,12 @@ LoggingServiceV2TracingConnection::AsyncWriteLogEntries( child_->AsyncWriteLogEntries(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeLoggingServiceV2TracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/logging/v2/internal/logging_service_v2_tracing_connection.h b/google/cloud/logging/v2/internal/logging_service_v2_tracing_connection.h index 158d11145d710..11f1362fcb9ed 100644 --- a/google/cloud/logging/v2/internal/logging_service_v2_tracing_connection.h +++ b/google/cloud/logging/v2/internal/logging_service_v2_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace logging_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class LoggingServiceV2TracingConnection : public logging_v2::LoggingServiceV2Connection { public: @@ -79,8 +77,6 @@ class LoggingServiceV2TracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/logging/v2/internal/logging_service_v2_tracing_stub.cc b/google/cloud/logging/v2/internal/logging_service_v2_tracing_stub.cc index 2d1dbc5fa74a7..2b37308a3d285 100644 --- a/google/cloud/logging/v2/internal/logging_service_v2_tracing_stub.cc +++ b/google/cloud/logging/v2/internal/logging_service_v2_tracing_stub.cc @@ -22,13 +22,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - LoggingServiceV2TracingStub::LoggingServiceV2TracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -161,18 +162,14 @@ LoggingServiceV2TracingStub::AsyncWriteLogEntries( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeLoggingServiceV2TracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace logging_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/logging/v2/internal/logging_service_v2_tracing_stub.h b/google/cloud/logging/v2/internal/logging_service_v2_tracing_stub.h index a78f4509ccf2e..0a5350ac93b76 100644 --- a/google/cloud/logging/v2/internal/logging_service_v2_tracing_stub.h +++ b/google/cloud/logging/v2/internal/logging_service_v2_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class LoggingServiceV2TracingStub : public LoggingServiceV2Stub { public: ~LoggingServiceV2TracingStub() override = default; @@ -94,8 +95,6 @@ class LoggingServiceV2TracingStub : public LoggingServiceV2Stub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -110,4 +109,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LOGGING_V2_INTERNAL_LOGGING_SERVICE_V2_TRACING_STUB_H diff --git a/google/cloud/logging/v2/internal/metrics_service_v2_auth_decorator.cc b/google/cloud/logging/v2/internal/metrics_service_v2_auth_decorator.cc index a2285a44ba552..262b190f69b10 100644 --- a/google/cloud/logging/v2/internal/metrics_service_v2_auth_decorator.cc +++ b/google/cloud/logging/v2/internal/metrics_service_v2_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/logging/v2/logging_metrics.proto #include "google/cloud/logging/v2/internal/metrics_service_v2_auth_decorator.h" -#include +#include "google/logging/v2/logging_metrics.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { @@ -101,3 +104,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace logging_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/logging/v2/internal/metrics_service_v2_auth_decorator.h b/google/cloud/logging/v2/internal/metrics_service_v2_auth_decorator.h index c0344058c7f7c..208ad6a25db28 100644 --- a/google/cloud/logging/v2/internal/metrics_service_v2_auth_decorator.h +++ b/google/cloud/logging/v2/internal/metrics_service_v2_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { @@ -80,4 +83,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LOGGING_V2_INTERNAL_METRICS_SERVICE_V2_AUTH_DECORATOR_H diff --git a/google/cloud/logging/v2/internal/metrics_service_v2_logging_decorator.cc b/google/cloud/logging/v2/internal/metrics_service_v2_logging_decorator.cc index fb01c578b44b3..e6b57eac03a41 100644 --- a/google/cloud/logging/v2/internal/metrics_service_v2_logging_decorator.cc +++ b/google/cloud/logging/v2/internal/metrics_service_v2_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/logging/v2/internal/metrics_service_v2_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/logging/v2/logging_metrics.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { @@ -131,3 +134,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace logging_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/logging/v2/internal/metrics_service_v2_logging_decorator.h b/google/cloud/logging/v2/internal/metrics_service_v2_logging_decorator.h index 14662679fcad4..2ee9c9685a2a4 100644 --- a/google/cloud/logging/v2/internal/metrics_service_v2_logging_decorator.h +++ b/google/cloud/logging/v2/internal/metrics_service_v2_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { @@ -80,4 +83,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LOGGING_V2_INTERNAL_METRICS_SERVICE_V2_LOGGING_DECORATOR_H diff --git a/google/cloud/logging/v2/internal/metrics_service_v2_metadata_decorator.cc b/google/cloud/logging/v2/internal/metrics_service_v2_metadata_decorator.cc index c49a2082e5c1f..77bd57211aa39 100644 --- a/google/cloud/logging/v2/internal/metrics_service_v2_metadata_decorator.cc +++ b/google/cloud/logging/v2/internal/metrics_service_v2_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/logging/v2/internal/metrics_service_v2_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/logging/v2/logging_metrics.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { @@ -132,3 +136,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace logging_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/logging/v2/internal/metrics_service_v2_metadata_decorator.h b/google/cloud/logging/v2/internal/metrics_service_v2_metadata_decorator.h index 7e6f87c7622ac..6607ae1976cc0 100644 --- a/google/cloud/logging/v2/internal/metrics_service_v2_metadata_decorator.h +++ b/google/cloud/logging/v2/internal/metrics_service_v2_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { @@ -86,4 +89,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LOGGING_V2_INTERNAL_METRICS_SERVICE_V2_METADATA_DECORATOR_H diff --git a/google/cloud/logging/v2/internal/metrics_service_v2_option_defaults.cc b/google/cloud/logging/v2/internal/metrics_service_v2_option_defaults.cc index 48bc324840201..b7822f0b3a9af 100644 --- a/google/cloud/logging/v2/internal/metrics_service_v2_option_defaults.cc +++ b/google/cloud/logging/v2/internal/metrics_service_v2_option_defaults.cc @@ -42,7 +42,7 @@ Options MetricsServiceV2DefaultOptions(Options options) { if (!options.has()) { options.set( logging_v2::MetricsServiceV2LimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/logging/v2/internal/metrics_service_v2_stub.cc b/google/cloud/logging/v2/internal/metrics_service_v2_stub.cc index 1d60a7f5e4685..388f3d60fb5cb 100644 --- a/google/cloud/logging/v2/internal/metrics_service_v2_stub.cc +++ b/google/cloud/logging/v2/internal/metrics_service_v2_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/logging/v2/internal/metrics_service_v2_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "google/logging/v2/logging_metrics.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { @@ -128,3 +131,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace logging_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/logging/v2/internal/metrics_service_v2_stub.h b/google/cloud/logging/v2/internal/metrics_service_v2_stub.h index 3f7f8db3688b1..fa5b88c333391 100644 --- a/google/cloud/logging/v2/internal/metrics_service_v2_stub.h +++ b/google/cloud/logging/v2/internal/metrics_service_v2_stub.h @@ -22,11 +22,14 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/logging/v2/logging_metrics.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { @@ -123,4 +126,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LOGGING_V2_INTERNAL_METRICS_SERVICE_V2_STUB_H diff --git a/google/cloud/logging/v2/internal/metrics_service_v2_stub_factory.cc b/google/cloud/logging/v2/internal/metrics_service_v2_stub_factory.cc index 9c366cae1ec71..68e0dcc799797 100644 --- a/google/cloud/logging/v2/internal/metrics_service_v2_stub_factory.cc +++ b/google/cloud/logging/v2/internal/metrics_service_v2_stub_factory.cc @@ -28,11 +28,14 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/logging/v2/logging_metrics.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace logging_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/logging/v2/internal/metrics_service_v2_stub_factory.h b/google/cloud/logging/v2/internal/metrics_service_v2_stub_factory.h index 3064bab39deb2..f1ad409924ec1 100644 --- a/google/cloud/logging/v2/internal/metrics_service_v2_stub_factory.h +++ b/google/cloud/logging/v2/internal/metrics_service_v2_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LOGGING_V2_INTERNAL_METRICS_SERVICE_V2_STUB_FACTORY_H diff --git a/google/cloud/logging/v2/internal/metrics_service_v2_tracing_connection.cc b/google/cloud/logging/v2/internal/metrics_service_v2_tracing_connection.cc index 824108069b52c..a17b5932d2215 100644 --- a/google/cloud/logging/v2/internal/metrics_service_v2_tracing_connection.cc +++ b/google/cloud/logging/v2/internal/metrics_service_v2_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace logging_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - MetricsServiceV2TracingConnection::MetricsServiceV2TracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -107,16 +105,12 @@ Status MetricsServiceV2TracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeMetricsServiceV2TracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/logging/v2/internal/metrics_service_v2_tracing_connection.h b/google/cloud/logging/v2/internal/metrics_service_v2_tracing_connection.h index 393bd76128f6a..013d7594ae6ea 100644 --- a/google/cloud/logging/v2/internal/metrics_service_v2_tracing_connection.h +++ b/google/cloud/logging/v2/internal/metrics_service_v2_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace logging_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class MetricsServiceV2TracingConnection : public logging_v2::MetricsServiceV2Connection { public: @@ -68,8 +66,6 @@ class MetricsServiceV2TracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/logging/v2/internal/metrics_service_v2_tracing_stub.cc b/google/cloud/logging/v2/internal/metrics_service_v2_tracing_stub.cc index 1210a27aefaf9..aa3473b1f3b49 100644 --- a/google/cloud/logging/v2/internal/metrics_service_v2_tracing_stub.cc +++ b/google/cloud/logging/v2/internal/metrics_service_v2_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - MetricsServiceV2TracingStub::MetricsServiceV2TracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -126,18 +127,14 @@ Status MetricsServiceV2TracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeMetricsServiceV2TracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace logging_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/logging/v2/internal/metrics_service_v2_tracing_stub.h b/google/cloud/logging/v2/internal/metrics_service_v2_tracing_stub.h index 9cc346d9a8f3f..6d226cf0c3da9 100644 --- a/google/cloud/logging/v2/internal/metrics_service_v2_tracing_stub.h +++ b/google/cloud/logging/v2/internal/metrics_service_v2_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace logging_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class MetricsServiceV2TracingStub : public MetricsServiceV2Stub { public: ~MetricsServiceV2TracingStub() override = default; @@ -77,8 +78,6 @@ class MetricsServiceV2TracingStub : public MetricsServiceV2Stub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -93,4 +92,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LOGGING_V2_INTERNAL_METRICS_SERVICE_V2_TRACING_STUB_H diff --git a/google/cloud/logging/v2/logging_service_v2_connection.h b/google/cloud/logging/v2/logging_service_v2_connection.h index c87e8f144f52d..f42ce05571bb7 100644 --- a/google/cloud/logging/v2/logging_service_v2_connection.h +++ b/google/cloud/logging/v2/logging_service_v2_connection.h @@ -29,7 +29,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/logging/v2/logging.pb.h" #include namespace google { diff --git a/google/cloud/logging/v2/logging_service_v2_connection_idempotency_policy.h b/google/cloud/logging/v2/logging_service_v2_connection_idempotency_policy.h index b6ca281f9cb0f..acfb75c352876 100644 --- a/google/cloud/logging/v2/logging_service_v2_connection_idempotency_policy.h +++ b/google/cloud/logging/v2/logging_service_v2_connection_idempotency_policy.h @@ -21,8 +21,8 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/logging/v2/logging.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/logging/v2/metrics_service_v2_connection.h b/google/cloud/logging/v2/metrics_service_v2_connection.h index cf8fdeaf9104c..ccf12201265b9 100644 --- a/google/cloud/logging/v2/metrics_service_v2_connection.h +++ b/google/cloud/logging/v2/metrics_service_v2_connection.h @@ -27,7 +27,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/logging/v2/logging_metrics.pb.h" #include namespace google { diff --git a/google/cloud/logging/v2/metrics_service_v2_connection_idempotency_policy.h b/google/cloud/logging/v2/metrics_service_v2_connection_idempotency_policy.h index fbbc39fcfcd2c..0c784182d6ee7 100644 --- a/google/cloud/logging/v2/metrics_service_v2_connection_idempotency_policy.h +++ b/google/cloud/logging/v2/metrics_service_v2_connection_idempotency_policy.h @@ -21,8 +21,8 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/logging/v2/logging_metrics.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/lustre/BUILD.bazel b/google/cloud/lustre/BUILD.bazel index eaf8d50b64934..e2c66201775f8 100644 --- a/google/cloud/lustre/BUILD.bazel +++ b/google/cloud/lustre/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/lustre/v1:lustre_cc_grpc", + "@googleapis//google/cloud/lustre/v1:lustre_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/lustre/quickstart/CMakeLists.txt b/google/cloud/lustre/quickstart/CMakeLists.txt index cd066fc248da3..a1c6355a191f1 100644 --- a/google/cloud/lustre/quickstart/CMakeLists.txt +++ b/google/cloud/lustre/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Google Cloud Managed Lustre API C++ client # library from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-lustre-quickstart CXX) find_package(google_cloud_cpp_lustre REQUIRED) diff --git a/google/cloud/lustre/v1/internal/lustre_auth_decorator.cc b/google/cloud/lustre/v1/internal/lustre_auth_decorator.cc index 6066c6830402f..7b5d4d6a72b4d 100644 --- a/google/cloud/lustre/v1/internal/lustre_auth_decorator.cc +++ b/google/cloud/lustre/v1/internal/lustre_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/lustre/v1/lustre.proto #include "google/cloud/lustre/v1/internal/lustre_auth_decorator.h" -#include +#include "google/cloud/lustre/v1/lustre.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace lustre_v1_internal { @@ -275,3 +278,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace lustre_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/lustre/v1/internal/lustre_auth_decorator.h b/google/cloud/lustre/v1/internal/lustre_auth_decorator.h index 225546e11d252..90dde89d259bb 100644 --- a/google/cloud/lustre/v1/internal/lustre_auth_decorator.h +++ b/google/cloud/lustre/v1/internal/lustre_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/lustre/v1/internal/lustre_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace lustre_v1_internal { @@ -143,4 +146,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LUSTRE_V1_INTERNAL_LUSTRE_AUTH_DECORATOR_H diff --git a/google/cloud/lustre/v1/internal/lustre_connection_impl.h b/google/cloud/lustre/v1/internal/lustre_connection_impl.h index b37647d31ec30..5a13e247515b1 100644 --- a/google/cloud/lustre/v1/internal/lustre_connection_impl.h +++ b/google/cloud/lustre/v1/internal/lustre_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/lustre/v1/internal/lustre_logging_decorator.cc b/google/cloud/lustre/v1/internal/lustre_logging_decorator.cc index a2ad275095445..92afed5fc3440 100644 --- a/google/cloud/lustre/v1/internal/lustre_logging_decorator.cc +++ b/google/cloud/lustre/v1/internal/lustre_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/lustre/v1/lustre.proto #include "google/cloud/lustre/v1/internal/lustre_logging_decorator.h" +#include "google/cloud/lustre/v1/lustre.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace lustre_v1_internal { @@ -308,3 +311,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace lustre_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/lustre/v1/internal/lustre_logging_decorator.h b/google/cloud/lustre/v1/internal/lustre_logging_decorator.h index 36e666c4f0007..c796ea8f65c56 100644 --- a/google/cloud/lustre/v1/internal/lustre_logging_decorator.h +++ b/google/cloud/lustre/v1/internal/lustre_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/lustre/v1/internal/lustre_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace lustre_v1_internal { @@ -143,4 +146,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LUSTRE_V1_INTERNAL_LUSTRE_LOGGING_DECORATOR_H diff --git a/google/cloud/lustre/v1/internal/lustre_metadata_decorator.cc b/google/cloud/lustre/v1/internal/lustre_metadata_decorator.cc index 5750105bf4e84..781b2c48736fd 100644 --- a/google/cloud/lustre/v1/internal/lustre_metadata_decorator.cc +++ b/google/cloud/lustre/v1/internal/lustre_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/lustre/v1/lustre.proto #include "google/cloud/lustre/v1/internal/lustre_metadata_decorator.h" +#include "google/cloud/lustre/v1/lustre.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace lustre_v1_internal { @@ -253,3 +257,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace lustre_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/lustre/v1/internal/lustre_metadata_decorator.h b/google/cloud/lustre/v1/internal/lustre_metadata_decorator.h index ded7c40fba5c6..fa9d89fb62fa2 100644 --- a/google/cloud/lustre/v1/internal/lustre_metadata_decorator.h +++ b/google/cloud/lustre/v1/internal/lustre_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/lustre/v1/internal/lustre_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace lustre_v1_internal { @@ -148,4 +151,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LUSTRE_V1_INTERNAL_LUSTRE_METADATA_DECORATOR_H diff --git a/google/cloud/lustre/v1/internal/lustre_option_defaults.cc b/google/cloud/lustre/v1/internal/lustre_option_defaults.cc index 3be3b3e43ff68..5aed7ae7158e0 100644 --- a/google/cloud/lustre/v1/internal/lustre_option_defaults.cc +++ b/google/cloud/lustre/v1/internal/lustre_option_defaults.cc @@ -40,7 +40,7 @@ Options LustreDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - lustre_v1::LustreLimitedTimeRetryPolicy(std::chrono::minutes(30)) + lustre_v1::LustreLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/lustre/v1/internal/lustre_stub.cc b/google/cloud/lustre/v1/internal/lustre_stub.cc index 2e8f2aa4ca993..046a5b23c11c0 100644 --- a/google/cloud/lustre/v1/internal/lustre_stub.cc +++ b/google/cloud/lustre/v1/internal/lustre_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/lustre/v1/lustre.proto #include "google/cloud/lustre/v1/internal/lustre_stub.h" +#include "google/cloud/lustre/v1/lustre.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace lustre_v1_internal { @@ -310,3 +313,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace lustre_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/lustre/v1/internal/lustre_stub.h b/google/cloud/lustre/v1/internal/lustre_stub.h index ca1ad14e6387c..614fd9dd87bbb 100644 --- a/google/cloud/lustre/v1/internal/lustre_stub.h +++ b/google/cloud/lustre/v1/internal/lustre_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LUSTRE_V1_INTERNAL_LUSTRE_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LUSTRE_V1_INTERNAL_LUSTRE_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/lustre/v1/lustre.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace lustre_v1_internal { @@ -256,4 +259,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LUSTRE_V1_INTERNAL_LUSTRE_STUB_H diff --git a/google/cloud/lustre/v1/internal/lustre_stub_factory.cc b/google/cloud/lustre/v1/internal/lustre_stub_factory.cc index b4fc934c8745a..f2d3a5723379b 100644 --- a/google/cloud/lustre/v1/internal/lustre_stub_factory.cc +++ b/google/cloud/lustre/v1/internal/lustre_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/lustre/v1/lustre.proto #include "google/cloud/lustre/v1/internal/lustre_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/lustre/v1/internal/lustre_auth_decorator.h" #include "google/cloud/lustre/v1/internal/lustre_logging_decorator.h" #include "google/cloud/lustre/v1/internal/lustre_metadata_decorator.h" #include "google/cloud/lustre/v1/internal/lustre_stub.h" #include "google/cloud/lustre/v1/internal/lustre_tracing_stub.h" +#include "google/cloud/lustre/v1/lustre.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace lustre_v1_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace lustre_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/lustre/v1/internal/lustre_stub_factory.h b/google/cloud/lustre/v1/internal/lustre_stub_factory.h index 17ebe161e024d..4da3f0f21d261 100644 --- a/google/cloud/lustre/v1/internal/lustre_stub_factory.h +++ b/google/cloud/lustre/v1/internal/lustre_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace lustre_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LUSTRE_V1_INTERNAL_LUSTRE_STUB_FACTORY_H diff --git a/google/cloud/lustre/v1/internal/lustre_tracing_connection.cc b/google/cloud/lustre/v1/internal/lustre_tracing_connection.cc index 28ec107c7b880..b5189320f0b18 100644 --- a/google/cloud/lustre/v1/internal/lustre_tracing_connection.cc +++ b/google/cloud/lustre/v1/internal/lustre_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace lustre_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - LustreTracingConnection::LustreTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -226,15 +224,11 @@ Status LustreTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeLustreTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/lustre/v1/internal/lustre_tracing_connection.h b/google/cloud/lustre/v1/internal/lustre_tracing_connection.h index dffb73fb1c79e..c06649f88bc2b 100644 --- a/google/cloud/lustre/v1/internal/lustre_tracing_connection.h +++ b/google/cloud/lustre/v1/internal/lustre_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace lustre_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class LustreTracingConnection : public lustre_v1::LustreConnection { public: ~LustreTracingConnection() override = default; @@ -117,8 +115,6 @@ class LustreTracingConnection : public lustre_v1::LustreConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/lustre/v1/internal/lustre_tracing_stub.cc b/google/cloud/lustre/v1/internal/lustre_tracing_stub.cc index 79f3fe2d5db91..a85da907f661b 100644 --- a/google/cloud/lustre/v1/internal/lustre_tracing_stub.cc +++ b/google/cloud/lustre/v1/internal/lustre_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace lustre_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - LustreTracingStub::LustreTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -278,18 +279,14 @@ future LustreTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeLustreTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace lustre_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/lustre/v1/internal/lustre_tracing_stub.h b/google/cloud/lustre/v1/internal/lustre_tracing_stub.h index 173089ceb8f9b..4a11b1802d1cd 100644 --- a/google/cloud/lustre/v1/internal/lustre_tracing_stub.h +++ b/google/cloud/lustre/v1/internal/lustre_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace lustre_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class LustreTracingStub : public LustreStub { public: ~LustreTracingStub() override = default; @@ -138,8 +139,6 @@ class LustreTracingStub : public LustreStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -154,4 +153,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LUSTRE_V1_INTERNAL_LUSTRE_TRACING_STUB_H diff --git a/google/cloud/lustre/v1/lustre_client.h b/google/cloud/lustre/v1/lustre_client.h index f50155155ddbe..5c1f6663d926c 100644 --- a/google/cloud/lustre/v1/lustre_client.h +++ b/google/cloud/lustre/v1/lustre_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/lustre/v1/lustre_connection.h b/google/cloud/lustre/v1/lustre_connection.h index 5c88579e23196..2df5eda3b63b3 100644 --- a/google/cloud/lustre/v1/lustre_connection.h +++ b/google/cloud/lustre/v1/lustre_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LUSTRE_V1_LUSTRE_CONNECTION_H #include "google/cloud/lustre/v1/internal/lustre_retry_traits.h" +#include "google/cloud/lustre/v1/lustre.pb.h" #include "google/cloud/lustre/v1/lustre_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/lustre/v1/lustre_connection_idempotency_policy.h b/google/cloud/lustre/v1/lustre_connection_idempotency_policy.h index 004a6ee2245da..5f5cdd4033b28 100644 --- a/google/cloud/lustre/v1/lustre_connection_idempotency_policy.h +++ b/google/cloud/lustre/v1/lustre_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LUSTRE_V1_LUSTRE_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_LUSTRE_V1_LUSTRE_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/lustre/v1/lustre.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/maintenance/BUILD.bazel b/google/cloud/maintenance/BUILD.bazel index cf5798ac153c8..ef39f3aafc06b 100644 --- a/google/cloud/maintenance/BUILD.bazel +++ b/google/cloud/maintenance/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["api/v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/maintenance/api/v1:api_cc_grpc", + "@googleapis//google/cloud/maintenance/api/v1:api_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/maintenance/api/v1/internal/maintenance_auth_decorator.cc b/google/cloud/maintenance/api/v1/internal/maintenance_auth_decorator.cc index 12c849222bbb8..b69af40037177 100644 --- a/google/cloud/maintenance/api/v1/internal/maintenance_auth_decorator.cc +++ b/google/cloud/maintenance/api/v1/internal/maintenance_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/maintenance/api/v1/maintenance_service.proto #include "google/cloud/maintenance/api/v1/internal/maintenance_auth_decorator.h" -#include +#include "google/cloud/maintenance/api/v1/maintenance_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace maintenance_api_v1_internal { @@ -82,3 +85,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace maintenance_api_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/maintenance/api/v1/internal/maintenance_auth_decorator.h b/google/cloud/maintenance/api/v1/internal/maintenance_auth_decorator.h index b1da373d72353..101f2bb0ee4a9 100644 --- a/google/cloud/maintenance/api/v1/internal/maintenance_auth_decorator.h +++ b/google/cloud/maintenance/api/v1/internal/maintenance_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace maintenance_api_v1_internal { @@ -75,4 +78,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MAINTENANCE_API_V1_INTERNAL_MAINTENANCE_AUTH_DECORATOR_H diff --git a/google/cloud/maintenance/api/v1/internal/maintenance_logging_decorator.cc b/google/cloud/maintenance/api/v1/internal/maintenance_logging_decorator.cc index ba682f875d899..862b809146fe2 100644 --- a/google/cloud/maintenance/api/v1/internal/maintenance_logging_decorator.cc +++ b/google/cloud/maintenance/api/v1/internal/maintenance_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/maintenance/api/v1/maintenance_service.proto #include "google/cloud/maintenance/api/v1/internal/maintenance_logging_decorator.h" +#include "google/cloud/maintenance/api/v1/maintenance_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace maintenance_api_v1_internal { @@ -104,3 +107,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace maintenance_api_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/maintenance/api/v1/internal/maintenance_logging_decorator.h b/google/cloud/maintenance/api/v1/internal/maintenance_logging_decorator.h index 2db95aa4b94c4..f117cc79ffc98 100644 --- a/google/cloud/maintenance/api/v1/internal/maintenance_logging_decorator.h +++ b/google/cloud/maintenance/api/v1/internal/maintenance_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace maintenance_api_v1_internal { @@ -75,4 +78,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MAINTENANCE_API_V1_INTERNAL_MAINTENANCE_LOGGING_DECORATOR_H diff --git a/google/cloud/maintenance/api/v1/internal/maintenance_metadata_decorator.cc b/google/cloud/maintenance/api/v1/internal/maintenance_metadata_decorator.cc index ba0b8f4d8eb75..d65e1c2379b33 100644 --- a/google/cloud/maintenance/api/v1/internal/maintenance_metadata_decorator.cc +++ b/google/cloud/maintenance/api/v1/internal/maintenance_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/maintenance/api/v1/maintenance_service.proto #include "google/cloud/maintenance/api/v1/internal/maintenance_metadata_decorator.h" +#include "google/cloud/maintenance/api/v1/maintenance_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace maintenance_api_v1_internal { @@ -108,3 +112,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace maintenance_api_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/maintenance/api/v1/internal/maintenance_metadata_decorator.h b/google/cloud/maintenance/api/v1/internal/maintenance_metadata_decorator.h index 17162f959da96..3b1c7e206c852 100644 --- a/google/cloud/maintenance/api/v1/internal/maintenance_metadata_decorator.h +++ b/google/cloud/maintenance/api/v1/internal/maintenance_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace maintenance_api_v1_internal { @@ -80,4 +83,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MAINTENANCE_API_V1_INTERNAL_MAINTENANCE_METADATA_DECORATOR_H diff --git a/google/cloud/maintenance/api/v1/internal/maintenance_option_defaults.cc b/google/cloud/maintenance/api/v1/internal/maintenance_option_defaults.cc index 2d206f3117bc7..80b87820e3d62 100644 --- a/google/cloud/maintenance/api/v1/internal/maintenance_option_defaults.cc +++ b/google/cloud/maintenance/api/v1/internal/maintenance_option_defaults.cc @@ -41,7 +41,7 @@ Options MaintenanceDefaultOptions(Options options) { if (!options.has()) { options.set( maintenance_api_v1::MaintenanceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/maintenance/api/v1/internal/maintenance_stub.cc b/google/cloud/maintenance/api/v1/internal/maintenance_stub.cc index 6dac7ea723488..2daa739cae1b3 100644 --- a/google/cloud/maintenance/api/v1/internal/maintenance_stub.cc +++ b/google/cloud/maintenance/api/v1/internal/maintenance_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/maintenance/api/v1/maintenance_service.proto #include "google/cloud/maintenance/api/v1/internal/maintenance_stub.h" +#include "google/cloud/maintenance/api/v1/maintenance_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace maintenance_api_v1_internal { @@ -99,3 +102,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace maintenance_api_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/maintenance/api/v1/internal/maintenance_stub.h b/google/cloud/maintenance/api/v1/internal/maintenance_stub.h index 3ba6c401bd892..432b5d4a8c83a 100644 --- a/google/cloud/maintenance/api/v1/internal/maintenance_stub.h +++ b/google/cloud/maintenance/api/v1/internal/maintenance_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MAINTENANCE_API_V1_INTERNAL_MAINTENANCE_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MAINTENANCE_API_V1_INTERNAL_MAINTENANCE_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/maintenance/api/v1/maintenance_service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace maintenance_api_v1_internal { @@ -117,4 +120,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MAINTENANCE_API_V1_INTERNAL_MAINTENANCE_STUB_H diff --git a/google/cloud/maintenance/api/v1/internal/maintenance_stub_factory.cc b/google/cloud/maintenance/api/v1/internal/maintenance_stub_factory.cc index 5ddce7b471d14..d64b29fd6c1fb 100644 --- a/google/cloud/maintenance/api/v1/internal/maintenance_stub_factory.cc +++ b/google/cloud/maintenance/api/v1/internal/maintenance_stub_factory.cc @@ -17,22 +17,25 @@ // source: google/cloud/maintenance/api/v1/maintenance_service.proto #include "google/cloud/maintenance/api/v1/internal/maintenance_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/maintenance/api/v1/internal/maintenance_auth_decorator.h" #include "google/cloud/maintenance/api/v1/internal/maintenance_logging_decorator.h" #include "google/cloud/maintenance/api/v1/internal/maintenance_metadata_decorator.h" #include "google/cloud/maintenance/api/v1/internal/maintenance_stub.h" #include "google/cloud/maintenance/api/v1/internal/maintenance_tracing_stub.h" +#include "google/cloud/maintenance/api/v1/maintenance_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace maintenance_api_v1_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace maintenance_api_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/maintenance/api/v1/internal/maintenance_stub_factory.h b/google/cloud/maintenance/api/v1/internal/maintenance_stub_factory.h index 25816146c90a4..6396ffdfd4ddd 100644 --- a/google/cloud/maintenance/api/v1/internal/maintenance_stub_factory.h +++ b/google/cloud/maintenance/api/v1/internal/maintenance_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace maintenance_api_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MAINTENANCE_API_V1_INTERNAL_MAINTENANCE_STUB_FACTORY_H diff --git a/google/cloud/maintenance/api/v1/internal/maintenance_tracing_connection.cc b/google/cloud/maintenance/api/v1/internal/maintenance_tracing_connection.cc index abd4fe5f63e5b..2ea2a41e6ccf0 100644 --- a/google/cloud/maintenance/api/v1/internal/maintenance_tracing_connection.cc +++ b/google/cloud/maintenance/api/v1/internal/maintenance_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace maintenance_api_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - MaintenanceTracingConnection::MaintenanceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -88,16 +86,12 @@ MaintenanceTracingConnection::GetLocation( return internal::EndSpan(*span, child_->GetLocation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeMaintenanceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/maintenance/api/v1/internal/maintenance_tracing_connection.h b/google/cloud/maintenance/api/v1/internal/maintenance_tracing_connection.h index ec06d8212fdf8..1c9a3a7a76270 100644 --- a/google/cloud/maintenance/api/v1/internal/maintenance_tracing_connection.h +++ b/google/cloud/maintenance/api/v1/internal/maintenance_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace maintenance_api_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class MaintenanceTracingConnection : public maintenance_api_v1::MaintenanceConnection { public: @@ -65,8 +63,6 @@ class MaintenanceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/maintenance/api/v1/internal/maintenance_tracing_stub.cc b/google/cloud/maintenance/api/v1/internal/maintenance_tracing_stub.cc index cd8bf45a94bd4..68406995b2991 100644 --- a/google/cloud/maintenance/api/v1/internal/maintenance_tracing_stub.cc +++ b/google/cloud/maintenance/api/v1/internal/maintenance_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace maintenance_api_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - MaintenanceTracingStub::MaintenanceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -97,18 +98,14 @@ StatusOr MaintenanceTracingStub::GetLocation( child_->GetLocation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeMaintenanceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace maintenance_api_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/maintenance/api/v1/internal/maintenance_tracing_stub.h b/google/cloud/maintenance/api/v1/internal/maintenance_tracing_stub.h index f4d9ffbe7653d..3dd2aad54a586 100644 --- a/google/cloud/maintenance/api/v1/internal/maintenance_tracing_stub.h +++ b/google/cloud/maintenance/api/v1/internal/maintenance_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace maintenance_api_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class MaintenanceTracingStub : public MaintenanceStub { public: ~MaintenanceTracingStub() override = default; @@ -71,8 +72,6 @@ class MaintenanceTracingStub : public MaintenanceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -87,4 +86,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MAINTENANCE_API_V1_INTERNAL_MAINTENANCE_TRACING_STUB_H diff --git a/google/cloud/maintenance/api/v1/maintenance_connection.h b/google/cloud/maintenance/api/v1/maintenance_connection.h index 05a6787fcccd9..d0c62a79e43e8 100644 --- a/google/cloud/maintenance/api/v1/maintenance_connection.h +++ b/google/cloud/maintenance/api/v1/maintenance_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/maintenance/api/v1/internal/maintenance_retry_traits.h" #include "google/cloud/maintenance/api/v1/maintenance_connection_idempotency_policy.h" +#include "google/cloud/maintenance/api/v1/maintenance_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/maintenance/api/v1/maintenance_connection_idempotency_policy.h b/google/cloud/maintenance/api/v1/maintenance_connection_idempotency_policy.h index 64fd90f857127..190167af2f2c6 100644 --- a/google/cloud/maintenance/api/v1/maintenance_connection_idempotency_policy.h +++ b/google/cloud/maintenance/api/v1/maintenance_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MAINTENANCE_API_V1_MAINTENANCE_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MAINTENANCE_API_V1_MAINTENANCE_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/maintenance/api/v1/maintenance_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/maintenance/quickstart/CMakeLists.txt b/google/cloud/maintenance/quickstart/CMakeLists.txt index a1e751ba97a3b..61a2bf08c3d40 100644 --- a/google/cloud/maintenance/quickstart/CMakeLists.txt +++ b/google/cloud/maintenance/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Maintenance API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-maintenance-quickstart CXX) find_package(google_cloud_cpp_maintenance REQUIRED) diff --git a/google/cloud/managedidentities/BUILD.bazel b/google/cloud/managedidentities/BUILD.bazel index f2c84e9344b89..950c20635600e 100644 --- a/google/cloud/managedidentities/BUILD.bazel +++ b/google/cloud/managedidentities/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/managedidentities/v1:managedidentities_cc_grpc", + "@googleapis//google/cloud/managedidentities/v1:managedidentities_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/managedidentities/CMakeLists.txt b/google/cloud/managedidentities/CMakeLists.txt index 5d2cdc2e1c187..c15aca14518a5 100644 --- a/google/cloud/managedidentities/CMakeLists.txt +++ b/google/cloud/managedidentities/CMakeLists.txt @@ -18,7 +18,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library( managedidentities "Managed Service for Microsoft Active Directory API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(managedidentities_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/managedidentities/managed_identities_client.h b/google/cloud/managedidentities/managed_identities_client.h deleted file mode 100644 index a755ff28f2ec9..0000000000000 --- a/google/cloud/managedidentities/managed_identities_client.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/managedidentities/v1/managed_identities_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDIDENTITIES_MANAGED_IDENTITIES_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDIDENTITIES_MANAGED_IDENTITIES_CLIENT_H - -#include "google/cloud/managedidentities/managed_identities_connection.h" -#include "google/cloud/managedidentities/v1/managed_identities_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in managedidentities_v1 instead of the aliases defined in -/// this namespace. -namespace managedidentities { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use managedidentities_v1::ManagedIdentitiesServiceClient -/// directly. -using ::google::cloud::managedidentities_v1::ManagedIdentitiesServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace managedidentities -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDIDENTITIES_MANAGED_IDENTITIES_CLIENT_H diff --git a/google/cloud/managedidentities/managed_identities_connection.h b/google/cloud/managedidentities/managed_identities_connection.h deleted file mode 100644 index 2eaa141623afa..0000000000000 --- a/google/cloud/managedidentities/managed_identities_connection.h +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/managedidentities/v1/managed_identities_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDIDENTITIES_MANAGED_IDENTITIES_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDIDENTITIES_MANAGED_IDENTITIES_CONNECTION_H - -#include "google/cloud/managedidentities/managed_identities_connection_idempotency_policy.h" -#include "google/cloud/managedidentities/v1/managed_identities_connection.h" - -namespace google { -namespace cloud { -namespace managedidentities { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use managedidentities_v1::MakeManagedIdentitiesServiceConnection -/// directly. -using ::google::cloud::managedidentities_v1:: - MakeManagedIdentitiesServiceConnection; - -/// @deprecated Use managedidentities_v1::ManagedIdentitiesServiceConnection -/// directly. -using ::google::cloud::managedidentities_v1::ManagedIdentitiesServiceConnection; - -/// @deprecated Use -/// managedidentities_v1::ManagedIdentitiesServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::managedidentities_v1:: - ManagedIdentitiesServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use -/// managedidentities_v1::ManagedIdentitiesServiceLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::managedidentities_v1:: - ManagedIdentitiesServiceLimitedTimeRetryPolicy; - -/// @deprecated Use managedidentities_v1::ManagedIdentitiesServiceRetryPolicy -/// directly. -using ::google::cloud::managedidentities_v1:: - ManagedIdentitiesServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace managedidentities -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDIDENTITIES_MANAGED_IDENTITIES_CONNECTION_H diff --git a/google/cloud/managedidentities/managed_identities_connection_idempotency_policy.h b/google/cloud/managedidentities/managed_identities_connection_idempotency_policy.h deleted file mode 100644 index f5bd8ac9977d5..0000000000000 --- a/google/cloud/managedidentities/managed_identities_connection_idempotency_policy.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/managedidentities/v1/managed_identities_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDIDENTITIES_MANAGED_IDENTITIES_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDIDENTITIES_MANAGED_IDENTITIES_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/managedidentities/v1/managed_identities_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace managedidentities { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// managedidentities_v1::MakeDefaultManagedIdentitiesServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::managedidentities_v1:: - MakeDefaultManagedIdentitiesServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// managedidentities_v1::ManagedIdentitiesServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::managedidentities_v1:: - ManagedIdentitiesServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace managedidentities -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDIDENTITIES_MANAGED_IDENTITIES_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/managedidentities/managed_identities_options.h b/google/cloud/managedidentities/managed_identities_options.h deleted file mode 100644 index 52a9874d016b1..0000000000000 --- a/google/cloud/managedidentities/managed_identities_options.h +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/managedidentities/v1/managed_identities_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDIDENTITIES_MANAGED_IDENTITIES_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDIDENTITIES_MANAGED_IDENTITIES_OPTIONS_H - -#include "google/cloud/managedidentities/managed_identities_connection.h" -#include "google/cloud/managedidentities/managed_identities_connection_idempotency_policy.h" -#include "google/cloud/managedidentities/v1/managed_identities_options.h" - -namespace google { -namespace cloud { -namespace managedidentities { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// managedidentities_v1::ManagedIdentitiesServicePollingPolicyOption directly. -using ::google::cloud::managedidentities_v1:: - ManagedIdentitiesServicePollingPolicyOption; - -/// @deprecated Use -/// managedidentities_v1::ManagedIdentitiesServiceBackoffPolicyOption directly. -using ::google::cloud::managedidentities_v1:: - ManagedIdentitiesServiceBackoffPolicyOption; - -/// @deprecated Use -/// managedidentities_v1::ManagedIdentitiesServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::managedidentities_v1:: - ManagedIdentitiesServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use -/// managedidentities_v1::ManagedIdentitiesServicePolicyOptionList directly. -using ::google::cloud::managedidentities_v1:: - ManagedIdentitiesServicePolicyOptionList; - -/// @deprecated Use -/// managedidentities_v1::ManagedIdentitiesServiceRetryPolicyOption directly. -using ::google::cloud::managedidentities_v1:: - ManagedIdentitiesServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace managedidentities -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDIDENTITIES_MANAGED_IDENTITIES_OPTIONS_H diff --git a/google/cloud/managedidentities/mocks/mock_managed_identities_connection.h b/google/cloud/managedidentities/mocks/mock_managed_identities_connection.h deleted file mode 100644 index 067518b2eb13d..0000000000000 --- a/google/cloud/managedidentities/mocks/mock_managed_identities_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/managedidentities/v1/managed_identities_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDIDENTITIES_MOCKS_MOCK_MANAGED_IDENTITIES_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDIDENTITIES_MOCKS_MOCK_MANAGED_IDENTITIES_CONNECTION_H - -#include "google/cloud/managedidentities/managed_identities_connection.h" -#include "google/cloud/managedidentities/v1/mocks/mock_managed_identities_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in managedidentities_v1_mocks instead of the aliases -/// defined in this namespace. -namespace managedidentities_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// managedidentities_v1_mocks::MockManagedIdentitiesServiceConnection directly. -using ::google::cloud::managedidentities_v1_mocks:: - MockManagedIdentitiesServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace managedidentities_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDIDENTITIES_MOCKS_MOCK_MANAGED_IDENTITIES_CONNECTION_H diff --git a/google/cloud/managedidentities/quickstart/.bazelrc b/google/cloud/managedidentities/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/managedidentities/quickstart/.bazelrc +++ b/google/cloud/managedidentities/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/managedidentities/quickstart/CMakeLists.txt b/google/cloud/managedidentities/quickstart/CMakeLists.txt index fc6b408158a57..1266dcbed0d44 100644 --- a/google/cloud/managedidentities/quickstart/CMakeLists.txt +++ b/google/cloud/managedidentities/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Managed Service for Microsoft Active Directory # API C++ client library from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-managedidentities-quickstart CXX) find_package(google_cloud_cpp_managedidentities REQUIRED) diff --git a/google/cloud/managedidentities/v1/internal/managed_identities_auth_decorator.cc b/google/cloud/managedidentities/v1/internal/managed_identities_auth_decorator.cc index 815944687727a..e70eba5346204 100644 --- a/google/cloud/managedidentities/v1/internal/managed_identities_auth_decorator.cc +++ b/google/cloud/managedidentities/v1/internal/managed_identities_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/managedidentities/v1/managed_identities_service.proto #include "google/cloud/managedidentities/v1/internal/managed_identities_auth_decorator.h" -#include +#include "google/cloud/managedidentities/v1/managed_identities_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedidentities_v1_internal { @@ -306,3 +309,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace managedidentities_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/managedidentities/v1/internal/managed_identities_auth_decorator.h b/google/cloud/managedidentities/v1/internal/managed_identities_auth_decorator.h index a46235eefca6d..f73c605453221 100644 --- a/google/cloud/managedidentities/v1/internal/managed_identities_auth_decorator.h +++ b/google/cloud/managedidentities/v1/internal/managed_identities_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/managedidentities/v1/internal/managed_identities_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedidentities_v1_internal { @@ -161,4 +164,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDIDENTITIES_V1_INTERNAL_MANAGED_IDENTITIES_AUTH_DECORATOR_H diff --git a/google/cloud/managedidentities/v1/internal/managed_identities_connection_impl.h b/google/cloud/managedidentities/v1/internal/managed_identities_connection_impl.h index f2b2e1fdf5edd..a6de2e870072d 100644 --- a/google/cloud/managedidentities/v1/internal/managed_identities_connection_impl.h +++ b/google/cloud/managedidentities/v1/internal/managed_identities_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/managedidentities/v1/internal/managed_identities_logging_decorator.cc b/google/cloud/managedidentities/v1/internal/managed_identities_logging_decorator.cc index 58fee0ea35e51..4b5feef429c56 100644 --- a/google/cloud/managedidentities/v1/internal/managed_identities_logging_decorator.cc +++ b/google/cloud/managedidentities/v1/internal/managed_identities_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/managedidentities/v1/managed_identities_service.proto #include "google/cloud/managedidentities/v1/internal/managed_identities_logging_decorator.h" +#include "google/cloud/managedidentities/v1/managed_identities_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedidentities_v1_internal { @@ -345,3 +348,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace managedidentities_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/managedidentities/v1/internal/managed_identities_logging_decorator.h b/google/cloud/managedidentities/v1/internal/managed_identities_logging_decorator.h index 1641678ae7bf8..4792cd8071afe 100644 --- a/google/cloud/managedidentities/v1/internal/managed_identities_logging_decorator.h +++ b/google/cloud/managedidentities/v1/internal/managed_identities_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/managedidentities/v1/internal/managed_identities_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedidentities_v1_internal { @@ -161,4 +164,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDIDENTITIES_V1_INTERNAL_MANAGED_IDENTITIES_LOGGING_DECORATOR_H diff --git a/google/cloud/managedidentities/v1/internal/managed_identities_metadata_decorator.cc b/google/cloud/managedidentities/v1/internal/managed_identities_metadata_decorator.cc index 238fdb013fa43..76bd429a07ef4 100644 --- a/google/cloud/managedidentities/v1/internal/managed_identities_metadata_decorator.cc +++ b/google/cloud/managedidentities/v1/internal/managed_identities_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/managedidentities/v1/managed_identities_service.proto #include "google/cloud/managedidentities/v1/internal/managed_identities_metadata_decorator.h" +#include "google/cloud/managedidentities/v1/managed_identities_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedidentities_v1_internal { @@ -265,3 +269,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace managedidentities_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/managedidentities/v1/internal/managed_identities_metadata_decorator.h b/google/cloud/managedidentities/v1/internal/managed_identities_metadata_decorator.h index ec0423f1bc0d7..84b7aa14e1aba 100644 --- a/google/cloud/managedidentities/v1/internal/managed_identities_metadata_decorator.h +++ b/google/cloud/managedidentities/v1/internal/managed_identities_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/managedidentities/v1/internal/managed_identities_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedidentities_v1_internal { @@ -167,4 +170,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDIDENTITIES_V1_INTERNAL_MANAGED_IDENTITIES_METADATA_DECORATOR_H diff --git a/google/cloud/managedidentities/v1/internal/managed_identities_option_defaults.cc b/google/cloud/managedidentities/v1/internal/managed_identities_option_defaults.cc index 3c12eb6d22edf..de3a4f0948199 100644 --- a/google/cloud/managedidentities/v1/internal/managed_identities_option_defaults.cc +++ b/google/cloud/managedidentities/v1/internal/managed_identities_option_defaults.cc @@ -45,7 +45,7 @@ Options ManagedIdentitiesServiceDefaultOptions(Options options) { options.set< managedidentities_v1::ManagedIdentitiesServiceRetryPolicyOption>( managedidentities_v1::ManagedIdentitiesServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedidentities_v1_internal { @@ -334,3 +337,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace managedidentities_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/managedidentities/v1/internal/managed_identities_stub.h b/google/cloud/managedidentities/v1/internal/managed_identities_stub.h index bc9058c5242ff..38c4ed3eebc56 100644 --- a/google/cloud/managedidentities/v1/internal/managed_identities_stub.h +++ b/google/cloud/managedidentities/v1/internal/managed_identities_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDIDENTITIES_V1_INTERNAL_MANAGED_IDENTITIES_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDIDENTITIES_V1_INTERNAL_MANAGED_IDENTITIES_STUB_H +#include "google/cloud/managedidentities/v1/managed_identities_service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedidentities_v1_internal { @@ -291,4 +294,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDIDENTITIES_V1_INTERNAL_MANAGED_IDENTITIES_STUB_H diff --git a/google/cloud/managedidentities/v1/internal/managed_identities_stub_factory.cc b/google/cloud/managedidentities/v1/internal/managed_identities_stub_factory.cc index 2137964e2deff..058b6d454e473 100644 --- a/google/cloud/managedidentities/v1/internal/managed_identities_stub_factory.cc +++ b/google/cloud/managedidentities/v1/internal/managed_identities_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/managedidentities/v1/internal/managed_identities_metadata_decorator.h" #include "google/cloud/managedidentities/v1/internal/managed_identities_stub.h" #include "google/cloud/managedidentities/v1/internal/managed_identities_tracing_stub.h" +#include "google/cloud/managedidentities/v1/managed_identities_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedidentities_v1_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace managedidentities_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/managedidentities/v1/internal/managed_identities_stub_factory.h b/google/cloud/managedidentities/v1/internal/managed_identities_stub_factory.h index b0f9c1d313ea2..feb5b3017598b 100644 --- a/google/cloud/managedidentities/v1/internal/managed_identities_stub_factory.h +++ b/google/cloud/managedidentities/v1/internal/managed_identities_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedidentities_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDIDENTITIES_V1_INTERNAL_MANAGED_IDENTITIES_STUB_FACTORY_H diff --git a/google/cloud/managedidentities/v1/internal/managed_identities_tracing_connection.cc b/google/cloud/managedidentities/v1/internal/managed_identities_tracing_connection.cc index aa7bbaeb7ced9..21e72c0b11a0b 100644 --- a/google/cloud/managedidentities/v1/internal/managed_identities_tracing_connection.cc +++ b/google/cloud/managedidentities/v1/internal/managed_identities_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace managedidentities_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ManagedIdentitiesServiceTracingConnection:: ManagedIdentitiesServiceTracingConnection( std::shared_ptr< @@ -282,18 +280,14 @@ ManagedIdentitiesServiceTracingConnection::ValidateTrust( return internal::EndSpan(std::move(span), child_->ValidateTrust(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeManagedIdentitiesServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/managedidentities/v1/internal/managed_identities_tracing_connection.h b/google/cloud/managedidentities/v1/internal/managed_identities_tracing_connection.h index 1b6143ae2ca09..53fc68353a504 100644 --- a/google/cloud/managedidentities/v1/internal/managed_identities_tracing_connection.h +++ b/google/cloud/managedidentities/v1/internal/managed_identities_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace managedidentities_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ManagedIdentitiesServiceTracingConnection : public managedidentities_v1::ManagedIdentitiesServiceConnection { public: @@ -145,8 +143,6 @@ class ManagedIdentitiesServiceTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/managedidentities/v1/internal/managed_identities_tracing_stub.cc b/google/cloud/managedidentities/v1/internal/managed_identities_tracing_stub.cc index ca5c27dada3ac..816f654e288d7 100644 --- a/google/cloud/managedidentities/v1/internal/managed_identities_tracing_stub.cc +++ b/google/cloud/managedidentities/v1/internal/managed_identities_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedidentities_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ManagedIdentitiesServiceTracingStub::ManagedIdentitiesServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -303,19 +304,15 @@ future ManagedIdentitiesServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeManagedIdentitiesServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace managedidentities_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/managedidentities/v1/internal/managed_identities_tracing_stub.h b/google/cloud/managedidentities/v1/internal/managed_identities_tracing_stub.h index cc6b5a471095e..e7a476bb9601e 100644 --- a/google/cloud/managedidentities/v1/internal/managed_identities_tracing_stub.h +++ b/google/cloud/managedidentities/v1/internal/managed_identities_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedidentities_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ManagedIdentitiesServiceTracingStub : public ManagedIdentitiesServiceStub { public: @@ -158,8 +159,6 @@ class ManagedIdentitiesServiceTracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -175,4 +174,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDIDENTITIES_V1_INTERNAL_MANAGED_IDENTITIES_TRACING_STUB_H diff --git a/google/cloud/managedidentities/v1/managed_identities_client.h b/google/cloud/managedidentities/v1/managed_identities_client.h index 61b3075222917..38545ebca34c2 100644 --- a/google/cloud/managedidentities/v1/managed_identities_client.h +++ b/google/cloud/managedidentities/v1/managed_identities_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/managedidentities/v1/managed_identities_connection.h b/google/cloud/managedidentities/v1/managed_identities_connection.h index 5ea208286f079..eac36f1f034a0 100644 --- a/google/cloud/managedidentities/v1/managed_identities_connection.h +++ b/google/cloud/managedidentities/v1/managed_identities_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/managedidentities/v1/internal/managed_identities_retry_traits.h" #include "google/cloud/managedidentities/v1/managed_identities_connection_idempotency_policy.h" +#include "google/cloud/managedidentities/v1/managed_identities_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/managedidentities/v1/managed_identities_connection_idempotency_policy.h b/google/cloud/managedidentities/v1/managed_identities_connection_idempotency_policy.h index c1d45ab9302f9..69bafdd660b39 100644 --- a/google/cloud/managedidentities/v1/managed_identities_connection_idempotency_policy.h +++ b/google/cloud/managedidentities/v1/managed_identities_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDIDENTITIES_V1_MANAGED_IDENTITIES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDIDENTITIES_V1_MANAGED_IDENTITIES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/managedidentities/v1/managed_identities_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/managedkafka/BUILD.bazel b/google/cloud/managedkafka/BUILD.bazel index eceb9c4cbc999..80b1c6487c0d4 100644 --- a/google/cloud/managedkafka/BUILD.bazel +++ b/google/cloud/managedkafka/BUILD.bazel @@ -24,8 +24,8 @@ service_dirs = [ ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/managedkafka/v1:managedkafka_cc_grpc", - "@com_google_googleapis//google/cloud/managedkafka/schemaregistry/v1:schemaregistry_cc_grpc", + "@googleapis//google/cloud/managedkafka/v1:managedkafka_cc_grpc", + "@googleapis//google/cloud/managedkafka/schemaregistry/v1:schemaregistry_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/managedkafka/quickstart/.bazelrc b/google/cloud/managedkafka/quickstart/.bazelrc index 15d5c055db074..343e7f623d628 100644 --- a/google/cloud/managedkafka/quickstart/.bazelrc +++ b/google/cloud/managedkafka/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/managedkafka/quickstart/CMakeLists.txt b/google/cloud/managedkafka/quickstart/CMakeLists.txt index f3c75a7474e69..6a80ec93a10cd 100644 --- a/google/cloud/managedkafka/quickstart/CMakeLists.txt +++ b/google/cloud/managedkafka/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Managed Service for Apache Kafka API C++ client # library from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-managedkafka-quickstart CXX) find_package(google_cloud_cpp_managedkafka REQUIRED) diff --git a/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_auth_decorator.cc b/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_auth_decorator.cc index 991ed02ec53c6..7ab8383cf4578 100644 --- a/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_auth_decorator.cc +++ b/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/managedkafka/schemaregistry/v1/schema_registry.proto #include "google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_auth_decorator.h" -#include +#include "google/cloud/managedkafka/schemaregistry/v1/schema_registry.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedkafka_schemaregistry_v1_internal { @@ -349,3 +352,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace managedkafka_schemaregistry_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_auth_decorator.h b/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_auth_decorator.h index 63f302df5be9b..caf3bbcff78fe 100644 --- a/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_auth_decorator.h +++ b/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedkafka_schemaregistry_v1_internal { @@ -211,4 +214,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDKAFKA_SCHEMAREGISTRY_V1_INTERNAL_MANAGED_SCHEMA_REGISTRY_AUTH_DECORATOR_H diff --git a/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_logging_decorator.cc b/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_logging_decorator.cc index 179463e086ebd..4bb65273fa660 100644 --- a/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_logging_decorator.cc +++ b/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/managedkafka/schemaregistry/v1/schema_registry.proto #include "google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_logging_decorator.h" +#include "google/cloud/managedkafka/schemaregistry/v1/schema_registry.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedkafka_schemaregistry_v1_internal { @@ -481,3 +484,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace managedkafka_schemaregistry_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_logging_decorator.h b/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_logging_decorator.h index eb3bb87d198e2..944a9a92972a6 100644 --- a/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_logging_decorator.h +++ b/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedkafka_schemaregistry_v1_internal { @@ -211,4 +214,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDKAFKA_SCHEMAREGISTRY_V1_INTERNAL_MANAGED_SCHEMA_REGISTRY_LOGGING_DECORATOR_H diff --git a/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_metadata_decorator.cc b/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_metadata_decorator.cc index 2ac281045db61..d8e31aed39bd0 100644 --- a/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_metadata_decorator.cc +++ b/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/managedkafka/schemaregistry/v1/schema_registry.proto #include "google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_metadata_decorator.h" +#include "google/cloud/managedkafka/schemaregistry/v1/schema_registry.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedkafka_schemaregistry_v1_internal { @@ -377,3 +381,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace managedkafka_schemaregistry_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_metadata_decorator.h b/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_metadata_decorator.h index cec490e242ce2..684c4be4fbc99 100644 --- a/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_metadata_decorator.h +++ b/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedkafka_schemaregistry_v1_internal { @@ -217,4 +220,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDKAFKA_SCHEMAREGISTRY_V1_INTERNAL_MANAGED_SCHEMA_REGISTRY_METADATA_DECORATOR_H diff --git a/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_option_defaults.cc b/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_option_defaults.cc index cd443abaf9f6e..691dcaa397300 100644 --- a/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_option_defaults.cc +++ b/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_option_defaults.cc @@ -45,7 +45,7 @@ Options ManagedSchemaRegistryDefaultOptions(Options options) { managedkafka_schemaregistry_v1::ManagedSchemaRegistryRetryPolicyOption>( managedkafka_schemaregistry_v1:: ManagedSchemaRegistryLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedkafka_schemaregistry_v1_internal { @@ -454,3 +457,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace managedkafka_schemaregistry_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_stub.h b/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_stub.h index 5bad438a7c9f6..d10a50eaf8d70 100644 --- a/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_stub.h +++ b/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_stub.h @@ -19,15 +19,18 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDKAFKA_SCHEMAREGISTRY_V1_INTERNAL_MANAGED_SCHEMA_REGISTRY_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDKAFKA_SCHEMAREGISTRY_V1_INTERNAL_MANAGED_SCHEMA_REGISTRY_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/managedkafka/schemaregistry/v1/schema_registry.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedkafka_schemaregistry_v1_internal { @@ -403,4 +406,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDKAFKA_SCHEMAREGISTRY_V1_INTERNAL_MANAGED_SCHEMA_REGISTRY_STUB_H diff --git a/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_stub_factory.cc b/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_stub_factory.cc index 4550c34774fbf..83f19274a1a36 100644 --- a/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_stub_factory.cc +++ b/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/managedkafka/schemaregistry/v1/schema_registry.proto #include "google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_auth_decorator.h" #include "google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_logging_decorator.h" #include "google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_metadata_decorator.h" #include "google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_stub.h" #include "google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_tracing_stub.h" +#include "google/cloud/managedkafka/schemaregistry/v1/schema_registry.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedkafka_schemaregistry_v1_internal { @@ -78,3 +81,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace managedkafka_schemaregistry_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_stub_factory.h b/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_stub_factory.h index 55d08dc8affdf..83277feeddbd7 100644 --- a/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_stub_factory.h +++ b/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedkafka_schemaregistry_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDKAFKA_SCHEMAREGISTRY_V1_INTERNAL_MANAGED_SCHEMA_REGISTRY_STUB_FACTORY_H diff --git a/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_tracing_connection.cc b/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_tracing_connection.cc index 3b12bc8f308b2..48ce5e8cc5ac7 100644 --- a/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_tracing_connection.cc +++ b/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace managedkafka_schemaregistry_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ManagedSchemaRegistryTracingConnection::ManagedSchemaRegistryTracingConnection( std::shared_ptr< managedkafka_schemaregistry_v1::ManagedSchemaRegistryConnection> @@ -395,19 +393,15 @@ Status ManagedSchemaRegistryTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeManagedSchemaRegistryTracingConnection( std::shared_ptr< managedkafka_schemaregistry_v1::ManagedSchemaRegistryConnection> conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_tracing_connection.h b/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_tracing_connection.h index 5ba2cc1d3907c..71baa9f5567e8 100644 --- a/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_tracing_connection.h +++ b/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace managedkafka_schemaregistry_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ManagedSchemaRegistryTracingConnection : public managedkafka_schemaregistry_v1::ManagedSchemaRegistryConnection { public: @@ -178,8 +176,6 @@ class ManagedSchemaRegistryTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_tracing_stub.cc b/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_tracing_stub.cc index 774119d645d08..d13ea09cb3f05 100644 --- a/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_tracing_stub.cc +++ b/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedkafka_schemaregistry_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ManagedSchemaRegistryTracingStub::ManagedSchemaRegistryTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -482,18 +483,14 @@ Status ManagedSchemaRegistryTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeManagedSchemaRegistryTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace managedkafka_schemaregistry_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_tracing_stub.h b/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_tracing_stub.h index 73b930b89f1c9..fe28d9e63bb96 100644 --- a/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_tracing_stub.h +++ b/google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedkafka_schemaregistry_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ManagedSchemaRegistryTracingStub : public ManagedSchemaRegistryStub { public: ~ManagedSchemaRegistryTracingStub() override = default; @@ -208,8 +209,6 @@ class ManagedSchemaRegistryTracingStub : public ManagedSchemaRegistryStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -224,4 +223,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDKAFKA_SCHEMAREGISTRY_V1_INTERNAL_MANAGED_SCHEMA_REGISTRY_TRACING_STUB_H diff --git a/google/cloud/managedkafka/schemaregistry/v1/managed_schema_registry_connection.h b/google/cloud/managedkafka/schemaregistry/v1/managed_schema_registry_connection.h index acdf9070692e2..4cb2eb6b0e8cc 100644 --- a/google/cloud/managedkafka/schemaregistry/v1/managed_schema_registry_connection.h +++ b/google/cloud/managedkafka/schemaregistry/v1/managed_schema_registry_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/managedkafka/schemaregistry/v1/internal/managed_schema_registry_retry_traits.h" #include "google/cloud/managedkafka/schemaregistry/v1/managed_schema_registry_connection_idempotency_policy.h" +#include "google/cloud/managedkafka/schemaregistry/v1/schema_registry.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/managedkafka/schemaregistry/v1/managed_schema_registry_connection_idempotency_policy.h b/google/cloud/managedkafka/schemaregistry/v1/managed_schema_registry_connection_idempotency_policy.h index 1ec4dcdfc7cdf..6cf04b1411228 100644 --- a/google/cloud/managedkafka/schemaregistry/v1/managed_schema_registry_connection_idempotency_policy.h +++ b/google/cloud/managedkafka/schemaregistry/v1/managed_schema_registry_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDKAFKA_SCHEMAREGISTRY_V1_MANAGED_SCHEMA_REGISTRY_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDKAFKA_SCHEMAREGISTRY_V1_MANAGED_SCHEMA_REGISTRY_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/managedkafka/schemaregistry/v1/schema_registry.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/managedkafka/v1/internal/managed_kafka_auth_decorator.cc b/google/cloud/managedkafka/v1/internal/managed_kafka_auth_decorator.cc index 82ce3c96faa5f..5e2a41aee43c2 100644 --- a/google/cloud/managedkafka/v1/internal/managed_kafka_auth_decorator.cc +++ b/google/cloud/managedkafka/v1/internal/managed_kafka_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/managedkafka/v1/managed_kafka.proto #include "google/cloud/managedkafka/v1/internal/managed_kafka_auth_decorator.h" -#include +#include "google/cloud/managedkafka/v1/managed_kafka.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedkafka_v1_internal { @@ -359,3 +362,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace managedkafka_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/managedkafka/v1/internal/managed_kafka_auth_decorator.h b/google/cloud/managedkafka/v1/internal/managed_kafka_auth_decorator.h index 86d1f24c91f31..8a653cd83513d 100644 --- a/google/cloud/managedkafka/v1/internal/managed_kafka_auth_decorator.h +++ b/google/cloud/managedkafka/v1/internal/managed_kafka_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/managedkafka/v1/internal/managed_kafka_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedkafka_v1_internal { @@ -207,4 +210,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDKAFKA_V1_INTERNAL_MANAGED_KAFKA_AUTH_DECORATOR_H diff --git a/google/cloud/managedkafka/v1/internal/managed_kafka_connection_impl.h b/google/cloud/managedkafka/v1/internal/managed_kafka_connection_impl.h index 098e36eb2f311..308618d70d139 100644 --- a/google/cloud/managedkafka/v1/internal/managed_kafka_connection_impl.h +++ b/google/cloud/managedkafka/v1/internal/managed_kafka_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/managedkafka/v1/internal/managed_kafka_logging_decorator.cc b/google/cloud/managedkafka/v1/internal/managed_kafka_logging_decorator.cc index 9a2e6c0d243ff..6b5537bf721a6 100644 --- a/google/cloud/managedkafka/v1/internal/managed_kafka_logging_decorator.cc +++ b/google/cloud/managedkafka/v1/internal/managed_kafka_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/managedkafka/v1/managed_kafka.proto #include "google/cloud/managedkafka/v1/internal/managed_kafka_logging_decorator.h" +#include "google/cloud/managedkafka/v1/managed_kafka.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedkafka_v1_internal { @@ -458,3 +461,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace managedkafka_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/managedkafka/v1/internal/managed_kafka_logging_decorator.h b/google/cloud/managedkafka/v1/internal/managed_kafka_logging_decorator.h index 7717f0f2d60f6..a5e2447b3a33a 100644 --- a/google/cloud/managedkafka/v1/internal/managed_kafka_logging_decorator.h +++ b/google/cloud/managedkafka/v1/internal/managed_kafka_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/managedkafka/v1/internal/managed_kafka_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedkafka_v1_internal { @@ -207,4 +210,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDKAFKA_V1_INTERNAL_MANAGED_KAFKA_LOGGING_DECORATOR_H diff --git a/google/cloud/managedkafka/v1/internal/managed_kafka_metadata_decorator.cc b/google/cloud/managedkafka/v1/internal/managed_kafka_metadata_decorator.cc index bdc06e5562674..9aae0819924a4 100644 --- a/google/cloud/managedkafka/v1/internal/managed_kafka_metadata_decorator.cc +++ b/google/cloud/managedkafka/v1/internal/managed_kafka_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/managedkafka/v1/managed_kafka.proto #include "google/cloud/managedkafka/v1/internal/managed_kafka_metadata_decorator.h" +#include "google/cloud/managedkafka/v1/managed_kafka.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedkafka_v1_internal { @@ -357,3 +361,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace managedkafka_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/managedkafka/v1/internal/managed_kafka_metadata_decorator.h b/google/cloud/managedkafka/v1/internal/managed_kafka_metadata_decorator.h index a2f04524f9b3a..a933e32a252a5 100644 --- a/google/cloud/managedkafka/v1/internal/managed_kafka_metadata_decorator.h +++ b/google/cloud/managedkafka/v1/internal/managed_kafka_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/managedkafka/v1/internal/managed_kafka_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedkafka_v1_internal { @@ -212,4 +215,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDKAFKA_V1_INTERNAL_MANAGED_KAFKA_METADATA_DECORATOR_H diff --git a/google/cloud/managedkafka/v1/internal/managed_kafka_option_defaults.cc b/google/cloud/managedkafka/v1/internal/managed_kafka_option_defaults.cc index ea4bf56fca16f..37e5833f3d4bf 100644 --- a/google/cloud/managedkafka/v1/internal/managed_kafka_option_defaults.cc +++ b/google/cloud/managedkafka/v1/internal/managed_kafka_option_defaults.cc @@ -42,7 +42,7 @@ Options ManagedKafkaDefaultOptions(Options options) { if (!options.has()) { options.set( managedkafka_v1::ManagedKafkaLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/managedkafka/v1/internal/managed_kafka_stub.cc b/google/cloud/managedkafka/v1/internal/managed_kafka_stub.cc index fb1eedf366ffa..12b644f9566ab 100644 --- a/google/cloud/managedkafka/v1/internal/managed_kafka_stub.cc +++ b/google/cloud/managedkafka/v1/internal/managed_kafka_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/managedkafka/v1/managed_kafka.proto #include "google/cloud/managedkafka/v1/internal/managed_kafka_stub.h" +#include "google/cloud/managedkafka/v1/managed_kafka.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedkafka_v1_internal { @@ -447,3 +450,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace managedkafka_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/managedkafka/v1/internal/managed_kafka_stub.h b/google/cloud/managedkafka/v1/internal/managed_kafka_stub.h index c2dd4fdb803da..87dba1e9312f7 100644 --- a/google/cloud/managedkafka/v1/internal/managed_kafka_stub.h +++ b/google/cloud/managedkafka/v1/internal/managed_kafka_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDKAFKA_V1_INTERNAL_MANAGED_KAFKA_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDKAFKA_V1_INTERNAL_MANAGED_KAFKA_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/managedkafka/v1/managed_kafka.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedkafka_v1_internal { @@ -376,4 +379,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDKAFKA_V1_INTERNAL_MANAGED_KAFKA_STUB_H diff --git a/google/cloud/managedkafka/v1/internal/managed_kafka_stub_factory.cc b/google/cloud/managedkafka/v1/internal/managed_kafka_stub_factory.cc index bd7033102a8e9..2d9e363a101a0 100644 --- a/google/cloud/managedkafka/v1/internal/managed_kafka_stub_factory.cc +++ b/google/cloud/managedkafka/v1/internal/managed_kafka_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/managedkafka/v1/managed_kafka.proto #include "google/cloud/managedkafka/v1/internal/managed_kafka_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/managedkafka/v1/internal/managed_kafka_auth_decorator.h" #include "google/cloud/managedkafka/v1/internal/managed_kafka_logging_decorator.h" #include "google/cloud/managedkafka/v1/internal/managed_kafka_metadata_decorator.h" #include "google/cloud/managedkafka/v1/internal/managed_kafka_stub.h" #include "google/cloud/managedkafka/v1/internal/managed_kafka_tracing_stub.h" +#include "google/cloud/managedkafka/v1/managed_kafka.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedkafka_v1_internal { @@ -74,3 +77,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace managedkafka_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/managedkafka/v1/internal/managed_kafka_stub_factory.h b/google/cloud/managedkafka/v1/internal/managed_kafka_stub_factory.h index 52025ea5e8d01..4ac1f308f9e0e 100644 --- a/google/cloud/managedkafka/v1/internal/managed_kafka_stub_factory.h +++ b/google/cloud/managedkafka/v1/internal/managed_kafka_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedkafka_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDKAFKA_V1_INTERNAL_MANAGED_KAFKA_STUB_FACTORY_H diff --git a/google/cloud/managedkafka/v1/internal/managed_kafka_tracing_connection.cc b/google/cloud/managedkafka/v1/internal/managed_kafka_tracing_connection.cc index c7c642124a45f..8b69d00e95ef8 100644 --- a/google/cloud/managedkafka/v1/internal/managed_kafka_tracing_connection.cc +++ b/google/cloud/managedkafka/v1/internal/managed_kafka_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace managedkafka_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ManagedKafkaTracingConnection::ManagedKafkaTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -343,16 +341,12 @@ Status ManagedKafkaTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeManagedKafkaTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/managedkafka/v1/internal/managed_kafka_tracing_connection.h b/google/cloud/managedkafka/v1/internal/managed_kafka_tracing_connection.h index da1319aa883c3..420ab9a31e45c 100644 --- a/google/cloud/managedkafka/v1/internal/managed_kafka_tracing_connection.h +++ b/google/cloud/managedkafka/v1/internal/managed_kafka_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace managedkafka_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ManagedKafkaTracingConnection : public managedkafka_v1::ManagedKafkaConnection { public: @@ -163,8 +161,6 @@ class ManagedKafkaTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/managedkafka/v1/internal/managed_kafka_tracing_stub.cc b/google/cloud/managedkafka/v1/internal/managed_kafka_tracing_stub.cc index 9df21a51b5377..69b25bd2b6304 100644 --- a/google/cloud/managedkafka/v1/internal/managed_kafka_tracing_stub.cc +++ b/google/cloud/managedkafka/v1/internal/managed_kafka_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedkafka_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ManagedKafkaTracingStub::ManagedKafkaTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -418,18 +419,14 @@ future ManagedKafkaTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeManagedKafkaTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace managedkafka_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/managedkafka/v1/internal/managed_kafka_tracing_stub.h b/google/cloud/managedkafka/v1/internal/managed_kafka_tracing_stub.h index 1a3e8eb31d843..77c9902c2a0d1 100644 --- a/google/cloud/managedkafka/v1/internal/managed_kafka_tracing_stub.h +++ b/google/cloud/managedkafka/v1/internal/managed_kafka_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace managedkafka_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ManagedKafkaTracingStub : public ManagedKafkaStub { public: ~ManagedKafkaTracingStub() override = default; @@ -202,8 +203,6 @@ class ManagedKafkaTracingStub : public ManagedKafkaStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -218,4 +217,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDKAFKA_V1_INTERNAL_MANAGED_KAFKA_TRACING_STUB_H diff --git a/google/cloud/managedkafka/v1/managed_kafka_client.h b/google/cloud/managedkafka/v1/managed_kafka_client.h index 60991360280dd..5a5d942fb4d98 100644 --- a/google/cloud/managedkafka/v1/managed_kafka_client.h +++ b/google/cloud/managedkafka/v1/managed_kafka_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/managedkafka/v1/managed_kafka_connection.h b/google/cloud/managedkafka/v1/managed_kafka_connection.h index 142f735ffa416..1ced1e2a070e8 100644 --- a/google/cloud/managedkafka/v1/managed_kafka_connection.h +++ b/google/cloud/managedkafka/v1/managed_kafka_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDKAFKA_V1_MANAGED_KAFKA_CONNECTION_H #include "google/cloud/managedkafka/v1/internal/managed_kafka_retry_traits.h" +#include "google/cloud/managedkafka/v1/managed_kafka.pb.h" #include "google/cloud/managedkafka/v1/managed_kafka_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/managedkafka/v1/managed_kafka_connection_idempotency_policy.h b/google/cloud/managedkafka/v1/managed_kafka_connection_idempotency_policy.h index 89ec93e610f7a..2662b271ca0af 100644 --- a/google/cloud/managedkafka/v1/managed_kafka_connection_idempotency_policy.h +++ b/google/cloud/managedkafka/v1/managed_kafka_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDKAFKA_V1_MANAGED_KAFKA_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MANAGEDKAFKA_V1_MANAGED_KAFKA_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/managedkafka/v1/managed_kafka.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/memcache/BUILD.bazel b/google/cloud/memcache/BUILD.bazel index de82ac26cddf5..95f8992d458c4 100644 --- a/google/cloud/memcache/BUILD.bazel +++ b/google/cloud/memcache/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/memcache/v1:memcache_cc_grpc", + "@googleapis//google/cloud/memcache/v1:memcache_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/memcache/CMakeLists.txt b/google/cloud/memcache/CMakeLists.txt index 3b379b93b6f30..8bec4ce9305af 100644 --- a/google/cloud/memcache/CMakeLists.txt +++ b/google/cloud/memcache/CMakeLists.txt @@ -17,8 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library( - memcache "Cloud Memorystore for Memcached API" SERVICE_DIRS "__EMPTY__" - "v1/") + memcache "Cloud Memorystore for Memcached API" SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(memcache_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/memcache/cloud_memcache_client.h b/google/cloud/memcache/cloud_memcache_client.h deleted file mode 100644 index 228b05b549d2e..0000000000000 --- a/google/cloud/memcache/cloud_memcache_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/memcache/v1/cloud_memcache.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMCACHE_CLOUD_MEMCACHE_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMCACHE_CLOUD_MEMCACHE_CLIENT_H - -#include "google/cloud/memcache/cloud_memcache_connection.h" -#include "google/cloud/memcache/v1/cloud_memcache_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in memcache_v1 instead of the aliases defined in -/// this namespace. -namespace memcache { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use memcache_v1::CloudMemcacheClient directly. -using ::google::cloud::memcache_v1::CloudMemcacheClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace memcache -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMCACHE_CLOUD_MEMCACHE_CLIENT_H diff --git a/google/cloud/memcache/cloud_memcache_connection.h b/google/cloud/memcache/cloud_memcache_connection.h deleted file mode 100644 index f3c0708c5d05c..0000000000000 --- a/google/cloud/memcache/cloud_memcache_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/memcache/v1/cloud_memcache.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMCACHE_CLOUD_MEMCACHE_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMCACHE_CLOUD_MEMCACHE_CONNECTION_H - -#include "google/cloud/memcache/cloud_memcache_connection_idempotency_policy.h" -#include "google/cloud/memcache/v1/cloud_memcache_connection.h" - -namespace google { -namespace cloud { -namespace memcache { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use memcache_v1::MakeCloudMemcacheConnection directly. -using ::google::cloud::memcache_v1::MakeCloudMemcacheConnection; - -/// @deprecated Use memcache_v1::CloudMemcacheConnection directly. -using ::google::cloud::memcache_v1::CloudMemcacheConnection; - -/// @deprecated Use memcache_v1::CloudMemcacheLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::memcache_v1::CloudMemcacheLimitedErrorCountRetryPolicy; - -/// @deprecated Use memcache_v1::CloudMemcacheLimitedTimeRetryPolicy directly. -using ::google::cloud::memcache_v1::CloudMemcacheLimitedTimeRetryPolicy; - -/// @deprecated Use memcache_v1::CloudMemcacheRetryPolicy directly. -using ::google::cloud::memcache_v1::CloudMemcacheRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace memcache -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMCACHE_CLOUD_MEMCACHE_CONNECTION_H diff --git a/google/cloud/memcache/cloud_memcache_connection_idempotency_policy.h b/google/cloud/memcache/cloud_memcache_connection_idempotency_policy.h deleted file mode 100644 index 7f1b603a89c4c..0000000000000 --- a/google/cloud/memcache/cloud_memcache_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/memcache/v1/cloud_memcache.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMCACHE_CLOUD_MEMCACHE_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMCACHE_CLOUD_MEMCACHE_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/memcache/v1/cloud_memcache_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace memcache { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// memcache_v1::MakeDefaultCloudMemcacheConnectionIdempotencyPolicy directly. -using ::google::cloud::memcache_v1:: - MakeDefaultCloudMemcacheConnectionIdempotencyPolicy; - -/// @deprecated Use memcache_v1::CloudMemcacheConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::memcache_v1::CloudMemcacheConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace memcache -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMCACHE_CLOUD_MEMCACHE_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/memcache/cloud_memcache_options.h b/google/cloud/memcache/cloud_memcache_options.h deleted file mode 100644 index 12b9a77399c70..0000000000000 --- a/google/cloud/memcache/cloud_memcache_options.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/memcache/v1/cloud_memcache.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMCACHE_CLOUD_MEMCACHE_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMCACHE_CLOUD_MEMCACHE_OPTIONS_H - -#include "google/cloud/memcache/cloud_memcache_connection.h" -#include "google/cloud/memcache/cloud_memcache_connection_idempotency_policy.h" -#include "google/cloud/memcache/v1/cloud_memcache_options.h" - -namespace google { -namespace cloud { -namespace memcache { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use memcache_v1::CloudMemcachePollingPolicyOption directly. -using ::google::cloud::memcache_v1::CloudMemcachePollingPolicyOption; - -/// @deprecated Use memcache_v1::CloudMemcacheBackoffPolicyOption directly. -using ::google::cloud::memcache_v1::CloudMemcacheBackoffPolicyOption; - -/// @deprecated Use memcache_v1::CloudMemcacheConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::memcache_v1:: - CloudMemcacheConnectionIdempotencyPolicyOption; - -/// @deprecated Use memcache_v1::CloudMemcachePolicyOptionList directly. -using ::google::cloud::memcache_v1::CloudMemcachePolicyOptionList; - -/// @deprecated Use memcache_v1::CloudMemcacheRetryPolicyOption directly. -using ::google::cloud::memcache_v1::CloudMemcacheRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace memcache -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMCACHE_CLOUD_MEMCACHE_OPTIONS_H diff --git a/google/cloud/memcache/mocks/mock_cloud_memcache_connection.h b/google/cloud/memcache/mocks/mock_cloud_memcache_connection.h deleted file mode 100644 index 45dec651cbd0f..0000000000000 --- a/google/cloud/memcache/mocks/mock_cloud_memcache_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/memcache/v1/cloud_memcache.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMCACHE_MOCKS_MOCK_CLOUD_MEMCACHE_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMCACHE_MOCKS_MOCK_CLOUD_MEMCACHE_CONNECTION_H - -#include "google/cloud/memcache/cloud_memcache_connection.h" -#include "google/cloud/memcache/v1/mocks/mock_cloud_memcache_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in memcache_v1_mocks instead of the aliases -/// defined in this namespace. -namespace memcache_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use memcache_v1_mocks::MockCloudMemcacheConnection directly. -using ::google::cloud::memcache_v1_mocks::MockCloudMemcacheConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace memcache_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMCACHE_MOCKS_MOCK_CLOUD_MEMCACHE_CONNECTION_H diff --git a/google/cloud/memcache/quickstart/.bazelrc b/google/cloud/memcache/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/memcache/quickstart/.bazelrc +++ b/google/cloud/memcache/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/memcache/quickstart/CMakeLists.txt b/google/cloud/memcache/quickstart/CMakeLists.txt index 619d15e8b8b33..27f283b724516 100644 --- a/google/cloud/memcache/quickstart/CMakeLists.txt +++ b/google/cloud/memcache/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Memorystore for Memcached API C++ client # library from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-memcache-quickstart CXX) find_package(google_cloud_cpp_memcache REQUIRED) diff --git a/google/cloud/memcache/v1/cloud_memcache_client.h b/google/cloud/memcache/v1/cloud_memcache_client.h index a076622936609..4ac2c9a7cbc1a 100644 --- a/google/cloud/memcache/v1/cloud_memcache_client.h +++ b/google/cloud/memcache/v1/cloud_memcache_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/memcache/v1/cloud_memcache_connection.h b/google/cloud/memcache/v1/cloud_memcache_connection.h index 79f42842c44c5..fefdbacce9904 100644 --- a/google/cloud/memcache/v1/cloud_memcache_connection.h +++ b/google/cloud/memcache/v1/cloud_memcache_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMCACHE_V1_CLOUD_MEMCACHE_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMCACHE_V1_CLOUD_MEMCACHE_CONNECTION_H +#include "google/cloud/memcache/v1/cloud_memcache.pb.h" #include "google/cloud/memcache/v1/cloud_memcache_connection_idempotency_policy.h" #include "google/cloud/memcache/v1/internal/cloud_memcache_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/memcache/v1/cloud_memcache_connection_idempotency_policy.h b/google/cloud/memcache/v1/cloud_memcache_connection_idempotency_policy.h index e60afc8229530..4cb0a8856fb26 100644 --- a/google/cloud/memcache/v1/cloud_memcache_connection_idempotency_policy.h +++ b/google/cloud/memcache/v1/cloud_memcache_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMCACHE_V1_CLOUD_MEMCACHE_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMCACHE_V1_CLOUD_MEMCACHE_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/memcache/v1/cloud_memcache.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/memcache/v1/internal/cloud_memcache_auth_decorator.cc b/google/cloud/memcache/v1/internal/cloud_memcache_auth_decorator.cc index 527ea70dd58e2..dce156c217318 100644 --- a/google/cloud/memcache/v1/internal/cloud_memcache_auth_decorator.cc +++ b/google/cloud/memcache/v1/internal/cloud_memcache_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/memcache/v1/cloud_memcache.proto #include "google/cloud/memcache/v1/internal/cloud_memcache_auth_decorator.h" -#include +#include "google/cloud/memcache/v1/cloud_memcache.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace memcache_v1_internal { @@ -307,3 +310,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace memcache_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/memcache/v1/internal/cloud_memcache_auth_decorator.h b/google/cloud/memcache/v1/internal/cloud_memcache_auth_decorator.h index a4b4c6422844f..814d36c8e7aaf 100644 --- a/google/cloud/memcache/v1/internal/cloud_memcache_auth_decorator.h +++ b/google/cloud/memcache/v1/internal/cloud_memcache_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/memcache/v1/internal/cloud_memcache_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace memcache_v1_internal { @@ -166,4 +169,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMCACHE_V1_INTERNAL_CLOUD_MEMCACHE_AUTH_DECORATOR_H diff --git a/google/cloud/memcache/v1/internal/cloud_memcache_connection_impl.h b/google/cloud/memcache/v1/internal/cloud_memcache_connection_impl.h index 1f398abf38889..b45baf9a60ad5 100644 --- a/google/cloud/memcache/v1/internal/cloud_memcache_connection_impl.h +++ b/google/cloud/memcache/v1/internal/cloud_memcache_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/memcache/v1/internal/cloud_memcache_logging_decorator.cc b/google/cloud/memcache/v1/internal/cloud_memcache_logging_decorator.cc index 89c14660837fd..583a74739c6ca 100644 --- a/google/cloud/memcache/v1/internal/cloud_memcache_logging_decorator.cc +++ b/google/cloud/memcache/v1/internal/cloud_memcache_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/memcache/v1/cloud_memcache.proto #include "google/cloud/memcache/v1/internal/cloud_memcache_logging_decorator.h" +#include "google/cloud/memcache/v1/cloud_memcache.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace memcache_v1_internal { @@ -353,3 +356,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace memcache_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/memcache/v1/internal/cloud_memcache_logging_decorator.h b/google/cloud/memcache/v1/internal/cloud_memcache_logging_decorator.h index b63518362e26c..0a871b5743de2 100644 --- a/google/cloud/memcache/v1/internal/cloud_memcache_logging_decorator.h +++ b/google/cloud/memcache/v1/internal/cloud_memcache_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/memcache/v1/internal/cloud_memcache_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace memcache_v1_internal { @@ -166,4 +169,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMCACHE_V1_INTERNAL_CLOUD_MEMCACHE_LOGGING_DECORATOR_H diff --git a/google/cloud/memcache/v1/internal/cloud_memcache_metadata_decorator.cc b/google/cloud/memcache/v1/internal/cloud_memcache_metadata_decorator.cc index 0cc34713c2b88..28414fc8f9726 100644 --- a/google/cloud/memcache/v1/internal/cloud_memcache_metadata_decorator.cc +++ b/google/cloud/memcache/v1/internal/cloud_memcache_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/memcache/v1/cloud_memcache.proto #include "google/cloud/memcache/v1/internal/cloud_memcache_metadata_decorator.h" +#include "google/cloud/memcache/v1/cloud_memcache.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace memcache_v1_internal { @@ -278,3 +282,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace memcache_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/memcache/v1/internal/cloud_memcache_metadata_decorator.h b/google/cloud/memcache/v1/internal/cloud_memcache_metadata_decorator.h index 38a0e3ac1b1ff..b7252fdfd72be 100644 --- a/google/cloud/memcache/v1/internal/cloud_memcache_metadata_decorator.h +++ b/google/cloud/memcache/v1/internal/cloud_memcache_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/memcache/v1/internal/cloud_memcache_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace memcache_v1_internal { @@ -171,4 +174,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMCACHE_V1_INTERNAL_CLOUD_MEMCACHE_METADATA_DECORATOR_H diff --git a/google/cloud/memcache/v1/internal/cloud_memcache_option_defaults.cc b/google/cloud/memcache/v1/internal/cloud_memcache_option_defaults.cc index 6844a5656c3cc..ed0cdf4f100d5 100644 --- a/google/cloud/memcache/v1/internal/cloud_memcache_option_defaults.cc +++ b/google/cloud/memcache/v1/internal/cloud_memcache_option_defaults.cc @@ -41,7 +41,7 @@ Options CloudMemcacheDefaultOptions(Options options) { if (!options.has()) { options.set( memcache_v1::CloudMemcacheLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/memcache/v1/internal/cloud_memcache_stub.cc b/google/cloud/memcache/v1/internal/cloud_memcache_stub.cc index 38c0a8f6848e6..c2e1826ccebfd 100644 --- a/google/cloud/memcache/v1/internal/cloud_memcache_stub.cc +++ b/google/cloud/memcache/v1/internal/cloud_memcache_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/memcache/v1/cloud_memcache.proto #include "google/cloud/memcache/v1/internal/cloud_memcache_stub.h" +#include "google/cloud/memcache/v1/cloud_memcache.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace memcache_v1_internal { @@ -349,3 +352,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace memcache_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/memcache/v1/internal/cloud_memcache_stub.h b/google/cloud/memcache/v1/internal/cloud_memcache_stub.h index 07373332c0a18..7c9b95370cbe1 100644 --- a/google/cloud/memcache/v1/internal/cloud_memcache_stub.h +++ b/google/cloud/memcache/v1/internal/cloud_memcache_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMCACHE_V1_INTERNAL_CLOUD_MEMCACHE_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMCACHE_V1_INTERNAL_CLOUD_MEMCACHE_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/memcache/v1/cloud_memcache.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace memcache_v1_internal { @@ -294,4 +297,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMCACHE_V1_INTERNAL_CLOUD_MEMCACHE_STUB_H diff --git a/google/cloud/memcache/v1/internal/cloud_memcache_stub_factory.cc b/google/cloud/memcache/v1/internal/cloud_memcache_stub_factory.cc index d6a4881ef1946..88b78aea0adcb 100644 --- a/google/cloud/memcache/v1/internal/cloud_memcache_stub_factory.cc +++ b/google/cloud/memcache/v1/internal/cloud_memcache_stub_factory.cc @@ -17,6 +17,8 @@ // source: google/cloud/memcache/v1/cloud_memcache.proto #include "google/cloud/memcache/v1/internal/cloud_memcache_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/memcache/v1/cloud_memcache.grpc.pb.h" #include "google/cloud/memcache/v1/internal/cloud_memcache_auth_decorator.h" #include "google/cloud/memcache/v1/internal/cloud_memcache_logging_decorator.h" #include "google/cloud/memcache/v1/internal/cloud_memcache_metadata_decorator.h" @@ -28,12 +30,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace memcache_v1_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace memcache_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/memcache/v1/internal/cloud_memcache_stub_factory.h b/google/cloud/memcache/v1/internal/cloud_memcache_stub_factory.h index 9402312affa64..7e40c496570ff 100644 --- a/google/cloud/memcache/v1/internal/cloud_memcache_stub_factory.h +++ b/google/cloud/memcache/v1/internal/cloud_memcache_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace memcache_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMCACHE_V1_INTERNAL_CLOUD_MEMCACHE_STUB_FACTORY_H diff --git a/google/cloud/memcache/v1/internal/cloud_memcache_tracing_connection.cc b/google/cloud/memcache/v1/internal/cloud_memcache_tracing_connection.cc index bd21eb7ef1b13..cac0172f220c8 100644 --- a/google/cloud/memcache/v1/internal/cloud_memcache_tracing_connection.cc +++ b/google/cloud/memcache/v1/internal/cloud_memcache_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace memcache_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudMemcacheTracingConnection::CloudMemcacheTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -286,16 +284,12 @@ Status CloudMemcacheTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCloudMemcacheTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/memcache/v1/internal/cloud_memcache_tracing_connection.h b/google/cloud/memcache/v1/internal/cloud_memcache_tracing_connection.h index a77734d587f09..801932f73c17a 100644 --- a/google/cloud/memcache/v1/internal/cloud_memcache_tracing_connection.h +++ b/google/cloud/memcache/v1/internal/cloud_memcache_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace memcache_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudMemcacheTracingConnection : public memcache_v1::CloudMemcacheConnection { public: @@ -140,8 +138,6 @@ class CloudMemcacheTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/memcache/v1/internal/cloud_memcache_tracing_stub.cc b/google/cloud/memcache/v1/internal/cloud_memcache_tracing_stub.cc index 7f01af79327b7..1b0b2615c08ea 100644 --- a/google/cloud/memcache/v1/internal/cloud_memcache_tracing_stub.cc +++ b/google/cloud/memcache/v1/internal/cloud_memcache_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace memcache_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudMemcacheTracingStub::CloudMemcacheTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -315,18 +316,14 @@ future CloudMemcacheTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCloudMemcacheTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace memcache_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/memcache/v1/internal/cloud_memcache_tracing_stub.h b/google/cloud/memcache/v1/internal/cloud_memcache_tracing_stub.h index 02884eb8f59af..971a3e210627a 100644 --- a/google/cloud/memcache/v1/internal/cloud_memcache_tracing_stub.h +++ b/google/cloud/memcache/v1/internal/cloud_memcache_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace memcache_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudMemcacheTracingStub : public CloudMemcacheStub { public: ~CloudMemcacheTracingStub() override = default; @@ -161,8 +162,6 @@ class CloudMemcacheTracingStub : public CloudMemcacheStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -177,4 +176,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMCACHE_V1_INTERNAL_CLOUD_MEMCACHE_TRACING_STUB_H diff --git a/google/cloud/memorystore/BUILD.bazel b/google/cloud/memorystore/BUILD.bazel index 06cb560083b62..4474b6ffd6b3a 100644 --- a/google/cloud/memorystore/BUILD.bazel +++ b/google/cloud/memorystore/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/memorystore/v1:memorystore_cc_grpc", + "@googleapis//google/cloud/memorystore/v1:memorystore_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/memorystore/quickstart/CMakeLists.txt b/google/cloud/memorystore/quickstart/CMakeLists.txt index 14fb6a10b4fda..00cf99edc112d 100644 --- a/google/cloud/memorystore/quickstart/CMakeLists.txt +++ b/google/cloud/memorystore/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Memorystore API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-memorystore-quickstart CXX) find_package(google_cloud_cpp_memorystore REQUIRED) diff --git a/google/cloud/memorystore/v1/internal/memorystore_auth_decorator.cc b/google/cloud/memorystore/v1/internal/memorystore_auth_decorator.cc index 8a6c3007f5e9e..09c34e7faeef5 100644 --- a/google/cloud/memorystore/v1/internal/memorystore_auth_decorator.cc +++ b/google/cloud/memorystore/v1/internal/memorystore_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/memorystore/v1/memorystore.proto #include "google/cloud/memorystore/v1/internal/memorystore_auth_decorator.h" -#include +#include "google/cloud/memorystore/v1/memorystore.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace memorystore_v1_internal { @@ -382,3 +385,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace memorystore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/memorystore/v1/internal/memorystore_auth_decorator.h b/google/cloud/memorystore/v1/internal/memorystore_auth_decorator.h index 3a7291774b8d2..34674275f5973 100644 --- a/google/cloud/memorystore/v1/internal/memorystore_auth_decorator.h +++ b/google/cloud/memorystore/v1/internal/memorystore_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/memorystore/v1/internal/memorystore_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace memorystore_v1_internal { @@ -206,4 +209,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMORYSTORE_V1_INTERNAL_MEMORYSTORE_AUTH_DECORATOR_H diff --git a/google/cloud/memorystore/v1/internal/memorystore_connection_impl.h b/google/cloud/memorystore/v1/internal/memorystore_connection_impl.h index 4a0c5ee66ccc4..6d01a2a3504e0 100644 --- a/google/cloud/memorystore/v1/internal/memorystore_connection_impl.h +++ b/google/cloud/memorystore/v1/internal/memorystore_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/memorystore/v1/internal/memorystore_logging_decorator.cc b/google/cloud/memorystore/v1/internal/memorystore_logging_decorator.cc index 37ee8010eb6b2..cea8f99fc2ef9 100644 --- a/google/cloud/memorystore/v1/internal/memorystore_logging_decorator.cc +++ b/google/cloud/memorystore/v1/internal/memorystore_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/memorystore/v1/memorystore.proto #include "google/cloud/memorystore/v1/internal/memorystore_logging_decorator.h" +#include "google/cloud/memorystore/v1/memorystore.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace memorystore_v1_internal { @@ -454,3 +457,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace memorystore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/memorystore/v1/internal/memorystore_logging_decorator.h b/google/cloud/memorystore/v1/internal/memorystore_logging_decorator.h index 26174c0da7a15..e530f8bee50a0 100644 --- a/google/cloud/memorystore/v1/internal/memorystore_logging_decorator.h +++ b/google/cloud/memorystore/v1/internal/memorystore_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/memorystore/v1/internal/memorystore_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace memorystore_v1_internal { @@ -206,4 +209,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMORYSTORE_V1_INTERNAL_MEMORYSTORE_LOGGING_DECORATOR_H diff --git a/google/cloud/memorystore/v1/internal/memorystore_metadata_decorator.cc b/google/cloud/memorystore/v1/internal/memorystore_metadata_decorator.cc index d28e989435abe..5854060114af0 100644 --- a/google/cloud/memorystore/v1/internal/memorystore_metadata_decorator.cc +++ b/google/cloud/memorystore/v1/internal/memorystore_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/memorystore/v1/memorystore.proto #include "google/cloud/memorystore/v1/internal/memorystore_metadata_decorator.h" +#include "google/cloud/memorystore/v1/memorystore.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace memorystore_v1_internal { @@ -343,3 +347,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace memorystore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/memorystore/v1/internal/memorystore_metadata_decorator.h b/google/cloud/memorystore/v1/internal/memorystore_metadata_decorator.h index 04242b0d31600..75bab966cdf35 100644 --- a/google/cloud/memorystore/v1/internal/memorystore_metadata_decorator.h +++ b/google/cloud/memorystore/v1/internal/memorystore_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/memorystore/v1/internal/memorystore_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace memorystore_v1_internal { @@ -211,4 +214,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMORYSTORE_V1_INTERNAL_MEMORYSTORE_METADATA_DECORATOR_H diff --git a/google/cloud/memorystore/v1/internal/memorystore_option_defaults.cc b/google/cloud/memorystore/v1/internal/memorystore_option_defaults.cc index 731989f485a91..2dd06af447102 100644 --- a/google/cloud/memorystore/v1/internal/memorystore_option_defaults.cc +++ b/google/cloud/memorystore/v1/internal/memorystore_option_defaults.cc @@ -41,7 +41,7 @@ Options MemorystoreDefaultOptions(Options options) { if (!options.has()) { options.set( memorystore_v1::MemorystoreLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/memorystore/v1/internal/memorystore_stub.cc b/google/cloud/memorystore/v1/internal/memorystore_stub.cc index 3ed9a7e92dfaa..c715b252b667d 100644 --- a/google/cloud/memorystore/v1/internal/memorystore_stub.cc +++ b/google/cloud/memorystore/v1/internal/memorystore_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/memorystore/v1/memorystore.proto #include "google/cloud/memorystore/v1/internal/memorystore_stub.h" +#include "google/cloud/memorystore/v1/memorystore.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace memorystore_v1_internal { @@ -440,3 +443,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace memorystore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/memorystore/v1/internal/memorystore_stub.h b/google/cloud/memorystore/v1/internal/memorystore_stub.h index aa10cd69cf01b..7c4cf71efd0f7 100644 --- a/google/cloud/memorystore/v1/internal/memorystore_stub.h +++ b/google/cloud/memorystore/v1/internal/memorystore_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMORYSTORE_V1_INTERNAL_MEMORYSTORE_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMORYSTORE_V1_INTERNAL_MEMORYSTORE_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/memorystore/v1/memorystore.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace memorystore_v1_internal { @@ -372,4 +375,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMORYSTORE_V1_INTERNAL_MEMORYSTORE_STUB_H diff --git a/google/cloud/memorystore/v1/internal/memorystore_stub_factory.cc b/google/cloud/memorystore/v1/internal/memorystore_stub_factory.cc index dca058f0c892a..a89d5ae6c8ebb 100644 --- a/google/cloud/memorystore/v1/internal/memorystore_stub_factory.cc +++ b/google/cloud/memorystore/v1/internal/memorystore_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/memorystore/v1/memorystore.proto #include "google/cloud/memorystore/v1/internal/memorystore_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/memorystore/v1/internal/memorystore_auth_decorator.h" #include "google/cloud/memorystore/v1/internal/memorystore_logging_decorator.h" #include "google/cloud/memorystore/v1/internal/memorystore_metadata_decorator.h" #include "google/cloud/memorystore/v1/internal/memorystore_stub.h" #include "google/cloud/memorystore/v1/internal/memorystore_tracing_stub.h" +#include "google/cloud/memorystore/v1/memorystore.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace memorystore_v1_internal { @@ -74,3 +77,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace memorystore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/memorystore/v1/internal/memorystore_stub_factory.h b/google/cloud/memorystore/v1/internal/memorystore_stub_factory.h index db7da861d5f00..7a8bfc5f3ba1a 100644 --- a/google/cloud/memorystore/v1/internal/memorystore_stub_factory.h +++ b/google/cloud/memorystore/v1/internal/memorystore_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace memorystore_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMORYSTORE_V1_INTERNAL_MEMORYSTORE_STUB_FACTORY_H diff --git a/google/cloud/memorystore/v1/internal/memorystore_tracing_connection.cc b/google/cloud/memorystore/v1/internal/memorystore_tracing_connection.cc index b06b77efe6d90..d8bdf7b00f138 100644 --- a/google/cloud/memorystore/v1/internal/memorystore_tracing_connection.cc +++ b/google/cloud/memorystore/v1/internal/memorystore_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace memorystore_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - MemorystoreTracingConnection::MemorystoreTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -365,16 +363,12 @@ Status MemorystoreTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeMemorystoreTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/memorystore/v1/internal/memorystore_tracing_connection.h b/google/cloud/memorystore/v1/internal/memorystore_tracing_connection.h index aaa8abfe069ef..14e6862ce4b83 100644 --- a/google/cloud/memorystore/v1/internal/memorystore_tracing_connection.h +++ b/google/cloud/memorystore/v1/internal/memorystore_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace memorystore_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class MemorystoreTracingConnection : public memorystore_v1::MemorystoreConnection { public: @@ -176,8 +174,6 @@ class MemorystoreTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/memorystore/v1/internal/memorystore_tracing_stub.cc b/google/cloud/memorystore/v1/internal/memorystore_tracing_stub.cc index 87045ce21fd40..c9432d789aecb 100644 --- a/google/cloud/memorystore/v1/internal/memorystore_tracing_stub.cc +++ b/google/cloud/memorystore/v1/internal/memorystore_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace memorystore_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - MemorystoreTracingStub::MemorystoreTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -398,18 +399,14 @@ future MemorystoreTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeMemorystoreTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace memorystore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/memorystore/v1/internal/memorystore_tracing_stub.h b/google/cloud/memorystore/v1/internal/memorystore_tracing_stub.h index ac516054425e5..c5a9bd9094564 100644 --- a/google/cloud/memorystore/v1/internal/memorystore_tracing_stub.h +++ b/google/cloud/memorystore/v1/internal/memorystore_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace memorystore_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class MemorystoreTracingStub : public MemorystoreStub { public: ~MemorystoreTracingStub() override = default; @@ -201,8 +202,6 @@ class MemorystoreTracingStub : public MemorystoreStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -217,4 +216,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMORYSTORE_V1_INTERNAL_MEMORYSTORE_TRACING_STUB_H diff --git a/google/cloud/memorystore/v1/memorystore_client.h b/google/cloud/memorystore/v1/memorystore_client.h index 6e3fbd6372db5..91b2ad9b99734 100644 --- a/google/cloud/memorystore/v1/memorystore_client.h +++ b/google/cloud/memorystore/v1/memorystore_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/memorystore/v1/memorystore_connection.h b/google/cloud/memorystore/v1/memorystore_connection.h index f7b5b9a106777..c1c53d007403a 100644 --- a/google/cloud/memorystore/v1/memorystore_connection.h +++ b/google/cloud/memorystore/v1/memorystore_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMORYSTORE_V1_MEMORYSTORE_CONNECTION_H #include "google/cloud/memorystore/v1/internal/memorystore_retry_traits.h" +#include "google/cloud/memorystore/v1/memorystore.pb.h" #include "google/cloud/memorystore/v1/memorystore_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/memorystore/v1/memorystore_connection_idempotency_policy.h b/google/cloud/memorystore/v1/memorystore_connection_idempotency_policy.h index fea0d32e11117..a4ac953d6307c 100644 --- a/google/cloud/memorystore/v1/memorystore_connection_idempotency_policy.h +++ b/google/cloud/memorystore/v1/memorystore_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMORYSTORE_V1_MEMORYSTORE_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MEMORYSTORE_V1_MEMORYSTORE_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/memorystore/v1/memorystore.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/metastore/BUILD.bazel b/google/cloud/metastore/BUILD.bazel index a6dd7643bb1a4..68644492fe9ac 100644 --- a/google/cloud/metastore/BUILD.bazel +++ b/google/cloud/metastore/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/metastore/v1:metastore_cc_grpc", + "@googleapis//google/cloud/metastore/v1:metastore_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/metastore/quickstart/.bazelrc b/google/cloud/metastore/quickstart/.bazelrc index 6777c6b4c95de..ec27511a60add 100644 --- a/google/cloud/metastore/quickstart/.bazelrc +++ b/google/cloud/metastore/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/metastore/quickstart/CMakeLists.txt b/google/cloud/metastore/quickstart/CMakeLists.txt index dc5662380ab90..64199d20800fb 100644 --- a/google/cloud/metastore/quickstart/CMakeLists.txt +++ b/google/cloud/metastore/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Dataproc Metastore API C++ client library from # a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-metastore-quickstart CXX) find_package(google_cloud_cpp_metastore REQUIRED) diff --git a/google/cloud/metastore/v1/dataproc_metastore_client.h b/google/cloud/metastore/v1/dataproc_metastore_client.h index 9bf83004f273b..7951db6d2f690 100644 --- a/google/cloud/metastore/v1/dataproc_metastore_client.h +++ b/google/cloud/metastore/v1/dataproc_metastore_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/metastore/v1/dataproc_metastore_connection.h b/google/cloud/metastore/v1/dataproc_metastore_connection.h index 11892b59d0351..a106e2d05c989 100644 --- a/google/cloud/metastore/v1/dataproc_metastore_connection.h +++ b/google/cloud/metastore/v1/dataproc_metastore_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/metastore/v1/dataproc_metastore_connection_idempotency_policy.h" #include "google/cloud/metastore/v1/internal/dataproc_metastore_retry_traits.h" +#include "google/cloud/metastore/v1/metastore.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/metastore/v1/dataproc_metastore_connection_idempotency_policy.h b/google/cloud/metastore/v1/dataproc_metastore_connection_idempotency_policy.h index b4efe3e332a94..13b86763af619 100644 --- a/google/cloud/metastore/v1/dataproc_metastore_connection_idempotency_policy.h +++ b/google/cloud/metastore/v1/dataproc_metastore_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_METASTORE_V1_DATAPROC_METASTORE_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_METASTORE_V1_DATAPROC_METASTORE_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/metastore/v1/metastore.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/metastore/v1/dataproc_metastore_federation_client.h b/google/cloud/metastore/v1/dataproc_metastore_federation_client.h index deb4faee66c42..b7da299782b6a 100644 --- a/google/cloud/metastore/v1/dataproc_metastore_federation_client.h +++ b/google/cloud/metastore/v1/dataproc_metastore_federation_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/metastore/v1/dataproc_metastore_federation_connection.h b/google/cloud/metastore/v1/dataproc_metastore_federation_connection.h index 5e8540dad5e9b..23dfcea318e42 100644 --- a/google/cloud/metastore/v1/dataproc_metastore_federation_connection.h +++ b/google/cloud/metastore/v1/dataproc_metastore_federation_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/metastore/v1/dataproc_metastore_federation_connection_idempotency_policy.h" #include "google/cloud/metastore/v1/internal/dataproc_metastore_federation_retry_traits.h" +#include "google/cloud/metastore/v1/metastore_federation.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/metastore/v1/dataproc_metastore_federation_connection_idempotency_policy.h b/google/cloud/metastore/v1/dataproc_metastore_federation_connection_idempotency_policy.h index 434d64d90a4d3..0b2952b42f5f4 100644 --- a/google/cloud/metastore/v1/dataproc_metastore_federation_connection_idempotency_policy.h +++ b/google/cloud/metastore/v1/dataproc_metastore_federation_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_METASTORE_V1_DATAPROC_METASTORE_FEDERATION_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_METASTORE_V1_DATAPROC_METASTORE_FEDERATION_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/metastore/v1/metastore_federation.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/metastore/v1/internal/dataproc_metastore_auth_decorator.cc b/google/cloud/metastore/v1/internal/dataproc_metastore_auth_decorator.cc index 772731a108094..a00aac90bfe08 100644 --- a/google/cloud/metastore/v1/internal/dataproc_metastore_auth_decorator.cc +++ b/google/cloud/metastore/v1/internal/dataproc_metastore_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/metastore/v1/metastore.proto #include "google/cloud/metastore/v1/internal/dataproc_metastore_auth_decorator.h" -#include +#include "google/cloud/metastore/v1/metastore.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace metastore_v1_internal { @@ -541,3 +544,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace metastore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/metastore/v1/internal/dataproc_metastore_auth_decorator.h b/google/cloud/metastore/v1/internal/dataproc_metastore_auth_decorator.h index d7135ad88735e..3f084d582f279 100644 --- a/google/cloud/metastore/v1/internal/dataproc_metastore_auth_decorator.h +++ b/google/cloud/metastore/v1/internal/dataproc_metastore_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/metastore/v1/internal/dataproc_metastore_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace metastore_v1_internal { @@ -270,4 +273,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_METASTORE_V1_INTERNAL_DATAPROC_METASTORE_AUTH_DECORATOR_H diff --git a/google/cloud/metastore/v1/internal/dataproc_metastore_connection_impl.h b/google/cloud/metastore/v1/internal/dataproc_metastore_connection_impl.h index 1f327a778fa5e..6b2792d0769b0 100644 --- a/google/cloud/metastore/v1/internal/dataproc_metastore_connection_impl.h +++ b/google/cloud/metastore/v1/internal/dataproc_metastore_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/metastore/v1/internal/dataproc_metastore_federation_auth_decorator.cc b/google/cloud/metastore/v1/internal/dataproc_metastore_federation_auth_decorator.cc index 25b3d0d56a65b..f5e06e31a9849 100644 --- a/google/cloud/metastore/v1/internal/dataproc_metastore_federation_auth_decorator.cc +++ b/google/cloud/metastore/v1/internal/dataproc_metastore_federation_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/metastore/v1/metastore_federation.proto #include "google/cloud/metastore/v1/internal/dataproc_metastore_federation_auth_decorator.h" -#include +#include "google/cloud/metastore/v1/metastore_federation.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace metastore_v1_internal { @@ -253,3 +256,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace metastore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/metastore/v1/internal/dataproc_metastore_federation_auth_decorator.h b/google/cloud/metastore/v1/internal/dataproc_metastore_federation_auth_decorator.h index f1503af5067bd..322b52160af9a 100644 --- a/google/cloud/metastore/v1/internal/dataproc_metastore_federation_auth_decorator.h +++ b/google/cloud/metastore/v1/internal/dataproc_metastore_federation_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/metastore/v1/internal/dataproc_metastore_federation_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace metastore_v1_internal { @@ -143,4 +146,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_METASTORE_V1_INTERNAL_DATAPROC_METASTORE_FEDERATION_AUTH_DECORATOR_H diff --git a/google/cloud/metastore/v1/internal/dataproc_metastore_federation_connection_impl.h b/google/cloud/metastore/v1/internal/dataproc_metastore_federation_connection_impl.h index ec3fe203131d3..ff97c633f5a12 100644 --- a/google/cloud/metastore/v1/internal/dataproc_metastore_federation_connection_impl.h +++ b/google/cloud/metastore/v1/internal/dataproc_metastore_federation_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/metastore/v1/internal/dataproc_metastore_federation_logging_decorator.cc b/google/cloud/metastore/v1/internal/dataproc_metastore_federation_logging_decorator.cc index c8cc96e8cdfed..7cfe376294574 100644 --- a/google/cloud/metastore/v1/internal/dataproc_metastore_federation_logging_decorator.cc +++ b/google/cloud/metastore/v1/internal/dataproc_metastore_federation_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/metastore/v1/metastore_federation.proto #include "google/cloud/metastore/v1/internal/dataproc_metastore_federation_logging_decorator.h" +#include "google/cloud/metastore/v1/metastore_federation.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace metastore_v1_internal { @@ -302,3 +305,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace metastore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/metastore/v1/internal/dataproc_metastore_federation_logging_decorator.h b/google/cloud/metastore/v1/internal/dataproc_metastore_federation_logging_decorator.h index 69d5defcd7109..33d044fb4e708 100644 --- a/google/cloud/metastore/v1/internal/dataproc_metastore_federation_logging_decorator.h +++ b/google/cloud/metastore/v1/internal/dataproc_metastore_federation_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/metastore/v1/internal/dataproc_metastore_federation_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace metastore_v1_internal { @@ -144,4 +147,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_METASTORE_V1_INTERNAL_DATAPROC_METASTORE_FEDERATION_LOGGING_DECORATOR_H diff --git a/google/cloud/metastore/v1/internal/dataproc_metastore_federation_metadata_decorator.cc b/google/cloud/metastore/v1/internal/dataproc_metastore_federation_metadata_decorator.cc index f8820a4c6f03f..0ccfc7215efb3 100644 --- a/google/cloud/metastore/v1/internal/dataproc_metastore_federation_metadata_decorator.cc +++ b/google/cloud/metastore/v1/internal/dataproc_metastore_federation_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/metastore/v1/metastore_federation.proto #include "google/cloud/metastore/v1/internal/dataproc_metastore_federation_metadata_decorator.h" +#include "google/cloud/metastore/v1/metastore_federation.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace metastore_v1_internal { @@ -249,3 +253,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace metastore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/metastore/v1/internal/dataproc_metastore_federation_metadata_decorator.h b/google/cloud/metastore/v1/internal/dataproc_metastore_federation_metadata_decorator.h index 92f2612eb0fcf..fed536acf70d9 100644 --- a/google/cloud/metastore/v1/internal/dataproc_metastore_federation_metadata_decorator.h +++ b/google/cloud/metastore/v1/internal/dataproc_metastore_federation_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/metastore/v1/internal/dataproc_metastore_federation_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace metastore_v1_internal { @@ -150,4 +153,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_METASTORE_V1_INTERNAL_DATAPROC_METASTORE_FEDERATION_METADATA_DECORATOR_H diff --git a/google/cloud/metastore/v1/internal/dataproc_metastore_federation_option_defaults.cc b/google/cloud/metastore/v1/internal/dataproc_metastore_federation_option_defaults.cc index 84ee98d3932be..291650f05cfb0 100644 --- a/google/cloud/metastore/v1/internal/dataproc_metastore_federation_option_defaults.cc +++ b/google/cloud/metastore/v1/internal/dataproc_metastore_federation_option_defaults.cc @@ -44,7 +44,7 @@ Options DataprocMetastoreFederationDefaultOptions(Options options) { .has()) { options.set( metastore_v1::DataprocMetastoreFederationLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/metastore/v1/internal/dataproc_metastore_federation_stub.cc b/google/cloud/metastore/v1/internal/dataproc_metastore_federation_stub.cc index b5a806633829b..dca9169b0f4ee 100644 --- a/google/cloud/metastore/v1/internal/dataproc_metastore_federation_stub.cc +++ b/google/cloud/metastore/v1/internal/dataproc_metastore_federation_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/metastore/v1/metastore_federation.proto #include "google/cloud/metastore/v1/internal/dataproc_metastore_federation_stub.h" +#include "google/cloud/metastore/v1/metastore_federation.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace metastore_v1_internal { @@ -298,3 +301,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace metastore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/metastore/v1/internal/dataproc_metastore_federation_stub.h b/google/cloud/metastore/v1/internal/dataproc_metastore_federation_stub.h index fdf3ffc47578b..c30f26c82eeda 100644 --- a/google/cloud/metastore/v1/internal/dataproc_metastore_federation_stub.h +++ b/google/cloud/metastore/v1/internal/dataproc_metastore_federation_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_METASTORE_V1_INTERNAL_DATAPROC_METASTORE_FEDERATION_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_METASTORE_V1_INTERNAL_DATAPROC_METASTORE_FEDERATION_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/metastore/v1/metastore_federation.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace metastore_v1_internal { @@ -260,4 +263,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_METASTORE_V1_INTERNAL_DATAPROC_METASTORE_FEDERATION_STUB_H diff --git a/google/cloud/metastore/v1/internal/dataproc_metastore_federation_stub_factory.cc b/google/cloud/metastore/v1/internal/dataproc_metastore_federation_stub_factory.cc index 96314fb95d78c..d5274f985864b 100644 --- a/google/cloud/metastore/v1/internal/dataproc_metastore_federation_stub_factory.cc +++ b/google/cloud/metastore/v1/internal/dataproc_metastore_federation_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/metastore/v1/metastore_federation.proto #include "google/cloud/metastore/v1/internal/dataproc_metastore_federation_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/metastore/v1/internal/dataproc_metastore_federation_auth_decorator.h" #include "google/cloud/metastore/v1/internal/dataproc_metastore_federation_logging_decorator.h" #include "google/cloud/metastore/v1/internal/dataproc_metastore_federation_metadata_decorator.h" #include "google/cloud/metastore/v1/internal/dataproc_metastore_federation_stub.h" #include "google/cloud/metastore/v1/internal/dataproc_metastore_federation_tracing_stub.h" +#include "google/cloud/metastore/v1/metastore_federation.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace metastore_v1_internal { @@ -80,3 +83,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace metastore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/metastore/v1/internal/dataproc_metastore_federation_stub_factory.h b/google/cloud/metastore/v1/internal/dataproc_metastore_federation_stub_factory.h index 45cf6a6c835fb..dac0499759e76 100644 --- a/google/cloud/metastore/v1/internal/dataproc_metastore_federation_stub_factory.h +++ b/google/cloud/metastore/v1/internal/dataproc_metastore_federation_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace metastore_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_METASTORE_V1_INTERNAL_DATAPROC_METASTORE_FEDERATION_STUB_FACTORY_H diff --git a/google/cloud/metastore/v1/internal/dataproc_metastore_federation_tracing_connection.cc b/google/cloud/metastore/v1/internal/dataproc_metastore_federation_tracing_connection.cc index e75ddd7ff3e40..6f9fab332d696 100644 --- a/google/cloud/metastore/v1/internal/dataproc_metastore_federation_tracing_connection.cc +++ b/google/cloud/metastore/v1/internal/dataproc_metastore_federation_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace metastore_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DataprocMetastoreFederationTracingConnection:: DataprocMetastoreFederationTracingConnection( std::shared_ptr @@ -229,17 +227,13 @@ Status DataprocMetastoreFederationTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDataprocMetastoreFederationTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/metastore/v1/internal/dataproc_metastore_federation_tracing_connection.h b/google/cloud/metastore/v1/internal/dataproc_metastore_federation_tracing_connection.h index e12254d0ff9c8..83a0bb6d6ac79 100644 --- a/google/cloud/metastore/v1/internal/dataproc_metastore_federation_tracing_connection.h +++ b/google/cloud/metastore/v1/internal/dataproc_metastore_federation_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace metastore_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DataprocMetastoreFederationTracingConnection : public metastore_v1::DataprocMetastoreFederationConnection { public: @@ -115,8 +113,6 @@ class DataprocMetastoreFederationTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/metastore/v1/internal/dataproc_metastore_federation_tracing_stub.cc b/google/cloud/metastore/v1/internal/dataproc_metastore_federation_tracing_stub.cc index 762771da8360c..7f8b537fe53e8 100644 --- a/google/cloud/metastore/v1/internal/dataproc_metastore_federation_tracing_stub.cc +++ b/google/cloud/metastore/v1/internal/dataproc_metastore_federation_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace metastore_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DataprocMetastoreFederationTracingStub::DataprocMetastoreFederationTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -282,20 +283,16 @@ future DataprocMetastoreFederationTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDataprocMetastoreFederationTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared( std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace metastore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/metastore/v1/internal/dataproc_metastore_federation_tracing_stub.h b/google/cloud/metastore/v1/internal/dataproc_metastore_federation_tracing_stub.h index 986a10423809b..9c9e841409900 100644 --- a/google/cloud/metastore/v1/internal/dataproc_metastore_federation_tracing_stub.h +++ b/google/cloud/metastore/v1/internal/dataproc_metastore_federation_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace metastore_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DataprocMetastoreFederationTracingStub : public DataprocMetastoreFederationStub { public: @@ -140,8 +141,6 @@ class DataprocMetastoreFederationTracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -157,4 +156,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_METASTORE_V1_INTERNAL_DATAPROC_METASTORE_FEDERATION_TRACING_STUB_H diff --git a/google/cloud/metastore/v1/internal/dataproc_metastore_logging_decorator.cc b/google/cloud/metastore/v1/internal/dataproc_metastore_logging_decorator.cc index 3dee1bd4433df..5795a0d70def1 100644 --- a/google/cloud/metastore/v1/internal/dataproc_metastore_logging_decorator.cc +++ b/google/cloud/metastore/v1/internal/dataproc_metastore_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/metastore/v1/metastore.proto #include "google/cloud/metastore/v1/internal/dataproc_metastore_logging_decorator.h" +#include "google/cloud/metastore/v1/metastore.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace metastore_v1_internal { @@ -631,3 +634,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace metastore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/metastore/v1/internal/dataproc_metastore_logging_decorator.h b/google/cloud/metastore/v1/internal/dataproc_metastore_logging_decorator.h index e4b3f8b67d3e8..b658c7d080e78 100644 --- a/google/cloud/metastore/v1/internal/dataproc_metastore_logging_decorator.h +++ b/google/cloud/metastore/v1/internal/dataproc_metastore_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/metastore/v1/internal/dataproc_metastore_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace metastore_v1_internal { @@ -270,4 +273,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_METASTORE_V1_INTERNAL_DATAPROC_METASTORE_LOGGING_DECORATOR_H diff --git a/google/cloud/metastore/v1/internal/dataproc_metastore_metadata_decorator.cc b/google/cloud/metastore/v1/internal/dataproc_metastore_metadata_decorator.cc index ca74827d760b1..2555afdd98c0b 100644 --- a/google/cloud/metastore/v1/internal/dataproc_metastore_metadata_decorator.cc +++ b/google/cloud/metastore/v1/internal/dataproc_metastore_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/metastore/v1/metastore.proto #include "google/cloud/metastore/v1/internal/dataproc_metastore_metadata_decorator.h" +#include "google/cloud/metastore/v1/metastore.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace metastore_v1_internal { @@ -478,3 +482,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace metastore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/metastore/v1/internal/dataproc_metastore_metadata_decorator.h b/google/cloud/metastore/v1/internal/dataproc_metastore_metadata_decorator.h index f3eb9576a037d..b9958e326cf3f 100644 --- a/google/cloud/metastore/v1/internal/dataproc_metastore_metadata_decorator.h +++ b/google/cloud/metastore/v1/internal/dataproc_metastore_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/metastore/v1/internal/dataproc_metastore_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace metastore_v1_internal { @@ -276,4 +279,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_METASTORE_V1_INTERNAL_DATAPROC_METASTORE_METADATA_DECORATOR_H diff --git a/google/cloud/metastore/v1/internal/dataproc_metastore_option_defaults.cc b/google/cloud/metastore/v1/internal/dataproc_metastore_option_defaults.cc index d0bca25f6ce93..fefc0e9c069e1 100644 --- a/google/cloud/metastore/v1/internal/dataproc_metastore_option_defaults.cc +++ b/google/cloud/metastore/v1/internal/dataproc_metastore_option_defaults.cc @@ -42,7 +42,7 @@ Options DataprocMetastoreDefaultOptions(Options options) { if (!options.has()) { options.set( metastore_v1::DataprocMetastoreLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/metastore/v1/internal/dataproc_metastore_stub.cc b/google/cloud/metastore/v1/internal/dataproc_metastore_stub.cc index 790c5e870066b..59807a10669bc 100644 --- a/google/cloud/metastore/v1/internal/dataproc_metastore_stub.cc +++ b/google/cloud/metastore/v1/internal/dataproc_metastore_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/metastore/v1/metastore.proto #include "google/cloud/metastore/v1/internal/dataproc_metastore_stub.h" +#include "google/cloud/metastore/v1/metastore.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace metastore_v1_internal { @@ -619,3 +622,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace metastore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/metastore/v1/internal/dataproc_metastore_stub.h b/google/cloud/metastore/v1/internal/dataproc_metastore_stub.h index 1a64c7e358547..42cb5a57c2bb8 100644 --- a/google/cloud/metastore/v1/internal/dataproc_metastore_stub.h +++ b/google/cloud/metastore/v1/internal/dataproc_metastore_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_METASTORE_V1_INTERNAL_DATAPROC_METASTORE_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_METASTORE_V1_INTERNAL_DATAPROC_METASTORE_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/metastore/v1/metastore.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace metastore_v1_internal { @@ -507,4 +510,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_METASTORE_V1_INTERNAL_DATAPROC_METASTORE_STUB_H diff --git a/google/cloud/metastore/v1/internal/dataproc_metastore_stub_factory.cc b/google/cloud/metastore/v1/internal/dataproc_metastore_stub_factory.cc index 0d936b90275a0..58af72b4f3e73 100644 --- a/google/cloud/metastore/v1/internal/dataproc_metastore_stub_factory.cc +++ b/google/cloud/metastore/v1/internal/dataproc_metastore_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/metastore/v1/metastore.proto #include "google/cloud/metastore/v1/internal/dataproc_metastore_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/metastore/v1/internal/dataproc_metastore_auth_decorator.h" #include "google/cloud/metastore/v1/internal/dataproc_metastore_logging_decorator.h" #include "google/cloud/metastore/v1/internal/dataproc_metastore_metadata_decorator.h" #include "google/cloud/metastore/v1/internal/dataproc_metastore_stub.h" #include "google/cloud/metastore/v1/internal/dataproc_metastore_tracing_stub.h" +#include "google/cloud/metastore/v1/metastore.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace metastore_v1_internal { @@ -78,3 +81,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace metastore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/metastore/v1/internal/dataproc_metastore_stub_factory.h b/google/cloud/metastore/v1/internal/dataproc_metastore_stub_factory.h index 7402353e46b8a..bb8ceab5ed3a5 100644 --- a/google/cloud/metastore/v1/internal/dataproc_metastore_stub_factory.h +++ b/google/cloud/metastore/v1/internal/dataproc_metastore_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace metastore_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_METASTORE_V1_INTERNAL_DATAPROC_METASTORE_STUB_FACTORY_H diff --git a/google/cloud/metastore/v1/internal/dataproc_metastore_tracing_connection.cc b/google/cloud/metastore/v1/internal/dataproc_metastore_tracing_connection.cc index 497259ee3a3a4..3b1d22e2bfd24 100644 --- a/google/cloud/metastore/v1/internal/dataproc_metastore_tracing_connection.cc +++ b/google/cloud/metastore/v1/internal/dataproc_metastore_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace metastore_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DataprocMetastoreTracingConnection::DataprocMetastoreTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -534,17 +532,13 @@ Status DataprocMetastoreTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDataprocMetastoreTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/metastore/v1/internal/dataproc_metastore_tracing_connection.h b/google/cloud/metastore/v1/internal/dataproc_metastore_tracing_connection.h index 546e51ca3e786..3a004e58dc2d5 100644 --- a/google/cloud/metastore/v1/internal/dataproc_metastore_tracing_connection.h +++ b/google/cloud/metastore/v1/internal/dataproc_metastore_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace metastore_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DataprocMetastoreTracingConnection : public metastore_v1::DataprocMetastoreConnection { public: @@ -244,8 +242,6 @@ class DataprocMetastoreTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/metastore/v1/internal/dataproc_metastore_tracing_stub.cc b/google/cloud/metastore/v1/internal/dataproc_metastore_tracing_stub.cc index e0421e4023397..9491c5c2c2e2c 100644 --- a/google/cloud/metastore/v1/internal/dataproc_metastore_tracing_stub.cc +++ b/google/cloud/metastore/v1/internal/dataproc_metastore_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace metastore_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DataprocMetastoreTracingStub::DataprocMetastoreTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -559,18 +560,14 @@ future DataprocMetastoreTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDataprocMetastoreTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace metastore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/metastore/v1/internal/dataproc_metastore_tracing_stub.h b/google/cloud/metastore/v1/internal/dataproc_metastore_tracing_stub.h index 3c6b2e2f6c2c2..2b1286ee08f16 100644 --- a/google/cloud/metastore/v1/internal/dataproc_metastore_tracing_stub.h +++ b/google/cloud/metastore/v1/internal/dataproc_metastore_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace metastore_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DataprocMetastoreTracingStub : public DataprocMetastoreStub { public: ~DataprocMetastoreTracingStub() override = default; @@ -266,8 +267,6 @@ class DataprocMetastoreTracingStub : public DataprocMetastoreStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -282,4 +281,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_METASTORE_V1_INTERNAL_DATAPROC_METASTORE_TRACING_STUB_H diff --git a/google/cloud/migrationcenter/BUILD.bazel b/google/cloud/migrationcenter/BUILD.bazel index ad51f70663581..3184649afdb6f 100644 --- a/google/cloud/migrationcenter/BUILD.bazel +++ b/google/cloud/migrationcenter/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/migrationcenter/v1:migrationcenter_cc_grpc", + "@googleapis//google/cloud/migrationcenter/v1:migrationcenter_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/migrationcenter/quickstart/.bazelrc b/google/cloud/migrationcenter/quickstart/.bazelrc index 6777c6b4c95de..ec27511a60add 100644 --- a/google/cloud/migrationcenter/quickstart/.bazelrc +++ b/google/cloud/migrationcenter/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/migrationcenter/quickstart/CMakeLists.txt b/google/cloud/migrationcenter/quickstart/CMakeLists.txt index 6c3e26be5d8fb..7ce7231c0d687 100644 --- a/google/cloud/migrationcenter/quickstart/CMakeLists.txt +++ b/google/cloud/migrationcenter/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Migration Center API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-migrationcenter-quickstart CXX) find_package(google_cloud_cpp_migrationcenter REQUIRED) diff --git a/google/cloud/migrationcenter/v1/internal/migration_center_auth_decorator.cc b/google/cloud/migrationcenter/v1/internal/migration_center_auth_decorator.cc index 137565f94659a..e9b0d081d8a3e 100644 --- a/google/cloud/migrationcenter/v1/internal/migration_center_auth_decorator.cc +++ b/google/cloud/migrationcenter/v1/internal/migration_center_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/migrationcenter/v1/migrationcenter.proto #include "google/cloud/migrationcenter/v1/internal/migration_center_auth_decorator.h" -#include +#include "google/cloud/migrationcenter/v1/migrationcenter.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace migrationcenter_v1_internal { @@ -1025,3 +1028,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace migrationcenter_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/migrationcenter/v1/internal/migration_center_auth_decorator.h b/google/cloud/migrationcenter/v1/internal/migration_center_auth_decorator.h index da65393253175..1896604343a68 100644 --- a/google/cloud/migrationcenter/v1/internal/migration_center_auth_decorator.h +++ b/google/cloud/migrationcenter/v1/internal/migration_center_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/migrationcenter/v1/internal/migration_center_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace migrationcenter_v1_internal { @@ -495,4 +498,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MIGRATIONCENTER_V1_INTERNAL_MIGRATION_CENTER_AUTH_DECORATOR_H diff --git a/google/cloud/migrationcenter/v1/internal/migration_center_connection_impl.h b/google/cloud/migrationcenter/v1/internal/migration_center_connection_impl.h index b95a719b5b5a2..158e70e84fc81 100644 --- a/google/cloud/migrationcenter/v1/internal/migration_center_connection_impl.h +++ b/google/cloud/migrationcenter/v1/internal/migration_center_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/migrationcenter/v1/internal/migration_center_logging_decorator.cc b/google/cloud/migrationcenter/v1/internal/migration_center_logging_decorator.cc index 75ae1b230858d..a3622dac42ced 100644 --- a/google/cloud/migrationcenter/v1/internal/migration_center_logging_decorator.cc +++ b/google/cloud/migrationcenter/v1/internal/migration_center_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/migrationcenter/v1/migrationcenter.proto #include "google/cloud/migrationcenter/v1/internal/migration_center_logging_decorator.h" +#include "google/cloud/migrationcenter/v1/migrationcenter.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace migrationcenter_v1_internal { @@ -1236,3 +1239,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace migrationcenter_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/migrationcenter/v1/internal/migration_center_logging_decorator.h b/google/cloud/migrationcenter/v1/internal/migration_center_logging_decorator.h index b51a77d24aa57..ef3841016846b 100644 --- a/google/cloud/migrationcenter/v1/internal/migration_center_logging_decorator.h +++ b/google/cloud/migrationcenter/v1/internal/migration_center_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/migrationcenter/v1/internal/migration_center_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace migrationcenter_v1_internal { @@ -495,4 +498,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MIGRATIONCENTER_V1_INTERNAL_MIGRATION_CENTER_LOGGING_DECORATOR_H diff --git a/google/cloud/migrationcenter/v1/internal/migration_center_metadata_decorator.cc b/google/cloud/migrationcenter/v1/internal/migration_center_metadata_decorator.cc index 370a4ce90d543..9059aa2436926 100644 --- a/google/cloud/migrationcenter/v1/internal/migration_center_metadata_decorator.cc +++ b/google/cloud/migrationcenter/v1/internal/migration_center_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/migrationcenter/v1/migrationcenter.proto #include "google/cloud/migrationcenter/v1/internal/migration_center_metadata_decorator.h" +#include "google/cloud/migrationcenter/v1/migrationcenter.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace migrationcenter_v1_internal { @@ -874,3 +878,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace migrationcenter_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/migrationcenter/v1/internal/migration_center_metadata_decorator.h b/google/cloud/migrationcenter/v1/internal/migration_center_metadata_decorator.h index 34e1eeb088265..bece69edc6bd9 100644 --- a/google/cloud/migrationcenter/v1/internal/migration_center_metadata_decorator.h +++ b/google/cloud/migrationcenter/v1/internal/migration_center_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/migrationcenter/v1/internal/migration_center_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace migrationcenter_v1_internal { @@ -501,4 +504,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MIGRATIONCENTER_V1_INTERNAL_MIGRATION_CENTER_METADATA_DECORATOR_H diff --git a/google/cloud/migrationcenter/v1/internal/migration_center_option_defaults.cc b/google/cloud/migrationcenter/v1/internal/migration_center_option_defaults.cc index 582af7c4d3da4..86f608bb2eb06 100644 --- a/google/cloud/migrationcenter/v1/internal/migration_center_option_defaults.cc +++ b/google/cloud/migrationcenter/v1/internal/migration_center_option_defaults.cc @@ -42,7 +42,7 @@ Options MigrationCenterDefaultOptions(Options options) { if (!options.has()) { options.set( migrationcenter_v1::MigrationCenterLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/migrationcenter/v1/internal/migration_center_stub.cc b/google/cloud/migrationcenter/v1/internal/migration_center_stub.cc index 74a34cd8ae463..5f4fd33d71599 100644 --- a/google/cloud/migrationcenter/v1/internal/migration_center_stub.cc +++ b/google/cloud/migrationcenter/v1/internal/migration_center_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/migrationcenter/v1/migrationcenter.proto #include "google/cloud/migrationcenter/v1/internal/migration_center_stub.h" +#include "google/cloud/migrationcenter/v1/migrationcenter.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace migrationcenter_v1_internal { @@ -1191,3 +1194,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace migrationcenter_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/migrationcenter/v1/internal/migration_center_stub.h b/google/cloud/migrationcenter/v1/internal/migration_center_stub.h index b6ca527489260..678fdf56871cf 100644 --- a/google/cloud/migrationcenter/v1/internal/migration_center_stub.h +++ b/google/cloud/migrationcenter/v1/internal/migration_center_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MIGRATIONCENTER_V1_INTERNAL_MIGRATION_CENTER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MIGRATIONCENTER_V1_INTERNAL_MIGRATION_CENTER_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/migrationcenter/v1/migrationcenter.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace migrationcenter_v1_internal { @@ -976,4 +979,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MIGRATIONCENTER_V1_INTERNAL_MIGRATION_CENTER_STUB_H diff --git a/google/cloud/migrationcenter/v1/internal/migration_center_stub_factory.cc b/google/cloud/migrationcenter/v1/internal/migration_center_stub_factory.cc index 413a3ab5cff32..59bd9141ca3ca 100644 --- a/google/cloud/migrationcenter/v1/internal/migration_center_stub_factory.cc +++ b/google/cloud/migrationcenter/v1/internal/migration_center_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/migrationcenter/v1/migrationcenter.proto #include "google/cloud/migrationcenter/v1/internal/migration_center_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/migrationcenter/v1/internal/migration_center_auth_decorator.h" #include "google/cloud/migrationcenter/v1/internal/migration_center_logging_decorator.h" #include "google/cloud/migrationcenter/v1/internal/migration_center_metadata_decorator.h" #include "google/cloud/migrationcenter/v1/internal/migration_center_stub.h" #include "google/cloud/migrationcenter/v1/internal/migration_center_tracing_stub.h" +#include "google/cloud/migrationcenter/v1/migrationcenter.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace migrationcenter_v1_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace migrationcenter_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/migrationcenter/v1/internal/migration_center_stub_factory.h b/google/cloud/migrationcenter/v1/internal/migration_center_stub_factory.h index 6b7c6b009fc1f..9452547c2dbd3 100644 --- a/google/cloud/migrationcenter/v1/internal/migration_center_stub_factory.h +++ b/google/cloud/migrationcenter/v1/internal/migration_center_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace migrationcenter_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MIGRATIONCENTER_V1_INTERNAL_MIGRATION_CENTER_STUB_FACTORY_H diff --git a/google/cloud/migrationcenter/v1/internal/migration_center_tracing_connection.cc b/google/cloud/migrationcenter/v1/internal/migration_center_tracing_connection.cc index faae7dfc21e82..9b38d22ac52e7 100644 --- a/google/cloud/migrationcenter/v1/internal/migration_center_tracing_connection.cc +++ b/google/cloud/migrationcenter/v1/internal/migration_center_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace migrationcenter_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - MigrationCenterTracingConnection::MigrationCenterTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -1041,16 +1039,12 @@ Status MigrationCenterTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeMigrationCenterTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/migrationcenter/v1/internal/migration_center_tracing_connection.h b/google/cloud/migrationcenter/v1/internal/migration_center_tracing_connection.h index 38abdf782971d..2fa0468d1cf90 100644 --- a/google/cloud/migrationcenter/v1/internal/migration_center_tracing_connection.h +++ b/google/cloud/migrationcenter/v1/internal/migration_center_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace migrationcenter_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class MigrationCenterTracingConnection : public migrationcenter_v1::MigrationCenterConnection { public: @@ -455,8 +453,6 @@ class MigrationCenterTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/migrationcenter/v1/internal/migration_center_tracing_stub.cc b/google/cloud/migrationcenter/v1/internal/migration_center_tracing_stub.cc index 26397676502a6..6c2f6cd1dbf43 100644 --- a/google/cloud/migrationcenter/v1/internal/migration_center_tracing_stub.cc +++ b/google/cloud/migrationcenter/v1/internal/migration_center_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace migrationcenter_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - MigrationCenterTracingStub::MigrationCenterTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -1076,18 +1077,14 @@ future MigrationCenterTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeMigrationCenterTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace migrationcenter_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/migrationcenter/v1/internal/migration_center_tracing_stub.h b/google/cloud/migrationcenter/v1/internal/migration_center_tracing_stub.h index 21822ba25a5b7..19905d8efc122 100644 --- a/google/cloud/migrationcenter/v1/internal/migration_center_tracing_stub.h +++ b/google/cloud/migrationcenter/v1/internal/migration_center_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace migrationcenter_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class MigrationCenterTracingStub : public MigrationCenterStub { public: ~MigrationCenterTracingStub() override = default; @@ -491,8 +492,6 @@ class MigrationCenterTracingStub : public MigrationCenterStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -507,4 +506,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MIGRATIONCENTER_V1_INTERNAL_MIGRATION_CENTER_TRACING_STUB_H diff --git a/google/cloud/migrationcenter/v1/migration_center_client.h b/google/cloud/migrationcenter/v1/migration_center_client.h index 9c1e5d4575321..852b17fe37e46 100644 --- a/google/cloud/migrationcenter/v1/migration_center_client.h +++ b/google/cloud/migrationcenter/v1/migration_center_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/migrationcenter/v1/migration_center_connection.h b/google/cloud/migrationcenter/v1/migration_center_connection.h index c3a72e09354bb..4d2d86707d6bc 100644 --- a/google/cloud/migrationcenter/v1/migration_center_connection.h +++ b/google/cloud/migrationcenter/v1/migration_center_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/migrationcenter/v1/internal/migration_center_retry_traits.h" #include "google/cloud/migrationcenter/v1/migration_center_connection_idempotency_policy.h" +#include "google/cloud/migrationcenter/v1/migrationcenter.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/migrationcenter/v1/migration_center_connection_idempotency_policy.h b/google/cloud/migrationcenter/v1/migration_center_connection_idempotency_policy.h index af1b8725a3875..ee728ca0a2f22 100644 --- a/google/cloud/migrationcenter/v1/migration_center_connection_idempotency_policy.h +++ b/google/cloud/migrationcenter/v1/migration_center_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MIGRATIONCENTER_V1_MIGRATION_CENTER_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MIGRATIONCENTER_V1_MIGRATION_CENTER_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/migrationcenter/v1/migrationcenter.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/monitoring/BUILD.bazel b/google/cloud/monitoring/BUILD.bazel index e6558817758bd..0aa3b290aac76 100644 --- a/google/cloud/monitoring/BUILD.bazel +++ b/google/cloud/monitoring/BUILD.bazel @@ -19,16 +19,15 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "dashboard/v1/", "metricsscope/v1/", "v3/", ] googleapis_deps = [ - "@com_google_googleapis//google/monitoring/dashboard/v1:dashboard_cc_grpc", - "@com_google_googleapis//google/monitoring/metricsscope/v1:metricsscope_cc_grpc", - "@com_google_googleapis//google/monitoring/v3:monitoring_cc_grpc", + "@googleapis//google/monitoring/dashboard/v1:dashboard_cc_grpc", + "@googleapis//google/monitoring/metricsscope/v1:metricsscope_cc_grpc", + "@googleapis//google/monitoring/v3:monitoring_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/monitoring/CMakeLists.txt b/google/cloud/monitoring/CMakeLists.txt index 85f3112f92a85..ad37c05c43c3d 100644 --- a/google/cloud/monitoring/CMakeLists.txt +++ b/google/cloud/monitoring/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library( - monitoring "Cloud Monitoring API" SERVICE_DIRS "__EMPTY__" "dashboard/v1/" + monitoring "Cloud Monitoring API" SERVICE_DIRS "dashboard/v1/" "metricsscope/v1/" "v3/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) diff --git a/google/cloud/monitoring/alert_policy_client.h b/google/cloud/monitoring/alert_policy_client.h deleted file mode 100644 index 5bc4cc7b700f0..0000000000000 --- a/google/cloud/monitoring/alert_policy_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/alert_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_ALERT_POLICY_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_ALERT_POLICY_CLIENT_H - -#include "google/cloud/monitoring/alert_policy_connection.h" -#include "google/cloud/monitoring/v3/alert_policy_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in monitoring_v3 instead of the aliases defined in -/// this namespace. -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use monitoring_v3::AlertPolicyServiceClient directly. -using ::google::cloud::monitoring_v3::AlertPolicyServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_ALERT_POLICY_CLIENT_H diff --git a/google/cloud/monitoring/alert_policy_connection.h b/google/cloud/monitoring/alert_policy_connection.h deleted file mode 100644 index 80bfafd7a945a..0000000000000 --- a/google/cloud/monitoring/alert_policy_connection.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/alert_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_ALERT_POLICY_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_ALERT_POLICY_CONNECTION_H - -#include "google/cloud/monitoring/alert_policy_connection_idempotency_policy.h" -#include "google/cloud/monitoring/v3/alert_policy_connection.h" - -namespace google { -namespace cloud { -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use monitoring_v3::MakeAlertPolicyServiceConnection directly. -using ::google::cloud::monitoring_v3::MakeAlertPolicyServiceConnection; - -/// @deprecated Use monitoring_v3::AlertPolicyServiceConnection directly. -using ::google::cloud::monitoring_v3::AlertPolicyServiceConnection; - -/// @deprecated Use -/// monitoring_v3::AlertPolicyServiceLimitedErrorCountRetryPolicy directly. -using ::google::cloud::monitoring_v3:: - AlertPolicyServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use monitoring_v3::AlertPolicyServiceLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::monitoring_v3::AlertPolicyServiceLimitedTimeRetryPolicy; - -/// @deprecated Use monitoring_v3::AlertPolicyServiceRetryPolicy directly. -using ::google::cloud::monitoring_v3::AlertPolicyServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_ALERT_POLICY_CONNECTION_H diff --git a/google/cloud/monitoring/alert_policy_connection_idempotency_policy.h b/google/cloud/monitoring/alert_policy_connection_idempotency_policy.h deleted file mode 100644 index 988923b2d98d4..0000000000000 --- a/google/cloud/monitoring/alert_policy_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/alert_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_ALERT_POLICY_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_ALERT_POLICY_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/monitoring/v3/alert_policy_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// monitoring_v3::MakeDefaultAlertPolicyServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::monitoring_v3:: - MakeDefaultAlertPolicyServiceConnectionIdempotencyPolicy; - -/// @deprecated Use monitoring_v3::AlertPolicyServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::monitoring_v3:: - AlertPolicyServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_ALERT_POLICY_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/monitoring/alert_policy_options.h b/google/cloud/monitoring/alert_policy_options.h deleted file mode 100644 index 011cb8d43c404..0000000000000 --- a/google/cloud/monitoring/alert_policy_options.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/alert_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_ALERT_POLICY_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_ALERT_POLICY_OPTIONS_H - -#include "google/cloud/monitoring/alert_policy_connection.h" -#include "google/cloud/monitoring/alert_policy_connection_idempotency_policy.h" -#include "google/cloud/monitoring/v3/alert_policy_options.h" - -namespace google { -namespace cloud { -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use monitoring_v3::AlertPolicyServiceBackoffPolicyOption -/// directly. -using ::google::cloud::monitoring_v3::AlertPolicyServiceBackoffPolicyOption; - -/// @deprecated Use -/// monitoring_v3::AlertPolicyServiceConnectionIdempotencyPolicyOption directly. -using ::google::cloud::monitoring_v3:: - AlertPolicyServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use monitoring_v3::AlertPolicyServicePolicyOptionList directly. -using ::google::cloud::monitoring_v3::AlertPolicyServicePolicyOptionList; - -/// @deprecated Use monitoring_v3::AlertPolicyServiceRetryPolicyOption directly. -using ::google::cloud::monitoring_v3::AlertPolicyServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_ALERT_POLICY_OPTIONS_H diff --git a/google/cloud/monitoring/dashboard/v1/dashboards_connection.h b/google/cloud/monitoring/dashboard/v1/dashboards_connection.h index 1ab7a10561569..08e3ab8351d39 100644 --- a/google/cloud/monitoring/dashboard/v1/dashboards_connection.h +++ b/google/cloud/monitoring/dashboard/v1/dashboards_connection.h @@ -27,7 +27,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/monitoring/dashboard/v1/dashboards_service.pb.h" #include namespace google { diff --git a/google/cloud/monitoring/dashboard/v1/dashboards_connection_idempotency_policy.h b/google/cloud/monitoring/dashboard/v1/dashboards_connection_idempotency_policy.h index 236076bab218b..68c8342a60c37 100644 --- a/google/cloud/monitoring/dashboard/v1/dashboards_connection_idempotency_policy.h +++ b/google/cloud/monitoring/dashboard/v1/dashboards_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/monitoring/dashboard/v1/dashboards_service.grpc.pb.h" #include namespace google { diff --git a/google/cloud/monitoring/dashboard/v1/internal/dashboards_auth_decorator.cc b/google/cloud/monitoring/dashboard/v1/internal/dashboards_auth_decorator.cc index 6e8b45107741a..baeb99812dd2e 100644 --- a/google/cloud/monitoring/dashboard/v1/internal/dashboards_auth_decorator.cc +++ b/google/cloud/monitoring/dashboard/v1/internal/dashboards_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/monitoring/dashboard/v1/dashboards_service.proto #include "google/cloud/monitoring/dashboard/v1/internal/dashboards_auth_decorator.h" -#include +#include "google/monitoring/dashboard/v1/dashboards_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_dashboard_v1_internal { @@ -79,3 +82,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_dashboard_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/dashboard/v1/internal/dashboards_auth_decorator.h b/google/cloud/monitoring/dashboard/v1/internal/dashboards_auth_decorator.h index 1aee27316e71d..4eeb38e0a2717 100644 --- a/google/cloud/monitoring/dashboard/v1/internal/dashboards_auth_decorator.h +++ b/google/cloud/monitoring/dashboard/v1/internal/dashboards_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_dashboard_v1_internal { @@ -73,4 +76,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_DASHBOARD_V1_INTERNAL_DASHBOARDS_AUTH_DECORATOR_H diff --git a/google/cloud/monitoring/dashboard/v1/internal/dashboards_logging_decorator.cc b/google/cloud/monitoring/dashboard/v1/internal/dashboards_logging_decorator.cc index b681e3d9586a9..d283d645e2233 100644 --- a/google/cloud/monitoring/dashboard/v1/internal/dashboards_logging_decorator.cc +++ b/google/cloud/monitoring/dashboard/v1/internal/dashboards_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/monitoring/dashboard/v1/internal/dashboards_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/monitoring/dashboard/v1/dashboards_service.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_dashboard_v1_internal { @@ -103,3 +106,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_dashboard_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/dashboard/v1/internal/dashboards_logging_decorator.h b/google/cloud/monitoring/dashboard/v1/internal/dashboards_logging_decorator.h index e22a53aa217cd..4b09fc78a0329 100644 --- a/google/cloud/monitoring/dashboard/v1/internal/dashboards_logging_decorator.h +++ b/google/cloud/monitoring/dashboard/v1/internal/dashboards_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_dashboard_v1_internal { @@ -73,4 +76,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_DASHBOARD_V1_INTERNAL_DASHBOARDS_LOGGING_DECORATOR_H diff --git a/google/cloud/monitoring/dashboard/v1/internal/dashboards_metadata_decorator.cc b/google/cloud/monitoring/dashboard/v1/internal/dashboards_metadata_decorator.cc index 796d3b0b0e2fa..7dab2e180eb8b 100644 --- a/google/cloud/monitoring/dashboard/v1/internal/dashboards_metadata_decorator.cc +++ b/google/cloud/monitoring/dashboard/v1/internal/dashboards_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/monitoring/dashboard/v1/internal/dashboards_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/monitoring/dashboard/v1/dashboards_service.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_dashboard_v1_internal { @@ -106,3 +110,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_dashboard_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/dashboard/v1/internal/dashboards_metadata_decorator.h b/google/cloud/monitoring/dashboard/v1/internal/dashboards_metadata_decorator.h index 2766da0b32e53..a217167786e9f 100644 --- a/google/cloud/monitoring/dashboard/v1/internal/dashboards_metadata_decorator.h +++ b/google/cloud/monitoring/dashboard/v1/internal/dashboards_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_dashboard_v1_internal { @@ -79,4 +82,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_DASHBOARD_V1_INTERNAL_DASHBOARDS_METADATA_DECORATOR_H diff --git a/google/cloud/monitoring/dashboard/v1/internal/dashboards_option_defaults.cc b/google/cloud/monitoring/dashboard/v1/internal/dashboards_option_defaults.cc index cf5689b3297a4..bf5c0ec3f0e3a 100644 --- a/google/cloud/monitoring/dashboard/v1/internal/dashboards_option_defaults.cc +++ b/google/cloud/monitoring/dashboard/v1/internal/dashboards_option_defaults.cc @@ -43,7 +43,7 @@ Options DashboardsServiceDefaultOptions(Options options) { monitoring_dashboard_v1::DashboardsServiceRetryPolicyOption>()) { options.set( monitoring_dashboard_v1::DashboardsServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/monitoring/dashboard/v1/internal/dashboards_stub.cc b/google/cloud/monitoring/dashboard/v1/internal/dashboards_stub.cc index 38b4a457dedf2..93cf45601a933 100644 --- a/google/cloud/monitoring/dashboard/v1/internal/dashboards_stub.cc +++ b/google/cloud/monitoring/dashboard/v1/internal/dashboards_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/monitoring/dashboard/v1/internal/dashboards_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "google/monitoring/dashboard/v1/dashboards_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_dashboard_v1_internal { @@ -93,3 +96,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_dashboard_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/dashboard/v1/internal/dashboards_stub.h b/google/cloud/monitoring/dashboard/v1/internal/dashboards_stub.h index 5f46cbc42e32f..98e88e625bb24 100644 --- a/google/cloud/monitoring/dashboard/v1/internal/dashboards_stub.h +++ b/google/cloud/monitoring/dashboard/v1/internal/dashboards_stub.h @@ -22,10 +22,13 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/monitoring/dashboard/v1/dashboards_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_dashboard_v1_internal { @@ -107,4 +110,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_DASHBOARD_V1_INTERNAL_DASHBOARDS_STUB_H diff --git a/google/cloud/monitoring/dashboard/v1/internal/dashboards_stub_factory.cc b/google/cloud/monitoring/dashboard/v1/internal/dashboards_stub_factory.cc index 86b27275b6470..d681e9afd956b 100644 --- a/google/cloud/monitoring/dashboard/v1/internal/dashboards_stub_factory.cc +++ b/google/cloud/monitoring/dashboard/v1/internal/dashboards_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/monitoring/dashboard/v1/dashboards_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_dashboard_v1_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_dashboard_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/dashboard/v1/internal/dashboards_stub_factory.h b/google/cloud/monitoring/dashboard/v1/internal/dashboards_stub_factory.h index ecdded4064970..5ecd55ea37724 100644 --- a/google/cloud/monitoring/dashboard/v1/internal/dashboards_stub_factory.h +++ b/google/cloud/monitoring/dashboard/v1/internal/dashboards_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_dashboard_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_DASHBOARD_V1_INTERNAL_DASHBOARDS_STUB_FACTORY_H diff --git a/google/cloud/monitoring/dashboard/v1/internal/dashboards_tracing_connection.cc b/google/cloud/monitoring/dashboard/v1/internal/dashboards_tracing_connection.cc index 88854b32f8317..d7beb23d767a9 100644 --- a/google/cloud/monitoring/dashboard/v1/internal/dashboards_tracing_connection.cc +++ b/google/cloud/monitoring/dashboard/v1/internal/dashboards_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace monitoring_dashboard_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DashboardsServiceTracingConnection::DashboardsServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -80,18 +78,14 @@ DashboardsServiceTracingConnection::UpdateDashboard( return internal::EndSpan(*span, child_->UpdateDashboard(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDashboardsServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/monitoring/dashboard/v1/internal/dashboards_tracing_connection.h b/google/cloud/monitoring/dashboard/v1/internal/dashboards_tracing_connection.h index 37b4642a5c5ca..ddd9a7a7532c9 100644 --- a/google/cloud/monitoring/dashboard/v1/internal/dashboards_tracing_connection.h +++ b/google/cloud/monitoring/dashboard/v1/internal/dashboards_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace monitoring_dashboard_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DashboardsServiceTracingConnection : public monitoring_dashboard_v1::DashboardsServiceConnection { public: @@ -65,8 +63,6 @@ class DashboardsServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/monitoring/dashboard/v1/internal/dashboards_tracing_stub.cc b/google/cloud/monitoring/dashboard/v1/internal/dashboards_tracing_stub.cc index f4eb644e592ea..99588bcd6a1b4 100644 --- a/google/cloud/monitoring/dashboard/v1/internal/dashboards_tracing_stub.cc +++ b/google/cloud/monitoring/dashboard/v1/internal/dashboards_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_dashboard_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DashboardsServiceTracingStub::DashboardsServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -91,18 +92,14 @@ DashboardsServiceTracingStub::UpdateDashboard( child_->UpdateDashboard(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDashboardsServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_dashboard_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/dashboard/v1/internal/dashboards_tracing_stub.h b/google/cloud/monitoring/dashboard/v1/internal/dashboards_tracing_stub.h index b1c1691a71a68..f2c4c2238d9b6 100644 --- a/google/cloud/monitoring/dashboard/v1/internal/dashboards_tracing_stub.h +++ b/google/cloud/monitoring/dashboard/v1/internal/dashboards_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_dashboard_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DashboardsServiceTracingStub : public DashboardsServiceStub { public: ~DashboardsServiceTracingStub() override = default; @@ -70,8 +71,6 @@ class DashboardsServiceTracingStub : public DashboardsServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -86,4 +85,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_DASHBOARD_V1_INTERNAL_DASHBOARDS_TRACING_STUB_H diff --git a/google/cloud/monitoring/dashboards_client.h b/google/cloud/monitoring/dashboards_client.h deleted file mode 100644 index c79d27a3c36b3..0000000000000 --- a/google/cloud/monitoring/dashboards_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/dashboard/v1/dashboards_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_DASHBOARDS_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_DASHBOARDS_CLIENT_H - -#include "google/cloud/monitoring/dashboard/v1/dashboards_client.h" -#include "google/cloud/monitoring/dashboards_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in monitoring_dashboard_v1 instead of the aliases defined -/// in this namespace. -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use monitoring_dashboard_v1::DashboardsServiceClient directly. -using ::google::cloud::monitoring_dashboard_v1::DashboardsServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_DASHBOARDS_CLIENT_H diff --git a/google/cloud/monitoring/dashboards_connection.h b/google/cloud/monitoring/dashboards_connection.h deleted file mode 100644 index 10a03bc195942..0000000000000 --- a/google/cloud/monitoring/dashboards_connection.h +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/dashboard/v1/dashboards_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_DASHBOARDS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_DASHBOARDS_CONNECTION_H - -#include "google/cloud/monitoring/dashboard/v1/dashboards_connection.h" -#include "google/cloud/monitoring/dashboards_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use monitoring_dashboard_v1::MakeDashboardsServiceConnection -/// directly. -using ::google::cloud::monitoring_dashboard_v1::MakeDashboardsServiceConnection; - -/// @deprecated Use monitoring_dashboard_v1::DashboardsServiceConnection -/// directly. -using ::google::cloud::monitoring_dashboard_v1::DashboardsServiceConnection; - -/// @deprecated Use -/// monitoring_dashboard_v1::DashboardsServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::monitoring_dashboard_v1:: - DashboardsServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use -/// monitoring_dashboard_v1::DashboardsServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::monitoring_dashboard_v1:: - DashboardsServiceLimitedTimeRetryPolicy; - -/// @deprecated Use monitoring_dashboard_v1::DashboardsServiceRetryPolicy -/// directly. -using ::google::cloud::monitoring_dashboard_v1::DashboardsServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_DASHBOARDS_CONNECTION_H diff --git a/google/cloud/monitoring/dashboards_connection_idempotency_policy.h b/google/cloud/monitoring/dashboards_connection_idempotency_policy.h deleted file mode 100644 index d7db9219e013e..0000000000000 --- a/google/cloud/monitoring/dashboards_connection_idempotency_policy.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/dashboard/v1/dashboards_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_DASHBOARDS_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_DASHBOARDS_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/monitoring/dashboard/v1/dashboards_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// monitoring_dashboard_v1::MakeDefaultDashboardsServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::monitoring_dashboard_v1:: - MakeDefaultDashboardsServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// monitoring_dashboard_v1::DashboardsServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::monitoring_dashboard_v1:: - DashboardsServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_DASHBOARDS_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/monitoring/dashboards_options.h b/google/cloud/monitoring/dashboards_options.h deleted file mode 100644 index d47f5a9ff89e8..0000000000000 --- a/google/cloud/monitoring/dashboards_options.h +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/dashboard/v1/dashboards_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_DASHBOARDS_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_DASHBOARDS_OPTIONS_H - -#include "google/cloud/monitoring/dashboard/v1/dashboards_options.h" -#include "google/cloud/monitoring/dashboards_connection.h" -#include "google/cloud/monitoring/dashboards_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// monitoring_dashboard_v1::DashboardsServiceBackoffPolicyOption directly. -using ::google::cloud::monitoring_dashboard_v1:: - DashboardsServiceBackoffPolicyOption; - -/// @deprecated Use -/// monitoring_dashboard_v1::DashboardsServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::monitoring_dashboard_v1:: - DashboardsServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use monitoring_dashboard_v1::DashboardsServicePolicyOptionList -/// directly. -using ::google::cloud::monitoring_dashboard_v1:: - DashboardsServicePolicyOptionList; - -/// @deprecated Use monitoring_dashboard_v1::DashboardsServiceRetryPolicyOption -/// directly. -using ::google::cloud::monitoring_dashboard_v1:: - DashboardsServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_DASHBOARDS_OPTIONS_H diff --git a/google/cloud/monitoring/group_client.h b/google/cloud/monitoring/group_client.h deleted file mode 100644 index b9e326b868dfa..0000000000000 --- a/google/cloud/monitoring/group_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/group_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_GROUP_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_GROUP_CLIENT_H - -#include "google/cloud/monitoring/group_connection.h" -#include "google/cloud/monitoring/v3/group_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in monitoring_v3 instead of the aliases defined in -/// this namespace. -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use monitoring_v3::GroupServiceClient directly. -using ::google::cloud::monitoring_v3::GroupServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_GROUP_CLIENT_H diff --git a/google/cloud/monitoring/group_connection.h b/google/cloud/monitoring/group_connection.h deleted file mode 100644 index 0745db4e7668b..0000000000000 --- a/google/cloud/monitoring/group_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/group_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_GROUP_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_GROUP_CONNECTION_H - -#include "google/cloud/monitoring/group_connection_idempotency_policy.h" -#include "google/cloud/monitoring/v3/group_connection.h" - -namespace google { -namespace cloud { -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use monitoring_v3::MakeGroupServiceConnection directly. -using ::google::cloud::monitoring_v3::MakeGroupServiceConnection; - -/// @deprecated Use monitoring_v3::GroupServiceConnection directly. -using ::google::cloud::monitoring_v3::GroupServiceConnection; - -/// @deprecated Use monitoring_v3::GroupServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::monitoring_v3::GroupServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use monitoring_v3::GroupServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::monitoring_v3::GroupServiceLimitedTimeRetryPolicy; - -/// @deprecated Use monitoring_v3::GroupServiceRetryPolicy directly. -using ::google::cloud::monitoring_v3::GroupServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_GROUP_CONNECTION_H diff --git a/google/cloud/monitoring/group_connection_idempotency_policy.h b/google/cloud/monitoring/group_connection_idempotency_policy.h deleted file mode 100644 index 1c200addfa27c..0000000000000 --- a/google/cloud/monitoring/group_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/group_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_GROUP_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_GROUP_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/monitoring/v3/group_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// monitoring_v3::MakeDefaultGroupServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::monitoring_v3:: - MakeDefaultGroupServiceConnectionIdempotencyPolicy; - -/// @deprecated Use monitoring_v3::GroupServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::monitoring_v3::GroupServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_GROUP_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/monitoring/group_options.h b/google/cloud/monitoring/group_options.h deleted file mode 100644 index 01c2543d8a0d4..0000000000000 --- a/google/cloud/monitoring/group_options.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/group_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_GROUP_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_GROUP_OPTIONS_H - -#include "google/cloud/monitoring/group_connection.h" -#include "google/cloud/monitoring/group_connection_idempotency_policy.h" -#include "google/cloud/monitoring/v3/group_options.h" - -namespace google { -namespace cloud { -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use monitoring_v3::GroupServiceBackoffPolicyOption directly. -using ::google::cloud::monitoring_v3::GroupServiceBackoffPolicyOption; - -/// @deprecated Use monitoring_v3::GroupServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::monitoring_v3:: - GroupServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use monitoring_v3::GroupServicePolicyOptionList directly. -using ::google::cloud::monitoring_v3::GroupServicePolicyOptionList; - -/// @deprecated Use monitoring_v3::GroupServiceRetryPolicyOption directly. -using ::google::cloud::monitoring_v3::GroupServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_GROUP_OPTIONS_H diff --git a/google/cloud/monitoring/metric_client.h b/google/cloud/monitoring/metric_client.h deleted file mode 100644 index 4217c27f0d372..0000000000000 --- a/google/cloud/monitoring/metric_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/metric_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_METRIC_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_METRIC_CLIENT_H - -#include "google/cloud/monitoring/metric_connection.h" -#include "google/cloud/monitoring/v3/metric_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in monitoring_v3 instead of the aliases defined in -/// this namespace. -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use monitoring_v3::MetricServiceClient directly. -using ::google::cloud::monitoring_v3::MetricServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_METRIC_CLIENT_H diff --git a/google/cloud/monitoring/metric_connection.h b/google/cloud/monitoring/metric_connection.h deleted file mode 100644 index 09afb1905be9a..0000000000000 --- a/google/cloud/monitoring/metric_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/metric_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_METRIC_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_METRIC_CONNECTION_H - -#include "google/cloud/monitoring/metric_connection_idempotency_policy.h" -#include "google/cloud/monitoring/v3/metric_connection.h" - -namespace google { -namespace cloud { -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use monitoring_v3::MakeMetricServiceConnection directly. -using ::google::cloud::monitoring_v3::MakeMetricServiceConnection; - -/// @deprecated Use monitoring_v3::MetricServiceConnection directly. -using ::google::cloud::monitoring_v3::MetricServiceConnection; - -/// @deprecated Use monitoring_v3::MetricServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::monitoring_v3::MetricServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use monitoring_v3::MetricServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::monitoring_v3::MetricServiceLimitedTimeRetryPolicy; - -/// @deprecated Use monitoring_v3::MetricServiceRetryPolicy directly. -using ::google::cloud::monitoring_v3::MetricServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_METRIC_CONNECTION_H diff --git a/google/cloud/monitoring/metric_connection_idempotency_policy.h b/google/cloud/monitoring/metric_connection_idempotency_policy.h deleted file mode 100644 index 9c8d6664ad981..0000000000000 --- a/google/cloud/monitoring/metric_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/metric_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_METRIC_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_METRIC_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/monitoring/v3/metric_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// monitoring_v3::MakeDefaultMetricServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::monitoring_v3:: - MakeDefaultMetricServiceConnectionIdempotencyPolicy; - -/// @deprecated Use monitoring_v3::MetricServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::monitoring_v3::MetricServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_METRIC_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/monitoring/metric_options.h b/google/cloud/monitoring/metric_options.h deleted file mode 100644 index 8931e36cf17d8..0000000000000 --- a/google/cloud/monitoring/metric_options.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/metric_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_METRIC_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_METRIC_OPTIONS_H - -#include "google/cloud/monitoring/metric_connection.h" -#include "google/cloud/monitoring/metric_connection_idempotency_policy.h" -#include "google/cloud/monitoring/v3/metric_options.h" - -namespace google { -namespace cloud { -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use monitoring_v3::MetricServiceBackoffPolicyOption directly. -using ::google::cloud::monitoring_v3::MetricServiceBackoffPolicyOption; - -/// @deprecated Use -/// monitoring_v3::MetricServiceConnectionIdempotencyPolicyOption directly. -using ::google::cloud::monitoring_v3:: - MetricServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use monitoring_v3::MetricServicePolicyOptionList directly. -using ::google::cloud::monitoring_v3::MetricServicePolicyOptionList; - -/// @deprecated Use monitoring_v3::MetricServiceRetryPolicyOption directly. -using ::google::cloud::monitoring_v3::MetricServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_METRIC_OPTIONS_H diff --git a/google/cloud/monitoring/metrics_scopes_client.h b/google/cloud/monitoring/metrics_scopes_client.h deleted file mode 100644 index 06bb7e1890b00..0000000000000 --- a/google/cloud/monitoring/metrics_scopes_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/metricsscope/v1/metrics_scopes.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_METRICS_SCOPES_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_METRICS_SCOPES_CLIENT_H - -#include "google/cloud/monitoring/metrics_scopes_connection.h" -#include "google/cloud/monitoring/metricsscope/v1/metrics_scopes_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in monitoring_metricsscope_v1 instead of the aliases -/// defined in this namespace. -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use monitoring_metricsscope_v1::MetricsScopesClient directly. -using ::google::cloud::monitoring_metricsscope_v1::MetricsScopesClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_METRICS_SCOPES_CLIENT_H diff --git a/google/cloud/monitoring/metrics_scopes_connection.h b/google/cloud/monitoring/metrics_scopes_connection.h deleted file mode 100644 index 59c4aa67c17b8..0000000000000 --- a/google/cloud/monitoring/metrics_scopes_connection.h +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/metricsscope/v1/metrics_scopes.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_METRICS_SCOPES_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_METRICS_SCOPES_CONNECTION_H - -#include "google/cloud/monitoring/metrics_scopes_connection_idempotency_policy.h" -#include "google/cloud/monitoring/metricsscope/v1/metrics_scopes_connection.h" - -namespace google { -namespace cloud { -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use monitoring_metricsscope_v1::MakeMetricsScopesConnection -/// directly. -using ::google::cloud::monitoring_metricsscope_v1::MakeMetricsScopesConnection; - -/// @deprecated Use monitoring_metricsscope_v1::MetricsScopesConnection -/// directly. -using ::google::cloud::monitoring_metricsscope_v1::MetricsScopesConnection; - -/// @deprecated Use -/// monitoring_metricsscope_v1::MetricsScopesLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::monitoring_metricsscope_v1:: - MetricsScopesLimitedErrorCountRetryPolicy; - -/// @deprecated Use -/// monitoring_metricsscope_v1::MetricsScopesLimitedTimeRetryPolicy directly. -using ::google::cloud::monitoring_metricsscope_v1:: - MetricsScopesLimitedTimeRetryPolicy; - -/// @deprecated Use monitoring_metricsscope_v1::MetricsScopesRetryPolicy -/// directly. -using ::google::cloud::monitoring_metricsscope_v1::MetricsScopesRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_METRICS_SCOPES_CONNECTION_H diff --git a/google/cloud/monitoring/metrics_scopes_connection_idempotency_policy.h b/google/cloud/monitoring/metrics_scopes_connection_idempotency_policy.h deleted file mode 100644 index 6dc2c5954b5c9..0000000000000 --- a/google/cloud/monitoring/metrics_scopes_connection_idempotency_policy.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/metricsscope/v1/metrics_scopes.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_METRICS_SCOPES_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_METRICS_SCOPES_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/monitoring/metricsscope/v1/metrics_scopes_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// monitoring_metricsscope_v1::MakeDefaultMetricsScopesConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::monitoring_metricsscope_v1:: - MakeDefaultMetricsScopesConnectionIdempotencyPolicy; - -/// @deprecated Use -/// monitoring_metricsscope_v1::MetricsScopesConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::monitoring_metricsscope_v1:: - MetricsScopesConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_METRICS_SCOPES_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/monitoring/metrics_scopes_options.h b/google/cloud/monitoring/metrics_scopes_options.h deleted file mode 100644 index 07936ae6e59cb..0000000000000 --- a/google/cloud/monitoring/metrics_scopes_options.h +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/metricsscope/v1/metrics_scopes.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_METRICS_SCOPES_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_METRICS_SCOPES_OPTIONS_H - -#include "google/cloud/monitoring/metrics_scopes_connection.h" -#include "google/cloud/monitoring/metrics_scopes_connection_idempotency_policy.h" -#include "google/cloud/monitoring/metricsscope/v1/metrics_scopes_options.h" - -namespace google { -namespace cloud { -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use monitoring_metricsscope_v1::MetricsScopesPollingPolicyOption -/// directly. -using ::google::cloud::monitoring_metricsscope_v1:: - MetricsScopesPollingPolicyOption; - -/// @deprecated Use monitoring_metricsscope_v1::MetricsScopesBackoffPolicyOption -/// directly. -using ::google::cloud::monitoring_metricsscope_v1:: - MetricsScopesBackoffPolicyOption; - -/// @deprecated Use -/// monitoring_metricsscope_v1::MetricsScopesConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::monitoring_metricsscope_v1:: - MetricsScopesConnectionIdempotencyPolicyOption; - -/// @deprecated Use monitoring_metricsscope_v1::MetricsScopesPolicyOptionList -/// directly. -using ::google::cloud::monitoring_metricsscope_v1:: - MetricsScopesPolicyOptionList; - -/// @deprecated Use monitoring_metricsscope_v1::MetricsScopesRetryPolicyOption -/// directly. -using ::google::cloud::monitoring_metricsscope_v1:: - MetricsScopesRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_METRICS_SCOPES_OPTIONS_H diff --git a/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_auth_decorator.cc b/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_auth_decorator.cc index 58efda0fc5df8..46bdb9e5aba38 100644 --- a/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_auth_decorator.cc +++ b/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/monitoring/metricsscope/v1/metrics_scopes.proto #include "google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_auth_decorator.h" -#include +#include "google/monitoring/metricsscope/v1/metrics_scopes.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_metricsscope_v1_internal { @@ -154,3 +157,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_metricsscope_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_auth_decorator.h b/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_auth_decorator.h index c56398d7eff01..be14fd1339de1 100644 --- a/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_auth_decorator.h +++ b/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_metricsscope_v1_internal { @@ -97,4 +100,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_METRICSSCOPE_V1_INTERNAL_METRICS_SCOPES_AUTH_DECORATOR_H diff --git a/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_connection_impl.h b/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_connection_impl.h index 5dd3278b9bd15..8a4cbc0faeab2 100644 --- a/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_connection_impl.h +++ b/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_connection_impl.h @@ -31,7 +31,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_logging_decorator.cc b/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_logging_decorator.cc index 46d52d2d0700e..65faa919c99d2 100644 --- a/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_logging_decorator.cc +++ b/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/monitoring/metricsscope/v1/metrics_scopes.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_metricsscope_v1_internal { @@ -172,3 +175,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_metricsscope_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_logging_decorator.h b/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_logging_decorator.h index 50804394f6e19..d12af5b0c12e8 100644 --- a/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_logging_decorator.h +++ b/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_metricsscope_v1_internal { @@ -97,4 +100,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_METRICSSCOPE_V1_INTERNAL_METRICS_SCOPES_LOGGING_DECORATOR_H diff --git a/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_metadata_decorator.cc b/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_metadata_decorator.cc index adbae1e40720a..e358bcfa8a6ab 100644 --- a/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_metadata_decorator.cc +++ b/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/monitoring/metricsscope/v1/metrics_scopes.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_metricsscope_v1_internal { @@ -150,3 +154,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_metricsscope_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_metadata_decorator.h b/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_metadata_decorator.h index 1d0508a18ecdc..6255ff79f6347 100644 --- a/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_metadata_decorator.h +++ b/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_metricsscope_v1_internal { @@ -102,4 +105,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_METRICSSCOPE_V1_INTERNAL_METRICS_SCOPES_METADATA_DECORATOR_H diff --git a/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_option_defaults.cc b/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_option_defaults.cc index b1f2d7829e743..893b7e0bc203a 100644 --- a/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_option_defaults.cc +++ b/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_option_defaults.cc @@ -42,7 +42,7 @@ Options MetricsScopesDefaultOptions(Options options) { .has()) { options.set( monitoring_metricsscope_v1::MetricsScopesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_stub.cc b/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_stub.cc index d9a6ec489bd0b..e981721b1919d 100644 --- a/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_stub.cc +++ b/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_stub.cc @@ -19,11 +19,14 @@ #include "google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/monitoring/metricsscope/v1/metrics_scopes.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_metricsscope_v1_internal { @@ -171,3 +174,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_metricsscope_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_stub.h b/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_stub.h index a13f45f01d62f..e823692dd1c4d 100644 --- a/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_stub.h +++ b/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_stub.h @@ -24,11 +24,14 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/monitoring/metricsscope/v1/metrics_scopes.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_metricsscope_v1_internal { @@ -162,4 +165,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_METRICSSCOPE_V1_INTERNAL_METRICS_SCOPES_STUB_H diff --git a/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_stub_factory.cc b/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_stub_factory.cc index abe17046f95a3..5dd540fd20393 100644 --- a/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_stub_factory.cc +++ b/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/monitoring/metricsscope/v1/metrics_scopes.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_metricsscope_v1_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_metricsscope_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_stub_factory.h b/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_stub_factory.h index 9c799edddec0a..f997dd6850225 100644 --- a/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_stub_factory.h +++ b/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_metricsscope_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_METRICSSCOPE_V1_INTERNAL_METRICS_SCOPES_STUB_FACTORY_H diff --git a/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_tracing_connection.cc b/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_tracing_connection.cc index c9db4d3cbbb9b..120cf578ba0b4 100644 --- a/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_tracing_connection.cc +++ b/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace monitoring_metricsscope_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - MetricsScopesTracingConnection::MetricsScopesTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -127,16 +125,12 @@ MetricsScopesTracingConnection::DeleteMonitoredProject( child_->DeleteMonitoredProject(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeMetricsScopesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_tracing_connection.h b/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_tracing_connection.h index aa67eec6ae105..3f8def50f4cba 100644 --- a/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_tracing_connection.h +++ b/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace monitoring_metricsscope_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class MetricsScopesTracingConnection : public monitoring_metricsscope_v1::MetricsScopesConnection { public: @@ -83,8 +81,6 @@ class MetricsScopesTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_tracing_stub.cc b/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_tracing_stub.cc index 16cd4237cdd8a..647e520aaea71 100644 --- a/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_tracing_stub.cc +++ b/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_metricsscope_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - MetricsScopesTracingStub::MetricsScopesTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -153,18 +154,14 @@ future MetricsScopesTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeMetricsScopesTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_metricsscope_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_tracing_stub.h b/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_tracing_stub.h index af5f0eab4fe6d..781db3e2c2f90 100644 --- a/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_tracing_stub.h +++ b/google/cloud/monitoring/metricsscope/v1/internal/metrics_scopes_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_metricsscope_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class MetricsScopesTracingStub : public MetricsScopesStub { public: ~MetricsScopesTracingStub() override = default; @@ -92,8 +93,6 @@ class MetricsScopesTracingStub : public MetricsScopesStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -108,4 +107,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_METRICSSCOPE_V1_INTERNAL_METRICS_SCOPES_TRACING_STUB_H diff --git a/google/cloud/monitoring/metricsscope/v1/metrics_scopes_client.h b/google/cloud/monitoring/metricsscope/v1/metrics_scopes_client.h index b52ddad0890b1..c2c688e2ca933 100644 --- a/google/cloud/monitoring/metricsscope/v1/metrics_scopes_client.h +++ b/google/cloud/monitoring/metricsscope/v1/metrics_scopes_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/monitoring/metricsscope/v1/metrics_scopes_connection.h b/google/cloud/monitoring/metricsscope/v1/metrics_scopes_connection.h index a15d5a5921570..ea1a97db4c9ac 100644 --- a/google/cloud/monitoring/metricsscope/v1/metrics_scopes_connection.h +++ b/google/cloud/monitoring/metricsscope/v1/metrics_scopes_connection.h @@ -29,8 +29,8 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/monitoring/metricsscope/v1/metrics_scopes.pb.h" #include namespace google { diff --git a/google/cloud/monitoring/metricsscope/v1/metrics_scopes_connection_idempotency_policy.h b/google/cloud/monitoring/metricsscope/v1/metrics_scopes_connection_idempotency_policy.h index af83e3ed2b977..8e91748771b50 100644 --- a/google/cloud/monitoring/metricsscope/v1/metrics_scopes_connection_idempotency_policy.h +++ b/google/cloud/monitoring/metricsscope/v1/metrics_scopes_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/monitoring/metricsscope/v1/metrics_scopes.grpc.pb.h" #include namespace google { diff --git a/google/cloud/monitoring/mocks/mock_alert_policy_connection.h b/google/cloud/monitoring/mocks/mock_alert_policy_connection.h deleted file mode 100644 index a12a35ca1844e..0000000000000 --- a/google/cloud/monitoring/mocks/mock_alert_policy_connection.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/alert_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_MOCKS_MOCK_ALERT_POLICY_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_MOCKS_MOCK_ALERT_POLICY_CONNECTION_H - -#include "google/cloud/monitoring/alert_policy_connection.h" -#include "google/cloud/monitoring/v3/mocks/mock_alert_policy_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in monitoring_v3_mocks instead of the aliases -/// defined in this namespace. -namespace monitoring_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use monitoring_v3_mocks::MockAlertPolicyServiceConnection -/// directly. -using ::google::cloud::monitoring_v3_mocks::MockAlertPolicyServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_MOCKS_MOCK_ALERT_POLICY_CONNECTION_H diff --git a/google/cloud/monitoring/mocks/mock_dashboards_connection.h b/google/cloud/monitoring/mocks/mock_dashboards_connection.h deleted file mode 100644 index f189034518b4d..0000000000000 --- a/google/cloud/monitoring/mocks/mock_dashboards_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/dashboard/v1/dashboards_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_MOCKS_MOCK_DASHBOARDS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_MOCKS_MOCK_DASHBOARDS_CONNECTION_H - -#include "google/cloud/monitoring/dashboard/v1/mocks/mock_dashboards_connection.h" -#include "google/cloud/monitoring/dashboards_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in monitoring_dashboard_v1_mocks instead of the aliases -/// defined in this namespace. -namespace monitoring_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// monitoring_dashboard_v1_mocks::MockDashboardsServiceConnection directly. -using ::google::cloud::monitoring_dashboard_v1_mocks:: - MockDashboardsServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_MOCKS_MOCK_DASHBOARDS_CONNECTION_H diff --git a/google/cloud/monitoring/mocks/mock_group_connection.h b/google/cloud/monitoring/mocks/mock_group_connection.h deleted file mode 100644 index 70095b1974f81..0000000000000 --- a/google/cloud/monitoring/mocks/mock_group_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/group_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_MOCKS_MOCK_GROUP_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_MOCKS_MOCK_GROUP_CONNECTION_H - -#include "google/cloud/monitoring/group_connection.h" -#include "google/cloud/monitoring/v3/mocks/mock_group_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in monitoring_v3_mocks instead of the aliases -/// defined in this namespace. -namespace monitoring_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use monitoring_v3_mocks::MockGroupServiceConnection directly. -using ::google::cloud::monitoring_v3_mocks::MockGroupServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_MOCKS_MOCK_GROUP_CONNECTION_H diff --git a/google/cloud/monitoring/mocks/mock_metric_connection.h b/google/cloud/monitoring/mocks/mock_metric_connection.h deleted file mode 100644 index ea9d87ab549e1..0000000000000 --- a/google/cloud/monitoring/mocks/mock_metric_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/metric_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_MOCKS_MOCK_METRIC_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_MOCKS_MOCK_METRIC_CONNECTION_H - -#include "google/cloud/monitoring/metric_connection.h" -#include "google/cloud/monitoring/v3/mocks/mock_metric_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in monitoring_v3_mocks instead of the aliases -/// defined in this namespace. -namespace monitoring_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use monitoring_v3_mocks::MockMetricServiceConnection directly. -using ::google::cloud::monitoring_v3_mocks::MockMetricServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_MOCKS_MOCK_METRIC_CONNECTION_H diff --git a/google/cloud/monitoring/mocks/mock_metrics_scopes_connection.h b/google/cloud/monitoring/mocks/mock_metrics_scopes_connection.h deleted file mode 100644 index 9bd7bf4120393..0000000000000 --- a/google/cloud/monitoring/mocks/mock_metrics_scopes_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/metricsscope/v1/metrics_scopes.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_MOCKS_MOCK_METRICS_SCOPES_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_MOCKS_MOCK_METRICS_SCOPES_CONNECTION_H - -#include "google/cloud/monitoring/metrics_scopes_connection.h" -#include "google/cloud/monitoring/metricsscope/v1/mocks/mock_metrics_scopes_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in monitoring_metricsscope_v1_mocks instead of the aliases -/// defined in this namespace. -namespace monitoring_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// monitoring_metricsscope_v1_mocks::MockMetricsScopesConnection directly. -using ::google::cloud::monitoring_metricsscope_v1_mocks:: - MockMetricsScopesConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_MOCKS_MOCK_METRICS_SCOPES_CONNECTION_H diff --git a/google/cloud/monitoring/mocks/mock_notification_channel_connection.h b/google/cloud/monitoring/mocks/mock_notification_channel_connection.h deleted file mode 100644 index 0e89780c9f939..0000000000000 --- a/google/cloud/monitoring/mocks/mock_notification_channel_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/notification_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_MOCKS_MOCK_NOTIFICATION_CHANNEL_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_MOCKS_MOCK_NOTIFICATION_CHANNEL_CONNECTION_H - -#include "google/cloud/monitoring/notification_channel_connection.h" -#include "google/cloud/monitoring/v3/mocks/mock_notification_channel_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in monitoring_v3_mocks instead of the aliases -/// defined in this namespace. -namespace monitoring_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// monitoring_v3_mocks::MockNotificationChannelServiceConnection directly. -using ::google::cloud::monitoring_v3_mocks:: - MockNotificationChannelServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_MOCKS_MOCK_NOTIFICATION_CHANNEL_CONNECTION_H diff --git a/google/cloud/monitoring/mocks/mock_query_connection.h b/google/cloud/monitoring/mocks/mock_query_connection.h deleted file mode 100644 index 55d353fa95d1f..0000000000000 --- a/google/cloud/monitoring/mocks/mock_query_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/query_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_MOCKS_MOCK_QUERY_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_MOCKS_MOCK_QUERY_CONNECTION_H - -#include "google/cloud/monitoring/query_connection.h" -#include "google/cloud/monitoring/v3/mocks/mock_query_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in monitoring_v3_mocks instead of the aliases -/// defined in this namespace. -namespace monitoring_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use monitoring_v3_mocks::MockQueryServiceConnection directly. -using ::google::cloud::monitoring_v3_mocks::MockQueryServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_MOCKS_MOCK_QUERY_CONNECTION_H diff --git a/google/cloud/monitoring/mocks/mock_service_monitoring_connection.h b/google/cloud/monitoring/mocks/mock_service_monitoring_connection.h deleted file mode 100644 index 3bb25eb55321b..0000000000000 --- a/google/cloud/monitoring/mocks/mock_service_monitoring_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/service_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_MOCKS_MOCK_SERVICE_MONITORING_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_MOCKS_MOCK_SERVICE_MONITORING_CONNECTION_H - -#include "google/cloud/monitoring/service_monitoring_connection.h" -#include "google/cloud/monitoring/v3/mocks/mock_service_monitoring_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in monitoring_v3_mocks instead of the aliases -/// defined in this namespace. -namespace monitoring_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use monitoring_v3_mocks::MockServiceMonitoringServiceConnection -/// directly. -using ::google::cloud::monitoring_v3_mocks:: - MockServiceMonitoringServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_MOCKS_MOCK_SERVICE_MONITORING_CONNECTION_H diff --git a/google/cloud/monitoring/mocks/mock_uptime_check_connection.h b/google/cloud/monitoring/mocks/mock_uptime_check_connection.h deleted file mode 100644 index bacad030a968a..0000000000000 --- a/google/cloud/monitoring/mocks/mock_uptime_check_connection.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/uptime_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_MOCKS_MOCK_UPTIME_CHECK_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_MOCKS_MOCK_UPTIME_CHECK_CONNECTION_H - -#include "google/cloud/monitoring/uptime_check_connection.h" -#include "google/cloud/monitoring/v3/mocks/mock_uptime_check_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in monitoring_v3_mocks instead of the aliases -/// defined in this namespace. -namespace monitoring_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use monitoring_v3_mocks::MockUptimeCheckServiceConnection -/// directly. -using ::google::cloud::monitoring_v3_mocks::MockUptimeCheckServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_MOCKS_MOCK_UPTIME_CHECK_CONNECTION_H diff --git a/google/cloud/monitoring/notification_channel_client.h b/google/cloud/monitoring/notification_channel_client.h deleted file mode 100644 index 10bb972cf9748..0000000000000 --- a/google/cloud/monitoring/notification_channel_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/notification_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_NOTIFICATION_CHANNEL_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_NOTIFICATION_CHANNEL_CLIENT_H - -#include "google/cloud/monitoring/notification_channel_connection.h" -#include "google/cloud/monitoring/v3/notification_channel_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in monitoring_v3 instead of the aliases defined in -/// this namespace. -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use monitoring_v3::NotificationChannelServiceClient directly. -using ::google::cloud::monitoring_v3::NotificationChannelServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_NOTIFICATION_CHANNEL_CLIENT_H diff --git a/google/cloud/monitoring/notification_channel_connection.h b/google/cloud/monitoring/notification_channel_connection.h deleted file mode 100644 index 7342a37707a0e..0000000000000 --- a/google/cloud/monitoring/notification_channel_connection.h +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/notification_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_NOTIFICATION_CHANNEL_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_NOTIFICATION_CHANNEL_CONNECTION_H - -#include "google/cloud/monitoring/notification_channel_connection_idempotency_policy.h" -#include "google/cloud/monitoring/v3/notification_channel_connection.h" - -namespace google { -namespace cloud { -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use monitoring_v3::MakeNotificationChannelServiceConnection -/// directly. -using ::google::cloud::monitoring_v3::MakeNotificationChannelServiceConnection; - -/// @deprecated Use monitoring_v3::NotificationChannelServiceConnection -/// directly. -using ::google::cloud::monitoring_v3::NotificationChannelServiceConnection; - -/// @deprecated Use -/// monitoring_v3::NotificationChannelServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::monitoring_v3:: - NotificationChannelServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use -/// monitoring_v3::NotificationChannelServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::monitoring_v3:: - NotificationChannelServiceLimitedTimeRetryPolicy; - -/// @deprecated Use monitoring_v3::NotificationChannelServiceRetryPolicy -/// directly. -using ::google::cloud::monitoring_v3::NotificationChannelServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_NOTIFICATION_CHANNEL_CONNECTION_H diff --git a/google/cloud/monitoring/notification_channel_connection_idempotency_policy.h b/google/cloud/monitoring/notification_channel_connection_idempotency_policy.h deleted file mode 100644 index ed43ac0c213fb..0000000000000 --- a/google/cloud/monitoring/notification_channel_connection_idempotency_policy.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/notification_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_NOTIFICATION_CHANNEL_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_NOTIFICATION_CHANNEL_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/monitoring/v3/notification_channel_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// monitoring_v3::MakeDefaultNotificationChannelServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::monitoring_v3:: - MakeDefaultNotificationChannelServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// monitoring_v3::NotificationChannelServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::monitoring_v3:: - NotificationChannelServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_NOTIFICATION_CHANNEL_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/monitoring/notification_channel_options.h b/google/cloud/monitoring/notification_channel_options.h deleted file mode 100644 index 93659b17a03a5..0000000000000 --- a/google/cloud/monitoring/notification_channel_options.h +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/notification_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_NOTIFICATION_CHANNEL_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_NOTIFICATION_CHANNEL_OPTIONS_H - -#include "google/cloud/monitoring/notification_channel_connection.h" -#include "google/cloud/monitoring/notification_channel_connection_idempotency_policy.h" -#include "google/cloud/monitoring/v3/notification_channel_options.h" - -namespace google { -namespace cloud { -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use monitoring_v3::NotificationChannelServiceBackoffPolicyOption -/// directly. -using ::google::cloud::monitoring_v3:: - NotificationChannelServiceBackoffPolicyOption; - -/// @deprecated Use -/// monitoring_v3::NotificationChannelServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::monitoring_v3:: - NotificationChannelServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use monitoring_v3::NotificationChannelServicePolicyOptionList -/// directly. -using ::google::cloud::monitoring_v3:: - NotificationChannelServicePolicyOptionList; - -/// @deprecated Use monitoring_v3::NotificationChannelServiceRetryPolicyOption -/// directly. -using ::google::cloud::monitoring_v3:: - NotificationChannelServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_NOTIFICATION_CHANNEL_OPTIONS_H diff --git a/google/cloud/monitoring/query_client.h b/google/cloud/monitoring/query_client.h deleted file mode 100644 index ad5c84801a048..0000000000000 --- a/google/cloud/monitoring/query_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/query_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_QUERY_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_QUERY_CLIENT_H - -#include "google/cloud/monitoring/query_connection.h" -#include "google/cloud/monitoring/v3/query_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in monitoring_v3 instead of the aliases defined in -/// this namespace. -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use monitoring_v3::QueryServiceClient directly. -using ::google::cloud::monitoring_v3::QueryServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_QUERY_CLIENT_H diff --git a/google/cloud/monitoring/query_connection.h b/google/cloud/monitoring/query_connection.h deleted file mode 100644 index 30edf28300eb3..0000000000000 --- a/google/cloud/monitoring/query_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/query_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_QUERY_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_QUERY_CONNECTION_H - -#include "google/cloud/monitoring/query_connection_idempotency_policy.h" -#include "google/cloud/monitoring/v3/query_connection.h" - -namespace google { -namespace cloud { -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use monitoring_v3::MakeQueryServiceConnection directly. -using ::google::cloud::monitoring_v3::MakeQueryServiceConnection; - -/// @deprecated Use monitoring_v3::QueryServiceConnection directly. -using ::google::cloud::monitoring_v3::QueryServiceConnection; - -/// @deprecated Use monitoring_v3::QueryServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::monitoring_v3::QueryServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use monitoring_v3::QueryServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::monitoring_v3::QueryServiceLimitedTimeRetryPolicy; - -/// @deprecated Use monitoring_v3::QueryServiceRetryPolicy directly. -using ::google::cloud::monitoring_v3::QueryServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_QUERY_CONNECTION_H diff --git a/google/cloud/monitoring/query_connection_idempotency_policy.h b/google/cloud/monitoring/query_connection_idempotency_policy.h deleted file mode 100644 index 34464b5f07c64..0000000000000 --- a/google/cloud/monitoring/query_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/query_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_QUERY_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_QUERY_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/monitoring/v3/query_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// monitoring_v3::MakeDefaultQueryServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::monitoring_v3:: - MakeDefaultQueryServiceConnectionIdempotencyPolicy; - -/// @deprecated Use monitoring_v3::QueryServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::monitoring_v3::QueryServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_QUERY_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/monitoring/query_options.h b/google/cloud/monitoring/query_options.h deleted file mode 100644 index 0e4039d535d98..0000000000000 --- a/google/cloud/monitoring/query_options.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/query_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_QUERY_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_QUERY_OPTIONS_H - -#include "google/cloud/monitoring/query_connection.h" -#include "google/cloud/monitoring/query_connection_idempotency_policy.h" -#include "google/cloud/monitoring/v3/query_options.h" - -namespace google { -namespace cloud { -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use monitoring_v3::QueryServiceBackoffPolicyOption directly. -using ::google::cloud::monitoring_v3::QueryServiceBackoffPolicyOption; - -/// @deprecated Use monitoring_v3::QueryServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::monitoring_v3:: - QueryServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use monitoring_v3::QueryServicePolicyOptionList directly. -using ::google::cloud::monitoring_v3::QueryServicePolicyOptionList; - -/// @deprecated Use monitoring_v3::QueryServiceRetryPolicyOption directly. -using ::google::cloud::monitoring_v3::QueryServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_QUERY_OPTIONS_H diff --git a/google/cloud/monitoring/quickstart/.bazelrc b/google/cloud/monitoring/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/monitoring/quickstart/.bazelrc +++ b/google/cloud/monitoring/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/monitoring/quickstart/CMakeLists.txt b/google/cloud/monitoring/quickstart/CMakeLists.txt index 3628c7d13f8a0..75213700abdf7 100644 --- a/google/cloud/monitoring/quickstart/CMakeLists.txt +++ b/google/cloud/monitoring/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Monitoring API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-monitoring-quickstart CXX) find_package(google_cloud_cpp_monitoring REQUIRED) diff --git a/google/cloud/monitoring/service_monitoring_client.h b/google/cloud/monitoring/service_monitoring_client.h deleted file mode 100644 index 483fd0e0f1661..0000000000000 --- a/google/cloud/monitoring/service_monitoring_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/service_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_SERVICE_MONITORING_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_SERVICE_MONITORING_CLIENT_H - -#include "google/cloud/monitoring/service_monitoring_connection.h" -#include "google/cloud/monitoring/v3/service_monitoring_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in monitoring_v3 instead of the aliases defined in -/// this namespace. -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use monitoring_v3::ServiceMonitoringServiceClient directly. -using ::google::cloud::monitoring_v3::ServiceMonitoringServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_SERVICE_MONITORING_CLIENT_H diff --git a/google/cloud/monitoring/service_monitoring_connection.h b/google/cloud/monitoring/service_monitoring_connection.h deleted file mode 100644 index 0687d4fc765c9..0000000000000 --- a/google/cloud/monitoring/service_monitoring_connection.h +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/service_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_SERVICE_MONITORING_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_SERVICE_MONITORING_CONNECTION_H - -#include "google/cloud/monitoring/service_monitoring_connection_idempotency_policy.h" -#include "google/cloud/monitoring/v3/service_monitoring_connection.h" - -namespace google { -namespace cloud { -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use monitoring_v3::MakeServiceMonitoringServiceConnection -/// directly. -using ::google::cloud::monitoring_v3::MakeServiceMonitoringServiceConnection; - -/// @deprecated Use monitoring_v3::ServiceMonitoringServiceConnection directly. -using ::google::cloud::monitoring_v3::ServiceMonitoringServiceConnection; - -/// @deprecated Use -/// monitoring_v3::ServiceMonitoringServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::monitoring_v3:: - ServiceMonitoringServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use -/// monitoring_v3::ServiceMonitoringServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::monitoring_v3:: - ServiceMonitoringServiceLimitedTimeRetryPolicy; - -/// @deprecated Use monitoring_v3::ServiceMonitoringServiceRetryPolicy directly. -using ::google::cloud::monitoring_v3::ServiceMonitoringServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_SERVICE_MONITORING_CONNECTION_H diff --git a/google/cloud/monitoring/service_monitoring_connection_idempotency_policy.h b/google/cloud/monitoring/service_monitoring_connection_idempotency_policy.h deleted file mode 100644 index a58aa159edb1a..0000000000000 --- a/google/cloud/monitoring/service_monitoring_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/service_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_SERVICE_MONITORING_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_SERVICE_MONITORING_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/monitoring/v3/service_monitoring_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// monitoring_v3::MakeDefaultServiceMonitoringServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::monitoring_v3:: - MakeDefaultServiceMonitoringServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// monitoring_v3::ServiceMonitoringServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::monitoring_v3:: - ServiceMonitoringServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_SERVICE_MONITORING_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/monitoring/service_monitoring_options.h b/google/cloud/monitoring/service_monitoring_options.h deleted file mode 100644 index 8bc13aa670702..0000000000000 --- a/google/cloud/monitoring/service_monitoring_options.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/service_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_SERVICE_MONITORING_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_SERVICE_MONITORING_OPTIONS_H - -#include "google/cloud/monitoring/service_monitoring_connection.h" -#include "google/cloud/monitoring/service_monitoring_connection_idempotency_policy.h" -#include "google/cloud/monitoring/v3/service_monitoring_options.h" - -namespace google { -namespace cloud { -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use monitoring_v3::ServiceMonitoringServiceBackoffPolicyOption -/// directly. -using ::google::cloud::monitoring_v3:: - ServiceMonitoringServiceBackoffPolicyOption; - -/// @deprecated Use -/// monitoring_v3::ServiceMonitoringServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::monitoring_v3:: - ServiceMonitoringServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use monitoring_v3::ServiceMonitoringServicePolicyOptionList -/// directly. -using ::google::cloud::monitoring_v3::ServiceMonitoringServicePolicyOptionList; - -/// @deprecated Use monitoring_v3::ServiceMonitoringServiceRetryPolicyOption -/// directly. -using ::google::cloud::monitoring_v3::ServiceMonitoringServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_SERVICE_MONITORING_OPTIONS_H diff --git a/google/cloud/monitoring/uptime_check_client.h b/google/cloud/monitoring/uptime_check_client.h deleted file mode 100644 index 80ac18bee1404..0000000000000 --- a/google/cloud/monitoring/uptime_check_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/uptime_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_UPTIME_CHECK_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_UPTIME_CHECK_CLIENT_H - -#include "google/cloud/monitoring/uptime_check_connection.h" -#include "google/cloud/monitoring/v3/uptime_check_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in monitoring_v3 instead of the aliases defined in -/// this namespace. -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use monitoring_v3::UptimeCheckServiceClient directly. -using ::google::cloud::monitoring_v3::UptimeCheckServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_UPTIME_CHECK_CLIENT_H diff --git a/google/cloud/monitoring/uptime_check_connection.h b/google/cloud/monitoring/uptime_check_connection.h deleted file mode 100644 index 3b7e7326b6e71..0000000000000 --- a/google/cloud/monitoring/uptime_check_connection.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/uptime_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_UPTIME_CHECK_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_UPTIME_CHECK_CONNECTION_H - -#include "google/cloud/monitoring/uptime_check_connection_idempotency_policy.h" -#include "google/cloud/monitoring/v3/uptime_check_connection.h" - -namespace google { -namespace cloud { -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use monitoring_v3::MakeUptimeCheckServiceConnection directly. -using ::google::cloud::monitoring_v3::MakeUptimeCheckServiceConnection; - -/// @deprecated Use monitoring_v3::UptimeCheckServiceConnection directly. -using ::google::cloud::monitoring_v3::UptimeCheckServiceConnection; - -/// @deprecated Use -/// monitoring_v3::UptimeCheckServiceLimitedErrorCountRetryPolicy directly. -using ::google::cloud::monitoring_v3:: - UptimeCheckServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use monitoring_v3::UptimeCheckServiceLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::monitoring_v3::UptimeCheckServiceLimitedTimeRetryPolicy; - -/// @deprecated Use monitoring_v3::UptimeCheckServiceRetryPolicy directly. -using ::google::cloud::monitoring_v3::UptimeCheckServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_UPTIME_CHECK_CONNECTION_H diff --git a/google/cloud/monitoring/uptime_check_connection_idempotency_policy.h b/google/cloud/monitoring/uptime_check_connection_idempotency_policy.h deleted file mode 100644 index a0a23b1297e14..0000000000000 --- a/google/cloud/monitoring/uptime_check_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/uptime_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_UPTIME_CHECK_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_UPTIME_CHECK_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/monitoring/v3/uptime_check_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// monitoring_v3::MakeDefaultUptimeCheckServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::monitoring_v3:: - MakeDefaultUptimeCheckServiceConnectionIdempotencyPolicy; - -/// @deprecated Use monitoring_v3::UptimeCheckServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::monitoring_v3:: - UptimeCheckServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_UPTIME_CHECK_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/monitoring/uptime_check_options.h b/google/cloud/monitoring/uptime_check_options.h deleted file mode 100644 index 2cd0bfab6507c..0000000000000 --- a/google/cloud/monitoring/uptime_check_options.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/monitoring/v3/uptime_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_UPTIME_CHECK_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_UPTIME_CHECK_OPTIONS_H - -#include "google/cloud/monitoring/uptime_check_connection.h" -#include "google/cloud/monitoring/uptime_check_connection_idempotency_policy.h" -#include "google/cloud/monitoring/v3/uptime_check_options.h" - -namespace google { -namespace cloud { -namespace monitoring { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use monitoring_v3::UptimeCheckServiceBackoffPolicyOption -/// directly. -using ::google::cloud::monitoring_v3::UptimeCheckServiceBackoffPolicyOption; - -/// @deprecated Use -/// monitoring_v3::UptimeCheckServiceConnectionIdempotencyPolicyOption directly. -using ::google::cloud::monitoring_v3:: - UptimeCheckServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use monitoring_v3::UptimeCheckServicePolicyOptionList directly. -using ::google::cloud::monitoring_v3::UptimeCheckServicePolicyOptionList; - -/// @deprecated Use monitoring_v3::UptimeCheckServiceRetryPolicyOption directly. -using ::google::cloud::monitoring_v3::UptimeCheckServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace monitoring -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_UPTIME_CHECK_OPTIONS_H diff --git a/google/cloud/monitoring/v3/alert_policy_connection.h b/google/cloud/monitoring/v3/alert_policy_connection.h index ba46c0c9557fc..7d2bed051c265 100644 --- a/google/cloud/monitoring/v3/alert_policy_connection.h +++ b/google/cloud/monitoring/v3/alert_policy_connection.h @@ -27,7 +27,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/monitoring/v3/alert_service.pb.h" #include namespace google { diff --git a/google/cloud/monitoring/v3/alert_policy_connection_idempotency_policy.h b/google/cloud/monitoring/v3/alert_policy_connection_idempotency_policy.h index 3ff3391db3277..e7af4627ffb03 100644 --- a/google/cloud/monitoring/v3/alert_policy_connection_idempotency_policy.h +++ b/google/cloud/monitoring/v3/alert_policy_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/monitoring/v3/alert_service.grpc.pb.h" #include namespace google { diff --git a/google/cloud/monitoring/v3/group_connection.h b/google/cloud/monitoring/v3/group_connection.h index 970c92b73daea..e52371f6656d5 100644 --- a/google/cloud/monitoring/v3/group_connection.h +++ b/google/cloud/monitoring/v3/group_connection.h @@ -27,7 +27,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/monitoring/v3/group_service.pb.h" #include namespace google { diff --git a/google/cloud/monitoring/v3/group_connection_idempotency_policy.h b/google/cloud/monitoring/v3/group_connection_idempotency_policy.h index ab318d3db53c4..c79ef43f5a0df 100644 --- a/google/cloud/monitoring/v3/group_connection_idempotency_policy.h +++ b/google/cloud/monitoring/v3/group_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/monitoring/v3/group_service.grpc.pb.h" #include namespace google { diff --git a/google/cloud/monitoring/v3/internal/alert_policy_auth_decorator.cc b/google/cloud/monitoring/v3/internal/alert_policy_auth_decorator.cc index 744f9277029d1..689796e5437c5 100644 --- a/google/cloud/monitoring/v3/internal/alert_policy_auth_decorator.cc +++ b/google/cloud/monitoring/v3/internal/alert_policy_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/monitoring/v3/alert_service.proto #include "google/cloud/monitoring/v3/internal/alert_policy_auth_decorator.h" -#include +#include "google/monitoring/v3/alert_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -79,3 +82,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/alert_policy_auth_decorator.h b/google/cloud/monitoring/v3/internal/alert_policy_auth_decorator.h index 2667a653c20b5..dd037d31467a8 100644 --- a/google/cloud/monitoring/v3/internal/alert_policy_auth_decorator.h +++ b/google/cloud/monitoring/v3/internal/alert_policy_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -68,4 +71,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_ALERT_POLICY_AUTH_DECORATOR_H diff --git a/google/cloud/monitoring/v3/internal/alert_policy_logging_decorator.cc b/google/cloud/monitoring/v3/internal/alert_policy_logging_decorator.cc index 5dca3b1b83cf2..878e70e234889 100644 --- a/google/cloud/monitoring/v3/internal/alert_policy_logging_decorator.cc +++ b/google/cloud/monitoring/v3/internal/alert_policy_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/monitoring/v3/internal/alert_policy_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/monitoring/v3/alert_service.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -98,3 +101,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/alert_policy_logging_decorator.h b/google/cloud/monitoring/v3/internal/alert_policy_logging_decorator.h index 192991c917229..88f79cc88ede8 100644 --- a/google/cloud/monitoring/v3/internal/alert_policy_logging_decorator.h +++ b/google/cloud/monitoring/v3/internal/alert_policy_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -68,4 +71,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_ALERT_POLICY_LOGGING_DECORATOR_H diff --git a/google/cloud/monitoring/v3/internal/alert_policy_metadata_decorator.cc b/google/cloud/monitoring/v3/internal/alert_policy_metadata_decorator.cc index 103e46adf0270..b89e3bb2188a9 100644 --- a/google/cloud/monitoring/v3/internal/alert_policy_metadata_decorator.cc +++ b/google/cloud/monitoring/v3/internal/alert_policy_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/monitoring/v3/internal/alert_policy_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/monitoring/v3/alert_service.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -106,3 +110,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/alert_policy_metadata_decorator.h b/google/cloud/monitoring/v3/internal/alert_policy_metadata_decorator.h index 47382db27536d..0165995d63762 100644 --- a/google/cloud/monitoring/v3/internal/alert_policy_metadata_decorator.h +++ b/google/cloud/monitoring/v3/internal/alert_policy_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -74,4 +77,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_ALERT_POLICY_METADATA_DECORATOR_H diff --git a/google/cloud/monitoring/v3/internal/alert_policy_option_defaults.cc b/google/cloud/monitoring/v3/internal/alert_policy_option_defaults.cc index f60def1f503a7..bdfcdf82fc2e1 100644 --- a/google/cloud/monitoring/v3/internal/alert_policy_option_defaults.cc +++ b/google/cloud/monitoring/v3/internal/alert_policy_option_defaults.cc @@ -42,7 +42,7 @@ Options AlertPolicyServiceDefaultOptions(Options options) { if (!options.has()) { options.set( monitoring_v3::AlertPolicyServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/monitoring/v3/internal/alert_policy_stub.cc b/google/cloud/monitoring/v3/internal/alert_policy_stub.cc index d1e4549ac5403..4d07feb94d4ef 100644 --- a/google/cloud/monitoring/v3/internal/alert_policy_stub.cc +++ b/google/cloud/monitoring/v3/internal/alert_policy_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/monitoring/v3/internal/alert_policy_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "google/monitoring/v3/alert_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -93,3 +96,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/alert_policy_stub.h b/google/cloud/monitoring/v3/internal/alert_policy_stub.h index 0c2d44a88bbc9..4cdff19eb04fc 100644 --- a/google/cloud/monitoring/v3/internal/alert_policy_stub.h +++ b/google/cloud/monitoring/v3/internal/alert_policy_stub.h @@ -22,10 +22,13 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/monitoring/v3/alert_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -94,4 +97,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_ALERT_POLICY_STUB_H diff --git a/google/cloud/monitoring/v3/internal/alert_policy_stub_factory.cc b/google/cloud/monitoring/v3/internal/alert_policy_stub_factory.cc index 23c81623130bd..dfc96a0a959b6 100644 --- a/google/cloud/monitoring/v3/internal/alert_policy_stub_factory.cc +++ b/google/cloud/monitoring/v3/internal/alert_policy_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/monitoring/v3/alert_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/alert_policy_stub_factory.h b/google/cloud/monitoring/v3/internal/alert_policy_stub_factory.h index 1c8928d8b1ada..b9c96202e8ea7 100644 --- a/google/cloud/monitoring/v3/internal/alert_policy_stub_factory.h +++ b/google/cloud/monitoring/v3/internal/alert_policy_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_ALERT_POLICY_STUB_FACTORY_H diff --git a/google/cloud/monitoring/v3/internal/alert_policy_tracing_connection.cc b/google/cloud/monitoring/v3/internal/alert_policy_tracing_connection.cc index 3a4741a2e7cbe..794c3568f2786 100644 --- a/google/cloud/monitoring/v3/internal/alert_policy_tracing_connection.cc +++ b/google/cloud/monitoring/v3/internal/alert_policy_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace monitoring_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AlertPolicyServiceTracingConnection::AlertPolicyServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -79,17 +77,13 @@ AlertPolicyServiceTracingConnection::UpdateAlertPolicy( return internal::EndSpan(*span, child_->UpdateAlertPolicy(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAlertPolicyServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/monitoring/v3/internal/alert_policy_tracing_connection.h b/google/cloud/monitoring/v3/internal/alert_policy_tracing_connection.h index 59ea0de728f8c..b9746c3fa5ca9 100644 --- a/google/cloud/monitoring/v3/internal/alert_policy_tracing_connection.h +++ b/google/cloud/monitoring/v3/internal/alert_policy_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace monitoring_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AlertPolicyServiceTracingConnection : public monitoring_v3::AlertPolicyServiceConnection { public: @@ -59,8 +57,6 @@ class AlertPolicyServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/monitoring/v3/internal/alert_policy_tracing_stub.cc b/google/cloud/monitoring/v3/internal/alert_policy_tracing_stub.cc index afcf3658f45d4..f0084cb32fa25 100644 --- a/google/cloud/monitoring/v3/internal/alert_policy_tracing_stub.cc +++ b/google/cloud/monitoring/v3/internal/alert_policy_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AlertPolicyServiceTracingStub::AlertPolicyServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -91,18 +92,14 @@ AlertPolicyServiceTracingStub::UpdateAlertPolicy( context, *span, child_->UpdateAlertPolicy(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAlertPolicyServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/alert_policy_tracing_stub.h b/google/cloud/monitoring/v3/internal/alert_policy_tracing_stub.h index a9fa878e405c4..8e1fd124621d3 100644 --- a/google/cloud/monitoring/v3/internal/alert_policy_tracing_stub.h +++ b/google/cloud/monitoring/v3/internal/alert_policy_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AlertPolicyServiceTracingStub : public AlertPolicyServiceStub { public: ~AlertPolicyServiceTracingStub() override = default; @@ -65,8 +66,6 @@ class AlertPolicyServiceTracingStub : public AlertPolicyServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -81,4 +80,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_ALERT_POLICY_TRACING_STUB_H diff --git a/google/cloud/monitoring/v3/internal/group_auth_decorator.cc b/google/cloud/monitoring/v3/internal/group_auth_decorator.cc index b864ecb94d7b3..5ce7afdd000af 100644 --- a/google/cloud/monitoring/v3/internal/group_auth_decorator.cc +++ b/google/cloud/monitoring/v3/internal/group_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/monitoring/v3/group_service.proto #include "google/cloud/monitoring/v3/internal/group_auth_decorator.h" -#include +#include "google/monitoring/v3/group_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -85,3 +88,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/group_auth_decorator.h b/google/cloud/monitoring/v3/internal/group_auth_decorator.h index 1e2bf23b6255f..f50a6a641ef8c 100644 --- a/google/cloud/monitoring/v3/internal/group_auth_decorator.h +++ b/google/cloud/monitoring/v3/internal/group_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -72,4 +75,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_GROUP_AUTH_DECORATOR_H diff --git a/google/cloud/monitoring/v3/internal/group_logging_decorator.cc b/google/cloud/monitoring/v3/internal/group_logging_decorator.cc index 5538379be5d7d..b2795b405d10c 100644 --- a/google/cloud/monitoring/v3/internal/group_logging_decorator.cc +++ b/google/cloud/monitoring/v3/internal/group_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/monitoring/v3/internal/group_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/monitoring/v3/group_service.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -107,3 +110,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/group_logging_decorator.h b/google/cloud/monitoring/v3/internal/group_logging_decorator.h index d6590f8574858..9de2816822ce2 100644 --- a/google/cloud/monitoring/v3/internal/group_logging_decorator.h +++ b/google/cloud/monitoring/v3/internal/group_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -72,4 +75,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_GROUP_LOGGING_DECORATOR_H diff --git a/google/cloud/monitoring/v3/internal/group_metadata_decorator.cc b/google/cloud/monitoring/v3/internal/group_metadata_decorator.cc index 6b006748fc4a2..5dc8b9fbefd6e 100644 --- a/google/cloud/monitoring/v3/internal/group_metadata_decorator.cc +++ b/google/cloud/monitoring/v3/internal/group_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/monitoring/v3/internal/group_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/monitoring/v3/group_service.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -112,3 +116,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/group_metadata_decorator.h b/google/cloud/monitoring/v3/internal/group_metadata_decorator.h index cdb78aad5e920..b89a791b05f35 100644 --- a/google/cloud/monitoring/v3/internal/group_metadata_decorator.h +++ b/google/cloud/monitoring/v3/internal/group_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -77,4 +80,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_GROUP_METADATA_DECORATOR_H diff --git a/google/cloud/monitoring/v3/internal/group_option_defaults.cc b/google/cloud/monitoring/v3/internal/group_option_defaults.cc index a4511a993328a..cc741f4947c35 100644 --- a/google/cloud/monitoring/v3/internal/group_option_defaults.cc +++ b/google/cloud/monitoring/v3/internal/group_option_defaults.cc @@ -41,7 +41,7 @@ Options GroupServiceDefaultOptions(Options options) { if (!options.has()) { options.set( monitoring_v3::GroupServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/monitoring/v3/internal/group_stub.cc b/google/cloud/monitoring/v3/internal/group_stub.cc index 795ea16b9795e..87c76b2774a4c 100644 --- a/google/cloud/monitoring/v3/internal/group_stub.cc +++ b/google/cloud/monitoring/v3/internal/group_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/monitoring/v3/internal/group_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "google/monitoring/v3/group_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -102,3 +105,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/group_stub.h b/google/cloud/monitoring/v3/internal/group_stub.h index 2967b6c047c5e..1f84de14d5c5f 100644 --- a/google/cloud/monitoring/v3/internal/group_stub.h +++ b/google/cloud/monitoring/v3/internal/group_stub.h @@ -22,10 +22,13 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/monitoring/v3/group_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -102,4 +105,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_GROUP_STUB_H diff --git a/google/cloud/monitoring/v3/internal/group_stub_factory.cc b/google/cloud/monitoring/v3/internal/group_stub_factory.cc index 221e9b59f7a36..de4f45aa59fc2 100644 --- a/google/cloud/monitoring/v3/internal/group_stub_factory.cc +++ b/google/cloud/monitoring/v3/internal/group_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/monitoring/v3/group_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -68,3 +71,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/group_stub_factory.h b/google/cloud/monitoring/v3/internal/group_stub_factory.h index 3889278071424..c8f1188f37b01 100644 --- a/google/cloud/monitoring/v3/internal/group_stub_factory.h +++ b/google/cloud/monitoring/v3/internal/group_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_GROUP_STUB_FACTORY_H diff --git a/google/cloud/monitoring/v3/internal/group_tracing_connection.cc b/google/cloud/monitoring/v3/internal/group_tracing_connection.cc index d88eb0f01a426..bd90ee9a321b4 100644 --- a/google/cloud/monitoring/v3/internal/group_tracing_connection.cc +++ b/google/cloud/monitoring/v3/internal/group_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace monitoring_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GroupServiceTracingConnection::GroupServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -89,16 +87,12 @@ GroupServiceTracingConnection::ListGroupMembers( std::move(span), std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeGroupServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/monitoring/v3/internal/group_tracing_connection.h b/google/cloud/monitoring/v3/internal/group_tracing_connection.h index d3baeb706c985..685c783c79c25 100644 --- a/google/cloud/monitoring/v3/internal/group_tracing_connection.h +++ b/google/cloud/monitoring/v3/internal/group_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace monitoring_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class GroupServiceTracingConnection : public monitoring_v3::GroupServiceConnection { public: @@ -62,8 +60,6 @@ class GroupServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/monitoring/v3/internal/group_tracing_stub.cc b/google/cloud/monitoring/v3/internal/group_tracing_stub.cc index d97f2aafa00f4..f7ed8355e7a17 100644 --- a/google/cloud/monitoring/v3/internal/group_tracing_stub.cc +++ b/google/cloud/monitoring/v3/internal/group_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GroupServiceTracingStub::GroupServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -100,18 +101,14 @@ GroupServiceTracingStub::ListGroupMembers( child_->ListGroupMembers(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeGroupServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/group_tracing_stub.h b/google/cloud/monitoring/v3/internal/group_tracing_stub.h index bacacbb3c7176..0a4f6aec04c4d 100644 --- a/google/cloud/monitoring/v3/internal/group_tracing_stub.h +++ b/google/cloud/monitoring/v3/internal/group_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class GroupServiceTracingStub : public GroupServiceStub { public: ~GroupServiceTracingStub() override = default; @@ -68,8 +69,6 @@ class GroupServiceTracingStub : public GroupServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -84,4 +83,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_GROUP_TRACING_STUB_H diff --git a/google/cloud/monitoring/v3/internal/metric_auth_decorator.cc b/google/cloud/monitoring/v3/internal/metric_auth_decorator.cc index d922c6d4bf279..567085466d955 100644 --- a/google/cloud/monitoring/v3/internal/metric_auth_decorator.cc +++ b/google/cloud/monitoring/v3/internal/metric_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/monitoring/v3/metric_service.proto #include "google/cloud/monitoring/v3/internal/metric_auth_decorator.h" -#include +#include "google/monitoring/v3/metric_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -130,3 +133,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/metric_auth_decorator.h b/google/cloud/monitoring/v3/internal/metric_auth_decorator.h index 7fd27632b94b4..9ef0a3793adbc 100644 --- a/google/cloud/monitoring/v3/internal/metric_auth_decorator.h +++ b/google/cloud/monitoring/v3/internal/metric_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -99,4 +102,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_METRIC_AUTH_DECORATOR_H diff --git a/google/cloud/monitoring/v3/internal/metric_logging_decorator.cc b/google/cloud/monitoring/v3/internal/metric_logging_decorator.cc index 4a46659aacace..b019dd64f6b87 100644 --- a/google/cloud/monitoring/v3/internal/metric_logging_decorator.cc +++ b/google/cloud/monitoring/v3/internal/metric_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/monitoring/v3/internal/metric_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/monitoring/v3/metric_service.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -173,3 +176,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/metric_logging_decorator.h b/google/cloud/monitoring/v3/internal/metric_logging_decorator.h index b6d6adea84d29..b05ae43a52fb9 100644 --- a/google/cloud/monitoring/v3/internal/metric_logging_decorator.h +++ b/google/cloud/monitoring/v3/internal/metric_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -99,4 +102,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_METRIC_LOGGING_DECORATOR_H diff --git a/google/cloud/monitoring/v3/internal/metric_metadata_decorator.cc b/google/cloud/monitoring/v3/internal/metric_metadata_decorator.cc index b6de4a382c956..531c207d74aa4 100644 --- a/google/cloud/monitoring/v3/internal/metric_metadata_decorator.cc +++ b/google/cloud/monitoring/v3/internal/metric_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/monitoring/v3/internal/metric_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/monitoring/v3/metric_service.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -152,3 +156,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/metric_metadata_decorator.h b/google/cloud/monitoring/v3/internal/metric_metadata_decorator.h index 2f4bc7a080ba6..c08f82620b1a2 100644 --- a/google/cloud/monitoring/v3/internal/metric_metadata_decorator.h +++ b/google/cloud/monitoring/v3/internal/metric_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -104,4 +107,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_METRIC_METADATA_DECORATOR_H diff --git a/google/cloud/monitoring/v3/internal/metric_option_defaults.cc b/google/cloud/monitoring/v3/internal/metric_option_defaults.cc index dab900b3ab539..c5ca48f215b4c 100644 --- a/google/cloud/monitoring/v3/internal/metric_option_defaults.cc +++ b/google/cloud/monitoring/v3/internal/metric_option_defaults.cc @@ -41,7 +41,7 @@ Options MetricServiceDefaultOptions(Options options) { if (!options.has()) { options.set( monitoring_v3::MetricServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/monitoring/v3/internal/metric_stub.cc b/google/cloud/monitoring/v3/internal/metric_stub.cc index a8f39bda788dd..cafd927c8181c 100644 --- a/google/cloud/monitoring/v3/internal/metric_stub.cc +++ b/google/cloud/monitoring/v3/internal/metric_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/monitoring/v3/internal/metric_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "google/monitoring/v3/metric_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -168,3 +171,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/metric_stub.h b/google/cloud/monitoring/v3/internal/metric_stub.h index 5ac060bd3abd9..b8e37bb4c615a 100644 --- a/google/cloud/monitoring/v3/internal/metric_stub.h +++ b/google/cloud/monitoring/v3/internal/metric_stub.h @@ -24,10 +24,13 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/monitoring/v3/metric_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -155,4 +158,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_METRIC_STUB_H diff --git a/google/cloud/monitoring/v3/internal/metric_stub_factory.cc b/google/cloud/monitoring/v3/internal/metric_stub_factory.cc index 487d308ac4d7f..f952e4f480844 100644 --- a/google/cloud/monitoring/v3/internal/metric_stub_factory.cc +++ b/google/cloud/monitoring/v3/internal/metric_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/monitoring/v3/metric_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -69,3 +72,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/metric_stub_factory.h b/google/cloud/monitoring/v3/internal/metric_stub_factory.h index 49cafe2bec81f..5ef0ccb07f2c2 100644 --- a/google/cloud/monitoring/v3/internal/metric_stub_factory.h +++ b/google/cloud/monitoring/v3/internal/metric_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_METRIC_STUB_FACTORY_H diff --git a/google/cloud/monitoring/v3/internal/metric_tracing_connection.cc b/google/cloud/monitoring/v3/internal/metric_tracing_connection.cc index 569f793d45661..2448a9601b7c8 100644 --- a/google/cloud/monitoring/v3/internal/metric_tracing_connection.cc +++ b/google/cloud/monitoring/v3/internal/metric_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace monitoring_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - MetricServiceTracingConnection::MetricServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -129,16 +127,12 @@ future MetricServiceTracingConnection::AsyncCreateTimeSeries( child_->AsyncCreateTimeSeries(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeMetricServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/monitoring/v3/internal/metric_tracing_connection.h b/google/cloud/monitoring/v3/internal/metric_tracing_connection.h index 39e75cee00d14..b75cd3f07c033 100644 --- a/google/cloud/monitoring/v3/internal/metric_tracing_connection.h +++ b/google/cloud/monitoring/v3/internal/metric_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace monitoring_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class MetricServiceTracingConnection : public monitoring_v3::MetricServiceConnection { public: @@ -81,8 +79,6 @@ class MetricServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/monitoring/v3/internal/metric_tracing_stub.cc b/google/cloud/monitoring/v3/internal/metric_tracing_stub.cc index 8af526e1c8ae5..001a8d4f07d88 100644 --- a/google/cloud/monitoring/v3/internal/metric_tracing_stub.cc +++ b/google/cloud/monitoring/v3/internal/metric_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - MetricServiceTracingStub::MetricServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -158,18 +159,14 @@ future MetricServiceTracingStub::AsyncCreateTimeSeries( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeMetricServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/metric_tracing_stub.h b/google/cloud/monitoring/v3/internal/metric_tracing_stub.h index 991bdcdc2add4..926721b03364c 100644 --- a/google/cloud/monitoring/v3/internal/metric_tracing_stub.h +++ b/google/cloud/monitoring/v3/internal/metric_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class MetricServiceTracingStub : public MetricServiceStub { public: ~MetricServiceTracingStub() override = default; @@ -95,8 +96,6 @@ class MetricServiceTracingStub : public MetricServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -111,4 +110,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_METRIC_TRACING_STUB_H diff --git a/google/cloud/monitoring/v3/internal/notification_channel_auth_decorator.cc b/google/cloud/monitoring/v3/internal/notification_channel_auth_decorator.cc index 240ae37737a47..1f27de67fce99 100644 --- a/google/cloud/monitoring/v3/internal/notification_channel_auth_decorator.cc +++ b/google/cloud/monitoring/v3/internal/notification_channel_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/monitoring/v3/notification_service.proto #include "google/cloud/monitoring/v3/internal/notification_channel_auth_decorator.h" -#include +#include "google/monitoring/v3/notification_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -129,3 +132,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/notification_channel_auth_decorator.h b/google/cloud/monitoring/v3/internal/notification_channel_auth_decorator.h index 60bae86109ef1..b9b0b45ce3664 100644 --- a/google/cloud/monitoring/v3/internal/notification_channel_auth_decorator.h +++ b/google/cloud/monitoring/v3/internal/notification_channel_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -108,4 +111,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_NOTIFICATION_CHANNEL_AUTH_DECORATOR_H diff --git a/google/cloud/monitoring/v3/internal/notification_channel_logging_decorator.cc b/google/cloud/monitoring/v3/internal/notification_channel_logging_decorator.cc index f14cc0a10c3cc..84393471af16f 100644 --- a/google/cloud/monitoring/v3/internal/notification_channel_logging_decorator.cc +++ b/google/cloud/monitoring/v3/internal/notification_channel_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/monitoring/v3/internal/notification_channel_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/monitoring/v3/notification_service.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -178,3 +181,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/notification_channel_logging_decorator.h b/google/cloud/monitoring/v3/internal/notification_channel_logging_decorator.h index f6b0ce97ca165..370a821e11ce7 100644 --- a/google/cloud/monitoring/v3/internal/notification_channel_logging_decorator.h +++ b/google/cloud/monitoring/v3/internal/notification_channel_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -109,4 +112,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_NOTIFICATION_CHANNEL_LOGGING_DECORATOR_H diff --git a/google/cloud/monitoring/v3/internal/notification_channel_metadata_decorator.cc b/google/cloud/monitoring/v3/internal/notification_channel_metadata_decorator.cc index fc4dc0d49225c..59f524930cdda 100644 --- a/google/cloud/monitoring/v3/internal/notification_channel_metadata_decorator.cc +++ b/google/cloud/monitoring/v3/internal/notification_channel_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/monitoring/v3/internal/notification_channel_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/monitoring/v3/notification_service.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -158,3 +162,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/notification_channel_metadata_decorator.h b/google/cloud/monitoring/v3/internal/notification_channel_metadata_decorator.h index 46cc3649aca1d..4e23bff7c100d 100644 --- a/google/cloud/monitoring/v3/internal/notification_channel_metadata_decorator.h +++ b/google/cloud/monitoring/v3/internal/notification_channel_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -115,4 +118,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_NOTIFICATION_CHANNEL_METADATA_DECORATOR_H diff --git a/google/cloud/monitoring/v3/internal/notification_channel_option_defaults.cc b/google/cloud/monitoring/v3/internal/notification_channel_option_defaults.cc index 7e9ed458404af..937cfaf523362 100644 --- a/google/cloud/monitoring/v3/internal/notification_channel_option_defaults.cc +++ b/google/cloud/monitoring/v3/internal/notification_channel_option_defaults.cc @@ -44,7 +44,7 @@ Options NotificationChannelServiceDefaultOptions(Options options) { .has()) { options.set( monitoring_v3::NotificationChannelServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/monitoring/v3/internal/notification_channel_stub.cc b/google/cloud/monitoring/v3/internal/notification_channel_stub.cc index 4ce21e7acb74e..cb81b3ce079b8 100644 --- a/google/cloud/monitoring/v3/internal/notification_channel_stub.cc +++ b/google/cloud/monitoring/v3/internal/notification_channel_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/monitoring/v3/internal/notification_channel_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "google/monitoring/v3/notification_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -168,3 +171,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/notification_channel_stub.h b/google/cloud/monitoring/v3/internal/notification_channel_stub.h index c836e0201878e..9cdfba7ed0bfb 100644 --- a/google/cloud/monitoring/v3/internal/notification_channel_stub.h +++ b/google/cloud/monitoring/v3/internal/notification_channel_stub.h @@ -22,10 +22,13 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/monitoring/v3/notification_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -175,4 +178,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_NOTIFICATION_CHANNEL_STUB_H diff --git a/google/cloud/monitoring/v3/internal/notification_channel_stub_factory.cc b/google/cloud/monitoring/v3/internal/notification_channel_stub_factory.cc index 5195812c8e503..8f2ec62121903 100644 --- a/google/cloud/monitoring/v3/internal/notification_channel_stub_factory.cc +++ b/google/cloud/monitoring/v3/internal/notification_channel_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/monitoring/v3/notification_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/notification_channel_stub_factory.h b/google/cloud/monitoring/v3/internal/notification_channel_stub_factory.h index bf0da4dc4f7a9..c30f012bccd46 100644 --- a/google/cloud/monitoring/v3/internal/notification_channel_stub_factory.h +++ b/google/cloud/monitoring/v3/internal/notification_channel_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_NOTIFICATION_CHANNEL_STUB_FACTORY_H diff --git a/google/cloud/monitoring/v3/internal/notification_channel_tracing_connection.cc b/google/cloud/monitoring/v3/internal/notification_channel_tracing_connection.cc index 2e4fe58f9e73e..6dbeb93c29624 100644 --- a/google/cloud/monitoring/v3/internal/notification_channel_tracing_connection.cc +++ b/google/cloud/monitoring/v3/internal/notification_channel_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace monitoring_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - NotificationChannelServiceTracingConnection:: NotificationChannelServiceTracingConnection( std::shared_ptr @@ -147,17 +145,13 @@ NotificationChannelServiceTracingConnection::VerifyNotificationChannel( return internal::EndSpan(*span, child_->VerifyNotificationChannel(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeNotificationChannelServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/monitoring/v3/internal/notification_channel_tracing_connection.h b/google/cloud/monitoring/v3/internal/notification_channel_tracing_connection.h index fc3ef89fa1762..dae69bb37d052 100644 --- a/google/cloud/monitoring/v3/internal/notification_channel_tracing_connection.h +++ b/google/cloud/monitoring/v3/internal/notification_channel_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace monitoring_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class NotificationChannelServiceTracingConnection : public monitoring_v3::NotificationChannelServiceConnection { public: @@ -94,8 +92,6 @@ class NotificationChannelServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/monitoring/v3/internal/notification_channel_tracing_stub.cc b/google/cloud/monitoring/v3/internal/notification_channel_tracing_stub.cc index da5ff9b9dbd91..a629acaff4af9 100644 --- a/google/cloud/monitoring/v3/internal/notification_channel_tracing_stub.cc +++ b/google/cloud/monitoring/v3/internal/notification_channel_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - NotificationChannelServiceTracingStub::NotificationChannelServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -175,20 +176,16 @@ NotificationChannelServiceTracingStub::VerifyNotificationChannel( child_->VerifyNotificationChannel(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeNotificationChannelServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared( std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/notification_channel_tracing_stub.h b/google/cloud/monitoring/v3/internal/notification_channel_tracing_stub.h index d5239c38bd0ef..c1b95f9353f2d 100644 --- a/google/cloud/monitoring/v3/internal/notification_channel_tracing_stub.h +++ b/google/cloud/monitoring/v3/internal/notification_channel_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class NotificationChannelServiceTracingStub : public NotificationChannelServiceStub { public: @@ -106,8 +107,6 @@ class NotificationChannelServiceTracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -123,4 +122,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_NOTIFICATION_CHANNEL_TRACING_STUB_H diff --git a/google/cloud/monitoring/v3/internal/query_auth_decorator.cc b/google/cloud/monitoring/v3/internal/query_auth_decorator.cc index 3fae0d6977e10..6b9ebe2f2453a 100644 --- a/google/cloud/monitoring/v3/internal/query_auth_decorator.cc +++ b/google/cloud/monitoring/v3/internal/query_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/monitoring/v3/query_service.proto #include "google/cloud/monitoring/v3/internal/query_auth_decorator.h" -#include +#include "google/monitoring/v3/query_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -44,3 +47,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/query_auth_decorator.h b/google/cloud/monitoring/v3/internal/query_auth_decorator.h index f73e333d6abbc..a964cca8d4664 100644 --- a/google/cloud/monitoring/v3/internal/query_auth_decorator.h +++ b/google/cloud/monitoring/v3/internal/query_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -52,4 +55,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_QUERY_AUTH_DECORATOR_H diff --git a/google/cloud/monitoring/v3/internal/query_logging_decorator.cc b/google/cloud/monitoring/v3/internal/query_logging_decorator.cc index c0c5559b88449..e04f00cf25671 100644 --- a/google/cloud/monitoring/v3/internal/query_logging_decorator.cc +++ b/google/cloud/monitoring/v3/internal/query_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/monitoring/v3/internal/query_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/monitoring/v3/query_service.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -51,3 +54,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/query_logging_decorator.h b/google/cloud/monitoring/v3/internal/query_logging_decorator.h index a4a983888206b..acbfc109d5b89 100644 --- a/google/cloud/monitoring/v3/internal/query_logging_decorator.h +++ b/google/cloud/monitoring/v3/internal/query_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -52,4 +55,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_QUERY_LOGGING_DECORATOR_H diff --git a/google/cloud/monitoring/v3/internal/query_metadata_decorator.cc b/google/cloud/monitoring/v3/internal/query_metadata_decorator.cc index a138ab5cca3bf..a44a4bfb048c1 100644 --- a/google/cloud/monitoring/v3/internal/query_metadata_decorator.cc +++ b/google/cloud/monitoring/v3/internal/query_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/monitoring/v3/internal/query_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/monitoring/v3/query_service.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -70,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/query_metadata_decorator.h b/google/cloud/monitoring/v3/internal/query_metadata_decorator.h index e13bdf0740b0b..3131a42dc3a7a 100644 --- a/google/cloud/monitoring/v3/internal/query_metadata_decorator.h +++ b/google/cloud/monitoring/v3/internal/query_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -57,4 +60,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_QUERY_METADATA_DECORATOR_H diff --git a/google/cloud/monitoring/v3/internal/query_option_defaults.cc b/google/cloud/monitoring/v3/internal/query_option_defaults.cc index dd348300455e6..07a6573a10f02 100644 --- a/google/cloud/monitoring/v3/internal/query_option_defaults.cc +++ b/google/cloud/monitoring/v3/internal/query_option_defaults.cc @@ -41,7 +41,7 @@ Options QueryServiceDefaultOptions(Options options) { if (!options.has()) { options.set( monitoring_v3::QueryServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/monitoring/v3/internal/query_stub.cc b/google/cloud/monitoring/v3/internal/query_stub.cc index 5b79953b71a52..bd781f7a0addc 100644 --- a/google/cloud/monitoring/v3/internal/query_stub.cc +++ b/google/cloud/monitoring/v3/internal/query_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/monitoring/v3/internal/query_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "google/monitoring/v3/query_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -46,3 +49,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/query_stub.h b/google/cloud/monitoring/v3/internal/query_stub.h index 916cd270e34e4..4ef1a5f7c053e 100644 --- a/google/cloud/monitoring/v3/internal/query_stub.h +++ b/google/cloud/monitoring/v3/internal/query_stub.h @@ -22,10 +22,13 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/monitoring/v3/query_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -62,4 +65,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_QUERY_STUB_H diff --git a/google/cloud/monitoring/v3/internal/query_stub_factory.cc b/google/cloud/monitoring/v3/internal/query_stub_factory.cc index b0cdfa5504a31..f0daf06c97655 100644 --- a/google/cloud/monitoring/v3/internal/query_stub_factory.cc +++ b/google/cloud/monitoring/v3/internal/query_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/monitoring/v3/query_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -68,3 +71,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/query_stub_factory.h b/google/cloud/monitoring/v3/internal/query_stub_factory.h index 4de088f84c581..013e309e9e293 100644 --- a/google/cloud/monitoring/v3/internal/query_stub_factory.h +++ b/google/cloud/monitoring/v3/internal/query_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_QUERY_STUB_FACTORY_H diff --git a/google/cloud/monitoring/v3/internal/query_tracing_connection.cc b/google/cloud/monitoring/v3/internal/query_tracing_connection.cc index be4fc8e890d8a..44f2491d01649 100644 --- a/google/cloud/monitoring/v3/internal/query_tracing_connection.cc +++ b/google/cloud/monitoring/v3/internal/query_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace monitoring_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - QueryServiceTracingConnection::QueryServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -44,16 +42,12 @@ QueryServiceTracingConnection::QueryTimeSeries( google::monitoring::v3::TimeSeriesData>(std::move(span), std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeQueryServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/monitoring/v3/internal/query_tracing_connection.h b/google/cloud/monitoring/v3/internal/query_tracing_connection.h index c3a4899de8b23..5cb28c1745dd2 100644 --- a/google/cloud/monitoring/v3/internal/query_tracing_connection.h +++ b/google/cloud/monitoring/v3/internal/query_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace monitoring_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class QueryServiceTracingConnection : public monitoring_v3::QueryServiceConnection { public: @@ -47,8 +45,6 @@ class QueryServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/monitoring/v3/internal/query_tracing_stub.cc b/google/cloud/monitoring/v3/internal/query_tracing_stub.cc index bf636a9037d77..ee69ec671b90f 100644 --- a/google/cloud/monitoring/v3/internal/query_tracing_stub.cc +++ b/google/cloud/monitoring/v3/internal/query_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - QueryServiceTracingStub::QueryServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -44,18 +45,14 @@ QueryServiceTracingStub::QueryTimeSeries( child_->QueryTimeSeries(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeQueryServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/query_tracing_stub.h b/google/cloud/monitoring/v3/internal/query_tracing_stub.h index c977cc28e3a97..92192d90291d9 100644 --- a/google/cloud/monitoring/v3/internal/query_tracing_stub.h +++ b/google/cloud/monitoring/v3/internal/query_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class QueryServiceTracingStub : public QueryServiceStub { public: ~QueryServiceTracingStub() override = default; @@ -48,8 +49,6 @@ class QueryServiceTracingStub : public QueryServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -64,4 +63,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_QUERY_TRACING_STUB_H diff --git a/google/cloud/monitoring/v3/internal/service_monitoring_auth_decorator.cc b/google/cloud/monitoring/v3/internal/service_monitoring_auth_decorator.cc index e36b004f1d502..0917c5d3c879f 100644 --- a/google/cloud/monitoring/v3/internal/service_monitoring_auth_decorator.cc +++ b/google/cloud/monitoring/v3/internal/service_monitoring_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/monitoring/v3/service_service.proto #include "google/cloud/monitoring/v3/internal/service_monitoring_auth_decorator.h" -#include +#include "google/monitoring/v3/service_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -123,3 +126,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/service_monitoring_auth_decorator.h b/google/cloud/monitoring/v3/internal/service_monitoring_auth_decorator.h index afbe5a347f838..83967a29fe00c 100644 --- a/google/cloud/monitoring/v3/internal/service_monitoring_auth_decorator.h +++ b/google/cloud/monitoring/v3/internal/service_monitoring_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -97,4 +100,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_SERVICE_MONITORING_AUTH_DECORATOR_H diff --git a/google/cloud/monitoring/v3/internal/service_monitoring_logging_decorator.cc b/google/cloud/monitoring/v3/internal/service_monitoring_logging_decorator.cc index adbb84e9fa711..7b4d9da2e2d40 100644 --- a/google/cloud/monitoring/v3/internal/service_monitoring_logging_decorator.cc +++ b/google/cloud/monitoring/v3/internal/service_monitoring_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/monitoring/v3/internal/service_monitoring_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/monitoring/v3/service_service.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -162,3 +165,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/service_monitoring_logging_decorator.h b/google/cloud/monitoring/v3/internal/service_monitoring_logging_decorator.h index 6347d27d52eb5..13843a07569bd 100644 --- a/google/cloud/monitoring/v3/internal/service_monitoring_logging_decorator.h +++ b/google/cloud/monitoring/v3/internal/service_monitoring_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -97,4 +100,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_SERVICE_MONITORING_LOGGING_DECORATOR_H diff --git a/google/cloud/monitoring/v3/internal/service_monitoring_metadata_decorator.cc b/google/cloud/monitoring/v3/internal/service_monitoring_metadata_decorator.cc index 8407c7d126921..55dc63e42e4b2 100644 --- a/google/cloud/monitoring/v3/internal/service_monitoring_metadata_decorator.cc +++ b/google/cloud/monitoring/v3/internal/service_monitoring_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/monitoring/v3/internal/service_monitoring_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/monitoring/v3/service_service.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -152,3 +156,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/service_monitoring_metadata_decorator.h b/google/cloud/monitoring/v3/internal/service_monitoring_metadata_decorator.h index 169294d40fb95..397fa7cfb04b4 100644 --- a/google/cloud/monitoring/v3/internal/service_monitoring_metadata_decorator.h +++ b/google/cloud/monitoring/v3/internal/service_monitoring_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -103,4 +106,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_SERVICE_MONITORING_METADATA_DECORATOR_H diff --git a/google/cloud/monitoring/v3/internal/service_monitoring_option_defaults.cc b/google/cloud/monitoring/v3/internal/service_monitoring_option_defaults.cc index 560229cc414bb..6d08b3a4ed7be 100644 --- a/google/cloud/monitoring/v3/internal/service_monitoring_option_defaults.cc +++ b/google/cloud/monitoring/v3/internal/service_monitoring_option_defaults.cc @@ -44,7 +44,7 @@ Options ServiceMonitoringServiceDefaultOptions(Options options) { .has()) { options.set( monitoring_v3::ServiceMonitoringServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/monitoring/v3/internal/service_monitoring_stub.cc b/google/cloud/monitoring/v3/internal/service_monitoring_stub.cc index b9b0c2bbcce89..288263e591a34 100644 --- a/google/cloud/monitoring/v3/internal/service_monitoring_stub.cc +++ b/google/cloud/monitoring/v3/internal/service_monitoring_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/monitoring/v3/internal/service_monitoring_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "google/monitoring/v3/service_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -157,3 +160,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/service_monitoring_stub.h b/google/cloud/monitoring/v3/internal/service_monitoring_stub.h index bdbc31c43c9bb..df87cdeb3b5ed 100644 --- a/google/cloud/monitoring/v3/internal/service_monitoring_stub.h +++ b/google/cloud/monitoring/v3/internal/service_monitoring_stub.h @@ -22,10 +22,13 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/monitoring/v3/service_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -154,4 +157,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_SERVICE_MONITORING_STUB_H diff --git a/google/cloud/monitoring/v3/internal/service_monitoring_stub_factory.cc b/google/cloud/monitoring/v3/internal/service_monitoring_stub_factory.cc index 42e8903cd7dd6..36cc340493df8 100644 --- a/google/cloud/monitoring/v3/internal/service_monitoring_stub_factory.cc +++ b/google/cloud/monitoring/v3/internal/service_monitoring_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/monitoring/v3/service_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/service_monitoring_stub_factory.h b/google/cloud/monitoring/v3/internal/service_monitoring_stub_factory.h index 284fef6ece51a..5484ec0b9d666 100644 --- a/google/cloud/monitoring/v3/internal/service_monitoring_stub_factory.h +++ b/google/cloud/monitoring/v3/internal/service_monitoring_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_SERVICE_MONITORING_STUB_FACTORY_H diff --git a/google/cloud/monitoring/v3/internal/service_monitoring_tracing_connection.cc b/google/cloud/monitoring/v3/internal/service_monitoring_tracing_connection.cc index 1fdfc82e9fcdd..8d535d4857cb1 100644 --- a/google/cloud/monitoring/v3/internal/service_monitoring_tracing_connection.cc +++ b/google/cloud/monitoring/v3/internal/service_monitoring_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace monitoring_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ServiceMonitoringServiceTracingConnection:: ServiceMonitoringServiceTracingConnection( std::shared_ptr @@ -133,17 +131,13 @@ Status ServiceMonitoringServiceTracingConnection::DeleteServiceLevelObjective( return internal::EndSpan(*span, child_->DeleteServiceLevelObjective(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeServiceMonitoringServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/monitoring/v3/internal/service_monitoring_tracing_connection.h b/google/cloud/monitoring/v3/internal/service_monitoring_tracing_connection.h index 2c63e67d40208..be6eb380d6467 100644 --- a/google/cloud/monitoring/v3/internal/service_monitoring_tracing_connection.h +++ b/google/cloud/monitoring/v3/internal/service_monitoring_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace monitoring_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ServiceMonitoringServiceTracingConnection : public monitoring_v3::ServiceMonitoringServiceConnection { public: @@ -83,8 +81,6 @@ class ServiceMonitoringServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/monitoring/v3/internal/service_monitoring_tracing_stub.cc b/google/cloud/monitoring/v3/internal/service_monitoring_tracing_stub.cc index 9d83816be0f7f..9dcfeb1855ab7 100644 --- a/google/cloud/monitoring/v3/internal/service_monitoring_tracing_stub.cc +++ b/google/cloud/monitoring/v3/internal/service_monitoring_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ServiceMonitoringServiceTracingStub::ServiceMonitoringServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -160,19 +161,15 @@ Status ServiceMonitoringServiceTracingStub::DeleteServiceLevelObjective( child_->DeleteServiceLevelObjective(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeServiceMonitoringServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/service_monitoring_tracing_stub.h b/google/cloud/monitoring/v3/internal/service_monitoring_tracing_stub.h index a62708a7008db..f7ba8bd3cbb6c 100644 --- a/google/cloud/monitoring/v3/internal/service_monitoring_tracing_stub.h +++ b/google/cloud/monitoring/v3/internal/service_monitoring_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ServiceMonitoringServiceTracingStub : public ServiceMonitoringServiceStub { public: @@ -95,8 +96,6 @@ class ServiceMonitoringServiceTracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -112,4 +111,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_SERVICE_MONITORING_TRACING_STUB_H diff --git a/google/cloud/monitoring/v3/internal/snooze_auth_decorator.cc b/google/cloud/monitoring/v3/internal/snooze_auth_decorator.cc index be84ea6351224..392691167d67f 100644 --- a/google/cloud/monitoring/v3/internal/snooze_auth_decorator.cc +++ b/google/cloud/monitoring/v3/internal/snooze_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/monitoring/v3/snooze_service.proto #include "google/cloud/monitoring/v3/internal/snooze_auth_decorator.h" -#include +#include "google/monitoring/v3/snooze_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -68,3 +71,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/snooze_auth_decorator.h b/google/cloud/monitoring/v3/internal/snooze_auth_decorator.h index 7e74a456cc9ca..25329d722f943 100644 --- a/google/cloud/monitoring/v3/internal/snooze_auth_decorator.h +++ b/google/cloud/monitoring/v3/internal/snooze_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -64,4 +67,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_SNOOZE_AUTH_DECORATOR_H diff --git a/google/cloud/monitoring/v3/internal/snooze_logging_decorator.cc b/google/cloud/monitoring/v3/internal/snooze_logging_decorator.cc index e30fa434cce58..003b7661f409b 100644 --- a/google/cloud/monitoring/v3/internal/snooze_logging_decorator.cc +++ b/google/cloud/monitoring/v3/internal/snooze_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/monitoring/v3/internal/snooze_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/monitoring/v3/snooze_service.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -84,3 +87,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/snooze_logging_decorator.h b/google/cloud/monitoring/v3/internal/snooze_logging_decorator.h index 78feb01fcdafe..9c94c4eb56619 100644 --- a/google/cloud/monitoring/v3/internal/snooze_logging_decorator.h +++ b/google/cloud/monitoring/v3/internal/snooze_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -64,4 +67,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_SNOOZE_LOGGING_DECORATOR_H diff --git a/google/cloud/monitoring/v3/internal/snooze_metadata_decorator.cc b/google/cloud/monitoring/v3/internal/snooze_metadata_decorator.cc index 6d26652d33ad2..62731529dd55c 100644 --- a/google/cloud/monitoring/v3/internal/snooze_metadata_decorator.cc +++ b/google/cloud/monitoring/v3/internal/snooze_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/monitoring/v3/internal/snooze_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/monitoring/v3/snooze_service.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -95,3 +99,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/snooze_metadata_decorator.h b/google/cloud/monitoring/v3/internal/snooze_metadata_decorator.h index f856388df442a..432835ef67f3d 100644 --- a/google/cloud/monitoring/v3/internal/snooze_metadata_decorator.h +++ b/google/cloud/monitoring/v3/internal/snooze_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -69,4 +72,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_SNOOZE_METADATA_DECORATOR_H diff --git a/google/cloud/monitoring/v3/internal/snooze_option_defaults.cc b/google/cloud/monitoring/v3/internal/snooze_option_defaults.cc index 98ef2a3a8c4f0..70cf558d7f8fd 100644 --- a/google/cloud/monitoring/v3/internal/snooze_option_defaults.cc +++ b/google/cloud/monitoring/v3/internal/snooze_option_defaults.cc @@ -41,7 +41,7 @@ Options SnoozeServiceDefaultOptions(Options options) { if (!options.has()) { options.set( monitoring_v3::SnoozeServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/monitoring/v3/internal/snooze_stub.cc b/google/cloud/monitoring/v3/internal/snooze_stub.cc index 847f622acefbb..f25fe99107447 100644 --- a/google/cloud/monitoring/v3/internal/snooze_stub.cc +++ b/google/cloud/monitoring/v3/internal/snooze_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/monitoring/v3/internal/snooze_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "google/monitoring/v3/snooze_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -79,3 +82,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/snooze_stub.h b/google/cloud/monitoring/v3/internal/snooze_stub.h index b2ff6727c9b31..7d1150a6afd8d 100644 --- a/google/cloud/monitoring/v3/internal/snooze_stub.h +++ b/google/cloud/monitoring/v3/internal/snooze_stub.h @@ -22,10 +22,13 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/monitoring/v3/snooze_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -85,4 +88,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_SNOOZE_STUB_H diff --git a/google/cloud/monitoring/v3/internal/snooze_stub_factory.cc b/google/cloud/monitoring/v3/internal/snooze_stub_factory.cc index a9c76d5a24adc..bccd9954abfa2 100644 --- a/google/cloud/monitoring/v3/internal/snooze_stub_factory.cc +++ b/google/cloud/monitoring/v3/internal/snooze_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/monitoring/v3/snooze_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -69,3 +72,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/snooze_stub_factory.h b/google/cloud/monitoring/v3/internal/snooze_stub_factory.h index e5431fb762b5d..7861990359580 100644 --- a/google/cloud/monitoring/v3/internal/snooze_stub_factory.h +++ b/google/cloud/monitoring/v3/internal/snooze_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_SNOOZE_STUB_FACTORY_H diff --git a/google/cloud/monitoring/v3/internal/snooze_tracing_connection.cc b/google/cloud/monitoring/v3/internal/snooze_tracing_connection.cc index d34f9f1e25606..0ce1af7ca0235 100644 --- a/google/cloud/monitoring/v3/internal/snooze_tracing_connection.cc +++ b/google/cloud/monitoring/v3/internal/snooze_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace monitoring_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SnoozeServiceTracingConnection::SnoozeServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -71,16 +69,12 @@ SnoozeServiceTracingConnection::UpdateSnooze( return internal::EndSpan(*span, child_->UpdateSnooze(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSnoozeServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/monitoring/v3/internal/snooze_tracing_connection.h b/google/cloud/monitoring/v3/internal/snooze_tracing_connection.h index f63a4a3e50f57..2cdbef406d59a 100644 --- a/google/cloud/monitoring/v3/internal/snooze_tracing_connection.h +++ b/google/cloud/monitoring/v3/internal/snooze_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace monitoring_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SnoozeServiceTracingConnection : public monitoring_v3::SnoozeServiceConnection { public: @@ -56,8 +54,6 @@ class SnoozeServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/monitoring/v3/internal/snooze_tracing_stub.cc b/google/cloud/monitoring/v3/internal/snooze_tracing_stub.cc index 0b8b6b32a9018..995b1f60caecc 100644 --- a/google/cloud/monitoring/v3/internal/snooze_tracing_stub.cc +++ b/google/cloud/monitoring/v3/internal/snooze_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SnoozeServiceTracingStub::SnoozeServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -77,18 +78,14 @@ StatusOr SnoozeServiceTracingStub::UpdateSnooze( child_->UpdateSnooze(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSnoozeServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/snooze_tracing_stub.h b/google/cloud/monitoring/v3/internal/snooze_tracing_stub.h index 275e8dd37b947..c33440c57decc 100644 --- a/google/cloud/monitoring/v3/internal/snooze_tracing_stub.h +++ b/google/cloud/monitoring/v3/internal/snooze_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SnoozeServiceTracingStub : public SnoozeServiceStub { public: ~SnoozeServiceTracingStub() override = default; @@ -60,8 +61,6 @@ class SnoozeServiceTracingStub : public SnoozeServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -76,4 +75,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_SNOOZE_TRACING_STUB_H diff --git a/google/cloud/monitoring/v3/internal/uptime_check_auth_decorator.cc b/google/cloud/monitoring/v3/internal/uptime_check_auth_decorator.cc index 5dd45d7963274..b81055396c12c 100644 --- a/google/cloud/monitoring/v3/internal/uptime_check_auth_decorator.cc +++ b/google/cloud/monitoring/v3/internal/uptime_check_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/monitoring/v3/uptime_service.proto #include "google/cloud/monitoring/v3/internal/uptime_check_auth_decorator.h" -#include +#include "google/monitoring/v3/uptime_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -88,3 +91,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/uptime_check_auth_decorator.h b/google/cloud/monitoring/v3/internal/uptime_check_auth_decorator.h index d01021345b958..a2f58015f13ec 100644 --- a/google/cloud/monitoring/v3/internal/uptime_check_auth_decorator.h +++ b/google/cloud/monitoring/v3/internal/uptime_check_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -79,4 +82,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_UPTIME_CHECK_AUTH_DECORATOR_H diff --git a/google/cloud/monitoring/v3/internal/uptime_check_logging_decorator.cc b/google/cloud/monitoring/v3/internal/uptime_check_logging_decorator.cc index 0babcdb818fba..39b72d82e8b22 100644 --- a/google/cloud/monitoring/v3/internal/uptime_check_logging_decorator.cc +++ b/google/cloud/monitoring/v3/internal/uptime_check_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/monitoring/v3/internal/uptime_check_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/monitoring/v3/uptime_service.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -115,3 +118,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/uptime_check_logging_decorator.h b/google/cloud/monitoring/v3/internal/uptime_check_logging_decorator.h index a08ffbeb694ae..5df3fd7b71bce 100644 --- a/google/cloud/monitoring/v3/internal/uptime_check_logging_decorator.h +++ b/google/cloud/monitoring/v3/internal/uptime_check_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -79,4 +82,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_UPTIME_CHECK_LOGGING_DECORATOR_H diff --git a/google/cloud/monitoring/v3/internal/uptime_check_metadata_decorator.cc b/google/cloud/monitoring/v3/internal/uptime_check_metadata_decorator.cc index aa0aaad8b901b..a902bc7a6ef33 100644 --- a/google/cloud/monitoring/v3/internal/uptime_check_metadata_decorator.cc +++ b/google/cloud/monitoring/v3/internal/uptime_check_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/monitoring/v3/internal/uptime_check_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/monitoring/v3/uptime_service.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -115,3 +119,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/uptime_check_metadata_decorator.h b/google/cloud/monitoring/v3/internal/uptime_check_metadata_decorator.h index 9a0330305f3a2..edb227ec9ffba 100644 --- a/google/cloud/monitoring/v3/internal/uptime_check_metadata_decorator.h +++ b/google/cloud/monitoring/v3/internal/uptime_check_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -85,4 +88,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_UPTIME_CHECK_METADATA_DECORATOR_H diff --git a/google/cloud/monitoring/v3/internal/uptime_check_option_defaults.cc b/google/cloud/monitoring/v3/internal/uptime_check_option_defaults.cc index f683011b6d3e2..88f68e1276f77 100644 --- a/google/cloud/monitoring/v3/internal/uptime_check_option_defaults.cc +++ b/google/cloud/monitoring/v3/internal/uptime_check_option_defaults.cc @@ -42,7 +42,7 @@ Options UptimeCheckServiceDefaultOptions(Options options) { if (!options.has()) { options.set( monitoring_v3::UptimeCheckServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/monitoring/v3/internal/uptime_check_stub.cc b/google/cloud/monitoring/v3/internal/uptime_check_stub.cc index 9ebdbcf599298..e428ce1bdd446 100644 --- a/google/cloud/monitoring/v3/internal/uptime_check_stub.cc +++ b/google/cloud/monitoring/v3/internal/uptime_check_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/monitoring/v3/internal/uptime_check_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "google/monitoring/v3/uptime_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -109,3 +112,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/uptime_check_stub.h b/google/cloud/monitoring/v3/internal/uptime_check_stub.h index 75c43250fdbcb..6a05760016482 100644 --- a/google/cloud/monitoring/v3/internal/uptime_check_stub.h +++ b/google/cloud/monitoring/v3/internal/uptime_check_stub.h @@ -22,10 +22,13 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/monitoring/v3/uptime_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -116,4 +119,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_UPTIME_CHECK_STUB_H diff --git a/google/cloud/monitoring/v3/internal/uptime_check_stub_factory.cc b/google/cloud/monitoring/v3/internal/uptime_check_stub_factory.cc index 87366269ebfcd..6b4c873a21d9b 100644 --- a/google/cloud/monitoring/v3/internal/uptime_check_stub_factory.cc +++ b/google/cloud/monitoring/v3/internal/uptime_check_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/monitoring/v3/uptime_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/uptime_check_stub_factory.h b/google/cloud/monitoring/v3/internal/uptime_check_stub_factory.h index 8a81dbc4dc366..80031297f130b 100644 --- a/google/cloud/monitoring/v3/internal/uptime_check_stub_factory.h +++ b/google/cloud/monitoring/v3/internal/uptime_check_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_UPTIME_CHECK_STUB_FACTORY_H diff --git a/google/cloud/monitoring/v3/internal/uptime_check_tracing_connection.cc b/google/cloud/monitoring/v3/internal/uptime_check_tracing_connection.cc index 9135e3336ce88..e061a378cf3e6 100644 --- a/google/cloud/monitoring/v3/internal/uptime_check_tracing_connection.cc +++ b/google/cloud/monitoring/v3/internal/uptime_check_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace monitoring_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - UptimeCheckServiceTracingConnection::UptimeCheckServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -91,17 +89,13 @@ UptimeCheckServiceTracingConnection::ListUptimeCheckIps( std::move(span), std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeUptimeCheckServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/monitoring/v3/internal/uptime_check_tracing_connection.h b/google/cloud/monitoring/v3/internal/uptime_check_tracing_connection.h index f462e47dbf0c5..47165f2211243 100644 --- a/google/cloud/monitoring/v3/internal/uptime_check_tracing_connection.h +++ b/google/cloud/monitoring/v3/internal/uptime_check_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace monitoring_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class UptimeCheckServiceTracingConnection : public monitoring_v3::UptimeCheckServiceConnection { public: @@ -66,8 +64,6 @@ class UptimeCheckServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/monitoring/v3/internal/uptime_check_tracing_stub.cc b/google/cloud/monitoring/v3/internal/uptime_check_tracing_stub.cc index bd0fc8358cb9f..22bcbf518318c 100644 --- a/google/cloud/monitoring/v3/internal/uptime_check_tracing_stub.cc +++ b/google/cloud/monitoring/v3/internal/uptime_check_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - UptimeCheckServiceTracingStub::UptimeCheckServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -107,18 +108,14 @@ UptimeCheckServiceTracingStub::ListUptimeCheckIps( context, *span, child_->ListUptimeCheckIps(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeUptimeCheckServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace monitoring_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/monitoring/v3/internal/uptime_check_tracing_stub.h b/google/cloud/monitoring/v3/internal/uptime_check_tracing_stub.h index e5fbec21be3d6..d813aaecbe563 100644 --- a/google/cloud/monitoring/v3/internal/uptime_check_tracing_stub.h +++ b/google/cloud/monitoring/v3/internal/uptime_check_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace monitoring_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class UptimeCheckServiceTracingStub : public UptimeCheckServiceStub { public: ~UptimeCheckServiceTracingStub() override = default; @@ -76,8 +77,6 @@ class UptimeCheckServiceTracingStub : public UptimeCheckServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -92,4 +91,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_MONITORING_V3_INTERNAL_UPTIME_CHECK_TRACING_STUB_H diff --git a/google/cloud/monitoring/v3/metric_connection.h b/google/cloud/monitoring/v3/metric_connection.h index 8842e0a37abf7..2bec797bf2745 100644 --- a/google/cloud/monitoring/v3/metric_connection.h +++ b/google/cloud/monitoring/v3/metric_connection.h @@ -28,7 +28,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/monitoring/v3/metric_service.pb.h" #include namespace google { diff --git a/google/cloud/monitoring/v3/metric_connection_idempotency_policy.h b/google/cloud/monitoring/v3/metric_connection_idempotency_policy.h index e1d6d5d6dfb84..80176db57ab87 100644 --- a/google/cloud/monitoring/v3/metric_connection_idempotency_policy.h +++ b/google/cloud/monitoring/v3/metric_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/monitoring/v3/metric_service.grpc.pb.h" #include namespace google { diff --git a/google/cloud/monitoring/v3/notification_channel_connection.h b/google/cloud/monitoring/v3/notification_channel_connection.h index 121d40016f60c..b9bda3f8e3a0d 100644 --- a/google/cloud/monitoring/v3/notification_channel_connection.h +++ b/google/cloud/monitoring/v3/notification_channel_connection.h @@ -27,7 +27,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/monitoring/v3/notification_service.pb.h" #include namespace google { diff --git a/google/cloud/monitoring/v3/notification_channel_connection_idempotency_policy.h b/google/cloud/monitoring/v3/notification_channel_connection_idempotency_policy.h index b3d0c2fa6b92e..4dd1c90db1115 100644 --- a/google/cloud/monitoring/v3/notification_channel_connection_idempotency_policy.h +++ b/google/cloud/monitoring/v3/notification_channel_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/monitoring/v3/notification_service.grpc.pb.h" #include namespace google { diff --git a/google/cloud/monitoring/v3/query_connection.h b/google/cloud/monitoring/v3/query_connection.h index 104d50b77b132..8eed2998d8023 100644 --- a/google/cloud/monitoring/v3/query_connection.h +++ b/google/cloud/monitoring/v3/query_connection.h @@ -27,7 +27,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/monitoring/v3/query_service.pb.h" #include namespace google { diff --git a/google/cloud/monitoring/v3/query_connection_idempotency_policy.h b/google/cloud/monitoring/v3/query_connection_idempotency_policy.h index 0d480646cd5a5..03384dd2ef14c 100644 --- a/google/cloud/monitoring/v3/query_connection_idempotency_policy.h +++ b/google/cloud/monitoring/v3/query_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/monitoring/v3/query_service.grpc.pb.h" #include namespace google { diff --git a/google/cloud/monitoring/v3/service_monitoring_connection.h b/google/cloud/monitoring/v3/service_monitoring_connection.h index e35d14c50e859..a77ae5b34aa22 100644 --- a/google/cloud/monitoring/v3/service_monitoring_connection.h +++ b/google/cloud/monitoring/v3/service_monitoring_connection.h @@ -27,7 +27,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/monitoring/v3/service_service.pb.h" #include namespace google { diff --git a/google/cloud/monitoring/v3/service_monitoring_connection_idempotency_policy.h b/google/cloud/monitoring/v3/service_monitoring_connection_idempotency_policy.h index cfbf41a37e2ed..9c8a3b4b74853 100644 --- a/google/cloud/monitoring/v3/service_monitoring_connection_idempotency_policy.h +++ b/google/cloud/monitoring/v3/service_monitoring_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/monitoring/v3/service_service.grpc.pb.h" #include namespace google { diff --git a/google/cloud/monitoring/v3/snooze_connection.h b/google/cloud/monitoring/v3/snooze_connection.h index 3d785cd7afc4d..75c1b39eccfbe 100644 --- a/google/cloud/monitoring/v3/snooze_connection.h +++ b/google/cloud/monitoring/v3/snooze_connection.h @@ -27,7 +27,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/monitoring/v3/snooze_service.pb.h" #include namespace google { diff --git a/google/cloud/monitoring/v3/snooze_connection_idempotency_policy.h b/google/cloud/monitoring/v3/snooze_connection_idempotency_policy.h index 0acdf7829c643..114e19f5dc41d 100644 --- a/google/cloud/monitoring/v3/snooze_connection_idempotency_policy.h +++ b/google/cloud/monitoring/v3/snooze_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/monitoring/v3/snooze_service.grpc.pb.h" #include namespace google { diff --git a/google/cloud/monitoring/v3/uptime_check_connection.h b/google/cloud/monitoring/v3/uptime_check_connection.h index e423daa52ab6c..1f9e5adca3617 100644 --- a/google/cloud/monitoring/v3/uptime_check_connection.h +++ b/google/cloud/monitoring/v3/uptime_check_connection.h @@ -27,7 +27,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/monitoring/v3/uptime_service.pb.h" #include namespace google { diff --git a/google/cloud/monitoring/v3/uptime_check_connection_idempotency_policy.h b/google/cloud/monitoring/v3/uptime_check_connection_idempotency_policy.h index 6ab43a7d000d0..d3ab7df224981 100644 --- a/google/cloud/monitoring/v3/uptime_check_connection_idempotency_policy.h +++ b/google/cloud/monitoring/v3/uptime_check_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/monitoring/v3/uptime_service.grpc.pb.h" #include namespace google { diff --git a/google/cloud/netapp/BUILD.bazel b/google/cloud/netapp/BUILD.bazel index a56322706ac90..43f51cf274ec1 100644 --- a/google/cloud/netapp/BUILD.bazel +++ b/google/cloud/netapp/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/netapp/v1:netapp_cc_grpc", + "@googleapis//google/cloud/netapp/v1:netapp_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/netapp/quickstart/.bazelrc b/google/cloud/netapp/quickstart/.bazelrc index 6777c6b4c95de..ec27511a60add 100644 --- a/google/cloud/netapp/quickstart/.bazelrc +++ b/google/cloud/netapp/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/netapp/quickstart/CMakeLists.txt b/google/cloud/netapp/quickstart/CMakeLists.txt index 1dab8e37d7622..46fbd6cb13c4d 100644 --- a/google/cloud/netapp/quickstart/CMakeLists.txt +++ b/google/cloud/netapp/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the NetApp API C++ client library from a larger # CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-netapp-quickstart CXX) find_package(google_cloud_cpp_netapp REQUIRED) diff --git a/google/cloud/netapp/v1/internal/net_app_auth_decorator.cc b/google/cloud/netapp/v1/internal/net_app_auth_decorator.cc index 4b59be50845a7..39971658e6c06 100644 --- a/google/cloud/netapp/v1/internal/net_app_auth_decorator.cc +++ b/google/cloud/netapp/v1/internal/net_app_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/netapp/v1/cloud_netapp_service.proto #include "google/cloud/netapp/v1/internal/net_app_auth_decorator.h" -#include +#include "google/cloud/netapp/v1/cloud_netapp_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace netapp_v1_internal { @@ -1517,3 +1520,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace netapp_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/netapp/v1/internal/net_app_auth_decorator.h b/google/cloud/netapp/v1/internal/net_app_auth_decorator.h index 09872b5bf035e..c2db4c139e214 100644 --- a/google/cloud/netapp/v1/internal/net_app_auth_decorator.h +++ b/google/cloud/netapp/v1/internal/net_app_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/netapp/v1/internal/net_app_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace netapp_v1_internal { @@ -682,4 +685,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETAPP_V1_INTERNAL_NET_APP_AUTH_DECORATOR_H diff --git a/google/cloud/netapp/v1/internal/net_app_connection_impl.h b/google/cloud/netapp/v1/internal/net_app_connection_impl.h index 10f3d9d619f3c..c43b744c92fbc 100644 --- a/google/cloud/netapp/v1/internal/net_app_connection_impl.h +++ b/google/cloud/netapp/v1/internal/net_app_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/netapp/v1/internal/net_app_logging_decorator.cc b/google/cloud/netapp/v1/internal/net_app_logging_decorator.cc index 0f7128980b513..bd2ebd14eea39 100644 --- a/google/cloud/netapp/v1/internal/net_app_logging_decorator.cc +++ b/google/cloud/netapp/v1/internal/net_app_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/netapp/v1/cloud_netapp_service.proto #include "google/cloud/netapp/v1/internal/net_app_logging_decorator.h" +#include "google/cloud/netapp/v1/cloud_netapp_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace netapp_v1_internal { @@ -1710,3 +1713,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace netapp_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/netapp/v1/internal/net_app_logging_decorator.h b/google/cloud/netapp/v1/internal/net_app_logging_decorator.h index e1be042868735..2912956773d50 100644 --- a/google/cloud/netapp/v1/internal/net_app_logging_decorator.h +++ b/google/cloud/netapp/v1/internal/net_app_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/netapp/v1/internal/net_app_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace netapp_v1_internal { @@ -682,4 +685,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETAPP_V1_INTERNAL_NET_APP_LOGGING_DECORATOR_H diff --git a/google/cloud/netapp/v1/internal/net_app_metadata_decorator.cc b/google/cloud/netapp/v1/internal/net_app_metadata_decorator.cc index 75bb686750a38..0b4c24fd748dc 100644 --- a/google/cloud/netapp/v1/internal/net_app_metadata_decorator.cc +++ b/google/cloud/netapp/v1/internal/net_app_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/netapp/v1/cloud_netapp_service.proto #include "google/cloud/netapp/v1/internal/net_app_metadata_decorator.h" +#include "google/cloud/netapp/v1/cloud_netapp_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace netapp_v1_internal { @@ -1223,3 +1227,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace netapp_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/netapp/v1/internal/net_app_metadata_decorator.h b/google/cloud/netapp/v1/internal/net_app_metadata_decorator.h index 8dca383ccd1f5..df38e38c3fed4 100644 --- a/google/cloud/netapp/v1/internal/net_app_metadata_decorator.h +++ b/google/cloud/netapp/v1/internal/net_app_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/netapp/v1/internal/net_app_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace netapp_v1_internal { @@ -687,4 +690,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETAPP_V1_INTERNAL_NET_APP_METADATA_DECORATOR_H diff --git a/google/cloud/netapp/v1/internal/net_app_option_defaults.cc b/google/cloud/netapp/v1/internal/net_app_option_defaults.cc index 83d72b8ad642d..d9428143ce890 100644 --- a/google/cloud/netapp/v1/internal/net_app_option_defaults.cc +++ b/google/cloud/netapp/v1/internal/net_app_option_defaults.cc @@ -40,7 +40,7 @@ Options NetAppDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - netapp_v1::NetAppLimitedTimeRetryPolicy(std::chrono::minutes(30)) + netapp_v1::NetAppLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/netapp/v1/internal/net_app_stub.cc b/google/cloud/netapp/v1/internal/net_app_stub.cc index 4293517635446..aa12edd06d01b 100644 --- a/google/cloud/netapp/v1/internal/net_app_stub.cc +++ b/google/cloud/netapp/v1/internal/net_app_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/netapp/v1/cloud_netapp_service.proto #include "google/cloud/netapp/v1/internal/net_app_stub.h" +#include "google/cloud/netapp/v1/cloud_netapp_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace netapp_v1_internal { @@ -1682,3 +1685,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace netapp_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/netapp/v1/internal/net_app_stub.h b/google/cloud/netapp/v1/internal/net_app_stub.h index a4243be3e8420..ef4b555190db5 100644 --- a/google/cloud/netapp/v1/internal/net_app_stub.h +++ b/google/cloud/netapp/v1/internal/net_app_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETAPP_V1_INTERNAL_NET_APP_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETAPP_V1_INTERNAL_NET_APP_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/netapp/v1/cloud_netapp_service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace netapp_v1_internal { @@ -1303,4 +1306,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETAPP_V1_INTERNAL_NET_APP_STUB_H diff --git a/google/cloud/netapp/v1/internal/net_app_stub_factory.cc b/google/cloud/netapp/v1/internal/net_app_stub_factory.cc index 5286c3fb763b6..c2bad9dabe0ef 100644 --- a/google/cloud/netapp/v1/internal/net_app_stub_factory.cc +++ b/google/cloud/netapp/v1/internal/net_app_stub_factory.cc @@ -17,6 +17,8 @@ // source: google/cloud/netapp/v1/cloud_netapp_service.proto #include "google/cloud/netapp/v1/internal/net_app_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/netapp/v1/cloud_netapp_service.grpc.pb.h" #include "google/cloud/netapp/v1/internal/net_app_auth_decorator.h" #include "google/cloud/netapp/v1/internal/net_app_logging_decorator.h" #include "google/cloud/netapp/v1/internal/net_app_metadata_decorator.h" @@ -28,12 +30,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace netapp_v1_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace netapp_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/netapp/v1/internal/net_app_stub_factory.h b/google/cloud/netapp/v1/internal/net_app_stub_factory.h index 58aa50ac79fe8..2e609c5658052 100644 --- a/google/cloud/netapp/v1/internal/net_app_stub_factory.h +++ b/google/cloud/netapp/v1/internal/net_app_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace netapp_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETAPP_V1_INTERNAL_NET_APP_STUB_FACTORY_H diff --git a/google/cloud/netapp/v1/internal/net_app_tracing_connection.cc b/google/cloud/netapp/v1/internal/net_app_tracing_connection.cc index 5235463971cb7..c66e36e456b10 100644 --- a/google/cloud/netapp/v1/internal/net_app_tracing_connection.cc +++ b/google/cloud/netapp/v1/internal/net_app_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace netapp_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - NetAppTracingConnection::NetAppTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -1523,15 +1521,11 @@ Status NetAppTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeNetAppTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/netapp/v1/internal/net_app_tracing_connection.h b/google/cloud/netapp/v1/internal/net_app_tracing_connection.h index 83a3b66450419..efa5d29e25007 100644 --- a/google/cloud/netapp/v1/internal/net_app_tracing_connection.h +++ b/google/cloud/netapp/v1/internal/net_app_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace netapp_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class NetAppTracingConnection : public netapp_v1::NetAppConnection { public: ~NetAppTracingConnection() override = default; @@ -639,8 +637,6 @@ class NetAppTracingConnection : public netapp_v1::NetAppConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/netapp/v1/internal/net_app_tracing_stub.cc b/google/cloud/netapp/v1/internal/net_app_tracing_stub.cc index d0ec17e559190..cae9272ea4f95 100644 --- a/google/cloud/netapp/v1/internal/net_app_tracing_stub.cc +++ b/google/cloud/netapp/v1/internal/net_app_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace netapp_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - NetAppTracingStub::NetAppTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -1519,18 +1520,14 @@ future NetAppTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeNetAppTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace netapp_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/netapp/v1/internal/net_app_tracing_stub.h b/google/cloud/netapp/v1/internal/net_app_tracing_stub.h index 3e093da1648e4..bae1a7401e7e9 100644 --- a/google/cloud/netapp/v1/internal/net_app_tracing_stub.h +++ b/google/cloud/netapp/v1/internal/net_app_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace netapp_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class NetAppTracingStub : public NetAppStub { public: ~NetAppTracingStub() override = default; @@ -677,8 +678,6 @@ class NetAppTracingStub : public NetAppStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -693,4 +692,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETAPP_V1_INTERNAL_NET_APP_TRACING_STUB_H diff --git a/google/cloud/netapp/v1/net_app_client.h b/google/cloud/netapp/v1/net_app_client.h index ec3be83157b28..8ef57d88aa926 100644 --- a/google/cloud/netapp/v1/net_app_client.h +++ b/google/cloud/netapp/v1/net_app_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/netapp/v1/net_app_connection.h b/google/cloud/netapp/v1/net_app_connection.h index 6b8b94903daf3..2ec65dc67014a 100644 --- a/google/cloud/netapp/v1/net_app_connection.h +++ b/google/cloud/netapp/v1/net_app_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETAPP_V1_NET_APP_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETAPP_V1_NET_APP_CONNECTION_H +#include "google/cloud/netapp/v1/cloud_netapp_service.pb.h" #include "google/cloud/netapp/v1/internal/net_app_retry_traits.h" #include "google/cloud/netapp/v1/net_app_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/netapp/v1/net_app_connection_idempotency_policy.h b/google/cloud/netapp/v1/net_app_connection_idempotency_policy.h index 12d1d4fc584b5..e77e1129d518f 100644 --- a/google/cloud/netapp/v1/net_app_connection_idempotency_policy.h +++ b/google/cloud/netapp/v1/net_app_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETAPP_V1_NET_APP_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETAPP_V1_NET_APP_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/netapp/v1/cloud_netapp_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/networkconnectivity/BUILD.bazel b/google/cloud/networkconnectivity/BUILD.bazel index b00c4d9762a5d..2c5e0932cf876 100644 --- a/google/cloud/networkconnectivity/BUILD.bazel +++ b/google/cloud/networkconnectivity/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/networkconnectivity/v1:networkconnectivity_cc_grpc", + "@googleapis//google/cloud/networkconnectivity/v1:networkconnectivity_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/networkconnectivity/CMakeLists.txt b/google/cloud/networkconnectivity/CMakeLists.txt index 27b71c2ca8640..025c214fc5804 100644 --- a/google/cloud/networkconnectivity/CMakeLists.txt +++ b/google/cloud/networkconnectivity/CMakeLists.txt @@ -17,8 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library( - networkconnectivity "Network Connectivity API" SERVICE_DIRS "__EMPTY__" - "v1/") + networkconnectivity "Network Connectivity API" SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(networkconnectivity_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/networkconnectivity/hub_client.h b/google/cloud/networkconnectivity/hub_client.h deleted file mode 100644 index 93325fc71ddf2..0000000000000 --- a/google/cloud/networkconnectivity/hub_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/networkconnectivity/v1/hub.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_HUB_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_HUB_CLIENT_H - -#include "google/cloud/networkconnectivity/hub_connection.h" -#include "google/cloud/networkconnectivity/v1/hub_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in networkconnectivity_v1 instead of the aliases defined -/// in this namespace. -namespace networkconnectivity { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use networkconnectivity_v1::HubServiceClient directly. -using ::google::cloud::networkconnectivity_v1::HubServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace networkconnectivity -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_HUB_CLIENT_H diff --git a/google/cloud/networkconnectivity/hub_connection.h b/google/cloud/networkconnectivity/hub_connection.h deleted file mode 100644 index ae1b4a9c0d504..0000000000000 --- a/google/cloud/networkconnectivity/hub_connection.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/networkconnectivity/v1/hub.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_HUB_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_HUB_CONNECTION_H - -#include "google/cloud/networkconnectivity/hub_connection_idempotency_policy.h" -#include "google/cloud/networkconnectivity/v1/hub_connection.h" - -namespace google { -namespace cloud { -namespace networkconnectivity { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use networkconnectivity_v1::MakeHubServiceConnection directly. -using ::google::cloud::networkconnectivity_v1::MakeHubServiceConnection; - -/// @deprecated Use networkconnectivity_v1::HubServiceConnection directly. -using ::google::cloud::networkconnectivity_v1::HubServiceConnection; - -/// @deprecated Use -/// networkconnectivity_v1::HubServiceLimitedErrorCountRetryPolicy directly. -using ::google::cloud::networkconnectivity_v1:: - HubServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use networkconnectivity_v1::HubServiceLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::networkconnectivity_v1::HubServiceLimitedTimeRetryPolicy; - -/// @deprecated Use networkconnectivity_v1::HubServiceRetryPolicy directly. -using ::google::cloud::networkconnectivity_v1::HubServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace networkconnectivity -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_HUB_CONNECTION_H diff --git a/google/cloud/networkconnectivity/hub_connection_idempotency_policy.h b/google/cloud/networkconnectivity/hub_connection_idempotency_policy.h deleted file mode 100644 index 6acb7f3f82dde..0000000000000 --- a/google/cloud/networkconnectivity/hub_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/networkconnectivity/v1/hub.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_HUB_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_HUB_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/networkconnectivity/v1/hub_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace networkconnectivity { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// networkconnectivity_v1::MakeDefaultHubServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::networkconnectivity_v1:: - MakeDefaultHubServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// networkconnectivity_v1::HubServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::networkconnectivity_v1:: - HubServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace networkconnectivity -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_HUB_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/networkconnectivity/hub_options.h b/google/cloud/networkconnectivity/hub_options.h deleted file mode 100644 index 28fc557125867..0000000000000 --- a/google/cloud/networkconnectivity/hub_options.h +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/networkconnectivity/v1/hub.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_HUB_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_HUB_OPTIONS_H - -#include "google/cloud/networkconnectivity/hub_connection.h" -#include "google/cloud/networkconnectivity/hub_connection_idempotency_policy.h" -#include "google/cloud/networkconnectivity/v1/hub_options.h" - -namespace google { -namespace cloud { -namespace networkconnectivity { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use networkconnectivity_v1::HubServicePollingPolicyOption -/// directly. -using ::google::cloud::networkconnectivity_v1::HubServicePollingPolicyOption; - -/// @deprecated Use networkconnectivity_v1::HubServiceBackoffPolicyOption -/// directly. -using ::google::cloud::networkconnectivity_v1::HubServiceBackoffPolicyOption; - -/// @deprecated Use -/// networkconnectivity_v1::HubServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::networkconnectivity_v1:: - HubServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use networkconnectivity_v1::HubServicePolicyOptionList directly. -using ::google::cloud::networkconnectivity_v1::HubServicePolicyOptionList; - -/// @deprecated Use networkconnectivity_v1::HubServiceRetryPolicyOption -/// directly. -using ::google::cloud::networkconnectivity_v1::HubServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace networkconnectivity -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_HUB_OPTIONS_H diff --git a/google/cloud/networkconnectivity/mocks/mock_hub_connection.h b/google/cloud/networkconnectivity/mocks/mock_hub_connection.h deleted file mode 100644 index c4375b4e8c9e4..0000000000000 --- a/google/cloud/networkconnectivity/mocks/mock_hub_connection.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/networkconnectivity/v1/hub.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_MOCKS_MOCK_HUB_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_MOCKS_MOCK_HUB_CONNECTION_H - -#include "google/cloud/networkconnectivity/hub_connection.h" -#include "google/cloud/networkconnectivity/v1/mocks/mock_hub_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in networkconnectivity_v1_mocks instead of the aliases -/// defined in this namespace. -namespace networkconnectivity_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use networkconnectivity_v1_mocks::MockHubServiceConnection -/// directly. -using ::google::cloud::networkconnectivity_v1_mocks::MockHubServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace networkconnectivity_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_MOCKS_MOCK_HUB_CONNECTION_H diff --git a/google/cloud/networkconnectivity/quickstart/.bazelrc b/google/cloud/networkconnectivity/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/networkconnectivity/quickstart/.bazelrc +++ b/google/cloud/networkconnectivity/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/networkconnectivity/quickstart/CMakeLists.txt b/google/cloud/networkconnectivity/quickstart/CMakeLists.txt index 19f9e5e8d3dd5..ee06fee9fb9f8 100644 --- a/google/cloud/networkconnectivity/quickstart/CMakeLists.txt +++ b/google/cloud/networkconnectivity/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Network Connectivity API C++ client library # from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-networkconnectivity-quickstart CXX) find_package(google_cloud_cpp_networkconnectivity REQUIRED) diff --git a/google/cloud/networkconnectivity/v1/data_transfer_client.h b/google/cloud/networkconnectivity/v1/data_transfer_client.h index 1270d886dd554..d15e78472be27 100644 --- a/google/cloud/networkconnectivity/v1/data_transfer_client.h +++ b/google/cloud/networkconnectivity/v1/data_transfer_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/networkconnectivity/v1/data_transfer_connection.h b/google/cloud/networkconnectivity/v1/data_transfer_connection.h index 4a234ea5cf626..b40dd527764b1 100644 --- a/google/cloud/networkconnectivity/v1/data_transfer_connection.h +++ b/google/cloud/networkconnectivity/v1/data_transfer_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_DATA_TRANSFER_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_DATA_TRANSFER_CONNECTION_H +#include "google/cloud/networkconnectivity/v1/data_transfer.pb.h" #include "google/cloud/networkconnectivity/v1/data_transfer_connection_idempotency_policy.h" #include "google/cloud/networkconnectivity/v1/internal/data_transfer_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/networkconnectivity/v1/data_transfer_connection_idempotency_policy.h b/google/cloud/networkconnectivity/v1/data_transfer_connection_idempotency_policy.h index 93ee8dc589edf..5c82cb33337da 100644 --- a/google/cloud/networkconnectivity/v1/data_transfer_connection_idempotency_policy.h +++ b/google/cloud/networkconnectivity/v1/data_transfer_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_DATA_TRANSFER_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_DATA_TRANSFER_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/networkconnectivity/v1/data_transfer.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/networkconnectivity/v1/hub_client.h b/google/cloud/networkconnectivity/v1/hub_client.h index c9eea6a58e232..e41028baf726c 100644 --- a/google/cloud/networkconnectivity/v1/hub_client.h +++ b/google/cloud/networkconnectivity/v1/hub_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/networkconnectivity/v1/hub_connection.h b/google/cloud/networkconnectivity/v1/hub_connection.h index d7e41f2e09191..23727b9fd84a8 100644 --- a/google/cloud/networkconnectivity/v1/hub_connection.h +++ b/google/cloud/networkconnectivity/v1/hub_connection.h @@ -19,6 +19,8 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_HUB_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_HUB_CONNECTION_H +#include "google/cloud/networkconnectivity/v1/common.pb.h" +#include "google/cloud/networkconnectivity/v1/hub.pb.h" #include "google/cloud/networkconnectivity/v1/hub_connection_idempotency_policy.h" #include "google/cloud/networkconnectivity/v1/internal/hub_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,9 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/networkconnectivity/v1/hub_connection_idempotency_policy.h b/google/cloud/networkconnectivity/v1/hub_connection_idempotency_policy.h index 81ec5aecfdf65..fe8a2a8db2cb8 100644 --- a/google/cloud/networkconnectivity/v1/hub_connection_idempotency_policy.h +++ b/google/cloud/networkconnectivity/v1/hub_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_HUB_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_HUB_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/networkconnectivity/v1/hub.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/networkconnectivity/v1/internal/data_transfer_auth_decorator.cc b/google/cloud/networkconnectivity/v1/internal/data_transfer_auth_decorator.cc index abbb1281d3cca..42de8b43562b1 100644 --- a/google/cloud/networkconnectivity/v1/internal/data_transfer_auth_decorator.cc +++ b/google/cloud/networkconnectivity/v1/internal/data_transfer_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/networkconnectivity/v1/data_transfer.proto #include "google/cloud/networkconnectivity/v1/internal/data_transfer_auth_decorator.h" -#include +#include "google/cloud/networkconnectivity/v1/data_transfer.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { @@ -398,3 +401,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkconnectivity_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkconnectivity/v1/internal/data_transfer_auth_decorator.h b/google/cloud/networkconnectivity/v1/internal/data_transfer_auth_decorator.h index db94b0bc72caf..274b598bcd1fd 100644 --- a/google/cloud/networkconnectivity/v1/internal/data_transfer_auth_decorator.h +++ b/google/cloud/networkconnectivity/v1/internal/data_transfer_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/networkconnectivity/v1/internal/data_transfer_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { @@ -212,4 +215,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_INTERNAL_DATA_TRANSFER_AUTH_DECORATOR_H diff --git a/google/cloud/networkconnectivity/v1/internal/data_transfer_connection_impl.h b/google/cloud/networkconnectivity/v1/internal/data_transfer_connection_impl.h index 499c6afe3f2d0..663ae7a966023 100644 --- a/google/cloud/networkconnectivity/v1/internal/data_transfer_connection_impl.h +++ b/google/cloud/networkconnectivity/v1/internal/data_transfer_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/networkconnectivity/v1/internal/data_transfer_logging_decorator.cc b/google/cloud/networkconnectivity/v1/internal/data_transfer_logging_decorator.cc index fbb408449389d..0e5a864b548a9 100644 --- a/google/cloud/networkconnectivity/v1/internal/data_transfer_logging_decorator.cc +++ b/google/cloud/networkconnectivity/v1/internal/data_transfer_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/networkconnectivity/v1/data_transfer.proto #include "google/cloud/networkconnectivity/v1/internal/data_transfer_logging_decorator.h" +#include "google/cloud/networkconnectivity/v1/data_transfer.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { @@ -480,3 +483,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkconnectivity_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkconnectivity/v1/internal/data_transfer_logging_decorator.h b/google/cloud/networkconnectivity/v1/internal/data_transfer_logging_decorator.h index bfe46c7599054..e95566fbbfd97 100644 --- a/google/cloud/networkconnectivity/v1/internal/data_transfer_logging_decorator.h +++ b/google/cloud/networkconnectivity/v1/internal/data_transfer_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/networkconnectivity/v1/internal/data_transfer_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { @@ -212,4 +215,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_INTERNAL_DATA_TRANSFER_LOGGING_DECORATOR_H diff --git a/google/cloud/networkconnectivity/v1/internal/data_transfer_metadata_decorator.cc b/google/cloud/networkconnectivity/v1/internal/data_transfer_metadata_decorator.cc index f57ac01552b29..d4b48d06f7cf3 100644 --- a/google/cloud/networkconnectivity/v1/internal/data_transfer_metadata_decorator.cc +++ b/google/cloud/networkconnectivity/v1/internal/data_transfer_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/networkconnectivity/v1/data_transfer.proto #include "google/cloud/networkconnectivity/v1/internal/data_transfer_metadata_decorator.h" +#include "google/cloud/networkconnectivity/v1/data_transfer.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { @@ -375,3 +379,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkconnectivity_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkconnectivity/v1/internal/data_transfer_metadata_decorator.h b/google/cloud/networkconnectivity/v1/internal/data_transfer_metadata_decorator.h index 5e3636806de9c..ed21d6d0314e8 100644 --- a/google/cloud/networkconnectivity/v1/internal/data_transfer_metadata_decorator.h +++ b/google/cloud/networkconnectivity/v1/internal/data_transfer_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/networkconnectivity/v1/internal/data_transfer_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { @@ -218,4 +221,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_INTERNAL_DATA_TRANSFER_METADATA_DECORATOR_H diff --git a/google/cloud/networkconnectivity/v1/internal/data_transfer_option_defaults.cc b/google/cloud/networkconnectivity/v1/internal/data_transfer_option_defaults.cc index a4190d1d66ac5..aec5247c007c0 100644 --- a/google/cloud/networkconnectivity/v1/internal/data_transfer_option_defaults.cc +++ b/google/cloud/networkconnectivity/v1/internal/data_transfer_option_defaults.cc @@ -43,7 +43,7 @@ Options DataTransferServiceDefaultOptions(Options options) { networkconnectivity_v1::DataTransferServiceRetryPolicyOption>()) { options.set( networkconnectivity_v1::DataTransferServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/networkconnectivity/v1/internal/data_transfer_stub.cc b/google/cloud/networkconnectivity/v1/internal/data_transfer_stub.cc index 77a924cfe5816..9c7321af61d96 100644 --- a/google/cloud/networkconnectivity/v1/internal/data_transfer_stub.cc +++ b/google/cloud/networkconnectivity/v1/internal/data_transfer_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/networkconnectivity/v1/data_transfer.proto #include "google/cloud/networkconnectivity/v1/internal/data_transfer_stub.h" +#include "google/cloud/networkconnectivity/v1/data_transfer.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { @@ -474,3 +477,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkconnectivity_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkconnectivity/v1/internal/data_transfer_stub.h b/google/cloud/networkconnectivity/v1/internal/data_transfer_stub.h index 9a6e348631bfe..c5e0a1b0d41bc 100644 --- a/google/cloud/networkconnectivity/v1/internal/data_transfer_stub.h +++ b/google/cloud/networkconnectivity/v1/internal/data_transfer_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_INTERNAL_DATA_TRANSFER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_INTERNAL_DATA_TRANSFER_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/networkconnectivity/v1/data_transfer.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { @@ -409,4 +412,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_INTERNAL_DATA_TRANSFER_STUB_H diff --git a/google/cloud/networkconnectivity/v1/internal/data_transfer_stub_factory.cc b/google/cloud/networkconnectivity/v1/internal/data_transfer_stub_factory.cc index df0662acb3553..7f56355e25215 100644 --- a/google/cloud/networkconnectivity/v1/internal/data_transfer_stub_factory.cc +++ b/google/cloud/networkconnectivity/v1/internal/data_transfer_stub_factory.cc @@ -17,6 +17,8 @@ // source: google/cloud/networkconnectivity/v1/data_transfer.proto #include "google/cloud/networkconnectivity/v1/internal/data_transfer_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/networkconnectivity/v1/data_transfer.grpc.pb.h" #include "google/cloud/networkconnectivity/v1/internal/data_transfer_auth_decorator.h" #include "google/cloud/networkconnectivity/v1/internal/data_transfer_logging_decorator.h" #include "google/cloud/networkconnectivity/v1/internal/data_transfer_metadata_decorator.h" @@ -28,13 +30,14 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { @@ -79,3 +82,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkconnectivity_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkconnectivity/v1/internal/data_transfer_stub_factory.h b/google/cloud/networkconnectivity/v1/internal/data_transfer_stub_factory.h index 2eb0f809f6df2..5ec25e1b7c0cf 100644 --- a/google/cloud/networkconnectivity/v1/internal/data_transfer_stub_factory.h +++ b/google/cloud/networkconnectivity/v1/internal/data_transfer_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_INTERNAL_DATA_TRANSFER_STUB_FACTORY_H diff --git a/google/cloud/networkconnectivity/v1/internal/data_transfer_tracing_connection.cc b/google/cloud/networkconnectivity/v1/internal/data_transfer_tracing_connection.cc index e69910edf2185..2822dc939614b 100644 --- a/google/cloud/networkconnectivity/v1/internal/data_transfer_tracing_connection.cc +++ b/google/cloud/networkconnectivity/v1/internal/data_transfer_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace networkconnectivity_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DataTransferServiceTracingConnection::DataTransferServiceTracingConnection( std::shared_ptr child) @@ -413,18 +411,14 @@ Status DataTransferServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDataTransferServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/networkconnectivity/v1/internal/data_transfer_tracing_connection.h b/google/cloud/networkconnectivity/v1/internal/data_transfer_tracing_connection.h index 3a5e358607309..635693f9ec620 100644 --- a/google/cloud/networkconnectivity/v1/internal/data_transfer_tracing_connection.h +++ b/google/cloud/networkconnectivity/v1/internal/data_transfer_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace networkconnectivity_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DataTransferServiceTracingConnection : public networkconnectivity_v1::DataTransferServiceConnection { public: @@ -190,8 +188,6 @@ class DataTransferServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/networkconnectivity/v1/internal/data_transfer_tracing_stub.cc b/google/cloud/networkconnectivity/v1/internal/data_transfer_tracing_stub.cc index 8b0ca8c8972cf..81c7169ce2ad4 100644 --- a/google/cloud/networkconnectivity/v1/internal/data_transfer_tracing_stub.cc +++ b/google/cloud/networkconnectivity/v1/internal/data_transfer_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DataTransferServiceTracingStub::DataTransferServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -452,18 +453,14 @@ future DataTransferServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDataTransferServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkconnectivity_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkconnectivity/v1/internal/data_transfer_tracing_stub.h b/google/cloud/networkconnectivity/v1/internal/data_transfer_tracing_stub.h index 09e5803a4f951..ec43848b6e157 100644 --- a/google/cloud/networkconnectivity/v1/internal/data_transfer_tracing_stub.h +++ b/google/cloud/networkconnectivity/v1/internal/data_transfer_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DataTransferServiceTracingStub : public DataTransferServiceStub { public: ~DataTransferServiceTracingStub() override = default; @@ -208,8 +209,6 @@ class DataTransferServiceTracingStub : public DataTransferServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -224,4 +223,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_INTERNAL_DATA_TRANSFER_TRACING_STUB_H diff --git a/google/cloud/networkconnectivity/v1/internal/hub_auth_decorator.cc b/google/cloud/networkconnectivity/v1/internal/hub_auth_decorator.cc index 2c35b8a5c8261..62a72d093ec0f 100644 --- a/google/cloud/networkconnectivity/v1/internal/hub_auth_decorator.cc +++ b/google/cloud/networkconnectivity/v1/internal/hub_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/networkconnectivity/v1/hub.proto #include "google/cloud/networkconnectivity/v1/internal/hub_auth_decorator.h" -#include +#include "google/cloud/networkconnectivity/v1/hub.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { @@ -570,3 +573,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkconnectivity_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkconnectivity/v1/internal/hub_auth_decorator.h b/google/cloud/networkconnectivity/v1/internal/hub_auth_decorator.h index c376f1e4a78cd..0019c8883a6b0 100644 --- a/google/cloud/networkconnectivity/v1/internal/hub_auth_decorator.h +++ b/google/cloud/networkconnectivity/v1/internal/hub_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/networkconnectivity/v1/internal/hub_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { @@ -292,4 +295,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_INTERNAL_HUB_AUTH_DECORATOR_H diff --git a/google/cloud/networkconnectivity/v1/internal/hub_connection_impl.h b/google/cloud/networkconnectivity/v1/internal/hub_connection_impl.h index 77dc5995d29a6..29ac095fb28f2 100644 --- a/google/cloud/networkconnectivity/v1/internal/hub_connection_impl.h +++ b/google/cloud/networkconnectivity/v1/internal/hub_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/networkconnectivity/v1/internal/hub_logging_decorator.cc b/google/cloud/networkconnectivity/v1/internal/hub_logging_decorator.cc index 1e9c9b5553bfb..69790fcdb8f82 100644 --- a/google/cloud/networkconnectivity/v1/internal/hub_logging_decorator.cc +++ b/google/cloud/networkconnectivity/v1/internal/hub_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/networkconnectivity/v1/hub.proto #include "google/cloud/networkconnectivity/v1/internal/hub_logging_decorator.h" +#include "google/cloud/networkconnectivity/v1/hub.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { @@ -688,3 +691,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkconnectivity_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkconnectivity/v1/internal/hub_logging_decorator.h b/google/cloud/networkconnectivity/v1/internal/hub_logging_decorator.h index 9c431a6c8c757..643ca0377a626 100644 --- a/google/cloud/networkconnectivity/v1/internal/hub_logging_decorator.h +++ b/google/cloud/networkconnectivity/v1/internal/hub_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/networkconnectivity/v1/internal/hub_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { @@ -292,4 +295,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_INTERNAL_HUB_LOGGING_DECORATOR_H diff --git a/google/cloud/networkconnectivity/v1/internal/hub_metadata_decorator.cc b/google/cloud/networkconnectivity/v1/internal/hub_metadata_decorator.cc index 323a2c521c188..98ce12c966ba8 100644 --- a/google/cloud/networkconnectivity/v1/internal/hub_metadata_decorator.cc +++ b/google/cloud/networkconnectivity/v1/internal/hub_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/networkconnectivity/v1/hub.proto #include "google/cloud/networkconnectivity/v1/internal/hub_metadata_decorator.h" +#include "google/cloud/networkconnectivity/v1/hub.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { @@ -508,3 +512,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkconnectivity_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkconnectivity/v1/internal/hub_metadata_decorator.h b/google/cloud/networkconnectivity/v1/internal/hub_metadata_decorator.h index 590f48688d782..d84fbedd76a04 100644 --- a/google/cloud/networkconnectivity/v1/internal/hub_metadata_decorator.h +++ b/google/cloud/networkconnectivity/v1/internal/hub_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/networkconnectivity/v1/internal/hub_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { @@ -297,4 +300,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_INTERNAL_HUB_METADATA_DECORATOR_H diff --git a/google/cloud/networkconnectivity/v1/internal/hub_option_defaults.cc b/google/cloud/networkconnectivity/v1/internal/hub_option_defaults.cc index 6e3e3de295804..acb28b7b2ced4 100644 --- a/google/cloud/networkconnectivity/v1/internal/hub_option_defaults.cc +++ b/google/cloud/networkconnectivity/v1/internal/hub_option_defaults.cc @@ -42,7 +42,7 @@ Options HubServiceDefaultOptions(Options options) { if (!options.has()) { options.set( networkconnectivity_v1::HubServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/networkconnectivity/v1/internal/hub_stub.cc b/google/cloud/networkconnectivity/v1/internal/hub_stub.cc index 1378d7322c437..b5190f383a706 100644 --- a/google/cloud/networkconnectivity/v1/internal/hub_stub.cc +++ b/google/cloud/networkconnectivity/v1/internal/hub_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/networkconnectivity/v1/hub.proto #include "google/cloud/networkconnectivity/v1/internal/hub_stub.h" +#include "google/cloud/networkconnectivity/v1/hub.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { @@ -667,3 +670,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkconnectivity_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkconnectivity/v1/internal/hub_stub.h b/google/cloud/networkconnectivity/v1/internal/hub_stub.h index 7872c0997f77a..f939f5d102800 100644 --- a/google/cloud/networkconnectivity/v1/internal/hub_stub.h +++ b/google/cloud/networkconnectivity/v1/internal/hub_stub.h @@ -19,19 +19,22 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_INTERNAL_HUB_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_INTERNAL_HUB_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/networkconnectivity/v1/common.pb.h" +#include "google/cloud/networkconnectivity/v1/hub.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { @@ -567,4 +570,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_INTERNAL_HUB_STUB_H diff --git a/google/cloud/networkconnectivity/v1/internal/hub_stub_factory.cc b/google/cloud/networkconnectivity/v1/internal/hub_stub_factory.cc index f7c3f9c3e51de..fd74d2bff8ab2 100644 --- a/google/cloud/networkconnectivity/v1/internal/hub_stub_factory.cc +++ b/google/cloud/networkconnectivity/v1/internal/hub_stub_factory.cc @@ -17,6 +17,8 @@ // source: google/cloud/networkconnectivity/v1/hub.proto #include "google/cloud/networkconnectivity/v1/internal/hub_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/networkconnectivity/v1/hub.grpc.pb.h" #include "google/cloud/networkconnectivity/v1/internal/hub_auth_decorator.h" #include "google/cloud/networkconnectivity/v1/internal/hub_logging_decorator.h" #include "google/cloud/networkconnectivity/v1/internal/hub_metadata_decorator.h" @@ -28,13 +30,14 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { @@ -77,3 +80,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkconnectivity_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkconnectivity/v1/internal/hub_stub_factory.h b/google/cloud/networkconnectivity/v1/internal/hub_stub_factory.h index 0a0fd3c68a395..3a1d24fba1c74 100644 --- a/google/cloud/networkconnectivity/v1/internal/hub_stub_factory.h +++ b/google/cloud/networkconnectivity/v1/internal/hub_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_INTERNAL_HUB_STUB_FACTORY_H diff --git a/google/cloud/networkconnectivity/v1/internal/hub_tracing_connection.cc b/google/cloud/networkconnectivity/v1/internal/hub_tracing_connection.cc index 3f922be22eabd..4f695d4f9dae5 100644 --- a/google/cloud/networkconnectivity/v1/internal/hub_tracing_connection.cc +++ b/google/cloud/networkconnectivity/v1/internal/hub_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace networkconnectivity_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - HubServiceTracingConnection::HubServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -567,16 +565,12 @@ Status HubServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeHubServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/networkconnectivity/v1/internal/hub_tracing_connection.h b/google/cloud/networkconnectivity/v1/internal/hub_tracing_connection.h index 55d2bdd477e24..16bbd9ee289b6 100644 --- a/google/cloud/networkconnectivity/v1/internal/hub_tracing_connection.h +++ b/google/cloud/networkconnectivity/v1/internal/hub_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace networkconnectivity_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class HubServiceTracingConnection : public networkconnectivity_v1::HubServiceConnection { public: @@ -262,8 +260,6 @@ class HubServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/networkconnectivity/v1/internal/hub_tracing_stub.cc b/google/cloud/networkconnectivity/v1/internal/hub_tracing_stub.cc index ecdb5518996f3..fea85c869f310 100644 --- a/google/cloud/networkconnectivity/v1/internal/hub_tracing_stub.cc +++ b/google/cloud/networkconnectivity/v1/internal/hub_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - HubServiceTracingStub::HubServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -599,18 +600,14 @@ future HubServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeHubServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkconnectivity_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkconnectivity/v1/internal/hub_tracing_stub.h b/google/cloud/networkconnectivity/v1/internal/hub_tracing_stub.h index 4397ecf410b94..f04f25daa63eb 100644 --- a/google/cloud/networkconnectivity/v1/internal/hub_tracing_stub.h +++ b/google/cloud/networkconnectivity/v1/internal/hub_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class HubServiceTracingStub : public HubServiceStub { public: ~HubServiceTracingStub() override = default; @@ -287,8 +288,6 @@ class HubServiceTracingStub : public HubServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -303,4 +302,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_INTERNAL_HUB_TRACING_STUB_H diff --git a/google/cloud/networkconnectivity/v1/internal/policy_based_routing_auth_decorator.cc b/google/cloud/networkconnectivity/v1/internal/policy_based_routing_auth_decorator.cc index bb76fd4b15b24..7a25b3ce23569 100644 --- a/google/cloud/networkconnectivity/v1/internal/policy_based_routing_auth_decorator.cc +++ b/google/cloud/networkconnectivity/v1/internal/policy_based_routing_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/networkconnectivity/v1/policy_based_routing.proto #include "google/cloud/networkconnectivity/v1/internal/policy_based_routing_auth_decorator.h" -#include +#include "google/cloud/networkconnectivity/v1/policy_based_routing.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { @@ -230,3 +233,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkconnectivity_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkconnectivity/v1/internal/policy_based_routing_auth_decorator.h b/google/cloud/networkconnectivity/v1/internal/policy_based_routing_auth_decorator.h index 2af808c611b29..9d6cda136a95f 100644 --- a/google/cloud/networkconnectivity/v1/internal/policy_based_routing_auth_decorator.h +++ b/google/cloud/networkconnectivity/v1/internal/policy_based_routing_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/networkconnectivity/v1/internal/policy_based_routing_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { @@ -134,4 +137,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_INTERNAL_POLICY_BASED_ROUTING_AUTH_DECORATOR_H diff --git a/google/cloud/networkconnectivity/v1/internal/policy_based_routing_connection_impl.h b/google/cloud/networkconnectivity/v1/internal/policy_based_routing_connection_impl.h index c1d69e610659f..cd04ca7928724 100644 --- a/google/cloud/networkconnectivity/v1/internal/policy_based_routing_connection_impl.h +++ b/google/cloud/networkconnectivity/v1/internal/policy_based_routing_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/networkconnectivity/v1/internal/policy_based_routing_logging_decorator.cc b/google/cloud/networkconnectivity/v1/internal/policy_based_routing_logging_decorator.cc index e6625c18565ec..6ca9551c8964c 100644 --- a/google/cloud/networkconnectivity/v1/internal/policy_based_routing_logging_decorator.cc +++ b/google/cloud/networkconnectivity/v1/internal/policy_based_routing_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/networkconnectivity/v1/policy_based_routing.proto #include "google/cloud/networkconnectivity/v1/internal/policy_based_routing_logging_decorator.h" +#include "google/cloud/networkconnectivity/v1/policy_based_routing.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { @@ -276,3 +279,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkconnectivity_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkconnectivity/v1/internal/policy_based_routing_logging_decorator.h b/google/cloud/networkconnectivity/v1/internal/policy_based_routing_logging_decorator.h index b313a50cb88f4..2aee08bc9b08c 100644 --- a/google/cloud/networkconnectivity/v1/internal/policy_based_routing_logging_decorator.h +++ b/google/cloud/networkconnectivity/v1/internal/policy_based_routing_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/networkconnectivity/v1/internal/policy_based_routing_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { @@ -134,4 +137,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_INTERNAL_POLICY_BASED_ROUTING_LOGGING_DECORATOR_H diff --git a/google/cloud/networkconnectivity/v1/internal/policy_based_routing_metadata_decorator.cc b/google/cloud/networkconnectivity/v1/internal/policy_based_routing_metadata_decorator.cc index 0d02f27b12003..65737193cd49a 100644 --- a/google/cloud/networkconnectivity/v1/internal/policy_based_routing_metadata_decorator.cc +++ b/google/cloud/networkconnectivity/v1/internal/policy_based_routing_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/networkconnectivity/v1/policy_based_routing.proto #include "google/cloud/networkconnectivity/v1/internal/policy_based_routing_metadata_decorator.h" +#include "google/cloud/networkconnectivity/v1/policy_based_routing.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { @@ -232,3 +236,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkconnectivity_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkconnectivity/v1/internal/policy_based_routing_metadata_decorator.h b/google/cloud/networkconnectivity/v1/internal/policy_based_routing_metadata_decorator.h index 593fcda6f43ab..1a5bd3e8d6cdf 100644 --- a/google/cloud/networkconnectivity/v1/internal/policy_based_routing_metadata_decorator.h +++ b/google/cloud/networkconnectivity/v1/internal/policy_based_routing_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/networkconnectivity/v1/internal/policy_based_routing_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { @@ -140,4 +143,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_INTERNAL_POLICY_BASED_ROUTING_METADATA_DECORATOR_H diff --git a/google/cloud/networkconnectivity/v1/internal/policy_based_routing_option_defaults.cc b/google/cloud/networkconnectivity/v1/internal/policy_based_routing_option_defaults.cc index 04cad48840f33..50c12a32509b2 100644 --- a/google/cloud/networkconnectivity/v1/internal/policy_based_routing_option_defaults.cc +++ b/google/cloud/networkconnectivity/v1/internal/policy_based_routing_option_defaults.cc @@ -45,7 +45,7 @@ Options PolicyBasedRoutingServiceDefaultOptions(Options options) { options.set< networkconnectivity_v1::PolicyBasedRoutingServiceRetryPolicyOption>( networkconnectivity_v1::PolicyBasedRoutingServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { @@ -276,3 +279,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkconnectivity_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkconnectivity/v1/internal/policy_based_routing_stub.h b/google/cloud/networkconnectivity/v1/internal/policy_based_routing_stub.h index 9fbe2bc1cf724..07ab3d27e6a01 100644 --- a/google/cloud/networkconnectivity/v1/internal/policy_based_routing_stub.h +++ b/google/cloud/networkconnectivity/v1/internal/policy_based_routing_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_INTERNAL_POLICY_BASED_ROUTING_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_INTERNAL_POLICY_BASED_ROUTING_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/networkconnectivity/v1/policy_based_routing.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { @@ -247,4 +250,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_INTERNAL_POLICY_BASED_ROUTING_STUB_H diff --git a/google/cloud/networkconnectivity/v1/internal/policy_based_routing_stub_factory.cc b/google/cloud/networkconnectivity/v1/internal/policy_based_routing_stub_factory.cc index 122fea418d456..48f8917ceaaeb 100644 --- a/google/cloud/networkconnectivity/v1/internal/policy_based_routing_stub_factory.cc +++ b/google/cloud/networkconnectivity/v1/internal/policy_based_routing_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/networkconnectivity/v1/policy_based_routing.proto #include "google/cloud/networkconnectivity/v1/internal/policy_based_routing_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/networkconnectivity/v1/internal/policy_based_routing_auth_decorator.h" #include "google/cloud/networkconnectivity/v1/internal/policy_based_routing_logging_decorator.h" #include "google/cloud/networkconnectivity/v1/internal/policy_based_routing_metadata_decorator.h" #include "google/cloud/networkconnectivity/v1/internal/policy_based_routing_stub.h" #include "google/cloud/networkconnectivity/v1/internal/policy_based_routing_tracing_stub.h" +#include "google/cloud/networkconnectivity/v1/policy_based_routing.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { @@ -79,3 +82,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkconnectivity_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkconnectivity/v1/internal/policy_based_routing_stub_factory.h b/google/cloud/networkconnectivity/v1/internal/policy_based_routing_stub_factory.h index 53656b081c77d..a6ab6a4f6678a 100644 --- a/google/cloud/networkconnectivity/v1/internal/policy_based_routing_stub_factory.h +++ b/google/cloud/networkconnectivity/v1/internal/policy_based_routing_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_INTERNAL_POLICY_BASED_ROUTING_STUB_FACTORY_H diff --git a/google/cloud/networkconnectivity/v1/internal/policy_based_routing_tracing_connection.cc b/google/cloud/networkconnectivity/v1/internal/policy_based_routing_tracing_connection.cc index ed95b8e45951c..48ef5a5d05c06 100644 --- a/google/cloud/networkconnectivity/v1/internal/policy_based_routing_tracing_connection.cc +++ b/google/cloud/networkconnectivity/v1/internal/policy_based_routing_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace networkconnectivity_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PolicyBasedRoutingServiceTracingConnection:: PolicyBasedRoutingServiceTracingConnection( std::shared_ptr< @@ -225,18 +223,14 @@ Status PolicyBasedRoutingServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePolicyBasedRoutingServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/networkconnectivity/v1/internal/policy_based_routing_tracing_connection.h b/google/cloud/networkconnectivity/v1/internal/policy_based_routing_tracing_connection.h index 224fd7fdb3637..2dae46a381f3c 100644 --- a/google/cloud/networkconnectivity/v1/internal/policy_based_routing_tracing_connection.h +++ b/google/cloud/networkconnectivity/v1/internal/policy_based_routing_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace networkconnectivity_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PolicyBasedRoutingServiceTracingConnection : public networkconnectivity_v1::PolicyBasedRoutingServiceConnection { public: @@ -110,8 +108,6 @@ class PolicyBasedRoutingServiceTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/networkconnectivity/v1/internal/policy_based_routing_tracing_stub.cc b/google/cloud/networkconnectivity/v1/internal/policy_based_routing_tracing_stub.cc index b3c9d1de51693..ba654aed859b7 100644 --- a/google/cloud/networkconnectivity/v1/internal/policy_based_routing_tracing_stub.cc +++ b/google/cloud/networkconnectivity/v1/internal/policy_based_routing_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PolicyBasedRoutingServiceTracingStub::PolicyBasedRoutingServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -267,20 +268,16 @@ future PolicyBasedRoutingServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePolicyBasedRoutingServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared( std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkconnectivity_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkconnectivity/v1/internal/policy_based_routing_tracing_stub.h b/google/cloud/networkconnectivity/v1/internal/policy_based_routing_tracing_stub.h index 19830dda88364..8b72f6e818247 100644 --- a/google/cloud/networkconnectivity/v1/internal/policy_based_routing_tracing_stub.h +++ b/google/cloud/networkconnectivity/v1/internal/policy_based_routing_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkconnectivity_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PolicyBasedRoutingServiceTracingStub : public PolicyBasedRoutingServiceStub { public: @@ -131,8 +132,6 @@ class PolicyBasedRoutingServiceTracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -148,4 +147,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_INTERNAL_POLICY_BASED_ROUTING_TRACING_STUB_H diff --git a/google/cloud/networkconnectivity/v1/policy_based_routing_client.h b/google/cloud/networkconnectivity/v1/policy_based_routing_client.h index a8a38330b317b..9720461c8235c 100644 --- a/google/cloud/networkconnectivity/v1/policy_based_routing_client.h +++ b/google/cloud/networkconnectivity/v1/policy_based_routing_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/networkconnectivity/v1/policy_based_routing_connection.h b/google/cloud/networkconnectivity/v1/policy_based_routing_connection.h index 4761b8e3dabf2..b707159e70b42 100644 --- a/google/cloud/networkconnectivity/v1/policy_based_routing_connection.h +++ b/google/cloud/networkconnectivity/v1/policy_based_routing_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_POLICY_BASED_ROUTING_CONNECTION_H #include "google/cloud/networkconnectivity/v1/internal/policy_based_routing_retry_traits.h" +#include "google/cloud/networkconnectivity/v1/policy_based_routing.pb.h" #include "google/cloud/networkconnectivity/v1/policy_based_routing_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/networkconnectivity/v1/policy_based_routing_connection_idempotency_policy.h b/google/cloud/networkconnectivity/v1/policy_based_routing_connection_idempotency_policy.h index 84c2e96a78e5f..56b490b83ff6d 100644 --- a/google/cloud/networkconnectivity/v1/policy_based_routing_connection_idempotency_policy.h +++ b/google/cloud/networkconnectivity/v1/policy_based_routing_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_POLICY_BASED_ROUTING_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKCONNECTIVITY_V1_POLICY_BASED_ROUTING_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/networkconnectivity/v1/policy_based_routing.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/networkmanagement/BUILD.bazel b/google/cloud/networkmanagement/BUILD.bazel index 7b8790a4bc567..0a9996080fe66 100644 --- a/google/cloud/networkmanagement/BUILD.bazel +++ b/google/cloud/networkmanagement/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/networkmanagement/v1:networkmanagement_cc_grpc", + "@googleapis//google/cloud/networkmanagement/v1:networkmanagement_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/networkmanagement/CMakeLists.txt b/google/cloud/networkmanagement/CMakeLists.txt index 16d513b0fc47b..90b9c8a1e2d81 100644 --- a/google/cloud/networkmanagement/CMakeLists.txt +++ b/google/cloud/networkmanagement/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(networkmanagement "Network Management API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(networkmanagement_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/networkmanagement/mocks/mock_reachability_connection.h b/google/cloud/networkmanagement/mocks/mock_reachability_connection.h deleted file mode 100644 index b277c8b3d6d11..0000000000000 --- a/google/cloud/networkmanagement/mocks/mock_reachability_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/networkmanagement/v1/reachability.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKMANAGEMENT_MOCKS_MOCK_REACHABILITY_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKMANAGEMENT_MOCKS_MOCK_REACHABILITY_CONNECTION_H - -#include "google/cloud/networkmanagement/reachability_connection.h" -#include "google/cloud/networkmanagement/v1/mocks/mock_reachability_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in networkmanagement_v1_mocks instead of the aliases -/// defined in this namespace. -namespace networkmanagement_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// networkmanagement_v1_mocks::MockReachabilityServiceConnection directly. -using ::google::cloud::networkmanagement_v1_mocks:: - MockReachabilityServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace networkmanagement_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKMANAGEMENT_MOCKS_MOCK_REACHABILITY_CONNECTION_H diff --git a/google/cloud/networkmanagement/quickstart/.bazelrc b/google/cloud/networkmanagement/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/networkmanagement/quickstart/.bazelrc +++ b/google/cloud/networkmanagement/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/networkmanagement/quickstart/CMakeLists.txt b/google/cloud/networkmanagement/quickstart/CMakeLists.txt index 854e7b6dc0a44..517cad6e1efd6 100644 --- a/google/cloud/networkmanagement/quickstart/CMakeLists.txt +++ b/google/cloud/networkmanagement/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Network Management API C++ client library from # a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-networkmanagement-quickstart CXX) find_package(google_cloud_cpp_networkmanagement REQUIRED) diff --git a/google/cloud/networkmanagement/reachability_client.h b/google/cloud/networkmanagement/reachability_client.h deleted file mode 100644 index d0056562fe6a2..0000000000000 --- a/google/cloud/networkmanagement/reachability_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/networkmanagement/v1/reachability.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKMANAGEMENT_REACHABILITY_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKMANAGEMENT_REACHABILITY_CLIENT_H - -#include "google/cloud/networkmanagement/reachability_connection.h" -#include "google/cloud/networkmanagement/v1/reachability_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in networkmanagement_v1 instead of the aliases defined in -/// this namespace. -namespace networkmanagement { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use networkmanagement_v1::ReachabilityServiceClient directly. -using ::google::cloud::networkmanagement_v1::ReachabilityServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace networkmanagement -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKMANAGEMENT_REACHABILITY_CLIENT_H diff --git a/google/cloud/networkmanagement/reachability_connection.h b/google/cloud/networkmanagement/reachability_connection.h deleted file mode 100644 index d38f49ab346c4..0000000000000 --- a/google/cloud/networkmanagement/reachability_connection.h +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/networkmanagement/v1/reachability.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKMANAGEMENT_REACHABILITY_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKMANAGEMENT_REACHABILITY_CONNECTION_H - -#include "google/cloud/networkmanagement/reachability_connection_idempotency_policy.h" -#include "google/cloud/networkmanagement/v1/reachability_connection.h" - -namespace google { -namespace cloud { -namespace networkmanagement { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use networkmanagement_v1::MakeReachabilityServiceConnection -/// directly. -using ::google::cloud::networkmanagement_v1::MakeReachabilityServiceConnection; - -/// @deprecated Use networkmanagement_v1::ReachabilityServiceConnection -/// directly. -using ::google::cloud::networkmanagement_v1::ReachabilityServiceConnection; - -/// @deprecated Use -/// networkmanagement_v1::ReachabilityServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::networkmanagement_v1:: - ReachabilityServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use -/// networkmanagement_v1::ReachabilityServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::networkmanagement_v1:: - ReachabilityServiceLimitedTimeRetryPolicy; - -/// @deprecated Use networkmanagement_v1::ReachabilityServiceRetryPolicy -/// directly. -using ::google::cloud::networkmanagement_v1::ReachabilityServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace networkmanagement -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKMANAGEMENT_REACHABILITY_CONNECTION_H diff --git a/google/cloud/networkmanagement/reachability_connection_idempotency_policy.h b/google/cloud/networkmanagement/reachability_connection_idempotency_policy.h deleted file mode 100644 index da62b6810e34e..0000000000000 --- a/google/cloud/networkmanagement/reachability_connection_idempotency_policy.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/networkmanagement/v1/reachability.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKMANAGEMENT_REACHABILITY_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKMANAGEMENT_REACHABILITY_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/networkmanagement/v1/reachability_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace networkmanagement { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// networkmanagement_v1::MakeDefaultReachabilityServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::networkmanagement_v1:: - MakeDefaultReachabilityServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// networkmanagement_v1::ReachabilityServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::networkmanagement_v1:: - ReachabilityServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace networkmanagement -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKMANAGEMENT_REACHABILITY_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/networkmanagement/reachability_options.h b/google/cloud/networkmanagement/reachability_options.h deleted file mode 100644 index d772fb1bdfb6b..0000000000000 --- a/google/cloud/networkmanagement/reachability_options.h +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/networkmanagement/v1/reachability.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKMANAGEMENT_REACHABILITY_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKMANAGEMENT_REACHABILITY_OPTIONS_H - -#include "google/cloud/networkmanagement/reachability_connection.h" -#include "google/cloud/networkmanagement/reachability_connection_idempotency_policy.h" -#include "google/cloud/networkmanagement/v1/reachability_options.h" - -namespace google { -namespace cloud { -namespace networkmanagement { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use networkmanagement_v1::ReachabilityServicePollingPolicyOption -/// directly. -using ::google::cloud::networkmanagement_v1:: - ReachabilityServicePollingPolicyOption; - -/// @deprecated Use networkmanagement_v1::ReachabilityServiceBackoffPolicyOption -/// directly. -using ::google::cloud::networkmanagement_v1:: - ReachabilityServiceBackoffPolicyOption; - -/// @deprecated Use -/// networkmanagement_v1::ReachabilityServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::networkmanagement_v1:: - ReachabilityServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use networkmanagement_v1::ReachabilityServicePolicyOptionList -/// directly. -using ::google::cloud::networkmanagement_v1:: - ReachabilityServicePolicyOptionList; - -/// @deprecated Use networkmanagement_v1::ReachabilityServiceRetryPolicyOption -/// directly. -using ::google::cloud::networkmanagement_v1:: - ReachabilityServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace networkmanagement -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKMANAGEMENT_REACHABILITY_OPTIONS_H diff --git a/google/cloud/networkmanagement/v1/internal/reachability_auth_decorator.cc b/google/cloud/networkmanagement/v1/internal/reachability_auth_decorator.cc index 435592b760fd4..6ba94ccb6dec8 100644 --- a/google/cloud/networkmanagement/v1/internal/reachability_auth_decorator.cc +++ b/google/cloud/networkmanagement/v1/internal/reachability_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/networkmanagement/v1/reachability.proto #include "google/cloud/networkmanagement/v1/internal/reachability_auth_decorator.h" -#include +#include "google/cloud/networkmanagement/v1/reachability.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkmanagement_v1_internal { @@ -291,3 +294,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkmanagement_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkmanagement/v1/internal/reachability_auth_decorator.h b/google/cloud/networkmanagement/v1/internal/reachability_auth_decorator.h index 1a41e6a8ef605..0026d1fb44516 100644 --- a/google/cloud/networkmanagement/v1/internal/reachability_auth_decorator.h +++ b/google/cloud/networkmanagement/v1/internal/reachability_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/networkmanagement/v1/internal/reachability_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkmanagement_v1_internal { @@ -157,4 +160,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKMANAGEMENT_V1_INTERNAL_REACHABILITY_AUTH_DECORATOR_H diff --git a/google/cloud/networkmanagement/v1/internal/reachability_connection_impl.h b/google/cloud/networkmanagement/v1/internal/reachability_connection_impl.h index a2082e24c26a9..321d077b01755 100644 --- a/google/cloud/networkmanagement/v1/internal/reachability_connection_impl.h +++ b/google/cloud/networkmanagement/v1/internal/reachability_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/networkmanagement/v1/internal/reachability_logging_decorator.cc b/google/cloud/networkmanagement/v1/internal/reachability_logging_decorator.cc index 544009fdfefa6..77e62ae2b66da 100644 --- a/google/cloud/networkmanagement/v1/internal/reachability_logging_decorator.cc +++ b/google/cloud/networkmanagement/v1/internal/reachability_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/networkmanagement/v1/reachability.proto #include "google/cloud/networkmanagement/v1/internal/reachability_logging_decorator.h" +#include "google/cloud/networkmanagement/v1/reachability.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkmanagement_v1_internal { @@ -342,3 +345,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkmanagement_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkmanagement/v1/internal/reachability_logging_decorator.h b/google/cloud/networkmanagement/v1/internal/reachability_logging_decorator.h index 97239bd386be4..3e5d9fb3e9d38 100644 --- a/google/cloud/networkmanagement/v1/internal/reachability_logging_decorator.h +++ b/google/cloud/networkmanagement/v1/internal/reachability_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/networkmanagement/v1/internal/reachability_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkmanagement_v1_internal { @@ -157,4 +160,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKMANAGEMENT_V1_INTERNAL_REACHABILITY_LOGGING_DECORATOR_H diff --git a/google/cloud/networkmanagement/v1/internal/reachability_metadata_decorator.cc b/google/cloud/networkmanagement/v1/internal/reachability_metadata_decorator.cc index 595951f7ded16..81021c02d7473 100644 --- a/google/cloud/networkmanagement/v1/internal/reachability_metadata_decorator.cc +++ b/google/cloud/networkmanagement/v1/internal/reachability_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/networkmanagement/v1/reachability.proto #include "google/cloud/networkmanagement/v1/internal/reachability_metadata_decorator.h" +#include "google/cloud/networkmanagement/v1/reachability.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkmanagement_v1_internal { @@ -278,3 +282,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkmanagement_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkmanagement/v1/internal/reachability_metadata_decorator.h b/google/cloud/networkmanagement/v1/internal/reachability_metadata_decorator.h index b4217c8d8c416..164ba62ea98af 100644 --- a/google/cloud/networkmanagement/v1/internal/reachability_metadata_decorator.h +++ b/google/cloud/networkmanagement/v1/internal/reachability_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/networkmanagement/v1/internal/reachability_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkmanagement_v1_internal { @@ -163,4 +166,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKMANAGEMENT_V1_INTERNAL_REACHABILITY_METADATA_DECORATOR_H diff --git a/google/cloud/networkmanagement/v1/internal/reachability_option_defaults.cc b/google/cloud/networkmanagement/v1/internal/reachability_option_defaults.cc index 6faf559cc24b4..ef0974d557a91 100644 --- a/google/cloud/networkmanagement/v1/internal/reachability_option_defaults.cc +++ b/google/cloud/networkmanagement/v1/internal/reachability_option_defaults.cc @@ -43,7 +43,7 @@ Options ReachabilityServiceDefaultOptions(Options options) { .has()) { options.set( networkmanagement_v1::ReachabilityServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/networkmanagement/v1/internal/reachability_stub.cc b/google/cloud/networkmanagement/v1/internal/reachability_stub.cc index 6bfbeda436194..63112cb34a8ec 100644 --- a/google/cloud/networkmanagement/v1/internal/reachability_stub.cc +++ b/google/cloud/networkmanagement/v1/internal/reachability_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/networkmanagement/v1/reachability.proto #include "google/cloud/networkmanagement/v1/internal/reachability_stub.h" +#include "google/cloud/networkmanagement/v1/reachability.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkmanagement_v1_internal { @@ -340,3 +343,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkmanagement_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkmanagement/v1/internal/reachability_stub.h b/google/cloud/networkmanagement/v1/internal/reachability_stub.h index 5f29667c5290e..47147c3e8418f 100644 --- a/google/cloud/networkmanagement/v1/internal/reachability_stub.h +++ b/google/cloud/networkmanagement/v1/internal/reachability_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKMANAGEMENT_V1_INTERNAL_REACHABILITY_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKMANAGEMENT_V1_INTERNAL_REACHABILITY_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/networkmanagement/v1/reachability.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkmanagement_v1_internal { @@ -296,4 +299,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKMANAGEMENT_V1_INTERNAL_REACHABILITY_STUB_H diff --git a/google/cloud/networkmanagement/v1/internal/reachability_stub_factory.cc b/google/cloud/networkmanagement/v1/internal/reachability_stub_factory.cc index 554f5998fb9b7..ee3b9f6133f0f 100644 --- a/google/cloud/networkmanagement/v1/internal/reachability_stub_factory.cc +++ b/google/cloud/networkmanagement/v1/internal/reachability_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/networkmanagement/v1/reachability.proto #include "google/cloud/networkmanagement/v1/internal/reachability_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/networkmanagement/v1/internal/reachability_auth_decorator.h" #include "google/cloud/networkmanagement/v1/internal/reachability_logging_decorator.h" #include "google/cloud/networkmanagement/v1/internal/reachability_metadata_decorator.h" #include "google/cloud/networkmanagement/v1/internal/reachability_stub.h" #include "google/cloud/networkmanagement/v1/internal/reachability_tracing_stub.h" +#include "google/cloud/networkmanagement/v1/reachability.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkmanagement_v1_internal { @@ -79,3 +82,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkmanagement_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkmanagement/v1/internal/reachability_stub_factory.h b/google/cloud/networkmanagement/v1/internal/reachability_stub_factory.h index addf67e95d43d..b60c5ab1cdf6c 100644 --- a/google/cloud/networkmanagement/v1/internal/reachability_stub_factory.h +++ b/google/cloud/networkmanagement/v1/internal/reachability_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkmanagement_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKMANAGEMENT_V1_INTERNAL_REACHABILITY_STUB_FACTORY_H diff --git a/google/cloud/networkmanagement/v1/internal/reachability_tracing_connection.cc b/google/cloud/networkmanagement/v1/internal/reachability_tracing_connection.cc index 45cb400869c6e..10f4cbe86eae3 100644 --- a/google/cloud/networkmanagement/v1/internal/reachability_tracing_connection.cc +++ b/google/cloud/networkmanagement/v1/internal/reachability_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace networkmanagement_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ReachabilityServiceTracingConnection::ReachabilityServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -286,17 +284,13 @@ Status ReachabilityServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeReachabilityServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/networkmanagement/v1/internal/reachability_tracing_connection.h b/google/cloud/networkmanagement/v1/internal/reachability_tracing_connection.h index 29e88e06d44d6..bfe6c6680d1c4 100644 --- a/google/cloud/networkmanagement/v1/internal/reachability_tracing_connection.h +++ b/google/cloud/networkmanagement/v1/internal/reachability_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace networkmanagement_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ReachabilityServiceTracingConnection : public networkmanagement_v1::ReachabilityServiceConnection { public: @@ -138,8 +136,6 @@ class ReachabilityServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/networkmanagement/v1/internal/reachability_tracing_stub.cc b/google/cloud/networkmanagement/v1/internal/reachability_tracing_stub.cc index 5d90d5f708bb7..81f2e1d97841d 100644 --- a/google/cloud/networkmanagement/v1/internal/reachability_tracing_stub.cc +++ b/google/cloud/networkmanagement/v1/internal/reachability_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkmanagement_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ReachabilityServiceTracingStub::ReachabilityServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -323,18 +324,14 @@ future ReachabilityServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeReachabilityServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkmanagement_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkmanagement/v1/internal/reachability_tracing_stub.h b/google/cloud/networkmanagement/v1/internal/reachability_tracing_stub.h index 72a4b5a56dd8c..d17701b44a52f 100644 --- a/google/cloud/networkmanagement/v1/internal/reachability_tracing_stub.h +++ b/google/cloud/networkmanagement/v1/internal/reachability_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkmanagement_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ReachabilityServiceTracingStub : public ReachabilityServiceStub { public: ~ReachabilityServiceTracingStub() override = default; @@ -153,8 +154,6 @@ class ReachabilityServiceTracingStub : public ReachabilityServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -169,4 +168,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKMANAGEMENT_V1_INTERNAL_REACHABILITY_TRACING_STUB_H diff --git a/google/cloud/networkmanagement/v1/reachability_client.h b/google/cloud/networkmanagement/v1/reachability_client.h index 4fe67211099f0..5a6bd2f446b7d 100644 --- a/google/cloud/networkmanagement/v1/reachability_client.h +++ b/google/cloud/networkmanagement/v1/reachability_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/networkmanagement/v1/reachability_connection.h b/google/cloud/networkmanagement/v1/reachability_connection.h index 507c71dec956f..83e0308f4c252 100644 --- a/google/cloud/networkmanagement/v1/reachability_connection.h +++ b/google/cloud/networkmanagement/v1/reachability_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKMANAGEMENT_V1_REACHABILITY_CONNECTION_H #include "google/cloud/networkmanagement/v1/internal/reachability_retry_traits.h" +#include "google/cloud/networkmanagement/v1/reachability.pb.h" #include "google/cloud/networkmanagement/v1/reachability_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/networkmanagement/v1/reachability_connection_idempotency_policy.h b/google/cloud/networkmanagement/v1/reachability_connection_idempotency_policy.h index 2d95b71e7df01..7541979cdf712 100644 --- a/google/cloud/networkmanagement/v1/reachability_connection_idempotency_policy.h +++ b/google/cloud/networkmanagement/v1/reachability_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKMANAGEMENT_V1_REACHABILITY_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKMANAGEMENT_V1_REACHABILITY_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/networkmanagement/v1/reachability.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/networksecurity/BUILD.bazel b/google/cloud/networksecurity/BUILD.bazel index a77fe0a8536f6..79f6dc3906290 100644 --- a/google/cloud/networksecurity/BUILD.bazel +++ b/google/cloud/networksecurity/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/networksecurity/v1:networksecurity_cc_grpc", + "@googleapis//google/cloud/networksecurity/v1:networksecurity_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/networksecurity/quickstart/.bazelrc b/google/cloud/networksecurity/quickstart/.bazelrc index 6777c6b4c95de..ec27511a60add 100644 --- a/google/cloud/networksecurity/quickstart/.bazelrc +++ b/google/cloud/networksecurity/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/networksecurity/quickstart/CMakeLists.txt b/google/cloud/networksecurity/quickstart/CMakeLists.txt index 4ee5eedcef096..f1bf85e3080dc 100644 --- a/google/cloud/networksecurity/quickstart/CMakeLists.txt +++ b/google/cloud/networksecurity/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Network Security API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-networksecurity-quickstart CXX) find_package(google_cloud_cpp_networksecurity REQUIRED) diff --git a/google/cloud/networksecurity/v1/internal/network_security_auth_decorator.cc b/google/cloud/networksecurity/v1/internal/network_security_auth_decorator.cc index ed6424b93edb9..7302ea4983134 100644 --- a/google/cloud/networksecurity/v1/internal/network_security_auth_decorator.cc +++ b/google/cloud/networksecurity/v1/internal/network_security_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/networksecurity/v1/network_security.proto #include "google/cloud/networksecurity/v1/internal/network_security_auth_decorator.h" -#include +#include "google/cloud/networksecurity/v1/network_security.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networksecurity_v1_internal { @@ -485,3 +488,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networksecurity_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networksecurity/v1/internal/network_security_auth_decorator.h b/google/cloud/networksecurity/v1/internal/network_security_auth_decorator.h index 22d5f9d3bf803..36f797eaf8f55 100644 --- a/google/cloud/networksecurity/v1/internal/network_security_auth_decorator.h +++ b/google/cloud/networksecurity/v1/internal/network_security_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/networksecurity/v1/internal/network_security_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networksecurity_v1_internal { @@ -245,4 +248,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSECURITY_V1_INTERNAL_NETWORK_SECURITY_AUTH_DECORATOR_H diff --git a/google/cloud/networksecurity/v1/internal/network_security_connection_impl.h b/google/cloud/networksecurity/v1/internal/network_security_connection_impl.h index 9cf54949b88a9..cb0213066d675 100644 --- a/google/cloud/networksecurity/v1/internal/network_security_connection_impl.h +++ b/google/cloud/networksecurity/v1/internal/network_security_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/networksecurity/v1/internal/network_security_logging_decorator.cc b/google/cloud/networksecurity/v1/internal/network_security_logging_decorator.cc index 748a21c1ba4ed..7a6cab9202e71 100644 --- a/google/cloud/networksecurity/v1/internal/network_security_logging_decorator.cc +++ b/google/cloud/networksecurity/v1/internal/network_security_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/networksecurity/v1/network_security.proto #include "google/cloud/networksecurity/v1/internal/network_security_logging_decorator.h" +#include "google/cloud/networksecurity/v1/network_security.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networksecurity_v1_internal { @@ -568,3 +571,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networksecurity_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networksecurity/v1/internal/network_security_logging_decorator.h b/google/cloud/networksecurity/v1/internal/network_security_logging_decorator.h index e27bb17138f65..7507028ec5e4d 100644 --- a/google/cloud/networksecurity/v1/internal/network_security_logging_decorator.h +++ b/google/cloud/networksecurity/v1/internal/network_security_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/networksecurity/v1/internal/network_security_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networksecurity_v1_internal { @@ -245,4 +248,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSECURITY_V1_INTERNAL_NETWORK_SECURITY_LOGGING_DECORATOR_H diff --git a/google/cloud/networksecurity/v1/internal/network_security_metadata_decorator.cc b/google/cloud/networksecurity/v1/internal/network_security_metadata_decorator.cc index c17532b8f4ec1..402fcd16ebf5d 100644 --- a/google/cloud/networksecurity/v1/internal/network_security_metadata_decorator.cc +++ b/google/cloud/networksecurity/v1/internal/network_security_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/networksecurity/v1/network_security.proto #include "google/cloud/networksecurity/v1/internal/network_security_metadata_decorator.h" +#include "google/cloud/networksecurity/v1/network_security.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networksecurity_v1_internal { @@ -442,3 +446,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networksecurity_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networksecurity/v1/internal/network_security_metadata_decorator.h b/google/cloud/networksecurity/v1/internal/network_security_metadata_decorator.h index 21e5f0afe2e04..02270931feec9 100644 --- a/google/cloud/networksecurity/v1/internal/network_security_metadata_decorator.h +++ b/google/cloud/networksecurity/v1/internal/network_security_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/networksecurity/v1/internal/network_security_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networksecurity_v1_internal { @@ -251,4 +254,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSECURITY_V1_INTERNAL_NETWORK_SECURITY_METADATA_DECORATOR_H diff --git a/google/cloud/networksecurity/v1/internal/network_security_option_defaults.cc b/google/cloud/networksecurity/v1/internal/network_security_option_defaults.cc index f2f0b38770ec4..7434686a029d3 100644 --- a/google/cloud/networksecurity/v1/internal/network_security_option_defaults.cc +++ b/google/cloud/networksecurity/v1/internal/network_security_option_defaults.cc @@ -42,7 +42,7 @@ Options NetworkSecurityDefaultOptions(Options options) { if (!options.has()) { options.set( networksecurity_v1::NetworkSecurityLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/networksecurity/v1/internal/network_security_stub.cc b/google/cloud/networksecurity/v1/internal/network_security_stub.cc index 77555bdf82f59..e883bd08cee81 100644 --- a/google/cloud/networksecurity/v1/internal/network_security_stub.cc +++ b/google/cloud/networksecurity/v1/internal/network_security_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/networksecurity/v1/network_security.proto #include "google/cloud/networksecurity/v1/internal/network_security_stub.h" +#include "google/cloud/networksecurity/v1/network_security.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networksecurity_v1_internal { @@ -560,3 +563,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networksecurity_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networksecurity/v1/internal/network_security_stub.h b/google/cloud/networksecurity/v1/internal/network_security_stub.h index a958f1110d9c0..3da26d900187e 100644 --- a/google/cloud/networksecurity/v1/internal/network_security_stub.h +++ b/google/cloud/networksecurity/v1/internal/network_security_stub.h @@ -19,19 +19,22 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSECURITY_V1_INTERNAL_NETWORK_SECURITY_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSECURITY_V1_INTERNAL_NETWORK_SECURITY_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/networksecurity/v1/common.pb.h" +#include "google/cloud/networksecurity/v1/network_security.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networksecurity_v1_internal { @@ -476,4 +479,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSECURITY_V1_INTERNAL_NETWORK_SECURITY_STUB_H diff --git a/google/cloud/networksecurity/v1/internal/network_security_stub_factory.cc b/google/cloud/networksecurity/v1/internal/network_security_stub_factory.cc index 8e42fca7d8861..e8e86b4ca13f8 100644 --- a/google/cloud/networksecurity/v1/internal/network_security_stub_factory.cc +++ b/google/cloud/networksecurity/v1/internal/network_security_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/networksecurity/v1/network_security.proto #include "google/cloud/networksecurity/v1/internal/network_security_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/networksecurity/v1/internal/network_security_auth_decorator.h" #include "google/cloud/networksecurity/v1/internal/network_security_logging_decorator.h" #include "google/cloud/networksecurity/v1/internal/network_security_metadata_decorator.h" #include "google/cloud/networksecurity/v1/internal/network_security_stub.h" #include "google/cloud/networksecurity/v1/internal/network_security_tracing_stub.h" +#include "google/cloud/networksecurity/v1/network_security.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networksecurity_v1_internal { @@ -78,3 +81,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networksecurity_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networksecurity/v1/internal/network_security_stub_factory.h b/google/cloud/networksecurity/v1/internal/network_security_stub_factory.h index 5c358fe27616b..c3a06fc8cef47 100644 --- a/google/cloud/networksecurity/v1/internal/network_security_stub_factory.h +++ b/google/cloud/networksecurity/v1/internal/network_security_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networksecurity_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSECURITY_V1_INTERNAL_NETWORK_SECURITY_STUB_FACTORY_H diff --git a/google/cloud/networksecurity/v1/internal/network_security_tracing_connection.cc b/google/cloud/networksecurity/v1/internal/network_security_tracing_connection.cc index 83c2a4edda198..cd155064fda46 100644 --- a/google/cloud/networksecurity/v1/internal/network_security_tracing_connection.cc +++ b/google/cloud/networksecurity/v1/internal/network_security_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace networksecurity_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - NetworkSecurityTracingConnection::NetworkSecurityTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -490,16 +488,12 @@ Status NetworkSecurityTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeNetworkSecurityTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/networksecurity/v1/internal/network_security_tracing_connection.h b/google/cloud/networksecurity/v1/internal/network_security_tracing_connection.h index b85cbf92baa11..c858b05037503 100644 --- a/google/cloud/networksecurity/v1/internal/network_security_tracing_connection.h +++ b/google/cloud/networksecurity/v1/internal/network_security_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace networksecurity_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class NetworkSecurityTracingConnection : public networksecurity_v1::NetworkSecurityConnection { public: @@ -224,8 +222,6 @@ class NetworkSecurityTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/networksecurity/v1/internal/network_security_tracing_stub.cc b/google/cloud/networksecurity/v1/internal/network_security_tracing_stub.cc index c84aa0ec60150..ea1870956e6da 100644 --- a/google/cloud/networksecurity/v1/internal/network_security_tracing_stub.cc +++ b/google/cloud/networksecurity/v1/internal/network_security_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networksecurity_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - NetworkSecurityTracingStub::NetworkSecurityTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -530,18 +531,14 @@ future NetworkSecurityTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeNetworkSecurityTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networksecurity_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networksecurity/v1/internal/network_security_tracing_stub.h b/google/cloud/networksecurity/v1/internal/network_security_tracing_stub.h index 1a466ecbbf119..10ffb38ca4a4a 100644 --- a/google/cloud/networksecurity/v1/internal/network_security_tracing_stub.h +++ b/google/cloud/networksecurity/v1/internal/network_security_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networksecurity_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class NetworkSecurityTracingStub : public NetworkSecurityStub { public: ~NetworkSecurityTracingStub() override = default; @@ -241,8 +242,6 @@ class NetworkSecurityTracingStub : public NetworkSecurityStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -257,4 +256,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSECURITY_V1_INTERNAL_NETWORK_SECURITY_TRACING_STUB_H diff --git a/google/cloud/networksecurity/v1/network_security_client.h b/google/cloud/networksecurity/v1/network_security_client.h index 63967dfc8aecc..d1f75500bc344 100644 --- a/google/cloud/networksecurity/v1/network_security_client.h +++ b/google/cloud/networksecurity/v1/network_security_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/networksecurity/v1/network_security_connection.h b/google/cloud/networksecurity/v1/network_security_connection.h index 313568bfd717a..b69e925f227aa 100644 --- a/google/cloud/networksecurity/v1/network_security_connection.h +++ b/google/cloud/networksecurity/v1/network_security_connection.h @@ -19,7 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSECURITY_V1_NETWORK_SECURITY_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSECURITY_V1_NETWORK_SECURITY_CONNECTION_H +#include "google/cloud/networksecurity/v1/common.pb.h" #include "google/cloud/networksecurity/v1/internal/network_security_retry_traits.h" +#include "google/cloud/networksecurity/v1/network_security.pb.h" #include "google/cloud/networksecurity/v1/network_security_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,9 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/networksecurity/v1/network_security_connection_idempotency_policy.h b/google/cloud/networksecurity/v1/network_security_connection_idempotency_policy.h index e9693649b51fc..66d1a0c9233ad 100644 --- a/google/cloud/networksecurity/v1/network_security_connection_idempotency_policy.h +++ b/google/cloud/networksecurity/v1/network_security_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSECURITY_V1_NETWORK_SECURITY_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSECURITY_V1_NETWORK_SECURITY_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/networksecurity/v1/network_security.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/networkservices/BUILD.bazel b/google/cloud/networkservices/BUILD.bazel index 1f4c5e7f1660b..4580fd4893a7b 100644 --- a/google/cloud/networkservices/BUILD.bazel +++ b/google/cloud/networkservices/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/networkservices/v1:networkservices_cc_grpc", + "@googleapis//google/cloud/networkservices/v1:networkservices_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/networkservices/quickstart/.bazelrc b/google/cloud/networkservices/quickstart/.bazelrc index 6777c6b4c95de..ec27511a60add 100644 --- a/google/cloud/networkservices/quickstart/.bazelrc +++ b/google/cloud/networkservices/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/networkservices/quickstart/CMakeLists.txt b/google/cloud/networkservices/quickstart/CMakeLists.txt index b7eec171bcdb4..8fb1e1adb091f 100644 --- a/google/cloud/networkservices/quickstart/CMakeLists.txt +++ b/google/cloud/networkservices/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Network Services API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-networkservices-quickstart CXX) find_package(google_cloud_cpp_networkservices REQUIRED) diff --git a/google/cloud/networkservices/v1/dep_client.h b/google/cloud/networkservices/v1/dep_client.h index dbe51a7a76116..66533d158d641 100644 --- a/google/cloud/networkservices/v1/dep_client.h +++ b/google/cloud/networkservices/v1/dep_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/networkservices/v1/dep_connection.h b/google/cloud/networkservices/v1/dep_connection.h index 041a35523c553..4879e6d7dfeff 100644 --- a/google/cloud/networkservices/v1/dep_connection.h +++ b/google/cloud/networkservices/v1/dep_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSERVICES_V1_DEP_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSERVICES_V1_DEP_CONNECTION_H +#include "google/cloud/networkservices/v1/dep.pb.h" #include "google/cloud/networkservices/v1/dep_connection_idempotency_policy.h" #include "google/cloud/networkservices/v1/internal/dep_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/networkservices/v1/dep_connection_idempotency_policy.h b/google/cloud/networkservices/v1/dep_connection_idempotency_policy.h index 874fc7614c79e..be352f7959754 100644 --- a/google/cloud/networkservices/v1/dep_connection_idempotency_policy.h +++ b/google/cloud/networkservices/v1/dep_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSERVICES_V1_DEP_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSERVICES_V1_DEP_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/networkservices/v1/dep.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/networkservices/v1/internal/dep_auth_decorator.cc b/google/cloud/networkservices/v1/internal/dep_auth_decorator.cc index 3c2d66d6970f4..2f00fd264198c 100644 --- a/google/cloud/networkservices/v1/internal/dep_auth_decorator.cc +++ b/google/cloud/networkservices/v1/internal/dep_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/networkservices/v1/dep.proto #include "google/cloud/networkservices/v1/internal/dep_auth_decorator.h" -#include +#include "google/cloud/networkservices/v1/dep.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkservices_v1_internal { @@ -589,3 +592,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkservices_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkservices/v1/internal/dep_auth_decorator.h b/google/cloud/networkservices/v1/internal/dep_auth_decorator.h index 80b2d502aa5f2..9a50ca948048b 100644 --- a/google/cloud/networkservices/v1/internal/dep_auth_decorator.h +++ b/google/cloud/networkservices/v1/internal/dep_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/networkservices/v1/internal/dep_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkservices_v1_internal { @@ -292,4 +295,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSERVICES_V1_INTERNAL_DEP_AUTH_DECORATOR_H diff --git a/google/cloud/networkservices/v1/internal/dep_connection_impl.h b/google/cloud/networkservices/v1/internal/dep_connection_impl.h index 44e3d4b03191a..3f275af2aad41 100644 --- a/google/cloud/networkservices/v1/internal/dep_connection_impl.h +++ b/google/cloud/networkservices/v1/internal/dep_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/networkservices/v1/internal/dep_logging_decorator.cc b/google/cloud/networkservices/v1/internal/dep_logging_decorator.cc index 26dd6fb5f819b..96590b3135c0f 100644 --- a/google/cloud/networkservices/v1/internal/dep_logging_decorator.cc +++ b/google/cloud/networkservices/v1/internal/dep_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/networkservices/v1/dep.proto #include "google/cloud/networkservices/v1/internal/dep_logging_decorator.h" +#include "google/cloud/networkservices/v1/dep.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkservices_v1_internal { @@ -706,3 +709,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkservices_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkservices/v1/internal/dep_logging_decorator.h b/google/cloud/networkservices/v1/internal/dep_logging_decorator.h index fccc49fe45c59..6c7541b00dfb3 100644 --- a/google/cloud/networkservices/v1/internal/dep_logging_decorator.h +++ b/google/cloud/networkservices/v1/internal/dep_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/networkservices/v1/internal/dep_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkservices_v1_internal { @@ -292,4 +295,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSERVICES_V1_INTERNAL_DEP_LOGGING_DECORATOR_H diff --git a/google/cloud/networkservices/v1/internal/dep_metadata_decorator.cc b/google/cloud/networkservices/v1/internal/dep_metadata_decorator.cc index ec4c164397b52..379733d2e2a90 100644 --- a/google/cloud/networkservices/v1/internal/dep_metadata_decorator.cc +++ b/google/cloud/networkservices/v1/internal/dep_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/networkservices/v1/dep.proto #include "google/cloud/networkservices/v1/internal/dep_metadata_decorator.h" +#include "google/cloud/networkservices/v1/dep.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkservices_v1_internal { @@ -534,3 +538,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkservices_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkservices/v1/internal/dep_metadata_decorator.h b/google/cloud/networkservices/v1/internal/dep_metadata_decorator.h index 4f51d57722ae8..77e92a1794cd6 100644 --- a/google/cloud/networkservices/v1/internal/dep_metadata_decorator.h +++ b/google/cloud/networkservices/v1/internal/dep_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/networkservices/v1/internal/dep_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkservices_v1_internal { @@ -297,4 +300,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSERVICES_V1_INTERNAL_DEP_METADATA_DECORATOR_H diff --git a/google/cloud/networkservices/v1/internal/dep_option_defaults.cc b/google/cloud/networkservices/v1/internal/dep_option_defaults.cc index de7dfc229b17f..e780243fcec52 100644 --- a/google/cloud/networkservices/v1/internal/dep_option_defaults.cc +++ b/google/cloud/networkservices/v1/internal/dep_option_defaults.cc @@ -42,7 +42,7 @@ Options DepServiceDefaultOptions(Options options) { if (!options.has()) { options.set( networkservices_v1::DepServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/networkservices/v1/internal/dep_stub.cc b/google/cloud/networkservices/v1/internal/dep_stub.cc index 9e0a16c1fa041..b5fc5b82315ee 100644 --- a/google/cloud/networkservices/v1/internal/dep_stub.cc +++ b/google/cloud/networkservices/v1/internal/dep_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/networkservices/v1/dep.proto #include "google/cloud/networkservices/v1/internal/dep_stub.h" +#include "google/cloud/networkservices/v1/dep.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkservices_v1_internal { @@ -687,3 +690,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkservices_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkservices/v1/internal/dep_stub.h b/google/cloud/networkservices/v1/internal/dep_stub.h index 9c3a7cbaf7cb8..45ed9475ecff4 100644 --- a/google/cloud/networkservices/v1/internal/dep_stub.h +++ b/google/cloud/networkservices/v1/internal/dep_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSERVICES_V1_INTERNAL_DEP_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSERVICES_V1_INTERNAL_DEP_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/networkservices/v1/dep.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkservices_v1_internal { @@ -573,4 +576,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSERVICES_V1_INTERNAL_DEP_STUB_H diff --git a/google/cloud/networkservices/v1/internal/dep_stub_factory.cc b/google/cloud/networkservices/v1/internal/dep_stub_factory.cc index 4e919a379e61e..f2d13c4590bac 100644 --- a/google/cloud/networkservices/v1/internal/dep_stub_factory.cc +++ b/google/cloud/networkservices/v1/internal/dep_stub_factory.cc @@ -17,6 +17,8 @@ // source: google/cloud/networkservices/v1/dep.proto #include "google/cloud/networkservices/v1/internal/dep_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/networkservices/v1/dep.grpc.pb.h" #include "google/cloud/networkservices/v1/internal/dep_auth_decorator.h" #include "google/cloud/networkservices/v1/internal/dep_logging_decorator.h" #include "google/cloud/networkservices/v1/internal/dep_metadata_decorator.h" @@ -28,13 +30,14 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkservices_v1_internal { @@ -77,3 +80,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkservices_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkservices/v1/internal/dep_stub_factory.h b/google/cloud/networkservices/v1/internal/dep_stub_factory.h index 53deb383f7bac..dade960c038b7 100644 --- a/google/cloud/networkservices/v1/internal/dep_stub_factory.h +++ b/google/cloud/networkservices/v1/internal/dep_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkservices_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSERVICES_V1_INTERNAL_DEP_STUB_FACTORY_H diff --git a/google/cloud/networkservices/v1/internal/dep_tracing_connection.cc b/google/cloud/networkservices/v1/internal/dep_tracing_connection.cc index d71f217e7e508..ccbc0a6754596 100644 --- a/google/cloud/networkservices/v1/internal/dep_tracing_connection.cc +++ b/google/cloud/networkservices/v1/internal/dep_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace networkservices_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DepServiceTracingConnection::DepServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -599,16 +597,12 @@ Status DepServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDepServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/networkservices/v1/internal/dep_tracing_connection.h b/google/cloud/networkservices/v1/internal/dep_tracing_connection.h index 973c59e85987e..35b6877d3e336 100644 --- a/google/cloud/networkservices/v1/internal/dep_tracing_connection.h +++ b/google/cloud/networkservices/v1/internal/dep_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace networkservices_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DepServiceTracingConnection : public networkservices_v1::DepServiceConnection { public: @@ -279,8 +277,6 @@ class DepServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/networkservices/v1/internal/dep_tracing_stub.cc b/google/cloud/networkservices/v1/internal/dep_tracing_stub.cc index 5d166bfdbdd8f..bf3c5daf6c259 100644 --- a/google/cloud/networkservices/v1/internal/dep_tracing_stub.cc +++ b/google/cloud/networkservices/v1/internal/dep_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkservices_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DepServiceTracingStub::DepServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -621,18 +622,14 @@ future DepServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDepServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkservices_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkservices/v1/internal/dep_tracing_stub.h b/google/cloud/networkservices/v1/internal/dep_tracing_stub.h index 95c5f89163794..409d0663843ae 100644 --- a/google/cloud/networkservices/v1/internal/dep_tracing_stub.h +++ b/google/cloud/networkservices/v1/internal/dep_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkservices_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DepServiceTracingStub : public DepServiceStub { public: ~DepServiceTracingStub() override = default; @@ -287,8 +288,6 @@ class DepServiceTracingStub : public DepServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -303,4 +302,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSERVICES_V1_INTERNAL_DEP_TRACING_STUB_H diff --git a/google/cloud/networkservices/v1/internal/network_services_auth_decorator.cc b/google/cloud/networkservices/v1/internal/network_services_auth_decorator.cc index 751e69c52c6af..adf72e03d4b7e 100644 --- a/google/cloud/networkservices/v1/internal/network_services_auth_decorator.cc +++ b/google/cloud/networkservices/v1/internal/network_services_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/networkservices/v1/network_services.proto #include "google/cloud/networkservices/v1/internal/network_services_auth_decorator.h" -#include +#include "google/cloud/networkservices/v1/network_services.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkservices_v1_internal { @@ -1326,3 +1329,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkservices_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkservices/v1/internal/network_services_auth_decorator.h b/google/cloud/networkservices/v1/internal/network_services_auth_decorator.h index 4ed9ae4349311..72ab08d0d1f40 100644 --- a/google/cloud/networkservices/v1/internal/network_services_auth_decorator.h +++ b/google/cloud/networkservices/v1/internal/network_services_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/networkservices/v1/internal/network_services_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkservices_v1_internal { @@ -625,4 +628,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSERVICES_V1_INTERNAL_NETWORK_SERVICES_AUTH_DECORATOR_H diff --git a/google/cloud/networkservices/v1/internal/network_services_connection_impl.h b/google/cloud/networkservices/v1/internal/network_services_connection_impl.h index 80d4275c2034f..12cb4f5755802 100644 --- a/google/cloud/networkservices/v1/internal/network_services_connection_impl.h +++ b/google/cloud/networkservices/v1/internal/network_services_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/networkservices/v1/internal/network_services_logging_decorator.cc b/google/cloud/networkservices/v1/internal/network_services_logging_decorator.cc index 2f2a7abbc095c..e0f687afda43d 100644 --- a/google/cloud/networkservices/v1/internal/network_services_logging_decorator.cc +++ b/google/cloud/networkservices/v1/internal/network_services_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/networkservices/v1/network_services.proto #include "google/cloud/networkservices/v1/internal/network_services_logging_decorator.h" +#include "google/cloud/networkservices/v1/network_services.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkservices_v1_internal { @@ -1584,3 +1587,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkservices_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkservices/v1/internal/network_services_logging_decorator.h b/google/cloud/networkservices/v1/internal/network_services_logging_decorator.h index 7563a8b1ea79d..cf843315c9061 100644 --- a/google/cloud/networkservices/v1/internal/network_services_logging_decorator.h +++ b/google/cloud/networkservices/v1/internal/network_services_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/networkservices/v1/internal/network_services_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkservices_v1_internal { @@ -625,4 +628,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSERVICES_V1_INTERNAL_NETWORK_SERVICES_LOGGING_DECORATOR_H diff --git a/google/cloud/networkservices/v1/internal/network_services_metadata_decorator.cc b/google/cloud/networkservices/v1/internal/network_services_metadata_decorator.cc index 22c06f9ed7755..372a570ca3ac9 100644 --- a/google/cloud/networkservices/v1/internal/network_services_metadata_decorator.cc +++ b/google/cloud/networkservices/v1/internal/network_services_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/networkservices/v1/network_services.proto #include "google/cloud/networkservices/v1/internal/network_services_metadata_decorator.h" +#include "google/cloud/networkservices/v1/network_services.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkservices_v1_internal { @@ -1129,3 +1133,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkservices_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkservices/v1/internal/network_services_metadata_decorator.h b/google/cloud/networkservices/v1/internal/network_services_metadata_decorator.h index 819cbce73ef98..f078ac7104d55 100644 --- a/google/cloud/networkservices/v1/internal/network_services_metadata_decorator.h +++ b/google/cloud/networkservices/v1/internal/network_services_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/networkservices/v1/internal/network_services_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkservices_v1_internal { @@ -631,4 +634,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSERVICES_V1_INTERNAL_NETWORK_SERVICES_METADATA_DECORATOR_H diff --git a/google/cloud/networkservices/v1/internal/network_services_option_defaults.cc b/google/cloud/networkservices/v1/internal/network_services_option_defaults.cc index 532e4bc6c0538..d4e95150a6978 100644 --- a/google/cloud/networkservices/v1/internal/network_services_option_defaults.cc +++ b/google/cloud/networkservices/v1/internal/network_services_option_defaults.cc @@ -42,7 +42,7 @@ Options NetworkServicesDefaultOptions(Options options) { if (!options.has()) { options.set( networkservices_v1::NetworkServicesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/networkservices/v1/internal/network_services_stub.cc b/google/cloud/networkservices/v1/internal/network_services_stub.cc index 962b18476aace..8a5d980bb5e4f 100644 --- a/google/cloud/networkservices/v1/internal/network_services_stub.cc +++ b/google/cloud/networkservices/v1/internal/network_services_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/networkservices/v1/network_services.proto #include "google/cloud/networkservices/v1/internal/network_services_stub.h" +#include "google/cloud/networkservices/v1/network_services.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkservices_v1_internal { @@ -1529,3 +1532,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkservices_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkservices/v1/internal/network_services_stub.h b/google/cloud/networkservices/v1/internal/network_services_stub.h index 2cb715a2e50c1..1771e19b4d4e1 100644 --- a/google/cloud/networkservices/v1/internal/network_services_stub.h +++ b/google/cloud/networkservices/v1/internal/network_services_stub.h @@ -19,19 +19,22 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSERVICES_V1_INTERNAL_NETWORK_SERVICES_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSERVICES_V1_INTERNAL_NETWORK_SERVICES_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/networkservices/v1/extensibility.pb.h" +#include "google/cloud/networkservices/v1/network_services.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkservices_v1_internal { @@ -1241,4 +1244,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSERVICES_V1_INTERNAL_NETWORK_SERVICES_STUB_H diff --git a/google/cloud/networkservices/v1/internal/network_services_stub_factory.cc b/google/cloud/networkservices/v1/internal/network_services_stub_factory.cc index 900f9828b73cd..d79f6e22028cf 100644 --- a/google/cloud/networkservices/v1/internal/network_services_stub_factory.cc +++ b/google/cloud/networkservices/v1/internal/network_services_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/networkservices/v1/network_services.proto #include "google/cloud/networkservices/v1/internal/network_services_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/networkservices/v1/internal/network_services_auth_decorator.h" #include "google/cloud/networkservices/v1/internal/network_services_logging_decorator.h" #include "google/cloud/networkservices/v1/internal/network_services_metadata_decorator.h" #include "google/cloud/networkservices/v1/internal/network_services_stub.h" #include "google/cloud/networkservices/v1/internal/network_services_tracing_stub.h" +#include "google/cloud/networkservices/v1/network_services.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkservices_v1_internal { @@ -78,3 +81,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkservices_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkservices/v1/internal/network_services_stub_factory.h b/google/cloud/networkservices/v1/internal/network_services_stub_factory.h index 4720410910b5e..d0b3884131a37 100644 --- a/google/cloud/networkservices/v1/internal/network_services_stub_factory.h +++ b/google/cloud/networkservices/v1/internal/network_services_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkservices_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSERVICES_V1_INTERNAL_NETWORK_SERVICES_STUB_FACTORY_H diff --git a/google/cloud/networkservices/v1/internal/network_services_tracing_connection.cc b/google/cloud/networkservices/v1/internal/network_services_tracing_connection.cc index 3fd726763d814..407039150b77e 100644 --- a/google/cloud/networkservices/v1/internal/network_services_tracing_connection.cc +++ b/google/cloud/networkservices/v1/internal/network_services_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace networkservices_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - NetworkServicesTracingConnection::NetworkServicesTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -1369,16 +1367,12 @@ Status NetworkServicesTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeNetworkServicesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/networkservices/v1/internal/network_services_tracing_connection.h b/google/cloud/networkservices/v1/internal/network_services_tracing_connection.h index dfc8f9c8ddc1d..53732106c02b3 100644 --- a/google/cloud/networkservices/v1/internal/network_services_tracing_connection.h +++ b/google/cloud/networkservices/v1/internal/network_services_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace networkservices_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class NetworkServicesTracingConnection : public networkservices_v1::NetworkServicesConnection { public: @@ -601,8 +599,6 @@ class NetworkServicesTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/networkservices/v1/internal/network_services_tracing_stub.cc b/google/cloud/networkservices/v1/internal/network_services_tracing_stub.cc index 9e22688f6a023..a543dbe16e423 100644 --- a/google/cloud/networkservices/v1/internal/network_services_tracing_stub.cc +++ b/google/cloud/networkservices/v1/internal/network_services_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkservices_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - NetworkServicesTracingStub::NetworkServicesTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -1401,18 +1402,14 @@ future NetworkServicesTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeNetworkServicesTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace networkservices_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/networkservices/v1/internal/network_services_tracing_stub.h b/google/cloud/networkservices/v1/internal/network_services_tracing_stub.h index c7ceb1a7381a7..714288acd7a5e 100644 --- a/google/cloud/networkservices/v1/internal/network_services_tracing_stub.h +++ b/google/cloud/networkservices/v1/internal/network_services_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace networkservices_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class NetworkServicesTracingStub : public NetworkServicesStub { public: ~NetworkServicesTracingStub() override = default; @@ -621,8 +622,6 @@ class NetworkServicesTracingStub : public NetworkServicesStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -637,4 +636,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSERVICES_V1_INTERNAL_NETWORK_SERVICES_TRACING_STUB_H diff --git a/google/cloud/networkservices/v1/network_services_client.h b/google/cloud/networkservices/v1/network_services_client.h index 53a082a54bbe5..875ccde795ef7 100644 --- a/google/cloud/networkservices/v1/network_services_client.h +++ b/google/cloud/networkservices/v1/network_services_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/networkservices/v1/network_services_connection.h b/google/cloud/networkservices/v1/network_services_connection.h index e96b8e26416c6..d682bafcd26a0 100644 --- a/google/cloud/networkservices/v1/network_services_connection.h +++ b/google/cloud/networkservices/v1/network_services_connection.h @@ -19,7 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSERVICES_V1_NETWORK_SERVICES_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSERVICES_V1_NETWORK_SERVICES_CONNECTION_H +#include "google/cloud/networkservices/v1/extensibility.pb.h" #include "google/cloud/networkservices/v1/internal/network_services_retry_traits.h" +#include "google/cloud/networkservices/v1/network_services.pb.h" #include "google/cloud/networkservices/v1/network_services_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,9 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/networkservices/v1/network_services_connection_idempotency_policy.h b/google/cloud/networkservices/v1/network_services_connection_idempotency_policy.h index b2adcea8b8b9c..4e107d6f6c282 100644 --- a/google/cloud/networkservices/v1/network_services_connection_idempotency_policy.h +++ b/google/cloud/networkservices/v1/network_services_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSERVICES_V1_NETWORK_SERVICES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NETWORKSERVICES_V1_NETWORK_SERVICES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/networkservices/v1/network_services.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/notebooks/BUILD.bazel b/google/cloud/notebooks/BUILD.bazel index a7ca423cce1f4..7febd682d260b 100644 --- a/google/cloud/notebooks/BUILD.bazel +++ b/google/cloud/notebooks/BUILD.bazel @@ -19,14 +19,13 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", "v2/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/notebooks/v1:notebooks_cc_grpc", - "@com_google_googleapis//google/cloud/notebooks/v2:notebooks_cc_grpc", + "@googleapis//google/cloud/notebooks/v1:notebooks_cc_grpc", + "@googleapis//google/cloud/notebooks/v2:notebooks_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/notebooks/CMakeLists.txt b/google/cloud/notebooks/CMakeLists.txt index f657aaf5f65c2..eb47354bdc5bc 100644 --- a/google/cloud/notebooks/CMakeLists.txt +++ b/google/cloud/notebooks/CMakeLists.txt @@ -16,8 +16,8 @@ include(GoogleCloudCppLibrary) -google_cloud_cpp_add_gapic_library(notebooks "Notebooks API" - SERVICE_DIRS "__EMPTY__" "v1/" "v2/") +google_cloud_cpp_add_gapic_library(notebooks "Notebooks API" SERVICE_DIRS "v1/" + "v2/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(notebooks_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/notebooks/managed_notebook_client.h b/google/cloud/notebooks/managed_notebook_client.h deleted file mode 100644 index bbddc64b0cd9e..0000000000000 --- a/google/cloud/notebooks/managed_notebook_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/notebooks/v1/managed_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_MANAGED_NOTEBOOK_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_MANAGED_NOTEBOOK_CLIENT_H - -#include "google/cloud/notebooks/managed_notebook_connection.h" -#include "google/cloud/notebooks/v1/managed_notebook_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in notebooks_v1 instead of the aliases defined in -/// this namespace. -namespace notebooks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use notebooks_v1::ManagedNotebookServiceClient directly. -using ::google::cloud::notebooks_v1::ManagedNotebookServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace notebooks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_MANAGED_NOTEBOOK_CLIENT_H diff --git a/google/cloud/notebooks/managed_notebook_connection.h b/google/cloud/notebooks/managed_notebook_connection.h deleted file mode 100644 index c38d788004627..0000000000000 --- a/google/cloud/notebooks/managed_notebook_connection.h +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/notebooks/v1/managed_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_MANAGED_NOTEBOOK_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_MANAGED_NOTEBOOK_CONNECTION_H - -#include "google/cloud/notebooks/managed_notebook_connection_idempotency_policy.h" -#include "google/cloud/notebooks/v1/managed_notebook_connection.h" - -namespace google { -namespace cloud { -namespace notebooks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use notebooks_v1::MakeManagedNotebookServiceConnection directly. -using ::google::cloud::notebooks_v1::MakeManagedNotebookServiceConnection; - -/// @deprecated Use notebooks_v1::ManagedNotebookServiceConnection directly. -using ::google::cloud::notebooks_v1::ManagedNotebookServiceConnection; - -/// @deprecated Use -/// notebooks_v1::ManagedNotebookServiceLimitedErrorCountRetryPolicy directly. -using ::google::cloud::notebooks_v1:: - ManagedNotebookServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use notebooks_v1::ManagedNotebookServiceLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::notebooks_v1:: - ManagedNotebookServiceLimitedTimeRetryPolicy; - -/// @deprecated Use notebooks_v1::ManagedNotebookServiceRetryPolicy directly. -using ::google::cloud::notebooks_v1::ManagedNotebookServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace notebooks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_MANAGED_NOTEBOOK_CONNECTION_H diff --git a/google/cloud/notebooks/managed_notebook_connection_idempotency_policy.h b/google/cloud/notebooks/managed_notebook_connection_idempotency_policy.h deleted file mode 100644 index 55618141907e9..0000000000000 --- a/google/cloud/notebooks/managed_notebook_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/notebooks/v1/managed_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_MANAGED_NOTEBOOK_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_MANAGED_NOTEBOOK_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/notebooks/v1/managed_notebook_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace notebooks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// notebooks_v1::MakeDefaultManagedNotebookServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::notebooks_v1:: - MakeDefaultManagedNotebookServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// notebooks_v1::ManagedNotebookServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::notebooks_v1:: - ManagedNotebookServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace notebooks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_MANAGED_NOTEBOOK_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/notebooks/managed_notebook_options.h b/google/cloud/notebooks/managed_notebook_options.h deleted file mode 100644 index 5acd37f6df28f..0000000000000 --- a/google/cloud/notebooks/managed_notebook_options.h +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/notebooks/v1/managed_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_MANAGED_NOTEBOOK_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_MANAGED_NOTEBOOK_OPTIONS_H - -#include "google/cloud/notebooks/managed_notebook_connection.h" -#include "google/cloud/notebooks/managed_notebook_connection_idempotency_policy.h" -#include "google/cloud/notebooks/v1/managed_notebook_options.h" - -namespace google { -namespace cloud { -namespace notebooks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use notebooks_v1::ManagedNotebookServicePollingPolicyOption -/// directly. -using ::google::cloud::notebooks_v1::ManagedNotebookServicePollingPolicyOption; - -/// @deprecated Use notebooks_v1::ManagedNotebookServiceBackoffPolicyOption -/// directly. -using ::google::cloud::notebooks_v1::ManagedNotebookServiceBackoffPolicyOption; - -/// @deprecated Use -/// notebooks_v1::ManagedNotebookServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::notebooks_v1:: - ManagedNotebookServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use notebooks_v1::ManagedNotebookServicePolicyOptionList -/// directly. -using ::google::cloud::notebooks_v1::ManagedNotebookServicePolicyOptionList; - -/// @deprecated Use notebooks_v1::ManagedNotebookServiceRetryPolicyOption -/// directly. -using ::google::cloud::notebooks_v1::ManagedNotebookServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace notebooks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_MANAGED_NOTEBOOK_OPTIONS_H diff --git a/google/cloud/notebooks/mocks/mock_managed_notebook_connection.h b/google/cloud/notebooks/mocks/mock_managed_notebook_connection.h deleted file mode 100644 index 552aa0075c970..0000000000000 --- a/google/cloud/notebooks/mocks/mock_managed_notebook_connection.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/notebooks/v1/managed_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_MOCKS_MOCK_MANAGED_NOTEBOOK_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_MOCKS_MOCK_MANAGED_NOTEBOOK_CONNECTION_H - -#include "google/cloud/notebooks/managed_notebook_connection.h" -#include "google/cloud/notebooks/v1/mocks/mock_managed_notebook_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in notebooks_v1_mocks instead of the aliases -/// defined in this namespace. -namespace notebooks_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use notebooks_v1_mocks::MockManagedNotebookServiceConnection -/// directly. -using ::google::cloud::notebooks_v1_mocks::MockManagedNotebookServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace notebooks_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_MOCKS_MOCK_MANAGED_NOTEBOOK_CONNECTION_H diff --git a/google/cloud/notebooks/mocks/mock_notebook_connection.h b/google/cloud/notebooks/mocks/mock_notebook_connection.h deleted file mode 100644 index fad3765db1981..0000000000000 --- a/google/cloud/notebooks/mocks/mock_notebook_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/notebooks/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_MOCKS_MOCK_NOTEBOOK_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_MOCKS_MOCK_NOTEBOOK_CONNECTION_H - -#include "google/cloud/notebooks/notebook_connection.h" -#include "google/cloud/notebooks/v1/mocks/mock_notebook_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in notebooks_v1_mocks instead of the aliases -/// defined in this namespace. -namespace notebooks_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use notebooks_v1_mocks::MockNotebookServiceConnection directly. -using ::google::cloud::notebooks_v1_mocks::MockNotebookServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace notebooks_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_MOCKS_MOCK_NOTEBOOK_CONNECTION_H diff --git a/google/cloud/notebooks/notebook_client.h b/google/cloud/notebooks/notebook_client.h deleted file mode 100644 index 920b20f87f608..0000000000000 --- a/google/cloud/notebooks/notebook_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/notebooks/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_NOTEBOOK_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_NOTEBOOK_CLIENT_H - -#include "google/cloud/notebooks/notebook_connection.h" -#include "google/cloud/notebooks/v1/notebook_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in notebooks_v1 instead of the aliases defined in -/// this namespace. -namespace notebooks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use notebooks_v1::NotebookServiceClient directly. -using ::google::cloud::notebooks_v1::NotebookServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace notebooks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_NOTEBOOK_CLIENT_H diff --git a/google/cloud/notebooks/notebook_connection.h b/google/cloud/notebooks/notebook_connection.h deleted file mode 100644 index d3ea3c268ae79..0000000000000 --- a/google/cloud/notebooks/notebook_connection.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/notebooks/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_NOTEBOOK_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_NOTEBOOK_CONNECTION_H - -#include "google/cloud/notebooks/notebook_connection_idempotency_policy.h" -#include "google/cloud/notebooks/v1/notebook_connection.h" - -namespace google { -namespace cloud { -namespace notebooks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use notebooks_v1::MakeNotebookServiceConnection directly. -using ::google::cloud::notebooks_v1::MakeNotebookServiceConnection; - -/// @deprecated Use notebooks_v1::NotebookServiceConnection directly. -using ::google::cloud::notebooks_v1::NotebookServiceConnection; - -/// @deprecated Use notebooks_v1::NotebookServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::notebooks_v1:: - NotebookServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use notebooks_v1::NotebookServiceLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::notebooks_v1::NotebookServiceLimitedTimeRetryPolicy; - -/// @deprecated Use notebooks_v1::NotebookServiceRetryPolicy directly. -using ::google::cloud::notebooks_v1::NotebookServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace notebooks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_NOTEBOOK_CONNECTION_H diff --git a/google/cloud/notebooks/notebook_connection_idempotency_policy.h b/google/cloud/notebooks/notebook_connection_idempotency_policy.h deleted file mode 100644 index 116f0c2654765..0000000000000 --- a/google/cloud/notebooks/notebook_connection_idempotency_policy.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/notebooks/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_NOTEBOOK_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_NOTEBOOK_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/notebooks/v1/notebook_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace notebooks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// notebooks_v1::MakeDefaultNotebookServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::notebooks_v1:: - MakeDefaultNotebookServiceConnectionIdempotencyPolicy; - -/// @deprecated Use notebooks_v1::NotebookServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::notebooks_v1::NotebookServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace notebooks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_NOTEBOOK_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/notebooks/notebook_options.h b/google/cloud/notebooks/notebook_options.h deleted file mode 100644 index 8e736eddcd4e4..0000000000000 --- a/google/cloud/notebooks/notebook_options.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/notebooks/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_NOTEBOOK_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_NOTEBOOK_OPTIONS_H - -#include "google/cloud/notebooks/notebook_connection.h" -#include "google/cloud/notebooks/notebook_connection_idempotency_policy.h" -#include "google/cloud/notebooks/v1/notebook_options.h" - -namespace google { -namespace cloud { -namespace notebooks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use notebooks_v1::NotebookServicePollingPolicyOption directly. -using ::google::cloud::notebooks_v1::NotebookServicePollingPolicyOption; - -/// @deprecated Use notebooks_v1::NotebookServiceBackoffPolicyOption directly. -using ::google::cloud::notebooks_v1::NotebookServiceBackoffPolicyOption; - -/// @deprecated Use -/// notebooks_v1::NotebookServiceConnectionIdempotencyPolicyOption directly. -using ::google::cloud::notebooks_v1:: - NotebookServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use notebooks_v1::NotebookServicePolicyOptionList directly. -using ::google::cloud::notebooks_v1::NotebookServicePolicyOptionList; - -/// @deprecated Use notebooks_v1::NotebookServiceRetryPolicyOption directly. -using ::google::cloud::notebooks_v1::NotebookServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace notebooks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_NOTEBOOK_OPTIONS_H diff --git a/google/cloud/notebooks/quickstart/.bazelrc b/google/cloud/notebooks/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/notebooks/quickstart/.bazelrc +++ b/google/cloud/notebooks/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/notebooks/quickstart/CMakeLists.txt b/google/cloud/notebooks/quickstart/CMakeLists.txt index 5df74636721ff..558ce73793a6c 100644 --- a/google/cloud/notebooks/quickstart/CMakeLists.txt +++ b/google/cloud/notebooks/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Notebooks API C++ client library from a larger # CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-notebooks-quickstart CXX) find_package(google_cloud_cpp_notebooks REQUIRED) diff --git a/google/cloud/notebooks/v1/internal/managed_notebook_auth_decorator.cc b/google/cloud/notebooks/v1/internal/managed_notebook_auth_decorator.cc index 0085878d73413..6bdb1629feccf 100644 --- a/google/cloud/notebooks/v1/internal/managed_notebook_auth_decorator.cc +++ b/google/cloud/notebooks/v1/internal/managed_notebook_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/notebooks/v1/managed_service.proto #include "google/cloud/notebooks/v1/internal/managed_notebook_auth_decorator.h" -#include +#include "google/cloud/notebooks/v1/managed_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v1_internal { @@ -466,3 +469,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace notebooks_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/notebooks/v1/internal/managed_notebook_auth_decorator.h b/google/cloud/notebooks/v1/internal/managed_notebook_auth_decorator.h index 583354fc681bf..638a200f2151d 100644 --- a/google/cloud/notebooks/v1/internal/managed_notebook_auth_decorator.h +++ b/google/cloud/notebooks/v1/internal/managed_notebook_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/notebooks/v1/internal/managed_notebook_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v1_internal { @@ -230,4 +233,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_V1_INTERNAL_MANAGED_NOTEBOOK_AUTH_DECORATOR_H diff --git a/google/cloud/notebooks/v1/internal/managed_notebook_connection_impl.h b/google/cloud/notebooks/v1/internal/managed_notebook_connection_impl.h index c73f99ea8e637..a7def763692c7 100644 --- a/google/cloud/notebooks/v1/internal/managed_notebook_connection_impl.h +++ b/google/cloud/notebooks/v1/internal/managed_notebook_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/notebooks/v1/internal/managed_notebook_logging_decorator.cc b/google/cloud/notebooks/v1/internal/managed_notebook_logging_decorator.cc index f593ff2b8f30e..bbebfdfa699d6 100644 --- a/google/cloud/notebooks/v1/internal/managed_notebook_logging_decorator.cc +++ b/google/cloud/notebooks/v1/internal/managed_notebook_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/notebooks/v1/managed_service.proto #include "google/cloud/notebooks/v1/internal/managed_notebook_logging_decorator.h" +#include "google/cloud/notebooks/v1/managed_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v1_internal { @@ -530,3 +533,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace notebooks_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/notebooks/v1/internal/managed_notebook_logging_decorator.h b/google/cloud/notebooks/v1/internal/managed_notebook_logging_decorator.h index e9d9b8fbdf5ff..4b1cd0726ad25 100644 --- a/google/cloud/notebooks/v1/internal/managed_notebook_logging_decorator.h +++ b/google/cloud/notebooks/v1/internal/managed_notebook_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/notebooks/v1/internal/managed_notebook_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v1_internal { @@ -230,4 +233,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_V1_INTERNAL_MANAGED_NOTEBOOK_LOGGING_DECORATOR_H diff --git a/google/cloud/notebooks/v1/internal/managed_notebook_metadata_decorator.cc b/google/cloud/notebooks/v1/internal/managed_notebook_metadata_decorator.cc index bc370e7e72951..2cbbadb407413 100644 --- a/google/cloud/notebooks/v1/internal/managed_notebook_metadata_decorator.cc +++ b/google/cloud/notebooks/v1/internal/managed_notebook_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/notebooks/v1/managed_service.proto #include "google/cloud/notebooks/v1/internal/managed_notebook_metadata_decorator.h" +#include "google/cloud/notebooks/v1/managed_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v1_internal { @@ -404,3 +408,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace notebooks_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/notebooks/v1/internal/managed_notebook_metadata_decorator.h b/google/cloud/notebooks/v1/internal/managed_notebook_metadata_decorator.h index 70a0172f75fd3..a4fc5583fe4fd 100644 --- a/google/cloud/notebooks/v1/internal/managed_notebook_metadata_decorator.h +++ b/google/cloud/notebooks/v1/internal/managed_notebook_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/notebooks/v1/internal/managed_notebook_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v1_internal { @@ -236,4 +239,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_V1_INTERNAL_MANAGED_NOTEBOOK_METADATA_DECORATOR_H diff --git a/google/cloud/notebooks/v1/internal/managed_notebook_option_defaults.cc b/google/cloud/notebooks/v1/internal/managed_notebook_option_defaults.cc index 5bd94b3cd73e3..4da89aeb95011 100644 --- a/google/cloud/notebooks/v1/internal/managed_notebook_option_defaults.cc +++ b/google/cloud/notebooks/v1/internal/managed_notebook_option_defaults.cc @@ -42,7 +42,7 @@ Options ManagedNotebookServiceDefaultOptions(Options options) { if (!options.has()) { options.set( notebooks_v1::ManagedNotebookServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/notebooks/v1/internal/managed_notebook_stub.cc b/google/cloud/notebooks/v1/internal/managed_notebook_stub.cc index e473ecbc92f22..ecbe862cf698f 100644 --- a/google/cloud/notebooks/v1/internal/managed_notebook_stub.cc +++ b/google/cloud/notebooks/v1/internal/managed_notebook_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/notebooks/v1/managed_service.proto #include "google/cloud/notebooks/v1/internal/managed_notebook_stub.h" +#include "google/cloud/notebooks/v1/managed_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v1_internal { @@ -521,3 +524,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace notebooks_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/notebooks/v1/internal/managed_notebook_stub.h b/google/cloud/notebooks/v1/internal/managed_notebook_stub.h index a98bcc7f14043..6b9effa7b8c42 100644 --- a/google/cloud/notebooks/v1/internal/managed_notebook_stub.h +++ b/google/cloud/notebooks/v1/internal/managed_notebook_stub.h @@ -19,19 +19,22 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_V1_INTERNAL_MANAGED_NOTEBOOK_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_V1_INTERNAL_MANAGED_NOTEBOOK_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/notebooks/v1/managed_service.grpc.pb.h" +#include "google/cloud/notebooks/v1/service.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v1_internal { @@ -424,4 +427,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_V1_INTERNAL_MANAGED_NOTEBOOK_STUB_H diff --git a/google/cloud/notebooks/v1/internal/managed_notebook_stub_factory.cc b/google/cloud/notebooks/v1/internal/managed_notebook_stub_factory.cc index 1c0604fc72f8d..5108bc011af4a 100644 --- a/google/cloud/notebooks/v1/internal/managed_notebook_stub_factory.cc +++ b/google/cloud/notebooks/v1/internal/managed_notebook_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/notebooks/v1/managed_service.proto #include "google/cloud/notebooks/v1/internal/managed_notebook_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/notebooks/v1/internal/managed_notebook_auth_decorator.h" #include "google/cloud/notebooks/v1/internal/managed_notebook_logging_decorator.h" #include "google/cloud/notebooks/v1/internal/managed_notebook_metadata_decorator.h" #include "google/cloud/notebooks/v1/internal/managed_notebook_stub.h" #include "google/cloud/notebooks/v1/internal/managed_notebook_tracing_stub.h" +#include "google/cloud/notebooks/v1/managed_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v1_internal { @@ -79,3 +82,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace notebooks_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/notebooks/v1/internal/managed_notebook_stub_factory.h b/google/cloud/notebooks/v1/internal/managed_notebook_stub_factory.h index 78148a72bf6be..51a0f7132872c 100644 --- a/google/cloud/notebooks/v1/internal/managed_notebook_stub_factory.h +++ b/google/cloud/notebooks/v1/internal/managed_notebook_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_V1_INTERNAL_MANAGED_NOTEBOOK_STUB_FACTORY_H diff --git a/google/cloud/notebooks/v1/internal/managed_notebook_tracing_connection.cc b/google/cloud/notebooks/v1/internal/managed_notebook_tracing_connection.cc index de9314c009ea6..bda7f084bbe1b 100644 --- a/google/cloud/notebooks/v1/internal/managed_notebook_tracing_connection.cc +++ b/google/cloud/notebooks/v1/internal/managed_notebook_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace notebooks_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ManagedNotebookServiceTracingConnection:: ManagedNotebookServiceTracingConnection( std::shared_ptr child) @@ -433,17 +431,13 @@ Status ManagedNotebookServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeManagedNotebookServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/notebooks/v1/internal/managed_notebook_tracing_connection.h b/google/cloud/notebooks/v1/internal/managed_notebook_tracing_connection.h index 3d4a1d88e0f52..288e73b1b49be 100644 --- a/google/cloud/notebooks/v1/internal/managed_notebook_tracing_connection.h +++ b/google/cloud/notebooks/v1/internal/managed_notebook_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace notebooks_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ManagedNotebookServiceTracingConnection : public notebooks_v1::ManagedNotebookServiceConnection { public: @@ -200,8 +198,6 @@ class ManagedNotebookServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/notebooks/v1/internal/managed_notebook_tracing_stub.cc b/google/cloud/notebooks/v1/internal/managed_notebook_tracing_stub.cc index 0145be708ecd5..07445d3c8a25d 100644 --- a/google/cloud/notebooks/v1/internal/managed_notebook_tracing_stub.cc +++ b/google/cloud/notebooks/v1/internal/managed_notebook_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ManagedNotebookServiceTracingStub::ManagedNotebookServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -468,19 +469,15 @@ future ManagedNotebookServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeManagedNotebookServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace notebooks_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/notebooks/v1/internal/managed_notebook_tracing_stub.h b/google/cloud/notebooks/v1/internal/managed_notebook_tracing_stub.h index d267092bb351d..1c65a40401b04 100644 --- a/google/cloud/notebooks/v1/internal/managed_notebook_tracing_stub.h +++ b/google/cloud/notebooks/v1/internal/managed_notebook_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ManagedNotebookServiceTracingStub : public ManagedNotebookServiceStub { public: ~ManagedNotebookServiceTracingStub() override = default; @@ -226,8 +227,6 @@ class ManagedNotebookServiceTracingStub : public ManagedNotebookServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -243,4 +242,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_V1_INTERNAL_MANAGED_NOTEBOOK_TRACING_STUB_H diff --git a/google/cloud/notebooks/v1/internal/notebook_auth_decorator.cc b/google/cloud/notebooks/v1/internal/notebook_auth_decorator.cc index f2217ffa394bf..e7c8a60473dc0 100644 --- a/google/cloud/notebooks/v1/internal/notebook_auth_decorator.cc +++ b/google/cloud/notebooks/v1/internal/notebook_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/notebooks/v1/service.proto #include "google/cloud/notebooks/v1/internal/notebook_auth_decorator.h" -#include +#include "google/cloud/notebooks/v1/service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v1_internal { @@ -904,3 +907,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace notebooks_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/notebooks/v1/internal/notebook_auth_decorator.h b/google/cloud/notebooks/v1/internal/notebook_auth_decorator.h index 77d438e9ac3c2..c9d7d6bdf34d3 100644 --- a/google/cloud/notebooks/v1/internal/notebook_auth_decorator.h +++ b/google/cloud/notebooks/v1/internal/notebook_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/notebooks/v1/internal/notebook_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v1_internal { @@ -430,4 +433,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_V1_INTERNAL_NOTEBOOK_AUTH_DECORATOR_H diff --git a/google/cloud/notebooks/v1/internal/notebook_connection_impl.h b/google/cloud/notebooks/v1/internal/notebook_connection_impl.h index 724dae3ee8ca7..b0b7ce72e629d 100644 --- a/google/cloud/notebooks/v1/internal/notebook_connection_impl.h +++ b/google/cloud/notebooks/v1/internal/notebook_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/notebooks/v1/internal/notebook_logging_decorator.cc b/google/cloud/notebooks/v1/internal/notebook_logging_decorator.cc index 3d04ce2cc28bb..d962af55bac35 100644 --- a/google/cloud/notebooks/v1/internal/notebook_logging_decorator.cc +++ b/google/cloud/notebooks/v1/internal/notebook_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/notebooks/v1/service.proto #include "google/cloud/notebooks/v1/internal/notebook_logging_decorator.h" +#include "google/cloud/notebooks/v1/service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v1_internal { @@ -1052,3 +1055,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace notebooks_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/notebooks/v1/internal/notebook_logging_decorator.h b/google/cloud/notebooks/v1/internal/notebook_logging_decorator.h index 56b4043a53428..8d372ee5d94ae 100644 --- a/google/cloud/notebooks/v1/internal/notebook_logging_decorator.h +++ b/google/cloud/notebooks/v1/internal/notebook_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/notebooks/v1/internal/notebook_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v1_internal { @@ -430,4 +433,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_V1_INTERNAL_NOTEBOOK_LOGGING_DECORATOR_H diff --git a/google/cloud/notebooks/v1/internal/notebook_metadata_decorator.cc b/google/cloud/notebooks/v1/internal/notebook_metadata_decorator.cc index 774de3c20653f..3dcc384785edc 100644 --- a/google/cloud/notebooks/v1/internal/notebook_metadata_decorator.cc +++ b/google/cloud/notebooks/v1/internal/notebook_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/notebooks/v1/service.proto #include "google/cloud/notebooks/v1/internal/notebook_metadata_decorator.h" +#include "google/cloud/notebooks/v1/service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v1_internal { @@ -752,3 +756,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace notebooks_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/notebooks/v1/internal/notebook_metadata_decorator.h b/google/cloud/notebooks/v1/internal/notebook_metadata_decorator.h index 2c8df58bd0ebb..e25f71e2ec3a2 100644 --- a/google/cloud/notebooks/v1/internal/notebook_metadata_decorator.h +++ b/google/cloud/notebooks/v1/internal/notebook_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/notebooks/v1/internal/notebook_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v1_internal { @@ -436,4 +439,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_V1_INTERNAL_NOTEBOOK_METADATA_DECORATOR_H diff --git a/google/cloud/notebooks/v1/internal/notebook_option_defaults.cc b/google/cloud/notebooks/v1/internal/notebook_option_defaults.cc index 8bb55f4830433..07bf04a8d6625 100644 --- a/google/cloud/notebooks/v1/internal/notebook_option_defaults.cc +++ b/google/cloud/notebooks/v1/internal/notebook_option_defaults.cc @@ -42,7 +42,7 @@ Options NotebookServiceDefaultOptions(Options options) { if (!options.has()) { options.set( notebooks_v1::NotebookServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/notebooks/v1/internal/notebook_stub.cc b/google/cloud/notebooks/v1/internal/notebook_stub.cc index eb80157d20d38..060a6be72d131 100644 --- a/google/cloud/notebooks/v1/internal/notebook_stub.cc +++ b/google/cloud/notebooks/v1/internal/notebook_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/notebooks/v1/service.proto #include "google/cloud/notebooks/v1/internal/notebook_stub.h" +#include "google/cloud/notebooks/v1/service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v1_internal { @@ -1032,3 +1035,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace notebooks_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/notebooks/v1/internal/notebook_stub.h b/google/cloud/notebooks/v1/internal/notebook_stub.h index da6aa06364115..e5d970a27661f 100644 --- a/google/cloud/notebooks/v1/internal/notebook_stub.h +++ b/google/cloud/notebooks/v1/internal/notebook_stub.h @@ -19,19 +19,22 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_V1_INTERNAL_NOTEBOOK_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_V1_INTERNAL_NOTEBOOK_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/notebooks/v1/service.grpc.pb.h" +#include "google/cloud/notebooks/v1/service.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v1_internal { @@ -819,4 +822,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_V1_INTERNAL_NOTEBOOK_STUB_H diff --git a/google/cloud/notebooks/v1/internal/notebook_stub_factory.cc b/google/cloud/notebooks/v1/internal/notebook_stub_factory.cc index 03e413caae60e..a6b4df01a913b 100644 --- a/google/cloud/notebooks/v1/internal/notebook_stub_factory.cc +++ b/google/cloud/notebooks/v1/internal/notebook_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/notebooks/v1/service.proto #include "google/cloud/notebooks/v1/internal/notebook_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/notebooks/v1/internal/notebook_auth_decorator.h" #include "google/cloud/notebooks/v1/internal/notebook_logging_decorator.h" #include "google/cloud/notebooks/v1/internal/notebook_metadata_decorator.h" #include "google/cloud/notebooks/v1/internal/notebook_stub.h" #include "google/cloud/notebooks/v1/internal/notebook_tracing_stub.h" +#include "google/cloud/notebooks/v1/service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v1_internal { @@ -78,3 +81,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace notebooks_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/notebooks/v1/internal/notebook_stub_factory.h b/google/cloud/notebooks/v1/internal/notebook_stub_factory.h index b1d366a473994..9274306f5ef72 100644 --- a/google/cloud/notebooks/v1/internal/notebook_stub_factory.h +++ b/google/cloud/notebooks/v1/internal/notebook_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_V1_INTERNAL_NOTEBOOK_STUB_FACTORY_H diff --git a/google/cloud/notebooks/v1/internal/notebook_tracing_connection.cc b/google/cloud/notebooks/v1/internal/notebook_tracing_connection.cc index c9dfcafa248fa..5e9d483df5897 100644 --- a/google/cloud/notebooks/v1/internal/notebook_tracing_connection.cc +++ b/google/cloud/notebooks/v1/internal/notebook_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace notebooks_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - NotebookServiceTracingConnection::NotebookServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -915,16 +913,12 @@ Status NotebookServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeNotebookServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/notebooks/v1/internal/notebook_tracing_connection.h b/google/cloud/notebooks/v1/internal/notebook_tracing_connection.h index f37f037a2a6a0..6c46b2914ccae 100644 --- a/google/cloud/notebooks/v1/internal/notebook_tracing_connection.h +++ b/google/cloud/notebooks/v1/internal/notebook_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace notebooks_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class NotebookServiceTracingConnection : public notebooks_v1::NotebookServiceConnection { public: @@ -397,8 +395,6 @@ class NotebookServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/notebooks/v1/internal/notebook_tracing_stub.cc b/google/cloud/notebooks/v1/internal/notebook_tracing_stub.cc index f4e68db60c46a..e8a49d45d161c 100644 --- a/google/cloud/notebooks/v1/internal/notebook_tracing_stub.cc +++ b/google/cloud/notebooks/v1/internal/notebook_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - NotebookServiceTracingStub::NotebookServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -931,18 +932,14 @@ future NotebookServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeNotebookServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace notebooks_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/notebooks/v1/internal/notebook_tracing_stub.h b/google/cloud/notebooks/v1/internal/notebook_tracing_stub.h index e4e85e9e22d89..67b91614c33f0 100644 --- a/google/cloud/notebooks/v1/internal/notebook_tracing_stub.h +++ b/google/cloud/notebooks/v1/internal/notebook_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class NotebookServiceTracingStub : public NotebookServiceStub { public: ~NotebookServiceTracingStub() override = default; @@ -426,8 +427,6 @@ class NotebookServiceTracingStub : public NotebookServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -442,4 +441,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_V1_INTERNAL_NOTEBOOK_TRACING_STUB_H diff --git a/google/cloud/notebooks/v1/managed_notebook_client.h b/google/cloud/notebooks/v1/managed_notebook_client.h index d99436ba1d942..037b298fb28a4 100644 --- a/google/cloud/notebooks/v1/managed_notebook_client.h +++ b/google/cloud/notebooks/v1/managed_notebook_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/notebooks/v1/managed_notebook_connection.h b/google/cloud/notebooks/v1/managed_notebook_connection.h index e792b6bc98885..9880e9028bb8e 100644 --- a/google/cloud/notebooks/v1/managed_notebook_connection.h +++ b/google/cloud/notebooks/v1/managed_notebook_connection.h @@ -21,6 +21,8 @@ #include "google/cloud/notebooks/v1/internal/managed_notebook_retry_traits.h" #include "google/cloud/notebooks/v1/managed_notebook_connection_idempotency_policy.h" +#include "google/cloud/notebooks/v1/managed_service.pb.h" +#include "google/cloud/notebooks/v1/service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,9 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/notebooks/v1/managed_notebook_connection_idempotency_policy.h b/google/cloud/notebooks/v1/managed_notebook_connection_idempotency_policy.h index 814c370d2a44c..f86f4b4141b2e 100644 --- a/google/cloud/notebooks/v1/managed_notebook_connection_idempotency_policy.h +++ b/google/cloud/notebooks/v1/managed_notebook_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_V1_MANAGED_NOTEBOOK_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_V1_MANAGED_NOTEBOOK_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/notebooks/v1/managed_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/notebooks/v1/notebook_client.h b/google/cloud/notebooks/v1/notebook_client.h index 1a99a48313fd5..ea5cf119e239c 100644 --- a/google/cloud/notebooks/v1/notebook_client.h +++ b/google/cloud/notebooks/v1/notebook_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/notebooks/v1/notebook_connection.h b/google/cloud/notebooks/v1/notebook_connection.h index 2af16793a5c7a..ef2f230794f1e 100644 --- a/google/cloud/notebooks/v1/notebook_connection.h +++ b/google/cloud/notebooks/v1/notebook_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/notebooks/v1/internal/notebook_retry_traits.h" #include "google/cloud/notebooks/v1/notebook_connection_idempotency_policy.h" +#include "google/cloud/notebooks/v1/service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/notebooks/v1/notebook_connection_idempotency_policy.h b/google/cloud/notebooks/v1/notebook_connection_idempotency_policy.h index 0b6c2d38e4078..8e315025d4950 100644 --- a/google/cloud/notebooks/v1/notebook_connection_idempotency_policy.h +++ b/google/cloud/notebooks/v1/notebook_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_V1_NOTEBOOK_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_V1_NOTEBOOK_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/notebooks/v1/service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/notebooks/v2/internal/notebook_auth_decorator.cc b/google/cloud/notebooks/v2/internal/notebook_auth_decorator.cc index d427e48a6290a..f4658c21b1dd6 100644 --- a/google/cloud/notebooks/v2/internal/notebook_auth_decorator.cc +++ b/google/cloud/notebooks/v2/internal/notebook_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/notebooks/v2/service.proto #include "google/cloud/notebooks/v2/internal/notebook_auth_decorator.h" -#include +#include "google/cloud/notebooks/v2/service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v2_internal { @@ -426,3 +429,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace notebooks_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/notebooks/v2/internal/notebook_auth_decorator.h b/google/cloud/notebooks/v2/internal/notebook_auth_decorator.h index 93172b35dcf72..4557fe713f147 100644 --- a/google/cloud/notebooks/v2/internal/notebook_auth_decorator.h +++ b/google/cloud/notebooks/v2/internal/notebook_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/notebooks/v2/internal/notebook_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v2_internal { @@ -220,4 +223,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_V2_INTERNAL_NOTEBOOK_AUTH_DECORATOR_H diff --git a/google/cloud/notebooks/v2/internal/notebook_connection_impl.h b/google/cloud/notebooks/v2/internal/notebook_connection_impl.h index 01c855a3dd52a..0fc80c6648ab1 100644 --- a/google/cloud/notebooks/v2/internal/notebook_connection_impl.h +++ b/google/cloud/notebooks/v2/internal/notebook_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/notebooks/v2/internal/notebook_logging_decorator.cc b/google/cloud/notebooks/v2/internal/notebook_logging_decorator.cc index 4a8aa38a0f015..f166b1a42e921 100644 --- a/google/cloud/notebooks/v2/internal/notebook_logging_decorator.cc +++ b/google/cloud/notebooks/v2/internal/notebook_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/notebooks/v2/service.proto #include "google/cloud/notebooks/v2/internal/notebook_logging_decorator.h" +#include "google/cloud/notebooks/v2/service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v2_internal { @@ -496,3 +499,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace notebooks_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/notebooks/v2/internal/notebook_logging_decorator.h b/google/cloud/notebooks/v2/internal/notebook_logging_decorator.h index fbb9c01dcb892..4b44ca97aa9e2 100644 --- a/google/cloud/notebooks/v2/internal/notebook_logging_decorator.h +++ b/google/cloud/notebooks/v2/internal/notebook_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/notebooks/v2/internal/notebook_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v2_internal { @@ -220,4 +223,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_V2_INTERNAL_NOTEBOOK_LOGGING_DECORATOR_H diff --git a/google/cloud/notebooks/v2/internal/notebook_metadata_decorator.cc b/google/cloud/notebooks/v2/internal/notebook_metadata_decorator.cc index 6c40195db01a4..78bc1087485f3 100644 --- a/google/cloud/notebooks/v2/internal/notebook_metadata_decorator.cc +++ b/google/cloud/notebooks/v2/internal/notebook_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/notebooks/v2/service.proto #include "google/cloud/notebooks/v2/internal/notebook_metadata_decorator.h" +#include "google/cloud/notebooks/v2/service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v2_internal { @@ -380,3 +384,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace notebooks_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/notebooks/v2/internal/notebook_metadata_decorator.h b/google/cloud/notebooks/v2/internal/notebook_metadata_decorator.h index 9390f99263324..ae62fb5a8b3a3 100644 --- a/google/cloud/notebooks/v2/internal/notebook_metadata_decorator.h +++ b/google/cloud/notebooks/v2/internal/notebook_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/notebooks/v2/internal/notebook_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v2_internal { @@ -226,4 +229,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_V2_INTERNAL_NOTEBOOK_METADATA_DECORATOR_H diff --git a/google/cloud/notebooks/v2/internal/notebook_option_defaults.cc b/google/cloud/notebooks/v2/internal/notebook_option_defaults.cc index e95b4663c0dfc..be1b9a06b294f 100644 --- a/google/cloud/notebooks/v2/internal/notebook_option_defaults.cc +++ b/google/cloud/notebooks/v2/internal/notebook_option_defaults.cc @@ -42,7 +42,7 @@ Options NotebookServiceDefaultOptions(Options options) { if (!options.has()) { options.set( notebooks_v2::NotebookServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/notebooks/v2/internal/notebook_stub.cc b/google/cloud/notebooks/v2/internal/notebook_stub.cc index 28e67e0ae555d..c86d22f6307bc 100644 --- a/google/cloud/notebooks/v2/internal/notebook_stub.cc +++ b/google/cloud/notebooks/v2/internal/notebook_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/notebooks/v2/service.proto #include "google/cloud/notebooks/v2/internal/notebook_stub.h" +#include "google/cloud/notebooks/v2/service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v2_internal { @@ -490,3 +493,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace notebooks_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/notebooks/v2/internal/notebook_stub.h b/google/cloud/notebooks/v2/internal/notebook_stub.h index 704d2a52c1684..c6a5d0c48bb7c 100644 --- a/google/cloud/notebooks/v2/internal/notebook_stub.h +++ b/google/cloud/notebooks/v2/internal/notebook_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_V2_INTERNAL_NOTEBOOK_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_V2_INTERNAL_NOTEBOOK_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/notebooks/v2/service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v2_internal { @@ -401,4 +404,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_V2_INTERNAL_NOTEBOOK_STUB_H diff --git a/google/cloud/notebooks/v2/internal/notebook_stub_factory.cc b/google/cloud/notebooks/v2/internal/notebook_stub_factory.cc index 27da3d3f19bd1..bb3cb1872d19a 100644 --- a/google/cloud/notebooks/v2/internal/notebook_stub_factory.cc +++ b/google/cloud/notebooks/v2/internal/notebook_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/notebooks/v2/service.proto #include "google/cloud/notebooks/v2/internal/notebook_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/notebooks/v2/internal/notebook_auth_decorator.h" #include "google/cloud/notebooks/v2/internal/notebook_logging_decorator.h" #include "google/cloud/notebooks/v2/internal/notebook_metadata_decorator.h" #include "google/cloud/notebooks/v2/internal/notebook_stub.h" #include "google/cloud/notebooks/v2/internal/notebook_tracing_stub.h" +#include "google/cloud/notebooks/v2/service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v2_internal { @@ -78,3 +81,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace notebooks_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/notebooks/v2/internal/notebook_stub_factory.h b/google/cloud/notebooks/v2/internal/notebook_stub_factory.h index c82ebb2d1b0e6..8301e9137bef0 100644 --- a/google/cloud/notebooks/v2/internal/notebook_stub_factory.h +++ b/google/cloud/notebooks/v2/internal/notebook_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_V2_INTERNAL_NOTEBOOK_STUB_FACTORY_H diff --git a/google/cloud/notebooks/v2/internal/notebook_tracing_connection.cc b/google/cloud/notebooks/v2/internal/notebook_tracing_connection.cc index a8dd89301de3e..e82a62d77714e 100644 --- a/google/cloud/notebooks/v2/internal/notebook_tracing_connection.cc +++ b/google/cloud/notebooks/v2/internal/notebook_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace notebooks_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - NotebookServiceTracingConnection::NotebookServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -406,16 +404,12 @@ Status NotebookServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeNotebookServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/notebooks/v2/internal/notebook_tracing_connection.h b/google/cloud/notebooks/v2/internal/notebook_tracing_connection.h index 731b10c943177..1627dae0cb8c6 100644 --- a/google/cloud/notebooks/v2/internal/notebook_tracing_connection.h +++ b/google/cloud/notebooks/v2/internal/notebook_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace notebooks_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class NotebookServiceTracingConnection : public notebooks_v2::NotebookServiceConnection { public: @@ -190,8 +188,6 @@ class NotebookServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/notebooks/v2/internal/notebook_tracing_stub.cc b/google/cloud/notebooks/v2/internal/notebook_tracing_stub.cc index ccd2d9466602c..7bac272a18bea 100644 --- a/google/cloud/notebooks/v2/internal/notebook_tracing_stub.cc +++ b/google/cloud/notebooks/v2/internal/notebook_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - NotebookServiceTracingStub::NotebookServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -443,18 +444,14 @@ future NotebookServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeNotebookServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace notebooks_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/notebooks/v2/internal/notebook_tracing_stub.h b/google/cloud/notebooks/v2/internal/notebook_tracing_stub.h index 983cb55e315fc..a147c4ae324c5 100644 --- a/google/cloud/notebooks/v2/internal/notebook_tracing_stub.h +++ b/google/cloud/notebooks/v2/internal/notebook_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace notebooks_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class NotebookServiceTracingStub : public NotebookServiceStub { public: ~NotebookServiceTracingStub() override = default; @@ -216,8 +217,6 @@ class NotebookServiceTracingStub : public NotebookServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -232,4 +231,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_V2_INTERNAL_NOTEBOOK_TRACING_STUB_H diff --git a/google/cloud/notebooks/v2/notebook_client.h b/google/cloud/notebooks/v2/notebook_client.h index f2bee21d195be..cbf3a5f6f318d 100644 --- a/google/cloud/notebooks/v2/notebook_client.h +++ b/google/cloud/notebooks/v2/notebook_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/notebooks/v2/notebook_connection.h b/google/cloud/notebooks/v2/notebook_connection.h index 92cd6bb84383f..33a411f49d9ec 100644 --- a/google/cloud/notebooks/v2/notebook_connection.h +++ b/google/cloud/notebooks/v2/notebook_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/notebooks/v2/internal/notebook_retry_traits.h" #include "google/cloud/notebooks/v2/notebook_connection_idempotency_policy.h" +#include "google/cloud/notebooks/v2/service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/notebooks/v2/notebook_connection_idempotency_policy.h b/google/cloud/notebooks/v2/notebook_connection_idempotency_policy.h index 74754bd4ab416..0e8d467507c49 100644 --- a/google/cloud/notebooks/v2/notebook_connection_idempotency_policy.h +++ b/google/cloud/notebooks/v2/notebook_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_V2_NOTEBOOK_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_NOTEBOOKS_V2_NOTEBOOK_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/notebooks/v2/service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/oauth2/BUILD.bazel b/google/cloud/oauth2/BUILD.bazel index 9c183403236b5..b5b3f4d2d7c19 100644 --- a/google/cloud/oauth2/BUILD.bazel +++ b/google/cloud/oauth2/BUILD.bazel @@ -43,6 +43,6 @@ cc_library( ":google_cloud_cpp_oauth2", "//google/cloud/testing_util:google_cloud_cpp_testing_private", "//google/cloud/testing_util:google_cloud_cpp_testing_rest_private", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) for test in google_cloud_cpp_oauth2_unit_tests] diff --git a/google/cloud/oauth2/quickstart/CMakeLists.txt b/google/cloud/oauth2/quickstart/CMakeLists.txt index 1966e8f434298..ba89f75dee204 100644 --- a/google/cloud/oauth2/quickstart/CMakeLists.txt +++ b/google/cloud/oauth2/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the OAuth2 Access Token Generation library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-oauth2-quickstart CXX) find_package(google_cloud_cpp_oauth2 REQUIRED) diff --git a/google/cloud/opentelemetry/BUILD.bazel b/google/cloud/opentelemetry/BUILD.bazel index c47262a611ebd..08065ff265602 100644 --- a/google/cloud/opentelemetry/BUILD.bazel +++ b/google/cloud/opentelemetry/BUILD.bazel @@ -34,8 +34,8 @@ cc_library( "//:monitoring", "//:trace", "//google/cloud:google_cloud_cpp_rest_internal", - "@io_opentelemetry_cpp//sdk/src/metrics", - "@io_opentelemetry_cpp//sdk/src/trace", + "@opentelemetry-cpp//sdk/src/metrics", + "@opentelemetry-cpp//sdk/src/trace", ], ) diff --git a/google/cloud/opentelemetry/integration_tests/BUILD.bazel b/google/cloud/opentelemetry/integration_tests/BUILD.bazel index ab46542ae62dd..592eff7d7dfac 100644 --- a/google/cloud/opentelemetry/integration_tests/BUILD.bazel +++ b/google/cloud/opentelemetry/integration_tests/BUILD.bazel @@ -27,6 +27,6 @@ licenses(["notice"]) # Apache 2.0 "//:opentelemetry", "//google/cloud/testing_util:google_cloud_cpp_testing_grpc_private", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) for test in opentelemetry_integration_tests] diff --git a/google/cloud/opentelemetry/integration_tests/configure_basic_tracing_integration_test.cc b/google/cloud/opentelemetry/integration_tests/configure_basic_tracing_integration_test.cc index ba8a8e9e8167e..63cecebcaba3a 100644 --- a/google/cloud/opentelemetry/integration_tests/configure_basic_tracing_integration_test.cc +++ b/google/cloud/opentelemetry/integration_tests/configure_basic_tracing_integration_test.cc @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/opentelemetry/configure_basic_tracing.h" #include "google/cloud/trace/v1/trace_client.h" #include "google/cloud/internal/getenv.h" @@ -160,4 +159,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace otel } // namespace cloud } // namespace google -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/opentelemetry/integration_tests/monitoring_exporter_integration_test.cc b/google/cloud/opentelemetry/integration_tests/monitoring_exporter_integration_test.cc index 8c93dbd9fdc2d..e962f31f48b25 100644 --- a/google/cloud/opentelemetry/integration_tests/monitoring_exporter_integration_test.cc +++ b/google/cloud/opentelemetry/integration_tests/monitoring_exporter_integration_test.cc @@ -28,7 +28,7 @@ #include #include #include -#include +#include namespace google { namespace cloud { @@ -40,7 +40,7 @@ using ::testing::IsEmpty; using ::testing::Not; namespace metrics_api = ::opentelemetry::metrics; namespace metrics_sdk = ::opentelemetry::sdk::metrics; -namespace sc = opentelemetry::sdk::resource::SemanticConventions; +namespace sc = opentelemetry::semconv; auto constexpr kJobName = "monitoring_exporter_integration_test"; auto constexpr kMeterName = @@ -59,9 +59,9 @@ void InstallExporter(std::unique_ptr exporter, // attributes which will map to a `generic_task`, which seems apt for this // workflow. auto resource = opentelemetry::sdk::resource::Resource::Create( - {{sc::kServiceNamespace, "gl-cpp"}, - {sc::kServiceName, kJobName}, - {sc::kServiceInstanceId, task_id}}); + {{sc::service::kServiceNamespace, "gl-cpp"}, + {sc::service::kServiceName, kJobName}, + {sc::service::kServiceInstanceId, task_id}}); // Initialize and set the global MeterProvider metrics_sdk::PeriodicExportingMetricReaderOptions options; diff --git a/google/cloud/opentelemetry/internal/monitored_resource.cc b/google/cloud/opentelemetry/internal/monitored_resource.cc index 24c0c08e514c7..3e5c09c822c5a 100644 --- a/google/cloud/opentelemetry/internal/monitored_resource.cc +++ b/google/cloud/opentelemetry/internal/monitored_resource.cc @@ -13,17 +13,22 @@ // limitations under the License. #include "google/cloud/opentelemetry/internal/monitored_resource.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/version.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include "absl/types/optional.h" #include "absl/types/variant.h" #include #include -#include +#include +#include +#include +#include +#include #include #include #include +#include namespace google { namespace cloud { @@ -31,7 +36,7 @@ namespace otel_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN namespace { -namespace sc = opentelemetry::sdk::resource::SemanticConventions; +namespace sc = opentelemetry::semconv; struct AsStringVisitor { template @@ -86,22 +91,23 @@ class MonitoredResourceProvider { }; MonitoredResourceProvider GceInstance() { - return MonitoredResourceProvider("gce_instance", - { - {"zone", {{sc::kCloudAvailabilityZone}}}, - {"instance_id", {{sc::kHostId}}}, - }); + return MonitoredResourceProvider( + "gce_instance", { + {"zone", {{sc::cloud::kCloudAvailabilityZone}}}, + {"instance_id", {{sc::host::kHostId}}}, + }); } MonitoredResourceProvider K8sContainer() { return MonitoredResourceProvider( "k8s_container", { - {"location", {{sc::kCloudAvailabilityZone, sc::kCloudRegion}}}, - {"cluster_name", {{sc::kK8sClusterName}}}, - {"namespace_name", {{sc::kK8sNamespaceName}}}, - {"pod_name", {{sc::kK8sPodName}}}, - {"container_name", {{sc::kK8sContainerName}}}, + {"location", + {{sc::cloud::kCloudAvailabilityZone, sc::cloud::kCloudRegion}}}, + {"cluster_name", {{sc::k8s::kK8sClusterName}}}, + {"namespace_name", {{sc::k8s::kK8sNamespaceName}}}, + {"pod_name", {{sc::k8s::kK8sPodName}}}, + {"container_name", {{sc::k8s::kK8sContainerName}}}, }); } @@ -109,10 +115,11 @@ MonitoredResourceProvider K8sPod() { return MonitoredResourceProvider( "k8s_pod", { - {"location", {{sc::kCloudAvailabilityZone, sc::kCloudRegion}}}, - {"cluster_name", {{sc::kK8sClusterName}}}, - {"namespace_name", {{sc::kK8sNamespaceName}}}, - {"pod_name", {{sc::kK8sPodName}}}, + {"location", + {{sc::cloud::kCloudAvailabilityZone, sc::cloud::kCloudRegion}}}, + {"cluster_name", {{sc::k8s::kK8sClusterName}}}, + {"namespace_name", {{sc::k8s::kK8sNamespaceName}}}, + {"pod_name", {{sc::k8s::kK8sPodName}}}, }); } @@ -120,9 +127,10 @@ MonitoredResourceProvider K8sNode() { return MonitoredResourceProvider( "k8s_node", { - {"location", {{sc::kCloudAvailabilityZone, sc::kCloudRegion}}}, - {"cluster_name", {{sc::kK8sClusterName}}}, - {"node_name", {{sc::kK8sNodeName}}}, + {"location", + {{sc::cloud::kCloudAvailabilityZone, sc::cloud::kCloudRegion}}}, + {"cluster_name", {{sc::k8s::kK8sClusterName}}}, + {"node_name", {{sc::k8s::kK8sNodeName}}}, }); } @@ -130,8 +138,9 @@ MonitoredResourceProvider K8sCluster() { return MonitoredResourceProvider( "k8s_cluster", { - {"location", {{sc::kCloudAvailabilityZone, sc::kCloudRegion}}}, - {"cluster_name", {{sc::kK8sClusterName}}}, + {"location", + {{sc::cloud::kCloudAvailabilityZone, sc::cloud::kCloudRegion}}}, + {"cluster_name", {{sc::k8s::kK8sClusterName}}}, }); } @@ -139,10 +148,11 @@ MonitoredResourceProvider GaeInstance() { return MonitoredResourceProvider( "gae_instance", { - {"location", {{sc::kCloudAvailabilityZone, sc::kCloudRegion}}}, - {"module_id", {{sc::kFaasName}}}, - {"version_id", {{sc::kFaasVersion}}}, - {"instance_id", {{sc::kFaasInstance}}}, + {"location", + {{sc::cloud::kCloudAvailabilityZone, sc::cloud::kCloudRegion}}}, + {"module_id", {{sc::faas::kFaasName}}}, + {"version_id", {{sc::faas::kFaasVersion}}}, + {"instance_id", {{sc::faas::kFaasInstance}}}, }); } @@ -150,9 +160,10 @@ MonitoredResourceProvider AwsEc2Instance() { return MonitoredResourceProvider( "aws_ec2_instance", { - {"instance_id", {{sc::kHostId}}}, - {"region", {{sc::kCloudAvailabilityZone, sc::kCloudRegion}}}, - {"aws_account", {{sc::kCloudAccountId}}}, + {"instance_id", {{sc::host::kHostId}}}, + {"region", + {{sc::cloud::kCloudAvailabilityZone, sc::cloud::kCloudRegion}}}, + {"aws_account", {{sc::cloud::kCloudAccountId}}}, }); } @@ -161,10 +172,12 @@ MonitoredResourceProvider GenericTask() { "generic_task", { {"location", - {{sc::kCloudAvailabilityZone, sc::kCloudRegion}, "global"}}, - {"namespace", {{sc::kServiceNamespace}}}, - {"job", {{sc::kServiceName, sc::kFaasName}}}, - {"task_id", {{sc::kServiceInstanceId, sc::kFaasInstance}}}, + {{sc::cloud::kCloudAvailabilityZone, sc::cloud::kCloudRegion}, + "global"}}, + {"namespace", {{sc::service::kServiceNamespace}}}, + {"job", {{sc::service::kServiceName, sc::faas::kFaasName}}}, + {"task_id", + {{sc::service::kServiceInstanceId, sc::faas::kFaasInstance}}}, }); } @@ -173,9 +186,10 @@ MonitoredResourceProvider GenericNode() { "generic_node", { {"location", - {{sc::kCloudAvailabilityZone, sc::kCloudRegion}, "global"}}, - {"namespace", {{sc::kServiceNamespace}}}, - {"node_id", {{sc::kHostId, sc::kHostName}}}, + {{sc::cloud::kCloudAvailabilityZone, sc::cloud::kCloudRegion}, + "global"}}, + {"namespace", {{sc::service::kServiceNamespace}}}, + {"node_id", {{sc::host::kHostId, sc::host::kHostName}}}, }); } @@ -185,20 +199,20 @@ MonitoredResourceProvider GenericNode() { MonitoredResourceProvider MakeProvider( opentelemetry::sdk::resource::ResourceAttributes const& attributes) { std::string platform; - auto p = attributes.find(sc::kCloudPlatform); + auto p = attributes.find(sc::cloud::kCloudPlatform); if (p != attributes.end()) platform = AsString(p->second); if (platform == "gcp_compute_engine") { return GceInstance(); } if (platform == "gcp_kubernetes_engine") { - if (attributes.find(sc::kK8sContainerName) != attributes.end()) { + if (attributes.find(sc::k8s::kK8sContainerName) != attributes.end()) { return K8sContainer(); } - if (attributes.find(sc::kK8sPodName) != attributes.end()) { + if (attributes.find(sc::k8s::kK8sPodName) != attributes.end()) { return K8sPod(); } - if (attributes.find(sc::kK8sNodeName) != attributes.end()) { + if (attributes.find(sc::k8s::kK8sNodeName) != attributes.end()) { return K8sNode(); } return K8sCluster(); @@ -209,10 +223,10 @@ MonitoredResourceProvider MakeProvider( if (platform == "aws_ec2") { return AwsEc2Instance(); } - if ((attributes.find(sc::kServiceName) != attributes.end() && - attributes.find(sc::kServiceInstanceId) != attributes.end()) || - (attributes.find(sc::kFaasName) != attributes.end() && - attributes.find(sc::kFaasInstance) != attributes.end())) { + if ((attributes.find(sc::service::kServiceName) != attributes.end() && + attributes.find(sc::service::kServiceInstanceId) != attributes.end()) || + (attributes.find(sc::faas::kFaasName) != attributes.end() && + attributes.find(sc::faas::kFaasInstance) != attributes.end())) { return GenericTask(); } return GenericNode(); @@ -222,7 +236,7 @@ MonitoredResourceProvider MakeProvider( std::string AsString( opentelemetry::sdk::common::OwnedAttributeValue const& attribute) { - return absl::visit(AsStringVisitor{}, attribute); + return std::visit(AsStringVisitor{}, attribute); } MonitoredResource ToMonitoredResource( diff --git a/google/cloud/opentelemetry/internal/monitored_resource_test.cc b/google/cloud/opentelemetry/internal/monitored_resource_test.cc index 217e43cf90426..b1e02253a3a27 100644 --- a/google/cloud/opentelemetry/internal/monitored_resource_test.cc +++ b/google/cloud/opentelemetry/internal/monitored_resource_test.cc @@ -16,14 +16,18 @@ #include "google/cloud/version.h" #include "absl/types/optional.h" #include -#include +#include +#include +#include +#include +#include namespace google { namespace cloud { namespace otel_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN namespace { -namespace sc = opentelemetry::sdk::resource::SemanticConventions; +namespace sc = opentelemetry::semconv; using ::testing::Pair; using ::testing::UnorderedElementsAre; @@ -69,9 +73,9 @@ TEST(AsString, VectorsAreJoined) { TEST(MonitoredResource, GceInstance) { auto attributes = opentelemetry::sdk::resource::ResourceAttributes{ - {sc::kCloudPlatform, "gcp_compute_engine"}, - {sc::kHostId, "1020304050607080900"}, - {sc::kCloudAvailabilityZone, "us-central1-a"}, + {sc::cloud::kCloudPlatform, "gcp_compute_engine"}, + {sc::host::kHostId, "1020304050607080900"}, + {sc::cloud::kCloudAvailabilityZone, "us-central1-a"}, }; auto mr = ToMonitoredResource(attributes); @@ -94,14 +98,14 @@ TEST(MonitoredResource, K8sContainer) { }; for (auto const& test : tests) { auto attributes = opentelemetry::sdk::resource::ResourceAttributes{ - {sc::kCloudPlatform, "gcp_kubernetes_engine"}, - {sc::kK8sClusterName, "test-cluster"}, - {sc::kK8sNamespaceName, "test-namespace"}, - {sc::kK8sPodName, "test-pod"}, - {sc::kK8sContainerName, "test-container"}, + {sc::cloud::kCloudPlatform, "gcp_kubernetes_engine"}, + {sc::k8s::kK8sClusterName, "test-cluster"}, + {sc::k8s::kK8sNamespaceName, "test-namespace"}, + {sc::k8s::kK8sPodName, "test-pod"}, + {sc::k8s::kK8sContainerName, "test-container"}, }; - if (test.zone) attributes[sc::kCloudAvailabilityZone] = *test.zone; - if (test.region) attributes[sc::kCloudRegion] = *test.region; + if (test.zone) attributes[sc::cloud::kCloudAvailabilityZone] = *test.zone; + if (test.region) attributes[sc::cloud::kCloudRegion] = *test.region; auto mr = ToMonitoredResource(attributes); EXPECT_EQ(mr.type, "k8s_container"); @@ -127,13 +131,13 @@ TEST(MonitoredResource, K8sPod) { }; for (auto const& test : tests) { auto attributes = opentelemetry::sdk::resource::ResourceAttributes{ - {sc::kCloudPlatform, "gcp_kubernetes_engine"}, - {sc::kK8sClusterName, "test-cluster"}, - {sc::kK8sNamespaceName, "test-namespace"}, - {sc::kK8sPodName, "test-pod"}, + {sc::cloud::kCloudPlatform, "gcp_kubernetes_engine"}, + {sc::k8s::kK8sClusterName, "test-cluster"}, + {sc::k8s::kK8sNamespaceName, "test-namespace"}, + {sc::k8s::kK8sPodName, "test-pod"}, }; - if (test.zone) attributes[sc::kCloudAvailabilityZone] = *test.zone; - if (test.region) attributes[sc::kCloudRegion] = *test.region; + if (test.zone) attributes[sc::cloud::kCloudAvailabilityZone] = *test.zone; + if (test.region) attributes[sc::cloud::kCloudRegion] = *test.region; auto mr = ToMonitoredResource(attributes); EXPECT_EQ(mr.type, "k8s_pod"); @@ -158,12 +162,12 @@ TEST(MonitoredResource, K8sNode) { }; for (auto const& test : tests) { auto attributes = opentelemetry::sdk::resource::ResourceAttributes{ - {sc::kCloudPlatform, "gcp_kubernetes_engine"}, - {sc::kK8sClusterName, "test-cluster"}, - {sc::kK8sNodeName, "test-node"}, + {sc::cloud::kCloudPlatform, "gcp_kubernetes_engine"}, + {sc::k8s::kK8sClusterName, "test-cluster"}, + {sc::k8s::kK8sNodeName, "test-node"}, }; - if (test.zone) attributes[sc::kCloudAvailabilityZone] = *test.zone; - if (test.region) attributes[sc::kCloudRegion] = *test.region; + if (test.zone) attributes[sc::cloud::kCloudAvailabilityZone] = *test.zone; + if (test.region) attributes[sc::cloud::kCloudRegion] = *test.region; auto mr = ToMonitoredResource(attributes); EXPECT_EQ(mr.type, "k8s_node"); @@ -187,11 +191,11 @@ TEST(MonitoredResource, K8sCluster) { }; for (auto const& test : tests) { auto attributes = opentelemetry::sdk::resource::ResourceAttributes{ - {sc::kCloudPlatform, "gcp_kubernetes_engine"}, - {sc::kK8sClusterName, "test-cluster"}, + {sc::cloud::kCloudPlatform, "gcp_kubernetes_engine"}, + {sc::k8s::kK8sClusterName, "test-cluster"}, }; - if (test.zone) attributes[sc::kCloudAvailabilityZone] = *test.zone; - if (test.region) attributes[sc::kCloudRegion] = *test.region; + if (test.zone) attributes[sc::cloud::kCloudAvailabilityZone] = *test.zone; + if (test.region) attributes[sc::cloud::kCloudRegion] = *test.region; auto mr = ToMonitoredResource(attributes); EXPECT_EQ(mr.type, "k8s_cluster"); @@ -214,13 +218,13 @@ TEST(MonitoredResource, GaeInstance) { }; for (auto const& test : tests) { auto attributes = opentelemetry::sdk::resource::ResourceAttributes{ - {sc::kCloudPlatform, "gcp_app_engine"}, - {sc::kFaasName, "test-module"}, - {sc::kFaasVersion, "test-version"}, - {sc::kFaasInstance, "test-instance"}, + {sc::cloud::kCloudPlatform, "gcp_app_engine"}, + {sc::faas::kFaasName, "test-module"}, + {sc::faas::kFaasVersion, "test-version"}, + {sc::faas::kFaasInstance, "test-instance"}, }; - if (test.zone) attributes[sc::kCloudAvailabilityZone] = *test.zone; - if (test.region) attributes[sc::kCloudRegion] = *test.region; + if (test.zone) attributes[sc::cloud::kCloudAvailabilityZone] = *test.zone; + if (test.region) attributes[sc::cloud::kCloudRegion] = *test.region; auto mr = ToMonitoredResource(attributes); EXPECT_EQ(mr.type, "gae_instance"); @@ -245,12 +249,12 @@ TEST(MonitoredResource, AwsEc2Instance) { }; for (auto const& test : tests) { auto attributes = opentelemetry::sdk::resource::ResourceAttributes{ - {sc::kCloudPlatform, "aws_ec2"}, - {sc::kHostId, "test-instance"}, - {sc::kCloudAccountId, "test-account"}, + {sc::cloud::kCloudPlatform, "aws_ec2"}, + {sc::host::kHostId, "test-instance"}, + {sc::cloud::kCloudAccountId, "test-account"}, }; - if (test.zone) attributes[sc::kCloudAvailabilityZone] = *test.zone; - if (test.region) attributes[sc::kCloudRegion] = *test.region; + if (test.zone) attributes[sc::cloud::kCloudAvailabilityZone] = *test.zone; + if (test.region) attributes[sc::cloud::kCloudRegion] = *test.region; auto mr = ToMonitoredResource(attributes); EXPECT_EQ(mr.type, "aws_ec2_instance"); @@ -275,11 +279,11 @@ TEST(MonitoredResource, GenericTaskFaas) { }; for (auto const& test : tests) { auto attributes = opentelemetry::sdk::resource::ResourceAttributes{ - {sc::kFaasName, "faas-name"}, - {sc::kFaasInstance, "faas-instance"}, + {sc::faas::kFaasName, "faas-name"}, + {sc::faas::kFaasInstance, "faas-instance"}, }; - if (test.zone) attributes[sc::kCloudAvailabilityZone] = *test.zone; - if (test.region) attributes[sc::kCloudRegion] = *test.region; + if (test.zone) attributes[sc::cloud::kCloudAvailabilityZone] = *test.zone; + if (test.region) attributes[sc::cloud::kCloudRegion] = *test.region; auto mr = ToMonitoredResource(attributes); EXPECT_EQ(mr.type, "generic_task"); @@ -305,12 +309,12 @@ TEST(MonitoredResource, GenericTaskService) { }; for (auto const& test : tests) { auto attributes = opentelemetry::sdk::resource::ResourceAttributes{ - {sc::kServiceNamespace, "test-namespace"}, - {sc::kServiceName, "test-name"}, - {sc::kServiceInstanceId, "test-instance"}, + {sc::service::kServiceNamespace, "test-namespace"}, + {sc::service::kServiceName, "test-name"}, + {sc::service::kServiceInstanceId, "test-instance"}, }; - if (test.zone) attributes[sc::kCloudAvailabilityZone] = *test.zone; - if (test.region) attributes[sc::kCloudRegion] = *test.region; + if (test.zone) attributes[sc::cloud::kCloudAvailabilityZone] = *test.zone; + if (test.region) attributes[sc::cloud::kCloudRegion] = *test.region; auto mr = ToMonitoredResource(attributes); EXPECT_EQ(mr.type, "generic_task"); @@ -336,11 +340,11 @@ TEST(MonitoredResource, GenericNode) { }; for (auto const& test : location_tests) { auto attributes = opentelemetry::sdk::resource::ResourceAttributes{ - {sc::kServiceNamespace, "test-namespace"}, - {sc::kHostId, "test-instance"}, + {sc::service::kServiceNamespace, "test-namespace"}, + {sc::host::kHostId, "test-instance"}, }; - if (test.zone) attributes[sc::kCloudAvailabilityZone] = *test.zone; - if (test.region) attributes[sc::kCloudRegion] = *test.region; + if (test.zone) attributes[sc::cloud::kCloudAvailabilityZone] = *test.zone; + if (test.region) attributes[sc::cloud::kCloudRegion] = *test.region; auto mr = ToMonitoredResource(attributes); EXPECT_EQ(mr.type, "generic_node"); @@ -360,12 +364,12 @@ TEST(MonitoredResource, GenericNode) { }; for (auto const& test : node_id_tests) { auto attributes = opentelemetry::sdk::resource::ResourceAttributes{ - {sc::kCloudAvailabilityZone, "us-central1-a"}, - {sc::kCloudRegion, "us-central1"}, - {sc::kServiceNamespace, "test-namespace"}, - {sc::kHostName, "test-name"}, + {sc::cloud::kCloudAvailabilityZone, "us-central1-a"}, + {sc::cloud::kCloudRegion, "us-central1"}, + {sc::service::kServiceNamespace, "test-namespace"}, + {sc::host::kHostName, "test-name"}, }; - if (test.host_id) attributes[sc::kHostId] = *test.host_id; + if (test.host_id) attributes[sc::host::kHostId] = *test.host_id; auto mr = ToMonitoredResource(attributes); EXPECT_EQ(mr.type, "generic_node"); diff --git a/google/cloud/opentelemetry/internal/monitoring_exporter.cc b/google/cloud/opentelemetry/internal/monitoring_exporter.cc index 48dd990fd87c5..6761b3554cd11 100644 --- a/google/cloud/opentelemetry/internal/monitoring_exporter.cc +++ b/google/cloud/opentelemetry/internal/monitoring_exporter.cc @@ -15,10 +15,10 @@ #include "google/cloud/opentelemetry/internal/monitoring_exporter.h" #include "google/cloud/monitoring/v3/metric_connection.h" #include "google/cloud/opentelemetry/internal/time_series.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/noexcept_action.h" #include "google/cloud/log.h" #include "google/cloud/project.h" +#include "absl/strings/str_cat.h" #include namespace google { diff --git a/google/cloud/opentelemetry/internal/monitoring_exporter_test.cc b/google/cloud/opentelemetry/internal/monitoring_exporter_test.cc index 7602f35539626..f3e495bc5d0a2 100644 --- a/google/cloud/opentelemetry/internal/monitoring_exporter_test.cc +++ b/google/cloud/opentelemetry/internal/monitoring_exporter_test.cc @@ -20,6 +20,7 @@ #include #include #include +#include namespace google { namespace cloud { @@ -134,15 +135,14 @@ TEST(MonitoringExporter, ExportSuccess) { auto& labels = *resource.mutable_labels(); auto const& attributes = pda.attributes.GetAttributes(); labels["project_id"] = - absl::get(attributes.find("project_id")->second); + std::get(attributes.find("project_id")->second); labels["instance"] = - absl::get(attributes.find("instance")->second); + std::get(attributes.find("instance")->second); labels["cluster"] = - absl::get(attributes.find("cluster")->second); + std::get(attributes.find("cluster")->second); labels["table"] = - absl::get(attributes.find("table")->second); - labels["zone"] = - absl::get(attributes.find("zone")->second); + std::get(attributes.find("table")->second); + labels["zone"] = std::get(attributes.find("zone")->second); return std::make_pair(labels["project_id"], resource); }; diff --git a/google/cloud/opentelemetry/internal/recordable.cc b/google/cloud/opentelemetry/internal/recordable.cc index ca2623dc03c70..89ed90d866ed9 100644 --- a/google/cloud/opentelemetry/internal/recordable.cc +++ b/google/cloud/opentelemetry/internal/recordable.cc @@ -14,11 +14,12 @@ #include "google/cloud/opentelemetry/internal/recordable.h" #include "google/cloud/opentelemetry/internal/monitored_resource.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/noexcept_action.h" #include "google/cloud/internal/time_utils.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include "absl/time/time.h" +#include "absl/types/variant.h" #include #include @@ -207,7 +208,7 @@ void AddAttributeImpl( std::size_t limit) { auto* proto = ProtoOrDrop(attributes, key, limit); if (proto) { - absl::visit(AttributeVisitor{*proto}, value); + std::visit(AttributeVisitor{*proto}, value); } else { attributes.set_dropped_attributes_count( attributes.dropped_attributes_count() + 1); diff --git a/google/cloud/opentelemetry/internal/recordable.h b/google/cloud/opentelemetry/internal/recordable.h index 578a9d6fc9729..de3bd557eb460 100644 --- a/google/cloud/opentelemetry/internal/recordable.h +++ b/google/cloud/opentelemetry/internal/recordable.h @@ -17,8 +17,8 @@ #include "google/cloud/project.h" #include "google/cloud/version.h" -#include -#include +#include "google/devtools/cloudtrace/v2/trace.pb.h" +#include "google/devtools/cloudtrace/v2/tracing.pb.h" #include #include #include diff --git a/google/cloud/opentelemetry/internal/recordable_test.cc b/google/cloud/opentelemetry/internal/recordable_test.cc index 0d2ea0e91db9b..2622891fb8b7a 100644 --- a/google/cloud/opentelemetry/internal/recordable_test.cc +++ b/google/cloud/opentelemetry/internal/recordable_test.cc @@ -20,7 +20,8 @@ #include #include #include -#include +#include +#include namespace google { namespace cloud { @@ -28,7 +29,7 @@ namespace otel_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN namespace { -namespace sc = opentelemetry::sdk::resource::SemanticConventions; +namespace sc = opentelemetry::semconv; namespace v2 = ::google::devtools::cloudtrace::v2; using ::testing::_; using ::testing::AllOf; @@ -674,10 +675,10 @@ TEST(Recordable, SetAttributeRespectsLimit) { TEST(Recordable, SetResourceMapsMonitoredResources) { auto resource = opentelemetry::sdk::resource::Resource::Create({ - {sc::kCloudProvider, "gcp"}, - {sc::kCloudPlatform, "gcp_compute_engine"}, - {sc::kHostId, "1020304050607080900"}, - {sc::kCloudAvailabilityZone, "us-central1-a"}, + {sc::cloud::kCloudProvider, "gcp"}, + {sc::cloud::kCloudPlatform, "gcp_compute_engine"}, + {sc::host::kHostId, "1020304050607080900"}, + {sc::cloud::kCloudAvailabilityZone, "us-central1-a"}, }); auto rec = Recordable(Project(kProjectId), TestGenerator()); diff --git a/google/cloud/opentelemetry/internal/resource_detector_impl.cc b/google/cloud/opentelemetry/internal/resource_detector_impl.cc index 99e03ba08c4dd..6209cff02dacb 100644 --- a/google/cloud/opentelemetry/internal/resource_detector_impl.cc +++ b/google/cloud/opentelemetry/internal/resource_detector_impl.cc @@ -13,7 +13,6 @@ // limitations under the License. #include "google/cloud/opentelemetry/internal/resource_detector_impl.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/compute_engine_util.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/internal/make_status.h" @@ -21,9 +20,14 @@ #include "google/cloud/log.h" #include "absl/strings/ascii.h" #include "absl/strings/match.h" +#include "absl/strings/str_cat.h" #include #include -#include +#include +#include +#include +#include +#include namespace google { namespace cloud { @@ -31,7 +35,7 @@ namespace otel_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN namespace { -namespace sc = opentelemetry::sdk::resource::SemanticConventions; +namespace sc = opentelemetry::semconv; // The metadata server returns fully qualified names. (e.g. a zone may be // "projects/p/zones/us-central1-a"). Return the IDs only. @@ -84,8 +88,9 @@ class Parser { // environment variables into resource attributes. This populates the // `attributes_` member. void ProcessMetadataAndEnv() { - SetAttribute(sc::kCloudProvider, "gcp"); - SetAttribute(sc::kCloudAccountId, Metadata({"project", "projectId"})); + SetAttribute(sc::cloud::kCloudProvider, "gcp"); + SetAttribute(sc::cloud::kCloudAccountId, + Metadata({"project", "projectId"})); if (internal::GetEnv("KUBERNETES_SERVICE_HOST")) return Gke(); if (internal::GetEnv("FUNCTION_TARGET")) return CloudFunctions(); @@ -95,10 +100,10 @@ class Parser { } void Gke() { - SetAttribute(sc::kCloudPlatform, "gcp_kubernetes_engine"); - SetAttribute(sc::kK8sClusterName, + SetAttribute(sc::cloud::kCloudPlatform, "gcp_kubernetes_engine"); + SetAttribute(sc::k8s::kK8sClusterName, Metadata({"instance", "attributes", "cluster-name"})); - SetAttribute(sc::kHostId, Metadata({"instance", "id"})); + SetAttribute(sc::host::kHostId, Metadata({"instance", "id"})); auto cluster_location = Tail(Metadata({"instance", "attributes", "cluster-location"})); @@ -106,48 +111,49 @@ class Parser { auto hyphen_count = std::count(cluster_location.begin(), cluster_location.end(), '-'); if (hyphen_count == 1) { - SetAttribute(sc::kCloudRegion, cluster_location); + SetAttribute(sc::cloud::kCloudRegion, cluster_location); } else if (hyphen_count == 2) { - SetAttribute(sc::kCloudAvailabilityZone, cluster_location); + SetAttribute(sc::cloud::kCloudAvailabilityZone, cluster_location); } } void CloudFunctions() { - SetAttribute(sc::kCloudPlatform, "gcp_cloud_functions"); - SetEnvAttribute(sc::kFaasName, "K_SERVICE"); - SetEnvAttribute(sc::kFaasVersion, "K_REVISION"); - SetAttribute(sc::kFaasInstance, Metadata({"instance", "id"})); + SetAttribute(sc::cloud::kCloudPlatform, "gcp_cloud_functions"); + SetEnvAttribute(sc::faas::kFaasName, "K_SERVICE"); + SetEnvAttribute(sc::faas::kFaasVersion, "K_REVISION"); + SetAttribute(sc::faas::kFaasInstance, Metadata({"instance", "id"})); } void CloudRun() { - SetAttribute(sc::kCloudPlatform, "gcp_cloud_run"); - SetEnvAttribute(sc::kFaasName, "K_SERVICE"); - SetEnvAttribute(sc::kFaasVersion, "K_REVISION"); - SetAttribute(sc::kFaasInstance, Metadata({"instance", "id"})); + SetAttribute(sc::cloud::kCloudPlatform, "gcp_cloud_run"); + SetEnvAttribute(sc::faas::kFaasName, "K_SERVICE"); + SetEnvAttribute(sc::faas::kFaasVersion, "K_REVISION"); + SetAttribute(sc::faas::kFaasInstance, Metadata({"instance", "id"})); } void Gae() { - SetAttribute(sc::kCloudPlatform, "gcp_app_engine"); - SetEnvAttribute(sc::kFaasName, "GAE_SERVICE"); - SetEnvAttribute(sc::kFaasVersion, "GAE_VERSION"); - SetEnvAttribute(sc::kFaasInstance, "GAE_INSTANCE"); + SetAttribute(sc::cloud::kCloudPlatform, "gcp_app_engine"); + SetEnvAttribute(sc::faas::kFaasName, "GAE_SERVICE"); + SetEnvAttribute(sc::faas::kFaasVersion, "GAE_VERSION"); + SetEnvAttribute(sc::faas::kFaasInstance, "GAE_INSTANCE"); auto zone = Tail(Metadata({"instance", "zone"})); - SetAttribute(sc::kCloudAvailabilityZone, zone); + SetAttribute(sc::cloud::kCloudAvailabilityZone, zone); auto const pos = zone.rfind('-'); - SetAttribute(sc::kCloudRegion, zone.substr(0, pos)); + SetAttribute(sc::cloud::kCloudRegion, zone.substr(0, pos)); } void Gce() { - SetAttribute(sc::kCloudPlatform, "gcp_compute_engine"); - SetAttribute(sc::kHostType, Tail(Metadata({"instance", "machineType"}))); - SetAttribute(sc::kHostId, Metadata({"instance", "id"})); - SetAttribute(sc::kHostName, Metadata({"instance", "name"})); + SetAttribute(sc::cloud::kCloudPlatform, "gcp_compute_engine"); + SetAttribute(sc::host::kHostType, + Tail(Metadata({"instance", "machineType"}))); + SetAttribute(sc::host::kHostId, Metadata({"instance", "id"})); + SetAttribute(sc::host::kHostName, Metadata({"instance", "name"})); auto zone = Tail(Metadata({"instance", "zone"})); - SetAttribute(sc::kCloudAvailabilityZone, zone); + SetAttribute(sc::cloud::kCloudAvailabilityZone, zone); auto const pos = zone.rfind('-'); - SetAttribute(sc::kCloudRegion, zone.substr(0, pos)); + SetAttribute(sc::cloud::kCloudRegion, zone.substr(0, pos)); } std::string Metadata(std::deque keys) { diff --git a/google/cloud/opentelemetry/internal/resource_detector_impl_test.cc b/google/cloud/opentelemetry/internal/resource_detector_impl_test.cc index bb790c5726305..4c73a5c98404f 100644 --- a/google/cloud/opentelemetry/internal/resource_detector_impl_test.cc +++ b/google/cloud/opentelemetry/internal/resource_detector_impl_test.cc @@ -12,9 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/opentelemetry/internal/resource_detector_impl.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/compute_engine_util.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/testing_util/mock_http_payload.h" @@ -24,8 +22,13 @@ #include "google/cloud/testing_util/scoped_environment.h" #include "google/cloud/testing_util/scoped_log.h" #include "google/cloud/version.h" +#include "absl/strings/str_cat.h" #include -#include +#include +#include +#include +#include +#include namespace google { namespace cloud { @@ -33,7 +36,7 @@ namespace otel { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN namespace { -namespace sc = opentelemetry::sdk::resource::SemanticConventions; +namespace sc = opentelemetry::semconv; using ::google::cloud::testing_util::MakeMockHttpPayloadSuccess; using ::google::cloud::testing_util::MockHttpPayload; using ::google::cloud::testing_util::MockRestClient; @@ -118,9 +121,8 @@ TEST(ResourceDetector, RetriesTransientConnectionError) { auto resource = detector->Detect(); auto const& attributes = resource.GetAttributes(); - EXPECT_THAT( - attributes, - Not(Contains(OTelAttribute(sc::kCloudProvider, "gcp")))); + EXPECT_THAT(attributes, Not(Contains(OTelAttribute( + sc::cloud::kCloudProvider, "gcp")))); EXPECT_THAT( log.ExtractLines(), @@ -142,9 +144,8 @@ TEST(ResourceDetector, PermanentConnectionError) { auto resource = detector->Detect(); auto const& attributes = resource.GetAttributes(); - EXPECT_THAT( - attributes, - Not(Contains(OTelAttribute(sc::kCloudProvider, "gcp")))); + EXPECT_THAT(attributes, Not(Contains(OTelAttribute( + sc::cloud::kCloudProvider, "gcp")))); EXPECT_THAT(log.ExtractLines(), Contains(AllOf(HasSubstr("Could not query the metadata server"), @@ -172,9 +173,8 @@ TEST(ResourceDetector, HttpError) { auto resource = detector->Detect(); auto const& attributes = resource.GetAttributes(); - EXPECT_THAT( - attributes, - Not(Contains(OTelAttribute(sc::kCloudProvider, "gcp")))); + EXPECT_THAT(attributes, Not(Contains(OTelAttribute( + sc::cloud::kCloudProvider, "gcp")))); EXPECT_THAT(log.ExtractLines(), Contains(AllOf(HasSubstr("Could not query the metadata server"), @@ -209,9 +209,8 @@ TEST(ResourceDetector, ValidatesHeaders) { auto resource = detector->Detect(); auto const& attributes = resource.GetAttributes(); - EXPECT_THAT( - attributes, - Not(Contains(OTelAttribute(sc::kCloudProvider, "gcp")))); + EXPECT_THAT(attributes, Not(Contains(OTelAttribute( + sc::cloud::kCloudProvider, "gcp")))); EXPECT_THAT( log.ExtractLines(), @@ -246,9 +245,8 @@ TEST(ResourceDetector, PayloadReadError) { auto resource = detector->Detect(); auto const& attributes = resource.GetAttributes(); - EXPECT_THAT( - attributes, - Not(Contains(OTelAttribute(sc::kCloudProvider, "gcp")))); + EXPECT_THAT(attributes, Not(Contains(OTelAttribute( + sc::cloud::kCloudProvider, "gcp")))); EXPECT_THAT(log.ExtractLines(), Contains(AllOf(HasSubstr("Could not query the metadata server"), @@ -304,13 +302,14 @@ TEST(ResourceDetector, GkeRegion) { EXPECT_THAT( attributes, IsSupersetOf({ - OTelAttribute(sc::kCloudProvider, "gcp"), - OTelAttribute(sc::kCloudAccountId, "test-project"), - OTelAttribute(sc::kCloudPlatform, + OTelAttribute(sc::cloud::kCloudProvider, "gcp"), + OTelAttribute(sc::cloud::kCloudAccountId, + "test-project"), + OTelAttribute(sc::cloud::kCloudPlatform, "gcp_kubernetes_engine"), - OTelAttribute(sc::kK8sClusterName, "test-cluster"), - OTelAttribute(sc::kHostId, "1020304050607080900"), - OTelAttribute(sc::kCloudRegion, "us-central1"), + OTelAttribute(sc::k8s::kK8sClusterName, "test-cluster"), + OTelAttribute(sc::host::kHostId, "1020304050607080900"), + OTelAttribute(sc::cloud::kCloudRegion, "us-central1"), })); } @@ -336,13 +335,14 @@ TEST(ResourceDetector, GkeZone) { EXPECT_THAT( attributes, IsSupersetOf({ - OTelAttribute(sc::kCloudProvider, "gcp"), - OTelAttribute(sc::kCloudAccountId, "test-project"), - OTelAttribute(sc::kCloudPlatform, + OTelAttribute(sc::cloud::kCloudProvider, "gcp"), + OTelAttribute(sc::cloud::kCloudAccountId, + "test-project"), + OTelAttribute(sc::cloud::kCloudPlatform, "gcp_kubernetes_engine"), - OTelAttribute(sc::kK8sClusterName, "test-cluster"), - OTelAttribute(sc::kHostId, "1020304050607080900"), - OTelAttribute(sc::kCloudAvailabilityZone, + OTelAttribute(sc::k8s::kK8sClusterName, "test-cluster"), + OTelAttribute(sc::host::kHostId, "1020304050607080900"), + OTelAttribute(sc::cloud::kCloudAvailabilityZone, "us-central1-a"), })); } @@ -368,12 +368,15 @@ TEST(ResourceDetector, CloudFunctions) { EXPECT_THAT( attributes, IsSupersetOf({ - OTelAttribute(sc::kCloudProvider, "gcp"), - OTelAttribute(sc::kCloudAccountId, "test-project"), - OTelAttribute(sc::kCloudPlatform, "gcp_cloud_functions"), - OTelAttribute(sc::kFaasName, "test-service"), - OTelAttribute(sc::kFaasVersion, "test-version"), - OTelAttribute(sc::kFaasInstance, "1020304050607080900"), + OTelAttribute(sc::cloud::kCloudProvider, "gcp"), + OTelAttribute(sc::cloud::kCloudAccountId, + "test-project"), + OTelAttribute(sc::cloud::kCloudPlatform, + "gcp_cloud_functions"), + OTelAttribute(sc::faas::kFaasName, "test-service"), + OTelAttribute(sc::faas::kFaasVersion, "test-version"), + OTelAttribute(sc::faas::kFaasInstance, + "1020304050607080900"), })); } @@ -399,12 +402,15 @@ TEST(ResourceDetector, CloudRun) { EXPECT_THAT( attributes, IsSupersetOf({ - OTelAttribute(sc::kCloudProvider, "gcp"), - OTelAttribute(sc::kCloudAccountId, "test-project"), - OTelAttribute(sc::kCloudPlatform, "gcp_cloud_run"), - OTelAttribute(sc::kFaasName, "test-service"), - OTelAttribute(sc::kFaasVersion, "test-version"), - OTelAttribute(sc::kFaasInstance, "1020304050607080900"), + OTelAttribute(sc::cloud::kCloudProvider, "gcp"), + OTelAttribute(sc::cloud::kCloudAccountId, + "test-project"), + OTelAttribute(sc::cloud::kCloudPlatform, + "gcp_cloud_run"), + OTelAttribute(sc::faas::kFaasName, "test-service"), + OTelAttribute(sc::faas::kFaasVersion, "test-version"), + OTelAttribute(sc::faas::kFaasInstance, + "1020304050607080900"), })); } @@ -431,15 +437,17 @@ TEST(ResourceDetector, Gae) { EXPECT_THAT( attributes, IsSupersetOf({ - OTelAttribute(sc::kCloudProvider, "gcp"), - OTelAttribute(sc::kCloudAccountId, "test-project"), - OTelAttribute(sc::kCloudPlatform, "gcp_app_engine"), - OTelAttribute(sc::kFaasName, "test-service"), - OTelAttribute(sc::kFaasVersion, "test-version"), - OTelAttribute(sc::kFaasInstance, "test-instance"), - OTelAttribute(sc::kCloudAvailabilityZone, + OTelAttribute(sc::cloud::kCloudProvider, "gcp"), + OTelAttribute(sc::cloud::kCloudAccountId, + "test-project"), + OTelAttribute(sc::cloud::kCloudPlatform, + "gcp_app_engine"), + OTelAttribute(sc::faas::kFaasName, "test-service"), + OTelAttribute(sc::faas::kFaasVersion, "test-version"), + OTelAttribute(sc::faas::kFaasInstance, "test-instance"), + OTelAttribute(sc::cloud::kCloudAvailabilityZone, "us-central1-a"), - OTelAttribute(sc::kCloudRegion, "us-central1"), + OTelAttribute(sc::cloud::kCloudRegion, "us-central1"), })); } @@ -467,15 +475,17 @@ TEST(ResourceDetector, Gce) { EXPECT_THAT( attributes, IsSupersetOf({ - OTelAttribute(sc::kCloudProvider, "gcp"), - OTelAttribute(sc::kCloudAccountId, "test-project"), - OTelAttribute(sc::kCloudPlatform, "gcp_compute_engine"), - OTelAttribute(sc::kHostType, "c2d-standard-16"), - OTelAttribute(sc::kHostId, "1020304050607080900"), - OTelAttribute(sc::kHostName, "test-instance"), - OTelAttribute(sc::kCloudAvailabilityZone, + OTelAttribute(sc::cloud::kCloudProvider, "gcp"), + OTelAttribute(sc::cloud::kCloudAccountId, + "test-project"), + OTelAttribute(sc::cloud::kCloudPlatform, + "gcp_compute_engine"), + OTelAttribute(sc::host::kHostType, "c2d-standard-16"), + OTelAttribute(sc::host::kHostId, "1020304050607080900"), + OTelAttribute(sc::host::kHostName, "test-instance"), + OTelAttribute(sc::cloud::kCloudAvailabilityZone, "us-central1-a"), - OTelAttribute(sc::kCloudRegion, "us-central1"), + OTelAttribute(sc::cloud::kCloudRegion, "us-central1"), })); } @@ -507,4 +517,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace otel } // namespace cloud } // namespace google -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/opentelemetry/internal/time_series.cc b/google/cloud/opentelemetry/internal/time_series.cc index effd72a807b3d..b5077c3f6dc94 100644 --- a/google/cloud/opentelemetry/internal/time_series.cc +++ b/google/cloud/opentelemetry/internal/time_series.cc @@ -14,14 +14,15 @@ #include "google/cloud/opentelemetry/internal/time_series.h" #include "google/cloud/opentelemetry/internal/monitored_resource.h" -#include "google/cloud/internal/absl_str_replace_quiet.h" #include "google/cloud/internal/time_utils.h" #include "google/cloud/log.h" +#include "absl/strings/str_replace.h" #include #include #include -#include +#include #include +#include namespace google { namespace cloud { @@ -29,7 +30,7 @@ namespace otel_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN namespace { -namespace sc = opentelemetry::sdk::resource::SemanticConventions; +namespace sc = opentelemetry::semconv; google::protobuf::Timestamp ToProtoTimestamp( opentelemetry::common::SystemTimestamp ts) { @@ -40,10 +41,10 @@ google::protobuf::Timestamp ToProtoTimestamp( google::monitoring::v3::TypedValue ToValue( opentelemetry::sdk::metrics::ValueType value) { google::monitoring::v3::TypedValue proto; - if (absl::holds_alternative(value)) { - proto.set_double_value(absl::get(value)); + if (std::holds_alternative(value)) { + proto.set_double_value(std::get(value)); } else { - proto.set_int64_value(absl::get(value)); + proto.set_int64_value(std::get(value)); } return proto; } @@ -62,9 +63,9 @@ google::api::MetricDescriptor::ValueType ToValueType( } double AsDouble(opentelemetry::sdk::metrics::ValueType const& v) { - return absl::holds_alternative(v) - ? absl::get(v) - : static_cast(absl::get(v)); + return std::holds_alternative(v) + ? std::get(v) + : static_cast(std::get(v)); } std::vector ToRequestsHelper( @@ -112,12 +113,21 @@ void ToTimeSeriesHelper( opentelemetry::sdk::metrics::HistogramPointData const& point) { return ToTimeSeries(metric_data, point); } +#if OPENTELEMETRY_VERSION_MAJOR > 1 || \ + (OPENTELEMETRY_VERSION_MAJOR == 1 && OPENTELEMETRY_VERSION_MINOR >= 21) + absl::optional operator()( + opentelemetry::sdk::metrics:: + Base2ExponentialHistogramPointData const&) { + // TODO(#xxxxx): Add support for exponential histograms. + return absl::nullopt; + } +#endif absl::optional operator()( opentelemetry::sdk::metrics::DropPointData const&) { return absl::nullopt; } }; - auto ts = absl::visit(Visitor{metric_data}, pda.point_data); + auto ts = std::visit(Visitor{metric_data}, pda.point_data); if (!ts) continue; ts->set_unit(metric_data.instrument_descriptor.unit_); ts_collector_fn(metric_data, pda, *std::move(ts)); @@ -164,9 +174,9 @@ google::api::Metric ToMetric( // service processes on a single GCE VM. auto const& ra = resource->GetAttributes().GetAttributes(); for (std::string key : { - sc::kServiceName, - sc::kServiceNamespace, - sc::kServiceInstanceId, + sc::service::kServiceName, + sc::service::kServiceNamespace, + sc::service::kServiceInstanceId, }) { auto it = ra.find(std::move(key)); if (it != ra.end()) add_label(labels, it->first, it->second); diff --git a/google/cloud/opentelemetry/internal/time_series.h b/google/cloud/opentelemetry/internal/time_series.h index 6dc40b375b8a1..92c21bc2969ad 100644 --- a/google/cloud/opentelemetry/internal/time_series.h +++ b/google/cloud/opentelemetry/internal/time_series.h @@ -18,9 +18,9 @@ #include "google/cloud/opentelemetry/internal/monitoring_exporter.h" #include "google/cloud/version.h" #include "absl/types/optional.h" -#include -#include -#include +#include "google/api/metric.pb.h" +#include "google/api/monitored_resource.pb.h" +#include "google/monitoring/v3/metric_service.pb.h" #include #include #include diff --git a/google/cloud/opentelemetry/internal/time_series_test.cc b/google/cloud/opentelemetry/internal/time_series_test.cc index c436ea715466c..ef2df414ec630 100644 --- a/google/cloud/opentelemetry/internal/time_series_test.cc +++ b/google/cloud/opentelemetry/internal/time_series_test.cc @@ -23,7 +23,9 @@ #include #include #include -#include +#include +#include +#include #include #include @@ -33,7 +35,7 @@ namespace otel_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN namespace { -namespace sc = opentelemetry::sdk::resource::SemanticConventions; +namespace sc = opentelemetry::semconv; using ::google::cloud::testing_util::IsProtoEqual; using ::google::protobuf::TextFormat; @@ -137,10 +139,10 @@ auto Interval(std::chrono::system_clock::time_point start, auto TestResource() { return opentelemetry::sdk::resource::Resource::Create({ - {sc::kCloudProvider, "gcp"}, - {sc::kCloudPlatform, "gcp_compute_engine"}, - {sc::kHostId, "1020304050607080900"}, - {sc::kCloudAvailabilityZone, "us-central1-a"}, + {sc::cloud::kCloudProvider, "gcp"}, + {sc::cloud::kCloudPlatform, "gcp_compute_engine"}, + {sc::host::kHostId, "1020304050607080900"}, + {sc::cloud::kCloudAvailabilityZone, "us-central1-a"}, }); } @@ -284,9 +286,9 @@ TEST(ToMetric, IncludesServiceLabelsFromResource) { opentelemetry::sdk::resource::ResourceAttributes resource_attributes = { {"unused", "unused"}, - {sc::kServiceName, "test-name"}, - {sc::kServiceNamespace, "test-namespace"}, - {sc::kServiceInstanceId, "test-instance"}, + {sc::service::kServiceName, "test-name"}, + {sc::service::kServiceNamespace, "test-namespace"}, + {sc::service::kServiceInstanceId, "test-instance"}, }; auto resource = opentelemetry::sdk::resource::Resource::Create(resource_attributes); @@ -310,9 +312,9 @@ TEST(ToMetric, PointAttributesOverServiceResourceAttributes) { }; opentelemetry::sdk::resource::ResourceAttributes resource_attributes = { - {sc::kServiceName, "resource-name"}, - {sc::kServiceNamespace, "resource-namespace"}, - {sc::kServiceInstanceId, "resource-instance"}, + {sc::service::kServiceName, "resource-name"}, + {sc::service::kServiceNamespace, "resource-namespace"}, + {sc::service::kServiceInstanceId, "resource-instance"}, }; auto resource = opentelemetry::sdk::resource::Resource::Create(resource_attributes); @@ -333,17 +335,17 @@ TEST(ToMetric, ResourceFilter) { {"service_name", "point-name"}, {"service_namespace", "point-namespace"}, {"service_instance_id", "point-instance"}, - {sc::kServiceName, "resource-name"}, - {sc::kServiceNamespace, "resource-namespace"}, - {sc::kServiceInstanceId, "resource-instance"}, + {sc::service::kServiceName, "resource-name"}, + {sc::service::kServiceNamespace, "resource-namespace"}, + {sc::service::kServiceInstanceId, "resource-instance"}, }; auto resource = opentelemetry::sdk::resource::Resource::Create({}); auto resource_filter_fn = [resource_labels = std::set{ - sc::kServiceName, sc::kServiceNamespace, - sc::kServiceInstanceId}](std::string const& l) { + sc::service::kServiceName, sc::service::kServiceNamespace, + sc::service::kServiceInstanceId}](std::string const& l) { return internal::Contains(resource_labels, l); }; diff --git a/google/cloud/opentelemetry/quickstart/.bazelrc b/google/cloud/opentelemetry/quickstart/.bazelrc index 0a6d8b05a5f4f..c8de5504a2d7d 100644 --- a/google/cloud/opentelemetry/quickstart/.bazelrc +++ b/google/cloud/opentelemetry/quickstart/.bazelrc @@ -15,33 +15,17 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds # the project separately. build --experimental_convenience_symlinks=ignore -# Enable OpenTelemetry tracing instrumentation for google-cloud-cpp. -build --@google_cloud_cpp//:enable_opentelemetry - -# OpenTelemetry versions < v1.16.0 are not compatible with Abseil -# out-of-the-box. If you are using a version of OpenTelemetry < v1.16.0, -# uncomment the following configuration: -# -# ``` -# build --@io_opentelemetry_cpp//api:with_abseil -# ``` -# -# Note that the flag is not required for OpenTelemetry versions >= v1.16.0. In -# fact, the flag may be removed in future versions of OpenTelemetry. - #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/opentelemetry/quickstart/CMakeLists.txt b/google/cloud/opentelemetry/quickstart/CMakeLists.txt index 9e6d861fe40c7..940a37947e94c 100644 --- a/google/cloud/opentelemetry/quickstart/CMakeLists.txt +++ b/google/cloud/opentelemetry/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # A minimal CMakeList.txt showing how to enable OpenTelemetry tracing for Google # Cloud C++ client libraries in CMake-based projects. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-opentelemetry-quickstart CXX) find_package(google_cloud_cpp_storage REQUIRED) diff --git a/google/cloud/opentelemetry/quickstart/README.md b/google/cloud/opentelemetry/quickstart/README.md index 673e63e41ca12..564bb6dc468dd 100644 --- a/google/cloud/opentelemetry/quickstart/README.md +++ b/google/cloud/opentelemetry/quickstart/README.md @@ -42,12 +42,11 @@ observability into their operation at runtime. To enable tracing, OpenTelemetry provides full [install instructions][opentelemetry-cpp-install]. We will highlight the important points. -### Compatibility with Abseil +### Standard Template Library (STL) types -OpenTelemetry vendors-in Abseil types, defining them in `namespace absl`. The -Google Cloud client libraries depends on Abseil, which also defines these types -in the same namespace. In order to avoid ambiguous symbols, we must set certain -flags when compiling `opentelemetry-cpp`. +OpenTelemetry provides implementations for some STL types via several sources: +Abseil, its own `nostd` implementation, and the STL bundled with your compiler. +The `google-cloud-cpp` libraries require using the STL implementation. ## Using with Bazel @@ -117,7 +116,7 @@ To enable these features, add the following to your CMake configuration command: #### Details -We must supply the `-DWITH_ABSEIL=ON` flag when compiling `opentelemetry-cpp` +We must supply the `-DWITH_STL=CXX17` flag when compiling `opentelemetry-cpp` for compatibility with Abseil. We must also ensure that the `-DCMAKE_CXX_STANDARD` used to compile @@ -126,8 +125,9 @@ We must also ensure that the `-DCMAKE_CXX_STANDARD` used to compile OpenTelemetry defaults the language standard if it is not explicitly set. So it is good practice to explicitly set the language standard. -While OpenTelemetry supports C++>=11, `google-cloud-cpp` requires C++>=14. So -you can use `-DCMAKE_CXX_STANDARD=14`, `-DCMAKE_CXX_STANDARD=17`, or higher. +While OpenTelemetry supports C++>=11, `google-cloud-cpp` requires C++>=17. So +you can use `-DCMAKE_CXX_STANDARD=17`, or higher, just make sure it matches the +standard value in the `-DWITH_STL=CXXnn` flag. ### Package Managers diff --git a/google/cloud/opentelemetry/trace_exporter_test.cc b/google/cloud/opentelemetry/trace_exporter_test.cc index 08802fb19f0f8..bc8cdf8695227 100644 --- a/google/cloud/opentelemetry/trace_exporter_test.cc +++ b/google/cloud/opentelemetry/trace_exporter_test.cc @@ -116,7 +116,6 @@ TEST(TraceExporter, LogsOnError) { HasSubstr("UNAVAILABLE"), HasSubstr("try again later")))); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::InstallSpanCatcher; using ::google::cloud::testing_util::ScopedEnvironment; using ::testing::IsEmpty; @@ -140,7 +139,6 @@ TEST(TraceExporter, NoInfiniteExportLoop14611) { // Verify that no spans were created. EXPECT_THAT(span_catcher->GetSpans(), IsEmpty()); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END diff --git a/google/cloud/optimization/BUILD.bazel b/google/cloud/optimization/BUILD.bazel index 6b91e836fc28e..1b0d2304b6300 100644 --- a/google/cloud/optimization/BUILD.bazel +++ b/google/cloud/optimization/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/optimization/v1:optimization_cc_grpc", + "@googleapis//google/cloud/optimization/v1:optimization_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/optimization/CMakeLists.txt b/google/cloud/optimization/CMakeLists.txt index 8e312ebdc7708..c8212ae6fd0dd 100644 --- a/google/cloud/optimization/CMakeLists.txt +++ b/google/cloud/optimization/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(optimization "Cloud Optimization API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(optimization_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/optimization/fleet_routing_client.h b/google/cloud/optimization/fleet_routing_client.h deleted file mode 100644 index ca9c5042e3dd5..0000000000000 --- a/google/cloud/optimization/fleet_routing_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/optimization/v1/fleet_routing.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OPTIMIZATION_FLEET_ROUTING_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OPTIMIZATION_FLEET_ROUTING_CLIENT_H - -#include "google/cloud/optimization/fleet_routing_connection.h" -#include "google/cloud/optimization/v1/fleet_routing_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in optimization_v1 instead of the aliases defined in -/// this namespace. -namespace optimization { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use optimization_v1::FleetRoutingClient directly. -using ::google::cloud::optimization_v1::FleetRoutingClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace optimization -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OPTIMIZATION_FLEET_ROUTING_CLIENT_H diff --git a/google/cloud/optimization/fleet_routing_connection.h b/google/cloud/optimization/fleet_routing_connection.h deleted file mode 100644 index 22648844eafc3..0000000000000 --- a/google/cloud/optimization/fleet_routing_connection.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/optimization/v1/fleet_routing.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OPTIMIZATION_FLEET_ROUTING_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OPTIMIZATION_FLEET_ROUTING_CONNECTION_H - -#include "google/cloud/optimization/fleet_routing_connection_idempotency_policy.h" -#include "google/cloud/optimization/v1/fleet_routing_connection.h" - -namespace google { -namespace cloud { -namespace optimization { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use optimization_v1::MakeFleetRoutingConnection directly. -using ::google::cloud::optimization_v1::MakeFleetRoutingConnection; - -/// @deprecated Use optimization_v1::FleetRoutingConnection directly. -using ::google::cloud::optimization_v1::FleetRoutingConnection; - -/// @deprecated Use optimization_v1::FleetRoutingLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::optimization_v1:: - FleetRoutingLimitedErrorCountRetryPolicy; - -/// @deprecated Use optimization_v1::FleetRoutingLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::optimization_v1::FleetRoutingLimitedTimeRetryPolicy; - -/// @deprecated Use optimization_v1::FleetRoutingRetryPolicy directly. -using ::google::cloud::optimization_v1::FleetRoutingRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace optimization -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OPTIMIZATION_FLEET_ROUTING_CONNECTION_H diff --git a/google/cloud/optimization/fleet_routing_connection_idempotency_policy.h b/google/cloud/optimization/fleet_routing_connection_idempotency_policy.h deleted file mode 100644 index e9c1a1c16fcae..0000000000000 --- a/google/cloud/optimization/fleet_routing_connection_idempotency_policy.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/optimization/v1/fleet_routing.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OPTIMIZATION_FLEET_ROUTING_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OPTIMIZATION_FLEET_ROUTING_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/optimization/v1/fleet_routing_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace optimization { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// optimization_v1::MakeDefaultFleetRoutingConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::optimization_v1:: - MakeDefaultFleetRoutingConnectionIdempotencyPolicy; - -/// @deprecated Use optimization_v1::FleetRoutingConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::optimization_v1::FleetRoutingConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace optimization -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OPTIMIZATION_FLEET_ROUTING_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/optimization/fleet_routing_options.h b/google/cloud/optimization/fleet_routing_options.h deleted file mode 100644 index c57e5706232bc..0000000000000 --- a/google/cloud/optimization/fleet_routing_options.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/optimization/v1/fleet_routing.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OPTIMIZATION_FLEET_ROUTING_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OPTIMIZATION_FLEET_ROUTING_OPTIONS_H - -#include "google/cloud/optimization/fleet_routing_connection.h" -#include "google/cloud/optimization/fleet_routing_connection_idempotency_policy.h" -#include "google/cloud/optimization/v1/fleet_routing_options.h" - -namespace google { -namespace cloud { -namespace optimization { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use optimization_v1::FleetRoutingPollingPolicyOption directly. -using ::google::cloud::optimization_v1::FleetRoutingPollingPolicyOption; - -/// @deprecated Use optimization_v1::FleetRoutingBackoffPolicyOption directly. -using ::google::cloud::optimization_v1::FleetRoutingBackoffPolicyOption; - -/// @deprecated Use -/// optimization_v1::FleetRoutingConnectionIdempotencyPolicyOption directly. -using ::google::cloud::optimization_v1:: - FleetRoutingConnectionIdempotencyPolicyOption; - -/// @deprecated Use optimization_v1::FleetRoutingPolicyOptionList directly. -using ::google::cloud::optimization_v1::FleetRoutingPolicyOptionList; - -/// @deprecated Use optimization_v1::FleetRoutingRetryPolicyOption directly. -using ::google::cloud::optimization_v1::FleetRoutingRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace optimization -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OPTIMIZATION_FLEET_ROUTING_OPTIONS_H diff --git a/google/cloud/optimization/mocks/mock_fleet_routing_connection.h b/google/cloud/optimization/mocks/mock_fleet_routing_connection.h deleted file mode 100644 index 7fb7014de7369..0000000000000 --- a/google/cloud/optimization/mocks/mock_fleet_routing_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/optimization/v1/fleet_routing.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OPTIMIZATION_MOCKS_MOCK_FLEET_ROUTING_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OPTIMIZATION_MOCKS_MOCK_FLEET_ROUTING_CONNECTION_H - -#include "google/cloud/optimization/fleet_routing_connection.h" -#include "google/cloud/optimization/v1/mocks/mock_fleet_routing_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in optimization_v1_mocks instead of the aliases -/// defined in this namespace. -namespace optimization_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use optimization_v1_mocks::MockFleetRoutingConnection directly. -using ::google::cloud::optimization_v1_mocks::MockFleetRoutingConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace optimization_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OPTIMIZATION_MOCKS_MOCK_FLEET_ROUTING_CONNECTION_H diff --git a/google/cloud/optimization/quickstart/.bazelrc b/google/cloud/optimization/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/optimization/quickstart/.bazelrc +++ b/google/cloud/optimization/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/optimization/quickstart/CMakeLists.txt b/google/cloud/optimization/quickstart/CMakeLists.txt index 0585b27bd44d2..abe47a385b92b 100644 --- a/google/cloud/optimization/quickstart/CMakeLists.txt +++ b/google/cloud/optimization/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Optimization API C++ client library from # a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-optimization-quickstart CXX) find_package(google_cloud_cpp_optimization REQUIRED) diff --git a/google/cloud/optimization/v1/fleet_routing_client.h b/google/cloud/optimization/v1/fleet_routing_client.h index b374e6fe177df..9fc8dbe636252 100644 --- a/google/cloud/optimization/v1/fleet_routing_client.h +++ b/google/cloud/optimization/v1/fleet_routing_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/optimization/v1/fleet_routing_connection.h b/google/cloud/optimization/v1/fleet_routing_connection.h index 9dd07af27bbb5..8c00cd1218900 100644 --- a/google/cloud/optimization/v1/fleet_routing_connection.h +++ b/google/cloud/optimization/v1/fleet_routing_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OPTIMIZATION_V1_FLEET_ROUTING_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OPTIMIZATION_V1_FLEET_ROUTING_CONNECTION_H +#include "google/cloud/optimization/v1/fleet_routing.pb.h" #include "google/cloud/optimization/v1/fleet_routing_connection_idempotency_policy.h" #include "google/cloud/optimization/v1/internal/fleet_routing_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -29,8 +30,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/optimization/v1/fleet_routing_connection_idempotency_policy.h b/google/cloud/optimization/v1/fleet_routing_connection_idempotency_policy.h index c9c74a6f95cb6..194d8e40e2632 100644 --- a/google/cloud/optimization/v1/fleet_routing_connection_idempotency_policy.h +++ b/google/cloud/optimization/v1/fleet_routing_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OPTIMIZATION_V1_FLEET_ROUTING_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OPTIMIZATION_V1_FLEET_ROUTING_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/optimization/v1/fleet_routing.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/optimization/v1/internal/fleet_routing_auth_decorator.cc b/google/cloud/optimization/v1/internal/fleet_routing_auth_decorator.cc index 70aa6517a53ce..187f1610c8714 100644 --- a/google/cloud/optimization/v1/internal/fleet_routing_auth_decorator.cc +++ b/google/cloud/optimization/v1/internal/fleet_routing_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/optimization/v1/fleet_routing.proto #include "google/cloud/optimization/v1/internal/fleet_routing_auth_decorator.h" -#include +#include "google/cloud/optimization/v1/fleet_routing.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace optimization_v1_internal { @@ -116,3 +119,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace optimization_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/optimization/v1/internal/fleet_routing_auth_decorator.h b/google/cloud/optimization/v1/internal/fleet_routing_auth_decorator.h index ceca64c42b3ee..49177581dbd84 100644 --- a/google/cloud/optimization/v1/internal/fleet_routing_auth_decorator.h +++ b/google/cloud/optimization/v1/internal/fleet_routing_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/optimization/v1/internal/fleet_routing_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace optimization_v1_internal { @@ -82,4 +85,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OPTIMIZATION_V1_INTERNAL_FLEET_ROUTING_AUTH_DECORATOR_H diff --git a/google/cloud/optimization/v1/internal/fleet_routing_connection_impl.h b/google/cloud/optimization/v1/internal/fleet_routing_connection_impl.h index 78d761dfb76d4..6ac00c51b9683 100644 --- a/google/cloud/optimization/v1/internal/fleet_routing_connection_impl.h +++ b/google/cloud/optimization/v1/internal/fleet_routing_connection_impl.h @@ -31,7 +31,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/optimization/v1/internal/fleet_routing_logging_decorator.cc b/google/cloud/optimization/v1/internal/fleet_routing_logging_decorator.cc index 5f191dbd6189b..e99ef53135a5e 100644 --- a/google/cloud/optimization/v1/internal/fleet_routing_logging_decorator.cc +++ b/google/cloud/optimization/v1/internal/fleet_routing_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/optimization/v1/fleet_routing.proto #include "google/cloud/optimization/v1/internal/fleet_routing_logging_decorator.h" +#include "google/cloud/optimization/v1/fleet_routing.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace optimization_v1_internal { @@ -130,3 +133,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace optimization_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/optimization/v1/internal/fleet_routing_logging_decorator.h b/google/cloud/optimization/v1/internal/fleet_routing_logging_decorator.h index 8b4858fbebb2b..d49e1f1088b1c 100644 --- a/google/cloud/optimization/v1/internal/fleet_routing_logging_decorator.h +++ b/google/cloud/optimization/v1/internal/fleet_routing_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/optimization/v1/internal/fleet_routing_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace optimization_v1_internal { @@ -82,4 +85,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OPTIMIZATION_V1_INTERNAL_FLEET_ROUTING_LOGGING_DECORATOR_H diff --git a/google/cloud/optimization/v1/internal/fleet_routing_metadata_decorator.cc b/google/cloud/optimization/v1/internal/fleet_routing_metadata_decorator.cc index a4d8d4a19562a..71027e43cbcc6 100644 --- a/google/cloud/optimization/v1/internal/fleet_routing_metadata_decorator.cc +++ b/google/cloud/optimization/v1/internal/fleet_routing_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/optimization/v1/fleet_routing.proto #include "google/cloud/optimization/v1/internal/fleet_routing_metadata_decorator.h" +#include "google/cloud/optimization/v1/fleet_routing.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace optimization_v1_internal { @@ -122,3 +126,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace optimization_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/optimization/v1/internal/fleet_routing_metadata_decorator.h b/google/cloud/optimization/v1/internal/fleet_routing_metadata_decorator.h index e44f246dc6288..4c6e78992408f 100644 --- a/google/cloud/optimization/v1/internal/fleet_routing_metadata_decorator.h +++ b/google/cloud/optimization/v1/internal/fleet_routing_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/optimization/v1/internal/fleet_routing_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace optimization_v1_internal { @@ -87,4 +90,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OPTIMIZATION_V1_INTERNAL_FLEET_ROUTING_METADATA_DECORATOR_H diff --git a/google/cloud/optimization/v1/internal/fleet_routing_option_defaults.cc b/google/cloud/optimization/v1/internal/fleet_routing_option_defaults.cc index 5a174086b8f3b..6bcc5a95455a9 100644 --- a/google/cloud/optimization/v1/internal/fleet_routing_option_defaults.cc +++ b/google/cloud/optimization/v1/internal/fleet_routing_option_defaults.cc @@ -42,7 +42,7 @@ Options FleetRoutingDefaultOptions(Options options) { if (!options.has()) { options.set( optimization_v1::FleetRoutingLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/optimization/v1/internal/fleet_routing_stub.cc b/google/cloud/optimization/v1/internal/fleet_routing_stub.cc index 3bfd0d174006e..9759bed2ec710 100644 --- a/google/cloud/optimization/v1/internal/fleet_routing_stub.cc +++ b/google/cloud/optimization/v1/internal/fleet_routing_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/optimization/v1/fleet_routing.proto #include "google/cloud/optimization/v1/internal/fleet_routing_stub.h" +#include "google/cloud/optimization/v1/fleet_routing.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace optimization_v1_internal { @@ -128,3 +131,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace optimization_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/optimization/v1/internal/fleet_routing_stub.h b/google/cloud/optimization/v1/internal/fleet_routing_stub.h index d0971aa7b2a11..d00ac8cc462f6 100644 --- a/google/cloud/optimization/v1/internal/fleet_routing_stub.h +++ b/google/cloud/optimization/v1/internal/fleet_routing_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OPTIMIZATION_V1_INTERNAL_FLEET_ROUTING_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OPTIMIZATION_V1_INTERNAL_FLEET_ROUTING_STUB_H +#include "google/cloud/optimization/v1/fleet_routing.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace optimization_v1_internal { @@ -129,4 +132,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OPTIMIZATION_V1_INTERNAL_FLEET_ROUTING_STUB_H diff --git a/google/cloud/optimization/v1/internal/fleet_routing_stub_factory.cc b/google/cloud/optimization/v1/internal/fleet_routing_stub_factory.cc index cbe797b6aae3f..b4aecefd54498 100644 --- a/google/cloud/optimization/v1/internal/fleet_routing_stub_factory.cc +++ b/google/cloud/optimization/v1/internal/fleet_routing_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/optimization/v1/fleet_routing.proto #include "google/cloud/optimization/v1/internal/fleet_routing_stub_factory.h" +#include "google/cloud/optimization/v1/fleet_routing.grpc.pb.h" #include "google/cloud/optimization/v1/internal/fleet_routing_auth_decorator.h" #include "google/cloud/optimization/v1/internal/fleet_routing_logging_decorator.h" #include "google/cloud/optimization/v1/internal/fleet_routing_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace optimization_v1_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace optimization_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/optimization/v1/internal/fleet_routing_stub_factory.h b/google/cloud/optimization/v1/internal/fleet_routing_stub_factory.h index 1e66415f061a9..eaf94a4a0ddcf 100644 --- a/google/cloud/optimization/v1/internal/fleet_routing_stub_factory.h +++ b/google/cloud/optimization/v1/internal/fleet_routing_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace optimization_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OPTIMIZATION_V1_INTERNAL_FLEET_ROUTING_STUB_FACTORY_H diff --git a/google/cloud/optimization/v1/internal/fleet_routing_tracing_connection.cc b/google/cloud/optimization/v1/internal/fleet_routing_tracing_connection.cc index 431f8a34b7678..b7c690f185d7b 100644 --- a/google/cloud/optimization/v1/internal/fleet_routing_tracing_connection.cc +++ b/google/cloud/optimization/v1/internal/fleet_routing_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace optimization_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - FleetRoutingTracingConnection::FleetRoutingTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -81,16 +79,12 @@ FleetRoutingTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeFleetRoutingTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/optimization/v1/internal/fleet_routing_tracing_connection.h b/google/cloud/optimization/v1/internal/fleet_routing_tracing_connection.h index da337f4e74fbe..6ddd8154a1492 100644 --- a/google/cloud/optimization/v1/internal/fleet_routing_tracing_connection.h +++ b/google/cloud/optimization/v1/internal/fleet_routing_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace optimization_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class FleetRoutingTracingConnection : public optimization_v1::FleetRoutingConnection { public: @@ -64,8 +62,6 @@ class FleetRoutingTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/optimization/v1/internal/fleet_routing_tracing_stub.cc b/google/cloud/optimization/v1/internal/fleet_routing_tracing_stub.cc index ae3dfca5e7822..64ce83b050521 100644 --- a/google/cloud/optimization/v1/internal/fleet_routing_tracing_stub.cc +++ b/google/cloud/optimization/v1/internal/fleet_routing_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace optimization_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - FleetRoutingTracingStub::FleetRoutingTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -110,18 +111,14 @@ future FleetRoutingTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeFleetRoutingTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace optimization_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/optimization/v1/internal/fleet_routing_tracing_stub.h b/google/cloud/optimization/v1/internal/fleet_routing_tracing_stub.h index 56d673ff901e9..db141ed9c8841 100644 --- a/google/cloud/optimization/v1/internal/fleet_routing_tracing_stub.h +++ b/google/cloud/optimization/v1/internal/fleet_routing_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace optimization_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class FleetRoutingTracingStub : public FleetRoutingStub { public: ~FleetRoutingTracingStub() override = default; @@ -77,8 +78,6 @@ class FleetRoutingTracingStub : public FleetRoutingStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -93,4 +92,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OPTIMIZATION_V1_INTERNAL_FLEET_ROUTING_TRACING_STUB_H diff --git a/google/cloud/oracledatabase/BUILD.bazel b/google/cloud/oracledatabase/BUILD.bazel index 22323896ca295..96503ba64daee 100644 --- a/google/cloud/oracledatabase/BUILD.bazel +++ b/google/cloud/oracledatabase/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/oracledatabase/v1:oracledatabase_cc_grpc", + "@googleapis//google/cloud/oracledatabase/v1:oracledatabase_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/oracledatabase/quickstart/CMakeLists.txt b/google/cloud/oracledatabase/quickstart/CMakeLists.txt index c4aea0eb0e45a..317d9a15c461e 100644 --- a/google/cloud/oracledatabase/quickstart/CMakeLists.txt +++ b/google/cloud/oracledatabase/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Oracle Database@Google Cloud API C++ client # library from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-oracledatabase-quickstart CXX) find_package(google_cloud_cpp_oracledatabase REQUIRED) diff --git a/google/cloud/oracledatabase/v1/internal/oracle_database_auth_decorator.cc b/google/cloud/oracledatabase/v1/internal/oracle_database_auth_decorator.cc index 56cb5d2227334..ccf62851e29fb 100644 --- a/google/cloud/oracledatabase/v1/internal/oracle_database_auth_decorator.cc +++ b/google/cloud/oracledatabase/v1/internal/oracle_database_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/oracledatabase/v1/oracledatabase.proto #include "google/cloud/oracledatabase/v1/internal/oracle_database_auth_decorator.h" -#include +#include "google/cloud/oracledatabase/v1/oracledatabase.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace oracledatabase_v1_internal { @@ -1200,3 +1203,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace oracledatabase_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/oracledatabase/v1/internal/oracle_database_auth_decorator.h b/google/cloud/oracledatabase/v1/internal/oracle_database_auth_decorator.h index 27c02e2708185..667caa9b5e5b6 100644 --- a/google/cloud/oracledatabase/v1/internal/oracle_database_auth_decorator.h +++ b/google/cloud/oracledatabase/v1/internal/oracle_database_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/oracledatabase/v1/internal/oracle_database_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace oracledatabase_v1_internal { @@ -588,4 +591,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORACLEDATABASE_V1_INTERNAL_ORACLE_DATABASE_AUTH_DECORATOR_H diff --git a/google/cloud/oracledatabase/v1/internal/oracle_database_connection_impl.h b/google/cloud/oracledatabase/v1/internal/oracle_database_connection_impl.h index 3b68553918a17..6bef3c2a44add 100644 --- a/google/cloud/oracledatabase/v1/internal/oracle_database_connection_impl.h +++ b/google/cloud/oracledatabase/v1/internal/oracle_database_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/oracledatabase/v1/internal/oracle_database_logging_decorator.cc b/google/cloud/oracledatabase/v1/internal/oracle_database_logging_decorator.cc index 00023bafb8fef..e0e8773e33548 100644 --- a/google/cloud/oracledatabase/v1/internal/oracle_database_logging_decorator.cc +++ b/google/cloud/oracledatabase/v1/internal/oracle_database_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/oracledatabase/v1/oracledatabase.proto #include "google/cloud/oracledatabase/v1/internal/oracle_database_logging_decorator.h" +#include "google/cloud/oracledatabase/v1/oracledatabase.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace oracledatabase_v1_internal { @@ -1451,3 +1454,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace oracledatabase_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/oracledatabase/v1/internal/oracle_database_logging_decorator.h b/google/cloud/oracledatabase/v1/internal/oracle_database_logging_decorator.h index 5f771f08ff92f..113084eb278a8 100644 --- a/google/cloud/oracledatabase/v1/internal/oracle_database_logging_decorator.h +++ b/google/cloud/oracledatabase/v1/internal/oracle_database_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/oracledatabase/v1/internal/oracle_database_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace oracledatabase_v1_internal { @@ -588,4 +591,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORACLEDATABASE_V1_INTERNAL_ORACLE_DATABASE_LOGGING_DECORATOR_H diff --git a/google/cloud/oracledatabase/v1/internal/oracle_database_metadata_decorator.cc b/google/cloud/oracledatabase/v1/internal/oracle_database_metadata_decorator.cc index 88035ed2f61ec..0028d9f645f4f 100644 --- a/google/cloud/oracledatabase/v1/internal/oracle_database_metadata_decorator.cc +++ b/google/cloud/oracledatabase/v1/internal/oracle_database_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/oracledatabase/v1/oracledatabase.proto #include "google/cloud/oracledatabase/v1/internal/oracle_database_metadata_decorator.h" +#include "google/cloud/oracledatabase/v1/oracledatabase.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace oracledatabase_v1_internal { @@ -1025,3 +1029,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace oracledatabase_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/oracledatabase/v1/internal/oracle_database_metadata_decorator.h b/google/cloud/oracledatabase/v1/internal/oracle_database_metadata_decorator.h index d472a6ace871b..0601accbfef7c 100644 --- a/google/cloud/oracledatabase/v1/internal/oracle_database_metadata_decorator.h +++ b/google/cloud/oracledatabase/v1/internal/oracle_database_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/oracledatabase/v1/internal/oracle_database_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace oracledatabase_v1_internal { @@ -593,4 +596,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORACLEDATABASE_V1_INTERNAL_ORACLE_DATABASE_METADATA_DECORATOR_H diff --git a/google/cloud/oracledatabase/v1/internal/oracle_database_option_defaults.cc b/google/cloud/oracledatabase/v1/internal/oracle_database_option_defaults.cc index dbbd014b788fc..3145c0eec04bc 100644 --- a/google/cloud/oracledatabase/v1/internal/oracle_database_option_defaults.cc +++ b/google/cloud/oracledatabase/v1/internal/oracle_database_option_defaults.cc @@ -42,7 +42,7 @@ Options OracleDatabaseDefaultOptions(Options options) { if (!options.has()) { options.set( oracledatabase_v1::OracleDatabaseLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/oracledatabase/v1/internal/oracle_database_stub.cc b/google/cloud/oracledatabase/v1/internal/oracle_database_stub.cc index 77844450513d2..95faa0d46f13a 100644 --- a/google/cloud/oracledatabase/v1/internal/oracle_database_stub.cc +++ b/google/cloud/oracledatabase/v1/internal/oracle_database_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/oracledatabase/v1/oracledatabase.proto #include "google/cloud/oracledatabase/v1/internal/oracle_database_stub.h" +#include "google/cloud/oracledatabase/v1/oracledatabase.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace oracledatabase_v1_internal { @@ -1423,3 +1426,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace oracledatabase_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/oracledatabase/v1/internal/oracle_database_stub.h b/google/cloud/oracledatabase/v1/internal/oracle_database_stub.h index d5073e12fae2e..33c10fcf39b5e 100644 --- a/google/cloud/oracledatabase/v1/internal/oracle_database_stub.h +++ b/google/cloud/oracledatabase/v1/internal/oracle_database_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORACLEDATABASE_V1_INTERNAL_ORACLE_DATABASE_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORACLEDATABASE_V1_INTERNAL_ORACLE_DATABASE_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/oracledatabase/v1/oracledatabase.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace oracledatabase_v1_internal { @@ -1168,4 +1171,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORACLEDATABASE_V1_INTERNAL_ORACLE_DATABASE_STUB_H diff --git a/google/cloud/oracledatabase/v1/internal/oracle_database_stub_factory.cc b/google/cloud/oracledatabase/v1/internal/oracle_database_stub_factory.cc index c70f13b9909b9..09049c62f19bd 100644 --- a/google/cloud/oracledatabase/v1/internal/oracle_database_stub_factory.cc +++ b/google/cloud/oracledatabase/v1/internal/oracle_database_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/oracledatabase/v1/oracledatabase.proto #include "google/cloud/oracledatabase/v1/internal/oracle_database_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/oracledatabase/v1/internal/oracle_database_auth_decorator.h" #include "google/cloud/oracledatabase/v1/internal/oracle_database_logging_decorator.h" #include "google/cloud/oracledatabase/v1/internal/oracle_database_metadata_decorator.h" #include "google/cloud/oracledatabase/v1/internal/oracle_database_stub.h" #include "google/cloud/oracledatabase/v1/internal/oracle_database_tracing_stub.h" +#include "google/cloud/oracledatabase/v1/oracledatabase.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace oracledatabase_v1_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace oracledatabase_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/oracledatabase/v1/internal/oracle_database_stub_factory.h b/google/cloud/oracledatabase/v1/internal/oracle_database_stub_factory.h index 814e6cf8bb1f4..7021b905387b1 100644 --- a/google/cloud/oracledatabase/v1/internal/oracle_database_stub_factory.h +++ b/google/cloud/oracledatabase/v1/internal/oracle_database_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace oracledatabase_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORACLEDATABASE_V1_INTERNAL_ORACLE_DATABASE_STUB_FACTORY_H diff --git a/google/cloud/oracledatabase/v1/internal/oracle_database_tracing_connection.cc b/google/cloud/oracledatabase/v1/internal/oracle_database_tracing_connection.cc index a88649d174aad..d5fcbd9ce827a 100644 --- a/google/cloud/oracledatabase/v1/internal/oracle_database_tracing_connection.cc +++ b/google/cloud/oracledatabase/v1/internal/oracle_database_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace oracledatabase_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - OracleDatabaseTracingConnection::OracleDatabaseTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -1294,16 +1292,12 @@ Status OracleDatabaseTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeOracleDatabaseTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/oracledatabase/v1/internal/oracle_database_tracing_connection.h b/google/cloud/oracledatabase/v1/internal/oracle_database_tracing_connection.h index 71da61c6338eb..f4a44c88b0daf 100644 --- a/google/cloud/oracledatabase/v1/internal/oracle_database_tracing_connection.h +++ b/google/cloud/oracledatabase/v1/internal/oracle_database_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace oracledatabase_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class OracleDatabaseTracingConnection : public oracledatabase_v1::OracleDatabaseConnection { public: @@ -552,8 +550,6 @@ class OracleDatabaseTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/oracledatabase/v1/internal/oracle_database_tracing_stub.cc b/google/cloud/oracledatabase/v1/internal/oracle_database_tracing_stub.cc index dcf9a1bb8162d..f893efcaee236 100644 --- a/google/cloud/oracledatabase/v1/internal/oracle_database_tracing_stub.cc +++ b/google/cloud/oracledatabase/v1/internal/oracle_database_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace oracledatabase_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - OracleDatabaseTracingStub::OracleDatabaseTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -1330,18 +1331,14 @@ future OracleDatabaseTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeOracleDatabaseTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace oracledatabase_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/oracledatabase/v1/internal/oracle_database_tracing_stub.h b/google/cloud/oracledatabase/v1/internal/oracle_database_tracing_stub.h index c4c7afa12b9a9..992c65b4b5d52 100644 --- a/google/cloud/oracledatabase/v1/internal/oracle_database_tracing_stub.h +++ b/google/cloud/oracledatabase/v1/internal/oracle_database_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace oracledatabase_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class OracleDatabaseTracingStub : public OracleDatabaseStub { public: ~OracleDatabaseTracingStub() override = default; @@ -583,8 +584,6 @@ class OracleDatabaseTracingStub : public OracleDatabaseStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -599,4 +598,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORACLEDATABASE_V1_INTERNAL_ORACLE_DATABASE_TRACING_STUB_H diff --git a/google/cloud/oracledatabase/v1/oracle_database_client.h b/google/cloud/oracledatabase/v1/oracle_database_client.h index 3ce0e8f5dd506..12270b0d66c01 100644 --- a/google/cloud/oracledatabase/v1/oracle_database_client.h +++ b/google/cloud/oracledatabase/v1/oracle_database_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/oracledatabase/v1/oracle_database_connection.h b/google/cloud/oracledatabase/v1/oracle_database_connection.h index 470de8cf9c3aa..ba03b59bbe068 100644 --- a/google/cloud/oracledatabase/v1/oracle_database_connection.h +++ b/google/cloud/oracledatabase/v1/oracle_database_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/oracledatabase/v1/internal/oracle_database_retry_traits.h" #include "google/cloud/oracledatabase/v1/oracle_database_connection_idempotency_policy.h" +#include "google/cloud/oracledatabase/v1/oracledatabase.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/oracledatabase/v1/oracle_database_connection_idempotency_policy.h b/google/cloud/oracledatabase/v1/oracle_database_connection_idempotency_policy.h index 3c38a367d2bdd..a696d8c00200c 100644 --- a/google/cloud/oracledatabase/v1/oracle_database_connection_idempotency_policy.h +++ b/google/cloud/oracledatabase/v1/oracle_database_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORACLEDATABASE_V1_ORACLE_DATABASE_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORACLEDATABASE_V1_ORACLE_DATABASE_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/oracledatabase/v1/oracledatabase.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/orgpolicy/BUILD.bazel b/google/cloud/orgpolicy/BUILD.bazel index 79d31c5db38c9..fec89ac3d3e0e 100644 --- a/google/cloud/orgpolicy/BUILD.bazel +++ b/google/cloud/orgpolicy/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v2/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/orgpolicy/v2:orgpolicy_cc_grpc", + "@googleapis//google/cloud/orgpolicy/v2:orgpolicy_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/orgpolicy/CMakeLists.txt b/google/cloud/orgpolicy/CMakeLists.txt index 5e05ffac807f2..170d71c53a863 100644 --- a/google/cloud/orgpolicy/CMakeLists.txt +++ b/google/cloud/orgpolicy/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(orgpolicy "Organization Policy API" - SERVICE_DIRS "__EMPTY__" "v2/") + SERVICE_DIRS "v2/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(orgpolicy_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/orgpolicy/mocks/mock_org_policy_connection.h b/google/cloud/orgpolicy/mocks/mock_org_policy_connection.h deleted file mode 100644 index 3db3988f946b9..0000000000000 --- a/google/cloud/orgpolicy/mocks/mock_org_policy_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/orgpolicy/v2/orgpolicy.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORGPOLICY_MOCKS_MOCK_ORG_POLICY_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORGPOLICY_MOCKS_MOCK_ORG_POLICY_CONNECTION_H - -#include "google/cloud/orgpolicy/org_policy_connection.h" -#include "google/cloud/orgpolicy/v2/mocks/mock_org_policy_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in orgpolicy_v2_mocks instead of the aliases -/// defined in this namespace. -namespace orgpolicy_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use orgpolicy_v2_mocks::MockOrgPolicyConnection directly. -using ::google::cloud::orgpolicy_v2_mocks::MockOrgPolicyConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace orgpolicy_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORGPOLICY_MOCKS_MOCK_ORG_POLICY_CONNECTION_H diff --git a/google/cloud/orgpolicy/org_policy_client.h b/google/cloud/orgpolicy/org_policy_client.h deleted file mode 100644 index 0fd05a8b2bba6..0000000000000 --- a/google/cloud/orgpolicy/org_policy_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/orgpolicy/v2/orgpolicy.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORGPOLICY_ORG_POLICY_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORGPOLICY_ORG_POLICY_CLIENT_H - -#include "google/cloud/orgpolicy/org_policy_connection.h" -#include "google/cloud/orgpolicy/v2/org_policy_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in orgpolicy_v2 instead of the aliases defined in -/// this namespace. -namespace orgpolicy { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use orgpolicy_v2::OrgPolicyClient directly. -using ::google::cloud::orgpolicy_v2::OrgPolicyClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace orgpolicy -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORGPOLICY_ORG_POLICY_CLIENT_H diff --git a/google/cloud/orgpolicy/org_policy_connection.h b/google/cloud/orgpolicy/org_policy_connection.h deleted file mode 100644 index d44f5fb92354b..0000000000000 --- a/google/cloud/orgpolicy/org_policy_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/orgpolicy/v2/orgpolicy.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORGPOLICY_ORG_POLICY_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORGPOLICY_ORG_POLICY_CONNECTION_H - -#include "google/cloud/orgpolicy/org_policy_connection_idempotency_policy.h" -#include "google/cloud/orgpolicy/v2/org_policy_connection.h" - -namespace google { -namespace cloud { -namespace orgpolicy { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use orgpolicy_v2::MakeOrgPolicyConnection directly. -using ::google::cloud::orgpolicy_v2::MakeOrgPolicyConnection; - -/// @deprecated Use orgpolicy_v2::OrgPolicyConnection directly. -using ::google::cloud::orgpolicy_v2::OrgPolicyConnection; - -/// @deprecated Use orgpolicy_v2::OrgPolicyLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::orgpolicy_v2::OrgPolicyLimitedErrorCountRetryPolicy; - -/// @deprecated Use orgpolicy_v2::OrgPolicyLimitedTimeRetryPolicy directly. -using ::google::cloud::orgpolicy_v2::OrgPolicyLimitedTimeRetryPolicy; - -/// @deprecated Use orgpolicy_v2::OrgPolicyRetryPolicy directly. -using ::google::cloud::orgpolicy_v2::OrgPolicyRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace orgpolicy -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORGPOLICY_ORG_POLICY_CONNECTION_H diff --git a/google/cloud/orgpolicy/org_policy_connection_idempotency_policy.h b/google/cloud/orgpolicy/org_policy_connection_idempotency_policy.h deleted file mode 100644 index 34bfda72eef23..0000000000000 --- a/google/cloud/orgpolicy/org_policy_connection_idempotency_policy.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/orgpolicy/v2/orgpolicy.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORGPOLICY_ORG_POLICY_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORGPOLICY_ORG_POLICY_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/orgpolicy/v2/org_policy_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace orgpolicy { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// orgpolicy_v2::MakeDefaultOrgPolicyConnectionIdempotencyPolicy directly. -using ::google::cloud::orgpolicy_v2:: - MakeDefaultOrgPolicyConnectionIdempotencyPolicy; - -/// @deprecated Use orgpolicy_v2::OrgPolicyConnectionIdempotencyPolicy directly. -using ::google::cloud::orgpolicy_v2::OrgPolicyConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace orgpolicy -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORGPOLICY_ORG_POLICY_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/orgpolicy/org_policy_options.h b/google/cloud/orgpolicy/org_policy_options.h deleted file mode 100644 index b70d98abd5aea..0000000000000 --- a/google/cloud/orgpolicy/org_policy_options.h +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/orgpolicy/v2/orgpolicy.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORGPOLICY_ORG_POLICY_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORGPOLICY_ORG_POLICY_OPTIONS_H - -#include "google/cloud/orgpolicy/org_policy_connection.h" -#include "google/cloud/orgpolicy/org_policy_connection_idempotency_policy.h" -#include "google/cloud/orgpolicy/v2/org_policy_options.h" - -namespace google { -namespace cloud { -namespace orgpolicy { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use orgpolicy_v2::OrgPolicyBackoffPolicyOption directly. -using ::google::cloud::orgpolicy_v2::OrgPolicyBackoffPolicyOption; - -/// @deprecated Use orgpolicy_v2::OrgPolicyConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::orgpolicy_v2::OrgPolicyConnectionIdempotencyPolicyOption; - -/// @deprecated Use orgpolicy_v2::OrgPolicyPolicyOptionList directly. -using ::google::cloud::orgpolicy_v2::OrgPolicyPolicyOptionList; - -/// @deprecated Use orgpolicy_v2::OrgPolicyRetryPolicyOption directly. -using ::google::cloud::orgpolicy_v2::OrgPolicyRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace orgpolicy -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORGPOLICY_ORG_POLICY_OPTIONS_H diff --git a/google/cloud/orgpolicy/quickstart/.bazelrc b/google/cloud/orgpolicy/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/orgpolicy/quickstart/.bazelrc +++ b/google/cloud/orgpolicy/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/orgpolicy/quickstart/CMakeLists.txt b/google/cloud/orgpolicy/quickstart/CMakeLists.txt index 8c66fc1ee18b9..6c1b0ce6e560c 100644 --- a/google/cloud/orgpolicy/quickstart/CMakeLists.txt +++ b/google/cloud/orgpolicy/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Organization Policy API C++ client library from # a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-orgpolicy-quickstart CXX) find_package(google_cloud_cpp_orgpolicy REQUIRED) diff --git a/google/cloud/orgpolicy/v2/internal/org_policy_auth_decorator.cc b/google/cloud/orgpolicy/v2/internal/org_policy_auth_decorator.cc index 2a6d572c9932e..631ad86d0c588 100644 --- a/google/cloud/orgpolicy/v2/internal/org_policy_auth_decorator.cc +++ b/google/cloud/orgpolicy/v2/internal/org_policy_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/orgpolicy/v2/orgpolicy.proto #include "google/cloud/orgpolicy/v2/internal/org_policy_auth_decorator.h" -#include +#include "google/cloud/orgpolicy/v2/orgpolicy.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace orgpolicy_v2_internal { @@ -141,3 +144,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace orgpolicy_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/orgpolicy/v2/internal/org_policy_auth_decorator.h b/google/cloud/orgpolicy/v2/internal/org_policy_auth_decorator.h index bcde853b168c6..43f16a513e7fc 100644 --- a/google/cloud/orgpolicy/v2/internal/org_policy_auth_decorator.h +++ b/google/cloud/orgpolicy/v2/internal/org_policy_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace orgpolicy_v2_internal { @@ -109,4 +112,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORGPOLICY_V2_INTERNAL_ORG_POLICY_AUTH_DECORATOR_H diff --git a/google/cloud/orgpolicy/v2/internal/org_policy_logging_decorator.cc b/google/cloud/orgpolicy/v2/internal/org_policy_logging_decorator.cc index 54d3226c166c6..ab2668fa21d93 100644 --- a/google/cloud/orgpolicy/v2/internal/org_policy_logging_decorator.cc +++ b/google/cloud/orgpolicy/v2/internal/org_policy_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/orgpolicy/v2/orgpolicy.proto #include "google/cloud/orgpolicy/v2/internal/org_policy_logging_decorator.h" +#include "google/cloud/orgpolicy/v2/orgpolicy.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace orgpolicy_v2_internal { @@ -188,3 +191,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace orgpolicy_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/orgpolicy/v2/internal/org_policy_logging_decorator.h b/google/cloud/orgpolicy/v2/internal/org_policy_logging_decorator.h index c2c20c4708680..9d2c6ebbc2b63 100644 --- a/google/cloud/orgpolicy/v2/internal/org_policy_logging_decorator.h +++ b/google/cloud/orgpolicy/v2/internal/org_policy_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace orgpolicy_v2_internal { @@ -109,4 +112,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORGPOLICY_V2_INTERNAL_ORG_POLICY_LOGGING_DECORATOR_H diff --git a/google/cloud/orgpolicy/v2/internal/org_policy_metadata_decorator.cc b/google/cloud/orgpolicy/v2/internal/org_policy_metadata_decorator.cc index e8a5330dc76f2..70335c5c08ad1 100644 --- a/google/cloud/orgpolicy/v2/internal/org_policy_metadata_decorator.cc +++ b/google/cloud/orgpolicy/v2/internal/org_policy_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/orgpolicy/v2/orgpolicy.proto #include "google/cloud/orgpolicy/v2/internal/org_policy_metadata_decorator.h" +#include "google/cloud/orgpolicy/v2/orgpolicy.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace orgpolicy_v2_internal { @@ -170,3 +174,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace orgpolicy_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/orgpolicy/v2/internal/org_policy_metadata_decorator.h b/google/cloud/orgpolicy/v2/internal/org_policy_metadata_decorator.h index 04c4db82e7480..36b113cd6fcdc 100644 --- a/google/cloud/orgpolicy/v2/internal/org_policy_metadata_decorator.h +++ b/google/cloud/orgpolicy/v2/internal/org_policy_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace orgpolicy_v2_internal { @@ -114,4 +117,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORGPOLICY_V2_INTERNAL_ORG_POLICY_METADATA_DECORATOR_H diff --git a/google/cloud/orgpolicy/v2/internal/org_policy_option_defaults.cc b/google/cloud/orgpolicy/v2/internal/org_policy_option_defaults.cc index e6b6769159964..68109676f5a2b 100644 --- a/google/cloud/orgpolicy/v2/internal/org_policy_option_defaults.cc +++ b/google/cloud/orgpolicy/v2/internal/org_policy_option_defaults.cc @@ -40,7 +40,7 @@ Options OrgPolicyDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - orgpolicy_v2::OrgPolicyLimitedTimeRetryPolicy(std::chrono::minutes(30)) + orgpolicy_v2::OrgPolicyLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/orgpolicy/v2/internal/org_policy_stub.cc b/google/cloud/orgpolicy/v2/internal/org_policy_stub.cc index 1a91af573ca15..2ac2d7e08cf56 100644 --- a/google/cloud/orgpolicy/v2/internal/org_policy_stub.cc +++ b/google/cloud/orgpolicy/v2/internal/org_policy_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/orgpolicy/v2/orgpolicy.proto #include "google/cloud/orgpolicy/v2/internal/org_policy_stub.h" +#include "google/cloud/orgpolicy/v2/orgpolicy.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace orgpolicy_v2_internal { @@ -181,3 +184,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace orgpolicy_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/orgpolicy/v2/internal/org_policy_stub.h b/google/cloud/orgpolicy/v2/internal/org_policy_stub.h index c089d85dcf08e..7cb927c8f955d 100644 --- a/google/cloud/orgpolicy/v2/internal/org_policy_stub.h +++ b/google/cloud/orgpolicy/v2/internal/org_policy_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORGPOLICY_V2_INTERNAL_ORG_POLICY_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORGPOLICY_V2_INTERNAL_ORG_POLICY_STUB_H +#include "google/cloud/orgpolicy/v2/orgpolicy.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace orgpolicy_v2_internal { @@ -174,4 +177,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORGPOLICY_V2_INTERNAL_ORG_POLICY_STUB_H diff --git a/google/cloud/orgpolicy/v2/internal/org_policy_stub_factory.cc b/google/cloud/orgpolicy/v2/internal/org_policy_stub_factory.cc index be2ec41e8327b..bd665f5fe7b00 100644 --- a/google/cloud/orgpolicy/v2/internal/org_policy_stub_factory.cc +++ b/google/cloud/orgpolicy/v2/internal/org_policy_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/orgpolicy/v2/internal/org_policy_metadata_decorator.h" #include "google/cloud/orgpolicy/v2/internal/org_policy_stub.h" #include "google/cloud/orgpolicy/v2/internal/org_policy_tracing_stub.h" +#include "google/cloud/orgpolicy/v2/orgpolicy.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace orgpolicy_v2_internal { @@ -68,3 +71,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace orgpolicy_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/orgpolicy/v2/internal/org_policy_stub_factory.h b/google/cloud/orgpolicy/v2/internal/org_policy_stub_factory.h index 875017f87f385..609098f968ba4 100644 --- a/google/cloud/orgpolicy/v2/internal/org_policy_stub_factory.h +++ b/google/cloud/orgpolicy/v2/internal/org_policy_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace orgpolicy_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORGPOLICY_V2_INTERNAL_ORG_POLICY_STUB_FACTORY_H diff --git a/google/cloud/orgpolicy/v2/internal/org_policy_tracing_connection.cc b/google/cloud/orgpolicy/v2/internal/org_policy_tracing_connection.cc index e41a671d65162..d80ddd7530205 100644 --- a/google/cloud/orgpolicy/v2/internal/org_policy_tracing_connection.cc +++ b/google/cloud/orgpolicy/v2/internal/org_policy_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace orgpolicy_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - OrgPolicyTracingConnection::OrgPolicyTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -149,16 +147,12 @@ Status OrgPolicyTracingConnection::DeleteCustomConstraint( return internal::EndSpan(*span, child_->DeleteCustomConstraint(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeOrgPolicyTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/orgpolicy/v2/internal/org_policy_tracing_connection.h b/google/cloud/orgpolicy/v2/internal/org_policy_tracing_connection.h index 196b4ae011c9a..7f1a7a81deb62 100644 --- a/google/cloud/orgpolicy/v2/internal/org_policy_tracing_connection.h +++ b/google/cloud/orgpolicy/v2/internal/org_policy_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace orgpolicy_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class OrgPolicyTracingConnection : public orgpolicy_v2::OrgPolicyConnection { public: ~OrgPolicyTracingConnection() override = default; @@ -90,8 +88,6 @@ class OrgPolicyTracingConnection : public orgpolicy_v2::OrgPolicyConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/orgpolicy/v2/internal/org_policy_tracing_stub.cc b/google/cloud/orgpolicy/v2/internal/org_policy_tracing_stub.cc index 9bf09d7ea2887..7242575ef2d38 100644 --- a/google/cloud/orgpolicy/v2/internal/org_policy_tracing_stub.cc +++ b/google/cloud/orgpolicy/v2/internal/org_policy_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace orgpolicy_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - OrgPolicyTracingStub::OrgPolicyTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -178,18 +179,14 @@ Status OrgPolicyTracingStub::DeleteCustomConstraint( child_->DeleteCustomConstraint(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeOrgPolicyTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace orgpolicy_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/orgpolicy/v2/internal/org_policy_tracing_stub.h b/google/cloud/orgpolicy/v2/internal/org_policy_tracing_stub.h index 245dd5e51c597..d7e8604d490aa 100644 --- a/google/cloud/orgpolicy/v2/internal/org_policy_tracing_stub.h +++ b/google/cloud/orgpolicy/v2/internal/org_policy_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace orgpolicy_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class OrgPolicyTracingStub : public OrgPolicyStub { public: ~OrgPolicyTracingStub() override = default; @@ -105,8 +106,6 @@ class OrgPolicyTracingStub : public OrgPolicyStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -121,4 +120,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORGPOLICY_V2_INTERNAL_ORG_POLICY_TRACING_STUB_H diff --git a/google/cloud/orgpolicy/v2/org_policy_connection.h b/google/cloud/orgpolicy/v2/org_policy_connection.h index f6c52021ad106..906d72edea586 100644 --- a/google/cloud/orgpolicy/v2/org_policy_connection.h +++ b/google/cloud/orgpolicy/v2/org_policy_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/orgpolicy/v2/internal/org_policy_retry_traits.h" #include "google/cloud/orgpolicy/v2/org_policy_connection_idempotency_policy.h" +#include "google/cloud/orgpolicy/v2/orgpolicy.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/orgpolicy/v2/org_policy_connection_idempotency_policy.h b/google/cloud/orgpolicy/v2/org_policy_connection_idempotency_policy.h index 779e65c4bd0ae..2c9ece91ee114 100644 --- a/google/cloud/orgpolicy/v2/org_policy_connection_idempotency_policy.h +++ b/google/cloud/orgpolicy/v2/org_policy_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORGPOLICY_V2_ORG_POLICY_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_ORGPOLICY_V2_ORG_POLICY_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/orgpolicy/v2/orgpolicy.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/osconfig/BUILD.bazel b/google/cloud/osconfig/BUILD.bazel index 7e119ffd8ccf2..44e1d5b1d60c9 100644 --- a/google/cloud/osconfig/BUILD.bazel +++ b/google/cloud/osconfig/BUILD.bazel @@ -19,14 +19,13 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "agentendpoint/v1/", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/osconfig/agentendpoint/v1:agentendpoint_cc_grpc", - "@com_google_googleapis//google/cloud/osconfig/v1:osconfig_cc_grpc", + "@googleapis//google/cloud/osconfig/agentendpoint/v1:agentendpoint_cc_grpc", + "@googleapis//google/cloud/osconfig/v1:osconfig_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/osconfig/CMakeLists.txt b/google/cloud/osconfig/CMakeLists.txt index 6f11a155a5114..b5a7ec0f9cfd6 100644 --- a/google/cloud/osconfig/CMakeLists.txt +++ b/google/cloud/osconfig/CMakeLists.txt @@ -16,8 +16,8 @@ include(GoogleCloudCppLibrary) -google_cloud_cpp_add_gapic_library( - osconfig "OS Config API" SERVICE_DIRS "__EMPTY__" "agentendpoint/v1/" "v1/") +google_cloud_cpp_add_gapic_library(osconfig "OS Config API" + SERVICE_DIRS "agentendpoint/v1/" "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(osconfig_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/osconfig/agent_endpoint_client.h b/google/cloud/osconfig/agent_endpoint_client.h deleted file mode 100644 index efd8033172aa9..0000000000000 --- a/google/cloud/osconfig/agent_endpoint_client.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/osconfig/agentendpoint/v1/agentendpoint.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_AGENT_ENDPOINT_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_AGENT_ENDPOINT_CLIENT_H - -#include "google/cloud/osconfig/agent_endpoint_connection.h" -#include "google/cloud/osconfig/agentendpoint/v1/agent_endpoint_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in osconfig_agentendpoint_v1 instead of the aliases -/// defined in this namespace. -namespace osconfig { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use osconfig_agentendpoint_v1::AgentEndpointServiceClient -/// directly. -using ::google::cloud::osconfig_agentendpoint_v1::AgentEndpointServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace osconfig -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_AGENT_ENDPOINT_CLIENT_H diff --git a/google/cloud/osconfig/agent_endpoint_connection.h b/google/cloud/osconfig/agent_endpoint_connection.h deleted file mode 100644 index 94183d88a7a80..0000000000000 --- a/google/cloud/osconfig/agent_endpoint_connection.h +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/osconfig/agentendpoint/v1/agentendpoint.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_AGENT_ENDPOINT_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_AGENT_ENDPOINT_CONNECTION_H - -#include "google/cloud/osconfig/agent_endpoint_connection_idempotency_policy.h" -#include "google/cloud/osconfig/agentendpoint/v1/agent_endpoint_connection.h" - -namespace google { -namespace cloud { -namespace osconfig { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// osconfig_agentendpoint_v1::MakeAgentEndpointServiceConnection directly. -using ::google::cloud::osconfig_agentendpoint_v1:: - MakeAgentEndpointServiceConnection; - -/// @deprecated Use osconfig_agentendpoint_v1::AgentEndpointServiceConnection -/// directly. -using ::google::cloud::osconfig_agentendpoint_v1:: - AgentEndpointServiceConnection; - -/// @deprecated Use -/// osconfig_agentendpoint_v1::AgentEndpointServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::osconfig_agentendpoint_v1:: - AgentEndpointServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use -/// osconfig_agentendpoint_v1::AgentEndpointServiceLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::osconfig_agentendpoint_v1:: - AgentEndpointServiceLimitedTimeRetryPolicy; - -/// @deprecated Use osconfig_agentendpoint_v1::AgentEndpointServiceRetryPolicy -/// directly. -using ::google::cloud::osconfig_agentendpoint_v1:: - AgentEndpointServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace osconfig -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_AGENT_ENDPOINT_CONNECTION_H diff --git a/google/cloud/osconfig/agent_endpoint_connection_idempotency_policy.h b/google/cloud/osconfig/agent_endpoint_connection_idempotency_policy.h deleted file mode 100644 index 7f3d0d4292b29..0000000000000 --- a/google/cloud/osconfig/agent_endpoint_connection_idempotency_policy.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/osconfig/agentendpoint/v1/agentendpoint.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_AGENT_ENDPOINT_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_AGENT_ENDPOINT_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/osconfig/agentendpoint/v1/agent_endpoint_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace osconfig { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// osconfig_agentendpoint_v1::MakeDefaultAgentEndpointServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::osconfig_agentendpoint_v1:: - MakeDefaultAgentEndpointServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// osconfig_agentendpoint_v1::AgentEndpointServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::osconfig_agentendpoint_v1:: - AgentEndpointServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace osconfig -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_AGENT_ENDPOINT_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/osconfig/agent_endpoint_options.h b/google/cloud/osconfig/agent_endpoint_options.h deleted file mode 100644 index 042ac65af658c..0000000000000 --- a/google/cloud/osconfig/agent_endpoint_options.h +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/osconfig/agentendpoint/v1/agentendpoint.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_AGENT_ENDPOINT_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_AGENT_ENDPOINT_OPTIONS_H - -#include "google/cloud/osconfig/agent_endpoint_connection.h" -#include "google/cloud/osconfig/agent_endpoint_connection_idempotency_policy.h" -#include "google/cloud/osconfig/agentendpoint/v1/agent_endpoint_options.h" - -namespace google { -namespace cloud { -namespace osconfig { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// osconfig_agentendpoint_v1::AgentEndpointServiceBackoffPolicyOption directly. -using ::google::cloud::osconfig_agentendpoint_v1:: - AgentEndpointServiceBackoffPolicyOption; - -/// @deprecated Use -/// osconfig_agentendpoint_v1::AgentEndpointServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::osconfig_agentendpoint_v1:: - AgentEndpointServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use -/// osconfig_agentendpoint_v1::AgentEndpointServicePolicyOptionList directly. -using ::google::cloud::osconfig_agentendpoint_v1:: - AgentEndpointServicePolicyOptionList; - -/// @deprecated Use -/// osconfig_agentendpoint_v1::AgentEndpointServiceRetryPolicyOption directly. -using ::google::cloud::osconfig_agentendpoint_v1:: - AgentEndpointServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace osconfig -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_AGENT_ENDPOINT_OPTIONS_H diff --git a/google/cloud/osconfig/agentendpoint/v1/agent_endpoint_connection.h b/google/cloud/osconfig/agentendpoint/v1/agent_endpoint_connection.h index 64758060fb928..d1c5b01409ae2 100644 --- a/google/cloud/osconfig/agentendpoint/v1/agent_endpoint_connection.h +++ b/google/cloud/osconfig/agentendpoint/v1/agent_endpoint_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_AGENTENDPOINT_V1_AGENT_ENDPOINT_CONNECTION_H #include "google/cloud/osconfig/agentendpoint/v1/agent_endpoint_connection_idempotency_policy.h" +#include "google/cloud/osconfig/agentendpoint/v1/agentendpoint.pb.h" #include "google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/osconfig/agentendpoint/v1/agent_endpoint_connection_idempotency_policy.h b/google/cloud/osconfig/agentendpoint/v1/agent_endpoint_connection_idempotency_policy.h index 69abae576454d..b99cd9ae59555 100644 --- a/google/cloud/osconfig/agentendpoint/v1/agent_endpoint_connection_idempotency_policy.h +++ b/google/cloud/osconfig/agentendpoint/v1/agent_endpoint_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_AGENTENDPOINT_V1_AGENT_ENDPOINT_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_AGENTENDPOINT_V1_AGENT_ENDPOINT_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/osconfig/agentendpoint/v1/agentendpoint.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_auth_decorator.cc b/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_auth_decorator.cc index 363c78071b381..6535e5bea9547 100644 --- a/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_auth_decorator.cc +++ b/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/osconfig/agentendpoint/v1/agentendpoint.proto #include "google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_auth_decorator.h" -#include +#include "google/cloud/osconfig/agentendpoint/v1/agentendpoint.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_agentendpoint_v1_internal { @@ -110,3 +113,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace osconfig_agentendpoint_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_auth_decorator.h b/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_auth_decorator.h index 5f7b985f53541..993c39db53306 100644 --- a/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_auth_decorator.h +++ b/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_agentendpoint_v1_internal { @@ -92,4 +95,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_AGENTENDPOINT_V1_INTERNAL_AGENT_ENDPOINT_AUTH_DECORATOR_H diff --git a/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_logging_decorator.cc b/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_logging_decorator.cc index 922a67a3fe113..65061366f9c70 100644 --- a/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_logging_decorator.cc +++ b/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_logging_decorator.cc @@ -17,15 +17,18 @@ // source: google/cloud/osconfig/agentendpoint/v1/agentendpoint.proto #include "google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_logging_decorator.h" +#include "google/cloud/osconfig/agentendpoint/v1/agentendpoint.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/internal/streaming_read_rpc_logging.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_agentendpoint_v1_internal { @@ -156,3 +159,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace osconfig_agentendpoint_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_logging_decorator.h b/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_logging_decorator.h index 2209bad320d2e..377aedd11d803 100644 --- a/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_logging_decorator.h +++ b/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_agentendpoint_v1_internal { @@ -93,4 +96,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_AGENTENDPOINT_V1_INTERNAL_AGENT_ENDPOINT_LOGGING_DECORATOR_H diff --git a/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_metadata_decorator.cc b/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_metadata_decorator.cc index c1fcb75bf37d2..da0502e564261 100644 --- a/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_metadata_decorator.cc +++ b/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/osconfig/agentendpoint/v1/agentendpoint.proto #include "google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_metadata_decorator.h" +#include "google/cloud/osconfig/agentendpoint/v1/agentendpoint.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_agentendpoint_v1_internal { @@ -126,3 +130,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace osconfig_agentendpoint_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_metadata_decorator.h b/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_metadata_decorator.h index e22253e9df5b6..e8afee306353e 100644 --- a/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_metadata_decorator.h +++ b/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_agentendpoint_v1_internal { @@ -98,4 +101,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_AGENTENDPOINT_V1_INTERNAL_AGENT_ENDPOINT_METADATA_DECORATOR_H diff --git a/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_option_defaults.cc b/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_option_defaults.cc index fed7bc39cedbb..4712075a30879 100644 --- a/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_option_defaults.cc +++ b/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_option_defaults.cc @@ -44,7 +44,7 @@ Options AgentEndpointServiceDefaultOptions(Options options) { options.set< osconfig_agentendpoint_v1::AgentEndpointServiceRetryPolicyOption>( osconfig_agentendpoint_v1::AgentEndpointServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_agentendpoint_v1_internal { @@ -129,3 +132,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace osconfig_agentendpoint_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_stub.h b/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_stub.h index 607ff10293311..36e0f2697c1c7 100644 --- a/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_stub.h +++ b/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_AGENTENDPOINT_V1_INTERNAL_AGENT_ENDPOINT_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_AGENTENDPOINT_V1_INTERNAL_AGENT_ENDPOINT_STUB_H +#include "google/cloud/osconfig/agentendpoint/v1/agentendpoint.grpc.pb.h" #include "google/cloud/internal/streaming_read_rpc.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_agentendpoint_v1_internal { @@ -147,4 +150,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_AGENTENDPOINT_V1_INTERNAL_AGENT_ENDPOINT_STUB_H diff --git a/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_stub_factory.cc b/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_stub_factory.cc index 6774affbd4e41..fb613c8f7b61d 100644 --- a/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_stub_factory.cc +++ b/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/osconfig/agentendpoint/v1/agentendpoint.proto #include "google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_stub_factory.h" +#include "google/cloud/osconfig/agentendpoint/v1/agentendpoint.grpc.pb.h" #include "google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_auth_decorator.h" #include "google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_logging_decorator.h" #include "google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_metadata_decorator.h" @@ -28,10 +29,12 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_agentendpoint_v1_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace osconfig_agentendpoint_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_stub_factory.h b/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_stub_factory.h index f7841e9100efb..ede06caada14b 100644 --- a/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_stub_factory.h +++ b/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_agentendpoint_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_AGENTENDPOINT_V1_INTERNAL_AGENT_ENDPOINT_STUB_FACTORY_H diff --git a/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_tracing_connection.cc b/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_tracing_connection.cc index e437ec7361f65..36b92253d2b9b 100644 --- a/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_tracing_connection.cc +++ b/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace osconfig_agentendpoint_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AgentEndpointServiceTracingConnection::AgentEndpointServiceTracingConnection( std::shared_ptr child) @@ -114,18 +112,14 @@ AgentEndpointServiceTracingConnection::ReportVmInventory( return internal::EndSpan(*span, child_->ReportVmInventory(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAgentEndpointServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_tracing_connection.h b/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_tracing_connection.h index 10de8ec774555..2fc1eede57045 100644 --- a/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_tracing_connection.h +++ b/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace osconfig_agentendpoint_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AgentEndpointServiceTracingConnection : public osconfig_agentendpoint_v1::AgentEndpointServiceConnection { public: @@ -82,8 +80,6 @@ class AgentEndpointServiceTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_tracing_stub.cc b/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_tracing_stub.cc index 2841bfb00a6df..2d312841ad98c 100644 --- a/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_tracing_stub.cc +++ b/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_tracing_stub.cc @@ -22,13 +22,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_agentendpoint_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AgentEndpointServiceTracingStub::AgentEndpointServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -136,18 +137,14 @@ AgentEndpointServiceTracingStub::ReportVmInventory( context, *span, child_->ReportVmInventory(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAgentEndpointServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace osconfig_agentendpoint_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_tracing_stub.h b/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_tracing_stub.h index edb2a02461bd4..dda29bce331f5 100644 --- a/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_tracing_stub.h +++ b/google/cloud/osconfig/agentendpoint/v1/internal/agent_endpoint_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_agentendpoint_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AgentEndpointServiceTracingStub : public AgentEndpointServiceStub { public: ~AgentEndpointServiceTracingStub() override = default; @@ -89,8 +90,6 @@ class AgentEndpointServiceTracingStub : public AgentEndpointServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -105,4 +104,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_AGENTENDPOINT_V1_INTERNAL_AGENT_ENDPOINT_TRACING_STUB_H diff --git a/google/cloud/osconfig/mocks/mock_agent_endpoint_connection.h b/google/cloud/osconfig/mocks/mock_agent_endpoint_connection.h deleted file mode 100644 index 5857d67310593..0000000000000 --- a/google/cloud/osconfig/mocks/mock_agent_endpoint_connection.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/osconfig/agentendpoint/v1/agentendpoint.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_MOCKS_MOCK_AGENT_ENDPOINT_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_MOCKS_MOCK_AGENT_ENDPOINT_CONNECTION_H - -#include "google/cloud/osconfig/agent_endpoint_connection.h" -#include "google/cloud/osconfig/agentendpoint/v1/mocks/mock_agent_endpoint_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in osconfig_agentendpoint_v1_mocks instead of the aliases -/// defined in this namespace. -namespace osconfig_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// osconfig_agentendpoint_v1_mocks::MockAgentEndpointServiceConnection -/// directly. -using ::google::cloud::osconfig_agentendpoint_v1_mocks:: - MockAgentEndpointServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace osconfig_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_MOCKS_MOCK_AGENT_ENDPOINT_CONNECTION_H diff --git a/google/cloud/osconfig/mocks/mock_os_config_connection.h b/google/cloud/osconfig/mocks/mock_os_config_connection.h deleted file mode 100644 index 787a20b03dde5..0000000000000 --- a/google/cloud/osconfig/mocks/mock_os_config_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/osconfig/v1/osconfig_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_MOCKS_MOCK_OS_CONFIG_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_MOCKS_MOCK_OS_CONFIG_CONNECTION_H - -#include "google/cloud/osconfig/os_config_connection.h" -#include "google/cloud/osconfig/v1/mocks/mock_os_config_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in osconfig_v1_mocks instead of the aliases -/// defined in this namespace. -namespace osconfig_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use osconfig_v1_mocks::MockOsConfigServiceConnection directly. -using ::google::cloud::osconfig_v1_mocks::MockOsConfigServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace osconfig_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_MOCKS_MOCK_OS_CONFIG_CONNECTION_H diff --git a/google/cloud/osconfig/os_config_client.h b/google/cloud/osconfig/os_config_client.h deleted file mode 100644 index 1ed7ff8388434..0000000000000 --- a/google/cloud/osconfig/os_config_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/osconfig/v1/osconfig_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_OS_CONFIG_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_OS_CONFIG_CLIENT_H - -#include "google/cloud/osconfig/os_config_connection.h" -#include "google/cloud/osconfig/v1/os_config_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in osconfig_v1 instead of the aliases defined in -/// this namespace. -namespace osconfig { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use osconfig_v1::OsConfigServiceClient directly. -using ::google::cloud::osconfig_v1::OsConfigServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace osconfig -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_OS_CONFIG_CLIENT_H diff --git a/google/cloud/osconfig/os_config_connection.h b/google/cloud/osconfig/os_config_connection.h deleted file mode 100644 index 54ed6627f74e3..0000000000000 --- a/google/cloud/osconfig/os_config_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/osconfig/v1/osconfig_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_OS_CONFIG_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_OS_CONFIG_CONNECTION_H - -#include "google/cloud/osconfig/os_config_connection_idempotency_policy.h" -#include "google/cloud/osconfig/v1/os_config_connection.h" - -namespace google { -namespace cloud { -namespace osconfig { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use osconfig_v1::MakeOsConfigServiceConnection directly. -using ::google::cloud::osconfig_v1::MakeOsConfigServiceConnection; - -/// @deprecated Use osconfig_v1::OsConfigServiceConnection directly. -using ::google::cloud::osconfig_v1::OsConfigServiceConnection; - -/// @deprecated Use osconfig_v1::OsConfigServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::osconfig_v1::OsConfigServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use osconfig_v1::OsConfigServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::osconfig_v1::OsConfigServiceLimitedTimeRetryPolicy; - -/// @deprecated Use osconfig_v1::OsConfigServiceRetryPolicy directly. -using ::google::cloud::osconfig_v1::OsConfigServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace osconfig -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_OS_CONFIG_CONNECTION_H diff --git a/google/cloud/osconfig/os_config_connection_idempotency_policy.h b/google/cloud/osconfig/os_config_connection_idempotency_policy.h deleted file mode 100644 index 00addb807efc9..0000000000000 --- a/google/cloud/osconfig/os_config_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/osconfig/v1/osconfig_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_OS_CONFIG_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_OS_CONFIG_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/osconfig/v1/os_config_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace osconfig { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// osconfig_v1::MakeDefaultOsConfigServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::osconfig_v1:: - MakeDefaultOsConfigServiceConnectionIdempotencyPolicy; - -/// @deprecated Use osconfig_v1::OsConfigServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::osconfig_v1::OsConfigServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace osconfig -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_OS_CONFIG_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/osconfig/os_config_options.h b/google/cloud/osconfig/os_config_options.h deleted file mode 100644 index 1365ea86fdbf5..0000000000000 --- a/google/cloud/osconfig/os_config_options.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/osconfig/v1/osconfig_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_OS_CONFIG_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_OS_CONFIG_OPTIONS_H - -#include "google/cloud/osconfig/os_config_connection.h" -#include "google/cloud/osconfig/os_config_connection_idempotency_policy.h" -#include "google/cloud/osconfig/v1/os_config_options.h" - -namespace google { -namespace cloud { -namespace osconfig { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use osconfig_v1::OsConfigServiceBackoffPolicyOption directly. -using ::google::cloud::osconfig_v1::OsConfigServiceBackoffPolicyOption; - -/// @deprecated Use -/// osconfig_v1::OsConfigServiceConnectionIdempotencyPolicyOption directly. -using ::google::cloud::osconfig_v1:: - OsConfigServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use osconfig_v1::OsConfigServicePolicyOptionList directly. -using ::google::cloud::osconfig_v1::OsConfigServicePolicyOptionList; - -/// @deprecated Use osconfig_v1::OsConfigServiceRetryPolicyOption directly. -using ::google::cloud::osconfig_v1::OsConfigServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace osconfig -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_OS_CONFIG_OPTIONS_H diff --git a/google/cloud/osconfig/quickstart/.bazelrc b/google/cloud/osconfig/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/osconfig/quickstart/.bazelrc +++ b/google/cloud/osconfig/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/osconfig/quickstart/CMakeLists.txt b/google/cloud/osconfig/quickstart/CMakeLists.txt index 773d2255a851a..00fbef0c3a5f8 100644 --- a/google/cloud/osconfig/quickstart/CMakeLists.txt +++ b/google/cloud/osconfig/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the OS Config API C++ client library from a larger # CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-osconfig-quickstart CXX) find_package(google_cloud_cpp_osconfig REQUIRED) diff --git a/google/cloud/osconfig/v1/internal/os_config_auth_decorator.cc b/google/cloud/osconfig/v1/internal/os_config_auth_decorator.cc index c53f5d84a5e07..4b042457d9d99 100644 --- a/google/cloud/osconfig/v1/internal/os_config_auth_decorator.cc +++ b/google/cloud/osconfig/v1/internal/os_config_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/osconfig/v1/osconfig_service.proto #include "google/cloud/osconfig/v1/internal/os_config_auth_decorator.h" -#include +#include "google/cloud/osconfig/v1/osconfig_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_v1_internal { @@ -143,3 +146,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace osconfig_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/osconfig/v1/internal/os_config_auth_decorator.h b/google/cloud/osconfig/v1/internal/os_config_auth_decorator.h index cdd87f63a5e72..ddae441a76311 100644 --- a/google/cloud/osconfig/v1/internal/os_config_auth_decorator.h +++ b/google/cloud/osconfig/v1/internal/os_config_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_v1_internal { @@ -109,4 +112,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_V1_INTERNAL_OS_CONFIG_AUTH_DECORATOR_H diff --git a/google/cloud/osconfig/v1/internal/os_config_logging_decorator.cc b/google/cloud/osconfig/v1/internal/os_config_logging_decorator.cc index 422bbd77dd0bc..3a15ca687032c 100644 --- a/google/cloud/osconfig/v1/internal/os_config_logging_decorator.cc +++ b/google/cloud/osconfig/v1/internal/os_config_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/osconfig/v1/osconfig_service.proto #include "google/cloud/osconfig/v1/internal/os_config_logging_decorator.h" +#include "google/cloud/osconfig/v1/osconfig_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_v1_internal { @@ -194,3 +197,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace osconfig_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/osconfig/v1/internal/os_config_logging_decorator.h b/google/cloud/osconfig/v1/internal/os_config_logging_decorator.h index c9dbe5f501afa..89e9fe7c5fecf 100644 --- a/google/cloud/osconfig/v1/internal/os_config_logging_decorator.h +++ b/google/cloud/osconfig/v1/internal/os_config_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_v1_internal { @@ -109,4 +112,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_V1_INTERNAL_OS_CONFIG_LOGGING_DECORATOR_H diff --git a/google/cloud/osconfig/v1/internal/os_config_metadata_decorator.cc b/google/cloud/osconfig/v1/internal/os_config_metadata_decorator.cc index 10a01e4680942..c29d257df3231 100644 --- a/google/cloud/osconfig/v1/internal/os_config_metadata_decorator.cc +++ b/google/cloud/osconfig/v1/internal/os_config_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/osconfig/v1/osconfig_service.proto #include "google/cloud/osconfig/v1/internal/os_config_metadata_decorator.h" +#include "google/cloud/osconfig/v1/osconfig_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_v1_internal { @@ -171,3 +175,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace osconfig_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/osconfig/v1/internal/os_config_metadata_decorator.h b/google/cloud/osconfig/v1/internal/os_config_metadata_decorator.h index 1257212edec18..3b462c565ba79 100644 --- a/google/cloud/osconfig/v1/internal/os_config_metadata_decorator.h +++ b/google/cloud/osconfig/v1/internal/os_config_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_v1_internal { @@ -115,4 +118,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_V1_INTERNAL_OS_CONFIG_METADATA_DECORATOR_H diff --git a/google/cloud/osconfig/v1/internal/os_config_option_defaults.cc b/google/cloud/osconfig/v1/internal/os_config_option_defaults.cc index de6905962bb55..9956120ec14d6 100644 --- a/google/cloud/osconfig/v1/internal/os_config_option_defaults.cc +++ b/google/cloud/osconfig/v1/internal/os_config_option_defaults.cc @@ -42,7 +42,7 @@ Options OsConfigServiceDefaultOptions(Options options) { if (!options.has()) { options.set( osconfig_v1::OsConfigServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/osconfig/v1/internal/os_config_stub.cc b/google/cloud/osconfig/v1/internal/os_config_stub.cc index 47a65a6cfe55a..e0b02460e065a 100644 --- a/google/cloud/osconfig/v1/internal/os_config_stub.cc +++ b/google/cloud/osconfig/v1/internal/os_config_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/osconfig/v1/osconfig_service.proto #include "google/cloud/osconfig/v1/internal/os_config_stub.h" +#include "google/cloud/osconfig/v1/osconfig_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_v1_internal { @@ -179,3 +182,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace osconfig_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/osconfig/v1/internal/os_config_stub.h b/google/cloud/osconfig/v1/internal/os_config_stub.h index 6a647b2b8e24d..6beec98404cfa 100644 --- a/google/cloud/osconfig/v1/internal/os_config_stub.h +++ b/google/cloud/osconfig/v1/internal/os_config_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_V1_INTERNAL_OS_CONFIG_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_V1_INTERNAL_OS_CONFIG_STUB_H +#include "google/cloud/osconfig/v1/osconfig_service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_v1_internal { @@ -180,4 +183,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_V1_INTERNAL_OS_CONFIG_STUB_H diff --git a/google/cloud/osconfig/v1/internal/os_config_stub_factory.cc b/google/cloud/osconfig/v1/internal/os_config_stub_factory.cc index 496336f622488..89dff21b6bd21 100644 --- a/google/cloud/osconfig/v1/internal/os_config_stub_factory.cc +++ b/google/cloud/osconfig/v1/internal/os_config_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/osconfig/v1/internal/os_config_metadata_decorator.h" #include "google/cloud/osconfig/v1/internal/os_config_stub.h" #include "google/cloud/osconfig/v1/internal/os_config_tracing_stub.h" +#include "google/cloud/osconfig/v1/osconfig_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_v1_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace osconfig_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/osconfig/v1/internal/os_config_stub_factory.h b/google/cloud/osconfig/v1/internal/os_config_stub_factory.h index 5a43d802f48d7..dd1b02afd90e1 100644 --- a/google/cloud/osconfig/v1/internal/os_config_stub_factory.h +++ b/google/cloud/osconfig/v1/internal/os_config_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_V1_INTERNAL_OS_CONFIG_STUB_FACTORY_H diff --git a/google/cloud/osconfig/v1/internal/os_config_tracing_connection.cc b/google/cloud/osconfig/v1/internal/os_config_tracing_connection.cc index 168ea2e62d9ff..4e31ef7667433 100644 --- a/google/cloud/osconfig/v1/internal/os_config_tracing_connection.cc +++ b/google/cloud/osconfig/v1/internal/os_config_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace osconfig_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - OsConfigServiceTracingConnection::OsConfigServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -148,16 +146,12 @@ OsConfigServiceTracingConnection::ResumePatchDeployment( return internal::EndSpan(*span, child_->ResumePatchDeployment(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeOsConfigServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/osconfig/v1/internal/os_config_tracing_connection.h b/google/cloud/osconfig/v1/internal/os_config_tracing_connection.h index 61353e6599ad2..33b4630405a29 100644 --- a/google/cloud/osconfig/v1/internal/os_config_tracing_connection.h +++ b/google/cloud/osconfig/v1/internal/os_config_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace osconfig_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class OsConfigServiceTracingConnection : public osconfig_v1::OsConfigServiceConnection { public: @@ -91,8 +89,6 @@ class OsConfigServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/osconfig/v1/internal/os_config_tracing_stub.cc b/google/cloud/osconfig/v1/internal/os_config_tracing_stub.cc index 0b870ca4dd953..14f2c82512641 100644 --- a/google/cloud/osconfig/v1/internal/os_config_tracing_stub.cc +++ b/google/cloud/osconfig/v1/internal/os_config_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - OsConfigServiceTracingStub::OsConfigServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -177,18 +178,14 @@ OsConfigServiceTracingStub::ResumePatchDeployment( context, *span, child_->ResumePatchDeployment(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeOsConfigServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace osconfig_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/osconfig/v1/internal/os_config_tracing_stub.h b/google/cloud/osconfig/v1/internal/os_config_tracing_stub.h index 245030ad4e253..034442f8b56fe 100644 --- a/google/cloud/osconfig/v1/internal/os_config_tracing_stub.h +++ b/google/cloud/osconfig/v1/internal/os_config_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class OsConfigServiceTracingStub : public OsConfigServiceStub { public: ~OsConfigServiceTracingStub() override = default; @@ -106,8 +107,6 @@ class OsConfigServiceTracingStub : public OsConfigServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -122,4 +121,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_V1_INTERNAL_OS_CONFIG_TRACING_STUB_H diff --git a/google/cloud/osconfig/v1/internal/os_config_zonal_auth_decorator.cc b/google/cloud/osconfig/v1/internal/os_config_zonal_auth_decorator.cc index a6e2755ce6942..ad3068af6e9c6 100644 --- a/google/cloud/osconfig/v1/internal/os_config_zonal_auth_decorator.cc +++ b/google/cloud/osconfig/v1/internal/os_config_zonal_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/osconfig/v1/osconfig_zonal_service.proto #include "google/cloud/osconfig/v1/internal/os_config_zonal_auth_decorator.h" -#include +#include "google/cloud/osconfig/v1/osconfig_zonal_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_v1_internal { @@ -250,3 +253,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace osconfig_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/osconfig/v1/internal/os_config_zonal_auth_decorator.h b/google/cloud/osconfig/v1/internal/os_config_zonal_auth_decorator.h index c7f35361bbd70..ef21308b58726 100644 --- a/google/cloud/osconfig/v1/internal/os_config_zonal_auth_decorator.h +++ b/google/cloud/osconfig/v1/internal/os_config_zonal_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/osconfig/v1/internal/os_config_zonal_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_v1_internal { @@ -151,4 +154,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_V1_INTERNAL_OS_CONFIG_ZONAL_AUTH_DECORATOR_H diff --git a/google/cloud/osconfig/v1/internal/os_config_zonal_connection_impl.h b/google/cloud/osconfig/v1/internal/os_config_zonal_connection_impl.h index 0f545c10f1407..117173c5e5a8d 100644 --- a/google/cloud/osconfig/v1/internal/os_config_zonal_connection_impl.h +++ b/google/cloud/osconfig/v1/internal/os_config_zonal_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/osconfig/v1/internal/os_config_zonal_logging_decorator.cc b/google/cloud/osconfig/v1/internal/os_config_zonal_logging_decorator.cc index 175cb361bf851..8ce605b17045d 100644 --- a/google/cloud/osconfig/v1/internal/os_config_zonal_logging_decorator.cc +++ b/google/cloud/osconfig/v1/internal/os_config_zonal_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/osconfig/v1/osconfig_zonal_service.proto #include "google/cloud/osconfig/v1/internal/os_config_zonal_logging_decorator.h" +#include "google/cloud/osconfig/v1/osconfig_zonal_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_v1_internal { @@ -299,3 +302,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace osconfig_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/osconfig/v1/internal/os_config_zonal_logging_decorator.h b/google/cloud/osconfig/v1/internal/os_config_zonal_logging_decorator.h index df2f17014f766..6022eae7dacc4 100644 --- a/google/cloud/osconfig/v1/internal/os_config_zonal_logging_decorator.h +++ b/google/cloud/osconfig/v1/internal/os_config_zonal_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/osconfig/v1/internal/os_config_zonal_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_v1_internal { @@ -151,4 +154,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_V1_INTERNAL_OS_CONFIG_ZONAL_LOGGING_DECORATOR_H diff --git a/google/cloud/osconfig/v1/internal/os_config_zonal_metadata_decorator.cc b/google/cloud/osconfig/v1/internal/os_config_zonal_metadata_decorator.cc index 55ac47115b738..6642c11c3c424 100644 --- a/google/cloud/osconfig/v1/internal/os_config_zonal_metadata_decorator.cc +++ b/google/cloud/osconfig/v1/internal/os_config_zonal_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/osconfig/v1/osconfig_zonal_service.proto #include "google/cloud/osconfig/v1/internal/os_config_zonal_metadata_decorator.h" +#include "google/cloud/osconfig/v1/osconfig_zonal_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_v1_internal { @@ -243,3 +247,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace osconfig_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/osconfig/v1/internal/os_config_zonal_metadata_decorator.h b/google/cloud/osconfig/v1/internal/os_config_zonal_metadata_decorator.h index b2bf948eb6462..a347a59c0b09d 100644 --- a/google/cloud/osconfig/v1/internal/os_config_zonal_metadata_decorator.h +++ b/google/cloud/osconfig/v1/internal/os_config_zonal_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/osconfig/v1/internal/os_config_zonal_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_v1_internal { @@ -157,4 +160,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_V1_INTERNAL_OS_CONFIG_ZONAL_METADATA_DECORATOR_H diff --git a/google/cloud/osconfig/v1/internal/os_config_zonal_option_defaults.cc b/google/cloud/osconfig/v1/internal/os_config_zonal_option_defaults.cc index 815dde277ba8f..292262712f3ea 100644 --- a/google/cloud/osconfig/v1/internal/os_config_zonal_option_defaults.cc +++ b/google/cloud/osconfig/v1/internal/os_config_zonal_option_defaults.cc @@ -42,7 +42,7 @@ Options OsConfigZonalServiceDefaultOptions(Options options) { if (!options.has()) { options.set( osconfig_v1::OsConfigZonalServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/osconfig/v1/internal/os_config_zonal_stub.cc b/google/cloud/osconfig/v1/internal/os_config_zonal_stub.cc index 741676222f571..b2dc378c99c3f 100644 --- a/google/cloud/osconfig/v1/internal/os_config_zonal_stub.cc +++ b/google/cloud/osconfig/v1/internal/os_config_zonal_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/osconfig/v1/osconfig_zonal_service.proto #include "google/cloud/osconfig/v1/internal/os_config_zonal_stub.h" +#include "google/cloud/osconfig/v1/osconfig_zonal_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_v1_internal { @@ -295,3 +298,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace osconfig_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/osconfig/v1/internal/os_config_zonal_stub.h b/google/cloud/osconfig/v1/internal/os_config_zonal_stub.h index 66f2c896423dd..9822c4e76b426 100644 --- a/google/cloud/osconfig/v1/internal/os_config_zonal_stub.h +++ b/google/cloud/osconfig/v1/internal/os_config_zonal_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_V1_INTERNAL_OS_CONFIG_ZONAL_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_V1_INTERNAL_OS_CONFIG_ZONAL_STUB_H +#include "google/cloud/osconfig/v1/osconfig_zonal_service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_v1_internal { @@ -270,4 +273,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_V1_INTERNAL_OS_CONFIG_ZONAL_STUB_H diff --git a/google/cloud/osconfig/v1/internal/os_config_zonal_stub_factory.cc b/google/cloud/osconfig/v1/internal/os_config_zonal_stub_factory.cc index b677224d56a6c..9d9710a7278b0 100644 --- a/google/cloud/osconfig/v1/internal/os_config_zonal_stub_factory.cc +++ b/google/cloud/osconfig/v1/internal/os_config_zonal_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/osconfig/v1/internal/os_config_zonal_metadata_decorator.h" #include "google/cloud/osconfig/v1/internal/os_config_zonal_stub.h" #include "google/cloud/osconfig/v1/internal/os_config_zonal_tracing_stub.h" +#include "google/cloud/osconfig/v1/osconfig_zonal_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_v1_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace osconfig_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/osconfig/v1/internal/os_config_zonal_stub_factory.h b/google/cloud/osconfig/v1/internal/os_config_zonal_stub_factory.h index 5a276fbe9e9df..4c7197225a31a 100644 --- a/google/cloud/osconfig/v1/internal/os_config_zonal_stub_factory.h +++ b/google/cloud/osconfig/v1/internal/os_config_zonal_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_V1_INTERNAL_OS_CONFIG_ZONAL_STUB_FACTORY_H diff --git a/google/cloud/osconfig/v1/internal/os_config_zonal_tracing_connection.cc b/google/cloud/osconfig/v1/internal/os_config_zonal_tracing_connection.cc index aacb9fba014b2..660cfcdc5384c 100644 --- a/google/cloud/osconfig/v1/internal/os_config_zonal_tracing_connection.cc +++ b/google/cloud/osconfig/v1/internal/os_config_zonal_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace osconfig_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - OsConfigZonalServiceTracingConnection::OsConfigZonalServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -234,17 +232,13 @@ OsConfigZonalServiceTracingConnection::ListVulnerabilityReports( std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeOsConfigZonalServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/osconfig/v1/internal/os_config_zonal_tracing_connection.h b/google/cloud/osconfig/v1/internal/os_config_zonal_tracing_connection.h index e4d7227fee80e..3552204efe11a 100644 --- a/google/cloud/osconfig/v1/internal/os_config_zonal_tracing_connection.h +++ b/google/cloud/osconfig/v1/internal/os_config_zonal_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace osconfig_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class OsConfigZonalServiceTracingConnection : public osconfig_v1::OsConfigZonalServiceConnection { public: @@ -129,8 +127,6 @@ class OsConfigZonalServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/osconfig/v1/internal/os_config_zonal_tracing_stub.cc b/google/cloud/osconfig/v1/internal/os_config_zonal_tracing_stub.cc index 2e764a524414d..2eae4bafbdd9f 100644 --- a/google/cloud/osconfig/v1/internal/os_config_zonal_tracing_stub.cc +++ b/google/cloud/osconfig/v1/internal/os_config_zonal_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - OsConfigZonalServiceTracingStub::OsConfigZonalServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -281,18 +282,14 @@ future OsConfigZonalServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeOsConfigZonalServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace osconfig_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/osconfig/v1/internal/os_config_zonal_tracing_stub.h b/google/cloud/osconfig/v1/internal/os_config_zonal_tracing_stub.h index 2b5eb2f306c25..962c84d436c15 100644 --- a/google/cloud/osconfig/v1/internal/os_config_zonal_tracing_stub.h +++ b/google/cloud/osconfig/v1/internal/os_config_zonal_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace osconfig_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class OsConfigZonalServiceTracingStub : public OsConfigZonalServiceStub { public: ~OsConfigZonalServiceTracingStub() override = default; @@ -147,8 +148,6 @@ class OsConfigZonalServiceTracingStub : public OsConfigZonalServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -163,4 +162,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_V1_INTERNAL_OS_CONFIG_ZONAL_TRACING_STUB_H diff --git a/google/cloud/osconfig/v1/os_config_connection.h b/google/cloud/osconfig/v1/os_config_connection.h index ad2751fbed287..125bd6f56b135 100644 --- a/google/cloud/osconfig/v1/os_config_connection.h +++ b/google/cloud/osconfig/v1/os_config_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/osconfig/v1/internal/os_config_retry_traits.h" #include "google/cloud/osconfig/v1/os_config_connection_idempotency_policy.h" +#include "google/cloud/osconfig/v1/osconfig_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/osconfig/v1/os_config_connection_idempotency_policy.h b/google/cloud/osconfig/v1/os_config_connection_idempotency_policy.h index d05042bf3a0e7..89a538214b01e 100644 --- a/google/cloud/osconfig/v1/os_config_connection_idempotency_policy.h +++ b/google/cloud/osconfig/v1/os_config_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_V1_OS_CONFIG_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_V1_OS_CONFIG_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/osconfig/v1/osconfig_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/osconfig/v1/os_config_zonal_client.h b/google/cloud/osconfig/v1/os_config_zonal_client.h index f19baca9cd1fc..f4e91c0c693e2 100644 --- a/google/cloud/osconfig/v1/os_config_zonal_client.h +++ b/google/cloud/osconfig/v1/os_config_zonal_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/osconfig/v1/os_config_zonal_connection.h b/google/cloud/osconfig/v1/os_config_zonal_connection.h index 90915160aa392..0b584de775804 100644 --- a/google/cloud/osconfig/v1/os_config_zonal_connection.h +++ b/google/cloud/osconfig/v1/os_config_zonal_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/osconfig/v1/internal/os_config_zonal_retry_traits.h" #include "google/cloud/osconfig/v1/os_config_zonal_connection_idempotency_policy.h" +#include "google/cloud/osconfig/v1/osconfig_zonal_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/osconfig/v1/os_config_zonal_connection_idempotency_policy.h b/google/cloud/osconfig/v1/os_config_zonal_connection_idempotency_policy.h index 512e3df51bd68..f9bb1aedcc737 100644 --- a/google/cloud/osconfig/v1/os_config_zonal_connection_idempotency_policy.h +++ b/google/cloud/osconfig/v1/os_config_zonal_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_V1_OS_CONFIG_ZONAL_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSCONFIG_V1_OS_CONFIG_ZONAL_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/osconfig/v1/osconfig_zonal_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/oslogin/BUILD.bazel b/google/cloud/oslogin/BUILD.bazel index cc1dca8a5510e..85f9ea1baa849 100644 --- a/google/cloud/oslogin/BUILD.bazel +++ b/google/cloud/oslogin/BUILD.bazel @@ -19,13 +19,12 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/oslogin/common:common_cc_grpc", - "@com_google_googleapis//google/cloud/oslogin/v1:oslogin_cc_grpc", + "@googleapis//google/cloud/oslogin/common:common_cc_grpc", + "@googleapis//google/cloud/oslogin/v1:oslogin_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/oslogin/CMakeLists.txt b/google/cloud/oslogin/CMakeLists.txt index db13a3013d920..1271d1d6b602f 100644 --- a/google/cloud/oslogin/CMakeLists.txt +++ b/google/cloud/oslogin/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(oslogin "Cloud OS Login API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(oslogin_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/oslogin/mocks/mock_os_login_connection.h b/google/cloud/oslogin/mocks/mock_os_login_connection.h deleted file mode 100644 index 6af7e32cb08aa..0000000000000 --- a/google/cloud/oslogin/mocks/mock_os_login_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/oslogin/v1/oslogin.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSLOGIN_MOCKS_MOCK_OS_LOGIN_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSLOGIN_MOCKS_MOCK_OS_LOGIN_CONNECTION_H - -#include "google/cloud/oslogin/os_login_connection.h" -#include "google/cloud/oslogin/v1/mocks/mock_os_login_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in oslogin_v1_mocks instead of the aliases -/// defined in this namespace. -namespace oslogin_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use oslogin_v1_mocks::MockOsLoginServiceConnection directly. -using ::google::cloud::oslogin_v1_mocks::MockOsLoginServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace oslogin_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSLOGIN_MOCKS_MOCK_OS_LOGIN_CONNECTION_H diff --git a/google/cloud/oslogin/os_login_client.h b/google/cloud/oslogin/os_login_client.h deleted file mode 100644 index 604e9435cfe0d..0000000000000 --- a/google/cloud/oslogin/os_login_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/oslogin/v1/oslogin.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSLOGIN_OS_LOGIN_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSLOGIN_OS_LOGIN_CLIENT_H - -#include "google/cloud/oslogin/os_login_connection.h" -#include "google/cloud/oslogin/v1/os_login_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in oslogin_v1 instead of the aliases defined in -/// this namespace. -namespace oslogin { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use oslogin_v1::OsLoginServiceClient directly. -using ::google::cloud::oslogin_v1::OsLoginServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace oslogin -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSLOGIN_OS_LOGIN_CLIENT_H diff --git a/google/cloud/oslogin/os_login_connection.h b/google/cloud/oslogin/os_login_connection.h deleted file mode 100644 index 3f3357e521978..0000000000000 --- a/google/cloud/oslogin/os_login_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/oslogin/v1/oslogin.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSLOGIN_OS_LOGIN_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSLOGIN_OS_LOGIN_CONNECTION_H - -#include "google/cloud/oslogin/os_login_connection_idempotency_policy.h" -#include "google/cloud/oslogin/v1/os_login_connection.h" - -namespace google { -namespace cloud { -namespace oslogin { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use oslogin_v1::MakeOsLoginServiceConnection directly. -using ::google::cloud::oslogin_v1::MakeOsLoginServiceConnection; - -/// @deprecated Use oslogin_v1::OsLoginServiceConnection directly. -using ::google::cloud::oslogin_v1::OsLoginServiceConnection; - -/// @deprecated Use oslogin_v1::OsLoginServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::oslogin_v1::OsLoginServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use oslogin_v1::OsLoginServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::oslogin_v1::OsLoginServiceLimitedTimeRetryPolicy; - -/// @deprecated Use oslogin_v1::OsLoginServiceRetryPolicy directly. -using ::google::cloud::oslogin_v1::OsLoginServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace oslogin -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSLOGIN_OS_LOGIN_CONNECTION_H diff --git a/google/cloud/oslogin/os_login_connection_idempotency_policy.h b/google/cloud/oslogin/os_login_connection_idempotency_policy.h deleted file mode 100644 index b7da81804504d..0000000000000 --- a/google/cloud/oslogin/os_login_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/oslogin/v1/oslogin.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSLOGIN_OS_LOGIN_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSLOGIN_OS_LOGIN_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/oslogin/v1/os_login_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace oslogin { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// oslogin_v1::MakeDefaultOsLoginServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::oslogin_v1:: - MakeDefaultOsLoginServiceConnectionIdempotencyPolicy; - -/// @deprecated Use oslogin_v1::OsLoginServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::oslogin_v1::OsLoginServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace oslogin -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSLOGIN_OS_LOGIN_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/oslogin/os_login_options.h b/google/cloud/oslogin/os_login_options.h deleted file mode 100644 index 011618f74761a..0000000000000 --- a/google/cloud/oslogin/os_login_options.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/oslogin/v1/oslogin.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSLOGIN_OS_LOGIN_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSLOGIN_OS_LOGIN_OPTIONS_H - -#include "google/cloud/oslogin/os_login_connection.h" -#include "google/cloud/oslogin/os_login_connection_idempotency_policy.h" -#include "google/cloud/oslogin/v1/os_login_options.h" - -namespace google { -namespace cloud { -namespace oslogin { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use oslogin_v1::OsLoginServiceBackoffPolicyOption directly. -using ::google::cloud::oslogin_v1::OsLoginServiceBackoffPolicyOption; - -/// @deprecated Use oslogin_v1::OsLoginServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::oslogin_v1:: - OsLoginServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use oslogin_v1::OsLoginServicePolicyOptionList directly. -using ::google::cloud::oslogin_v1::OsLoginServicePolicyOptionList; - -/// @deprecated Use oslogin_v1::OsLoginServiceRetryPolicyOption directly. -using ::google::cloud::oslogin_v1::OsLoginServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace oslogin -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSLOGIN_OS_LOGIN_OPTIONS_H diff --git a/google/cloud/oslogin/quickstart/.bazelrc b/google/cloud/oslogin/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/oslogin/quickstart/.bazelrc +++ b/google/cloud/oslogin/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/oslogin/quickstart/CMakeLists.txt b/google/cloud/oslogin/quickstart/CMakeLists.txt index faaba3935be1d..3fa40fdb32093 100644 --- a/google/cloud/oslogin/quickstart/CMakeLists.txt +++ b/google/cloud/oslogin/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud OS Login API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-oslogin-quickstart CXX) find_package(google_cloud_cpp_oslogin REQUIRED) diff --git a/google/cloud/oslogin/v1/internal/os_login_auth_decorator.cc b/google/cloud/oslogin/v1/internal/os_login_auth_decorator.cc index ab58fe59be4eb..6cc53f891d104 100644 --- a/google/cloud/oslogin/v1/internal/os_login_auth_decorator.cc +++ b/google/cloud/oslogin/v1/internal/os_login_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/oslogin/v1/oslogin.proto #include "google/cloud/oslogin/v1/internal/os_login_auth_decorator.h" -#include +#include "google/cloud/oslogin/v1/oslogin.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace oslogin_v1_internal { @@ -96,3 +99,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace oslogin_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/oslogin/v1/internal/os_login_auth_decorator.h b/google/cloud/oslogin/v1/internal/os_login_auth_decorator.h index 31c5bb453deb5..bdef10314d963 100644 --- a/google/cloud/oslogin/v1/internal/os_login_auth_decorator.h +++ b/google/cloud/oslogin/v1/internal/os_login_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace oslogin_v1_internal { @@ -84,4 +87,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSLOGIN_V1_INTERNAL_OS_LOGIN_AUTH_DECORATOR_H diff --git a/google/cloud/oslogin/v1/internal/os_login_logging_decorator.cc b/google/cloud/oslogin/v1/internal/os_login_logging_decorator.cc index d3ea1dc61ac08..28bf74e4a3cfe 100644 --- a/google/cloud/oslogin/v1/internal/os_login_logging_decorator.cc +++ b/google/cloud/oslogin/v1/internal/os_login_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/oslogin/v1/oslogin.proto #include "google/cloud/oslogin/v1/internal/os_login_logging_decorator.h" +#include "google/cloud/oslogin/v1/oslogin.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace oslogin_v1_internal { @@ -128,3 +131,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace oslogin_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/oslogin/v1/internal/os_login_logging_decorator.h b/google/cloud/oslogin/v1/internal/os_login_logging_decorator.h index ba9b6cb5ed56f..7d5b0ce47a7a0 100644 --- a/google/cloud/oslogin/v1/internal/os_login_logging_decorator.h +++ b/google/cloud/oslogin/v1/internal/os_login_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace oslogin_v1_internal { @@ -84,4 +87,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSLOGIN_V1_INTERNAL_OS_LOGIN_LOGGING_DECORATOR_H diff --git a/google/cloud/oslogin/v1/internal/os_login_metadata_decorator.cc b/google/cloud/oslogin/v1/internal/os_login_metadata_decorator.cc index 998260d1029d8..280fc74bd2d02 100644 --- a/google/cloud/oslogin/v1/internal/os_login_metadata_decorator.cc +++ b/google/cloud/oslogin/v1/internal/os_login_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/oslogin/v1/oslogin.proto #include "google/cloud/oslogin/v1/internal/os_login_metadata_decorator.h" +#include "google/cloud/oslogin/v1/oslogin.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace oslogin_v1_internal { @@ -122,3 +126,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace oslogin_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/oslogin/v1/internal/os_login_metadata_decorator.h b/google/cloud/oslogin/v1/internal/os_login_metadata_decorator.h index c893d59d0e73a..2c3b3f58f9313 100644 --- a/google/cloud/oslogin/v1/internal/os_login_metadata_decorator.h +++ b/google/cloud/oslogin/v1/internal/os_login_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace oslogin_v1_internal { @@ -89,4 +92,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSLOGIN_V1_INTERNAL_OS_LOGIN_METADATA_DECORATOR_H diff --git a/google/cloud/oslogin/v1/internal/os_login_option_defaults.cc b/google/cloud/oslogin/v1/internal/os_login_option_defaults.cc index 020b785ca5cd1..bd5b90bdbb97b 100644 --- a/google/cloud/oslogin/v1/internal/os_login_option_defaults.cc +++ b/google/cloud/oslogin/v1/internal/os_login_option_defaults.cc @@ -41,7 +41,7 @@ Options OsLoginServiceDefaultOptions(Options options) { if (!options.has()) { options.set( oslogin_v1::OsLoginServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/oslogin/v1/internal/os_login_stub.cc b/google/cloud/oslogin/v1/internal/os_login_stub.cc index 1194a94c4b69c..874d378956d5d 100644 --- a/google/cloud/oslogin/v1/internal/os_login_stub.cc +++ b/google/cloud/oslogin/v1/internal/os_login_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/oslogin/v1/oslogin.proto #include "google/cloud/oslogin/v1/internal/os_login_stub.h" +#include "google/cloud/oslogin/v1/oslogin.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace oslogin_v1_internal { @@ -116,3 +119,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace oslogin_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/oslogin/v1/internal/os_login_stub.h b/google/cloud/oslogin/v1/internal/os_login_stub.h index 23f4ca11fdf99..f1478aa69b224 100644 --- a/google/cloud/oslogin/v1/internal/os_login_stub.h +++ b/google/cloud/oslogin/v1/internal/os_login_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSLOGIN_V1_INTERNAL_OS_LOGIN_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSLOGIN_V1_INTERNAL_OS_LOGIN_STUB_H +#include "google/cloud/oslogin/v1/oslogin.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace oslogin_v1_internal { @@ -121,4 +124,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSLOGIN_V1_INTERNAL_OS_LOGIN_STUB_H diff --git a/google/cloud/oslogin/v1/internal/os_login_stub_factory.cc b/google/cloud/oslogin/v1/internal/os_login_stub_factory.cc index e1f81e9449447..f0af26f540ebd 100644 --- a/google/cloud/oslogin/v1/internal/os_login_stub_factory.cc +++ b/google/cloud/oslogin/v1/internal/os_login_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/oslogin/v1/internal/os_login_metadata_decorator.h" #include "google/cloud/oslogin/v1/internal/os_login_stub.h" #include "google/cloud/oslogin/v1/internal/os_login_tracing_stub.h" +#include "google/cloud/oslogin/v1/oslogin.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace oslogin_v1_internal { @@ -69,3 +72,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace oslogin_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/oslogin/v1/internal/os_login_stub_factory.h b/google/cloud/oslogin/v1/internal/os_login_stub_factory.h index c2382cd054e31..3e9490164cd16 100644 --- a/google/cloud/oslogin/v1/internal/os_login_stub_factory.h +++ b/google/cloud/oslogin/v1/internal/os_login_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace oslogin_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSLOGIN_V1_INTERNAL_OS_LOGIN_STUB_FACTORY_H diff --git a/google/cloud/oslogin/v1/internal/os_login_tracing_connection.cc b/google/cloud/oslogin/v1/internal/os_login_tracing_connection.cc index 5112fd95a19d8..896a3c23ea27c 100644 --- a/google/cloud/oslogin/v1/internal/os_login_tracing_connection.cc +++ b/google/cloud/oslogin/v1/internal/os_login_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace oslogin_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - OsLoginServiceTracingConnection::OsLoginServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -93,16 +91,12 @@ OsLoginServiceTracingConnection::UpdateSshPublicKey( return internal::EndSpan(*span, child_->UpdateSshPublicKey(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeOsLoginServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/oslogin/v1/internal/os_login_tracing_connection.h b/google/cloud/oslogin/v1/internal/os_login_tracing_connection.h index 27662d7a60bc7..e42043fa968ef 100644 --- a/google/cloud/oslogin/v1/internal/os_login_tracing_connection.h +++ b/google/cloud/oslogin/v1/internal/os_login_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace oslogin_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class OsLoginServiceTracingConnection : public oslogin_v1::OsLoginServiceConnection { public: @@ -73,8 +71,6 @@ class OsLoginServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/oslogin/v1/internal/os_login_tracing_stub.cc b/google/cloud/oslogin/v1/internal/os_login_tracing_stub.cc index 30a432b67bc6f..0e5110f27b6c8 100644 --- a/google/cloud/oslogin/v1/internal/os_login_tracing_stub.cc +++ b/google/cloud/oslogin/v1/internal/os_login_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace oslogin_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - OsLoginServiceTracingStub::OsLoginServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -114,18 +115,14 @@ OsLoginServiceTracingStub::UpdateSshPublicKey( context, *span, child_->UpdateSshPublicKey(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeOsLoginServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace oslogin_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/oslogin/v1/internal/os_login_tracing_stub.h b/google/cloud/oslogin/v1/internal/os_login_tracing_stub.h index 7078dec71949f..82e603c2439a0 100644 --- a/google/cloud/oslogin/v1/internal/os_login_tracing_stub.h +++ b/google/cloud/oslogin/v1/internal/os_login_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace oslogin_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class OsLoginServiceTracingStub : public OsLoginServiceStub { public: ~OsLoginServiceTracingStub() override = default; @@ -80,8 +81,6 @@ class OsLoginServiceTracingStub : public OsLoginServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -96,4 +95,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSLOGIN_V1_INTERNAL_OS_LOGIN_TRACING_STUB_H diff --git a/google/cloud/oslogin/v1/os_login_connection.h b/google/cloud/oslogin/v1/os_login_connection.h index daa53d7d945a3..f9553b921489d 100644 --- a/google/cloud/oslogin/v1/os_login_connection.h +++ b/google/cloud/oslogin/v1/os_login_connection.h @@ -21,12 +21,12 @@ #include "google/cloud/oslogin/v1/internal/os_login_retry_traits.h" #include "google/cloud/oslogin/v1/os_login_connection_idempotency_policy.h" +#include "google/cloud/oslogin/v1/oslogin.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/oslogin/v1/os_login_connection_idempotency_policy.h b/google/cloud/oslogin/v1/os_login_connection_idempotency_policy.h index 07687e3b18615..e30dadeb5bafe 100644 --- a/google/cloud/oslogin/v1/os_login_connection_idempotency_policy.h +++ b/google/cloud/oslogin/v1/os_login_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSLOGIN_V1_OS_LOGIN_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_OSLOGIN_V1_OS_LOGIN_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/oslogin/v1/oslogin.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/parallelstore/BUILD.bazel b/google/cloud/parallelstore/BUILD.bazel index 37007330e0294..38a1dd851820c 100644 --- a/google/cloud/parallelstore/BUILD.bazel +++ b/google/cloud/parallelstore/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/parallelstore/v1:parallelstore_cc_grpc", + "@googleapis//google/cloud/parallelstore/v1:parallelstore_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/parallelstore/quickstart/.bazelrc b/google/cloud/parallelstore/quickstart/.bazelrc index e676fbffccb52..d313ebed860ce 100644 --- a/google/cloud/parallelstore/quickstart/.bazelrc +++ b/google/cloud/parallelstore/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds diff --git a/google/cloud/parallelstore/quickstart/CMakeLists.txt b/google/cloud/parallelstore/quickstart/CMakeLists.txt index 5ee2f7c319a69..aa9ebf812dde7 100644 --- a/google/cloud/parallelstore/quickstart/CMakeLists.txt +++ b/google/cloud/parallelstore/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Parallelstore API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-parallelstore-quickstart CXX) find_package(google_cloud_cpp_parallelstore REQUIRED) diff --git a/google/cloud/parallelstore/v1/internal/parallelstore_auth_decorator.cc b/google/cloud/parallelstore/v1/internal/parallelstore_auth_decorator.cc index 10323642e0723..bba61f6e7256a 100644 --- a/google/cloud/parallelstore/v1/internal/parallelstore_auth_decorator.cc +++ b/google/cloud/parallelstore/v1/internal/parallelstore_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/parallelstore/v1/parallelstore.proto #include "google/cloud/parallelstore/v1/internal/parallelstore_auth_decorator.h" -#include +#include "google/cloud/parallelstore/v1/parallelstore.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace parallelstore_v1_internal { @@ -279,3 +282,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace parallelstore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/parallelstore/v1/internal/parallelstore_auth_decorator.h b/google/cloud/parallelstore/v1/internal/parallelstore_auth_decorator.h index 5362f8241c4b4..3b4342145f5aa 100644 --- a/google/cloud/parallelstore/v1/internal/parallelstore_auth_decorator.h +++ b/google/cloud/parallelstore/v1/internal/parallelstore_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/parallelstore/v1/internal/parallelstore_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace parallelstore_v1_internal { @@ -155,4 +158,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PARALLELSTORE_V1_INTERNAL_PARALLELSTORE_AUTH_DECORATOR_H diff --git a/google/cloud/parallelstore/v1/internal/parallelstore_connection_impl.h b/google/cloud/parallelstore/v1/internal/parallelstore_connection_impl.h index 67df74ce9b456..f463a6b73622e 100644 --- a/google/cloud/parallelstore/v1/internal/parallelstore_connection_impl.h +++ b/google/cloud/parallelstore/v1/internal/parallelstore_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/parallelstore/v1/internal/parallelstore_logging_decorator.cc b/google/cloud/parallelstore/v1/internal/parallelstore_logging_decorator.cc index 396c455d71842..f8b7ef0851e9f 100644 --- a/google/cloud/parallelstore/v1/internal/parallelstore_logging_decorator.cc +++ b/google/cloud/parallelstore/v1/internal/parallelstore_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/parallelstore/v1/parallelstore.proto #include "google/cloud/parallelstore/v1/internal/parallelstore_logging_decorator.h" +#include "google/cloud/parallelstore/v1/parallelstore.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace parallelstore_v1_internal { @@ -323,3 +326,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace parallelstore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/parallelstore/v1/internal/parallelstore_logging_decorator.h b/google/cloud/parallelstore/v1/internal/parallelstore_logging_decorator.h index c4c0be22ea79f..83f3672997f71 100644 --- a/google/cloud/parallelstore/v1/internal/parallelstore_logging_decorator.h +++ b/google/cloud/parallelstore/v1/internal/parallelstore_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/parallelstore/v1/internal/parallelstore_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace parallelstore_v1_internal { @@ -155,4 +158,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PARALLELSTORE_V1_INTERNAL_PARALLELSTORE_LOGGING_DECORATOR_H diff --git a/google/cloud/parallelstore/v1/internal/parallelstore_metadata_decorator.cc b/google/cloud/parallelstore/v1/internal/parallelstore_metadata_decorator.cc index c24cd8f183469..64de65ddbaaa7 100644 --- a/google/cloud/parallelstore/v1/internal/parallelstore_metadata_decorator.cc +++ b/google/cloud/parallelstore/v1/internal/parallelstore_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/parallelstore/v1/parallelstore.proto #include "google/cloud/parallelstore/v1/internal/parallelstore_metadata_decorator.h" +#include "google/cloud/parallelstore/v1/parallelstore.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace parallelstore_v1_internal { @@ -254,3 +258,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace parallelstore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/parallelstore/v1/internal/parallelstore_metadata_decorator.h b/google/cloud/parallelstore/v1/internal/parallelstore_metadata_decorator.h index 054af407012ac..e59b4c3d13e80 100644 --- a/google/cloud/parallelstore/v1/internal/parallelstore_metadata_decorator.h +++ b/google/cloud/parallelstore/v1/internal/parallelstore_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/parallelstore/v1/internal/parallelstore_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace parallelstore_v1_internal { @@ -160,4 +163,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PARALLELSTORE_V1_INTERNAL_PARALLELSTORE_METADATA_DECORATOR_H diff --git a/google/cloud/parallelstore/v1/internal/parallelstore_option_defaults.cc b/google/cloud/parallelstore/v1/internal/parallelstore_option_defaults.cc index da7e6e1d05bb7..a0bacffffad03 100644 --- a/google/cloud/parallelstore/v1/internal/parallelstore_option_defaults.cc +++ b/google/cloud/parallelstore/v1/internal/parallelstore_option_defaults.cc @@ -42,7 +42,7 @@ Options ParallelstoreDefaultOptions(Options options) { if (!options.has()) { options.set( parallelstore_v1::ParallelstoreLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/parallelstore/v1/internal/parallelstore_stub.cc b/google/cloud/parallelstore/v1/internal/parallelstore_stub.cc index 25fa1b96592bb..7f3a462256e34 100644 --- a/google/cloud/parallelstore/v1/internal/parallelstore_stub.cc +++ b/google/cloud/parallelstore/v1/internal/parallelstore_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/parallelstore/v1/parallelstore.proto #include "google/cloud/parallelstore/v1/internal/parallelstore_stub.h" +#include "google/cloud/parallelstore/v1/parallelstore.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace parallelstore_v1_internal { @@ -318,3 +321,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace parallelstore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/parallelstore/v1/internal/parallelstore_stub.h b/google/cloud/parallelstore/v1/internal/parallelstore_stub.h index 9a2c1b963d810..2d9a68eb1c001 100644 --- a/google/cloud/parallelstore/v1/internal/parallelstore_stub.h +++ b/google/cloud/parallelstore/v1/internal/parallelstore_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PARALLELSTORE_V1_INTERNAL_PARALLELSTORE_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PARALLELSTORE_V1_INTERNAL_PARALLELSTORE_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/parallelstore/v1/parallelstore.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace parallelstore_v1_internal { @@ -277,4 +280,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PARALLELSTORE_V1_INTERNAL_PARALLELSTORE_STUB_H diff --git a/google/cloud/parallelstore/v1/internal/parallelstore_stub_factory.cc b/google/cloud/parallelstore/v1/internal/parallelstore_stub_factory.cc index bbbd5d900fa7b..549fdbc3dae7e 100644 --- a/google/cloud/parallelstore/v1/internal/parallelstore_stub_factory.cc +++ b/google/cloud/parallelstore/v1/internal/parallelstore_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/parallelstore/v1/parallelstore.proto #include "google/cloud/parallelstore/v1/internal/parallelstore_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/parallelstore/v1/internal/parallelstore_auth_decorator.h" #include "google/cloud/parallelstore/v1/internal/parallelstore_logging_decorator.h" #include "google/cloud/parallelstore/v1/internal/parallelstore_metadata_decorator.h" #include "google/cloud/parallelstore/v1/internal/parallelstore_stub.h" #include "google/cloud/parallelstore/v1/internal/parallelstore_tracing_stub.h" +#include "google/cloud/parallelstore/v1/parallelstore.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace parallelstore_v1_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace parallelstore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/parallelstore/v1/internal/parallelstore_stub_factory.h b/google/cloud/parallelstore/v1/internal/parallelstore_stub_factory.h index 1592ac83c20f5..34a58f0870806 100644 --- a/google/cloud/parallelstore/v1/internal/parallelstore_stub_factory.h +++ b/google/cloud/parallelstore/v1/internal/parallelstore_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace parallelstore_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PARALLELSTORE_V1_INTERNAL_PARALLELSTORE_STUB_FACTORY_H diff --git a/google/cloud/parallelstore/v1/internal/parallelstore_tracing_connection.cc b/google/cloud/parallelstore/v1/internal/parallelstore_tracing_connection.cc index cdbbb7ab50c45..88eb156a80be4 100644 --- a/google/cloud/parallelstore/v1/internal/parallelstore_tracing_connection.cc +++ b/google/cloud/parallelstore/v1/internal/parallelstore_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace parallelstore_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ParallelstoreTracingConnection::ParallelstoreTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -253,16 +251,12 @@ Status ParallelstoreTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeParallelstoreTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/parallelstore/v1/internal/parallelstore_tracing_connection.h b/google/cloud/parallelstore/v1/internal/parallelstore_tracing_connection.h index 8411ae6926808..7dec9301f92ef 100644 --- a/google/cloud/parallelstore/v1/internal/parallelstore_tracing_connection.h +++ b/google/cloud/parallelstore/v1/internal/parallelstore_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace parallelstore_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ParallelstoreTracingConnection : public parallelstore_v1::ParallelstoreConnection { public: @@ -129,8 +127,6 @@ class ParallelstoreTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/parallelstore/v1/internal/parallelstore_tracing_stub.cc b/google/cloud/parallelstore/v1/internal/parallelstore_tracing_stub.cc index e8d5fb98533eb..8bdd8daedbdf5 100644 --- a/google/cloud/parallelstore/v1/internal/parallelstore_tracing_stub.cc +++ b/google/cloud/parallelstore/v1/internal/parallelstore_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace parallelstore_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ParallelstoreTracingStub::ParallelstoreTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -284,18 +285,14 @@ future ParallelstoreTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeParallelstoreTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace parallelstore_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/parallelstore/v1/internal/parallelstore_tracing_stub.h b/google/cloud/parallelstore/v1/internal/parallelstore_tracing_stub.h index f47cc865e2ceb..1078293ff1a89 100644 --- a/google/cloud/parallelstore/v1/internal/parallelstore_tracing_stub.h +++ b/google/cloud/parallelstore/v1/internal/parallelstore_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace parallelstore_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ParallelstoreTracingStub : public ParallelstoreStub { public: ~ParallelstoreTracingStub() override = default; @@ -150,8 +151,6 @@ class ParallelstoreTracingStub : public ParallelstoreStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -166,4 +165,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PARALLELSTORE_V1_INTERNAL_PARALLELSTORE_TRACING_STUB_H diff --git a/google/cloud/parallelstore/v1/parallelstore_client.h b/google/cloud/parallelstore/v1/parallelstore_client.h index d1a3d50b0ada5..85ec1d27e92a7 100644 --- a/google/cloud/parallelstore/v1/parallelstore_client.h +++ b/google/cloud/parallelstore/v1/parallelstore_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/parallelstore/v1/parallelstore_connection.h b/google/cloud/parallelstore/v1/parallelstore_connection.h index d6b0e08010e8e..952e66758afb9 100644 --- a/google/cloud/parallelstore/v1/parallelstore_connection.h +++ b/google/cloud/parallelstore/v1/parallelstore_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PARALLELSTORE_V1_PARALLELSTORE_CONNECTION_H #include "google/cloud/parallelstore/v1/internal/parallelstore_retry_traits.h" +#include "google/cloud/parallelstore/v1/parallelstore.pb.h" #include "google/cloud/parallelstore/v1/parallelstore_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/parallelstore/v1/parallelstore_connection_idempotency_policy.h b/google/cloud/parallelstore/v1/parallelstore_connection_idempotency_policy.h index a65d6359719e9..9dfa77e3d7cea 100644 --- a/google/cloud/parallelstore/v1/parallelstore_connection_idempotency_policy.h +++ b/google/cloud/parallelstore/v1/parallelstore_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PARALLELSTORE_V1_PARALLELSTORE_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PARALLELSTORE_V1_PARALLELSTORE_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/parallelstore/v1/parallelstore.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/parametermanager/BUILD.bazel b/google/cloud/parametermanager/BUILD.bazel index 9d7ceed43bcca..18441f6fabc0a 100644 --- a/google/cloud/parametermanager/BUILD.bazel +++ b/google/cloud/parametermanager/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/parametermanager/v1:parametermanager_cc_grpc", + "@googleapis//google/cloud/parametermanager/v1:parametermanager_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/parametermanager/quickstart/.bazelrc b/google/cloud/parametermanager/quickstart/.bazelrc index 8431873b6fcba..e8b43211481f4 100644 --- a/google/cloud/parametermanager/quickstart/.bazelrc +++ b/google/cloud/parametermanager/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds diff --git a/google/cloud/parametermanager/quickstart/CMakeLists.txt b/google/cloud/parametermanager/quickstart/CMakeLists.txt index 510116d640aac..6719a7c42af2f 100644 --- a/google/cloud/parametermanager/quickstart/CMakeLists.txt +++ b/google/cloud/parametermanager/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Parameter Manager API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-parametermanager-quickstart CXX) find_package(google_cloud_cpp_parametermanager REQUIRED) diff --git a/google/cloud/parametermanager/v1/internal/parameter_manager_auth_decorator.cc b/google/cloud/parametermanager/v1/internal/parameter_manager_auth_decorator.cc index dc0527ce846db..b81e2c83fbdf2 100644 --- a/google/cloud/parametermanager/v1/internal/parameter_manager_auth_decorator.cc +++ b/google/cloud/parametermanager/v1/internal/parameter_manager_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/parametermanager/v1/service.proto #include "google/cloud/parametermanager/v1/internal/parameter_manager_auth_decorator.h" -#include +#include "google/cloud/parametermanager/v1/service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace parametermanager_v1_internal { @@ -158,3 +161,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace parametermanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/parametermanager/v1/internal/parameter_manager_auth_decorator.h b/google/cloud/parametermanager/v1/internal/parameter_manager_auth_decorator.h index 441069c5f612c..b9736c8d1e4e8 100644 --- a/google/cloud/parametermanager/v1/internal/parameter_manager_auth_decorator.h +++ b/google/cloud/parametermanager/v1/internal/parameter_manager_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace parametermanager_v1_internal { @@ -117,4 +120,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PARAMETERMANAGER_V1_INTERNAL_PARAMETER_MANAGER_AUTH_DECORATOR_H diff --git a/google/cloud/parametermanager/v1/internal/parameter_manager_logging_decorator.cc b/google/cloud/parametermanager/v1/internal/parameter_manager_logging_decorator.cc index 693219406dbf6..72b24f28ba409 100644 --- a/google/cloud/parametermanager/v1/internal/parameter_manager_logging_decorator.cc +++ b/google/cloud/parametermanager/v1/internal/parameter_manager_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/parametermanager/v1/service.proto #include "google/cloud/parametermanager/v1/internal/parameter_manager_logging_decorator.h" +#include "google/cloud/parametermanager/v1/service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace parametermanager_v1_internal { @@ -214,3 +217,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace parametermanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/parametermanager/v1/internal/parameter_manager_logging_decorator.h b/google/cloud/parametermanager/v1/internal/parameter_manager_logging_decorator.h index fc430f54f9b70..62288a1cbe9ae 100644 --- a/google/cloud/parametermanager/v1/internal/parameter_manager_logging_decorator.h +++ b/google/cloud/parametermanager/v1/internal/parameter_manager_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace parametermanager_v1_internal { @@ -117,4 +120,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PARAMETERMANAGER_V1_INTERNAL_PARAMETER_MANAGER_LOGGING_DECORATOR_H diff --git a/google/cloud/parametermanager/v1/internal/parameter_manager_metadata_decorator.cc b/google/cloud/parametermanager/v1/internal/parameter_manager_metadata_decorator.cc index e692cd69ef901..ffa9b74e81818 100644 --- a/google/cloud/parametermanager/v1/internal/parameter_manager_metadata_decorator.cc +++ b/google/cloud/parametermanager/v1/internal/parameter_manager_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/parametermanager/v1/service.proto #include "google/cloud/parametermanager/v1/internal/parameter_manager_metadata_decorator.h" +#include "google/cloud/parametermanager/v1/service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace parametermanager_v1_internal { @@ -188,3 +192,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace parametermanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/parametermanager/v1/internal/parameter_manager_metadata_decorator.h b/google/cloud/parametermanager/v1/internal/parameter_manager_metadata_decorator.h index 061c3f89506e5..15e0da47aa35f 100644 --- a/google/cloud/parametermanager/v1/internal/parameter_manager_metadata_decorator.h +++ b/google/cloud/parametermanager/v1/internal/parameter_manager_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace parametermanager_v1_internal { @@ -123,4 +126,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PARAMETERMANAGER_V1_INTERNAL_PARAMETER_MANAGER_METADATA_DECORATOR_H diff --git a/google/cloud/parametermanager/v1/internal/parameter_manager_option_defaults.cc b/google/cloud/parametermanager/v1/internal/parameter_manager_option_defaults.cc index 2be579289d972..410fe68f77d4a 100644 --- a/google/cloud/parametermanager/v1/internal/parameter_manager_option_defaults.cc +++ b/google/cloud/parametermanager/v1/internal/parameter_manager_option_defaults.cc @@ -42,7 +42,7 @@ Options ParameterManagerDefaultOptions(Options options) { if (!options.has()) { options.set( parametermanager_v1::ParameterManagerLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/parametermanager/v1/internal/parameter_manager_stub.cc b/google/cloud/parametermanager/v1/internal/parameter_manager_stub.cc index 517240ddaffda..599aa973e7ac7 100644 --- a/google/cloud/parametermanager/v1/internal/parameter_manager_stub.cc +++ b/google/cloud/parametermanager/v1/internal/parameter_manager_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/parametermanager/v1/service.proto #include "google/cloud/parametermanager/v1/internal/parameter_manager_stub.h" +#include "google/cloud/parametermanager/v1/service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace parametermanager_v1_internal { @@ -201,3 +204,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace parametermanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/parametermanager/v1/internal/parameter_manager_stub.h b/google/cloud/parametermanager/v1/internal/parameter_manager_stub.h index a649edc156d27..23463a7cb2f64 100644 --- a/google/cloud/parametermanager/v1/internal/parameter_manager_stub.h +++ b/google/cloud/parametermanager/v1/internal/parameter_manager_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PARAMETERMANAGER_V1_INTERNAL_PARAMETER_MANAGER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PARAMETERMANAGER_V1_INTERNAL_PARAMETER_MANAGER_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/parametermanager/v1/service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace parametermanager_v1_internal { @@ -204,4 +207,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PARAMETERMANAGER_V1_INTERNAL_PARAMETER_MANAGER_STUB_H diff --git a/google/cloud/parametermanager/v1/internal/parameter_manager_stub_factory.cc b/google/cloud/parametermanager/v1/internal/parameter_manager_stub_factory.cc index 755efeffb1543..bcb1c14d03b57 100644 --- a/google/cloud/parametermanager/v1/internal/parameter_manager_stub_factory.cc +++ b/google/cloud/parametermanager/v1/internal/parameter_manager_stub_factory.cc @@ -17,22 +17,25 @@ // source: google/cloud/parametermanager/v1/service.proto #include "google/cloud/parametermanager/v1/internal/parameter_manager_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/parametermanager/v1/internal/parameter_manager_auth_decorator.h" #include "google/cloud/parametermanager/v1/internal/parameter_manager_logging_decorator.h" #include "google/cloud/parametermanager/v1/internal/parameter_manager_metadata_decorator.h" #include "google/cloud/parametermanager/v1/internal/parameter_manager_stub.h" #include "google/cloud/parametermanager/v1/internal/parameter_manager_tracing_stub.h" +#include "google/cloud/parametermanager/v1/service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace parametermanager_v1_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace parametermanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/parametermanager/v1/internal/parameter_manager_stub_factory.h b/google/cloud/parametermanager/v1/internal/parameter_manager_stub_factory.h index 970425dcfd89d..1e2f392abb933 100644 --- a/google/cloud/parametermanager/v1/internal/parameter_manager_stub_factory.h +++ b/google/cloud/parametermanager/v1/internal/parameter_manager_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace parametermanager_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PARAMETERMANAGER_V1_INTERNAL_PARAMETER_MANAGER_STUB_FACTORY_H diff --git a/google/cloud/parametermanager/v1/internal/parameter_manager_tracing_connection.cc b/google/cloud/parametermanager/v1/internal/parameter_manager_tracing_connection.cc index aaf5316a6703b..6b269ed460d97 100644 --- a/google/cloud/parametermanager/v1/internal/parameter_manager_tracing_connection.cc +++ b/google/cloud/parametermanager/v1/internal/parameter_manager_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace parametermanager_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ParameterManagerTracingConnection::ParameterManagerTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -168,16 +166,12 @@ ParameterManagerTracingConnection::GetLocation( return internal::EndSpan(*span, child_->GetLocation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeParameterManagerTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/parametermanager/v1/internal/parameter_manager_tracing_connection.h b/google/cloud/parametermanager/v1/internal/parameter_manager_tracing_connection.h index ed341077689ea..a7ecdbbcf7aed 100644 --- a/google/cloud/parametermanager/v1/internal/parameter_manager_tracing_connection.h +++ b/google/cloud/parametermanager/v1/internal/parameter_manager_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace parametermanager_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ParameterManagerTracingConnection : public parametermanager_v1::ParameterManagerConnection { public: @@ -99,8 +97,6 @@ class ParameterManagerTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/parametermanager/v1/internal/parameter_manager_tracing_stub.cc b/google/cloud/parametermanager/v1/internal/parameter_manager_tracing_stub.cc index 9cc6a577be3ae..895034f12c554 100644 --- a/google/cloud/parametermanager/v1/internal/parameter_manager_tracing_stub.cc +++ b/google/cloud/parametermanager/v1/internal/parameter_manager_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace parametermanager_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ParameterManagerTracingStub::ParameterManagerTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -205,18 +206,14 @@ ParameterManagerTracingStub::GetLocation( child_->GetLocation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeParameterManagerTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace parametermanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/parametermanager/v1/internal/parameter_manager_tracing_stub.h b/google/cloud/parametermanager/v1/internal/parameter_manager_tracing_stub.h index 99f4709dbeae8..8036b8518ca7c 100644 --- a/google/cloud/parametermanager/v1/internal/parameter_manager_tracing_stub.h +++ b/google/cloud/parametermanager/v1/internal/parameter_manager_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace parametermanager_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ParameterManagerTracingStub : public ParameterManagerStub { public: ~ParameterManagerTracingStub() override = default; @@ -114,8 +115,6 @@ class ParameterManagerTracingStub : public ParameterManagerStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -130,4 +129,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PARAMETERMANAGER_V1_INTERNAL_PARAMETER_MANAGER_TRACING_STUB_H diff --git a/google/cloud/parametermanager/v1/parameter_manager_connection.h b/google/cloud/parametermanager/v1/parameter_manager_connection.h index 49ca203b80986..482ce6079e204 100644 --- a/google/cloud/parametermanager/v1/parameter_manager_connection.h +++ b/google/cloud/parametermanager/v1/parameter_manager_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/parametermanager/v1/internal/parameter_manager_retry_traits.h" #include "google/cloud/parametermanager/v1/parameter_manager_connection_idempotency_policy.h" +#include "google/cloud/parametermanager/v1/service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/parametermanager/v1/parameter_manager_connection_idempotency_policy.h b/google/cloud/parametermanager/v1/parameter_manager_connection_idempotency_policy.h index 1d72f5be232cb..eeb0582057fb4 100644 --- a/google/cloud/parametermanager/v1/parameter_manager_connection_idempotency_policy.h +++ b/google/cloud/parametermanager/v1/parameter_manager_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PARAMETERMANAGER_V1_PARAMETER_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PARAMETERMANAGER_V1_PARAMETER_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/parametermanager/v1/service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/policysimulator/BUILD.bazel b/google/cloud/policysimulator/BUILD.bazel index 1b54c1f505536..24b50c86b785a 100644 --- a/google/cloud/policysimulator/BUILD.bazel +++ b/google/cloud/policysimulator/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/policysimulator/v1:policysimulator_cc_grpc", + "@googleapis//google/cloud/policysimulator/v1:policysimulator_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/policysimulator/quickstart/.bazelrc b/google/cloud/policysimulator/quickstart/.bazelrc index 6777c6b4c95de..ec27511a60add 100644 --- a/google/cloud/policysimulator/quickstart/.bazelrc +++ b/google/cloud/policysimulator/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/policysimulator/quickstart/CMakeLists.txt b/google/cloud/policysimulator/quickstart/CMakeLists.txt index a37d931843af3..e40a33e23ed7a 100644 --- a/google/cloud/policysimulator/quickstart/CMakeLists.txt +++ b/google/cloud/policysimulator/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Policy Simulator API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-policysimulator-quickstart CXX) find_package(google_cloud_cpp_policysimulator REQUIRED) diff --git a/google/cloud/policysimulator/v1/internal/simulator_auth_decorator.cc b/google/cloud/policysimulator/v1/internal/simulator_auth_decorator.cc index 2f71825d7b270..e4cdecc9fdbe6 100644 --- a/google/cloud/policysimulator/v1/internal/simulator_auth_decorator.cc +++ b/google/cloud/policysimulator/v1/internal/simulator_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/policysimulator/v1/simulator.proto #include "google/cloud/policysimulator/v1/internal/simulator_auth_decorator.h" -#include +#include "google/cloud/policysimulator/v1/simulator.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policysimulator_v1_internal { @@ -134,3 +137,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace policysimulator_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/policysimulator/v1/internal/simulator_auth_decorator.h b/google/cloud/policysimulator/v1/internal/simulator_auth_decorator.h index 78140ff2e06e1..0d86ee9f2a5c5 100644 --- a/google/cloud/policysimulator/v1/internal/simulator_auth_decorator.h +++ b/google/cloud/policysimulator/v1/internal/simulator_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/policysimulator/v1/internal/simulator_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policysimulator_v1_internal { @@ -92,4 +95,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYSIMULATOR_V1_INTERNAL_SIMULATOR_AUTH_DECORATOR_H diff --git a/google/cloud/policysimulator/v1/internal/simulator_connection_impl.h b/google/cloud/policysimulator/v1/internal/simulator_connection_impl.h index e0cd6f2675958..4d8107f16ccee 100644 --- a/google/cloud/policysimulator/v1/internal/simulator_connection_impl.h +++ b/google/cloud/policysimulator/v1/internal/simulator_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/policysimulator/v1/internal/simulator_logging_decorator.cc b/google/cloud/policysimulator/v1/internal/simulator_logging_decorator.cc index 9ce155f886bff..0a91c549f985b 100644 --- a/google/cloud/policysimulator/v1/internal/simulator_logging_decorator.cc +++ b/google/cloud/policysimulator/v1/internal/simulator_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/policysimulator/v1/simulator.proto #include "google/cloud/policysimulator/v1/internal/simulator_logging_decorator.h" +#include "google/cloud/policysimulator/v1/simulator.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policysimulator_v1_internal { @@ -155,3 +158,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace policysimulator_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/policysimulator/v1/internal/simulator_logging_decorator.h b/google/cloud/policysimulator/v1/internal/simulator_logging_decorator.h index b0494a41d0994..eec40eba22687 100644 --- a/google/cloud/policysimulator/v1/internal/simulator_logging_decorator.h +++ b/google/cloud/policysimulator/v1/internal/simulator_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/policysimulator/v1/internal/simulator_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policysimulator_v1_internal { @@ -92,4 +95,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYSIMULATOR_V1_INTERNAL_SIMULATOR_LOGGING_DECORATOR_H diff --git a/google/cloud/policysimulator/v1/internal/simulator_metadata_decorator.cc b/google/cloud/policysimulator/v1/internal/simulator_metadata_decorator.cc index ff2ca6740160e..f9ba4bf78a215 100644 --- a/google/cloud/policysimulator/v1/internal/simulator_metadata_decorator.cc +++ b/google/cloud/policysimulator/v1/internal/simulator_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/policysimulator/v1/simulator.proto #include "google/cloud/policysimulator/v1/internal/simulator_metadata_decorator.h" +#include "google/cloud/policysimulator/v1/simulator.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policysimulator_v1_internal { @@ -140,3 +144,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace policysimulator_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/policysimulator/v1/internal/simulator_metadata_decorator.h b/google/cloud/policysimulator/v1/internal/simulator_metadata_decorator.h index 46115f514bdee..3ef393f898f0b 100644 --- a/google/cloud/policysimulator/v1/internal/simulator_metadata_decorator.h +++ b/google/cloud/policysimulator/v1/internal/simulator_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/policysimulator/v1/internal/simulator_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policysimulator_v1_internal { @@ -97,4 +100,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYSIMULATOR_V1_INTERNAL_SIMULATOR_METADATA_DECORATOR_H diff --git a/google/cloud/policysimulator/v1/internal/simulator_option_defaults.cc b/google/cloud/policysimulator/v1/internal/simulator_option_defaults.cc index 85a5880443c2a..359413c004680 100644 --- a/google/cloud/policysimulator/v1/internal/simulator_option_defaults.cc +++ b/google/cloud/policysimulator/v1/internal/simulator_option_defaults.cc @@ -41,7 +41,7 @@ Options SimulatorDefaultOptions(Options options) { if (!options.has()) { options.set( policysimulator_v1::SimulatorLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/policysimulator/v1/internal/simulator_stub.cc b/google/cloud/policysimulator/v1/internal/simulator_stub.cc index fee7824a6dad2..2b6ce8aabdfc0 100644 --- a/google/cloud/policysimulator/v1/internal/simulator_stub.cc +++ b/google/cloud/policysimulator/v1/internal/simulator_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/policysimulator/v1/simulator.proto #include "google/cloud/policysimulator/v1/internal/simulator_stub.h" +#include "google/cloud/policysimulator/v1/simulator.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policysimulator_v1_internal { @@ -152,3 +155,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace policysimulator_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/policysimulator/v1/internal/simulator_stub.h b/google/cloud/policysimulator/v1/internal/simulator_stub.h index 347ddd18739f3..081c82521ca58 100644 --- a/google/cloud/policysimulator/v1/internal/simulator_stub.h +++ b/google/cloud/policysimulator/v1/internal/simulator_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYSIMULATOR_V1_INTERNAL_SIMULATOR_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYSIMULATOR_V1_INTERNAL_SIMULATOR_STUB_H +#include "google/cloud/policysimulator/v1/simulator.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policysimulator_v1_internal { @@ -148,4 +151,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYSIMULATOR_V1_INTERNAL_SIMULATOR_STUB_H diff --git a/google/cloud/policysimulator/v1/internal/simulator_stub_factory.cc b/google/cloud/policysimulator/v1/internal/simulator_stub_factory.cc index dedaa069c5f4a..65c9632633784 100644 --- a/google/cloud/policysimulator/v1/internal/simulator_stub_factory.cc +++ b/google/cloud/policysimulator/v1/internal/simulator_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/policysimulator/v1/internal/simulator_metadata_decorator.h" #include "google/cloud/policysimulator/v1/internal/simulator_stub.h" #include "google/cloud/policysimulator/v1/internal/simulator_tracing_stub.h" +#include "google/cloud/policysimulator/v1/simulator.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policysimulator_v1_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace policysimulator_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/policysimulator/v1/internal/simulator_stub_factory.h b/google/cloud/policysimulator/v1/internal/simulator_stub_factory.h index 79e81c93d96b9..4c320fd1ae229 100644 --- a/google/cloud/policysimulator/v1/internal/simulator_stub_factory.h +++ b/google/cloud/policysimulator/v1/internal/simulator_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policysimulator_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYSIMULATOR_V1_INTERNAL_SIMULATOR_STUB_FACTORY_H diff --git a/google/cloud/policysimulator/v1/internal/simulator_tracing_connection.cc b/google/cloud/policysimulator/v1/internal/simulator_tracing_connection.cc index 60306974a00dc..3d863635b2239 100644 --- a/google/cloud/policysimulator/v1/internal/simulator_tracing_connection.cc +++ b/google/cloud/policysimulator/v1/internal/simulator_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace policysimulator_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SimulatorTracingConnection::SimulatorTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -102,16 +100,12 @@ SimulatorTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSimulatorTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/policysimulator/v1/internal/simulator_tracing_connection.h b/google/cloud/policysimulator/v1/internal/simulator_tracing_connection.h index fa0fcc14beb4b..cc71ddf87faa4 100644 --- a/google/cloud/policysimulator/v1/internal/simulator_tracing_connection.h +++ b/google/cloud/policysimulator/v1/internal/simulator_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace policysimulator_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SimulatorTracingConnection : public policysimulator_v1::SimulatorConnection { public: @@ -70,8 +68,6 @@ class SimulatorTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/policysimulator/v1/internal/simulator_tracing_stub.cc b/google/cloud/policysimulator/v1/internal/simulator_tracing_stub.cc index 32437b26ba3fb..98e03b9b6bc10 100644 --- a/google/cloud/policysimulator/v1/internal/simulator_tracing_stub.cc +++ b/google/cloud/policysimulator/v1/internal/simulator_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policysimulator_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SimulatorTracingStub::SimulatorTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -132,18 +133,14 @@ future SimulatorTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSimulatorTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace policysimulator_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/policysimulator/v1/internal/simulator_tracing_stub.h b/google/cloud/policysimulator/v1/internal/simulator_tracing_stub.h index c7ad1d2f86019..eb45f17486741 100644 --- a/google/cloud/policysimulator/v1/internal/simulator_tracing_stub.h +++ b/google/cloud/policysimulator/v1/internal/simulator_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policysimulator_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SimulatorTracingStub : public SimulatorStub { public: ~SimulatorTracingStub() override = default; @@ -87,8 +88,6 @@ class SimulatorTracingStub : public SimulatorStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -103,4 +102,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYSIMULATOR_V1_INTERNAL_SIMULATOR_TRACING_STUB_H diff --git a/google/cloud/policysimulator/v1/simulator_client.h b/google/cloud/policysimulator/v1/simulator_client.h index f20e4302a9b07..146de6d4b3e8d 100644 --- a/google/cloud/policysimulator/v1/simulator_client.h +++ b/google/cloud/policysimulator/v1/simulator_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/policysimulator/v1/simulator_connection.h b/google/cloud/policysimulator/v1/simulator_connection.h index 33e8cb81d4f89..ce7be600c9ea4 100644 --- a/google/cloud/policysimulator/v1/simulator_connection.h +++ b/google/cloud/policysimulator/v1/simulator_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYSIMULATOR_V1_SIMULATOR_CONNECTION_H #include "google/cloud/policysimulator/v1/internal/simulator_retry_traits.h" +#include "google/cloud/policysimulator/v1/simulator.pb.h" #include "google/cloud/policysimulator/v1/simulator_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/policysimulator/v1/simulator_connection_idempotency_policy.h b/google/cloud/policysimulator/v1/simulator_connection_idempotency_policy.h index f67b9e67f5310..982a63e21f2b5 100644 --- a/google/cloud/policysimulator/v1/simulator_connection_idempotency_policy.h +++ b/google/cloud/policysimulator/v1/simulator_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYSIMULATOR_V1_SIMULATOR_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYSIMULATOR_V1_SIMULATOR_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/policysimulator/v1/simulator.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/policytroubleshooter/BUILD.bazel b/google/cloud/policytroubleshooter/BUILD.bazel index f316abc26b8a7..2d917b74a37ec 100644 --- a/google/cloud/policytroubleshooter/BUILD.bazel +++ b/google/cloud/policytroubleshooter/BUILD.bazel @@ -19,15 +19,14 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", "iam/v3/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/policytroubleshooter/iam/v3:iam_cc_grpc", - "@com_google_googleapis//google/cloud/policytroubleshooter/v1:policytroubleshooter_cc_grpc", - "@com_google_googleapis//google/iam/v2:iam_cc_grpc", + "@googleapis//google/cloud/policytroubleshooter/iam/v3:iam_cc_grpc", + "@googleapis//google/cloud/policytroubleshooter/v1:policytroubleshooter_cc_grpc", + "@googleapis//google/iam/v2:iam_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/policytroubleshooter/CMakeLists.txt b/google/cloud/policytroubleshooter/CMakeLists.txt index ed9c631ed7d2a..9dbbff484491e 100644 --- a/google/cloud/policytroubleshooter/CMakeLists.txt +++ b/google/cloud/policytroubleshooter/CMakeLists.txt @@ -18,7 +18,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library( policytroubleshooter "Policy Troubleshooter API" - SERVICE_DIRS "__EMPTY__" "v1/" "iam/v3/" + SERVICE_DIRS "v1/" "iam/v3/" SHARED_PROTO_DEPS "iam_v2") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) diff --git a/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_auth_decorator.cc b/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_auth_decorator.cc index 294f70b52df6e..2171e554e0df1 100644 --- a/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_auth_decorator.cc +++ b/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/policytroubleshooter/iam/v3/troubleshooter.proto #include "google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_auth_decorator.h" -#include +#include "google/cloud/policytroubleshooter/iam/v3/troubleshooter.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policytroubleshooter_iam_v3_internal { @@ -46,3 +49,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace policytroubleshooter_iam_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_auth_decorator.h b/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_auth_decorator.h index 8b97b1235ae3e..b83a1cdbcc0b8 100644 --- a/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_auth_decorator.h +++ b/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policytroubleshooter_iam_v3_internal { @@ -55,4 +58,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_IAM_V3_INTERNAL_POLICY_TROUBLESHOOTER_AUTH_DECORATOR_H diff --git a/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_logging_decorator.cc b/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_logging_decorator.cc index 9aeb907ba963d..83c51a120f342 100644 --- a/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_logging_decorator.cc +++ b/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/policytroubleshooter/iam/v3/troubleshooter.proto #include "google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_logging_decorator.h" +#include "google/cloud/policytroubleshooter/iam/v3/troubleshooter.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policytroubleshooter_iam_v3_internal { @@ -54,3 +57,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace policytroubleshooter_iam_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_logging_decorator.h b/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_logging_decorator.h index 235240cc7205a..c465f5d8af703 100644 --- a/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_logging_decorator.h +++ b/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policytroubleshooter_iam_v3_internal { @@ -55,4 +58,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_IAM_V3_INTERNAL_POLICY_TROUBLESHOOTER_LOGGING_DECORATOR_H diff --git a/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_metadata_decorator.cc b/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_metadata_decorator.cc index 6729abc655d99..d92e865033105 100644 --- a/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_metadata_decorator.cc +++ b/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/policytroubleshooter/iam/v3/troubleshooter.proto #include "google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_metadata_decorator.h" +#include "google/cloud/policytroubleshooter/iam/v3/troubleshooter.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policytroubleshooter_iam_v3_internal { @@ -71,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace policytroubleshooter_iam_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_metadata_decorator.h b/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_metadata_decorator.h index ddfa050053edc..c52479912c1df 100644 --- a/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_metadata_decorator.h +++ b/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policytroubleshooter_iam_v3_internal { @@ -61,4 +64,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_IAM_V3_INTERNAL_POLICY_TROUBLESHOOTER_METADATA_DECORATOR_H diff --git a/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_option_defaults.cc b/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_option_defaults.cc index 7322579c1a44a..5292e334ecd70 100644 --- a/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_option_defaults.cc +++ b/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_option_defaults.cc @@ -44,7 +44,7 @@ Options PolicyTroubleshooterDefaultOptions(Options options) { options.set< policytroubleshooter_iam_v3::PolicyTroubleshooterRetryPolicyOption>( policytroubleshooter_iam_v3::PolicyTroubleshooterLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policytroubleshooter_iam_v3_internal { @@ -49,3 +52,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace policytroubleshooter_iam_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_stub.h b/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_stub.h index 2e4eb0707c959..fbcab61f7d5a0 100644 --- a/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_stub.h +++ b/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_IAM_V3_INTERNAL_POLICY_TROUBLESHOOTER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_IAM_V3_INTERNAL_POLICY_TROUBLESHOOTER_STUB_H +#include "google/cloud/policytroubleshooter/iam/v3/troubleshooter.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policytroubleshooter_iam_v3_internal { @@ -68,4 +71,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_IAM_V3_INTERNAL_POLICY_TROUBLESHOOTER_STUB_H diff --git a/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_stub_factory.cc b/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_stub_factory.cc index 46625b8766682..a6fe458093041 100644 --- a/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_stub_factory.cc +++ b/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_metadata_decorator.h" #include "google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_stub.h" #include "google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_tracing_stub.h" +#include "google/cloud/policytroubleshooter/iam/v3/troubleshooter.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policytroubleshooter_iam_v3_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace policytroubleshooter_iam_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_stub_factory.h b/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_stub_factory.h index 5bc300d24a207..fa19f5a17bd65 100644 --- a/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_stub_factory.h +++ b/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policytroubleshooter_iam_v3_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_IAM_V3_INTERNAL_POLICY_TROUBLESHOOTER_STUB_FACTORY_H diff --git a/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_tracing_connection.cc b/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_tracing_connection.cc index 33dcb96ae29ad..4247ba3a24084 100644 --- a/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_tracing_connection.cc +++ b/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace policytroubleshooter_iam_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PolicyTroubleshooterTracingConnection::PolicyTroubleshooterTracingConnection( std::shared_ptr child) @@ -45,18 +43,14 @@ PolicyTroubleshooterTracingConnection::TroubleshootIamPolicy( return internal::EndSpan(*span, child_->TroubleshootIamPolicy(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePolicyTroubleshooterTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_tracing_connection.h b/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_tracing_connection.h index 6331a33018e7f..199e13bc5feb6 100644 --- a/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_tracing_connection.h +++ b/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace policytroubleshooter_iam_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PolicyTroubleshooterTracingConnection : public policytroubleshooter_iam_v3::PolicyTroubleshooterConnection { public: @@ -53,8 +51,6 @@ class PolicyTroubleshooterTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_tracing_stub.cc b/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_tracing_stub.cc index 73b037ce1df3b..e7eac9647e7ea 100644 --- a/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_tracing_stub.cc +++ b/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policytroubleshooter_iam_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PolicyTroubleshooterTracingStub::PolicyTroubleshooterTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -47,18 +48,14 @@ PolicyTroubleshooterTracingStub::TroubleshootIamPolicy( context, *span, child_->TroubleshootIamPolicy(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePolicyTroubleshooterTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace policytroubleshooter_iam_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_tracing_stub.h b/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_tracing_stub.h index c86d3fb30ba3a..47c52a8f4a3d2 100644 --- a/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_tracing_stub.h +++ b/google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policytroubleshooter_iam_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PolicyTroubleshooterTracingStub : public PolicyTroubleshooterStub { public: ~PolicyTroubleshooterTracingStub() override = default; @@ -52,8 +53,6 @@ class PolicyTroubleshooterTracingStub : public PolicyTroubleshooterStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -68,4 +67,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_IAM_V3_INTERNAL_POLICY_TROUBLESHOOTER_TRACING_STUB_H diff --git a/google/cloud/policytroubleshooter/iam/v3/policy_troubleshooter_connection.h b/google/cloud/policytroubleshooter/iam/v3/policy_troubleshooter_connection.h index c5ca4b7587b9e..a4a9f01733b9b 100644 --- a/google/cloud/policytroubleshooter/iam/v3/policy_troubleshooter_connection.h +++ b/google/cloud/policytroubleshooter/iam/v3/policy_troubleshooter_connection.h @@ -21,12 +21,12 @@ #include "google/cloud/policytroubleshooter/iam/v3/internal/policy_troubleshooter_retry_traits.h" #include "google/cloud/policytroubleshooter/iam/v3/policy_troubleshooter_connection_idempotency_policy.h" +#include "google/cloud/policytroubleshooter/iam/v3/troubleshooter.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/policytroubleshooter/iam/v3/policy_troubleshooter_connection_idempotency_policy.h b/google/cloud/policytroubleshooter/iam/v3/policy_troubleshooter_connection_idempotency_policy.h index b62bc86a8d860..4615b06bce50f 100644 --- a/google/cloud/policytroubleshooter/iam/v3/policy_troubleshooter_connection_idempotency_policy.h +++ b/google/cloud/policytroubleshooter/iam/v3/policy_troubleshooter_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_IAM_V3_POLICY_TROUBLESHOOTER_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_IAM_V3_POLICY_TROUBLESHOOTER_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/policytroubleshooter/iam/v3/troubleshooter.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/policytroubleshooter/iam_checker_client.h b/google/cloud/policytroubleshooter/iam_checker_client.h deleted file mode 100644 index c6379cd9c0604..0000000000000 --- a/google/cloud/policytroubleshooter/iam_checker_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/policytroubleshooter/v1/checker.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_IAM_CHECKER_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_IAM_CHECKER_CLIENT_H - -#include "google/cloud/policytroubleshooter/iam_checker_connection.h" -#include "google/cloud/policytroubleshooter/v1/iam_checker_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in policytroubleshooter_v1 instead of the aliases defined -/// in this namespace. -namespace policytroubleshooter { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use policytroubleshooter_v1::IamCheckerClient directly. -using ::google::cloud::policytroubleshooter_v1::IamCheckerClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace policytroubleshooter -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_IAM_CHECKER_CLIENT_H diff --git a/google/cloud/policytroubleshooter/iam_checker_connection.h b/google/cloud/policytroubleshooter/iam_checker_connection.h deleted file mode 100644 index 558f4d53aa5ac..0000000000000 --- a/google/cloud/policytroubleshooter/iam_checker_connection.h +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/policytroubleshooter/v1/checker.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_IAM_CHECKER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_IAM_CHECKER_CONNECTION_H - -#include "google/cloud/policytroubleshooter/iam_checker_connection_idempotency_policy.h" -#include "google/cloud/policytroubleshooter/v1/iam_checker_connection.h" - -namespace google { -namespace cloud { -namespace policytroubleshooter { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use policytroubleshooter_v1::MakeIamCheckerConnection directly. -using ::google::cloud::policytroubleshooter_v1::MakeIamCheckerConnection; - -/// @deprecated Use policytroubleshooter_v1::IamCheckerConnection directly. -using ::google::cloud::policytroubleshooter_v1::IamCheckerConnection; - -/// @deprecated Use -/// policytroubleshooter_v1::IamCheckerLimitedErrorCountRetryPolicy directly. -using ::google::cloud::policytroubleshooter_v1:: - IamCheckerLimitedErrorCountRetryPolicy; - -/// @deprecated Use policytroubleshooter_v1::IamCheckerLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::policytroubleshooter_v1:: - IamCheckerLimitedTimeRetryPolicy; - -/// @deprecated Use policytroubleshooter_v1::IamCheckerRetryPolicy directly. -using ::google::cloud::policytroubleshooter_v1::IamCheckerRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace policytroubleshooter -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_IAM_CHECKER_CONNECTION_H diff --git a/google/cloud/policytroubleshooter/iam_checker_connection_idempotency_policy.h b/google/cloud/policytroubleshooter/iam_checker_connection_idempotency_policy.h deleted file mode 100644 index 3441af2bc8e15..0000000000000 --- a/google/cloud/policytroubleshooter/iam_checker_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/policytroubleshooter/v1/checker.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_IAM_CHECKER_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_IAM_CHECKER_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/policytroubleshooter/v1/iam_checker_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace policytroubleshooter { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// policytroubleshooter_v1::MakeDefaultIamCheckerConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::policytroubleshooter_v1:: - MakeDefaultIamCheckerConnectionIdempotencyPolicy; - -/// @deprecated Use -/// policytroubleshooter_v1::IamCheckerConnectionIdempotencyPolicy directly. -using ::google::cloud::policytroubleshooter_v1:: - IamCheckerConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace policytroubleshooter -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_IAM_CHECKER_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/policytroubleshooter/iam_checker_options.h b/google/cloud/policytroubleshooter/iam_checker_options.h deleted file mode 100644 index 19fc3ffe9d17d..0000000000000 --- a/google/cloud/policytroubleshooter/iam_checker_options.h +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/policytroubleshooter/v1/checker.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_IAM_CHECKER_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_IAM_CHECKER_OPTIONS_H - -#include "google/cloud/policytroubleshooter/iam_checker_connection.h" -#include "google/cloud/policytroubleshooter/iam_checker_connection_idempotency_policy.h" -#include "google/cloud/policytroubleshooter/v1/iam_checker_options.h" - -namespace google { -namespace cloud { -namespace policytroubleshooter { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use policytroubleshooter_v1::IamCheckerBackoffPolicyOption -/// directly. -using ::google::cloud::policytroubleshooter_v1::IamCheckerBackoffPolicyOption; - -/// @deprecated Use -/// policytroubleshooter_v1::IamCheckerConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::policytroubleshooter_v1:: - IamCheckerConnectionIdempotencyPolicyOption; - -/// @deprecated Use policytroubleshooter_v1::IamCheckerPolicyOptionList -/// directly. -using ::google::cloud::policytroubleshooter_v1::IamCheckerPolicyOptionList; - -/// @deprecated Use policytroubleshooter_v1::IamCheckerRetryPolicyOption -/// directly. -using ::google::cloud::policytroubleshooter_v1::IamCheckerRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace policytroubleshooter -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_IAM_CHECKER_OPTIONS_H diff --git a/google/cloud/policytroubleshooter/mocks/mock_iam_checker_connection.h b/google/cloud/policytroubleshooter/mocks/mock_iam_checker_connection.h deleted file mode 100644 index 01ac202de777a..0000000000000 --- a/google/cloud/policytroubleshooter/mocks/mock_iam_checker_connection.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/policytroubleshooter/v1/checker.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_MOCKS_MOCK_IAM_CHECKER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_MOCKS_MOCK_IAM_CHECKER_CONNECTION_H - -#include "google/cloud/policytroubleshooter/iam_checker_connection.h" -#include "google/cloud/policytroubleshooter/v1/mocks/mock_iam_checker_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in policytroubleshooter_v1_mocks instead of the aliases -/// defined in this namespace. -namespace policytroubleshooter_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use policytroubleshooter_v1_mocks::MockIamCheckerConnection -/// directly. -using ::google::cloud::policytroubleshooter_v1_mocks::MockIamCheckerConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace policytroubleshooter_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_MOCKS_MOCK_IAM_CHECKER_CONNECTION_H diff --git a/google/cloud/policytroubleshooter/quickstart/.bazelrc b/google/cloud/policytroubleshooter/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/policytroubleshooter/quickstart/.bazelrc +++ b/google/cloud/policytroubleshooter/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/policytroubleshooter/quickstart/CMakeLists.txt b/google/cloud/policytroubleshooter/quickstart/CMakeLists.txt index 322b6b34d551c..eede43be58dc4 100644 --- a/google/cloud/policytroubleshooter/quickstart/CMakeLists.txt +++ b/google/cloud/policytroubleshooter/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Policy Troubleshooter API C++ client library # from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-policytroubleshooter-quickstart CXX) find_package(google_cloud_cpp_policytroubleshooter REQUIRED) diff --git a/google/cloud/policytroubleshooter/v1/iam_checker_connection.h b/google/cloud/policytroubleshooter/v1/iam_checker_connection.h index f51ebef4c44cd..20ccddf080947 100644 --- a/google/cloud/policytroubleshooter/v1/iam_checker_connection.h +++ b/google/cloud/policytroubleshooter/v1/iam_checker_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_V1_IAM_CHECKER_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_V1_IAM_CHECKER_CONNECTION_H +#include "google/cloud/policytroubleshooter/v1/checker.pb.h" #include "google/cloud/policytroubleshooter/v1/iam_checker_connection_idempotency_policy.h" #include "google/cloud/policytroubleshooter/v1/internal/iam_checker_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -26,7 +27,6 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/policytroubleshooter/v1/iam_checker_connection_idempotency_policy.h b/google/cloud/policytroubleshooter/v1/iam_checker_connection_idempotency_policy.h index cc7c82da4f8c6..a38d823260669 100644 --- a/google/cloud/policytroubleshooter/v1/iam_checker_connection_idempotency_policy.h +++ b/google/cloud/policytroubleshooter/v1/iam_checker_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_V1_IAM_CHECKER_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_V1_IAM_CHECKER_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/policytroubleshooter/v1/checker.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/policytroubleshooter/v1/internal/iam_checker_auth_decorator.cc b/google/cloud/policytroubleshooter/v1/internal/iam_checker_auth_decorator.cc index 4f444a2196c79..f7537cfed1d28 100644 --- a/google/cloud/policytroubleshooter/v1/internal/iam_checker_auth_decorator.cc +++ b/google/cloud/policytroubleshooter/v1/internal/iam_checker_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/policytroubleshooter/v1/checker.proto #include "google/cloud/policytroubleshooter/v1/internal/iam_checker_auth_decorator.h" -#include +#include "google/cloud/policytroubleshooter/v1/checker.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policytroubleshooter_v1_internal { @@ -45,3 +48,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace policytroubleshooter_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/policytroubleshooter/v1/internal/iam_checker_auth_decorator.h b/google/cloud/policytroubleshooter/v1/internal/iam_checker_auth_decorator.h index 3004ff8fd9fb0..17657d9e83450 100644 --- a/google/cloud/policytroubleshooter/v1/internal/iam_checker_auth_decorator.h +++ b/google/cloud/policytroubleshooter/v1/internal/iam_checker_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policytroubleshooter_v1_internal { @@ -55,4 +58,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_V1_INTERNAL_IAM_CHECKER_AUTH_DECORATOR_H diff --git a/google/cloud/policytroubleshooter/v1/internal/iam_checker_logging_decorator.cc b/google/cloud/policytroubleshooter/v1/internal/iam_checker_logging_decorator.cc index b5fd21d1b919d..e7697016d8f89 100644 --- a/google/cloud/policytroubleshooter/v1/internal/iam_checker_logging_decorator.cc +++ b/google/cloud/policytroubleshooter/v1/internal/iam_checker_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/policytroubleshooter/v1/checker.proto #include "google/cloud/policytroubleshooter/v1/internal/iam_checker_logging_decorator.h" +#include "google/cloud/policytroubleshooter/v1/checker.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policytroubleshooter_v1_internal { @@ -53,3 +56,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace policytroubleshooter_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/policytroubleshooter/v1/internal/iam_checker_logging_decorator.h b/google/cloud/policytroubleshooter/v1/internal/iam_checker_logging_decorator.h index de240f090fe79..9600d0d3b9e8e 100644 --- a/google/cloud/policytroubleshooter/v1/internal/iam_checker_logging_decorator.h +++ b/google/cloud/policytroubleshooter/v1/internal/iam_checker_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policytroubleshooter_v1_internal { @@ -55,4 +58,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_V1_INTERNAL_IAM_CHECKER_LOGGING_DECORATOR_H diff --git a/google/cloud/policytroubleshooter/v1/internal/iam_checker_metadata_decorator.cc b/google/cloud/policytroubleshooter/v1/internal/iam_checker_metadata_decorator.cc index 5fa93dcfc1f47..b295308fd6eb5 100644 --- a/google/cloud/policytroubleshooter/v1/internal/iam_checker_metadata_decorator.cc +++ b/google/cloud/policytroubleshooter/v1/internal/iam_checker_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/policytroubleshooter/v1/checker.proto #include "google/cloud/policytroubleshooter/v1/internal/iam_checker_metadata_decorator.h" +#include "google/cloud/policytroubleshooter/v1/checker.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policytroubleshooter_v1_internal { @@ -70,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace policytroubleshooter_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/policytroubleshooter/v1/internal/iam_checker_metadata_decorator.h b/google/cloud/policytroubleshooter/v1/internal/iam_checker_metadata_decorator.h index 093435eb5e221..54bcd7f405258 100644 --- a/google/cloud/policytroubleshooter/v1/internal/iam_checker_metadata_decorator.h +++ b/google/cloud/policytroubleshooter/v1/internal/iam_checker_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policytroubleshooter_v1_internal { @@ -60,4 +63,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_V1_INTERNAL_IAM_CHECKER_METADATA_DECORATOR_H diff --git a/google/cloud/policytroubleshooter/v1/internal/iam_checker_option_defaults.cc b/google/cloud/policytroubleshooter/v1/internal/iam_checker_option_defaults.cc index a2a9738671338..6d301d991a6ee 100644 --- a/google/cloud/policytroubleshooter/v1/internal/iam_checker_option_defaults.cc +++ b/google/cloud/policytroubleshooter/v1/internal/iam_checker_option_defaults.cc @@ -42,7 +42,7 @@ Options IamCheckerDefaultOptions(Options options) { if (!options.has()) { options.set( policytroubleshooter_v1::IamCheckerLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/policytroubleshooter/v1/internal/iam_checker_stub.cc b/google/cloud/policytroubleshooter/v1/internal/iam_checker_stub.cc index a53b9ecc7492e..d2bbe43d6e75a 100644 --- a/google/cloud/policytroubleshooter/v1/internal/iam_checker_stub.cc +++ b/google/cloud/policytroubleshooter/v1/internal/iam_checker_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/policytroubleshooter/v1/checker.proto #include "google/cloud/policytroubleshooter/v1/internal/iam_checker_stub.h" +#include "google/cloud/policytroubleshooter/v1/checker.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policytroubleshooter_v1_internal { @@ -48,3 +51,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace policytroubleshooter_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/policytroubleshooter/v1/internal/iam_checker_stub.h b/google/cloud/policytroubleshooter/v1/internal/iam_checker_stub.h index d756713f69cf7..3adf446e698c7 100644 --- a/google/cloud/policytroubleshooter/v1/internal/iam_checker_stub.h +++ b/google/cloud/policytroubleshooter/v1/internal/iam_checker_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_V1_INTERNAL_IAM_CHECKER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_V1_INTERNAL_IAM_CHECKER_STUB_H +#include "google/cloud/policytroubleshooter/v1/checker.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policytroubleshooter_v1_internal { @@ -68,4 +71,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_V1_INTERNAL_IAM_CHECKER_STUB_H diff --git a/google/cloud/policytroubleshooter/v1/internal/iam_checker_stub_factory.cc b/google/cloud/policytroubleshooter/v1/internal/iam_checker_stub_factory.cc index ec9c584fc1b1e..35121684af206 100644 --- a/google/cloud/policytroubleshooter/v1/internal/iam_checker_stub_factory.cc +++ b/google/cloud/policytroubleshooter/v1/internal/iam_checker_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/policytroubleshooter/v1/checker.proto #include "google/cloud/policytroubleshooter/v1/internal/iam_checker_stub_factory.h" +#include "google/cloud/policytroubleshooter/v1/checker.grpc.pb.h" #include "google/cloud/policytroubleshooter/v1/internal/iam_checker_auth_decorator.h" #include "google/cloud/policytroubleshooter/v1/internal/iam_checker_logging_decorator.h" #include "google/cloud/policytroubleshooter/v1/internal/iam_checker_metadata_decorator.h" @@ -28,10 +29,12 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policytroubleshooter_v1_internal { @@ -68,3 +71,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace policytroubleshooter_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/policytroubleshooter/v1/internal/iam_checker_stub_factory.h b/google/cloud/policytroubleshooter/v1/internal/iam_checker_stub_factory.h index 2cf71bbb317a2..2b39c6f93620b 100644 --- a/google/cloud/policytroubleshooter/v1/internal/iam_checker_stub_factory.h +++ b/google/cloud/policytroubleshooter/v1/internal/iam_checker_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policytroubleshooter_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_V1_INTERNAL_IAM_CHECKER_STUB_FACTORY_H diff --git a/google/cloud/policytroubleshooter/v1/internal/iam_checker_tracing_connection.cc b/google/cloud/policytroubleshooter/v1/internal/iam_checker_tracing_connection.cc index f53c75b2215fa..78b08e51f5c70 100644 --- a/google/cloud/policytroubleshooter/v1/internal/iam_checker_tracing_connection.cc +++ b/google/cloud/policytroubleshooter/v1/internal/iam_checker_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace policytroubleshooter_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - IamCheckerTracingConnection::IamCheckerTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -42,16 +40,12 @@ IamCheckerTracingConnection::TroubleshootIamPolicy( return internal::EndSpan(*span, child_->TroubleshootIamPolicy(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeIamCheckerTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/policytroubleshooter/v1/internal/iam_checker_tracing_connection.h b/google/cloud/policytroubleshooter/v1/internal/iam_checker_tracing_connection.h index 4bd2ba64d6052..fe05beaafa089 100644 --- a/google/cloud/policytroubleshooter/v1/internal/iam_checker_tracing_connection.h +++ b/google/cloud/policytroubleshooter/v1/internal/iam_checker_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace policytroubleshooter_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class IamCheckerTracingConnection : public policytroubleshooter_v1::IamCheckerConnection { public: @@ -50,8 +48,6 @@ class IamCheckerTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/policytroubleshooter/v1/internal/iam_checker_tracing_stub.cc b/google/cloud/policytroubleshooter/v1/internal/iam_checker_tracing_stub.cc index d52de3772f264..48e979fd3cd90 100644 --- a/google/cloud/policytroubleshooter/v1/internal/iam_checker_tracing_stub.cc +++ b/google/cloud/policytroubleshooter/v1/internal/iam_checker_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policytroubleshooter_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - IamCheckerTracingStub::IamCheckerTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -46,18 +47,14 @@ IamCheckerTracingStub::TroubleshootIamPolicy( context, *span, child_->TroubleshootIamPolicy(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeIamCheckerTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace policytroubleshooter_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/policytroubleshooter/v1/internal/iam_checker_tracing_stub.h b/google/cloud/policytroubleshooter/v1/internal/iam_checker_tracing_stub.h index 704cdd5a10450..d6fa9f171a513 100644 --- a/google/cloud/policytroubleshooter/v1/internal/iam_checker_tracing_stub.h +++ b/google/cloud/policytroubleshooter/v1/internal/iam_checker_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace policytroubleshooter_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class IamCheckerTracingStub : public IamCheckerStub { public: ~IamCheckerTracingStub() override = default; @@ -51,8 +52,6 @@ class IamCheckerTracingStub : public IamCheckerStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -67,4 +66,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_POLICYTROUBLESHOOTER_V1_INTERNAL_IAM_CHECKER_TRACING_STUB_H diff --git a/google/cloud/ports_def.inc b/google/cloud/ports_def.inc new file mode 100644 index 0000000000000..95f864fadcc6e --- /dev/null +++ b/google/cloud/ports_def.inc @@ -0,0 +1,134 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Protect Code from unwanted/inconvienet macros +// +// You must follow this pattern when #including port_def.inc in a header file: +// +// #include "other_header.h" +// #include "message.h" +// etc. +// +// #include "port_def.inc" // MUST be last header included +// +// Definitions for this header. +// +// #include "port_undef.inc" //At end of file +// +// This is a textual header with no include guard, because we want to +// detect/prohibit anytime it is #included twice without a corresponding +// #undef. + +#ifdef GOOGLE_CLOUD_CPP_PORT_ +#error "port_def.inc included multiple times" +#endif +#define GOOGLE_CLOUD_CPP_PORT_ + + +// Windows declares several inconvenient macro names. We #undef them and then +// restore them in port_undef.inc. +#ifdef _WIN32 +#pragma push_macro("CompareString") +#undef CompareString +#pragma push_macro("CREATE_NEW") +#undef CREATE_NEW +#pragma push_macro("DELETE") +#undef DELETE +#pragma push_macro("DOUBLE_CLICK") +#undef DOUBLE_CLICK +#pragma push_macro("ERROR") +#undef ERROR +#pragma push_macro("ERROR_BUSY") +#undef ERROR_BUSY +#pragma push_macro("ERROR_INSTALL_FAILED") +#undef ERROR_INSTALL_FAILED +#pragma push_macro("ERROR_NOT_FOUND") +#undef ERROR_NOT_FOUND +#pragma push_macro("ERROR_RETRY") +#undef ERROR_RETRY +#pragma push_macro("ERROR_TIMEOUT") +#undef ERROR_TIMEOUT +#pragma push_macro("GetClassName") +#undef GetClassName +#pragma push_macro("GetCurrentTime") +#undef GetCurrentTime +#pragma push_macro("GetMessage") +#undef GetMessage +#pragma push_macro("GetObject") +#undef GetObject +#pragma push_macro("IGNORE") +#undef IGNORE +#pragma push_macro("IN") +#undef IN +#pragma push_macro("INPUT_KEYBOARD") +#undef INPUT_KEYBOARD +#pragma push_macro("NO_ERROR") +#undef NO_ERROR +#pragma push_macro("OUT") +#undef OUT +#pragma push_macro("OPTIONAL") +#undef OPTIONAL +#pragma push_macro("min") +#undef min +#pragma push_macro("max") +#undef max +#pragma push_macro("NEAR") +#undef NEAR +#pragma push_macro("NO_DATA") +#undef NO_DATA +#pragma push_macro("REASON_UNKNOWN") +#undef REASON_UNKNOWN +#pragma push_macro("SERVICE_DISABLED") +#undef SERVICE_DISABLED +#pragma push_macro("SERVICE_STOP") +#undef SERVICE_STOP +#pragma push_macro("SEVERITY_ERROR") +#undef SEVERITY_ERROR +#pragma push_macro("STATUS_PENDING") +#undef STATUS_PENDING +#pragma push_macro("STRICT") +#undef STRICT +#pragma push_macro("timezone") +#undef timezone +#pragma push_macro("TRUE") +#undef TRUE +#pragma push_macro("FALSE") +#undef FALSE +#pragma push_macro("UNICODE") +#undef UNICODE +#endif // _WIN32 + +#ifdef __APPLE__ +// Inconvenient macro names from /usr/include/mach/boolean.h in some macOS SDKs. +#pragma push_macro("TRUE") +#undef TRUE +#pragma push_macro("FALSE") +#undef FALSE +// Inconvenient macro names from usr/include/sys/syslimits.h in some macOS SDKs. +#pragma push_macro("UID_MAX") +#undef UID_MAX +#pragma push_macro("GID_MAX") +#undef GID_MAX +// TYPE_BOOL is defined in the MacOS's ConditionalMacros.h. +#pragma push_macro("TYPE_BOOL") +#undef TYPE_BOOL +#endif // __APPLE__ + +#if defined(ANDROID) || defined(__ANDROID__) +// Inconvenient macro names from usr/include/limits.h in some Android NDKs. +#pragma push_macro("UID_MAX") +#undef UID_MAX +#pragma push_macro("GID_MAX") +#undef GID_MAX +#endif // defined(ANDROID) || defined(__ANDROID__) diff --git a/google/cloud/ports_undef.inc b/google/cloud/ports_undef.inc new file mode 100644 index 0000000000000..2bbe11b62dc41 --- /dev/null +++ b/google/cloud/ports_undef.inc @@ -0,0 +1,72 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// #undefs all macros defined in port_def.inc. See comments in port_def.inc +// for more info. + + +#ifndef GOOGLE_CLOUD_CPP_PORT_ +#error "port_undef.inc must be included after port_def.inc" +#endif +#undef GOOGLE_CLOUD_CPP_PORT_ + +#ifdef _WIN32 +#pragma pop_macro("CompareString") +#pragma pop_macro("CREATE_NEW") +#pragma pop_macro("DELETE") +#pragma pop_macro("DOUBLE_CLICK") +#pragma pop_macro("ERROR") +#pragma pop_macro("ERROR_BUSY") +#pragma pop_macro("ERROR_INSTALL_FAILED") +#pragma pop_macro("ERROR_NOT_FOUND") +#pragma pop_macro("ERROR_RETRY") +#pragma pop_macro("ERROR_TIMEOUT") +#pragma pop_macro("GetClassName") +#pragma pop_macro("GetCurrentTime") +#pragma pop_macro("GetMessage") +#pragma pop_macro("GetObject") +#pragma pop_macro("IGNORE") +#pragma pop_macro("IN") +#pragma pop_macro("INPUT_KEYBOARD") +#pragma pop_macro("NO_ERROR") +#pragma pop_macro("OUT") +#pragma pop_macro("OPTIONAL") +#pragma pop_macro("min") +#pragma pop_macro("max") +#pragma pop_macro("NEAR") +#pragma pop_macro("NO_DATA") +#pragma pop_macro("REASON_UNKNOWN") +#pragma pop_macro("SERVICE_DISABLED") +#pragma pop_macro("SERVICE_STOP") +#pragma pop_macro("SEVERITY_ERROR") +#pragma pop_macro("STRICT") +#pragma pop_macro("STATUS_PENDING") +#pragma pop_macro("timezone") +#pragma pop_macro("TRUE") +#pragma pop_macro("FALSE") +#pragma pop_macro("UNICODE") +#endif + +#ifdef __APPLE__ +#pragma pop_macro("TRUE") +#pragma pop_macro("FALSE") +#pragma pop_macro("UID_MAX") +#pragma pop_macro("GID_MAX") +#pragma pop_macro("TYPE_BOOL") +#endif // __APPLE__ + +#if defined(ANDROID) || defined(__ANDROID__) +#pragma pop_macro("UID_MAX") +#pragma pop_macro("GID_MAX") +#endif // defined(ANDROID) || defined(__ANDROID__) diff --git a/google/cloud/privateca/BUILD.bazel b/google/cloud/privateca/BUILD.bazel index 29cee95745b6e..3d4b326a2b0d6 100644 --- a/google/cloud/privateca/BUILD.bazel +++ b/google/cloud/privateca/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/security/privateca/v1:privateca_cc_grpc", + "@googleapis//google/cloud/security/privateca/v1:privateca_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/privateca/CMakeLists.txt b/google/cloud/privateca/CMakeLists.txt index baf9739bc4be7..9ee045b49ed69 100644 --- a/google/cloud/privateca/CMakeLists.txt +++ b/google/cloud/privateca/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(privateca "Certificate Authority API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(privateca_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/privateca/certificate_authority_client.h b/google/cloud/privateca/certificate_authority_client.h deleted file mode 100644 index 36517ae3ee350..0000000000000 --- a/google/cloud/privateca/certificate_authority_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/security/privateca/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVATECA_CERTIFICATE_AUTHORITY_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVATECA_CERTIFICATE_AUTHORITY_CLIENT_H - -#include "google/cloud/privateca/certificate_authority_connection.h" -#include "google/cloud/privateca/v1/certificate_authority_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in privateca_v1 instead of the aliases defined in -/// this namespace. -namespace privateca { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use privateca_v1::CertificateAuthorityServiceClient directly. -using ::google::cloud::privateca_v1::CertificateAuthorityServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace privateca -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVATECA_CERTIFICATE_AUTHORITY_CLIENT_H diff --git a/google/cloud/privateca/certificate_authority_connection.h b/google/cloud/privateca/certificate_authority_connection.h deleted file mode 100644 index a22893840c7a1..0000000000000 --- a/google/cloud/privateca/certificate_authority_connection.h +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/security/privateca/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVATECA_CERTIFICATE_AUTHORITY_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVATECA_CERTIFICATE_AUTHORITY_CONNECTION_H - -#include "google/cloud/privateca/certificate_authority_connection_idempotency_policy.h" -#include "google/cloud/privateca/v1/certificate_authority_connection.h" - -namespace google { -namespace cloud { -namespace privateca { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use privateca_v1::MakeCertificateAuthorityServiceConnection -/// directly. -using ::google::cloud::privateca_v1::MakeCertificateAuthorityServiceConnection; - -/// @deprecated Use privateca_v1::CertificateAuthorityServiceConnection -/// directly. -using ::google::cloud::privateca_v1::CertificateAuthorityServiceConnection; - -/// @deprecated Use -/// privateca_v1::CertificateAuthorityServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::privateca_v1:: - CertificateAuthorityServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use -/// privateca_v1::CertificateAuthorityServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::privateca_v1:: - CertificateAuthorityServiceLimitedTimeRetryPolicy; - -/// @deprecated Use privateca_v1::CertificateAuthorityServiceRetryPolicy -/// directly. -using ::google::cloud::privateca_v1::CertificateAuthorityServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace privateca -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVATECA_CERTIFICATE_AUTHORITY_CONNECTION_H diff --git a/google/cloud/privateca/certificate_authority_connection_idempotency_policy.h b/google/cloud/privateca/certificate_authority_connection_idempotency_policy.h deleted file mode 100644 index 656a527afb375..0000000000000 --- a/google/cloud/privateca/certificate_authority_connection_idempotency_policy.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/security/privateca/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVATECA_CERTIFICATE_AUTHORITY_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVATECA_CERTIFICATE_AUTHORITY_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/privateca/v1/certificate_authority_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace privateca { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// privateca_v1::MakeDefaultCertificateAuthorityServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::privateca_v1:: - MakeDefaultCertificateAuthorityServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// privateca_v1::CertificateAuthorityServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::privateca_v1:: - CertificateAuthorityServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace privateca -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVATECA_CERTIFICATE_AUTHORITY_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/privateca/certificate_authority_options.h b/google/cloud/privateca/certificate_authority_options.h deleted file mode 100644 index 8d5231bf40444..0000000000000 --- a/google/cloud/privateca/certificate_authority_options.h +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/security/privateca/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVATECA_CERTIFICATE_AUTHORITY_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVATECA_CERTIFICATE_AUTHORITY_OPTIONS_H - -#include "google/cloud/privateca/certificate_authority_connection.h" -#include "google/cloud/privateca/certificate_authority_connection_idempotency_policy.h" -#include "google/cloud/privateca/v1/certificate_authority_options.h" - -namespace google { -namespace cloud { -namespace privateca { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use privateca_v1::CertificateAuthorityServicePollingPolicyOption -/// directly. -using ::google::cloud::privateca_v1:: - CertificateAuthorityServicePollingPolicyOption; - -/// @deprecated Use privateca_v1::CertificateAuthorityServiceBackoffPolicyOption -/// directly. -using ::google::cloud::privateca_v1:: - CertificateAuthorityServiceBackoffPolicyOption; - -/// @deprecated Use -/// privateca_v1::CertificateAuthorityServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::privateca_v1:: - CertificateAuthorityServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use privateca_v1::CertificateAuthorityServicePolicyOptionList -/// directly. -using ::google::cloud::privateca_v1:: - CertificateAuthorityServicePolicyOptionList; - -/// @deprecated Use privateca_v1::CertificateAuthorityServiceRetryPolicyOption -/// directly. -using ::google::cloud::privateca_v1:: - CertificateAuthorityServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace privateca -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVATECA_CERTIFICATE_AUTHORITY_OPTIONS_H diff --git a/google/cloud/privateca/mocks/mock_certificate_authority_connection.h b/google/cloud/privateca/mocks/mock_certificate_authority_connection.h deleted file mode 100644 index bd949536be573..0000000000000 --- a/google/cloud/privateca/mocks/mock_certificate_authority_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/security/privateca/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVATECA_MOCKS_MOCK_CERTIFICATE_AUTHORITY_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVATECA_MOCKS_MOCK_CERTIFICATE_AUTHORITY_CONNECTION_H - -#include "google/cloud/privateca/certificate_authority_connection.h" -#include "google/cloud/privateca/v1/mocks/mock_certificate_authority_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in privateca_v1_mocks instead of the aliases -/// defined in this namespace. -namespace privateca_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// privateca_v1_mocks::MockCertificateAuthorityServiceConnection directly. -using ::google::cloud::privateca_v1_mocks:: - MockCertificateAuthorityServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace privateca_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVATECA_MOCKS_MOCK_CERTIFICATE_AUTHORITY_CONNECTION_H diff --git a/google/cloud/privateca/quickstart/.bazelrc b/google/cloud/privateca/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/privateca/quickstart/.bazelrc +++ b/google/cloud/privateca/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/privateca/quickstart/CMakeLists.txt b/google/cloud/privateca/quickstart/CMakeLists.txt index c7c5f32a9ad44..9ddfb6803b742 100644 --- a/google/cloud/privateca/quickstart/CMakeLists.txt +++ b/google/cloud/privateca/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Certificate Authority API C++ client library # from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-privateca-quickstart CXX) find_package(google_cloud_cpp_privateca REQUIRED) diff --git a/google/cloud/privateca/v1/certificate_authority_client.h b/google/cloud/privateca/v1/certificate_authority_client.h index 929061c81a0e3..62155d3937a24 100644 --- a/google/cloud/privateca/v1/certificate_authority_client.h +++ b/google/cloud/privateca/v1/certificate_authority_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/privateca/v1/certificate_authority_connection.h b/google/cloud/privateca/v1/certificate_authority_connection.h index 1a2c5cfa80b3e..af19ef51006ca 100644 --- a/google/cloud/privateca/v1/certificate_authority_connection.h +++ b/google/cloud/privateca/v1/certificate_authority_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/privateca/v1/certificate_authority_connection_idempotency_policy.h" #include "google/cloud/privateca/v1/internal/certificate_authority_retry_traits.h" +#include "google/cloud/security/privateca/v1/service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/privateca/v1/certificate_authority_connection_idempotency_policy.h b/google/cloud/privateca/v1/certificate_authority_connection_idempotency_policy.h index 3a04c0021de40..5fadcc300ca2b 100644 --- a/google/cloud/privateca/v1/certificate_authority_connection_idempotency_policy.h +++ b/google/cloud/privateca/v1/certificate_authority_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVATECA_V1_CERTIFICATE_AUTHORITY_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVATECA_V1_CERTIFICATE_AUTHORITY_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/security/privateca/v1/service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/privateca/v1/internal/certificate_authority_auth_decorator.cc b/google/cloud/privateca/v1/internal/certificate_authority_auth_decorator.cc index fe25633cd3c02..53a57618955a7 100644 --- a/google/cloud/privateca/v1/internal/certificate_authority_auth_decorator.cc +++ b/google/cloud/privateca/v1/internal/certificate_authority_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/security/privateca/v1/service.proto #include "google/cloud/privateca/v1/internal/certificate_authority_auth_decorator.h" -#include +#include "google/cloud/security/privateca/v1/service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace privateca_v1_internal { @@ -734,3 +737,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace privateca_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/privateca/v1/internal/certificate_authority_auth_decorator.h b/google/cloud/privateca/v1/internal/certificate_authority_auth_decorator.h index cd7dad2153119..07b065ce5aa31 100644 --- a/google/cloud/privateca/v1/internal/certificate_authority_auth_decorator.h +++ b/google/cloud/privateca/v1/internal/certificate_authority_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/privateca/v1/internal/certificate_authority_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace privateca_v1_internal { @@ -367,4 +370,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVATECA_V1_INTERNAL_CERTIFICATE_AUTHORITY_AUTH_DECORATOR_H diff --git a/google/cloud/privateca/v1/internal/certificate_authority_connection_impl.h b/google/cloud/privateca/v1/internal/certificate_authority_connection_impl.h index 9a6cc20097414..8396c0de3a0c6 100644 --- a/google/cloud/privateca/v1/internal/certificate_authority_connection_impl.h +++ b/google/cloud/privateca/v1/internal/certificate_authority_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/privateca/v1/internal/certificate_authority_logging_decorator.cc b/google/cloud/privateca/v1/internal/certificate_authority_logging_decorator.cc index f0cb3dd30b154..002980f9e8b0c 100644 --- a/google/cloud/privateca/v1/internal/certificate_authority_logging_decorator.cc +++ b/google/cloud/privateca/v1/internal/certificate_authority_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/security/privateca/v1/service.proto #include "google/cloud/privateca/v1/internal/certificate_authority_logging_decorator.h" +#include "google/cloud/security/privateca/v1/service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace privateca_v1_internal { @@ -872,3 +875,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace privateca_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/privateca/v1/internal/certificate_authority_logging_decorator.h b/google/cloud/privateca/v1/internal/certificate_authority_logging_decorator.h index 48c040ecd60b4..7905632424ce5 100644 --- a/google/cloud/privateca/v1/internal/certificate_authority_logging_decorator.h +++ b/google/cloud/privateca/v1/internal/certificate_authority_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/privateca/v1/internal/certificate_authority_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace privateca_v1_internal { @@ -368,4 +371,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVATECA_V1_INTERNAL_CERTIFICATE_AUTHORITY_LOGGING_DECORATOR_H diff --git a/google/cloud/privateca/v1/internal/certificate_authority_metadata_decorator.cc b/google/cloud/privateca/v1/internal/certificate_authority_metadata_decorator.cc index 0c48c924d077d..f10bb41b10dc8 100644 --- a/google/cloud/privateca/v1/internal/certificate_authority_metadata_decorator.cc +++ b/google/cloud/privateca/v1/internal/certificate_authority_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/security/privateca/v1/service.proto #include "google/cloud/privateca/v1/internal/certificate_authority_metadata_decorator.h" +#include "google/cloud/security/privateca/v1/service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace privateca_v1_internal { @@ -655,3 +659,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace privateca_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/privateca/v1/internal/certificate_authority_metadata_decorator.h b/google/cloud/privateca/v1/internal/certificate_authority_metadata_decorator.h index 9610e87e8c6ec..c4dd13d6fe3ac 100644 --- a/google/cloud/privateca/v1/internal/certificate_authority_metadata_decorator.h +++ b/google/cloud/privateca/v1/internal/certificate_authority_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/privateca/v1/internal/certificate_authority_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace privateca_v1_internal { @@ -374,4 +377,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVATECA_V1_INTERNAL_CERTIFICATE_AUTHORITY_METADATA_DECORATOR_H diff --git a/google/cloud/privateca/v1/internal/certificate_authority_option_defaults.cc b/google/cloud/privateca/v1/internal/certificate_authority_option_defaults.cc index 652a472e52ead..a4d4aeec2dc6b 100644 --- a/google/cloud/privateca/v1/internal/certificate_authority_option_defaults.cc +++ b/google/cloud/privateca/v1/internal/certificate_authority_option_defaults.cc @@ -44,7 +44,7 @@ Options CertificateAuthorityServiceDefaultOptions(Options options) { .has()) { options.set( privateca_v1::CertificateAuthorityServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/privateca/v1/internal/certificate_authority_stub.cc b/google/cloud/privateca/v1/internal/certificate_authority_stub.cc index 031ecf7f19179..99bea054c59df 100644 --- a/google/cloud/privateca/v1/internal/certificate_authority_stub.cc +++ b/google/cloud/privateca/v1/internal/certificate_authority_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/security/privateca/v1/service.proto #include "google/cloud/privateca/v1/internal/certificate_authority_stub.h" +#include "google/cloud/security/privateca/v1/service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace privateca_v1_internal { @@ -870,3 +873,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace privateca_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/privateca/v1/internal/certificate_authority_stub.h b/google/cloud/privateca/v1/internal/certificate_authority_stub.h index 0534b8d544347..ff8cc515bd649 100644 --- a/google/cloud/privateca/v1/internal/certificate_authority_stub.h +++ b/google/cloud/privateca/v1/internal/certificate_authority_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVATECA_V1_INTERNAL_CERTIFICATE_AUTHORITY_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVATECA_V1_INTERNAL_CERTIFICATE_AUTHORITY_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/security/privateca/v1/service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace privateca_v1_internal { @@ -715,4 +718,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVATECA_V1_INTERNAL_CERTIFICATE_AUTHORITY_STUB_H diff --git a/google/cloud/privateca/v1/internal/certificate_authority_stub_factory.cc b/google/cloud/privateca/v1/internal/certificate_authority_stub_factory.cc index fa19f151038ef..979fa0686e906 100644 --- a/google/cloud/privateca/v1/internal/certificate_authority_stub_factory.cc +++ b/google/cloud/privateca/v1/internal/certificate_authority_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/security/privateca/v1/service.proto #include "google/cloud/privateca/v1/internal/certificate_authority_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/privateca/v1/internal/certificate_authority_auth_decorator.h" #include "google/cloud/privateca/v1/internal/certificate_authority_logging_decorator.h" #include "google/cloud/privateca/v1/internal/certificate_authority_metadata_decorator.h" #include "google/cloud/privateca/v1/internal/certificate_authority_stub.h" #include "google/cloud/privateca/v1/internal/certificate_authority_tracing_stub.h" +#include "google/cloud/security/privateca/v1/service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace privateca_v1_internal { @@ -79,3 +82,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace privateca_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/privateca/v1/internal/certificate_authority_stub_factory.h b/google/cloud/privateca/v1/internal/certificate_authority_stub_factory.h index 23f83c7a732a0..1eca1b11f3c7c 100644 --- a/google/cloud/privateca/v1/internal/certificate_authority_stub_factory.h +++ b/google/cloud/privateca/v1/internal/certificate_authority_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace privateca_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVATECA_V1_INTERNAL_CERTIFICATE_AUTHORITY_STUB_FACTORY_H diff --git a/google/cloud/privateca/v1/internal/certificate_authority_tracing_connection.cc b/google/cloud/privateca/v1/internal/certificate_authority_tracing_connection.cc index 789e9777ba9ef..9b861ce343796 100644 --- a/google/cloud/privateca/v1/internal/certificate_authority_tracing_connection.cc +++ b/google/cloud/privateca/v1/internal/certificate_authority_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace privateca_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CertificateAuthorityServiceTracingConnection:: CertificateAuthorityServiceTracingConnection( std::shared_ptr @@ -768,17 +766,13 @@ Status CertificateAuthorityServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCertificateAuthorityServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/privateca/v1/internal/certificate_authority_tracing_connection.h b/google/cloud/privateca/v1/internal/certificate_authority_tracing_connection.h index c8f798031b3b6..28f66f044d494 100644 --- a/google/cloud/privateca/v1/internal/certificate_authority_tracing_connection.h +++ b/google/cloud/privateca/v1/internal/certificate_authority_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace privateca_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CertificateAuthorityServiceTracingConnection : public privateca_v1::CertificateAuthorityServiceConnection { public: @@ -335,8 +333,6 @@ class CertificateAuthorityServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/privateca/v1/internal/certificate_authority_tracing_stub.cc b/google/cloud/privateca/v1/internal/certificate_authority_tracing_stub.cc index f49dc0d4d4675..7634f269381c8 100644 --- a/google/cloud/privateca/v1/internal/certificate_authority_tracing_stub.cc +++ b/google/cloud/privateca/v1/internal/certificate_authority_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace privateca_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CertificateAuthorityServiceTracingStub::CertificateAuthorityServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -836,20 +837,16 @@ future CertificateAuthorityServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCertificateAuthorityServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared( std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace privateca_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/privateca/v1/internal/certificate_authority_tracing_stub.h b/google/cloud/privateca/v1/internal/certificate_authority_tracing_stub.h index c2479ca20be69..57b9fa082648c 100644 --- a/google/cloud/privateca/v1/internal/certificate_authority_tracing_stub.h +++ b/google/cloud/privateca/v1/internal/certificate_authority_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace privateca_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CertificateAuthorityServiceTracingStub : public CertificateAuthorityServiceStub { public: @@ -364,8 +365,6 @@ class CertificateAuthorityServiceTracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -381,4 +380,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVATECA_V1_INTERNAL_CERTIFICATE_AUTHORITY_TRACING_STUB_H diff --git a/google/cloud/privilegedaccessmanager/BUILD.bazel b/google/cloud/privilegedaccessmanager/BUILD.bazel index 1ffb42a150823..7365bc58b1b46 100644 --- a/google/cloud/privilegedaccessmanager/BUILD.bazel +++ b/google/cloud/privilegedaccessmanager/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/privilegedaccessmanager/v1:privilegedaccessmanager_cc_grpc", + "@googleapis//google/cloud/privilegedaccessmanager/v1:privilegedaccessmanager_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/privilegedaccessmanager/quickstart/.bazelrc b/google/cloud/privilegedaccessmanager/quickstart/.bazelrc index 15d5c055db074..343e7f623d628 100644 --- a/google/cloud/privilegedaccessmanager/quickstart/.bazelrc +++ b/google/cloud/privilegedaccessmanager/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/privilegedaccessmanager/quickstart/CMakeLists.txt b/google/cloud/privilegedaccessmanager/quickstart/CMakeLists.txt index e91d013cd24fd..2f5341ac9f9e2 100644 --- a/google/cloud/privilegedaccessmanager/quickstart/CMakeLists.txt +++ b/google/cloud/privilegedaccessmanager/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Privileged Access Manager API C++ client # library from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-privilegedaccessmanager-quickstart CXX) find_package(google_cloud_cpp_privilegedaccessmanager REQUIRED) diff --git a/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_auth_decorator.cc b/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_auth_decorator.cc index d1a5a189b06e7..ebc3e77f3c503 100644 --- a/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_auth_decorator.cc +++ b/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/privilegedaccessmanager/v1/privilegedaccessmanager.proto #include "google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_auth_decorator.h" -#include +#include "google/cloud/privilegedaccessmanager/v1/privilegedaccessmanager.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace privilegedaccessmanager_v1_internal { @@ -340,3 +343,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace privilegedaccessmanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_auth_decorator.h b/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_auth_decorator.h index d2dfa06d860a4..825adabea0998 100644 --- a/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_auth_decorator.h +++ b/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace privilegedaccessmanager_v1_internal { @@ -186,4 +189,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVILEGEDACCESSMANAGER_V1_INTERNAL_PRIVILEGED_ACCESS_MANAGER_AUTH_DECORATOR_H diff --git a/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_connection_impl.h b/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_connection_impl.h index 957b820ee3cc1..2150324da044f 100644 --- a/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_connection_impl.h +++ b/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_logging_decorator.cc b/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_logging_decorator.cc index cc6ea775e3e64..31b55c3d9032d 100644 --- a/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_logging_decorator.cc +++ b/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/privilegedaccessmanager/v1/privilegedaccessmanager.proto #include "google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_logging_decorator.h" +#include "google/cloud/privilegedaccessmanager/v1/privilegedaccessmanager.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace privilegedaccessmanager_v1_internal { @@ -416,3 +419,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace privilegedaccessmanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_logging_decorator.h b/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_logging_decorator.h index 9f2bac0bb432d..0b8720e3998a1 100644 --- a/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_logging_decorator.h +++ b/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace privilegedaccessmanager_v1_internal { @@ -186,4 +189,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVILEGEDACCESSMANAGER_V1_INTERNAL_PRIVILEGED_ACCESS_MANAGER_LOGGING_DECORATOR_H diff --git a/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_metadata_decorator.cc b/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_metadata_decorator.cc index 833e70f44c21a..5f8d201e40bd5 100644 --- a/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_metadata_decorator.cc +++ b/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/privilegedaccessmanager/v1/privilegedaccessmanager.proto #include "google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_metadata_decorator.h" +#include "google/cloud/privilegedaccessmanager/v1/privilegedaccessmanager.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace privilegedaccessmanager_v1_internal { @@ -323,3 +327,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace privilegedaccessmanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_metadata_decorator.h b/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_metadata_decorator.h index 2b1cfaf0bee83..7eaa3989b73da 100644 --- a/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_metadata_decorator.h +++ b/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace privilegedaccessmanager_v1_internal { @@ -192,4 +195,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVILEGEDACCESSMANAGER_V1_INTERNAL_PRIVILEGED_ACCESS_MANAGER_METADATA_DECORATOR_H diff --git a/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_option_defaults.cc b/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_option_defaults.cc index 149de337f45fb..22085b42b664a 100644 --- a/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_option_defaults.cc +++ b/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_option_defaults.cc @@ -45,7 +45,7 @@ Options PrivilegedAccessManagerDefaultOptions(Options options) { privilegedaccessmanager_v1::PrivilegedAccessManagerRetryPolicyOption>( privilegedaccessmanager_v1:: PrivilegedAccessManagerLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace privilegedaccessmanager_v1_internal { @@ -399,3 +402,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace privilegedaccessmanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_stub.h b/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_stub.h index e55f83bbec289..e02cf6f08326d 100644 --- a/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_stub.h +++ b/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVILEGEDACCESSMANAGER_V1_INTERNAL_PRIVILEGED_ACCESS_MANAGER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVILEGEDACCESSMANAGER_V1_INTERNAL_PRIVILEGED_ACCESS_MANAGER_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/privilegedaccessmanager/v1/privilegedaccessmanager.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace privilegedaccessmanager_v1_internal { @@ -348,4 +351,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVILEGEDACCESSMANAGER_V1_INTERNAL_PRIVILEGED_ACCESS_MANAGER_STUB_H diff --git a/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_stub_factory.cc b/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_stub_factory.cc index d91388269d307..a2522f945bf9f 100644 --- a/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_stub_factory.cc +++ b/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/privilegedaccessmanager/v1/privilegedaccessmanager.proto #include "google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_auth_decorator.h" #include "google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_logging_decorator.h" #include "google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_metadata_decorator.h" #include "google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_stub.h" #include "google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_tracing_stub.h" +#include "google/cloud/privilegedaccessmanager/v1/privilegedaccessmanager.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace privilegedaccessmanager_v1_internal { @@ -76,3 +79,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace privilegedaccessmanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_stub_factory.h b/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_stub_factory.h index adc878f81de92..762293f45ce03 100644 --- a/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_stub_factory.h +++ b/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace privilegedaccessmanager_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVILEGEDACCESSMANAGER_V1_INTERNAL_PRIVILEGED_ACCESS_MANAGER_STUB_FACTORY_H diff --git a/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_tracing_connection.cc b/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_tracing_connection.cc index 380bda1a82332..eb646dabf3b43 100644 --- a/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_tracing_connection.cc +++ b/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace privilegedaccessmanager_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PrivilegedAccessManagerTracingConnection:: PrivilegedAccessManagerTracingConnection( std::shared_ptr< @@ -348,19 +346,15 @@ Status PrivilegedAccessManagerTracingConnection::DeleteOperation( return internal::EndSpan(*span, child_->DeleteOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePrivilegedAccessManagerTracingConnection( std::shared_ptr< privilegedaccessmanager_v1::PrivilegedAccessManagerConnection> conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_tracing_connection.h b/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_tracing_connection.h index 7ada0382aee46..d646fadeef0fd 100644 --- a/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_tracing_connection.h +++ b/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace privilegedaccessmanager_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PrivilegedAccessManagerTracingConnection : public privilegedaccessmanager_v1::PrivilegedAccessManagerConnection { public: @@ -153,8 +151,6 @@ class PrivilegedAccessManagerTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_tracing_stub.cc b/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_tracing_stub.cc index 5e55b66fcb6d2..a20d9daffa721 100644 --- a/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_tracing_stub.cc +++ b/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace privilegedaccessmanager_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PrivilegedAccessManagerTracingStub::PrivilegedAccessManagerTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -388,19 +389,15 @@ future PrivilegedAccessManagerTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePrivilegedAccessManagerTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace privilegedaccessmanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_tracing_stub.h b/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_tracing_stub.h index 5dae464e45898..96954f1170019 100644 --- a/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_tracing_stub.h +++ b/google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace privilegedaccessmanager_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PrivilegedAccessManagerTracingStub : public PrivilegedAccessManagerStub { public: ~PrivilegedAccessManagerTracingStub() override = default; @@ -182,8 +183,6 @@ class PrivilegedAccessManagerTracingStub : public PrivilegedAccessManagerStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -199,4 +198,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVILEGEDACCESSMANAGER_V1_INTERNAL_PRIVILEGED_ACCESS_MANAGER_TRACING_STUB_H diff --git a/google/cloud/privilegedaccessmanager/v1/privileged_access_manager_client.h b/google/cloud/privilegedaccessmanager/v1/privileged_access_manager_client.h index c673e86ffd07c..e4ee8797618dd 100644 --- a/google/cloud/privilegedaccessmanager/v1/privileged_access_manager_client.h +++ b/google/cloud/privilegedaccessmanager/v1/privileged_access_manager_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/privilegedaccessmanager/v1/privileged_access_manager_connection.h b/google/cloud/privilegedaccessmanager/v1/privileged_access_manager_connection.h index cfe6186289f05..6ee60a56f0056 100644 --- a/google/cloud/privilegedaccessmanager/v1/privileged_access_manager_connection.h +++ b/google/cloud/privilegedaccessmanager/v1/privileged_access_manager_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/privilegedaccessmanager/v1/internal/privileged_access_manager_retry_traits.h" #include "google/cloud/privilegedaccessmanager/v1/privileged_access_manager_connection_idempotency_policy.h" +#include "google/cloud/privilegedaccessmanager/v1/privilegedaccessmanager.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/privilegedaccessmanager/v1/privileged_access_manager_connection_idempotency_policy.h b/google/cloud/privilegedaccessmanager/v1/privileged_access_manager_connection_idempotency_policy.h index b660bb80371ca..fdc39dc336632 100644 --- a/google/cloud/privilegedaccessmanager/v1/privileged_access_manager_connection_idempotency_policy.h +++ b/google/cloud/privilegedaccessmanager/v1/privileged_access_manager_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVILEGEDACCESSMANAGER_V1_PRIVILEGED_ACCESS_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PRIVILEGEDACCESSMANAGER_V1_PRIVILEGED_ACCESS_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/privilegedaccessmanager/v1/privilegedaccessmanager.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/profiler/BUILD.bazel b/google/cloud/profiler/BUILD.bazel index 119caf92bff1f..71088d661fe0f 100644 --- a/google/cloud/profiler/BUILD.bazel +++ b/google/cloud/profiler/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v2/", ] googleapis_deps = [ - "@com_google_googleapis//google/devtools/cloudprofiler/v2:cloudprofiler_cc_grpc", + "@googleapis//google/devtools/cloudprofiler/v2:cloudprofiler_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/profiler/CMakeLists.txt b/google/cloud/profiler/CMakeLists.txt index 8e952846b266b..d425d36ec276a 100644 --- a/google/cloud/profiler/CMakeLists.txt +++ b/google/cloud/profiler/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(profiler "Cloud Profiler API" - SERVICE_DIRS "__EMPTY__" "v2/") + SERVICE_DIRS "v2/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(profiler_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/profiler/mocks/mock_profiler_connection.h b/google/cloud/profiler/mocks/mock_profiler_connection.h deleted file mode 100644 index 9155164ac420e..0000000000000 --- a/google/cloud/profiler/mocks/mock_profiler_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/devtools/cloudprofiler/v2/profiler.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PROFILER_MOCKS_MOCK_PROFILER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PROFILER_MOCKS_MOCK_PROFILER_CONNECTION_H - -#include "google/cloud/profiler/profiler_connection.h" -#include "google/cloud/profiler/v2/mocks/mock_profiler_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in profiler_v2_mocks instead of the aliases -/// defined in this namespace. -namespace profiler_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use profiler_v2_mocks::MockProfilerServiceConnection directly. -using ::google::cloud::profiler_v2_mocks::MockProfilerServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace profiler_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PROFILER_MOCKS_MOCK_PROFILER_CONNECTION_H diff --git a/google/cloud/profiler/profiler_client.h b/google/cloud/profiler/profiler_client.h deleted file mode 100644 index abc6582abf525..0000000000000 --- a/google/cloud/profiler/profiler_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/devtools/cloudprofiler/v2/profiler.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PROFILER_PROFILER_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PROFILER_PROFILER_CLIENT_H - -#include "google/cloud/profiler/profiler_connection.h" -#include "google/cloud/profiler/v2/profiler_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in profiler_v2 instead of the aliases defined in -/// this namespace. -namespace profiler { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use profiler_v2::ProfilerServiceClient directly. -using ::google::cloud::profiler_v2::ProfilerServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace profiler -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PROFILER_PROFILER_CLIENT_H diff --git a/google/cloud/profiler/profiler_connection.h b/google/cloud/profiler/profiler_connection.h deleted file mode 100644 index 33e3f33aa4849..0000000000000 --- a/google/cloud/profiler/profiler_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/devtools/cloudprofiler/v2/profiler.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PROFILER_PROFILER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PROFILER_PROFILER_CONNECTION_H - -#include "google/cloud/profiler/profiler_connection_idempotency_policy.h" -#include "google/cloud/profiler/v2/profiler_connection.h" - -namespace google { -namespace cloud { -namespace profiler { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use profiler_v2::MakeProfilerServiceConnection directly. -using ::google::cloud::profiler_v2::MakeProfilerServiceConnection; - -/// @deprecated Use profiler_v2::ProfilerServiceConnection directly. -using ::google::cloud::profiler_v2::ProfilerServiceConnection; - -/// @deprecated Use profiler_v2::ProfilerServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::profiler_v2::ProfilerServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use profiler_v2::ProfilerServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::profiler_v2::ProfilerServiceLimitedTimeRetryPolicy; - -/// @deprecated Use profiler_v2::ProfilerServiceRetryPolicy directly. -using ::google::cloud::profiler_v2::ProfilerServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace profiler -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PROFILER_PROFILER_CONNECTION_H diff --git a/google/cloud/profiler/profiler_connection_idempotency_policy.h b/google/cloud/profiler/profiler_connection_idempotency_policy.h deleted file mode 100644 index 78967fe8d4a6f..0000000000000 --- a/google/cloud/profiler/profiler_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/devtools/cloudprofiler/v2/profiler.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PROFILER_PROFILER_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PROFILER_PROFILER_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/profiler/v2/profiler_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace profiler { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// profiler_v2::MakeDefaultProfilerServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::profiler_v2:: - MakeDefaultProfilerServiceConnectionIdempotencyPolicy; - -/// @deprecated Use profiler_v2::ProfilerServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::profiler_v2::ProfilerServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace profiler -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PROFILER_PROFILER_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/profiler/profiler_options.h b/google/cloud/profiler/profiler_options.h deleted file mode 100644 index 3982968ccfae6..0000000000000 --- a/google/cloud/profiler/profiler_options.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/devtools/cloudprofiler/v2/profiler.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PROFILER_PROFILER_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PROFILER_PROFILER_OPTIONS_H - -#include "google/cloud/profiler/profiler_connection.h" -#include "google/cloud/profiler/profiler_connection_idempotency_policy.h" -#include "google/cloud/profiler/v2/profiler_options.h" - -namespace google { -namespace cloud { -namespace profiler { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use profiler_v2::ProfilerServiceBackoffPolicyOption directly. -using ::google::cloud::profiler_v2::ProfilerServiceBackoffPolicyOption; - -/// @deprecated Use -/// profiler_v2::ProfilerServiceConnectionIdempotencyPolicyOption directly. -using ::google::cloud::profiler_v2:: - ProfilerServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use profiler_v2::ProfilerServicePolicyOptionList directly. -using ::google::cloud::profiler_v2::ProfilerServicePolicyOptionList; - -/// @deprecated Use profiler_v2::ProfilerServiceRetryPolicyOption directly. -using ::google::cloud::profiler_v2::ProfilerServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace profiler -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PROFILER_PROFILER_OPTIONS_H diff --git a/google/cloud/profiler/quickstart/.bazelrc b/google/cloud/profiler/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/profiler/quickstart/.bazelrc +++ b/google/cloud/profiler/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/profiler/quickstart/CMakeLists.txt b/google/cloud/profiler/quickstart/CMakeLists.txt index 049e6cc1bf984..cc74d2c53593c 100644 --- a/google/cloud/profiler/quickstart/CMakeLists.txt +++ b/google/cloud/profiler/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Profiler API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-profiler-quickstart CXX) find_package(google_cloud_cpp_profiler REQUIRED) diff --git a/google/cloud/profiler/v2/export_connection.h b/google/cloud/profiler/v2/export_connection.h index aa81ec7c35a7d..930d1f7e2fa30 100644 --- a/google/cloud/profiler/v2/export_connection.h +++ b/google/cloud/profiler/v2/export_connection.h @@ -27,7 +27,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/devtools/cloudprofiler/v2/profiler.pb.h" #include namespace google { diff --git a/google/cloud/profiler/v2/export_connection_idempotency_policy.h b/google/cloud/profiler/v2/export_connection_idempotency_policy.h index 48ee6b7590bb1..69b451070b4b5 100644 --- a/google/cloud/profiler/v2/export_connection_idempotency_policy.h +++ b/google/cloud/profiler/v2/export_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/devtools/cloudprofiler/v2/profiler.grpc.pb.h" #include namespace google { diff --git a/google/cloud/profiler/v2/internal/export_auth_decorator.cc b/google/cloud/profiler/v2/internal/export_auth_decorator.cc index a1465e9a237f0..72429f2a416bb 100644 --- a/google/cloud/profiler/v2/internal/export_auth_decorator.cc +++ b/google/cloud/profiler/v2/internal/export_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/devtools/cloudprofiler/v2/profiler.proto #include "google/cloud/profiler/v2/internal/export_auth_decorator.h" -#include +#include "google/devtools/cloudprofiler/v2/profiler.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace profiler_v2_internal { @@ -44,3 +47,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace profiler_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/profiler/v2/internal/export_auth_decorator.h b/google/cloud/profiler/v2/internal/export_auth_decorator.h index c6fa1db9eeda7..96f1d080b02a9 100644 --- a/google/cloud/profiler/v2/internal/export_auth_decorator.h +++ b/google/cloud/profiler/v2/internal/export_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace profiler_v2_internal { @@ -53,4 +56,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PROFILER_V2_INTERNAL_EXPORT_AUTH_DECORATOR_H diff --git a/google/cloud/profiler/v2/internal/export_logging_decorator.cc b/google/cloud/profiler/v2/internal/export_logging_decorator.cc index 4808c9227811d..92a7559482f37 100644 --- a/google/cloud/profiler/v2/internal/export_logging_decorator.cc +++ b/google/cloud/profiler/v2/internal/export_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/profiler/v2/internal/export_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/devtools/cloudprofiler/v2/profiler.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace profiler_v2_internal { @@ -52,3 +55,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace profiler_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/profiler/v2/internal/export_logging_decorator.h b/google/cloud/profiler/v2/internal/export_logging_decorator.h index a441984ae488d..a4a5c075e542b 100644 --- a/google/cloud/profiler/v2/internal/export_logging_decorator.h +++ b/google/cloud/profiler/v2/internal/export_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace profiler_v2_internal { @@ -53,4 +56,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PROFILER_V2_INTERNAL_EXPORT_LOGGING_DECORATOR_H diff --git a/google/cloud/profiler/v2/internal/export_metadata_decorator.cc b/google/cloud/profiler/v2/internal/export_metadata_decorator.cc index 7dae9d3a09406..e8d31066d2b12 100644 --- a/google/cloud/profiler/v2/internal/export_metadata_decorator.cc +++ b/google/cloud/profiler/v2/internal/export_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/profiler/v2/internal/export_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/devtools/cloudprofiler/v2/profiler.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace profiler_v2_internal { @@ -70,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace profiler_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/profiler/v2/internal/export_metadata_decorator.h b/google/cloud/profiler/v2/internal/export_metadata_decorator.h index 5037abc24b4fe..2a646b21c1c81 100644 --- a/google/cloud/profiler/v2/internal/export_metadata_decorator.h +++ b/google/cloud/profiler/v2/internal/export_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace profiler_v2_internal { @@ -58,4 +61,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PROFILER_V2_INTERNAL_EXPORT_METADATA_DECORATOR_H diff --git a/google/cloud/profiler/v2/internal/export_option_defaults.cc b/google/cloud/profiler/v2/internal/export_option_defaults.cc index 4aadb8c2eb267..fefa2cbc80b74 100644 --- a/google/cloud/profiler/v2/internal/export_option_defaults.cc +++ b/google/cloud/profiler/v2/internal/export_option_defaults.cc @@ -42,7 +42,7 @@ Options ExportServiceDefaultOptions(Options options) { if (!options.has()) { options.set( profiler_v2::ExportServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/profiler/v2/internal/export_stub.cc b/google/cloud/profiler/v2/internal/export_stub.cc index 724684790e81f..9ee42ff2aa83d 100644 --- a/google/cloud/profiler/v2/internal/export_stub.cc +++ b/google/cloud/profiler/v2/internal/export_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/profiler/v2/internal/export_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "google/devtools/cloudprofiler/v2/profiler.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace profiler_v2_internal { @@ -46,3 +49,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace profiler_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/profiler/v2/internal/export_stub.h b/google/cloud/profiler/v2/internal/export_stub.h index 89b858f46e05a..cb1fc774d25a0 100644 --- a/google/cloud/profiler/v2/internal/export_stub.h +++ b/google/cloud/profiler/v2/internal/export_stub.h @@ -22,10 +22,13 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/devtools/cloudprofiler/v2/profiler.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace profiler_v2_internal { @@ -65,4 +68,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PROFILER_V2_INTERNAL_EXPORT_STUB_H diff --git a/google/cloud/profiler/v2/internal/export_stub_factory.cc b/google/cloud/profiler/v2/internal/export_stub_factory.cc index e7f2c71e7cc09..e08dd3c4ae0fa 100644 --- a/google/cloud/profiler/v2/internal/export_stub_factory.cc +++ b/google/cloud/profiler/v2/internal/export_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/devtools/cloudprofiler/v2/profiler.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace profiler_v2_internal { @@ -69,3 +72,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace profiler_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/profiler/v2/internal/export_stub_factory.h b/google/cloud/profiler/v2/internal/export_stub_factory.h index 27184a7595d3c..25ad9568653b5 100644 --- a/google/cloud/profiler/v2/internal/export_stub_factory.h +++ b/google/cloud/profiler/v2/internal/export_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace profiler_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PROFILER_V2_INTERNAL_EXPORT_STUB_FACTORY_H diff --git a/google/cloud/profiler/v2/internal/export_tracing_connection.cc b/google/cloud/profiler/v2/internal/export_tracing_connection.cc index 65fc2ebaa49bd..56222497df3d2 100644 --- a/google/cloud/profiler/v2/internal/export_tracing_connection.cc +++ b/google/cloud/profiler/v2/internal/export_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace profiler_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ExportServiceTracingConnection::ExportServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -45,16 +43,12 @@ ExportServiceTracingConnection::ListProfiles( std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeExportServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/profiler/v2/internal/export_tracing_connection.h b/google/cloud/profiler/v2/internal/export_tracing_connection.h index af7212699f4af..c292d0c71c36b 100644 --- a/google/cloud/profiler/v2/internal/export_tracing_connection.h +++ b/google/cloud/profiler/v2/internal/export_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace profiler_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ExportServiceTracingConnection : public profiler_v2::ExportServiceConnection { public: @@ -48,8 +46,6 @@ class ExportServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/profiler/v2/internal/export_tracing_stub.cc b/google/cloud/profiler/v2/internal/export_tracing_stub.cc index d1edbe0c2118c..dbaa6436e27a3 100644 --- a/google/cloud/profiler/v2/internal/export_tracing_stub.cc +++ b/google/cloud/profiler/v2/internal/export_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace profiler_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ExportServiceTracingStub::ExportServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -44,18 +45,14 @@ ExportServiceTracingStub::ListProfiles( child_->ListProfiles(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeExportServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace profiler_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/profiler/v2/internal/export_tracing_stub.h b/google/cloud/profiler/v2/internal/export_tracing_stub.h index 59792230f938f..823ccf44ebf1a 100644 --- a/google/cloud/profiler/v2/internal/export_tracing_stub.h +++ b/google/cloud/profiler/v2/internal/export_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace profiler_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ExportServiceTracingStub : public ExportServiceStub { public: ~ExportServiceTracingStub() override = default; @@ -49,8 +50,6 @@ class ExportServiceTracingStub : public ExportServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -65,4 +64,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PROFILER_V2_INTERNAL_EXPORT_TRACING_STUB_H diff --git a/google/cloud/profiler/v2/internal/profiler_auth_decorator.cc b/google/cloud/profiler/v2/internal/profiler_auth_decorator.cc index 1d6eea2504051..2973db9ca7527 100644 --- a/google/cloud/profiler/v2/internal/profiler_auth_decorator.cc +++ b/google/cloud/profiler/v2/internal/profiler_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/devtools/cloudprofiler/v2/profiler.proto #include "google/cloud/profiler/v2/internal/profiler_auth_decorator.h" -#include +#include "google/devtools/cloudprofiler/v2/profiler.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace profiler_v2_internal { @@ -63,3 +66,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace profiler_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/profiler/v2/internal/profiler_auth_decorator.h b/google/cloud/profiler/v2/internal/profiler_auth_decorator.h index e3a4d38f63f1b..31d0bd932fea3 100644 --- a/google/cloud/profiler/v2/internal/profiler_auth_decorator.h +++ b/google/cloud/profiler/v2/internal/profiler_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace profiler_v2_internal { @@ -63,4 +66,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PROFILER_V2_INTERNAL_PROFILER_AUTH_DECORATOR_H diff --git a/google/cloud/profiler/v2/internal/profiler_logging_decorator.cc b/google/cloud/profiler/v2/internal/profiler_logging_decorator.cc index 5569df508c192..823789aeb2b38 100644 --- a/google/cloud/profiler/v2/internal/profiler_logging_decorator.cc +++ b/google/cloud/profiler/v2/internal/profiler_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/profiler/v2/internal/profiler_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/devtools/cloudprofiler/v2/profiler.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace profiler_v2_internal { @@ -79,3 +82,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace profiler_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/profiler/v2/internal/profiler_logging_decorator.h b/google/cloud/profiler/v2/internal/profiler_logging_decorator.h index 78a09a7c8b07d..688e6c3ef68fe 100644 --- a/google/cloud/profiler/v2/internal/profiler_logging_decorator.h +++ b/google/cloud/profiler/v2/internal/profiler_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace profiler_v2_internal { @@ -63,4 +66,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PROFILER_V2_INTERNAL_PROFILER_LOGGING_DECORATOR_H diff --git a/google/cloud/profiler/v2/internal/profiler_metadata_decorator.cc b/google/cloud/profiler/v2/internal/profiler_metadata_decorator.cc index 87df10a9c56b0..0abcac7f5d21e 100644 --- a/google/cloud/profiler/v2/internal/profiler_metadata_decorator.cc +++ b/google/cloud/profiler/v2/internal/profiler_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/profiler/v2/internal/profiler_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/devtools/cloudprofiler/v2/profiler.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace profiler_v2_internal { @@ -90,3 +94,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace profiler_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/profiler/v2/internal/profiler_metadata_decorator.h b/google/cloud/profiler/v2/internal/profiler_metadata_decorator.h index b248983a527a3..67fcd276a9179 100644 --- a/google/cloud/profiler/v2/internal/profiler_metadata_decorator.h +++ b/google/cloud/profiler/v2/internal/profiler_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace profiler_v2_internal { @@ -69,4 +72,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PROFILER_V2_INTERNAL_PROFILER_METADATA_DECORATOR_H diff --git a/google/cloud/profiler/v2/internal/profiler_option_defaults.cc b/google/cloud/profiler/v2/internal/profiler_option_defaults.cc index 0a3e96d644a5b..cc40dd33cec5a 100644 --- a/google/cloud/profiler/v2/internal/profiler_option_defaults.cc +++ b/google/cloud/profiler/v2/internal/profiler_option_defaults.cc @@ -42,7 +42,7 @@ Options ProfilerServiceDefaultOptions(Options options) { if (!options.has()) { options.set( profiler_v2::ProfilerServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/profiler/v2/internal/profiler_stub.cc b/google/cloud/profiler/v2/internal/profiler_stub.cc index 77ca3dc904e79..7ccba53410b93 100644 --- a/google/cloud/profiler/v2/internal/profiler_stub.cc +++ b/google/cloud/profiler/v2/internal/profiler_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/profiler/v2/internal/profiler_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "google/devtools/cloudprofiler/v2/profiler.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace profiler_v2_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace profiler_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/profiler/v2/internal/profiler_stub.h b/google/cloud/profiler/v2/internal/profiler_stub.h index f60c004e5b1a6..1509559e5d231 100644 --- a/google/cloud/profiler/v2/internal/profiler_stub.h +++ b/google/cloud/profiler/v2/internal/profiler_stub.h @@ -22,10 +22,13 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/devtools/cloudprofiler/v2/profiler.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace profiler_v2_internal { @@ -86,4 +89,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PROFILER_V2_INTERNAL_PROFILER_STUB_H diff --git a/google/cloud/profiler/v2/internal/profiler_stub_factory.cc b/google/cloud/profiler/v2/internal/profiler_stub_factory.cc index 08542ec358b07..0d58f7909ce3d 100644 --- a/google/cloud/profiler/v2/internal/profiler_stub_factory.cc +++ b/google/cloud/profiler/v2/internal/profiler_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/devtools/cloudprofiler/v2/profiler.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace profiler_v2_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace profiler_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/profiler/v2/internal/profiler_stub_factory.h b/google/cloud/profiler/v2/internal/profiler_stub_factory.h index d4edfbf0f2db7..94142521908ab 100644 --- a/google/cloud/profiler/v2/internal/profiler_stub_factory.h +++ b/google/cloud/profiler/v2/internal/profiler_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace profiler_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PROFILER_V2_INTERNAL_PROFILER_STUB_FACTORY_H diff --git a/google/cloud/profiler/v2/internal/profiler_tracing_connection.cc b/google/cloud/profiler/v2/internal/profiler_tracing_connection.cc index 90430a5973c22..e42f85d51ad67 100644 --- a/google/cloud/profiler/v2/internal/profiler_tracing_connection.cc +++ b/google/cloud/profiler/v2/internal/profiler_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace profiler_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ProfilerServiceTracingConnection::ProfilerServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -60,16 +58,12 @@ ProfilerServiceTracingConnection::UpdateProfile( return internal::EndSpan(*span, child_->UpdateProfile(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeProfilerServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/profiler/v2/internal/profiler_tracing_connection.h b/google/cloud/profiler/v2/internal/profiler_tracing_connection.h index 189d70e0359e9..e013b577b88b8 100644 --- a/google/cloud/profiler/v2/internal/profiler_tracing_connection.h +++ b/google/cloud/profiler/v2/internal/profiler_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace profiler_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ProfilerServiceTracingConnection : public profiler_v2::ProfilerServiceConnection { public: @@ -56,8 +54,6 @@ class ProfilerServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/profiler/v2/internal/profiler_tracing_stub.cc b/google/cloud/profiler/v2/internal/profiler_tracing_stub.cc index 1aadc0b02880b..92a7a0d83434d 100644 --- a/google/cloud/profiler/v2/internal/profiler_tracing_stub.cc +++ b/google/cloud/profiler/v2/internal/profiler_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace profiler_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ProfilerServiceTracingStub::ProfilerServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -70,18 +71,14 @@ ProfilerServiceTracingStub::UpdateProfile( child_->UpdateProfile(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeProfilerServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace profiler_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/profiler/v2/internal/profiler_tracing_stub.h b/google/cloud/profiler/v2/internal/profiler_tracing_stub.h index c74f7bfa965a2..af578db037816 100644 --- a/google/cloud/profiler/v2/internal/profiler_tracing_stub.h +++ b/google/cloud/profiler/v2/internal/profiler_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace profiler_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ProfilerServiceTracingStub : public ProfilerServiceStub { public: ~ProfilerServiceTracingStub() override = default; @@ -60,8 +61,6 @@ class ProfilerServiceTracingStub : public ProfilerServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -76,4 +75,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PROFILER_V2_INTERNAL_PROFILER_TRACING_STUB_H diff --git a/google/cloud/profiler/v2/profiler_connection.h b/google/cloud/profiler/v2/profiler_connection.h index 9b4402c3a95c4..3ff353e3a391a 100644 --- a/google/cloud/profiler/v2/profiler_connection.h +++ b/google/cloud/profiler/v2/profiler_connection.h @@ -26,7 +26,7 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/devtools/cloudprofiler/v2/profiler.pb.h" #include namespace google { diff --git a/google/cloud/profiler/v2/profiler_connection_idempotency_policy.h b/google/cloud/profiler/v2/profiler_connection_idempotency_policy.h index 475fc5436916d..ccd85154a77e1 100644 --- a/google/cloud/profiler/v2/profiler_connection_idempotency_policy.h +++ b/google/cloud/profiler/v2/profiler_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/devtools/cloudprofiler/v2/profiler.grpc.pb.h" #include namespace google { diff --git a/google/cloud/publicca/BUILD.bazel b/google/cloud/publicca/BUILD.bazel index 32479ebc68d17..2a3337344d785 100644 --- a/google/cloud/publicca/BUILD.bazel +++ b/google/cloud/publicca/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/security/publicca/v1:publicca_cc_grpc", + "@googleapis//google/cloud/security/publicca/v1:publicca_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/publicca/quickstart/.bazelrc b/google/cloud/publicca/quickstart/.bazelrc index 15d5c055db074..343e7f623d628 100644 --- a/google/cloud/publicca/quickstart/.bazelrc +++ b/google/cloud/publicca/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/publicca/quickstart/CMakeLists.txt b/google/cloud/publicca/quickstart/CMakeLists.txt index 7679a9ffdcf82..332158795383f 100644 --- a/google/cloud/publicca/quickstart/CMakeLists.txt +++ b/google/cloud/publicca/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Public Certificate Authority API C++ client # library from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-publicca-quickstart CXX) find_package(google_cloud_cpp_publicca REQUIRED) diff --git a/google/cloud/publicca/v1/internal/public_certificate_authority_auth_decorator.cc b/google/cloud/publicca/v1/internal/public_certificate_authority_auth_decorator.cc index 3893a17114a49..eaa835eabfa31 100644 --- a/google/cloud/publicca/v1/internal/public_certificate_authority_auth_decorator.cc +++ b/google/cloud/publicca/v1/internal/public_certificate_authority_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/security/publicca/v1/service.proto #include "google/cloud/publicca/v1/internal/public_certificate_authority_auth_decorator.h" -#include +#include "google/cloud/security/publicca/v1/service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace publicca_v1_internal { @@ -45,3 +48,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace publicca_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/publicca/v1/internal/public_certificate_authority_auth_decorator.h b/google/cloud/publicca/v1/internal/public_certificate_authority_auth_decorator.h index 604f634ab7757..daa25ed5bac8a 100644 --- a/google/cloud/publicca/v1/internal/public_certificate_authority_auth_decorator.h +++ b/google/cloud/publicca/v1/internal/public_certificate_authority_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace publicca_v1_internal { @@ -55,4 +58,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBLICCA_V1_INTERNAL_PUBLIC_CERTIFICATE_AUTHORITY_AUTH_DECORATOR_H diff --git a/google/cloud/publicca/v1/internal/public_certificate_authority_logging_decorator.cc b/google/cloud/publicca/v1/internal/public_certificate_authority_logging_decorator.cc index 50379e7db35b7..abba1b1fbcad9 100644 --- a/google/cloud/publicca/v1/internal/public_certificate_authority_logging_decorator.cc +++ b/google/cloud/publicca/v1/internal/public_certificate_authority_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/security/publicca/v1/service.proto #include "google/cloud/publicca/v1/internal/public_certificate_authority_logging_decorator.h" +#include "google/cloud/security/publicca/v1/service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace publicca_v1_internal { @@ -54,3 +57,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace publicca_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/publicca/v1/internal/public_certificate_authority_logging_decorator.h b/google/cloud/publicca/v1/internal/public_certificate_authority_logging_decorator.h index 80345064d2d5a..0a59280375184 100644 --- a/google/cloud/publicca/v1/internal/public_certificate_authority_logging_decorator.h +++ b/google/cloud/publicca/v1/internal/public_certificate_authority_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace publicca_v1_internal { @@ -55,4 +58,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBLICCA_V1_INTERNAL_PUBLIC_CERTIFICATE_AUTHORITY_LOGGING_DECORATOR_H diff --git a/google/cloud/publicca/v1/internal/public_certificate_authority_metadata_decorator.cc b/google/cloud/publicca/v1/internal/public_certificate_authority_metadata_decorator.cc index 89697b2676186..009a125491174 100644 --- a/google/cloud/publicca/v1/internal/public_certificate_authority_metadata_decorator.cc +++ b/google/cloud/publicca/v1/internal/public_certificate_authority_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/security/publicca/v1/service.proto #include "google/cloud/publicca/v1/internal/public_certificate_authority_metadata_decorator.h" +#include "google/cloud/security/publicca/v1/service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace publicca_v1_internal { @@ -72,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace publicca_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/publicca/v1/internal/public_certificate_authority_metadata_decorator.h b/google/cloud/publicca/v1/internal/public_certificate_authority_metadata_decorator.h index 296240daa5e93..f45f26ed5fcbb 100644 --- a/google/cloud/publicca/v1/internal/public_certificate_authority_metadata_decorator.h +++ b/google/cloud/publicca/v1/internal/public_certificate_authority_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace publicca_v1_internal { @@ -61,4 +64,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBLICCA_V1_INTERNAL_PUBLIC_CERTIFICATE_AUTHORITY_METADATA_DECORATOR_H diff --git a/google/cloud/publicca/v1/internal/public_certificate_authority_option_defaults.cc b/google/cloud/publicca/v1/internal/public_certificate_authority_option_defaults.cc index 81fd453b13e50..e4e5103de3839 100644 --- a/google/cloud/publicca/v1/internal/public_certificate_authority_option_defaults.cc +++ b/google/cloud/publicca/v1/internal/public_certificate_authority_option_defaults.cc @@ -45,7 +45,7 @@ Options PublicCertificateAuthorityServiceDefaultOptions(Options options) { options.set< publicca_v1::PublicCertificateAuthorityServiceRetryPolicyOption>( publicca_v1::PublicCertificateAuthorityServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/publicca/v1/internal/public_certificate_authority_stub.cc b/google/cloud/publicca/v1/internal/public_certificate_authority_stub.cc index 9253c976428bf..8868fc4b88cce 100644 --- a/google/cloud/publicca/v1/internal/public_certificate_authority_stub.cc +++ b/google/cloud/publicca/v1/internal/public_certificate_authority_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/security/publicca/v1/service.proto #include "google/cloud/publicca/v1/internal/public_certificate_authority_stub.h" +#include "google/cloud/security/publicca/v1/service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace publicca_v1_internal { @@ -49,3 +52,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace publicca_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/publicca/v1/internal/public_certificate_authority_stub.h b/google/cloud/publicca/v1/internal/public_certificate_authority_stub.h index ca54dba2bec1e..70b6b422645d7 100644 --- a/google/cloud/publicca/v1/internal/public_certificate_authority_stub.h +++ b/google/cloud/publicca/v1/internal/public_certificate_authority_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBLICCA_V1_INTERNAL_PUBLIC_CERTIFICATE_AUTHORITY_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBLICCA_V1_INTERNAL_PUBLIC_CERTIFICATE_AUTHORITY_STUB_H +#include "google/cloud/security/publicca/v1/service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace publicca_v1_internal { @@ -68,4 +71,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBLICCA_V1_INTERNAL_PUBLIC_CERTIFICATE_AUTHORITY_STUB_H diff --git a/google/cloud/publicca/v1/internal/public_certificate_authority_stub_factory.cc b/google/cloud/publicca/v1/internal/public_certificate_authority_stub_factory.cc index b9787a1075d39..62d9c57809490 100644 --- a/google/cloud/publicca/v1/internal/public_certificate_authority_stub_factory.cc +++ b/google/cloud/publicca/v1/internal/public_certificate_authority_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/publicca/v1/internal/public_certificate_authority_metadata_decorator.h" #include "google/cloud/publicca/v1/internal/public_certificate_authority_stub.h" #include "google/cloud/publicca/v1/internal/public_certificate_authority_tracing_stub.h" +#include "google/cloud/security/publicca/v1/service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace publicca_v1_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace publicca_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/publicca/v1/internal/public_certificate_authority_stub_factory.h b/google/cloud/publicca/v1/internal/public_certificate_authority_stub_factory.h index 445d6bbe54cbb..cd683a84ed96c 100644 --- a/google/cloud/publicca/v1/internal/public_certificate_authority_stub_factory.h +++ b/google/cloud/publicca/v1/internal/public_certificate_authority_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace publicca_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBLICCA_V1_INTERNAL_PUBLIC_CERTIFICATE_AUTHORITY_STUB_FACTORY_H diff --git a/google/cloud/publicca/v1/internal/public_certificate_authority_tracing_connection.cc b/google/cloud/publicca/v1/internal/public_certificate_authority_tracing_connection.cc index 690d612870fda..4e896887ff389 100644 --- a/google/cloud/publicca/v1/internal/public_certificate_authority_tracing_connection.cc +++ b/google/cloud/publicca/v1/internal/public_certificate_authority_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace publicca_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PublicCertificateAuthorityServiceTracingConnection:: PublicCertificateAuthorityServiceTracingConnection( std::shared_ptr< @@ -46,18 +44,14 @@ PublicCertificateAuthorityServiceTracingConnection::CreateExternalAccountKey( return internal::EndSpan(*span, child_->CreateExternalAccountKey(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePublicCertificateAuthorityServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/publicca/v1/internal/public_certificate_authority_tracing_connection.h b/google/cloud/publicca/v1/internal/public_certificate_authority_tracing_connection.h index 7b90b3caa72f4..f764a9d5ddc59 100644 --- a/google/cloud/publicca/v1/internal/public_certificate_authority_tracing_connection.h +++ b/google/cloud/publicca/v1/internal/public_certificate_authority_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace publicca_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PublicCertificateAuthorityServiceTracingConnection : public publicca_v1::PublicCertificateAuthorityServiceConnection { public: @@ -51,8 +49,6 @@ class PublicCertificateAuthorityServiceTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/publicca/v1/internal/public_certificate_authority_tracing_stub.cc b/google/cloud/publicca/v1/internal/public_certificate_authority_tracing_stub.cc index f12cb0f124f7f..e1594c9614371 100644 --- a/google/cloud/publicca/v1/internal/public_certificate_authority_tracing_stub.cc +++ b/google/cloud/publicca/v1/internal/public_certificate_authority_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace publicca_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PublicCertificateAuthorityServiceTracingStub:: PublicCertificateAuthorityServiceTracingStub( std::shared_ptr child) @@ -48,20 +49,16 @@ PublicCertificateAuthorityServiceTracingStub::CreateExternalAccountKey( child_->CreateExternalAccountKey(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePublicCertificateAuthorityServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared( std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace publicca_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/publicca/v1/internal/public_certificate_authority_tracing_stub.h b/google/cloud/publicca/v1/internal/public_certificate_authority_tracing_stub.h index 5a9f442b8e5e9..4216647ec1699 100644 --- a/google/cloud/publicca/v1/internal/public_certificate_authority_tracing_stub.h +++ b/google/cloud/publicca/v1/internal/public_certificate_authority_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace publicca_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PublicCertificateAuthorityServiceTracingStub : public PublicCertificateAuthorityServiceStub { public: @@ -52,8 +53,6 @@ class PublicCertificateAuthorityServiceTracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -69,4 +68,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBLICCA_V1_INTERNAL_PUBLIC_CERTIFICATE_AUTHORITY_TRACING_STUB_H diff --git a/google/cloud/publicca/v1/public_certificate_authority_connection.h b/google/cloud/publicca/v1/public_certificate_authority_connection.h index eb46074793e50..80d53de84d8b5 100644 --- a/google/cloud/publicca/v1/public_certificate_authority_connection.h +++ b/google/cloud/publicca/v1/public_certificate_authority_connection.h @@ -21,12 +21,12 @@ #include "google/cloud/publicca/v1/internal/public_certificate_authority_retry_traits.h" #include "google/cloud/publicca/v1/public_certificate_authority_connection_idempotency_policy.h" +#include "google/cloud/security/publicca/v1/service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/publicca/v1/public_certificate_authority_connection_idempotency_policy.h b/google/cloud/publicca/v1/public_certificate_authority_connection_idempotency_policy.h index 93f9a8d51878f..12682b8db6af9 100644 --- a/google/cloud/publicca/v1/public_certificate_authority_connection_idempotency_policy.h +++ b/google/cloud/publicca/v1/public_certificate_authority_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBLICCA_V1_PUBLIC_CERTIFICATE_AUTHORITY_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBLICCA_V1_PUBLIC_CERTIFICATE_AUTHORITY_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/security/publicca/v1/service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/pubsub/BUILD.bazel b/google/cloud/pubsub/BUILD.bazel index 59bc8b0f07d40..8580d58724238 100644 --- a/google/cloud/pubsub/BUILD.bazel +++ b/google/cloud/pubsub/BUILD.bazel @@ -38,9 +38,9 @@ cc_library( deps = [ "//:common", "//:grpc_utils", - "@com_google_googleapis//google/pubsub/v1:pubsub_cc_grpc", + "@googleapis//google/pubsub/v1:pubsub_cc_grpc", # Do not sort: grpc++ must come last - "@com_github_grpc_grpc//:grpc++", + "@grpc//:grpc++", ], ) @@ -56,20 +56,18 @@ cc_library( ":google_cloud_cpp_pubsub", "//:common", "//:grpc_utils", - "@com_google_googletest//:gtest", + "@googletest//:gtest", ], ) -# TODO(#3701): Delete this target after 2023-04-01. cc_library( name = "pubsub_client_testing", testonly = True, - deprecation = """ - This target is deprecated and will be removed on or after 2023-04-01. More - info: https://github.com/googleapis/google-cloud-cpp/issues/3701 - """, tags = ["manual"], - visibility = ["//visibility:public"], + visibility = [ + ":__subpackages__", + "//:__pkg__", + ], deps = [":pubsub_client_testing_private"], ) @@ -90,7 +88,7 @@ cc_library( ], deps = [ ":google_cloud_cpp_pubsub", - "@com_google_googletest//:gtest", + "@googletest//:gtest", ], ) @@ -104,7 +102,7 @@ cc_library( "//:common", "//google/cloud/testing_util:google_cloud_cpp_testing_grpc_private", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_google_absl//absl/strings:str_format", - "@com_google_googletest//:gtest_main", + "@abseil-cpp//absl/strings:str_format", + "@googletest//:gtest_main", ], ) for test in pubsub_client_unit_tests] diff --git a/google/cloud/pubsub/CMakeLists.txt b/google/cloud/pubsub/CMakeLists.txt index 3e96e604e9419..7c22acd4dae22 100644 --- a/google/cloud/pubsub/CMakeLists.txt +++ b/google/cloud/pubsub/CMakeLists.txt @@ -243,8 +243,6 @@ add_library( publisher.h publisher_connection.cc publisher_connection.h - publisher_options.cc - publisher_options.h pull_ack_handler.cc pull_ack_handler.h pull_response.h @@ -266,8 +264,6 @@ add_library( subscriber.h subscriber_connection.cc subscriber_connection.h - subscriber_options.cc - subscriber_options.h subscription.cc subscription.h subscription_admin_client.cc @@ -494,14 +490,12 @@ function (google_cloud_cpp_pubsub_client_define_tests) message_test.cc options_test.cc publisher_connection_test.cc - publisher_options_test.cc publisher_test.cc pull_ack_handler_test.cc schema_test.cc snapshot_builder_test.cc snapshot_test.cc subscriber_connection_test.cc - subscriber_options_test.cc subscriber_test.cc subscription_admin_client_test.cc subscription_admin_connection_test.cc diff --git a/google/cloud/pubsub/admin/internal/subscription_admin_auth_decorator.cc b/google/cloud/pubsub/admin/internal/subscription_admin_auth_decorator.cc index 184344bbff929..c0a04d52b6c87 100644 --- a/google/cloud/pubsub/admin/internal/subscription_admin_auth_decorator.cc +++ b/google/cloud/pubsub/admin/internal/subscription_admin_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/pubsub/v1/pubsub.proto #include "google/cloud/pubsub/admin/internal/subscription_admin_auth_decorator.h" -#include +#include "google/pubsub/v1/pubsub.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_admin_internal { @@ -161,3 +164,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsub/admin/internal/subscription_admin_auth_decorator.h b/google/cloud/pubsub/admin/internal/subscription_admin_auth_decorator.h index 9ab07cfdd9390..ab164b6b2d3e7 100644 --- a/google/cloud/pubsub/admin/internal/subscription_admin_auth_decorator.h +++ b/google/cloud/pubsub/admin/internal/subscription_admin_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_admin_internal { @@ -108,4 +111,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_ADMIN_INTERNAL_SUBSCRIPTION_ADMIN_AUTH_DECORATOR_H diff --git a/google/cloud/pubsub/admin/internal/subscription_admin_logging_decorator.cc b/google/cloud/pubsub/admin/internal/subscription_admin_logging_decorator.cc index 72e778d09d05f..0ff0d50c58f7c 100644 --- a/google/cloud/pubsub/admin/internal/subscription_admin_logging_decorator.cc +++ b/google/cloud/pubsub/admin/internal/subscription_admin_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/pubsub/admin/internal/subscription_admin_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/pubsub/v1/pubsub.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_admin_internal { @@ -210,3 +213,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsub/admin/internal/subscription_admin_logging_decorator.h b/google/cloud/pubsub/admin/internal/subscription_admin_logging_decorator.h index 426315708980f..44bab886d42eb 100644 --- a/google/cloud/pubsub/admin/internal/subscription_admin_logging_decorator.h +++ b/google/cloud/pubsub/admin/internal/subscription_admin_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_admin_internal { @@ -108,4 +111,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_ADMIN_INTERNAL_SUBSCRIPTION_ADMIN_LOGGING_DECORATOR_H diff --git a/google/cloud/pubsub/admin/internal/subscription_admin_metadata_decorator.cc b/google/cloud/pubsub/admin/internal/subscription_admin_metadata_decorator.cc index fd6e0ee727023..266b453f09e99 100644 --- a/google/cloud/pubsub/admin/internal/subscription_admin_metadata_decorator.cc +++ b/google/cloud/pubsub/admin/internal/subscription_admin_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/pubsub/admin/internal/subscription_admin_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/pubsub/v1/pubsub.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_admin_internal { @@ -200,3 +204,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsub/admin/internal/subscription_admin_metadata_decorator.h b/google/cloud/pubsub/admin/internal/subscription_admin_metadata_decorator.h index 7c5b5f925cc43..9dfda90fed12b 100644 --- a/google/cloud/pubsub/admin/internal/subscription_admin_metadata_decorator.h +++ b/google/cloud/pubsub/admin/internal/subscription_admin_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_admin_internal { @@ -114,4 +117,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_ADMIN_INTERNAL_SUBSCRIPTION_ADMIN_METADATA_DECORATOR_H diff --git a/google/cloud/pubsub/admin/internal/subscription_admin_option_defaults.cc b/google/cloud/pubsub/admin/internal/subscription_admin_option_defaults.cc index 034e446212932..5b05a5c16de78 100644 --- a/google/cloud/pubsub/admin/internal/subscription_admin_option_defaults.cc +++ b/google/cloud/pubsub/admin/internal/subscription_admin_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/pubsub/admin/internal/subscription_admin_option_defaults.h" #include "google/cloud/pubsub/admin/subscription_admin_connection.h" #include "google/cloud/pubsub/admin/subscription_admin_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -46,7 +46,7 @@ Options SubscriptionAdminDefaultOptions(std::string const& location, if (!options.has()) { options.set( pubsub_admin::SubscriptionAdminLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/pubsub/admin/internal/subscription_admin_stub.cc b/google/cloud/pubsub/admin/internal/subscription_admin_stub.cc index ba709c67c220b..499395cd0e11e 100644 --- a/google/cloud/pubsub/admin/internal/subscription_admin_stub.cc +++ b/google/cloud/pubsub/admin/internal/subscription_admin_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/pubsub/admin/internal/subscription_admin_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "google/pubsub/v1/pubsub.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_admin_internal { @@ -209,3 +212,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsub/admin/internal/subscription_admin_stub.h b/google/cloud/pubsub/admin/internal/subscription_admin_stub.h index 1be96564ed9c7..4b8bca6ed56fe 100644 --- a/google/cloud/pubsub/admin/internal/subscription_admin_stub.h +++ b/google/cloud/pubsub/admin/internal/subscription_admin_stub.h @@ -22,11 +22,14 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/pubsub/v1/pubsub.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_admin_internal { @@ -177,4 +180,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_ADMIN_INTERNAL_SUBSCRIPTION_ADMIN_STUB_H diff --git a/google/cloud/pubsub/admin/internal/subscription_admin_stub_factory.cc b/google/cloud/pubsub/admin/internal/subscription_admin_stub_factory.cc index 2a7d85d22a410..77ecdde662a4e 100644 --- a/google/cloud/pubsub/admin/internal/subscription_admin_stub_factory.cc +++ b/google/cloud/pubsub/admin/internal/subscription_admin_stub_factory.cc @@ -28,11 +28,14 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/pubsub/v1/pubsub.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_admin_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsub/admin/internal/subscription_admin_stub_factory.h b/google/cloud/pubsub/admin/internal/subscription_admin_stub_factory.h index 7e5ee3c600cd6..a61e7fa1da1a4 100644 --- a/google/cloud/pubsub/admin/internal/subscription_admin_stub_factory.h +++ b/google/cloud/pubsub/admin/internal/subscription_admin_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_admin_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_ADMIN_INTERNAL_SUBSCRIPTION_ADMIN_STUB_FACTORY_H diff --git a/google/cloud/pubsub/admin/internal/subscription_admin_tracing_connection.cc b/google/cloud/pubsub/admin/internal/subscription_admin_tracing_connection.cc index 208bbd7040924..28ca763f1406e 100644 --- a/google/cloud/pubsub/admin/internal/subscription_admin_tracing_connection.cc +++ b/google/cloud/pubsub/admin/internal/subscription_admin_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace pubsub_admin_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SubscriptionAdminTracingConnection::SubscriptionAdminTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -169,17 +167,13 @@ SubscriptionAdminTracingConnection::TestIamPermissions( return internal::EndSpan(*span, child_->TestIamPermissions(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSubscriptionAdminTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/pubsub/admin/internal/subscription_admin_tracing_connection.h b/google/cloud/pubsub/admin/internal/subscription_admin_tracing_connection.h index 0fd9bb8bc6631..93de1fbfb2ee6 100644 --- a/google/cloud/pubsub/admin/internal/subscription_admin_tracing_connection.h +++ b/google/cloud/pubsub/admin/internal/subscription_admin_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace pubsub_admin_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SubscriptionAdminTracingConnection : public pubsub_admin::SubscriptionAdminConnection { public: @@ -89,8 +87,6 @@ class SubscriptionAdminTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/pubsub/admin/internal/subscription_admin_tracing_stub.cc b/google/cloud/pubsub/admin/internal/subscription_admin_tracing_stub.cc index fbd7ae20f5a31..82d0029b135f4 100644 --- a/google/cloud/pubsub/admin/internal/subscription_admin_tracing_stub.cc +++ b/google/cloud/pubsub/admin/internal/subscription_admin_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_admin_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SubscriptionAdminTracingStub::SubscriptionAdminTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -205,18 +206,14 @@ SubscriptionAdminTracingStub::TestIamPermissions( context, *span, child_->TestIamPermissions(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSubscriptionAdminTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsub/admin/internal/subscription_admin_tracing_stub.h b/google/cloud/pubsub/admin/internal/subscription_admin_tracing_stub.h index 146a6a68e9b6b..5426dbcad0a87 100644 --- a/google/cloud/pubsub/admin/internal/subscription_admin_tracing_stub.h +++ b/google/cloud/pubsub/admin/internal/subscription_admin_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_admin_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SubscriptionAdminTracingStub : public SubscriptionAdminStub { public: ~SubscriptionAdminTracingStub() override = default; @@ -105,8 +106,6 @@ class SubscriptionAdminTracingStub : public SubscriptionAdminStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -121,4 +120,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_ADMIN_INTERNAL_SUBSCRIPTION_ADMIN_TRACING_STUB_H diff --git a/google/cloud/pubsub/admin/internal/topic_admin_auth_decorator.cc b/google/cloud/pubsub/admin/internal/topic_admin_auth_decorator.cc index 56ba11efcc87e..9cadbc0b01b1a 100644 --- a/google/cloud/pubsub/admin/internal/topic_admin_auth_decorator.cc +++ b/google/cloud/pubsub/admin/internal/topic_admin_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/pubsub/v1/pubsub.proto #include "google/cloud/pubsub/admin/internal/topic_admin_auth_decorator.h" -#include +#include "google/pubsub/v1/pubsub.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_admin_internal { @@ -127,3 +130,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsub/admin/internal/topic_admin_auth_decorator.h b/google/cloud/pubsub/admin/internal/topic_admin_auth_decorator.h index 6b9aa1d26c043..cd5fecf334398 100644 --- a/google/cloud/pubsub/admin/internal/topic_admin_auth_decorator.h +++ b/google/cloud/pubsub/admin/internal/topic_admin_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_admin_internal { @@ -94,4 +97,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_ADMIN_INTERNAL_TOPIC_ADMIN_AUTH_DECORATOR_H diff --git a/google/cloud/pubsub/admin/internal/topic_admin_logging_decorator.cc b/google/cloud/pubsub/admin/internal/topic_admin_logging_decorator.cc index 15e61c2bf2a4a..577975ad96c49 100644 --- a/google/cloud/pubsub/admin/internal/topic_admin_logging_decorator.cc +++ b/google/cloud/pubsub/admin/internal/topic_admin_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/pubsub/admin/internal/topic_admin_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/pubsub/v1/pubsub.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_admin_internal { @@ -164,3 +167,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsub/admin/internal/topic_admin_logging_decorator.h b/google/cloud/pubsub/admin/internal/topic_admin_logging_decorator.h index ef08e5ed57c92..f24c628bc5505 100644 --- a/google/cloud/pubsub/admin/internal/topic_admin_logging_decorator.h +++ b/google/cloud/pubsub/admin/internal/topic_admin_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_admin_internal { @@ -94,4 +97,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_ADMIN_INTERNAL_TOPIC_ADMIN_LOGGING_DECORATOR_H diff --git a/google/cloud/pubsub/admin/internal/topic_admin_metadata_decorator.cc b/google/cloud/pubsub/admin/internal/topic_admin_metadata_decorator.cc index 703979521b35c..e9e2963f65fa0 100644 --- a/google/cloud/pubsub/admin/internal/topic_admin_metadata_decorator.cc +++ b/google/cloud/pubsub/admin/internal/topic_admin_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/pubsub/admin/internal/topic_admin_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/pubsub/v1/pubsub.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_admin_internal { @@ -158,3 +162,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsub/admin/internal/topic_admin_metadata_decorator.h b/google/cloud/pubsub/admin/internal/topic_admin_metadata_decorator.h index 882dbed43d5b8..673adda1e6370 100644 --- a/google/cloud/pubsub/admin/internal/topic_admin_metadata_decorator.h +++ b/google/cloud/pubsub/admin/internal/topic_admin_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_admin_internal { @@ -99,4 +102,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_ADMIN_INTERNAL_TOPIC_ADMIN_METADATA_DECORATOR_H diff --git a/google/cloud/pubsub/admin/internal/topic_admin_option_defaults.cc b/google/cloud/pubsub/admin/internal/topic_admin_option_defaults.cc index 050e68ca73853..ba572d6290872 100644 --- a/google/cloud/pubsub/admin/internal/topic_admin_option_defaults.cc +++ b/google/cloud/pubsub/admin/internal/topic_admin_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/pubsub/admin/internal/topic_admin_option_defaults.h" #include "google/cloud/pubsub/admin/topic_admin_connection.h" #include "google/cloud/pubsub/admin/topic_admin_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -44,7 +44,7 @@ Options TopicAdminDefaultOptions(std::string const& location, Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - pubsub_admin::TopicAdminLimitedTimeRetryPolicy(std::chrono::minutes(30)) + pubsub_admin::TopicAdminLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/pubsub/admin/internal/topic_admin_stub.cc b/google/cloud/pubsub/admin/internal/topic_admin_stub.cc index 7ea8f1dc71c84..7bf6cdca745fd 100644 --- a/google/cloud/pubsub/admin/internal/topic_admin_stub.cc +++ b/google/cloud/pubsub/admin/internal/topic_admin_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/pubsub/admin/internal/topic_admin_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "google/pubsub/v1/pubsub.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_admin_internal { @@ -162,3 +165,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsub/admin/internal/topic_admin_stub.h b/google/cloud/pubsub/admin/internal/topic_admin_stub.h index 6ba2e4031baab..bd27195b150e6 100644 --- a/google/cloud/pubsub/admin/internal/topic_admin_stub.h +++ b/google/cloud/pubsub/admin/internal/topic_admin_stub.h @@ -22,11 +22,14 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/pubsub/v1/pubsub.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_admin_internal { @@ -149,4 +152,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_ADMIN_INTERNAL_TOPIC_ADMIN_STUB_H diff --git a/google/cloud/pubsub/admin/internal/topic_admin_stub_factory.cc b/google/cloud/pubsub/admin/internal/topic_admin_stub_factory.cc index 4d005f6edcecb..2ece82f2a6ae4 100644 --- a/google/cloud/pubsub/admin/internal/topic_admin_stub_factory.cc +++ b/google/cloud/pubsub/admin/internal/topic_admin_stub_factory.cc @@ -28,11 +28,14 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/pubsub/v1/pubsub.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_admin_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsub/admin/internal/topic_admin_stub_factory.h b/google/cloud/pubsub/admin/internal/topic_admin_stub_factory.h index c9a30538782c0..93555c7021ee2 100644 --- a/google/cloud/pubsub/admin/internal/topic_admin_stub_factory.h +++ b/google/cloud/pubsub/admin/internal/topic_admin_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_admin_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_ADMIN_INTERNAL_TOPIC_ADMIN_STUB_FACTORY_H diff --git a/google/cloud/pubsub/admin/internal/topic_admin_tracing_connection.cc b/google/cloud/pubsub/admin/internal/topic_admin_tracing_connection.cc index fb18f165597a6..e18f9659af0ae 100644 --- a/google/cloud/pubsub/admin/internal/topic_admin_tracing_connection.cc +++ b/google/cloud/pubsub/admin/internal/topic_admin_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace pubsub_admin_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TopicAdminTracingConnection::TopicAdminTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -129,16 +127,12 @@ TopicAdminTracingConnection::TestIamPermissions( return internal::EndSpan(*span, child_->TestIamPermissions(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTopicAdminTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/pubsub/admin/internal/topic_admin_tracing_connection.h b/google/cloud/pubsub/admin/internal/topic_admin_tracing_connection.h index 4ddd86cb69b66..65cdc4f852eaf 100644 --- a/google/cloud/pubsub/admin/internal/topic_admin_tracing_connection.h +++ b/google/cloud/pubsub/admin/internal/topic_admin_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace pubsub_admin_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TopicAdminTracingConnection : public pubsub_admin::TopicAdminConnection { public: ~TopicAdminTracingConnection() override = default; @@ -76,8 +74,6 @@ class TopicAdminTracingConnection : public pubsub_admin::TopicAdminConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/pubsub/admin/internal/topic_admin_tracing_stub.cc b/google/cloud/pubsub/admin/internal/topic_admin_tracing_stub.cc index 0bfd00a1850e5..4730cb3e91710 100644 --- a/google/cloud/pubsub/admin/internal/topic_admin_tracing_stub.cc +++ b/google/cloud/pubsub/admin/internal/topic_admin_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_admin_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TopicAdminTracingStub::TopicAdminTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -158,18 +159,14 @@ TopicAdminTracingStub::TestIamPermissions( context, *span, child_->TestIamPermissions(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTopicAdminTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsub/admin/internal/topic_admin_tracing_stub.h b/google/cloud/pubsub/admin/internal/topic_admin_tracing_stub.h index 6828e27c6e41d..583ad07e7a2c7 100644 --- a/google/cloud/pubsub/admin/internal/topic_admin_tracing_stub.h +++ b/google/cloud/pubsub/admin/internal/topic_admin_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_admin_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TopicAdminTracingStub : public TopicAdminStub { public: ~TopicAdminTracingStub() override = default; @@ -90,8 +91,6 @@ class TopicAdminTracingStub : public TopicAdminStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -106,4 +105,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_ADMIN_INTERNAL_TOPIC_ADMIN_TRACING_STUB_H diff --git a/google/cloud/pubsub/admin/subscription_admin_connection.h b/google/cloud/pubsub/admin/subscription_admin_connection.h index e6d67032eff6d..dbbad7e66ba28 100644 --- a/google/cloud/pubsub/admin/subscription_admin_connection.h +++ b/google/cloud/pubsub/admin/subscription_admin_connection.h @@ -27,7 +27,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/pubsub/v1/pubsub.pb.h" #include #include diff --git a/google/cloud/pubsub/admin/subscription_admin_connection_idempotency_policy.h b/google/cloud/pubsub/admin/subscription_admin_connection_idempotency_policy.h index d722d63b00fab..473c519767e0c 100644 --- a/google/cloud/pubsub/admin/subscription_admin_connection_idempotency_policy.h +++ b/google/cloud/pubsub/admin/subscription_admin_connection_idempotency_policy.h @@ -21,8 +21,8 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/pubsub/v1/pubsub.grpc.pb.h" #include namespace google { diff --git a/google/cloud/pubsub/admin/topic_admin_connection.h b/google/cloud/pubsub/admin/topic_admin_connection.h index 81836bc33efd1..c9bacf524be05 100644 --- a/google/cloud/pubsub/admin/topic_admin_connection.h +++ b/google/cloud/pubsub/admin/topic_admin_connection.h @@ -27,7 +27,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/pubsub/v1/pubsub.pb.h" #include #include diff --git a/google/cloud/pubsub/admin/topic_admin_connection_idempotency_policy.h b/google/cloud/pubsub/admin/topic_admin_connection_idempotency_policy.h index 33ef2aecc27d8..d2c9e2ef9aad3 100644 --- a/google/cloud/pubsub/admin/topic_admin_connection_idempotency_policy.h +++ b/google/cloud/pubsub/admin/topic_admin_connection_idempotency_policy.h @@ -21,8 +21,8 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/pubsub/v1/pubsub.grpc.pb.h" #include namespace google { diff --git a/google/cloud/pubsub/benchmarks/BUILD.bazel b/google/cloud/pubsub/benchmarks/BUILD.bazel index 64fe4dfaa70cc..520850ae67ec0 100644 --- a/google/cloud/pubsub/benchmarks/BUILD.bazel +++ b/google/cloud/pubsub/benchmarks/BUILD.bazel @@ -30,9 +30,9 @@ licenses(["notice"]) # Apache 2.0 "//:pubsub", "//google/cloud/pubsub:pubsub_client_testing_private", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_google_absl//absl/base", - "@com_google_absl//absl/strings", - "@com_google_absl//absl/strings:cord", - "@com_google_absl//absl/strings:str_format", + "@abseil-cpp//absl/base", + "@abseil-cpp//absl/strings", + "@abseil-cpp//absl/strings:cord", + "@abseil-cpp//absl/strings:str_format", ], ) for program in pubsub_client_benchmark_programs] diff --git a/google/cloud/pubsub/benchmarks/throughput.cc b/google/cloud/pubsub/benchmarks/throughput.cc index a2e4454f91899..86b5a4a1293f9 100644 --- a/google/cloud/pubsub/benchmarks/throughput.cc +++ b/google/cloud/pubsub/benchmarks/throughput.cc @@ -14,6 +14,7 @@ #include "google/cloud/pubsub/admin/subscription_admin_client.h" #include "google/cloud/pubsub/admin/topic_admin_client.h" +#include "google/cloud/pubsub/options.h" #include "google/cloud/pubsub/publisher.h" #include "google/cloud/pubsub/subscriber.h" #include "google/cloud/pubsub/testing/random_names.h" diff --git a/google/cloud/pubsub/blocking_publisher.h b/google/cloud/pubsub/blocking_publisher.h index aa316e360428b..271749412407e 100644 --- a/google/cloud/pubsub/blocking_publisher.h +++ b/google/cloud/pubsub/blocking_publisher.h @@ -16,7 +16,6 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_BLOCKING_PUBLISHER_H #include "google/cloud/pubsub/blocking_publisher_connection.h" -#include "google/cloud/pubsub/publisher_options.h" #include "google/cloud/pubsub/version.h" #include diff --git a/google/cloud/pubsub/blocking_publisher_connection.h b/google/cloud/pubsub/blocking_publisher_connection.h index 6839e25eb764b..9728f61b1bed7 100644 --- a/google/cloud/pubsub/blocking_publisher_connection.h +++ b/google/cloud/pubsub/blocking_publisher_connection.h @@ -19,7 +19,6 @@ #include "google/cloud/pubsub/connection_options.h" #include "google/cloud/pubsub/internal/publisher_stub.h" #include "google/cloud/pubsub/message.h" -#include "google/cloud/pubsub/publisher_options.h" #include "google/cloud/pubsub/retry_policy.h" #include "google/cloud/pubsub/topic.h" #include "google/cloud/pubsub/version.h" diff --git a/google/cloud/pubsub/google_cloud_cpp_pubsub.bzl b/google/cloud/pubsub/google_cloud_cpp_pubsub.bzl index a5584fd30270b..4f9dfc3718890 100644 --- a/google/cloud/pubsub/google_cloud_cpp_pubsub.bzl +++ b/google/cloud/pubsub/google_cloud_cpp_pubsub.bzl @@ -129,7 +129,6 @@ google_cloud_cpp_pubsub_hdrs = [ "options.h", "publisher.h", "publisher_connection.h", - "publisher_options.h", "pull_ack_handler.h", "pull_response.h", "retry_policy.h", @@ -142,7 +141,6 @@ google_cloud_cpp_pubsub_hdrs = [ "snapshot_builder.h", "subscriber.h", "subscriber_connection.h", - "subscriber_options.h", "subscription.h", "subscription_admin_client.h", "subscription_admin_connection.h", @@ -248,7 +246,6 @@ google_cloud_cpp_pubsub_srcs = [ "message.cc", "options.cc", "publisher_connection.cc", - "publisher_options.cc", "pull_ack_handler.cc", "schema.cc", "schema_client.cc", @@ -258,7 +255,6 @@ google_cloud_cpp_pubsub_srcs = [ "snapshot_builder.cc", "subscriber.cc", "subscriber_connection.cc", - "subscriber_options.cc", "subscription.cc", "subscription_admin_client.cc", "subscription_admin_connection.cc", diff --git a/google/cloud/pubsub/integration_tests/BUILD.bazel b/google/cloud/pubsub/integration_tests/BUILD.bazel index cfbc7503aa0ce..06abad4ebc691 100644 --- a/google/cloud/pubsub/integration_tests/BUILD.bazel +++ b/google/cloud/pubsub/integration_tests/BUILD.bazel @@ -31,6 +31,6 @@ licenses(["notice"]) # Apache 2.0 "//google/cloud/pubsub:pubsub_client_testing_private", "//google/cloud/testing_util:google_cloud_cpp_testing_grpc_private", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) for test in pubsub_client_integration_tests] diff --git a/google/cloud/pubsub/integration_tests/blocking_publisher_integration_test.cc b/google/cloud/pubsub/integration_tests/blocking_publisher_integration_test.cc index 8b35712edec5b..750011f6b5513 100644 --- a/google/cloud/pubsub/integration_tests/blocking_publisher_integration_test.cc +++ b/google/cloud/pubsub/integration_tests/blocking_publisher_integration_test.cc @@ -71,7 +71,6 @@ TEST_F(BlockingPublisherIntegrationTest, Basic) { ASSERT_STATUS_OK(publish); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::DisableTracing; using ::google::cloud::testing_util::EnableTracing; @@ -90,7 +89,6 @@ TEST_F(BlockingPublisherIntegrationTest, TracingDisabled) { publisher.Publish(topic_, MessageBuilder().SetData("test data").Build()); ASSERT_STATUS_OK(publish); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END diff --git a/google/cloud/pubsub/integration_tests/subscriber_integration_test.cc b/google/cloud/pubsub/integration_tests/subscriber_integration_test.cc index 5af7f78aea29a..97f38d4c1c7c8 100644 --- a/google/cloud/pubsub/integration_tests/subscriber_integration_test.cc +++ b/google/cloud/pubsub/integration_tests/subscriber_integration_test.cc @@ -21,6 +21,7 @@ #include "google/cloud/pubsub/internal/noop_message_callback.h" #include "google/cloud/pubsub/internal/streaming_subscription_batch_source.h" #include "google/cloud/pubsub/internal/subscriber_stub_factory.h" +#include "google/cloud/pubsub/options.h" #include "google/cloud/pubsub/publisher.h" #include "google/cloud/pubsub/subscriber.h" #include "google/cloud/pubsub/subscription.h" @@ -56,7 +57,6 @@ using ::google::cloud::testing_util::StatusIs; using ::testing::AnyOf; using ::testing::ElementsAreArray; using ::testing::IsEmpty; -using ::testing::NotNull; class SubscriberIntegrationTest : public ::google::cloud::testing_util::IntegrationTest { @@ -633,14 +633,6 @@ TEST_F(SubscriberIntegrationTest, TracingDisabledBlockingPull) { EXPECT_THAT(ids, IsEmpty()); } -/// @test Verify the backwards compatibility `v1` namespace still exists. -TEST_F(SubscriberIntegrationTest, BackwardsCompatibility) { - auto connection = ::google::cloud::pubsub::v1::MakeSubscriberConnection( - subscription_, Options{}); - EXPECT_THAT(connection, NotNull()); - ASSERT_NO_FATAL_FAILURE(Subscriber(std::move(connection))); -} - } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub diff --git a/google/cloud/pubsub/integration_tests/subscription_admin_integration_test.cc b/google/cloud/pubsub/integration_tests/subscription_admin_integration_test.cc index 62cf591fa7b3f..79ec5e68ea2ba 100644 --- a/google/cloud/pubsub/integration_tests/subscription_admin_integration_test.cc +++ b/google/cloud/pubsub/integration_tests/subscription_admin_integration_test.cc @@ -44,7 +44,6 @@ using ::google::cloud::testing_util::StatusIs; using ::testing::AnyOf; using ::testing::Contains; using ::testing::Not; -using ::testing::NotNull; bool UsingEmulator() { return google::cloud::internal::GetEnv("PUBSUB_EMULATOR_HOST").has_value(); @@ -326,15 +325,6 @@ TEST_F(SubscriptionAdminIntegrationTest, SeekFailureSnapshot) { ASSERT_FALSE(response.ok()); } -/// @test Verify the backwards compatibility `v1` namespace still exists. -TEST_F(SubscriptionAdminIntegrationTest, BackwardsCompatibility) { - auto connection = - ::google::cloud::pubsub::v1::MakeSubscriptionAdminConnection( - MakeTestOptions()); - EXPECT_THAT(connection, NotNull()); - ASSERT_NO_FATAL_FAILURE(SubscriptionAdminClient(std::move(connection))); -} - } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub diff --git a/google/cloud/pubsub/integration_tests/topic_admin_integration_test.cc b/google/cloud/pubsub/integration_tests/topic_admin_integration_test.cc index 4163baf68a486..2f5ed4f84b667 100644 --- a/google/cloud/pubsub/integration_tests/topic_admin_integration_test.cc +++ b/google/cloud/pubsub/integration_tests/topic_admin_integration_test.cc @@ -42,7 +42,6 @@ using ::testing::AnyOf; using ::testing::Contains; using ::testing::IsEmpty; using ::testing::Not; -using ::testing::NotNull; bool UsingEmulator() { return google::cloud::internal::GetEnv("PUBSUB_EMULATOR_HOST").has_value(); @@ -177,14 +176,6 @@ TEST_F(TopicAdminIntegrationTest, ListTopicSnapshotsFailure) { EXPECT_FALSE(*i); } -/// @test Verify the backwards compatibility `v1` namespace still exists. -TEST_F(TopicAdminIntegrationTest, BackwardsCompatibility) { - auto connection = - ::google::cloud::pubsub::v1::MakeTopicAdminConnection(MakeTestOptions()); - EXPECT_THAT(connection, NotNull()); - ASSERT_NO_FATAL_FAILURE(TopicAdminClient(std::move(connection))); -} - } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub diff --git a/google/cloud/pubsub/internal/batch_callback.h b/google/cloud/pubsub/internal/batch_callback.h index c750ae5e29dfd..c415b5a91e12f 100644 --- a/google/cloud/pubsub/internal/batch_callback.h +++ b/google/cloud/pubsub/internal/batch_callback.h @@ -19,7 +19,7 @@ #include "google/cloud/pubsub/internal/span.h" #include "google/cloud/pubsub/version.h" #include "google/cloud/status_or.h" -#include +#include "google/pubsub/v1/pubsub.pb.h" #include namespace google { diff --git a/google/cloud/pubsub/internal/batch_callback_wrapper.h b/google/cloud/pubsub/internal/batch_callback_wrapper.h index 437057f7227e9..f316850a1a144 100644 --- a/google/cloud/pubsub/internal/batch_callback_wrapper.h +++ b/google/cloud/pubsub/internal/batch_callback_wrapper.h @@ -19,7 +19,7 @@ #include "google/cloud/pubsub/internal/message_callback.h" #include "google/cloud/pubsub/version.h" #include "google/cloud/status_or.h" -#include +#include "google/pubsub/v1/pubsub.pb.h" namespace google { namespace cloud { diff --git a/google/cloud/pubsub/internal/batch_sink.h b/google/cloud/pubsub/internal/batch_sink.h index 0dc7f8a010eb4..47ea6faf12e8e 100644 --- a/google/cloud/pubsub/internal/batch_sink.h +++ b/google/cloud/pubsub/internal/batch_sink.h @@ -20,7 +20,7 @@ #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/status_or.h" -#include +#include "google/pubsub/v1/pubsub.pb.h" #include namespace google { diff --git a/google/cloud/pubsub/internal/batching_publisher_connection.cc b/google/cloud/pubsub/internal/batching_publisher_connection.cc index d208510c26d18..23c5cf89d4f0c 100644 --- a/google/cloud/pubsub/internal/batching_publisher_connection.cc +++ b/google/cloud/pubsub/internal/batching_publisher_connection.cc @@ -13,6 +13,7 @@ // limitations under the License. #include "google/cloud/pubsub/internal/batching_publisher_connection.h" +#include "google/cloud/pubsub/options.h" #include "google/cloud/internal/make_status.h" namespace google { diff --git a/google/cloud/pubsub/internal/batching_publisher_connection_test.cc b/google/cloud/pubsub/internal/batching_publisher_connection_test.cc index 5ada6c6d3f479..4ad871083cc53 100644 --- a/google/cloud/pubsub/internal/batching_publisher_connection_test.cc +++ b/google/cloud/pubsub/internal/batching_publisher_connection_test.cc @@ -14,6 +14,7 @@ #include "google/cloud/pubsub/internal/batching_publisher_connection.h" #include "google/cloud/pubsub/internal/defaults.h" +#include "google/cloud/pubsub/options.h" #include "google/cloud/pubsub/testing/mock_batch_sink.h" #include "google/cloud/future.h" #include "google/cloud/internal/random.h" diff --git a/google/cloud/pubsub/internal/batching_publisher_tracing_connection.cc b/google/cloud/pubsub/internal/batching_publisher_tracing_connection.cc index b947776f699e8..eb2f14eb39ba3 100644 --- a/google/cloud/pubsub/internal/batching_publisher_tracing_connection.cc +++ b/google/cloud/pubsub/internal/batching_publisher_tracing_connection.cc @@ -15,16 +15,13 @@ #include "google/cloud/pubsub/internal/batching_publisher_tracing_connection.h" #include "google/cloud/pubsub/publisher_connection.h" #include "google/cloud/internal/opentelemetry.h" -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY -#include -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY +#include namespace google { namespace cloud { namespace pubsub_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY namespace { class BatchingPublisherTracingConnection : public pubsub::PublisherConnection { @@ -36,10 +33,11 @@ class BatchingPublisherTracingConnection : public pubsub::PublisherConnection { ~BatchingPublisherTracingConnection() override = default; future> Publish(PublishParams p) override { - namespace sc = opentelemetry::trace::SemanticConventions; - auto span = internal::MakeSpan( - "publisher batching", - {{sc::kCodeFunction, "pubsub::BatchingPublisherConnection::Publish"}}); + namespace sc = opentelemetry::semconv; + auto span = + internal::MakeSpan("publisher batching", + {{sc::code::kCodeFunctionName, + "pubsub::BatchingPublisherConnection::Publish"}}); auto result = child_->Publish(std::move(p)); internal::EndSpan(*span); return result; @@ -72,16 +70,6 @@ MakeBatchingPublisherTracingConnection( std::move(connection)); } -#else // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - -std::shared_ptr -MakeBatchingPublisherTracingConnection( - std::shared_ptr connection) { - return connection; -} - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud diff --git a/google/cloud/pubsub/internal/batching_publisher_tracing_connection_test.cc b/google/cloud/pubsub/internal/batching_publisher_tracing_connection_test.cc index 5705d858de404..9e5159a35829b 100644 --- a/google/cloud/pubsub/internal/batching_publisher_tracing_connection_test.cc +++ b/google/cloud/pubsub/internal/batching_publisher_tracing_connection_test.cc @@ -22,7 +22,7 @@ #include "google/cloud/testing_util/opentelemetry_matchers.h" #include "google/cloud/testing_util/status_matchers.h" #include -#include +#include namespace google { namespace cloud { @@ -45,7 +45,7 @@ using ::testing::ElementsAre; using ::testing::SizeIs; TEST(BatchingPublisherTracingConnectionTest, PublishSpan) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); auto mock = std::make_shared(); EXPECT_CALL(*mock, Publish) @@ -72,7 +72,7 @@ TEST(BatchingPublisherTracingConnectionTest, PublishSpan) { SpanWithStatus(opentelemetry::trace::StatusCode::kOk), SpanHasAttributes( OTelAttribute( - sc::kCodeFunction, + sc::code::kCodeFunctionName, "pubsub::BatchingPublisherConnection::Publish"), OTelAttribute("gl-cpp.status_code", "OK"))))); } diff --git a/google/cloud/pubsub/internal/blocking_publisher_connection_impl.cc b/google/cloud/pubsub/internal/blocking_publisher_connection_impl.cc index 14fe9000abb79..e63ad7ab44f81 100644 --- a/google/cloud/pubsub/internal/blocking_publisher_connection_impl.cc +++ b/google/cloud/pubsub/internal/blocking_publisher_connection_impl.cc @@ -14,6 +14,7 @@ #include "google/cloud/pubsub/internal/blocking_publisher_connection_impl.h" #include "google/cloud/pubsub/internal/publisher_stub_factory.h" +#include "google/cloud/pubsub/options.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/internal/retry_loop.h" diff --git a/google/cloud/pubsub/internal/blocking_publisher_tracing_connection.cc b/google/cloud/pubsub/internal/blocking_publisher_tracing_connection.cc index 603d98b58776b..ef3e98e115654 100644 --- a/google/cloud/pubsub/internal/blocking_publisher_tracing_connection.cc +++ b/google/cloud/pubsub/internal/blocking_publisher_tracing_connection.cc @@ -13,39 +13,39 @@ // limitations under the License. #include "google/cloud/pubsub/internal/blocking_publisher_tracing_connection.h" -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/pubsub/message.h" #include "google/cloud/pubsub/topic.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/status_or.h" #include +#include +#include #include -#include #include -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY namespace google { namespace cloud { namespace pubsub_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY namespace { opentelemetry::nostd::shared_ptr StartPublishSpan( pubsub::Topic const& topic, pubsub::Message const& m) { - namespace sc = opentelemetry::trace::SemanticConventions; + namespace sc = opentelemetry::semconv; opentelemetry::trace::StartSpanOptions options; options.kind = opentelemetry::trace::SpanKind::kProducer; auto span = internal::MakeSpan( topic.topic_id() + " create", - {{sc::kMessagingSystem, "gcp_pubsub"}, - {sc::kMessagingDestinationName, topic.topic_id()}, + {{sc::messaging::kMessagingSystem, "gcp_pubsub"}, + {sc::messaging::kMessagingDestinationName, topic.topic_id()}, {"gcp.project_id", topic.project_id()}, - {/*sc::kMessagingOperationType=*/"messaging.operation.type", "create"}, - {/*sc::kMessagingMessageEnvelopeSize=*/"messaging.message.envelope.size", + {/*sc::messaging::kMessagingOperationType=*/"messaging.operation.type", + "create"}, + {/*sc::messaging::kMessagingMessageEnvelopeSize=*/"messaging.message." + "envelope.size", static_cast(MessageSize(m))}, - {sc::kCodeFunction, "pubsub::BlockingPublisher::Publish"}}, + {sc::code::kCodeFunctionName, "pubsub::BlockingPublisher::Publish"}}, options); if (!m.ordering_key().empty()) { span->SetAttribute("messaging.gcp_pubsub.message.ordering_key", @@ -92,16 +92,6 @@ MakeBlockingPublisherTracingConnection( std::move(connection)); } -#else // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - -std::shared_ptr -MakeBlockingPublisherTracingConnection( - std::shared_ptr connection) { - return connection; -} - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud diff --git a/google/cloud/pubsub/internal/blocking_publisher_tracing_connection_test.cc b/google/cloud/pubsub/internal/blocking_publisher_tracing_connection_test.cc index ce29cb4022765..62eafd27b7528 100644 --- a/google/cloud/pubsub/internal/blocking_publisher_tracing_connection_test.cc +++ b/google/cloud/pubsub/internal/blocking_publisher_tracing_connection_test.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/pubsub/internal/blocking_publisher_tracing_connection.h" #include "google/cloud/pubsub/blocking_publisher_connection.h" #include "google/cloud/pubsub/message.h" @@ -25,7 +23,8 @@ #include "google/cloud/testing_util/opentelemetry_matchers.h" #include "google/cloud/testing_util/status_matchers.h" #include -#include +#include +#include namespace google { namespace cloud { @@ -53,7 +52,7 @@ using ::testing::ElementsAre; using ::testing::Not; TEST(BlockingPublisherTracingConnectionTest, PublishSpanOnSuccess) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); auto mock = std::make_shared(); EXPECT_CALL(*mock, Publish) @@ -79,24 +78,27 @@ TEST(BlockingPublisherTracingConnectionTest, PublishSpanOnSuccess) { SpanNamed("test-topic create"), SpanWithStatus(opentelemetry::trace::StatusCode::kOk), SpanHasAttributes( - OTelAttribute(sc::kMessagingSystem, "gcp_pubsub"), - OTelAttribute(sc::kMessagingDestinationName, - "test-topic"), + OTelAttribute(sc::messaging::kMessagingSystem, + "gcp_pubsub"), + OTelAttribute( + sc::messaging::kMessagingDestinationName, "test-topic"), OTelAttribute("gcp.project_id", "test-project"), OTelAttribute( "messaging.gcp_pubsub.message.ordering_key", "ordering-key-0"), OTelAttribute("gl-cpp.status_code", "OK"), - OTelAttribute(/*sc::kMessagingMessageEnvelopeSize=*/ - "messaging.message.envelope.size", - 45), + OTelAttribute< + std:: + int64_t>(/*sc::messaging::kMessagingMessageEnvelopeSize=*/ + "messaging.message.envelope.size", 45), OTelAttribute("messaging.message_id", "test-id-0"), OTelAttribute( - sc::kCodeFunction, "pubsub::BlockingPublisher::Publish"))))); + sc::code::kCodeFunctionName, + "pubsub::BlockingPublisher::Publish"))))); } TEST(BlockingPublisherTracingConnectionTest, PublishSpanOnError) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); auto mock = std::make_shared(); EXPECT_CALL(*mock, Publish) @@ -122,17 +124,19 @@ TEST(BlockingPublisherTracingConnectionTest, PublishSpanOnError) { SpanNamed("test-topic create"), SpanWithStatus(opentelemetry::trace::StatusCode::kError), SpanHasAttributes( - OTelAttribute(sc::kMessagingSystem, "gcp_pubsub"), - OTelAttribute(sc::kMessagingDestinationName, - "test-topic"), + OTelAttribute(sc::messaging::kMessagingSystem, + "gcp_pubsub"), + OTelAttribute( + sc::messaging::kMessagingDestinationName, "test-topic"), OTelAttribute("gcp.project_id", "test-project"), OTelAttribute( "messaging.gcp_pubsub.message.ordering_key", "ordering-key-0"), OTelAttribute("gl-cpp.status_code", kErrorCode), - OTelAttribute(/*sc::kMessagingMessageEnvelopeSize=*/ - "messaging.message.envelope.size", - 45))))); + OTelAttribute< + std:: + int64_t>(/*sc::messaging::kMessagingMessageEnvelopeSize=*/ + "messaging.message.envelope.size", 45))))); } TEST(BlockingPublisherTracingConnectionTest, PublishSpanOmitsOrderingKey) { @@ -187,5 +191,3 @@ TEST(MakeBlockingPublisherTracingConnectionTest, CreateTracingConnection) { } // namespace pubsub_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/pubsub/internal/default_batch_callback.h b/google/cloud/pubsub/internal/default_batch_callback.h index 4b387a0973f72..eb3a330ff9fc4 100644 --- a/google/cloud/pubsub/internal/default_batch_callback.h +++ b/google/cloud/pubsub/internal/default_batch_callback.h @@ -18,7 +18,7 @@ #include "google/cloud/pubsub/internal/batch_callback.h" #include "google/cloud/pubsub/version.h" #include "google/cloud/status_or.h" -#include +#include "google/pubsub/v1/pubsub.pb.h" namespace google { namespace cloud { diff --git a/google/cloud/pubsub/internal/default_message_callback.h b/google/cloud/pubsub/internal/default_message_callback.h index 3d44f5928d374..11c35f6fdfd76 100644 --- a/google/cloud/pubsub/internal/default_message_callback.h +++ b/google/cloud/pubsub/internal/default_message_callback.h @@ -17,7 +17,7 @@ #include "google/cloud/pubsub/internal/message_callback.h" #include "google/cloud/pubsub/version.h" -#include +#include "google/pubsub/v1/pubsub.pb.h" namespace google { namespace cloud { diff --git a/google/cloud/pubsub/internal/default_pull_ack_handler.cc b/google/cloud/pubsub/internal/default_pull_ack_handler.cc index 2185d67b5f4e8..1654de0cfbb42 100644 --- a/google/cloud/pubsub/internal/default_pull_ack_handler.cc +++ b/google/cloud/pubsub/internal/default_pull_ack_handler.cc @@ -18,7 +18,7 @@ #include "google/cloud/pubsub/options.h" #include "google/cloud/internal/async_retry_loop.h" #include "google/cloud/internal/make_status.h" -#include +#include "google/pubsub/v1/pubsub.pb.h" #include namespace google { diff --git a/google/cloud/pubsub/internal/defaults.cc b/google/cloud/pubsub/internal/defaults.cc index b342a55af3d51..0c6af51632562 100644 --- a/google/cloud/pubsub/internal/defaults.cc +++ b/google/cloud/pubsub/internal/defaults.cc @@ -17,13 +17,13 @@ #include "google/cloud/common_options.h" #include "google/cloud/connection_options.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" #include "google/cloud/internal/user_agent_prefix.h" #include "google/cloud/options.h" #include "absl/strings/numbers.h" +#include "absl/strings/str_cat.h" #include #include #include diff --git a/google/cloud/pubsub/internal/extend_leases_with_retry.cc b/google/cloud/pubsub/internal/extend_leases_with_retry.cc index 94d12aab022a2..0caa2dbaf47a8 100644 --- a/google/cloud/pubsub/internal/extend_leases_with_retry.cc +++ b/google/cloud/pubsub/internal/extend_leases_with_retry.cc @@ -185,8 +185,6 @@ class ExtendLeasesHandle int attempts_ = 0; }; -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TracingLeaseManagement : public LeaseManagement { public: TracingLeaseManagement(std::shared_ptr child, @@ -221,15 +219,6 @@ std::shared_ptr MakeTracingLeaseManagement( std::move(batch_callback)); } -#else // #ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - -std::shared_ptr MakeTracingLeaseManagement( - std::shared_ptr impl, std::shared_ptr) { - return impl; -} - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - } // namespace future ExtendLeasesWithRetry( diff --git a/google/cloud/pubsub/internal/extend_leases_with_retry.h b/google/cloud/pubsub/internal/extend_leases_with_retry.h index 1140cc5d3f58a..a89eaba22130f 100644 --- a/google/cloud/pubsub/internal/extend_leases_with_retry.h +++ b/google/cloud/pubsub/internal/extend_leases_with_retry.h @@ -22,7 +22,7 @@ #include "google/cloud/future.h" #include "google/cloud/status.h" #include "google/cloud/status_or.h" -#include +#include "google/pubsub/v1/pubsub.pb.h" namespace google { namespace cloud { diff --git a/google/cloud/pubsub/internal/extend_leases_with_retry_test.cc b/google/cloud/pubsub/internal/extend_leases_with_retry_test.cc index 3d06e67ee356b..d5fbd92ea69b3 100644 --- a/google/cloud/pubsub/internal/extend_leases_with_retry_test.cc +++ b/google/cloud/pubsub/internal/extend_leases_with_retry_test.cc @@ -190,8 +190,6 @@ TEST(ExtendLeasesWithRetry, FailureTooManyTransients) { EXPECT_THAT(log_lines, Contains(HasSubstr("ack_id=test-003"))); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TEST(ExtendLeasesWithRetry, SuccessWithOtelEnabled) { auto mock = std::make_shared(); auto mock_cq = std::make_shared(); @@ -231,8 +229,6 @@ TEST(ExtendLeasesWithRetry, SuccessWithOtelEnabled) { EXPECT_STATUS_OK(result.get()); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud diff --git a/google/cloud/pubsub/internal/flow_controlled_publisher_connection.h b/google/cloud/pubsub/internal/flow_controlled_publisher_connection.h index c3f7387f95c74..4a1638df07aad 100644 --- a/google/cloud/pubsub/internal/flow_controlled_publisher_connection.h +++ b/google/cloud/pubsub/internal/flow_controlled_publisher_connection.h @@ -15,6 +15,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_INTERNAL_FLOW_CONTROLLED_PUBLISHER_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_INTERNAL_FLOW_CONTROLLED_PUBLISHER_CONNECTION_H +#include "google/cloud/pubsub/options.h" #include "google/cloud/pubsub/publisher_connection.h" #include "google/cloud/pubsub/version.h" #include diff --git a/google/cloud/pubsub/internal/flow_controlled_publisher_tracing_connection.cc b/google/cloud/pubsub/internal/flow_controlled_publisher_tracing_connection.cc index 2c70c8d1dc975..c60bde49a69ad 100644 --- a/google/cloud/pubsub/internal/flow_controlled_publisher_tracing_connection.cc +++ b/google/cloud/pubsub/internal/flow_controlled_publisher_tracing_connection.cc @@ -14,19 +14,15 @@ #include "google/cloud/pubsub/internal/flow_controlled_publisher_tracing_connection.h" #include "google/cloud/pubsub/publisher_connection.h" -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/internal/opentelemetry.h" +#include #include -#include -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY namespace google { namespace cloud { namespace pubsub_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - namespace { class FlowControlledPublisherTracingConnection : public pubsub::PublisherConnection { @@ -38,10 +34,10 @@ class FlowControlledPublisherTracingConnection ~FlowControlledPublisherTracingConnection() override = default; future> Publish(PublishParams p) override { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto span = internal::MakeSpan( "publisher flow control", - {{sc::kCodeFunction, + {{sc::code::kCodeFunctionName, "pubsub::FlowControlledPublisherConnection::Publish"}}); auto result = child_->Publish(std::move(p)); internal::EndSpan(*span); @@ -75,16 +71,6 @@ MakeFlowControlledPublisherTracingConnection( std::move(connection)); } -#else // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - -std::shared_ptr -MakeFlowControlledPublisherTracingConnection( - std::shared_ptr connection) { - return connection; -} - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud diff --git a/google/cloud/pubsub/internal/flow_controlled_publisher_tracing_connection_test.cc b/google/cloud/pubsub/internal/flow_controlled_publisher_tracing_connection_test.cc index cb6b8942c7426..c9c55d415c516 100644 --- a/google/cloud/pubsub/internal/flow_controlled_publisher_tracing_connection_test.cc +++ b/google/cloud/pubsub/internal/flow_controlled_publisher_tracing_connection_test.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/pubsub/internal/flow_controlled_publisher_tracing_connection.h" #include "google/cloud/pubsub/mocks/mock_publisher_connection.h" #include "google/cloud/pubsub/publisher_connection.h" @@ -22,7 +20,7 @@ #include "google/cloud/testing_util/opentelemetry_matchers.h" #include "google/cloud/testing_util/status_matchers.h" #include -#include +#include namespace google { namespace cloud { @@ -47,7 +45,7 @@ using ::testing::ElementsAre; using ::testing::SizeIs; TEST(FlowControlledPublisherTracingConnectionTest, PublishSpan) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); auto mock = std::make_shared(); EXPECT_CALL(*mock, Publish) @@ -75,7 +73,7 @@ TEST(FlowControlledPublisherTracingConnectionTest, PublishSpan) { SpanWithStatus(opentelemetry::trace::StatusCode::kOk), SpanHasAttributes( OTelAttribute( - sc::kCodeFunction, + sc::code::kCodeFunctionName, "pubsub::FlowControlledPublisherConnection::Publish"), OTelAttribute("gl-cpp.status_code", "OK"))))); } @@ -139,5 +137,3 @@ TEST(MakeFlowControlledPublisherTracingConnectionTest, } // namespace pubsub_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/pubsub/internal/message_callback.h b/google/cloud/pubsub/internal/message_callback.h index b595683383c32..bdf0cbbe0bfee 100644 --- a/google/cloud/pubsub/internal/message_callback.h +++ b/google/cloud/pubsub/internal/message_callback.h @@ -19,7 +19,7 @@ #include "google/cloud/pubsub/internal/span.h" #include "google/cloud/pubsub/message.h" #include "google/cloud/pubsub/version.h" -#include +#include "google/pubsub/v1/pubsub.pb.h" #include namespace google { diff --git a/google/cloud/pubsub/internal/message_carrier.cc b/google/cloud/pubsub/internal/message_carrier.cc index 74e6e7b226231..e0ba47c069309 100644 --- a/google/cloud/pubsub/internal/message_carrier.cc +++ b/google/cloud/pubsub/internal/message_carrier.cc @@ -12,13 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/pubsub/internal/message_carrier.h" #include "google/cloud/pubsub/message.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/noexcept_action.h" #include "google/cloud/internal/opentelemetry.h" +#include "absl/strings/str_cat.h" #include namespace google { @@ -52,5 +50,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/pubsub/internal/message_carrier.h b/google/cloud/pubsub/internal/message_carrier.h index 9e8e9d48d4423..f48744484ad24 100644 --- a/google/cloud/pubsub/internal/message_carrier.h +++ b/google/cloud/pubsub/internal/message_carrier.h @@ -15,8 +15,6 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_INTERNAL_MESSAGE_CARRIER_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_INTERNAL_MESSAGE_CARRIER_H -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/pubsub/message.h" #include "google/cloud/version.h" #include @@ -60,6 +58,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_INTERNAL_MESSAGE_CARRIER_H diff --git a/google/cloud/pubsub/internal/message_carrier_test.cc b/google/cloud/pubsub/internal/message_carrier_test.cc index 621e0f11df190..d212013d047d7 100644 --- a/google/cloud/pubsub/internal/message_carrier_test.cc +++ b/google/cloud/pubsub/internal/message_carrier_test.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/pubsub/internal/message_carrier.h" #include "google/cloud/pubsub/message.h" #include @@ -71,5 +69,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/pubsub/internal/message_propagator.cc b/google/cloud/pubsub/internal/message_propagator.cc index d433d8301bf28..2b032a4c455f5 100644 --- a/google/cloud/pubsub/internal/message_propagator.cc +++ b/google/cloud/pubsub/internal/message_propagator.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/pubsub/internal/message_propagator.h" #include "google/cloud/pubsub/internal/message_carrier.h" #include "google/cloud/pubsub/message.h" @@ -45,5 +43,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/pubsub/internal/message_propagator.h b/google/cloud/pubsub/internal/message_propagator.h index a04176c5fed0b..1bbd10c71574c 100644 --- a/google/cloud/pubsub/internal/message_propagator.h +++ b/google/cloud/pubsub/internal/message_propagator.h @@ -15,8 +15,6 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_INTERNAL_MESSAGE_PROPAGATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_INTERNAL_MESSAGE_PROPAGATOR_H -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/pubsub/internal/message_carrier.h" #include "google/cloud/pubsub/message.h" #include @@ -48,6 +46,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_INTERNAL_MESSAGE_PROPAGATOR_H diff --git a/google/cloud/pubsub/internal/message_propagator_test.cc b/google/cloud/pubsub/internal/message_propagator_test.cc index d948369b02a50..f9584343eb575 100644 --- a/google/cloud/pubsub/internal/message_propagator_test.cc +++ b/google/cloud/pubsub/internal/message_propagator_test.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/pubsub/internal/message_propagator.h" #include "google/cloud/pubsub/internal/message_carrier.h" #include "google/cloud/pubsub/message.h" @@ -77,5 +75,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/pubsub/internal/publisher_auth_decorator.cc b/google/cloud/pubsub/internal/publisher_auth_decorator.cc index d38f7de840f73..cfe180c5c5cc3 100644 --- a/google/cloud/pubsub/internal/publisher_auth_decorator.cc +++ b/google/cloud/pubsub/internal/publisher_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/pubsub/v1/pubsub.proto #include "google/cloud/pubsub/internal/publisher_auth_decorator.h" -#include +#include "google/pubsub/v1/pubsub.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { @@ -155,3 +158,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsub/internal/publisher_auth_decorator.h b/google/cloud/pubsub/internal/publisher_auth_decorator.h index 2f81f5fef921a..36453b10473e8 100644 --- a/google/cloud/pubsub/internal/publisher_auth_decorator.h +++ b/google/cloud/pubsub/internal/publisher_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { @@ -104,4 +107,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_INTERNAL_PUBLISHER_AUTH_DECORATOR_H diff --git a/google/cloud/pubsub/internal/publisher_logging_decorator.cc b/google/cloud/pubsub/internal/publisher_logging_decorator.cc index 441eb3e7072f2..682ad92786252 100644 --- a/google/cloud/pubsub/internal/publisher_logging_decorator.cc +++ b/google/cloud/pubsub/internal/publisher_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/pubsub/internal/publisher_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/pubsub/v1/pubsub.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { @@ -193,3 +196,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsub/internal/publisher_logging_decorator.h b/google/cloud/pubsub/internal/publisher_logging_decorator.h index 7f5028d399ebd..963b4e590d3ee 100644 --- a/google/cloud/pubsub/internal/publisher_logging_decorator.h +++ b/google/cloud/pubsub/internal/publisher_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { @@ -104,4 +107,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_INTERNAL_PUBLISHER_LOGGING_DECORATOR_H diff --git a/google/cloud/pubsub/internal/publisher_metadata_decorator.cc b/google/cloud/pubsub/internal/publisher_metadata_decorator.cc index 2eb9e3771b152..dc4331b875f5c 100644 --- a/google/cloud/pubsub/internal/publisher_metadata_decorator.cc +++ b/google/cloud/pubsub/internal/publisher_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/pubsub/internal/publisher_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/pubsub/v1/pubsub.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { @@ -178,3 +182,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsub/internal/publisher_metadata_decorator.h b/google/cloud/pubsub/internal/publisher_metadata_decorator.h index 1a6c724c4f3b9..d0ffab4ff284b 100644 --- a/google/cloud/pubsub/internal/publisher_metadata_decorator.h +++ b/google/cloud/pubsub/internal/publisher_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { @@ -109,4 +112,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_INTERNAL_PUBLISHER_METADATA_DECORATOR_H diff --git a/google/cloud/pubsub/internal/publisher_round_robin_decorator.cc b/google/cloud/pubsub/internal/publisher_round_robin_decorator.cc index d23db6750ebb3..aa645cf530eab 100644 --- a/google/cloud/pubsub/internal/publisher_round_robin_decorator.cc +++ b/google/cloud/pubsub/internal/publisher_round_robin_decorator.cc @@ -21,6 +21,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { @@ -129,3 +132,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsub/internal/publisher_round_robin_decorator.h b/google/cloud/pubsub/internal/publisher_round_robin_decorator.h index c11cbe985b7f6..6d15671a44d49 100644 --- a/google/cloud/pubsub/internal/publisher_round_robin_decorator.h +++ b/google/cloud/pubsub/internal/publisher_round_robin_decorator.h @@ -25,6 +25,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { @@ -105,4 +108,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_INTERNAL_PUBLISHER_ROUND_ROBIN_DECORATOR_H diff --git a/google/cloud/pubsub/internal/publisher_stub.cc b/google/cloud/pubsub/internal/publisher_stub.cc index 8b6401ee66bdd..9f05a9f2bd9be 100644 --- a/google/cloud/pubsub/internal/publisher_stub.cc +++ b/google/cloud/pubsub/internal/publisher_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/pubsub/internal/publisher_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "google/pubsub/v1/pubsub.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { @@ -191,3 +194,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsub/internal/publisher_stub.h b/google/cloud/pubsub/internal/publisher_stub.h index 0345b4472e658..9da049a6d562c 100644 --- a/google/cloud/pubsub/internal/publisher_stub.h +++ b/google/cloud/pubsub/internal/publisher_stub.h @@ -24,11 +24,14 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/pubsub/v1/pubsub.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { @@ -171,4 +174,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_INTERNAL_PUBLISHER_STUB_H diff --git a/google/cloud/pubsub/internal/publisher_stub_factory.cc b/google/cloud/pubsub/internal/publisher_stub_factory.cc index eb6c9d5cd7b7c..32ade81bd0324 100644 --- a/google/cloud/pubsub/internal/publisher_stub_factory.cc +++ b/google/cloud/pubsub/internal/publisher_stub_factory.cc @@ -25,8 +25,8 @@ #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/pubsub/v1/pubsub.grpc.pb.h" namespace google { namespace cloud { diff --git a/google/cloud/pubsub/internal/publisher_stub_factory_test.cc b/google/cloud/pubsub/internal/publisher_stub_factory_test.cc index 3619fb4da450b..3c6eb462cbba9 100644 --- a/google/cloud/pubsub/internal/publisher_stub_factory_test.cc +++ b/google/cloud/pubsub/internal/publisher_stub_factory_test.cc @@ -205,7 +205,6 @@ TEST_F(PublisherStubFactory, Logging) { EXPECT_THAT(log.ExtractLines(), Contains(HasSubstr("CreateTopic"))); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::DisableTracing; using ::google::cloud::testing_util::EnableTracing; using ::google::cloud::testing_util::SpanNamed; @@ -284,7 +283,6 @@ TEST_F(PublisherStubFactory, TracingDisabled) { EXPECT_THAT(span_catcher->GetSpans(), IsEmpty()); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY // The following tests are for all the rpcs on the stub. TEST_F(PublisherStubFactory, CreateTopic) { diff --git a/google/cloud/pubsub/internal/publisher_tracing_connection.cc b/google/cloud/pubsub/internal/publisher_tracing_connection.cc index d0156ec3c2a68..e64ecddca409f 100644 --- a/google/cloud/pubsub/internal/publisher_tracing_connection.cc +++ b/google/cloud/pubsub/internal/publisher_tracing_connection.cc @@ -13,49 +13,49 @@ // limitations under the License. #include "google/cloud/pubsub/internal/publisher_tracing_connection.h" +#include "google/cloud/pubsub/internal/message_propagator.h" #include "google/cloud/pubsub/message.h" #include "google/cloud/pubsub/publisher_connection.h" #include "google/cloud/future.h" -#include "google/cloud/status.h" -#include "google/cloud/version.h" -#include -#include -#include -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY -#include "google/cloud/pubsub/internal/message_propagator.h" #include "google/cloud/internal/opentelemetry.h" +#include "google/cloud/status.h" #include "google/cloud/status_or.h" +#include "google/cloud/version.h" #include #include +#include +#include #include #include -#include #include #include -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY +#include +#include +#include namespace google { namespace cloud { namespace pubsub_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY namespace { opentelemetry::nostd::shared_ptr StartPublishSpan( pubsub::Topic const& topic, pubsub::Message const& m) { - namespace sc = opentelemetry::trace::SemanticConventions; + namespace sc = opentelemetry::semconv; opentelemetry::trace::StartSpanOptions options; options.kind = opentelemetry::trace::SpanKind::kProducer; auto span = internal::MakeSpan( topic.topic_id() + " create", - {{sc::kMessagingSystem, "gcp_pubsub"}, - {sc::kMessagingDestinationName, topic.topic_id()}, + {{sc::messaging::kMessagingSystem, "gcp_pubsub"}, + {sc::messaging::kMessagingDestinationName, topic.topic_id()}, {"gcp.project_id", topic.project_id()}, - {/*sc::kMessagingOperationType=*/"messaging.operation.type", "create"}, - {/*sc::kMessagingMessageEnvelopeSize=*/"messaging.message.envelope.size", + {/*sc::messaging::kMessagingOperationType=*/"messaging.operation.type", + "create"}, + {/*sc::messaging::kMessagingMessageEnvelopeSize=*/"messaging.message." + "envelope.size", static_cast(MessageSize(m))}, - {sc::kCodeFunction, "pubsub::PublisherConnection::Publish"}}, + {sc::code::kCodeFunctionName, "pubsub::PublisherConnection::Publish"}}, options); if (!m.ordering_key().empty()) { span->SetAttribute("messaging.gcp_pubsub.message.ordering_key", @@ -67,10 +67,11 @@ opentelemetry::nostd::shared_ptr StartPublishSpan( future> EndPublishSpan( opentelemetry::nostd::shared_ptr span, future> f) { - namespace sc = opentelemetry::trace::SemanticConventions; + namespace sc = opentelemetry::semconv; return f.then([span = std::move(span)](auto fut) { auto message_id = fut.get(); - if (message_id) span->SetAttribute(sc::kMessagingMessageId, *message_id); + if (message_id) + span->SetAttribute(sc::messaging::kMessagingMessageId, *message_id); return internal::EndSpan(*span, std::move(message_id)); }); } @@ -128,16 +129,6 @@ std::shared_ptr MakePublisherTracingConnection( std::move(connection)); } -#else // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - -std::shared_ptr MakePublisherTracingConnection( - pubsub::Topic, // NOLINT(performance-unnecessary-value-param) - std::shared_ptr connection) { - return connection; -} - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud diff --git a/google/cloud/pubsub/internal/publisher_tracing_connection_test.cc b/google/cloud/pubsub/internal/publisher_tracing_connection_test.cc index e5ef264bbc191..a86ffe4313c42 100644 --- a/google/cloud/pubsub/internal/publisher_tracing_connection_test.cc +++ b/google/cloud/pubsub/internal/publisher_tracing_connection_test.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/pubsub/internal/publisher_tracing_connection.h" #include "google/cloud/pubsub/message.h" #include "google/cloud/pubsub/mocks/mock_publisher_connection.h" @@ -26,7 +24,8 @@ #include "google/cloud/testing_util/opentelemetry_matchers.h" #include "google/cloud/testing_util/status_matchers.h" #include -#include +#include +#include namespace google { namespace cloud { @@ -58,7 +57,7 @@ using ::testing::Pair; using ::testing::StartsWith; TEST(PublisherTracingConnectionTest, PublishSpanOnSuccess) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); auto mock = std::make_shared(); EXPECT_CALL(*mock, Publish) @@ -84,28 +83,31 @@ TEST(PublisherTracingConnectionTest, PublishSpanOnSuccess) { SpanNamed("test-topic create"), SpanWithStatus(opentelemetry::trace::StatusCode::kOk), SpanHasAttributes( - OTelAttribute(sc::kMessagingSystem, "gcp_pubsub"), - OTelAttribute(sc::kMessagingDestinationName, - "test-topic"), + OTelAttribute(sc::messaging::kMessagingSystem, + "gcp_pubsub"), + OTelAttribute( + sc::messaging::kMessagingDestinationName, "test-topic"), OTelAttribute("gcp.project_id", "test-project"), OTelAttribute( "messaging.gcp_pubsub.message.ordering_key", "ordering-key-0"), OTelAttribute("gl-cpp.status_code", "OK"), - OTelAttribute(/*sc::kMessagingMessageEnvelopeSize=*/ - "messaging.message.envelope.size", - 45), + OTelAttribute< + std:: + int64_t>(/*sc::messaging::kMessagingMessageEnvelopeSize=*/ + "messaging.message.envelope.size", 45), OTelAttribute( - /*sc::kMessagingOperationType=*/"messaging.operation.type", - "create"), - OTelAttribute(sc::kMessagingMessageId, "test-id-0"), + /*sc::messaging::kMessagingOperationType=*/ + "messaging.operation.type", "create"), + OTelAttribute(sc::messaging::kMessagingMessageId, + "test-id-0"), OTelAttribute( - sc::kCodeFunction, + sc::code::kCodeFunctionName, "pubsub::PublisherConnection::Publish"))))); } TEST(PublisherTracingConnectionTest, PublishSpanOnError) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); auto mock = std::make_shared(); EXPECT_CALL(*mock, Publish) @@ -132,20 +134,22 @@ TEST(PublisherTracingConnectionTest, PublishSpanOnError) { SpanNamed("test-topic create"), SpanWithStatus(opentelemetry::trace::StatusCode::kError), SpanHasAttributes( - OTelAttribute(sc::kMessagingSystem, "gcp_pubsub"), - OTelAttribute(sc::kMessagingDestinationName, - "test-topic"), + OTelAttribute(sc::messaging::kMessagingSystem, + "gcp_pubsub"), + OTelAttribute( + sc::messaging::kMessagingDestinationName, "test-topic"), OTelAttribute("gcp.project_id", "test-project"), OTelAttribute( "messaging.gcp_pubsub.message.ordering_key", "ordering-key-0"), OTelAttribute( - /*sc::kMessagingOperationType=*/"messaging.operation.type", - "create"), + /*sc::messaging::kMessagingOperationType=*/ + "messaging.operation.type", "create"), OTelAttribute("gl-cpp.status_code", kErrorCode), - OTelAttribute(/*sc::kMessagingMessageEnvelopeSize=*/ - "messaging.message.envelope.size", - 45))))); + OTelAttribute< + std:: + int64_t>(/*sc::messaging::kMessagingMessageEnvelopeSize=*/ + "messaging.message.envelope.size", 45))))); } TEST(PublisherTracingConnectionTest, PublishInjectsTraceContext) { @@ -251,5 +255,3 @@ TEST(MakePublisherTracingConnectionTest, CreateTracingConnection) { } // namespace pubsub_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/pubsub/internal/publisher_tracing_stub.cc b/google/cloud/pubsub/internal/publisher_tracing_stub.cc index 6c9790e0a7048..0c1c2468cf334 100644 --- a/google/cloud/pubsub/internal/publisher_tracing_stub.cc +++ b/google/cloud/pubsub/internal/publisher_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PublisherTracingStub::PublisherTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -180,18 +181,14 @@ PublisherTracingStub::AsyncPublish( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePublisherTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsub/internal/publisher_tracing_stub.h b/google/cloud/pubsub/internal/publisher_tracing_stub.h index 9423dee21cc8d..92bd433f5b579 100644 --- a/google/cloud/pubsub/internal/publisher_tracing_stub.h +++ b/google/cloud/pubsub/internal/publisher_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PublisherTracingStub : public PublisherStub { public: ~PublisherTracingStub() override = default; @@ -100,8 +101,6 @@ class PublisherTracingStub : public PublisherStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -116,4 +115,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_INTERNAL_PUBLISHER_TRACING_STUB_H diff --git a/google/cloud/pubsub/internal/pull_ack_handler_factory_test.cc b/google/cloud/pubsub/internal/pull_ack_handler_factory_test.cc index 1116d12b78e99..0d5aa2a3c0467 100644 --- a/google/cloud/pubsub/internal/pull_ack_handler_factory_test.cc +++ b/google/cloud/pubsub/internal/pull_ack_handler_factory_test.cc @@ -93,7 +93,6 @@ TEST(PullAckHandlerTest, AckSimple) { pending.first.set_value(false); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::DisableTracing; using ::google::cloud::testing_util::EnableTracing; using ::google::cloud::testing_util::SpanHasInstrumentationScope; @@ -177,8 +176,6 @@ TEST(PullAckHandlerTest, TracingDisabled) { EXPECT_THAT(span_catcher->GetSpans(), IsEmpty()); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal diff --git a/google/cloud/pubsub/internal/pull_lease_manager_factory_test.cc b/google/cloud/pubsub/internal/pull_lease_manager_factory_test.cc index 49d8797c620e1..112b6cf13b088 100644 --- a/google/cloud/pubsub/internal/pull_lease_manager_factory_test.cc +++ b/google/cloud/pubsub/internal/pull_lease_manager_factory_test.cc @@ -89,7 +89,6 @@ TEST(DefaultPullLeaseManager, ExtendLeaseDeadlineSimple) { EXPECT_STATUS_OK(status.get()); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::DisableTracing; using ::google::cloud::testing_util::EnableTracing; using ::google::cloud::testing_util::SpanHasInstrumentationScope; @@ -168,8 +167,6 @@ TEST(DefaultPullLeaseManager, TracingDisabled) { EXPECT_THAT(span_catcher->GetSpans(), IsEmpty()); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal diff --git a/google/cloud/pubsub/internal/schema_auth_decorator.cc b/google/cloud/pubsub/internal/schema_auth_decorator.cc index 2e17b6289d56f..0aad3f16c5d52 100644 --- a/google/cloud/pubsub/internal/schema_auth_decorator.cc +++ b/google/cloud/pubsub/internal/schema_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/pubsub/v1/schema.proto #include "google/cloud/pubsub/internal/schema_auth_decorator.h" -#include +#include "google/pubsub/v1/schema.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { @@ -144,3 +147,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsub/internal/schema_auth_decorator.h b/google/cloud/pubsub/internal/schema_auth_decorator.h index e1255b8ab4794..b1dffe1b025f5 100644 --- a/google/cloud/pubsub/internal/schema_auth_decorator.h +++ b/google/cloud/pubsub/internal/schema_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { @@ -100,4 +103,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_INTERNAL_SCHEMA_AUTH_DECORATOR_H diff --git a/google/cloud/pubsub/internal/schema_logging_decorator.cc b/google/cloud/pubsub/internal/schema_logging_decorator.cc index 83da27a9d0e2a..6bab287897dee 100644 --- a/google/cloud/pubsub/internal/schema_logging_decorator.cc +++ b/google/cloud/pubsub/internal/schema_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/pubsub/internal/schema_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/pubsub/v1/schema.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { @@ -187,3 +190,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsub/internal/schema_logging_decorator.h b/google/cloud/pubsub/internal/schema_logging_decorator.h index 88309acd8a1c6..0c889372b6348 100644 --- a/google/cloud/pubsub/internal/schema_logging_decorator.h +++ b/google/cloud/pubsub/internal/schema_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { @@ -100,4 +103,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_INTERNAL_SCHEMA_LOGGING_DECORATOR_H diff --git a/google/cloud/pubsub/internal/schema_metadata_decorator.cc b/google/cloud/pubsub/internal/schema_metadata_decorator.cc index 92a4d78dad6da..2905e41d8972b 100644 --- a/google/cloud/pubsub/internal/schema_metadata_decorator.cc +++ b/google/cloud/pubsub/internal/schema_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/pubsub/internal/schema_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/pubsub/v1/schema.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { @@ -174,3 +178,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsub/internal/schema_metadata_decorator.h b/google/cloud/pubsub/internal/schema_metadata_decorator.h index 795f7e5ccdfe4..c574ec775a099 100644 --- a/google/cloud/pubsub/internal/schema_metadata_decorator.h +++ b/google/cloud/pubsub/internal/schema_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { @@ -105,4 +108,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_INTERNAL_SCHEMA_METADATA_DECORATOR_H diff --git a/google/cloud/pubsub/internal/schema_option_defaults.cc b/google/cloud/pubsub/internal/schema_option_defaults.cc index 97f419bda1d51..be80b618a2efa 100644 --- a/google/cloud/pubsub/internal/schema_option_defaults.cc +++ b/google/cloud/pubsub/internal/schema_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/pubsub/internal/schema_option_defaults.h" #include "google/cloud/pubsub/schema_connection.h" #include "google/cloud/pubsub/schema_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -45,7 +45,7 @@ Options SchemaServiceDefaultOptions(std::string const& location, options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - pubsub::SchemaServiceLimitedTimeRetryPolicy(std::chrono::minutes(30)) + pubsub::SchemaServiceLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/pubsub/internal/schema_stub.cc b/google/cloud/pubsub/internal/schema_stub.cc index 39fb5f991eed5..cc724bccb9e8b 100644 --- a/google/cloud/pubsub/internal/schema_stub.cc +++ b/google/cloud/pubsub/internal/schema_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/pubsub/internal/schema_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "google/pubsub/v1/schema.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { @@ -184,3 +187,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsub/internal/schema_stub.h b/google/cloud/pubsub/internal/schema_stub.h index 1e67e671655fe..4fb0a24bf7f0a 100644 --- a/google/cloud/pubsub/internal/schema_stub.h +++ b/google/cloud/pubsub/internal/schema_stub.h @@ -22,11 +22,14 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/pubsub/v1/schema.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { @@ -162,4 +165,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_INTERNAL_SCHEMA_STUB_H diff --git a/google/cloud/pubsub/internal/schema_stub_factory.cc b/google/cloud/pubsub/internal/schema_stub_factory.cc index 1cb81f0e3fe16..ed223f6e1f539 100644 --- a/google/cloud/pubsub/internal/schema_stub_factory.cc +++ b/google/cloud/pubsub/internal/schema_stub_factory.cc @@ -28,11 +28,14 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/pubsub/v1/schema.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsub/internal/schema_stub_factory.h b/google/cloud/pubsub/internal/schema_stub_factory.h index dd84c706dcaca..21d3137a53a40 100644 --- a/google/cloud/pubsub/internal/schema_stub_factory.h +++ b/google/cloud/pubsub/internal/schema_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_INTERNAL_SCHEMA_STUB_FACTORY_H diff --git a/google/cloud/pubsub/internal/schema_tracing_connection.cc b/google/cloud/pubsub/internal/schema_tracing_connection.cc index 798355ca8a6dc..3d8152963a4a8 100644 --- a/google/cloud/pubsub/internal/schema_tracing_connection.cc +++ b/google/cloud/pubsub/internal/schema_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace pubsub_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SchemaServiceTracingConnection::SchemaServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -149,16 +147,12 @@ SchemaServiceTracingConnection::TestIamPermissions( return internal::EndSpan(*span, child_->TestIamPermissions(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSchemaServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/pubsub/internal/schema_tracing_connection.h b/google/cloud/pubsub/internal/schema_tracing_connection.h index ca2e5ef987a8b..2d7121a7bd2f3 100644 --- a/google/cloud/pubsub/internal/schema_tracing_connection.h +++ b/google/cloud/pubsub/internal/schema_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace pubsub_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SchemaServiceTracingConnection : public pubsub::SchemaServiceConnection { public: ~SchemaServiceTracingConnection() override = default; @@ -82,8 +80,6 @@ class SchemaServiceTracingConnection : public pubsub::SchemaServiceConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/pubsub/internal/schema_tracing_stub.cc b/google/cloud/pubsub/internal/schema_tracing_stub.cc index 1594242ac3273..08127248be59b 100644 --- a/google/cloud/pubsub/internal/schema_tracing_stub.cc +++ b/google/cloud/pubsub/internal/schema_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SchemaServiceTracingStub::SchemaServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -181,18 +182,14 @@ SchemaServiceTracingStub::TestIamPermissions( context, *span, child_->TestIamPermissions(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSchemaServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsub/internal/schema_tracing_stub.h b/google/cloud/pubsub/internal/schema_tracing_stub.h index ee9f863191947..cdeb7ed8a3dba 100644 --- a/google/cloud/pubsub/internal/schema_tracing_stub.h +++ b/google/cloud/pubsub/internal/schema_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SchemaServiceTracingStub : public SchemaServiceStub { public: ~SchemaServiceTracingStub() override = default; @@ -96,8 +97,6 @@ class SchemaServiceTracingStub : public SchemaServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -112,4 +111,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_INTERNAL_SCHEMA_TRACING_STUB_H diff --git a/google/cloud/pubsub/internal/session_shutdown_manager.cc b/google/cloud/pubsub/internal/session_shutdown_manager.cc index 8c89ea5501131..e3a2359c01a74 100644 --- a/google/cloud/pubsub/internal/session_shutdown_manager.cc +++ b/google/cloud/pubsub/internal/session_shutdown_manager.cc @@ -13,8 +13,8 @@ // limitations under the License. #include "google/cloud/pubsub/internal/session_shutdown_manager.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/log.h" +#include "absl/strings/str_join.h" namespace google { namespace cloud { diff --git a/google/cloud/pubsub/internal/span.h b/google/cloud/pubsub/internal/span.h index c32e925117d8c..9ff2298df6a7e 100644 --- a/google/cloud/pubsub/internal/span.h +++ b/google/cloud/pubsub/internal/span.h @@ -16,9 +16,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_INTERNAL_SPAN_H #include "google/cloud/pubsub/version.h" -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include namespace google { @@ -28,12 +26,10 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN /** * Span class stores an OpenTelemetery span which can only be accessed by code - * compiled with GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY. + * compiled with Opentelemetry. */ struct Span { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY opentelemetry::nostd::shared_ptr span; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY }; GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END diff --git a/google/cloud/pubsub/internal/streaming_subscription_batch_source.cc b/google/cloud/pubsub/internal/streaming_subscription_batch_source.cc index c8a7af9f4230e..22009d1feaaec 100644 --- a/google/cloud/pubsub/internal/streaming_subscription_batch_source.cc +++ b/google/cloud/pubsub/internal/streaming_subscription_batch_source.cc @@ -15,6 +15,7 @@ #include "google/cloud/pubsub/internal/streaming_subscription_batch_source.h" #include "google/cloud/pubsub/internal/exactly_once_policies.h" #include "google/cloud/pubsub/internal/extend_leases_with_retry.h" +#include "google/cloud/pubsub/options.h" #include "google/cloud/internal/async_retry_loop.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/internal/url_encode.h" diff --git a/google/cloud/pubsub/internal/streaming_subscription_batch_source.h b/google/cloud/pubsub/internal/streaming_subscription_batch_source.h index f55568e4cd19e..e78b21c0d99ea 100644 --- a/google/cloud/pubsub/internal/streaming_subscription_batch_source.h +++ b/google/cloud/pubsub/internal/streaming_subscription_batch_source.h @@ -21,12 +21,11 @@ #include "google/cloud/pubsub/internal/subscriber_stub.h" #include "google/cloud/pubsub/internal/subscription_batch_source.h" #include "google/cloud/pubsub/retry_policy.h" -#include "google/cloud/pubsub/subscriber_options.h" #include "google/cloud/pubsub/version.h" #include "google/cloud/future.h" #include "google/cloud/status.h" #include "google/cloud/status_or.h" -#include +#include "google/pubsub/v1/pubsub.pb.h" #include #include #include diff --git a/google/cloud/pubsub/internal/streaming_subscription_batch_source_test.cc b/google/cloud/pubsub/internal/streaming_subscription_batch_source_test.cc index b081ffd51f972..7ef2ddd51cec5 100644 --- a/google/cloud/pubsub/internal/streaming_subscription_batch_source_test.cc +++ b/google/cloud/pubsub/internal/streaming_subscription_batch_source_test.cc @@ -14,6 +14,7 @@ #include "google/cloud/pubsub/internal/streaming_subscription_batch_source.h" #include "google/cloud/pubsub/internal/defaults.h" +#include "google/cloud/pubsub/options.h" #include "google/cloud/pubsub/subscription.h" #include "google/cloud/pubsub/testing/mock_batch_callback.h" #include "google/cloud/pubsub/testing/mock_subscriber_stub.h" diff --git a/google/cloud/pubsub/internal/subscriber_auth_decorator.cc b/google/cloud/pubsub/internal/subscriber_auth_decorator.cc index d9c0b49ad1347..d99f5a73efc72 100644 --- a/google/cloud/pubsub/internal/subscriber_auth_decorator.cc +++ b/google/cloud/pubsub/internal/subscriber_auth_decorator.cc @@ -18,10 +18,13 @@ #include "google/cloud/pubsub/internal/subscriber_auth_decorator.h" #include "google/cloud/internal/async_read_write_stream_auth.h" -#include +#include "google/pubsub/v1/pubsub.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { @@ -218,3 +221,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsub/internal/subscriber_auth_decorator.h b/google/cloud/pubsub/internal/subscriber_auth_decorator.h index dd5e7ae8fc029..a1617b552b589 100644 --- a/google/cloud/pubsub/internal/subscriber_auth_decorator.h +++ b/google/cloud/pubsub/internal/subscriber_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { @@ -132,4 +135,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_INTERNAL_SUBSCRIBER_AUTH_DECORATOR_H diff --git a/google/cloud/pubsub/internal/subscriber_connection_impl_test.cc b/google/cloud/pubsub/internal/subscriber_connection_impl_test.cc index c1bb150744f63..3bc3149a611eb 100644 --- a/google/cloud/pubsub/internal/subscriber_connection_impl_test.cc +++ b/google/cloud/pubsub/internal/subscriber_connection_impl_test.cc @@ -16,6 +16,7 @@ #include "google/cloud/pubsub/ack_handler.h" #include "google/cloud/pubsub/exactly_once_ack_handler.h" #include "google/cloud/pubsub/internal/defaults.h" +#include "google/cloud/pubsub/options.h" #include "google/cloud/pubsub/testing/fake_streaming_pull.h" #include "google/cloud/pubsub/testing/mock_subscriber_stub.h" #include "google/cloud/pubsub/testing/test_retry_policies.h" diff --git a/google/cloud/pubsub/internal/subscriber_logging_decorator.cc b/google/cloud/pubsub/internal/subscriber_logging_decorator.cc index 8fddcaa502212..88488437a206d 100644 --- a/google/cloud/pubsub/internal/subscriber_logging_decorator.cc +++ b/google/cloud/pubsub/internal/subscriber_logging_decorator.cc @@ -20,12 +20,15 @@ #include "google/cloud/internal/async_read_write_stream_logging.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/pubsub/v1/pubsub.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { @@ -280,3 +283,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsub/internal/subscriber_logging_decorator.h b/google/cloud/pubsub/internal/subscriber_logging_decorator.h index 84ebbf3b0cdc9..1f2b1bf7bc1cb 100644 --- a/google/cloud/pubsub/internal/subscriber_logging_decorator.h +++ b/google/cloud/pubsub/internal/subscriber_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { @@ -133,4 +136,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_INTERNAL_SUBSCRIBER_LOGGING_DECORATOR_H diff --git a/google/cloud/pubsub/internal/subscriber_metadata_decorator.cc b/google/cloud/pubsub/internal/subscriber_metadata_decorator.cc index 3b73e6f47a358..d71711dd647f2 100644 --- a/google/cloud/pubsub/internal/subscriber_metadata_decorator.cc +++ b/google/cloud/pubsub/internal/subscriber_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/pubsub/internal/subscriber_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/pubsub/v1/pubsub.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { @@ -241,3 +245,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsub/internal/subscriber_metadata_decorator.h b/google/cloud/pubsub/internal/subscriber_metadata_decorator.h index 038aece8772d9..ad20863c9ceeb 100644 --- a/google/cloud/pubsub/internal/subscriber_metadata_decorator.h +++ b/google/cloud/pubsub/internal/subscriber_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { @@ -137,4 +140,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_INTERNAL_SUBSCRIBER_METADATA_DECORATOR_H diff --git a/google/cloud/pubsub/internal/subscriber_round_robin_decorator.cc b/google/cloud/pubsub/internal/subscriber_round_robin_decorator.cc index f37db6725ee94..7a17b1a5da683 100644 --- a/google/cloud/pubsub/internal/subscriber_round_robin_decorator.cc +++ b/google/cloud/pubsub/internal/subscriber_round_robin_decorator.cc @@ -21,6 +21,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { @@ -173,3 +176,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsub/internal/subscriber_round_robin_decorator.h b/google/cloud/pubsub/internal/subscriber_round_robin_decorator.h index e8388130a75a0..4daeb6ad39869 100644 --- a/google/cloud/pubsub/internal/subscriber_round_robin_decorator.h +++ b/google/cloud/pubsub/internal/subscriber_round_robin_decorator.h @@ -25,6 +25,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { @@ -133,4 +136,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_INTERNAL_SUBSCRIBER_ROUND_ROBIN_DECORATOR_H diff --git a/google/cloud/pubsub/internal/subscriber_stub.cc b/google/cloud/pubsub/internal/subscriber_stub.cc index 5f59d6a634817..3fe454f614370 100644 --- a/google/cloud/pubsub/internal/subscriber_stub.cc +++ b/google/cloud/pubsub/internal/subscriber_stub.cc @@ -20,10 +20,13 @@ #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/internal/async_read_write_stream_impl.h" #include "google/cloud/status_or.h" -#include +#include "google/pubsub/v1/pubsub.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { @@ -275,3 +278,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsub/internal/subscriber_stub.h b/google/cloud/pubsub/internal/subscriber_stub.h index 0da1146a79dd5..7e4a0ca7cf913 100644 --- a/google/cloud/pubsub/internal/subscriber_stub.h +++ b/google/cloud/pubsub/internal/subscriber_stub.h @@ -25,11 +25,14 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/pubsub/v1/pubsub.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { @@ -227,4 +230,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_INTERNAL_SUBSCRIBER_STUB_H diff --git a/google/cloud/pubsub/internal/subscriber_stub_factory.cc b/google/cloud/pubsub/internal/subscriber_stub_factory.cc index 1d068a884b5fd..fe1661eadd139 100644 --- a/google/cloud/pubsub/internal/subscriber_stub_factory.cc +++ b/google/cloud/pubsub/internal/subscriber_stub_factory.cc @@ -25,8 +25,8 @@ #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/pubsub/v1/pubsub.grpc.pb.h" namespace google { namespace cloud { diff --git a/google/cloud/pubsub/internal/subscriber_stub_factory_test.cc b/google/cloud/pubsub/internal/subscriber_stub_factory_test.cc index 9b0b62ca719d7..e29af3adbc8e5 100644 --- a/google/cloud/pubsub/internal/subscriber_stub_factory_test.cc +++ b/google/cloud/pubsub/internal/subscriber_stub_factory_test.cc @@ -206,7 +206,6 @@ TEST_F(SubscriberStubFactory, Logging) { EXPECT_THAT(log.ExtractLines(), Contains(HasSubstr("CreateSubscription"))); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::DisableTracing; using ::google::cloud::testing_util::EnableTracing; using ::google::cloud::testing_util::SpanNamed; @@ -286,7 +285,6 @@ TEST_F(SubscriberStubFactory, TracingDisabled) { EXPECT_THAT(span_catcher->GetSpans(), IsEmpty()); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END diff --git a/google/cloud/pubsub/internal/subscriber_tracing_connection.cc b/google/cloud/pubsub/internal/subscriber_tracing_connection.cc index dfb9e592d7b8c..5b9e0b193ce48 100644 --- a/google/cloud/pubsub/internal/subscriber_tracing_connection.cc +++ b/google/cloud/pubsub/internal/subscriber_tracing_connection.cc @@ -17,35 +17,34 @@ #include "google/cloud/pubsub/options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/opentelemetry.h" -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include +#include +#include #include -#include #include -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY namespace google { namespace cloud { namespace pubsub_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - namespace { opentelemetry::nostd::shared_ptr StartPullSpan() { auto const& current = internal::CurrentOptions(); auto const& subscription = current.get(); - namespace sc = opentelemetry::trace::SemanticConventions; + namespace sc = opentelemetry::semconv; opentelemetry::trace::StartSpanOptions options; options.kind = opentelemetry::trace::SpanKind::kConsumer; auto span = internal::MakeSpan( subscription.subscription_id() + " receive", - {{sc::kMessagingSystem, "gcp_pubsub"}, - {/*sc::kMessagingOperationType=*/"messaging.operation.type", "receive"}, - {sc::kCodeFunction, "pubsub::SubscriberConnection::Pull"}, + {{sc::messaging::kMessagingSystem, "gcp_pubsub"}, + {/*sc::messaging::kMessagingOperationType=*/"messaging.operation.type", + "receive"}, + {sc::code::kCodeFunctionName, "pubsub::SubscriberConnection::Pull"}, {"gcp.project_id", subscription.project_id()}, - {sc::kMessagingDestinationName, subscription.subscription_id()}}, + {sc::messaging::kMessagingDestinationName, + subscription.subscription_id()}}, options); return span; } @@ -56,16 +55,18 @@ StatusOr EndPullSpan( opentelemetry::context::propagation::TextMapPropagator> const& propagator, StatusOr response) { - namespace sc = opentelemetry::trace::SemanticConventions; + namespace sc = opentelemetry::semconv; if (response.ok()) { auto message = response.value().message; - span->SetAttribute(sc::kMessagingMessageId, message.message_id()); + span->SetAttribute(sc::messaging::kMessagingMessageId, + message.message_id()); if (!message.ordering_key().empty()) { span->SetAttribute("messaging.gcp_pubsub.message.ordering_key", message.ordering_key()); } span->SetAttribute( - /*sc::kMessagingMessageEnvelopeSize=*/"messaging.message.envelope.size", + /*sc::messaging::kMessagingMessageEnvelopeSize=*/ + "messaging.message.envelope.size", static_cast(MessageSize(message))); auto current = opentelemetry::context::RuntimeContext::GetCurrent(); @@ -128,15 +129,6 @@ std::shared_ptr MakeSubscriberTracingConnection( return std::make_shared(std::move(connection)); } -#else // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - -std::shared_ptr MakeSubscriberTracingConnection( - std::shared_ptr connection) { - return connection; -} - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud diff --git a/google/cloud/pubsub/internal/subscriber_tracing_connection_test.cc b/google/cloud/pubsub/internal/subscriber_tracing_connection_test.cc index e4766d3667435..360eca50dce33 100644 --- a/google/cloud/pubsub/internal/subscriber_tracing_connection_test.cc +++ b/google/cloud/pubsub/internal/subscriber_tracing_connection_test.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/pubsub/internal/subscriber_tracing_connection.h" #include "google/cloud/pubsub/ack_handler.h" #include "google/cloud/pubsub/exactly_once_ack_handler.h" @@ -22,6 +20,7 @@ #include "google/cloud/pubsub/mocks/mock_exactly_once_ack_handler.h" #include "google/cloud/pubsub/mocks/mock_pull_ack_handler.h" #include "google/cloud/pubsub/mocks/mock_subscriber_connection.h" +#include "google/cloud/pubsub/options.h" #include "google/cloud/pubsub/pull_ack_handler.h" #include "google/cloud/pubsub/subscriber_connection.h" #include "google/cloud/internal/make_status.h" @@ -32,8 +31,9 @@ #include "google/cloud/testing_util/status_matchers.h" #include #include +#include +#include #include -#include namespace google { namespace cloud { @@ -127,7 +127,7 @@ TEST(SubscriberTracingConnectionTest, PullOnError) { } TEST(SubscriberTracingConnectionTest, PullAttributes) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); auto mock = std::make_shared(); EXPECT_CALL(*mock, options); @@ -143,25 +143,24 @@ TEST(SubscriberTracingConnectionTest, PullAttributes) { auto response = connection->Pull(); EXPECT_STATUS_OK(response); auto spans = span_catcher->GetSpans(); + EXPECT_THAT(spans, Contains(AllOf( + SpanNamed("test-subscription receive"), + SpanHasAttributes(OTelAttribute( + sc::messaging::kMessagingSystem, "gcp_pubsub"))))); EXPECT_THAT(spans, Contains(AllOf(SpanNamed("test-subscription receive"), SpanHasAttributes(OTelAttribute( - sc::kMessagingSystem, "gcp_pubsub"))))); + sc::code::kCodeFunctionName, + "pubsub::SubscriberConnection::Pull"))))); EXPECT_THAT(spans, Contains(AllOf(SpanNamed("test-subscription receive"), SpanHasAttributes(OTelAttribute( - sc::kCodeFunction, - "pubsub::SubscriberConnection::Pull"))))); - EXPECT_THAT( - spans, Contains(AllOf( - SpanNamed("test-subscription receive"), - SpanHasAttributes(OTelAttribute( - /*sc::kMessagingOperationType=*/"messaging.operation.type", - "receive"))))); + /*sc::messaging::kMessagingOperationType=*/ + "messaging.operation.type", "receive"))))); EXPECT_THAT(spans, Contains(AllOf(SpanNamed("test-subscription receive"), SpanHasAttributes(OTelAttribute( - sc::kMessagingDestinationName, + sc::messaging::kMessagingDestinationName, TestSubscription().subscription_id()))))); EXPECT_THAT( spans, @@ -171,12 +170,12 @@ TEST(SubscriberTracingConnectionTest, PullAttributes) { EXPECT_THAT(spans, Contains(AllOf(SpanNamed("test-subscription receive"), SpanHasAttributes(OTelAttribute( - sc::kMessagingMessageId, _))))); - EXPECT_THAT(spans, - Contains(AllOf(SpanNamed("test-subscription receive"), - SpanHasAttributes(OTelAttribute( - /*sc::kMessagingMessageEnvelopeSize=*/ - "messaging.message.envelope.size", 108))))); + sc::messaging::kMessagingMessageId, _))))); + EXPECT_THAT(spans, Contains(AllOf( + SpanNamed("test-subscription receive"), + SpanHasAttributes(OTelAttribute( + /*sc::messaging::kMessagingMessageEnvelopeSize=*/ + "messaging.message.envelope.size", 108))))); } TEST(SubscriberTracingConnectionTest, PullSetsOrderingKeyAttributeIfExists) { @@ -346,5 +345,3 @@ TEST(SubscriberTracingConnectionTest, options) { } // namespace pubsub_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/pubsub/internal/subscriber_tracing_stub.cc b/google/cloud/pubsub/internal/subscriber_tracing_stub.cc index d7aeab4ac18c8..0bb546bdaea78 100644 --- a/google/cloud/pubsub/internal/subscriber_tracing_stub.cc +++ b/google/cloud/pubsub/internal/subscriber_tracing_stub.cc @@ -22,13 +22,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SubscriberTracingStub::SubscriberTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -257,18 +258,14 @@ future SubscriberTracingStub::AsyncAcknowledge( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSubscriberTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsub/internal/subscriber_tracing_stub.h b/google/cloud/pubsub/internal/subscriber_tracing_stub.h index c5ba84e088eff..fdd306d176bac 100644 --- a/google/cloud/pubsub/internal/subscriber_tracing_stub.h +++ b/google/cloud/pubsub/internal/subscriber_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsub_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SubscriberTracingStub : public SubscriberStub { public: ~SubscriberTracingStub() override = default; @@ -128,8 +129,6 @@ class SubscriberTracingStub : public SubscriberStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -144,4 +143,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_INTERNAL_SUBSCRIBER_TRACING_STUB_H diff --git a/google/cloud/pubsub/internal/subscription_batch_source.h b/google/cloud/pubsub/internal/subscription_batch_source.h index 31acd8bdbc836..d088d28d8b869 100644 --- a/google/cloud/pubsub/internal/subscription_batch_source.h +++ b/google/cloud/pubsub/internal/subscription_batch_source.h @@ -20,7 +20,7 @@ #include "google/cloud/future.h" #include "google/cloud/status.h" #include "google/cloud/status_or.h" -#include +#include "google/pubsub/v1/pubsub.pb.h" #include #include #include diff --git a/google/cloud/pubsub/internal/subscription_message_queue.h b/google/cloud/pubsub/internal/subscription_message_queue.h index bf0e76609d136..a98da1ba085f3 100644 --- a/google/cloud/pubsub/internal/subscription_message_queue.h +++ b/google/cloud/pubsub/internal/subscription_message_queue.h @@ -22,7 +22,7 @@ #include "google/cloud/future.h" #include "google/cloud/internal/random.h" #include "google/cloud/status.h" -#include +#include "google/pubsub/v1/pubsub.pb.h" #include #include #include diff --git a/google/cloud/pubsub/internal/subscription_message_source.h b/google/cloud/pubsub/internal/subscription_message_source.h index 4c8112c6a0079..15245a0199741 100644 --- a/google/cloud/pubsub/internal/subscription_message_source.h +++ b/google/cloud/pubsub/internal/subscription_message_source.h @@ -19,7 +19,7 @@ #include "google/cloud/pubsub/version.h" #include "google/cloud/future.h" #include "google/cloud/status.h" -#include +#include "google/pubsub/v1/pubsub.pb.h" #include #include diff --git a/google/cloud/pubsub/internal/subscription_session.cc b/google/cloud/pubsub/internal/subscription_session.cc index 3e7c0d6f324e3..1b9f7c7118406 100644 --- a/google/cloud/pubsub/internal/subscription_session.cc +++ b/google/cloud/pubsub/internal/subscription_session.cc @@ -24,6 +24,7 @@ #include "google/cloud/pubsub/internal/subscription_lease_management.h" #include "google/cloud/pubsub/internal/subscription_message_queue.h" #include "google/cloud/pubsub/internal/tracing_message_callback.h" +#include "google/cloud/pubsub/options.h" #include "google/cloud/log.h" #include "google/cloud/opentelemetry_options.h" diff --git a/google/cloud/pubsub/internal/subscription_session_test.cc b/google/cloud/pubsub/internal/subscription_session_test.cc index 25ed8030d26d9..f8ce1dde883c7 100644 --- a/google/cloud/pubsub/internal/subscription_session_test.cc +++ b/google/cloud/pubsub/internal/subscription_session_test.cc @@ -17,6 +17,7 @@ #include "google/cloud/pubsub/application_callback.h" #include "google/cloud/pubsub/exactly_once_ack_handler.h" #include "google/cloud/pubsub/internal/defaults.h" +#include "google/cloud/pubsub/options.h" #include "google/cloud/pubsub/subscriber_connection.h" #include "google/cloud/pubsub/testing/fake_streaming_pull.h" #include "google/cloud/pubsub/testing/mock_subscriber_stub.h" @@ -28,13 +29,11 @@ #include "google/cloud/testing_util/opentelemetry_matchers.h" #include "google/cloud/testing_util/scoped_log.h" #include "google/cloud/testing_util/status_matchers.h" -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY +#include #include +#include #include #include -#include -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY -#include #include #include #include @@ -203,8 +202,6 @@ TEST(SubscriptionSessionTest, ScheduleCallbacks) { ScheduleCallbacks(/*ack_count=*/100, /*enable_open_telemetry=*/false); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - using ::google::cloud::testing_util::InstallSpanCatcher; using ::google::cloud::testing_util::OTelAttribute; using ::google::cloud::testing_util::SpanHasAttributes; @@ -218,7 +215,7 @@ using ::testing::SizeIs; /// @test Verify callbacks are scheduled in the background threads with Open /// Telemetry enabled. TEST(SubscriptionSessionTest, ScheduleCallbacksWithOtelEnabled) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); auto constexpr kAckCount = 100; ScheduleCallbacks(kAckCount, /*enable_open_telemetry=*/true); @@ -227,15 +224,13 @@ TEST(SubscriptionSessionTest, ScheduleCallbacksWithOtelEnabled) { // There should be a process and ack span for each message. EXPECT_THAT(spans, SizeIs(Ge(static_cast(2 * kAckCount)))); // Verify there is at least one process span. - EXPECT_THAT( - spans, Contains(AllOf(SpanHasInstrumentationScope(), SpanKindIsInternal(), - SpanNamed("test-subscription process"), - SpanHasAttributes(OTelAttribute( - sc::kMessagingSystem, "gcp_pubsub"))))); + EXPECT_THAT(spans, Contains(AllOf( + SpanHasInstrumentationScope(), SpanKindIsInternal(), + SpanNamed("test-subscription process"), + SpanHasAttributes(OTelAttribute( + sc::messaging::kMessagingSystem, "gcp_pubsub"))))); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /// @test Verify callbacks are scheduled in the background threads. TEST(SubscriptionSessionTest, ScheduleCallbacksExactlyOnce) { auto mock = std::make_shared(); diff --git a/google/cloud/pubsub/internal/tracing_batch_callback.cc b/google/cloud/pubsub/internal/tracing_batch_callback.cc index f97e06070c39f..8196fcc6fea00 100644 --- a/google/cloud/pubsub/internal/tracing_batch_callback.cc +++ b/google/cloud/pubsub/internal/tracing_batch_callback.cc @@ -17,21 +17,17 @@ #include "google/cloud/pubsub/subscription.h" #include "google/cloud/pubsub/version.h" #include "google/cloud/internal/opentelemetry.h" -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY -#include +#include "google/pubsub/v1/pubsub.pb.h" #include +#include #include -#include #include -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY namespace google { namespace cloud { namespace pubsub_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - namespace { opentelemetry::nostd::shared_ptr StartSubscribeSpan( @@ -41,7 +37,7 @@ opentelemetry::nostd::shared_ptr StartSubscribeSpan( opentelemetry::context::propagation::TextMapPropagator> const& propagator, bool exactly_once_delivery_enabled) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; opentelemetry::trace::StartSpanOptions options; options.kind = opentelemetry::trace::SpanKind::kConsumer; auto m = pubsub_internal::FromProto(message.message()); @@ -54,14 +50,16 @@ opentelemetry::nostd::shared_ptr StartSubscribeSpan( auto span = internal::MakeSpan( subscription.subscription_id() + " subscribe", - {{sc::kMessagingSystem, "gcp_pubsub"}, - {/*sc::kMessagingOperationType=*/"messaging.operation.type", + {{sc::messaging::kMessagingSystem, "gcp_pubsub"}, + {/*sc::messaging::kMessagingOperationType=*/"messaging.operation.type", "subscribe"}, {"gcp.project_id", subscription.project_id()}, - {sc::kMessagingDestinationName, subscription.subscription_id()}, - {sc::kMessagingMessageId, m.message_id()}, - {/*sc::kMessagingMessageEnvelopeSize=*/"messaging.message.envelope." - "size", + {sc::messaging::kMessagingDestinationName, + subscription.subscription_id()}, + {sc::messaging::kMessagingMessageId, m.message_id()}, + {/*sc::messaging::kMessagingMessageEnvelopeSize=*/"messaging.message." + "envelope." + "size", static_cast(MessageSize(m))}, {"messaging.gcp_pubsub.message.ack_id", message.ack_id()}, {"messaging.gcp_pubsub.subscription.exactly_once_delivery", @@ -136,7 +134,7 @@ class TracingBatchCallback : public BatchCallback { } void StartConcurrencyControl(std::string const& ack_id) override { - namespace sc = opentelemetry::trace::SemanticConventions; + namespace sc = opentelemetry::semconv; std::lock_guard lk(mu_); auto it = spans_by_ack_id_.find(ack_id); if (it == spans_by_ack_id_.end()) return; @@ -144,9 +142,9 @@ class TracingBatchCallback : public BatchCallback { if (!subscribe_span) return; opentelemetry::trace::StartSpanOptions options; options.parent = subscribe_span->GetContext(); - it->second.concurrency_control_span = - internal::MakeSpan("subscriber concurrency control", - {{sc::kMessagingSystem, "gcp_pubsub"}}, options); + it->second.concurrency_control_span = internal::MakeSpan( + "subscriber concurrency control", + {{sc::messaging::kMessagingSystem, "gcp_pubsub"}}, options); } void EndConcurrencyControl(std::string const& ack_id) override { @@ -162,7 +160,7 @@ class TracingBatchCallback : public BatchCallback { } void StartScheduler(std::string const& ack_id) override { - namespace sc = opentelemetry::trace::SemanticConventions; + namespace sc = opentelemetry::semconv; std::lock_guard lk(mu_); auto spans = spans_by_ack_id_.find(ack_id); if (spans == spans_by_ack_id_.end()) return; @@ -170,9 +168,9 @@ class TracingBatchCallback : public BatchCallback { if (!subscribe_span) return; opentelemetry::trace::StartSpanOptions options; options.parent = subscribe_span->GetContext(); - spans->second.scheduler_span = - internal::MakeSpan("subscriber scheduler", - {{sc::kMessagingSystem, "gcp_pubsub"}}, options); + spans->second.scheduler_span = internal::MakeSpan( + "subscriber scheduler", + {{sc::messaging::kMessagingSystem, "gcp_pubsub"}}, options); } void EndScheduler(std::string const& ack_id) override { @@ -185,7 +183,7 @@ class TracingBatchCallback : public BatchCallback { Span StartModackSpan( google::pubsub::v1::ModifyAckDeadlineRequest const& request) override { - namespace sc = opentelemetry::trace::SemanticConventions; + namespace sc = opentelemetry::semconv; using Attributes = std::vector>; @@ -207,13 +205,15 @@ class TracingBatchCallback : public BatchCallback { options.kind = opentelemetry::trace::SpanKind::kClient; auto span = internal::MakeSpan( subscription_.subscription_id() + " modack", - {{sc::kMessagingSystem, "gcp_pubsub"}, - {/*sc::kMessagingOperationType=*/"messaging.operation.type", "extend"}, - {sc::kMessagingBatchMessageCount, + {{sc::messaging::kMessagingSystem, "gcp_pubsub"}, + {/*sc::messaging::kMessagingOperationType=*/"messaging.operation.type", + "extend"}, + {sc::messaging::kMessagingBatchMessageCount, static_cast(request.ack_ids().size())}, {"messaging.gcp_pubsub.message.ack_deadline_seconds", static_cast(request.ack_deadline_seconds())}, - {sc::kMessagingDestinationName, subscription_.subscription_id()}, + {sc::messaging::kMessagingDestinationName, + subscription_.subscription_id()}, {"gcp.project_id", subscription_.project_id()}}, std::move(links), options); @@ -294,16 +294,6 @@ std::shared_ptr MakeTracingBatchCallback( subscription); } -#else // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - -std::shared_ptr MakeTracingBatchCallback( - std::shared_ptr batch_callback, - pubsub::Subscription const&) { - return batch_callback; -} - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud diff --git a/google/cloud/pubsub/internal/tracing_batch_callback_test.cc b/google/cloud/pubsub/internal/tracing_batch_callback_test.cc index 92ecacb68167e..36034f7f5ca44 100644 --- a/google/cloud/pubsub/internal/tracing_batch_callback_test.cc +++ b/google/cloud/pubsub/internal/tracing_batch_callback_test.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/pubsub/internal/tracing_batch_callback.h" #include "google/cloud/pubsub/internal/message_propagator.h" #include "google/cloud/pubsub/message.h" @@ -28,9 +26,9 @@ #include "google/cloud/testing_util/status_matchers.h" #include #include +#include #include #include -#include namespace google { namespace cloud { @@ -135,7 +133,7 @@ TEST(TracingBatchCallback, VerifySpanIsSetInUserCallback) { } TEST(TracingBatchCallback, StartAndEndModackSpanForOneMessage) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); auto mock = std::make_shared(); EXPECT_CALL(*mock, callback).Times(1); @@ -157,21 +155,23 @@ TEST(TracingBatchCallback, StartAndEndModackSpanForOneMessage) { SpanHasInstrumentationScope(), SpanKindIsClient(), SpanNamed("test-sub modack"), SpanHasAttributes( - OTelAttribute(sc::kMessagingSystem, "gcp_pubsub"), + OTelAttribute(sc::messaging::kMessagingSystem, + "gcp_pubsub"), OTelAttribute("gcp.project_id", "test-project"), OTelAttribute( - /*sc::kMessagingOperationType=*/"messaging.operation.type", - "extend"), - OTelAttribute(sc::kMessagingBatchMessageCount, 1), + /*sc::messaging::kMessagingOperationType=*/ + "messaging.operation.type", "extend"), + OTelAttribute(sc::messaging::kMessagingBatchMessageCount, + 1), OTelAttribute( "messaging.gcp_pubsub.message.ack_deadline_seconds", 10), - OTelAttribute(sc::kMessagingDestinationName, - "test-sub")), + OTelAttribute( + sc::messaging::kMessagingDestinationName, "test-sub")), SpanLinksSizeIs(1)))); } TEST(TracingBatchCallback, StartAndEndModackSpanForMultipleMessages) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); auto mock = std::make_shared(); EXPECT_CALL(*mock, callback).Times(1); @@ -195,16 +195,18 @@ TEST(TracingBatchCallback, StartAndEndModackSpanForMultipleMessages) { SpanHasInstrumentationScope(), SpanKindIsClient(), SpanNamed("test-sub modack"), SpanHasAttributes( - OTelAttribute(sc::kMessagingSystem, "gcp_pubsub"), + OTelAttribute(sc::messaging::kMessagingSystem, + "gcp_pubsub"), OTelAttribute("gcp.project_id", "test-project"), OTelAttribute( - /*sc::kMessagingOperationType=*/"messaging.operation.type", - "extend"), - OTelAttribute(sc::kMessagingBatchMessageCount, 2), + /*sc::messaging::kMessagingOperationType=*/ + "messaging.operation.type", "extend"), + OTelAttribute(sc::messaging::kMessagingBatchMessageCount, + 2), OTelAttribute( "messaging.gcp_pubsub.message.ack_deadline_seconds", 10), - OTelAttribute(sc::kMessagingDestinationName, - "test-sub")), + OTelAttribute( + sc::messaging::kMessagingDestinationName, "test-sub")), SpanLinksSizeIs(2)))); } @@ -233,7 +235,7 @@ TEST(TracingBatchCallback, VerifyModackSpansAreEndedInDestructor) { } TEST(TracingBatchCallback, SubscribeAttributes) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); auto mock = std::make_shared(); EXPECT_CALL(*mock, callback).Times(1); @@ -248,17 +250,19 @@ TEST(TracingBatchCallback, SubscribeAttributes) { Contains(AllOf( SpanNamed("test-sub subscribe"), SpanHasAttributes( - OTelAttribute(sc::kMessagingSystem, "gcp_pubsub"), + OTelAttribute(sc::messaging::kMessagingSystem, + "gcp_pubsub"), OTelAttribute("gcp.project_id", "test-project"), OTelAttribute( - /*sc::kMessagingOperationType=*/"messaging.operation.type", - "subscribe"), - OTelAttribute(sc::kMessagingMessageId, "id-0"), + /*sc::messaging::kMessagingOperationType=*/ + "messaging.operation.type", "subscribe"), + OTelAttribute(sc::messaging::kMessagingMessageId, + "id-0"), OTelAttribute("messaging.gcp_pubsub.message.ack_id", "ack-id-0"), OTelAttribute("messaging.message.envelope.size", 101), - OTelAttribute(sc::kMessagingDestinationName, - "test-sub"))))); + OTelAttribute( + sc::messaging::kMessagingDestinationName, "test-sub"))))); } TEST(TracingBatchCallback, SubscribeAttributesForOrderingKey) { @@ -331,7 +335,7 @@ TEST(TracingBatchCallback, SubscribeAttributesForExactlyOnce) { } TEST(TracingBatchCallback, StartAndEndConcurrencyControlSpan) { - namespace sc = opentelemetry::trace::SemanticConventions; + namespace sc = opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); auto mock = std::make_shared(); EXPECT_CALL(*mock, callback).Times(1); @@ -343,15 +347,15 @@ TEST(TracingBatchCallback, StartAndEndConcurrencyControlSpan) { batch_callback->AckEnd("ack-id-0"); auto spans = span_catcher->GetSpans(); - EXPECT_THAT( - spans, Contains(AllOf(SpanHasInstrumentationScope(), SpanKindIsInternal(), - SpanNamed("subscriber concurrency control"), - SpanHasAttributes(OTelAttribute( - sc::kMessagingSystem, "gcp_pubsub"))))); + EXPECT_THAT(spans, Contains(AllOf( + SpanHasInstrumentationScope(), SpanKindIsInternal(), + SpanNamed("subscriber concurrency control"), + SpanHasAttributes(OTelAttribute( + sc::messaging::kMessagingSystem, "gcp_pubsub"))))); } TEST(TracingBatchCallback, StartAndEndSchedulerSpan) { - namespace sc = opentelemetry::trace::SemanticConventions; + namespace sc = opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); auto mock = std::make_shared(); EXPECT_CALL(*mock, callback).Times(1); @@ -363,11 +367,11 @@ TEST(TracingBatchCallback, StartAndEndSchedulerSpan) { batch_callback->AckEnd("ack-id-0"); auto spans = span_catcher->GetSpans(); - EXPECT_THAT( - spans, Contains(AllOf(SpanHasInstrumentationScope(), SpanKindIsInternal(), - SpanNamed("subscriber scheduler"), - SpanHasAttributes(OTelAttribute( - sc::kMessagingSystem, "gcp_pubsub"))))); + EXPECT_THAT(spans, Contains(AllOf( + SpanHasInstrumentationScope(), SpanKindIsInternal(), + SpanNamed("subscriber scheduler"), + SpanHasAttributes(OTelAttribute( + sc::messaging::kMessagingSystem, "gcp_pubsub"))))); } TEST(TracingBatchCallback, VerifyDestructorEndsAllSpans) { @@ -518,5 +522,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/pubsub/internal/tracing_batch_sink.cc b/google/cloud/pubsub/internal/tracing_batch_sink.cc index a4782985e09d1..962f628cfe7d4 100644 --- a/google/cloud/pubsub/internal/tracing_batch_sink.cc +++ b/google/cloud/pubsub/internal/tracing_batch_sink.cc @@ -13,7 +13,6 @@ // limitations under the License. #include "google/cloud/pubsub/internal/tracing_batch_sink.h" -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/pubsub/internal/publisher_stub.h" #include "google/cloud/pubsub/internal/tracing_helpers.h" #include "google/cloud/pubsub/options.h" @@ -21,20 +20,19 @@ #include "google/cloud/future.h" #include "google/cloud/internal/opentelemetry.h" #include +#include +#include +#include #include -#include #include #include #include -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY namespace google { namespace cloud { namespace pubsub_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - namespace { using Spans = std::vector>; @@ -60,23 +58,23 @@ auto MakeLinks(Spans::const_iterator begin, Spans::const_iterator end) { auto MakeParent(Links const& links, Spans const& message_spans, pubsub::Topic const& topic, std::string const& endpoint) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto options = RootStartSpanOptions(); options.kind = opentelemetry::trace::SpanKind::kClient; - auto batch_sink_parent = - internal::MakeSpan(topic.topic_id() + " publish", - /*attributes=*/ - {{sc::kMessagingBatchMessageCount, - static_cast(message_spans.size())}, - {sc::kCodeFunction, "BatchSink::AsyncPublish"}, - {/*sc::kMessagingOperationType=*/ - "messaging.operation.type", "publish"}, - {sc::kThreadId, internal::CurrentThreadId()}, - {sc::kMessagingSystem, "gcp_pubsub"}, - {/*sc::kServerAddress=*/"server.address", endpoint}, - {"gcp.project_id", topic.project_id()}, - {sc::kMessagingDestinationName, topic.topic_id()}}, - /*links*/ std::move(links), options); + auto batch_sink_parent = internal::MakeSpan( + topic.topic_id() + " publish", + /*attributes=*/ + {{sc::messaging::kMessagingBatchMessageCount, + static_cast(message_spans.size())}, + {sc::code::kCodeFunctionName, "BatchSink::AsyncPublish"}, + {/*sc::messaging::kMessagingOperationType=*/ + "messaging.operation.type", "publish"}, + {sc::thread::kThreadId, internal::CurrentThreadId()}, + {sc::messaging::kMessagingSystem, "gcp_pubsub"}, + {/*sc::kServerAddress=*/"server.address", endpoint}, + {"gcp.project_id", topic.project_id()}, + {sc::messaging::kMessagingDestinationName, topic.topic_id()}}, + /*links*/ std::move(links), options); auto context = batch_sink_parent->GetContext(); auto trace_id = internal::ToString(context.trace_id()); @@ -211,15 +209,6 @@ std::shared_ptr MakeTracingBatchSink( std::move(topic), std::move(batch_sink), std::move(opts)); } -#else // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - -std::shared_ptr MakeTracingBatchSink( - pubsub::Topic, std::shared_ptr batch_sink, Options) { - return batch_sink; -} - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud diff --git a/google/cloud/pubsub/internal/tracing_batch_sink_test.cc b/google/cloud/pubsub/internal/tracing_batch_sink_test.cc index 80c56e6d506a2..f7641c9cd0c3d 100644 --- a/google/cloud/pubsub/internal/tracing_batch_sink_test.cc +++ b/google/cloud/pubsub/internal/tracing_batch_sink_test.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/pubsub/internal/tracing_batch_sink.h" #include "google/cloud/pubsub/message.h" #include "google/cloud/pubsub/options.h" @@ -25,7 +23,9 @@ #include "google/cloud/testing_util/opentelemetry_matchers.h" #include "google/cloud/testing_util/status_matchers.h" #include -#include +#include +#include +#include namespace google { namespace cloud { @@ -149,7 +149,7 @@ TEST(TracingBatchSink, AddMessageAddsEvent) { } TEST(TracingBatchSink, AsyncPublish) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); auto message_span = MakeSpan("test span"); auto mock = std::make_unique(); @@ -169,17 +169,17 @@ TEST(TracingBatchSink, AsyncPublish) { EXPECT_THAT(response, IsOk()); auto spans = span_catcher->GetSpans(); - EXPECT_THAT(spans, - Contains(AllOf(SpanHasInstrumentationScope(), SpanKindIsClient(), - SpanNamed("test-topic publish"), - SpanHasAttributes(OTelAttribute( - sc::kMessagingBatchMessageCount, 1)), - SpanHasLinks(AllOf(LinkHasSpanContext( - message_span->GetContext())))))); + EXPECT_THAT( + spans, Contains(AllOf(SpanHasInstrumentationScope(), SpanKindIsClient(), + SpanNamed("test-topic publish"), + SpanHasAttributes(OTelAttribute( + sc::messaging::kMessagingBatchMessageCount, 1)), + SpanHasLinks(AllOf(LinkHasSpanContext( + message_span->GetContext())))))); } TEST(TracingBatchSink, PublishSpanHasAttributes) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); auto message_span = MakeSpan("test span"); auto mock = std::make_unique(); @@ -200,21 +200,21 @@ TEST(TracingBatchSink, PublishSpanHasAttributes) { EXPECT_THAT(spans, Contains(AllOf(SpanNamed("test-topic publish"), SpanHasAttributes(OTelAttribute( - sc::kThreadId, _))))); - EXPECT_THAT(spans, Contains(AllOf( - SpanNamed("test-topic publish"), - SpanHasAttributes(OTelAttribute( - sc::kCodeFunction, "BatchSink::AsyncPublish"))))); - EXPECT_THAT( - spans, Contains(AllOf( - SpanNamed("test-topic publish"), - SpanHasAttributes(OTelAttribute( - /*sc::kMessagingOperationType=*/"messaging.operation.type", - "publish"))))); + sc::thread::kThreadId, _))))); + EXPECT_THAT(spans, + Contains(AllOf(SpanNamed("test-topic publish"), + SpanHasAttributes(OTelAttribute( + sc::code::kCodeFunctionName, + "BatchSink::AsyncPublish"))))); EXPECT_THAT(spans, Contains(AllOf(SpanNamed("test-topic publish"), SpanHasAttributes(OTelAttribute( - sc::kMessagingSystem, "gcp_pubsub"))))); + /*sc::messaging::kMessagingOperationType=*/ + "messaging.operation.type", "publish"))))); + EXPECT_THAT(spans, Contains(AllOf( + SpanNamed("test-topic publish"), + SpanHasAttributes(OTelAttribute( + sc::messaging::kMessagingSystem, "gcp_pubsub"))))); EXPECT_THAT( spans, Contains(AllOf(SpanNamed("test-topic publish"), SpanHasAttributes(OTelAttribute( @@ -223,11 +223,11 @@ TEST(TracingBatchSink, PublishSpanHasAttributes) { Contains(AllOf(SpanNamed("test-topic publish"), SpanHasAttributes(OTelAttribute( "server.address", kDefaultEndpoint))))); - EXPECT_THAT( - spans, Contains(AllOf( - SpanNamed("test-topic publish"), - SpanHasAttributes(OTelAttribute( - sc::kMessagingDestinationName, TestTopic().topic_id()))))); + EXPECT_THAT(spans, + Contains(AllOf(SpanNamed("test-topic publish"), + SpanHasAttributes(OTelAttribute( + sc::messaging::kMessagingDestinationName, + TestTopic().topic_id()))))); } #if OPENTELEMETRY_VERSION_MAJOR >= 2 || \ @@ -257,7 +257,7 @@ TEST(TracingBatchSink, PublishSpanIsRoot) { #endif TEST(TracingBatchSink, AsyncPublishOnlyIncludeSampledLink) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; // Create span before the span catcher so it is not sampled. auto unsampled_span = MakeSpan("test skipped span"); auto span_catcher = InstallSpanCatcher(); @@ -277,17 +277,17 @@ TEST(TracingBatchSink, AsyncPublishOnlyIncludeSampledLink) { EXPECT_THAT(response, IsOk()); auto spans = span_catcher->GetSpans(); - EXPECT_THAT(spans, - Contains(AllOf(SpanHasInstrumentationScope(), SpanKindIsClient(), - SpanNamed("test-topic publish"), - SpanHasAttributes(OTelAttribute( - sc::kMessagingBatchMessageCount, 2)), - SpanLinksAre(AllOf(LinkHasSpanContext( - message_span->GetContext())))))); + EXPECT_THAT( + spans, Contains(AllOf(SpanHasInstrumentationScope(), SpanKindIsClient(), + SpanNamed("test-topic publish"), + SpanHasAttributes(OTelAttribute( + sc::messaging::kMessagingBatchMessageCount, 2)), + SpanLinksAre(AllOf(LinkHasSpanContext( + message_span->GetContext())))))); } TEST(TracingBatchSink, AsyncPublishSmallBatch) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); auto message_span1 = MakeSpan("test span 1"); auto message_span2 = MakeSpan("test span 2"); @@ -310,14 +310,14 @@ TEST(TracingBatchSink, AsyncPublishSmallBatch) { Contains(AllOf( SpanHasInstrumentationScope(), SpanKindIsClient(), SpanNamed("test-topic publish"), - SpanHasAttributes( - OTelAttribute(sc::kMessagingBatchMessageCount, 2)), + SpanHasAttributes(OTelAttribute( + sc::messaging::kMessagingBatchMessageCount, 2)), SpanHasLinks(LinkHasSpanContext(message_span1->GetContext()), LinkHasSpanContext(message_span2->GetContext()))))); } TEST(TracingBatchSink, AsyncPublishBatchWithOtelLimit) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto mock = std::make_unique(); EXPECT_CALL(*mock, AddMessage(_)).Times(kDefaultMaxLinks); EXPECT_CALL(*mock, AsyncPublish) @@ -332,17 +332,17 @@ TEST(TracingBatchSink, AsyncPublishBatchWithOtelLimit) { EXPECT_THAT(response, IsOk()); auto spans = span_catcher->GetSpans(); - EXPECT_THAT( - spans, - Contains(AllOf(SpanHasInstrumentationScope(), SpanKindIsClient(), - SpanNamed("test-topic publish"), - SpanHasAttributes(OTelAttribute( - sc::kMessagingBatchMessageCount, kDefaultMaxLinks)), - SpanLinksSizeIs(kDefaultMaxLinks)))); + EXPECT_THAT(spans, + Contains(AllOf(SpanHasInstrumentationScope(), SpanKindIsClient(), + SpanNamed("test-topic publish"), + SpanHasAttributes(OTelAttribute( + sc::messaging::kMessagingBatchMessageCount, + kDefaultMaxLinks)), + SpanLinksSizeIs(kDefaultMaxLinks)))); } TEST(TracingBatchSink, AsyncPublishLargeBatch) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto const batch_size = kDefaultMaxLinks + 1; auto mock = std::make_shared(); EXPECT_CALL(*mock, AddMessage(_)).Times(batch_size); @@ -359,10 +359,11 @@ TEST(TracingBatchSink, AsyncPublishLargeBatch) { EXPECT_THAT(response, IsOk()); auto spans = span_catcher->GetSpans(); - EXPECT_THAT(spans, Contains(AllOf( - SpanNamed("test-topic publish"), - SpanHasAttributes(OTelAttribute( - sc::kMessagingBatchMessageCount, batch_size))))); + EXPECT_THAT(spans, + Contains(AllOf(SpanNamed("test-topic publish"), + SpanHasAttributes(OTelAttribute( + sc::messaging::kMessagingBatchMessageCount, + batch_size))))); EXPECT_THAT(spans, Contains(AllOf(SpanNamed("publish #0"), SpanKindIsClient(), SpanLinksSizeIs(kDefaultMaxLinks)))); EXPECT_THAT(spans, Contains(AllOf(SpanNamed("publish #1"), SpanKindIsClient(), @@ -370,7 +371,7 @@ TEST(TracingBatchSink, AsyncPublishLargeBatch) { } TEST(TracingBatchSink, AsyncPublishBatchWithCustomLimit) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto constexpr kMaxLinks = 5; auto constexpr kBatchSize = 6; auto mock = std::make_unique(); @@ -390,11 +391,12 @@ TEST(TracingBatchSink, AsyncPublishBatchWithCustomLimit) { EXPECT_THAT(response, IsOk()); auto spans = span_catcher->GetSpans(); - EXPECT_THAT(spans, Contains(AllOf( - SpanHasInstrumentationScope(), SpanKindIsClient(), - SpanNamed("test-topic publish"), - SpanHasAttributes(OTelAttribute( - sc::kMessagingBatchMessageCount, kBatchSize))))); + EXPECT_THAT(spans, + Contains(AllOf(SpanHasInstrumentationScope(), SpanKindIsClient(), + SpanNamed("test-topic publish"), + SpanHasAttributes(OTelAttribute( + sc::messaging::kMessagingBatchMessageCount, + kBatchSize))))); EXPECT_THAT(spans, Contains(AllOf(SpanNamed("publish #0"), SpanKindIsClient(), SpanLinksSizeIs(kMaxLinks)))); EXPECT_THAT(spans, Contains(AllOf(SpanNamed("publish #1"), SpanKindIsClient(), @@ -455,7 +457,7 @@ TEST(TracingBatchSink, AsyncPublishAddsEventForMultipleMessages) { } TEST(TracingBatchSink, Scope) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); auto message_span = MakeSpan("test span"); auto mock = std::make_unique(); @@ -483,13 +485,13 @@ TEST(TracingBatchSink, Scope) { EXPECT_THAT(response, IsOk()); auto spans = span_catcher->GetSpans(); - EXPECT_THAT(spans, - Contains(AllOf(SpanHasInstrumentationScope(), SpanKindIsClient(), - SpanNamed("test-topic publish"), - SpanHasAttributes(OTelAttribute( - sc::kMessagingBatchMessageCount, 1)), - SpanHasLinks(AllOf(LinkHasSpanContext( - message_span->GetContext())))))); + EXPECT_THAT( + spans, Contains(AllOf(SpanHasInstrumentationScope(), SpanKindIsClient(), + SpanNamed("test-topic publish"), + SpanHasAttributes(OTelAttribute( + sc::messaging::kMessagingBatchMessageCount, 1)), + SpanHasLinks(AllOf(LinkHasSpanContext( + message_span->GetContext())))))); } TEST(TracingBatchSink, ResumePublish) { @@ -564,5 +566,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/pubsub/internal/tracing_exactly_once_ack_handler.cc b/google/cloud/pubsub/internal/tracing_exactly_once_ack_handler.cc index 26071c91811c9..9f5b0d4f75d93 100644 --- a/google/cloud/pubsub/internal/tracing_exactly_once_ack_handler.cc +++ b/google/cloud/pubsub/internal/tracing_exactly_once_ack_handler.cc @@ -18,12 +18,11 @@ #include "google/cloud/pubsub/version.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/status.h" -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include +#include +#include #include -#include #include -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include #include #include @@ -33,8 +32,6 @@ namespace cloud { namespace pubsub_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - namespace { class TracingExactlyOnceAckHandler @@ -61,21 +58,21 @@ class TracingExactlyOnceAckHandler links.emplace_back( std::make_pair(subscribe_span_->GetContext(), Attributes{})); } - namespace sc = opentelemetry::trace::SemanticConventions; + namespace sc = opentelemetry::semconv; opentelemetry::trace::StartSpanOptions options = RootStartSpanOptions(); options.kind = opentelemetry::trace::SpanKind::kInternal; auto sub = subscription(); auto span = internal::MakeSpan( sub.subscription_id() + " ack", - {{sc::kCodeFunction, "pubsub::AckHandler::ack"}, - {sc::kMessagingSystem, "gcp_pubsub"}, + {{sc::code::kCodeFunctionName, "pubsub::AckHandler::ack"}, + {sc::messaging::kMessagingSystem, "gcp_pubsub"}, {"messaging.gcp_pubsub.message.ack_id", ack_id()}, {"messaging.gcp_pubsub.subscription.template", sub.FullName()}, {"gcp.project_id", sub.project_id()}, - {sc::kMessagingDestinationName, sub.subscription_id()}, + {sc::messaging::kMessagingDestinationName, sub.subscription_id()}, {"messaging.gcp_pubsub.message.delivery_attempt", static_cast(delivery_attempt())}, - {/*sc::kMessagingOperationType=*/"messaging.operation.type", + {/*sc::messaging::kMessagingOperationType=*/"messaging.operation.type", "settle"}}, std::move(links), options); auto scope = internal::OTelScope(span); @@ -91,21 +88,21 @@ class TracingExactlyOnceAckHandler links.emplace_back( std::make_pair(subscribe_span_->GetContext(), Attributes{})); } - namespace sc = opentelemetry::trace::SemanticConventions; + namespace sc = opentelemetry::semconv; opentelemetry::trace::StartSpanOptions options = RootStartSpanOptions(); options.kind = opentelemetry::trace::SpanKind::kInternal; auto sub = subscription(); auto span = internal::MakeSpan( sub.subscription_id() + " nack", - {{sc::kCodeFunction, "pubsub::AckHandler::nack"}, - {sc::kMessagingSystem, "gcp_pubsub"}, + {{sc::code::kCodeFunctionName, "pubsub::AckHandler::nack"}, + {sc::messaging::kMessagingSystem, "gcp_pubsub"}, {"messaging.gcp_pubsub.message.ack_id", ack_id()}, {"messaging.gcp_pubsub.subscription.template", sub.FullName()}, {"gcp.project_id", sub.project_id()}, - {sc::kMessagingDestinationName, sub.subscription_id()}, + {sc::messaging::kMessagingDestinationName, sub.subscription_id()}, {"messaging.gcp_pubsub.message.delivery_attempt", static_cast(delivery_attempt())}, - {/*sc::kMessagingOperationType=*/"messaging.operation.type", + {/*sc::messaging::kMessagingOperationType=*/"messaging.operation.type", "settle"}}, std::move(links), options); @@ -138,15 +135,6 @@ MakeTracingExactlyOnceAckHandler( span.span); } -#else // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - -std::unique_ptr -MakeTracingExactlyOnceAckHandler( - std::unique_ptr handler, Span const&) { - return handler; -} - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud diff --git a/google/cloud/pubsub/internal/tracing_exactly_once_ack_handler_test.cc b/google/cloud/pubsub/internal/tracing_exactly_once_ack_handler_test.cc index 402bfc831f77e..8deaff80d2216 100644 --- a/google/cloud/pubsub/internal/tracing_exactly_once_ack_handler_test.cc +++ b/google/cloud/pubsub/internal/tracing_exactly_once_ack_handler_test.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/pubsub/internal/tracing_exactly_once_ack_handler.h" #include "google/cloud/pubsub/subscription.h" #include "google/cloud/pubsub/testing/mock_exactly_once_ack_handler_impl.h" @@ -22,7 +20,8 @@ #include "google/cloud/testing_util/opentelemetry_matchers.h" #include "google/cloud/testing_util/status_matchers.h" #include -#include +#include +#include namespace google { namespace cloud { @@ -147,7 +146,7 @@ TEST(TracingExactlyOnceAckHandlerTest, AckError) { } TEST(TracingAckHandlerTest, AckAttributes) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); auto mock = std::make_unique(); EXPECT_CALL(*mock, ack()) @@ -162,17 +161,19 @@ TEST(TracingAckHandlerTest, AckAttributes) { ElementsAre(AllOf( SpanNamed("test-subscription ack"), SpanHasAttributes( - OTelAttribute(sc::kMessagingSystem, "gcp_pubsub"), + OTelAttribute(sc::messaging::kMessagingSystem, + "gcp_pubsub"), OTelAttribute("gcp.project_id", "test-project"), OTelAttribute( - /*sc::kMessagingOperationType=*/"messaging.operation.type", - "settle"), - OTelAttribute(sc::kCodeFunction, + /*sc::messaging::kMessagingOperationType=*/ + "messaging.operation.type", "settle"), + OTelAttribute(sc::code::kCodeFunctionName, "pubsub::AckHandler::ack"), OTelAttribute( "messaging.gcp_pubsub.message.delivery_attempt", 42), - OTelAttribute(sc::kMessagingDestinationName, - "test-subscription"))))); + OTelAttribute( + sc::messaging::kMessagingDestinationName, + "test-subscription"))))); } TEST(TracingExactlyOnceAckHandlerTest, NackSuccess) { @@ -255,7 +256,7 @@ TEST(TracingExactlyOnceAckHandlerTest, NackSuccessWithNoSubscribeSpan) { } TEST(TracingAckHandlerTest, NackAttributes) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); auto mock = std::make_unique(); EXPECT_CALL(*mock, nack()) @@ -270,17 +271,19 @@ TEST(TracingAckHandlerTest, NackAttributes) { ElementsAre(AllOf( SpanNamed("test-subscription nack"), SpanHasAttributes( - OTelAttribute(sc::kMessagingSystem, "gcp_pubsub"), + OTelAttribute(sc::messaging::kMessagingSystem, + "gcp_pubsub"), OTelAttribute("gcp.project_id", "test-project"), OTelAttribute( - /*sc::kMessagingOperationType=*/"messaging.operation.type", - "settle"), - OTelAttribute(sc::kCodeFunction, + /*sc::messaging::kMessagingOperationType=*/ + "messaging.operation.type", "settle"), + OTelAttribute(sc::code::kCodeFunctionName, "pubsub::AckHandler::nack"), OTelAttribute( "messaging.gcp_pubsub.message.delivery_attempt", 42), - OTelAttribute(sc::kMessagingDestinationName, - "test-subscription"))))); + OTelAttribute( + sc::messaging::kMessagingDestinationName, + "test-subscription"))))); } TEST(TracingAckHandlerTest, DeliveryAttempt) { @@ -312,5 +315,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/pubsub/internal/tracing_helpers.cc b/google/cloud/pubsub/internal/tracing_helpers.cc index a03bab767f426..ead3529441452 100644 --- a/google/cloud/pubsub/internal/tracing_helpers.cc +++ b/google/cloud/pubsub/internal/tracing_helpers.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/pubsub/internal/tracing_helpers.h" #include "google/cloud/pubsub/version.h" #include "google/cloud/internal/opentelemetry.h" @@ -70,5 +68,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/pubsub/internal/tracing_helpers.h b/google/cloud/pubsub/internal/tracing_helpers.h index 0e867ff4359d7..eaee01ab1143c 100644 --- a/google/cloud/pubsub/internal/tracing_helpers.h +++ b/google/cloud/pubsub/internal/tracing_helpers.h @@ -15,8 +15,6 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_INTERNAL_TRACING_HELPERS_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_INTERNAL_TRACING_HELPERS_H -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/pubsub/pull_ack_handler.h" #include "google/cloud/pubsub/version.h" #include @@ -53,6 +51,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_INTERNAL_TRACING_HELPERS_H diff --git a/google/cloud/pubsub/internal/tracing_helpers_test.cc b/google/cloud/pubsub/internal/tracing_helpers_test.cc index 018e0e0c7cc9c..57bed72c2e48c 100644 --- a/google/cloud/pubsub/internal/tracing_helpers_test.cc +++ b/google/cloud/pubsub/internal/tracing_helpers_test.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/pubsub/internal/tracing_helpers.h" #include "google/cloud/pubsub/options.h" #include "google/cloud/internal/opentelemetry.h" @@ -185,5 +183,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/pubsub/internal/tracing_message_callback.cc b/google/cloud/pubsub/internal/tracing_message_callback.cc index 18eb90315671b..663cecf0b0dfa 100644 --- a/google/cloud/pubsub/internal/tracing_message_callback.cc +++ b/google/cloud/pubsub/internal/tracing_message_callback.cc @@ -18,18 +18,14 @@ #include "google/cloud/pubsub/subscription.h" #include "google/cloud/pubsub/version.h" #include "google/cloud/internal/opentelemetry.h" -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY -#include +#include #include -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY namespace google { namespace cloud { namespace pubsub_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - namespace { class TracingMessageCallback : public MessageCallback { @@ -43,14 +39,14 @@ class TracingMessageCallback : public MessageCallback { ~TracingMessageCallback() override = default; void user_callback(MessageAndHandler m) override { - namespace sc = opentelemetry::trace::SemanticConventions; + namespace sc = opentelemetry::semconv; opentelemetry::trace::StartSpanOptions options; if (m.subscribe_span.span) { options.parent = m.subscribe_span.span->GetContext(); } - auto span = - internal::MakeSpan(subscription_id_ + " process", - {{sc::kMessagingSystem, "gcp_pubsub"}}, options); + auto span = internal::MakeSpan( + subscription_id_ + " process", + {{sc::messaging::kMessagingSystem, "gcp_pubsub"}}, options); m.ack_handler = MakeTracingExactlyOnceAckHandler(std::move(m.ack_handler), m.subscribe_span); child_->user_callback(std::move(m)); @@ -70,15 +66,6 @@ std::shared_ptr MakeTracingMessageCallback( opts); } -#else // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - -std::shared_ptr MakeTracingMessageCallback( - std::shared_ptr message_callback, Options const&) { - return message_callback; -} - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud diff --git a/google/cloud/pubsub/internal/tracing_message_callback_test.cc b/google/cloud/pubsub/internal/tracing_message_callback_test.cc index b1455afbc2e21..d2154d94171ed 100644 --- a/google/cloud/pubsub/internal/tracing_message_callback_test.cc +++ b/google/cloud/pubsub/internal/tracing_message_callback_test.cc @@ -24,13 +24,11 @@ #include "google/cloud/testing_util/is_proto_equal.h" #include "google/cloud/testing_util/opentelemetry_matchers.h" #include "google/cloud/testing_util/status_matchers.h" -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY +#include #include +#include #include #include -#include -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY -#include namespace google { namespace cloud { @@ -38,7 +36,6 @@ namespace pubsub_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN namespace { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::InstallSpanCatcher; using ::google::cloud::testing_util::OTelAttribute; using ::google::cloud::testing_util::SpanHasAttributes; @@ -63,7 +60,7 @@ std::shared_ptr MakeTestMessageCallback( } TEST(TracingMessageCallback, UserCallback) { - namespace sc = opentelemetry::trace::SemanticConventions; + namespace sc = opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); auto mock = std::make_shared(); EXPECT_CALL(*mock, user_callback).Times(1); @@ -83,12 +80,12 @@ TEST(TracingMessageCallback, UserCallback) { spans, Contains(AllOf(SpanHasInstrumentationScope(), SpanKindIsInternal(), SpanNamed("test-sub process"), SpanHasAttributes(OTelAttribute( - sc::kMessagingSystem, "gcp_pubsub")), + sc::messaging::kMessagingSystem, "gcp_pubsub")), SpanWithParent(span)))); } TEST(TracingMessageCallback, AddTracingAckHandler) { - namespace sc = opentelemetry::trace::SemanticConventions; + namespace sc = opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); auto mock_handler = std::make_unique(); @@ -125,35 +122,11 @@ TEST(TracingMessageCallback, AddTracingAckHandler) { AllOf(SpanHasInstrumentationScope(), SpanKindIsInternal(), SpanNamed("test-sub process"), SpanHasAttributes(OTelAttribute( - sc::kMessagingSystem, "gcp_pubsub")), + sc::messaging::kMessagingSystem, "gcp_pubsub")), SpanWithParent(span)), SpanNamed("test-sub ack"))); } -#else // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - -using ::testing::IsNull; -using ::testing::Not; - -TEST(TracingMessageCallback, - VerifyMessageCallbackIsNotNullWhenOTelIsNotCompiled) { - auto mock = std::make_shared(); - EXPECT_CALL(*mock, user_callback).Times(1); - auto message_callback = MakeTracingMessageCallback( - std::move(mock), Options{}.set( - pubsub::Subscription("test-project", "test-sub"))); - - EXPECT_THAT(message_callback, Not(IsNull())); - - message_callback->user_callback(MessageCallback::MessageAndHandler{ - pubsub::MessageBuilder().Build(), - std::make_unique(), - "ack-id", - {}}); -} - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal diff --git a/google/cloud/pubsub/internal/tracing_pull_ack_handler.cc b/google/cloud/pubsub/internal/tracing_pull_ack_handler.cc index ec174057ff4d5..3e4720c5564c1 100644 --- a/google/cloud/pubsub/internal/tracing_pull_ack_handler.cc +++ b/google/cloud/pubsub/internal/tracing_pull_ack_handler.cc @@ -17,12 +17,11 @@ #include "google/cloud/pubsub/version.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/status.h" -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include +#include +#include #include -#include #include -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include #include #include @@ -32,8 +31,6 @@ namespace cloud { namespace pubsub_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TracingPullAckHandler : public pubsub::PullAckHandler::Impl { public: explicit TracingPullAckHandler( @@ -48,27 +45,28 @@ class TracingPullAckHandler : public pubsub::PullAckHandler::Impl { TracingAttributes MakeSharedAttributes( std::string const& ack_id, pubsub::Subscription const& subscription) { - namespace sc = opentelemetry::trace::SemanticConventions; - return TracingAttributes{ - {sc::kMessagingSystem, "gcp_pubsub"}, - {"messaging.gcp_pubsub.message.ack_id", ack_id}, - {"messaging.gcp_pubsub.message.delivery_attempt", - child_->delivery_attempt()}, - {"gcp.project_id", subscription.project_id()}, - {sc::kMessagingDestinationName, subscription.subscription_id()}}; + namespace sc = opentelemetry::semconv; + return TracingAttributes{{sc::messaging::kMessagingSystem, "gcp_pubsub"}, + {"messaging.gcp_pubsub.message.ack_id", ack_id}, + {"messaging.gcp_pubsub.message.delivery_attempt", + child_->delivery_attempt()}, + {"gcp.project_id", subscription.project_id()}, + {sc::messaging::kMessagingDestinationName, + subscription.subscription_id()}}; } future ack() override { - namespace sc = opentelemetry::trace::SemanticConventions; + namespace sc = opentelemetry::semconv; opentelemetry::trace::StartSpanOptions options; options.kind = opentelemetry::trace::SpanKind::kClient; auto const ack_id = child_->ack_id(); auto const subscription = child_->subscription(); TracingAttributes attributes = MakeSharedAttributes(ack_id, subscription); - attributes.emplace_back( - std::make_pair(sc::kCodeFunction, "pubsub::PullAckHandler::ack")); + attributes.emplace_back(std::make_pair(sc::code::kCodeFunctionName, + "pubsub::PullAckHandler::ack")); attributes.emplace_back(std::make_pair( - /*sc::kMessagingOperationType=*/"messaging.operation.type", "ack")); + /*sc::messaging::kMessagingOperationType=*/"messaging.operation.type", + "ack")); auto span = internal::MakeSpan(subscription.subscription_id() + " ack", attributes, CreateLinks(consumer_span_context_), options); @@ -85,16 +83,17 @@ class TracingPullAckHandler : public pubsub::PullAckHandler::Impl { } future nack() override { - namespace sc = opentelemetry::trace::SemanticConventions; + namespace sc = opentelemetry::semconv; opentelemetry::trace::StartSpanOptions options; options.kind = opentelemetry::trace::SpanKind::kClient; auto const ack_id = child_->ack_id(); auto const subscription = child_->subscription(); TracingAttributes attributes = MakeSharedAttributes(ack_id, subscription); - attributes.emplace_back( - std::make_pair(sc::kCodeFunction, "pubsub::PullAckHandler::nack")); + attributes.emplace_back(std::make_pair(sc::code::kCodeFunctionName, + "pubsub::PullAckHandler::nack")); attributes.emplace_back(std::make_pair( - /*sc::kMessagingOperationType=*/"messaging.operation.type", "nack")); + /*sc::messaging::kMessagingOperationType=*/"messaging.operation.type", + "nack")); auto span = internal::MakeSpan(subscription.subscription_id() + " nack", attributes, CreateLinks(consumer_span_context_), options); @@ -131,15 +130,6 @@ std::unique_ptr MakeTracingPullAckHandler( return std::make_unique(std::move(handler)); } -#else // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - -std::unique_ptr MakeTracingPullAckHandler( - std::unique_ptr handler) { - return handler; -} - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud diff --git a/google/cloud/pubsub/internal/tracing_pull_ack_handler_test.cc b/google/cloud/pubsub/internal/tracing_pull_ack_handler_test.cc index 52a485588bab2..4b613566f222a 100644 --- a/google/cloud/pubsub/internal/tracing_pull_ack_handler_test.cc +++ b/google/cloud/pubsub/internal/tracing_pull_ack_handler_test.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/pubsub/internal/tracing_pull_ack_handler.h" #include "google/cloud/pubsub/mocks/mock_pull_ack_handler.h" #include "google/cloud/pubsub/subscription.h" @@ -22,7 +20,8 @@ #include "google/cloud/testing_util/opentelemetry_matchers.h" #include "google/cloud/testing_util/status_matchers.h" #include -#include +#include +#include namespace google { namespace cloud { @@ -94,7 +93,7 @@ TEST(TracingAckHandlerTest, AckError) { } TEST(TracingAckHandlerTest, AckAttributes) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); auto mock = std::make_unique(); EXPECT_CALL(*mock, ack()) @@ -104,35 +103,34 @@ TEST(TracingAckHandlerTest, AckAttributes) { EXPECT_THAT(std::move(handler->ack()).get(), StatusIs(StatusCode::kOk)); auto spans = span_catcher->GetSpans(); + EXPECT_THAT(spans, Contains(AllOf( + SpanNamed("test-subscription ack"), + SpanHasAttributes(OTelAttribute( + sc::messaging::kMessagingSystem, "gcp_pubsub"))))); EXPECT_THAT(spans, Contains(AllOf(SpanNamed("test-subscription ack"), SpanHasAttributes(OTelAttribute( - sc::kMessagingSystem, "gcp_pubsub"))))); + "gcp.project_id", "test-project"))))); EXPECT_THAT(spans, Contains(AllOf(SpanNamed("test-subscription ack"), SpanHasAttributes(OTelAttribute( - "gcp.project_id", "test-project"))))); - EXPECT_THAT( - spans, Contains(AllOf( - SpanNamed("test-subscription ack"), - SpanHasAttributes(OTelAttribute( - /*sc::kMessagingOperationType=*/"messaging.operation.type", - "ack"))))); - EXPECT_THAT( - spans, - Contains(AllOf(SpanNamed("test-subscription ack"), - SpanHasAttributes(OTelAttribute( - sc::kCodeFunction, "pubsub::PullAckHandler::ack"))))); + /*sc::messaging::kMessagingOperationType=*/ + "messaging.operation.type", "ack"))))); + EXPECT_THAT(spans, + Contains(AllOf(SpanNamed("test-subscription ack"), + SpanHasAttributes(OTelAttribute( + sc::code::kCodeFunctionName, + "pubsub::PullAckHandler::ack"))))); EXPECT_THAT(spans, Contains(AllOf( SpanNamed("test-subscription ack"), SpanHasAttributes(OTelAttribute( "messaging.gcp_pubsub.message.delivery_attempt", 42))))); EXPECT_THAT(spans, - Contains(AllOf( - SpanNamed("test-subscription ack"), - SpanHasAttributes(OTelAttribute( - sc::kMessagingDestinationName, "test-subscription"))))); + Contains(AllOf(SpanNamed("test-subscription ack"), + SpanHasAttributes(OTelAttribute( + sc::messaging::kMessagingDestinationName, + "test-subscription"))))); } TEST(TracingAckHandlerTest, NackSuccess) { @@ -170,7 +168,7 @@ TEST(TracingAckHandlerTest, NackError) { } TEST(TracingAckHandlerTest, NackAttributes) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); auto mock = std::make_unique(); EXPECT_CALL(*mock, nack()) @@ -180,35 +178,34 @@ TEST(TracingAckHandlerTest, NackAttributes) { EXPECT_THAT(std::move(handler->nack()).get(), StatusIs(StatusCode::kOk)); auto spans = span_catcher->GetSpans(); + EXPECT_THAT(spans, Contains(AllOf( + SpanNamed("test-subscription nack"), + SpanHasAttributes(OTelAttribute( + sc::messaging::kMessagingSystem, "gcp_pubsub"))))); EXPECT_THAT(spans, Contains(AllOf(SpanNamed("test-subscription nack"), SpanHasAttributes(OTelAttribute( - sc::kMessagingSystem, "gcp_pubsub"))))); - EXPECT_THAT( - spans, Contains(AllOf( - SpanNamed("test-subscription nack"), - SpanHasAttributes(OTelAttribute( - /*sc::kMessagingOperationType=*/"messaging.operation.type", - "nack"))))); + /*sc::messaging::kMessagingOperationType=*/ + "messaging.operation.type", "nack"))))); EXPECT_THAT(spans, Contains(AllOf(SpanNamed("test-subscription nack"), SpanHasAttributes(OTelAttribute( "gcp.project_id", "test-project"))))); - EXPECT_THAT( - spans, - Contains(AllOf(SpanNamed("test-subscription nack"), - SpanHasAttributes(OTelAttribute( - sc::kCodeFunction, "pubsub::PullAckHandler::nack"))))); + EXPECT_THAT(spans, + Contains(AllOf(SpanNamed("test-subscription nack"), + SpanHasAttributes(OTelAttribute( + sc::code::kCodeFunctionName, + "pubsub::PullAckHandler::nack"))))); EXPECT_THAT(spans, Contains(AllOf( SpanNamed("test-subscription nack"), SpanHasAttributes(OTelAttribute( "messaging.gcp_pubsub.message.delivery_attempt", 42))))); EXPECT_THAT(spans, - Contains(AllOf( - SpanNamed("test-subscription nack"), - SpanHasAttributes(OTelAttribute( - sc::kMessagingDestinationName, "test-subscription"))))); + Contains(AllOf(SpanNamed("test-subscription nack"), + SpanHasAttributes(OTelAttribute( + sc::messaging::kMessagingDestinationName, + "test-subscription"))))); } TEST(TracingAckHandlerTest, DeliveryAttemptNoSpans) { @@ -314,5 +311,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/pubsub/internal/tracing_pull_lease_manager.cc b/google/cloud/pubsub/internal/tracing_pull_lease_manager.cc index bfe610b4e92f9..b9b39ac47d59d 100644 --- a/google/cloud/pubsub/internal/tracing_pull_lease_manager.cc +++ b/google/cloud/pubsub/internal/tracing_pull_lease_manager.cc @@ -19,10 +19,9 @@ #include "google/cloud/internal/async_retry_loop.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/status.h" -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY -#include +#include +#include #include -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include #include @@ -31,8 +30,6 @@ namespace cloud { namespace pubsub_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TracingPullLeaseManagerImpl : public PullLeaseManagerImpl { public: explicit TracingPullLeaseManagerImpl( @@ -51,20 +48,22 @@ class TracingPullLeaseManagerImpl : public PullLeaseManagerImpl { std::shared_ptr context, google::cloud::internal::ImmutableOptions options, google::pubsub::v1::ModifyAckDeadlineRequest const& request) override { - namespace sc = opentelemetry::trace::SemanticConventions; + namespace sc = opentelemetry::semconv; opentelemetry::trace::StartSpanOptions start_span_options = RootStartSpanOptions(); start_span_options.kind = opentelemetry::trace::SpanKind::kClient; auto span = internal::MakeSpan( subscription_.subscription_id() + " modack", - {{sc::kMessagingSystem, "gcp_pubsub"}, - {/*sc::kMessagingOperationType=*/"messaging.operation.type", "modack"}, - {sc::kCodeFunction, "pubsub::PullLeaseManager::ExtendLease"}, + {{sc::messaging::kMessagingSystem, "gcp_pubsub"}, + {/*sc::messaging::kMessagingOperationType=*/"messaging.operation.type", + "modack"}, + {sc::code::kCodeFunctionName, "pubsub::PullLeaseManager::ExtendLease"}, {"messaging.gcp_pubsub.message.ack_id", ack_id_}, {"messaging.gcp_pubsub.message.ack_deadline_seconds", static_cast(request.ack_deadline_seconds())}, {"gcp.project_id", subscription_.project_id()}, - {sc::kMessagingDestinationName, subscription_.subscription_id()}}, + {sc::messaging::kMessagingDestinationName, + subscription_.subscription_id()}}, CreateLinks(consumer_span_context_), start_span_options); auto scope = internal::OTelScope(span); MaybeAddLinkAttributes(*span, consumer_span_context_, "receive"); @@ -91,16 +90,6 @@ std::shared_ptr MakeTracingPullLeaseManagerImpl( std::move(manager), std::move(ack_id), std::move(subscription)); } -#else // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - -std::shared_ptr MakeTracingPullLeaseManagerImpl( - std::shared_ptr manager, std::string, - pubsub::Subscription) { - return manager; -} - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud diff --git a/google/cloud/pubsub/internal/tracing_pull_lease_manager_test.cc b/google/cloud/pubsub/internal/tracing_pull_lease_manager_test.cc index 2fd5da3302ade..aee9b815276c9 100644 --- a/google/cloud/pubsub/internal/tracing_pull_lease_manager_test.cc +++ b/google/cloud/pubsub/internal/tracing_pull_lease_manager_test.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/pubsub/internal/tracing_pull_lease_manager.h" #include "google/cloud/pubsub/subscription.h" #include "google/cloud/pubsub/testing/mock_pull_lease_manager.h" @@ -25,7 +23,8 @@ #include "google/cloud/testing_util/opentelemetry_matchers.h" #include "google/cloud/testing_util/status_matchers.h" #include -#include +#include +#include namespace google { namespace cloud { @@ -146,7 +145,7 @@ TEST(TracingPullLeaseManagerImplTest, AsyncModifyAckDeadlineError) { } TEST(TracingPullLeaseManagerImplTest, AsyncModifyAckDeadlineAttributes) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); auto mock = std::make_shared(); EXPECT_CALL(*mock, AsyncModifyAckDeadline(_, _, _, _, _)) @@ -168,20 +167,19 @@ TEST(TracingPullLeaseManagerImplTest, AsyncModifyAckDeadlineAttributes) { EXPECT_STATUS_OK(status.get()); auto spans = span_catcher->GetSpans(); + EXPECT_THAT(spans, Contains(AllOf( + SpanNamed("test-subscription modack"), + SpanHasAttributes(OTelAttribute( + sc::messaging::kMessagingSystem, "gcp_pubsub"))))); EXPECT_THAT(spans, Contains(AllOf(SpanNamed("test-subscription modack"), SpanHasAttributes(OTelAttribute( - sc::kMessagingSystem, "gcp_pubsub"))))); - EXPECT_THAT( - spans, Contains(AllOf( - SpanNamed("test-subscription modack"), - SpanHasAttributes(OTelAttribute( - /*sc::kMessagingOperationType=*/"messaging.operation.type", - "modack"))))); + /*sc::messaging::kMessagingOperationType=*/ + "messaging.operation.type", "modack"))))); EXPECT_THAT(spans, Contains(AllOf(SpanNamed("test-subscription modack"), SpanHasAttributes(OTelAttribute( - sc::kCodeFunction, + sc::code::kCodeFunctionName, "pubsub::PullLeaseManager::ExtendLease"))))); EXPECT_THAT( spans, @@ -195,10 +193,10 @@ TEST(TracingPullLeaseManagerImplTest, AsyncModifyAckDeadlineAttributes) { SpanHasAttributes(OTelAttribute( "messaging.gcp_pubsub.message.ack_id", "test-ack-id"))))); EXPECT_THAT(spans, - Contains(AllOf( - SpanNamed("test-subscription modack"), - SpanHasAttributes(OTelAttribute( - sc::kMessagingDestinationName, "test-subscription"))))); + Contains(AllOf(SpanNamed("test-subscription modack"), + SpanHasAttributes(OTelAttribute( + sc::messaging::kMessagingDestinationName, + "test-subscription"))))); EXPECT_THAT(spans, Contains(AllOf(SpanNamed("test-subscription modack"), SpanHasAttributes(OTelAttribute( @@ -281,5 +279,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/pubsub/message.h b/google/cloud/pubsub/message.h index 51c0571e0ece9..e002e3b995e1f 100644 --- a/google/cloud/pubsub/message.h +++ b/google/cloud/pubsub/message.h @@ -17,7 +17,7 @@ #include "google/cloud/pubsub/version.h" #include "absl/strings/string_view.h" -#include +#include "google/pubsub/v1/pubsub.pb.h" #include #include #include diff --git a/google/cloud/pubsub/publisher.h b/google/cloud/pubsub/publisher.h index 4b28d1bbca823..24fb75f9584ce 100644 --- a/google/cloud/pubsub/publisher.h +++ b/google/cloud/pubsub/publisher.h @@ -17,7 +17,6 @@ #include "google/cloud/pubsub/connection_options.h" #include "google/cloud/pubsub/publisher_connection.h" -#include "google/cloud/pubsub/publisher_options.h" #include "google/cloud/pubsub/version.h" #include @@ -185,13 +184,6 @@ class Publisher { connection_->ResumePublish({std::move(ordering_key)}); } - /// @deprecated Use `Publisher(connection)` and provide any configuration - /// options when initializing the @p connection object. - GOOGLE_CLOUD_CPP_DEPRECATED("use `Publisher(connection)` instead") - explicit Publisher(std::shared_ptr connection, - PublisherOptions const& /* options*/) - : Publisher(std::move(connection)) {} - private: std::shared_ptr connection_; }; diff --git a/google/cloud/pubsub/publisher_connection.cc b/google/cloud/pubsub/publisher_connection.cc index b4522f8a0f6eb..8e87fb415dcff 100644 --- a/google/cloud/pubsub/publisher_connection.cc +++ b/google/cloud/pubsub/publisher_connection.cc @@ -132,18 +132,6 @@ std::shared_ptr MakePublisherConnection(Topic topic, return MakePublisherConnection("", std::move(topic), std::move(opts)); } -std::shared_ptr MakePublisherConnection( - Topic topic, PublisherOptions options, ConnectionOptions connection_options, - std::unique_ptr retry_policy, - std::unique_ptr backoff_policy) { - auto opts = internal::MergeOptions( - pubsub_internal::MakeOptions(std::move(options)), - internal::MakeOptions(std::move(connection_options))); - if (retry_policy) opts.set(retry_policy->clone()); - if (backoff_policy) opts.set(backoff_policy->clone()); - return MakePublisherConnection(std::move(topic), std::move(opts)); -} - GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub diff --git a/google/cloud/pubsub/publisher_connection.h b/google/cloud/pubsub/publisher_connection.h index eba98d738bffd..e4642059addb9 100644 --- a/google/cloud/pubsub/publisher_connection.h +++ b/google/cloud/pubsub/publisher_connection.h @@ -19,7 +19,6 @@ #include "google/cloud/pubsub/connection_options.h" #include "google/cloud/pubsub/internal/publisher_stub.h" #include "google/cloud/pubsub/message.h" -#include "google/cloud/pubsub/publisher_options.h" #include "google/cloud/pubsub/retry_policy.h" #include "google/cloud/pubsub/topic.h" #include "google/cloud/pubsub/version.h" @@ -132,45 +131,6 @@ std::shared_ptr MakePublisherConnection( std::shared_ptr MakePublisherConnection(Topic topic, Options opts = {}); -/** - * Creates a new `PublisherConnection` object to work with `Publisher`. - * - * The `PublisherConnection` class is not intended for direct use in - * applications, it is provided for applications wanting to mock the - * `Publisher` behavior in their tests. - * - * @par Performance - * Creating a new `PublisherConnection` is relatively expensive. This typically - * initiate connections to the service, and therefore these objects should be - * shared and reused when possible. Note that gRPC reuses existing OS resources - * (sockets) whenever possible, so applications may experience better - * performance on the second (and subsequent) calls to this function with the - * identical values for @p options. However, this behavior is not guaranteed - * and applications should not rely on it. - * - * @see `PublisherConnection` - * - * @param topic the Cloud Pub/Sub topic used by the returned - * `PublisherConnection`. - * @param options configure the batching policy and other parameters in the - * returned connection. - * @param connection_options (optional) general configuration for this - * connection, this type is also used to configure `pubsub::Subscriber`. - * @param retry_policy (optional) configure the retry loop. - * @param backoff_policy (optional) configure the backoff period between - * retries. - * - * @deprecated Please use the `MakePublisherConnection` method which accepts - * `google::cloud::Options` instead. - */ -GOOGLE_CLOUD_CPP_DEPRECATED( - "use the overload consuming google::cloud::Options instead") -std::shared_ptr MakePublisherConnection( - Topic topic, PublisherOptions options, - ConnectionOptions connection_options = {}, - std::unique_ptr retry_policy = {}, - std::unique_ptr backoff_policy = {}); - GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub diff --git a/google/cloud/pubsub/publisher_connection_test.cc b/google/cloud/pubsub/publisher_connection_test.cc index 0d6ab900ed5a5..bcccf0574fa6c 100644 --- a/google/cloud/pubsub/publisher_connection_test.cc +++ b/google/cloud/pubsub/publisher_connection_test.cc @@ -340,7 +340,6 @@ TEST(PublisherConnectionTest, HandleTransientEnabledRetry) { EXPECT_EQ("test-message-id-0", *response); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::DisableTracing; using ::google::cloud::testing_util::EnableTracing; using ::google::cloud::testing_util::InstallSpanCatcher; @@ -402,7 +401,6 @@ TEST(MakePublisherConnectionTest, TracingDisabled) { EXPECT_THAT(span_catcher->GetSpans(), IsEmpty()); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END diff --git a/google/cloud/pubsub/publisher_options.cc b/google/cloud/pubsub/publisher_options.cc deleted file mode 100644 index 6367cd7399e28..0000000000000 --- a/google/cloud/pubsub/publisher_options.cc +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/pubsub/publisher_options.h" -#include "google/cloud/pubsub/internal/defaults.h" - -namespace google { -namespace cloud { -namespace pubsub { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -PublisherOptions::PublisherOptions() { - opts_ = pubsub_internal::DefaultPublisherOptionsOnly(Options{}); -} - -PublisherOptions::PublisherOptions(Options opts) { - internal::CheckExpectedOptions(opts, __func__); - opts_ = pubsub_internal::DefaultPublisherOptionsOnly(std::move(opts)); -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace pubsub -} // namespace cloud -} // namespace google diff --git a/google/cloud/pubsub/publisher_options.h b/google/cloud/pubsub/publisher_options.h deleted file mode 100644 index 82cd625829a97..0000000000000 --- a/google/cloud/pubsub/publisher_options.h +++ /dev/null @@ -1,398 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_PUBLISHER_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_PUBLISHER_OPTIONS_H - -#include "google/cloud/pubsub/options.h" -#include "google/cloud/pubsub/version.h" -#include "google/cloud/options.h" -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace pubsub { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -class PublisherOptions; -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace pubsub - -namespace pubsub_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -Options MakeOptions(pubsub::PublisherOptions); -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace pubsub_internal - -namespace pubsub { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/** - * Configuration options for a `Publisher`. - * - * These are largely used to control the batching configuration for a publisher. - * By default a publishers flushes a batch as soon as any of these conditions - * are met: - * - 10ms after the first message is put in the batch, - * - when the batch contains 100 messages or more, - * - when the batch contains 1MiB of data or more. - * - * Applications developers should consult the Cloud Pub/Sub - * [pricing page][pubsub-pricing-link] when selecting a batching configuration. - * - * @deprecated We recommend you use `google::cloud::Options` and pass the - * options to `MakePublisherConnection()`. - * - * @par Example - * @snippet samples.cc publisher-options - * - * [pubsub-pricing-link]: https://cloud.google.com/pubsub/pricing - */ -class PublisherOptions { - public: - /// @deprecated Use `google::cloud::Options{}` instead. - GOOGLE_CLOUD_CPP_DEPRECATED("use `google::cloud::Options{}` instead") - PublisherOptions(); - - /** - * Initialize the publisher options. - * - * Expected options are any of the types in the `PublisherOptionList` - * - * @note Unrecognized options will be ignored. To debug issues with options - * set `GOOGLE_CLOUD_CPP_ENABLE_CLOG=yes` in the environment and - * unexpected options will be logged. - * - * @param opts configuration options - * - * @deprecated Use `google::cloud::Options{}` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED("use `google::cloud::Options{}` instead") - explicit PublisherOptions(Options opts); - - /** - * @name Publisher batch control - * - * It is more efficient (in terms of client CPU and client network usage) to - * send multiple messages in a single "batch" to the service. The following - * configuration options can be used to improve throughput: sending larger - * batches reduces CPU and network overhead. Note that batches are subject - * to [quota limits]. - * - * [quota limits]: https://cloud.google.com/pubsub/quotas#resource_limits - */ - ///@{ - /// @deprecated Use `google::cloud::Options{}` and `MaxHoldTimeOption` - /// instead. - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options{}` and `MaxHoldTimeOption` instead") - std::chrono::microseconds maximum_hold_time() const { - return opts_.get(); - } - - /** - * Sets the maximum hold time for the messages. - * - * @note While this function accepts durations in arbitrary precision, the - * implementation depends on the granularity of your OS timers. It is - * possible that messages are held for slightly longer times than the - * value set here. - * - * @note The first message in a batch starts the hold time counter. New - * messages do not extend the life of the batch. For example, if you have - * set the holding time to 10 milliseconds, start a batch with message 1, - * and publish a second message 5 milliseconds later, the second message - * will be flushed approximately 5 milliseconds after it is published. - * - * @deprecated Use `google::cloud::Options{}` and `MaxHoldTimeOption` instead. - */ - template - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options{}` and `MaxHoldTimeOption` instead") - PublisherOptions& set_maximum_hold_time( - std::chrono::duration v) { - opts_.set( - std::chrono::duration_cast(v)); - return *this; - } - - /// @deprecated Use `google::cloud::Options{}` and `MaxBatchMessagesOption` - /// instead. - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options{}` and `MaxBatchMessagesOption` instead") - std::size_t maximum_batch_message_count() const { - return opts_.get(); - } - - /** - * Set the maximum number of messages in a batch. - * - * @note Application developers should keep in mind that Cloud Pub/Sub - * sets [limits][pubsub-quota-link] on the size of a batch (1,000 messages) - * The library makes no attempt to validate the value provided in this - * function. - * - * [pubsub-quota-link]: https://cloud.google.com/pubsub/quotas#resource_limits - * - * @deprecated Use `google::cloud::Options{}` and `MaxBatchMessagesOption` - * instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options{}` and `MaxBatchMessagesOption` instead") - PublisherOptions& set_maximum_batch_message_count(std::size_t v) { - opts_.set(v); - return *this; - } - - /// @deprecated Use `google::cloud::Options{}` and `MaxBatchBytesOption` - /// instead. - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options{}` and `MaxBatchBytesOption` instead") - std::size_t maximum_batch_bytes() const { - return opts_.get(); - } - - /** - * Set the maximum size for the messages in a batch. - * - * @note Application developers should keep in mind that Cloud Pub/Sub - * sets [limits][pubsub-quota-link] on the size of a batch (10MB). The - * library makes no attempt to validate the value provided in this - * function. - * - * [pubsub-quota-link]: https://cloud.google.com/pubsub/quotas#resource_limits - * - * @deprecated Use `google::cloud::Options{}` and `MaxBatchBytesOption` - * instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options{}` and `MaxBatchBytesOption` instead") - PublisherOptions& set_maximum_batch_bytes(std::size_t v) { - opts_.set(v); - return *this; - } - ///@} - - /** - * @name Publisher message ordering. - * - * To guarantee messages are received by the service in the same order that - * the application gives them to a publisher, the client library needs to wait - * until a batch of messages is successfully delivered before sending the next - * batch, otherwise batches may arrive out of order as there is no guarantee - * the same channel or network path is used for each batch. - * - * For applications that do not care about message ordering, this can limit - * the throughput. Therefore, the behavior is disabled by default. - */ - ///@{ - - /** - * Return `true` if message ordering is enabled. - * - * @deprecated Use `google::cloud::Options{}` and `MessageOrderingOption` - * instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options{}` and `MessageOrderingOption` instead") - bool message_ordering() const { return opts_.get(); } - - /** - * Enable message ordering. - * - * @deprecated Use `google::cloud::Options{}` and `MessageOrderingOption` - * instead. - * - * @see the documentation for the `Publisher` class for details. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options{}` and `MessageOrderingOption` instead") - PublisherOptions& enable_message_ordering() { - opts_.set(true); - return *this; - } - - /** - * Disable message ordering. - * - * @deprecated Use `google::cloud::Options{}` and `MessageOrderingOption` - * instead. - * - * @see the documentation for the `Publisher` class for details. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options{}` and `MessageOrderingOption` instead") - PublisherOptions& disable_message_ordering() { - opts_.set(false); - return *this; - } - ///@} - - /** - * @name Publisher flow control. - * - * After a publisher flushes a batch of messages the batch is (obviously) not - * received immediately by the service. While the batch remains pending it - * potentially consumes memory resources in the client (and/or the service). - * - * Some applications may have constraints on the number of bytes and/or - * messages they can tolerate in this pending state, and may prefer to block - * or reject messages. - */ - ///@{ - - /** - * Flow control based on pending bytes. - * - * @deprecated Use `google::cloud::Options{}` and `MaxPendingBytesOption` - * instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options{}` and `MaxPendingBytesOption` instead") - PublisherOptions& set_maximum_pending_bytes(std::size_t v) { - opts_.set(v); - return *this; - } - - /** - * Flow control based on pending messages. - * - * @deprecated Use `google::cloud::Options{}` and `MaxPendingMessagesOption` - * instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options{}` and `MaxPendingMessagesOption` instead") - PublisherOptions& set_maximum_pending_messages(std::size_t v) { - opts_.set(v); - return *this; - } - - /// @deprecated Use `google::cloud::Options{}` and `MaxPendingBytesOption` - /// instead. - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options{}` and `MaxPendingBytesOption` instead") - std::size_t maximum_pending_bytes() const { - return opts_.get(); - } - - /// @deprecated Use `google::cloud::Options{}` and `MaxPendingMessagesOption` - /// instead. - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options{}` and `MaxPendingMessagesOption` instead") - std::size_t maximum_pending_messages() const { - return opts_.get(); - } - - /** - * The current action for a full publisher. - * - * @deprecated Use `google::cloud::Options{}` and `FullPublisherActionOption` - * instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options{}` and `FullPublisherActionOption` instead") - bool full_publisher_ignored() const { - return opts_.get() == - FullPublisherAction::kIgnored; - } - - /** - * The current action for a full publisher. - * - * @deprecated Use `google::cloud::Options{}` and `FullPublisherActionOption` - * instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options{}` and `FullPublisherActionOption` instead") - bool full_publisher_rejects() const { - return opts_.get() == - FullPublisherAction::kRejects; - } - - /** - * The current action for a full publisher. - * - * @deprecated Use `google::cloud::Options{}` and `FullPublisherActionOption` - * instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options{}` and `FullPublisherActionOption` instead") - bool full_publisher_blocks() const { - return opts_.get() == - FullPublisherAction::kBlocks; - } - - /** - * Ignore full publishers, continue as usual - * - * @deprecated Use `google::cloud::Options{}` and `FullPublisherActionOption` - * instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options{}` and `FullPublisherActionOption` instead") - PublisherOptions& set_full_publisher_ignored() { - opts_.set(FullPublisherAction::kIgnored); - return *this; - } - - /** - * Configure the publisher to reject new messages when full. - * - * @deprecated Use `google::cloud::Options{}` and `FullPublisherActionOption` - * instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options{}` and `FullPublisherActionOption` instead") - PublisherOptions& set_full_publisher_rejects() { - opts_.set(FullPublisherAction::kRejects); - return *this; - } - - /** - * Configure the publisher to block the caller when full. - * - * @deprecated Use `google::cloud::Options{}` and `FullPublisherActionOption` - * instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options{}` and `FullPublisherActionOption` instead") - PublisherOptions& set_full_publisher_blocks() { - opts_.set(FullPublisherAction::kBlocks); - return *this; - } - ///@} - - private: - friend Options pubsub_internal::MakeOptions(PublisherOptions); - Options opts_; -}; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace pubsub - -namespace pubsub_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -inline Options MakeOptions(pubsub::PublisherOptions o) { - return std::move(o.opts_); -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace pubsub_internal -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_PUBLISHER_OPTIONS_H diff --git a/google/cloud/pubsub/publisher_options_test.cc b/google/cloud/pubsub/publisher_options_test.cc deleted file mode 100644 index 7f265fba23189..0000000000000 --- a/google/cloud/pubsub/publisher_options_test.cc +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/pubsub/publisher_options.h" -#include "google/cloud/grpc_options.h" -#include "google/cloud/testing_util/scoped_log.h" -// This file contains the tests for deprecated functions, we need to disable -// the warnings -#include "google/cloud/internal/disable_deprecation_warnings.inc" -#include - -namespace google { -namespace cloud { -namespace pubsub { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -using ::testing::Contains; -using ::testing::HasSubstr; - -TEST(PublisherOptions, Setters) { - auto const b0 = PublisherOptions{}; - EXPECT_NE(0, b0.maximum_hold_time().count()); - EXPECT_FALSE(b0.message_ordering()); - - auto const b = PublisherOptions{} - .set_maximum_hold_time(std::chrono::seconds(12)) - .set_maximum_batch_bytes(123) - .set_maximum_batch_message_count(10) - .enable_message_ordering(); - EXPECT_EQ(10, b.maximum_batch_message_count()); - EXPECT_EQ(123, b.maximum_batch_bytes()); - auto const expected = std::chrono::duration_cast( - std::chrono::seconds(12)); - EXPECT_EQ(expected, b.maximum_hold_time()); - EXPECT_TRUE(b.message_ordering()); - - auto const b1 = - PublisherOptions{}.enable_message_ordering().disable_message_ordering(); - EXPECT_FALSE(b1.message_ordering()); -} - -TEST(PublisherOptions, MaximumPendingBytes) { - auto const b0 = PublisherOptions{}; - EXPECT_NE(0, b0.maximum_pending_bytes()); - - auto const b1 = PublisherOptions{}.set_maximum_pending_bytes(10000000); - EXPECT_EQ(10000000, b1.maximum_pending_bytes()); - - auto const b2 = PublisherOptions{}.set_maximum_pending_bytes(0); - EXPECT_EQ(0, b2.maximum_pending_bytes()); -} - -TEST(PublisherOptions, MaximumPendingMessages) { - auto const b0 = PublisherOptions{}; - EXPECT_NE(0, b0.maximum_pending_messages()); - - auto const b1 = PublisherOptions{}.set_maximum_pending_messages(1000); - EXPECT_EQ(1000, b1.maximum_pending_messages()); - - auto const b2 = PublisherOptions{}.set_maximum_pending_messages(0); - EXPECT_EQ(0, b2.maximum_pending_messages()); -} - -TEST(PublisherOptions, FullPublisherAction) { - auto const b0 = PublisherOptions{}; - EXPECT_FALSE(b0.full_publisher_ignored()); - EXPECT_FALSE(b0.full_publisher_rejects()); - EXPECT_TRUE(b0.full_publisher_blocks()); - - EXPECT_TRUE( - PublisherOptions{}.set_full_publisher_ignored().full_publisher_ignored()); - EXPECT_TRUE( - PublisherOptions{}.set_full_publisher_rejects().full_publisher_rejects()); - EXPECT_TRUE( - PublisherOptions{}.set_full_publisher_blocks().full_publisher_blocks()); -} - -TEST(PublisherOptions, OptionsConstructor) { - auto const b = PublisherOptions( - Options{} - .set(std::chrono::seconds(12)) - .set(10) - .set(123) - .set(4) - .set(444) - .set(true) - .set(FullPublisherAction::kRejects)); - - auto const expected = std::chrono::duration_cast( - std::chrono::seconds(12)); - EXPECT_EQ(expected, b.maximum_hold_time()); - EXPECT_EQ(10, b.maximum_batch_message_count()); - EXPECT_EQ(123, b.maximum_batch_bytes()); - EXPECT_EQ(4, b.maximum_pending_messages()); - EXPECT_EQ(444, b.maximum_pending_bytes()); - EXPECT_TRUE(b.message_ordering()); - EXPECT_TRUE(b.full_publisher_rejects()); -} - -TEST(PublisherOptions, ExpectedOptionsCheck) { - struct NonOption { - using Type = bool; - }; - - testing_util::ScopedLog log; - auto b = PublisherOptions(Options{}.set(true)); - EXPECT_THAT(log.ExtractLines(), Contains(HasSubstr("Unexpected option"))); -} - -TEST(PublisherOptions, MakeOptions) { - auto b = PublisherOptions{} - .set_maximum_hold_time(std::chrono::seconds(12)) - .set_maximum_batch_message_count(10) - .set_maximum_batch_bytes(123) - .set_maximum_pending_messages(4) - .set_maximum_pending_bytes(444) - .enable_message_ordering(); - - auto opts = pubsub_internal::MakeOptions(std::move(b)); - EXPECT_EQ(std::chrono::seconds(12), opts.get()); - EXPECT_EQ(10, opts.get()); - EXPECT_EQ(123, opts.get()); - EXPECT_EQ(4, opts.get()); - EXPECT_EQ(444, opts.get()); - EXPECT_TRUE(opts.get()); - - auto ignored = PublisherOptions{}.set_full_publisher_ignored(); - opts = pubsub_internal::MakeOptions(std::move(ignored)); - EXPECT_EQ(FullPublisherAction::kIgnored, - opts.get()); - - auto rejects = PublisherOptions{}.set_full_publisher_rejects(); - opts = pubsub_internal::MakeOptions(std::move(rejects)); - EXPECT_EQ(FullPublisherAction::kRejects, - opts.get()); - - auto blocks = PublisherOptions{}.set_full_publisher_blocks(); - opts = pubsub_internal::MakeOptions(std::move(blocks)); - EXPECT_EQ(FullPublisherAction::kBlocks, - opts.get()); - - // Ensure that we are not setting any extra options - EXPECT_FALSE(opts.has()); -} - -} // namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace pubsub -} // namespace cloud -} // namespace google diff --git a/google/cloud/pubsub/pubsub_client_unit_tests.bzl b/google/cloud/pubsub/pubsub_client_unit_tests.bzl index 8600831abc83a..abcb99d897e0e 100644 --- a/google/cloud/pubsub/pubsub_client_unit_tests.bzl +++ b/google/cloud/pubsub/pubsub_client_unit_tests.bzl @@ -61,14 +61,12 @@ pubsub_client_unit_tests = [ "message_test.cc", "options_test.cc", "publisher_connection_test.cc", - "publisher_options_test.cc", "publisher_test.cc", "pull_ack_handler_test.cc", "schema_test.cc", "snapshot_builder_test.cc", "snapshot_test.cc", "subscriber_connection_test.cc", - "subscriber_options_test.cc", "subscriber_test.cc", "subscription_admin_client_test.cc", "subscription_admin_connection_test.cc", diff --git a/google/cloud/pubsub/quickstart/.bazelrc b/google/cloud/pubsub/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/pubsub/quickstart/.bazelrc +++ b/google/cloud/pubsub/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/pubsub/quickstart/CMakeLists.txt b/google/cloud/pubsub/quickstart/CMakeLists.txt index d56defe95d8ac..1c19460093539 100644 --- a/google/cloud/pubsub/quickstart/CMakeLists.txt +++ b/google/cloud/pubsub/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # A minimal CMakeList.txt showing how to use the Cloud Pub/Sub C++ client # library in CMake-based projects. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-pubsub-quickstart CXX) find_package(google_cloud_cpp_pubsub REQUIRED) diff --git a/google/cloud/pubsub/samples/BUILD.bazel b/google/cloud/pubsub/samples/BUILD.bazel index 7586994429215..e7c3be6bb688e 100644 --- a/google/cloud/pubsub/samples/BUILD.bazel +++ b/google/cloud/pubsub/samples/BUILD.bazel @@ -14,6 +14,8 @@ """Examples for the Cloud Pub/Sub C++ client library.""" +load("@com_google_protobuf//bazel:cc_proto_library.bzl", "cc_proto_library") +load("@com_google_protobuf//bazel:proto_library.bzl", "proto_library") load(":pubsub_client_integration_samples.bzl", "pubsub_client_integration_samples") load(":pubsub_client_unit_samples.bzl", "pubsub_client_unit_samples") load(":pubsub_samples_common.bzl", "pubsub_samples_common_hdrs", "pubsub_samples_common_srcs") @@ -45,7 +47,7 @@ cc_library( "//:common", "//:pubsub", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) for test in pubsub_samples_unit_tests] @@ -89,6 +91,6 @@ cc_proto_library( "//:pubsub", "//:pubsub_mocks", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) for test in pubsub_client_unit_samples] diff --git a/google/cloud/pubsub/samples/blocking_samples.cc b/google/cloud/pubsub/samples/blocking_samples.cc index 597cccae7e3fa..6598c110774aa 100644 --- a/google/cloud/pubsub/samples/blocking_samples.cc +++ b/google/cloud/pubsub/samples/blocking_samples.cc @@ -14,6 +14,7 @@ #include "google/cloud/pubsub/admin/topic_admin_client.h" #include "google/cloud/pubsub/blocking_publisher.h" +#include "google/cloud/pubsub/options.h" #include "google/cloud/pubsub/samples/pubsub_samples_common.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/internal/random.h" diff --git a/google/cloud/pubsub/samples/iam_samples.cc b/google/cloud/pubsub/samples/iam_samples.cc index 7f2f302813583..d51f5db13323d 100644 --- a/google/cloud/pubsub/samples/iam_samples.cc +++ b/google/cloud/pubsub/samples/iam_samples.cc @@ -12,9 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "google/cloud/iam/iam_policy_client.h" +#include "google/cloud/iam/v1/iam_policy_client.h" #include "google/cloud/pubsub/admin/subscription_admin_client.h" #include "google/cloud/pubsub/admin/topic_admin_client.h" +#include "google/cloud/pubsub/options.h" #include "google/cloud/pubsub/samples/pubsub_samples_common.h" #include "google/cloud/pubsub/subscription_builder.h" #include "google/cloud/internal/getenv.h" @@ -27,7 +28,7 @@ namespace { void GetTopicPolicy(std::vector const& argv) { // [START pubsub_get_topic_policy] - namespace iam = google::cloud::iam; + namespace iam = google::cloud::iam_v1; namespace pubsub = google::cloud::pubsub; [](std::string project_id, std::string topic_id) { auto const topic = @@ -48,7 +49,7 @@ void GetTopicPolicy(std::vector const& argv) { void SetTopicPolicy(std::vector const& argv) { // [START pubsub_set_topic_policy] - namespace iam = google::cloud::iam; + namespace iam = google::cloud::iam_v1; namespace pubsub = google::cloud::pubsub; using google::cloud::StatusCode; [](std::string project_id, std::string topic_id) { @@ -87,7 +88,7 @@ void SetTopicPolicy(std::vector const& argv) { void TestTopicPermissions(std::vector const& argv) { // [START pubsub_test_topic_permissions] - namespace iam = google::cloud::iam; + namespace iam = google::cloud::iam_v1; namespace pubsub = google::cloud::pubsub; [](std::string project_id, std::string topic_id) { auto const topic = @@ -113,7 +114,7 @@ void TestTopicPermissions(std::vector const& argv) { void GetSubscriptionPolicy(std::vector const& argv) { // [START pubsub_get_subscription_policy] - namespace iam = google::cloud::iam; + namespace iam = google::cloud::iam_v1; namespace pubsub = google::cloud::pubsub; [](std::string project_id, std::string subscription_id) { auto const subscription = @@ -134,7 +135,7 @@ void GetSubscriptionPolicy(std::vector const& argv) { void SetSubscriptionPolicy(std::vector const& argv) { // [START pubsub_set_subscription_policy] - namespace iam = google::cloud::iam; + namespace iam = google::cloud::iam_v1; namespace pubsub = google::cloud::pubsub; using google::cloud::StatusCode; [](std::string project_id, std::string subscription_id) { @@ -173,7 +174,7 @@ void SetSubscriptionPolicy(std::vector const& argv) { void TestSubscriptionPermissions(std::vector const& argv) { // [START pubsub_test_subscription_permissions] - namespace iam = google::cloud::iam; + namespace iam = google::cloud::iam_v1; namespace pubsub = google::cloud::pubsub; [](std::string project_id, std::string subscription_id) { auto const subscription = diff --git a/google/cloud/pubsub/samples/samples.cc b/google/cloud/pubsub/samples/samples.cc index 6b934ff630cc7..a71b29fd4b510 100644 --- a/google/cloud/pubsub/samples/samples.cc +++ b/google/cloud/pubsub/samples/samples.cc @@ -14,7 +14,9 @@ #include "google/cloud/pubsub/admin/subscription_admin_client.h" #include "google/cloud/pubsub/admin/topic_admin_client.h" +#include "google/cloud/pubsub/options.h" #include "google/cloud/pubsub/samples/pubsub_samples_common.h" +#include "google/cloud/pubsub/samples/testdata/schema.pb.h" #include "google/cloud/pubsub/schema.h" #include "google/cloud/pubsub/schema_client.h" #include "google/cloud/pubsub/subscriber.h" @@ -24,7 +26,6 @@ #include "google/cloud/project.h" #include "google/cloud/status.h" #include "google/cloud/testing_util/example_driver.h" -#include #include #include #include diff --git a/google/cloud/pubsub/samples/topic_admin_samples.cc b/google/cloud/pubsub/samples/topic_admin_samples.cc index 9ffd2b58c22c4..05c1ba7414927 100644 --- a/google/cloud/pubsub/samples/topic_admin_samples.cc +++ b/google/cloud/pubsub/samples/topic_admin_samples.cc @@ -23,7 +23,7 @@ #include "google/cloud/project.h" #include "google/cloud/testing_util/example_driver.h" #include "absl/strings/match.h" -#include +#include "google/protobuf/timestamp.pb.h" #include #include diff --git a/google/cloud/pubsub/schema_connection.h b/google/cloud/pubsub/schema_connection.h index 2e47406a0d49c..50bb541b42aa4 100644 --- a/google/cloud/pubsub/schema_connection.h +++ b/google/cloud/pubsub/schema_connection.h @@ -27,7 +27,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/pubsub/v1/schema.pb.h" #include #include diff --git a/google/cloud/pubsub/schema_connection_idempotency_policy.h b/google/cloud/pubsub/schema_connection_idempotency_policy.h index d1b046d2b7acc..c94e4bcaa7c66 100644 --- a/google/cloud/pubsub/schema_connection_idempotency_policy.h +++ b/google/cloud/pubsub/schema_connection_idempotency_policy.h @@ -21,8 +21,8 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/pubsub/v1/schema.grpc.pb.h" #include namespace google { diff --git a/google/cloud/pubsub/snapshot_builder.h b/google/cloud/pubsub/snapshot_builder.h index 58d89a36fcf34..5f7ef806212ec 100644 --- a/google/cloud/pubsub/snapshot_builder.h +++ b/google/cloud/pubsub/snapshot_builder.h @@ -19,8 +19,8 @@ #include "google/cloud/pubsub/subscription.h" #include "google/cloud/pubsub/version.h" #include "google/cloud/internal/time_utils.h" +#include "google/pubsub/v1/pubsub.pb.h" #include -#include #include #include diff --git a/google/cloud/pubsub/subscriber_connection.cc b/google/cloud/pubsub/subscriber_connection.cc index d542d35d57c5b..adec01bccc3ca 100644 --- a/google/cloud/pubsub/subscriber_connection.cc +++ b/google/cloud/pubsub/subscriber_connection.cc @@ -101,19 +101,6 @@ std::shared_ptr MakeSubscriberConnection( return MakeSubscriberConnection("", std::move(subscription), std::move(opts)); } -std::shared_ptr MakeSubscriberConnection( - Subscription subscription, SubscriberOptions options, - ConnectionOptions connection_options, - std::unique_ptr retry_policy, - std::unique_ptr backoff_policy) { - auto opts = internal::MergeOptions( - pubsub_internal::MakeOptions(std::move(options)), - internal::MakeOptions(std::move(connection_options))); - if (retry_policy) opts.set(retry_policy->clone()); - if (backoff_policy) opts.set(backoff_policy->clone()); - return MakeSubscriberConnection(std::move(subscription), std::move(opts)); -} - GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub diff --git a/google/cloud/pubsub/subscriber_connection.h b/google/cloud/pubsub/subscriber_connection.h index febc729e7d77f..2a47071ee7f50 100644 --- a/google/cloud/pubsub/subscriber_connection.h +++ b/google/cloud/pubsub/subscriber_connection.h @@ -22,7 +22,6 @@ #include "google/cloud/pubsub/message.h" #include "google/cloud/pubsub/pull_response.h" #include "google/cloud/pubsub/retry_policy.h" -#include "google/cloud/pubsub/subscriber_options.h" #include "google/cloud/pubsub/subscription.h" #include "google/cloud/pubsub/version.h" #include "google/cloud/internal/non_constructible.h" @@ -144,49 +143,6 @@ std::shared_ptr MakeSubscriberConnection( std::shared_ptr MakeSubscriberConnection( Subscription subscription, Options opts = {}); -/** - * Creates a new `SubscriberConnection` object to work with `Subscriber`. - * - * The `SubscriberConnection` class is not intended for direct use in - * applications, it is provided for applications wanting to mock the - * `Subscriber` behavior in their tests. - * - * @par Performance - * Creating a new `SubscriberConnection` is relatively expensive. This typically - * initiates connections to the service, and therefore these objects should be - * shared and reused when possible. Note that gRPC reuses existing OS resources - * (sockets) whenever possible, so applications may experience better - * performance on the second (and subsequent) calls to this function with the - * identical values for @p options. However, this behavior is not guaranteed - * and applications should not rely on it. - * - * @see `SubscriberConnection` - * - * @par Changing Retry Parameters Example - * @snippet samples.cc subscriber-retry-settings - * - * @param subscription the Cloud Pub/Sub subscription used by the returned - * connection. - * @param options configure the flow control and other parameters in the - * returned connection. - * @param connection_options (optional) general configuration for this - * connection, this type is also used to configure `pubsub::Publisher`. - * @param retry_policy control for how long (or how many times) are retryable - * RPCs attempted. - * @param backoff_policy controls the backoff behavior between retry attempts, - * typically some form of exponential backoff with jitter. - * - * @deprecated Please use the `MakeSubscriberConnection` function which accepts - * `google::cloud::Options` instead. - */ -GOOGLE_CLOUD_CPP_DEPRECATED( - "use the overload consuming google::cloud::Options instead") -std::shared_ptr MakeSubscriberConnection( - Subscription subscription, SubscriberOptions options, - ConnectionOptions connection_options = {}, - std::unique_ptr retry_policy = {}, - std::unique_ptr backoff_policy = {}); - GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub diff --git a/google/cloud/pubsub/subscriber_connection_test.cc b/google/cloud/pubsub/subscriber_connection_test.cc index 299e2afa72504..364b4a5431b77 100644 --- a/google/cloud/pubsub/subscriber_connection_test.cc +++ b/google/cloud/pubsub/subscriber_connection_test.cc @@ -164,7 +164,6 @@ TEST(SubscriberConnectionTest, MakeSubscriberConnectionSetupsMetadata) { ASSERT_STATUS_OK(response.get()); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::DisableTracing; using ::google::cloud::testing_util::EnableTracing; using ::google::cloud::testing_util::InstallSpanCatcher; @@ -271,8 +270,6 @@ TEST(MakeSubscriberConnectionTest, TracingDisabledForUnaryPull) { EXPECT_THAT(spans, IsEmpty()); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsub diff --git a/google/cloud/pubsub/subscriber_options.cc b/google/cloud/pubsub/subscriber_options.cc deleted file mode 100644 index 099fcb4ef4555..0000000000000 --- a/google/cloud/pubsub/subscriber_options.cc +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/pubsub/subscriber_options.h" -#include "google/cloud/pubsub/internal/defaults.h" -#include - -namespace google { -namespace cloud { -namespace pubsub { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -using seconds = std::chrono::seconds; - -// Cannot delegate on `SubscriberOptions(Options)` as it is deprecated. -SubscriberOptions::SubscriberOptions() { - opts_ = pubsub_internal::DefaultSubscriberOptionsOnly(Options{}); -} - -SubscriberOptions::SubscriberOptions(Options opts) { - internal::CheckExpectedOptions(opts, __func__); - opts_ = pubsub_internal::DefaultSubscriberOptionsOnly(std::move(opts)); -} - -SubscriberOptions& SubscriberOptions::set_max_deadline_extension( - seconds extension) { - opts_.set( - (std::max)((std::min)(extension, seconds(600)), seconds(10))); - return *this; -} - -SubscriberOptions& SubscriberOptions::set_max_outstanding_messages( - std::int64_t message_count) { - opts_.set( - (std::max)(0, message_count)); - return *this; -} - -SubscriberOptions& SubscriberOptions::set_max_outstanding_bytes( - std::int64_t bytes) { - opts_.set((std::max)(0, bytes)); - return *this; -} - -SubscriberOptions& SubscriberOptions::set_max_concurrency(std::size_t v) { - opts_.set(v == 0 ? pubsub_internal::DefaultThreadCount() - : v); - return *this; -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace pubsub -} // namespace cloud -} // namespace google diff --git a/google/cloud/pubsub/subscriber_options.h b/google/cloud/pubsub/subscriber_options.h deleted file mode 100644 index 3251eb35a8015..0000000000000 --- a/google/cloud/pubsub/subscriber_options.h +++ /dev/null @@ -1,335 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_SUBSCRIBER_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_SUBSCRIBER_OPTIONS_H - -#include "google/cloud/pubsub/options.h" -#include "google/cloud/pubsub/version.h" -#include "google/cloud/options.h" -#include -#include - -namespace google { -namespace cloud { -namespace pubsub { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -class SubscriberOptions; -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace pubsub - -namespace pubsub_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -Options MakeOptions(pubsub::SubscriberOptions); -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace pubsub_internal - -namespace pubsub { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/** - * Configure how a `Subscriber` handles incoming messages. - * - * There are two main algorithms controlled by this function: the dispatching of - * application callbacks, and requesting more data from the service. - * - * @par Callback Concurrency Control - * @parblock - * The subscription configuration determines the upper limit (set - * `set_concurrency_watermarks()`) how many callbacks are *scheduled* at a time. - * As long as this limit is not reached the library will continue to schedule - * callbacks, once the limit is reached the library will wait until the number - * of executing callbacks goes below the low watermark. - * - * A callback is "executing" until the `AckHandler::ack()` or - * `AckHandler::nack()` function is called on the associated `AckHandler`. - * Applications can use this to move long-running computations out of the - * library internal thread pool. - * - * Note that callbacks are "scheduled", but they may not immediately execute. - * For example, callbacks may be sequenced if the concurrency control parameters - * are higher than the number of I/O threads configured in the - * `SubscriberConnection`. - * - * The default value for the concurrency high watermarks is set to the value - * returned by `std::thread::hardware_concurrency()` (or 4 if your standard - * library returns `0` for this parameter). - * @endparblock - * - * @par Message Flow Control - * @parblock - * The subscription will request more messages from the service as long as - * both the outstanding message count (see `set_message_count_watermarks()`) - * and the number of bytes in the outstanding messages (see - * `set_message_size_watermarks()`) are below the high watermarks for these - * values. - * - * Once either of the high watermarks are breached the library will wait until - * **both** the values are below their low watermarks before requesting more - * messages from the service. - * - * In this algorithm a message is outstanding until the `AckHandler::ack()` or - * `AckHandler::nack()` function is called on the associated `AckHandler`. Note - * that if the concurrency control algorithm has not scheduled a callback this - * can also put back pressure on the flow control algorithm. - * @endparblock - * - * @deprecated We recommend you use `google::cloud::Options` and pass any - * subscriber options to `MakeSubscriberConnection()`. - * - * @par Example: setting the concurrency control parameters - * @snippet samples.cc subscriber-concurrency - * - * @par Example: setting the flow control parameters - * @snippet samples.cc subscriber-flow-control - */ -class SubscriberOptions { - public: - /** - * Initialize the subscriber options with default values. - * - * @deprecated Use `google::cloud::Options` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED("Use `google::cloud::Options` instead") - SubscriberOptions(); - - /** - * Initialize the subscriber options. - * - * Expected options are any of the types in the `SubscriberOptionList` - * - * @note Unrecognized options will be ignored. To debug issues with options - * set `GOOGLE_CLOUD_CPP_ENABLE_CLOG=yes` in the environment and - * unexpected options will be logged. - * - * @param opts configuration options - * - * @deprecated Use `google::cloud::Options` instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED("Use `google::cloud::Options` instead") - explicit SubscriberOptions(Options opts); - - /** - * The maximum deadline for each incoming message. - * - * Configure how long does the application have to respond (ACK or NACK) an - * incoming message. Note that this might be longer, or shorter, than the - * deadline configured in the server-side subscription. - * - * The value `0` is reserved to leave the deadline unmodified and just use the - * server-side configuration. - * - * @note The deadline applies to each message as it is delivered to the - * application, thus, if the library receives a batch of N messages their - * deadline for all the messages is extended repeatedly. Only once the - * message is delivered to a callback does the deadline become immutable. - * - * @deprecated Use `google::cloud::Options` and `MaxDeadlineTimeOption` - * instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` and `MaxDeadlineTimeOption` instead") - std::chrono::seconds max_deadline_time() const { - return opts_.get(); - } - - /** - * Set the maximum deadline for incoming messages. - * - * @deprecated Use `google::cloud::Options` and `MaxDeadlineTimeOption` - * instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` and `MaxDeadlineTimeOption` instead") - SubscriberOptions& set_max_deadline_time(std::chrono::seconds d) { - opts_.set(d); - return *this; - } - - /** - * Set the maximum time by which the deadline for each incoming message is - * extended. - * - * The Cloud Pub/Sub C++ client library will extend the deadline by at most - * this amount, while waiting for an ack or nack. The default extension is 10 - * minutes. An application may wish to reduce this extension so that the - * Pub/Sub service will resend a message sooner when it does not hear back - * from a Subscriber. - * - * The value is clamped between 10 seconds and 10 minutes. - * - * @param extension the maximum time that the deadline can be extended by, - * measured in seconds. - * - * @deprecated Use `google::cloud::Options` and `MaxDeadlineExtensionOption` - * instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` and `MaxDeadlineExtensionOption` instead") - SubscriberOptions& set_max_deadline_extension(std::chrono::seconds extension); - - /// @deprecated Use `google::cloud::Options` and `MaxDeadlineExtensionOption` - /// instead. - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` and `MaxDeadlineExtensionOption` instead") - std::chrono::seconds max_deadline_extension() const { - return opts_.get(); - } - - /** - * Set the maximum number of outstanding messages per streaming pull. - * - * The Cloud Pub/Sub C++ client library uses streaming pull requests to - * receive messages from the service. The service will stop delivering - * messages if @p message_count or more messages have not been acknowledged - * nor rejected. - * - * @par Example - * @snippet samples.cc subscriber-flow-control - * - * @param message_count the maximum number of messages outstanding, use 0 or - * negative numbers to make the message count unlimited. - * - * @deprecated Use `google::cloud::Options` and `MaxOutstandingMessagesOption` - * instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` and `MaxOutstandingMessagesOption` instead") - SubscriberOptions& set_max_outstanding_messages(std::int64_t message_count); - - /// @deprecated Use `google::cloud::Options` and - /// `MaxOutstandingMessagesOption` instead. - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` and `MaxOutstandingMessagesOption` instead") - std::int64_t max_outstanding_messages() const { - return opts_.get(); - } - - /** - * Set the maximum number of outstanding bytes per streaming pull. - * - * The Cloud Pub/Sub C++ client library uses streaming pull requests to - * receive messages from the service. The service will stop delivering - * messages if @p bytes or more worth of messages have not been - * acknowledged nor rejected. - * - * @par Example - * @snippet samples.cc subscriber-flow-control - * - * @param bytes the maximum number of bytes outstanding, use 0 or negative - * numbers to make the number of bytes unlimited. - * - * @deprecated Use `google::cloud::Options` and `MaxOutstandingBytesOption` - * instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` and `MaxOutstandingBytesOption` instead") - SubscriberOptions& set_max_outstanding_bytes(std::int64_t bytes); - - /// @deprecated Use `google::cloud::Options` and `MaxOutstandingBytesOption` - /// instead. - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` and `MaxOutstandingBytesOption` instead") - std::int64_t max_outstanding_bytes() const { - return opts_.get(); - } - - /** - * Set the maximum callback concurrency. - * - * The Cloud Pub/Sub C++ client library will schedule parallel callbacks as - * long as the number of outstanding callbacks is less than this maximum. - * - * Note that this controls the number of callbacks *scheduled*, not the number - * of callbacks actually executing at a time. The application needs to create - * (or configure) the background threads pool with enough parallelism to - * execute more than one callback at a time. - * - * Some applications may want to share a thread pool across many - * subscriptions, the additional level of control (scheduled vs. running - * callbacks) allows applications, for example, to ensure that at most `K` - * threads in the pool are used by any given subscription. - * - * @par Example - * @snippet samples.cc subscriber-concurrency - * - * @param v the new value, 0 resets to the default - * - * @deprecated Use `google::cloud::Options` and `MaxConcurrencyOption` - * instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` and `MaxConcurrencyOption` instead") - SubscriberOptions& set_max_concurrency(std::size_t v); - - /** - * Maximum number of callbacks scheduled by the library at a time. - * - * @deprecated Use `google::cloud::Options` and `MaxConcurrencyOption` - * instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` and `MaxConcurrencyOption` instead") - std::size_t max_concurrency() const { - return opts_.get(); - } - - /** - * Control how often the session polls for automatic shutdowns. - * - * Applications can shutdown a session by calling `.cancel()` on the returned - * `future`. In addition, applications can fire & forget a session, - * which is only shutdown once the completion queue servicing the session - * shuts down. In this latter case the session polls periodically to detect - * if the CQ has shutdown. This controls how often this polling happens. - * - * @deprecated Use `google::cloud::Options` and `ShutdownPollingPeriodOption` - * instead. - */ - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` and `ShutdownPollingPeriodOption` instead") - SubscriberOptions& set_shutdown_polling_period(std::chrono::milliseconds v) { - opts_.set(v); - return *this; - } - - /// @deprecated Use `google::cloud::Options` and `ShutdownPollingPeriodOption` - /// instead. - GOOGLE_CLOUD_CPP_DEPRECATED( - "use `google::cloud::Options` and `ShutdownPollingPeriodOption` instead") - std::chrono::milliseconds shutdown_polling_period() const { - return opts_.get(); - } - - private: - friend Options pubsub_internal::MakeOptions(SubscriberOptions); - Options opts_; -}; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace pubsub - -namespace pubsub_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -inline Options MakeOptions(pubsub::SubscriberOptions o) { - return std::move(o.opts_); -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace pubsub_internal -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUB_SUBSCRIBER_OPTIONS_H diff --git a/google/cloud/pubsub/subscriber_options_test.cc b/google/cloud/pubsub/subscriber_options_test.cc deleted file mode 100644 index 6fe4065c62b80..0000000000000 --- a/google/cloud/pubsub/subscriber_options_test.cc +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/pubsub/subscriber_options.h" -#include "google/cloud/pubsub/options.h" -#include "google/cloud/grpc_options.h" -#include "google/cloud/testing_util/scoped_log.h" -// This file contains the tests for deprecated functions, we need to disable -// the warnings -#include "google/cloud/internal/disable_deprecation_warnings.inc" -#include -#include - -namespace google { -namespace cloud { -namespace pubsub { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -using std::chrono::seconds; -using ::testing::Contains; -using ::testing::HasSubstr; - -TEST(SubscriberOptionsTest, Default) { - SubscriberOptions const options{}; - EXPECT_EQ(seconds(600), options.max_deadline_extension()); - EXPECT_LT(0, options.max_outstanding_messages()); - EXPECT_LT(0, options.max_outstanding_bytes()); - EXPECT_LT(0, options.max_concurrency()); -} - -TEST(SubscriberOptionsTest, SetDeadlineExtension) { - auto options = SubscriberOptions{}.set_max_deadline_extension(seconds(60)); - EXPECT_EQ(seconds(60), options.max_deadline_extension()); - - options.set_max_deadline_extension(seconds(5)); - EXPECT_EQ(seconds(10), options.max_deadline_extension()); - - options.set_max_deadline_extension(seconds(1000)); - EXPECT_EQ(seconds(600), options.max_deadline_extension()); -} - -TEST(SubscriberOptionsTest, SetMessageCount) { - auto options = SubscriberOptions{}.set_max_outstanding_messages(16); - EXPECT_EQ(16, options.max_outstanding_messages()); - - options.set_max_outstanding_messages(-7); - EXPECT_EQ(0, options.max_outstanding_messages()); -} - -TEST(SubscriberOptionsTest, SetBytes) { - auto options = SubscriberOptions{}.set_max_outstanding_bytes(16 * 1024); - EXPECT_EQ(16 * 1024, options.max_outstanding_bytes()); - - options.set_max_outstanding_bytes(-7); - EXPECT_EQ(0, options.max_outstanding_bytes()); -} - -TEST(SubscriberOptionsTest, SetConcurrency) { - auto options = SubscriberOptions{}.set_max_concurrency(16); - EXPECT_EQ(16, options.max_concurrency()); - - // 0 resets to default - options.set_max_concurrency(0); - EXPECT_EQ(SubscriberOptions{}.max_concurrency(), options.max_concurrency()); -} - -TEST(SubscriberOptionsTest, OptionsConstructor) { - auto const options = - SubscriberOptions(Options{} - .set(seconds(2)) - .set(seconds(30)) - .set(4) - .set(5) - .set(6)); - - EXPECT_EQ(seconds(2), options.max_deadline_time()); - EXPECT_EQ(seconds(30), options.max_deadline_extension()); - EXPECT_EQ(4, options.max_outstanding_messages()); - EXPECT_EQ(5, options.max_outstanding_bytes()); - EXPECT_EQ(6, options.max_concurrency()); -} - -TEST(SubscriberOptionsTest, ExpectedOptionsCheck) { - struct NonOption { - using Type = bool; - }; - - testing_util::ScopedLog log; - auto options = SubscriberOptions(Options{}.set(true)); - EXPECT_THAT(log.ExtractLines(), Contains(HasSubstr("Unexpected option"))); -} - -TEST(SubscriberOptionsTest, MakeOptions) { - auto options = SubscriberOptions{} - .set_max_deadline_time(seconds(2)) - .set_max_deadline_extension(seconds(30)) - .set_max_outstanding_messages(4) - .set_max_outstanding_bytes(5) - .set_max_concurrency(6); - - auto opts = pubsub_internal::MakeOptions(std::move(options)); - EXPECT_EQ(seconds(2), opts.get()); - EXPECT_EQ(seconds(30), opts.get()); - EXPECT_EQ(4, opts.get()); - EXPECT_EQ(5, opts.get()); - EXPECT_EQ(6, opts.get()); - - // Ensure that we are not setting any extra options - EXPECT_FALSE(opts.has()); -} - -} // namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace pubsub -} // namespace cloud -} // namespace google diff --git a/google/cloud/pubsub/subscription_admin_connection.h b/google/cloud/pubsub/subscription_admin_connection.h index cecb6d0d307b5..9db060f8ad607 100644 --- a/google/cloud/pubsub/subscription_admin_connection.h +++ b/google/cloud/pubsub/subscription_admin_connection.h @@ -27,7 +27,7 @@ #include "google/cloud/internal/non_constructible.h" #include "google/cloud/internal/pagination_range.h" #include "google/cloud/status_or.h" -#include +#include "google/pubsub/v1/pubsub.pb.h" #include #include #include diff --git a/google/cloud/pubsub/subscription_builder.h b/google/cloud/pubsub/subscription_builder.h index 94d0372ac6a98..02f770fc352e9 100644 --- a/google/cloud/pubsub/subscription_builder.h +++ b/google/cloud/pubsub/subscription_builder.h @@ -19,8 +19,8 @@ #include "google/cloud/pubsub/topic.h" #include "google/cloud/pubsub/version.h" #include "google/cloud/internal/time_utils.h" +#include "google/pubsub/v1/pubsub.pb.h" #include -#include #include #include #include diff --git a/google/cloud/pubsub/topic_admin_connection.h b/google/cloud/pubsub/topic_admin_connection.h index 66eb32ed45cf5..8af93f5a57276 100644 --- a/google/cloud/pubsub/topic_admin_connection.h +++ b/google/cloud/pubsub/topic_admin_connection.h @@ -25,7 +25,7 @@ #include "google/cloud/internal/non_constructible.h" #include "google/cloud/internal/pagination_range.h" #include "google/cloud/status_or.h" -#include +#include "google/pubsub/v1/pubsub.pb.h" #include #include diff --git a/google/cloud/pubsub/topic_builder.h b/google/cloud/pubsub/topic_builder.h index 3012b2bfd8d84..f84301cb05c08 100644 --- a/google/cloud/pubsub/topic_builder.h +++ b/google/cloud/pubsub/topic_builder.h @@ -19,7 +19,7 @@ #include "google/cloud/pubsub/topic.h" #include "google/cloud/pubsub/version.h" #include "google/cloud/internal/time_utils.h" -#include +#include "google/pubsub/v1/pubsub.pb.h" #include #include diff --git a/google/cloud/pubsub/version.h b/google/cloud/pubsub/version.h index e4eba43ee4fbb..a4c42144a5cd2 100644 --- a/google/cloud/pubsub/version.h +++ b/google/cloud/pubsub/version.h @@ -42,8 +42,6 @@ namespace cloud { namespace pubsub { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -// TODO(#7463) - remove backwards compatibility namespaces -namespace v1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace pubsub } // namespace cloud } // namespace google diff --git a/google/cloud/pubsublite/BUILD.bazel b/google/cloud/pubsublite/BUILD.bazel index c94f5eba9a76c..256629c9ba31f 100644 --- a/google/cloud/pubsublite/BUILD.bazel +++ b/google/cloud/pubsublite/BUILD.bazel @@ -36,7 +36,7 @@ cc_library( "//:common", "//:grpc_utils", "//:pubsub", - "@com_google_googleapis//google/cloud/pubsublite/v1:pubsublite_cc_grpc", + "@googleapis//google/cloud/pubsublite/v1:pubsublite_cc_grpc", ], ) @@ -54,7 +54,7 @@ cc_library( visibility = ["//:__pkg__"], deps = [ ":google_cloud_cpp_pubsublite", - "@com_google_googletest//:gtest", + "@googletest//:gtest", ], ) @@ -85,8 +85,8 @@ cc_library( "//:mocks", "//google/cloud/testing_util:google_cloud_cpp_testing_grpc_private", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_google_absl//absl/memory", - "@com_google_googletest//:gtest_main", + "@abseil-cpp//absl/memory", + "@googletest//:gtest_main", ], ) for test in pubsublite_unit_tests diff --git a/google/cloud/pubsublite/admin_client.h b/google/cloud/pubsublite/admin_client.h index 793efd20a1cc7..f68edbe3097c3 100644 --- a/google/cloud/pubsublite/admin_client.h +++ b/google/cloud/pubsublite/admin_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/pubsublite/admin_connection.h b/google/cloud/pubsublite/admin_connection.h index fc6f2368329b8..e2a2d6ec19768 100644 --- a/google/cloud/pubsublite/admin_connection.h +++ b/google/cloud/pubsublite/admin_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/pubsublite/admin_connection_idempotency_policy.h" #include "google/cloud/pubsublite/internal/admin_retry_traits.h" +#include "google/cloud/pubsublite/v1/admin.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/pubsublite/admin_connection_idempotency_policy.h b/google/cloud/pubsublite/admin_connection_idempotency_policy.h index 1c1e89bdd0564..3c500a0416785 100644 --- a/google/cloud/pubsublite/admin_connection_idempotency_policy.h +++ b/google/cloud/pubsublite/admin_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_ADMIN_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_ADMIN_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/pubsublite/v1/admin.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/pubsublite/integration_tests/BUILD.bazel b/google/cloud/pubsublite/integration_tests/BUILD.bazel index dafc0b4bd8e8e..90d18e5b529c3 100644 --- a/google/cloud/pubsublite/integration_tests/BUILD.bazel +++ b/google/cloud/pubsublite/integration_tests/BUILD.bazel @@ -31,6 +31,6 @@ licenses(["notice"]) # Apache 2.0 "//google/cloud/pubsublite:pubsublite_testing", "//google/cloud/testing_util:google_cloud_cpp_testing_grpc_private", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) for test in pubsublite_client_integration_tests] diff --git a/google/cloud/pubsublite/integration_tests/publisher_integration_test.cc b/google/cloud/pubsublite/integration_tests/publisher_integration_test.cc index b7450a01e4749..6aa02c03a0ad8 100644 --- a/google/cloud/pubsublite/integration_tests/publisher_integration_test.cc +++ b/google/cloud/pubsublite/integration_tests/publisher_integration_test.cc @@ -17,13 +17,13 @@ #include "google/cloud/pubsublite/endpoint.h" #include "google/cloud/pubsublite/options.h" #include "google/cloud/pubsublite/publisher_connection.h" +#include "google/cloud/pubsublite/v1/admin.pb.h" #include "google/cloud/internal/format_time_point.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/internal/random.h" #include "google/cloud/testing_util/integration_test.h" #include "google/cloud/testing_util/status_matchers.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/pubsublite/internal/admin_auth_decorator.cc b/google/cloud/pubsublite/internal/admin_auth_decorator.cc index ac1cfcca47f98..44373c04ca9f5 100644 --- a/google/cloud/pubsublite/internal/admin_auth_decorator.cc +++ b/google/cloud/pubsublite/internal/admin_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/pubsublite/v1/admin.proto #include "google/cloud/pubsublite/internal/admin_auth_decorator.h" -#include +#include "google/cloud/pubsublite/v1/admin.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -311,3 +314,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/admin_auth_decorator.h b/google/cloud/pubsublite/internal/admin_auth_decorator.h index 9ec68596912e8..b67901f53be7d 100644 --- a/google/cloud/pubsublite/internal/admin_auth_decorator.h +++ b/google/cloud/pubsublite/internal/admin_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/pubsublite/internal/admin_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -187,4 +190,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_ADMIN_AUTH_DECORATOR_H diff --git a/google/cloud/pubsublite/internal/admin_connection_impl.h b/google/cloud/pubsublite/internal/admin_connection_impl.h index 657c951058693..4a7962a3551b6 100644 --- a/google/cloud/pubsublite/internal/admin_connection_impl.h +++ b/google/cloud/pubsublite/internal/admin_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/pubsublite/internal/admin_logging_decorator.cc b/google/cloud/pubsublite/internal/admin_logging_decorator.cc index 1cfe537c72f08..dfc622c6c6e66 100644 --- a/google/cloud/pubsublite/internal/admin_logging_decorator.cc +++ b/google/cloud/pubsublite/internal/admin_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/pubsublite/v1/admin.proto #include "google/cloud/pubsublite/internal/admin_logging_decorator.h" +#include "google/cloud/pubsublite/v1/admin.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -394,3 +397,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/admin_logging_decorator.h b/google/cloud/pubsublite/internal/admin_logging_decorator.h index aac919b33114e..e46e8ece08a42 100644 --- a/google/cloud/pubsublite/internal/admin_logging_decorator.h +++ b/google/cloud/pubsublite/internal/admin_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/pubsublite/internal/admin_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -187,4 +190,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_ADMIN_LOGGING_DECORATOR_H diff --git a/google/cloud/pubsublite/internal/admin_metadata_decorator.cc b/google/cloud/pubsublite/internal/admin_metadata_decorator.cc index c7ec2eb47bfb8..d6e98981f572e 100644 --- a/google/cloud/pubsublite/internal/admin_metadata_decorator.cc +++ b/google/cloud/pubsublite/internal/admin_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/pubsublite/v1/admin.proto #include "google/cloud/pubsublite/internal/admin_metadata_decorator.h" +#include "google/cloud/pubsublite/v1/admin.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -312,3 +316,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/admin_metadata_decorator.h b/google/cloud/pubsublite/internal/admin_metadata_decorator.h index c965d959351b6..5f5f72a8d93e5 100644 --- a/google/cloud/pubsublite/internal/admin_metadata_decorator.h +++ b/google/cloud/pubsublite/internal/admin_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/pubsublite/internal/admin_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -192,4 +195,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_ADMIN_METADATA_DECORATOR_H diff --git a/google/cloud/pubsublite/internal/admin_option_defaults.cc b/google/cloud/pubsublite/internal/admin_option_defaults.cc index 51331b505754b..4839f67db3f36 100644 --- a/google/cloud/pubsublite/internal/admin_option_defaults.cc +++ b/google/cloud/pubsublite/internal/admin_option_defaults.cc @@ -40,7 +40,7 @@ Options AdminServiceDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - pubsublite::AdminServiceLimitedTimeRetryPolicy(std::chrono::minutes(30)) + pubsublite::AdminServiceLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/pubsublite/internal/admin_stub.cc b/google/cloud/pubsublite/internal/admin_stub.cc index f7b4708f0e75a..796f9d05ac698 100644 --- a/google/cloud/pubsublite/internal/admin_stub.cc +++ b/google/cloud/pubsublite/internal/admin_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/pubsublite/v1/admin.proto #include "google/cloud/pubsublite/internal/admin_stub.h" +#include "google/cloud/pubsublite/v1/admin.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -386,3 +389,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/admin_stub.h b/google/cloud/pubsublite/internal/admin_stub.h index ffeeb74b5ace6..ebaabab8c099b 100644 --- a/google/cloud/pubsublite/internal/admin_stub.h +++ b/google/cloud/pubsublite/internal/admin_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_ADMIN_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_ADMIN_STUB_H +#include "google/cloud/pubsublite/v1/admin.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -342,4 +345,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_ADMIN_STUB_H diff --git a/google/cloud/pubsublite/internal/admin_stub_factory.cc b/google/cloud/pubsublite/internal/admin_stub_factory.cc index 00a3ff41c4620..c4d9fb26185e7 100644 --- a/google/cloud/pubsublite/internal/admin_stub_factory.cc +++ b/google/cloud/pubsublite/internal/admin_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/pubsublite/internal/admin_metadata_decorator.h" #include "google/cloud/pubsublite/internal/admin_stub.h" #include "google/cloud/pubsublite/internal/admin_tracing_stub.h" +#include "google/cloud/pubsublite/v1/admin.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/admin_stub_factory.h b/google/cloud/pubsublite/internal/admin_stub_factory.h index be32558c7f6fe..47b5a42b06255 100644 --- a/google/cloud/pubsublite/internal/admin_stub_factory.h +++ b/google/cloud/pubsublite/internal/admin_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_ADMIN_STUB_FACTORY_H diff --git a/google/cloud/pubsublite/internal/admin_tracing_connection.cc b/google/cloud/pubsublite/internal/admin_tracing_connection.cc index 4f134e1539bb7..64dae6780c3e0 100644 --- a/google/cloud/pubsublite/internal/admin_tracing_connection.cc +++ b/google/cloud/pubsublite/internal/admin_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace pubsublite_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AdminServiceTracingConnection::AdminServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -278,16 +276,12 @@ AdminServiceTracingConnection::AsyncGetTopicPartitions( child_->AsyncGetTopicPartitions(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAdminServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/pubsublite/internal/admin_tracing_connection.h b/google/cloud/pubsublite/internal/admin_tracing_connection.h index a459352486601..e12790bacd5bb 100644 --- a/google/cloud/pubsublite/internal/admin_tracing_connection.h +++ b/google/cloud/pubsublite/internal/admin_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace pubsublite_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AdminServiceTracingConnection : public pubsublite::AdminServiceConnection { public: @@ -140,8 +138,6 @@ class AdminServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/pubsublite/internal/admin_tracing_stub.cc b/google/cloud/pubsublite/internal/admin_tracing_stub.cc index 2c551ef2ac81a..a59c7cefe9393 100644 --- a/google/cloud/pubsublite/internal/admin_tracing_stub.cc +++ b/google/cloud/pubsublite/internal/admin_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AdminServiceTracingStub::AdminServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -363,18 +364,14 @@ future AdminServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAdminServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/admin_tracing_stub.h b/google/cloud/pubsublite/internal/admin_tracing_stub.h index 8aff23408ae07..5a605a152fc0e 100644 --- a/google/cloud/pubsublite/internal/admin_tracing_stub.h +++ b/google/cloud/pubsublite/internal/admin_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AdminServiceTracingStub : public AdminServiceStub { public: ~AdminServiceTracingStub() override = default; @@ -182,8 +183,6 @@ class AdminServiceTracingStub : public AdminServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -198,4 +197,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_ADMIN_TRACING_STUB_H diff --git a/google/cloud/pubsublite/internal/cloud_zone.h b/google/cloud/pubsublite/internal/cloud_zone.h index 1c068d263d5fd..f22f38dcebe8d 100644 --- a/google/cloud/pubsublite/internal/cloud_zone.h +++ b/google/cloud/pubsublite/internal/cloud_zone.h @@ -16,9 +16,9 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_CLOUD_ZONE_H #include "google/cloud/pubsublite/internal/cloud_region.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_split.h" #include diff --git a/google/cloud/pubsublite/internal/cursor_auth_decorator.cc b/google/cloud/pubsublite/internal/cursor_auth_decorator.cc index 07730996513a1..d6f60bf41ab2f 100644 --- a/google/cloud/pubsublite/internal/cursor_auth_decorator.cc +++ b/google/cloud/pubsublite/internal/cursor_auth_decorator.cc @@ -17,11 +17,14 @@ // source: google/cloud/pubsublite/v1/cursor.proto #include "google/cloud/pubsublite/internal/cursor_auth_decorator.h" +#include "google/cloud/pubsublite/v1/cursor.grpc.pb.h" #include "google/cloud/internal/async_read_write_stream_auth.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -106,3 +109,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/cursor_auth_decorator.h b/google/cloud/pubsublite/internal/cursor_auth_decorator.h index 5cff54556b4a3..2380308371db5 100644 --- a/google/cloud/pubsublite/internal/cursor_auth_decorator.h +++ b/google/cloud/pubsublite/internal/cursor_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -83,4 +86,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_CURSOR_AUTH_DECORATOR_H diff --git a/google/cloud/pubsublite/internal/cursor_logging_decorator.cc b/google/cloud/pubsublite/internal/cursor_logging_decorator.cc index 4ffd50926baea..574c5592d7ad3 100644 --- a/google/cloud/pubsublite/internal/cursor_logging_decorator.cc +++ b/google/cloud/pubsublite/internal/cursor_logging_decorator.cc @@ -17,15 +17,18 @@ // source: google/cloud/pubsublite/v1/cursor.proto #include "google/cloud/pubsublite/internal/cursor_logging_decorator.h" +#include "google/cloud/pubsublite/v1/cursor.grpc.pb.h" #include "google/cloud/internal/async_read_write_stream_logging.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -136,3 +139,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/cursor_logging_decorator.h b/google/cloud/pubsublite/internal/cursor_logging_decorator.h index 4ebedde431595..2ac2aab45034f 100644 --- a/google/cloud/pubsublite/internal/cursor_logging_decorator.h +++ b/google/cloud/pubsublite/internal/cursor_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -84,4 +87,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_CURSOR_LOGGING_DECORATOR_H diff --git a/google/cloud/pubsublite/internal/cursor_metadata_decorator.cc b/google/cloud/pubsublite/internal/cursor_metadata_decorator.cc index ff59399a219c5..b3fe60c77343f 100644 --- a/google/cloud/pubsublite/internal/cursor_metadata_decorator.cc +++ b/google/cloud/pubsublite/internal/cursor_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/pubsublite/v1/cursor.proto #include "google/cloud/pubsublite/internal/cursor_metadata_decorator.h" +#include "google/cloud/pubsublite/v1/cursor.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -125,3 +129,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/cursor_metadata_decorator.h b/google/cloud/pubsublite/internal/cursor_metadata_decorator.h index 9247425a64c96..26d5965d8e4c4 100644 --- a/google/cloud/pubsublite/internal/cursor_metadata_decorator.h +++ b/google/cloud/pubsublite/internal/cursor_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -88,4 +91,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_CURSOR_METADATA_DECORATOR_H diff --git a/google/cloud/pubsublite/internal/cursor_stub.cc b/google/cloud/pubsublite/internal/cursor_stub.cc index 61e5792f44a7e..cf8e1e165a042 100644 --- a/google/cloud/pubsublite/internal/cursor_stub.cc +++ b/google/cloud/pubsublite/internal/cursor_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/pubsublite/v1/cursor.proto #include "google/cloud/pubsublite/internal/cursor_stub.h" +#include "google/cloud/pubsublite/v1/cursor.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/internal/async_read_write_stream_impl.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -120,3 +123,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/cursor_stub.h b/google/cloud/pubsublite/internal/cursor_stub.h index e917aeb838370..2919d6c093e20 100644 --- a/google/cloud/pubsublite/internal/cursor_stub.h +++ b/google/cloud/pubsublite/internal/cursor_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_CURSOR_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_CURSOR_STUB_H +#include "google/cloud/pubsublite/v1/cursor.grpc.pb.h" #include "google/cloud/async_streaming_read_write_rpc.h" #include "google/cloud/completion_queue.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -132,4 +135,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_CURSOR_STUB_H diff --git a/google/cloud/pubsublite/internal/cursor_stub_factory.cc b/google/cloud/pubsublite/internal/cursor_stub_factory.cc index e0203c6e2fb7e..30ffa6d71ed3e 100644 --- a/google/cloud/pubsublite/internal/cursor_stub_factory.cc +++ b/google/cloud/pubsublite/internal/cursor_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/pubsublite/internal/cursor_metadata_decorator.h" #include "google/cloud/pubsublite/internal/cursor_stub.h" #include "google/cloud/pubsublite/internal/cursor_tracing_stub.h" +#include "google/cloud/pubsublite/v1/cursor.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/cursor_stub_factory.h b/google/cloud/pubsublite/internal/cursor_stub_factory.h index e2e262256130c..7831e0519560a 100644 --- a/google/cloud/pubsublite/internal/cursor_stub_factory.h +++ b/google/cloud/pubsublite/internal/cursor_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_CURSOR_STUB_FACTORY_H diff --git a/google/cloud/pubsublite/internal/cursor_tracing_stub.cc b/google/cloud/pubsublite/internal/cursor_tracing_stub.cc index 76d86726bdaee..bf1e2c3568479 100644 --- a/google/cloud/pubsublite/internal/cursor_tracing_stub.cc +++ b/google/cloud/pubsublite/internal/cursor_tracing_stub.cc @@ -22,13 +22,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CursorServiceTracingStub::CursorServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -120,18 +121,14 @@ Status CursorServiceTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCursorServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/cursor_tracing_stub.h b/google/cloud/pubsublite/internal/cursor_tracing_stub.h index bb3862e6e28bf..fda258f1d67bc 100644 --- a/google/cloud/pubsublite/internal/cursor_tracing_stub.h +++ b/google/cloud/pubsublite/internal/cursor_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CursorServiceTracingStub : public CursorServiceStub { public: ~CursorServiceTracingStub() override = default; @@ -79,8 +80,6 @@ class CursorServiceTracingStub : public CursorServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -95,4 +94,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_CURSOR_TRACING_STUB_H diff --git a/google/cloud/pubsublite/internal/default_publish_message_transformer.h b/google/cloud/pubsublite/internal/default_publish_message_transformer.h index 9c2dc86a02868..22cf7424ff4f4 100644 --- a/google/cloud/pubsublite/internal/default_publish_message_transformer.h +++ b/google/cloud/pubsublite/internal/default_publish_message_transformer.h @@ -16,9 +16,9 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_DEFAULT_PUBLISH_MESSAGE_TRANSFORMER_H #include "google/cloud/pubsub/message.h" +#include "google/cloud/pubsublite/v1/common.pb.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include namespace google { namespace cloud { diff --git a/google/cloud/pubsublite/internal/default_publish_message_transformer_test.cc b/google/cloud/pubsublite/internal/default_publish_message_transformer_test.cc index 3416f9b67ef67..3587f52c0f840 100644 --- a/google/cloud/pubsublite/internal/default_publish_message_transformer_test.cc +++ b/google/cloud/pubsublite/internal/default_publish_message_transformer_test.cc @@ -16,7 +16,7 @@ #include "google/cloud/internal/base64_transforms.h" #include "google/cloud/testing_util/is_proto_equal.h" #include "google/cloud/testing_util/status_matchers.h" -#include +#include "google/protobuf/timestamp.pb.h" #include namespace google { diff --git a/google/cloud/pubsublite/internal/location.h b/google/cloud/pubsublite/internal/location.h index ce2f331cf6779..0e47c86857982 100644 --- a/google/cloud/pubsublite/internal/location.h +++ b/google/cloud/pubsublite/internal/location.h @@ -17,9 +17,9 @@ #include "google/cloud/pubsublite/internal/cloud_region.h" #include "google/cloud/pubsublite/internal/cloud_zone.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" +#include "absl/strings/str_cat.h" #include "absl/types/variant.h" #include diff --git a/google/cloud/pubsublite/internal/multipartition_publisher.h b/google/cloud/pubsublite/internal/multipartition_publisher.h index ae9992a303ba7..ee19840dbc317 100644 --- a/google/cloud/pubsublite/internal/multipartition_publisher.h +++ b/google/cloud/pubsublite/internal/multipartition_publisher.h @@ -22,8 +22,8 @@ #include "google/cloud/pubsublite/internal/service_composite.h" #include "google/cloud/pubsublite/message_metadata.h" #include "google/cloud/pubsublite/topic.h" -#include -#include +#include "google/cloud/pubsublite/v1/admin.pb.h" +#include "google/cloud/pubsublite/v1/publisher.pb.h" #include #include #include diff --git a/google/cloud/pubsublite/internal/partition_assignment_auth_decorator.cc b/google/cloud/pubsublite/internal/partition_assignment_auth_decorator.cc index c4e4998701735..abc2490d049f7 100644 --- a/google/cloud/pubsublite/internal/partition_assignment_auth_decorator.cc +++ b/google/cloud/pubsublite/internal/partition_assignment_auth_decorator.cc @@ -17,11 +17,14 @@ // source: google/cloud/pubsublite/v1/subscriber.proto #include "google/cloud/pubsublite/internal/partition_assignment_auth_decorator.h" +#include "google/cloud/pubsublite/v1/subscriber.grpc.pb.h" #include "google/cloud/internal/async_read_write_stream_auth.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -89,3 +92,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/partition_assignment_auth_decorator.h b/google/cloud/pubsublite/internal/partition_assignment_auth_decorator.h index abdd1f1e02301..d767b17e651f3 100644 --- a/google/cloud/pubsublite/internal/partition_assignment_auth_decorator.h +++ b/google/cloud/pubsublite/internal/partition_assignment_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -72,4 +75,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_PARTITION_ASSIGNMENT_AUTH_DECORATOR_H diff --git a/google/cloud/pubsublite/internal/partition_assignment_logging_decorator.cc b/google/cloud/pubsublite/internal/partition_assignment_logging_decorator.cc index c5e9c077969cd..f24c03a8de8fb 100644 --- a/google/cloud/pubsublite/internal/partition_assignment_logging_decorator.cc +++ b/google/cloud/pubsublite/internal/partition_assignment_logging_decorator.cc @@ -17,15 +17,18 @@ // source: google/cloud/pubsublite/v1/subscriber.proto #include "google/cloud/pubsublite/internal/partition_assignment_logging_decorator.h" +#include "google/cloud/pubsublite/v1/subscriber.grpc.pb.h" #include "google/cloud/internal/async_read_write_stream_logging.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -111,3 +114,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/partition_assignment_logging_decorator.h b/google/cloud/pubsublite/internal/partition_assignment_logging_decorator.h index e05793b6f5998..5fa2eb670ce32 100644 --- a/google/cloud/pubsublite/internal/partition_assignment_logging_decorator.h +++ b/google/cloud/pubsublite/internal/partition_assignment_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -74,4 +77,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_PARTITION_ASSIGNMENT_LOGGING_DECORATOR_H diff --git a/google/cloud/pubsublite/internal/partition_assignment_metadata_decorator.cc b/google/cloud/pubsublite/internal/partition_assignment_metadata_decorator.cc index c294407a4e0c4..0a8c3160e1af4 100644 --- a/google/cloud/pubsublite/internal/partition_assignment_metadata_decorator.cc +++ b/google/cloud/pubsublite/internal/partition_assignment_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/pubsublite/v1/subscriber.proto #include "google/cloud/pubsublite/internal/partition_assignment_metadata_decorator.h" +#include "google/cloud/pubsublite/v1/subscriber.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -107,3 +111,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/partition_assignment_metadata_decorator.h b/google/cloud/pubsublite/internal/partition_assignment_metadata_decorator.h index d0e109fcac5b4..0719a0737225c 100644 --- a/google/cloud/pubsublite/internal/partition_assignment_metadata_decorator.h +++ b/google/cloud/pubsublite/internal/partition_assignment_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -79,4 +82,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_PARTITION_ASSIGNMENT_METADATA_DECORATOR_H diff --git a/google/cloud/pubsublite/internal/partition_assignment_stub.cc b/google/cloud/pubsublite/internal/partition_assignment_stub.cc index f35092434bb0b..8b3e218f3ce54 100644 --- a/google/cloud/pubsublite/internal/partition_assignment_stub.cc +++ b/google/cloud/pubsublite/internal/partition_assignment_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/pubsublite/v1/subscriber.proto #include "google/cloud/pubsublite/internal/partition_assignment_stub.h" +#include "google/cloud/pubsublite/v1/subscriber.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/internal/async_read_write_stream_impl.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -97,3 +100,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/partition_assignment_stub.h b/google/cloud/pubsublite/internal/partition_assignment_stub.h index a5e9327a32d3a..23c307874dccf 100644 --- a/google/cloud/pubsublite/internal/partition_assignment_stub.h +++ b/google/cloud/pubsublite/internal/partition_assignment_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_PARTITION_ASSIGNMENT_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_PARTITION_ASSIGNMENT_STUB_H +#include "google/cloud/pubsublite/v1/subscriber.grpc.pb.h" #include "google/cloud/async_streaming_read_write_rpc.h" #include "google/cloud/completion_queue.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -111,4 +114,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_PARTITION_ASSIGNMENT_STUB_H diff --git a/google/cloud/pubsublite/internal/partition_assignment_stub_factory.cc b/google/cloud/pubsublite/internal/partition_assignment_stub_factory.cc index aa0daac40d0de..55dd2c2f917e3 100644 --- a/google/cloud/pubsublite/internal/partition_assignment_stub_factory.cc +++ b/google/cloud/pubsublite/internal/partition_assignment_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/pubsublite/internal/partition_assignment_metadata_decorator.h" #include "google/cloud/pubsublite/internal/partition_assignment_stub.h" #include "google/cloud/pubsublite/internal/partition_assignment_tracing_stub.h" +#include "google/cloud/pubsublite/v1/subscriber.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/partition_assignment_stub_factory.h b/google/cloud/pubsublite/internal/partition_assignment_stub_factory.h index e62e438436b40..a9406a54868af 100644 --- a/google/cloud/pubsublite/internal/partition_assignment_stub_factory.h +++ b/google/cloud/pubsublite/internal/partition_assignment_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_PARTITION_ASSIGNMENT_STUB_FACTORY_H diff --git a/google/cloud/pubsublite/internal/partition_assignment_tracing_stub.cc b/google/cloud/pubsublite/internal/partition_assignment_tracing_stub.cc index 6990d7b07d0c6..47e8e581d0768 100644 --- a/google/cloud/pubsublite/internal/partition_assignment_tracing_stub.cc +++ b/google/cloud/pubsublite/internal/partition_assignment_tracing_stub.cc @@ -22,13 +22,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PartitionAssignmentServiceTracingStub::PartitionAssignmentServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -100,20 +101,16 @@ Status PartitionAssignmentServiceTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePartitionAssignmentServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared( std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/partition_assignment_tracing_stub.h b/google/cloud/pubsublite/internal/partition_assignment_tracing_stub.h index b2a2984c1d6fd..552c1ad86200a 100644 --- a/google/cloud/pubsublite/internal/partition_assignment_tracing_stub.h +++ b/google/cloud/pubsublite/internal/partition_assignment_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PartitionAssignmentServiceTracingStub : public PartitionAssignmentServiceStub { public: @@ -70,8 +71,6 @@ class PartitionAssignmentServiceTracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -87,4 +86,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_PARTITION_ASSIGNMENT_TRACING_STUB_H diff --git a/google/cloud/pubsublite/internal/partition_publisher.cc b/google/cloud/pubsublite/internal/partition_publisher.cc index 663a99a19812d..c16fda3bc7d37 100644 --- a/google/cloud/pubsublite/internal/partition_publisher.cc +++ b/google/cloud/pubsublite/internal/partition_publisher.cc @@ -13,8 +13,8 @@ // limitations under the License. #include "google/cloud/pubsublite/internal/partition_publisher.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/make_status.h" +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/pubsublite/internal/partition_publisher.h b/google/cloud/pubsublite/internal/partition_publisher.h index 961caf0eb53d9..cbdc0c1988578 100644 --- a/google/cloud/pubsublite/internal/partition_publisher.h +++ b/google/cloud/pubsublite/internal/partition_publisher.h @@ -20,8 +20,8 @@ #include "google/cloud/pubsublite/internal/publisher.h" #include "google/cloud/pubsublite/internal/resumable_async_streaming_read_write_rpc.h" #include "google/cloud/pubsublite/internal/service_composite.h" +#include "google/cloud/pubsublite/v1/publisher.pb.h" #include "absl/functional/function_ref.h" -#include #include #include diff --git a/google/cloud/pubsublite/internal/partition_publisher_test.cc b/google/cloud/pubsublite/internal/partition_publisher_test.cc index 691c37dbe17e8..faec1fc9444d1 100644 --- a/google/cloud/pubsublite/internal/partition_publisher_test.cc +++ b/google/cloud/pubsublite/internal/partition_publisher_test.cc @@ -17,11 +17,11 @@ #include "google/cloud/pubsublite/testing/mock_alarm_registry.h" #include "google/cloud/pubsublite/testing/mock_resumable_async_reader_writer_stream.h" #include "google/cloud/future.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/status_or.h" #include "google/cloud/testing_util/is_proto_equal.h" #include "google/cloud/testing_util/status_matchers.h" #include "absl/memory/memory.h" +#include "absl/strings/str_cat.h" #include #include #include diff --git a/google/cloud/pubsublite/internal/publisher.h b/google/cloud/pubsublite/internal/publisher.h index d6989258d6672..d8e5055bf4b9e 100644 --- a/google/cloud/pubsublite/internal/publisher.h +++ b/google/cloud/pubsublite/internal/publisher.h @@ -16,9 +16,9 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_PUBLISHER_H #include "google/cloud/pubsublite/internal/service.h" +#include "google/cloud/pubsublite/v1/common.pb.h" #include "google/cloud/future.h" #include "google/cloud/status_or.h" -#include namespace google { namespace cloud { diff --git a/google/cloud/pubsublite/internal/publisher_auth_decorator.cc b/google/cloud/pubsublite/internal/publisher_auth_decorator.cc index 676c6d6586fa1..0da6cc6ed7979 100644 --- a/google/cloud/pubsublite/internal/publisher_auth_decorator.cc +++ b/google/cloud/pubsublite/internal/publisher_auth_decorator.cc @@ -17,11 +17,14 @@ // source: google/cloud/pubsublite/v1/publisher.proto #include "google/cloud/pubsublite/internal/publisher_auth_decorator.h" +#include "google/cloud/pubsublite/v1/publisher.grpc.pb.h" #include "google/cloud/internal/async_read_write_stream_auth.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -88,3 +91,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/publisher_auth_decorator.h b/google/cloud/pubsublite/internal/publisher_auth_decorator.h index 12101d22d7d5b..1781ffc58cbb9 100644 --- a/google/cloud/pubsublite/internal/publisher_auth_decorator.h +++ b/google/cloud/pubsublite/internal/publisher_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -71,4 +74,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_PUBLISHER_AUTH_DECORATOR_H diff --git a/google/cloud/pubsublite/internal/publisher_logging_decorator.cc b/google/cloud/pubsublite/internal/publisher_logging_decorator.cc index c87bb9e441abb..861bf6f483a37 100644 --- a/google/cloud/pubsublite/internal/publisher_logging_decorator.cc +++ b/google/cloud/pubsublite/internal/publisher_logging_decorator.cc @@ -17,15 +17,18 @@ // source: google/cloud/pubsublite/v1/publisher.proto #include "google/cloud/pubsublite/internal/publisher_logging_decorator.h" +#include "google/cloud/pubsublite/v1/publisher.grpc.pb.h" #include "google/cloud/internal/async_read_write_stream_logging.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -110,3 +113,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/publisher_logging_decorator.h b/google/cloud/pubsublite/internal/publisher_logging_decorator.h index 4b7f074871f28..6d417bf68c087 100644 --- a/google/cloud/pubsublite/internal/publisher_logging_decorator.h +++ b/google/cloud/pubsublite/internal/publisher_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -72,4 +75,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_PUBLISHER_LOGGING_DECORATOR_H diff --git a/google/cloud/pubsublite/internal/publisher_metadata_decorator.cc b/google/cloud/pubsublite/internal/publisher_metadata_decorator.cc index 90ff8c424f1d8..e00e5e8f7fdd9 100644 --- a/google/cloud/pubsublite/internal/publisher_metadata_decorator.cc +++ b/google/cloud/pubsublite/internal/publisher_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/pubsublite/v1/publisher.proto #include "google/cloud/pubsublite/internal/publisher_metadata_decorator.h" +#include "google/cloud/pubsublite/v1/publisher.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -105,3 +109,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/publisher_metadata_decorator.h b/google/cloud/pubsublite/internal/publisher_metadata_decorator.h index 9880f423289ce..2ca1f977c561b 100644 --- a/google/cloud/pubsublite/internal/publisher_metadata_decorator.h +++ b/google/cloud/pubsublite/internal/publisher_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -77,4 +80,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_PUBLISHER_METADATA_DECORATOR_H diff --git a/google/cloud/pubsublite/internal/publisher_stub.cc b/google/cloud/pubsublite/internal/publisher_stub.cc index 3c4b92a94286c..844c0ec2b8131 100644 --- a/google/cloud/pubsublite/internal/publisher_stub.cc +++ b/google/cloud/pubsublite/internal/publisher_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/pubsublite/v1/publisher.proto #include "google/cloud/pubsublite/internal/publisher_stub.h" +#include "google/cloud/pubsublite/v1/publisher.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/internal/async_read_write_stream_impl.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -97,3 +100,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/publisher_stub.h b/google/cloud/pubsublite/internal/publisher_stub.h index a97b85cf74ef6..0a9594c9b591c 100644 --- a/google/cloud/pubsublite/internal/publisher_stub.h +++ b/google/cloud/pubsublite/internal/publisher_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_PUBLISHER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_PUBLISHER_STUB_H +#include "google/cloud/pubsublite/v1/publisher.grpc.pb.h" #include "google/cloud/async_streaming_read_write_rpc.h" #include "google/cloud/completion_queue.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -109,4 +112,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_PUBLISHER_STUB_H diff --git a/google/cloud/pubsublite/internal/publisher_stub_factory.cc b/google/cloud/pubsublite/internal/publisher_stub_factory.cc index 8b3b80bcac587..2238cbab5a953 100644 --- a/google/cloud/pubsublite/internal/publisher_stub_factory.cc +++ b/google/cloud/pubsublite/internal/publisher_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/pubsublite/internal/publisher_metadata_decorator.h" #include "google/cloud/pubsublite/internal/publisher_stub.h" #include "google/cloud/pubsublite/internal/publisher_tracing_stub.h" +#include "google/cloud/pubsublite/v1/publisher.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/publisher_stub_factory.h b/google/cloud/pubsublite/internal/publisher_stub_factory.h index c678874d81318..e66aacc042d2a 100644 --- a/google/cloud/pubsublite/internal/publisher_stub_factory.h +++ b/google/cloud/pubsublite/internal/publisher_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_PUBLISHER_STUB_FACTORY_H diff --git a/google/cloud/pubsublite/internal/publisher_tracing_stub.cc b/google/cloud/pubsublite/internal/publisher_tracing_stub.cc index 808ccb1705e24..41bcfe783c504 100644 --- a/google/cloud/pubsublite/internal/publisher_tracing_stub.cc +++ b/google/cloud/pubsublite/internal/publisher_tracing_stub.cc @@ -22,13 +22,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PublisherServiceTracingStub::PublisherServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -96,18 +97,14 @@ Status PublisherServiceTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePublisherServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/publisher_tracing_stub.h b/google/cloud/pubsublite/internal/publisher_tracing_stub.h index 3785fc968a446..23e6234f21d2e 100644 --- a/google/cloud/pubsublite/internal/publisher_tracing_stub.h +++ b/google/cloud/pubsublite/internal/publisher_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PublisherServiceTracingStub : public PublisherServiceStub { public: ~PublisherServiceTracingStub() override = default; @@ -68,8 +69,6 @@ class PublisherServiceTracingStub : public PublisherServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -84,4 +83,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_PUBLISHER_TRACING_STUB_H diff --git a/google/cloud/pubsublite/internal/stream_factory.h b/google/cloud/pubsublite/internal/stream_factory.h index 8d0e7802dd867..56a2be40472c9 100644 --- a/google/cloud/pubsublite/internal/stream_factory.h +++ b/google/cloud/pubsublite/internal/stream_factory.h @@ -19,11 +19,11 @@ #include "google/cloud/pubsublite/internal/partition_assignment_stub.h" #include "google/cloud/pubsublite/internal/publisher_stub.h" #include "google/cloud/pubsublite/internal/subscriber_stub.h" +#include "google/cloud/pubsublite/v1/cursor.grpc.pb.h" +#include "google/cloud/pubsublite/v1/publisher.grpc.pb.h" +#include "google/cloud/pubsublite/v1/subscriber.grpc.pb.h" #include "google/cloud/internal/async_read_write_stream_impl.h" #include "google/cloud/version.h" -#include -#include -#include #include namespace google { diff --git a/google/cloud/pubsublite/internal/subscriber_auth_decorator.cc b/google/cloud/pubsublite/internal/subscriber_auth_decorator.cc index 52eba69d9ce42..dae06a8cdf297 100644 --- a/google/cloud/pubsublite/internal/subscriber_auth_decorator.cc +++ b/google/cloud/pubsublite/internal/subscriber_auth_decorator.cc @@ -17,11 +17,14 @@ // source: google/cloud/pubsublite/v1/subscriber.proto #include "google/cloud/pubsublite/internal/subscriber_auth_decorator.h" +#include "google/cloud/pubsublite/v1/subscriber.grpc.pb.h" #include "google/cloud/internal/async_read_write_stream_auth.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -88,3 +91,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/subscriber_auth_decorator.h b/google/cloud/pubsublite/internal/subscriber_auth_decorator.h index 2a1d1183bce3f..78a15cf58080e 100644 --- a/google/cloud/pubsublite/internal/subscriber_auth_decorator.h +++ b/google/cloud/pubsublite/internal/subscriber_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -71,4 +74,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_SUBSCRIBER_AUTH_DECORATOR_H diff --git a/google/cloud/pubsublite/internal/subscriber_logging_decorator.cc b/google/cloud/pubsublite/internal/subscriber_logging_decorator.cc index 136675dfd4695..e6e190a36025f 100644 --- a/google/cloud/pubsublite/internal/subscriber_logging_decorator.cc +++ b/google/cloud/pubsublite/internal/subscriber_logging_decorator.cc @@ -17,15 +17,18 @@ // source: google/cloud/pubsublite/v1/subscriber.proto #include "google/cloud/pubsublite/internal/subscriber_logging_decorator.h" +#include "google/cloud/pubsublite/v1/subscriber.grpc.pb.h" #include "google/cloud/internal/async_read_write_stream_logging.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -110,3 +113,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/subscriber_logging_decorator.h b/google/cloud/pubsublite/internal/subscriber_logging_decorator.h index 2c866c3959a1e..d3b2f96ed4c0d 100644 --- a/google/cloud/pubsublite/internal/subscriber_logging_decorator.h +++ b/google/cloud/pubsublite/internal/subscriber_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -72,4 +75,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_SUBSCRIBER_LOGGING_DECORATOR_H diff --git a/google/cloud/pubsublite/internal/subscriber_metadata_decorator.cc b/google/cloud/pubsublite/internal/subscriber_metadata_decorator.cc index b7638ba07bb4b..474336aac0684 100644 --- a/google/cloud/pubsublite/internal/subscriber_metadata_decorator.cc +++ b/google/cloud/pubsublite/internal/subscriber_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/pubsublite/v1/subscriber.proto #include "google/cloud/pubsublite/internal/subscriber_metadata_decorator.h" +#include "google/cloud/pubsublite/v1/subscriber.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -106,3 +110,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/subscriber_metadata_decorator.h b/google/cloud/pubsublite/internal/subscriber_metadata_decorator.h index 8bcfd49d23468..0728f8c6f5e73 100644 --- a/google/cloud/pubsublite/internal/subscriber_metadata_decorator.h +++ b/google/cloud/pubsublite/internal/subscriber_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -77,4 +80,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_SUBSCRIBER_METADATA_DECORATOR_H diff --git a/google/cloud/pubsublite/internal/subscriber_stub.cc b/google/cloud/pubsublite/internal/subscriber_stub.cc index 685c133b0deb9..9d0584fe7ffe6 100644 --- a/google/cloud/pubsublite/internal/subscriber_stub.cc +++ b/google/cloud/pubsublite/internal/subscriber_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/pubsublite/v1/subscriber.proto #include "google/cloud/pubsublite/internal/subscriber_stub.h" +#include "google/cloud/pubsublite/v1/subscriber.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/internal/async_read_write_stream_impl.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -97,3 +100,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/subscriber_stub.h b/google/cloud/pubsublite/internal/subscriber_stub.h index eda8cb45b74e9..7b963115a1e88 100644 --- a/google/cloud/pubsublite/internal/subscriber_stub.h +++ b/google/cloud/pubsublite/internal/subscriber_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_SUBSCRIBER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_SUBSCRIBER_STUB_H +#include "google/cloud/pubsublite/v1/subscriber.grpc.pb.h" #include "google/cloud/async_streaming_read_write_rpc.h" #include "google/cloud/completion_queue.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -109,4 +112,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_SUBSCRIBER_STUB_H diff --git a/google/cloud/pubsublite/internal/subscriber_stub_factory.cc b/google/cloud/pubsublite/internal/subscriber_stub_factory.cc index bfc79126ca7f6..c0252795e7d6a 100644 --- a/google/cloud/pubsublite/internal/subscriber_stub_factory.cc +++ b/google/cloud/pubsublite/internal/subscriber_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/pubsublite/internal/subscriber_metadata_decorator.h" #include "google/cloud/pubsublite/internal/subscriber_stub.h" #include "google/cloud/pubsublite/internal/subscriber_tracing_stub.h" +#include "google/cloud/pubsublite/v1/subscriber.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/subscriber_stub_factory.h b/google/cloud/pubsublite/internal/subscriber_stub_factory.h index d03321711314b..1b809965eb81a 100644 --- a/google/cloud/pubsublite/internal/subscriber_stub_factory.h +++ b/google/cloud/pubsublite/internal/subscriber_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_SUBSCRIBER_STUB_FACTORY_H diff --git a/google/cloud/pubsublite/internal/subscriber_tracing_stub.cc b/google/cloud/pubsublite/internal/subscriber_tracing_stub.cc index 3d4822a3ea8c7..7a1de786cf43f 100644 --- a/google/cloud/pubsublite/internal/subscriber_tracing_stub.cc +++ b/google/cloud/pubsublite/internal/subscriber_tracing_stub.cc @@ -22,13 +22,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SubscriberServiceTracingStub::SubscriberServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -96,18 +97,14 @@ Status SubscriberServiceTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSubscriberServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/subscriber_tracing_stub.h b/google/cloud/pubsublite/internal/subscriber_tracing_stub.h index 3f9b7c90fb203..9ebd277574329 100644 --- a/google/cloud/pubsublite/internal/subscriber_tracing_stub.h +++ b/google/cloud/pubsublite/internal/subscriber_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SubscriberServiceTracingStub : public SubscriberServiceStub { public: ~SubscriberServiceTracingStub() override = default; @@ -68,8 +69,6 @@ class SubscriberServiceTracingStub : public SubscriberServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -84,4 +83,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_SUBSCRIBER_TRACING_STUB_H diff --git a/google/cloud/pubsublite/internal/topic_stats_auth_decorator.cc b/google/cloud/pubsublite/internal/topic_stats_auth_decorator.cc index 84176ab705675..add459ecee6f4 100644 --- a/google/cloud/pubsublite/internal/topic_stats_auth_decorator.cc +++ b/google/cloud/pubsublite/internal/topic_stats_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/pubsublite/v1/topic_stats.proto #include "google/cloud/pubsublite/internal/topic_stats_auth_decorator.h" -#include +#include "google/cloud/pubsublite/v1/topic_stats.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -95,3 +98,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/topic_stats_auth_decorator.h b/google/cloud/pubsublite/internal/topic_stats_auth_decorator.h index 8eb92fdfce90a..e5f34e2b9cf79 100644 --- a/google/cloud/pubsublite/internal/topic_stats_auth_decorator.h +++ b/google/cloud/pubsublite/internal/topic_stats_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -82,4 +85,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_TOPIC_STATS_AUTH_DECORATOR_H diff --git a/google/cloud/pubsublite/internal/topic_stats_logging_decorator.cc b/google/cloud/pubsublite/internal/topic_stats_logging_decorator.cc index 8c5ffffaa7897..4dcbaad1ed6b3 100644 --- a/google/cloud/pubsublite/internal/topic_stats_logging_decorator.cc +++ b/google/cloud/pubsublite/internal/topic_stats_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/pubsublite/v1/topic_stats.proto #include "google/cloud/pubsublite/internal/topic_stats_logging_decorator.h" +#include "google/cloud/pubsublite/v1/topic_stats.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -123,3 +126,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/topic_stats_logging_decorator.h b/google/cloud/pubsublite/internal/topic_stats_logging_decorator.h index a435c7d5620c8..2ff76ca08c3f9 100644 --- a/google/cloud/pubsublite/internal/topic_stats_logging_decorator.h +++ b/google/cloud/pubsublite/internal/topic_stats_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -82,4 +85,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_TOPIC_STATS_LOGGING_DECORATOR_H diff --git a/google/cloud/pubsublite/internal/topic_stats_metadata_decorator.cc b/google/cloud/pubsublite/internal/topic_stats_metadata_decorator.cc index d5888c35d0966..761ee363097e9 100644 --- a/google/cloud/pubsublite/internal/topic_stats_metadata_decorator.cc +++ b/google/cloud/pubsublite/internal/topic_stats_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/pubsublite/v1/topic_stats.proto #include "google/cloud/pubsublite/internal/topic_stats_metadata_decorator.h" +#include "google/cloud/pubsublite/v1/topic_stats.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -122,3 +126,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/topic_stats_metadata_decorator.h b/google/cloud/pubsublite/internal/topic_stats_metadata_decorator.h index c552e0529dda3..e3375d285e3ae 100644 --- a/google/cloud/pubsublite/internal/topic_stats_metadata_decorator.h +++ b/google/cloud/pubsublite/internal/topic_stats_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -88,4 +91,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_TOPIC_STATS_METADATA_DECORATOR_H diff --git a/google/cloud/pubsublite/internal/topic_stats_option_defaults.cc b/google/cloud/pubsublite/internal/topic_stats_option_defaults.cc index 83e2dd9aac377..8324e110725c5 100644 --- a/google/cloud/pubsublite/internal/topic_stats_option_defaults.cc +++ b/google/cloud/pubsublite/internal/topic_stats_option_defaults.cc @@ -42,7 +42,7 @@ Options TopicStatsServiceDefaultOptions(Options options) { if (!options.has()) { options.set( pubsublite::TopicStatsServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/pubsublite/internal/topic_stats_stub.cc b/google/cloud/pubsublite/internal/topic_stats_stub.cc index 35926bb67f968..536054bdb372a 100644 --- a/google/cloud/pubsublite/internal/topic_stats_stub.cc +++ b/google/cloud/pubsublite/internal/topic_stats_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/pubsublite/v1/topic_stats.proto #include "google/cloud/pubsublite/internal/topic_stats_stub.h" +#include "google/cloud/pubsublite/v1/topic_stats.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -116,3 +119,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/topic_stats_stub.h b/google/cloud/pubsublite/internal/topic_stats_stub.h index 0e396f2685937..185353cf56e03 100644 --- a/google/cloud/pubsublite/internal/topic_stats_stub.h +++ b/google/cloud/pubsublite/internal/topic_stats_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_TOPIC_STATS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_TOPIC_STATS_STUB_H +#include "google/cloud/pubsublite/v1/topic_stats.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -129,4 +132,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_TOPIC_STATS_STUB_H diff --git a/google/cloud/pubsublite/internal/topic_stats_stub_factory.cc b/google/cloud/pubsublite/internal/topic_stats_stub_factory.cc index e2da9d34ed65c..1d58f5c994624 100644 --- a/google/cloud/pubsublite/internal/topic_stats_stub_factory.cc +++ b/google/cloud/pubsublite/internal/topic_stats_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/pubsublite/internal/topic_stats_metadata_decorator.h" #include "google/cloud/pubsublite/internal/topic_stats_stub.h" #include "google/cloud/pubsublite/internal/topic_stats_tracing_stub.h" +#include "google/cloud/pubsublite/v1/topic_stats.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/topic_stats_stub_factory.h b/google/cloud/pubsublite/internal/topic_stats_stub_factory.h index 36e6d40b4cbaa..428f502b70bf9 100644 --- a/google/cloud/pubsublite/internal/topic_stats_stub_factory.h +++ b/google/cloud/pubsublite/internal/topic_stats_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_TOPIC_STATS_STUB_FACTORY_H diff --git a/google/cloud/pubsublite/internal/topic_stats_tracing_connection.cc b/google/cloud/pubsublite/internal/topic_stats_tracing_connection.cc index 4bd64200e74df..66e72284cf5bd 100644 --- a/google/cloud/pubsublite/internal/topic_stats_tracing_connection.cc +++ b/google/cloud/pubsublite/internal/topic_stats_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace pubsublite_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TopicStatsServiceTracingConnection::TopicStatsServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -96,17 +94,13 @@ Status TopicStatsServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTopicStatsServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/pubsublite/internal/topic_stats_tracing_connection.h b/google/cloud/pubsublite/internal/topic_stats_tracing_connection.h index e204b8f78c2ca..18e3764d58f54 100644 --- a/google/cloud/pubsublite/internal/topic_stats_tracing_connection.h +++ b/google/cloud/pubsublite/internal/topic_stats_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace pubsublite_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TopicStatsServiceTracingConnection : public pubsublite::TopicStatsServiceConnection { public: @@ -71,8 +69,6 @@ class TopicStatsServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/pubsublite/internal/topic_stats_tracing_stub.cc b/google/cloud/pubsublite/internal/topic_stats_tracing_stub.cc index 1d626905e8dd5..f1babc8234d65 100644 --- a/google/cloud/pubsublite/internal/topic_stats_tracing_stub.cc +++ b/google/cloud/pubsublite/internal/topic_stats_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TopicStatsServiceTracingStub::TopicStatsServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -114,18 +115,14 @@ Status TopicStatsServiceTracingStub::CancelOperation( child_->CancelOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTopicStatsServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace pubsublite_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/pubsublite/internal/topic_stats_tracing_stub.h b/google/cloud/pubsublite/internal/topic_stats_tracing_stub.h index cb3ddda33bbea..ee551d1cd6164 100644 --- a/google/cloud/pubsublite/internal/topic_stats_tracing_stub.h +++ b/google/cloud/pubsublite/internal/topic_stats_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace pubsublite_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TopicStatsServiceTracingStub : public TopicStatsServiceStub { public: ~TopicStatsServiceTracingStub() override = default; @@ -79,8 +80,6 @@ class TopicStatsServiceTracingStub : public TopicStatsServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -95,4 +94,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_INTERNAL_TOPIC_STATS_TRACING_STUB_H diff --git a/google/cloud/pubsublite/message_metadata.h b/google/cloud/pubsublite/message_metadata.h index 526a7e8f1b403..0b0a99b96112e 100644 --- a/google/cloud/pubsublite/message_metadata.h +++ b/google/cloud/pubsublite/message_metadata.h @@ -15,12 +15,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_MESSAGE_METADATA_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_MESSAGE_METADATA_H -#include "google/cloud/internal/absl_str_cat_quiet.h" +#include "google/cloud/pubsublite/v1/publisher.pb.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" #include "absl/strings/numbers.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_split.h" -#include #include namespace google { diff --git a/google/cloud/pubsublite/options.h b/google/cloud/pubsublite/options.h index 174313fcabf4a..ead105c593564 100644 --- a/google/cloud/pubsublite/options.h +++ b/google/cloud/pubsublite/options.h @@ -17,9 +17,9 @@ #include "google/cloud/pubsub/message.h" #include "google/cloud/pubsublite/internal/resumable_async_streaming_read_write_rpc.h" +#include "google/cloud/pubsublite/v1/common.pb.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/pubsublite/publisher_connection.cc b/google/cloud/pubsublite/publisher_connection.cc index d4fc765793959..6fe5b990d977a 100644 --- a/google/cloud/pubsublite/publisher_connection.cc +++ b/google/cloud/pubsublite/publisher_connection.cc @@ -31,7 +31,7 @@ #include "google/cloud/internal/base64_transforms.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/internal/unified_grpc_credentials.h" -#include +#include "google/protobuf/struct.pb.h" #include namespace google { diff --git a/google/cloud/pubsublite/quickstart/.bazelrc b/google/cloud/pubsublite/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/pubsublite/quickstart/.bazelrc +++ b/google/cloud/pubsublite/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/pubsublite/quickstart/CMakeLists.txt b/google/cloud/pubsublite/quickstart/CMakeLists.txt index 07f706541a18d..81eebb6df8089 100644 --- a/google/cloud/pubsublite/quickstart/CMakeLists.txt +++ b/google/cloud/pubsublite/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Pub/Sub Lite API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-pubsublite-quickstart CXX) find_package(google_cloud_cpp_pubsublite REQUIRED) diff --git a/google/cloud/pubsublite/topic.h b/google/cloud/pubsublite/topic.h index 987be85888520..c62a637620f68 100644 --- a/google/cloud/pubsublite/topic.h +++ b/google/cloud/pubsublite/topic.h @@ -15,9 +15,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_TOPIC_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_TOPIC_H -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/location.h" #include "google/cloud/version.h" +#include "absl/strings/str_cat.h" #include namespace google { diff --git a/google/cloud/pubsublite/topic_stats_connection.h b/google/cloud/pubsublite/topic_stats_connection.h index f2fe7dcdae23f..91992be2ca4fa 100644 --- a/google/cloud/pubsublite/topic_stats_connection.h +++ b/google/cloud/pubsublite/topic_stats_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/pubsublite/internal/topic_stats_retry_traits.h" #include "google/cloud/pubsublite/topic_stats_connection_idempotency_policy.h" +#include "google/cloud/pubsublite/v1/topic_stats.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/pubsublite/topic_stats_connection_idempotency_policy.h b/google/cloud/pubsublite/topic_stats_connection_idempotency_policy.h index cf2a6c85c662d..7e7a0e07686d4 100644 --- a/google/cloud/pubsublite/topic_stats_connection_idempotency_policy.h +++ b/google/cloud/pubsublite/topic_stats_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_TOPIC_STATS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_PUBSUBLITE_TOPIC_STATS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/pubsublite/v1/topic_stats.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/pubsublite/topic_test.cc b/google/cloud/pubsublite/topic_test.cc index 1145dbab55c71..7d129236ab266 100644 --- a/google/cloud/pubsublite/topic_test.cc +++ b/google/cloud/pubsublite/topic_test.cc @@ -13,8 +13,8 @@ // limitations under the License. #include "google/cloud/pubsublite/topic.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/testing_util/status_matchers.h" +#include "absl/strings/str_join.h" #include #include diff --git a/google/cloud/rapidmigrationassessment/BUILD.bazel b/google/cloud/rapidmigrationassessment/BUILD.bazel index 272cc97984cae..957245706d7a2 100644 --- a/google/cloud/rapidmigrationassessment/BUILD.bazel +++ b/google/cloud/rapidmigrationassessment/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/rapidmigrationassessment/v1:rapidmigrationassessment_cc_grpc", + "@googleapis//google/cloud/rapidmigrationassessment/v1:rapidmigrationassessment_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/rapidmigrationassessment/quickstart/.bazelrc b/google/cloud/rapidmigrationassessment/quickstart/.bazelrc index 6777c6b4c95de..ec27511a60add 100644 --- a/google/cloud/rapidmigrationassessment/quickstart/.bazelrc +++ b/google/cloud/rapidmigrationassessment/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/rapidmigrationassessment/quickstart/CMakeLists.txt b/google/cloud/rapidmigrationassessment/quickstart/CMakeLists.txt index 659e315b5c70c..985e2e1f836e6 100644 --- a/google/cloud/rapidmigrationassessment/quickstart/CMakeLists.txt +++ b/google/cloud/rapidmigrationassessment/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Rapid Migration Assessment API C++ client # library from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-rapidmigrationassessment-quickstart CXX) find_package(google_cloud_cpp_rapidmigrationassessment REQUIRED) diff --git a/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_auth_decorator.cc b/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_auth_decorator.cc index 4f42d6be52276..61785580b09e8 100644 --- a/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_auth_decorator.cc +++ b/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_auth_decorator.cc @@ -18,10 +18,13 @@ // google/cloud/rapidmigrationassessment/v1/rapidmigrationassessment.proto #include "google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_auth_decorator.h" -#include +#include "google/cloud/rapidmigrationassessment/v1/rapidmigrationassessment.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace rapidmigrationassessment_v1_internal { @@ -371,3 +374,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace rapidmigrationassessment_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_auth_decorator.h b/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_auth_decorator.h index 7f21f099e3aef..864d684ca6df5 100644 --- a/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_auth_decorator.h +++ b/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_auth_decorator.h @@ -23,11 +23,14 @@ #include "google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace rapidmigrationassessment_v1_internal { @@ -187,4 +190,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RAPIDMIGRATIONASSESSMENT_V1_INTERNAL_RAPID_MIGRATION_ASSESSMENT_AUTH_DECORATOR_H diff --git a/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_connection_impl.h b/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_connection_impl.h index 93b4aac53ccfa..e4ec852208cc5 100644 --- a/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_connection_impl.h +++ b/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_connection_impl.h @@ -33,7 +33,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_logging_decorator.cc b/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_logging_decorator.cc index 79dd5d13f9f6a..1e0609dd83357 100644 --- a/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_logging_decorator.cc +++ b/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_logging_decorator.cc @@ -18,14 +18,17 @@ // google/cloud/rapidmigrationassessment/v1/rapidmigrationassessment.proto #include "google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_logging_decorator.h" +#include "google/cloud/rapidmigrationassessment/v1/rapidmigrationassessment.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace rapidmigrationassessment_v1_internal { @@ -425,3 +428,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace rapidmigrationassessment_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_logging_decorator.h b/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_logging_decorator.h index 2c0fc153d3fc9..d683b97fd8044 100644 --- a/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_logging_decorator.h +++ b/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_logging_decorator.h @@ -23,11 +23,14 @@ #include "google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace rapidmigrationassessment_v1_internal { @@ -187,4 +190,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RAPIDMIGRATIONASSESSMENT_V1_INTERNAL_RAPID_MIGRATION_ASSESSMENT_LOGGING_DECORATOR_H diff --git a/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_metadata_decorator.cc b/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_metadata_decorator.cc index b80e56b1a0561..dfb545ca5ea45 100644 --- a/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_metadata_decorator.cc +++ b/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_metadata_decorator.cc @@ -18,17 +18,21 @@ // google/cloud/rapidmigrationassessment/v1/rapidmigrationassessment.proto #include "google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_metadata_decorator.h" +#include "google/cloud/rapidmigrationassessment/v1/rapidmigrationassessment.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace rapidmigrationassessment_v1_internal { @@ -330,3 +334,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace rapidmigrationassessment_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_metadata_decorator.h b/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_metadata_decorator.h index a03d74f2e46c4..1f7e5c1602ac6 100644 --- a/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_metadata_decorator.h +++ b/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_metadata_decorator.h @@ -23,11 +23,14 @@ #include "google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace rapidmigrationassessment_v1_internal { @@ -193,4 +196,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RAPIDMIGRATIONASSESSMENT_V1_INTERNAL_RAPID_MIGRATION_ASSESSMENT_METADATA_DECORATOR_H diff --git a/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_option_defaults.cc b/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_option_defaults.cc index dfad9a7fef4a6..edd5c2502b64c 100644 --- a/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_option_defaults.cc +++ b/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_option_defaults.cc @@ -47,7 +47,7 @@ Options RapidMigrationAssessmentDefaultOptions(Options options) { rapidmigrationassessment_v1::RapidMigrationAssessmentRetryPolicyOption>( rapidmigrationassessment_v1:: RapidMigrationAssessmentLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace rapidmigrationassessment_v1_internal { @@ -415,3 +418,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace rapidmigrationassessment_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_stub.h b/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_stub.h index 63908d1d969a7..7bc9dfd97e5c0 100644 --- a/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_stub.h +++ b/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_stub.h @@ -20,17 +20,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RAPIDMIGRATIONASSESSMENT_V1_INTERNAL_RAPID_MIGRATION_ASSESSMENT_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RAPIDMIGRATIONASSESSMENT_V1_INTERNAL_RAPID_MIGRATION_ASSESSMENT_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/rapidmigrationassessment/v1/rapidmigrationassessment.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace rapidmigrationassessment_v1_internal { @@ -348,4 +351,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RAPIDMIGRATIONASSESSMENT_V1_INTERNAL_RAPID_MIGRATION_ASSESSMENT_STUB_H diff --git a/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_stub_factory.cc b/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_stub_factory.cc index 414e9038db512..ecddd76acbdf0 100644 --- a/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_stub_factory.cc +++ b/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_stub_factory.cc @@ -18,23 +18,26 @@ // google/cloud/rapidmigrationassessment/v1/rapidmigrationassessment.proto #include "google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_auth_decorator.h" #include "google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_logging_decorator.h" #include "google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_metadata_decorator.h" #include "google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_stub.h" #include "google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_tracing_stub.h" +#include "google/cloud/rapidmigrationassessment/v1/rapidmigrationassessment.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace rapidmigrationassessment_v1_internal { @@ -77,3 +80,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace rapidmigrationassessment_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_stub_factory.h b/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_stub_factory.h index 553cf1405d351..15c15a310971b 100644 --- a/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_stub_factory.h +++ b/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_stub_factory.h @@ -26,6 +26,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace rapidmigrationassessment_v1_internal { @@ -41,4 +44,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RAPIDMIGRATIONASSESSMENT_V1_INTERNAL_RAPID_MIGRATION_ASSESSMENT_STUB_FACTORY_H diff --git a/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_tracing_connection.cc b/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_tracing_connection.cc index c440ff1686cfd..76445eea4871f 100644 --- a/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_tracing_connection.cc +++ b/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace rapidmigrationassessment_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RapidMigrationAssessmentTracingConnection:: RapidMigrationAssessmentTracingConnection( std::shared_ptr< @@ -375,19 +373,15 @@ Status RapidMigrationAssessmentTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRapidMigrationAssessmentTracingConnection( std::shared_ptr< rapidmigrationassessment_v1::RapidMigrationAssessmentConnection> conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_tracing_connection.h b/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_tracing_connection.h index d8814e5fc6b91..f3336c284a1c6 100644 --- a/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_tracing_connection.h +++ b/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace rapidmigrationassessment_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RapidMigrationAssessmentTracingConnection : public rapidmigrationassessment_v1::RapidMigrationAssessmentConnection { public: @@ -168,8 +166,6 @@ class RapidMigrationAssessmentTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_tracing_stub.cc b/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_tracing_stub.cc index 6ff09400c296d..552ec510a6af2 100644 --- a/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_tracing_stub.cc +++ b/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_tracing_stub.cc @@ -22,13 +22,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace rapidmigrationassessment_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RapidMigrationAssessmentTracingStub::RapidMigrationAssessmentTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -396,19 +397,15 @@ future RapidMigrationAssessmentTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRapidMigrationAssessmentTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace rapidmigrationassessment_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_tracing_stub.h b/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_tracing_stub.h index 299040b0b5459..ae513bdb45642 100644 --- a/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_tracing_stub.h +++ b/google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_tracing_stub.h @@ -26,13 +26,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace rapidmigrationassessment_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RapidMigrationAssessmentTracingStub : public RapidMigrationAssessmentStub { public: @@ -184,8 +185,6 @@ class RapidMigrationAssessmentTracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -201,4 +200,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RAPIDMIGRATIONASSESSMENT_V1_INTERNAL_RAPID_MIGRATION_ASSESSMENT_TRACING_STUB_H diff --git a/google/cloud/rapidmigrationassessment/v1/rapid_migration_assessment_client.h b/google/cloud/rapidmigrationassessment/v1/rapid_migration_assessment_client.h index c54ab940e8e4a..ebdf0a4521f23 100644 --- a/google/cloud/rapidmigrationassessment/v1/rapid_migration_assessment_client.h +++ b/google/cloud/rapidmigrationassessment/v1/rapid_migration_assessment_client.h @@ -27,7 +27,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/rapidmigrationassessment/v1/rapid_migration_assessment_connection.h b/google/cloud/rapidmigrationassessment/v1/rapid_migration_assessment_connection.h index 64b1ce9a55302..f52a188c066a9 100644 --- a/google/cloud/rapidmigrationassessment/v1/rapid_migration_assessment_connection.h +++ b/google/cloud/rapidmigrationassessment/v1/rapid_migration_assessment_connection.h @@ -22,6 +22,7 @@ #include "google/cloud/rapidmigrationassessment/v1/internal/rapid_migration_assessment_retry_traits.h" #include "google/cloud/rapidmigrationassessment/v1/rapid_migration_assessment_connection_idempotency_policy.h" +#include "google/cloud/rapidmigrationassessment/v1/rapidmigrationassessment.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -31,8 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/rapidmigrationassessment/v1/rapid_migration_assessment_connection_idempotency_policy.h b/google/cloud/rapidmigrationassessment/v1/rapid_migration_assessment_connection_idempotency_policy.h index 72ab20f636621..d26a50efae62e 100644 --- a/google/cloud/rapidmigrationassessment/v1/rapid_migration_assessment_connection_idempotency_policy.h +++ b/google/cloud/rapidmigrationassessment/v1/rapid_migration_assessment_connection_idempotency_policy.h @@ -20,11 +20,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RAPIDMIGRATIONASSESSMENT_V1_RAPID_MIGRATION_ASSESSMENT_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RAPIDMIGRATIONASSESSMENT_V1_RAPID_MIGRATION_ASSESSMENT_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/rapidmigrationassessment/v1/rapidmigrationassessment.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/recaptchaenterprise/BUILD.bazel b/google/cloud/recaptchaenterprise/BUILD.bazel index 913d928a06f8c..e9a02ffd98313 100644 --- a/google/cloud/recaptchaenterprise/BUILD.bazel +++ b/google/cloud/recaptchaenterprise/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/recaptchaenterprise/v1:recaptchaenterprise_cc_grpc", + "@googleapis//google/cloud/recaptchaenterprise/v1:recaptchaenterprise_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/recaptchaenterprise/quickstart/.bazelrc b/google/cloud/recaptchaenterprise/quickstart/.bazelrc index 6777c6b4c95de..ec27511a60add 100644 --- a/google/cloud/recaptchaenterprise/quickstart/.bazelrc +++ b/google/cloud/recaptchaenterprise/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/recaptchaenterprise/quickstart/CMakeLists.txt b/google/cloud/recaptchaenterprise/quickstart/CMakeLists.txt index 56a117d21dd96..4f3f51d2db33a 100644 --- a/google/cloud/recaptchaenterprise/quickstart/CMakeLists.txt +++ b/google/cloud/recaptchaenterprise/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the reCAPTCHA Enterprise API C++ client library # from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-recaptchaenterprise-quickstart CXX) find_package(google_cloud_cpp_recaptchaenterprise REQUIRED) diff --git a/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_auth_decorator.cc b/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_auth_decorator.cc index 63e830e3fc26f..75394389139af 100644 --- a/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_auth_decorator.cc +++ b/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto #include "google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_auth_decorator.h" -#include +#include "google/cloud/recaptchaenterprise/v1/recaptchaenterprise.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace recaptchaenterprise_v1_internal { @@ -252,3 +255,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace recaptchaenterprise_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_auth_decorator.h b/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_auth_decorator.h index 0477f6c4012af..c8a515a9fab5d 100644 --- a/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_auth_decorator.h +++ b/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace recaptchaenterprise_v1_internal { @@ -176,4 +179,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECAPTCHAENTERPRISE_V1_INTERNAL_RECAPTCHA_ENTERPRISE_AUTH_DECORATOR_H diff --git a/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_logging_decorator.cc b/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_logging_decorator.cc index 4bf9e962be7b5..e3e92c2b2b949 100644 --- a/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_logging_decorator.cc +++ b/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto #include "google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_logging_decorator.h" +#include "google/cloud/recaptchaenterprise/v1/recaptchaenterprise.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace recaptchaenterprise_v1_internal { @@ -346,3 +349,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace recaptchaenterprise_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_logging_decorator.h b/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_logging_decorator.h index 934bcb7bfb592..135524f6a7250 100644 --- a/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_logging_decorator.h +++ b/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace recaptchaenterprise_v1_internal { @@ -177,4 +180,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECAPTCHAENTERPRISE_V1_INTERNAL_RECAPTCHA_ENTERPRISE_LOGGING_DECORATOR_H diff --git a/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_metadata_decorator.cc b/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_metadata_decorator.cc index 3c7f691db11df..8e8cb22334fd7 100644 --- a/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_metadata_decorator.cc +++ b/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/recaptchaenterprise/v1/recaptchaenterprise.proto #include "google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_metadata_decorator.h" +#include "google/cloud/recaptchaenterprise/v1/recaptchaenterprise.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace recaptchaenterprise_v1_internal { @@ -281,3 +285,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace recaptchaenterprise_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_metadata_decorator.h b/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_metadata_decorator.h index 420ca2c10ad24..ae493ec624719 100644 --- a/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_metadata_decorator.h +++ b/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace recaptchaenterprise_v1_internal { @@ -183,4 +186,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECAPTCHAENTERPRISE_V1_INTERNAL_RECAPTCHA_ENTERPRISE_METADATA_DECORATOR_H diff --git a/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_option_defaults.cc b/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_option_defaults.cc index 3902370c097d2..3aa71882f7619 100644 --- a/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_option_defaults.cc +++ b/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_option_defaults.cc @@ -46,7 +46,7 @@ Options RecaptchaEnterpriseServiceDefaultOptions(Options options) { recaptchaenterprise_v1::RecaptchaEnterpriseServiceRetryPolicyOption>( recaptchaenterprise_v1:: RecaptchaEnterpriseServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace recaptchaenterprise_v1_internal { @@ -326,3 +329,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace recaptchaenterprise_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_stub.h b/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_stub.h index 1c4372c315a56..18530c4940d0d 100644 --- a/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_stub.h +++ b/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECAPTCHAENTERPRISE_V1_INTERNAL_RECAPTCHA_ENTERPRISE_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECAPTCHAENTERPRISE_V1_INTERNAL_RECAPTCHA_ENTERPRISE_STUB_H +#include "google/cloud/recaptchaenterprise/v1/recaptchaenterprise.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace recaptchaenterprise_v1_internal { @@ -317,4 +320,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECAPTCHAENTERPRISE_V1_INTERNAL_RECAPTCHA_ENTERPRISE_STUB_H diff --git a/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_stub_factory.cc b/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_stub_factory.cc index 7d63fc5a4de36..e8f3a4e3b977d 100644 --- a/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_stub_factory.cc +++ b/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_metadata_decorator.h" #include "google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_stub.h" #include "google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_tracing_stub.h" +#include "google/cloud/recaptchaenterprise/v1/recaptchaenterprise.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace recaptchaenterprise_v1_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace recaptchaenterprise_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_stub_factory.h b/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_stub_factory.h index a8a0bf2b920d3..7a7dbca4b4ad3 100644 --- a/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_stub_factory.h +++ b/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace recaptchaenterprise_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECAPTCHAENTERPRISE_V1_INTERNAL_RECAPTCHA_ENTERPRISE_STUB_FACTORY_H diff --git a/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_tracing_connection.cc b/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_tracing_connection.cc index 737ed0ce1083b..8820f8b4c0067 100644 --- a/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_tracing_connection.cc +++ b/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace recaptchaenterprise_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RecaptchaEnterpriseServiceTracingConnection:: RecaptchaEnterpriseServiceTracingConnection( std::shared_ptr< @@ -289,19 +287,15 @@ RecaptchaEnterpriseServiceTracingConnection:: std::move(span), std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRecaptchaEnterpriseServiceTracingConnection( std::shared_ptr< recaptchaenterprise_v1::RecaptchaEnterpriseServiceConnection> conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_tracing_connection.h b/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_tracing_connection.h index 5a14bea9087b9..a566a317cd4f4 100644 --- a/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_tracing_connection.h +++ b/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace recaptchaenterprise_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RecaptchaEnterpriseServiceTracingConnection : public recaptchaenterprise_v1::RecaptchaEnterpriseServiceConnection { public: @@ -150,8 +148,6 @@ class RecaptchaEnterpriseServiceTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_tracing_stub.cc b/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_tracing_stub.cc index ebb1c69b7aa56..5b06b89a3b34b 100644 --- a/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_tracing_stub.cc +++ b/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace recaptchaenterprise_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RecaptchaEnterpriseServiceTracingStub::RecaptchaEnterpriseServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -341,20 +342,16 @@ RecaptchaEnterpriseServiceTracingStub::SearchRelatedAccountGroupMemberships( child_->SearchRelatedAccountGroupMemberships(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRecaptchaEnterpriseServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared( std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace recaptchaenterprise_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_tracing_stub.h b/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_tracing_stub.h index 4e8b94fc4c68d..e87cb7bf31cc1 100644 --- a/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_tracing_stub.h +++ b/google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace recaptchaenterprise_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RecaptchaEnterpriseServiceTracingStub : public RecaptchaEnterpriseServiceStub { public: @@ -174,8 +175,6 @@ class RecaptchaEnterpriseServiceTracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -191,4 +190,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECAPTCHAENTERPRISE_V1_INTERNAL_RECAPTCHA_ENTERPRISE_TRACING_STUB_H diff --git a/google/cloud/recaptchaenterprise/v1/recaptcha_enterprise_connection.h b/google/cloud/recaptchaenterprise/v1/recaptcha_enterprise_connection.h index 2847ae208c0bc..3cd32509dbe25 100644 --- a/google/cloud/recaptchaenterprise/v1/recaptcha_enterprise_connection.h +++ b/google/cloud/recaptchaenterprise/v1/recaptcha_enterprise_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/recaptchaenterprise/v1/internal/recaptcha_enterprise_retry_traits.h" #include "google/cloud/recaptchaenterprise/v1/recaptcha_enterprise_connection_idempotency_policy.h" +#include "google/cloud/recaptchaenterprise/v1/recaptchaenterprise.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/recaptchaenterprise/v1/recaptcha_enterprise_connection_idempotency_policy.h b/google/cloud/recaptchaenterprise/v1/recaptcha_enterprise_connection_idempotency_policy.h index 4fd43427dedd7..e9dad23ea3381 100644 --- a/google/cloud/recaptchaenterprise/v1/recaptcha_enterprise_connection_idempotency_policy.h +++ b/google/cloud/recaptchaenterprise/v1/recaptcha_enterprise_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECAPTCHAENTERPRISE_V1_RECAPTCHA_ENTERPRISE_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECAPTCHAENTERPRISE_V1_RECAPTCHA_ENTERPRISE_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/recaptchaenterprise/v1/recaptchaenterprise.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/recommender/BUILD.bazel b/google/cloud/recommender/BUILD.bazel index 8abd72b3da11f..5c80f93fb9350 100644 --- a/google/cloud/recommender/BUILD.bazel +++ b/google/cloud/recommender/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/recommender/v1:recommender_cc_grpc", + "@googleapis//google/cloud/recommender/v1:recommender_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/recommender/CMakeLists.txt b/google/cloud/recommender/CMakeLists.txt index f8bec848d0913..13fe488e6c3cc 100644 --- a/google/cloud/recommender/CMakeLists.txt +++ b/google/cloud/recommender/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(recommender "Recommender API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(recommender_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/recommender/mocks/mock_recommender_connection.h b/google/cloud/recommender/mocks/mock_recommender_connection.h deleted file mode 100644 index 8d409093d516f..0000000000000 --- a/google/cloud/recommender/mocks/mock_recommender_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/recommender/v1/recommender_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECOMMENDER_MOCKS_MOCK_RECOMMENDER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECOMMENDER_MOCKS_MOCK_RECOMMENDER_CONNECTION_H - -#include "google/cloud/recommender/recommender_connection.h" -#include "google/cloud/recommender/v1/mocks/mock_recommender_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in recommender_v1_mocks instead of the aliases -/// defined in this namespace. -namespace recommender_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use recommender_v1_mocks::MockRecommenderConnection directly. -using ::google::cloud::recommender_v1_mocks::MockRecommenderConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace recommender_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECOMMENDER_MOCKS_MOCK_RECOMMENDER_CONNECTION_H diff --git a/google/cloud/recommender/quickstart/.bazelrc b/google/cloud/recommender/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/recommender/quickstart/.bazelrc +++ b/google/cloud/recommender/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/recommender/quickstart/CMakeLists.txt b/google/cloud/recommender/quickstart/CMakeLists.txt index 861e20a09f079..2e7a4053ebe29 100644 --- a/google/cloud/recommender/quickstart/CMakeLists.txt +++ b/google/cloud/recommender/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Recommender API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-recommender-quickstart CXX) find_package(google_cloud_cpp_recommender REQUIRED) diff --git a/google/cloud/recommender/recommender_client.h b/google/cloud/recommender/recommender_client.h deleted file mode 100644 index 99c254bfac3b4..0000000000000 --- a/google/cloud/recommender/recommender_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/recommender/v1/recommender_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECOMMENDER_RECOMMENDER_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECOMMENDER_RECOMMENDER_CLIENT_H - -#include "google/cloud/recommender/recommender_connection.h" -#include "google/cloud/recommender/v1/recommender_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in recommender_v1 instead of the aliases defined in -/// this namespace. -namespace recommender { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use recommender_v1::RecommenderClient directly. -using ::google::cloud::recommender_v1::RecommenderClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace recommender -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECOMMENDER_RECOMMENDER_CLIENT_H diff --git a/google/cloud/recommender/recommender_connection.h b/google/cloud/recommender/recommender_connection.h deleted file mode 100644 index dd941ccd11ecd..0000000000000 --- a/google/cloud/recommender/recommender_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/recommender/v1/recommender_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECOMMENDER_RECOMMENDER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECOMMENDER_RECOMMENDER_CONNECTION_H - -#include "google/cloud/recommender/recommender_connection_idempotency_policy.h" -#include "google/cloud/recommender/v1/recommender_connection.h" - -namespace google { -namespace cloud { -namespace recommender { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use recommender_v1::MakeRecommenderConnection directly. -using ::google::cloud::recommender_v1::MakeRecommenderConnection; - -/// @deprecated Use recommender_v1::RecommenderConnection directly. -using ::google::cloud::recommender_v1::RecommenderConnection; - -/// @deprecated Use recommender_v1::RecommenderLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::recommender_v1::RecommenderLimitedErrorCountRetryPolicy; - -/// @deprecated Use recommender_v1::RecommenderLimitedTimeRetryPolicy directly. -using ::google::cloud::recommender_v1::RecommenderLimitedTimeRetryPolicy; - -/// @deprecated Use recommender_v1::RecommenderRetryPolicy directly. -using ::google::cloud::recommender_v1::RecommenderRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace recommender -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECOMMENDER_RECOMMENDER_CONNECTION_H diff --git a/google/cloud/recommender/recommender_connection_idempotency_policy.h b/google/cloud/recommender/recommender_connection_idempotency_policy.h deleted file mode 100644 index 53a4dbaa38e0a..0000000000000 --- a/google/cloud/recommender/recommender_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/recommender/v1/recommender_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECOMMENDER_RECOMMENDER_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECOMMENDER_RECOMMENDER_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/recommender/v1/recommender_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace recommender { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// recommender_v1::MakeDefaultRecommenderConnectionIdempotencyPolicy directly. -using ::google::cloud::recommender_v1:: - MakeDefaultRecommenderConnectionIdempotencyPolicy; - -/// @deprecated Use recommender_v1::RecommenderConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::recommender_v1::RecommenderConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace recommender -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECOMMENDER_RECOMMENDER_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/recommender/recommender_options.h b/google/cloud/recommender/recommender_options.h deleted file mode 100644 index 5571cb440fb7c..0000000000000 --- a/google/cloud/recommender/recommender_options.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/recommender/v1/recommender_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECOMMENDER_RECOMMENDER_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECOMMENDER_RECOMMENDER_OPTIONS_H - -#include "google/cloud/recommender/recommender_connection.h" -#include "google/cloud/recommender/recommender_connection_idempotency_policy.h" -#include "google/cloud/recommender/v1/recommender_options.h" - -namespace google { -namespace cloud { -namespace recommender { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use recommender_v1::RecommenderBackoffPolicyOption directly. -using ::google::cloud::recommender_v1::RecommenderBackoffPolicyOption; - -/// @deprecated Use recommender_v1::RecommenderConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::recommender_v1:: - RecommenderConnectionIdempotencyPolicyOption; - -/// @deprecated Use recommender_v1::RecommenderPolicyOptionList directly. -using ::google::cloud::recommender_v1::RecommenderPolicyOptionList; - -/// @deprecated Use recommender_v1::RecommenderRetryPolicyOption directly. -using ::google::cloud::recommender_v1::RecommenderRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace recommender -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECOMMENDER_RECOMMENDER_OPTIONS_H diff --git a/google/cloud/recommender/v1/internal/recommender_auth_decorator.cc b/google/cloud/recommender/v1/internal/recommender_auth_decorator.cc index 691f5f1a6c5b0..a62a9d64836a0 100644 --- a/google/cloud/recommender/v1/internal/recommender_auth_decorator.cc +++ b/google/cloud/recommender/v1/internal/recommender_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/recommender/v1/recommender_service.proto #include "google/cloud/recommender/v1/internal/recommender_auth_decorator.h" -#include +#include "google/cloud/recommender/v1/recommender_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace recommender_v1_internal { @@ -159,3 +162,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace recommender_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/recommender/v1/internal/recommender_auth_decorator.h b/google/cloud/recommender/v1/internal/recommender_auth_decorator.h index 2a0306a68c46c..274b9dfeb2ad0 100644 --- a/google/cloud/recommender/v1/internal/recommender_auth_decorator.h +++ b/google/cloud/recommender/v1/internal/recommender_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace recommender_v1_internal { @@ -122,4 +125,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECOMMENDER_V1_INTERNAL_RECOMMENDER_AUTH_DECORATOR_H diff --git a/google/cloud/recommender/v1/internal/recommender_logging_decorator.cc b/google/cloud/recommender/v1/internal/recommender_logging_decorator.cc index d30c7cc5351d4..ea82ee814a3bb 100644 --- a/google/cloud/recommender/v1/internal/recommender_logging_decorator.cc +++ b/google/cloud/recommender/v1/internal/recommender_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/recommender/v1/recommender_service.proto #include "google/cloud/recommender/v1/internal/recommender_logging_decorator.h" +#include "google/cloud/recommender/v1/recommender_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace recommender_v1_internal { @@ -218,3 +221,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace recommender_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/recommender/v1/internal/recommender_logging_decorator.h b/google/cloud/recommender/v1/internal/recommender_logging_decorator.h index 8b5c98ae43a69..541a81698efe2 100644 --- a/google/cloud/recommender/v1/internal/recommender_logging_decorator.h +++ b/google/cloud/recommender/v1/internal/recommender_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace recommender_v1_internal { @@ -122,4 +125,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECOMMENDER_V1_INTERNAL_RECOMMENDER_LOGGING_DECORATOR_H diff --git a/google/cloud/recommender/v1/internal/recommender_metadata_decorator.cc b/google/cloud/recommender/v1/internal/recommender_metadata_decorator.cc index 48831f129438a..609732dd5c36e 100644 --- a/google/cloud/recommender/v1/internal/recommender_metadata_decorator.cc +++ b/google/cloud/recommender/v1/internal/recommender_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/recommender/v1/recommender_service.proto #include "google/cloud/recommender/v1/internal/recommender_metadata_decorator.h" +#include "google/cloud/recommender/v1/recommender_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace recommender_v1_internal { @@ -190,3 +194,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace recommender_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/recommender/v1/internal/recommender_metadata_decorator.h b/google/cloud/recommender/v1/internal/recommender_metadata_decorator.h index 1248a1ec94009..7927d26cce37a 100644 --- a/google/cloud/recommender/v1/internal/recommender_metadata_decorator.h +++ b/google/cloud/recommender/v1/internal/recommender_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace recommender_v1_internal { @@ -127,4 +130,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECOMMENDER_V1_INTERNAL_RECOMMENDER_METADATA_DECORATOR_H diff --git a/google/cloud/recommender/v1/internal/recommender_option_defaults.cc b/google/cloud/recommender/v1/internal/recommender_option_defaults.cc index eede439b91ca6..54501fcaab612 100644 --- a/google/cloud/recommender/v1/internal/recommender_option_defaults.cc +++ b/google/cloud/recommender/v1/internal/recommender_option_defaults.cc @@ -41,7 +41,7 @@ Options RecommenderDefaultOptions(Options options) { if (!options.has()) { options.set( recommender_v1::RecommenderLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/recommender/v1/internal/recommender_stub.cc b/google/cloud/recommender/v1/internal/recommender_stub.cc index 8a3ed50ce41d6..402d43079a939 100644 --- a/google/cloud/recommender/v1/internal/recommender_stub.cc +++ b/google/cloud/recommender/v1/internal/recommender_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/recommender/v1/recommender_service.proto #include "google/cloud/recommender/v1/internal/recommender_stub.h" +#include "google/cloud/recommender/v1/recommender_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace recommender_v1_internal { @@ -204,3 +207,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace recommender_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/recommender/v1/internal/recommender_stub.h b/google/cloud/recommender/v1/internal/recommender_stub.h index 38bc4cd3aec88..064cb4a806fd1 100644 --- a/google/cloud/recommender/v1/internal/recommender_stub.h +++ b/google/cloud/recommender/v1/internal/recommender_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECOMMENDER_V1_INTERNAL_RECOMMENDER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECOMMENDER_V1_INTERNAL_RECOMMENDER_STUB_H +#include "google/cloud/recommender/v1/recommender_service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace recommender_v1_internal { @@ -202,4 +205,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECOMMENDER_V1_INTERNAL_RECOMMENDER_STUB_H diff --git a/google/cloud/recommender/v1/internal/recommender_stub_factory.cc b/google/cloud/recommender/v1/internal/recommender_stub_factory.cc index 6f7dd489b59c3..cc3e3f6493963 100644 --- a/google/cloud/recommender/v1/internal/recommender_stub_factory.cc +++ b/google/cloud/recommender/v1/internal/recommender_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/recommender/v1/internal/recommender_metadata_decorator.h" #include "google/cloud/recommender/v1/internal/recommender_stub.h" #include "google/cloud/recommender/v1/internal/recommender_tracing_stub.h" +#include "google/cloud/recommender/v1/recommender_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace recommender_v1_internal { @@ -68,3 +71,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace recommender_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/recommender/v1/internal/recommender_stub_factory.h b/google/cloud/recommender/v1/internal/recommender_stub_factory.h index 44837cf793c27..e3be9466604af 100644 --- a/google/cloud/recommender/v1/internal/recommender_stub_factory.h +++ b/google/cloud/recommender/v1/internal/recommender_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace recommender_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECOMMENDER_V1_INTERNAL_RECOMMENDER_STUB_FACTORY_H diff --git a/google/cloud/recommender/v1/internal/recommender_tracing_connection.cc b/google/cloud/recommender/v1/internal/recommender_tracing_connection.cc index 1b1b67aab9e04..07d1d6448a6b1 100644 --- a/google/cloud/recommender/v1/internal/recommender_tracing_connection.cc +++ b/google/cloud/recommender/v1/internal/recommender_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace recommender_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RecommenderTracingConnection::RecommenderTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -163,16 +161,12 @@ RecommenderTracingConnection::UpdateInsightTypeConfig( return internal::EndSpan(*span, child_->UpdateInsightTypeConfig(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRecommenderTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/recommender/v1/internal/recommender_tracing_connection.h b/google/cloud/recommender/v1/internal/recommender_tracing_connection.h index e8c4842d2efca..2e8abf3900032 100644 --- a/google/cloud/recommender/v1/internal/recommender_tracing_connection.h +++ b/google/cloud/recommender/v1/internal/recommender_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace recommender_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RecommenderTracingConnection : public recommender_v1::RecommenderConnection { public: @@ -103,8 +101,6 @@ class RecommenderTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/recommender/v1/internal/recommender_tracing_stub.cc b/google/cloud/recommender/v1/internal/recommender_tracing_stub.cc index b399c0762e0f1..062518cc181ca 100644 --- a/google/cloud/recommender/v1/internal/recommender_tracing_stub.cc +++ b/google/cloud/recommender/v1/internal/recommender_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace recommender_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RecommenderTracingStub::RecommenderTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -202,18 +203,14 @@ RecommenderTracingStub::UpdateInsightTypeConfig( child_->UpdateInsightTypeConfig(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRecommenderTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace recommender_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/recommender/v1/internal/recommender_tracing_stub.h b/google/cloud/recommender/v1/internal/recommender_tracing_stub.h index 45257c0855979..bd9b801a25bac 100644 --- a/google/cloud/recommender/v1/internal/recommender_tracing_stub.h +++ b/google/cloud/recommender/v1/internal/recommender_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace recommender_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RecommenderTracingStub : public RecommenderStub { public: ~RecommenderTracingStub() override = default; @@ -118,8 +119,6 @@ class RecommenderTracingStub : public RecommenderStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -134,4 +133,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECOMMENDER_V1_INTERNAL_RECOMMENDER_TRACING_STUB_H diff --git a/google/cloud/recommender/v1/recommender_connection.h b/google/cloud/recommender/v1/recommender_connection.h index 8a3e6ebc06497..18c24b905bdb5 100644 --- a/google/cloud/recommender/v1/recommender_connection.h +++ b/google/cloud/recommender/v1/recommender_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/recommender/v1/internal/recommender_retry_traits.h" #include "google/cloud/recommender/v1/recommender_connection_idempotency_policy.h" +#include "google/cloud/recommender/v1/recommender_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/recommender/v1/recommender_connection_idempotency_policy.h b/google/cloud/recommender/v1/recommender_connection_idempotency_policy.h index c968fae20bee5..26397a7f1df2b 100644 --- a/google/cloud/recommender/v1/recommender_connection_idempotency_policy.h +++ b/google/cloud/recommender/v1/recommender_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECOMMENDER_V1_RECOMMENDER_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RECOMMENDER_V1_RECOMMENDER_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/recommender/v1/recommender_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/redis/BUILD.bazel b/google/cloud/redis/BUILD.bazel index 7072c4ab75382..a544642374509 100644 --- a/google/cloud/redis/BUILD.bazel +++ b/google/cloud/redis/BUILD.bazel @@ -19,14 +19,13 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", "cluster/v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/redis/cluster/v1:cluster_cc_grpc", - "@com_google_googleapis//google/cloud/redis/v1:redis_cc_grpc", + "@googleapis//google/cloud/redis/cluster/v1:cluster_cc_grpc", + "@googleapis//google/cloud/redis/v1:redis_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/redis/CMakeLists.txt b/google/cloud/redis/CMakeLists.txt index 3cd59d7a73a3a..e3eb251c39b97 100644 --- a/google/cloud/redis/CMakeLists.txt +++ b/google/cloud/redis/CMakeLists.txt @@ -17,8 +17,8 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library( - redis "Google Cloud Memorystore for Redis API" - SERVICE_DIRS "__EMPTY__" "v1/" "cluster/v1/") + redis "Google Cloud Memorystore for Redis API" SERVICE_DIRS "v1/" + "cluster/v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(redis_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/redis/cloud_redis_client.h b/google/cloud/redis/cloud_redis_client.h deleted file mode 100644 index b6ea589535b4c..0000000000000 --- a/google/cloud/redis/cloud_redis_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/redis/v1/cloud_redis.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_CLOUD_REDIS_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_CLOUD_REDIS_CLIENT_H - -#include "google/cloud/redis/cloud_redis_connection.h" -#include "google/cloud/redis/v1/cloud_redis_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in redis_v1 instead of the aliases defined in -/// this namespace. -namespace redis { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use redis_v1::CloudRedisClient directly. -using ::google::cloud::redis_v1::CloudRedisClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace redis -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_CLOUD_REDIS_CLIENT_H diff --git a/google/cloud/redis/cloud_redis_connection.h b/google/cloud/redis/cloud_redis_connection.h deleted file mode 100644 index df36b16d700af..0000000000000 --- a/google/cloud/redis/cloud_redis_connection.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/redis/v1/cloud_redis.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_CLOUD_REDIS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_CLOUD_REDIS_CONNECTION_H - -#include "google/cloud/redis/cloud_redis_connection_idempotency_policy.h" -#include "google/cloud/redis/v1/cloud_redis_connection.h" - -namespace google { -namespace cloud { -namespace redis { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use redis_v1::MakeCloudRedisConnection directly. -using ::google::cloud::redis_v1::MakeCloudRedisConnection; - -/// @deprecated Use redis_v1::CloudRedisConnection directly. -using ::google::cloud::redis_v1::CloudRedisConnection; - -/// @deprecated Use redis_v1::CloudRedisLimitedErrorCountRetryPolicy directly. -using ::google::cloud::redis_v1::CloudRedisLimitedErrorCountRetryPolicy; - -/// @deprecated Use redis_v1::CloudRedisLimitedTimeRetryPolicy directly. -using ::google::cloud::redis_v1::CloudRedisLimitedTimeRetryPolicy; - -/// @deprecated Use redis_v1::CloudRedisRetryPolicy directly. -using ::google::cloud::redis_v1::CloudRedisRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace redis -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_CLOUD_REDIS_CONNECTION_H diff --git a/google/cloud/redis/cloud_redis_connection_idempotency_policy.h b/google/cloud/redis/cloud_redis_connection_idempotency_policy.h deleted file mode 100644 index ccc7f92766991..0000000000000 --- a/google/cloud/redis/cloud_redis_connection_idempotency_policy.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/redis/v1/cloud_redis.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_CLOUD_REDIS_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_CLOUD_REDIS_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/redis/v1/cloud_redis_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace redis { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use redis_v1::MakeDefaultCloudRedisConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::redis_v1:: - MakeDefaultCloudRedisConnectionIdempotencyPolicy; - -/// @deprecated Use redis_v1::CloudRedisConnectionIdempotencyPolicy directly. -using ::google::cloud::redis_v1::CloudRedisConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace redis -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_CLOUD_REDIS_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/redis/cloud_redis_options.h b/google/cloud/redis/cloud_redis_options.h deleted file mode 100644 index 30cf04d4f8068..0000000000000 --- a/google/cloud/redis/cloud_redis_options.h +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/redis/v1/cloud_redis.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_CLOUD_REDIS_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_CLOUD_REDIS_OPTIONS_H - -#include "google/cloud/redis/cloud_redis_connection.h" -#include "google/cloud/redis/cloud_redis_connection_idempotency_policy.h" -#include "google/cloud/redis/v1/cloud_redis_options.h" - -namespace google { -namespace cloud { -namespace redis { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use redis_v1::CloudRedisPollingPolicyOption directly. -using ::google::cloud::redis_v1::CloudRedisPollingPolicyOption; - -/// @deprecated Use redis_v1::CloudRedisBackoffPolicyOption directly. -using ::google::cloud::redis_v1::CloudRedisBackoffPolicyOption; - -/// @deprecated Use redis_v1::CloudRedisConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::redis_v1::CloudRedisConnectionIdempotencyPolicyOption; - -/// @deprecated Use redis_v1::CloudRedisPolicyOptionList directly. -using ::google::cloud::redis_v1::CloudRedisPolicyOptionList; - -/// @deprecated Use redis_v1::CloudRedisRetryPolicyOption directly. -using ::google::cloud::redis_v1::CloudRedisRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace redis -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_CLOUD_REDIS_OPTIONS_H diff --git a/google/cloud/redis/cluster/v1/cloud_redis_cluster_client.h b/google/cloud/redis/cluster/v1/cloud_redis_cluster_client.h index 632eec528eabb..4ec7699578834 100644 --- a/google/cloud/redis/cluster/v1/cloud_redis_cluster_client.h +++ b/google/cloud/redis/cluster/v1/cloud_redis_cluster_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/redis/cluster/v1/cloud_redis_cluster_connection.h b/google/cloud/redis/cluster/v1/cloud_redis_cluster_connection.h index 11533e03a9a66..890d78c09fb57 100644 --- a/google/cloud/redis/cluster/v1/cloud_redis_cluster_connection.h +++ b/google/cloud/redis/cluster/v1/cloud_redis_cluster_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_CLUSTER_V1_CLOUD_REDIS_CLUSTER_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_CLUSTER_V1_CLOUD_REDIS_CLUSTER_CONNECTION_H +#include "google/cloud/redis/cluster/v1/cloud_redis_cluster.pb.h" #include "google/cloud/redis/cluster/v1/cloud_redis_cluster_connection_idempotency_policy.h" #include "google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/redis/cluster/v1/cloud_redis_cluster_connection_idempotency_policy.h b/google/cloud/redis/cluster/v1/cloud_redis_cluster_connection_idempotency_policy.h index 3b16a188a5015..7a9fd425c3f07 100644 --- a/google/cloud/redis/cluster/v1/cloud_redis_cluster_connection_idempotency_policy.h +++ b/google/cloud/redis/cluster/v1/cloud_redis_cluster_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_CLUSTER_V1_CLOUD_REDIS_CLUSTER_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_CLUSTER_V1_CLOUD_REDIS_CLUSTER_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/redis/cluster/v1/cloud_redis_cluster.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_auth_decorator.cc b/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_auth_decorator.cc index 3861b6bdd3b0a..aac5dba75a6c1 100644 --- a/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_auth_decorator.cc +++ b/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto #include "google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_auth_decorator.h" -#include +#include "google/cloud/redis/cluster/v1/cloud_redis_cluster.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace redis_cluster_v1_internal { @@ -386,3 +389,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace redis_cluster_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_auth_decorator.h b/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_auth_decorator.h index 5b1f74efd0b1a..1a1565cfc6ad3 100644 --- a/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_auth_decorator.h +++ b/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace redis_cluster_v1_internal { @@ -208,4 +211,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_CLUSTER_V1_INTERNAL_CLOUD_REDIS_CLUSTER_AUTH_DECORATOR_H diff --git a/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_connection_impl.h b/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_connection_impl.h index 9a438acf107b7..6f999987a375f 100644 --- a/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_connection_impl.h +++ b/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_logging_decorator.cc b/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_logging_decorator.cc index 510ea041cd51d..b6453e74c0863 100644 --- a/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_logging_decorator.cc +++ b/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto #include "google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_logging_decorator.h" +#include "google/cloud/redis/cluster/v1/cloud_redis_cluster.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace redis_cluster_v1_internal { @@ -464,3 +467,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace redis_cluster_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_logging_decorator.h b/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_logging_decorator.h index acd18fd2200fa..f365739d2ee17 100644 --- a/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_logging_decorator.h +++ b/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace redis_cluster_v1_internal { @@ -208,4 +211,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_CLUSTER_V1_INTERNAL_CLOUD_REDIS_CLUSTER_LOGGING_DECORATOR_H diff --git a/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_metadata_decorator.cc b/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_metadata_decorator.cc index 3109d519e7340..b8ea420c1fab3 100644 --- a/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_metadata_decorator.cc +++ b/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto #include "google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_metadata_decorator.h" +#include "google/cloud/redis/cluster/v1/cloud_redis_cluster.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace redis_cluster_v1_internal { @@ -353,3 +357,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace redis_cluster_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_metadata_decorator.h b/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_metadata_decorator.h index 2340d58a77a6b..59493d1e19eab 100644 --- a/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_metadata_decorator.h +++ b/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace redis_cluster_v1_internal { @@ -214,4 +217,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_CLUSTER_V1_INTERNAL_CLOUD_REDIS_CLUSTER_METADATA_DECORATOR_H diff --git a/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_option_defaults.cc b/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_option_defaults.cc index d819c0f7f03e4..e41757e1ee232 100644 --- a/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_option_defaults.cc +++ b/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_option_defaults.cc @@ -41,7 +41,7 @@ Options CloudRedisClusterDefaultOptions(Options options) { if (!options.has()) { options.set( redis_cluster_v1::CloudRedisClusterLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_stub.cc b/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_stub.cc index b3eda3b74c849..f0bbaef810cc3 100644 --- a/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_stub.cc +++ b/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto #include "google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_stub.h" +#include "google/cloud/redis/cluster/v1/cloud_redis_cluster.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace redis_cluster_v1_internal { @@ -453,3 +456,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace redis_cluster_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_stub.h b/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_stub.h index 7f9e224259c06..e116853abd725 100644 --- a/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_stub.h +++ b/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_CLUSTER_V1_INTERNAL_CLOUD_REDIS_CLUSTER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_CLUSTER_V1_INTERNAL_CLOUD_REDIS_CLUSTER_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/redis/cluster/v1/cloud_redis_cluster.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace redis_cluster_v1_internal { @@ -387,4 +390,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_CLUSTER_V1_INTERNAL_CLOUD_REDIS_CLUSTER_STUB_H diff --git a/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_stub_factory.cc b/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_stub_factory.cc index 462dd914a7ff4..eb492697b6082 100644 --- a/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_stub_factory.cc +++ b/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_stub_factory.cc @@ -17,6 +17,8 @@ // source: google/cloud/redis/cluster/v1/cloud_redis_cluster.proto #include "google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/redis/cluster/v1/cloud_redis_cluster.grpc.pb.h" #include "google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_auth_decorator.h" #include "google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_logging_decorator.h" #include "google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_metadata_decorator.h" @@ -28,12 +30,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace redis_cluster_v1_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace redis_cluster_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_stub_factory.h b/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_stub_factory.h index c095adfe6eb27..695ff8df20857 100644 --- a/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_stub_factory.h +++ b/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace redis_cluster_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_CLUSTER_V1_INTERNAL_CLOUD_REDIS_CLUSTER_STUB_FACTORY_H diff --git a/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_tracing_connection.cc b/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_tracing_connection.cc index 10fc381c6d126..212fba3d582c7 100644 --- a/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_tracing_connection.cc +++ b/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace redis_cluster_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudRedisClusterTracingConnection::CloudRedisClusterTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -368,17 +366,13 @@ Status CloudRedisClusterTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCloudRedisClusterTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_tracing_connection.h b/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_tracing_connection.h index b0b3c0936fd1f..7c2061144db32 100644 --- a/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_tracing_connection.h +++ b/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace redis_cluster_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudRedisClusterTracingConnection : public redis_cluster_v1::CloudRedisClusterConnection { public: @@ -177,8 +175,6 @@ class CloudRedisClusterTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_tracing_stub.cc b/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_tracing_stub.cc index d68ce5d4a0bf9..bcbcfd83932da 100644 --- a/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_tracing_stub.cc +++ b/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace redis_cluster_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudRedisClusterTracingStub::CloudRedisClusterTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -408,18 +409,14 @@ future CloudRedisClusterTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCloudRedisClusterTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace redis_cluster_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_tracing_stub.h b/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_tracing_stub.h index f2a9c059b17a0..fe6597df2806c 100644 --- a/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_tracing_stub.h +++ b/google/cloud/redis/cluster/v1/internal/cloud_redis_cluster_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace redis_cluster_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudRedisClusterTracingStub : public CloudRedisClusterStub { public: ~CloudRedisClusterTracingStub() override = default; @@ -204,8 +205,6 @@ class CloudRedisClusterTracingStub : public CloudRedisClusterStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -220,4 +219,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_CLUSTER_V1_INTERNAL_CLOUD_REDIS_CLUSTER_TRACING_STUB_H diff --git a/google/cloud/redis/mocks/mock_cloud_redis_connection.h b/google/cloud/redis/mocks/mock_cloud_redis_connection.h deleted file mode 100644 index 688841304e377..0000000000000 --- a/google/cloud/redis/mocks/mock_cloud_redis_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/redis/v1/cloud_redis.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_MOCKS_MOCK_CLOUD_REDIS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_MOCKS_MOCK_CLOUD_REDIS_CONNECTION_H - -#include "google/cloud/redis/cloud_redis_connection.h" -#include "google/cloud/redis/v1/mocks/mock_cloud_redis_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in redis_v1_mocks instead of the aliases -/// defined in this namespace. -namespace redis_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use redis_v1_mocks::MockCloudRedisConnection directly. -using ::google::cloud::redis_v1_mocks::MockCloudRedisConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace redis_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_MOCKS_MOCK_CLOUD_REDIS_CONNECTION_H diff --git a/google/cloud/redis/quickstart/.bazelrc b/google/cloud/redis/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/redis/quickstart/.bazelrc +++ b/google/cloud/redis/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/redis/quickstart/CMakeLists.txt b/google/cloud/redis/quickstart/CMakeLists.txt index 552a9da3138dc..c90374512b5de 100644 --- a/google/cloud/redis/quickstart/CMakeLists.txt +++ b/google/cloud/redis/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Google Cloud Memorystore for Redis API C++ # client library from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-redis-quickstart CXX) find_package(google_cloud_cpp_redis REQUIRED) diff --git a/google/cloud/redis/v1/cloud_redis_client.h b/google/cloud/redis/v1/cloud_redis_client.h index 7776fed61becf..956bcc79c7ea8 100644 --- a/google/cloud/redis/v1/cloud_redis_client.h +++ b/google/cloud/redis/v1/cloud_redis_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/redis/v1/cloud_redis_connection.h b/google/cloud/redis/v1/cloud_redis_connection.h index 676915799b9d6..00bd5da0e4353 100644 --- a/google/cloud/redis/v1/cloud_redis_connection.h +++ b/google/cloud/redis/v1/cloud_redis_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_V1_CLOUD_REDIS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_V1_CLOUD_REDIS_CONNECTION_H +#include "google/cloud/redis/v1/cloud_redis.pb.h" #include "google/cloud/redis/v1/cloud_redis_connection_idempotency_policy.h" #include "google/cloud/redis/v1/internal/cloud_redis_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/redis/v1/cloud_redis_connection_idempotency_policy.h b/google/cloud/redis/v1/cloud_redis_connection_idempotency_policy.h index 3ac71638a3160..6233f32329048 100644 --- a/google/cloud/redis/v1/cloud_redis_connection_idempotency_policy.h +++ b/google/cloud/redis/v1/cloud_redis_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_V1_CLOUD_REDIS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_V1_CLOUD_REDIS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/redis/v1/cloud_redis.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/redis/v1/internal/cloud_redis_auth_decorator.cc b/google/cloud/redis/v1/internal/cloud_redis_auth_decorator.cc index 6602bd179613d..b72a76c27964a 100644 --- a/google/cloud/redis/v1/internal/cloud_redis_auth_decorator.cc +++ b/google/cloud/redis/v1/internal/cloud_redis_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/redis/v1/cloud_redis.proto #include "google/cloud/redis/v1/internal/cloud_redis_auth_decorator.h" -#include +#include "google/cloud/redis/v1/cloud_redis.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace redis_v1_internal { @@ -371,3 +374,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace redis_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/redis/v1/internal/cloud_redis_auth_decorator.h b/google/cloud/redis/v1/internal/cloud_redis_auth_decorator.h index 5c43a28fee550..95b3303c4b1fd 100644 --- a/google/cloud/redis/v1/internal/cloud_redis_auth_decorator.h +++ b/google/cloud/redis/v1/internal/cloud_redis_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/redis/v1/internal/cloud_redis_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace redis_v1_internal { @@ -182,4 +185,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_V1_INTERNAL_CLOUD_REDIS_AUTH_DECORATOR_H diff --git a/google/cloud/redis/v1/internal/cloud_redis_connection_impl.h b/google/cloud/redis/v1/internal/cloud_redis_connection_impl.h index 9e56f167972e9..94b9fe7cedbfc 100644 --- a/google/cloud/redis/v1/internal/cloud_redis_connection_impl.h +++ b/google/cloud/redis/v1/internal/cloud_redis_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/redis/v1/internal/cloud_redis_logging_decorator.cc b/google/cloud/redis/v1/internal/cloud_redis_logging_decorator.cc index 191af4d971bf6..5515d975cba45 100644 --- a/google/cloud/redis/v1/internal/cloud_redis_logging_decorator.cc +++ b/google/cloud/redis/v1/internal/cloud_redis_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/redis/v1/cloud_redis.proto #include "google/cloud/redis/v1/internal/cloud_redis_logging_decorator.h" +#include "google/cloud/redis/v1/cloud_redis.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace redis_v1_internal { @@ -413,3 +416,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace redis_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/redis/v1/internal/cloud_redis_logging_decorator.h b/google/cloud/redis/v1/internal/cloud_redis_logging_decorator.h index a7aac7138cd17..1aa0470934787 100644 --- a/google/cloud/redis/v1/internal/cloud_redis_logging_decorator.h +++ b/google/cloud/redis/v1/internal/cloud_redis_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/redis/v1/internal/cloud_redis_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace redis_v1_internal { @@ -182,4 +185,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_V1_INTERNAL_CLOUD_REDIS_LOGGING_DECORATOR_H diff --git a/google/cloud/redis/v1/internal/cloud_redis_metadata_decorator.cc b/google/cloud/redis/v1/internal/cloud_redis_metadata_decorator.cc index 2a3ac2c4778c4..4ad1a5890c729 100644 --- a/google/cloud/redis/v1/internal/cloud_redis_metadata_decorator.cc +++ b/google/cloud/redis/v1/internal/cloud_redis_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/redis/v1/cloud_redis.proto #include "google/cloud/redis/v1/internal/cloud_redis_metadata_decorator.h" +#include "google/cloud/redis/v1/cloud_redis.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace redis_v1_internal { @@ -323,3 +327,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace redis_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/redis/v1/internal/cloud_redis_metadata_decorator.h b/google/cloud/redis/v1/internal/cloud_redis_metadata_decorator.h index 7efd524661b56..7d5fa4ddac449 100644 --- a/google/cloud/redis/v1/internal/cloud_redis_metadata_decorator.h +++ b/google/cloud/redis/v1/internal/cloud_redis_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/redis/v1/internal/cloud_redis_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace redis_v1_internal { @@ -187,4 +190,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_V1_INTERNAL_CLOUD_REDIS_METADATA_DECORATOR_H diff --git a/google/cloud/redis/v1/internal/cloud_redis_option_defaults.cc b/google/cloud/redis/v1/internal/cloud_redis_option_defaults.cc index 69813adcd9080..874cde1fcc492 100644 --- a/google/cloud/redis/v1/internal/cloud_redis_option_defaults.cc +++ b/google/cloud/redis/v1/internal/cloud_redis_option_defaults.cc @@ -40,7 +40,7 @@ Options CloudRedisDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - redis_v1::CloudRedisLimitedTimeRetryPolicy(std::chrono::minutes(30)) + redis_v1::CloudRedisLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/redis/v1/internal/cloud_redis_stub.cc b/google/cloud/redis/v1/internal/cloud_redis_stub.cc index 39cac7c9226d4..10c879fa2088e 100644 --- a/google/cloud/redis/v1/internal/cloud_redis_stub.cc +++ b/google/cloud/redis/v1/internal/cloud_redis_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/redis/v1/cloud_redis.proto #include "google/cloud/redis/v1/internal/cloud_redis_stub.h" +#include "google/cloud/redis/v1/cloud_redis.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace redis_v1_internal { @@ -412,3 +415,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace redis_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/redis/v1/internal/cloud_redis_stub.h b/google/cloud/redis/v1/internal/cloud_redis_stub.h index 4351f890bc08a..903df4a1beb74 100644 --- a/google/cloud/redis/v1/internal/cloud_redis_stub.h +++ b/google/cloud/redis/v1/internal/cloud_redis_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_V1_INTERNAL_CLOUD_REDIS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_V1_INTERNAL_CLOUD_REDIS_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/redis/v1/cloud_redis.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace redis_v1_internal { @@ -336,4 +339,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_V1_INTERNAL_CLOUD_REDIS_STUB_H diff --git a/google/cloud/redis/v1/internal/cloud_redis_stub_factory.cc b/google/cloud/redis/v1/internal/cloud_redis_stub_factory.cc index 8bce0fd9b72c3..b95602111cddf 100644 --- a/google/cloud/redis/v1/internal/cloud_redis_stub_factory.cc +++ b/google/cloud/redis/v1/internal/cloud_redis_stub_factory.cc @@ -17,6 +17,8 @@ // source: google/cloud/redis/v1/cloud_redis.proto #include "google/cloud/redis/v1/internal/cloud_redis_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/redis/v1/cloud_redis.grpc.pb.h" #include "google/cloud/redis/v1/internal/cloud_redis_auth_decorator.h" #include "google/cloud/redis/v1/internal/cloud_redis_logging_decorator.h" #include "google/cloud/redis/v1/internal/cloud_redis_metadata_decorator.h" @@ -28,12 +30,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace redis_v1_internal { @@ -74,3 +77,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace redis_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/redis/v1/internal/cloud_redis_stub_factory.h b/google/cloud/redis/v1/internal/cloud_redis_stub_factory.h index e11f1ce9ccb22..d723e8ead50fa 100644 --- a/google/cloud/redis/v1/internal/cloud_redis_stub_factory.h +++ b/google/cloud/redis/v1/internal/cloud_redis_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace redis_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_V1_INTERNAL_CLOUD_REDIS_STUB_FACTORY_H diff --git a/google/cloud/redis/v1/internal/cloud_redis_tracing_connection.cc b/google/cloud/redis/v1/internal/cloud_redis_tracing_connection.cc index 4c5a16635d081..398d188948992 100644 --- a/google/cloud/redis/v1/internal/cloud_redis_tracing_connection.cc +++ b/google/cloud/redis/v1/internal/cloud_redis_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace redis_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudRedisTracingConnection::CloudRedisTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -351,15 +349,11 @@ Status CloudRedisTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCloudRedisTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/redis/v1/internal/cloud_redis_tracing_connection.h b/google/cloud/redis/v1/internal/cloud_redis_tracing_connection.h index 8270f67fda3db..c3262cc94fb9c 100644 --- a/google/cloud/redis/v1/internal/cloud_redis_tracing_connection.h +++ b/google/cloud/redis/v1/internal/cloud_redis_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace redis_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudRedisTracingConnection : public redis_v1::CloudRedisConnection { public: ~CloudRedisTracingConnection() override = default; @@ -155,8 +153,6 @@ class CloudRedisTracingConnection : public redis_v1::CloudRedisConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/redis/v1/internal/cloud_redis_tracing_stub.cc b/google/cloud/redis/v1/internal/cloud_redis_tracing_stub.cc index 5eebe7d14adae..eb48433b1d0d1 100644 --- a/google/cloud/redis/v1/internal/cloud_redis_tracing_stub.cc +++ b/google/cloud/redis/v1/internal/cloud_redis_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace redis_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudRedisTracingStub::CloudRedisTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -373,18 +374,14 @@ future CloudRedisTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCloudRedisTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace redis_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/redis/v1/internal/cloud_redis_tracing_stub.h b/google/cloud/redis/v1/internal/cloud_redis_tracing_stub.h index c964996da585c..c04873242e7a6 100644 --- a/google/cloud/redis/v1/internal/cloud_redis_tracing_stub.h +++ b/google/cloud/redis/v1/internal/cloud_redis_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace redis_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudRedisTracingStub : public CloudRedisStub { public: ~CloudRedisTracingStub() override = default; @@ -177,8 +178,6 @@ class CloudRedisTracingStub : public CloudRedisStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -193,4 +192,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_REDIS_V1_INTERNAL_CLOUD_REDIS_TRACING_STUB_H diff --git a/google/cloud/resourcemanager/BUILD.bazel b/google/cloud/resourcemanager/BUILD.bazel index 34610e2590d23..f3ce3b6ccc9d8 100644 --- a/google/cloud/resourcemanager/BUILD.bazel +++ b/google/cloud/resourcemanager/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v3/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/resourcemanager/v3:resourcemanager_cc_grpc", + "@googleapis//google/cloud/resourcemanager/v3:resourcemanager_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/resourcemanager/CMakeLists.txt b/google/cloud/resourcemanager/CMakeLists.txt index eaaf21b473bf7..03a87c65fdd0e 100644 --- a/google/cloud/resourcemanager/CMakeLists.txt +++ b/google/cloud/resourcemanager/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(resourcemanager "Cloud Resource Manager API" - SERVICE_DIRS "__EMPTY__" "v3/") + SERVICE_DIRS "v3/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(resourcemanager_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/resourcemanager/folders_client.h b/google/cloud/resourcemanager/folders_client.h deleted file mode 100644 index e691d806b44db..0000000000000 --- a/google/cloud/resourcemanager/folders_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/resourcemanager/v3/folders.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_FOLDERS_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_FOLDERS_CLIENT_H - -#include "google/cloud/resourcemanager/folders_connection.h" -#include "google/cloud/resourcemanager/v3/folders_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in resourcemanager_v3 instead of the aliases defined in -/// this namespace. -namespace resourcemanager { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use resourcemanager_v3::FoldersClient directly. -using ::google::cloud::resourcemanager_v3::FoldersClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace resourcemanager -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_FOLDERS_CLIENT_H diff --git a/google/cloud/resourcemanager/folders_connection.h b/google/cloud/resourcemanager/folders_connection.h deleted file mode 100644 index 1686625c5f061..0000000000000 --- a/google/cloud/resourcemanager/folders_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/resourcemanager/v3/folders.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_FOLDERS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_FOLDERS_CONNECTION_H - -#include "google/cloud/resourcemanager/folders_connection_idempotency_policy.h" -#include "google/cloud/resourcemanager/v3/folders_connection.h" - -namespace google { -namespace cloud { -namespace resourcemanager { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use resourcemanager_v3::MakeFoldersConnection directly. -using ::google::cloud::resourcemanager_v3::MakeFoldersConnection; - -/// @deprecated Use resourcemanager_v3::FoldersConnection directly. -using ::google::cloud::resourcemanager_v3::FoldersConnection; - -/// @deprecated Use resourcemanager_v3::FoldersLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::resourcemanager_v3::FoldersLimitedErrorCountRetryPolicy; - -/// @deprecated Use resourcemanager_v3::FoldersLimitedTimeRetryPolicy directly. -using ::google::cloud::resourcemanager_v3::FoldersLimitedTimeRetryPolicy; - -/// @deprecated Use resourcemanager_v3::FoldersRetryPolicy directly. -using ::google::cloud::resourcemanager_v3::FoldersRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace resourcemanager -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_FOLDERS_CONNECTION_H diff --git a/google/cloud/resourcemanager/folders_connection_idempotency_policy.h b/google/cloud/resourcemanager/folders_connection_idempotency_policy.h deleted file mode 100644 index 7beb79d7f43cb..0000000000000 --- a/google/cloud/resourcemanager/folders_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/resourcemanager/v3/folders.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_FOLDERS_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_FOLDERS_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/resourcemanager/v3/folders_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace resourcemanager { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// resourcemanager_v3::MakeDefaultFoldersConnectionIdempotencyPolicy directly. -using ::google::cloud::resourcemanager_v3:: - MakeDefaultFoldersConnectionIdempotencyPolicy; - -/// @deprecated Use resourcemanager_v3::FoldersConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::resourcemanager_v3::FoldersConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace resourcemanager -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_FOLDERS_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/resourcemanager/folders_options.h b/google/cloud/resourcemanager/folders_options.h deleted file mode 100644 index 70b9a48a3f20e..0000000000000 --- a/google/cloud/resourcemanager/folders_options.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/resourcemanager/v3/folders.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_FOLDERS_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_FOLDERS_OPTIONS_H - -#include "google/cloud/resourcemanager/folders_connection.h" -#include "google/cloud/resourcemanager/folders_connection_idempotency_policy.h" -#include "google/cloud/resourcemanager/v3/folders_options.h" - -namespace google { -namespace cloud { -namespace resourcemanager { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use resourcemanager_v3::FoldersPollingPolicyOption directly. -using ::google::cloud::resourcemanager_v3::FoldersPollingPolicyOption; - -/// @deprecated Use resourcemanager_v3::FoldersBackoffPolicyOption directly. -using ::google::cloud::resourcemanager_v3::FoldersBackoffPolicyOption; - -/// @deprecated Use resourcemanager_v3::FoldersConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::resourcemanager_v3:: - FoldersConnectionIdempotencyPolicyOption; - -/// @deprecated Use resourcemanager_v3::FoldersPolicyOptionList directly. -using ::google::cloud::resourcemanager_v3::FoldersPolicyOptionList; - -/// @deprecated Use resourcemanager_v3::FoldersRetryPolicyOption directly. -using ::google::cloud::resourcemanager_v3::FoldersRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace resourcemanager -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_FOLDERS_OPTIONS_H diff --git a/google/cloud/resourcemanager/mocks/mock_folders_connection.h b/google/cloud/resourcemanager/mocks/mock_folders_connection.h deleted file mode 100644 index 0dc421cf90e86..0000000000000 --- a/google/cloud/resourcemanager/mocks/mock_folders_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/resourcemanager/v3/folders.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_MOCKS_MOCK_FOLDERS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_MOCKS_MOCK_FOLDERS_CONNECTION_H - -#include "google/cloud/resourcemanager/folders_connection.h" -#include "google/cloud/resourcemanager/v3/mocks/mock_folders_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in resourcemanager_v3_mocks instead of the aliases -/// defined in this namespace. -namespace resourcemanager_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use resourcemanager_v3_mocks::MockFoldersConnection directly. -using ::google::cloud::resourcemanager_v3_mocks::MockFoldersConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace resourcemanager_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_MOCKS_MOCK_FOLDERS_CONNECTION_H diff --git a/google/cloud/resourcemanager/mocks/mock_organizations_connection.h b/google/cloud/resourcemanager/mocks/mock_organizations_connection.h deleted file mode 100644 index 04c0cc8420d7f..0000000000000 --- a/google/cloud/resourcemanager/mocks/mock_organizations_connection.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/resourcemanager/v3/organizations.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_MOCKS_MOCK_ORGANIZATIONS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_MOCKS_MOCK_ORGANIZATIONS_CONNECTION_H - -#include "google/cloud/resourcemanager/organizations_connection.h" -#include "google/cloud/resourcemanager/v3/mocks/mock_organizations_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in resourcemanager_v3_mocks instead of the aliases -/// defined in this namespace. -namespace resourcemanager_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use resourcemanager_v3_mocks::MockOrganizationsConnection -/// directly. -using ::google::cloud::resourcemanager_v3_mocks::MockOrganizationsConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace resourcemanager_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_MOCKS_MOCK_ORGANIZATIONS_CONNECTION_H diff --git a/google/cloud/resourcemanager/mocks/mock_projects_connection.h b/google/cloud/resourcemanager/mocks/mock_projects_connection.h deleted file mode 100644 index ea4c93c44cb9d..0000000000000 --- a/google/cloud/resourcemanager/mocks/mock_projects_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/resourcemanager/v3/projects.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_MOCKS_MOCK_PROJECTS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_MOCKS_MOCK_PROJECTS_CONNECTION_H - -#include "google/cloud/resourcemanager/projects_connection.h" -#include "google/cloud/resourcemanager/v3/mocks/mock_projects_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in resourcemanager_v3_mocks instead of the aliases -/// defined in this namespace. -namespace resourcemanager_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use resourcemanager_v3_mocks::MockProjectsConnection directly. -using ::google::cloud::resourcemanager_v3_mocks::MockProjectsConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace resourcemanager_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_MOCKS_MOCK_PROJECTS_CONNECTION_H diff --git a/google/cloud/resourcemanager/organizations_client.h b/google/cloud/resourcemanager/organizations_client.h deleted file mode 100644 index 570f1f03cd7bd..0000000000000 --- a/google/cloud/resourcemanager/organizations_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/resourcemanager/v3/organizations.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_ORGANIZATIONS_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_ORGANIZATIONS_CLIENT_H - -#include "google/cloud/resourcemanager/organizations_connection.h" -#include "google/cloud/resourcemanager/v3/organizations_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in resourcemanager_v3 instead of the aliases defined in -/// this namespace. -namespace resourcemanager { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use resourcemanager_v3::OrganizationsClient directly. -using ::google::cloud::resourcemanager_v3::OrganizationsClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace resourcemanager -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_ORGANIZATIONS_CLIENT_H diff --git a/google/cloud/resourcemanager/organizations_connection.h b/google/cloud/resourcemanager/organizations_connection.h deleted file mode 100644 index 04eb118e55070..0000000000000 --- a/google/cloud/resourcemanager/organizations_connection.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/resourcemanager/v3/organizations.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_ORGANIZATIONS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_ORGANIZATIONS_CONNECTION_H - -#include "google/cloud/resourcemanager/organizations_connection_idempotency_policy.h" -#include "google/cloud/resourcemanager/v3/organizations_connection.h" - -namespace google { -namespace cloud { -namespace resourcemanager { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use resourcemanager_v3::MakeOrganizationsConnection directly. -using ::google::cloud::resourcemanager_v3::MakeOrganizationsConnection; - -/// @deprecated Use resourcemanager_v3::OrganizationsConnection directly. -using ::google::cloud::resourcemanager_v3::OrganizationsConnection; - -/// @deprecated Use -/// resourcemanager_v3::OrganizationsLimitedErrorCountRetryPolicy directly. -using ::google::cloud::resourcemanager_v3:: - OrganizationsLimitedErrorCountRetryPolicy; - -/// @deprecated Use resourcemanager_v3::OrganizationsLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::resourcemanager_v3::OrganizationsLimitedTimeRetryPolicy; - -/// @deprecated Use resourcemanager_v3::OrganizationsRetryPolicy directly. -using ::google::cloud::resourcemanager_v3::OrganizationsRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace resourcemanager -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_ORGANIZATIONS_CONNECTION_H diff --git a/google/cloud/resourcemanager/organizations_connection_idempotency_policy.h b/google/cloud/resourcemanager/organizations_connection_idempotency_policy.h deleted file mode 100644 index 8b9b8ec04aac5..0000000000000 --- a/google/cloud/resourcemanager/organizations_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/resourcemanager/v3/organizations.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_ORGANIZATIONS_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_ORGANIZATIONS_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/resourcemanager/v3/organizations_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace resourcemanager { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// resourcemanager_v3::MakeDefaultOrganizationsConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::resourcemanager_v3:: - MakeDefaultOrganizationsConnectionIdempotencyPolicy; - -/// @deprecated Use resourcemanager_v3::OrganizationsConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::resourcemanager_v3:: - OrganizationsConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace resourcemanager -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_ORGANIZATIONS_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/resourcemanager/organizations_options.h b/google/cloud/resourcemanager/organizations_options.h deleted file mode 100644 index 4b36973f2a7ad..0000000000000 --- a/google/cloud/resourcemanager/organizations_options.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/resourcemanager/v3/organizations.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_ORGANIZATIONS_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_ORGANIZATIONS_OPTIONS_H - -#include "google/cloud/resourcemanager/organizations_connection.h" -#include "google/cloud/resourcemanager/organizations_connection_idempotency_policy.h" -#include "google/cloud/resourcemanager/v3/organizations_options.h" - -namespace google { -namespace cloud { -namespace resourcemanager { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use resourcemanager_v3::OrganizationsBackoffPolicyOption -/// directly. -using ::google::cloud::resourcemanager_v3::OrganizationsBackoffPolicyOption; - -/// @deprecated Use -/// resourcemanager_v3::OrganizationsConnectionIdempotencyPolicyOption directly. -using ::google::cloud::resourcemanager_v3:: - OrganizationsConnectionIdempotencyPolicyOption; - -/// @deprecated Use resourcemanager_v3::OrganizationsPolicyOptionList directly. -using ::google::cloud::resourcemanager_v3::OrganizationsPolicyOptionList; - -/// @deprecated Use resourcemanager_v3::OrganizationsRetryPolicyOption directly. -using ::google::cloud::resourcemanager_v3::OrganizationsRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace resourcemanager -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_ORGANIZATIONS_OPTIONS_H diff --git a/google/cloud/resourcemanager/projects_client.h b/google/cloud/resourcemanager/projects_client.h deleted file mode 100644 index 386963ae508d8..0000000000000 --- a/google/cloud/resourcemanager/projects_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/resourcemanager/v3/projects.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_PROJECTS_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_PROJECTS_CLIENT_H - -#include "google/cloud/resourcemanager/projects_connection.h" -#include "google/cloud/resourcemanager/v3/projects_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in resourcemanager_v3 instead of the aliases defined in -/// this namespace. -namespace resourcemanager { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use resourcemanager_v3::ProjectsClient directly. -using ::google::cloud::resourcemanager_v3::ProjectsClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace resourcemanager -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_PROJECTS_CLIENT_H diff --git a/google/cloud/resourcemanager/projects_connection.h b/google/cloud/resourcemanager/projects_connection.h deleted file mode 100644 index 6fe6d7926e88d..0000000000000 --- a/google/cloud/resourcemanager/projects_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/resourcemanager/v3/projects.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_PROJECTS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_PROJECTS_CONNECTION_H - -#include "google/cloud/resourcemanager/projects_connection_idempotency_policy.h" -#include "google/cloud/resourcemanager/v3/projects_connection.h" - -namespace google { -namespace cloud { -namespace resourcemanager { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use resourcemanager_v3::MakeProjectsConnection directly. -using ::google::cloud::resourcemanager_v3::MakeProjectsConnection; - -/// @deprecated Use resourcemanager_v3::ProjectsConnection directly. -using ::google::cloud::resourcemanager_v3::ProjectsConnection; - -/// @deprecated Use resourcemanager_v3::ProjectsLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::resourcemanager_v3::ProjectsLimitedErrorCountRetryPolicy; - -/// @deprecated Use resourcemanager_v3::ProjectsLimitedTimeRetryPolicy directly. -using ::google::cloud::resourcemanager_v3::ProjectsLimitedTimeRetryPolicy; - -/// @deprecated Use resourcemanager_v3::ProjectsRetryPolicy directly. -using ::google::cloud::resourcemanager_v3::ProjectsRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace resourcemanager -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_PROJECTS_CONNECTION_H diff --git a/google/cloud/resourcemanager/projects_connection_idempotency_policy.h b/google/cloud/resourcemanager/projects_connection_idempotency_policy.h deleted file mode 100644 index 5b9af7e5e0405..0000000000000 --- a/google/cloud/resourcemanager/projects_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/resourcemanager/v3/projects.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_PROJECTS_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_PROJECTS_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/resourcemanager/v3/projects_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace resourcemanager { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// resourcemanager_v3::MakeDefaultProjectsConnectionIdempotencyPolicy directly. -using ::google::cloud::resourcemanager_v3:: - MakeDefaultProjectsConnectionIdempotencyPolicy; - -/// @deprecated Use resourcemanager_v3::ProjectsConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::resourcemanager_v3::ProjectsConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace resourcemanager -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_PROJECTS_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/resourcemanager/projects_options.h b/google/cloud/resourcemanager/projects_options.h deleted file mode 100644 index ad370fe464328..0000000000000 --- a/google/cloud/resourcemanager/projects_options.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/resourcemanager/v3/projects.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_PROJECTS_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_PROJECTS_OPTIONS_H - -#include "google/cloud/resourcemanager/projects_connection.h" -#include "google/cloud/resourcemanager/projects_connection_idempotency_policy.h" -#include "google/cloud/resourcemanager/v3/projects_options.h" - -namespace google { -namespace cloud { -namespace resourcemanager { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use resourcemanager_v3::ProjectsPollingPolicyOption directly. -using ::google::cloud::resourcemanager_v3::ProjectsPollingPolicyOption; - -/// @deprecated Use resourcemanager_v3::ProjectsBackoffPolicyOption directly. -using ::google::cloud::resourcemanager_v3::ProjectsBackoffPolicyOption; - -/// @deprecated Use -/// resourcemanager_v3::ProjectsConnectionIdempotencyPolicyOption directly. -using ::google::cloud::resourcemanager_v3:: - ProjectsConnectionIdempotencyPolicyOption; - -/// @deprecated Use resourcemanager_v3::ProjectsPolicyOptionList directly. -using ::google::cloud::resourcemanager_v3::ProjectsPolicyOptionList; - -/// @deprecated Use resourcemanager_v3::ProjectsRetryPolicyOption directly. -using ::google::cloud::resourcemanager_v3::ProjectsRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace resourcemanager -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_PROJECTS_OPTIONS_H diff --git a/google/cloud/resourcemanager/quickstart/.bazelrc b/google/cloud/resourcemanager/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/resourcemanager/quickstart/.bazelrc +++ b/google/cloud/resourcemanager/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/resourcemanager/quickstart/CMakeLists.txt b/google/cloud/resourcemanager/quickstart/CMakeLists.txt index 53381b8e80f7a..2128b6687ecd4 100644 --- a/google/cloud/resourcemanager/quickstart/CMakeLists.txt +++ b/google/cloud/resourcemanager/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Resource Manager API C++ client library # from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-resourcemanager-quickstart CXX) find_package(google_cloud_cpp_resourcemanager REQUIRED) diff --git a/google/cloud/resourcemanager/v3/folders_client.h b/google/cloud/resourcemanager/v3/folders_client.h index f6358bb22ad90..4436f4e3efd87 100644 --- a/google/cloud/resourcemanager/v3/folders_client.h +++ b/google/cloud/resourcemanager/v3/folders_client.h @@ -28,7 +28,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/resourcemanager/v3/folders_connection.h b/google/cloud/resourcemanager/v3/folders_connection.h index 92ede61d9d579..5368099904696 100644 --- a/google/cloud/resourcemanager/v3/folders_connection.h +++ b/google/cloud/resourcemanager/v3/folders_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_FOLDERS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_FOLDERS_CONNECTION_H +#include "google/cloud/resourcemanager/v3/folders.pb.h" #include "google/cloud/resourcemanager/v3/folders_connection_idempotency_policy.h" #include "google/cloud/resourcemanager/v3/internal/folders_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/resourcemanager/v3/folders_connection_idempotency_policy.h b/google/cloud/resourcemanager/v3/folders_connection_idempotency_policy.h index 84a39dc875953..219ac32a1fa45 100644 --- a/google/cloud/resourcemanager/v3/folders_connection_idempotency_policy.h +++ b/google/cloud/resourcemanager/v3/folders_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_FOLDERS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_FOLDERS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/resourcemanager/v3/folders.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/resourcemanager/v3/internal/folders_auth_decorator.cc b/google/cloud/resourcemanager/v3/internal/folders_auth_decorator.cc index 63dc10aa1c845..0b5b84a67da94 100644 --- a/google/cloud/resourcemanager/v3/internal/folders_auth_decorator.cc +++ b/google/cloud/resourcemanager/v3/internal/folders_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/resourcemanager/v3/folders.proto #include "google/cloud/resourcemanager/v3/internal/folders_auth_decorator.h" -#include +#include "google/cloud/resourcemanager/v3/folders.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -265,3 +268,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/folders_auth_decorator.h b/google/cloud/resourcemanager/v3/internal/folders_auth_decorator.h index e4e8977805930..cb81fb53f518a 100644 --- a/google/cloud/resourcemanager/v3/internal/folders_auth_decorator.h +++ b/google/cloud/resourcemanager/v3/internal/folders_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/resourcemanager/v3/internal/folders_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -152,4 +155,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_FOLDERS_AUTH_DECORATOR_H diff --git a/google/cloud/resourcemanager/v3/internal/folders_connection_impl.h b/google/cloud/resourcemanager/v3/internal/folders_connection_impl.h index c6d5b0214daa5..f24b7e2cc53f9 100644 --- a/google/cloud/resourcemanager/v3/internal/folders_connection_impl.h +++ b/google/cloud/resourcemanager/v3/internal/folders_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/resourcemanager/v3/internal/folders_logging_decorator.cc b/google/cloud/resourcemanager/v3/internal/folders_logging_decorator.cc index ae121d3920960..45a510c79119c 100644 --- a/google/cloud/resourcemanager/v3/internal/folders_logging_decorator.cc +++ b/google/cloud/resourcemanager/v3/internal/folders_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/resourcemanager/v3/folders.proto #include "google/cloud/resourcemanager/v3/internal/folders_logging_decorator.h" +#include "google/cloud/resourcemanager/v3/folders.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -312,3 +315,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/folders_logging_decorator.h b/google/cloud/resourcemanager/v3/internal/folders_logging_decorator.h index 08e25fe17da5d..d5142c3c60dde 100644 --- a/google/cloud/resourcemanager/v3/internal/folders_logging_decorator.h +++ b/google/cloud/resourcemanager/v3/internal/folders_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/resourcemanager/v3/internal/folders_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -152,4 +155,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_FOLDERS_LOGGING_DECORATOR_H diff --git a/google/cloud/resourcemanager/v3/internal/folders_metadata_decorator.cc b/google/cloud/resourcemanager/v3/internal/folders_metadata_decorator.cc index c05b59178cd47..5cab181753ce9 100644 --- a/google/cloud/resourcemanager/v3/internal/folders_metadata_decorator.cc +++ b/google/cloud/resourcemanager/v3/internal/folders_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/resourcemanager/v3/folders.proto #include "google/cloud/resourcemanager/v3/internal/folders_metadata_decorator.h" +#include "google/cloud/resourcemanager/v3/folders.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -244,3 +248,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/folders_metadata_decorator.h b/google/cloud/resourcemanager/v3/internal/folders_metadata_decorator.h index 8efb23c4b19ce..18a2bd70bef22 100644 --- a/google/cloud/resourcemanager/v3/internal/folders_metadata_decorator.h +++ b/google/cloud/resourcemanager/v3/internal/folders_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/resourcemanager/v3/internal/folders_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -157,4 +160,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_FOLDERS_METADATA_DECORATOR_H diff --git a/google/cloud/resourcemanager/v3/internal/folders_option_defaults.cc b/google/cloud/resourcemanager/v3/internal/folders_option_defaults.cc index 9a9cd0e79ecb9..80b41cb82d1bd 100644 --- a/google/cloud/resourcemanager/v3/internal/folders_option_defaults.cc +++ b/google/cloud/resourcemanager/v3/internal/folders_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/resourcemanager/v3/internal/folders_option_defaults.h" #include "google/cloud/resourcemanager/v3/folders_connection.h" #include "google/cloud/resourcemanager/v3/folders_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -45,7 +45,7 @@ Options FoldersDefaultOptions(std::string const& location, Options options) { if (!options.has()) { options.set( resourcemanager_v3::FoldersLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/resourcemanager/v3/internal/folders_stub.cc b/google/cloud/resourcemanager/v3/internal/folders_stub.cc index e5ce59e3e02b7..c23dcfbc4d84d 100644 --- a/google/cloud/resourcemanager/v3/internal/folders_stub.cc +++ b/google/cloud/resourcemanager/v3/internal/folders_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/resourcemanager/v3/folders.proto #include "google/cloud/resourcemanager/v3/internal/folders_stub.h" +#include "google/cloud/resourcemanager/v3/folders.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -305,3 +308,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/folders_stub.h b/google/cloud/resourcemanager/v3/internal/folders_stub.h index c06951c64cdfa..7a7cc6db7def8 100644 --- a/google/cloud/resourcemanager/v3/internal/folders_stub.h +++ b/google/cloud/resourcemanager/v3/internal/folders_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_FOLDERS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_FOLDERS_STUB_H +#include "google/cloud/resourcemanager/v3/folders.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -266,4 +269,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_FOLDERS_STUB_H diff --git a/google/cloud/resourcemanager/v3/internal/folders_stub_factory.cc b/google/cloud/resourcemanager/v3/internal/folders_stub_factory.cc index cda814a4582fc..4d82c58b2d37d 100644 --- a/google/cloud/resourcemanager/v3/internal/folders_stub_factory.cc +++ b/google/cloud/resourcemanager/v3/internal/folders_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/resourcemanager/v3/folders.proto #include "google/cloud/resourcemanager/v3/internal/folders_stub_factory.h" +#include "google/cloud/resourcemanager/v3/folders.grpc.pb.h" #include "google/cloud/resourcemanager/v3/internal/folders_auth_decorator.h" #include "google/cloud/resourcemanager/v3/internal/folders_logging_decorator.h" #include "google/cloud/resourcemanager/v3/internal/folders_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/folders_stub_factory.h b/google/cloud/resourcemanager/v3/internal/folders_stub_factory.h index 5dd2b8439b0ca..8b693cc31d5c0 100644 --- a/google/cloud/resourcemanager/v3/internal/folders_stub_factory.h +++ b/google/cloud/resourcemanager/v3/internal/folders_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_FOLDERS_STUB_FACTORY_H diff --git a/google/cloud/resourcemanager/v3/internal/folders_tracing_connection.cc b/google/cloud/resourcemanager/v3/internal/folders_tracing_connection.cc index 4f13f6895b45a..a067235b97ae7 100644 --- a/google/cloud/resourcemanager/v3/internal/folders_tracing_connection.cc +++ b/google/cloud/resourcemanager/v3/internal/folders_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace resourcemanager_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - FoldersTracingConnection::FoldersTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -236,16 +234,12 @@ StatusOr FoldersTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeFoldersTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/resourcemanager/v3/internal/folders_tracing_connection.h b/google/cloud/resourcemanager/v3/internal/folders_tracing_connection.h index 61b0e244e5087..5dd9fc215accc 100644 --- a/google/cloud/resourcemanager/v3/internal/folders_tracing_connection.h +++ b/google/cloud/resourcemanager/v3/internal/folders_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace resourcemanager_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class FoldersTracingConnection : public resourcemanager_v3::FoldersConnection { public: ~FoldersTracingConnection() override = default; @@ -126,8 +124,6 @@ class FoldersTracingConnection : public resourcemanager_v3::FoldersConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/resourcemanager/v3/internal/folders_tracing_stub.cc b/google/cloud/resourcemanager/v3/internal/folders_tracing_stub.cc index 69a4d46c819d5..e71b99b0f5b4d 100644 --- a/google/cloud/resourcemanager/v3/internal/folders_tracing_stub.cc +++ b/google/cloud/resourcemanager/v3/internal/folders_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - FoldersTracingStub::FoldersTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -266,18 +267,14 @@ future FoldersTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeFoldersTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/folders_tracing_stub.h b/google/cloud/resourcemanager/v3/internal/folders_tracing_stub.h index aa4cc570895cf..2c0c5e95c2100 100644 --- a/google/cloud/resourcemanager/v3/internal/folders_tracing_stub.h +++ b/google/cloud/resourcemanager/v3/internal/folders_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class FoldersTracingStub : public FoldersStub { public: ~FoldersTracingStub() override = default; @@ -147,8 +148,6 @@ class FoldersTracingStub : public FoldersStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -163,4 +162,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_FOLDERS_TRACING_STUB_H diff --git a/google/cloud/resourcemanager/v3/internal/organizations_auth_decorator.cc b/google/cloud/resourcemanager/v3/internal/organizations_auth_decorator.cc index 18b99ce1a2208..45a66208ab174 100644 --- a/google/cloud/resourcemanager/v3/internal/organizations_auth_decorator.cc +++ b/google/cloud/resourcemanager/v3/internal/organizations_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/resourcemanager/v3/organizations.proto #include "google/cloud/resourcemanager/v3/internal/organizations_auth_decorator.h" -#include +#include "google/cloud/resourcemanager/v3/organizations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -87,3 +90,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/organizations_auth_decorator.h b/google/cloud/resourcemanager/v3/internal/organizations_auth_decorator.h index f7f15dcdaae71..0f72e7a6d5212 100644 --- a/google/cloud/resourcemanager/v3/internal/organizations_auth_decorator.h +++ b/google/cloud/resourcemanager/v3/internal/organizations_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -75,4 +78,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_ORGANIZATIONS_AUTH_DECORATOR_H diff --git a/google/cloud/resourcemanager/v3/internal/organizations_logging_decorator.cc b/google/cloud/resourcemanager/v3/internal/organizations_logging_decorator.cc index 2ce6b02171bd2..5db35f944256b 100644 --- a/google/cloud/resourcemanager/v3/internal/organizations_logging_decorator.cc +++ b/google/cloud/resourcemanager/v3/internal/organizations_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/resourcemanager/v3/organizations.proto #include "google/cloud/resourcemanager/v3/internal/organizations_logging_decorator.h" +#include "google/cloud/resourcemanager/v3/organizations.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -112,3 +115,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/organizations_logging_decorator.h b/google/cloud/resourcemanager/v3/internal/organizations_logging_decorator.h index 787a302b96f0b..ee630c7247a54 100644 --- a/google/cloud/resourcemanager/v3/internal/organizations_logging_decorator.h +++ b/google/cloud/resourcemanager/v3/internal/organizations_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -75,4 +78,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_ORGANIZATIONS_LOGGING_DECORATOR_H diff --git a/google/cloud/resourcemanager/v3/internal/organizations_metadata_decorator.cc b/google/cloud/resourcemanager/v3/internal/organizations_metadata_decorator.cc index 01b2497015f4d..afff183e8137e 100644 --- a/google/cloud/resourcemanager/v3/internal/organizations_metadata_decorator.cc +++ b/google/cloud/resourcemanager/v3/internal/organizations_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/resourcemanager/v3/organizations.proto #include "google/cloud/resourcemanager/v3/internal/organizations_metadata_decorator.h" +#include "google/cloud/resourcemanager/v3/organizations.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -115,3 +119,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/organizations_metadata_decorator.h b/google/cloud/resourcemanager/v3/internal/organizations_metadata_decorator.h index d0179c4d1acad..c405a0fc47a2b 100644 --- a/google/cloud/resourcemanager/v3/internal/organizations_metadata_decorator.h +++ b/google/cloud/resourcemanager/v3/internal/organizations_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -80,4 +83,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_ORGANIZATIONS_METADATA_DECORATOR_H diff --git a/google/cloud/resourcemanager/v3/internal/organizations_option_defaults.cc b/google/cloud/resourcemanager/v3/internal/organizations_option_defaults.cc index 5a0e9fc71b9c7..ba0b407763273 100644 --- a/google/cloud/resourcemanager/v3/internal/organizations_option_defaults.cc +++ b/google/cloud/resourcemanager/v3/internal/organizations_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/resourcemanager/v3/internal/organizations_option_defaults.h" #include "google/cloud/resourcemanager/v3/organizations_connection.h" #include "google/cloud/resourcemanager/v3/organizations_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -46,7 +46,7 @@ Options OrganizationsDefaultOptions(std::string const& location, if (!options.has()) { options.set( resourcemanager_v3::OrganizationsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/resourcemanager/v3/internal/organizations_stub.cc b/google/cloud/resourcemanager/v3/internal/organizations_stub.cc index c5e73b86f84d6..951506f8c45e3 100644 --- a/google/cloud/resourcemanager/v3/internal/organizations_stub.cc +++ b/google/cloud/resourcemanager/v3/internal/organizations_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/resourcemanager/v3/organizations.proto #include "google/cloud/resourcemanager/v3/internal/organizations_stub.h" +#include "google/cloud/resourcemanager/v3/organizations.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -104,3 +107,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/organizations_stub.h b/google/cloud/resourcemanager/v3/internal/organizations_stub.h index ba0b7cbeb4bfa..13d38d73c2598 100644 --- a/google/cloud/resourcemanager/v3/internal/organizations_stub.h +++ b/google/cloud/resourcemanager/v3/internal/organizations_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_ORGANIZATIONS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_ORGANIZATIONS_STUB_H +#include "google/cloud/resourcemanager/v3/organizations.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -118,4 +121,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_ORGANIZATIONS_STUB_H diff --git a/google/cloud/resourcemanager/v3/internal/organizations_stub_factory.cc b/google/cloud/resourcemanager/v3/internal/organizations_stub_factory.cc index 062d3d2590114..f1a8250f788f8 100644 --- a/google/cloud/resourcemanager/v3/internal/organizations_stub_factory.cc +++ b/google/cloud/resourcemanager/v3/internal/organizations_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/resourcemanager/v3/internal/organizations_metadata_decorator.h" #include "google/cloud/resourcemanager/v3/internal/organizations_stub.h" #include "google/cloud/resourcemanager/v3/internal/organizations_tracing_stub.h" +#include "google/cloud/resourcemanager/v3/organizations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/organizations_stub_factory.h b/google/cloud/resourcemanager/v3/internal/organizations_stub_factory.h index a0e2e42ed544f..6f078b12944be 100644 --- a/google/cloud/resourcemanager/v3/internal/organizations_stub_factory.h +++ b/google/cloud/resourcemanager/v3/internal/organizations_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_ORGANIZATIONS_STUB_FACTORY_H diff --git a/google/cloud/resourcemanager/v3/internal/organizations_tracing_connection.cc b/google/cloud/resourcemanager/v3/internal/organizations_tracing_connection.cc index 9ca76ab23ece1..5b95af10b8959 100644 --- a/google/cloud/resourcemanager/v3/internal/organizations_tracing_connection.cc +++ b/google/cloud/resourcemanager/v3/internal/organizations_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace resourcemanager_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - OrganizationsTracingConnection::OrganizationsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -88,16 +86,12 @@ OrganizationsTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeOrganizationsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/resourcemanager/v3/internal/organizations_tracing_connection.h b/google/cloud/resourcemanager/v3/internal/organizations_tracing_connection.h index 559077384ea46..29f9b377e8b6d 100644 --- a/google/cloud/resourcemanager/v3/internal/organizations_tracing_connection.h +++ b/google/cloud/resourcemanager/v3/internal/organizations_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace resourcemanager_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class OrganizationsTracingConnection : public resourcemanager_v3::OrganizationsConnection { public: @@ -65,8 +63,6 @@ class OrganizationsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/resourcemanager/v3/internal/organizations_tracing_stub.cc b/google/cloud/resourcemanager/v3/internal/organizations_tracing_stub.cc index 7ad7b426eb215..4ca08567ef500 100644 --- a/google/cloud/resourcemanager/v3/internal/organizations_tracing_stub.cc +++ b/google/cloud/resourcemanager/v3/internal/organizations_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - OrganizationsTracingStub::OrganizationsTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -102,18 +103,14 @@ StatusOr OrganizationsTracingStub::GetOperation( child_->GetOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeOrganizationsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/organizations_tracing_stub.h b/google/cloud/resourcemanager/v3/internal/organizations_tracing_stub.h index 79e14da9ad2c6..a6be8f0edc8b2 100644 --- a/google/cloud/resourcemanager/v3/internal/organizations_tracing_stub.h +++ b/google/cloud/resourcemanager/v3/internal/organizations_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class OrganizationsTracingStub : public OrganizationsStub { public: ~OrganizationsTracingStub() override = default; @@ -71,8 +72,6 @@ class OrganizationsTracingStub : public OrganizationsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -87,4 +86,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_ORGANIZATIONS_TRACING_STUB_H diff --git a/google/cloud/resourcemanager/v3/internal/projects_auth_decorator.cc b/google/cloud/resourcemanager/v3/internal/projects_auth_decorator.cc index 015a0fd398569..88bf3796a4b90 100644 --- a/google/cloud/resourcemanager/v3/internal/projects_auth_decorator.cc +++ b/google/cloud/resourcemanager/v3/internal/projects_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/resourcemanager/v3/projects.proto #include "google/cloud/resourcemanager/v3/internal/projects_auth_decorator.h" -#include +#include "google/cloud/resourcemanager/v3/projects.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -269,3 +272,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/projects_auth_decorator.h b/google/cloud/resourcemanager/v3/internal/projects_auth_decorator.h index 21f71db62adce..d8e2c1069810c 100644 --- a/google/cloud/resourcemanager/v3/internal/projects_auth_decorator.h +++ b/google/cloud/resourcemanager/v3/internal/projects_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/resourcemanager/v3/internal/projects_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -153,4 +156,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_PROJECTS_AUTH_DECORATOR_H diff --git a/google/cloud/resourcemanager/v3/internal/projects_connection_impl.h b/google/cloud/resourcemanager/v3/internal/projects_connection_impl.h index 945fcdee8f3ca..1c7dfe1197dec 100644 --- a/google/cloud/resourcemanager/v3/internal/projects_connection_impl.h +++ b/google/cloud/resourcemanager/v3/internal/projects_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/resourcemanager/v3/internal/projects_logging_decorator.cc b/google/cloud/resourcemanager/v3/internal/projects_logging_decorator.cc index 02510fa6e5c75..aa5218aea97c8 100644 --- a/google/cloud/resourcemanager/v3/internal/projects_logging_decorator.cc +++ b/google/cloud/resourcemanager/v3/internal/projects_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/resourcemanager/v3/projects.proto #include "google/cloud/resourcemanager/v3/internal/projects_logging_decorator.h" +#include "google/cloud/resourcemanager/v3/projects.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -313,3 +316,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/projects_logging_decorator.h b/google/cloud/resourcemanager/v3/internal/projects_logging_decorator.h index 75d597b196952..316b1fe02b626 100644 --- a/google/cloud/resourcemanager/v3/internal/projects_logging_decorator.h +++ b/google/cloud/resourcemanager/v3/internal/projects_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/resourcemanager/v3/internal/projects_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -153,4 +156,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_PROJECTS_LOGGING_DECORATOR_H diff --git a/google/cloud/resourcemanager/v3/internal/projects_metadata_decorator.cc b/google/cloud/resourcemanager/v3/internal/projects_metadata_decorator.cc index b549fa6e1f334..52081e368d903 100644 --- a/google/cloud/resourcemanager/v3/internal/projects_metadata_decorator.cc +++ b/google/cloud/resourcemanager/v3/internal/projects_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/resourcemanager/v3/projects.proto #include "google/cloud/resourcemanager/v3/internal/projects_metadata_decorator.h" +#include "google/cloud/resourcemanager/v3/projects.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -245,3 +249,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/projects_metadata_decorator.h b/google/cloud/resourcemanager/v3/internal/projects_metadata_decorator.h index 19aae741fc9fd..947f88b2ecaad 100644 --- a/google/cloud/resourcemanager/v3/internal/projects_metadata_decorator.h +++ b/google/cloud/resourcemanager/v3/internal/projects_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/resourcemanager/v3/internal/projects_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -158,4 +161,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_PROJECTS_METADATA_DECORATOR_H diff --git a/google/cloud/resourcemanager/v3/internal/projects_option_defaults.cc b/google/cloud/resourcemanager/v3/internal/projects_option_defaults.cc index 76a6d0986d713..02e6835738b5a 100644 --- a/google/cloud/resourcemanager/v3/internal/projects_option_defaults.cc +++ b/google/cloud/resourcemanager/v3/internal/projects_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/resourcemanager/v3/internal/projects_option_defaults.h" #include "google/cloud/resourcemanager/v3/projects_connection.h" #include "google/cloud/resourcemanager/v3/projects_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -45,7 +45,7 @@ Options ProjectsDefaultOptions(std::string const& location, Options options) { if (!options.has()) { options.set( resourcemanager_v3::ProjectsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/resourcemanager/v3/internal/projects_stub.cc b/google/cloud/resourcemanager/v3/internal/projects_stub.cc index de86e7e7e1692..2ba267027e95e 100644 --- a/google/cloud/resourcemanager/v3/internal/projects_stub.cc +++ b/google/cloud/resourcemanager/v3/internal/projects_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/resourcemanager/v3/projects.proto #include "google/cloud/resourcemanager/v3/internal/projects_stub.h" +#include "google/cloud/resourcemanager/v3/projects.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -305,3 +308,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/projects_stub.h b/google/cloud/resourcemanager/v3/internal/projects_stub.h index 2c0c04dc43ba2..e3e23376c4675 100644 --- a/google/cloud/resourcemanager/v3/internal/projects_stub.h +++ b/google/cloud/resourcemanager/v3/internal/projects_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_PROJECTS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_PROJECTS_STUB_H +#include "google/cloud/resourcemanager/v3/projects.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -270,4 +273,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_PROJECTS_STUB_H diff --git a/google/cloud/resourcemanager/v3/internal/projects_stub_factory.cc b/google/cloud/resourcemanager/v3/internal/projects_stub_factory.cc index e3a2079753c1f..857b7014dd12d 100644 --- a/google/cloud/resourcemanager/v3/internal/projects_stub_factory.cc +++ b/google/cloud/resourcemanager/v3/internal/projects_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/resourcemanager/v3/internal/projects_metadata_decorator.h" #include "google/cloud/resourcemanager/v3/internal/projects_stub.h" #include "google/cloud/resourcemanager/v3/internal/projects_tracing_stub.h" +#include "google/cloud/resourcemanager/v3/projects.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/projects_stub_factory.h b/google/cloud/resourcemanager/v3/internal/projects_stub_factory.h index d43656eb261b3..33170c637fc66 100644 --- a/google/cloud/resourcemanager/v3/internal/projects_stub_factory.h +++ b/google/cloud/resourcemanager/v3/internal/projects_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_PROJECTS_STUB_FACTORY_H diff --git a/google/cloud/resourcemanager/v3/internal/projects_tracing_connection.cc b/google/cloud/resourcemanager/v3/internal/projects_tracing_connection.cc index ee4decb00d415..888a9eed77c4a 100644 --- a/google/cloud/resourcemanager/v3/internal/projects_tracing_connection.cc +++ b/google/cloud/resourcemanager/v3/internal/projects_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace resourcemanager_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ProjectsTracingConnection::ProjectsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -240,16 +238,12 @@ ProjectsTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeProjectsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/resourcemanager/v3/internal/projects_tracing_connection.h b/google/cloud/resourcemanager/v3/internal/projects_tracing_connection.h index 9269e2b1b9c5b..78895ee0838ac 100644 --- a/google/cloud/resourcemanager/v3/internal/projects_tracing_connection.h +++ b/google/cloud/resourcemanager/v3/internal/projects_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace resourcemanager_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ProjectsTracingConnection : public resourcemanager_v3::ProjectsConnection { public: @@ -127,8 +125,6 @@ class ProjectsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/resourcemanager/v3/internal/projects_tracing_stub.cc b/google/cloud/resourcemanager/v3/internal/projects_tracing_stub.cc index eb278c5b538a2..ca0f7b6b0cbce 100644 --- a/google/cloud/resourcemanager/v3/internal/projects_tracing_stub.cc +++ b/google/cloud/resourcemanager/v3/internal/projects_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ProjectsTracingStub::ProjectsTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -266,18 +267,14 @@ future ProjectsTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeProjectsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/projects_tracing_stub.h b/google/cloud/resourcemanager/v3/internal/projects_tracing_stub.h index d30093af14c3a..c38550f244a27 100644 --- a/google/cloud/resourcemanager/v3/internal/projects_tracing_stub.h +++ b/google/cloud/resourcemanager/v3/internal/projects_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ProjectsTracingStub : public ProjectsStub { public: ~ProjectsTracingStub() override = default; @@ -148,8 +149,6 @@ class ProjectsTracingStub : public ProjectsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -164,4 +163,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_PROJECTS_TRACING_STUB_H diff --git a/google/cloud/resourcemanager/v3/internal/tag_bindings_auth_decorator.cc b/google/cloud/resourcemanager/v3/internal/tag_bindings_auth_decorator.cc index e91ab6fc7871d..944a8d6dfce32 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_bindings_auth_decorator.cc +++ b/google/cloud/resourcemanager/v3/internal/tag_bindings_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/resourcemanager/v3/tag_bindings.proto #include "google/cloud/resourcemanager/v3/internal/tag_bindings_auth_decorator.h" -#include +#include "google/cloud/resourcemanager/v3/tag_bindings.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -158,3 +161,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/tag_bindings_auth_decorator.h b/google/cloud/resourcemanager/v3/internal/tag_bindings_auth_decorator.h index f146c10a8499a..2407ef1b88e7e 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_bindings_auth_decorator.h +++ b/google/cloud/resourcemanager/v3/internal/tag_bindings_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/resourcemanager/v3/internal/tag_bindings_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -101,4 +104,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_TAG_BINDINGS_AUTH_DECORATOR_H diff --git a/google/cloud/resourcemanager/v3/internal/tag_bindings_connection_impl.h b/google/cloud/resourcemanager/v3/internal/tag_bindings_connection_impl.h index 786298f857087..50019543d18dc 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_bindings_connection_impl.h +++ b/google/cloud/resourcemanager/v3/internal/tag_bindings_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/resourcemanager/v3/internal/tag_bindings_logging_decorator.cc b/google/cloud/resourcemanager/v3/internal/tag_bindings_logging_decorator.cc index a753b51839475..07a33e252e68a 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_bindings_logging_decorator.cc +++ b/google/cloud/resourcemanager/v3/internal/tag_bindings_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/resourcemanager/v3/tag_bindings.proto #include "google/cloud/resourcemanager/v3/internal/tag_bindings_logging_decorator.h" +#include "google/cloud/resourcemanager/v3/tag_bindings.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -178,3 +181,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/tag_bindings_logging_decorator.h b/google/cloud/resourcemanager/v3/internal/tag_bindings_logging_decorator.h index 9f1be453c45d2..af64739113a35 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_bindings_logging_decorator.h +++ b/google/cloud/resourcemanager/v3/internal/tag_bindings_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/resourcemanager/v3/internal/tag_bindings_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -101,4 +104,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_TAG_BINDINGS_LOGGING_DECORATOR_H diff --git a/google/cloud/resourcemanager/v3/internal/tag_bindings_metadata_decorator.cc b/google/cloud/resourcemanager/v3/internal/tag_bindings_metadata_decorator.cc index e604b67578ad9..05db6ab821fbd 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_bindings_metadata_decorator.cc +++ b/google/cloud/resourcemanager/v3/internal/tag_bindings_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/resourcemanager/v3/tag_bindings.proto #include "google/cloud/resourcemanager/v3/internal/tag_bindings_metadata_decorator.h" +#include "google/cloud/resourcemanager/v3/tag_bindings.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -151,3 +155,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/tag_bindings_metadata_decorator.h b/google/cloud/resourcemanager/v3/internal/tag_bindings_metadata_decorator.h index b2d1f954ef8e9..47ba615c5a01e 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_bindings_metadata_decorator.h +++ b/google/cloud/resourcemanager/v3/internal/tag_bindings_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/resourcemanager/v3/internal/tag_bindings_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -106,4 +109,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_TAG_BINDINGS_METADATA_DECORATOR_H diff --git a/google/cloud/resourcemanager/v3/internal/tag_bindings_option_defaults.cc b/google/cloud/resourcemanager/v3/internal/tag_bindings_option_defaults.cc index eba120fad0e57..88bdfb2f1df56 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_bindings_option_defaults.cc +++ b/google/cloud/resourcemanager/v3/internal/tag_bindings_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/resourcemanager/v3/internal/tag_bindings_option_defaults.h" #include "google/cloud/resourcemanager/v3/tag_bindings_connection.h" #include "google/cloud/resourcemanager/v3/tag_bindings_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -46,7 +46,7 @@ Options TagBindingsDefaultOptions(std::string const& location, if (!options.has()) { options.set( resourcemanager_v3::TagBindingsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/resourcemanager/v3/internal/tag_bindings_stub.cc b/google/cloud/resourcemanager/v3/internal/tag_bindings_stub.cc index f93a2fc8fd63a..18ce134b96345 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_bindings_stub.cc +++ b/google/cloud/resourcemanager/v3/internal/tag_bindings_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/resourcemanager/v3/tag_bindings.proto #include "google/cloud/resourcemanager/v3/internal/tag_bindings_stub.h" +#include "google/cloud/resourcemanager/v3/tag_bindings.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -176,3 +179,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/tag_bindings_stub.h b/google/cloud/resourcemanager/v3/internal/tag_bindings_stub.h index 74a8a9aee2c11..f849e4037f055 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_bindings_stub.h +++ b/google/cloud/resourcemanager/v3/internal/tag_bindings_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_TAG_BINDINGS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_TAG_BINDINGS_STUB_H +#include "google/cloud/resourcemanager/v3/tag_bindings.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -170,4 +173,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_TAG_BINDINGS_STUB_H diff --git a/google/cloud/resourcemanager/v3/internal/tag_bindings_stub_factory.cc b/google/cloud/resourcemanager/v3/internal/tag_bindings_stub_factory.cc index d8eb627229b98..f8c1a6181a563 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_bindings_stub_factory.cc +++ b/google/cloud/resourcemanager/v3/internal/tag_bindings_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/resourcemanager/v3/internal/tag_bindings_metadata_decorator.h" #include "google/cloud/resourcemanager/v3/internal/tag_bindings_stub.h" #include "google/cloud/resourcemanager/v3/internal/tag_bindings_tracing_stub.h" +#include "google/cloud/resourcemanager/v3/tag_bindings.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/tag_bindings_stub_factory.h b/google/cloud/resourcemanager/v3/internal/tag_bindings_stub_factory.h index 5f12d128e6b2f..167d1704fb880 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_bindings_stub_factory.h +++ b/google/cloud/resourcemanager/v3/internal/tag_bindings_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_TAG_BINDINGS_STUB_FACTORY_H diff --git a/google/cloud/resourcemanager/v3/internal/tag_bindings_tracing_connection.cc b/google/cloud/resourcemanager/v3/internal/tag_bindings_tracing_connection.cc index 35661217c0f7a..fe6eff8f75731 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_bindings_tracing_connection.cc +++ b/google/cloud/resourcemanager/v3/internal/tag_bindings_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace resourcemanager_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TagBindingsTracingConnection::TagBindingsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -130,16 +128,12 @@ TagBindingsTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTagBindingsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/resourcemanager/v3/internal/tag_bindings_tracing_connection.h b/google/cloud/resourcemanager/v3/internal/tag_bindings_tracing_connection.h index b78993bfe4b4c..f3d7ba5095408 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_bindings_tracing_connection.h +++ b/google/cloud/resourcemanager/v3/internal/tag_bindings_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace resourcemanager_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TagBindingsTracingConnection : public resourcemanager_v3::TagBindingsConnection { public: @@ -81,8 +79,6 @@ class TagBindingsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/resourcemanager/v3/internal/tag_bindings_tracing_stub.cc b/google/cloud/resourcemanager/v3/internal/tag_bindings_tracing_stub.cc index 6911838dd830f..cdb3c5f6b07d1 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_bindings_tracing_stub.cc +++ b/google/cloud/resourcemanager/v3/internal/tag_bindings_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TagBindingsTracingStub::TagBindingsTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -154,18 +155,14 @@ future TagBindingsTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTagBindingsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/tag_bindings_tracing_stub.h b/google/cloud/resourcemanager/v3/internal/tag_bindings_tracing_stub.h index 0d2b5dbdf8e36..b9a3651518ba4 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_bindings_tracing_stub.h +++ b/google/cloud/resourcemanager/v3/internal/tag_bindings_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TagBindingsTracingStub : public TagBindingsStub { public: ~TagBindingsTracingStub() override = default; @@ -96,8 +97,6 @@ class TagBindingsTracingStub : public TagBindingsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -112,4 +111,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_TAG_BINDINGS_TRACING_STUB_H diff --git a/google/cloud/resourcemanager/v3/internal/tag_holds_auth_decorator.cc b/google/cloud/resourcemanager/v3/internal/tag_holds_auth_decorator.cc index a3db0f70d7b3d..1435943190748 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_holds_auth_decorator.cc +++ b/google/cloud/resourcemanager/v3/internal/tag_holds_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/resourcemanager/v3/tag_holds.proto #include "google/cloud/resourcemanager/v3/internal/tag_holds_auth_decorator.h" -#include +#include "google/cloud/resourcemanager/v3/tag_holds.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -144,3 +147,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/tag_holds_auth_decorator.h b/google/cloud/resourcemanager/v3/internal/tag_holds_auth_decorator.h index 9f84d729c5202..a5bb75a23f10b 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_holds_auth_decorator.h +++ b/google/cloud/resourcemanager/v3/internal/tag_holds_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/resourcemanager/v3/internal/tag_holds_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -94,4 +97,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_TAG_HOLDS_AUTH_DECORATOR_H diff --git a/google/cloud/resourcemanager/v3/internal/tag_holds_connection_impl.h b/google/cloud/resourcemanager/v3/internal/tag_holds_connection_impl.h index 44f6ebdb9a222..150a4c78736ee 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_holds_connection_impl.h +++ b/google/cloud/resourcemanager/v3/internal/tag_holds_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/resourcemanager/v3/internal/tag_holds_logging_decorator.cc b/google/cloud/resourcemanager/v3/internal/tag_holds_logging_decorator.cc index 7a856bd9ad6a8..b0a0faf6cc661 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_holds_logging_decorator.cc +++ b/google/cloud/resourcemanager/v3/internal/tag_holds_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/resourcemanager/v3/tag_holds.proto #include "google/cloud/resourcemanager/v3/internal/tag_holds_logging_decorator.h" +#include "google/cloud/resourcemanager/v3/tag_holds.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -160,3 +163,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/tag_holds_logging_decorator.h b/google/cloud/resourcemanager/v3/internal/tag_holds_logging_decorator.h index b85d86a325324..670677731e278 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_holds_logging_decorator.h +++ b/google/cloud/resourcemanager/v3/internal/tag_holds_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/resourcemanager/v3/internal/tag_holds_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -94,4 +97,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_TAG_HOLDS_LOGGING_DECORATOR_H diff --git a/google/cloud/resourcemanager/v3/internal/tag_holds_metadata_decorator.cc b/google/cloud/resourcemanager/v3/internal/tag_holds_metadata_decorator.cc index ed391988d002b..5a3aeb5d9e0a5 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_holds_metadata_decorator.cc +++ b/google/cloud/resourcemanager/v3/internal/tag_holds_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/resourcemanager/v3/tag_holds.proto #include "google/cloud/resourcemanager/v3/internal/tag_holds_metadata_decorator.h" +#include "google/cloud/resourcemanager/v3/tag_holds.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -141,3 +145,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/tag_holds_metadata_decorator.h b/google/cloud/resourcemanager/v3/internal/tag_holds_metadata_decorator.h index 45b426c90b5b0..0e8c0f470ffd3 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_holds_metadata_decorator.h +++ b/google/cloud/resourcemanager/v3/internal/tag_holds_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/resourcemanager/v3/internal/tag_holds_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -99,4 +102,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_TAG_HOLDS_METADATA_DECORATOR_H diff --git a/google/cloud/resourcemanager/v3/internal/tag_holds_option_defaults.cc b/google/cloud/resourcemanager/v3/internal/tag_holds_option_defaults.cc index 525e92f6b2379..44d3de55aa00c 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_holds_option_defaults.cc +++ b/google/cloud/resourcemanager/v3/internal/tag_holds_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/resourcemanager/v3/internal/tag_holds_option_defaults.h" #include "google/cloud/resourcemanager/v3/tag_holds_connection.h" #include "google/cloud/resourcemanager/v3/tag_holds_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -45,7 +45,7 @@ Options TagHoldsDefaultOptions(std::string const& location, Options options) { if (!options.has()) { options.set( resourcemanager_v3::TagHoldsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/resourcemanager/v3/internal/tag_holds_stub.cc b/google/cloud/resourcemanager/v3/internal/tag_holds_stub.cc index e737b5b1aa48c..233aee8119fa9 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_holds_stub.cc +++ b/google/cloud/resourcemanager/v3/internal/tag_holds_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/resourcemanager/v3/tag_holds.proto #include "google/cloud/resourcemanager/v3/internal/tag_holds_stub.h" +#include "google/cloud/resourcemanager/v3/tag_holds.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -157,3 +160,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/tag_holds_stub.h b/google/cloud/resourcemanager/v3/internal/tag_holds_stub.h index e95286d3fc407..23bc39d288c08 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_holds_stub.h +++ b/google/cloud/resourcemanager/v3/internal/tag_holds_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_TAG_HOLDS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_TAG_HOLDS_STUB_H +#include "google/cloud/resourcemanager/v3/tag_holds.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -152,4 +155,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_TAG_HOLDS_STUB_H diff --git a/google/cloud/resourcemanager/v3/internal/tag_holds_stub_factory.cc b/google/cloud/resourcemanager/v3/internal/tag_holds_stub_factory.cc index e337c837a09e8..62288542d1fec 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_holds_stub_factory.cc +++ b/google/cloud/resourcemanager/v3/internal/tag_holds_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/resourcemanager/v3/internal/tag_holds_metadata_decorator.h" #include "google/cloud/resourcemanager/v3/internal/tag_holds_stub.h" #include "google/cloud/resourcemanager/v3/internal/tag_holds_tracing_stub.h" +#include "google/cloud/resourcemanager/v3/tag_holds.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/tag_holds_stub_factory.h b/google/cloud/resourcemanager/v3/internal/tag_holds_stub_factory.h index 5b6b9c06abc8c..c3a91c4c696d6 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_holds_stub_factory.h +++ b/google/cloud/resourcemanager/v3/internal/tag_holds_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_TAG_HOLDS_STUB_FACTORY_H diff --git a/google/cloud/resourcemanager/v3/internal/tag_holds_tracing_connection.cc b/google/cloud/resourcemanager/v3/internal/tag_holds_tracing_connection.cc index 7712c9dd2a6cf..6cf2e944e2f6d 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_holds_tracing_connection.cc +++ b/google/cloud/resourcemanager/v3/internal/tag_holds_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace resourcemanager_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TagHoldsTracingConnection::TagHoldsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -110,16 +108,12 @@ TagHoldsTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTagHoldsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/resourcemanager/v3/internal/tag_holds_tracing_connection.h b/google/cloud/resourcemanager/v3/internal/tag_holds_tracing_connection.h index 4485de39ff377..71a62dcd23852 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_holds_tracing_connection.h +++ b/google/cloud/resourcemanager/v3/internal/tag_holds_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace resourcemanager_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TagHoldsTracingConnection : public resourcemanager_v3::TagHoldsConnection { public: @@ -74,8 +72,6 @@ class TagHoldsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/resourcemanager/v3/internal/tag_holds_tracing_stub.cc b/google/cloud/resourcemanager/v3/internal/tag_holds_tracing_stub.cc index 0a590f2805da6..2661a9daff124 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_holds_tracing_stub.cc +++ b/google/cloud/resourcemanager/v3/internal/tag_holds_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TagHoldsTracingStub::TagHoldsTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -132,18 +133,14 @@ future TagHoldsTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTagHoldsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/tag_holds_tracing_stub.h b/google/cloud/resourcemanager/v3/internal/tag_holds_tracing_stub.h index 7b43a9b0147c6..831aabd74d8ad 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_holds_tracing_stub.h +++ b/google/cloud/resourcemanager/v3/internal/tag_holds_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TagHoldsTracingStub : public TagHoldsStub { public: ~TagHoldsTracingStub() override = default; @@ -89,8 +90,6 @@ class TagHoldsTracingStub : public TagHoldsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -105,4 +104,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_TAG_HOLDS_TRACING_STUB_H diff --git a/google/cloud/resourcemanager/v3/internal/tag_keys_auth_decorator.cc b/google/cloud/resourcemanager/v3/internal/tag_keys_auth_decorator.cc index fae3364235f90..042b6518e4c2c 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_keys_auth_decorator.cc +++ b/google/cloud/resourcemanager/v3/internal/tag_keys_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/resourcemanager/v3/tag_keys.proto #include "google/cloud/resourcemanager/v3/internal/tag_keys_auth_decorator.h" -#include +#include "google/cloud/resourcemanager/v3/tag_keys.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -211,3 +214,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/tag_keys_auth_decorator.h b/google/cloud/resourcemanager/v3/internal/tag_keys_auth_decorator.h index 5179f8b3c1a24..2ddef5a898097 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_keys_auth_decorator.h +++ b/google/cloud/resourcemanager/v3/internal/tag_keys_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/resourcemanager/v3/internal/tag_keys_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -128,4 +131,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_TAG_KEYS_AUTH_DECORATOR_H diff --git a/google/cloud/resourcemanager/v3/internal/tag_keys_connection_impl.h b/google/cloud/resourcemanager/v3/internal/tag_keys_connection_impl.h index e27ba357012bd..516bbde8f34fa 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_keys_connection_impl.h +++ b/google/cloud/resourcemanager/v3/internal/tag_keys_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/resourcemanager/v3/internal/tag_keys_logging_decorator.cc b/google/cloud/resourcemanager/v3/internal/tag_keys_logging_decorator.cc index 529f22f4fed9e..fb6abb11dc47f 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_keys_logging_decorator.cc +++ b/google/cloud/resourcemanager/v3/internal/tag_keys_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/resourcemanager/v3/tag_keys.proto #include "google/cloud/resourcemanager/v3/internal/tag_keys_logging_decorator.h" +#include "google/cloud/resourcemanager/v3/tag_keys.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -252,3 +255,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/tag_keys_logging_decorator.h b/google/cloud/resourcemanager/v3/internal/tag_keys_logging_decorator.h index 38fefd78473fb..050f2f21db8c6 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_keys_logging_decorator.h +++ b/google/cloud/resourcemanager/v3/internal/tag_keys_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/resourcemanager/v3/internal/tag_keys_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -128,4 +131,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_TAG_KEYS_LOGGING_DECORATOR_H diff --git a/google/cloud/resourcemanager/v3/internal/tag_keys_metadata_decorator.cc b/google/cloud/resourcemanager/v3/internal/tag_keys_metadata_decorator.cc index 220c2cb9d4c98..f8572f7cb1562 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_keys_metadata_decorator.cc +++ b/google/cloud/resourcemanager/v3/internal/tag_keys_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/resourcemanager/v3/tag_keys.proto #include "google/cloud/resourcemanager/v3/internal/tag_keys_metadata_decorator.h" +#include "google/cloud/resourcemanager/v3/tag_keys.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -205,3 +209,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/tag_keys_metadata_decorator.h b/google/cloud/resourcemanager/v3/internal/tag_keys_metadata_decorator.h index 8dbefce59b10b..54031ba7d605e 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_keys_metadata_decorator.h +++ b/google/cloud/resourcemanager/v3/internal/tag_keys_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/resourcemanager/v3/internal/tag_keys_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -133,4 +136,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_TAG_KEYS_METADATA_DECORATOR_H diff --git a/google/cloud/resourcemanager/v3/internal/tag_keys_option_defaults.cc b/google/cloud/resourcemanager/v3/internal/tag_keys_option_defaults.cc index 10d3b9b6de000..9a973beb9b4a6 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_keys_option_defaults.cc +++ b/google/cloud/resourcemanager/v3/internal/tag_keys_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/resourcemanager/v3/internal/tag_keys_option_defaults.h" #include "google/cloud/resourcemanager/v3/tag_keys_connection.h" #include "google/cloud/resourcemanager/v3/tag_keys_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -45,7 +45,7 @@ Options TagKeysDefaultOptions(std::string const& location, Options options) { if (!options.has()) { options.set( resourcemanager_v3::TagKeysLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/resourcemanager/v3/internal/tag_keys_stub.cc b/google/cloud/resourcemanager/v3/internal/tag_keys_stub.cc index 7d5c5340e4dc7..6069587d490c7 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_keys_stub.cc +++ b/google/cloud/resourcemanager/v3/internal/tag_keys_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/resourcemanager/v3/tag_keys.proto #include "google/cloud/resourcemanager/v3/internal/tag_keys_stub.h" +#include "google/cloud/resourcemanager/v3/tag_keys.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -246,3 +249,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/tag_keys_stub.h b/google/cloud/resourcemanager/v3/internal/tag_keys_stub.h index 550cb7d3ad372..43558e453b61d 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_keys_stub.h +++ b/google/cloud/resourcemanager/v3/internal/tag_keys_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_TAG_KEYS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_TAG_KEYS_STUB_H +#include "google/cloud/resourcemanager/v3/tag_keys.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -221,4 +224,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_TAG_KEYS_STUB_H diff --git a/google/cloud/resourcemanager/v3/internal/tag_keys_stub_factory.cc b/google/cloud/resourcemanager/v3/internal/tag_keys_stub_factory.cc index 68a9d77e2306c..d72d903b90def 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_keys_stub_factory.cc +++ b/google/cloud/resourcemanager/v3/internal/tag_keys_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/resourcemanager/v3/internal/tag_keys_metadata_decorator.h" #include "google/cloud/resourcemanager/v3/internal/tag_keys_stub.h" #include "google/cloud/resourcemanager/v3/internal/tag_keys_tracing_stub.h" +#include "google/cloud/resourcemanager/v3/tag_keys.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/tag_keys_stub_factory.h b/google/cloud/resourcemanager/v3/internal/tag_keys_stub_factory.h index 108179a690357..4a2840deb3fdd 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_keys_stub_factory.h +++ b/google/cloud/resourcemanager/v3/internal/tag_keys_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_TAG_KEYS_STUB_FACTORY_H diff --git a/google/cloud/resourcemanager/v3/internal/tag_keys_tracing_connection.cc b/google/cloud/resourcemanager/v3/internal/tag_keys_tracing_connection.cc index a9ad61dd32669..ce56ae8956735 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_keys_tracing_connection.cc +++ b/google/cloud/resourcemanager/v3/internal/tag_keys_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace resourcemanager_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TagKeysTracingConnection::TagKeysTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -178,16 +176,12 @@ StatusOr TagKeysTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTagKeysTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/resourcemanager/v3/internal/tag_keys_tracing_connection.h b/google/cloud/resourcemanager/v3/internal/tag_keys_tracing_connection.h index ad0c93454f6e8..6271420ace55d 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_keys_tracing_connection.h +++ b/google/cloud/resourcemanager/v3/internal/tag_keys_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace resourcemanager_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TagKeysTracingConnection : public resourcemanager_v3::TagKeysConnection { public: ~TagKeysTracingConnection() override = default; @@ -102,8 +100,6 @@ class TagKeysTracingConnection : public resourcemanager_v3::TagKeysConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/resourcemanager/v3/internal/tag_keys_tracing_stub.cc b/google/cloud/resourcemanager/v3/internal/tag_keys_tracing_stub.cc index 837efae9e26c9..7cdfea75dd4f8 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_keys_tracing_stub.cc +++ b/google/cloud/resourcemanager/v3/internal/tag_keys_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TagKeysTracingStub::TagKeysTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -216,18 +217,14 @@ future TagKeysTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTagKeysTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/tag_keys_tracing_stub.h b/google/cloud/resourcemanager/v3/internal/tag_keys_tracing_stub.h index c74c3b0ba351c..e74128225f00b 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_keys_tracing_stub.h +++ b/google/cloud/resourcemanager/v3/internal/tag_keys_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TagKeysTracingStub : public TagKeysStub { public: ~TagKeysTracingStub() override = default; @@ -123,8 +124,6 @@ class TagKeysTracingStub : public TagKeysStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -139,4 +138,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_TAG_KEYS_TRACING_STUB_H diff --git a/google/cloud/resourcemanager/v3/internal/tag_values_auth_decorator.cc b/google/cloud/resourcemanager/v3/internal/tag_values_auth_decorator.cc index b4cfe228b197a..267c29e801392 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_values_auth_decorator.cc +++ b/google/cloud/resourcemanager/v3/internal/tag_values_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/resourcemanager/v3/tag_values.proto #include "google/cloud/resourcemanager/v3/internal/tag_values_auth_decorator.h" -#include +#include "google/cloud/resourcemanager/v3/tag_values.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -216,3 +219,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/tag_values_auth_decorator.h b/google/cloud/resourcemanager/v3/internal/tag_values_auth_decorator.h index 4b278fbe24ded..7fa445085fa76 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_values_auth_decorator.h +++ b/google/cloud/resourcemanager/v3/internal/tag_values_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/resourcemanager/v3/internal/tag_values_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -128,4 +131,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_TAG_VALUES_AUTH_DECORATOR_H diff --git a/google/cloud/resourcemanager/v3/internal/tag_values_connection_impl.h b/google/cloud/resourcemanager/v3/internal/tag_values_connection_impl.h index 06581bde0b29e..a1e719c398e6b 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_values_connection_impl.h +++ b/google/cloud/resourcemanager/v3/internal/tag_values_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/resourcemanager/v3/internal/tag_values_logging_decorator.cc b/google/cloud/resourcemanager/v3/internal/tag_values_logging_decorator.cc index 044c0af2cc0ca..112bc42ad3c26 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_values_logging_decorator.cc +++ b/google/cloud/resourcemanager/v3/internal/tag_values_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/resourcemanager/v3/tag_values.proto #include "google/cloud/resourcemanager/v3/internal/tag_values_logging_decorator.h" +#include "google/cloud/resourcemanager/v3/tag_values.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -252,3 +255,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/tag_values_logging_decorator.h b/google/cloud/resourcemanager/v3/internal/tag_values_logging_decorator.h index f16fcf0db7e79..6779bb1f6a46a 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_values_logging_decorator.h +++ b/google/cloud/resourcemanager/v3/internal/tag_values_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/resourcemanager/v3/internal/tag_values_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -128,4 +131,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_TAG_VALUES_LOGGING_DECORATOR_H diff --git a/google/cloud/resourcemanager/v3/internal/tag_values_metadata_decorator.cc b/google/cloud/resourcemanager/v3/internal/tag_values_metadata_decorator.cc index 2b59196d5934e..e72500d04cf26 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_values_metadata_decorator.cc +++ b/google/cloud/resourcemanager/v3/internal/tag_values_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/resourcemanager/v3/tag_values.proto #include "google/cloud/resourcemanager/v3/internal/tag_values_metadata_decorator.h" +#include "google/cloud/resourcemanager/v3/tag_values.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -206,3 +210,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/tag_values_metadata_decorator.h b/google/cloud/resourcemanager/v3/internal/tag_values_metadata_decorator.h index ff7334169b932..07ecac15a1384 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_values_metadata_decorator.h +++ b/google/cloud/resourcemanager/v3/internal/tag_values_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/resourcemanager/v3/internal/tag_values_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -133,4 +136,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_TAG_VALUES_METADATA_DECORATOR_H diff --git a/google/cloud/resourcemanager/v3/internal/tag_values_option_defaults.cc b/google/cloud/resourcemanager/v3/internal/tag_values_option_defaults.cc index 364ae1551ec92..dbb57113f6838 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_values_option_defaults.cc +++ b/google/cloud/resourcemanager/v3/internal/tag_values_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/resourcemanager/v3/internal/tag_values_option_defaults.h" #include "google/cloud/resourcemanager/v3/tag_values_connection.h" #include "google/cloud/resourcemanager/v3/tag_values_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -45,7 +45,7 @@ Options TagValuesDefaultOptions(std::string const& location, Options options) { if (!options.has()) { options.set( resourcemanager_v3::TagValuesLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/resourcemanager/v3/internal/tag_values_stub.cc b/google/cloud/resourcemanager/v3/internal/tag_values_stub.cc index 0c4f284bb2ede..3382935f3d6cd 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_values_stub.cc +++ b/google/cloud/resourcemanager/v3/internal/tag_values_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/resourcemanager/v3/tag_values.proto #include "google/cloud/resourcemanager/v3/internal/tag_values_stub.h" +#include "google/cloud/resourcemanager/v3/tag_values.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -246,3 +249,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/tag_values_stub.h b/google/cloud/resourcemanager/v3/internal/tag_values_stub.h index 13c978c154085..fe6ffd23a2bf2 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_values_stub.h +++ b/google/cloud/resourcemanager/v3/internal/tag_values_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_TAG_VALUES_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_TAG_VALUES_STUB_H +#include "google/cloud/resourcemanager/v3/tag_values.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -222,4 +225,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_TAG_VALUES_STUB_H diff --git a/google/cloud/resourcemanager/v3/internal/tag_values_stub_factory.cc b/google/cloud/resourcemanager/v3/internal/tag_values_stub_factory.cc index 59d039c5d16ab..e791e1903ff02 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_values_stub_factory.cc +++ b/google/cloud/resourcemanager/v3/internal/tag_values_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/resourcemanager/v3/internal/tag_values_metadata_decorator.h" #include "google/cloud/resourcemanager/v3/internal/tag_values_stub.h" #include "google/cloud/resourcemanager/v3/internal/tag_values_tracing_stub.h" +#include "google/cloud/resourcemanager/v3/tag_values.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/tag_values_stub_factory.h b/google/cloud/resourcemanager/v3/internal/tag_values_stub_factory.h index 42d596f14f024..5f5d47668b481 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_values_stub_factory.h +++ b/google/cloud/resourcemanager/v3/internal/tag_values_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_TAG_VALUES_STUB_FACTORY_H diff --git a/google/cloud/resourcemanager/v3/internal/tag_values_tracing_connection.cc b/google/cloud/resourcemanager/v3/internal/tag_values_tracing_connection.cc index cc20472b63299..c96bcda8a4c1e 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_values_tracing_connection.cc +++ b/google/cloud/resourcemanager/v3/internal/tag_values_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace resourcemanager_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TagValuesTracingConnection::TagValuesTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -185,16 +183,12 @@ TagValuesTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTagValuesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/resourcemanager/v3/internal/tag_values_tracing_connection.h b/google/cloud/resourcemanager/v3/internal/tag_values_tracing_connection.h index 53bc2779c17a3..68b1b92a63d94 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_values_tracing_connection.h +++ b/google/cloud/resourcemanager/v3/internal/tag_values_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace resourcemanager_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TagValuesTracingConnection : public resourcemanager_v3::TagValuesConnection { public: @@ -104,8 +102,6 @@ class TagValuesTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/resourcemanager/v3/internal/tag_values_tracing_stub.cc b/google/cloud/resourcemanager/v3/internal/tag_values_tracing_stub.cc index 6d4ef6b6a9037..ffb6e6cebb92b 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_values_tracing_stub.cc +++ b/google/cloud/resourcemanager/v3/internal/tag_values_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TagValuesTracingStub::TagValuesTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -219,18 +220,14 @@ future TagValuesTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTagValuesTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace resourcemanager_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/resourcemanager/v3/internal/tag_values_tracing_stub.h b/google/cloud/resourcemanager/v3/internal/tag_values_tracing_stub.h index e02a3bcf0ac63..9cb40d8de4030 100644 --- a/google/cloud/resourcemanager/v3/internal/tag_values_tracing_stub.h +++ b/google/cloud/resourcemanager/v3/internal/tag_values_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace resourcemanager_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TagValuesTracingStub : public TagValuesStub { public: ~TagValuesTracingStub() override = default; @@ -123,8 +124,6 @@ class TagValuesTracingStub : public TagValuesStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -139,4 +138,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_INTERNAL_TAG_VALUES_TRACING_STUB_H diff --git a/google/cloud/resourcemanager/v3/organizations_connection.h b/google/cloud/resourcemanager/v3/organizations_connection.h index a4c93743610a8..51dbe07a01c66 100644 --- a/google/cloud/resourcemanager/v3/organizations_connection.h +++ b/google/cloud/resourcemanager/v3/organizations_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_ORGANIZATIONS_CONNECTION_H #include "google/cloud/resourcemanager/v3/internal/organizations_retry_traits.h" +#include "google/cloud/resourcemanager/v3/organizations.pb.h" #include "google/cloud/resourcemanager/v3/organizations_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/resourcemanager/v3/organizations_connection_idempotency_policy.h b/google/cloud/resourcemanager/v3/organizations_connection_idempotency_policy.h index 291d35217cf59..b6612e0ec6eec 100644 --- a/google/cloud/resourcemanager/v3/organizations_connection_idempotency_policy.h +++ b/google/cloud/resourcemanager/v3/organizations_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_ORGANIZATIONS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_ORGANIZATIONS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/resourcemanager/v3/organizations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/resourcemanager/v3/projects_client.h b/google/cloud/resourcemanager/v3/projects_client.h index 1c5e6470389c1..a8a26af3ae247 100644 --- a/google/cloud/resourcemanager/v3/projects_client.h +++ b/google/cloud/resourcemanager/v3/projects_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/resourcemanager/v3/projects_connection.h b/google/cloud/resourcemanager/v3/projects_connection.h index 9a67a0467220f..3d2e222e455c0 100644 --- a/google/cloud/resourcemanager/v3/projects_connection.h +++ b/google/cloud/resourcemanager/v3/projects_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_PROJECTS_CONNECTION_H #include "google/cloud/resourcemanager/v3/internal/projects_retry_traits.h" +#include "google/cloud/resourcemanager/v3/projects.pb.h" #include "google/cloud/resourcemanager/v3/projects_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/resourcemanager/v3/projects_connection_idempotency_policy.h b/google/cloud/resourcemanager/v3/projects_connection_idempotency_policy.h index 0ac4b06c7d67d..e3e2791224510 100644 --- a/google/cloud/resourcemanager/v3/projects_connection_idempotency_policy.h +++ b/google/cloud/resourcemanager/v3/projects_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_PROJECTS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_PROJECTS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/resourcemanager/v3/projects.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/resourcemanager/v3/tag_bindings_client.h b/google/cloud/resourcemanager/v3/tag_bindings_client.h index d7b1656c417b1..c1f875e356551 100644 --- a/google/cloud/resourcemanager/v3/tag_bindings_client.h +++ b/google/cloud/resourcemanager/v3/tag_bindings_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/resourcemanager/v3/tag_bindings_connection.h b/google/cloud/resourcemanager/v3/tag_bindings_connection.h index 123c51f5ca76f..99d53b86f1420 100644 --- a/google/cloud/resourcemanager/v3/tag_bindings_connection.h +++ b/google/cloud/resourcemanager/v3/tag_bindings_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_TAG_BINDINGS_CONNECTION_H #include "google/cloud/resourcemanager/v3/internal/tag_bindings_retry_traits.h" +#include "google/cloud/resourcemanager/v3/tag_bindings.pb.h" #include "google/cloud/resourcemanager/v3/tag_bindings_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/resourcemanager/v3/tag_bindings_connection_idempotency_policy.h b/google/cloud/resourcemanager/v3/tag_bindings_connection_idempotency_policy.h index 08b3c50fe5f24..30db957ec7988 100644 --- a/google/cloud/resourcemanager/v3/tag_bindings_connection_idempotency_policy.h +++ b/google/cloud/resourcemanager/v3/tag_bindings_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_TAG_BINDINGS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_TAG_BINDINGS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/resourcemanager/v3/tag_bindings.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/resourcemanager/v3/tag_holds_client.h b/google/cloud/resourcemanager/v3/tag_holds_client.h index e3fe6251b4624..022cbfc381afd 100644 --- a/google/cloud/resourcemanager/v3/tag_holds_client.h +++ b/google/cloud/resourcemanager/v3/tag_holds_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/resourcemanager/v3/tag_holds_connection.h b/google/cloud/resourcemanager/v3/tag_holds_connection.h index c9ef69a2feba1..98943d28aee55 100644 --- a/google/cloud/resourcemanager/v3/tag_holds_connection.h +++ b/google/cloud/resourcemanager/v3/tag_holds_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_TAG_HOLDS_CONNECTION_H #include "google/cloud/resourcemanager/v3/internal/tag_holds_retry_traits.h" +#include "google/cloud/resourcemanager/v3/tag_holds.pb.h" #include "google/cloud/resourcemanager/v3/tag_holds_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/resourcemanager/v3/tag_holds_connection_idempotency_policy.h b/google/cloud/resourcemanager/v3/tag_holds_connection_idempotency_policy.h index fafa0875801a4..31e39c2e6f2a7 100644 --- a/google/cloud/resourcemanager/v3/tag_holds_connection_idempotency_policy.h +++ b/google/cloud/resourcemanager/v3/tag_holds_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_TAG_HOLDS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_TAG_HOLDS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/resourcemanager/v3/tag_holds.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/resourcemanager/v3/tag_keys_client.h b/google/cloud/resourcemanager/v3/tag_keys_client.h index 97ca149b0ede1..20eaf2d84b3ac 100644 --- a/google/cloud/resourcemanager/v3/tag_keys_client.h +++ b/google/cloud/resourcemanager/v3/tag_keys_client.h @@ -28,7 +28,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/resourcemanager/v3/tag_keys_connection.h b/google/cloud/resourcemanager/v3/tag_keys_connection.h index 66325751689a5..67df67e239439 100644 --- a/google/cloud/resourcemanager/v3/tag_keys_connection.h +++ b/google/cloud/resourcemanager/v3/tag_keys_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_TAG_KEYS_CONNECTION_H #include "google/cloud/resourcemanager/v3/internal/tag_keys_retry_traits.h" +#include "google/cloud/resourcemanager/v3/tag_keys.pb.h" #include "google/cloud/resourcemanager/v3/tag_keys_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/resourcemanager/v3/tag_keys_connection_idempotency_policy.h b/google/cloud/resourcemanager/v3/tag_keys_connection_idempotency_policy.h index 846bd5a5b766e..ffa1762198835 100644 --- a/google/cloud/resourcemanager/v3/tag_keys_connection_idempotency_policy.h +++ b/google/cloud/resourcemanager/v3/tag_keys_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_TAG_KEYS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_TAG_KEYS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/resourcemanager/v3/tag_keys.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/resourcemanager/v3/tag_values_client.h b/google/cloud/resourcemanager/v3/tag_values_client.h index 4b2d5ab5cc8b6..408551f49cbdf 100644 --- a/google/cloud/resourcemanager/v3/tag_values_client.h +++ b/google/cloud/resourcemanager/v3/tag_values_client.h @@ -28,7 +28,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/resourcemanager/v3/tag_values_connection.h b/google/cloud/resourcemanager/v3/tag_values_connection.h index f278e87acef8a..48e3064cd450b 100644 --- a/google/cloud/resourcemanager/v3/tag_values_connection.h +++ b/google/cloud/resourcemanager/v3/tag_values_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_TAG_VALUES_CONNECTION_H #include "google/cloud/resourcemanager/v3/internal/tag_values_retry_traits.h" +#include "google/cloud/resourcemanager/v3/tag_values.pb.h" #include "google/cloud/resourcemanager/v3/tag_values_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/resourcemanager/v3/tag_values_connection_idempotency_policy.h b/google/cloud/resourcemanager/v3/tag_values_connection_idempotency_policy.h index d2dddbd791db3..7b94014527264 100644 --- a/google/cloud/resourcemanager/v3/tag_values_connection_idempotency_policy.h +++ b/google/cloud/resourcemanager/v3/tag_values_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_TAG_VALUES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RESOURCEMANAGER_V3_TAG_VALUES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/resourcemanager/v3/tag_values.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/retail/BUILD.bazel b/google/cloud/retail/BUILD.bazel index 4481503e6194b..66ddfb8fe3f50 100644 --- a/google/cloud/retail/BUILD.bazel +++ b/google/cloud/retail/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v2/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/retail/v2:retail_cc_grpc", + "@googleapis//google/cloud/retail/v2:retail_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/retail/CMakeLists.txt b/google/cloud/retail/CMakeLists.txt index be28238a9467a..3fae2da7d02ff 100644 --- a/google/cloud/retail/CMakeLists.txt +++ b/google/cloud/retail/CMakeLists.txt @@ -16,8 +16,7 @@ include(GoogleCloudCppLibrary) -google_cloud_cpp_add_gapic_library(retail "Retail API" SERVICE_DIRS "__EMPTY__" - "v2/") +google_cloud_cpp_add_gapic_library(retail "Retail API" SERVICE_DIRS "v2/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(retail_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/retail/catalog_client.h b/google/cloud/retail/catalog_client.h deleted file mode 100644 index 5bf15bb2f33b4..0000000000000 --- a/google/cloud/retail/catalog_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/retail/v2/catalog_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_CATALOG_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_CATALOG_CLIENT_H - -#include "google/cloud/retail/catalog_connection.h" -#include "google/cloud/retail/v2/catalog_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in retail_v2 instead of the aliases defined in -/// this namespace. -namespace retail { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use retail_v2::CatalogServiceClient directly. -using ::google::cloud::retail_v2::CatalogServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace retail -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_CATALOG_CLIENT_H diff --git a/google/cloud/retail/catalog_connection.h b/google/cloud/retail/catalog_connection.h deleted file mode 100644 index 3c54b08608104..0000000000000 --- a/google/cloud/retail/catalog_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/retail/v2/catalog_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_CATALOG_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_CATALOG_CONNECTION_H - -#include "google/cloud/retail/catalog_connection_idempotency_policy.h" -#include "google/cloud/retail/v2/catalog_connection.h" - -namespace google { -namespace cloud { -namespace retail { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use retail_v2::MakeCatalogServiceConnection directly. -using ::google::cloud::retail_v2::MakeCatalogServiceConnection; - -/// @deprecated Use retail_v2::CatalogServiceConnection directly. -using ::google::cloud::retail_v2::CatalogServiceConnection; - -/// @deprecated Use retail_v2::CatalogServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::retail_v2::CatalogServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use retail_v2::CatalogServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::retail_v2::CatalogServiceLimitedTimeRetryPolicy; - -/// @deprecated Use retail_v2::CatalogServiceRetryPolicy directly. -using ::google::cloud::retail_v2::CatalogServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace retail -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_CATALOG_CONNECTION_H diff --git a/google/cloud/retail/catalog_connection_idempotency_policy.h b/google/cloud/retail/catalog_connection_idempotency_policy.h deleted file mode 100644 index 32b6e463b179f..0000000000000 --- a/google/cloud/retail/catalog_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/retail/v2/catalog_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_CATALOG_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_CATALOG_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/retail/v2/catalog_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace retail { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// retail_v2::MakeDefaultCatalogServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::retail_v2:: - MakeDefaultCatalogServiceConnectionIdempotencyPolicy; - -/// @deprecated Use retail_v2::CatalogServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::retail_v2::CatalogServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace retail -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_CATALOG_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/retail/catalog_options.h b/google/cloud/retail/catalog_options.h deleted file mode 100644 index 6720890fab1e1..0000000000000 --- a/google/cloud/retail/catalog_options.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/retail/v2/catalog_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_CATALOG_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_CATALOG_OPTIONS_H - -#include "google/cloud/retail/catalog_connection.h" -#include "google/cloud/retail/catalog_connection_idempotency_policy.h" -#include "google/cloud/retail/v2/catalog_options.h" - -namespace google { -namespace cloud { -namespace retail { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use retail_v2::CatalogServiceBackoffPolicyOption directly. -using ::google::cloud::retail_v2::CatalogServiceBackoffPolicyOption; - -/// @deprecated Use retail_v2::CatalogServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::retail_v2:: - CatalogServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use retail_v2::CatalogServicePolicyOptionList directly. -using ::google::cloud::retail_v2::CatalogServicePolicyOptionList; - -/// @deprecated Use retail_v2::CatalogServiceRetryPolicyOption directly. -using ::google::cloud::retail_v2::CatalogServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace retail -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_CATALOG_OPTIONS_H diff --git a/google/cloud/retail/completion_client.h b/google/cloud/retail/completion_client.h deleted file mode 100644 index 150c0be77b99a..0000000000000 --- a/google/cloud/retail/completion_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/retail/v2/completion_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_COMPLETION_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_COMPLETION_CLIENT_H - -#include "google/cloud/retail/completion_connection.h" -#include "google/cloud/retail/v2/completion_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in retail_v2 instead of the aliases defined in -/// this namespace. -namespace retail { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use retail_v2::CompletionServiceClient directly. -using ::google::cloud::retail_v2::CompletionServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace retail -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_COMPLETION_CLIENT_H diff --git a/google/cloud/retail/completion_connection.h b/google/cloud/retail/completion_connection.h deleted file mode 100644 index de3992ee9c8d7..0000000000000 --- a/google/cloud/retail/completion_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/retail/v2/completion_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_COMPLETION_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_COMPLETION_CONNECTION_H - -#include "google/cloud/retail/completion_connection_idempotency_policy.h" -#include "google/cloud/retail/v2/completion_connection.h" - -namespace google { -namespace cloud { -namespace retail { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use retail_v2::MakeCompletionServiceConnection directly. -using ::google::cloud::retail_v2::MakeCompletionServiceConnection; - -/// @deprecated Use retail_v2::CompletionServiceConnection directly. -using ::google::cloud::retail_v2::CompletionServiceConnection; - -/// @deprecated Use retail_v2::CompletionServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::retail_v2::CompletionServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use retail_v2::CompletionServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::retail_v2::CompletionServiceLimitedTimeRetryPolicy; - -/// @deprecated Use retail_v2::CompletionServiceRetryPolicy directly. -using ::google::cloud::retail_v2::CompletionServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace retail -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_COMPLETION_CONNECTION_H diff --git a/google/cloud/retail/completion_connection_idempotency_policy.h b/google/cloud/retail/completion_connection_idempotency_policy.h deleted file mode 100644 index 5a6c4dd5276c5..0000000000000 --- a/google/cloud/retail/completion_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/retail/v2/completion_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_COMPLETION_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_COMPLETION_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/retail/v2/completion_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace retail { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// retail_v2::MakeDefaultCompletionServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::retail_v2:: - MakeDefaultCompletionServiceConnectionIdempotencyPolicy; - -/// @deprecated Use retail_v2::CompletionServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::retail_v2::CompletionServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace retail -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_COMPLETION_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/retail/completion_options.h b/google/cloud/retail/completion_options.h deleted file mode 100644 index eab9c65ab81fd..0000000000000 --- a/google/cloud/retail/completion_options.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/retail/v2/completion_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_COMPLETION_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_COMPLETION_OPTIONS_H - -#include "google/cloud/retail/completion_connection.h" -#include "google/cloud/retail/completion_connection_idempotency_policy.h" -#include "google/cloud/retail/v2/completion_options.h" - -namespace google { -namespace cloud { -namespace retail { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use retail_v2::CompletionServicePollingPolicyOption directly. -using ::google::cloud::retail_v2::CompletionServicePollingPolicyOption; - -/// @deprecated Use retail_v2::CompletionServiceBackoffPolicyOption directly. -using ::google::cloud::retail_v2::CompletionServiceBackoffPolicyOption; - -/// @deprecated Use -/// retail_v2::CompletionServiceConnectionIdempotencyPolicyOption directly. -using ::google::cloud::retail_v2:: - CompletionServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use retail_v2::CompletionServicePolicyOptionList directly. -using ::google::cloud::retail_v2::CompletionServicePolicyOptionList; - -/// @deprecated Use retail_v2::CompletionServiceRetryPolicyOption directly. -using ::google::cloud::retail_v2::CompletionServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace retail -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_COMPLETION_OPTIONS_H diff --git a/google/cloud/retail/mocks/mock_catalog_connection.h b/google/cloud/retail/mocks/mock_catalog_connection.h deleted file mode 100644 index 09937f7ef4027..0000000000000 --- a/google/cloud/retail/mocks/mock_catalog_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/retail/v2/catalog_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_MOCKS_MOCK_CATALOG_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_MOCKS_MOCK_CATALOG_CONNECTION_H - -#include "google/cloud/retail/catalog_connection.h" -#include "google/cloud/retail/v2/mocks/mock_catalog_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in retail_v2_mocks instead of the aliases -/// defined in this namespace. -namespace retail_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use retail_v2_mocks::MockCatalogServiceConnection directly. -using ::google::cloud::retail_v2_mocks::MockCatalogServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace retail_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_MOCKS_MOCK_CATALOG_CONNECTION_H diff --git a/google/cloud/retail/mocks/mock_completion_connection.h b/google/cloud/retail/mocks/mock_completion_connection.h deleted file mode 100644 index 0e393d0d53b27..0000000000000 --- a/google/cloud/retail/mocks/mock_completion_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/retail/v2/completion_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_MOCKS_MOCK_COMPLETION_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_MOCKS_MOCK_COMPLETION_CONNECTION_H - -#include "google/cloud/retail/completion_connection.h" -#include "google/cloud/retail/v2/mocks/mock_completion_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in retail_v2_mocks instead of the aliases -/// defined in this namespace. -namespace retail_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use retail_v2_mocks::MockCompletionServiceConnection directly. -using ::google::cloud::retail_v2_mocks::MockCompletionServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace retail_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_MOCKS_MOCK_COMPLETION_CONNECTION_H diff --git a/google/cloud/retail/mocks/mock_prediction_connection.h b/google/cloud/retail/mocks/mock_prediction_connection.h deleted file mode 100644 index 68c508cbaf8d8..0000000000000 --- a/google/cloud/retail/mocks/mock_prediction_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/retail/v2/prediction_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_MOCKS_MOCK_PREDICTION_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_MOCKS_MOCK_PREDICTION_CONNECTION_H - -#include "google/cloud/retail/prediction_connection.h" -#include "google/cloud/retail/v2/mocks/mock_prediction_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in retail_v2_mocks instead of the aliases -/// defined in this namespace. -namespace retail_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use retail_v2_mocks::MockPredictionServiceConnection directly. -using ::google::cloud::retail_v2_mocks::MockPredictionServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace retail_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_MOCKS_MOCK_PREDICTION_CONNECTION_H diff --git a/google/cloud/retail/mocks/mock_product_connection.h b/google/cloud/retail/mocks/mock_product_connection.h deleted file mode 100644 index d9248c5b7584c..0000000000000 --- a/google/cloud/retail/mocks/mock_product_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/retail/v2/product_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_MOCKS_MOCK_PRODUCT_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_MOCKS_MOCK_PRODUCT_CONNECTION_H - -#include "google/cloud/retail/product_connection.h" -#include "google/cloud/retail/v2/mocks/mock_product_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in retail_v2_mocks instead of the aliases -/// defined in this namespace. -namespace retail_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use retail_v2_mocks::MockProductServiceConnection directly. -using ::google::cloud::retail_v2_mocks::MockProductServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace retail_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_MOCKS_MOCK_PRODUCT_CONNECTION_H diff --git a/google/cloud/retail/mocks/mock_search_connection.h b/google/cloud/retail/mocks/mock_search_connection.h deleted file mode 100644 index db4dfca824873..0000000000000 --- a/google/cloud/retail/mocks/mock_search_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/retail/v2/search_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_MOCKS_MOCK_SEARCH_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_MOCKS_MOCK_SEARCH_CONNECTION_H - -#include "google/cloud/retail/search_connection.h" -#include "google/cloud/retail/v2/mocks/mock_search_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in retail_v2_mocks instead of the aliases -/// defined in this namespace. -namespace retail_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use retail_v2_mocks::MockSearchServiceConnection directly. -using ::google::cloud::retail_v2_mocks::MockSearchServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace retail_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_MOCKS_MOCK_SEARCH_CONNECTION_H diff --git a/google/cloud/retail/mocks/mock_user_event_connection.h b/google/cloud/retail/mocks/mock_user_event_connection.h deleted file mode 100644 index 3330e4924edf0..0000000000000 --- a/google/cloud/retail/mocks/mock_user_event_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/retail/v2/user_event_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_MOCKS_MOCK_USER_EVENT_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_MOCKS_MOCK_USER_EVENT_CONNECTION_H - -#include "google/cloud/retail/user_event_connection.h" -#include "google/cloud/retail/v2/mocks/mock_user_event_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in retail_v2_mocks instead of the aliases -/// defined in this namespace. -namespace retail_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use retail_v2_mocks::MockUserEventServiceConnection directly. -using ::google::cloud::retail_v2_mocks::MockUserEventServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace retail_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_MOCKS_MOCK_USER_EVENT_CONNECTION_H diff --git a/google/cloud/retail/prediction_client.h b/google/cloud/retail/prediction_client.h deleted file mode 100644 index 1b9c447f01fc6..0000000000000 --- a/google/cloud/retail/prediction_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/retail/v2/prediction_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_PREDICTION_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_PREDICTION_CLIENT_H - -#include "google/cloud/retail/prediction_connection.h" -#include "google/cloud/retail/v2/prediction_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in retail_v2 instead of the aliases defined in -/// this namespace. -namespace retail { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use retail_v2::PredictionServiceClient directly. -using ::google::cloud::retail_v2::PredictionServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace retail -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_PREDICTION_CLIENT_H diff --git a/google/cloud/retail/prediction_connection.h b/google/cloud/retail/prediction_connection.h deleted file mode 100644 index 3d38053c741d3..0000000000000 --- a/google/cloud/retail/prediction_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/retail/v2/prediction_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_PREDICTION_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_PREDICTION_CONNECTION_H - -#include "google/cloud/retail/prediction_connection_idempotency_policy.h" -#include "google/cloud/retail/v2/prediction_connection.h" - -namespace google { -namespace cloud { -namespace retail { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use retail_v2::MakePredictionServiceConnection directly. -using ::google::cloud::retail_v2::MakePredictionServiceConnection; - -/// @deprecated Use retail_v2::PredictionServiceConnection directly. -using ::google::cloud::retail_v2::PredictionServiceConnection; - -/// @deprecated Use retail_v2::PredictionServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::retail_v2::PredictionServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use retail_v2::PredictionServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::retail_v2::PredictionServiceLimitedTimeRetryPolicy; - -/// @deprecated Use retail_v2::PredictionServiceRetryPolicy directly. -using ::google::cloud::retail_v2::PredictionServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace retail -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_PREDICTION_CONNECTION_H diff --git a/google/cloud/retail/prediction_connection_idempotency_policy.h b/google/cloud/retail/prediction_connection_idempotency_policy.h deleted file mode 100644 index 85b9350df0136..0000000000000 --- a/google/cloud/retail/prediction_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/retail/v2/prediction_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_PREDICTION_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_PREDICTION_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/retail/v2/prediction_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace retail { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// retail_v2::MakeDefaultPredictionServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::retail_v2:: - MakeDefaultPredictionServiceConnectionIdempotencyPolicy; - -/// @deprecated Use retail_v2::PredictionServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::retail_v2::PredictionServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace retail -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_PREDICTION_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/retail/prediction_options.h b/google/cloud/retail/prediction_options.h deleted file mode 100644 index 255856f20cc6b..0000000000000 --- a/google/cloud/retail/prediction_options.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/retail/v2/prediction_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_PREDICTION_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_PREDICTION_OPTIONS_H - -#include "google/cloud/retail/prediction_connection.h" -#include "google/cloud/retail/prediction_connection_idempotency_policy.h" -#include "google/cloud/retail/v2/prediction_options.h" - -namespace google { -namespace cloud { -namespace retail { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use retail_v2::PredictionServiceBackoffPolicyOption directly. -using ::google::cloud::retail_v2::PredictionServiceBackoffPolicyOption; - -/// @deprecated Use -/// retail_v2::PredictionServiceConnectionIdempotencyPolicyOption directly. -using ::google::cloud::retail_v2:: - PredictionServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use retail_v2::PredictionServicePolicyOptionList directly. -using ::google::cloud::retail_v2::PredictionServicePolicyOptionList; - -/// @deprecated Use retail_v2::PredictionServiceRetryPolicyOption directly. -using ::google::cloud::retail_v2::PredictionServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace retail -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_PREDICTION_OPTIONS_H diff --git a/google/cloud/retail/product_client.h b/google/cloud/retail/product_client.h deleted file mode 100644 index 1345b7daed323..0000000000000 --- a/google/cloud/retail/product_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/retail/v2/product_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_PRODUCT_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_PRODUCT_CLIENT_H - -#include "google/cloud/retail/product_connection.h" -#include "google/cloud/retail/v2/product_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in retail_v2 instead of the aliases defined in -/// this namespace. -namespace retail { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use retail_v2::ProductServiceClient directly. -using ::google::cloud::retail_v2::ProductServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace retail -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_PRODUCT_CLIENT_H diff --git a/google/cloud/retail/product_connection.h b/google/cloud/retail/product_connection.h deleted file mode 100644 index 31a961ce64780..0000000000000 --- a/google/cloud/retail/product_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/retail/v2/product_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_PRODUCT_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_PRODUCT_CONNECTION_H - -#include "google/cloud/retail/product_connection_idempotency_policy.h" -#include "google/cloud/retail/v2/product_connection.h" - -namespace google { -namespace cloud { -namespace retail { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use retail_v2::MakeProductServiceConnection directly. -using ::google::cloud::retail_v2::MakeProductServiceConnection; - -/// @deprecated Use retail_v2::ProductServiceConnection directly. -using ::google::cloud::retail_v2::ProductServiceConnection; - -/// @deprecated Use retail_v2::ProductServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::retail_v2::ProductServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use retail_v2::ProductServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::retail_v2::ProductServiceLimitedTimeRetryPolicy; - -/// @deprecated Use retail_v2::ProductServiceRetryPolicy directly. -using ::google::cloud::retail_v2::ProductServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace retail -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_PRODUCT_CONNECTION_H diff --git a/google/cloud/retail/product_connection_idempotency_policy.h b/google/cloud/retail/product_connection_idempotency_policy.h deleted file mode 100644 index 705aa99d54e1f..0000000000000 --- a/google/cloud/retail/product_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/retail/v2/product_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_PRODUCT_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_PRODUCT_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/retail/v2/product_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace retail { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// retail_v2::MakeDefaultProductServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::retail_v2:: - MakeDefaultProductServiceConnectionIdempotencyPolicy; - -/// @deprecated Use retail_v2::ProductServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::retail_v2::ProductServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace retail -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_PRODUCT_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/retail/product_options.h b/google/cloud/retail/product_options.h deleted file mode 100644 index 06bd5c587992e..0000000000000 --- a/google/cloud/retail/product_options.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/retail/v2/product_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_PRODUCT_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_PRODUCT_OPTIONS_H - -#include "google/cloud/retail/product_connection.h" -#include "google/cloud/retail/product_connection_idempotency_policy.h" -#include "google/cloud/retail/v2/product_options.h" - -namespace google { -namespace cloud { -namespace retail { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use retail_v2::ProductServicePollingPolicyOption directly. -using ::google::cloud::retail_v2::ProductServicePollingPolicyOption; - -/// @deprecated Use retail_v2::ProductServiceBackoffPolicyOption directly. -using ::google::cloud::retail_v2::ProductServiceBackoffPolicyOption; - -/// @deprecated Use retail_v2::ProductServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::retail_v2:: - ProductServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use retail_v2::ProductServicePolicyOptionList directly. -using ::google::cloud::retail_v2::ProductServicePolicyOptionList; - -/// @deprecated Use retail_v2::ProductServiceRetryPolicyOption directly. -using ::google::cloud::retail_v2::ProductServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace retail -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_PRODUCT_OPTIONS_H diff --git a/google/cloud/retail/quickstart/.bazelrc b/google/cloud/retail/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/retail/quickstart/.bazelrc +++ b/google/cloud/retail/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/retail/quickstart/CMakeLists.txt b/google/cloud/retail/quickstart/CMakeLists.txt index 1a400a5a1755b..d4838aeb78cee 100644 --- a/google/cloud/retail/quickstart/CMakeLists.txt +++ b/google/cloud/retail/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Retail API C++ client library from a larger # CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-retail-quickstart CXX) find_package(google_cloud_cpp_retail REQUIRED) diff --git a/google/cloud/retail/search_client.h b/google/cloud/retail/search_client.h deleted file mode 100644 index 0a44750a43142..0000000000000 --- a/google/cloud/retail/search_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/retail/v2/search_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_SEARCH_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_SEARCH_CLIENT_H - -#include "google/cloud/retail/search_connection.h" -#include "google/cloud/retail/v2/search_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in retail_v2 instead of the aliases defined in -/// this namespace. -namespace retail { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use retail_v2::SearchServiceClient directly. -using ::google::cloud::retail_v2::SearchServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace retail -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_SEARCH_CLIENT_H diff --git a/google/cloud/retail/search_connection.h b/google/cloud/retail/search_connection.h deleted file mode 100644 index 624a9e9335704..0000000000000 --- a/google/cloud/retail/search_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/retail/v2/search_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_SEARCH_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_SEARCH_CONNECTION_H - -#include "google/cloud/retail/search_connection_idempotency_policy.h" -#include "google/cloud/retail/v2/search_connection.h" - -namespace google { -namespace cloud { -namespace retail { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use retail_v2::MakeSearchServiceConnection directly. -using ::google::cloud::retail_v2::MakeSearchServiceConnection; - -/// @deprecated Use retail_v2::SearchServiceConnection directly. -using ::google::cloud::retail_v2::SearchServiceConnection; - -/// @deprecated Use retail_v2::SearchServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::retail_v2::SearchServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use retail_v2::SearchServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::retail_v2::SearchServiceLimitedTimeRetryPolicy; - -/// @deprecated Use retail_v2::SearchServiceRetryPolicy directly. -using ::google::cloud::retail_v2::SearchServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace retail -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_SEARCH_CONNECTION_H diff --git a/google/cloud/retail/search_connection_idempotency_policy.h b/google/cloud/retail/search_connection_idempotency_policy.h deleted file mode 100644 index 914ef06ea2069..0000000000000 --- a/google/cloud/retail/search_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/retail/v2/search_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_SEARCH_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_SEARCH_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/retail/v2/search_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace retail { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// retail_v2::MakeDefaultSearchServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::retail_v2:: - MakeDefaultSearchServiceConnectionIdempotencyPolicy; - -/// @deprecated Use retail_v2::SearchServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::retail_v2::SearchServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace retail -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_SEARCH_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/retail/search_options.h b/google/cloud/retail/search_options.h deleted file mode 100644 index 8038e8a370c31..0000000000000 --- a/google/cloud/retail/search_options.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/retail/v2/search_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_SEARCH_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_SEARCH_OPTIONS_H - -#include "google/cloud/retail/search_connection.h" -#include "google/cloud/retail/search_connection_idempotency_policy.h" -#include "google/cloud/retail/v2/search_options.h" - -namespace google { -namespace cloud { -namespace retail { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use retail_v2::SearchServiceBackoffPolicyOption directly. -using ::google::cloud::retail_v2::SearchServiceBackoffPolicyOption; - -/// @deprecated Use retail_v2::SearchServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::retail_v2:: - SearchServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use retail_v2::SearchServicePolicyOptionList directly. -using ::google::cloud::retail_v2::SearchServicePolicyOptionList; - -/// @deprecated Use retail_v2::SearchServiceRetryPolicyOption directly. -using ::google::cloud::retail_v2::SearchServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace retail -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_SEARCH_OPTIONS_H diff --git a/google/cloud/retail/user_event_client.h b/google/cloud/retail/user_event_client.h deleted file mode 100644 index 3a4fdc9832575..0000000000000 --- a/google/cloud/retail/user_event_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/retail/v2/user_event_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_USER_EVENT_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_USER_EVENT_CLIENT_H - -#include "google/cloud/retail/user_event_connection.h" -#include "google/cloud/retail/v2/user_event_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in retail_v2 instead of the aliases defined in -/// this namespace. -namespace retail { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use retail_v2::UserEventServiceClient directly. -using ::google::cloud::retail_v2::UserEventServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace retail -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_USER_EVENT_CLIENT_H diff --git a/google/cloud/retail/user_event_connection.h b/google/cloud/retail/user_event_connection.h deleted file mode 100644 index ceca713906525..0000000000000 --- a/google/cloud/retail/user_event_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/retail/v2/user_event_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_USER_EVENT_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_USER_EVENT_CONNECTION_H - -#include "google/cloud/retail/user_event_connection_idempotency_policy.h" -#include "google/cloud/retail/v2/user_event_connection.h" - -namespace google { -namespace cloud { -namespace retail { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use retail_v2::MakeUserEventServiceConnection directly. -using ::google::cloud::retail_v2::MakeUserEventServiceConnection; - -/// @deprecated Use retail_v2::UserEventServiceConnection directly. -using ::google::cloud::retail_v2::UserEventServiceConnection; - -/// @deprecated Use retail_v2::UserEventServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::retail_v2::UserEventServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use retail_v2::UserEventServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::retail_v2::UserEventServiceLimitedTimeRetryPolicy; - -/// @deprecated Use retail_v2::UserEventServiceRetryPolicy directly. -using ::google::cloud::retail_v2::UserEventServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace retail -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_USER_EVENT_CONNECTION_H diff --git a/google/cloud/retail/user_event_connection_idempotency_policy.h b/google/cloud/retail/user_event_connection_idempotency_policy.h deleted file mode 100644 index cc6f6340482c2..0000000000000 --- a/google/cloud/retail/user_event_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/retail/v2/user_event_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_USER_EVENT_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_USER_EVENT_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/retail/v2/user_event_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace retail { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// retail_v2::MakeDefaultUserEventServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::retail_v2:: - MakeDefaultUserEventServiceConnectionIdempotencyPolicy; - -/// @deprecated Use retail_v2::UserEventServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::retail_v2::UserEventServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace retail -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_USER_EVENT_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/retail/user_event_options.h b/google/cloud/retail/user_event_options.h deleted file mode 100644 index f385fdc2c8f63..0000000000000 --- a/google/cloud/retail/user_event_options.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/retail/v2/user_event_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_USER_EVENT_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_USER_EVENT_OPTIONS_H - -#include "google/cloud/retail/user_event_connection.h" -#include "google/cloud/retail/user_event_connection_idempotency_policy.h" -#include "google/cloud/retail/v2/user_event_options.h" - -namespace google { -namespace cloud { -namespace retail { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use retail_v2::UserEventServicePollingPolicyOption directly. -using ::google::cloud::retail_v2::UserEventServicePollingPolicyOption; - -/// @deprecated Use retail_v2::UserEventServiceBackoffPolicyOption directly. -using ::google::cloud::retail_v2::UserEventServiceBackoffPolicyOption; - -/// @deprecated Use retail_v2::UserEventServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::retail_v2:: - UserEventServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use retail_v2::UserEventServicePolicyOptionList directly. -using ::google::cloud::retail_v2::UserEventServicePolicyOptionList; - -/// @deprecated Use retail_v2::UserEventServiceRetryPolicyOption directly. -using ::google::cloud::retail_v2::UserEventServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace retail -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_USER_EVENT_OPTIONS_H diff --git a/google/cloud/retail/v2/analytics_client.h b/google/cloud/retail/v2/analytics_client.h index e6ce1baa3c308..dc505aad2f641 100644 --- a/google/cloud/retail/v2/analytics_client.h +++ b/google/cloud/retail/v2/analytics_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/retail/v2/analytics_connection.h b/google/cloud/retail/v2/analytics_connection.h index fee17c818d48b..15fc22d33ae10 100644 --- a/google/cloud/retail/v2/analytics_connection.h +++ b/google/cloud/retail/v2/analytics_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_ANALYTICS_CONNECTION_H #include "google/cloud/retail/v2/analytics_connection_idempotency_policy.h" +#include "google/cloud/retail/v2/analytics_service.pb.h" #include "google/cloud/retail/v2/internal/analytics_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/retail/v2/analytics_connection_idempotency_policy.h b/google/cloud/retail/v2/analytics_connection_idempotency_policy.h index a420c94f3564f..67b9d40f542b2 100644 --- a/google/cloud/retail/v2/analytics_connection_idempotency_policy.h +++ b/google/cloud/retail/v2/analytics_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_ANALYTICS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_ANALYTICS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/retail/v2/analytics_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/retail/v2/catalog_connection.h b/google/cloud/retail/v2/catalog_connection.h index 51c75582b4a55..36e9a4db20ff0 100644 --- a/google/cloud/retail/v2/catalog_connection.h +++ b/google/cloud/retail/v2/catalog_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_CATALOG_CONNECTION_H #include "google/cloud/retail/v2/catalog_connection_idempotency_policy.h" +#include "google/cloud/retail/v2/catalog_service.pb.h" #include "google/cloud/retail/v2/internal/catalog_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/retail/v2/catalog_connection_idempotency_policy.h b/google/cloud/retail/v2/catalog_connection_idempotency_policy.h index 295c6e92280d3..7659ee52a8cba 100644 --- a/google/cloud/retail/v2/catalog_connection_idempotency_policy.h +++ b/google/cloud/retail/v2/catalog_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_CATALOG_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_CATALOG_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/retail/v2/catalog_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/retail/v2/completion_client.h b/google/cloud/retail/v2/completion_client.h index a394fc0859cae..2c6f528cc669b 100644 --- a/google/cloud/retail/v2/completion_client.h +++ b/google/cloud/retail/v2/completion_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/retail/v2/completion_connection.h b/google/cloud/retail/v2/completion_connection.h index db49b011ba7f5..3648f70fac1c2 100644 --- a/google/cloud/retail/v2/completion_connection.h +++ b/google/cloud/retail/v2/completion_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_COMPLETION_CONNECTION_H #include "google/cloud/retail/v2/completion_connection_idempotency_policy.h" +#include "google/cloud/retail/v2/completion_service.pb.h" #include "google/cloud/retail/v2/internal/completion_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/retail/v2/completion_connection_idempotency_policy.h b/google/cloud/retail/v2/completion_connection_idempotency_policy.h index 9ee3c7bb3c1c8..c9a50544ba521 100644 --- a/google/cloud/retail/v2/completion_connection_idempotency_policy.h +++ b/google/cloud/retail/v2/completion_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_COMPLETION_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_COMPLETION_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/retail/v2/completion_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/retail/v2/control_connection.h b/google/cloud/retail/v2/control_connection.h index 408ab00ae2890..67f911ca9836a 100644 --- a/google/cloud/retail/v2/control_connection.h +++ b/google/cloud/retail/v2/control_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_CONTROL_CONNECTION_H #include "google/cloud/retail/v2/control_connection_idempotency_policy.h" +#include "google/cloud/retail/v2/control_service.pb.h" #include "google/cloud/retail/v2/internal/control_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/retail/v2/control_connection_idempotency_policy.h b/google/cloud/retail/v2/control_connection_idempotency_policy.h index cb21b38dfbcd6..688e5df861aea 100644 --- a/google/cloud/retail/v2/control_connection_idempotency_policy.h +++ b/google/cloud/retail/v2/control_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_CONTROL_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_CONTROL_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/retail/v2/control_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/retail/v2/internal/analytics_auth_decorator.cc b/google/cloud/retail/v2/internal/analytics_auth_decorator.cc index affe81b6306de..0f4d153e2a2a5 100644 --- a/google/cloud/retail/v2/internal/analytics_auth_decorator.cc +++ b/google/cloud/retail/v2/internal/analytics_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/retail/v2/analytics_service.proto #include "google/cloud/retail/v2/internal/analytics_auth_decorator.h" -#include +#include "google/cloud/retail/v2/analytics_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -117,3 +120,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/analytics_auth_decorator.h b/google/cloud/retail/v2/internal/analytics_auth_decorator.h index 5a61f87e588ac..423152d7bbf32 100644 --- a/google/cloud/retail/v2/internal/analytics_auth_decorator.h +++ b/google/cloud/retail/v2/internal/analytics_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/retail/v2/internal/analytics_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -81,4 +84,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_ANALYTICS_AUTH_DECORATOR_H diff --git a/google/cloud/retail/v2/internal/analytics_connection_impl.h b/google/cloud/retail/v2/internal/analytics_connection_impl.h index f3850cfe54dd9..e926221368841 100644 --- a/google/cloud/retail/v2/internal/analytics_connection_impl.h +++ b/google/cloud/retail/v2/internal/analytics_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/retail/v2/internal/analytics_logging_decorator.cc b/google/cloud/retail/v2/internal/analytics_logging_decorator.cc index b274ef35a799e..74e10523d3cf9 100644 --- a/google/cloud/retail/v2/internal/analytics_logging_decorator.cc +++ b/google/cloud/retail/v2/internal/analytics_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/retail/v2/analytics_service.proto #include "google/cloud/retail/v2/internal/analytics_logging_decorator.h" +#include "google/cloud/retail/v2/analytics_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -129,3 +132,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/analytics_logging_decorator.h b/google/cloud/retail/v2/internal/analytics_logging_decorator.h index f7001030afce7..f13527a3b2e5c 100644 --- a/google/cloud/retail/v2/internal/analytics_logging_decorator.h +++ b/google/cloud/retail/v2/internal/analytics_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/retail/v2/internal/analytics_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -81,4 +84,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_ANALYTICS_LOGGING_DECORATOR_H diff --git a/google/cloud/retail/v2/internal/analytics_metadata_decorator.cc b/google/cloud/retail/v2/internal/analytics_metadata_decorator.cc index f1dc53d7869af..3b5489678a98a 100644 --- a/google/cloud/retail/v2/internal/analytics_metadata_decorator.cc +++ b/google/cloud/retail/v2/internal/analytics_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/retail/v2/analytics_service.proto #include "google/cloud/retail/v2/internal/analytics_metadata_decorator.h" +#include "google/cloud/retail/v2/analytics_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -122,3 +126,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/analytics_metadata_decorator.h b/google/cloud/retail/v2/internal/analytics_metadata_decorator.h index 957be1ccee40a..12f4e861b9fb9 100644 --- a/google/cloud/retail/v2/internal/analytics_metadata_decorator.h +++ b/google/cloud/retail/v2/internal/analytics_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/retail/v2/internal/analytics_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -87,4 +90,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_ANALYTICS_METADATA_DECORATOR_H diff --git a/google/cloud/retail/v2/internal/analytics_option_defaults.cc b/google/cloud/retail/v2/internal/analytics_option_defaults.cc index f6e35c96dda03..a2e1ec0d4303a 100644 --- a/google/cloud/retail/v2/internal/analytics_option_defaults.cc +++ b/google/cloud/retail/v2/internal/analytics_option_defaults.cc @@ -41,7 +41,7 @@ Options AnalyticsServiceDefaultOptions(Options options) { if (!options.has()) { options.set( retail_v2::AnalyticsServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/retail/v2/internal/analytics_stub.cc b/google/cloud/retail/v2/internal/analytics_stub.cc index ad221c04ccd5a..d4672566ad594 100644 --- a/google/cloud/retail/v2/internal/analytics_stub.cc +++ b/google/cloud/retail/v2/internal/analytics_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/retail/v2/analytics_service.proto #include "google/cloud/retail/v2/internal/analytics_stub.h" +#include "google/cloud/retail/v2/analytics_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -130,3 +133,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/analytics_stub.h b/google/cloud/retail/v2/internal/analytics_stub.h index bec22474520f2..a9552fc02ab3a 100644 --- a/google/cloud/retail/v2/internal/analytics_stub.h +++ b/google/cloud/retail/v2/internal/analytics_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_ANALYTICS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_ANALYTICS_STUB_H +#include "google/cloud/retail/v2/analytics_service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -127,4 +130,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_ANALYTICS_STUB_H diff --git a/google/cloud/retail/v2/internal/analytics_stub_factory.cc b/google/cloud/retail/v2/internal/analytics_stub_factory.cc index 46354fa94cbc8..b68cf2ed4fbe4 100644 --- a/google/cloud/retail/v2/internal/analytics_stub_factory.cc +++ b/google/cloud/retail/v2/internal/analytics_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/retail/v2/analytics_service.proto #include "google/cloud/retail/v2/internal/analytics_stub_factory.h" +#include "google/cloud/retail/v2/analytics_service.grpc.pb.h" #include "google/cloud/retail/v2/internal/analytics_auth_decorator.h" #include "google/cloud/retail/v2/internal/analytics_logging_decorator.h" #include "google/cloud/retail/v2/internal/analytics_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/analytics_stub_factory.h b/google/cloud/retail/v2/internal/analytics_stub_factory.h index 54e2e73e9dddf..f69883e922dde 100644 --- a/google/cloud/retail/v2/internal/analytics_stub_factory.h +++ b/google/cloud/retail/v2/internal/analytics_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_ANALYTICS_STUB_FACTORY_H diff --git a/google/cloud/retail/v2/internal/analytics_tracing_connection.cc b/google/cloud/retail/v2/internal/analytics_tracing_connection.cc index dec64c82d6df8..c4a3cfb8644e0 100644 --- a/google/cloud/retail/v2/internal/analytics_tracing_connection.cc +++ b/google/cloud/retail/v2/internal/analytics_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AnalyticsServiceTracingConnection::AnalyticsServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -84,16 +82,12 @@ AnalyticsServiceTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAnalyticsServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/retail/v2/internal/analytics_tracing_connection.h b/google/cloud/retail/v2/internal/analytics_tracing_connection.h index 25afd8ecc8be8..f37c8acd1fc5e 100644 --- a/google/cloud/retail/v2/internal/analytics_tracing_connection.h +++ b/google/cloud/retail/v2/internal/analytics_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AnalyticsServiceTracingConnection : public retail_v2::AnalyticsServiceConnection { public: @@ -64,8 +62,6 @@ class AnalyticsServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/retail/v2/internal/analytics_tracing_stub.cc b/google/cloud/retail/v2/internal/analytics_tracing_stub.cc index cb90c10d665bc..faa6aa8841cfc 100644 --- a/google/cloud/retail/v2/internal/analytics_tracing_stub.cc +++ b/google/cloud/retail/v2/internal/analytics_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AnalyticsServiceTracingStub::AnalyticsServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -112,18 +113,14 @@ future AnalyticsServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAnalyticsServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/analytics_tracing_stub.h b/google/cloud/retail/v2/internal/analytics_tracing_stub.h index ce09542c92e4e..d5d778ad83ae2 100644 --- a/google/cloud/retail/v2/internal/analytics_tracing_stub.h +++ b/google/cloud/retail/v2/internal/analytics_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AnalyticsServiceTracingStub : public AnalyticsServiceStub { public: ~AnalyticsServiceTracingStub() override = default; @@ -77,8 +78,6 @@ class AnalyticsServiceTracingStub : public AnalyticsServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -93,4 +92,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_ANALYTICS_TRACING_STUB_H diff --git a/google/cloud/retail/v2/internal/catalog_auth_decorator.cc b/google/cloud/retail/v2/internal/catalog_auth_decorator.cc index 82278b51ca591..dbafddd3c815c 100644 --- a/google/cloud/retail/v2/internal/catalog_auth_decorator.cc +++ b/google/cloud/retail/v2/internal/catalog_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/retail/v2/catalog_service.proto #include "google/cloud/retail/v2/internal/catalog_auth_decorator.h" -#include +#include "google/cloud/retail/v2/catalog_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -149,3 +152,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/catalog_auth_decorator.h b/google/cloud/retail/v2/internal/catalog_auth_decorator.h index fc3fb5901081c..bcf89726960d4 100644 --- a/google/cloud/retail/v2/internal/catalog_auth_decorator.h +++ b/google/cloud/retail/v2/internal/catalog_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -109,4 +112,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_CATALOG_AUTH_DECORATOR_H diff --git a/google/cloud/retail/v2/internal/catalog_logging_decorator.cc b/google/cloud/retail/v2/internal/catalog_logging_decorator.cc index fecde1f404acb..8330b0bf35175 100644 --- a/google/cloud/retail/v2/internal/catalog_logging_decorator.cc +++ b/google/cloud/retail/v2/internal/catalog_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/retail/v2/catalog_service.proto #include "google/cloud/retail/v2/internal/catalog_logging_decorator.h" +#include "google/cloud/retail/v2/catalog_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -202,3 +205,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/catalog_logging_decorator.h b/google/cloud/retail/v2/internal/catalog_logging_decorator.h index aece2bd097ce2..401ebc43ceb07 100644 --- a/google/cloud/retail/v2/internal/catalog_logging_decorator.h +++ b/google/cloud/retail/v2/internal/catalog_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -109,4 +112,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_CATALOG_LOGGING_DECORATOR_H diff --git a/google/cloud/retail/v2/internal/catalog_metadata_decorator.cc b/google/cloud/retail/v2/internal/catalog_metadata_decorator.cc index 084db8aac336c..d66fc579c11d6 100644 --- a/google/cloud/retail/v2/internal/catalog_metadata_decorator.cc +++ b/google/cloud/retail/v2/internal/catalog_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/retail/v2/catalog_service.proto #include "google/cloud/retail/v2/internal/catalog_metadata_decorator.h" +#include "google/cloud/retail/v2/catalog_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -184,3 +188,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/catalog_metadata_decorator.h b/google/cloud/retail/v2/internal/catalog_metadata_decorator.h index 28191b7b8334a..070a39c3c8a6e 100644 --- a/google/cloud/retail/v2/internal/catalog_metadata_decorator.h +++ b/google/cloud/retail/v2/internal/catalog_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -114,4 +117,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_CATALOG_METADATA_DECORATOR_H diff --git a/google/cloud/retail/v2/internal/catalog_option_defaults.cc b/google/cloud/retail/v2/internal/catalog_option_defaults.cc index 294845685713a..29d7c673a9f82 100644 --- a/google/cloud/retail/v2/internal/catalog_option_defaults.cc +++ b/google/cloud/retail/v2/internal/catalog_option_defaults.cc @@ -41,7 +41,7 @@ Options CatalogServiceDefaultOptions(Options options) { if (!options.has()) { options.set( retail_v2::CatalogServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/retail/v2/internal/catalog_stub.cc b/google/cloud/retail/v2/internal/catalog_stub.cc index b8030e2e05e48..67220ff94e922 100644 --- a/google/cloud/retail/v2/internal/catalog_stub.cc +++ b/google/cloud/retail/v2/internal/catalog_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/retail/v2/catalog_service.proto #include "google/cloud/retail/v2/internal/catalog_stub.h" +#include "google/cloud/retail/v2/catalog_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -193,3 +196,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/catalog_stub.h b/google/cloud/retail/v2/internal/catalog_stub.h index 0ba78e1291eb3..fd650de69953c 100644 --- a/google/cloud/retail/v2/internal/catalog_stub.h +++ b/google/cloud/retail/v2/internal/catalog_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_CATALOG_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_CATALOG_STUB_H +#include "google/cloud/retail/v2/catalog_service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -185,4 +188,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_CATALOG_STUB_H diff --git a/google/cloud/retail/v2/internal/catalog_stub_factory.cc b/google/cloud/retail/v2/internal/catalog_stub_factory.cc index 677624939cdaa..ae4cfa3e442fc 100644 --- a/google/cloud/retail/v2/internal/catalog_stub_factory.cc +++ b/google/cloud/retail/v2/internal/catalog_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/retail/v2/catalog_service.proto #include "google/cloud/retail/v2/internal/catalog_stub_factory.h" +#include "google/cloud/retail/v2/catalog_service.grpc.pb.h" #include "google/cloud/retail/v2/internal/catalog_auth_decorator.h" #include "google/cloud/retail/v2/internal/catalog_logging_decorator.h" #include "google/cloud/retail/v2/internal/catalog_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/catalog_stub_factory.h b/google/cloud/retail/v2/internal/catalog_stub_factory.h index c6f4fc523bc39..39bbe88a2d207 100644 --- a/google/cloud/retail/v2/internal/catalog_stub_factory.h +++ b/google/cloud/retail/v2/internal/catalog_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_CATALOG_STUB_FACTORY_H diff --git a/google/cloud/retail/v2/internal/catalog_tracing_connection.cc b/google/cloud/retail/v2/internal/catalog_tracing_connection.cc index 07dc1422cd252..44a8095083883 100644 --- a/google/cloud/retail/v2/internal/catalog_tracing_connection.cc +++ b/google/cloud/retail/v2/internal/catalog_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CatalogServiceTracingConnection::CatalogServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -153,16 +151,12 @@ CatalogServiceTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCatalogServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/retail/v2/internal/catalog_tracing_connection.h b/google/cloud/retail/v2/internal/catalog_tracing_connection.h index 982f949fe6601..547459393ae49 100644 --- a/google/cloud/retail/v2/internal/catalog_tracing_connection.h +++ b/google/cloud/retail/v2/internal/catalog_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CatalogServiceTracingConnection : public retail_v2::CatalogServiceConnection { public: @@ -92,8 +90,6 @@ class CatalogServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/retail/v2/internal/catalog_tracing_stub.cc b/google/cloud/retail/v2/internal/catalog_tracing_stub.cc index d005340c6f377..36c028e2b46af 100644 --- a/google/cloud/retail/v2/internal/catalog_tracing_stub.cc +++ b/google/cloud/retail/v2/internal/catalog_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CatalogServiceTracingStub::CatalogServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -191,18 +192,14 @@ CatalogServiceTracingStub::GetOperation( child_->GetOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCatalogServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/catalog_tracing_stub.h b/google/cloud/retail/v2/internal/catalog_tracing_stub.h index e363b4b63e6c9..282a2fd2f7e14 100644 --- a/google/cloud/retail/v2/internal/catalog_tracing_stub.h +++ b/google/cloud/retail/v2/internal/catalog_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CatalogServiceTracingStub : public CatalogServiceStub { public: ~CatalogServiceTracingStub() override = default; @@ -105,8 +106,6 @@ class CatalogServiceTracingStub : public CatalogServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -121,4 +120,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_CATALOG_TRACING_STUB_H diff --git a/google/cloud/retail/v2/internal/completion_auth_decorator.cc b/google/cloud/retail/v2/internal/completion_auth_decorator.cc index 7c3778a80f3f5..6c7c7084603dd 100644 --- a/google/cloud/retail/v2/internal/completion_auth_decorator.cc +++ b/google/cloud/retail/v2/internal/completion_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/retail/v2/completion_service.proto #include "google/cloud/retail/v2/internal/completion_auth_decorator.h" -#include +#include "google/cloud/retail/v2/completion_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -126,3 +129,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/completion_auth_decorator.h b/google/cloud/retail/v2/internal/completion_auth_decorator.h index bc67fa4b66bbc..373fc5a1a8b51 100644 --- a/google/cloud/retail/v2/internal/completion_auth_decorator.h +++ b/google/cloud/retail/v2/internal/completion_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/retail/v2/internal/completion_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -85,4 +88,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_COMPLETION_AUTH_DECORATOR_H diff --git a/google/cloud/retail/v2/internal/completion_connection_impl.h b/google/cloud/retail/v2/internal/completion_connection_impl.h index 5a190253b6a02..bac2af3cbbfa3 100644 --- a/google/cloud/retail/v2/internal/completion_connection_impl.h +++ b/google/cloud/retail/v2/internal/completion_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/retail/v2/internal/completion_logging_decorator.cc b/google/cloud/retail/v2/internal/completion_logging_decorator.cc index d9c7ef9ab1739..309c617234300 100644 --- a/google/cloud/retail/v2/internal/completion_logging_decorator.cc +++ b/google/cloud/retail/v2/internal/completion_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/retail/v2/completion_service.proto #include "google/cloud/retail/v2/internal/completion_logging_decorator.h" +#include "google/cloud/retail/v2/completion_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -141,3 +144,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/completion_logging_decorator.h b/google/cloud/retail/v2/internal/completion_logging_decorator.h index 43d9ac70d97f9..c8c287dc4be39 100644 --- a/google/cloud/retail/v2/internal/completion_logging_decorator.h +++ b/google/cloud/retail/v2/internal/completion_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/retail/v2/internal/completion_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -85,4 +88,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_COMPLETION_LOGGING_DECORATOR_H diff --git a/google/cloud/retail/v2/internal/completion_metadata_decorator.cc b/google/cloud/retail/v2/internal/completion_metadata_decorator.cc index eeab54a998d29..db241e3c76dee 100644 --- a/google/cloud/retail/v2/internal/completion_metadata_decorator.cc +++ b/google/cloud/retail/v2/internal/completion_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/retail/v2/completion_service.proto #include "google/cloud/retail/v2/internal/completion_metadata_decorator.h" +#include "google/cloud/retail/v2/completion_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -132,3 +136,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/completion_metadata_decorator.h b/google/cloud/retail/v2/internal/completion_metadata_decorator.h index c1c35c0913cf5..8d10720df199b 100644 --- a/google/cloud/retail/v2/internal/completion_metadata_decorator.h +++ b/google/cloud/retail/v2/internal/completion_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/retail/v2/internal/completion_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -91,4 +94,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_COMPLETION_METADATA_DECORATOR_H diff --git a/google/cloud/retail/v2/internal/completion_option_defaults.cc b/google/cloud/retail/v2/internal/completion_option_defaults.cc index 9388085c8a8a6..203a2d59411d3 100644 --- a/google/cloud/retail/v2/internal/completion_option_defaults.cc +++ b/google/cloud/retail/v2/internal/completion_option_defaults.cc @@ -41,7 +41,7 @@ Options CompletionServiceDefaultOptions(Options options) { if (!options.has()) { options.set( retail_v2::CompletionServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/retail/v2/internal/completion_stub.cc b/google/cloud/retail/v2/internal/completion_stub.cc index 1c93d2158a306..0dd89cf153377 100644 --- a/google/cloud/retail/v2/internal/completion_stub.cc +++ b/google/cloud/retail/v2/internal/completion_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/retail/v2/completion_service.proto #include "google/cloud/retail/v2/internal/completion_stub.h" +#include "google/cloud/retail/v2/completion_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -141,3 +144,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/completion_stub.h b/google/cloud/retail/v2/internal/completion_stub.h index 2bbe8b5154e5b..481b7d942feb7 100644 --- a/google/cloud/retail/v2/internal/completion_stub.h +++ b/google/cloud/retail/v2/internal/completion_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_COMPLETION_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_COMPLETION_STUB_H +#include "google/cloud/retail/v2/completion_service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -136,4 +139,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_COMPLETION_STUB_H diff --git a/google/cloud/retail/v2/internal/completion_stub_factory.cc b/google/cloud/retail/v2/internal/completion_stub_factory.cc index a65a9e7536cad..536446930c508 100644 --- a/google/cloud/retail/v2/internal/completion_stub_factory.cc +++ b/google/cloud/retail/v2/internal/completion_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/retail/v2/completion_service.proto #include "google/cloud/retail/v2/internal/completion_stub_factory.h" +#include "google/cloud/retail/v2/completion_service.grpc.pb.h" #include "google/cloud/retail/v2/internal/completion_auth_decorator.h" #include "google/cloud/retail/v2/internal/completion_logging_decorator.h" #include "google/cloud/retail/v2/internal/completion_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/completion_stub_factory.h b/google/cloud/retail/v2/internal/completion_stub_factory.h index d1faab5ca10d7..73956ea67e98a 100644 --- a/google/cloud/retail/v2/internal/completion_stub_factory.h +++ b/google/cloud/retail/v2/internal/completion_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_COMPLETION_STUB_FACTORY_H diff --git a/google/cloud/retail/v2/internal/completion_tracing_connection.cc b/google/cloud/retail/v2/internal/completion_tracing_connection.cc index 85b2d00be4b4e..bafa2a0b06aca 100644 --- a/google/cloud/retail/v2/internal/completion_tracing_connection.cc +++ b/google/cloud/retail/v2/internal/completion_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CompletionServiceTracingConnection::CompletionServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -93,17 +91,13 @@ CompletionServiceTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCompletionServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/retail/v2/internal/completion_tracing_connection.h b/google/cloud/retail/v2/internal/completion_tracing_connection.h index 54cafe4ebc51c..77d54ac06ee1d 100644 --- a/google/cloud/retail/v2/internal/completion_tracing_connection.h +++ b/google/cloud/retail/v2/internal/completion_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CompletionServiceTracingConnection : public retail_v2::CompletionServiceConnection { public: @@ -67,8 +65,6 @@ class CompletionServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/retail/v2/internal/completion_tracing_stub.cc b/google/cloud/retail/v2/internal/completion_tracing_stub.cc index 6339745e5c98c..892478edcab7f 100644 --- a/google/cloud/retail/v2/internal/completion_tracing_stub.cc +++ b/google/cloud/retail/v2/internal/completion_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CompletionServiceTracingStub::CompletionServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -123,18 +124,14 @@ future CompletionServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCompletionServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/completion_tracing_stub.h b/google/cloud/retail/v2/internal/completion_tracing_stub.h index d22e1cad9556b..20983bfc0167c 100644 --- a/google/cloud/retail/v2/internal/completion_tracing_stub.h +++ b/google/cloud/retail/v2/internal/completion_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CompletionServiceTracingStub : public CompletionServiceStub { public: ~CompletionServiceTracingStub() override = default; @@ -81,8 +82,6 @@ class CompletionServiceTracingStub : public CompletionServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -97,4 +96,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_COMPLETION_TRACING_STUB_H diff --git a/google/cloud/retail/v2/internal/control_auth_decorator.cc b/google/cloud/retail/v2/internal/control_auth_decorator.cc index 433f1809e716c..7310452adc5cd 100644 --- a/google/cloud/retail/v2/internal/control_auth_decorator.cc +++ b/google/cloud/retail/v2/internal/control_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/retail/v2/control_service.proto #include "google/cloud/retail/v2/internal/control_auth_decorator.h" -#include +#include "google/cloud/retail/v2/control_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -93,3 +96,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/control_auth_decorator.h b/google/cloud/retail/v2/internal/control_auth_decorator.h index e488afed2b742..41f5f577b66eb 100644 --- a/google/cloud/retail/v2/internal/control_auth_decorator.h +++ b/google/cloud/retail/v2/internal/control_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -76,4 +79,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_CONTROL_AUTH_DECORATOR_H diff --git a/google/cloud/retail/v2/internal/control_logging_decorator.cc b/google/cloud/retail/v2/internal/control_logging_decorator.cc index ac3fcfd2e8b0b..9bd5d326e660e 100644 --- a/google/cloud/retail/v2/internal/control_logging_decorator.cc +++ b/google/cloud/retail/v2/internal/control_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/retail/v2/control_service.proto #include "google/cloud/retail/v2/internal/control_logging_decorator.h" +#include "google/cloud/retail/v2/control_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -120,3 +123,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/control_logging_decorator.h b/google/cloud/retail/v2/internal/control_logging_decorator.h index 0c4430a63ad31..89887f99ae0ba 100644 --- a/google/cloud/retail/v2/internal/control_logging_decorator.h +++ b/google/cloud/retail/v2/internal/control_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -76,4 +79,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_CONTROL_LOGGING_DECORATOR_H diff --git a/google/cloud/retail/v2/internal/control_metadata_decorator.cc b/google/cloud/retail/v2/internal/control_metadata_decorator.cc index 27606d7008b18..97afda2c61208 100644 --- a/google/cloud/retail/v2/internal/control_metadata_decorator.cc +++ b/google/cloud/retail/v2/internal/control_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/retail/v2/control_service.proto #include "google/cloud/retail/v2/internal/control_metadata_decorator.h" +#include "google/cloud/retail/v2/control_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -122,3 +126,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/control_metadata_decorator.h b/google/cloud/retail/v2/internal/control_metadata_decorator.h index 5d94dbe661d00..1cff1445fd92d 100644 --- a/google/cloud/retail/v2/internal/control_metadata_decorator.h +++ b/google/cloud/retail/v2/internal/control_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -81,4 +84,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_CONTROL_METADATA_DECORATOR_H diff --git a/google/cloud/retail/v2/internal/control_option_defaults.cc b/google/cloud/retail/v2/internal/control_option_defaults.cc index bff3f2b3651ae..ee95183d9a598 100644 --- a/google/cloud/retail/v2/internal/control_option_defaults.cc +++ b/google/cloud/retail/v2/internal/control_option_defaults.cc @@ -41,7 +41,7 @@ Options ControlServiceDefaultOptions(Options options) { if (!options.has()) { options.set( retail_v2::ControlServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/retail/v2/internal/control_stub.cc b/google/cloud/retail/v2/internal/control_stub.cc index 123c856b0ecea..83538a5abe2ee 100644 --- a/google/cloud/retail/v2/internal/control_stub.cc +++ b/google/cloud/retail/v2/internal/control_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/retail/v2/control_service.proto #include "google/cloud/retail/v2/internal/control_stub.h" +#include "google/cloud/retail/v2/control_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -117,3 +120,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/control_stub.h b/google/cloud/retail/v2/internal/control_stub.h index f11aec9164a00..6bec73b4e41f4 100644 --- a/google/cloud/retail/v2/internal/control_stub.h +++ b/google/cloud/retail/v2/internal/control_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_CONTROL_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_CONTROL_STUB_H +#include "google/cloud/retail/v2/control_service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -116,4 +119,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_CONTROL_STUB_H diff --git a/google/cloud/retail/v2/internal/control_stub_factory.cc b/google/cloud/retail/v2/internal/control_stub_factory.cc index f3bf78bbf76bc..d6492067fa9d0 100644 --- a/google/cloud/retail/v2/internal/control_stub_factory.cc +++ b/google/cloud/retail/v2/internal/control_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/retail/v2/control_service.proto #include "google/cloud/retail/v2/internal/control_stub_factory.h" +#include "google/cloud/retail/v2/control_service.grpc.pb.h" #include "google/cloud/retail/v2/internal/control_auth_decorator.h" #include "google/cloud/retail/v2/internal/control_logging_decorator.h" #include "google/cloud/retail/v2/internal/control_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/control_stub_factory.h b/google/cloud/retail/v2/internal/control_stub_factory.h index a3ebfe41eaacf..03161af9bbd82 100644 --- a/google/cloud/retail/v2/internal/control_stub_factory.h +++ b/google/cloud/retail/v2/internal/control_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_CONTROL_STUB_FACTORY_H diff --git a/google/cloud/retail/v2/internal/control_tracing_connection.cc b/google/cloud/retail/v2/internal/control_tracing_connection.cc index f80cb239665bc..d171e944b928d 100644 --- a/google/cloud/retail/v2/internal/control_tracing_connection.cc +++ b/google/cloud/retail/v2/internal/control_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ControlServiceTracingConnection::ControlServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -99,16 +97,12 @@ ControlServiceTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeControlServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/retail/v2/internal/control_tracing_connection.h b/google/cloud/retail/v2/internal/control_tracing_connection.h index f5a16af6cd8ab..62b1d7c6af4ca 100644 --- a/google/cloud/retail/v2/internal/control_tracing_connection.h +++ b/google/cloud/retail/v2/internal/control_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ControlServiceTracingConnection : public retail_v2::ControlServiceConnection { public: @@ -65,8 +63,6 @@ class ControlServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/retail/v2/internal/control_tracing_stub.cc b/google/cloud/retail/v2/internal/control_tracing_stub.cc index bf87097942f55..231c3ca005239 100644 --- a/google/cloud/retail/v2/internal/control_tracing_stub.cc +++ b/google/cloud/retail/v2/internal/control_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ControlServiceTracingStub::ControlServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -115,18 +116,14 @@ ControlServiceTracingStub::GetOperation( child_->GetOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeControlServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/control_tracing_stub.h b/google/cloud/retail/v2/internal/control_tracing_stub.h index 08f7d3430f9a9..2543cc587f3c1 100644 --- a/google/cloud/retail/v2/internal/control_tracing_stub.h +++ b/google/cloud/retail/v2/internal/control_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ControlServiceTracingStub : public ControlServiceStub { public: ~ControlServiceTracingStub() override = default; @@ -72,8 +73,6 @@ class ControlServiceTracingStub : public ControlServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -88,4 +87,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_CONTROL_TRACING_STUB_H diff --git a/google/cloud/retail/v2/internal/model_auth_decorator.cc b/google/cloud/retail/v2/internal/model_auth_decorator.cc index ca3fc84360188..b86e67b49a1c3 100644 --- a/google/cloud/retail/v2/internal/model_auth_decorator.cc +++ b/google/cloud/retail/v2/internal/model_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/retail/v2/model_service.proto #include "google/cloud/retail/v2/internal/model_auth_decorator.h" -#include +#include "google/cloud/retail/v2/model_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -193,3 +196,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/model_auth_decorator.h b/google/cloud/retail/v2/internal/model_auth_decorator.h index 5bbdc5393b120..411828957e870 100644 --- a/google/cloud/retail/v2/internal/model_auth_decorator.h +++ b/google/cloud/retail/v2/internal/model_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/retail/v2/internal/model_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -113,4 +116,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_MODEL_AUTH_DECORATOR_H diff --git a/google/cloud/retail/v2/internal/model_connection_impl.h b/google/cloud/retail/v2/internal/model_connection_impl.h index 09ec76f6d140e..ca0a94b3257ac 100644 --- a/google/cloud/retail/v2/internal/model_connection_impl.h +++ b/google/cloud/retail/v2/internal/model_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/retail/v2/internal/model_logging_decorator.cc b/google/cloud/retail/v2/internal/model_logging_decorator.cc index f106027d06305..191beb0a707f6 100644 --- a/google/cloud/retail/v2/internal/model_logging_decorator.cc +++ b/google/cloud/retail/v2/internal/model_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/retail/v2/model_service.proto #include "google/cloud/retail/v2/internal/model_logging_decorator.h" +#include "google/cloud/retail/v2/model_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -222,3 +225,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/model_logging_decorator.h b/google/cloud/retail/v2/internal/model_logging_decorator.h index d6b437ab0a208..c1da179818fb8 100644 --- a/google/cloud/retail/v2/internal/model_logging_decorator.h +++ b/google/cloud/retail/v2/internal/model_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/retail/v2/internal/model_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -113,4 +116,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_MODEL_LOGGING_DECORATOR_H diff --git a/google/cloud/retail/v2/internal/model_metadata_decorator.cc b/google/cloud/retail/v2/internal/model_metadata_decorator.cc index 489219e1fd1e1..b51dc7a1c577a 100644 --- a/google/cloud/retail/v2/internal/model_metadata_decorator.cc +++ b/google/cloud/retail/v2/internal/model_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/retail/v2/model_service.proto #include "google/cloud/retail/v2/internal/model_metadata_decorator.h" +#include "google/cloud/retail/v2/model_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -191,3 +195,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/model_metadata_decorator.h b/google/cloud/retail/v2/internal/model_metadata_decorator.h index c842133073614..05026bd2f5f75 100644 --- a/google/cloud/retail/v2/internal/model_metadata_decorator.h +++ b/google/cloud/retail/v2/internal/model_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/retail/v2/internal/model_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -118,4 +121,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_MODEL_METADATA_DECORATOR_H diff --git a/google/cloud/retail/v2/internal/model_option_defaults.cc b/google/cloud/retail/v2/internal/model_option_defaults.cc index 040364d4c64a5..0c88d9e9c4a7c 100644 --- a/google/cloud/retail/v2/internal/model_option_defaults.cc +++ b/google/cloud/retail/v2/internal/model_option_defaults.cc @@ -40,7 +40,7 @@ Options ModelServiceDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - retail_v2::ModelServiceLimitedTimeRetryPolicy(std::chrono::minutes(30)) + retail_v2::ModelServiceLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/retail/v2/internal/model_stub.cc b/google/cloud/retail/v2/internal/model_stub.cc index 2c792f905021e..0ab8ceb718304 100644 --- a/google/cloud/retail/v2/internal/model_stub.cc +++ b/google/cloud/retail/v2/internal/model_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/retail/v2/model_service.proto #include "google/cloud/retail/v2/internal/model_stub.h" +#include "google/cloud/retail/v2/model_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -221,3 +224,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/model_stub.h b/google/cloud/retail/v2/internal/model_stub.h index 4718136ac438a..6228e0095c375 100644 --- a/google/cloud/retail/v2/internal/model_stub.h +++ b/google/cloud/retail/v2/internal/model_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_MODEL_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_MODEL_STUB_H +#include "google/cloud/retail/v2/model_service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -189,4 +192,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_MODEL_STUB_H diff --git a/google/cloud/retail/v2/internal/model_stub_factory.cc b/google/cloud/retail/v2/internal/model_stub_factory.cc index 95d342bcdec3a..04f26532e95dd 100644 --- a/google/cloud/retail/v2/internal/model_stub_factory.cc +++ b/google/cloud/retail/v2/internal/model_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/retail/v2/internal/model_metadata_decorator.h" #include "google/cloud/retail/v2/internal/model_stub.h" #include "google/cloud/retail/v2/internal/model_tracing_stub.h" +#include "google/cloud/retail/v2/model_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/model_stub_factory.h b/google/cloud/retail/v2/internal/model_stub_factory.h index 7e5b639837043..a97b095175684 100644 --- a/google/cloud/retail/v2/internal/model_stub_factory.h +++ b/google/cloud/retail/v2/internal/model_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_MODEL_STUB_FACTORY_H diff --git a/google/cloud/retail/v2/internal/model_tracing_connection.cc b/google/cloud/retail/v2/internal/model_tracing_connection.cc index 1b90880f201b9..43ced88a3b137 100644 --- a/google/cloud/retail/v2/internal/model_tracing_connection.cc +++ b/google/cloud/retail/v2/internal/model_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ModelServiceTracingConnection::ModelServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -161,16 +159,12 @@ ModelServiceTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeModelServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/retail/v2/internal/model_tracing_connection.h b/google/cloud/retail/v2/internal/model_tracing_connection.h index 087c43e928c84..4326a39f92234 100644 --- a/google/cloud/retail/v2/internal/model_tracing_connection.h +++ b/google/cloud/retail/v2/internal/model_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ModelServiceTracingConnection : public retail_v2::ModelServiceConnection { public: ~ModelServiceTracingConnection() override = default; @@ -87,8 +85,6 @@ class ModelServiceTracingConnection : public retail_v2::ModelServiceConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/retail/v2/internal/model_tracing_stub.cc b/google/cloud/retail/v2/internal/model_tracing_stub.cc index 16790e6de8997..fbf21e4679df1 100644 --- a/google/cloud/retail/v2/internal/model_tracing_stub.cc +++ b/google/cloud/retail/v2/internal/model_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ModelServiceTracingStub::ModelServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -200,18 +201,14 @@ future ModelServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeModelServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/model_tracing_stub.h b/google/cloud/retail/v2/internal/model_tracing_stub.h index cff1499430674..7444b2bc54a08 100644 --- a/google/cloud/retail/v2/internal/model_tracing_stub.h +++ b/google/cloud/retail/v2/internal/model_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ModelServiceTracingStub : public ModelServiceStub { public: ~ModelServiceTracingStub() override = default; @@ -108,8 +109,6 @@ class ModelServiceTracingStub : public ModelServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -124,4 +123,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_MODEL_TRACING_STUB_H diff --git a/google/cloud/retail/v2/internal/prediction_auth_decorator.cc b/google/cloud/retail/v2/internal/prediction_auth_decorator.cc index e826024e289d1..e03df5ae2ff72 100644 --- a/google/cloud/retail/v2/internal/prediction_auth_decorator.cc +++ b/google/cloud/retail/v2/internal/prediction_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/retail/v2/prediction_service.proto #include "google/cloud/retail/v2/internal/prediction_auth_decorator.h" -#include +#include "google/cloud/retail/v2/prediction_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -61,3 +64,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/prediction_auth_decorator.h b/google/cloud/retail/v2/internal/prediction_auth_decorator.h index d2a1d721b37b5..ac2d3d1329be7 100644 --- a/google/cloud/retail/v2/internal/prediction_auth_decorator.h +++ b/google/cloud/retail/v2/internal/prediction_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -60,4 +63,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_PREDICTION_AUTH_DECORATOR_H diff --git a/google/cloud/retail/v2/internal/prediction_logging_decorator.cc b/google/cloud/retail/v2/internal/prediction_logging_decorator.cc index 0fcaba0028139..93fe47ee4f562 100644 --- a/google/cloud/retail/v2/internal/prediction_logging_decorator.cc +++ b/google/cloud/retail/v2/internal/prediction_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/retail/v2/prediction_service.proto #include "google/cloud/retail/v2/internal/prediction_logging_decorator.h" +#include "google/cloud/retail/v2/prediction_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -74,3 +77,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/prediction_logging_decorator.h b/google/cloud/retail/v2/internal/prediction_logging_decorator.h index b107d8fd965e9..d1595a9fa39d4 100644 --- a/google/cloud/retail/v2/internal/prediction_logging_decorator.h +++ b/google/cloud/retail/v2/internal/prediction_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -60,4 +63,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_PREDICTION_LOGGING_DECORATOR_H diff --git a/google/cloud/retail/v2/internal/prediction_metadata_decorator.cc b/google/cloud/retail/v2/internal/prediction_metadata_decorator.cc index 17270b053fea2..de555f5bfaf65 100644 --- a/google/cloud/retail/v2/internal/prediction_metadata_decorator.cc +++ b/google/cloud/retail/v2/internal/prediction_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/retail/v2/prediction_service.proto #include "google/cloud/retail/v2/internal/prediction_metadata_decorator.h" +#include "google/cloud/retail/v2/prediction_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -89,3 +93,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/prediction_metadata_decorator.h b/google/cloud/retail/v2/internal/prediction_metadata_decorator.h index 36286acaed459..312ab97e0e4a5 100644 --- a/google/cloud/retail/v2/internal/prediction_metadata_decorator.h +++ b/google/cloud/retail/v2/internal/prediction_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -66,4 +69,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_PREDICTION_METADATA_DECORATOR_H diff --git a/google/cloud/retail/v2/internal/prediction_option_defaults.cc b/google/cloud/retail/v2/internal/prediction_option_defaults.cc index 8bdeadedcdba7..22ebc23a2383c 100644 --- a/google/cloud/retail/v2/internal/prediction_option_defaults.cc +++ b/google/cloud/retail/v2/internal/prediction_option_defaults.cc @@ -42,7 +42,7 @@ Options PredictionServiceDefaultOptions(Options options) { if (!options.has()) { options.set( retail_v2::PredictionServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/retail/v2/internal/prediction_stub.cc b/google/cloud/retail/v2/internal/prediction_stub.cc index e15e31971bd04..06fb6ca120e63 100644 --- a/google/cloud/retail/v2/internal/prediction_stub.cc +++ b/google/cloud/retail/v2/internal/prediction_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/retail/v2/prediction_service.proto #include "google/cloud/retail/v2/internal/prediction_stub.h" +#include "google/cloud/retail/v2/prediction_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/prediction_stub.h b/google/cloud/retail/v2/internal/prediction_stub.h index a06c80cacc5e0..a48df5fbaa007 100644 --- a/google/cloud/retail/v2/internal/prediction_stub.h +++ b/google/cloud/retail/v2/internal/prediction_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_PREDICTION_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_PREDICTION_STUB_H +#include "google/cloud/retail/v2/prediction_service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -84,4 +87,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_PREDICTION_STUB_H diff --git a/google/cloud/retail/v2/internal/prediction_stub_factory.cc b/google/cloud/retail/v2/internal/prediction_stub_factory.cc index 861ddfcf44b5c..40e168b55bad4 100644 --- a/google/cloud/retail/v2/internal/prediction_stub_factory.cc +++ b/google/cloud/retail/v2/internal/prediction_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/retail/v2/internal/prediction_metadata_decorator.h" #include "google/cloud/retail/v2/internal/prediction_stub.h" #include "google/cloud/retail/v2/internal/prediction_tracing_stub.h" +#include "google/cloud/retail/v2/prediction_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/prediction_stub_factory.h b/google/cloud/retail/v2/internal/prediction_stub_factory.h index f58b89f2ad26a..29cd742d3f17d 100644 --- a/google/cloud/retail/v2/internal/prediction_stub_factory.h +++ b/google/cloud/retail/v2/internal/prediction_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_PREDICTION_STUB_FACTORY_H diff --git a/google/cloud/retail/v2/internal/prediction_tracing_connection.cc b/google/cloud/retail/v2/internal/prediction_tracing_connection.cc index 337f806685499..c55b85b6e9606 100644 --- a/google/cloud/retail/v2/internal/prediction_tracing_connection.cc +++ b/google/cloud/retail/v2/internal/prediction_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PredictionServiceTracingConnection::PredictionServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -62,17 +60,13 @@ PredictionServiceTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePredictionServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/retail/v2/internal/prediction_tracing_connection.h b/google/cloud/retail/v2/internal/prediction_tracing_connection.h index 5381b94618f7f..4b1e3faadc2a3 100644 --- a/google/cloud/retail/v2/internal/prediction_tracing_connection.h +++ b/google/cloud/retail/v2/internal/prediction_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PredictionServiceTracingConnection : public retail_v2::PredictionServiceConnection { public: @@ -53,8 +51,6 @@ class PredictionServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/retail/v2/internal/prediction_tracing_stub.cc b/google/cloud/retail/v2/internal/prediction_tracing_stub.cc index 3a7139fbffd9b..b7dc6723ef0d3 100644 --- a/google/cloud/retail/v2/internal/prediction_tracing_stub.cc +++ b/google/cloud/retail/v2/internal/prediction_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - PredictionServiceTracingStub::PredictionServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -68,18 +69,14 @@ PredictionServiceTracingStub::GetOperation( child_->GetOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakePredictionServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/prediction_tracing_stub.h b/google/cloud/retail/v2/internal/prediction_tracing_stub.h index 285f553badd1f..fd76aaec23c7d 100644 --- a/google/cloud/retail/v2/internal/prediction_tracing_stub.h +++ b/google/cloud/retail/v2/internal/prediction_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class PredictionServiceTracingStub : public PredictionServiceStub { public: ~PredictionServiceTracingStub() override = default; @@ -57,8 +58,6 @@ class PredictionServiceTracingStub : public PredictionServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -73,4 +72,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_PREDICTION_TRACING_STUB_H diff --git a/google/cloud/retail/v2/internal/product_auth_decorator.cc b/google/cloud/retail/v2/internal/product_auth_decorator.cc index d1428136c6931..d3096c1720ac4 100644 --- a/google/cloud/retail/v2/internal/product_auth_decorator.cc +++ b/google/cloud/retail/v2/internal/product_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/retail/v2/product_service.proto #include "google/cloud/retail/v2/internal/product_auth_decorator.h" -#include +#include "google/cloud/retail/v2/product_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -329,3 +332,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/product_auth_decorator.h b/google/cloud/retail/v2/internal/product_auth_decorator.h index 06918c8d0b5ce..49b30282694fc 100644 --- a/google/cloud/retail/v2/internal/product_auth_decorator.h +++ b/google/cloud/retail/v2/internal/product_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/retail/v2/internal/product_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -167,4 +170,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_PRODUCT_AUTH_DECORATOR_H diff --git a/google/cloud/retail/v2/internal/product_connection_impl.h b/google/cloud/retail/v2/internal/product_connection_impl.h index 5206f22185a84..4415e001f2290 100644 --- a/google/cloud/retail/v2/internal/product_connection_impl.h +++ b/google/cloud/retail/v2/internal/product_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/retail/v2/internal/product_logging_decorator.cc b/google/cloud/retail/v2/internal/product_logging_decorator.cc index 95d9bfa7db0f9..da02cba8a4a25 100644 --- a/google/cloud/retail/v2/internal/product_logging_decorator.cc +++ b/google/cloud/retail/v2/internal/product_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/retail/v2/product_service.proto #include "google/cloud/retail/v2/internal/product_logging_decorator.h" +#include "google/cloud/retail/v2/product_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -370,3 +373,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/product_logging_decorator.h b/google/cloud/retail/v2/internal/product_logging_decorator.h index 55dd8d52b5fdc..efd0de4e679d2 100644 --- a/google/cloud/retail/v2/internal/product_logging_decorator.h +++ b/google/cloud/retail/v2/internal/product_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/retail/v2/internal/product_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -167,4 +170,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_PRODUCT_LOGGING_DECORATOR_H diff --git a/google/cloud/retail/v2/internal/product_metadata_decorator.cc b/google/cloud/retail/v2/internal/product_metadata_decorator.cc index 700a496a24cd0..3e8ebe454107f 100644 --- a/google/cloud/retail/v2/internal/product_metadata_decorator.cc +++ b/google/cloud/retail/v2/internal/product_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/retail/v2/product_service.proto #include "google/cloud/retail/v2/internal/product_metadata_decorator.h" +#include "google/cloud/retail/v2/product_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -291,3 +295,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/product_metadata_decorator.h b/google/cloud/retail/v2/internal/product_metadata_decorator.h index 844862c8da654..27f70efd404f3 100644 --- a/google/cloud/retail/v2/internal/product_metadata_decorator.h +++ b/google/cloud/retail/v2/internal/product_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/retail/v2/internal/product_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -172,4 +175,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_PRODUCT_METADATA_DECORATOR_H diff --git a/google/cloud/retail/v2/internal/product_option_defaults.cc b/google/cloud/retail/v2/internal/product_option_defaults.cc index 851f0b92d6a7b..f4d40a857ab27 100644 --- a/google/cloud/retail/v2/internal/product_option_defaults.cc +++ b/google/cloud/retail/v2/internal/product_option_defaults.cc @@ -41,7 +41,7 @@ Options ProductServiceDefaultOptions(Options options) { if (!options.has()) { options.set( retail_v2::ProductServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/retail/v2/internal/product_stub.cc b/google/cloud/retail/v2/internal/product_stub.cc index 6d98dc6203d28..000f928b5bfd0 100644 --- a/google/cloud/retail/v2/internal/product_stub.cc +++ b/google/cloud/retail/v2/internal/product_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/retail/v2/product_service.proto #include "google/cloud/retail/v2/internal/product_stub.h" +#include "google/cloud/retail/v2/product_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -373,3 +376,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/product_stub.h b/google/cloud/retail/v2/internal/product_stub.h index 3baf3d96d9d06..5f3f8192dd81f 100644 --- a/google/cloud/retail/v2/internal/product_stub.h +++ b/google/cloud/retail/v2/internal/product_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_PRODUCT_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_PRODUCT_STUB_H +#include "google/cloud/retail/v2/product_service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -300,4 +303,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_PRODUCT_STUB_H diff --git a/google/cloud/retail/v2/internal/product_stub_factory.cc b/google/cloud/retail/v2/internal/product_stub_factory.cc index 78445c5333601..f2326bd7fad25 100644 --- a/google/cloud/retail/v2/internal/product_stub_factory.cc +++ b/google/cloud/retail/v2/internal/product_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/retail/v2/internal/product_metadata_decorator.h" #include "google/cloud/retail/v2/internal/product_stub.h" #include "google/cloud/retail/v2/internal/product_tracing_stub.h" +#include "google/cloud/retail/v2/product_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/product_stub_factory.h b/google/cloud/retail/v2/internal/product_stub_factory.h index d88d75505bba8..4749c7415908d 100644 --- a/google/cloud/retail/v2/internal/product_stub_factory.h +++ b/google/cloud/retail/v2/internal/product_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_PRODUCT_STUB_FACTORY_H diff --git a/google/cloud/retail/v2/internal/product_tracing_connection.cc b/google/cloud/retail/v2/internal/product_tracing_connection.cc index 7f6aece8b6f3d..0757548cbd1ee 100644 --- a/google/cloud/retail/v2/internal/product_tracing_connection.cc +++ b/google/cloud/retail/v2/internal/product_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ProductServiceTracingConnection::ProductServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -307,16 +305,12 @@ ProductServiceTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeProductServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/retail/v2/internal/product_tracing_connection.h b/google/cloud/retail/v2/internal/product_tracing_connection.h index 627ad0b426de6..3fc86daf34ea6 100644 --- a/google/cloud/retail/v2/internal/product_tracing_connection.h +++ b/google/cloud/retail/v2/internal/product_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ProductServiceTracingConnection : public retail_v2::ProductServiceConnection { public: @@ -153,8 +151,6 @@ class ProductServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/retail/v2/internal/product_tracing_stub.cc b/google/cloud/retail/v2/internal/product_tracing_stub.cc index cabc42756fa04..8b7abef8a3df7 100644 --- a/google/cloud/retail/v2/internal/product_tracing_stub.cc +++ b/google/cloud/retail/v2/internal/product_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ProductServiceTracingStub::ProductServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -332,18 +333,14 @@ future ProductServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeProductServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/product_tracing_stub.h b/google/cloud/retail/v2/internal/product_tracing_stub.h index 44612be75cb32..fc107762eed67 100644 --- a/google/cloud/retail/v2/internal/product_tracing_stub.h +++ b/google/cloud/retail/v2/internal/product_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ProductServiceTracingStub : public ProductServiceStub { public: ~ProductServiceTracingStub() override = default; @@ -162,8 +163,6 @@ class ProductServiceTracingStub : public ProductServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -178,4 +177,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_PRODUCT_TRACING_STUB_H diff --git a/google/cloud/retail/v2/internal/search_auth_decorator.cc b/google/cloud/retail/v2/internal/search_auth_decorator.cc index af18af8e463a3..f3ba4aab6168d 100644 --- a/google/cloud/retail/v2/internal/search_auth_decorator.cc +++ b/google/cloud/retail/v2/internal/search_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/retail/v2/search_service.proto #include "google/cloud/retail/v2/internal/search_auth_decorator.h" -#include +#include "google/cloud/retail/v2/search_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -60,3 +63,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/search_auth_decorator.h b/google/cloud/retail/v2/internal/search_auth_decorator.h index b331a51cb1c2d..048944b57c63f 100644 --- a/google/cloud/retail/v2/internal/search_auth_decorator.h +++ b/google/cloud/retail/v2/internal/search_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -60,4 +63,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_SEARCH_AUTH_DECORATOR_H diff --git a/google/cloud/retail/v2/internal/search_logging_decorator.cc b/google/cloud/retail/v2/internal/search_logging_decorator.cc index 74d49b70f2e3c..547853f446165 100644 --- a/google/cloud/retail/v2/internal/search_logging_decorator.cc +++ b/google/cloud/retail/v2/internal/search_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/retail/v2/search_service.proto #include "google/cloud/retail/v2/internal/search_logging_decorator.h" +#include "google/cloud/retail/v2/search_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -74,3 +77,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/search_logging_decorator.h b/google/cloud/retail/v2/internal/search_logging_decorator.h index 333683818e406..d4c94a6b90ad8 100644 --- a/google/cloud/retail/v2/internal/search_logging_decorator.h +++ b/google/cloud/retail/v2/internal/search_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -60,4 +63,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_SEARCH_LOGGING_DECORATOR_H diff --git a/google/cloud/retail/v2/internal/search_metadata_decorator.cc b/google/cloud/retail/v2/internal/search_metadata_decorator.cc index 4ccd2e1dc3b9a..3867443792097 100644 --- a/google/cloud/retail/v2/internal/search_metadata_decorator.cc +++ b/google/cloud/retail/v2/internal/search_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/retail/v2/search_service.proto #include "google/cloud/retail/v2/internal/search_metadata_decorator.h" +#include "google/cloud/retail/v2/search_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -88,3 +92,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/search_metadata_decorator.h b/google/cloud/retail/v2/internal/search_metadata_decorator.h index 73446d7cd3778..3ed407e3502a7 100644 --- a/google/cloud/retail/v2/internal/search_metadata_decorator.h +++ b/google/cloud/retail/v2/internal/search_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -65,4 +68,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_SEARCH_METADATA_DECORATOR_H diff --git a/google/cloud/retail/v2/internal/search_option_defaults.cc b/google/cloud/retail/v2/internal/search_option_defaults.cc index 3e0f5aa602853..79ab7325110ba 100644 --- a/google/cloud/retail/v2/internal/search_option_defaults.cc +++ b/google/cloud/retail/v2/internal/search_option_defaults.cc @@ -40,7 +40,7 @@ Options SearchServiceDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - retail_v2::SearchServiceLimitedTimeRetryPolicy(std::chrono::minutes(30)) + retail_v2::SearchServiceLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/retail/v2/internal/search_stub.cc b/google/cloud/retail/v2/internal/search_stub.cc index e4735880a113b..22965f7eb7cb5 100644 --- a/google/cloud/retail/v2/internal/search_stub.cc +++ b/google/cloud/retail/v2/internal/search_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/retail/v2/search_service.proto #include "google/cloud/retail/v2/internal/search_stub.h" +#include "google/cloud/retail/v2/search_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -69,3 +72,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/search_stub.h b/google/cloud/retail/v2/internal/search_stub.h index 12ace728716a7..0e91352196129 100644 --- a/google/cloud/retail/v2/internal/search_stub.h +++ b/google/cloud/retail/v2/internal/search_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_SEARCH_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_SEARCH_STUB_H +#include "google/cloud/retail/v2/search_service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -83,4 +86,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_SEARCH_STUB_H diff --git a/google/cloud/retail/v2/internal/search_stub_factory.cc b/google/cloud/retail/v2/internal/search_stub_factory.cc index f54272aff8b0c..8f8e3701f88bb 100644 --- a/google/cloud/retail/v2/internal/search_stub_factory.cc +++ b/google/cloud/retail/v2/internal/search_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/retail/v2/internal/search_metadata_decorator.h" #include "google/cloud/retail/v2/internal/search_stub.h" #include "google/cloud/retail/v2/internal/search_tracing_stub.h" +#include "google/cloud/retail/v2/search_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/search_stub_factory.h b/google/cloud/retail/v2/internal/search_stub_factory.h index f11878b927b3b..1c36dcdb5f363 100644 --- a/google/cloud/retail/v2/internal/search_stub_factory.h +++ b/google/cloud/retail/v2/internal/search_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_SEARCH_STUB_FACTORY_H diff --git a/google/cloud/retail/v2/internal/search_tracing_connection.cc b/google/cloud/retail/v2/internal/search_tracing_connection.cc index 07752bc6d4166..cb5a41467e0f8 100644 --- a/google/cloud/retail/v2/internal/search_tracing_connection.cc +++ b/google/cloud/retail/v2/internal/search_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SearchServiceTracingConnection::SearchServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -64,16 +62,12 @@ SearchServiceTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSearchServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/retail/v2/internal/search_tracing_connection.h b/google/cloud/retail/v2/internal/search_tracing_connection.h index 3aa2ed9de1e0c..2bb1c4b8da4ad 100644 --- a/google/cloud/retail/v2/internal/search_tracing_connection.h +++ b/google/cloud/retail/v2/internal/search_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SearchServiceTracingConnection : public retail_v2::SearchServiceConnection { public: @@ -53,8 +51,6 @@ class SearchServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/retail/v2/internal/search_tracing_stub.cc b/google/cloud/retail/v2/internal/search_tracing_stub.cc index 95267b5680b66..d17d43c490b1f 100644 --- a/google/cloud/retail/v2/internal/search_tracing_stub.cc +++ b/google/cloud/retail/v2/internal/search_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SearchServiceTracingStub::SearchServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -67,18 +68,14 @@ StatusOr SearchServiceTracingStub::GetOperation( child_->GetOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSearchServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/search_tracing_stub.h b/google/cloud/retail/v2/internal/search_tracing_stub.h index 2f7b4ab380492..4124d1cb19894 100644 --- a/google/cloud/retail/v2/internal/search_tracing_stub.h +++ b/google/cloud/retail/v2/internal/search_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SearchServiceTracingStub : public SearchServiceStub { public: ~SearchServiceTracingStub() override = default; @@ -56,8 +57,6 @@ class SearchServiceTracingStub : public SearchServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -72,4 +71,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_SEARCH_TRACING_STUB_H diff --git a/google/cloud/retail/v2/internal/serving_config_auth_decorator.cc b/google/cloud/retail/v2/internal/serving_config_auth_decorator.cc index 0d5953f17556b..6c7cce48f6ea0 100644 --- a/google/cloud/retail/v2/internal/serving_config_auth_decorator.cc +++ b/google/cloud/retail/v2/internal/serving_config_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/retail/v2/serving_config_service.proto #include "google/cloud/retail/v2/internal/serving_config_auth_decorator.h" -#include +#include "google/cloud/retail/v2/serving_config_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -114,3 +117,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/serving_config_auth_decorator.h b/google/cloud/retail/v2/internal/serving_config_auth_decorator.h index 82bcb816c2e6b..32881db4065e7 100644 --- a/google/cloud/retail/v2/internal/serving_config_auth_decorator.h +++ b/google/cloud/retail/v2/internal/serving_config_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -89,4 +92,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_SERVING_CONFIG_AUTH_DECORATOR_H diff --git a/google/cloud/retail/v2/internal/serving_config_logging_decorator.cc b/google/cloud/retail/v2/internal/serving_config_logging_decorator.cc index 6d6623f34259b..5300526bf6726 100644 --- a/google/cloud/retail/v2/internal/serving_config_logging_decorator.cc +++ b/google/cloud/retail/v2/internal/serving_config_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/retail/v2/serving_config_service.proto #include "google/cloud/retail/v2/internal/serving_config_logging_decorator.h" +#include "google/cloud/retail/v2/serving_config_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -151,3 +154,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/serving_config_logging_decorator.h b/google/cloud/retail/v2/internal/serving_config_logging_decorator.h index 234dc6238b81a..1a9b992e3802c 100644 --- a/google/cloud/retail/v2/internal/serving_config_logging_decorator.h +++ b/google/cloud/retail/v2/internal/serving_config_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -89,4 +92,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_SERVING_CONFIG_LOGGING_DECORATOR_H diff --git a/google/cloud/retail/v2/internal/serving_config_metadata_decorator.cc b/google/cloud/retail/v2/internal/serving_config_metadata_decorator.cc index 636c44dcdfc77..d6d2c7e0d5eb0 100644 --- a/google/cloud/retail/v2/internal/serving_config_metadata_decorator.cc +++ b/google/cloud/retail/v2/internal/serving_config_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/retail/v2/serving_config_service.proto #include "google/cloud/retail/v2/internal/serving_config_metadata_decorator.h" +#include "google/cloud/retail/v2/serving_config_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -145,3 +149,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/serving_config_metadata_decorator.h b/google/cloud/retail/v2/internal/serving_config_metadata_decorator.h index 58d56376c772a..7dfa44c8ab02d 100644 --- a/google/cloud/retail/v2/internal/serving_config_metadata_decorator.h +++ b/google/cloud/retail/v2/internal/serving_config_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -95,4 +98,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_SERVING_CONFIG_METADATA_DECORATOR_H diff --git a/google/cloud/retail/v2/internal/serving_config_option_defaults.cc b/google/cloud/retail/v2/internal/serving_config_option_defaults.cc index 7d46b73c566b8..d85dca16f27d4 100644 --- a/google/cloud/retail/v2/internal/serving_config_option_defaults.cc +++ b/google/cloud/retail/v2/internal/serving_config_option_defaults.cc @@ -42,7 +42,7 @@ Options ServingConfigServiceDefaultOptions(Options options) { if (!options.has()) { options.set( retail_v2::ServingConfigServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/retail/v2/internal/serving_config_stub.cc b/google/cloud/retail/v2/internal/serving_config_stub.cc index 23c78c8b85b69..eace725945705 100644 --- a/google/cloud/retail/v2/internal/serving_config_stub.cc +++ b/google/cloud/retail/v2/internal/serving_config_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/retail/v2/serving_config_service.proto #include "google/cloud/retail/v2/internal/serving_config_stub.h" +#include "google/cloud/retail/v2/serving_config_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -141,3 +144,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/serving_config_stub.h b/google/cloud/retail/v2/internal/serving_config_stub.h index c03e791a87e6f..afa70a9c7f343 100644 --- a/google/cloud/retail/v2/internal/serving_config_stub.h +++ b/google/cloud/retail/v2/internal/serving_config_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_SERVING_CONFIG_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_SERVING_CONFIG_STUB_H +#include "google/cloud/retail/v2/serving_config_service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -141,4 +144,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_SERVING_CONFIG_STUB_H diff --git a/google/cloud/retail/v2/internal/serving_config_stub_factory.cc b/google/cloud/retail/v2/internal/serving_config_stub_factory.cc index 1886a346752c3..1d97d0346f6a2 100644 --- a/google/cloud/retail/v2/internal/serving_config_stub_factory.cc +++ b/google/cloud/retail/v2/internal/serving_config_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/retail/v2/internal/serving_config_metadata_decorator.h" #include "google/cloud/retail/v2/internal/serving_config_stub.h" #include "google/cloud/retail/v2/internal/serving_config_tracing_stub.h" +#include "google/cloud/retail/v2/serving_config_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/serving_config_stub_factory.h b/google/cloud/retail/v2/internal/serving_config_stub_factory.h index 7f5c589d4b4fb..e5897590e7543 100644 --- a/google/cloud/retail/v2/internal/serving_config_stub_factory.h +++ b/google/cloud/retail/v2/internal/serving_config_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_SERVING_CONFIG_STUB_FACTORY_H diff --git a/google/cloud/retail/v2/internal/serving_config_tracing_connection.cc b/google/cloud/retail/v2/internal/serving_config_tracing_connection.cc index 5190b9a8b3ccc..e2582aec172fd 100644 --- a/google/cloud/retail/v2/internal/serving_config_tracing_connection.cc +++ b/google/cloud/retail/v2/internal/serving_config_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ServingConfigServiceTracingConnection::ServingConfigServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -117,17 +115,13 @@ ServingConfigServiceTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeServingConfigServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/retail/v2/internal/serving_config_tracing_connection.h b/google/cloud/retail/v2/internal/serving_config_tracing_connection.h index eab919dac0fcf..7bde6b8b9f404 100644 --- a/google/cloud/retail/v2/internal/serving_config_tracing_connection.h +++ b/google/cloud/retail/v2/internal/serving_config_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ServingConfigServiceTracingConnection : public retail_v2::ServingConfigServiceConnection { public: @@ -75,8 +73,6 @@ class ServingConfigServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/retail/v2/internal/serving_config_tracing_stub.cc b/google/cloud/retail/v2/internal/serving_config_tracing_stub.cc index efa17b5f2f353..5f9dbf15cbd36 100644 --- a/google/cloud/retail/v2/internal/serving_config_tracing_stub.cc +++ b/google/cloud/retail/v2/internal/serving_config_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ServingConfigServiceTracingStub::ServingConfigServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -139,18 +140,14 @@ ServingConfigServiceTracingStub::GetOperation( child_->GetOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeServingConfigServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/serving_config_tracing_stub.h b/google/cloud/retail/v2/internal/serving_config_tracing_stub.h index 04cfc881a2397..6c292ef4f5883 100644 --- a/google/cloud/retail/v2/internal/serving_config_tracing_stub.h +++ b/google/cloud/retail/v2/internal/serving_config_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ServingConfigServiceTracingStub : public ServingConfigServiceStub { public: ~ServingConfigServiceTracingStub() override = default; @@ -86,8 +87,6 @@ class ServingConfigServiceTracingStub : public ServingConfigServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -102,4 +101,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_SERVING_CONFIG_TRACING_STUB_H diff --git a/google/cloud/retail/v2/internal/user_event_auth_decorator.cc b/google/cloud/retail/v2/internal/user_event_auth_decorator.cc index 691368b0a5c28..8f3038eeb9bad 100644 --- a/google/cloud/retail/v2/internal/user_event_auth_decorator.cc +++ b/google/cloud/retail/v2/internal/user_event_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/retail/v2/user_event_service.proto #include "google/cloud/retail/v2/internal/user_event_auth_decorator.h" -#include +#include "google/cloud/retail/v2/user_event_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -189,3 +192,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/user_event_auth_decorator.h b/google/cloud/retail/v2/internal/user_event_auth_decorator.h index 2d970b257e006..d3903f5a183e8 100644 --- a/google/cloud/retail/v2/internal/user_event_auth_decorator.h +++ b/google/cloud/retail/v2/internal/user_event_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/retail/v2/internal/user_event_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -114,4 +117,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_USER_EVENT_AUTH_DECORATOR_H diff --git a/google/cloud/retail/v2/internal/user_event_connection_impl.h b/google/cloud/retail/v2/internal/user_event_connection_impl.h index 7e79c975891ec..66779022ee39c 100644 --- a/google/cloud/retail/v2/internal/user_event_connection_impl.h +++ b/google/cloud/retail/v2/internal/user_event_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/retail/v2/internal/user_event_logging_decorator.cc b/google/cloud/retail/v2/internal/user_event_logging_decorator.cc index f64c2f41bc431..66174e8c3812d 100644 --- a/google/cloud/retail/v2/internal/user_event_logging_decorator.cc +++ b/google/cloud/retail/v2/internal/user_event_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/retail/v2/user_event_service.proto #include "google/cloud/retail/v2/internal/user_event_logging_decorator.h" +#include "google/cloud/retail/v2/user_event_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -215,3 +218,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/user_event_logging_decorator.h b/google/cloud/retail/v2/internal/user_event_logging_decorator.h index ae4f63349ee45..4675a79ed0aaf 100644 --- a/google/cloud/retail/v2/internal/user_event_logging_decorator.h +++ b/google/cloud/retail/v2/internal/user_event_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/retail/v2/internal/user_event_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -114,4 +117,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_USER_EVENT_LOGGING_DECORATOR_H diff --git a/google/cloud/retail/v2/internal/user_event_metadata_decorator.cc b/google/cloud/retail/v2/internal/user_event_metadata_decorator.cc index 7d4a73f6f8b93..3a81226360955 100644 --- a/google/cloud/retail/v2/internal/user_event_metadata_decorator.cc +++ b/google/cloud/retail/v2/internal/user_event_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/retail/v2/user_event_service.proto #include "google/cloud/retail/v2/internal/user_event_metadata_decorator.h" +#include "google/cloud/retail/v2/user_event_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -181,3 +185,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/user_event_metadata_decorator.h b/google/cloud/retail/v2/internal/user_event_metadata_decorator.h index 5fab344d2c5f5..385033a364036 100644 --- a/google/cloud/retail/v2/internal/user_event_metadata_decorator.h +++ b/google/cloud/retail/v2/internal/user_event_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/retail/v2/internal/user_event_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -120,4 +123,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_USER_EVENT_METADATA_DECORATOR_H diff --git a/google/cloud/retail/v2/internal/user_event_option_defaults.cc b/google/cloud/retail/v2/internal/user_event_option_defaults.cc index 45704903ce27e..48f1db0a656e2 100644 --- a/google/cloud/retail/v2/internal/user_event_option_defaults.cc +++ b/google/cloud/retail/v2/internal/user_event_option_defaults.cc @@ -41,7 +41,7 @@ Options UserEventServiceDefaultOptions(Options options) { if (!options.has()) { options.set( retail_v2::UserEventServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/retail/v2/internal/user_event_stub.cc b/google/cloud/retail/v2/internal/user_event_stub.cc index 9f337302135bc..b8b589a8f350a 100644 --- a/google/cloud/retail/v2/internal/user_event_stub.cc +++ b/google/cloud/retail/v2/internal/user_event_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/retail/v2/user_event_service.proto #include "google/cloud/retail/v2/internal/user_event_stub.h" +#include "google/cloud/retail/v2/user_event_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -211,3 +214,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/user_event_stub.h b/google/cloud/retail/v2/internal/user_event_stub.h index 5b299ec6f91b1..7139b2f54a7e1 100644 --- a/google/cloud/retail/v2/internal/user_event_stub.h +++ b/google/cloud/retail/v2/internal/user_event_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_USER_EVENT_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_USER_EVENT_STUB_H +#include "google/cloud/retail/v2/user_event_service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -187,4 +190,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_USER_EVENT_STUB_H diff --git a/google/cloud/retail/v2/internal/user_event_stub_factory.cc b/google/cloud/retail/v2/internal/user_event_stub_factory.cc index dd1f9b5329d46..d54e524b11a5a 100644 --- a/google/cloud/retail/v2/internal/user_event_stub_factory.cc +++ b/google/cloud/retail/v2/internal/user_event_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/retail/v2/internal/user_event_metadata_decorator.h" #include "google/cloud/retail/v2/internal/user_event_stub.h" #include "google/cloud/retail/v2/internal/user_event_tracing_stub.h" +#include "google/cloud/retail/v2/user_event_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/user_event_stub_factory.h b/google/cloud/retail/v2/internal/user_event_stub_factory.h index a03f9be8b57dd..ab912d46fe64e 100644 --- a/google/cloud/retail/v2/internal/user_event_stub_factory.h +++ b/google/cloud/retail/v2/internal/user_event_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_USER_EVENT_STUB_FACTORY_H diff --git a/google/cloud/retail/v2/internal/user_event_tracing_connection.cc b/google/cloud/retail/v2/internal/user_event_tracing_connection.cc index 5b731a63d06ba..fd2aafe277028 100644 --- a/google/cloud/retail/v2/internal/user_event_tracing_connection.cc +++ b/google/cloud/retail/v2/internal/user_event_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - UserEventServiceTracingConnection::UserEventServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -160,16 +158,12 @@ UserEventServiceTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeUserEventServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/retail/v2/internal/user_event_tracing_connection.h b/google/cloud/retail/v2/internal/user_event_tracing_connection.h index 6d9bac06084fc..05ec3bb8e93ef 100644 --- a/google/cloud/retail/v2/internal/user_event_tracing_connection.h +++ b/google/cloud/retail/v2/internal/user_event_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class UserEventServiceTracingConnection : public retail_v2::UserEventServiceConnection { public: @@ -93,8 +91,6 @@ class UserEventServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/retail/v2/internal/user_event_tracing_stub.cc b/google/cloud/retail/v2/internal/user_event_tracing_stub.cc index 7ab12bcbd44aa..4d53220113151 100644 --- a/google/cloud/retail/v2/internal/user_event_tracing_stub.cc +++ b/google/cloud/retail/v2/internal/user_event_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - UserEventServiceTracingStub::UserEventServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -188,18 +189,14 @@ future UserEventServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeUserEventServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace retail_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/retail/v2/internal/user_event_tracing_stub.h b/google/cloud/retail/v2/internal/user_event_tracing_stub.h index 0abd070448eb3..ab950186903f1 100644 --- a/google/cloud/retail/v2/internal/user_event_tracing_stub.h +++ b/google/cloud/retail/v2/internal/user_event_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace retail_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class UserEventServiceTracingStub : public UserEventServiceStub { public: ~UserEventServiceTracingStub() override = default; @@ -110,8 +111,6 @@ class UserEventServiceTracingStub : public UserEventServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -126,4 +125,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_INTERNAL_USER_EVENT_TRACING_STUB_H diff --git a/google/cloud/retail/v2/model_client.h b/google/cloud/retail/v2/model_client.h index bbe342406e31b..ed79c92c8d905 100644 --- a/google/cloud/retail/v2/model_client.h +++ b/google/cloud/retail/v2/model_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/retail/v2/model_connection.h b/google/cloud/retail/v2/model_connection.h index b546dce9ff342..c1e85f4f6cd63 100644 --- a/google/cloud/retail/v2/model_connection.h +++ b/google/cloud/retail/v2/model_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/retail/v2/internal/model_retry_traits.h" #include "google/cloud/retail/v2/model_connection_idempotency_policy.h" +#include "google/cloud/retail/v2/model_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/retail/v2/model_connection_idempotency_policy.h b/google/cloud/retail/v2/model_connection_idempotency_policy.h index 0862f56c4906e..b3a2fa72743d7 100644 --- a/google/cloud/retail/v2/model_connection_idempotency_policy.h +++ b/google/cloud/retail/v2/model_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_MODEL_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_MODEL_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/retail/v2/model_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/retail/v2/prediction_connection.h b/google/cloud/retail/v2/prediction_connection.h index 65d675c9edeb6..320b1f9e622f5 100644 --- a/google/cloud/retail/v2/prediction_connection.h +++ b/google/cloud/retail/v2/prediction_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/retail/v2/internal/prediction_retry_traits.h" #include "google/cloud/retail/v2/prediction_connection_idempotency_policy.h" +#include "google/cloud/retail/v2/prediction_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/retail/v2/prediction_connection_idempotency_policy.h b/google/cloud/retail/v2/prediction_connection_idempotency_policy.h index 56f095a30505d..fc1cb4cf8c1fc 100644 --- a/google/cloud/retail/v2/prediction_connection_idempotency_policy.h +++ b/google/cloud/retail/v2/prediction_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_PREDICTION_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_PREDICTION_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/retail/v2/prediction_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/retail/v2/product_client.h b/google/cloud/retail/v2/product_client.h index f7c3c85d2fd44..15acb4c381142 100644 --- a/google/cloud/retail/v2/product_client.h +++ b/google/cloud/retail/v2/product_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/retail/v2/product_connection.h b/google/cloud/retail/v2/product_connection.h index c743d2e1709d6..0431dcbd0f0d9 100644 --- a/google/cloud/retail/v2/product_connection.h +++ b/google/cloud/retail/v2/product_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/retail/v2/internal/product_retry_traits.h" #include "google/cloud/retail/v2/product_connection_idempotency_policy.h" +#include "google/cloud/retail/v2/product_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/retail/v2/product_connection_idempotency_policy.h b/google/cloud/retail/v2/product_connection_idempotency_policy.h index 117bb0c62cb94..fe173388d5316 100644 --- a/google/cloud/retail/v2/product_connection_idempotency_policy.h +++ b/google/cloud/retail/v2/product_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_PRODUCT_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_PRODUCT_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/retail/v2/product_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/retail/v2/search_connection.h b/google/cloud/retail/v2/search_connection.h index 051dd6e11053a..968bed33a9c7f 100644 --- a/google/cloud/retail/v2/search_connection.h +++ b/google/cloud/retail/v2/search_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/retail/v2/internal/search_retry_traits.h" #include "google/cloud/retail/v2/search_connection_idempotency_policy.h" +#include "google/cloud/retail/v2/search_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/retail/v2/search_connection_idempotency_policy.h b/google/cloud/retail/v2/search_connection_idempotency_policy.h index 529101d62f6de..8ea7f59535193 100644 --- a/google/cloud/retail/v2/search_connection_idempotency_policy.h +++ b/google/cloud/retail/v2/search_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_SEARCH_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_SEARCH_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/retail/v2/search_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/retail/v2/serving_config_connection.h b/google/cloud/retail/v2/serving_config_connection.h index 86022cd571ff5..7b19aa544cedd 100644 --- a/google/cloud/retail/v2/serving_config_connection.h +++ b/google/cloud/retail/v2/serving_config_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/retail/v2/internal/serving_config_retry_traits.h" #include "google/cloud/retail/v2/serving_config_connection_idempotency_policy.h" +#include "google/cloud/retail/v2/serving_config_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/retail/v2/serving_config_connection_idempotency_policy.h b/google/cloud/retail/v2/serving_config_connection_idempotency_policy.h index 1b74b29c4f111..ffce6c28ec671 100644 --- a/google/cloud/retail/v2/serving_config_connection_idempotency_policy.h +++ b/google/cloud/retail/v2/serving_config_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_SERVING_CONFIG_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_SERVING_CONFIG_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/retail/v2/serving_config_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/retail/v2/user_event_client.h b/google/cloud/retail/v2/user_event_client.h index 08086000cb0ea..2c40ee4c23703 100644 --- a/google/cloud/retail/v2/user_event_client.h +++ b/google/cloud/retail/v2/user_event_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/retail/v2/user_event_connection.h b/google/cloud/retail/v2/user_event_connection.h index 5b521904034a2..efb5c7ab7f5da 100644 --- a/google/cloud/retail/v2/user_event_connection.h +++ b/google/cloud/retail/v2/user_event_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/retail/v2/internal/user_event_retry_traits.h" #include "google/cloud/retail/v2/user_event_connection_idempotency_policy.h" +#include "google/cloud/retail/v2/user_event_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/retail/v2/user_event_connection_idempotency_policy.h b/google/cloud/retail/v2/user_event_connection_idempotency_policy.h index 6359d5d652fef..0589402027d10 100644 --- a/google/cloud/retail/v2/user_event_connection_idempotency_policy.h +++ b/google/cloud/retail/v2/user_event_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_USER_EVENT_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RETAIL_V2_USER_EVENT_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/retail/v2/user_event_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/run/BUILD.bazel b/google/cloud/run/BUILD.bazel index c88d2bf6c1e82..3ef1147c52537 100644 --- a/google/cloud/run/BUILD.bazel +++ b/google/cloud/run/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v2/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/run/v2:run_cc_grpc", + "@googleapis//google/cloud/run/v2:run_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/run/CMakeLists.txt b/google/cloud/run/CMakeLists.txt index 492207c77a09d..e613ad53b1267 100644 --- a/google/cloud/run/CMakeLists.txt +++ b/google/cloud/run/CMakeLists.txt @@ -16,8 +16,7 @@ include(GoogleCloudCppLibrary) -google_cloud_cpp_add_gapic_library(run "Cloud Run Admin API" - SERVICE_DIRS "__EMPTY__" "v2/") +google_cloud_cpp_add_gapic_library(run "Cloud Run Admin API" SERVICE_DIRS "v2/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(run_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/run/mocks/mock_revisions_connection.h b/google/cloud/run/mocks/mock_revisions_connection.h deleted file mode 100644 index f1f255c55201c..0000000000000 --- a/google/cloud/run/mocks/mock_revisions_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/run/v2/revision.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_MOCKS_MOCK_REVISIONS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_MOCKS_MOCK_REVISIONS_CONNECTION_H - -#include "google/cloud/run/revisions_connection.h" -#include "google/cloud/run/v2/mocks/mock_revisions_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in run_v2_mocks instead of the aliases -/// defined in this namespace. -namespace run_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use run_v2_mocks::MockRevisionsConnection directly. -using ::google::cloud::run_v2_mocks::MockRevisionsConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace run_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_MOCKS_MOCK_REVISIONS_CONNECTION_H diff --git a/google/cloud/run/mocks/mock_services_connection.h b/google/cloud/run/mocks/mock_services_connection.h deleted file mode 100644 index f52e50c67b8a0..0000000000000 --- a/google/cloud/run/mocks/mock_services_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/run/v2/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_MOCKS_MOCK_SERVICES_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_MOCKS_MOCK_SERVICES_CONNECTION_H - -#include "google/cloud/run/services_connection.h" -#include "google/cloud/run/v2/mocks/mock_services_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in run_v2_mocks instead of the aliases -/// defined in this namespace. -namespace run_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use run_v2_mocks::MockServicesConnection directly. -using ::google::cloud::run_v2_mocks::MockServicesConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace run_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_MOCKS_MOCK_SERVICES_CONNECTION_H diff --git a/google/cloud/run/quickstart/.bazelrc b/google/cloud/run/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/run/quickstart/.bazelrc +++ b/google/cloud/run/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/run/quickstart/CMakeLists.txt b/google/cloud/run/quickstart/CMakeLists.txt index e0f1d6e4dea08..c5b481e764084 100644 --- a/google/cloud/run/quickstart/CMakeLists.txt +++ b/google/cloud/run/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Run Admin API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-run-quickstart CXX) find_package(google_cloud_cpp_run REQUIRED) diff --git a/google/cloud/run/revisions_client.h b/google/cloud/run/revisions_client.h deleted file mode 100644 index cb4b6d8a52b5c..0000000000000 --- a/google/cloud/run/revisions_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/run/v2/revision.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_REVISIONS_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_REVISIONS_CLIENT_H - -#include "google/cloud/run/revisions_connection.h" -#include "google/cloud/run/v2/revisions_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in run_v2 instead of the aliases defined in -/// this namespace. -namespace run { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use run_v2::RevisionsClient directly. -using ::google::cloud::run_v2::RevisionsClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace run -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_REVISIONS_CLIENT_H diff --git a/google/cloud/run/revisions_connection.h b/google/cloud/run/revisions_connection.h deleted file mode 100644 index abfa5a3291e53..0000000000000 --- a/google/cloud/run/revisions_connection.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/run/v2/revision.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_REVISIONS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_REVISIONS_CONNECTION_H - -#include "google/cloud/run/revisions_connection_idempotency_policy.h" -#include "google/cloud/run/v2/revisions_connection.h" - -namespace google { -namespace cloud { -namespace run { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use run_v2::MakeRevisionsConnection directly. -using ::google::cloud::run_v2::MakeRevisionsConnection; - -/// @deprecated Use run_v2::RevisionsConnection directly. -using ::google::cloud::run_v2::RevisionsConnection; - -/// @deprecated Use run_v2::RevisionsLimitedErrorCountRetryPolicy directly. -using ::google::cloud::run_v2::RevisionsLimitedErrorCountRetryPolicy; - -/// @deprecated Use run_v2::RevisionsLimitedTimeRetryPolicy directly. -using ::google::cloud::run_v2::RevisionsLimitedTimeRetryPolicy; - -/// @deprecated Use run_v2::RevisionsRetryPolicy directly. -using ::google::cloud::run_v2::RevisionsRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace run -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_REVISIONS_CONNECTION_H diff --git a/google/cloud/run/revisions_connection_idempotency_policy.h b/google/cloud/run/revisions_connection_idempotency_policy.h deleted file mode 100644 index 08d87657fe8f2..0000000000000 --- a/google/cloud/run/revisions_connection_idempotency_policy.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/run/v2/revision.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_REVISIONS_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_REVISIONS_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/run/v2/revisions_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace run { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use run_v2::MakeDefaultRevisionsConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::run_v2::MakeDefaultRevisionsConnectionIdempotencyPolicy; - -/// @deprecated Use run_v2::RevisionsConnectionIdempotencyPolicy directly. -using ::google::cloud::run_v2::RevisionsConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace run -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_REVISIONS_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/run/revisions_options.h b/google/cloud/run/revisions_options.h deleted file mode 100644 index 53cb68246b226..0000000000000 --- a/google/cloud/run/revisions_options.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/run/v2/revision.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_REVISIONS_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_REVISIONS_OPTIONS_H - -#include "google/cloud/run/revisions_connection.h" -#include "google/cloud/run/revisions_connection_idempotency_policy.h" -#include "google/cloud/run/v2/revisions_options.h" - -namespace google { -namespace cloud { -namespace run { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use run_v2::RevisionsPollingPolicyOption directly. -using ::google::cloud::run_v2::RevisionsPollingPolicyOption; - -/// @deprecated Use run_v2::RevisionsBackoffPolicyOption directly. -using ::google::cloud::run_v2::RevisionsBackoffPolicyOption; - -/// @deprecated Use run_v2::RevisionsConnectionIdempotencyPolicyOption directly. -using ::google::cloud::run_v2::RevisionsConnectionIdempotencyPolicyOption; - -/// @deprecated Use run_v2::RevisionsPolicyOptionList directly. -using ::google::cloud::run_v2::RevisionsPolicyOptionList; - -/// @deprecated Use run_v2::RevisionsRetryPolicyOption directly. -using ::google::cloud::run_v2::RevisionsRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace run -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_REVISIONS_OPTIONS_H diff --git a/google/cloud/run/services_client.h b/google/cloud/run/services_client.h deleted file mode 100644 index 91ef2016a2218..0000000000000 --- a/google/cloud/run/services_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/run/v2/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_SERVICES_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_SERVICES_CLIENT_H - -#include "google/cloud/run/services_connection.h" -#include "google/cloud/run/v2/services_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in run_v2 instead of the aliases defined in -/// this namespace. -namespace run { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use run_v2::ServicesClient directly. -using ::google::cloud::run_v2::ServicesClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace run -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_SERVICES_CLIENT_H diff --git a/google/cloud/run/services_connection.h b/google/cloud/run/services_connection.h deleted file mode 100644 index 9793b2f0a2a70..0000000000000 --- a/google/cloud/run/services_connection.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/run/v2/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_SERVICES_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_SERVICES_CONNECTION_H - -#include "google/cloud/run/services_connection_idempotency_policy.h" -#include "google/cloud/run/v2/services_connection.h" - -namespace google { -namespace cloud { -namespace run { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use run_v2::MakeServicesConnection directly. -using ::google::cloud::run_v2::MakeServicesConnection; - -/// @deprecated Use run_v2::ServicesConnection directly. -using ::google::cloud::run_v2::ServicesConnection; - -/// @deprecated Use run_v2::ServicesLimitedErrorCountRetryPolicy directly. -using ::google::cloud::run_v2::ServicesLimitedErrorCountRetryPolicy; - -/// @deprecated Use run_v2::ServicesLimitedTimeRetryPolicy directly. -using ::google::cloud::run_v2::ServicesLimitedTimeRetryPolicy; - -/// @deprecated Use run_v2::ServicesRetryPolicy directly. -using ::google::cloud::run_v2::ServicesRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace run -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_SERVICES_CONNECTION_H diff --git a/google/cloud/run/services_connection_idempotency_policy.h b/google/cloud/run/services_connection_idempotency_policy.h deleted file mode 100644 index 976cb3a476a06..0000000000000 --- a/google/cloud/run/services_connection_idempotency_policy.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/run/v2/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_SERVICES_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_SERVICES_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/run/v2/services_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace run { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use run_v2::MakeDefaultServicesConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::run_v2::MakeDefaultServicesConnectionIdempotencyPolicy; - -/// @deprecated Use run_v2::ServicesConnectionIdempotencyPolicy directly. -using ::google::cloud::run_v2::ServicesConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace run -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_SERVICES_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/run/services_options.h b/google/cloud/run/services_options.h deleted file mode 100644 index 21e2ca6d83ef4..0000000000000 --- a/google/cloud/run/services_options.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/run/v2/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_SERVICES_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_SERVICES_OPTIONS_H - -#include "google/cloud/run/services_connection.h" -#include "google/cloud/run/services_connection_idempotency_policy.h" -#include "google/cloud/run/v2/services_options.h" - -namespace google { -namespace cloud { -namespace run { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use run_v2::ServicesPollingPolicyOption directly. -using ::google::cloud::run_v2::ServicesPollingPolicyOption; - -/// @deprecated Use run_v2::ServicesBackoffPolicyOption directly. -using ::google::cloud::run_v2::ServicesBackoffPolicyOption; - -/// @deprecated Use run_v2::ServicesConnectionIdempotencyPolicyOption directly. -using ::google::cloud::run_v2::ServicesConnectionIdempotencyPolicyOption; - -/// @deprecated Use run_v2::ServicesPolicyOptionList directly. -using ::google::cloud::run_v2::ServicesPolicyOptionList; - -/// @deprecated Use run_v2::ServicesRetryPolicyOption directly. -using ::google::cloud::run_v2::ServicesRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace run -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_SERVICES_OPTIONS_H diff --git a/google/cloud/run/v2/executions_client.h b/google/cloud/run/v2/executions_client.h index c8dc04445dd6a..eba1536b524b0 100644 --- a/google/cloud/run/v2/executions_client.h +++ b/google/cloud/run/v2/executions_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/run/v2/executions_connection.h b/google/cloud/run/v2/executions_connection.h index ee925e7d8a326..8fac26c9076eb 100644 --- a/google/cloud/run/v2/executions_connection.h +++ b/google/cloud/run/v2/executions_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_EXECUTIONS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_EXECUTIONS_CONNECTION_H +#include "google/cloud/run/v2/execution.pb.h" #include "google/cloud/run/v2/executions_connection_idempotency_policy.h" #include "google/cloud/run/v2/internal/executions_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/run/v2/executions_connection_idempotency_policy.h b/google/cloud/run/v2/executions_connection_idempotency_policy.h index 9b071a5877b7a..f0dd43e830e31 100644 --- a/google/cloud/run/v2/executions_connection_idempotency_policy.h +++ b/google/cloud/run/v2/executions_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_EXECUTIONS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_EXECUTIONS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/run/v2/execution.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/run/v2/internal/executions_auth_decorator.cc b/google/cloud/run/v2/internal/executions_auth_decorator.cc index 1f0f35ef45d55..e11ff3cb07547 100644 --- a/google/cloud/run/v2/internal/executions_auth_decorator.cc +++ b/google/cloud/run/v2/internal/executions_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/run/v2/execution.proto #include "google/cloud/run/v2/internal/executions_auth_decorator.h" -#include +#include "google/cloud/run/v2/execution.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -177,3 +180,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace run_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/run/v2/internal/executions_auth_decorator.h b/google/cloud/run/v2/internal/executions_auth_decorator.h index 58fec74f585c8..daccd67e81cdc 100644 --- a/google/cloud/run/v2/internal/executions_auth_decorator.h +++ b/google/cloud/run/v2/internal/executions_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/run/v2/internal/executions_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -105,4 +108,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_EXECUTIONS_AUTH_DECORATOR_H diff --git a/google/cloud/run/v2/internal/executions_connection_impl.h b/google/cloud/run/v2/internal/executions_connection_impl.h index 4b08ed9db6b49..f33279f9179d3 100644 --- a/google/cloud/run/v2/internal/executions_connection_impl.h +++ b/google/cloud/run/v2/internal/executions_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/run/v2/internal/executions_logging_decorator.cc b/google/cloud/run/v2/internal/executions_logging_decorator.cc index 1a7fbaf2ce65c..e556151bdc59a 100644 --- a/google/cloud/run/v2/internal/executions_logging_decorator.cc +++ b/google/cloud/run/v2/internal/executions_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/run/v2/execution.proto #include "google/cloud/run/v2/internal/executions_logging_decorator.h" +#include "google/cloud/run/v2/execution.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -200,3 +203,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace run_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/run/v2/internal/executions_logging_decorator.h b/google/cloud/run/v2/internal/executions_logging_decorator.h index 758f5bb426c02..8cc5852be9149 100644 --- a/google/cloud/run/v2/internal/executions_logging_decorator.h +++ b/google/cloud/run/v2/internal/executions_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/run/v2/internal/executions_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -105,4 +108,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_EXECUTIONS_LOGGING_DECORATOR_H diff --git a/google/cloud/run/v2/internal/executions_metadata_decorator.cc b/google/cloud/run/v2/internal/executions_metadata_decorator.cc index fbfd08061cebf..230f14e777341 100644 --- a/google/cloud/run/v2/internal/executions_metadata_decorator.cc +++ b/google/cloud/run/v2/internal/executions_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/run/v2/execution.proto #include "google/cloud/run/v2/internal/executions_metadata_decorator.h" +#include "google/cloud/run/v2/execution.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -173,3 +177,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace run_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/run/v2/internal/executions_metadata_decorator.h b/google/cloud/run/v2/internal/executions_metadata_decorator.h index 252c4c73596d5..535f24e2047d5 100644 --- a/google/cloud/run/v2/internal/executions_metadata_decorator.h +++ b/google/cloud/run/v2/internal/executions_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/run/v2/internal/executions_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -110,4 +113,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_EXECUTIONS_METADATA_DECORATOR_H diff --git a/google/cloud/run/v2/internal/executions_option_defaults.cc b/google/cloud/run/v2/internal/executions_option_defaults.cc index 9ec8d6f4c9ee8..bb246f1e4cc81 100644 --- a/google/cloud/run/v2/internal/executions_option_defaults.cc +++ b/google/cloud/run/v2/internal/executions_option_defaults.cc @@ -40,7 +40,7 @@ Options ExecutionsDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - run_v2::ExecutionsLimitedTimeRetryPolicy(std::chrono::minutes(30)) + run_v2::ExecutionsLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/run/v2/internal/executions_stub.cc b/google/cloud/run/v2/internal/executions_stub.cc index 2e8f50368a26c..afc1ae708a76f 100644 --- a/google/cloud/run/v2/internal/executions_stub.cc +++ b/google/cloud/run/v2/internal/executions_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/run/v2/execution.proto #include "google/cloud/run/v2/internal/executions_stub.h" +#include "google/cloud/run/v2/execution.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -200,3 +203,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace run_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/run/v2/internal/executions_stub.h b/google/cloud/run/v2/internal/executions_stub.h index 1a3b61dc664c4..4e4b8646f2053 100644 --- a/google/cloud/run/v2/internal/executions_stub.h +++ b/google/cloud/run/v2/internal/executions_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_EXECUTIONS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_EXECUTIONS_STUB_H +#include "google/cloud/run/v2/execution.grpc.pb.h" +#include "google/cloud/run/v2/execution.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -174,4 +177,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_EXECUTIONS_STUB_H diff --git a/google/cloud/run/v2/internal/executions_stub_factory.cc b/google/cloud/run/v2/internal/executions_stub_factory.cc index 41d12c225b3c3..1342fa39d2adf 100644 --- a/google/cloud/run/v2/internal/executions_stub_factory.cc +++ b/google/cloud/run/v2/internal/executions_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/run/v2/execution.proto #include "google/cloud/run/v2/internal/executions_stub_factory.h" +#include "google/cloud/run/v2/execution.grpc.pb.h" #include "google/cloud/run/v2/internal/executions_auth_decorator.h" #include "google/cloud/run/v2/internal/executions_logging_decorator.h" #include "google/cloud/run/v2/internal/executions_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace run_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/run/v2/internal/executions_stub_factory.h b/google/cloud/run/v2/internal/executions_stub_factory.h index efac4f37fcec5..fac616049e172 100644 --- a/google/cloud/run/v2/internal/executions_stub_factory.h +++ b/google/cloud/run/v2/internal/executions_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_EXECUTIONS_STUB_FACTORY_H diff --git a/google/cloud/run/v2/internal/executions_tracing_connection.cc b/google/cloud/run/v2/internal/executions_tracing_connection.cc index 9203d5caa4af8..2dec713065c4a 100644 --- a/google/cloud/run/v2/internal/executions_tracing_connection.cc +++ b/google/cloud/run/v2/internal/executions_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace run_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ExecutionsTracingConnection::ExecutionsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -143,15 +141,11 @@ ExecutionsTracingConnection::WaitOperation( return internal::EndSpan(*span, child_->WaitOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeExecutionsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/run/v2/internal/executions_tracing_connection.h b/google/cloud/run/v2/internal/executions_tracing_connection.h index b308484335e48..921d073849af8 100644 --- a/google/cloud/run/v2/internal/executions_tracing_connection.h +++ b/google/cloud/run/v2/internal/executions_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace run_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ExecutionsTracingConnection : public run_v2::ExecutionsConnection { public: ~ExecutionsTracingConnection() override = default; @@ -81,8 +79,6 @@ class ExecutionsTracingConnection : public run_v2::ExecutionsConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/run/v2/internal/executions_tracing_stub.cc b/google/cloud/run/v2/internal/executions_tracing_stub.cc index 06d5ad761dfe3..9f1b0853329fe 100644 --- a/google/cloud/run/v2/internal/executions_tracing_stub.cc +++ b/google/cloud/run/v2/internal/executions_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ExecutionsTracingStub::ExecutionsTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -180,18 +181,14 @@ future ExecutionsTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeExecutionsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace run_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/run/v2/internal/executions_tracing_stub.h b/google/cloud/run/v2/internal/executions_tracing_stub.h index d4ded9b10f192..2e4cb39c4f8cb 100644 --- a/google/cloud/run/v2/internal/executions_tracing_stub.h +++ b/google/cloud/run/v2/internal/executions_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ExecutionsTracingStub : public ExecutionsStub { public: ~ExecutionsTracingStub() override = default; @@ -100,8 +101,6 @@ class ExecutionsTracingStub : public ExecutionsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -116,4 +115,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_EXECUTIONS_TRACING_STUB_H diff --git a/google/cloud/run/v2/internal/jobs_auth_decorator.cc b/google/cloud/run/v2/internal/jobs_auth_decorator.cc index e43a92f37f728..c35a17cea1358 100644 --- a/google/cloud/run/v2/internal/jobs_auth_decorator.cc +++ b/google/cloud/run/v2/internal/jobs_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/run/v2/job.proto #include "google/cloud/run/v2/internal/jobs_auth_decorator.h" -#include +#include "google/cloud/run/v2/job.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -251,3 +254,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace run_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/run/v2/internal/jobs_auth_decorator.h b/google/cloud/run/v2/internal/jobs_auth_decorator.h index a84c01a944207..3a8fe04e44120 100644 --- a/google/cloud/run/v2/internal/jobs_auth_decorator.h +++ b/google/cloud/run/v2/internal/jobs_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/run/v2/internal/jobs_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -137,4 +140,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_JOBS_AUTH_DECORATOR_H diff --git a/google/cloud/run/v2/internal/jobs_connection_impl.h b/google/cloud/run/v2/internal/jobs_connection_impl.h index 75a23aab2334b..b7d710c4f011b 100644 --- a/google/cloud/run/v2/internal/jobs_connection_impl.h +++ b/google/cloud/run/v2/internal/jobs_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/run/v2/internal/jobs_logging_decorator.cc b/google/cloud/run/v2/internal/jobs_logging_decorator.cc index bfa934deb6731..4ab567874eadd 100644 --- a/google/cloud/run/v2/internal/jobs_logging_decorator.cc +++ b/google/cloud/run/v2/internal/jobs_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/run/v2/job.proto #include "google/cloud/run/v2/internal/jobs_logging_decorator.h" +#include "google/cloud/run/v2/job.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -286,3 +289,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace run_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/run/v2/internal/jobs_logging_decorator.h b/google/cloud/run/v2/internal/jobs_logging_decorator.h index 553a70d1d873c..fd2f08aee3572 100644 --- a/google/cloud/run/v2/internal/jobs_logging_decorator.h +++ b/google/cloud/run/v2/internal/jobs_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/run/v2/internal/jobs_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -136,4 +139,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_JOBS_LOGGING_DECORATOR_H diff --git a/google/cloud/run/v2/internal/jobs_metadata_decorator.cc b/google/cloud/run/v2/internal/jobs_metadata_decorator.cc index 380be7f664ddd..feb1b4ba78773 100644 --- a/google/cloud/run/v2/internal/jobs_metadata_decorator.cc +++ b/google/cloud/run/v2/internal/jobs_metadata_decorator.cc @@ -17,19 +17,22 @@ // source: google/cloud/run/v2/job.proto #include "google/cloud/run/v2/internal/jobs_metadata_decorator.h" +#include "google/cloud/run/v2/job.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/routing_matcher.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -428,3 +431,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace run_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/run/v2/internal/jobs_metadata_decorator.h b/google/cloud/run/v2/internal/jobs_metadata_decorator.h index c2bc33ce54ce3..9a312fef97de7 100644 --- a/google/cloud/run/v2/internal/jobs_metadata_decorator.h +++ b/google/cloud/run/v2/internal/jobs_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/run/v2/internal/jobs_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -142,4 +145,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_JOBS_METADATA_DECORATOR_H diff --git a/google/cloud/run/v2/internal/jobs_option_defaults.cc b/google/cloud/run/v2/internal/jobs_option_defaults.cc index ce5a986ad0839..f18b9c3970c84 100644 --- a/google/cloud/run/v2/internal/jobs_option_defaults.cc +++ b/google/cloud/run/v2/internal/jobs_option_defaults.cc @@ -40,7 +40,7 @@ Options JobsDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - run_v2::JobsLimitedTimeRetryPolicy(std::chrono::minutes(30)).clone()); + run_v2::JobsLimitedTimeRetryPolicy(std::chrono::minutes(10)).clone()); } if (!options.has()) { options.set( diff --git a/google/cloud/run/v2/internal/jobs_stub.cc b/google/cloud/run/v2/internal/jobs_stub.cc index be653ab342910..4ce4f0a3bfa19 100644 --- a/google/cloud/run/v2/internal/jobs_stub.cc +++ b/google/cloud/run/v2/internal/jobs_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/run/v2/job.proto #include "google/cloud/run/v2/internal/jobs_stub.h" +#include "google/cloud/run/v2/job.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -286,3 +289,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace run_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/run/v2/internal/jobs_stub.h b/google/cloud/run/v2/internal/jobs_stub.h index 1f4a6aaf4b18c..fd17aa80fe9fb 100644 --- a/google/cloud/run/v2/internal/jobs_stub.h +++ b/google/cloud/run/v2/internal/jobs_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_JOBS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_JOBS_STUB_H +#include "google/cloud/run/v2/execution.pb.h" +#include "google/cloud/run/v2/job.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -237,4 +240,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_JOBS_STUB_H diff --git a/google/cloud/run/v2/internal/jobs_stub_factory.cc b/google/cloud/run/v2/internal/jobs_stub_factory.cc index 25ce80b2fa001..585750e6fd7f8 100644 --- a/google/cloud/run/v2/internal/jobs_stub_factory.cc +++ b/google/cloud/run/v2/internal/jobs_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/run/v2/internal/jobs_metadata_decorator.h" #include "google/cloud/run/v2/internal/jobs_stub.h" #include "google/cloud/run/v2/internal/jobs_tracing_stub.h" +#include "google/cloud/run/v2/job.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -69,3 +72,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace run_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/run/v2/internal/jobs_stub_factory.h b/google/cloud/run/v2/internal/jobs_stub_factory.h index 26b02b4889452..21acc4178a039 100644 --- a/google/cloud/run/v2/internal/jobs_stub_factory.h +++ b/google/cloud/run/v2/internal/jobs_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_JOBS_STUB_FACTORY_H diff --git a/google/cloud/run/v2/internal/jobs_tracing_connection.cc b/google/cloud/run/v2/internal/jobs_tracing_connection.cc index addfcfcfe6685..9b9463d97def7 100644 --- a/google/cloud/run/v2/internal/jobs_tracing_connection.cc +++ b/google/cloud/run/v2/internal/jobs_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace run_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - JobsTracingConnection::JobsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -187,15 +185,11 @@ StatusOr JobsTracingConnection::WaitOperation( return internal::EndSpan(*span, child_->WaitOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeJobsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/run/v2/internal/jobs_tracing_connection.h b/google/cloud/run/v2/internal/jobs_tracing_connection.h index 328cc1e2152d1..6a896fb54ac55 100644 --- a/google/cloud/run/v2/internal/jobs_tracing_connection.h +++ b/google/cloud/run/v2/internal/jobs_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace run_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class JobsTracingConnection : public run_v2::JobsConnection { public: ~JobsTracingConnection() override = default; @@ -109,8 +107,6 @@ class JobsTracingConnection : public run_v2::JobsConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/run/v2/internal/jobs_tracing_stub.cc b/google/cloud/run/v2/internal/jobs_tracing_stub.cc index bfd5aa7af16ba..4fd81f8efefb8 100644 --- a/google/cloud/run/v2/internal/jobs_tracing_stub.cc +++ b/google/cloud/run/v2/internal/jobs_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - JobsTracingStub::JobsTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -249,17 +250,13 @@ future JobsTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeJobsTracingStub(std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace run_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/run/v2/internal/jobs_tracing_stub.h b/google/cloud/run/v2/internal/jobs_tracing_stub.h index 3bff4cccac581..40da6036ccc2b 100644 --- a/google/cloud/run/v2/internal/jobs_tracing_stub.h +++ b/google/cloud/run/v2/internal/jobs_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class JobsTracingStub : public JobsStub { public: ~JobsTracingStub() override = default; @@ -132,8 +133,6 @@ class JobsTracingStub : public JobsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -147,4 +146,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_JOBS_TRACING_STUB_H diff --git a/google/cloud/run/v2/internal/revisions_auth_decorator.cc b/google/cloud/run/v2/internal/revisions_auth_decorator.cc index c84a135a697d7..e0b951f4642a5 100644 --- a/google/cloud/run/v2/internal/revisions_auth_decorator.cc +++ b/google/cloud/run/v2/internal/revisions_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/run/v2/revision.proto #include "google/cloud/run/v2/internal/revisions_auth_decorator.h" -#include +#include "google/cloud/run/v2/revision.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -149,3 +152,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace run_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/run/v2/internal/revisions_auth_decorator.h b/google/cloud/run/v2/internal/revisions_auth_decorator.h index 97e08c530e1b5..2972bde7267e8 100644 --- a/google/cloud/run/v2/internal/revisions_auth_decorator.h +++ b/google/cloud/run/v2/internal/revisions_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/run/v2/internal/revisions_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -95,4 +98,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_REVISIONS_AUTH_DECORATOR_H diff --git a/google/cloud/run/v2/internal/revisions_connection_impl.h b/google/cloud/run/v2/internal/revisions_connection_impl.h index b3fee19a82ca3..b2554dcf7f8f7 100644 --- a/google/cloud/run/v2/internal/revisions_connection_impl.h +++ b/google/cloud/run/v2/internal/revisions_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/run/v2/internal/revisions_logging_decorator.cc b/google/cloud/run/v2/internal/revisions_logging_decorator.cc index c8573540b970e..93b0efa889c68 100644 --- a/google/cloud/run/v2/internal/revisions_logging_decorator.cc +++ b/google/cloud/run/v2/internal/revisions_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/run/v2/revision.proto #include "google/cloud/run/v2/internal/revisions_logging_decorator.h" +#include "google/cloud/run/v2/revision.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -171,3 +174,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace run_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/run/v2/internal/revisions_logging_decorator.h b/google/cloud/run/v2/internal/revisions_logging_decorator.h index ba4e2bd4a3ecd..92c36a0ab17f2 100644 --- a/google/cloud/run/v2/internal/revisions_logging_decorator.h +++ b/google/cloud/run/v2/internal/revisions_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/run/v2/internal/revisions_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -95,4 +98,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_REVISIONS_LOGGING_DECORATOR_H diff --git a/google/cloud/run/v2/internal/revisions_metadata_decorator.cc b/google/cloud/run/v2/internal/revisions_metadata_decorator.cc index f2554e961d6e7..7e2ab1b9c720c 100644 --- a/google/cloud/run/v2/internal/revisions_metadata_decorator.cc +++ b/google/cloud/run/v2/internal/revisions_metadata_decorator.cc @@ -17,19 +17,22 @@ // source: google/cloud/run/v2/revision.proto #include "google/cloud/run/v2/internal/revisions_metadata_decorator.h" +#include "google/cloud/run/v2/revision.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/routing_matcher.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -231,3 +234,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace run_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/run/v2/internal/revisions_metadata_decorator.h b/google/cloud/run/v2/internal/revisions_metadata_decorator.h index 63305f405a640..cac1d31daab70 100644 --- a/google/cloud/run/v2/internal/revisions_metadata_decorator.h +++ b/google/cloud/run/v2/internal/revisions_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/run/v2/internal/revisions_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -100,4 +103,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_REVISIONS_METADATA_DECORATOR_H diff --git a/google/cloud/run/v2/internal/revisions_option_defaults.cc b/google/cloud/run/v2/internal/revisions_option_defaults.cc index e44456f01a6c3..29c75aef474e3 100644 --- a/google/cloud/run/v2/internal/revisions_option_defaults.cc +++ b/google/cloud/run/v2/internal/revisions_option_defaults.cc @@ -40,7 +40,7 @@ Options RevisionsDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - run_v2::RevisionsLimitedTimeRetryPolicy(std::chrono::minutes(30)) + run_v2::RevisionsLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/run/v2/internal/revisions_stub.cc b/google/cloud/run/v2/internal/revisions_stub.cc index c7e1f2068adf3..bf8766cf8bc21 100644 --- a/google/cloud/run/v2/internal/revisions_stub.cc +++ b/google/cloud/run/v2/internal/revisions_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/run/v2/revision.proto #include "google/cloud/run/v2/internal/revisions_stub.h" +#include "google/cloud/run/v2/revision.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -171,3 +174,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace run_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/run/v2/internal/revisions_stub.h b/google/cloud/run/v2/internal/revisions_stub.h index 3b55004d96000..1b5a6fe20b224 100644 --- a/google/cloud/run/v2/internal/revisions_stub.h +++ b/google/cloud/run/v2/internal/revisions_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_REVISIONS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_REVISIONS_STUB_H +#include "google/cloud/run/v2/revision.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -152,4 +155,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_REVISIONS_STUB_H diff --git a/google/cloud/run/v2/internal/revisions_stub_factory.cc b/google/cloud/run/v2/internal/revisions_stub_factory.cc index d60184965d83a..b100d0e42e373 100644 --- a/google/cloud/run/v2/internal/revisions_stub_factory.cc +++ b/google/cloud/run/v2/internal/revisions_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/run/v2/internal/revisions_metadata_decorator.h" #include "google/cloud/run/v2/internal/revisions_stub.h" #include "google/cloud/run/v2/internal/revisions_tracing_stub.h" +#include "google/cloud/run/v2/revision.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -69,3 +72,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace run_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/run/v2/internal/revisions_stub_factory.h b/google/cloud/run/v2/internal/revisions_stub_factory.h index 50d73dd55d953..f94b82da6196b 100644 --- a/google/cloud/run/v2/internal/revisions_stub_factory.h +++ b/google/cloud/run/v2/internal/revisions_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_REVISIONS_STUB_FACTORY_H diff --git a/google/cloud/run/v2/internal/revisions_tracing_connection.cc b/google/cloud/run/v2/internal/revisions_tracing_connection.cc index b09e5a6e2e817..182317d74ef64 100644 --- a/google/cloud/run/v2/internal/revisions_tracing_connection.cc +++ b/google/cloud/run/v2/internal/revisions_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace run_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RevisionsTracingConnection::RevisionsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -110,15 +108,11 @@ RevisionsTracingConnection::WaitOperation( return internal::EndSpan(*span, child_->WaitOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRevisionsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/run/v2/internal/revisions_tracing_connection.h b/google/cloud/run/v2/internal/revisions_tracing_connection.h index d8e9452fa01e5..058fd393928c9 100644 --- a/google/cloud/run/v2/internal/revisions_tracing_connection.h +++ b/google/cloud/run/v2/internal/revisions_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace run_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RevisionsTracingConnection : public run_v2::RevisionsConnection { public: ~RevisionsTracingConnection() override = default; @@ -71,8 +69,6 @@ class RevisionsTracingConnection : public run_v2::RevisionsConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/run/v2/internal/revisions_tracing_stub.cc b/google/cloud/run/v2/internal/revisions_tracing_stub.cc index 91598a92cd0bb..45adf0b829229 100644 --- a/google/cloud/run/v2/internal/revisions_tracing_stub.cc +++ b/google/cloud/run/v2/internal/revisions_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RevisionsTracingStub::RevisionsTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -153,18 +154,14 @@ future RevisionsTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRevisionsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace run_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/run/v2/internal/revisions_tracing_stub.h b/google/cloud/run/v2/internal/revisions_tracing_stub.h index 8a50b99766932..4c88d85cc6c9a 100644 --- a/google/cloud/run/v2/internal/revisions_tracing_stub.h +++ b/google/cloud/run/v2/internal/revisions_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RevisionsTracingStub : public RevisionsStub { public: ~RevisionsTracingStub() override = default; @@ -90,8 +91,6 @@ class RevisionsTracingStub : public RevisionsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -106,4 +105,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_REVISIONS_TRACING_STUB_H diff --git a/google/cloud/run/v2/internal/services_auth_decorator.cc b/google/cloud/run/v2/internal/services_auth_decorator.cc index fc1e84a331090..15cd99c9ad94a 100644 --- a/google/cloud/run/v2/internal/services_auth_decorator.cc +++ b/google/cloud/run/v2/internal/services_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/run/v2/service.proto #include "google/cloud/run/v2/internal/services_auth_decorator.h" -#include +#include "google/cloud/run/v2/service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -230,3 +233,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace run_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/run/v2/internal/services_auth_decorator.h b/google/cloud/run/v2/internal/services_auth_decorator.h index cf7692013a01c..9f76468c9aa97 100644 --- a/google/cloud/run/v2/internal/services_auth_decorator.h +++ b/google/cloud/run/v2/internal/services_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/run/v2/internal/services_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -127,4 +130,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_SERVICES_AUTH_DECORATOR_H diff --git a/google/cloud/run/v2/internal/services_connection_impl.h b/google/cloud/run/v2/internal/services_connection_impl.h index 073e2d8dd1d2e..95b11d8f6ad0d 100644 --- a/google/cloud/run/v2/internal/services_connection_impl.h +++ b/google/cloud/run/v2/internal/services_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/run/v2/internal/services_logging_decorator.cc b/google/cloud/run/v2/internal/services_logging_decorator.cc index 34e23bff120e1..71236c67730ef 100644 --- a/google/cloud/run/v2/internal/services_logging_decorator.cc +++ b/google/cloud/run/v2/internal/services_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/run/v2/service.proto #include "google/cloud/run/v2/internal/services_logging_decorator.h" +#include "google/cloud/run/v2/service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -263,3 +266,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace run_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/run/v2/internal/services_logging_decorator.h b/google/cloud/run/v2/internal/services_logging_decorator.h index c1e54a1b202cc..f402c65a207b0 100644 --- a/google/cloud/run/v2/internal/services_logging_decorator.h +++ b/google/cloud/run/v2/internal/services_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/run/v2/internal/services_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -127,4 +130,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_SERVICES_LOGGING_DECORATOR_H diff --git a/google/cloud/run/v2/internal/services_metadata_decorator.cc b/google/cloud/run/v2/internal/services_metadata_decorator.cc index d0506876bf3ab..75d87c5f60af6 100644 --- a/google/cloud/run/v2/internal/services_metadata_decorator.cc +++ b/google/cloud/run/v2/internal/services_metadata_decorator.cc @@ -17,19 +17,22 @@ // source: google/cloud/run/v2/service.proto #include "google/cloud/run/v2/internal/services_metadata_decorator.h" +#include "google/cloud/run/v2/service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/routing_matcher.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -375,3 +378,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace run_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/run/v2/internal/services_metadata_decorator.h b/google/cloud/run/v2/internal/services_metadata_decorator.h index 1678c9d73f02d..8202736e36410 100644 --- a/google/cloud/run/v2/internal/services_metadata_decorator.h +++ b/google/cloud/run/v2/internal/services_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/run/v2/internal/services_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -132,4 +135,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_SERVICES_METADATA_DECORATOR_H diff --git a/google/cloud/run/v2/internal/services_option_defaults.cc b/google/cloud/run/v2/internal/services_option_defaults.cc index 0968305432cd4..5082424e3e32e 100644 --- a/google/cloud/run/v2/internal/services_option_defaults.cc +++ b/google/cloud/run/v2/internal/services_option_defaults.cc @@ -40,7 +40,7 @@ Options ServicesDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - run_v2::ServicesLimitedTimeRetryPolicy(std::chrono::minutes(30)) + run_v2::ServicesLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/run/v2/internal/services_stub.cc b/google/cloud/run/v2/internal/services_stub.cc index 0b1a81abce56b..8f90aef580d7f 100644 --- a/google/cloud/run/v2/internal/services_stub.cc +++ b/google/cloud/run/v2/internal/services_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/run/v2/service.proto #include "google/cloud/run/v2/internal/services_stub.h" +#include "google/cloud/run/v2/service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -263,3 +266,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace run_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/run/v2/internal/services_stub.h b/google/cloud/run/v2/internal/services_stub.h index 92df911759265..e1d4e99980175 100644 --- a/google/cloud/run/v2/internal/services_stub.h +++ b/google/cloud/run/v2/internal/services_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_SERVICES_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_SERVICES_STUB_H +#include "google/cloud/run/v2/service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -217,4 +220,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_SERVICES_STUB_H diff --git a/google/cloud/run/v2/internal/services_stub_factory.cc b/google/cloud/run/v2/internal/services_stub_factory.cc index 4b8606e3871e8..7184bcda65d90 100644 --- a/google/cloud/run/v2/internal/services_stub_factory.cc +++ b/google/cloud/run/v2/internal/services_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/run/v2/internal/services_metadata_decorator.h" #include "google/cloud/run/v2/internal/services_stub.h" #include "google/cloud/run/v2/internal/services_tracing_stub.h" +#include "google/cloud/run/v2/service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -69,3 +72,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace run_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/run/v2/internal/services_stub_factory.h b/google/cloud/run/v2/internal/services_stub_factory.h index 4e52cc7acefa4..960ae3f3895c1 100644 --- a/google/cloud/run/v2/internal/services_stub_factory.h +++ b/google/cloud/run/v2/internal/services_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_SERVICES_STUB_FACTORY_H diff --git a/google/cloud/run/v2/internal/services_tracing_connection.cc b/google/cloud/run/v2/internal/services_tracing_connection.cc index 38938fb7b26f6..f6d0361e3b6da 100644 --- a/google/cloud/run/v2/internal/services_tracing_connection.cc +++ b/google/cloud/run/v2/internal/services_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace run_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ServicesTracingConnection::ServicesTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -178,15 +176,11 @@ ServicesTracingConnection::WaitOperation( return internal::EndSpan(*span, child_->WaitOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeServicesTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/run/v2/internal/services_tracing_connection.h b/google/cloud/run/v2/internal/services_tracing_connection.h index f592d61140e05..3b28cce779004 100644 --- a/google/cloud/run/v2/internal/services_tracing_connection.h +++ b/google/cloud/run/v2/internal/services_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace run_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ServicesTracingConnection : public run_v2::ServicesConnection { public: ~ServicesTracingConnection() override = default; @@ -100,8 +98,6 @@ class ServicesTracingConnection : public run_v2::ServicesConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/run/v2/internal/services_tracing_stub.cc b/google/cloud/run/v2/internal/services_tracing_stub.cc index d5a6d529c5505..3fe0c863f11b4 100644 --- a/google/cloud/run/v2/internal/services_tracing_stub.cc +++ b/google/cloud/run/v2/internal/services_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ServicesTracingStub::ServicesTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -236,18 +237,14 @@ future ServicesTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeServicesTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace run_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/run/v2/internal/services_tracing_stub.h b/google/cloud/run/v2/internal/services_tracing_stub.h index 6d04b263bdd8d..e01e8699e371b 100644 --- a/google/cloud/run/v2/internal/services_tracing_stub.h +++ b/google/cloud/run/v2/internal/services_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ServicesTracingStub : public ServicesStub { public: ~ServicesTracingStub() override = default; @@ -122,8 +123,6 @@ class ServicesTracingStub : public ServicesStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -138,4 +137,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_SERVICES_TRACING_STUB_H diff --git a/google/cloud/run/v2/internal/tasks_auth_decorator.cc b/google/cloud/run/v2/internal/tasks_auth_decorator.cc index a29dd3084fe7c..545f30cff9bc6 100644 --- a/google/cloud/run/v2/internal/tasks_auth_decorator.cc +++ b/google/cloud/run/v2/internal/tasks_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/run/v2/task.proto #include "google/cloud/run/v2/internal/tasks_auth_decorator.h" -#include +#include "google/cloud/run/v2/task.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -83,3 +86,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace run_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/run/v2/internal/tasks_auth_decorator.h b/google/cloud/run/v2/internal/tasks_auth_decorator.h index 9c681f7d2582f..7b5cbfdac3dd0 100644 --- a/google/cloud/run/v2/internal/tasks_auth_decorator.h +++ b/google/cloud/run/v2/internal/tasks_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -72,4 +75,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_TASKS_AUTH_DECORATOR_H diff --git a/google/cloud/run/v2/internal/tasks_logging_decorator.cc b/google/cloud/run/v2/internal/tasks_logging_decorator.cc index 017961e18d01d..2583a82541ee7 100644 --- a/google/cloud/run/v2/internal/tasks_logging_decorator.cc +++ b/google/cloud/run/v2/internal/tasks_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/run/v2/task.proto #include "google/cloud/run/v2/internal/tasks_logging_decorator.h" +#include "google/cloud/run/v2/task.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -106,3 +109,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace run_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/run/v2/internal/tasks_logging_decorator.h b/google/cloud/run/v2/internal/tasks_logging_decorator.h index e712b4d7369d1..1c1d21409ea02 100644 --- a/google/cloud/run/v2/internal/tasks_logging_decorator.h +++ b/google/cloud/run/v2/internal/tasks_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -71,4 +74,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_TASKS_LOGGING_DECORATOR_H diff --git a/google/cloud/run/v2/internal/tasks_metadata_decorator.cc b/google/cloud/run/v2/internal/tasks_metadata_decorator.cc index aa5d2f265ef80..ff9afea8b6554 100644 --- a/google/cloud/run/v2/internal/tasks_metadata_decorator.cc +++ b/google/cloud/run/v2/internal/tasks_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/run/v2/task.proto #include "google/cloud/run/v2/internal/tasks_metadata_decorator.h" +#include "google/cloud/run/v2/task.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -109,3 +113,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace run_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/run/v2/internal/tasks_metadata_decorator.h b/google/cloud/run/v2/internal/tasks_metadata_decorator.h index 3a7465740290d..a74c20025b48d 100644 --- a/google/cloud/run/v2/internal/tasks_metadata_decorator.h +++ b/google/cloud/run/v2/internal/tasks_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -77,4 +80,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_TASKS_METADATA_DECORATOR_H diff --git a/google/cloud/run/v2/internal/tasks_option_defaults.cc b/google/cloud/run/v2/internal/tasks_option_defaults.cc index 0055c0779532d..26d1f5621a35f 100644 --- a/google/cloud/run/v2/internal/tasks_option_defaults.cc +++ b/google/cloud/run/v2/internal/tasks_option_defaults.cc @@ -40,7 +40,7 @@ Options TasksDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - run_v2::TasksLimitedTimeRetryPolicy(std::chrono::minutes(30)).clone()); + run_v2::TasksLimitedTimeRetryPolicy(std::chrono::minutes(10)).clone()); } if (!options.has()) { options.set( diff --git a/google/cloud/run/v2/internal/tasks_stub.cc b/google/cloud/run/v2/internal/tasks_stub.cc index 140a225d3265d..bcc07f1216044 100644 --- a/google/cloud/run/v2/internal/tasks_stub.cc +++ b/google/cloud/run/v2/internal/tasks_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/run/v2/task.proto #include "google/cloud/run/v2/internal/tasks_stub.h" +#include "google/cloud/run/v2/task.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -101,3 +104,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace run_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/run/v2/internal/tasks_stub.h b/google/cloud/run/v2/internal/tasks_stub.h index fad496b1f463e..656aab590119f 100644 --- a/google/cloud/run/v2/internal/tasks_stub.h +++ b/google/cloud/run/v2/internal/tasks_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_TASKS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_TASKS_STUB_H +#include "google/cloud/run/v2/task.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -105,4 +108,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_TASKS_STUB_H diff --git a/google/cloud/run/v2/internal/tasks_stub_factory.cc b/google/cloud/run/v2/internal/tasks_stub_factory.cc index 712a090c80198..ec3149c94dafa 100644 --- a/google/cloud/run/v2/internal/tasks_stub_factory.cc +++ b/google/cloud/run/v2/internal/tasks_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/run/v2/internal/tasks_metadata_decorator.h" #include "google/cloud/run/v2/internal/tasks_stub.h" #include "google/cloud/run/v2/internal/tasks_tracing_stub.h" +#include "google/cloud/run/v2/task.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace run_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/run/v2/internal/tasks_stub_factory.h b/google/cloud/run/v2/internal/tasks_stub_factory.h index 4478a3daf6f7a..3c905c498a0ad 100644 --- a/google/cloud/run/v2/internal/tasks_stub_factory.h +++ b/google/cloud/run/v2/internal/tasks_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_TASKS_STUB_FACTORY_H diff --git a/google/cloud/run/v2/internal/tasks_tracing_connection.cc b/google/cloud/run/v2/internal/tasks_tracing_connection.cc index 4cf3c84000cce..5900f8099b787 100644 --- a/google/cloud/run/v2/internal/tasks_tracing_connection.cc +++ b/google/cloud/run/v2/internal/tasks_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace run_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TasksTracingConnection::TasksTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -80,15 +78,11 @@ StatusOr TasksTracingConnection::WaitOperation( return internal::EndSpan(*span, child_->WaitOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTasksTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/run/v2/internal/tasks_tracing_connection.h b/google/cloud/run/v2/internal/tasks_tracing_connection.h index 870ced612e677..1135adb5a2b9f 100644 --- a/google/cloud/run/v2/internal/tasks_tracing_connection.h +++ b/google/cloud/run/v2/internal/tasks_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace run_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TasksTracingConnection : public run_v2::TasksConnection { public: ~TasksTracingConnection() override = default; @@ -61,8 +59,6 @@ class TasksTracingConnection : public run_v2::TasksConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/run/v2/internal/tasks_tracing_stub.cc b/google/cloud/run/v2/internal/tasks_tracing_stub.cc index 2ce99b4b7c0b5..3fe7bfe172869 100644 --- a/google/cloud/run/v2/internal/tasks_tracing_stub.cc +++ b/google/cloud/run/v2/internal/tasks_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TasksTracingStub::TasksTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -96,18 +97,14 @@ StatusOr TasksTracingStub::WaitOperation( child_->WaitOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTasksTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace run_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/run/v2/internal/tasks_tracing_stub.h b/google/cloud/run/v2/internal/tasks_tracing_stub.h index ab65a7d853384..250ea8ce3bf28 100644 --- a/google/cloud/run/v2/internal/tasks_tracing_stub.h +++ b/google/cloud/run/v2/internal/tasks_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace run_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TasksTracingStub : public TasksStub { public: ~TasksTracingStub() override = default; @@ -68,8 +69,6 @@ class TasksTracingStub : public TasksStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -84,4 +83,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_INTERNAL_TASKS_TRACING_STUB_H diff --git a/google/cloud/run/v2/jobs_client.h b/google/cloud/run/v2/jobs_client.h index 31e03722c0321..0a3b75e62b488 100644 --- a/google/cloud/run/v2/jobs_client.h +++ b/google/cloud/run/v2/jobs_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/run/v2/jobs_connection.h b/google/cloud/run/v2/jobs_connection.h index f11d24f829f92..a0ac54d22c0d8 100644 --- a/google/cloud/run/v2/jobs_connection.h +++ b/google/cloud/run/v2/jobs_connection.h @@ -19,7 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_JOBS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_JOBS_CONNECTION_H +#include "google/cloud/run/v2/execution.pb.h" #include "google/cloud/run/v2/internal/jobs_retry_traits.h" +#include "google/cloud/run/v2/job.pb.h" #include "google/cloud/run/v2/jobs_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,9 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/run/v2/jobs_connection_idempotency_policy.h b/google/cloud/run/v2/jobs_connection_idempotency_policy.h index 240b37d89f398..808acf3e4ff99 100644 --- a/google/cloud/run/v2/jobs_connection_idempotency_policy.h +++ b/google/cloud/run/v2/jobs_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_JOBS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_JOBS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/run/v2/job.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/run/v2/revisions_client.h b/google/cloud/run/v2/revisions_client.h index 4fed4e28db90c..8ceeccf7d1a91 100644 --- a/google/cloud/run/v2/revisions_client.h +++ b/google/cloud/run/v2/revisions_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/run/v2/revisions_connection.h b/google/cloud/run/v2/revisions_connection.h index 3919c4799839e..9b537642439ca 100644 --- a/google/cloud/run/v2/revisions_connection.h +++ b/google/cloud/run/v2/revisions_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_REVISIONS_CONNECTION_H #include "google/cloud/run/v2/internal/revisions_retry_traits.h" +#include "google/cloud/run/v2/revision.pb.h" #include "google/cloud/run/v2/revisions_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/run/v2/revisions_connection_idempotency_policy.h b/google/cloud/run/v2/revisions_connection_idempotency_policy.h index 985abf0b01fa2..b208faf9c21f0 100644 --- a/google/cloud/run/v2/revisions_connection_idempotency_policy.h +++ b/google/cloud/run/v2/revisions_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_REVISIONS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_REVISIONS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/run/v2/revision.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/run/v2/services_client.h b/google/cloud/run/v2/services_client.h index 1d8b685ad42eb..f0a61c7bd8afb 100644 --- a/google/cloud/run/v2/services_client.h +++ b/google/cloud/run/v2/services_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/run/v2/services_connection.h b/google/cloud/run/v2/services_connection.h index 2d72889db8f74..6045a2f7a8a5f 100644 --- a/google/cloud/run/v2/services_connection.h +++ b/google/cloud/run/v2/services_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_SERVICES_CONNECTION_H #include "google/cloud/run/v2/internal/services_retry_traits.h" +#include "google/cloud/run/v2/service.pb.h" #include "google/cloud/run/v2/services_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/run/v2/services_connection_idempotency_policy.h b/google/cloud/run/v2/services_connection_idempotency_policy.h index 25e9c545e34e1..c8db086991353 100644 --- a/google/cloud/run/v2/services_connection_idempotency_policy.h +++ b/google/cloud/run/v2/services_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_SERVICES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_SERVICES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/run/v2/service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/run/v2/tasks_connection.h b/google/cloud/run/v2/tasks_connection.h index 7360236798918..817b7499a1181 100644 --- a/google/cloud/run/v2/tasks_connection.h +++ b/google/cloud/run/v2/tasks_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_TASKS_CONNECTION_H #include "google/cloud/run/v2/internal/tasks_retry_traits.h" +#include "google/cloud/run/v2/task.pb.h" #include "google/cloud/run/v2/tasks_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/run/v2/tasks_connection_idempotency_policy.h b/google/cloud/run/v2/tasks_connection_idempotency_policy.h index 5ba9ae37de252..0c41873b4eae7 100644 --- a/google/cloud/run/v2/tasks_connection_idempotency_policy.h +++ b/google/cloud/run/v2/tasks_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_TASKS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_RUN_V2_TASKS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/run/v2/task.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/scheduler/BUILD.bazel b/google/cloud/scheduler/BUILD.bazel index d2f15d3dc935d..8e5563c0aa22d 100644 --- a/google/cloud/scheduler/BUILD.bazel +++ b/google/cloud/scheduler/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/scheduler/v1:scheduler_cc_grpc", + "@googleapis//google/cloud/scheduler/v1:scheduler_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/scheduler/CMakeLists.txt b/google/cloud/scheduler/CMakeLists.txt index 1c268d72d837e..90079925e16c8 100644 --- a/google/cloud/scheduler/CMakeLists.txt +++ b/google/cloud/scheduler/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(scheduler "Cloud Scheduler API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(scheduler_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/scheduler/cloud_scheduler_client.h b/google/cloud/scheduler/cloud_scheduler_client.h deleted file mode 100644 index b75103311946c..0000000000000 --- a/google/cloud/scheduler/cloud_scheduler_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/scheduler/v1/cloudscheduler.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SCHEDULER_CLOUD_SCHEDULER_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SCHEDULER_CLOUD_SCHEDULER_CLIENT_H - -#include "google/cloud/scheduler/cloud_scheduler_connection.h" -#include "google/cloud/scheduler/v1/cloud_scheduler_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in scheduler_v1 instead of the aliases defined in -/// this namespace. -namespace scheduler { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use scheduler_v1::CloudSchedulerClient directly. -using ::google::cloud::scheduler_v1::CloudSchedulerClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace scheduler -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SCHEDULER_CLOUD_SCHEDULER_CLIENT_H diff --git a/google/cloud/scheduler/cloud_scheduler_connection.h b/google/cloud/scheduler/cloud_scheduler_connection.h deleted file mode 100644 index 0960cafbd3b52..0000000000000 --- a/google/cloud/scheduler/cloud_scheduler_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/scheduler/v1/cloudscheduler.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SCHEDULER_CLOUD_SCHEDULER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SCHEDULER_CLOUD_SCHEDULER_CONNECTION_H - -#include "google/cloud/scheduler/cloud_scheduler_connection_idempotency_policy.h" -#include "google/cloud/scheduler/v1/cloud_scheduler_connection.h" - -namespace google { -namespace cloud { -namespace scheduler { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use scheduler_v1::MakeCloudSchedulerConnection directly. -using ::google::cloud::scheduler_v1::MakeCloudSchedulerConnection; - -/// @deprecated Use scheduler_v1::CloudSchedulerConnection directly. -using ::google::cloud::scheduler_v1::CloudSchedulerConnection; - -/// @deprecated Use scheduler_v1::CloudSchedulerLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::scheduler_v1::CloudSchedulerLimitedErrorCountRetryPolicy; - -/// @deprecated Use scheduler_v1::CloudSchedulerLimitedTimeRetryPolicy directly. -using ::google::cloud::scheduler_v1::CloudSchedulerLimitedTimeRetryPolicy; - -/// @deprecated Use scheduler_v1::CloudSchedulerRetryPolicy directly. -using ::google::cloud::scheduler_v1::CloudSchedulerRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace scheduler -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SCHEDULER_CLOUD_SCHEDULER_CONNECTION_H diff --git a/google/cloud/scheduler/cloud_scheduler_connection_idempotency_policy.h b/google/cloud/scheduler/cloud_scheduler_connection_idempotency_policy.h deleted file mode 100644 index 74485af20aa5e..0000000000000 --- a/google/cloud/scheduler/cloud_scheduler_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/scheduler/v1/cloudscheduler.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SCHEDULER_CLOUD_SCHEDULER_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SCHEDULER_CLOUD_SCHEDULER_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/scheduler/v1/cloud_scheduler_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace scheduler { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// scheduler_v1::MakeDefaultCloudSchedulerConnectionIdempotencyPolicy directly. -using ::google::cloud::scheduler_v1:: - MakeDefaultCloudSchedulerConnectionIdempotencyPolicy; - -/// @deprecated Use scheduler_v1::CloudSchedulerConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::scheduler_v1::CloudSchedulerConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace scheduler -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SCHEDULER_CLOUD_SCHEDULER_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/scheduler/cloud_scheduler_options.h b/google/cloud/scheduler/cloud_scheduler_options.h deleted file mode 100644 index ecc0a4d9823e3..0000000000000 --- a/google/cloud/scheduler/cloud_scheduler_options.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/scheduler/v1/cloudscheduler.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SCHEDULER_CLOUD_SCHEDULER_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SCHEDULER_CLOUD_SCHEDULER_OPTIONS_H - -#include "google/cloud/scheduler/cloud_scheduler_connection.h" -#include "google/cloud/scheduler/cloud_scheduler_connection_idempotency_policy.h" -#include "google/cloud/scheduler/v1/cloud_scheduler_options.h" - -namespace google { -namespace cloud { -namespace scheduler { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use scheduler_v1::CloudSchedulerBackoffPolicyOption directly. -using ::google::cloud::scheduler_v1::CloudSchedulerBackoffPolicyOption; - -/// @deprecated Use -/// scheduler_v1::CloudSchedulerConnectionIdempotencyPolicyOption directly. -using ::google::cloud::scheduler_v1:: - CloudSchedulerConnectionIdempotencyPolicyOption; - -/// @deprecated Use scheduler_v1::CloudSchedulerPolicyOptionList directly. -using ::google::cloud::scheduler_v1::CloudSchedulerPolicyOptionList; - -/// @deprecated Use scheduler_v1::CloudSchedulerRetryPolicyOption directly. -using ::google::cloud::scheduler_v1::CloudSchedulerRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace scheduler -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SCHEDULER_CLOUD_SCHEDULER_OPTIONS_H diff --git a/google/cloud/scheduler/mocks/mock_cloud_scheduler_connection.h b/google/cloud/scheduler/mocks/mock_cloud_scheduler_connection.h deleted file mode 100644 index 9aa74e412cd85..0000000000000 --- a/google/cloud/scheduler/mocks/mock_cloud_scheduler_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/scheduler/v1/cloudscheduler.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SCHEDULER_MOCKS_MOCK_CLOUD_SCHEDULER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SCHEDULER_MOCKS_MOCK_CLOUD_SCHEDULER_CONNECTION_H - -#include "google/cloud/scheduler/cloud_scheduler_connection.h" -#include "google/cloud/scheduler/v1/mocks/mock_cloud_scheduler_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in scheduler_v1_mocks instead of the aliases -/// defined in this namespace. -namespace scheduler_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use scheduler_v1_mocks::MockCloudSchedulerConnection directly. -using ::google::cloud::scheduler_v1_mocks::MockCloudSchedulerConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace scheduler_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SCHEDULER_MOCKS_MOCK_CLOUD_SCHEDULER_CONNECTION_H diff --git a/google/cloud/scheduler/quickstart/.bazelrc b/google/cloud/scheduler/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/scheduler/quickstart/.bazelrc +++ b/google/cloud/scheduler/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/scheduler/quickstart/CMakeLists.txt b/google/cloud/scheduler/quickstart/CMakeLists.txt index 7a5aad231def1..d81e192252b7d 100644 --- a/google/cloud/scheduler/quickstart/CMakeLists.txt +++ b/google/cloud/scheduler/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Scheduler API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-scheduler-quickstart CXX) find_package(google_cloud_cpp_scheduler REQUIRED) diff --git a/google/cloud/scheduler/v1/cloud_scheduler_connection.h b/google/cloud/scheduler/v1/cloud_scheduler_connection.h index 91550e83073be..2bd216ae4a78d 100644 --- a/google/cloud/scheduler/v1/cloud_scheduler_connection.h +++ b/google/cloud/scheduler/v1/cloud_scheduler_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SCHEDULER_V1_CLOUD_SCHEDULER_CONNECTION_H #include "google/cloud/scheduler/v1/cloud_scheduler_connection_idempotency_policy.h" +#include "google/cloud/scheduler/v1/cloudscheduler.pb.h" #include "google/cloud/scheduler/v1/internal/cloud_scheduler_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/scheduler/v1/cloud_scheduler_connection_idempotency_policy.h b/google/cloud/scheduler/v1/cloud_scheduler_connection_idempotency_policy.h index 22e095e371197..edfdd4a997e66 100644 --- a/google/cloud/scheduler/v1/cloud_scheduler_connection_idempotency_policy.h +++ b/google/cloud/scheduler/v1/cloud_scheduler_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SCHEDULER_V1_CLOUD_SCHEDULER_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SCHEDULER_V1_CLOUD_SCHEDULER_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/scheduler/v1/cloudscheduler.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/scheduler/v1/internal/cloud_scheduler_auth_decorator.cc b/google/cloud/scheduler/v1/internal/cloud_scheduler_auth_decorator.cc index cf53941711794..4d7d7c0c73807 100644 --- a/google/cloud/scheduler/v1/internal/cloud_scheduler_auth_decorator.cc +++ b/google/cloud/scheduler/v1/internal/cloud_scheduler_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/scheduler/v1/cloudscheduler.proto #include "google/cloud/scheduler/v1/internal/cloud_scheduler_auth_decorator.h" -#include +#include "google/cloud/scheduler/v1/cloudscheduler.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace scheduler_v1_internal { @@ -117,3 +120,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace scheduler_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/scheduler/v1/internal/cloud_scheduler_auth_decorator.h b/google/cloud/scheduler/v1/internal/cloud_scheduler_auth_decorator.h index 944de210af00d..7606f6bc033c1 100644 --- a/google/cloud/scheduler/v1/internal/cloud_scheduler_auth_decorator.h +++ b/google/cloud/scheduler/v1/internal/cloud_scheduler_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace scheduler_v1_internal { @@ -88,4 +91,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SCHEDULER_V1_INTERNAL_CLOUD_SCHEDULER_AUTH_DECORATOR_H diff --git a/google/cloud/scheduler/v1/internal/cloud_scheduler_logging_decorator.cc b/google/cloud/scheduler/v1/internal/cloud_scheduler_logging_decorator.cc index ce049626513ad..f5434cb8849fb 100644 --- a/google/cloud/scheduler/v1/internal/cloud_scheduler_logging_decorator.cc +++ b/google/cloud/scheduler/v1/internal/cloud_scheduler_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/scheduler/v1/cloudscheduler.proto #include "google/cloud/scheduler/v1/internal/cloud_scheduler_logging_decorator.h" +#include "google/cloud/scheduler/v1/cloudscheduler.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace scheduler_v1_internal { @@ -151,3 +154,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace scheduler_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/scheduler/v1/internal/cloud_scheduler_logging_decorator.h b/google/cloud/scheduler/v1/internal/cloud_scheduler_logging_decorator.h index bcbc9e1bc4e34..02fb78ad6063d 100644 --- a/google/cloud/scheduler/v1/internal/cloud_scheduler_logging_decorator.h +++ b/google/cloud/scheduler/v1/internal/cloud_scheduler_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace scheduler_v1_internal { @@ -88,4 +91,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SCHEDULER_V1_INTERNAL_CLOUD_SCHEDULER_LOGGING_DECORATOR_H diff --git a/google/cloud/scheduler/v1/internal/cloud_scheduler_metadata_decorator.cc b/google/cloud/scheduler/v1/internal/cloud_scheduler_metadata_decorator.cc index 75807d95ec4d0..d622982a3a8dd 100644 --- a/google/cloud/scheduler/v1/internal/cloud_scheduler_metadata_decorator.cc +++ b/google/cloud/scheduler/v1/internal/cloud_scheduler_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/scheduler/v1/cloudscheduler.proto #include "google/cloud/scheduler/v1/internal/cloud_scheduler_metadata_decorator.h" +#include "google/cloud/scheduler/v1/cloudscheduler.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace scheduler_v1_internal { @@ -144,3 +148,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace scheduler_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/scheduler/v1/internal/cloud_scheduler_metadata_decorator.h b/google/cloud/scheduler/v1/internal/cloud_scheduler_metadata_decorator.h index 69c998a76cc6e..2f9746a240c9b 100644 --- a/google/cloud/scheduler/v1/internal/cloud_scheduler_metadata_decorator.h +++ b/google/cloud/scheduler/v1/internal/cloud_scheduler_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace scheduler_v1_internal { @@ -93,4 +96,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SCHEDULER_V1_INTERNAL_CLOUD_SCHEDULER_METADATA_DECORATOR_H diff --git a/google/cloud/scheduler/v1/internal/cloud_scheduler_option_defaults.cc b/google/cloud/scheduler/v1/internal/cloud_scheduler_option_defaults.cc index c7c8f94796299..7000c87794ede 100644 --- a/google/cloud/scheduler/v1/internal/cloud_scheduler_option_defaults.cc +++ b/google/cloud/scheduler/v1/internal/cloud_scheduler_option_defaults.cc @@ -42,7 +42,7 @@ Options CloudSchedulerDefaultOptions(Options options) { if (!options.has()) { options.set( scheduler_v1::CloudSchedulerLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/scheduler/v1/internal/cloud_scheduler_stub.cc b/google/cloud/scheduler/v1/internal/cloud_scheduler_stub.cc index 3f92cfe48b930..34bff03df8af6 100644 --- a/google/cloud/scheduler/v1/internal/cloud_scheduler_stub.cc +++ b/google/cloud/scheduler/v1/internal/cloud_scheduler_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/scheduler/v1/cloudscheduler.proto #include "google/cloud/scheduler/v1/internal/cloud_scheduler_stub.h" +#include "google/cloud/scheduler/v1/cloudscheduler.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace scheduler_v1_internal { @@ -150,3 +153,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace scheduler_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/scheduler/v1/internal/cloud_scheduler_stub.h b/google/cloud/scheduler/v1/internal/cloud_scheduler_stub.h index 476a9c66244e9..326f694505d82 100644 --- a/google/cloud/scheduler/v1/internal/cloud_scheduler_stub.h +++ b/google/cloud/scheduler/v1/internal/cloud_scheduler_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SCHEDULER_V1_INTERNAL_CLOUD_SCHEDULER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SCHEDULER_V1_INTERNAL_CLOUD_SCHEDULER_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/scheduler/v1/cloudscheduler.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace scheduler_v1_internal { @@ -141,4 +144,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SCHEDULER_V1_INTERNAL_CLOUD_SCHEDULER_STUB_H diff --git a/google/cloud/scheduler/v1/internal/cloud_scheduler_stub_factory.cc b/google/cloud/scheduler/v1/internal/cloud_scheduler_stub_factory.cc index b5439a4121c8c..b629322fa1c5c 100644 --- a/google/cloud/scheduler/v1/internal/cloud_scheduler_stub_factory.cc +++ b/google/cloud/scheduler/v1/internal/cloud_scheduler_stub_factory.cc @@ -17,6 +17,8 @@ // source: google/cloud/scheduler/v1/cloudscheduler.proto #include "google/cloud/scheduler/v1/internal/cloud_scheduler_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/scheduler/v1/cloudscheduler.grpc.pb.h" #include "google/cloud/scheduler/v1/internal/cloud_scheduler_auth_decorator.h" #include "google/cloud/scheduler/v1/internal/cloud_scheduler_logging_decorator.h" #include "google/cloud/scheduler/v1/internal/cloud_scheduler_metadata_decorator.h" @@ -28,11 +30,12 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace scheduler_v1_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace scheduler_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/scheduler/v1/internal/cloud_scheduler_stub_factory.h b/google/cloud/scheduler/v1/internal/cloud_scheduler_stub_factory.h index 66840a7b0f879..40a6e74b13e51 100644 --- a/google/cloud/scheduler/v1/internal/cloud_scheduler_stub_factory.h +++ b/google/cloud/scheduler/v1/internal/cloud_scheduler_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace scheduler_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SCHEDULER_V1_INTERNAL_CLOUD_SCHEDULER_STUB_FACTORY_H diff --git a/google/cloud/scheduler/v1/internal/cloud_scheduler_tracing_connection.cc b/google/cloud/scheduler/v1/internal/cloud_scheduler_tracing_connection.cc index 4b27e7b1c7148..79bc0eb6bce18 100644 --- a/google/cloud/scheduler/v1/internal/cloud_scheduler_tracing_connection.cc +++ b/google/cloud/scheduler/v1/internal/cloud_scheduler_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace scheduler_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudSchedulerTracingConnection::CloudSchedulerTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -126,16 +124,12 @@ CloudSchedulerTracingConnection::GetLocation( return internal::EndSpan(*span, child_->GetLocation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCloudSchedulerTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/scheduler/v1/internal/cloud_scheduler_tracing_connection.h b/google/cloud/scheduler/v1/internal/cloud_scheduler_tracing_connection.h index d59c57c27f28f..fe19d77cafec6 100644 --- a/google/cloud/scheduler/v1/internal/cloud_scheduler_tracing_connection.h +++ b/google/cloud/scheduler/v1/internal/cloud_scheduler_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace scheduler_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudSchedulerTracingConnection : public scheduler_v1::CloudSchedulerConnection { public: @@ -74,8 +72,6 @@ class CloudSchedulerTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/scheduler/v1/internal/cloud_scheduler_tracing_stub.cc b/google/cloud/scheduler/v1/internal/cloud_scheduler_tracing_stub.cc index 4846d56ed0af9..216ada909f883 100644 --- a/google/cloud/scheduler/v1/internal/cloud_scheduler_tracing_stub.cc +++ b/google/cloud/scheduler/v1/internal/cloud_scheduler_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace scheduler_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudSchedulerTracingStub::CloudSchedulerTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -148,18 +149,14 @@ CloudSchedulerTracingStub::GetLocation( child_->GetLocation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCloudSchedulerTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace scheduler_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/scheduler/v1/internal/cloud_scheduler_tracing_stub.h b/google/cloud/scheduler/v1/internal/cloud_scheduler_tracing_stub.h index 2bf6cc785e00a..496b9f74e338e 100644 --- a/google/cloud/scheduler/v1/internal/cloud_scheduler_tracing_stub.h +++ b/google/cloud/scheduler/v1/internal/cloud_scheduler_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace scheduler_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudSchedulerTracingStub : public CloudSchedulerStub { public: ~CloudSchedulerTracingStub() override = default; @@ -84,8 +85,6 @@ class CloudSchedulerTracingStub : public CloudSchedulerStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -100,4 +99,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SCHEDULER_V1_INTERNAL_CLOUD_SCHEDULER_TRACING_STUB_H diff --git a/google/cloud/secretmanager/BUILD.bazel b/google/cloud/secretmanager/BUILD.bazel index e54f4680e3542..5026b4341582a 100644 --- a/google/cloud/secretmanager/BUILD.bazel +++ b/google/cloud/secretmanager/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/secretmanager/v1:secretmanager_cc_grpc", + "@googleapis//google/cloud/secretmanager/v1:secretmanager_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/secretmanager/CMakeLists.txt b/google/cloud/secretmanager/CMakeLists.txt index 0ba0333c787c9..bad61df6b0779 100644 --- a/google/cloud/secretmanager/CMakeLists.txt +++ b/google/cloud/secretmanager/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(secretmanager "Secret Manager API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(secretmanager_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/secretmanager/mocks/mock_secret_manager_connection.h b/google/cloud/secretmanager/mocks/mock_secret_manager_connection.h deleted file mode 100644 index ea1fb8e45d164..0000000000000 --- a/google/cloud/secretmanager/mocks/mock_secret_manager_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/secretmanager/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECRETMANAGER_MOCKS_MOCK_SECRET_MANAGER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECRETMANAGER_MOCKS_MOCK_SECRET_MANAGER_CONNECTION_H - -#include "google/cloud/secretmanager/secret_manager_connection.h" -#include "google/cloud/secretmanager/v1/mocks/mock_secret_manager_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in secretmanager_v1_mocks instead of the aliases -/// defined in this namespace. -namespace secretmanager_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use secretmanager_v1_mocks::MockSecretManagerServiceConnection -/// directly. -using ::google::cloud::secretmanager_v1_mocks:: - MockSecretManagerServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace secretmanager_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECRETMANAGER_MOCKS_MOCK_SECRET_MANAGER_CONNECTION_H diff --git a/google/cloud/secretmanager/quickstart/.bazelrc b/google/cloud/secretmanager/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/secretmanager/quickstart/.bazelrc +++ b/google/cloud/secretmanager/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/secretmanager/quickstart/CMakeLists.txt b/google/cloud/secretmanager/quickstart/CMakeLists.txt index 11d929d1eab53..9b8e9c916561b 100644 --- a/google/cloud/secretmanager/quickstart/CMakeLists.txt +++ b/google/cloud/secretmanager/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Secret Manager API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-secretmanager-quickstart CXX) find_package(google_cloud_cpp_secretmanager REQUIRED) diff --git a/google/cloud/secretmanager/secret_manager_client.h b/google/cloud/secretmanager/secret_manager_client.h deleted file mode 100644 index 1d9e79f474263..0000000000000 --- a/google/cloud/secretmanager/secret_manager_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/secretmanager/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECRETMANAGER_SECRET_MANAGER_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECRETMANAGER_SECRET_MANAGER_CLIENT_H - -#include "google/cloud/secretmanager/secret_manager_connection.h" -#include "google/cloud/secretmanager/v1/secret_manager_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in secretmanager_v1 instead of the aliases defined in -/// this namespace. -namespace secretmanager { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use secretmanager_v1::SecretManagerServiceClient directly. -using ::google::cloud::secretmanager_v1::SecretManagerServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace secretmanager -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECRETMANAGER_SECRET_MANAGER_CLIENT_H diff --git a/google/cloud/secretmanager/secret_manager_connection.h b/google/cloud/secretmanager/secret_manager_connection.h deleted file mode 100644 index d52e9c613572f..0000000000000 --- a/google/cloud/secretmanager/secret_manager_connection.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/secretmanager/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECRETMANAGER_SECRET_MANAGER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECRETMANAGER_SECRET_MANAGER_CONNECTION_H - -#include "google/cloud/secretmanager/secret_manager_connection_idempotency_policy.h" -#include "google/cloud/secretmanager/v1/secret_manager_connection.h" - -namespace google { -namespace cloud { -namespace secretmanager { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use secretmanager_v1::MakeSecretManagerServiceConnection -/// directly. -using ::google::cloud::secretmanager_v1::MakeSecretManagerServiceConnection; - -/// @deprecated Use secretmanager_v1::SecretManagerServiceConnection directly. -using ::google::cloud::secretmanager_v1::SecretManagerServiceConnection; - -/// @deprecated Use -/// secretmanager_v1::SecretManagerServiceLimitedErrorCountRetryPolicy directly. -using ::google::cloud::secretmanager_v1:: - SecretManagerServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use secretmanager_v1::SecretManagerServiceLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::secretmanager_v1:: - SecretManagerServiceLimitedTimeRetryPolicy; - -/// @deprecated Use secretmanager_v1::SecretManagerServiceRetryPolicy directly. -using ::google::cloud::secretmanager_v1::SecretManagerServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace secretmanager -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECRETMANAGER_SECRET_MANAGER_CONNECTION_H diff --git a/google/cloud/secretmanager/secret_manager_connection_idempotency_policy.h b/google/cloud/secretmanager/secret_manager_connection_idempotency_policy.h deleted file mode 100644 index 35a3e6fdb0ec9..0000000000000 --- a/google/cloud/secretmanager/secret_manager_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/secretmanager/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECRETMANAGER_SECRET_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECRETMANAGER_SECRET_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/secretmanager/v1/secret_manager_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace secretmanager { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// secretmanager_v1::MakeDefaultSecretManagerServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::secretmanager_v1:: - MakeDefaultSecretManagerServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// secretmanager_v1::SecretManagerServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::secretmanager_v1:: - SecretManagerServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace secretmanager -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECRETMANAGER_SECRET_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/secretmanager/secret_manager_options.h b/google/cloud/secretmanager/secret_manager_options.h deleted file mode 100644 index c92b9a8384ce4..0000000000000 --- a/google/cloud/secretmanager/secret_manager_options.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/secretmanager/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECRETMANAGER_SECRET_MANAGER_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECRETMANAGER_SECRET_MANAGER_OPTIONS_H - -#include "google/cloud/secretmanager/secret_manager_connection.h" -#include "google/cloud/secretmanager/secret_manager_connection_idempotency_policy.h" -#include "google/cloud/secretmanager/v1/secret_manager_options.h" - -namespace google { -namespace cloud { -namespace secretmanager { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use secretmanager_v1::SecretManagerServiceBackoffPolicyOption -/// directly. -using ::google::cloud::secretmanager_v1:: - SecretManagerServiceBackoffPolicyOption; - -/// @deprecated Use -/// secretmanager_v1::SecretManagerServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::secretmanager_v1:: - SecretManagerServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use secretmanager_v1::SecretManagerServicePolicyOptionList -/// directly. -using ::google::cloud::secretmanager_v1::SecretManagerServicePolicyOptionList; - -/// @deprecated Use secretmanager_v1::SecretManagerServiceRetryPolicyOption -/// directly. -using ::google::cloud::secretmanager_v1::SecretManagerServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace secretmanager -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECRETMANAGER_SECRET_MANAGER_OPTIONS_H diff --git a/google/cloud/secretmanager/v1/internal/secret_manager_auth_decorator.cc b/google/cloud/secretmanager/v1/internal/secret_manager_auth_decorator.cc index 0a108b16dc6d0..a8d976bd70792 100644 --- a/google/cloud/secretmanager/v1/internal/secret_manager_auth_decorator.cc +++ b/google/cloud/secretmanager/v1/internal/secret_manager_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/secretmanager/v1/service.proto #include "google/cloud/secretmanager/v1/internal/secret_manager_auth_decorator.h" -#include +#include "google/cloud/secretmanager/v1/service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace secretmanager_v1_internal { @@ -190,3 +193,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace secretmanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/secretmanager/v1/internal/secret_manager_auth_decorator.h b/google/cloud/secretmanager/v1/internal/secret_manager_auth_decorator.h index fd840b087848c..d1f93cb27111f 100644 --- a/google/cloud/secretmanager/v1/internal/secret_manager_auth_decorator.h +++ b/google/cloud/secretmanager/v1/internal/secret_manager_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace secretmanager_v1_internal { @@ -132,4 +135,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECRETMANAGER_V1_INTERNAL_SECRET_MANAGER_AUTH_DECORATOR_H diff --git a/google/cloud/secretmanager/v1/internal/secret_manager_logging_decorator.cc b/google/cloud/secretmanager/v1/internal/secret_manager_logging_decorator.cc index 937554e35ab1e..ac94fb80100a4 100644 --- a/google/cloud/secretmanager/v1/internal/secret_manager_logging_decorator.cc +++ b/google/cloud/secretmanager/v1/internal/secret_manager_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/secretmanager/v1/service.proto #include "google/cloud/secretmanager/v1/internal/secret_manager_logging_decorator.h" +#include "google/cloud/secretmanager/v1/service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace secretmanager_v1_internal { @@ -259,3 +262,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace secretmanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/secretmanager/v1/internal/secret_manager_logging_decorator.h b/google/cloud/secretmanager/v1/internal/secret_manager_logging_decorator.h index 040de9f3dca62..d9f79c18b3c5a 100644 --- a/google/cloud/secretmanager/v1/internal/secret_manager_logging_decorator.h +++ b/google/cloud/secretmanager/v1/internal/secret_manager_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace secretmanager_v1_internal { @@ -132,4 +135,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECRETMANAGER_V1_INTERNAL_SECRET_MANAGER_LOGGING_DECORATOR_H diff --git a/google/cloud/secretmanager/v1/internal/secret_manager_metadata_decorator.cc b/google/cloud/secretmanager/v1/internal/secret_manager_metadata_decorator.cc index b10049334d21e..dcca104ace345 100644 --- a/google/cloud/secretmanager/v1/internal/secret_manager_metadata_decorator.cc +++ b/google/cloud/secretmanager/v1/internal/secret_manager_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/secretmanager/v1/service.proto #include "google/cloud/secretmanager/v1/internal/secret_manager_metadata_decorator.h" +#include "google/cloud/secretmanager/v1/service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace secretmanager_v1_internal { @@ -220,3 +224,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace secretmanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/secretmanager/v1/internal/secret_manager_metadata_decorator.h b/google/cloud/secretmanager/v1/internal/secret_manager_metadata_decorator.h index b8588c2f3f765..9357d19f15e1c 100644 --- a/google/cloud/secretmanager/v1/internal/secret_manager_metadata_decorator.h +++ b/google/cloud/secretmanager/v1/internal/secret_manager_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace secretmanager_v1_internal { @@ -138,4 +141,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECRETMANAGER_V1_INTERNAL_SECRET_MANAGER_METADATA_DECORATOR_H diff --git a/google/cloud/secretmanager/v1/internal/secret_manager_option_defaults.cc b/google/cloud/secretmanager/v1/internal/secret_manager_option_defaults.cc index b729a01d11815..e6a9ddfc6505e 100644 --- a/google/cloud/secretmanager/v1/internal/secret_manager_option_defaults.cc +++ b/google/cloud/secretmanager/v1/internal/secret_manager_option_defaults.cc @@ -42,7 +42,7 @@ Options SecretManagerServiceDefaultOptions(Options options) { if (!options.has()) { options.set( secretmanager_v1::SecretManagerServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/secretmanager/v1/internal/secret_manager_stub.cc b/google/cloud/secretmanager/v1/internal/secret_manager_stub.cc index 19c110253915e..181734ce319d7 100644 --- a/google/cloud/secretmanager/v1/internal/secret_manager_stub.cc +++ b/google/cloud/secretmanager/v1/internal/secret_manager_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/secretmanager/v1/service.proto #include "google/cloud/secretmanager/v1/internal/secret_manager_stub.h" +#include "google/cloud/secretmanager/v1/service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace secretmanager_v1_internal { @@ -240,3 +243,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace secretmanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/secretmanager/v1/internal/secret_manager_stub.h b/google/cloud/secretmanager/v1/internal/secret_manager_stub.h index d910ac5d5f498..79b9a8b8d5b31 100644 --- a/google/cloud/secretmanager/v1/internal/secret_manager_stub.h +++ b/google/cloud/secretmanager/v1/internal/secret_manager_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECRETMANAGER_V1_INTERNAL_SECRET_MANAGER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECRETMANAGER_V1_INTERNAL_SECRET_MANAGER_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/secretmanager/v1/service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace secretmanager_v1_internal { @@ -231,4 +234,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECRETMANAGER_V1_INTERNAL_SECRET_MANAGER_STUB_H diff --git a/google/cloud/secretmanager/v1/internal/secret_manager_stub_factory.cc b/google/cloud/secretmanager/v1/internal/secret_manager_stub_factory.cc index d4461b4ed80e5..9016b765f62f6 100644 --- a/google/cloud/secretmanager/v1/internal/secret_manager_stub_factory.cc +++ b/google/cloud/secretmanager/v1/internal/secret_manager_stub_factory.cc @@ -17,22 +17,25 @@ // source: google/cloud/secretmanager/v1/service.proto #include "google/cloud/secretmanager/v1/internal/secret_manager_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/secretmanager/v1/internal/secret_manager_auth_decorator.h" #include "google/cloud/secretmanager/v1/internal/secret_manager_logging_decorator.h" #include "google/cloud/secretmanager/v1/internal/secret_manager_metadata_decorator.h" #include "google/cloud/secretmanager/v1/internal/secret_manager_stub.h" #include "google/cloud/secretmanager/v1/internal/secret_manager_tracing_stub.h" +#include "google/cloud/secretmanager/v1/service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace secretmanager_v1_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace secretmanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/secretmanager/v1/internal/secret_manager_stub_factory.h b/google/cloud/secretmanager/v1/internal/secret_manager_stub_factory.h index eb82a156f1ac3..fc48ddf7f0017 100644 --- a/google/cloud/secretmanager/v1/internal/secret_manager_stub_factory.h +++ b/google/cloud/secretmanager/v1/internal/secret_manager_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace secretmanager_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECRETMANAGER_V1_INTERNAL_SECRET_MANAGER_STUB_FACTORY_H diff --git a/google/cloud/secretmanager/v1/internal/secret_manager_tracing_connection.cc b/google/cloud/secretmanager/v1/internal/secret_manager_tracing_connection.cc index 86775307618e2..1aac92d620960 100644 --- a/google/cloud/secretmanager/v1/internal/secret_manager_tracing_connection.cc +++ b/google/cloud/secretmanager/v1/internal/secret_manager_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace secretmanager_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SecretManagerServiceTracingConnection::SecretManagerServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -196,17 +194,13 @@ SecretManagerServiceTracingConnection::GetLocation( return internal::EndSpan(*span, child_->GetLocation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSecretManagerServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/secretmanager/v1/internal/secret_manager_tracing_connection.h b/google/cloud/secretmanager/v1/internal/secret_manager_tracing_connection.h index 038bafd99e049..1d69be01eda88 100644 --- a/google/cloud/secretmanager/v1/internal/secret_manager_tracing_connection.h +++ b/google/cloud/secretmanager/v1/internal/secret_manager_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace secretmanager_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SecretManagerServiceTracingConnection : public secretmanager_v1::SecretManagerServiceConnection { public: @@ -109,8 +107,6 @@ class SecretManagerServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/secretmanager/v1/internal/secret_manager_tracing_stub.cc b/google/cloud/secretmanager/v1/internal/secret_manager_tracing_stub.cc index 92888a8899b78..382b4f92df182 100644 --- a/google/cloud/secretmanager/v1/internal/secret_manager_tracing_stub.cc +++ b/google/cloud/secretmanager/v1/internal/secret_manager_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace secretmanager_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SecretManagerServiceTracingStub::SecretManagerServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -244,18 +245,14 @@ SecretManagerServiceTracingStub::GetLocation( child_->GetLocation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSecretManagerServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace secretmanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/secretmanager/v1/internal/secret_manager_tracing_stub.h b/google/cloud/secretmanager/v1/internal/secret_manager_tracing_stub.h index 73a6793ff8cde..78fa4d42f5571 100644 --- a/google/cloud/secretmanager/v1/internal/secret_manager_tracing_stub.h +++ b/google/cloud/secretmanager/v1/internal/secret_manager_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace secretmanager_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SecretManagerServiceTracingStub : public SecretManagerServiceStub { public: ~SecretManagerServiceTracingStub() override = default; @@ -129,8 +130,6 @@ class SecretManagerServiceTracingStub : public SecretManagerServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -145,4 +144,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECRETMANAGER_V1_INTERNAL_SECRET_MANAGER_TRACING_STUB_H diff --git a/google/cloud/secretmanager/v1/secret_manager_connection.h b/google/cloud/secretmanager/v1/secret_manager_connection.h index 6fb96415a12ef..10a6745e73af5 100644 --- a/google/cloud/secretmanager/v1/secret_manager_connection.h +++ b/google/cloud/secretmanager/v1/secret_manager_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/secretmanager/v1/internal/secret_manager_retry_traits.h" #include "google/cloud/secretmanager/v1/secret_manager_connection_idempotency_policy.h" +#include "google/cloud/secretmanager/v1/service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/secretmanager/v1/secret_manager_connection_idempotency_policy.h b/google/cloud/secretmanager/v1/secret_manager_connection_idempotency_policy.h index 1a55e8e9c2ef4..482a07b7742e6 100644 --- a/google/cloud/secretmanager/v1/secret_manager_connection_idempotency_policy.h +++ b/google/cloud/secretmanager/v1/secret_manager_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECRETMANAGER_V1_SECRET_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECRETMANAGER_V1_SECRET_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/secretmanager/v1/service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/securesourcemanager/BUILD.bazel b/google/cloud/securesourcemanager/BUILD.bazel index 186fabf4020bb..f9fe82b0d8601 100644 --- a/google/cloud/securesourcemanager/BUILD.bazel +++ b/google/cloud/securesourcemanager/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/securesourcemanager/v1:securesourcemanager_cc_grpc", + "@googleapis//google/cloud/securesourcemanager/v1:securesourcemanager_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/securesourcemanager/quickstart/.bazelrc b/google/cloud/securesourcemanager/quickstart/.bazelrc index 6777c6b4c95de..ec27511a60add 100644 --- a/google/cloud/securesourcemanager/quickstart/.bazelrc +++ b/google/cloud/securesourcemanager/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/securesourcemanager/quickstart/CMakeLists.txt b/google/cloud/securesourcemanager/quickstart/CMakeLists.txt index c733718193719..b103f841aeb90 100644 --- a/google/cloud/securesourcemanager/quickstart/CMakeLists.txt +++ b/google/cloud/securesourcemanager/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Secure Source Manager API C++ client library # from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-securesourcemanager-quickstart CXX) find_package(google_cloud_cpp_securesourcemanager REQUIRED) diff --git a/google/cloud/securesourcemanager/v1/internal/secure_source_manager_auth_decorator.cc b/google/cloud/securesourcemanager/v1/internal/secure_source_manager_auth_decorator.cc index 0675c198ce193..15d4e4be2d0c8 100644 --- a/google/cloud/securesourcemanager/v1/internal/secure_source_manager_auth_decorator.cc +++ b/google/cloud/securesourcemanager/v1/internal/secure_source_manager_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/securesourcemanager/v1/secure_source_manager.proto #include "google/cloud/securesourcemanager/v1/internal/secure_source_manager_auth_decorator.h" -#include +#include "google/cloud/securesourcemanager/v1/secure_source_manager.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securesourcemanager_v1_internal { @@ -1263,3 +1266,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace securesourcemanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/securesourcemanager/v1/internal/secure_source_manager_auth_decorator.h b/google/cloud/securesourcemanager/v1/internal/secure_source_manager_auth_decorator.h index 7d83bf6c137cb..039303e3afdd5 100644 --- a/google/cloud/securesourcemanager/v1/internal/secure_source_manager_auth_decorator.h +++ b/google/cloud/securesourcemanager/v1/internal/secure_source_manager_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/securesourcemanager/v1/internal/secure_source_manager_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securesourcemanager_v1_internal { @@ -581,4 +584,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURESOURCEMANAGER_V1_INTERNAL_SECURE_SOURCE_MANAGER_AUTH_DECORATOR_H diff --git a/google/cloud/securesourcemanager/v1/internal/secure_source_manager_connection_impl.h b/google/cloud/securesourcemanager/v1/internal/secure_source_manager_connection_impl.h index 889c464395405..237119b748711 100644 --- a/google/cloud/securesourcemanager/v1/internal/secure_source_manager_connection_impl.h +++ b/google/cloud/securesourcemanager/v1/internal/secure_source_manager_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/securesourcemanager/v1/internal/secure_source_manager_logging_decorator.cc b/google/cloud/securesourcemanager/v1/internal/secure_source_manager_logging_decorator.cc index 4f84a0525f70e..7c609c09bce8c 100644 --- a/google/cloud/securesourcemanager/v1/internal/secure_source_manager_logging_decorator.cc +++ b/google/cloud/securesourcemanager/v1/internal/secure_source_manager_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/securesourcemanager/v1/secure_source_manager.proto #include "google/cloud/securesourcemanager/v1/internal/secure_source_manager_logging_decorator.h" +#include "google/cloud/securesourcemanager/v1/secure_source_manager.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securesourcemanager_v1_internal { @@ -1500,3 +1503,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace securesourcemanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/securesourcemanager/v1/internal/secure_source_manager_logging_decorator.h b/google/cloud/securesourcemanager/v1/internal/secure_source_manager_logging_decorator.h index 85df78a00f20f..d6d269ef5a5e9 100644 --- a/google/cloud/securesourcemanager/v1/internal/secure_source_manager_logging_decorator.h +++ b/google/cloud/securesourcemanager/v1/internal/secure_source_manager_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/securesourcemanager/v1/internal/secure_source_manager_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securesourcemanager_v1_internal { @@ -581,4 +584,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURESOURCEMANAGER_V1_INTERNAL_SECURE_SOURCE_MANAGER_LOGGING_DECORATOR_H diff --git a/google/cloud/securesourcemanager/v1/internal/secure_source_manager_metadata_decorator.cc b/google/cloud/securesourcemanager/v1/internal/secure_source_manager_metadata_decorator.cc index b6afb1fe39022..1278aec502cdb 100644 --- a/google/cloud/securesourcemanager/v1/internal/secure_source_manager_metadata_decorator.cc +++ b/google/cloud/securesourcemanager/v1/internal/secure_source_manager_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/securesourcemanager/v1/secure_source_manager.proto #include "google/cloud/securesourcemanager/v1/internal/secure_source_manager_metadata_decorator.h" +#include "google/cloud/securesourcemanager/v1/secure_source_manager.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securesourcemanager_v1_internal { @@ -1070,3 +1074,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace securesourcemanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/securesourcemanager/v1/internal/secure_source_manager_metadata_decorator.h b/google/cloud/securesourcemanager/v1/internal/secure_source_manager_metadata_decorator.h index fed56c12b3a39..febf97e0a5228 100644 --- a/google/cloud/securesourcemanager/v1/internal/secure_source_manager_metadata_decorator.h +++ b/google/cloud/securesourcemanager/v1/internal/secure_source_manager_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/securesourcemanager/v1/internal/secure_source_manager_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securesourcemanager_v1_internal { @@ -587,4 +590,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURESOURCEMANAGER_V1_INTERNAL_SECURE_SOURCE_MANAGER_METADATA_DECORATOR_H diff --git a/google/cloud/securesourcemanager/v1/internal/secure_source_manager_option_defaults.cc b/google/cloud/securesourcemanager/v1/internal/secure_source_manager_option_defaults.cc index d54447e1a7cb2..fd279185de573 100644 --- a/google/cloud/securesourcemanager/v1/internal/secure_source_manager_option_defaults.cc +++ b/google/cloud/securesourcemanager/v1/internal/secure_source_manager_option_defaults.cc @@ -43,7 +43,7 @@ Options SecureSourceManagerDefaultOptions(Options options) { securesourcemanager_v1::SecureSourceManagerRetryPolicyOption>()) { options.set( securesourcemanager_v1::SecureSourceManagerLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/securesourcemanager/v1/internal/secure_source_manager_stub.cc b/google/cloud/securesourcemanager/v1/internal/secure_source_manager_stub.cc index dfccc9a7aabd4..27a8debfebd81 100644 --- a/google/cloud/securesourcemanager/v1/internal/secure_source_manager_stub.cc +++ b/google/cloud/securesourcemanager/v1/internal/secure_source_manager_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/securesourcemanager/v1/secure_source_manager.proto #include "google/cloud/securesourcemanager/v1/internal/secure_source_manager_stub.h" +#include "google/cloud/securesourcemanager/v1/secure_source_manager.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securesourcemanager_v1_internal { @@ -1456,3 +1459,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace securesourcemanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/securesourcemanager/v1/internal/secure_source_manager_stub.h b/google/cloud/securesourcemanager/v1/internal/secure_source_manager_stub.h index 98b7f139e030c..5607144db7f9c 100644 --- a/google/cloud/securesourcemanager/v1/internal/secure_source_manager_stub.h +++ b/google/cloud/securesourcemanager/v1/internal/secure_source_manager_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURESOURCEMANAGER_V1_INTERNAL_SECURE_SOURCE_MANAGER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURESOURCEMANAGER_V1_INTERNAL_SECURE_SOURCE_MANAGER_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/securesourcemanager/v1/secure_source_manager.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securesourcemanager_v1_internal { @@ -1161,4 +1164,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURESOURCEMANAGER_V1_INTERNAL_SECURE_SOURCE_MANAGER_STUB_H diff --git a/google/cloud/securesourcemanager/v1/internal/secure_source_manager_stub_factory.cc b/google/cloud/securesourcemanager/v1/internal/secure_source_manager_stub_factory.cc index 124bd48abe5af..d3c610ff6e2c1 100644 --- a/google/cloud/securesourcemanager/v1/internal/secure_source_manager_stub_factory.cc +++ b/google/cloud/securesourcemanager/v1/internal/secure_source_manager_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/securesourcemanager/v1/secure_source_manager.proto #include "google/cloud/securesourcemanager/v1/internal/secure_source_manager_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/securesourcemanager/v1/internal/secure_source_manager_auth_decorator.h" #include "google/cloud/securesourcemanager/v1/internal/secure_source_manager_logging_decorator.h" #include "google/cloud/securesourcemanager/v1/internal/secure_source_manager_metadata_decorator.h" #include "google/cloud/securesourcemanager/v1/internal/secure_source_manager_stub.h" #include "google/cloud/securesourcemanager/v1/internal/secure_source_manager_tracing_stub.h" +#include "google/cloud/securesourcemanager/v1/secure_source_manager.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securesourcemanager_v1_internal { @@ -79,3 +82,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace securesourcemanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/securesourcemanager/v1/internal/secure_source_manager_stub_factory.h b/google/cloud/securesourcemanager/v1/internal/secure_source_manager_stub_factory.h index f9a2eef736969..8849124c816c8 100644 --- a/google/cloud/securesourcemanager/v1/internal/secure_source_manager_stub_factory.h +++ b/google/cloud/securesourcemanager/v1/internal/secure_source_manager_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securesourcemanager_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURESOURCEMANAGER_V1_INTERNAL_SECURE_SOURCE_MANAGER_STUB_FACTORY_H diff --git a/google/cloud/securesourcemanager/v1/internal/secure_source_manager_tracing_connection.cc b/google/cloud/securesourcemanager/v1/internal/secure_source_manager_tracing_connection.cc index b2a94c6ee157a..b2ccc20a52533 100644 --- a/google/cloud/securesourcemanager/v1/internal/secure_source_manager_tracing_connection.cc +++ b/google/cloud/securesourcemanager/v1/internal/secure_source_manager_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace securesourcemanager_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SecureSourceManagerTracingConnection::SecureSourceManagerTracingConnection( std::shared_ptr child) @@ -1353,18 +1351,14 @@ Status SecureSourceManagerTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSecureSourceManagerTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/securesourcemanager/v1/internal/secure_source_manager_tracing_connection.h b/google/cloud/securesourcemanager/v1/internal/secure_source_manager_tracing_connection.h index feddef996ec36..7882479a18316 100644 --- a/google/cloud/securesourcemanager/v1/internal/secure_source_manager_tracing_connection.h +++ b/google/cloud/securesourcemanager/v1/internal/secure_source_manager_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace securesourcemanager_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SecureSourceManagerTracingConnection : public securesourcemanager_v1::SecureSourceManagerConnection { public: @@ -555,8 +553,6 @@ class SecureSourceManagerTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/securesourcemanager/v1/internal/secure_source_manager_tracing_stub.cc b/google/cloud/securesourcemanager/v1/internal/secure_source_manager_tracing_stub.cc index 26ade867630af..20f9b575291ab 100644 --- a/google/cloud/securesourcemanager/v1/internal/secure_source_manager_tracing_stub.cc +++ b/google/cloud/securesourcemanager/v1/internal/secure_source_manager_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securesourcemanager_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SecureSourceManagerTracingStub::SecureSourceManagerTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -1364,18 +1365,14 @@ future SecureSourceManagerTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSecureSourceManagerTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace securesourcemanager_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/securesourcemanager/v1/internal/secure_source_manager_tracing_stub.h b/google/cloud/securesourcemanager/v1/internal/secure_source_manager_tracing_stub.h index 12621e8e026c5..aa9b3bc218bb1 100644 --- a/google/cloud/securesourcemanager/v1/internal/secure_source_manager_tracing_stub.h +++ b/google/cloud/securesourcemanager/v1/internal/secure_source_manager_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securesourcemanager_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SecureSourceManagerTracingStub : public SecureSourceManagerStub { public: ~SecureSourceManagerTracingStub() override = default; @@ -577,8 +578,6 @@ class SecureSourceManagerTracingStub : public SecureSourceManagerStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -593,4 +592,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURESOURCEMANAGER_V1_INTERNAL_SECURE_SOURCE_MANAGER_TRACING_STUB_H diff --git a/google/cloud/securesourcemanager/v1/secure_source_manager_client.h b/google/cloud/securesourcemanager/v1/secure_source_manager_client.h index b72ae781e6e82..4bfc19fe73fed 100644 --- a/google/cloud/securesourcemanager/v1/secure_source_manager_client.h +++ b/google/cloud/securesourcemanager/v1/secure_source_manager_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/securesourcemanager/v1/secure_source_manager_connection.h b/google/cloud/securesourcemanager/v1/secure_source_manager_connection.h index 0c0d461e30bfd..ca25a5b9cac65 100644 --- a/google/cloud/securesourcemanager/v1/secure_source_manager_connection.h +++ b/google/cloud/securesourcemanager/v1/secure_source_manager_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURESOURCEMANAGER_V1_SECURE_SOURCE_MANAGER_CONNECTION_H #include "google/cloud/securesourcemanager/v1/internal/secure_source_manager_retry_traits.h" +#include "google/cloud/securesourcemanager/v1/secure_source_manager.pb.h" #include "google/cloud/securesourcemanager/v1/secure_source_manager_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/securesourcemanager/v1/secure_source_manager_connection_idempotency_policy.h b/google/cloud/securesourcemanager/v1/secure_source_manager_connection_idempotency_policy.h index e16db34d16f47..a81dbc60a06af 100644 --- a/google/cloud/securesourcemanager/v1/secure_source_manager_connection_idempotency_policy.h +++ b/google/cloud/securesourcemanager/v1/secure_source_manager_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURESOURCEMANAGER_V1_SECURE_SOURCE_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURESOURCEMANAGER_V1_SECURE_SOURCE_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/securesourcemanager/v1/secure_source_manager.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/securitycenter/BUILD.bazel b/google/cloud/securitycenter/BUILD.bazel index 30a842d8bf8bc..71b679464b08e 100644 --- a/google/cloud/securitycenter/BUILD.bazel +++ b/google/cloud/securitycenter/BUILD.bazel @@ -19,14 +19,13 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", "v2/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/securitycenter/v1:securitycenter_cc_grpc", - "@com_google_googleapis//google/cloud/securitycenter/v2:securitycenter_cc_grpc", + "@googleapis//google/cloud/securitycenter/v1:securitycenter_cc_grpc", + "@googleapis//google/cloud/securitycenter/v2:securitycenter_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/securitycenter/CMakeLists.txt b/google/cloud/securitycenter/CMakeLists.txt index cd333a293591f..d9234b4a91d4a 100644 --- a/google/cloud/securitycenter/CMakeLists.txt +++ b/google/cloud/securitycenter/CMakeLists.txt @@ -25,7 +25,7 @@ endif () include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(securitycenter "Security Command Center API" - SERVICE_DIRS "__EMPTY__" "v1/" "v2/") + SERVICE_DIRS "v1/" "v2/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(securitycenter_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/securitycenter/mocks/mock_security_center_connection.h b/google/cloud/securitycenter/mocks/mock_security_center_connection.h deleted file mode 100644 index e112e09a05ee6..0000000000000 --- a/google/cloud/securitycenter/mocks/mock_security_center_connection.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_MOCKS_MOCK_SECURITY_CENTER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_MOCKS_MOCK_SECURITY_CENTER_CONNECTION_H - -#include "google/cloud/securitycenter/security_center_connection.h" -#include "google/cloud/securitycenter/v1/mocks/mock_security_center_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in securitycenter_v1_mocks instead of the aliases -/// defined in this namespace. -namespace securitycenter_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use securitycenter_v1_mocks::MockSecurityCenterConnection -/// directly. -using ::google::cloud::securitycenter_v1_mocks::MockSecurityCenterConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace securitycenter_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_MOCKS_MOCK_SECURITY_CENTER_CONNECTION_H diff --git a/google/cloud/securitycenter/quickstart/.bazelrc b/google/cloud/securitycenter/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/securitycenter/quickstart/.bazelrc +++ b/google/cloud/securitycenter/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/securitycenter/quickstart/CMakeLists.txt b/google/cloud/securitycenter/quickstart/CMakeLists.txt index 9af7a8b64a06d..4ac30d6d8d808 100644 --- a/google/cloud/securitycenter/quickstart/CMakeLists.txt +++ b/google/cloud/securitycenter/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Security Command Center API C++ client library # from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-securitycenter-quickstart CXX) find_package(google_cloud_cpp_securitycenter REQUIRED) diff --git a/google/cloud/securitycenter/security_center_client.h b/google/cloud/securitycenter/security_center_client.h deleted file mode 100644 index bde60f1a5fb35..0000000000000 --- a/google/cloud/securitycenter/security_center_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_SECURITY_CENTER_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_SECURITY_CENTER_CLIENT_H - -#include "google/cloud/securitycenter/security_center_connection.h" -#include "google/cloud/securitycenter/v1/security_center_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in securitycenter_v1 instead of the aliases defined in -/// this namespace. -namespace securitycenter { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use securitycenter_v1::SecurityCenterClient directly. -using ::google::cloud::securitycenter_v1::SecurityCenterClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace securitycenter -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_SECURITY_CENTER_CLIENT_H diff --git a/google/cloud/securitycenter/security_center_connection.h b/google/cloud/securitycenter/security_center_connection.h deleted file mode 100644 index 2f486ce428039..0000000000000 --- a/google/cloud/securitycenter/security_center_connection.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_SECURITY_CENTER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_SECURITY_CENTER_CONNECTION_H - -#include "google/cloud/securitycenter/security_center_connection_idempotency_policy.h" -#include "google/cloud/securitycenter/v1/security_center_connection.h" - -namespace google { -namespace cloud { -namespace securitycenter { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use securitycenter_v1::MakeSecurityCenterConnection directly. -using ::google::cloud::securitycenter_v1::MakeSecurityCenterConnection; - -/// @deprecated Use securitycenter_v1::SecurityCenterConnection directly. -using ::google::cloud::securitycenter_v1::SecurityCenterConnection; - -/// @deprecated Use -/// securitycenter_v1::SecurityCenterLimitedErrorCountRetryPolicy directly. -using ::google::cloud::securitycenter_v1:: - SecurityCenterLimitedErrorCountRetryPolicy; - -/// @deprecated Use securitycenter_v1::SecurityCenterLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::securitycenter_v1::SecurityCenterLimitedTimeRetryPolicy; - -/// @deprecated Use securitycenter_v1::SecurityCenterRetryPolicy directly. -using ::google::cloud::securitycenter_v1::SecurityCenterRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace securitycenter -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_SECURITY_CENTER_CONNECTION_H diff --git a/google/cloud/securitycenter/security_center_connection_idempotency_policy.h b/google/cloud/securitycenter/security_center_connection_idempotency_policy.h deleted file mode 100644 index 9833b79f95ca0..0000000000000 --- a/google/cloud/securitycenter/security_center_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_SECURITY_CENTER_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_SECURITY_CENTER_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/securitycenter/v1/security_center_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace securitycenter { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// securitycenter_v1::MakeDefaultSecurityCenterConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::securitycenter_v1:: - MakeDefaultSecurityCenterConnectionIdempotencyPolicy; - -/// @deprecated Use securitycenter_v1::SecurityCenterConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::securitycenter_v1:: - SecurityCenterConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace securitycenter -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_SECURITY_CENTER_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/securitycenter/security_center_options.h b/google/cloud/securitycenter/security_center_options.h deleted file mode 100644 index ddaa3e59fcc3e..0000000000000 --- a/google/cloud/securitycenter/security_center_options.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/securitycenter/v1/securitycenter_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_SECURITY_CENTER_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_SECURITY_CENTER_OPTIONS_H - -#include "google/cloud/securitycenter/security_center_connection.h" -#include "google/cloud/securitycenter/security_center_connection_idempotency_policy.h" -#include "google/cloud/securitycenter/v1/security_center_options.h" - -namespace google { -namespace cloud { -namespace securitycenter { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use securitycenter_v1::SecurityCenterPollingPolicyOption -/// directly. -using ::google::cloud::securitycenter_v1::SecurityCenterPollingPolicyOption; - -/// @deprecated Use securitycenter_v1::SecurityCenterBackoffPolicyOption -/// directly. -using ::google::cloud::securitycenter_v1::SecurityCenterBackoffPolicyOption; - -/// @deprecated Use -/// securitycenter_v1::SecurityCenterConnectionIdempotencyPolicyOption directly. -using ::google::cloud::securitycenter_v1:: - SecurityCenterConnectionIdempotencyPolicyOption; - -/// @deprecated Use securitycenter_v1::SecurityCenterPolicyOptionList directly. -using ::google::cloud::securitycenter_v1::SecurityCenterPolicyOptionList; - -/// @deprecated Use securitycenter_v1::SecurityCenterRetryPolicyOption directly. -using ::google::cloud::securitycenter_v1::SecurityCenterRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace securitycenter -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_SECURITY_CENTER_OPTIONS_H diff --git a/google/cloud/securitycenter/v1/internal/security_center_auth_decorator.cc b/google/cloud/securitycenter/v1/internal/security_center_auth_decorator.cc index c19357e2d6d7a..8ad7d130461a5 100644 --- a/google/cloud/securitycenter/v1/internal/security_center_auth_decorator.cc +++ b/google/cloud/securitycenter/v1/internal/security_center_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/securitycenter/v1/securitycenter_service.proto #include "google/cloud/securitycenter/v1/internal/security_center_auth_decorator.h" -#include +#include "google/cloud/securitycenter/v1/securitycenter_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycenter_v1_internal { @@ -772,3 +775,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace securitycenter_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/securitycenter/v1/internal/security_center_auth_decorator.h b/google/cloud/securitycenter/v1/internal/security_center_auth_decorator.h index 87e661281d567..6ef124300d395 100644 --- a/google/cloud/securitycenter/v1/internal/security_center_auth_decorator.h +++ b/google/cloud/securitycenter/v1/internal/security_center_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/securitycenter/v1/internal/security_center_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycenter_v1_internal { @@ -467,4 +470,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_V1_INTERNAL_SECURITY_CENTER_AUTH_DECORATOR_H diff --git a/google/cloud/securitycenter/v1/internal/security_center_connection_impl.h b/google/cloud/securitycenter/v1/internal/security_center_connection_impl.h index e2a5bb014cdb3..58e9f478cbd86 100644 --- a/google/cloud/securitycenter/v1/internal/security_center_connection_impl.h +++ b/google/cloud/securitycenter/v1/internal/security_center_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/securitycenter/v1/internal/security_center_logging_decorator.cc b/google/cloud/securitycenter/v1/internal/security_center_logging_decorator.cc index 416c5c2f6dfe0..15a365f4bee87 100644 --- a/google/cloud/securitycenter/v1/internal/security_center_logging_decorator.cc +++ b/google/cloud/securitycenter/v1/internal/security_center_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/securitycenter/v1/securitycenter_service.proto #include "google/cloud/securitycenter/v1/internal/security_center_logging_decorator.h" +#include "google/cloud/securitycenter/v1/securitycenter_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycenter_v1_internal { @@ -1058,3 +1061,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace securitycenter_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/securitycenter/v1/internal/security_center_logging_decorator.h b/google/cloud/securitycenter/v1/internal/security_center_logging_decorator.h index aef83ffc98951..cc3fe17397f83 100644 --- a/google/cloud/securitycenter/v1/internal/security_center_logging_decorator.h +++ b/google/cloud/securitycenter/v1/internal/security_center_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/securitycenter/v1/internal/security_center_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycenter_v1_internal { @@ -467,4 +470,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_V1_INTERNAL_SECURITY_CENTER_LOGGING_DECORATOR_H diff --git a/google/cloud/securitycenter/v1/internal/security_center_metadata_decorator.cc b/google/cloud/securitycenter/v1/internal/security_center_metadata_decorator.cc index 67b130e2c3b81..57ca139f97d0a 100644 --- a/google/cloud/securitycenter/v1/internal/security_center_metadata_decorator.cc +++ b/google/cloud/securitycenter/v1/internal/security_center_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/securitycenter/v1/securitycenter_service.proto #include "google/cloud/securitycenter/v1/internal/security_center_metadata_decorator.h" +#include "google/cloud/securitycenter/v1/securitycenter_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycenter_v1_internal { @@ -796,3 +800,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace securitycenter_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/securitycenter/v1/internal/security_center_metadata_decorator.h b/google/cloud/securitycenter/v1/internal/security_center_metadata_decorator.h index 5980fd8d9a8f8..628c895745c6f 100644 --- a/google/cloud/securitycenter/v1/internal/security_center_metadata_decorator.h +++ b/google/cloud/securitycenter/v1/internal/security_center_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/securitycenter/v1/internal/security_center_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycenter_v1_internal { @@ -472,4 +475,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_V1_INTERNAL_SECURITY_CENTER_METADATA_DECORATOR_H diff --git a/google/cloud/securitycenter/v1/internal/security_center_option_defaults.cc b/google/cloud/securitycenter/v1/internal/security_center_option_defaults.cc index 3043b87b6b2e6..98d708ca07de2 100644 --- a/google/cloud/securitycenter/v1/internal/security_center_option_defaults.cc +++ b/google/cloud/securitycenter/v1/internal/security_center_option_defaults.cc @@ -42,7 +42,7 @@ Options SecurityCenterDefaultOptions(Options options) { if (!options.has()) { options.set( securitycenter_v1::SecurityCenterLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/securitycenter/v1/internal/security_center_stub.cc b/google/cloud/securitycenter/v1/internal/security_center_stub.cc index 5d1b0d739b28f..30055e433876d 100644 --- a/google/cloud/securitycenter/v1/internal/security_center_stub.cc +++ b/google/cloud/securitycenter/v1/internal/security_center_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/securitycenter/v1/securitycenter_service.proto #include "google/cloud/securitycenter/v1/internal/security_center_stub.h" +#include "google/cloud/securitycenter/v1/securitycenter_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycenter_v1_internal { @@ -1003,3 +1006,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace securitycenter_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/securitycenter/v1/internal/security_center_stub.h b/google/cloud/securitycenter/v1/internal/security_center_stub.h index d79cd749ae0a7..c4dfa876aab2f 100644 --- a/google/cloud/securitycenter/v1/internal/security_center_stub.h +++ b/google/cloud/securitycenter/v1/internal/security_center_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_V1_INTERNAL_SECURITY_CENTER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_V1_INTERNAL_SECURITY_CENTER_STUB_H +#include "google/cloud/securitycenter/v1/securitycenter_service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycenter_v1_internal { @@ -904,4 +907,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_V1_INTERNAL_SECURITY_CENTER_STUB_H diff --git a/google/cloud/securitycenter/v1/internal/security_center_stub_factory.cc b/google/cloud/securitycenter/v1/internal/security_center_stub_factory.cc index 063f11fa446be..8f1dfe199f68d 100644 --- a/google/cloud/securitycenter/v1/internal/security_center_stub_factory.cc +++ b/google/cloud/securitycenter/v1/internal/security_center_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/securitycenter/v1/internal/security_center_metadata_decorator.h" #include "google/cloud/securitycenter/v1/internal/security_center_stub.h" #include "google/cloud/securitycenter/v1/internal/security_center_tracing_stub.h" +#include "google/cloud/securitycenter/v1/securitycenter_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycenter_v1_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace securitycenter_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/securitycenter/v1/internal/security_center_stub_factory.h b/google/cloud/securitycenter/v1/internal/security_center_stub_factory.h index 5a0c02af4c131..16416b68d783e 100644 --- a/google/cloud/securitycenter/v1/internal/security_center_stub_factory.h +++ b/google/cloud/securitycenter/v1/internal/security_center_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycenter_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_V1_INTERNAL_SECURITY_CENTER_STUB_FACTORY_H diff --git a/google/cloud/securitycenter/v1/internal/security_center_tracing_connection.cc b/google/cloud/securitycenter/v1/internal/security_center_tracing_connection.cc index 9cd3719a3d721..666a34be1104e 100644 --- a/google/cloud/securitycenter/v1/internal/security_center_tracing_connection.cc +++ b/google/cloud/securitycenter/v1/internal/security_center_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace securitycenter_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SecurityCenterTracingConnection::SecurityCenterTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -816,16 +814,12 @@ Status SecurityCenterTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSecurityCenterTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/securitycenter/v1/internal/security_center_tracing_connection.h b/google/cloud/securitycenter/v1/internal/security_center_tracing_connection.h index 84d81f11604cb..24c6471fca1d0 100644 --- a/google/cloud/securitycenter/v1/internal/security_center_tracing_connection.h +++ b/google/cloud/securitycenter/v1/internal/security_center_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace securitycenter_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SecurityCenterTracingConnection : public securitycenter_v1::SecurityCenterConnection { public: @@ -383,8 +381,6 @@ class SecurityCenterTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/securitycenter/v1/internal/security_center_tracing_stub.cc b/google/cloud/securitycenter/v1/internal/security_center_tracing_stub.cc index f7ec9e3bfe555..ae7087c433bdc 100644 --- a/google/cloud/securitycenter/v1/internal/security_center_tracing_stub.cc +++ b/google/cloud/securitycenter/v1/internal/security_center_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycenter_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SecurityCenterTracingStub::SecurityCenterTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -1001,18 +1002,14 @@ future SecurityCenterTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSecurityCenterTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace securitycenter_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/securitycenter/v1/internal/security_center_tracing_stub.h b/google/cloud/securitycenter/v1/internal/security_center_tracing_stub.h index e254e1ec7d0fa..fbb9307a95db2 100644 --- a/google/cloud/securitycenter/v1/internal/security_center_tracing_stub.h +++ b/google/cloud/securitycenter/v1/internal/security_center_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycenter_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SecurityCenterTracingStub : public SecurityCenterStub { public: ~SecurityCenterTracingStub() override = default; @@ -462,8 +463,6 @@ class SecurityCenterTracingStub : public SecurityCenterStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -478,4 +477,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_V1_INTERNAL_SECURITY_CENTER_TRACING_STUB_H diff --git a/google/cloud/securitycenter/v1/security_center_client.h b/google/cloud/securitycenter/v1/security_center_client.h index ac6335a048c5c..df5ec15dc5ea2 100644 --- a/google/cloud/securitycenter/v1/security_center_client.h +++ b/google/cloud/securitycenter/v1/security_center_client.h @@ -28,7 +28,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/securitycenter/v1/security_center_connection.h b/google/cloud/securitycenter/v1/security_center_connection.h index 9d9666a00692b..2e43481c88551 100644 --- a/google/cloud/securitycenter/v1/security_center_connection.h +++ b/google/cloud/securitycenter/v1/security_center_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/securitycenter/v1/internal/security_center_retry_traits.h" #include "google/cloud/securitycenter/v1/security_center_connection_idempotency_policy.h" +#include "google/cloud/securitycenter/v1/securitycenter_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/securitycenter/v1/security_center_connection_idempotency_policy.h b/google/cloud/securitycenter/v1/security_center_connection_idempotency_policy.h index f635efe79ee01..3c5fe8140252e 100644 --- a/google/cloud/securitycenter/v1/security_center_connection_idempotency_policy.h +++ b/google/cloud/securitycenter/v1/security_center_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_V1_SECURITY_CENTER_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_V1_SECURITY_CENTER_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/securitycenter/v1/securitycenter_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/securitycenter/v2/internal/security_center_auth_decorator.cc b/google/cloud/securitycenter/v2/internal/security_center_auth_decorator.cc index ce468cb2cc479..0007a3580ab85 100644 --- a/google/cloud/securitycenter/v2/internal/security_center_auth_decorator.cc +++ b/google/cloud/securitycenter/v2/internal/security_center_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/securitycenter/v2/securitycenter_service.proto #include "google/cloud/securitycenter/v2/internal/security_center_auth_decorator.h" -#include +#include "google/cloud/securitycenter/v2/securitycenter_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycenter_v2_internal { @@ -497,3 +500,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace securitycenter_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/securitycenter/v2/internal/security_center_auth_decorator.h b/google/cloud/securitycenter/v2/internal/security_center_auth_decorator.h index 7167ed38f3a19..9b457b64ee166 100644 --- a/google/cloud/securitycenter/v2/internal/security_center_auth_decorator.h +++ b/google/cloud/securitycenter/v2/internal/security_center_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/securitycenter/v2/internal/security_center_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycenter_v2_internal { @@ -298,4 +301,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_V2_INTERNAL_SECURITY_CENTER_AUTH_DECORATOR_H diff --git a/google/cloud/securitycenter/v2/internal/security_center_connection_impl.h b/google/cloud/securitycenter/v2/internal/security_center_connection_impl.h index 301df2b0759d9..197f81c965dd9 100644 --- a/google/cloud/securitycenter/v2/internal/security_center_connection_impl.h +++ b/google/cloud/securitycenter/v2/internal/security_center_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/securitycenter/v2/internal/security_center_logging_decorator.cc b/google/cloud/securitycenter/v2/internal/security_center_logging_decorator.cc index d6c438fa5d6ee..8fcfeae666ff0 100644 --- a/google/cloud/securitycenter/v2/internal/security_center_logging_decorator.cc +++ b/google/cloud/securitycenter/v2/internal/security_center_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/securitycenter/v2/securitycenter_service.proto #include "google/cloud/securitycenter/v2/internal/security_center_logging_decorator.h" +#include "google/cloud/securitycenter/v2/securitycenter_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycenter_v2_internal { @@ -677,3 +680,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace securitycenter_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/securitycenter/v2/internal/security_center_logging_decorator.h b/google/cloud/securitycenter/v2/internal/security_center_logging_decorator.h index 3d45e4b3e060f..c31f71e3186ed 100644 --- a/google/cloud/securitycenter/v2/internal/security_center_logging_decorator.h +++ b/google/cloud/securitycenter/v2/internal/security_center_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/securitycenter/v2/internal/security_center_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycenter_v2_internal { @@ -298,4 +301,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_V2_INTERNAL_SECURITY_CENTER_LOGGING_DECORATOR_H diff --git a/google/cloud/securitycenter/v2/internal/security_center_metadata_decorator.cc b/google/cloud/securitycenter/v2/internal/security_center_metadata_decorator.cc index 0f67bbff60a22..19c95cf37e431 100644 --- a/google/cloud/securitycenter/v2/internal/security_center_metadata_decorator.cc +++ b/google/cloud/securitycenter/v2/internal/security_center_metadata_decorator.cc @@ -17,19 +17,22 @@ // source: google/cloud/securitycenter/v2/securitycenter_service.proto #include "google/cloud/securitycenter/v2/internal/security_center_metadata_decorator.h" +#include "google/cloud/securitycenter/v2/securitycenter_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/routing_matcher.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycenter_v2_internal { @@ -667,3 +670,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace securitycenter_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/securitycenter/v2/internal/security_center_metadata_decorator.h b/google/cloud/securitycenter/v2/internal/security_center_metadata_decorator.h index 00571e354992e..1c71cc6b73766 100644 --- a/google/cloud/securitycenter/v2/internal/security_center_metadata_decorator.h +++ b/google/cloud/securitycenter/v2/internal/security_center_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/securitycenter/v2/internal/security_center_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycenter_v2_internal { @@ -303,4 +306,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_V2_INTERNAL_SECURITY_CENTER_METADATA_DECORATOR_H diff --git a/google/cloud/securitycenter/v2/internal/security_center_option_defaults.cc b/google/cloud/securitycenter/v2/internal/security_center_option_defaults.cc index 4551f81542420..7a62c2006126e 100644 --- a/google/cloud/securitycenter/v2/internal/security_center_option_defaults.cc +++ b/google/cloud/securitycenter/v2/internal/security_center_option_defaults.cc @@ -42,7 +42,7 @@ Options SecurityCenterDefaultOptions(Options options) { if (!options.has()) { options.set( securitycenter_v2::SecurityCenterLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/securitycenter/v2/internal/security_center_stub.cc b/google/cloud/securitycenter/v2/internal/security_center_stub.cc index b0463f5dc952f..ad35cbdfe7cf0 100644 --- a/google/cloud/securitycenter/v2/internal/security_center_stub.cc +++ b/google/cloud/securitycenter/v2/internal/security_center_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/securitycenter/v2/securitycenter_service.proto #include "google/cloud/securitycenter/v2/internal/security_center_stub.h" +#include "google/cloud/securitycenter/v2/securitycenter_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycenter_v2_internal { @@ -643,3 +646,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace securitycenter_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/securitycenter/v2/internal/security_center_stub.h b/google/cloud/securitycenter/v2/internal/security_center_stub.h index e9a141bf926ea..1422cd16c6c00 100644 --- a/google/cloud/securitycenter/v2/internal/security_center_stub.h +++ b/google/cloud/securitycenter/v2/internal/security_center_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_V2_INTERNAL_SECURITY_CENTER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_V2_INTERNAL_SECURITY_CENTER_STUB_H +#include "google/cloud/securitycenter/v2/securitycenter_service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycenter_v2_internal { @@ -569,4 +572,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_V2_INTERNAL_SECURITY_CENTER_STUB_H diff --git a/google/cloud/securitycenter/v2/internal/security_center_stub_factory.cc b/google/cloud/securitycenter/v2/internal/security_center_stub_factory.cc index c14c0ad6a439d..23212ee417bf0 100644 --- a/google/cloud/securitycenter/v2/internal/security_center_stub_factory.cc +++ b/google/cloud/securitycenter/v2/internal/security_center_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/securitycenter/v2/internal/security_center_metadata_decorator.h" #include "google/cloud/securitycenter/v2/internal/security_center_stub.h" #include "google/cloud/securitycenter/v2/internal/security_center_tracing_stub.h" +#include "google/cloud/securitycenter/v2/securitycenter_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycenter_v2_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace securitycenter_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/securitycenter/v2/internal/security_center_stub_factory.h b/google/cloud/securitycenter/v2/internal/security_center_stub_factory.h index d6937ee009429..fdafe25d8c59c 100644 --- a/google/cloud/securitycenter/v2/internal/security_center_stub_factory.h +++ b/google/cloud/securitycenter/v2/internal/security_center_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycenter_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_V2_INTERNAL_SECURITY_CENTER_STUB_FACTORY_H diff --git a/google/cloud/securitycenter/v2/internal/security_center_tracing_connection.cc b/google/cloud/securitycenter/v2/internal/security_center_tracing_connection.cc index 70293c612b27d..36a56aef5ba10 100644 --- a/google/cloud/securitycenter/v2/internal/security_center_tracing_connection.cc +++ b/google/cloud/securitycenter/v2/internal/security_center_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace securitycenter_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SecurityCenterTracingConnection::SecurityCenterTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -491,16 +489,12 @@ Status SecurityCenterTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSecurityCenterTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/securitycenter/v2/internal/security_center_tracing_connection.h b/google/cloud/securitycenter/v2/internal/security_center_tracing_connection.h index 85a35113c4d32..534a7c70144c7 100644 --- a/google/cloud/securitycenter/v2/internal/security_center_tracing_connection.h +++ b/google/cloud/securitycenter/v2/internal/security_center_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace securitycenter_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SecurityCenterTracingConnection : public securitycenter_v2::SecurityCenterConnection { public: @@ -236,8 +234,6 @@ class SecurityCenterTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/securitycenter/v2/internal/security_center_tracing_stub.cc b/google/cloud/securitycenter/v2/internal/security_center_tracing_stub.cc index 61263b2ebedfd..a8eff00dadfa9 100644 --- a/google/cloud/securitycenter/v2/internal/security_center_tracing_stub.cc +++ b/google/cloud/securitycenter/v2/internal/security_center_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycenter_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SecurityCenterTracingStub::SecurityCenterTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -633,18 +634,14 @@ future SecurityCenterTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSecurityCenterTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace securitycenter_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/securitycenter/v2/internal/security_center_tracing_stub.h b/google/cloud/securitycenter/v2/internal/security_center_tracing_stub.h index 5ba5c2df21fde..1a92a3fcdb3b8 100644 --- a/google/cloud/securitycenter/v2/internal/security_center_tracing_stub.h +++ b/google/cloud/securitycenter/v2/internal/security_center_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycenter_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SecurityCenterTracingStub : public SecurityCenterStub { public: ~SecurityCenterTracingStub() override = default; @@ -293,8 +294,6 @@ class SecurityCenterTracingStub : public SecurityCenterStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -309,4 +308,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_V2_INTERNAL_SECURITY_CENTER_TRACING_STUB_H diff --git a/google/cloud/securitycenter/v2/security_center_client.h b/google/cloud/securitycenter/v2/security_center_client.h index caf5b652abdf9..98b79b2f6f0d4 100644 --- a/google/cloud/securitycenter/v2/security_center_client.h +++ b/google/cloud/securitycenter/v2/security_center_client.h @@ -28,7 +28,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/securitycenter/v2/security_center_connection.h b/google/cloud/securitycenter/v2/security_center_connection.h index 6974301db8d4b..4514020b3ff78 100644 --- a/google/cloud/securitycenter/v2/security_center_connection.h +++ b/google/cloud/securitycenter/v2/security_center_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/securitycenter/v2/internal/security_center_retry_traits.h" #include "google/cloud/securitycenter/v2/security_center_connection_idempotency_policy.h" +#include "google/cloud/securitycenter/v2/securitycenter_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/securitycenter/v2/security_center_connection_idempotency_policy.h b/google/cloud/securitycenter/v2/security_center_connection_idempotency_policy.h index 874334a29dfef..607c46fd8ab65 100644 --- a/google/cloud/securitycenter/v2/security_center_connection_idempotency_policy.h +++ b/google/cloud/securitycenter/v2/security_center_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_V2_SECURITY_CENTER_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTER_V2_SECURITY_CENTER_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/securitycenter/v2/securitycenter_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/securitycentermanagement/BUILD.bazel b/google/cloud/securitycentermanagement/BUILD.bazel index f037e3967d9e5..b41b78be5efd1 100644 --- a/google/cloud/securitycentermanagement/BUILD.bazel +++ b/google/cloud/securitycentermanagement/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/securitycentermanagement/v1:securitycentermanagement_cc_grpc", + "@googleapis//google/cloud/securitycentermanagement/v1:securitycentermanagement_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/securitycentermanagement/quickstart/.bazelrc b/google/cloud/securitycentermanagement/quickstart/.bazelrc index 15d5c055db074..343e7f623d628 100644 --- a/google/cloud/securitycentermanagement/quickstart/.bazelrc +++ b/google/cloud/securitycentermanagement/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/securitycentermanagement/quickstart/CMakeLists.txt b/google/cloud/securitycentermanagement/quickstart/CMakeLists.txt index 93190c893d5c1..b804894e2267c 100644 --- a/google/cloud/securitycentermanagement/quickstart/CMakeLists.txt +++ b/google/cloud/securitycentermanagement/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Security Center Management API C++ client # library from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-securitycentermanagement-quickstart CXX) find_package(google_cloud_cpp_securitycentermanagement REQUIRED) diff --git a/google/cloud/securitycentermanagement/v1/internal/security_center_management_auth_decorator.cc b/google/cloud/securitycentermanagement/v1/internal/security_center_management_auth_decorator.cc index 64756ee568c9a..3260e79b3e947 100644 --- a/google/cloud/securitycentermanagement/v1/internal/security_center_management_auth_decorator.cc +++ b/google/cloud/securitycentermanagement/v1/internal/security_center_management_auth_decorator.cc @@ -18,10 +18,13 @@ // google/cloud/securitycentermanagement/v1/security_center_management.proto #include "google/cloud/securitycentermanagement/v1/internal/security_center_management_auth_decorator.h" -#include +#include "google/cloud/securitycentermanagement/v1/security_center_management.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycentermanagement_v1_internal { @@ -299,3 +302,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace securitycentermanagement_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/securitycentermanagement/v1/internal/security_center_management_auth_decorator.h b/google/cloud/securitycentermanagement/v1/internal/security_center_management_auth_decorator.h index 9326588f830d8..881cb403af135 100644 --- a/google/cloud/securitycentermanagement/v1/internal/security_center_management_auth_decorator.h +++ b/google/cloud/securitycentermanagement/v1/internal/security_center_management_auth_decorator.h @@ -27,6 +27,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycentermanagement_v1_internal { @@ -214,4 +217,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTERMANAGEMENT_V1_INTERNAL_SECURITY_CENTER_MANAGEMENT_AUTH_DECORATOR_H diff --git a/google/cloud/securitycentermanagement/v1/internal/security_center_management_logging_decorator.cc b/google/cloud/securitycentermanagement/v1/internal/security_center_management_logging_decorator.cc index 1aaf5ee8b9275..b4dff048a98ad 100644 --- a/google/cloud/securitycentermanagement/v1/internal/security_center_management_logging_decorator.cc +++ b/google/cloud/securitycentermanagement/v1/internal/security_center_management_logging_decorator.cc @@ -18,14 +18,17 @@ // google/cloud/securitycentermanagement/v1/security_center_management.proto #include "google/cloud/securitycentermanagement/v1/internal/security_center_management_logging_decorator.h" +#include "google/cloud/securitycentermanagement/v1/security_center_management.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycentermanagement_v1_internal { @@ -413,3 +416,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace securitycentermanagement_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/securitycentermanagement/v1/internal/security_center_management_logging_decorator.h b/google/cloud/securitycentermanagement/v1/internal/security_center_management_logging_decorator.h index ddc86a639da66..4dc1c47217dc0 100644 --- a/google/cloud/securitycentermanagement/v1/internal/security_center_management_logging_decorator.h +++ b/google/cloud/securitycentermanagement/v1/internal/security_center_management_logging_decorator.h @@ -27,6 +27,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycentermanagement_v1_internal { @@ -214,4 +217,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTERMANAGEMENT_V1_INTERNAL_SECURITY_CENTER_MANAGEMENT_LOGGING_DECORATOR_H diff --git a/google/cloud/securitycentermanagement/v1/internal/security_center_management_metadata_decorator.cc b/google/cloud/securitycentermanagement/v1/internal/security_center_management_metadata_decorator.cc index 1b502638ebadf..f93a3eb0497ec 100644 --- a/google/cloud/securitycentermanagement/v1/internal/security_center_management_metadata_decorator.cc +++ b/google/cloud/securitycentermanagement/v1/internal/security_center_management_metadata_decorator.cc @@ -18,17 +18,21 @@ // google/cloud/securitycentermanagement/v1/security_center_management.proto #include "google/cloud/securitycentermanagement/v1/internal/security_center_management_metadata_decorator.h" +#include "google/cloud/securitycentermanagement/v1/security_center_management.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycentermanagement_v1_internal { @@ -342,3 +346,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace securitycentermanagement_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/securitycentermanagement/v1/internal/security_center_management_metadata_decorator.h b/google/cloud/securitycentermanagement/v1/internal/security_center_management_metadata_decorator.h index 984498c2d93f7..ce81d7eda60c6 100644 --- a/google/cloud/securitycentermanagement/v1/internal/security_center_management_metadata_decorator.h +++ b/google/cloud/securitycentermanagement/v1/internal/security_center_management_metadata_decorator.h @@ -27,6 +27,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycentermanagement_v1_internal { @@ -220,4 +223,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTERMANAGEMENT_V1_INTERNAL_SECURITY_CENTER_MANAGEMENT_METADATA_DECORATOR_H diff --git a/google/cloud/securitycentermanagement/v1/internal/security_center_management_option_defaults.cc b/google/cloud/securitycentermanagement/v1/internal/security_center_management_option_defaults.cc index b4a97ebfa3592..72c5a2549cb6f 100644 --- a/google/cloud/securitycentermanagement/v1/internal/security_center_management_option_defaults.cc +++ b/google/cloud/securitycentermanagement/v1/internal/security_center_management_option_defaults.cc @@ -47,7 +47,7 @@ Options SecurityCenterManagementDefaultOptions(Options options) { securitycentermanagement_v1::SecurityCenterManagementRetryPolicyOption>( securitycentermanagement_v1:: SecurityCenterManagementLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycentermanagement_v1_internal { @@ -400,3 +403,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace securitycentermanagement_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/securitycentermanagement/v1/internal/security_center_management_stub.h b/google/cloud/securitycentermanagement/v1/internal/security_center_management_stub.h index 4056c591eb945..b9ce230be5444 100644 --- a/google/cloud/securitycentermanagement/v1/internal/security_center_management_stub.h +++ b/google/cloud/securitycentermanagement/v1/internal/security_center_management_stub.h @@ -20,14 +20,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTERMANAGEMENT_V1_INTERNAL_SECURITY_CENTER_MANAGEMENT_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTERMANAGEMENT_V1_INTERNAL_SECURITY_CENTER_MANAGEMENT_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/securitycentermanagement/v1/security_center_management.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycentermanagement_v1_internal { @@ -389,4 +392,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTERMANAGEMENT_V1_INTERNAL_SECURITY_CENTER_MANAGEMENT_STUB_H diff --git a/google/cloud/securitycentermanagement/v1/internal/security_center_management_stub_factory.cc b/google/cloud/securitycentermanagement/v1/internal/security_center_management_stub_factory.cc index 4eb0865866361..420f18ca676c6 100644 --- a/google/cloud/securitycentermanagement/v1/internal/security_center_management_stub_factory.cc +++ b/google/cloud/securitycentermanagement/v1/internal/security_center_management_stub_factory.cc @@ -18,22 +18,25 @@ // google/cloud/securitycentermanagement/v1/security_center_management.proto #include "google/cloud/securitycentermanagement/v1/internal/security_center_management_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/securitycentermanagement/v1/internal/security_center_management_auth_decorator.h" #include "google/cloud/securitycentermanagement/v1/internal/security_center_management_logging_decorator.h" #include "google/cloud/securitycentermanagement/v1/internal/security_center_management_metadata_decorator.h" #include "google/cloud/securitycentermanagement/v1/internal/security_center_management_stub.h" #include "google/cloud/securitycentermanagement/v1/internal/security_center_management_tracing_stub.h" +#include "google/cloud/securitycentermanagement/v1/security_center_management.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycentermanagement_v1_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace securitycentermanagement_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/securitycentermanagement/v1/internal/security_center_management_stub_factory.h b/google/cloud/securitycentermanagement/v1/internal/security_center_management_stub_factory.h index b300af54f0fd7..571c21d50e71d 100644 --- a/google/cloud/securitycentermanagement/v1/internal/security_center_management_stub_factory.h +++ b/google/cloud/securitycentermanagement/v1/internal/security_center_management_stub_factory.h @@ -26,6 +26,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycentermanagement_v1_internal { @@ -41,4 +44,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTERMANAGEMENT_V1_INTERNAL_SECURITY_CENTER_MANAGEMENT_STUB_FACTORY_H diff --git a/google/cloud/securitycentermanagement/v1/internal/security_center_management_tracing_connection.cc b/google/cloud/securitycentermanagement/v1/internal/security_center_management_tracing_connection.cc index 7f853dbbd7807..260c33d8eabfe 100644 --- a/google/cloud/securitycentermanagement/v1/internal/security_center_management_tracing_connection.cc +++ b/google/cloud/securitycentermanagement/v1/internal/security_center_management_tracing_connection.cc @@ -28,8 +28,6 @@ namespace cloud { namespace securitycentermanagement_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SecurityCenterManagementTracingConnection:: SecurityCenterManagementTracingConnection( std::shared_ptr< @@ -363,19 +361,15 @@ SecurityCenterManagementTracingConnection::GetLocation( return internal::EndSpan(*span, child_->GetLocation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSecurityCenterManagementTracingConnection( std::shared_ptr< securitycentermanagement_v1::SecurityCenterManagementConnection> conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/securitycentermanagement/v1/internal/security_center_management_tracing_connection.h b/google/cloud/securitycentermanagement/v1/internal/security_center_management_tracing_connection.h index 4ad2407574b9a..810eea10e7e5e 100644 --- a/google/cloud/securitycentermanagement/v1/internal/security_center_management_tracing_connection.h +++ b/google/cloud/securitycentermanagement/v1/internal/security_center_management_tracing_connection.h @@ -29,8 +29,6 @@ namespace cloud { namespace securitycentermanagement_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SecurityCenterManagementTracingConnection : public securitycentermanagement_v1::SecurityCenterManagementConnection { public: @@ -190,8 +188,6 @@ class SecurityCenterManagementTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/securitycentermanagement/v1/internal/security_center_management_tracing_stub.cc b/google/cloud/securitycentermanagement/v1/internal/security_center_management_tracing_stub.cc index c2ccbb580b421..c5e5d43bbdd69 100644 --- a/google/cloud/securitycentermanagement/v1/internal/security_center_management_tracing_stub.cc +++ b/google/cloud/securitycentermanagement/v1/internal/security_center_management_tracing_stub.cc @@ -22,13 +22,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycentermanagement_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SecurityCenterManagementTracingStub::SecurityCenterManagementTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -409,19 +410,15 @@ SecurityCenterManagementTracingStub::GetLocation( child_->GetLocation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSecurityCenterManagementTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace securitycentermanagement_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/securitycentermanagement/v1/internal/security_center_management_tracing_stub.h b/google/cloud/securitycentermanagement/v1/internal/security_center_management_tracing_stub.h index 80d28004c4b08..a0179ce6697ff 100644 --- a/google/cloud/securitycentermanagement/v1/internal/security_center_management_tracing_stub.h +++ b/google/cloud/securitycentermanagement/v1/internal/security_center_management_tracing_stub.h @@ -26,13 +26,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace securitycentermanagement_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SecurityCenterManagementTracingStub : public SecurityCenterManagementStub { public: @@ -212,8 +213,6 @@ class SecurityCenterManagementTracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -229,4 +228,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTERMANAGEMENT_V1_INTERNAL_SECURITY_CENTER_MANAGEMENT_TRACING_STUB_H diff --git a/google/cloud/securitycentermanagement/v1/security_center_management_connection.h b/google/cloud/securitycentermanagement/v1/security_center_management_connection.h index 27a78128e5bc0..0badebea49bc3 100644 --- a/google/cloud/securitycentermanagement/v1/security_center_management_connection.h +++ b/google/cloud/securitycentermanagement/v1/security_center_management_connection.h @@ -21,6 +21,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTERMANAGEMENT_V1_SECURITY_CENTER_MANAGEMENT_CONNECTION_H #include "google/cloud/securitycentermanagement/v1/internal/security_center_management_retry_traits.h" +#include "google/cloud/securitycentermanagement/v1/security_center_management.pb.h" #include "google/cloud/securitycentermanagement/v1/security_center_management_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -28,7 +29,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/securitycentermanagement/v1/security_center_management_connection_idempotency_policy.h b/google/cloud/securitycentermanagement/v1/security_center_management_connection_idempotency_policy.h index 27315750d8ca0..70c2dbb7de93b 100644 --- a/google/cloud/securitycentermanagement/v1/security_center_management_connection_idempotency_policy.h +++ b/google/cloud/securitycentermanagement/v1/security_center_management_connection_idempotency_policy.h @@ -20,10 +20,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTERMANAGEMENT_V1_SECURITY_CENTER_MANAGEMENT_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SECURITYCENTERMANAGEMENT_V1_SECURITY_CENTER_MANAGEMENT_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/securitycentermanagement/v1/security_center_management.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/servicecontrol/BUILD.bazel b/google/cloud/servicecontrol/BUILD.bazel index 8528b124568e9..7e4932e01f526 100644 --- a/google/cloud/servicecontrol/BUILD.bazel +++ b/google/cloud/servicecontrol/BUILD.bazel @@ -19,14 +19,13 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", "v2/", ] googleapis_deps = [ - "@com_google_googleapis//google/api/servicecontrol/v1:servicecontrol_cc_grpc", - "@com_google_googleapis//google/api/servicecontrol/v2:servicecontrol_cc_grpc", + "@googleapis//google/api/servicecontrol/v1:servicecontrol_cc_grpc", + "@googleapis//google/api/servicecontrol/v2:servicecontrol_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/servicecontrol/CMakeLists.txt b/google/cloud/servicecontrol/CMakeLists.txt index 1de3dd070c93c..1ef6771458560 100644 --- a/google/cloud/servicecontrol/CMakeLists.txt +++ b/google/cloud/servicecontrol/CMakeLists.txt @@ -18,7 +18,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library( servicecontrol "Service Control API" - SERVICE_DIRS "__EMPTY__" "v1/" "v2/" + SERVICE_DIRS "v1/" "v2/" SHARED_PROTO_DEPS "logging_type") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) diff --git a/google/cloud/servicecontrol/mocks/mock_quota_controller_connection.h b/google/cloud/servicecontrol/mocks/mock_quota_controller_connection.h deleted file mode 100644 index 66a53c09a492f..0000000000000 --- a/google/cloud/servicecontrol/mocks/mock_quota_controller_connection.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/api/servicecontrol/v1/quota_controller.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_MOCKS_MOCK_QUOTA_CONTROLLER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_MOCKS_MOCK_QUOTA_CONTROLLER_CONNECTION_H - -#include "google/cloud/servicecontrol/quota_controller_connection.h" -#include "google/cloud/servicecontrol/v1/mocks/mock_quota_controller_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in servicecontrol_v1_mocks instead of the aliases -/// defined in this namespace. -namespace servicecontrol_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use servicecontrol_v1_mocks::MockQuotaControllerConnection -/// directly. -using ::google::cloud::servicecontrol_v1_mocks::MockQuotaControllerConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace servicecontrol_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_MOCKS_MOCK_QUOTA_CONTROLLER_CONNECTION_H diff --git a/google/cloud/servicecontrol/mocks/mock_service_controller_connection.h b/google/cloud/servicecontrol/mocks/mock_service_controller_connection.h deleted file mode 100644 index f2be921e7aae5..0000000000000 --- a/google/cloud/servicecontrol/mocks/mock_service_controller_connection.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/api/servicecontrol/v1/service_controller.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_MOCKS_MOCK_SERVICE_CONTROLLER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_MOCKS_MOCK_SERVICE_CONTROLLER_CONNECTION_H - -#include "google/cloud/servicecontrol/service_controller_connection.h" -#include "google/cloud/servicecontrol/v1/mocks/mock_service_controller_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in servicecontrol_v1_mocks instead of the aliases -/// defined in this namespace. -namespace servicecontrol_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use servicecontrol_v1_mocks::MockServiceControllerConnection -/// directly. -using ::google::cloud::servicecontrol_v1_mocks::MockServiceControllerConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace servicecontrol_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_MOCKS_MOCK_SERVICE_CONTROLLER_CONNECTION_H diff --git a/google/cloud/servicecontrol/quickstart/.bazelrc b/google/cloud/servicecontrol/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/servicecontrol/quickstart/.bazelrc +++ b/google/cloud/servicecontrol/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/servicecontrol/quickstart/CMakeLists.txt b/google/cloud/servicecontrol/quickstart/CMakeLists.txt index 1fa110a7c3969..a5262c538242e 100644 --- a/google/cloud/servicecontrol/quickstart/CMakeLists.txt +++ b/google/cloud/servicecontrol/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Service Control API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-servicecontrol-quickstart CXX) find_package(google_cloud_cpp_servicecontrol REQUIRED) diff --git a/google/cloud/servicecontrol/quota_controller_client.h b/google/cloud/servicecontrol/quota_controller_client.h deleted file mode 100644 index f9232cc134f04..0000000000000 --- a/google/cloud/servicecontrol/quota_controller_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/api/servicecontrol/v1/quota_controller.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_QUOTA_CONTROLLER_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_QUOTA_CONTROLLER_CLIENT_H - -#include "google/cloud/servicecontrol/quota_controller_connection.h" -#include "google/cloud/servicecontrol/v1/quota_controller_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in servicecontrol_v1 instead of the aliases defined in -/// this namespace. -namespace servicecontrol { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use servicecontrol_v1::QuotaControllerClient directly. -using ::google::cloud::servicecontrol_v1::QuotaControllerClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace servicecontrol -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_QUOTA_CONTROLLER_CLIENT_H diff --git a/google/cloud/servicecontrol/quota_controller_connection.h b/google/cloud/servicecontrol/quota_controller_connection.h deleted file mode 100644 index 2e4bf51ca4e15..0000000000000 --- a/google/cloud/servicecontrol/quota_controller_connection.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/api/servicecontrol/v1/quota_controller.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_QUOTA_CONTROLLER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_QUOTA_CONTROLLER_CONNECTION_H - -#include "google/cloud/servicecontrol/quota_controller_connection_idempotency_policy.h" -#include "google/cloud/servicecontrol/v1/quota_controller_connection.h" - -namespace google { -namespace cloud { -namespace servicecontrol { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use servicecontrol_v1::MakeQuotaControllerConnection directly. -using ::google::cloud::servicecontrol_v1::MakeQuotaControllerConnection; - -/// @deprecated Use servicecontrol_v1::QuotaControllerConnection directly. -using ::google::cloud::servicecontrol_v1::QuotaControllerConnection; - -/// @deprecated Use -/// servicecontrol_v1::QuotaControllerLimitedErrorCountRetryPolicy directly. -using ::google::cloud::servicecontrol_v1:: - QuotaControllerLimitedErrorCountRetryPolicy; - -/// @deprecated Use servicecontrol_v1::QuotaControllerLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::servicecontrol_v1::QuotaControllerLimitedTimeRetryPolicy; - -/// @deprecated Use servicecontrol_v1::QuotaControllerRetryPolicy directly. -using ::google::cloud::servicecontrol_v1::QuotaControllerRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace servicecontrol -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_QUOTA_CONTROLLER_CONNECTION_H diff --git a/google/cloud/servicecontrol/quota_controller_connection_idempotency_policy.h b/google/cloud/servicecontrol/quota_controller_connection_idempotency_policy.h deleted file mode 100644 index 6057a64f04029..0000000000000 --- a/google/cloud/servicecontrol/quota_controller_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/api/servicecontrol/v1/quota_controller.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_QUOTA_CONTROLLER_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_QUOTA_CONTROLLER_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/servicecontrol/v1/quota_controller_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace servicecontrol { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// servicecontrol_v1::MakeDefaultQuotaControllerConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::servicecontrol_v1:: - MakeDefaultQuotaControllerConnectionIdempotencyPolicy; - -/// @deprecated Use -/// servicecontrol_v1::QuotaControllerConnectionIdempotencyPolicy directly. -using ::google::cloud::servicecontrol_v1:: - QuotaControllerConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace servicecontrol -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_QUOTA_CONTROLLER_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/servicecontrol/quota_controller_options.h b/google/cloud/servicecontrol/quota_controller_options.h deleted file mode 100644 index 57163ffd6b3a9..0000000000000 --- a/google/cloud/servicecontrol/quota_controller_options.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/api/servicecontrol/v1/quota_controller.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_QUOTA_CONTROLLER_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_QUOTA_CONTROLLER_OPTIONS_H - -#include "google/cloud/servicecontrol/quota_controller_connection.h" -#include "google/cloud/servicecontrol/quota_controller_connection_idempotency_policy.h" -#include "google/cloud/servicecontrol/v1/quota_controller_options.h" - -namespace google { -namespace cloud { -namespace servicecontrol { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use servicecontrol_v1::QuotaControllerBackoffPolicyOption -/// directly. -using ::google::cloud::servicecontrol_v1::QuotaControllerBackoffPolicyOption; - -/// @deprecated Use -/// servicecontrol_v1::QuotaControllerConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::servicecontrol_v1:: - QuotaControllerConnectionIdempotencyPolicyOption; - -/// @deprecated Use servicecontrol_v1::QuotaControllerPolicyOptionList directly. -using ::google::cloud::servicecontrol_v1::QuotaControllerPolicyOptionList; - -/// @deprecated Use servicecontrol_v1::QuotaControllerRetryPolicyOption -/// directly. -using ::google::cloud::servicecontrol_v1::QuotaControllerRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace servicecontrol -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_QUOTA_CONTROLLER_OPTIONS_H diff --git a/google/cloud/servicecontrol/service_controller_client.h b/google/cloud/servicecontrol/service_controller_client.h deleted file mode 100644 index de75e6543334d..0000000000000 --- a/google/cloud/servicecontrol/service_controller_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/api/servicecontrol/v1/service_controller.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_SERVICE_CONTROLLER_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_SERVICE_CONTROLLER_CLIENT_H - -#include "google/cloud/servicecontrol/service_controller_connection.h" -#include "google/cloud/servicecontrol/v1/service_controller_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in servicecontrol_v1 instead of the aliases defined in -/// this namespace. -namespace servicecontrol { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use servicecontrol_v1::ServiceControllerClient directly. -using ::google::cloud::servicecontrol_v1::ServiceControllerClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace servicecontrol -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_SERVICE_CONTROLLER_CLIENT_H diff --git a/google/cloud/servicecontrol/service_controller_connection.h b/google/cloud/servicecontrol/service_controller_connection.h deleted file mode 100644 index 28f05228809d9..0000000000000 --- a/google/cloud/servicecontrol/service_controller_connection.h +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/api/servicecontrol/v1/service_controller.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_SERVICE_CONTROLLER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_SERVICE_CONTROLLER_CONNECTION_H - -#include "google/cloud/servicecontrol/service_controller_connection_idempotency_policy.h" -#include "google/cloud/servicecontrol/v1/service_controller_connection.h" - -namespace google { -namespace cloud { -namespace servicecontrol { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use servicecontrol_v1::MakeServiceControllerConnection directly. -using ::google::cloud::servicecontrol_v1::MakeServiceControllerConnection; - -/// @deprecated Use servicecontrol_v1::ServiceControllerConnection directly. -using ::google::cloud::servicecontrol_v1::ServiceControllerConnection; - -/// @deprecated Use -/// servicecontrol_v1::ServiceControllerLimitedErrorCountRetryPolicy directly. -using ::google::cloud::servicecontrol_v1:: - ServiceControllerLimitedErrorCountRetryPolicy; - -/// @deprecated Use servicecontrol_v1::ServiceControllerLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::servicecontrol_v1:: - ServiceControllerLimitedTimeRetryPolicy; - -/// @deprecated Use servicecontrol_v1::ServiceControllerRetryPolicy directly. -using ::google::cloud::servicecontrol_v1::ServiceControllerRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace servicecontrol -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_SERVICE_CONTROLLER_CONNECTION_H diff --git a/google/cloud/servicecontrol/service_controller_connection_idempotency_policy.h b/google/cloud/servicecontrol/service_controller_connection_idempotency_policy.h deleted file mode 100644 index e91ab5a25823f..0000000000000 --- a/google/cloud/servicecontrol/service_controller_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/api/servicecontrol/v1/service_controller.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_SERVICE_CONTROLLER_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_SERVICE_CONTROLLER_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/servicecontrol/v1/service_controller_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace servicecontrol { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// servicecontrol_v1::MakeDefaultServiceControllerConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::servicecontrol_v1:: - MakeDefaultServiceControllerConnectionIdempotencyPolicy; - -/// @deprecated Use -/// servicecontrol_v1::ServiceControllerConnectionIdempotencyPolicy directly. -using ::google::cloud::servicecontrol_v1:: - ServiceControllerConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace servicecontrol -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_SERVICE_CONTROLLER_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/servicecontrol/service_controller_options.h b/google/cloud/servicecontrol/service_controller_options.h deleted file mode 100644 index 70ef1613e5ea1..0000000000000 --- a/google/cloud/servicecontrol/service_controller_options.h +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/api/servicecontrol/v1/service_controller.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_SERVICE_CONTROLLER_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_SERVICE_CONTROLLER_OPTIONS_H - -#include "google/cloud/servicecontrol/service_controller_connection.h" -#include "google/cloud/servicecontrol/service_controller_connection_idempotency_policy.h" -#include "google/cloud/servicecontrol/v1/service_controller_options.h" - -namespace google { -namespace cloud { -namespace servicecontrol { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use servicecontrol_v1::ServiceControllerBackoffPolicyOption -/// directly. -using ::google::cloud::servicecontrol_v1::ServiceControllerBackoffPolicyOption; - -/// @deprecated Use -/// servicecontrol_v1::ServiceControllerConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::servicecontrol_v1:: - ServiceControllerConnectionIdempotencyPolicyOption; - -/// @deprecated Use servicecontrol_v1::ServiceControllerPolicyOptionList -/// directly. -using ::google::cloud::servicecontrol_v1::ServiceControllerPolicyOptionList; - -/// @deprecated Use servicecontrol_v1::ServiceControllerRetryPolicyOption -/// directly. -using ::google::cloud::servicecontrol_v1::ServiceControllerRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace servicecontrol -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_SERVICE_CONTROLLER_OPTIONS_H diff --git a/google/cloud/servicecontrol/v1/internal/quota_controller_auth_decorator.cc b/google/cloud/servicecontrol/v1/internal/quota_controller_auth_decorator.cc index d3ffdec0c7ec6..5393ef42e31ec 100644 --- a/google/cloud/servicecontrol/v1/internal/quota_controller_auth_decorator.cc +++ b/google/cloud/servicecontrol/v1/internal/quota_controller_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/api/servicecontrol/v1/quota_controller.proto #include "google/cloud/servicecontrol/v1/internal/quota_controller_auth_decorator.h" -#include +#include "google/api/servicecontrol/v1/quota_controller.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v1_internal { @@ -44,3 +47,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicecontrol_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicecontrol/v1/internal/quota_controller_auth_decorator.h b/google/cloud/servicecontrol/v1/internal/quota_controller_auth_decorator.h index 6ffcfedcf0cec..5e0e4ce240ce8 100644 --- a/google/cloud/servicecontrol/v1/internal/quota_controller_auth_decorator.h +++ b/google/cloud/servicecontrol/v1/internal/quota_controller_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v1_internal { @@ -53,4 +56,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_V1_INTERNAL_QUOTA_CONTROLLER_AUTH_DECORATOR_H diff --git a/google/cloud/servicecontrol/v1/internal/quota_controller_logging_decorator.cc b/google/cloud/servicecontrol/v1/internal/quota_controller_logging_decorator.cc index 1e58504250c10..7a2ec3eec0545 100644 --- a/google/cloud/servicecontrol/v1/internal/quota_controller_logging_decorator.cc +++ b/google/cloud/servicecontrol/v1/internal/quota_controller_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/servicecontrol/v1/internal/quota_controller_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/api/servicecontrol/v1/quota_controller.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v1_internal { @@ -52,3 +55,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicecontrol_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicecontrol/v1/internal/quota_controller_logging_decorator.h b/google/cloud/servicecontrol/v1/internal/quota_controller_logging_decorator.h index 80bdf2568ea00..3649b3a057288 100644 --- a/google/cloud/servicecontrol/v1/internal/quota_controller_logging_decorator.h +++ b/google/cloud/servicecontrol/v1/internal/quota_controller_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v1_internal { @@ -53,4 +56,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_V1_INTERNAL_QUOTA_CONTROLLER_LOGGING_DECORATOR_H diff --git a/google/cloud/servicecontrol/v1/internal/quota_controller_metadata_decorator.cc b/google/cloud/servicecontrol/v1/internal/quota_controller_metadata_decorator.cc index fd70f2d356165..03dda0ca3d347 100644 --- a/google/cloud/servicecontrol/v1/internal/quota_controller_metadata_decorator.cc +++ b/google/cloud/servicecontrol/v1/internal/quota_controller_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/servicecontrol/v1/internal/quota_controller_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/api/servicecontrol/v1/quota_controller.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v1_internal { @@ -71,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicecontrol_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicecontrol/v1/internal/quota_controller_metadata_decorator.h b/google/cloud/servicecontrol/v1/internal/quota_controller_metadata_decorator.h index 4e6622be47208..c4cabd1ee631a 100644 --- a/google/cloud/servicecontrol/v1/internal/quota_controller_metadata_decorator.h +++ b/google/cloud/servicecontrol/v1/internal/quota_controller_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v1_internal { @@ -59,4 +62,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_V1_INTERNAL_QUOTA_CONTROLLER_METADATA_DECORATOR_H diff --git a/google/cloud/servicecontrol/v1/internal/quota_controller_option_defaults.cc b/google/cloud/servicecontrol/v1/internal/quota_controller_option_defaults.cc index 22ed8af7c4c58..a39218fd91505 100644 --- a/google/cloud/servicecontrol/v1/internal/quota_controller_option_defaults.cc +++ b/google/cloud/servicecontrol/v1/internal/quota_controller_option_defaults.cc @@ -42,7 +42,7 @@ Options QuotaControllerDefaultOptions(Options options) { if (!options.has()) { options.set( servicecontrol_v1::QuotaControllerLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/servicecontrol/v1/internal/quota_controller_stub.cc b/google/cloud/servicecontrol/v1/internal/quota_controller_stub.cc index 79f264de8338e..622577c24e700 100644 --- a/google/cloud/servicecontrol/v1/internal/quota_controller_stub.cc +++ b/google/cloud/servicecontrol/v1/internal/quota_controller_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/servicecontrol/v1/internal/quota_controller_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "google/api/servicecontrol/v1/quota_controller.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v1_internal { @@ -46,3 +49,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicecontrol_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicecontrol/v1/internal/quota_controller_stub.h b/google/cloud/servicecontrol/v1/internal/quota_controller_stub.h index 525fc5ad79279..0f2e5266b2755 100644 --- a/google/cloud/servicecontrol/v1/internal/quota_controller_stub.h +++ b/google/cloud/servicecontrol/v1/internal/quota_controller_stub.h @@ -22,10 +22,13 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/api/servicecontrol/v1/quota_controller.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v1_internal { @@ -65,4 +68,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_V1_INTERNAL_QUOTA_CONTROLLER_STUB_H diff --git a/google/cloud/servicecontrol/v1/internal/quota_controller_stub_factory.cc b/google/cloud/servicecontrol/v1/internal/quota_controller_stub_factory.cc index ca96e63a68a85..3fd68f424838f 100644 --- a/google/cloud/servicecontrol/v1/internal/quota_controller_stub_factory.cc +++ b/google/cloud/servicecontrol/v1/internal/quota_controller_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/api/servicecontrol/v1/quota_controller.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v1_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicecontrol_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicecontrol/v1/internal/quota_controller_stub_factory.h b/google/cloud/servicecontrol/v1/internal/quota_controller_stub_factory.h index b14b887fea68d..d0c272bcfc55d 100644 --- a/google/cloud/servicecontrol/v1/internal/quota_controller_stub_factory.h +++ b/google/cloud/servicecontrol/v1/internal/quota_controller_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_V1_INTERNAL_QUOTA_CONTROLLER_STUB_FACTORY_H diff --git a/google/cloud/servicecontrol/v1/internal/quota_controller_tracing_connection.cc b/google/cloud/servicecontrol/v1/internal/quota_controller_tracing_connection.cc index 25bf47b2c8400..44e7063d066a0 100644 --- a/google/cloud/servicecontrol/v1/internal/quota_controller_tracing_connection.cc +++ b/google/cloud/servicecontrol/v1/internal/quota_controller_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace servicecontrol_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - QuotaControllerTracingConnection::QuotaControllerTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -41,16 +39,12 @@ QuotaControllerTracingConnection::AllocateQuota( return internal::EndSpan(*span, child_->AllocateQuota(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeQuotaControllerTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/servicecontrol/v1/internal/quota_controller_tracing_connection.h b/google/cloud/servicecontrol/v1/internal/quota_controller_tracing_connection.h index 756b95cec530e..5fcec6d74a836 100644 --- a/google/cloud/servicecontrol/v1/internal/quota_controller_tracing_connection.h +++ b/google/cloud/servicecontrol/v1/internal/quota_controller_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace servicecontrol_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class QuotaControllerTracingConnection : public servicecontrol_v1::QuotaControllerConnection { public: @@ -48,8 +46,6 @@ class QuotaControllerTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/servicecontrol/v1/internal/quota_controller_tracing_stub.cc b/google/cloud/servicecontrol/v1/internal/quota_controller_tracing_stub.cc index c657c5a1189b5..7dc0a1980c57b 100644 --- a/google/cloud/servicecontrol/v1/internal/quota_controller_tracing_stub.cc +++ b/google/cloud/servicecontrol/v1/internal/quota_controller_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - QuotaControllerTracingStub::QuotaControllerTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -44,18 +45,14 @@ QuotaControllerTracingStub::AllocateQuota( child_->AllocateQuota(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeQuotaControllerTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicecontrol_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicecontrol/v1/internal/quota_controller_tracing_stub.h b/google/cloud/servicecontrol/v1/internal/quota_controller_tracing_stub.h index 93ee960667cf5..e9ab5b39f6da2 100644 --- a/google/cloud/servicecontrol/v1/internal/quota_controller_tracing_stub.h +++ b/google/cloud/servicecontrol/v1/internal/quota_controller_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class QuotaControllerTracingStub : public QuotaControllerStub { public: ~QuotaControllerTracingStub() override = default; @@ -50,8 +51,6 @@ class QuotaControllerTracingStub : public QuotaControllerStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -66,4 +65,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_V1_INTERNAL_QUOTA_CONTROLLER_TRACING_STUB_H diff --git a/google/cloud/servicecontrol/v1/internal/service_controller_auth_decorator.cc b/google/cloud/servicecontrol/v1/internal/service_controller_auth_decorator.cc index 3c8350d354d1f..d8d9ebb51e4fa 100644 --- a/google/cloud/servicecontrol/v1/internal/service_controller_auth_decorator.cc +++ b/google/cloud/servicecontrol/v1/internal/service_controller_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/api/servicecontrol/v1/service_controller.proto #include "google/cloud/servicecontrol/v1/internal/service_controller_auth_decorator.h" -#include +#include "google/api/servicecontrol/v1/service_controller.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v1_internal { @@ -53,3 +56,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicecontrol_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicecontrol/v1/internal/service_controller_auth_decorator.h b/google/cloud/servicecontrol/v1/internal/service_controller_auth_decorator.h index 5580768317de8..a29f97807d6be 100644 --- a/google/cloud/servicecontrol/v1/internal/service_controller_auth_decorator.h +++ b/google/cloud/servicecontrol/v1/internal/service_controller_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v1_internal { @@ -56,4 +59,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_V1_INTERNAL_SERVICE_CONTROLLER_AUTH_DECORATOR_H diff --git a/google/cloud/servicecontrol/v1/internal/service_controller_logging_decorator.cc b/google/cloud/servicecontrol/v1/internal/service_controller_logging_decorator.cc index c8a06b4ab41ac..0f845d01dcbee 100644 --- a/google/cloud/servicecontrol/v1/internal/service_controller_logging_decorator.cc +++ b/google/cloud/servicecontrol/v1/internal/service_controller_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/servicecontrol/v1/internal/service_controller_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/api/servicecontrol/v1/service_controller.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v1_internal { @@ -63,3 +66,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicecontrol_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicecontrol/v1/internal/service_controller_logging_decorator.h b/google/cloud/servicecontrol/v1/internal/service_controller_logging_decorator.h index b940a52839c2a..c55929c58faaa 100644 --- a/google/cloud/servicecontrol/v1/internal/service_controller_logging_decorator.h +++ b/google/cloud/servicecontrol/v1/internal/service_controller_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v1_internal { @@ -56,4 +59,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_V1_INTERNAL_SERVICE_CONTROLLER_LOGGING_DECORATOR_H diff --git a/google/cloud/servicecontrol/v1/internal/service_controller_metadata_decorator.cc b/google/cloud/servicecontrol/v1/internal/service_controller_metadata_decorator.cc index 2f97c190ba7b1..5f639a58a8432 100644 --- a/google/cloud/servicecontrol/v1/internal/service_controller_metadata_decorator.cc +++ b/google/cloud/servicecontrol/v1/internal/service_controller_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/servicecontrol/v1/internal/service_controller_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/api/servicecontrol/v1/service_controller.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v1_internal { @@ -81,3 +85,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicecontrol_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicecontrol/v1/internal/service_controller_metadata_decorator.h b/google/cloud/servicecontrol/v1/internal/service_controller_metadata_decorator.h index 6f0a9355e594d..72c485b1abf1d 100644 --- a/google/cloud/servicecontrol/v1/internal/service_controller_metadata_decorator.h +++ b/google/cloud/servicecontrol/v1/internal/service_controller_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v1_internal { @@ -62,4 +65,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_V1_INTERNAL_SERVICE_CONTROLLER_METADATA_DECORATOR_H diff --git a/google/cloud/servicecontrol/v1/internal/service_controller_option_defaults.cc b/google/cloud/servicecontrol/v1/internal/service_controller_option_defaults.cc index 81144d5249673..1d94e26822cd8 100644 --- a/google/cloud/servicecontrol/v1/internal/service_controller_option_defaults.cc +++ b/google/cloud/servicecontrol/v1/internal/service_controller_option_defaults.cc @@ -42,7 +42,7 @@ Options ServiceControllerDefaultOptions(Options options) { if (!options.has()) { options.set( servicecontrol_v1::ServiceControllerLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/servicecontrol/v1/internal/service_controller_stub.cc b/google/cloud/servicecontrol/v1/internal/service_controller_stub.cc index 65f4340cd1017..9a1409b1c9644 100644 --- a/google/cloud/servicecontrol/v1/internal/service_controller_stub.cc +++ b/google/cloud/servicecontrol/v1/internal/service_controller_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/servicecontrol/v1/internal/service_controller_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "google/api/servicecontrol/v1/service_controller.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v1_internal { @@ -58,3 +61,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicecontrol_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicecontrol/v1/internal/service_controller_stub.h b/google/cloud/servicecontrol/v1/internal/service_controller_stub.h index 8a5aef06d1de1..f62940603fcd3 100644 --- a/google/cloud/servicecontrol/v1/internal/service_controller_stub.h +++ b/google/cloud/servicecontrol/v1/internal/service_controller_stub.h @@ -22,10 +22,13 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/api/servicecontrol/v1/service_controller.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v1_internal { @@ -71,4 +74,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_V1_INTERNAL_SERVICE_CONTROLLER_STUB_H diff --git a/google/cloud/servicecontrol/v1/internal/service_controller_stub_factory.cc b/google/cloud/servicecontrol/v1/internal/service_controller_stub_factory.cc index 548cd5573897d..74110803690cb 100644 --- a/google/cloud/servicecontrol/v1/internal/service_controller_stub_factory.cc +++ b/google/cloud/servicecontrol/v1/internal/service_controller_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/api/servicecontrol/v1/service_controller.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v1_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicecontrol_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicecontrol/v1/internal/service_controller_stub_factory.h b/google/cloud/servicecontrol/v1/internal/service_controller_stub_factory.h index e0b1a9313fb64..737b739c4b4a4 100644 --- a/google/cloud/servicecontrol/v1/internal/service_controller_stub_factory.h +++ b/google/cloud/servicecontrol/v1/internal/service_controller_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_V1_INTERNAL_SERVICE_CONTROLLER_STUB_FACTORY_H diff --git a/google/cloud/servicecontrol/v1/internal/service_controller_tracing_connection.cc b/google/cloud/servicecontrol/v1/internal/service_controller_tracing_connection.cc index c9c99834bd059..aa4b8b9690109 100644 --- a/google/cloud/servicecontrol/v1/internal/service_controller_tracing_connection.cc +++ b/google/cloud/servicecontrol/v1/internal/service_controller_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace servicecontrol_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ServiceControllerTracingConnection::ServiceControllerTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -50,17 +48,13 @@ ServiceControllerTracingConnection::Report( return internal::EndSpan(*span, child_->Report(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeServiceControllerTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/servicecontrol/v1/internal/service_controller_tracing_connection.h b/google/cloud/servicecontrol/v1/internal/service_controller_tracing_connection.h index 9965ea39798ee..5be2d90af403e 100644 --- a/google/cloud/servicecontrol/v1/internal/service_controller_tracing_connection.h +++ b/google/cloud/servicecontrol/v1/internal/service_controller_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace servicecontrol_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ServiceControllerTracingConnection : public servicecontrol_v1::ServiceControllerConnection { public: @@ -50,8 +48,6 @@ class ServiceControllerTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/servicecontrol/v1/internal/service_controller_tracing_stub.cc b/google/cloud/servicecontrol/v1/internal/service_controller_tracing_stub.cc index d1a0404904110..44d5bf677a2bb 100644 --- a/google/cloud/servicecontrol/v1/internal/service_controller_tracing_stub.cc +++ b/google/cloud/servicecontrol/v1/internal/service_controller_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ServiceControllerTracingStub::ServiceControllerTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -56,18 +57,14 @@ ServiceControllerTracingStub::Report( child_->Report(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeServiceControllerTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicecontrol_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicecontrol/v1/internal/service_controller_tracing_stub.h b/google/cloud/servicecontrol/v1/internal/service_controller_tracing_stub.h index c1909e1756708..d83037e956a6f 100644 --- a/google/cloud/servicecontrol/v1/internal/service_controller_tracing_stub.h +++ b/google/cloud/servicecontrol/v1/internal/service_controller_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ServiceControllerTracingStub : public ServiceControllerStub { public: ~ServiceControllerTracingStub() override = default; @@ -53,8 +54,6 @@ class ServiceControllerTracingStub : public ServiceControllerStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -69,4 +68,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_V1_INTERNAL_SERVICE_CONTROLLER_TRACING_STUB_H diff --git a/google/cloud/servicecontrol/v1/quota_controller_connection.h b/google/cloud/servicecontrol/v1/quota_controller_connection.h index 9e8f65c30f43d..681d5b22c6586 100644 --- a/google/cloud/servicecontrol/v1/quota_controller_connection.h +++ b/google/cloud/servicecontrol/v1/quota_controller_connection.h @@ -26,7 +26,7 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/api/servicecontrol/v1/quota_controller.pb.h" #include namespace google { diff --git a/google/cloud/servicecontrol/v1/quota_controller_connection_idempotency_policy.h b/google/cloud/servicecontrol/v1/quota_controller_connection_idempotency_policy.h index 85e5c40c55ac6..ec78728a16951 100644 --- a/google/cloud/servicecontrol/v1/quota_controller_connection_idempotency_policy.h +++ b/google/cloud/servicecontrol/v1/quota_controller_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/api/servicecontrol/v1/quota_controller.grpc.pb.h" #include namespace google { diff --git a/google/cloud/servicecontrol/v1/service_controller_connection.h b/google/cloud/servicecontrol/v1/service_controller_connection.h index 5475e099a3396..d97a91d3d4f70 100644 --- a/google/cloud/servicecontrol/v1/service_controller_connection.h +++ b/google/cloud/servicecontrol/v1/service_controller_connection.h @@ -26,7 +26,7 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/api/servicecontrol/v1/service_controller.pb.h" #include namespace google { diff --git a/google/cloud/servicecontrol/v1/service_controller_connection_idempotency_policy.h b/google/cloud/servicecontrol/v1/service_controller_connection_idempotency_policy.h index 20b1546733cd1..9c39a951d149a 100644 --- a/google/cloud/servicecontrol/v1/service_controller_connection_idempotency_policy.h +++ b/google/cloud/servicecontrol/v1/service_controller_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/api/servicecontrol/v1/service_controller.grpc.pb.h" #include namespace google { diff --git a/google/cloud/servicecontrol/v2/internal/service_controller_auth_decorator.cc b/google/cloud/servicecontrol/v2/internal/service_controller_auth_decorator.cc index e22b57e66999a..b816c956a195c 100644 --- a/google/cloud/servicecontrol/v2/internal/service_controller_auth_decorator.cc +++ b/google/cloud/servicecontrol/v2/internal/service_controller_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/api/servicecontrol/v2/service_controller.proto #include "google/cloud/servicecontrol/v2/internal/service_controller_auth_decorator.h" -#include +#include "google/api/servicecontrol/v2/service_controller.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v2_internal { @@ -53,3 +56,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicecontrol_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicecontrol/v2/internal/service_controller_auth_decorator.h b/google/cloud/servicecontrol/v2/internal/service_controller_auth_decorator.h index 7dea6fff5f337..2b28d24c79e11 100644 --- a/google/cloud/servicecontrol/v2/internal/service_controller_auth_decorator.h +++ b/google/cloud/servicecontrol/v2/internal/service_controller_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v2_internal { @@ -56,4 +59,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_V2_INTERNAL_SERVICE_CONTROLLER_AUTH_DECORATOR_H diff --git a/google/cloud/servicecontrol/v2/internal/service_controller_logging_decorator.cc b/google/cloud/servicecontrol/v2/internal/service_controller_logging_decorator.cc index bded98ab6e4e4..f89bfc3566cc5 100644 --- a/google/cloud/servicecontrol/v2/internal/service_controller_logging_decorator.cc +++ b/google/cloud/servicecontrol/v2/internal/service_controller_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/servicecontrol/v2/internal/service_controller_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/api/servicecontrol/v2/service_controller.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v2_internal { @@ -63,3 +66,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicecontrol_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicecontrol/v2/internal/service_controller_logging_decorator.h b/google/cloud/servicecontrol/v2/internal/service_controller_logging_decorator.h index 3436b45f0be33..d1b0bec0c84da 100644 --- a/google/cloud/servicecontrol/v2/internal/service_controller_logging_decorator.h +++ b/google/cloud/servicecontrol/v2/internal/service_controller_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v2_internal { @@ -56,4 +59,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_V2_INTERNAL_SERVICE_CONTROLLER_LOGGING_DECORATOR_H diff --git a/google/cloud/servicecontrol/v2/internal/service_controller_metadata_decorator.cc b/google/cloud/servicecontrol/v2/internal/service_controller_metadata_decorator.cc index 04932bbb72150..230d15960e67c 100644 --- a/google/cloud/servicecontrol/v2/internal/service_controller_metadata_decorator.cc +++ b/google/cloud/servicecontrol/v2/internal/service_controller_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/servicecontrol/v2/internal/service_controller_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/api/servicecontrol/v2/service_controller.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v2_internal { @@ -81,3 +85,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicecontrol_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicecontrol/v2/internal/service_controller_metadata_decorator.h b/google/cloud/servicecontrol/v2/internal/service_controller_metadata_decorator.h index 9a320a6ce7e62..e779092552192 100644 --- a/google/cloud/servicecontrol/v2/internal/service_controller_metadata_decorator.h +++ b/google/cloud/servicecontrol/v2/internal/service_controller_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v2_internal { @@ -62,4 +65,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_V2_INTERNAL_SERVICE_CONTROLLER_METADATA_DECORATOR_H diff --git a/google/cloud/servicecontrol/v2/internal/service_controller_option_defaults.cc b/google/cloud/servicecontrol/v2/internal/service_controller_option_defaults.cc index 2d250a76c0af9..160988e523939 100644 --- a/google/cloud/servicecontrol/v2/internal/service_controller_option_defaults.cc +++ b/google/cloud/servicecontrol/v2/internal/service_controller_option_defaults.cc @@ -42,7 +42,7 @@ Options ServiceControllerDefaultOptions(Options options) { if (!options.has()) { options.set( servicecontrol_v2::ServiceControllerLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/servicecontrol/v2/internal/service_controller_stub.cc b/google/cloud/servicecontrol/v2/internal/service_controller_stub.cc index 7a861bea1a911..15352c0662bcc 100644 --- a/google/cloud/servicecontrol/v2/internal/service_controller_stub.cc +++ b/google/cloud/servicecontrol/v2/internal/service_controller_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/servicecontrol/v2/internal/service_controller_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "google/api/servicecontrol/v2/service_controller.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v2_internal { @@ -58,3 +61,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicecontrol_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicecontrol/v2/internal/service_controller_stub.h b/google/cloud/servicecontrol/v2/internal/service_controller_stub.h index f8e73cc9ecd91..e3251118dd95c 100644 --- a/google/cloud/servicecontrol/v2/internal/service_controller_stub.h +++ b/google/cloud/servicecontrol/v2/internal/service_controller_stub.h @@ -22,10 +22,13 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/api/servicecontrol/v2/service_controller.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v2_internal { @@ -71,4 +74,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_V2_INTERNAL_SERVICE_CONTROLLER_STUB_H diff --git a/google/cloud/servicecontrol/v2/internal/service_controller_stub_factory.cc b/google/cloud/servicecontrol/v2/internal/service_controller_stub_factory.cc index c25a2f5aa701c..f99479cf55706 100644 --- a/google/cloud/servicecontrol/v2/internal/service_controller_stub_factory.cc +++ b/google/cloud/servicecontrol/v2/internal/service_controller_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/api/servicecontrol/v2/service_controller.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v2_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicecontrol_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicecontrol/v2/internal/service_controller_stub_factory.h b/google/cloud/servicecontrol/v2/internal/service_controller_stub_factory.h index da6225ea00906..0c7bc56095156 100644 --- a/google/cloud/servicecontrol/v2/internal/service_controller_stub_factory.h +++ b/google/cloud/servicecontrol/v2/internal/service_controller_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_V2_INTERNAL_SERVICE_CONTROLLER_STUB_FACTORY_H diff --git a/google/cloud/servicecontrol/v2/internal/service_controller_tracing_connection.cc b/google/cloud/servicecontrol/v2/internal/service_controller_tracing_connection.cc index 5a043f7496bf2..ccff8dfe59152 100644 --- a/google/cloud/servicecontrol/v2/internal/service_controller_tracing_connection.cc +++ b/google/cloud/servicecontrol/v2/internal/service_controller_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace servicecontrol_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ServiceControllerTracingConnection::ServiceControllerTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -50,17 +48,13 @@ ServiceControllerTracingConnection::Report( return internal::EndSpan(*span, child_->Report(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeServiceControllerTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/servicecontrol/v2/internal/service_controller_tracing_connection.h b/google/cloud/servicecontrol/v2/internal/service_controller_tracing_connection.h index 5c7ddc2f38f10..7cae48d7855fa 100644 --- a/google/cloud/servicecontrol/v2/internal/service_controller_tracing_connection.h +++ b/google/cloud/servicecontrol/v2/internal/service_controller_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace servicecontrol_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ServiceControllerTracingConnection : public servicecontrol_v2::ServiceControllerConnection { public: @@ -50,8 +48,6 @@ class ServiceControllerTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/servicecontrol/v2/internal/service_controller_tracing_stub.cc b/google/cloud/servicecontrol/v2/internal/service_controller_tracing_stub.cc index 3595cb198ac5a..df744b09b37fd 100644 --- a/google/cloud/servicecontrol/v2/internal/service_controller_tracing_stub.cc +++ b/google/cloud/servicecontrol/v2/internal/service_controller_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ServiceControllerTracingStub::ServiceControllerTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -56,18 +57,14 @@ ServiceControllerTracingStub::Report( child_->Report(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeServiceControllerTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicecontrol_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicecontrol/v2/internal/service_controller_tracing_stub.h b/google/cloud/servicecontrol/v2/internal/service_controller_tracing_stub.h index 59b4e0da92bcd..5a415c3839fa3 100644 --- a/google/cloud/servicecontrol/v2/internal/service_controller_tracing_stub.h +++ b/google/cloud/servicecontrol/v2/internal/service_controller_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicecontrol_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ServiceControllerTracingStub : public ServiceControllerStub { public: ~ServiceControllerTracingStub() override = default; @@ -53,8 +54,6 @@ class ServiceControllerTracingStub : public ServiceControllerStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -69,4 +68,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICECONTROL_V2_INTERNAL_SERVICE_CONTROLLER_TRACING_STUB_H diff --git a/google/cloud/servicecontrol/v2/service_controller_connection.h b/google/cloud/servicecontrol/v2/service_controller_connection.h index 1cfbdfd836578..2fdc4f38c9625 100644 --- a/google/cloud/servicecontrol/v2/service_controller_connection.h +++ b/google/cloud/servicecontrol/v2/service_controller_connection.h @@ -26,7 +26,7 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/api/servicecontrol/v2/service_controller.pb.h" #include namespace google { diff --git a/google/cloud/servicecontrol/v2/service_controller_connection_idempotency_policy.h b/google/cloud/servicecontrol/v2/service_controller_connection_idempotency_policy.h index a48459d234f66..1fc737b1eefa8 100644 --- a/google/cloud/servicecontrol/v2/service_controller_connection_idempotency_policy.h +++ b/google/cloud/servicecontrol/v2/service_controller_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/api/servicecontrol/v2/service_controller.grpc.pb.h" #include namespace google { diff --git a/google/cloud/servicedirectory/BUILD.bazel b/google/cloud/servicedirectory/BUILD.bazel index 77e33da3c8fa4..473496754c24a 100644 --- a/google/cloud/servicedirectory/BUILD.bazel +++ b/google/cloud/servicedirectory/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/servicedirectory/v1:servicedirectory_cc_grpc", + "@googleapis//google/cloud/servicedirectory/v1:servicedirectory_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/servicedirectory/CMakeLists.txt b/google/cloud/servicedirectory/CMakeLists.txt index 4861598ac3b95..fc364b620f381 100644 --- a/google/cloud/servicedirectory/CMakeLists.txt +++ b/google/cloud/servicedirectory/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(servicedirectory "Service Directory API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(servicedirectory_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/servicedirectory/lookup_client.h b/google/cloud/servicedirectory/lookup_client.h deleted file mode 100644 index d26129ca8d0fe..0000000000000 --- a/google/cloud/servicedirectory/lookup_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/servicedirectory/v1/lookup_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_LOOKUP_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_LOOKUP_CLIENT_H - -#include "google/cloud/servicedirectory/lookup_connection.h" -#include "google/cloud/servicedirectory/v1/lookup_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in servicedirectory_v1 instead of the aliases defined in -/// this namespace. -namespace servicedirectory { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use servicedirectory_v1::LookupServiceClient directly. -using ::google::cloud::servicedirectory_v1::LookupServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace servicedirectory -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_LOOKUP_CLIENT_H diff --git a/google/cloud/servicedirectory/lookup_connection.h b/google/cloud/servicedirectory/lookup_connection.h deleted file mode 100644 index e60ca6d18bf08..0000000000000 --- a/google/cloud/servicedirectory/lookup_connection.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/servicedirectory/v1/lookup_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_LOOKUP_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_LOOKUP_CONNECTION_H - -#include "google/cloud/servicedirectory/lookup_connection_idempotency_policy.h" -#include "google/cloud/servicedirectory/v1/lookup_connection.h" - -namespace google { -namespace cloud { -namespace servicedirectory { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use servicedirectory_v1::MakeLookupServiceConnection directly. -using ::google::cloud::servicedirectory_v1::MakeLookupServiceConnection; - -/// @deprecated Use servicedirectory_v1::LookupServiceConnection directly. -using ::google::cloud::servicedirectory_v1::LookupServiceConnection; - -/// @deprecated Use -/// servicedirectory_v1::LookupServiceLimitedErrorCountRetryPolicy directly. -using ::google::cloud::servicedirectory_v1:: - LookupServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use servicedirectory_v1::LookupServiceLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::servicedirectory_v1::LookupServiceLimitedTimeRetryPolicy; - -/// @deprecated Use servicedirectory_v1::LookupServiceRetryPolicy directly. -using ::google::cloud::servicedirectory_v1::LookupServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace servicedirectory -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_LOOKUP_CONNECTION_H diff --git a/google/cloud/servicedirectory/lookup_connection_idempotency_policy.h b/google/cloud/servicedirectory/lookup_connection_idempotency_policy.h deleted file mode 100644 index f537ff0639191..0000000000000 --- a/google/cloud/servicedirectory/lookup_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/servicedirectory/v1/lookup_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_LOOKUP_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_LOOKUP_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/servicedirectory/v1/lookup_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace servicedirectory { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// servicedirectory_v1::MakeDefaultLookupServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::servicedirectory_v1:: - MakeDefaultLookupServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// servicedirectory_v1::LookupServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::servicedirectory_v1:: - LookupServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace servicedirectory -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_LOOKUP_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/servicedirectory/lookup_options.h b/google/cloud/servicedirectory/lookup_options.h deleted file mode 100644 index 468dda7ffb66a..0000000000000 --- a/google/cloud/servicedirectory/lookup_options.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/servicedirectory/v1/lookup_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_LOOKUP_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_LOOKUP_OPTIONS_H - -#include "google/cloud/servicedirectory/lookup_connection.h" -#include "google/cloud/servicedirectory/lookup_connection_idempotency_policy.h" -#include "google/cloud/servicedirectory/v1/lookup_options.h" - -namespace google { -namespace cloud { -namespace servicedirectory { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use servicedirectory_v1::LookupServiceBackoffPolicyOption -/// directly. -using ::google::cloud::servicedirectory_v1::LookupServiceBackoffPolicyOption; - -/// @deprecated Use -/// servicedirectory_v1::LookupServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::servicedirectory_v1:: - LookupServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use servicedirectory_v1::LookupServicePolicyOptionList directly. -using ::google::cloud::servicedirectory_v1::LookupServicePolicyOptionList; - -/// @deprecated Use servicedirectory_v1::LookupServiceRetryPolicyOption -/// directly. -using ::google::cloud::servicedirectory_v1::LookupServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace servicedirectory -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_LOOKUP_OPTIONS_H diff --git a/google/cloud/servicedirectory/mocks/mock_lookup_connection.h b/google/cloud/servicedirectory/mocks/mock_lookup_connection.h deleted file mode 100644 index 8e7880975ed62..0000000000000 --- a/google/cloud/servicedirectory/mocks/mock_lookup_connection.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/servicedirectory/v1/lookup_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_MOCKS_MOCK_LOOKUP_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_MOCKS_MOCK_LOOKUP_CONNECTION_H - -#include "google/cloud/servicedirectory/lookup_connection.h" -#include "google/cloud/servicedirectory/v1/mocks/mock_lookup_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in servicedirectory_v1_mocks instead of the aliases -/// defined in this namespace. -namespace servicedirectory_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use servicedirectory_v1_mocks::MockLookupServiceConnection -/// directly. -using ::google::cloud::servicedirectory_v1_mocks::MockLookupServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace servicedirectory_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_MOCKS_MOCK_LOOKUP_CONNECTION_H diff --git a/google/cloud/servicedirectory/mocks/mock_registration_connection.h b/google/cloud/servicedirectory/mocks/mock_registration_connection.h deleted file mode 100644 index f36f104522107..0000000000000 --- a/google/cloud/servicedirectory/mocks/mock_registration_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/servicedirectory/v1/registration_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_MOCKS_MOCK_REGISTRATION_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_MOCKS_MOCK_REGISTRATION_CONNECTION_H - -#include "google/cloud/servicedirectory/registration_connection.h" -#include "google/cloud/servicedirectory/v1/mocks/mock_registration_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in servicedirectory_v1_mocks instead of the aliases -/// defined in this namespace. -namespace servicedirectory_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use servicedirectory_v1_mocks::MockRegistrationServiceConnection -/// directly. -using ::google::cloud::servicedirectory_v1_mocks:: - MockRegistrationServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace servicedirectory_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_MOCKS_MOCK_REGISTRATION_CONNECTION_H diff --git a/google/cloud/servicedirectory/quickstart/.bazelrc b/google/cloud/servicedirectory/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/servicedirectory/quickstart/.bazelrc +++ b/google/cloud/servicedirectory/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/servicedirectory/quickstart/CMakeLists.txt b/google/cloud/servicedirectory/quickstart/CMakeLists.txt index 30f65e7d8dbbb..5410518a7a531 100644 --- a/google/cloud/servicedirectory/quickstart/CMakeLists.txt +++ b/google/cloud/servicedirectory/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Service Directory API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-servicedirectory-quickstart CXX) find_package(google_cloud_cpp_servicedirectory REQUIRED) diff --git a/google/cloud/servicedirectory/registration_client.h b/google/cloud/servicedirectory/registration_client.h deleted file mode 100644 index fe2d2dd67c85c..0000000000000 --- a/google/cloud/servicedirectory/registration_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/servicedirectory/v1/registration_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_REGISTRATION_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_REGISTRATION_CLIENT_H - -#include "google/cloud/servicedirectory/registration_connection.h" -#include "google/cloud/servicedirectory/v1/registration_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in servicedirectory_v1 instead of the aliases defined in -/// this namespace. -namespace servicedirectory { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use servicedirectory_v1::RegistrationServiceClient directly. -using ::google::cloud::servicedirectory_v1::RegistrationServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace servicedirectory -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_REGISTRATION_CLIENT_H diff --git a/google/cloud/servicedirectory/registration_connection.h b/google/cloud/servicedirectory/registration_connection.h deleted file mode 100644 index 8370f825bcf23..0000000000000 --- a/google/cloud/servicedirectory/registration_connection.h +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/servicedirectory/v1/registration_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_REGISTRATION_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_REGISTRATION_CONNECTION_H - -#include "google/cloud/servicedirectory/registration_connection_idempotency_policy.h" -#include "google/cloud/servicedirectory/v1/registration_connection.h" - -namespace google { -namespace cloud { -namespace servicedirectory { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use servicedirectory_v1::MakeRegistrationServiceConnection -/// directly. -using ::google::cloud::servicedirectory_v1::MakeRegistrationServiceConnection; - -/// @deprecated Use servicedirectory_v1::RegistrationServiceConnection directly. -using ::google::cloud::servicedirectory_v1::RegistrationServiceConnection; - -/// @deprecated Use -/// servicedirectory_v1::RegistrationServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::servicedirectory_v1:: - RegistrationServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use -/// servicedirectory_v1::RegistrationServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::servicedirectory_v1:: - RegistrationServiceLimitedTimeRetryPolicy; - -/// @deprecated Use servicedirectory_v1::RegistrationServiceRetryPolicy -/// directly. -using ::google::cloud::servicedirectory_v1::RegistrationServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace servicedirectory -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_REGISTRATION_CONNECTION_H diff --git a/google/cloud/servicedirectory/registration_connection_idempotency_policy.h b/google/cloud/servicedirectory/registration_connection_idempotency_policy.h deleted file mode 100644 index 6039401743258..0000000000000 --- a/google/cloud/servicedirectory/registration_connection_idempotency_policy.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/servicedirectory/v1/registration_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_REGISTRATION_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_REGISTRATION_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/servicedirectory/v1/registration_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace servicedirectory { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// servicedirectory_v1::MakeDefaultRegistrationServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::servicedirectory_v1:: - MakeDefaultRegistrationServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// servicedirectory_v1::RegistrationServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::servicedirectory_v1:: - RegistrationServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace servicedirectory -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_REGISTRATION_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/servicedirectory/registration_options.h b/google/cloud/servicedirectory/registration_options.h deleted file mode 100644 index 0a878a55430fc..0000000000000 --- a/google/cloud/servicedirectory/registration_options.h +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/servicedirectory/v1/registration_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_REGISTRATION_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_REGISTRATION_OPTIONS_H - -#include "google/cloud/servicedirectory/registration_connection.h" -#include "google/cloud/servicedirectory/registration_connection_idempotency_policy.h" -#include "google/cloud/servicedirectory/v1/registration_options.h" - -namespace google { -namespace cloud { -namespace servicedirectory { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use servicedirectory_v1::RegistrationServiceBackoffPolicyOption -/// directly. -using ::google::cloud::servicedirectory_v1:: - RegistrationServiceBackoffPolicyOption; - -/// @deprecated Use -/// servicedirectory_v1::RegistrationServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::servicedirectory_v1:: - RegistrationServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use servicedirectory_v1::RegistrationServicePolicyOptionList -/// directly. -using ::google::cloud::servicedirectory_v1::RegistrationServicePolicyOptionList; - -/// @deprecated Use servicedirectory_v1::RegistrationServiceRetryPolicyOption -/// directly. -using ::google::cloud::servicedirectory_v1:: - RegistrationServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace servicedirectory -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_REGISTRATION_OPTIONS_H diff --git a/google/cloud/servicedirectory/v1/internal/lookup_auth_decorator.cc b/google/cloud/servicedirectory/v1/internal/lookup_auth_decorator.cc index 8232f7a4c7c88..20f550d4a9267 100644 --- a/google/cloud/servicedirectory/v1/internal/lookup_auth_decorator.cc +++ b/google/cloud/servicedirectory/v1/internal/lookup_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/servicedirectory/v1/lookup_service.proto #include "google/cloud/servicedirectory/v1/internal/lookup_auth_decorator.h" -#include +#include "google/cloud/servicedirectory/v1/lookup_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicedirectory_v1_internal { @@ -61,3 +64,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicedirectory_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicedirectory/v1/internal/lookup_auth_decorator.h b/google/cloud/servicedirectory/v1/internal/lookup_auth_decorator.h index 2c0681dbf74bd..de8eace51c73a 100644 --- a/google/cloud/servicedirectory/v1/internal/lookup_auth_decorator.h +++ b/google/cloud/servicedirectory/v1/internal/lookup_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicedirectory_v1_internal { @@ -62,4 +65,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_V1_INTERNAL_LOOKUP_AUTH_DECORATOR_H diff --git a/google/cloud/servicedirectory/v1/internal/lookup_logging_decorator.cc b/google/cloud/servicedirectory/v1/internal/lookup_logging_decorator.cc index e67fd31703f6d..9bb9e814f29eb 100644 --- a/google/cloud/servicedirectory/v1/internal/lookup_logging_decorator.cc +++ b/google/cloud/servicedirectory/v1/internal/lookup_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/servicedirectory/v1/lookup_service.proto #include "google/cloud/servicedirectory/v1/internal/lookup_logging_decorator.h" +#include "google/cloud/servicedirectory/v1/lookup_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicedirectory_v1_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicedirectory_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicedirectory/v1/internal/lookup_logging_decorator.h b/google/cloud/servicedirectory/v1/internal/lookup_logging_decorator.h index 9db99dd7fde0a..cfcbaf7c7d312 100644 --- a/google/cloud/servicedirectory/v1/internal/lookup_logging_decorator.h +++ b/google/cloud/servicedirectory/v1/internal/lookup_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicedirectory_v1_internal { @@ -62,4 +65,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_V1_INTERNAL_LOOKUP_LOGGING_DECORATOR_H diff --git a/google/cloud/servicedirectory/v1/internal/lookup_metadata_decorator.cc b/google/cloud/servicedirectory/v1/internal/lookup_metadata_decorator.cc index 385a023edfcf3..e8ab907585d7d 100644 --- a/google/cloud/servicedirectory/v1/internal/lookup_metadata_decorator.cc +++ b/google/cloud/servicedirectory/v1/internal/lookup_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/servicedirectory/v1/lookup_service.proto #include "google/cloud/servicedirectory/v1/internal/lookup_metadata_decorator.h" +#include "google/cloud/servicedirectory/v1/lookup_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicedirectory_v1_internal { @@ -87,3 +91,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicedirectory_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicedirectory/v1/internal/lookup_metadata_decorator.h b/google/cloud/servicedirectory/v1/internal/lookup_metadata_decorator.h index dd2eee8f9cb3e..c962153de4e74 100644 --- a/google/cloud/servicedirectory/v1/internal/lookup_metadata_decorator.h +++ b/google/cloud/servicedirectory/v1/internal/lookup_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicedirectory_v1_internal { @@ -67,4 +70,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_V1_INTERNAL_LOOKUP_METADATA_DECORATOR_H diff --git a/google/cloud/servicedirectory/v1/internal/lookup_option_defaults.cc b/google/cloud/servicedirectory/v1/internal/lookup_option_defaults.cc index f0582da2f3746..8731a9a916c5b 100644 --- a/google/cloud/servicedirectory/v1/internal/lookup_option_defaults.cc +++ b/google/cloud/servicedirectory/v1/internal/lookup_option_defaults.cc @@ -42,7 +42,7 @@ Options LookupServiceDefaultOptions(Options options) { if (!options.has()) { options.set( servicedirectory_v1::LookupServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/servicedirectory/v1/internal/lookup_stub.cc b/google/cloud/servicedirectory/v1/internal/lookup_stub.cc index 401d2dcb3a864..0ab8ee355848b 100644 --- a/google/cloud/servicedirectory/v1/internal/lookup_stub.cc +++ b/google/cloud/servicedirectory/v1/internal/lookup_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/servicedirectory/v1/lookup_service.proto #include "google/cloud/servicedirectory/v1/internal/lookup_stub.h" +#include "google/cloud/servicedirectory/v1/lookup_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicedirectory_v1_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicedirectory_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicedirectory/v1/internal/lookup_stub.h b/google/cloud/servicedirectory/v1/internal/lookup_stub.h index e28f7388a2f84..42e53807f5d32 100644 --- a/google/cloud/servicedirectory/v1/internal/lookup_stub.h +++ b/google/cloud/servicedirectory/v1/internal/lookup_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_V1_INTERNAL_LOOKUP_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_V1_INTERNAL_LOOKUP_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/servicedirectory/v1/lookup_service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicedirectory_v1_internal { @@ -90,4 +93,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_V1_INTERNAL_LOOKUP_STUB_H diff --git a/google/cloud/servicedirectory/v1/internal/lookup_stub_factory.cc b/google/cloud/servicedirectory/v1/internal/lookup_stub_factory.cc index 591267c340d6b..01d7ffc4364e6 100644 --- a/google/cloud/servicedirectory/v1/internal/lookup_stub_factory.cc +++ b/google/cloud/servicedirectory/v1/internal/lookup_stub_factory.cc @@ -17,22 +17,25 @@ // source: google/cloud/servicedirectory/v1/lookup_service.proto #include "google/cloud/servicedirectory/v1/internal/lookup_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/servicedirectory/v1/internal/lookup_auth_decorator.h" #include "google/cloud/servicedirectory/v1/internal/lookup_logging_decorator.h" #include "google/cloud/servicedirectory/v1/internal/lookup_metadata_decorator.h" #include "google/cloud/servicedirectory/v1/internal/lookup_stub.h" #include "google/cloud/servicedirectory/v1/internal/lookup_tracing_stub.h" +#include "google/cloud/servicedirectory/v1/lookup_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicedirectory_v1_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicedirectory_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicedirectory/v1/internal/lookup_stub_factory.h b/google/cloud/servicedirectory/v1/internal/lookup_stub_factory.h index 06546c0da7c43..70c01e03879d8 100644 --- a/google/cloud/servicedirectory/v1/internal/lookup_stub_factory.h +++ b/google/cloud/servicedirectory/v1/internal/lookup_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicedirectory_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_V1_INTERNAL_LOOKUP_STUB_FACTORY_H diff --git a/google/cloud/servicedirectory/v1/internal/lookup_tracing_connection.cc b/google/cloud/servicedirectory/v1/internal/lookup_tracing_connection.cc index 98c928e7ac94a..56673203bc80c 100644 --- a/google/cloud/servicedirectory/v1/internal/lookup_tracing_connection.cc +++ b/google/cloud/servicedirectory/v1/internal/lookup_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace servicedirectory_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - LookupServiceTracingConnection::LookupServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -62,16 +60,12 @@ LookupServiceTracingConnection::GetLocation( return internal::EndSpan(*span, child_->GetLocation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeLookupServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/servicedirectory/v1/internal/lookup_tracing_connection.h b/google/cloud/servicedirectory/v1/internal/lookup_tracing_connection.h index e5618e5e819c5..77a1f91680296 100644 --- a/google/cloud/servicedirectory/v1/internal/lookup_tracing_connection.h +++ b/google/cloud/servicedirectory/v1/internal/lookup_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace servicedirectory_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class LookupServiceTracingConnection : public servicedirectory_v1::LookupServiceConnection { public: @@ -55,8 +53,6 @@ class LookupServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/servicedirectory/v1/internal/lookup_tracing_stub.cc b/google/cloud/servicedirectory/v1/internal/lookup_tracing_stub.cc index e2a8eb0fb436b..df23432803aab 100644 --- a/google/cloud/servicedirectory/v1/internal/lookup_tracing_stub.cc +++ b/google/cloud/servicedirectory/v1/internal/lookup_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicedirectory_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - LookupServiceTracingStub::LookupServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -68,18 +69,14 @@ LookupServiceTracingStub::GetLocation( child_->GetLocation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeLookupServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicedirectory_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicedirectory/v1/internal/lookup_tracing_stub.h b/google/cloud/servicedirectory/v1/internal/lookup_tracing_stub.h index fd5b16d914776..f04fdba0d7e11 100644 --- a/google/cloud/servicedirectory/v1/internal/lookup_tracing_stub.h +++ b/google/cloud/servicedirectory/v1/internal/lookup_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicedirectory_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class LookupServiceTracingStub : public LookupServiceStub { public: ~LookupServiceTracingStub() override = default; @@ -58,8 +59,6 @@ class LookupServiceTracingStub : public LookupServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -74,4 +73,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_V1_INTERNAL_LOOKUP_TRACING_STUB_H diff --git a/google/cloud/servicedirectory/v1/internal/registration_auth_decorator.cc b/google/cloud/servicedirectory/v1/internal/registration_auth_decorator.cc index 47e9734dfefd1..42763cb870041 100644 --- a/google/cloud/servicedirectory/v1/internal/registration_auth_decorator.cc +++ b/google/cloud/servicedirectory/v1/internal/registration_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/servicedirectory/v1/registration_service.proto #include "google/cloud/servicedirectory/v1/internal/registration_auth_decorator.h" -#include +#include "google/cloud/servicedirectory/v1/registration_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicedirectory_v1_internal { @@ -213,3 +216,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicedirectory_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicedirectory/v1/internal/registration_auth_decorator.h b/google/cloud/servicedirectory/v1/internal/registration_auth_decorator.h index 1663e37e2fae4..5bc372112c687 100644 --- a/google/cloud/servicedirectory/v1/internal/registration_auth_decorator.h +++ b/google/cloud/servicedirectory/v1/internal/registration_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicedirectory_v1_internal { @@ -144,4 +147,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_V1_INTERNAL_REGISTRATION_AUTH_DECORATOR_H diff --git a/google/cloud/servicedirectory/v1/internal/registration_logging_decorator.cc b/google/cloud/servicedirectory/v1/internal/registration_logging_decorator.cc index 34ae7ecaf8359..dd5ce105ce286 100644 --- a/google/cloud/servicedirectory/v1/internal/registration_logging_decorator.cc +++ b/google/cloud/servicedirectory/v1/internal/registration_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/servicedirectory/v1/registration_service.proto #include "google/cloud/servicedirectory/v1/internal/registration_logging_decorator.h" +#include "google/cloud/servicedirectory/v1/registration_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicedirectory_v1_internal { @@ -292,3 +295,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicedirectory_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicedirectory/v1/internal/registration_logging_decorator.h b/google/cloud/servicedirectory/v1/internal/registration_logging_decorator.h index 7b7dabe9c5305..9d3187ceb5865 100644 --- a/google/cloud/servicedirectory/v1/internal/registration_logging_decorator.h +++ b/google/cloud/servicedirectory/v1/internal/registration_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicedirectory_v1_internal { @@ -144,4 +147,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_V1_INTERNAL_REGISTRATION_LOGGING_DECORATOR_H diff --git a/google/cloud/servicedirectory/v1/internal/registration_metadata_decorator.cc b/google/cloud/servicedirectory/v1/internal/registration_metadata_decorator.cc index da21c765a77df..e00a9e779828e 100644 --- a/google/cloud/servicedirectory/v1/internal/registration_metadata_decorator.cc +++ b/google/cloud/servicedirectory/v1/internal/registration_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/servicedirectory/v1/registration_service.proto #include "google/cloud/servicedirectory/v1/internal/registration_metadata_decorator.h" +#include "google/cloud/servicedirectory/v1/registration_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicedirectory_v1_internal { @@ -245,3 +249,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicedirectory_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicedirectory/v1/internal/registration_metadata_decorator.h b/google/cloud/servicedirectory/v1/internal/registration_metadata_decorator.h index d173c4bd5fb64..bfae4a0b8f9c0 100644 --- a/google/cloud/servicedirectory/v1/internal/registration_metadata_decorator.h +++ b/google/cloud/servicedirectory/v1/internal/registration_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicedirectory_v1_internal { @@ -150,4 +153,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_V1_INTERNAL_REGISTRATION_METADATA_DECORATOR_H diff --git a/google/cloud/servicedirectory/v1/internal/registration_option_defaults.cc b/google/cloud/servicedirectory/v1/internal/registration_option_defaults.cc index 4b382dd8f7844..5ac3a39358366 100644 --- a/google/cloud/servicedirectory/v1/internal/registration_option_defaults.cc +++ b/google/cloud/servicedirectory/v1/internal/registration_option_defaults.cc @@ -43,7 +43,7 @@ Options RegistrationServiceDefaultOptions(Options options) { .has()) { options.set( servicedirectory_v1::RegistrationServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/servicedirectory/v1/internal/registration_stub.cc b/google/cloud/servicedirectory/v1/internal/registration_stub.cc index f8457526979ef..8200090d9eb25 100644 --- a/google/cloud/servicedirectory/v1/internal/registration_stub.cc +++ b/google/cloud/servicedirectory/v1/internal/registration_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/servicedirectory/v1/registration_service.proto #include "google/cloud/servicedirectory/v1/internal/registration_stub.h" +#include "google/cloud/servicedirectory/v1/registration_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicedirectory_v1_internal { @@ -272,3 +275,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicedirectory_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicedirectory/v1/internal/registration_stub.h b/google/cloud/servicedirectory/v1/internal/registration_stub.h index 1c8d79aa32041..95b718cebc57a 100644 --- a/google/cloud/servicedirectory/v1/internal/registration_stub.h +++ b/google/cloud/servicedirectory/v1/internal/registration_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_V1_INTERNAL_REGISTRATION_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_V1_INTERNAL_REGISTRATION_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/servicedirectory/v1/registration_service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicedirectory_v1_internal { @@ -259,4 +262,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_V1_INTERNAL_REGISTRATION_STUB_H diff --git a/google/cloud/servicedirectory/v1/internal/registration_stub_factory.cc b/google/cloud/servicedirectory/v1/internal/registration_stub_factory.cc index ed9032d70407c..4ecc7c7ac42ef 100644 --- a/google/cloud/servicedirectory/v1/internal/registration_stub_factory.cc +++ b/google/cloud/servicedirectory/v1/internal/registration_stub_factory.cc @@ -17,22 +17,25 @@ // source: google/cloud/servicedirectory/v1/registration_service.proto #include "google/cloud/servicedirectory/v1/internal/registration_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/servicedirectory/v1/internal/registration_auth_decorator.h" #include "google/cloud/servicedirectory/v1/internal/registration_logging_decorator.h" #include "google/cloud/servicedirectory/v1/internal/registration_metadata_decorator.h" #include "google/cloud/servicedirectory/v1/internal/registration_stub.h" #include "google/cloud/servicedirectory/v1/internal/registration_tracing_stub.h" +#include "google/cloud/servicedirectory/v1/registration_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicedirectory_v1_internal { @@ -74,3 +77,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicedirectory_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicedirectory/v1/internal/registration_stub_factory.h b/google/cloud/servicedirectory/v1/internal/registration_stub_factory.h index 823d898306246..2775010661817 100644 --- a/google/cloud/servicedirectory/v1/internal/registration_stub_factory.h +++ b/google/cloud/servicedirectory/v1/internal/registration_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicedirectory_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_V1_INTERNAL_REGISTRATION_STUB_FACTORY_H diff --git a/google/cloud/servicedirectory/v1/internal/registration_tracing_connection.cc b/google/cloud/servicedirectory/v1/internal/registration_tracing_connection.cc index 5e5d8da1e8ae8..f07f63974c560 100644 --- a/google/cloud/servicedirectory/v1/internal/registration_tracing_connection.cc +++ b/google/cloud/servicedirectory/v1/internal/registration_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace servicedirectory_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RegistrationServiceTracingConnection::RegistrationServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -224,17 +222,13 @@ RegistrationServiceTracingConnection::GetLocation( return internal::EndSpan(*span, child_->GetLocation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRegistrationServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/servicedirectory/v1/internal/registration_tracing_connection.h b/google/cloud/servicedirectory/v1/internal/registration_tracing_connection.h index 96777e2ef8dbf..d06a82d99ffb7 100644 --- a/google/cloud/servicedirectory/v1/internal/registration_tracing_connection.h +++ b/google/cloud/servicedirectory/v1/internal/registration_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace servicedirectory_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RegistrationServiceTracingConnection : public servicedirectory_v1::RegistrationServiceConnection { public: @@ -120,8 +118,6 @@ class RegistrationServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/servicedirectory/v1/internal/registration_tracing_stub.cc b/google/cloud/servicedirectory/v1/internal/registration_tracing_stub.cc index d7009eab91e0f..0491bfd4e70f1 100644 --- a/google/cloud/servicedirectory/v1/internal/registration_tracing_stub.cc +++ b/google/cloud/servicedirectory/v1/internal/registration_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicedirectory_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - RegistrationServiceTracingStub::RegistrationServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -274,18 +275,14 @@ RegistrationServiceTracingStub::GetLocation( child_->GetLocation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeRegistrationServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicedirectory_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicedirectory/v1/internal/registration_tracing_stub.h b/google/cloud/servicedirectory/v1/internal/registration_tracing_stub.h index 11b373a2493d2..7abd8e371d72f 100644 --- a/google/cloud/servicedirectory/v1/internal/registration_tracing_stub.h +++ b/google/cloud/servicedirectory/v1/internal/registration_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicedirectory_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class RegistrationServiceTracingStub : public RegistrationServiceStub { public: ~RegistrationServiceTracingStub() override = default; @@ -141,8 +142,6 @@ class RegistrationServiceTracingStub : public RegistrationServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -157,4 +156,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_V1_INTERNAL_REGISTRATION_TRACING_STUB_H diff --git a/google/cloud/servicedirectory/v1/lookup_connection.h b/google/cloud/servicedirectory/v1/lookup_connection.h index 969748a503959..61a3ca8d6810f 100644 --- a/google/cloud/servicedirectory/v1/lookup_connection.h +++ b/google/cloud/servicedirectory/v1/lookup_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/servicedirectory/v1/internal/lookup_retry_traits.h" #include "google/cloud/servicedirectory/v1/lookup_connection_idempotency_policy.h" +#include "google/cloud/servicedirectory/v1/lookup_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/servicedirectory/v1/lookup_connection_idempotency_policy.h b/google/cloud/servicedirectory/v1/lookup_connection_idempotency_policy.h index ad5130c57d640..4d17ed48be641 100644 --- a/google/cloud/servicedirectory/v1/lookup_connection_idempotency_policy.h +++ b/google/cloud/servicedirectory/v1/lookup_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_V1_LOOKUP_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_V1_LOOKUP_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/servicedirectory/v1/lookup_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/servicedirectory/v1/registration_connection.h b/google/cloud/servicedirectory/v1/registration_connection.h index b2e3f416ec8ed..9c4a3e5f64d9d 100644 --- a/google/cloud/servicedirectory/v1/registration_connection.h +++ b/google/cloud/servicedirectory/v1/registration_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/servicedirectory/v1/internal/registration_retry_traits.h" #include "google/cloud/servicedirectory/v1/registration_connection_idempotency_policy.h" +#include "google/cloud/servicedirectory/v1/registration_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/servicedirectory/v1/registration_connection_idempotency_policy.h b/google/cloud/servicedirectory/v1/registration_connection_idempotency_policy.h index 0697b4ce310e0..464185582bf70 100644 --- a/google/cloud/servicedirectory/v1/registration_connection_idempotency_policy.h +++ b/google/cloud/servicedirectory/v1/registration_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_V1_REGISTRATION_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEDIRECTORY_V1_REGISTRATION_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/servicedirectory/v1/registration_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/servicehealth/BUILD.bazel b/google/cloud/servicehealth/BUILD.bazel index aa1ac8cf6011b..632a15c056b59 100644 --- a/google/cloud/servicehealth/BUILD.bazel +++ b/google/cloud/servicehealth/BUILD.bazel @@ -21,8 +21,8 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/servicehealth/logging/v1:logging_cc_grpc", - "@com_google_googleapis//google/cloud/servicehealth/v1:servicehealth_cc_grpc", + "@googleapis//google/cloud/servicehealth/logging/v1:logging_cc_grpc", + "@googleapis//google/cloud/servicehealth/v1:servicehealth_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/servicehealth/quickstart/.bazelrc b/google/cloud/servicehealth/quickstart/.bazelrc index 15d5c055db074..343e7f623d628 100644 --- a/google/cloud/servicehealth/quickstart/.bazelrc +++ b/google/cloud/servicehealth/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/servicehealth/quickstart/CMakeLists.txt b/google/cloud/servicehealth/quickstart/CMakeLists.txt index 28bac4a9d41c1..5c114d9a2a029 100644 --- a/google/cloud/servicehealth/quickstart/CMakeLists.txt +++ b/google/cloud/servicehealth/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Service Health API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-servicehealth-quickstart CXX) find_package(google_cloud_cpp_servicehealth REQUIRED) diff --git a/google/cloud/servicehealth/v1/internal/service_health_auth_decorator.cc b/google/cloud/servicehealth/v1/internal/service_health_auth_decorator.cc index dc7e7ae4c0ee8..2652fa53a52b6 100644 --- a/google/cloud/servicehealth/v1/internal/service_health_auth_decorator.cc +++ b/google/cloud/servicehealth/v1/internal/service_health_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/servicehealth/v1/event_service.proto #include "google/cloud/servicehealth/v1/internal/service_health_auth_decorator.h" -#include +#include "google/cloud/servicehealth/v1/event_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicehealth_v1_internal { @@ -109,3 +112,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicehealth_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicehealth/v1/internal/service_health_auth_decorator.h b/google/cloud/servicehealth/v1/internal/service_health_auth_decorator.h index d335fcfbd1595..0c54a8c4d47bb 100644 --- a/google/cloud/servicehealth/v1/internal/service_health_auth_decorator.h +++ b/google/cloud/servicehealth/v1/internal/service_health_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicehealth_v1_internal { @@ -90,4 +93,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEHEALTH_V1_INTERNAL_SERVICE_HEALTH_AUTH_DECORATOR_H diff --git a/google/cloud/servicehealth/v1/internal/service_health_logging_decorator.cc b/google/cloud/servicehealth/v1/internal/service_health_logging_decorator.cc index e2c7c208fc26d..ee64e0d8adc7e 100644 --- a/google/cloud/servicehealth/v1/internal/service_health_logging_decorator.cc +++ b/google/cloud/servicehealth/v1/internal/service_health_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/servicehealth/v1/event_service.proto #include "google/cloud/servicehealth/v1/internal/service_health_logging_decorator.h" +#include "google/cloud/servicehealth/v1/event_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicehealth_v1_internal { @@ -146,3 +149,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicehealth_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicehealth/v1/internal/service_health_logging_decorator.h b/google/cloud/servicehealth/v1/internal/service_health_logging_decorator.h index 3e16bc80de835..307d22bf70909 100644 --- a/google/cloud/servicehealth/v1/internal/service_health_logging_decorator.h +++ b/google/cloud/servicehealth/v1/internal/service_health_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicehealth_v1_internal { @@ -90,4 +93,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEHEALTH_V1_INTERNAL_SERVICE_HEALTH_LOGGING_DECORATOR_H diff --git a/google/cloud/servicehealth/v1/internal/service_health_metadata_decorator.cc b/google/cloud/servicehealth/v1/internal/service_health_metadata_decorator.cc index 61f5e1ca8a421..4bdef8947c8c4 100644 --- a/google/cloud/servicehealth/v1/internal/service_health_metadata_decorator.cc +++ b/google/cloud/servicehealth/v1/internal/service_health_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/servicehealth/v1/event_service.proto #include "google/cloud/servicehealth/v1/internal/service_health_metadata_decorator.h" +#include "google/cloud/servicehealth/v1/event_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicehealth_v1_internal { @@ -136,3 +140,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicehealth_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicehealth/v1/internal/service_health_metadata_decorator.h b/google/cloud/servicehealth/v1/internal/service_health_metadata_decorator.h index fce7cbdc2fd2e..1e109c36ce121 100644 --- a/google/cloud/servicehealth/v1/internal/service_health_metadata_decorator.h +++ b/google/cloud/servicehealth/v1/internal/service_health_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicehealth_v1_internal { @@ -95,4 +98,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEHEALTH_V1_INTERNAL_SERVICE_HEALTH_METADATA_DECORATOR_H diff --git a/google/cloud/servicehealth/v1/internal/service_health_option_defaults.cc b/google/cloud/servicehealth/v1/internal/service_health_option_defaults.cc index 93d42aa0eeda9..b9b5ec802e773 100644 --- a/google/cloud/servicehealth/v1/internal/service_health_option_defaults.cc +++ b/google/cloud/servicehealth/v1/internal/service_health_option_defaults.cc @@ -42,7 +42,7 @@ Options ServiceHealthDefaultOptions(Options options) { if (!options.has()) { options.set( servicehealth_v1::ServiceHealthLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/servicehealth/v1/internal/service_health_stub.cc b/google/cloud/servicehealth/v1/internal/service_health_stub.cc index 4783f0eecb6a5..10619607faf67 100644 --- a/google/cloud/servicehealth/v1/internal/service_health_stub.cc +++ b/google/cloud/servicehealth/v1/internal/service_health_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/servicehealth/v1/event_service.proto #include "google/cloud/servicehealth/v1/internal/service_health_stub.h" +#include "google/cloud/servicehealth/v1/event_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicehealth_v1_internal { @@ -136,3 +139,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicehealth_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicehealth/v1/internal/service_health_stub.h b/google/cloud/servicehealth/v1/internal/service_health_stub.h index 734ae5dd6c3c6..3e94b75e17cb0 100644 --- a/google/cloud/servicehealth/v1/internal/service_health_stub.h +++ b/google/cloud/servicehealth/v1/internal/service_health_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEHEALTH_V1_INTERNAL_SERVICE_HEALTH_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEHEALTH_V1_INTERNAL_SERVICE_HEALTH_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/servicehealth/v1/event_service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicehealth_v1_internal { @@ -147,4 +150,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEHEALTH_V1_INTERNAL_SERVICE_HEALTH_STUB_H diff --git a/google/cloud/servicehealth/v1/internal/service_health_stub_factory.cc b/google/cloud/servicehealth/v1/internal/service_health_stub_factory.cc index 114a9226b78f0..0f061c94c3e3e 100644 --- a/google/cloud/servicehealth/v1/internal/service_health_stub_factory.cc +++ b/google/cloud/servicehealth/v1/internal/service_health_stub_factory.cc @@ -17,6 +17,8 @@ // source: google/cloud/servicehealth/v1/event_service.proto #include "google/cloud/servicehealth/v1/internal/service_health_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/servicehealth/v1/event_service.grpc.pb.h" #include "google/cloud/servicehealth/v1/internal/service_health_auth_decorator.h" #include "google/cloud/servicehealth/v1/internal/service_health_logging_decorator.h" #include "google/cloud/servicehealth/v1/internal/service_health_metadata_decorator.h" @@ -28,11 +30,12 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicehealth_v1_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicehealth_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicehealth/v1/internal/service_health_stub_factory.h b/google/cloud/servicehealth/v1/internal/service_health_stub_factory.h index d8f02d710ceb8..0c0576965deb4 100644 --- a/google/cloud/servicehealth/v1/internal/service_health_stub_factory.h +++ b/google/cloud/servicehealth/v1/internal/service_health_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicehealth_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEHEALTH_V1_INTERNAL_SERVICE_HEALTH_STUB_FACTORY_H diff --git a/google/cloud/servicehealth/v1/internal/service_health_tracing_connection.cc b/google/cloud/servicehealth/v1/internal/service_health_tracing_connection.cc index 16e0d84caa8cc..5f8e6d3aebcea 100644 --- a/google/cloud/servicehealth/v1/internal/service_health_tracing_connection.cc +++ b/google/cloud/servicehealth/v1/internal/service_health_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace servicehealth_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ServiceHealthTracingConnection::ServiceHealthTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -117,16 +115,12 @@ ServiceHealthTracingConnection::GetLocation( return internal::EndSpan(*span, child_->GetLocation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeServiceHealthTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/servicehealth/v1/internal/service_health_tracing_connection.h b/google/cloud/servicehealth/v1/internal/service_health_tracing_connection.h index b8c1d0466d901..3780912dbf700 100644 --- a/google/cloud/servicehealth/v1/internal/service_health_tracing_connection.h +++ b/google/cloud/servicehealth/v1/internal/service_health_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace servicehealth_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ServiceHealthTracingConnection : public servicehealth_v1::ServiceHealthConnection { public: @@ -77,8 +75,6 @@ class ServiceHealthTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/servicehealth/v1/internal/service_health_tracing_stub.cc b/google/cloud/servicehealth/v1/internal/service_health_tracing_stub.cc index 224dace0ccbad..08d374326ccb1 100644 --- a/google/cloud/servicehealth/v1/internal/service_health_tracing_stub.cc +++ b/google/cloud/servicehealth/v1/internal/service_health_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicehealth_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ServiceHealthTracingStub::ServiceHealthTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -134,18 +135,14 @@ ServiceHealthTracingStub::GetLocation( child_->GetLocation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeServiceHealthTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicehealth_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicehealth/v1/internal/service_health_tracing_stub.h b/google/cloud/servicehealth/v1/internal/service_health_tracing_stub.h index 80b4bddbfc86c..0ba66197ea8a8 100644 --- a/google/cloud/servicehealth/v1/internal/service_health_tracing_stub.h +++ b/google/cloud/servicehealth/v1/internal/service_health_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicehealth_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ServiceHealthTracingStub : public ServiceHealthStub { public: ~ServiceHealthTracingStub() override = default; @@ -86,8 +87,6 @@ class ServiceHealthTracingStub : public ServiceHealthStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -102,4 +101,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEHEALTH_V1_INTERNAL_SERVICE_HEALTH_TRACING_STUB_H diff --git a/google/cloud/servicehealth/v1/service_health_connection.h b/google/cloud/servicehealth/v1/service_health_connection.h index 6a3ac93de78de..8a00cdde01509 100644 --- a/google/cloud/servicehealth/v1/service_health_connection.h +++ b/google/cloud/servicehealth/v1/service_health_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEHEALTH_V1_SERVICE_HEALTH_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEHEALTH_V1_SERVICE_HEALTH_CONNECTION_H +#include "google/cloud/servicehealth/v1/event_service.pb.h" #include "google/cloud/servicehealth/v1/internal/service_health_retry_traits.h" #include "google/cloud/servicehealth/v1/service_health_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/servicehealth/v1/service_health_connection_idempotency_policy.h b/google/cloud/servicehealth/v1/service_health_connection_idempotency_policy.h index eb725cf911e73..7ddd8f4b582a4 100644 --- a/google/cloud/servicehealth/v1/service_health_connection_idempotency_policy.h +++ b/google/cloud/servicehealth/v1/service_health_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEHEALTH_V1_SERVICE_HEALTH_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEHEALTH_V1_SERVICE_HEALTH_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/servicehealth/v1/event_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/servicemanagement/BUILD.bazel b/google/cloud/servicemanagement/BUILD.bazel index adaa712d116f3..1f8cdf50ec2d1 100644 --- a/google/cloud/servicemanagement/BUILD.bazel +++ b/google/cloud/servicemanagement/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/api/servicemanagement/v1:servicemanagement_cc_grpc", + "@googleapis//google/api/servicemanagement/v1:servicemanagement_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/servicemanagement/CMakeLists.txt b/google/cloud/servicemanagement/CMakeLists.txt index b90d42b4779cd..a3eb69430c3dd 100644 --- a/google/cloud/servicemanagement/CMakeLists.txt +++ b/google/cloud/servicemanagement/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(servicemanagement "Service Management API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(servicemanagement_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/servicemanagement/mocks/mock_service_manager_connection.h b/google/cloud/servicemanagement/mocks/mock_service_manager_connection.h deleted file mode 100644 index c685f4018467c..0000000000000 --- a/google/cloud/servicemanagement/mocks/mock_service_manager_connection.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/api/servicemanagement/v1/servicemanager.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEMANAGEMENT_MOCKS_MOCK_SERVICE_MANAGER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEMANAGEMENT_MOCKS_MOCK_SERVICE_MANAGER_CONNECTION_H - -#include "google/cloud/servicemanagement/service_manager_connection.h" -#include "google/cloud/servicemanagement/v1/mocks/mock_service_manager_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in servicemanagement_v1_mocks instead of the aliases -/// defined in this namespace. -namespace servicemanagement_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use servicemanagement_v1_mocks::MockServiceManagerConnection -/// directly. -using ::google::cloud::servicemanagement_v1_mocks::MockServiceManagerConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace servicemanagement_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEMANAGEMENT_MOCKS_MOCK_SERVICE_MANAGER_CONNECTION_H diff --git a/google/cloud/servicemanagement/quickstart/.bazelrc b/google/cloud/servicemanagement/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/servicemanagement/quickstart/.bazelrc +++ b/google/cloud/servicemanagement/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/servicemanagement/quickstart/CMakeLists.txt b/google/cloud/servicemanagement/quickstart/CMakeLists.txt index 53b64d7a5227e..208616e369847 100644 --- a/google/cloud/servicemanagement/quickstart/CMakeLists.txt +++ b/google/cloud/servicemanagement/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Service Management API C++ client library from # a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-servicemanagement-quickstart CXX) find_package(google_cloud_cpp_servicemanagement REQUIRED) diff --git a/google/cloud/servicemanagement/service_manager_client.h b/google/cloud/servicemanagement/service_manager_client.h deleted file mode 100644 index 669f79069ff45..0000000000000 --- a/google/cloud/servicemanagement/service_manager_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/api/servicemanagement/v1/servicemanager.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEMANAGEMENT_SERVICE_MANAGER_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEMANAGEMENT_SERVICE_MANAGER_CLIENT_H - -#include "google/cloud/servicemanagement/service_manager_connection.h" -#include "google/cloud/servicemanagement/v1/service_manager_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in servicemanagement_v1 instead of the aliases defined in -/// this namespace. -namespace servicemanagement { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use servicemanagement_v1::ServiceManagerClient directly. -using ::google::cloud::servicemanagement_v1::ServiceManagerClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace servicemanagement -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEMANAGEMENT_SERVICE_MANAGER_CLIENT_H diff --git a/google/cloud/servicemanagement/service_manager_connection.h b/google/cloud/servicemanagement/service_manager_connection.h deleted file mode 100644 index 219dcead28ad6..0000000000000 --- a/google/cloud/servicemanagement/service_manager_connection.h +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/api/servicemanagement/v1/servicemanager.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEMANAGEMENT_SERVICE_MANAGER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEMANAGEMENT_SERVICE_MANAGER_CONNECTION_H - -#include "google/cloud/servicemanagement/service_manager_connection_idempotency_policy.h" -#include "google/cloud/servicemanagement/v1/service_manager_connection.h" - -namespace google { -namespace cloud { -namespace servicemanagement { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use servicemanagement_v1::MakeServiceManagerConnection directly. -using ::google::cloud::servicemanagement_v1::MakeServiceManagerConnection; - -/// @deprecated Use servicemanagement_v1::ServiceManagerConnection directly. -using ::google::cloud::servicemanagement_v1::ServiceManagerConnection; - -/// @deprecated Use -/// servicemanagement_v1::ServiceManagerLimitedErrorCountRetryPolicy directly. -using ::google::cloud::servicemanagement_v1:: - ServiceManagerLimitedErrorCountRetryPolicy; - -/// @deprecated Use servicemanagement_v1::ServiceManagerLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::servicemanagement_v1:: - ServiceManagerLimitedTimeRetryPolicy; - -/// @deprecated Use servicemanagement_v1::ServiceManagerRetryPolicy directly. -using ::google::cloud::servicemanagement_v1::ServiceManagerRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace servicemanagement -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEMANAGEMENT_SERVICE_MANAGER_CONNECTION_H diff --git a/google/cloud/servicemanagement/service_manager_connection_idempotency_policy.h b/google/cloud/servicemanagement/service_manager_connection_idempotency_policy.h deleted file mode 100644 index 5c412b37ad4f2..0000000000000 --- a/google/cloud/servicemanagement/service_manager_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/api/servicemanagement/v1/servicemanager.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEMANAGEMENT_SERVICE_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEMANAGEMENT_SERVICE_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/servicemanagement/v1/service_manager_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace servicemanagement { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// servicemanagement_v1::MakeDefaultServiceManagerConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::servicemanagement_v1:: - MakeDefaultServiceManagerConnectionIdempotencyPolicy; - -/// @deprecated Use -/// servicemanagement_v1::ServiceManagerConnectionIdempotencyPolicy directly. -using ::google::cloud::servicemanagement_v1:: - ServiceManagerConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace servicemanagement -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEMANAGEMENT_SERVICE_MANAGER_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/servicemanagement/service_manager_options.h b/google/cloud/servicemanagement/service_manager_options.h deleted file mode 100644 index 1e35150041d25..0000000000000 --- a/google/cloud/servicemanagement/service_manager_options.h +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/api/servicemanagement/v1/servicemanager.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEMANAGEMENT_SERVICE_MANAGER_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEMANAGEMENT_SERVICE_MANAGER_OPTIONS_H - -#include "google/cloud/servicemanagement/service_manager_connection.h" -#include "google/cloud/servicemanagement/service_manager_connection_idempotency_policy.h" -#include "google/cloud/servicemanagement/v1/service_manager_options.h" - -namespace google { -namespace cloud { -namespace servicemanagement { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use servicemanagement_v1::ServiceManagerPollingPolicyOption -/// directly. -using ::google::cloud::servicemanagement_v1::ServiceManagerPollingPolicyOption; - -/// @deprecated Use servicemanagement_v1::ServiceManagerBackoffPolicyOption -/// directly. -using ::google::cloud::servicemanagement_v1::ServiceManagerBackoffPolicyOption; - -/// @deprecated Use -/// servicemanagement_v1::ServiceManagerConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::servicemanagement_v1:: - ServiceManagerConnectionIdempotencyPolicyOption; - -/// @deprecated Use servicemanagement_v1::ServiceManagerPolicyOptionList -/// directly. -using ::google::cloud::servicemanagement_v1::ServiceManagerPolicyOptionList; - -/// @deprecated Use servicemanagement_v1::ServiceManagerRetryPolicyOption -/// directly. -using ::google::cloud::servicemanagement_v1::ServiceManagerRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace servicemanagement -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEMANAGEMENT_SERVICE_MANAGER_OPTIONS_H diff --git a/google/cloud/servicemanagement/v1/internal/service_manager_auth_decorator.cc b/google/cloud/servicemanagement/v1/internal/service_manager_auth_decorator.cc index 6afa8cf09e1f6..ef2e3858f19a2 100644 --- a/google/cloud/servicemanagement/v1/internal/service_manager_auth_decorator.cc +++ b/google/cloud/servicemanagement/v1/internal/service_manager_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/api/servicemanagement/v1/servicemanager.proto #include "google/cloud/servicemanagement/v1/internal/service_manager_auth_decorator.h" -#include +#include "google/api/servicemanagement/v1/servicemanager.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicemanagement_v1_internal { @@ -326,3 +329,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicemanagement_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicemanagement/v1/internal/service_manager_auth_decorator.h b/google/cloud/servicemanagement/v1/internal/service_manager_auth_decorator.h index 542f697b2ee82..20dd99dab2447 100644 --- a/google/cloud/servicemanagement/v1/internal/service_manager_auth_decorator.h +++ b/google/cloud/servicemanagement/v1/internal/service_manager_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/servicemanagement/v1/internal/service_manager_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicemanagement_v1_internal { @@ -180,4 +183,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEMANAGEMENT_V1_INTERNAL_SERVICE_MANAGER_AUTH_DECORATOR_H diff --git a/google/cloud/servicemanagement/v1/internal/service_manager_connection_impl.h b/google/cloud/servicemanagement/v1/internal/service_manager_connection_impl.h index 0bc6e894a8fb0..793db61363e76 100644 --- a/google/cloud/servicemanagement/v1/internal/service_manager_connection_impl.h +++ b/google/cloud/servicemanagement/v1/internal/service_manager_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/servicemanagement/v1/internal/service_manager_logging_decorator.cc b/google/cloud/servicemanagement/v1/internal/service_manager_logging_decorator.cc index 1f93d7baefdee..6dbbbb1b1bf31 100644 --- a/google/cloud/servicemanagement/v1/internal/service_manager_logging_decorator.cc +++ b/google/cloud/servicemanagement/v1/internal/service_manager_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/servicemanagement/v1/internal/service_manager_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/api/servicemanagement/v1/servicemanager.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicemanagement_v1_internal { @@ -397,3 +400,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicemanagement_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicemanagement/v1/internal/service_manager_logging_decorator.h b/google/cloud/servicemanagement/v1/internal/service_manager_logging_decorator.h index 0d7b9982ae8ba..16328967f334a 100644 --- a/google/cloud/servicemanagement/v1/internal/service_manager_logging_decorator.h +++ b/google/cloud/servicemanagement/v1/internal/service_manager_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/servicemanagement/v1/internal/service_manager_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicemanagement_v1_internal { @@ -180,4 +183,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEMANAGEMENT_V1_INTERNAL_SERVICE_MANAGER_LOGGING_DECORATOR_H diff --git a/google/cloud/servicemanagement/v1/internal/service_manager_metadata_decorator.cc b/google/cloud/servicemanagement/v1/internal/service_manager_metadata_decorator.cc index 5aa72efcbd0da..3c9b470ca6618 100644 --- a/google/cloud/servicemanagement/v1/internal/service_manager_metadata_decorator.cc +++ b/google/cloud/servicemanagement/v1/internal/service_manager_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/servicemanagement/v1/internal/service_manager_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/api/servicemanagement/v1/servicemanager.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicemanagement_v1_internal { @@ -316,3 +320,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicemanagement_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicemanagement/v1/internal/service_manager_metadata_decorator.h b/google/cloud/servicemanagement/v1/internal/service_manager_metadata_decorator.h index 389ff63765554..f33a8b502ad16 100644 --- a/google/cloud/servicemanagement/v1/internal/service_manager_metadata_decorator.h +++ b/google/cloud/servicemanagement/v1/internal/service_manager_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/servicemanagement/v1/internal/service_manager_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicemanagement_v1_internal { @@ -185,4 +188,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEMANAGEMENT_V1_INTERNAL_SERVICE_MANAGER_METADATA_DECORATOR_H diff --git a/google/cloud/servicemanagement/v1/internal/service_manager_option_defaults.cc b/google/cloud/servicemanagement/v1/internal/service_manager_option_defaults.cc index 40e6194bab7c5..56789cd620db8 100644 --- a/google/cloud/servicemanagement/v1/internal/service_manager_option_defaults.cc +++ b/google/cloud/servicemanagement/v1/internal/service_manager_option_defaults.cc @@ -42,7 +42,7 @@ Options ServiceManagerDefaultOptions(Options options) { if (!options.has()) { options.set( servicemanagement_v1::ServiceManagerLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/servicemanagement/v1/internal/service_manager_stub.cc b/google/cloud/servicemanagement/v1/internal/service_manager_stub.cc index 6504c930dfd4e..aefba9412e2cf 100644 --- a/google/cloud/servicemanagement/v1/internal/service_manager_stub.cc +++ b/google/cloud/servicemanagement/v1/internal/service_manager_stub.cc @@ -19,11 +19,14 @@ #include "google/cloud/servicemanagement/v1/internal/service_manager_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/api/servicemanagement/v1/servicemanager.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicemanagement_v1_internal { @@ -382,3 +385,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicemanagement_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicemanagement/v1/internal/service_manager_stub.h b/google/cloud/servicemanagement/v1/internal/service_manager_stub.h index 6d07b37103b53..0db5fecbb92c7 100644 --- a/google/cloud/servicemanagement/v1/internal/service_manager_stub.h +++ b/google/cloud/servicemanagement/v1/internal/service_manager_stub.h @@ -24,12 +24,15 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/api/servicemanagement/v1/servicemanager.grpc.pb.h" +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicemanagement_v1_internal { @@ -336,4 +339,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEMANAGEMENT_V1_INTERNAL_SERVICE_MANAGER_STUB_H diff --git a/google/cloud/servicemanagement/v1/internal/service_manager_stub_factory.cc b/google/cloud/servicemanagement/v1/internal/service_manager_stub_factory.cc index 4e9cae2222a10..89b90af98d5ad 100644 --- a/google/cloud/servicemanagement/v1/internal/service_manager_stub_factory.cc +++ b/google/cloud/servicemanagement/v1/internal/service_manager_stub_factory.cc @@ -28,12 +28,15 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/api/servicemanagement/v1/servicemanager.grpc.pb.h" +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicemanagement_v1_internal { @@ -74,3 +77,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicemanagement_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicemanagement/v1/internal/service_manager_stub_factory.h b/google/cloud/servicemanagement/v1/internal/service_manager_stub_factory.h index d14f0911bffe5..4ed2b722ab398 100644 --- a/google/cloud/servicemanagement/v1/internal/service_manager_stub_factory.h +++ b/google/cloud/servicemanagement/v1/internal/service_manager_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicemanagement_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEMANAGEMENT_V1_INTERNAL_SERVICE_MANAGER_STUB_FACTORY_H diff --git a/google/cloud/servicemanagement/v1/internal/service_manager_tracing_connection.cc b/google/cloud/servicemanagement/v1/internal/service_manager_tracing_connection.cc index 78f6e7dbf31dd..78dbe9ff946bd 100644 --- a/google/cloud/servicemanagement/v1/internal/service_manager_tracing_connection.cc +++ b/google/cloud/servicemanagement/v1/internal/service_manager_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace servicemanagement_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ServiceManagerTracingConnection::ServiceManagerTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -304,16 +302,12 @@ ServiceManagerTracingConnection::ListOperations( std::move(span), std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeServiceManagerTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/servicemanagement/v1/internal/service_manager_tracing_connection.h b/google/cloud/servicemanagement/v1/internal/service_manager_tracing_connection.h index 8917a041898a5..a87800590f365 100644 --- a/google/cloud/servicemanagement/v1/internal/service_manager_tracing_connection.h +++ b/google/cloud/servicemanagement/v1/internal/service_manager_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace servicemanagement_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ServiceManagerTracingConnection : public servicemanagement_v1::ServiceManagerConnection { public: @@ -154,8 +152,6 @@ class ServiceManagerTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/servicemanagement/v1/internal/service_manager_tracing_stub.cc b/google/cloud/servicemanagement/v1/internal/service_manager_tracing_stub.cc index ba441f08574e6..ba4f3a7164b4f 100644 --- a/google/cloud/servicemanagement/v1/internal/service_manager_tracing_stub.cc +++ b/google/cloud/servicemanagement/v1/internal/service_manager_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicemanagement_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ServiceManagerTracingStub::ServiceManagerTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -343,18 +344,14 @@ future ServiceManagerTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeServiceManagerTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace servicemanagement_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/servicemanagement/v1/internal/service_manager_tracing_stub.h b/google/cloud/servicemanagement/v1/internal/service_manager_tracing_stub.h index a8c37bbc0af6c..6a2c33c1382fc 100644 --- a/google/cloud/servicemanagement/v1/internal/service_manager_tracing_stub.h +++ b/google/cloud/servicemanagement/v1/internal/service_manager_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace servicemanagement_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ServiceManagerTracingStub : public ServiceManagerStub { public: ~ServiceManagerTracingStub() override = default; @@ -175,8 +176,6 @@ class ServiceManagerTracingStub : public ServiceManagerStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -191,4 +190,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEMANAGEMENT_V1_INTERNAL_SERVICE_MANAGER_TRACING_STUB_H diff --git a/google/cloud/servicemanagement/v1/service_manager_client.h b/google/cloud/servicemanagement/v1/service_manager_client.h index 610180f30c8f3..c6d315225a18f 100644 --- a/google/cloud/servicemanagement/v1/service_manager_client.h +++ b/google/cloud/servicemanagement/v1/service_manager_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/servicemanagement/v1/service_manager_connection.h b/google/cloud/servicemanagement/v1/service_manager_connection.h index 6730c69f11cda..6f6e1f8139ed9 100644 --- a/google/cloud/servicemanagement/v1/service_manager_connection.h +++ b/google/cloud/servicemanagement/v1/service_manager_connection.h @@ -30,8 +30,8 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/api/servicemanagement/v1/servicemanager.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/servicemanagement/v1/service_manager_connection_idempotency_policy.h b/google/cloud/servicemanagement/v1/service_manager_connection_idempotency_policy.h index 336837dc80807..187de47221a8c 100644 --- a/google/cloud/servicemanagement/v1/service_manager_connection_idempotency_policy.h +++ b/google/cloud/servicemanagement/v1/service_manager_connection_idempotency_policy.h @@ -21,9 +21,9 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/api/servicemanagement/v1/servicemanager.grpc.pb.h" +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/serviceusage/BUILD.bazel b/google/cloud/serviceusage/BUILD.bazel index 5c3a1505e99e0..2b6c4d93e0452 100644 --- a/google/cloud/serviceusage/BUILD.bazel +++ b/google/cloud/serviceusage/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/api/serviceusage/v1:serviceusage_cc_grpc", + "@googleapis//google/api/serviceusage/v1:serviceusage_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/serviceusage/CMakeLists.txt b/google/cloud/serviceusage/CMakeLists.txt index 3a3279574c25f..61a5e8ff9f12f 100644 --- a/google/cloud/serviceusage/CMakeLists.txt +++ b/google/cloud/serviceusage/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(serviceusage "Service Usage API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(serviceusage_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/serviceusage/mocks/mock_service_usage_connection.h b/google/cloud/serviceusage/mocks/mock_service_usage_connection.h deleted file mode 100644 index 80c811733a678..0000000000000 --- a/google/cloud/serviceusage/mocks/mock_service_usage_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/api/serviceusage/v1/serviceusage.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEUSAGE_MOCKS_MOCK_SERVICE_USAGE_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEUSAGE_MOCKS_MOCK_SERVICE_USAGE_CONNECTION_H - -#include "google/cloud/serviceusage/service_usage_connection.h" -#include "google/cloud/serviceusage/v1/mocks/mock_service_usage_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in serviceusage_v1_mocks instead of the aliases -/// defined in this namespace. -namespace serviceusage_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use serviceusage_v1_mocks::MockServiceUsageConnection directly. -using ::google::cloud::serviceusage_v1_mocks::MockServiceUsageConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace serviceusage_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEUSAGE_MOCKS_MOCK_SERVICE_USAGE_CONNECTION_H diff --git a/google/cloud/serviceusage/quickstart/.bazelrc b/google/cloud/serviceusage/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/serviceusage/quickstart/.bazelrc +++ b/google/cloud/serviceusage/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/serviceusage/quickstart/CMakeLists.txt b/google/cloud/serviceusage/quickstart/CMakeLists.txt index 0528474e1d8d3..5709906c42f89 100644 --- a/google/cloud/serviceusage/quickstart/CMakeLists.txt +++ b/google/cloud/serviceusage/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Service Usage API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-serviceusage-quickstart CXX) find_package(google_cloud_cpp_serviceusage REQUIRED) diff --git a/google/cloud/serviceusage/service_usage_client.h b/google/cloud/serviceusage/service_usage_client.h deleted file mode 100644 index 906b150bef6d6..0000000000000 --- a/google/cloud/serviceusage/service_usage_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/api/serviceusage/v1/serviceusage.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEUSAGE_SERVICE_USAGE_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEUSAGE_SERVICE_USAGE_CLIENT_H - -#include "google/cloud/serviceusage/service_usage_connection.h" -#include "google/cloud/serviceusage/v1/service_usage_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in serviceusage_v1 instead of the aliases defined in -/// this namespace. -namespace serviceusage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use serviceusage_v1::ServiceUsageClient directly. -using ::google::cloud::serviceusage_v1::ServiceUsageClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace serviceusage -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEUSAGE_SERVICE_USAGE_CLIENT_H diff --git a/google/cloud/serviceusage/service_usage_connection.h b/google/cloud/serviceusage/service_usage_connection.h deleted file mode 100644 index 77ad5fed3e003..0000000000000 --- a/google/cloud/serviceusage/service_usage_connection.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/api/serviceusage/v1/serviceusage.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEUSAGE_SERVICE_USAGE_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEUSAGE_SERVICE_USAGE_CONNECTION_H - -#include "google/cloud/serviceusage/service_usage_connection_idempotency_policy.h" -#include "google/cloud/serviceusage/v1/service_usage_connection.h" - -namespace google { -namespace cloud { -namespace serviceusage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use serviceusage_v1::MakeServiceUsageConnection directly. -using ::google::cloud::serviceusage_v1::MakeServiceUsageConnection; - -/// @deprecated Use serviceusage_v1::ServiceUsageConnection directly. -using ::google::cloud::serviceusage_v1::ServiceUsageConnection; - -/// @deprecated Use serviceusage_v1::ServiceUsageLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::serviceusage_v1:: - ServiceUsageLimitedErrorCountRetryPolicy; - -/// @deprecated Use serviceusage_v1::ServiceUsageLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::serviceusage_v1::ServiceUsageLimitedTimeRetryPolicy; - -/// @deprecated Use serviceusage_v1::ServiceUsageRetryPolicy directly. -using ::google::cloud::serviceusage_v1::ServiceUsageRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace serviceusage -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEUSAGE_SERVICE_USAGE_CONNECTION_H diff --git a/google/cloud/serviceusage/service_usage_connection_idempotency_policy.h b/google/cloud/serviceusage/service_usage_connection_idempotency_policy.h deleted file mode 100644 index fcd7db1f68abf..0000000000000 --- a/google/cloud/serviceusage/service_usage_connection_idempotency_policy.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/api/serviceusage/v1/serviceusage.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEUSAGE_SERVICE_USAGE_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEUSAGE_SERVICE_USAGE_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/serviceusage/v1/service_usage_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace serviceusage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// serviceusage_v1::MakeDefaultServiceUsageConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::serviceusage_v1:: - MakeDefaultServiceUsageConnectionIdempotencyPolicy; - -/// @deprecated Use serviceusage_v1::ServiceUsageConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::serviceusage_v1::ServiceUsageConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace serviceusage -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEUSAGE_SERVICE_USAGE_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/serviceusage/service_usage_options.h b/google/cloud/serviceusage/service_usage_options.h deleted file mode 100644 index 4734efbfae2cf..0000000000000 --- a/google/cloud/serviceusage/service_usage_options.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/api/serviceusage/v1/serviceusage.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEUSAGE_SERVICE_USAGE_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEUSAGE_SERVICE_USAGE_OPTIONS_H - -#include "google/cloud/serviceusage/service_usage_connection.h" -#include "google/cloud/serviceusage/service_usage_connection_idempotency_policy.h" -#include "google/cloud/serviceusage/v1/service_usage_options.h" - -namespace google { -namespace cloud { -namespace serviceusage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use serviceusage_v1::ServiceUsagePollingPolicyOption directly. -using ::google::cloud::serviceusage_v1::ServiceUsagePollingPolicyOption; - -/// @deprecated Use serviceusage_v1::ServiceUsageBackoffPolicyOption directly. -using ::google::cloud::serviceusage_v1::ServiceUsageBackoffPolicyOption; - -/// @deprecated Use -/// serviceusage_v1::ServiceUsageConnectionIdempotencyPolicyOption directly. -using ::google::cloud::serviceusage_v1:: - ServiceUsageConnectionIdempotencyPolicyOption; - -/// @deprecated Use serviceusage_v1::ServiceUsagePolicyOptionList directly. -using ::google::cloud::serviceusage_v1::ServiceUsagePolicyOptionList; - -/// @deprecated Use serviceusage_v1::ServiceUsageRetryPolicyOption directly. -using ::google::cloud::serviceusage_v1::ServiceUsageRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace serviceusage -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEUSAGE_SERVICE_USAGE_OPTIONS_H diff --git a/google/cloud/serviceusage/v1/internal/service_usage_auth_decorator.cc b/google/cloud/serviceusage/v1/internal/service_usage_auth_decorator.cc index 0a4032ac9d768..825f7f1340e8e 100644 --- a/google/cloud/serviceusage/v1/internal/service_usage_auth_decorator.cc +++ b/google/cloud/serviceusage/v1/internal/service_usage_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/api/serviceusage/v1/serviceusage.proto #include "google/cloud/serviceusage/v1/internal/service_usage_auth_decorator.h" -#include +#include "google/api/serviceusage/v1/serviceusage.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace serviceusage_v1_internal { @@ -198,3 +201,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace serviceusage_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/serviceusage/v1/internal/service_usage_auth_decorator.h b/google/cloud/serviceusage/v1/internal/service_usage_auth_decorator.h index 4f78fafbe0653..3057eb92c399d 100644 --- a/google/cloud/serviceusage/v1/internal/service_usage_auth_decorator.h +++ b/google/cloud/serviceusage/v1/internal/service_usage_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/serviceusage/v1/internal/service_usage_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace serviceusage_v1_internal { @@ -119,4 +122,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEUSAGE_V1_INTERNAL_SERVICE_USAGE_AUTH_DECORATOR_H diff --git a/google/cloud/serviceusage/v1/internal/service_usage_connection_impl.h b/google/cloud/serviceusage/v1/internal/service_usage_connection_impl.h index b3f0b3f595e59..160ba1e2a6b83 100644 --- a/google/cloud/serviceusage/v1/internal/service_usage_connection_impl.h +++ b/google/cloud/serviceusage/v1/internal/service_usage_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/serviceusage/v1/internal/service_usage_logging_decorator.cc b/google/cloud/serviceusage/v1/internal/service_usage_logging_decorator.cc index 6fe5a02501ba5..d788a5238a95a 100644 --- a/google/cloud/serviceusage/v1/internal/service_usage_logging_decorator.cc +++ b/google/cloud/serviceusage/v1/internal/service_usage_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/serviceusage/v1/internal/service_usage_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/api/serviceusage/v1/serviceusage.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace serviceusage_v1_internal { @@ -229,3 +232,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace serviceusage_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/serviceusage/v1/internal/service_usage_logging_decorator.h b/google/cloud/serviceusage/v1/internal/service_usage_logging_decorator.h index 3150b4a3548c9..3ed65b1464f33 100644 --- a/google/cloud/serviceusage/v1/internal/service_usage_logging_decorator.h +++ b/google/cloud/serviceusage/v1/internal/service_usage_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/serviceusage/v1/internal/service_usage_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace serviceusage_v1_internal { @@ -119,4 +122,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEUSAGE_V1_INTERNAL_SERVICE_USAGE_LOGGING_DECORATOR_H diff --git a/google/cloud/serviceusage/v1/internal/service_usage_metadata_decorator.cc b/google/cloud/serviceusage/v1/internal/service_usage_metadata_decorator.cc index b47374b8d7e36..ca370a8f7cd41 100644 --- a/google/cloud/serviceusage/v1/internal/service_usage_metadata_decorator.cc +++ b/google/cloud/serviceusage/v1/internal/service_usage_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/serviceusage/v1/internal/service_usage_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/api/serviceusage/v1/serviceusage.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace serviceusage_v1_internal { @@ -188,3 +192,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace serviceusage_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/serviceusage/v1/internal/service_usage_metadata_decorator.h b/google/cloud/serviceusage/v1/internal/service_usage_metadata_decorator.h index cf920c014fbda..b7b549eee3c9f 100644 --- a/google/cloud/serviceusage/v1/internal/service_usage_metadata_decorator.h +++ b/google/cloud/serviceusage/v1/internal/service_usage_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/serviceusage/v1/internal/service_usage_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace serviceusage_v1_internal { @@ -124,4 +127,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEUSAGE_V1_INTERNAL_SERVICE_USAGE_METADATA_DECORATOR_H diff --git a/google/cloud/serviceusage/v1/internal/service_usage_option_defaults.cc b/google/cloud/serviceusage/v1/internal/service_usage_option_defaults.cc index 95a9ac48bfd0a..137c1b3f97ad3 100644 --- a/google/cloud/serviceusage/v1/internal/service_usage_option_defaults.cc +++ b/google/cloud/serviceusage/v1/internal/service_usage_option_defaults.cc @@ -42,7 +42,7 @@ Options ServiceUsageDefaultOptions(Options options) { if (!options.has()) { options.set( serviceusage_v1::ServiceUsageLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/serviceusage/v1/internal/service_usage_stub.cc b/google/cloud/serviceusage/v1/internal/service_usage_stub.cc index 717c825848f99..d05881efe9012 100644 --- a/google/cloud/serviceusage/v1/internal/service_usage_stub.cc +++ b/google/cloud/serviceusage/v1/internal/service_usage_stub.cc @@ -19,11 +19,14 @@ #include "google/cloud/serviceusage/v1/internal/service_usage_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/api/serviceusage/v1/serviceusage.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace serviceusage_v1_internal { @@ -224,3 +227,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace serviceusage_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/serviceusage/v1/internal/service_usage_stub.h b/google/cloud/serviceusage/v1/internal/service_usage_stub.h index 48ebbc130f100..5f35142deafde 100644 --- a/google/cloud/serviceusage/v1/internal/service_usage_stub.h +++ b/google/cloud/serviceusage/v1/internal/service_usage_stub.h @@ -24,11 +24,14 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/api/serviceusage/v1/serviceusage.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace serviceusage_v1_internal { @@ -199,4 +202,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEUSAGE_V1_INTERNAL_SERVICE_USAGE_STUB_H diff --git a/google/cloud/serviceusage/v1/internal/service_usage_stub_factory.cc b/google/cloud/serviceusage/v1/internal/service_usage_stub_factory.cc index dd5099889271f..ed0471775ceac 100644 --- a/google/cloud/serviceusage/v1/internal/service_usage_stub_factory.cc +++ b/google/cloud/serviceusage/v1/internal/service_usage_stub_factory.cc @@ -28,11 +28,14 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/api/serviceusage/v1/serviceusage.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace serviceusage_v1_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace serviceusage_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/serviceusage/v1/internal/service_usage_stub_factory.h b/google/cloud/serviceusage/v1/internal/service_usage_stub_factory.h index ca2c9b5a38f88..e7b0db353dfdc 100644 --- a/google/cloud/serviceusage/v1/internal/service_usage_stub_factory.h +++ b/google/cloud/serviceusage/v1/internal/service_usage_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace serviceusage_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEUSAGE_V1_INTERNAL_SERVICE_USAGE_STUB_FACTORY_H diff --git a/google/cloud/serviceusage/v1/internal/service_usage_tracing_connection.cc b/google/cloud/serviceusage/v1/internal/service_usage_tracing_connection.cc index bc43e2f579aaa..e49e16b88adac 100644 --- a/google/cloud/serviceusage/v1/internal/service_usage_tracing_connection.cc +++ b/google/cloud/serviceusage/v1/internal/service_usage_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace serviceusage_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ServiceUsageTracingConnection::ServiceUsageTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -170,16 +168,12 @@ ServiceUsageTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeServiceUsageTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/serviceusage/v1/internal/service_usage_tracing_connection.h b/google/cloud/serviceusage/v1/internal/service_usage_tracing_connection.h index a209e18e344e4..0df975c58b391 100644 --- a/google/cloud/serviceusage/v1/internal/service_usage_tracing_connection.h +++ b/google/cloud/serviceusage/v1/internal/service_usage_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace serviceusage_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ServiceUsageTracingConnection : public serviceusage_v1::ServiceUsageConnection { public: @@ -97,8 +95,6 @@ class ServiceUsageTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/serviceusage/v1/internal/service_usage_tracing_stub.cc b/google/cloud/serviceusage/v1/internal/service_usage_tracing_stub.cc index 349cf6f8db76c..c59364e6c964e 100644 --- a/google/cloud/serviceusage/v1/internal/service_usage_tracing_stub.cc +++ b/google/cloud/serviceusage/v1/internal/service_usage_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace serviceusage_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ServiceUsageTracingStub::ServiceUsageTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -198,18 +199,14 @@ future ServiceUsageTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeServiceUsageTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace serviceusage_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/serviceusage/v1/internal/service_usage_tracing_stub.h b/google/cloud/serviceusage/v1/internal/service_usage_tracing_stub.h index 33a98ac435300..fa838e1f83d15 100644 --- a/google/cloud/serviceusage/v1/internal/service_usage_tracing_stub.h +++ b/google/cloud/serviceusage/v1/internal/service_usage_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace serviceusage_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ServiceUsageTracingStub : public ServiceUsageStub { public: ~ServiceUsageTracingStub() override = default; @@ -114,8 +115,6 @@ class ServiceUsageTracingStub : public ServiceUsageStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -130,4 +129,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SERVICEUSAGE_V1_INTERNAL_SERVICE_USAGE_TRACING_STUB_H diff --git a/google/cloud/serviceusage/v1/service_usage_client.h b/google/cloud/serviceusage/v1/service_usage_client.h index 356059d80b887..9b61116cf69d1 100644 --- a/google/cloud/serviceusage/v1/service_usage_client.h +++ b/google/cloud/serviceusage/v1/service_usage_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/serviceusage/v1/service_usage_connection.h b/google/cloud/serviceusage/v1/service_usage_connection.h index 57ac988d14c21..c993df8624b42 100644 --- a/google/cloud/serviceusage/v1/service_usage_connection.h +++ b/google/cloud/serviceusage/v1/service_usage_connection.h @@ -30,8 +30,8 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/api/serviceusage/v1/serviceusage.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/serviceusage/v1/service_usage_connection_idempotency_policy.h b/google/cloud/serviceusage/v1/service_usage_connection_idempotency_policy.h index f2162f9e3302f..25c21d08d3016 100644 --- a/google/cloud/serviceusage/v1/service_usage_connection_idempotency_policy.h +++ b/google/cloud/serviceusage/v1/service_usage_connection_idempotency_policy.h @@ -21,8 +21,8 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/api/serviceusage/v1/serviceusage.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/shell/BUILD.bazel b/google/cloud/shell/BUILD.bazel index 49ef335321bee..e6bbde2f1719f 100644 --- a/google/cloud/shell/BUILD.bazel +++ b/google/cloud/shell/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/shell/v1:shell_cc_grpc", + "@googleapis//google/cloud/shell/v1:shell_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/shell/CMakeLists.txt b/google/cloud/shell/CMakeLists.txt index 12d1523ba9af6..72fd1622b3b4c 100644 --- a/google/cloud/shell/CMakeLists.txt +++ b/google/cloud/shell/CMakeLists.txt @@ -16,8 +16,7 @@ include(GoogleCloudCppLibrary) -google_cloud_cpp_add_gapic_library(shell "Cloud Shell API" - SERVICE_DIRS "__EMPTY__" "v1/") +google_cloud_cpp_add_gapic_library(shell "Cloud Shell API" SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(shell_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/shell/cloud_shell_client.h b/google/cloud/shell/cloud_shell_client.h deleted file mode 100644 index 16192011c4790..0000000000000 --- a/google/cloud/shell/cloud_shell_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/shell/v1/cloudshell.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SHELL_CLOUD_SHELL_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SHELL_CLOUD_SHELL_CLIENT_H - -#include "google/cloud/shell/cloud_shell_connection.h" -#include "google/cloud/shell/v1/cloud_shell_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in shell_v1 instead of the aliases defined in -/// this namespace. -namespace shell { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use shell_v1::CloudShellServiceClient directly. -using ::google::cloud::shell_v1::CloudShellServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace shell -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SHELL_CLOUD_SHELL_CLIENT_H diff --git a/google/cloud/shell/cloud_shell_connection.h b/google/cloud/shell/cloud_shell_connection.h deleted file mode 100644 index 26ce2041839ba..0000000000000 --- a/google/cloud/shell/cloud_shell_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/shell/v1/cloudshell.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SHELL_CLOUD_SHELL_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SHELL_CLOUD_SHELL_CONNECTION_H - -#include "google/cloud/shell/cloud_shell_connection_idempotency_policy.h" -#include "google/cloud/shell/v1/cloud_shell_connection.h" - -namespace google { -namespace cloud { -namespace shell { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use shell_v1::MakeCloudShellServiceConnection directly. -using ::google::cloud::shell_v1::MakeCloudShellServiceConnection; - -/// @deprecated Use shell_v1::CloudShellServiceConnection directly. -using ::google::cloud::shell_v1::CloudShellServiceConnection; - -/// @deprecated Use shell_v1::CloudShellServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::shell_v1::CloudShellServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use shell_v1::CloudShellServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::shell_v1::CloudShellServiceLimitedTimeRetryPolicy; - -/// @deprecated Use shell_v1::CloudShellServiceRetryPolicy directly. -using ::google::cloud::shell_v1::CloudShellServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace shell -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SHELL_CLOUD_SHELL_CONNECTION_H diff --git a/google/cloud/shell/cloud_shell_connection_idempotency_policy.h b/google/cloud/shell/cloud_shell_connection_idempotency_policy.h deleted file mode 100644 index 4393ca675c9d3..0000000000000 --- a/google/cloud/shell/cloud_shell_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/shell/v1/cloudshell.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SHELL_CLOUD_SHELL_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SHELL_CLOUD_SHELL_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/shell/v1/cloud_shell_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace shell { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// shell_v1::MakeDefaultCloudShellServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::shell_v1:: - MakeDefaultCloudShellServiceConnectionIdempotencyPolicy; - -/// @deprecated Use shell_v1::CloudShellServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::shell_v1::CloudShellServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace shell -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SHELL_CLOUD_SHELL_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/shell/cloud_shell_options.h b/google/cloud/shell/cloud_shell_options.h deleted file mode 100644 index 17a96dad8c54f..0000000000000 --- a/google/cloud/shell/cloud_shell_options.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/shell/v1/cloudshell.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SHELL_CLOUD_SHELL_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SHELL_CLOUD_SHELL_OPTIONS_H - -#include "google/cloud/shell/cloud_shell_connection.h" -#include "google/cloud/shell/cloud_shell_connection_idempotency_policy.h" -#include "google/cloud/shell/v1/cloud_shell_options.h" - -namespace google { -namespace cloud { -namespace shell { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use shell_v1::CloudShellServicePollingPolicyOption directly. -using ::google::cloud::shell_v1::CloudShellServicePollingPolicyOption; - -/// @deprecated Use shell_v1::CloudShellServiceBackoffPolicyOption directly. -using ::google::cloud::shell_v1::CloudShellServiceBackoffPolicyOption; - -/// @deprecated Use shell_v1::CloudShellServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::shell_v1:: - CloudShellServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use shell_v1::CloudShellServicePolicyOptionList directly. -using ::google::cloud::shell_v1::CloudShellServicePolicyOptionList; - -/// @deprecated Use shell_v1::CloudShellServiceRetryPolicyOption directly. -using ::google::cloud::shell_v1::CloudShellServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace shell -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SHELL_CLOUD_SHELL_OPTIONS_H diff --git a/google/cloud/shell/mocks/mock_cloud_shell_connection.h b/google/cloud/shell/mocks/mock_cloud_shell_connection.h deleted file mode 100644 index 7fe8f7e8d5135..0000000000000 --- a/google/cloud/shell/mocks/mock_cloud_shell_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/shell/v1/cloudshell.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SHELL_MOCKS_MOCK_CLOUD_SHELL_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SHELL_MOCKS_MOCK_CLOUD_SHELL_CONNECTION_H - -#include "google/cloud/shell/cloud_shell_connection.h" -#include "google/cloud/shell/v1/mocks/mock_cloud_shell_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in shell_v1_mocks instead of the aliases -/// defined in this namespace. -namespace shell_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use shell_v1_mocks::MockCloudShellServiceConnection directly. -using ::google::cloud::shell_v1_mocks::MockCloudShellServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace shell_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SHELL_MOCKS_MOCK_CLOUD_SHELL_CONNECTION_H diff --git a/google/cloud/shell/quickstart/.bazelrc b/google/cloud/shell/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/shell/quickstart/.bazelrc +++ b/google/cloud/shell/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/shell/quickstart/CMakeLists.txt b/google/cloud/shell/quickstart/CMakeLists.txt index c4a06ff31edd8..0d7baa82ba0e5 100644 --- a/google/cloud/shell/quickstart/CMakeLists.txt +++ b/google/cloud/shell/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Shell API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-shell-quickstart CXX) find_package(google_cloud_cpp_shell REQUIRED) diff --git a/google/cloud/shell/v1/cloud_shell_client.h b/google/cloud/shell/v1/cloud_shell_client.h index 30c7dd604b081..5ff83bfb1bff5 100644 --- a/google/cloud/shell/v1/cloud_shell_client.h +++ b/google/cloud/shell/v1/cloud_shell_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/shell/v1/cloud_shell_connection.h b/google/cloud/shell/v1/cloud_shell_connection.h index aed82262ddea5..2cd391da2c49a 100644 --- a/google/cloud/shell/v1/cloud_shell_connection.h +++ b/google/cloud/shell/v1/cloud_shell_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SHELL_V1_CLOUD_SHELL_CONNECTION_H #include "google/cloud/shell/v1/cloud_shell_connection_idempotency_policy.h" +#include "google/cloud/shell/v1/cloudshell.pb.h" #include "google/cloud/shell/v1/internal/cloud_shell_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -29,8 +30,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/shell/v1/cloud_shell_connection_idempotency_policy.h b/google/cloud/shell/v1/cloud_shell_connection_idempotency_policy.h index a6b33729e2ed0..10940b4954703 100644 --- a/google/cloud/shell/v1/cloud_shell_connection_idempotency_policy.h +++ b/google/cloud/shell/v1/cloud_shell_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SHELL_V1_CLOUD_SHELL_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SHELL_V1_CLOUD_SHELL_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/shell/v1/cloudshell.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/shell/v1/internal/cloud_shell_auth_decorator.cc b/google/cloud/shell/v1/internal/cloud_shell_auth_decorator.cc index a743647351ce7..eaa47a8dae4d3 100644 --- a/google/cloud/shell/v1/internal/cloud_shell_auth_decorator.cc +++ b/google/cloud/shell/v1/internal/cloud_shell_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/shell/v1/cloudshell.proto #include "google/cloud/shell/v1/internal/cloud_shell_auth_decorator.h" -#include +#include "google/cloud/shell/v1/cloudshell.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace shell_v1_internal { @@ -194,3 +197,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace shell_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/shell/v1/internal/cloud_shell_auth_decorator.h b/google/cloud/shell/v1/internal/cloud_shell_auth_decorator.h index 088a3df6f32ac..7f80829467c90 100644 --- a/google/cloud/shell/v1/internal/cloud_shell_auth_decorator.h +++ b/google/cloud/shell/v1/internal/cloud_shell_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/shell/v1/internal/cloud_shell_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace shell_v1_internal { @@ -109,4 +112,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SHELL_V1_INTERNAL_CLOUD_SHELL_AUTH_DECORATOR_H diff --git a/google/cloud/shell/v1/internal/cloud_shell_connection_impl.h b/google/cloud/shell/v1/internal/cloud_shell_connection_impl.h index 0a49b3527da72..d5ede1ba54551 100644 --- a/google/cloud/shell/v1/internal/cloud_shell_connection_impl.h +++ b/google/cloud/shell/v1/internal/cloud_shell_connection_impl.h @@ -31,7 +31,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/shell/v1/internal/cloud_shell_logging_decorator.cc b/google/cloud/shell/v1/internal/cloud_shell_logging_decorator.cc index 27c942031b1f5..63ac86494744e 100644 --- a/google/cloud/shell/v1/internal/cloud_shell_logging_decorator.cc +++ b/google/cloud/shell/v1/internal/cloud_shell_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/shell/v1/cloudshell.proto #include "google/cloud/shell/v1/internal/cloud_shell_logging_decorator.h" +#include "google/cloud/shell/v1/cloudshell.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace shell_v1_internal { @@ -207,3 +210,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace shell_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/shell/v1/internal/cloud_shell_logging_decorator.h b/google/cloud/shell/v1/internal/cloud_shell_logging_decorator.h index de103279e3e28..542a7b0b2c30a 100644 --- a/google/cloud/shell/v1/internal/cloud_shell_logging_decorator.h +++ b/google/cloud/shell/v1/internal/cloud_shell_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/shell/v1/internal/cloud_shell_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace shell_v1_internal { @@ -109,4 +112,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SHELL_V1_INTERNAL_CLOUD_SHELL_LOGGING_DECORATOR_H diff --git a/google/cloud/shell/v1/internal/cloud_shell_metadata_decorator.cc b/google/cloud/shell/v1/internal/cloud_shell_metadata_decorator.cc index 30d24903ef250..abe49092f6a2a 100644 --- a/google/cloud/shell/v1/internal/cloud_shell_metadata_decorator.cc +++ b/google/cloud/shell/v1/internal/cloud_shell_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/shell/v1/cloudshell.proto #include "google/cloud/shell/v1/internal/cloud_shell_metadata_decorator.h" +#include "google/cloud/shell/v1/cloudshell.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace shell_v1_internal { @@ -181,3 +185,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace shell_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/shell/v1/internal/cloud_shell_metadata_decorator.h b/google/cloud/shell/v1/internal/cloud_shell_metadata_decorator.h index e9051d4aaab58..c035fd12b3586 100644 --- a/google/cloud/shell/v1/internal/cloud_shell_metadata_decorator.h +++ b/google/cloud/shell/v1/internal/cloud_shell_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/shell/v1/internal/cloud_shell_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace shell_v1_internal { @@ -115,4 +118,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SHELL_V1_INTERNAL_CLOUD_SHELL_METADATA_DECORATOR_H diff --git a/google/cloud/shell/v1/internal/cloud_shell_option_defaults.cc b/google/cloud/shell/v1/internal/cloud_shell_option_defaults.cc index ddb27ae7b9155..3a9875aac3806 100644 --- a/google/cloud/shell/v1/internal/cloud_shell_option_defaults.cc +++ b/google/cloud/shell/v1/internal/cloud_shell_option_defaults.cc @@ -42,7 +42,7 @@ Options CloudShellServiceDefaultOptions(Options options) { if (!options.has()) { options.set( shell_v1::CloudShellServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/shell/v1/internal/cloud_shell_stub.cc b/google/cloud/shell/v1/internal/cloud_shell_stub.cc index 8af6fc920f1b0..b0a8715da9d5a 100644 --- a/google/cloud/shell/v1/internal/cloud_shell_stub.cc +++ b/google/cloud/shell/v1/internal/cloud_shell_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/shell/v1/cloudshell.proto #include "google/cloud/shell/v1/internal/cloud_shell_stub.h" +#include "google/cloud/shell/v1/cloudshell.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace shell_v1_internal { @@ -207,3 +210,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace shell_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/shell/v1/internal/cloud_shell_stub.h b/google/cloud/shell/v1/internal/cloud_shell_stub.h index 05af3728101cf..ff1696ff2d6cd 100644 --- a/google/cloud/shell/v1/internal/cloud_shell_stub.h +++ b/google/cloud/shell/v1/internal/cloud_shell_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SHELL_V1_INTERNAL_CLOUD_SHELL_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SHELL_V1_INTERNAL_CLOUD_SHELL_STUB_H +#include "google/cloud/shell/v1/cloudshell.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace shell_v1_internal { @@ -180,4 +183,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SHELL_V1_INTERNAL_CLOUD_SHELL_STUB_H diff --git a/google/cloud/shell/v1/internal/cloud_shell_stub_factory.cc b/google/cloud/shell/v1/internal/cloud_shell_stub_factory.cc index 6dd87e4aa6503..991fea2f7d63c 100644 --- a/google/cloud/shell/v1/internal/cloud_shell_stub_factory.cc +++ b/google/cloud/shell/v1/internal/cloud_shell_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/shell/v1/cloudshell.proto #include "google/cloud/shell/v1/internal/cloud_shell_stub_factory.h" +#include "google/cloud/shell/v1/cloudshell.grpc.pb.h" #include "google/cloud/shell/v1/internal/cloud_shell_auth_decorator.h" #include "google/cloud/shell/v1/internal/cloud_shell_logging_decorator.h" #include "google/cloud/shell/v1/internal/cloud_shell_metadata_decorator.h" @@ -28,10 +29,12 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace shell_v1_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace shell_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/shell/v1/internal/cloud_shell_stub_factory.h b/google/cloud/shell/v1/internal/cloud_shell_stub_factory.h index c1a40a66cfdf7..70ae8735bb9f1 100644 --- a/google/cloud/shell/v1/internal/cloud_shell_stub_factory.h +++ b/google/cloud/shell/v1/internal/cloud_shell_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace shell_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SHELL_V1_INTERNAL_CLOUD_SHELL_STUB_FACTORY_H diff --git a/google/cloud/shell/v1/internal/cloud_shell_tracing_connection.cc b/google/cloud/shell/v1/internal/cloud_shell_tracing_connection.cc index 9dadcf10c557e..02ea117f21807 100644 --- a/google/cloud/shell/v1/internal/cloud_shell_tracing_connection.cc +++ b/google/cloud/shell/v1/internal/cloud_shell_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace shell_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudShellServiceTracingConnection::CloudShellServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -158,17 +156,13 @@ CloudShellServiceTracingConnection::RemovePublicKey( return internal::EndSpan(std::move(span), child_->RemovePublicKey(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCloudShellServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/shell/v1/internal/cloud_shell_tracing_connection.h b/google/cloud/shell/v1/internal/cloud_shell_tracing_connection.h index 14374d7da46ca..d9cdb82c18539 100644 --- a/google/cloud/shell/v1/internal/cloud_shell_tracing_connection.h +++ b/google/cloud/shell/v1/internal/cloud_shell_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace shell_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudShellServiceTracingConnection : public shell_v1::CloudShellServiceConnection { public: @@ -94,8 +92,6 @@ class CloudShellServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/shell/v1/internal/cloud_shell_tracing_stub.cc b/google/cloud/shell/v1/internal/cloud_shell_tracing_stub.cc index 0c8f5d3047a19..add115ea60775 100644 --- a/google/cloud/shell/v1/internal/cloud_shell_tracing_stub.cc +++ b/google/cloud/shell/v1/internal/cloud_shell_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace shell_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudShellServiceTracingStub::CloudShellServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -179,18 +180,14 @@ future CloudShellServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCloudShellServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace shell_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/shell/v1/internal/cloud_shell_tracing_stub.h b/google/cloud/shell/v1/internal/cloud_shell_tracing_stub.h index d71f6e3329fac..35391136e3f2a 100644 --- a/google/cloud/shell/v1/internal/cloud_shell_tracing_stub.h +++ b/google/cloud/shell/v1/internal/cloud_shell_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace shell_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudShellServiceTracingStub : public CloudShellServiceStub { public: ~CloudShellServiceTracingStub() override = default; @@ -105,8 +106,6 @@ class CloudShellServiceTracingStub : public CloudShellServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -121,4 +120,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SHELL_V1_INTERNAL_CLOUD_SHELL_TRACING_STUB_H diff --git a/google/cloud/spanner/BUILD.bazel b/google/cloud/spanner/BUILD.bazel index 97913dd76b11d..431a4bd588b69 100644 --- a/google/cloud/spanner/BUILD.bazel +++ b/google/cloud/spanner/BUILD.bazel @@ -40,16 +40,16 @@ cc_library( deps = [ "//:common", "//:grpc_utils", - "@com_google_absl//absl/container:fixed_array", - "@com_google_absl//absl/numeric:int128", - "@com_google_absl//absl/strings", - "@com_google_absl//absl/time", - "@com_google_googleapis//google/longrunning:longrunning_cc_grpc", - "@com_google_googleapis//google/spanner/admin/database/v1:database_cc_grpc", - "@com_google_googleapis//google/spanner/admin/instance/v1:instance_cc_grpc", - "@com_google_googleapis//google/spanner/v1:spanner_cc_grpc", + "@abseil-cpp//absl/container:fixed_array", + "@abseil-cpp//absl/numeric:int128", + "@abseil-cpp//absl/strings", + "@abseil-cpp//absl/time", + "@googleapis//google/longrunning:longrunning_cc_grpc", + "@googleapis//google/spanner/admin/database/v1:database_cc_grpc", + "@googleapis//google/spanner/admin/instance/v1:instance_cc_grpc", + "@googleapis//google/spanner/v1:spanner_cc_grpc", # Do not sort: grpc++ must come last - "@com_github_grpc_grpc//:grpc++", + "@grpc//:grpc++", ], ) @@ -87,7 +87,7 @@ cc_library( ":google_cloud_cpp_spanner", "//:common", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) @@ -104,23 +104,20 @@ cc_library( ":google_cloud_cpp_spanner_mocks", "//:common", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "//protos:system_includes", "//protos/google/cloud/spanner/testing:singer_cc_proto", - "@com_google_absl//absl/strings", - "@com_google_googletest//:gtest_main", + "@abseil-cpp//absl/strings", + "@googletest//:gtest_main", ], ) -# TODO(#3701): Delete this target after 2023-04-01. cc_library( name = "spanner_client_testing", testonly = True, - deprecation = """ - This target is deprecated and will be removed on or after 2023-04-01. More - info: https://github.com/googleapis/google-cloud-cpp/issues/3701 - """, tags = ["manual"], - visibility = ["//visibility:public"], + visibility = [ + ":__subpackages__", + "//:__pkg__", + ], deps = [":spanner_client_testing_private"], ) @@ -135,10 +132,9 @@ cc_library( "//google/cloud:google_cloud_cpp_mocks", "//google/cloud/testing_util:google_cloud_cpp_testing_grpc_private", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "//protos:system_includes", "//protos/google/cloud/spanner/testing:singer_cc_proto", - "@com_google_absl//absl/numeric:int128", - "@com_google_googletest//:gtest_main", + "@abseil-cpp//absl/numeric:int128", + "@googletest//:gtest_main", ], ) for test in spanner_client_unit_tests] diff --git a/google/cloud/spanner/CMakeLists.txt b/google/cloud/spanner/CMakeLists.txt index acb029537fecb..a4b54cf773fd7 100644 --- a/google/cloud/spanner/CMakeLists.txt +++ b/google/cloud/spanner/CMakeLists.txt @@ -88,7 +88,6 @@ add_library( admin/internal/instance_admin_tracing_connection.h admin/internal/instance_admin_tracing_stub.cc admin/internal/instance_admin_tracing_stub.h - admin/retry_traits.h backoff_policy.h backup.cc backup.h @@ -97,7 +96,6 @@ add_library( bytes.h client.cc client.h - client_options.h commit_options.cc commit_options.h commit_result.h @@ -108,20 +106,12 @@ add_library( create_instance_request_builder.h database.cc database.h - database_admin_client.cc - database_admin_client.h - database_admin_connection.cc - database_admin_connection.h date.h directed_read_replicas.h encryption_config.h iam_updater.h instance.cc instance.h - instance_admin_client.cc - instance_admin_client.h - instance_admin_connection.cc - instance_admin_connection.h internal/channel.h internal/connection_impl.cc internal/connection_impl.h @@ -363,8 +353,6 @@ if (GOOGLE_CLOUD_CPP_WITH_MOCKS) # cmake-format: sort admin/mocks/mock_database_admin_connection.h admin/mocks/mock_instance_admin_connection.h - mocks/mock_database_admin_connection.h - mocks/mock_instance_admin_connection.h mocks/mock_spanner_connection.h mocks/row.h) export_list_to_bazel("google_cloud_cpp_spanner_mocks.bzl" @@ -456,16 +444,11 @@ function (spanner_client_define_tests) # cmake-format: sort backup_test.cc bytes_test.cc - client_options_test.cc client_test.cc commit_options_test.cc connection_options_test.cc create_instance_request_builder_test.cc - database_admin_client_test.cc - database_admin_connection_test.cc database_test.cc - instance_admin_client_test.cc - instance_admin_connection_test.cc instance_test.cc internal/connection_impl_test.cc internal/database_admin_logging_test.cc diff --git a/google/cloud/spanner/README.md b/google/cloud/spanner/README.md index e02250f356a8a..01463c94475ca 100644 --- a/google/cloud/spanner/README.md +++ b/google/cloud/spanner/README.md @@ -18,6 +18,8 @@ this library. ```cc +#include "google/cloud/internal/disable_deprecation_warnings.inc" + #include "google/cloud/spanner/client.h" #include @@ -45,6 +47,7 @@ int main(int argc, char* argv[]) { return 0; } +#include "google/cloud/internal/diagnostics_pop.inc" ``` diff --git a/google/cloud/spanner/admin/database_admin_client.h b/google/cloud/spanner/admin/database_admin_client.h index ea7db34c66e35..f0d15993bb016 100644 --- a/google/cloud/spanner/admin/database_admin_client.h +++ b/google/cloud/spanner/admin/database_admin_client.h @@ -28,7 +28,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include @@ -2765,7 +2765,6 @@ class DatabaseAdminClient { }; GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace spanner_admin } // namespace cloud } // namespace google diff --git a/google/cloud/spanner/admin/database_admin_connection.h b/google/cloud/spanner/admin/database_admin_connection.h index 6437d3716673f..1d12c5d69d374 100644 --- a/google/cloud/spanner/admin/database_admin_connection.h +++ b/google/cloud/spanner/admin/database_admin_connection.h @@ -30,8 +30,8 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/spanner/admin/database/v1/spanner_database_admin.pb.h" #include namespace google { @@ -376,7 +376,6 @@ std::shared_ptr MakeDatabaseAdminConnection( Options options = {}); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace spanner_admin } // namespace cloud } // namespace google diff --git a/google/cloud/spanner/admin/database_admin_connection_idempotency_policy.h b/google/cloud/spanner/admin/database_admin_connection_idempotency_policy.h index e37f4113a9d48..768f1e9becf11 100644 --- a/google/cloud/spanner/admin/database_admin_connection_idempotency_policy.h +++ b/google/cloud/spanner/admin/database_admin_connection_idempotency_policy.h @@ -21,8 +21,8 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/spanner/admin/database/v1/spanner_database_admin.grpc.pb.h" #include namespace google { @@ -145,7 +145,6 @@ std::unique_ptr MakeDefaultDatabaseAdminConnectionIdempotencyPolicy(); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace spanner_admin } // namespace cloud } // namespace google diff --git a/google/cloud/spanner/admin/instance_admin_client.h b/google/cloud/spanner/admin/instance_admin_client.h index 62f14cd042d8f..553e5312d4e8c 100644 --- a/google/cloud/spanner/admin/instance_admin_client.h +++ b/google/cloud/spanner/admin/instance_admin_client.h @@ -28,7 +28,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include @@ -2842,7 +2842,6 @@ class InstanceAdminClient { }; GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace spanner_admin } // namespace cloud } // namespace google diff --git a/google/cloud/spanner/admin/instance_admin_connection.h b/google/cloud/spanner/admin/instance_admin_connection.h index 17b3e1ecdcf77..6b5393e914497 100644 --- a/google/cloud/spanner/admin/instance_admin_connection.h +++ b/google/cloud/spanner/admin/instance_admin_connection.h @@ -30,8 +30,8 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/spanner/admin/instance/v1/spanner_instance_admin.pb.h" #include namespace google { @@ -372,7 +372,6 @@ std::shared_ptr MakeInstanceAdminConnection( Options options = {}); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace spanner_admin } // namespace cloud } // namespace google diff --git a/google/cloud/spanner/admin/instance_admin_connection_idempotency_policy.h b/google/cloud/spanner/admin/instance_admin_connection_idempotency_policy.h index 09360562e83be..224d72de579a5 100644 --- a/google/cloud/spanner/admin/instance_admin_connection_idempotency_policy.h +++ b/google/cloud/spanner/admin/instance_admin_connection_idempotency_policy.h @@ -21,8 +21,8 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/spanner/admin/instance/v1/spanner_instance_admin.grpc.pb.h" #include namespace google { @@ -132,7 +132,6 @@ std::unique_ptr MakeDefaultInstanceAdminConnectionIdempotencyPolicy(); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace spanner_admin } // namespace cloud } // namespace google diff --git a/google/cloud/spanner/admin/integration_tests/BUILD.bazel b/google/cloud/spanner/admin/integration_tests/BUILD.bazel index affef991023c5..6f9755cdb236b 100644 --- a/google/cloud/spanner/admin/integration_tests/BUILD.bazel +++ b/google/cloud/spanner/admin/integration_tests/BUILD.bazel @@ -30,7 +30,7 @@ licenses(["notice"]) # Apache 2.0 "//:spanner", "//google/cloud/spanner:spanner_client_testing_private", "//google/cloud/testing_util:google_cloud_cpp_testing_grpc_private", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) for test in spanner_admin_integration_tests] @@ -46,6 +46,6 @@ licenses(["notice"]) # Apache 2.0 "//google/cloud/spanner:google_cloud_cpp_spanner_rest", "//google/cloud/spanner:spanner_client_testing_private", "//google/cloud/testing_util:google_cloud_cpp_testing_grpc_private", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) for test in spanner_admin_integration_tests_rest] diff --git a/google/cloud/spanner/admin/integration_tests/backup_extra_integration_test.cc b/google/cloud/spanner/admin/integration_tests/backup_extra_integration_test.cc index 595eacceadc1b..8e880f7fa88d7 100644 --- a/google/cloud/spanner/admin/integration_tests/backup_extra_integration_test.cc +++ b/google/cloud/spanner/admin/integration_tests/backup_extra_integration_test.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/admin/database_admin_client.h" #include "google/cloud/spanner/admin/database_admin_options.h" #include "google/cloud/spanner/admin/instance_admin_client.h" @@ -25,13 +25,13 @@ #include "google/cloud/spanner/testing/random_backup_name.h" #include "google/cloud/spanner/testing/random_database_name.h" #include "google/cloud/spanner/timestamp.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/internal/random.h" #include "google/cloud/kms_key_name.h" #include "google/cloud/testing_util/integration_test.h" #include "google/cloud/testing_util/status_matchers.h" #include "absl/strings/match.h" +#include "absl/strings/str_cat.h" #include "absl/time/time.h" #include #include @@ -541,3 +541,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner } // namespace cloud } // namespace google +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/admin/integration_tests/backup_integration_test.cc b/google/cloud/spanner/admin/integration_tests/backup_integration_test.cc index 3f60a31f53ee3..14085985883d5 100644 --- a/google/cloud/spanner/admin/integration_tests/backup_integration_test.cc +++ b/google/cloud/spanner/admin/integration_tests/backup_integration_test.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/admin/database_admin_client.h" #include "google/cloud/spanner/admin/database_admin_options.h" #include "google/cloud/spanner/backoff_policy.h" @@ -22,13 +22,13 @@ #include "google/cloud/spanner/testing/pick_random_instance.h" #include "google/cloud/spanner/testing/random_database_name.h" #include "google/cloud/spanner/timestamp.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/internal/random.h" #include "google/cloud/kms_key_name.h" #include "google/cloud/testing_util/integration_test.h" #include "google/cloud/testing_util/status_matchers.h" #include "absl/strings/match.h" +#include "absl/strings/str_cat.h" #include "absl/time/time.h" #include #include @@ -275,3 +275,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner } // namespace cloud } // namespace google +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/admin/integration_tests/database_admin_integration_test.cc b/google/cloud/spanner/admin/integration_tests/database_admin_integration_test.cc index d79c5c2afffa5..e73389092fac6 100644 --- a/google/cloud/spanner/admin/integration_tests/database_admin_integration_test.cc +++ b/google/cloud/spanner/admin/integration_tests/database_admin_integration_test.cc @@ -18,13 +18,13 @@ #include "google/cloud/spanner/testing/pick_random_instance.h" #include "google/cloud/spanner/testing/random_database_name.h" #include "google/cloud/spanner/timestamp.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/internal/random.h" #include "google/cloud/kms_key_name.h" #include "google/cloud/testing_util/integration_test.h" #include "google/cloud/testing_util/is_proto_equal.h" #include "google/cloud/testing_util/status_matchers.h" +#include "absl/strings/str_cat.h" #include namespace google { diff --git a/google/cloud/spanner/admin/internal/database_admin_auth_decorator.cc b/google/cloud/spanner/admin/internal/database_admin_auth_decorator.cc index 7a9effadf8b8a..c5028ce5aba04 100644 --- a/google/cloud/spanner/admin/internal/database_admin_auth_decorator.cc +++ b/google/cloud/spanner/admin/internal/database_admin_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/spanner/admin/database/v1/spanner_database_admin.proto #include "google/cloud/spanner/admin/internal/database_admin_auth_decorator.h" -#include +#include "google/spanner/admin/database/v1/spanner_database_admin.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_admin_internal { @@ -465,3 +468,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/spanner/admin/internal/database_admin_auth_decorator.h b/google/cloud/spanner/admin/internal/database_admin_auth_decorator.h index 2d2d8acb4cb3a..cc7e57140056d 100644 --- a/google/cloud/spanner/admin/internal/database_admin_auth_decorator.h +++ b/google/cloud/spanner/admin/internal/database_admin_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/spanner/admin/internal/database_admin_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_admin_internal { @@ -252,9 +255,10 @@ class DatabaseAdminAuth : public DatabaseAdminStub { }; GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace spanner_admin_internal } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_INTERNAL_DATABASE_ADMIN_AUTH_DECORATOR_H diff --git a/google/cloud/spanner/admin/internal/database_admin_connection_impl.h b/google/cloud/spanner/admin/internal/database_admin_connection_impl.h index ab6ab5b4d4a6c..263962aa5dac8 100644 --- a/google/cloud/spanner/admin/internal/database_admin_connection_impl.h +++ b/google/cloud/spanner/admin/internal/database_admin_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { @@ -233,7 +233,6 @@ class DatabaseAdminConnectionImpl }; GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace spanner_admin_internal } // namespace cloud } // namespace google diff --git a/google/cloud/spanner/admin/internal/database_admin_logging_decorator.cc b/google/cloud/spanner/admin/internal/database_admin_logging_decorator.cc index 2bf7d8a4aad50..22268bd02408e 100644 --- a/google/cloud/spanner/admin/internal/database_admin_logging_decorator.cc +++ b/google/cloud/spanner/admin/internal/database_admin_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/spanner/admin/internal/database_admin_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/spanner/admin/database/v1/spanner_database_admin.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_admin_internal { @@ -580,3 +583,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/spanner/admin/internal/database_admin_logging_decorator.h b/google/cloud/spanner/admin/internal/database_admin_logging_decorator.h index d32a38b9c7457..3686528711447 100644 --- a/google/cloud/spanner/admin/internal/database_admin_logging_decorator.h +++ b/google/cloud/spanner/admin/internal/database_admin_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/spanner/admin/internal/database_admin_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_admin_internal { @@ -252,9 +255,10 @@ class DatabaseAdminLogging : public DatabaseAdminStub { }; // DatabaseAdminLogging GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace spanner_admin_internal } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_INTERNAL_DATABASE_ADMIN_LOGGING_DECORATOR_H diff --git a/google/cloud/spanner/admin/internal/database_admin_metadata_decorator.cc b/google/cloud/spanner/admin/internal/database_admin_metadata_decorator.cc index 2a2f223d17bf7..b274e1262641e 100644 --- a/google/cloud/spanner/admin/internal/database_admin_metadata_decorator.cc +++ b/google/cloud/spanner/admin/internal/database_admin_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/spanner/admin/internal/database_admin_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/spanner/admin/database/v1/spanner_database_admin.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_admin_internal { @@ -444,3 +448,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/spanner/admin/internal/database_admin_metadata_decorator.h b/google/cloud/spanner/admin/internal/database_admin_metadata_decorator.h index ee9ebd142d999..291021dcbd0a8 100644 --- a/google/cloud/spanner/admin/internal/database_admin_metadata_decorator.h +++ b/google/cloud/spanner/admin/internal/database_admin_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/spanner/admin/internal/database_admin_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_admin_internal { @@ -257,9 +260,10 @@ class DatabaseAdminMetadata : public DatabaseAdminStub { }; GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace spanner_admin_internal } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_INTERNAL_DATABASE_ADMIN_METADATA_DECORATOR_H diff --git a/google/cloud/spanner/admin/internal/database_admin_option_defaults.cc b/google/cloud/spanner/admin/internal/database_admin_option_defaults.cc index 08058b74139d3..466cf7b27bed0 100644 --- a/google/cloud/spanner/admin/internal/database_admin_option_defaults.cc +++ b/google/cloud/spanner/admin/internal/database_admin_option_defaults.cc @@ -42,7 +42,7 @@ Options DatabaseAdminDefaultOptions(Options options) { if (!options.has()) { options.set( spanner_admin::DatabaseAdminLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/spanner/admin/internal/database_admin_option_defaults.h b/google/cloud/spanner/admin/internal/database_admin_option_defaults.h index 329f4e3e68add..e88462c78dee2 100644 --- a/google/cloud/spanner/admin/internal/database_admin_option_defaults.h +++ b/google/cloud/spanner/admin/internal/database_admin_option_defaults.h @@ -30,7 +30,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN Options DatabaseAdminDefaultOptions(Options options); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace spanner_admin_internal } // namespace cloud } // namespace google diff --git a/google/cloud/spanner/admin/internal/database_admin_rest_connection_impl.h b/google/cloud/spanner/admin/internal/database_admin_rest_connection_impl.h index a2b12feac3fd4..53ddc0a4ffa77 100644 --- a/google/cloud/spanner/admin/internal/database_admin_rest_connection_impl.h +++ b/google/cloud/spanner/admin/internal/database_admin_rest_connection_impl.h @@ -30,7 +30,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.pb.h" #include namespace google { diff --git a/google/cloud/spanner/admin/internal/database_admin_rest_logging_decorator.h b/google/cloud/spanner/admin/internal/database_admin_rest_logging_decorator.h index 6ffd3976fed32..236b25e842a6c 100644 --- a/google/cloud/spanner/admin/internal/database_admin_rest_logging_decorator.h +++ b/google/cloud/spanner/admin/internal/database_admin_rest_logging_decorator.h @@ -24,8 +24,8 @@ #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.pb.h" +#include "google/spanner/admin/database/v1/spanner_database_admin.pb.h" #include #include #include diff --git a/google/cloud/spanner/admin/internal/database_admin_rest_metadata_decorator.cc b/google/cloud/spanner/admin/internal/database_admin_rest_metadata_decorator.cc index b1de55b89970b..2555a46a01a1d 100644 --- a/google/cloud/spanner/admin/internal/database_admin_rest_metadata_decorator.cc +++ b/google/cloud/spanner/admin/internal/database_admin_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/spanner/admin/database/v1/spanner_database_admin.proto #include "google/cloud/spanner/admin/internal/database_admin_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/spanner/admin/internal/database_admin_rest_metadata_decorator.h b/google/cloud/spanner/admin/internal/database_admin_rest_metadata_decorator.h index de4a4ebce4dfd..9e51d91518bed 100644 --- a/google/cloud/spanner/admin/internal/database_admin_rest_metadata_decorator.h +++ b/google/cloud/spanner/admin/internal/database_admin_rest_metadata_decorator.h @@ -23,8 +23,8 @@ #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.pb.h" +#include "google/spanner/admin/database/v1/spanner_database_admin.pb.h" #include #include diff --git a/google/cloud/spanner/admin/internal/database_admin_rest_stub.cc b/google/cloud/spanner/admin/internal/database_admin_rest_stub.cc index 83ccbb0c35c0c..8d62a7950fe1d 100644 --- a/google/cloud/spanner/admin/internal/database_admin_rest_stub.cc +++ b/google/cloud/spanner/admin/internal/database_admin_rest_stub.cc @@ -18,11 +18,11 @@ #include "google/cloud/spanner/admin/internal/database_admin_rest_stub.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" +#include "google/longrunning/operations.pb.h" +#include "google/spanner/admin/database/v1/spanner_database_admin.pb.h" #include #include diff --git a/google/cloud/spanner/admin/internal/database_admin_rest_stub.h b/google/cloud/spanner/admin/internal/database_admin_rest_stub.h index 909157bc41860..c66257d16e824 100644 --- a/google/cloud/spanner/admin/internal/database_admin_rest_stub.h +++ b/google/cloud/spanner/admin/internal/database_admin_rest_stub.h @@ -24,8 +24,8 @@ #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.pb.h" +#include "google/spanner/admin/database/v1/spanner_database_admin.pb.h" #include namespace google { diff --git a/google/cloud/spanner/admin/internal/database_admin_stub.cc b/google/cloud/spanner/admin/internal/database_admin_stub.cc index b1f01bff5033a..462a09c786c25 100644 --- a/google/cloud/spanner/admin/internal/database_admin_stub.cc +++ b/google/cloud/spanner/admin/internal/database_admin_stub.cc @@ -19,11 +19,14 @@ #include "google/cloud/spanner/admin/internal/database_admin_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/spanner/admin/database/v1/spanner_database_admin.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_admin_internal { @@ -558,3 +561,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/spanner/admin/internal/database_admin_stub.h b/google/cloud/spanner/admin/internal/database_admin_stub.h index dc65472c5867a..257577406e046 100644 --- a/google/cloud/spanner/admin/internal/database_admin_stub.h +++ b/google/cloud/spanner/admin/internal/database_admin_stub.h @@ -24,11 +24,14 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/spanner/admin/database/v1/spanner_database_admin.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_admin_internal { @@ -479,9 +482,10 @@ class DefaultDatabaseAdminStub : public DatabaseAdminStub { }; GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace spanner_admin_internal } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_INTERNAL_DATABASE_ADMIN_STUB_H diff --git a/google/cloud/spanner/admin/internal/database_admin_stub_factory.cc b/google/cloud/spanner/admin/internal/database_admin_stub_factory.cc index a11c9d8b1535f..a442aa5bc1a1f 100644 --- a/google/cloud/spanner/admin/internal/database_admin_stub_factory.cc +++ b/google/cloud/spanner/admin/internal/database_admin_stub_factory.cc @@ -28,11 +28,14 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/spanner/admin/database/v1/spanner_database_admin.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_admin_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/spanner/admin/internal/database_admin_stub_factory.h b/google/cloud/spanner/admin/internal/database_admin_stub_factory.h index a93736a852a18..af198a5889359 100644 --- a/google/cloud/spanner/admin/internal/database_admin_stub_factory.h +++ b/google/cloud/spanner/admin/internal/database_admin_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_admin_internal { @@ -35,9 +38,10 @@ std::shared_ptr CreateDefaultDatabaseAdminStub( Options const& options); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace spanner_admin_internal } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_INTERNAL_DATABASE_ADMIN_STUB_FACTORY_H diff --git a/google/cloud/spanner/admin/internal/database_admin_tracing_connection.cc b/google/cloud/spanner/admin/internal/database_admin_tracing_connection.cc index e162841b83920..c6fb018613466 100644 --- a/google/cloud/spanner/admin/internal/database_admin_tracing_connection.cc +++ b/google/cloud/spanner/admin/internal/database_admin_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace spanner_admin_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DatabaseAdminTracingConnection::DatabaseAdminTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -450,16 +448,12 @@ Status DatabaseAdminTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDatabaseAdminTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/spanner/admin/internal/database_admin_tracing_connection.h b/google/cloud/spanner/admin/internal/database_admin_tracing_connection.h index e100b8543b75d..2375fc8e6438f 100644 --- a/google/cloud/spanner/admin/internal/database_admin_tracing_connection.h +++ b/google/cloud/spanner/admin/internal/database_admin_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace spanner_admin_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DatabaseAdminTracingConnection : public spanner_admin::DatabaseAdminConnection { public: @@ -218,8 +216,6 @@ class DatabaseAdminTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * @@ -231,7 +227,6 @@ MakeDatabaseAdminTracingConnection( std::shared_ptr conn); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace spanner_admin_internal } // namespace cloud } // namespace google diff --git a/google/cloud/spanner/admin/internal/database_admin_tracing_stub.cc b/google/cloud/spanner/admin/internal/database_admin_tracing_stub.cc index b196593eab748..0eb90aeff5cdb 100644 --- a/google/cloud/spanner/admin/internal/database_admin_tracing_stub.cc +++ b/google/cloud/spanner/admin/internal/database_admin_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_admin_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - DatabaseAdminTracingStub::DatabaseAdminTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -518,18 +519,14 @@ future DatabaseAdminTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeDatabaseAdminTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/spanner/admin/internal/database_admin_tracing_stub.h b/google/cloud/spanner/admin/internal/database_admin_tracing_stub.h index 713af527d5a30..e106172d008fb 100644 --- a/google/cloud/spanner/admin/internal/database_admin_tracing_stub.h +++ b/google/cloud/spanner/admin/internal/database_admin_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_admin_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class DatabaseAdminTracingStub : public DatabaseAdminStub { public: ~DatabaseAdminTracingStub() override = default; @@ -251,8 +252,6 @@ class DatabaseAdminTracingStub : public DatabaseAdminStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -263,9 +262,10 @@ std::shared_ptr MakeDatabaseAdminTracingStub( std::shared_ptr stub); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace spanner_admin_internal } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_INTERNAL_DATABASE_ADMIN_TRACING_STUB_H diff --git a/google/cloud/spanner/admin/internal/instance_admin_auth_decorator.cc b/google/cloud/spanner/admin/internal/instance_admin_auth_decorator.cc index fd72f79b6bdc0..371611e92e4b1 100644 --- a/google/cloud/spanner/admin/internal/instance_admin_auth_decorator.cc +++ b/google/cloud/spanner/admin/internal/instance_admin_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto #include "google/cloud/spanner/admin/internal/instance_admin_auth_decorator.h" -#include +#include "google/spanner/admin/instance/v1/spanner_instance_admin.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_admin_internal { @@ -448,3 +451,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/spanner/admin/internal/instance_admin_auth_decorator.h b/google/cloud/spanner/admin/internal/instance_admin_auth_decorator.h index 44de21d1dda76..98817cef21d54 100644 --- a/google/cloud/spanner/admin/internal/instance_admin_auth_decorator.h +++ b/google/cloud/spanner/admin/internal/instance_admin_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/spanner/admin/internal/instance_admin_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_admin_internal { @@ -233,9 +236,10 @@ class InstanceAdminAuth : public InstanceAdminStub { }; GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace spanner_admin_internal } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_INTERNAL_INSTANCE_ADMIN_AUTH_DECORATOR_H diff --git a/google/cloud/spanner/admin/internal/instance_admin_connection_impl.h b/google/cloud/spanner/admin/internal/instance_admin_connection_impl.h index 341b2a3ee10f6..bc818678ba1c0 100644 --- a/google/cloud/spanner/admin/internal/instance_admin_connection_impl.h +++ b/google/cloud/spanner/admin/internal/instance_admin_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { @@ -220,7 +220,6 @@ class InstanceAdminConnectionImpl }; GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace spanner_admin_internal } // namespace cloud } // namespace google diff --git a/google/cloud/spanner/admin/internal/instance_admin_logging_decorator.cc b/google/cloud/spanner/admin/internal/instance_admin_logging_decorator.cc index fc23fdae84002..8481a439eb0ff 100644 --- a/google/cloud/spanner/admin/internal/instance_admin_logging_decorator.cc +++ b/google/cloud/spanner/admin/internal/instance_admin_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/spanner/admin/internal/instance_admin_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/spanner/admin/instance/v1/spanner_instance_admin.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_admin_internal { @@ -539,3 +542,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/spanner/admin/internal/instance_admin_logging_decorator.h b/google/cloud/spanner/admin/internal/instance_admin_logging_decorator.h index e50a21b2be37e..dd1265ded979c 100644 --- a/google/cloud/spanner/admin/internal/instance_admin_logging_decorator.h +++ b/google/cloud/spanner/admin/internal/instance_admin_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/spanner/admin/internal/instance_admin_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_admin_internal { @@ -233,9 +236,10 @@ class InstanceAdminLogging : public InstanceAdminStub { }; // InstanceAdminLogging GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace spanner_admin_internal } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_INTERNAL_INSTANCE_ADMIN_LOGGING_DECORATOR_H diff --git a/google/cloud/spanner/admin/internal/instance_admin_metadata_decorator.cc b/google/cloud/spanner/admin/internal/instance_admin_metadata_decorator.cc index ececec6fa18dd..244b1d1599a01 100644 --- a/google/cloud/spanner/admin/internal/instance_admin_metadata_decorator.cc +++ b/google/cloud/spanner/admin/internal/instance_admin_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/spanner/admin/internal/instance_admin_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/spanner/admin/instance/v1/spanner_instance_admin.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_admin_internal { @@ -418,3 +422,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/spanner/admin/internal/instance_admin_metadata_decorator.h b/google/cloud/spanner/admin/internal/instance_admin_metadata_decorator.h index ba980eefaea01..4430f768021a6 100644 --- a/google/cloud/spanner/admin/internal/instance_admin_metadata_decorator.h +++ b/google/cloud/spanner/admin/internal/instance_admin_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/spanner/admin/internal/instance_admin_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_admin_internal { @@ -238,9 +241,10 @@ class InstanceAdminMetadata : public InstanceAdminStub { }; GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace spanner_admin_internal } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_INTERNAL_INSTANCE_ADMIN_METADATA_DECORATOR_H diff --git a/google/cloud/spanner/admin/internal/instance_admin_option_defaults.cc b/google/cloud/spanner/admin/internal/instance_admin_option_defaults.cc index f7e4e19c9f5a8..5fc9a272264d4 100644 --- a/google/cloud/spanner/admin/internal/instance_admin_option_defaults.cc +++ b/google/cloud/spanner/admin/internal/instance_admin_option_defaults.cc @@ -42,7 +42,7 @@ Options InstanceAdminDefaultOptions(Options options) { if (!options.has()) { options.set( spanner_admin::InstanceAdminLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/spanner/admin/internal/instance_admin_option_defaults.h b/google/cloud/spanner/admin/internal/instance_admin_option_defaults.h index bbdfe14c7d061..9890d8fcf9ecb 100644 --- a/google/cloud/spanner/admin/internal/instance_admin_option_defaults.h +++ b/google/cloud/spanner/admin/internal/instance_admin_option_defaults.h @@ -30,7 +30,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN Options InstanceAdminDefaultOptions(Options options); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace spanner_admin_internal } // namespace cloud } // namespace google diff --git a/google/cloud/spanner/admin/internal/instance_admin_rest_connection_impl.h b/google/cloud/spanner/admin/internal/instance_admin_rest_connection_impl.h index 4dc4af03a8ccb..59dac0328c462 100644 --- a/google/cloud/spanner/admin/internal/instance_admin_rest_connection_impl.h +++ b/google/cloud/spanner/admin/internal/instance_admin_rest_connection_impl.h @@ -30,7 +30,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.pb.h" #include namespace google { diff --git a/google/cloud/spanner/admin/internal/instance_admin_rest_logging_decorator.h b/google/cloud/spanner/admin/internal/instance_admin_rest_logging_decorator.h index 7e97c2d7b5945..43b9e2785ce4b 100644 --- a/google/cloud/spanner/admin/internal/instance_admin_rest_logging_decorator.h +++ b/google/cloud/spanner/admin/internal/instance_admin_rest_logging_decorator.h @@ -24,8 +24,8 @@ #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.pb.h" +#include "google/spanner/admin/instance/v1/spanner_instance_admin.pb.h" #include #include #include diff --git a/google/cloud/spanner/admin/internal/instance_admin_rest_metadata_decorator.cc b/google/cloud/spanner/admin/internal/instance_admin_rest_metadata_decorator.cc index 8217e0d5d4e95..d1fc1b42307e2 100644 --- a/google/cloud/spanner/admin/internal/instance_admin_rest_metadata_decorator.cc +++ b/google/cloud/spanner/admin/internal/instance_admin_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/spanner/admin/instance/v1/spanner_instance_admin.proto #include "google/cloud/spanner/admin/internal/instance_admin_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/spanner/admin/internal/instance_admin_rest_metadata_decorator.h b/google/cloud/spanner/admin/internal/instance_admin_rest_metadata_decorator.h index fc7bff64c6c9b..b2b9497e972e8 100644 --- a/google/cloud/spanner/admin/internal/instance_admin_rest_metadata_decorator.h +++ b/google/cloud/spanner/admin/internal/instance_admin_rest_metadata_decorator.h @@ -23,8 +23,8 @@ #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.pb.h" +#include "google/spanner/admin/instance/v1/spanner_instance_admin.pb.h" #include #include diff --git a/google/cloud/spanner/admin/internal/instance_admin_rest_stub.cc b/google/cloud/spanner/admin/internal/instance_admin_rest_stub.cc index c99ebe8c7859a..8c5597687f05c 100644 --- a/google/cloud/spanner/admin/internal/instance_admin_rest_stub.cc +++ b/google/cloud/spanner/admin/internal/instance_admin_rest_stub.cc @@ -18,11 +18,11 @@ #include "google/cloud/spanner/admin/internal/instance_admin_rest_stub.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include -#include +#include "absl/strings/str_cat.h" +#include "google/longrunning/operations.pb.h" +#include "google/spanner/admin/instance/v1/spanner_instance_admin.pb.h" #include #include diff --git a/google/cloud/spanner/admin/internal/instance_admin_rest_stub.h b/google/cloud/spanner/admin/internal/instance_admin_rest_stub.h index 969b72a42239d..5a5f91778ce61 100644 --- a/google/cloud/spanner/admin/internal/instance_admin_rest_stub.h +++ b/google/cloud/spanner/admin/internal/instance_admin_rest_stub.h @@ -24,8 +24,8 @@ #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.pb.h" +#include "google/spanner/admin/instance/v1/spanner_instance_admin.pb.h" #include namespace google { diff --git a/google/cloud/spanner/admin/internal/instance_admin_stub.cc b/google/cloud/spanner/admin/internal/instance_admin_stub.cc index ce1a3040e144d..d7ccf1403bd93 100644 --- a/google/cloud/spanner/admin/internal/instance_admin_stub.cc +++ b/google/cloud/spanner/admin/internal/instance_admin_stub.cc @@ -19,11 +19,14 @@ #include "google/cloud/spanner/admin/internal/instance_admin_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/spanner/admin/instance/v1/spanner_instance_admin.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_admin_internal { @@ -529,3 +532,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/spanner/admin/internal/instance_admin_stub.h b/google/cloud/spanner/admin/internal/instance_admin_stub.h index 539b05644915f..28c97cac41370 100644 --- a/google/cloud/spanner/admin/internal/instance_admin_stub.h +++ b/google/cloud/spanner/admin/internal/instance_admin_stub.h @@ -24,11 +24,14 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/spanner/admin/instance/v1/spanner_instance_admin.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_admin_internal { @@ -442,9 +445,10 @@ class DefaultInstanceAdminStub : public InstanceAdminStub { }; GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace spanner_admin_internal } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_INTERNAL_INSTANCE_ADMIN_STUB_H diff --git a/google/cloud/spanner/admin/internal/instance_admin_stub_factory.cc b/google/cloud/spanner/admin/internal/instance_admin_stub_factory.cc index 9e843bf4e3641..c2087c030fb66 100644 --- a/google/cloud/spanner/admin/internal/instance_admin_stub_factory.cc +++ b/google/cloud/spanner/admin/internal/instance_admin_stub_factory.cc @@ -28,11 +28,14 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/spanner/admin/instance/v1/spanner_instance_admin.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_admin_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/spanner/admin/internal/instance_admin_stub_factory.h b/google/cloud/spanner/admin/internal/instance_admin_stub_factory.h index 4b4aab76b51cb..5b1a943452a8f 100644 --- a/google/cloud/spanner/admin/internal/instance_admin_stub_factory.h +++ b/google/cloud/spanner/admin/internal/instance_admin_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_admin_internal { @@ -35,9 +38,10 @@ std::shared_ptr CreateDefaultInstanceAdminStub( Options const& options); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace spanner_admin_internal } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_INTERNAL_INSTANCE_ADMIN_STUB_FACTORY_H diff --git a/google/cloud/spanner/admin/internal/instance_admin_tracing_connection.cc b/google/cloud/spanner/admin/internal/instance_admin_tracing_connection.cc index b107fccbcb89c..a09f84d2791e2 100644 --- a/google/cloud/spanner/admin/internal/instance_admin_tracing_connection.cc +++ b/google/cloud/spanner/admin/internal/instance_admin_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace spanner_admin_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - InstanceAdminTracingConnection::InstanceAdminTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -434,16 +432,12 @@ Status InstanceAdminTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeInstanceAdminTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/spanner/admin/internal/instance_admin_tracing_connection.h b/google/cloud/spanner/admin/internal/instance_admin_tracing_connection.h index 688ccd004bbe7..3ffbca5738a1c 100644 --- a/google/cloud/spanner/admin/internal/instance_admin_tracing_connection.h +++ b/google/cloud/spanner/admin/internal/instance_admin_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace spanner_admin_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class InstanceAdminTracingConnection : public spanner_admin::InstanceAdminConnection { public: @@ -205,8 +203,6 @@ class InstanceAdminTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * @@ -218,7 +214,6 @@ MakeInstanceAdminTracingConnection( std::shared_ptr conn); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace spanner_admin_internal } // namespace cloud } // namespace google diff --git a/google/cloud/spanner/admin/internal/instance_admin_tracing_stub.cc b/google/cloud/spanner/admin/internal/instance_admin_tracing_stub.cc index 5aa8b0d3eeeb8..ab89ef745e944 100644 --- a/google/cloud/spanner/admin/internal/instance_admin_tracing_stub.cc +++ b/google/cloud/spanner/admin/internal/instance_admin_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_admin_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - InstanceAdminTracingStub::InstanceAdminTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -492,18 +493,14 @@ future InstanceAdminTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeInstanceAdminTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner_admin_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/spanner/admin/internal/instance_admin_tracing_stub.h b/google/cloud/spanner/admin/internal/instance_admin_tracing_stub.h index 7e24e58a73094..d5855f294b0b0 100644 --- a/google/cloud/spanner/admin/internal/instance_admin_tracing_stub.h +++ b/google/cloud/spanner/admin/internal/instance_admin_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_admin_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class InstanceAdminTracingStub : public InstanceAdminStub { public: ~InstanceAdminTracingStub() override = default; @@ -232,8 +233,6 @@ class InstanceAdminTracingStub : public InstanceAdminStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -244,9 +243,10 @@ std::shared_ptr MakeInstanceAdminTracingStub( std::shared_ptr stub); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace spanner_admin_internal } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_INTERNAL_INSTANCE_ADMIN_TRACING_STUB_H diff --git a/google/cloud/spanner/admin/retry_traits.h b/google/cloud/spanner/admin/retry_traits.h deleted file mode 100644 index c0460f752763d..0000000000000 --- a/google/cloud/spanner/admin/retry_traits.h +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_RETRY_TRAITS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_RETRY_TRAITS_H - -#include "google/cloud/spanner/admin/internal/database_admin_retry_traits.h" -#include "google/cloud/spanner/admin/internal/instance_admin_retry_traits.h" -#warning "This header is deprecated, it provided internal-only symbols" - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_ADMIN_RETRY_TRAITS_H diff --git a/google/cloud/spanner/benchmarks/BUILD.bazel b/google/cloud/spanner/benchmarks/BUILD.bazel index 69b5801d80a7c..359a4783dbac1 100644 --- a/google/cloud/spanner/benchmarks/BUILD.bazel +++ b/google/cloud/spanner/benchmarks/BUILD.bazel @@ -30,7 +30,7 @@ cc_library( "//:spanner_mocks", "//google/cloud/spanner:spanner_client_testing_private", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) diff --git a/google/cloud/spanner/benchmarks/multiple_rows_cpu_benchmark.cc b/google/cloud/spanner/benchmarks/multiple_rows_cpu_benchmark.cc index c97c92d158068..edfd09d82e1e6 100644 --- a/google/cloud/spanner/benchmarks/multiple_rows_cpu_benchmark.cc +++ b/google/cloud/spanner/benchmarks/multiple_rows_cpu_benchmark.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/admin/database_admin_client.h" #include "google/cloud/spanner/benchmarks/benchmarks_config.h" #include "google/cloud/spanner/client.h" @@ -23,13 +23,13 @@ #include "google/cloud/spanner/testing/random_database_name.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/internal/random.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/testing_util/timer.h" +#include "absl/strings/str_cat.h" #include "absl/time/civil_time.h" -#include +#include "google/spanner/v1/result_set.pb.h" #include #include #include @@ -1434,3 +1434,4 @@ int main(int argc, char* argv[]) { : "database dropped\n"); return exit_status; } +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/benchmarks/single_row_throughput_benchmark.cc b/google/cloud/spanner/benchmarks/single_row_throughput_benchmark.cc index a6e1456b2f7b7..115d324d601bc 100644 --- a/google/cloud/spanner/benchmarks/single_row_throughput_benchmark.cc +++ b/google/cloud/spanner/benchmarks/single_row_throughput_benchmark.cc @@ -11,16 +11,16 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/admin/database_admin_client.h" #include "google/cloud/spanner/benchmarks/benchmarks_config.h" #include "google/cloud/spanner/client.h" #include "google/cloud/spanner/testing/pick_random_instance.h" #include "google/cloud/spanner/testing/random_database_name.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/internal/random.h" +#include "absl/strings/str_cat.h" #include #include #include @@ -511,3 +511,4 @@ int main(int argc, char* argv[]) { : "database dropped\n"); return 0; } +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/client.cc b/google/cloud/spanner/client.cc index 03a04dd965fed..210e03858858c 100644 --- a/google/cloud/spanner/client.cc +++ b/google/cloud/spanner/client.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/client.h" #include "google/cloud/spanner/internal/connection_impl.h" #include "google/cloud/spanner/internal/spanner_stub_factory.h" @@ -432,3 +432,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner } // namespace cloud } // namespace google +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/client.h b/google/cloud/spanner/client.h index d87f459f724e3..af5b64d8872f6 100644 --- a/google/cloud/spanner/client.h +++ b/google/cloud/spanner/client.h @@ -16,7 +16,6 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_CLIENT_H #include "google/cloud/spanner/batch_dml_result.h" -#include "google/cloud/spanner/client_options.h" #include "google/cloud/spanner/commit_options.h" #include "google/cloud/spanner/commit_result.h" #include "google/cloud/spanner/connection.h" @@ -41,7 +40,7 @@ #include "google/cloud/options.h" #include "google/cloud/status.h" #include "google/cloud/status_or.h" -#include +#include "google/spanner/v1/spanner.pb.h" #include #include #include @@ -717,15 +716,6 @@ class Client { StatusOr ExecutePartitionedDml(SqlStatement statement, Options opts = {}); - ///@{ - /// @name Backwards compatibility for ClientOptions. - explicit Client(std::shared_ptr conn, ClientOptions const& opts) - : Client(std::move(conn), Options(opts)) {} - explicit Client(std::shared_ptr conn, - std::initializer_list) - : Client(std::move(conn)) {} - ///@} - ///@{ /// @name Backwards compatibility for ReadOptions. /** diff --git a/google/cloud/spanner/client_options.cc b/google/cloud/spanner/client_options.cc deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/google/cloud/spanner/client_options.h b/google/cloud/spanner/client_options.h deleted file mode 100644 index 05b383f979d35..0000000000000 --- a/google/cloud/spanner/client_options.h +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_CLIENT_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_CLIENT_OPTIONS_H - -#include "google/cloud/spanner/query_options.h" -#include "google/cloud/spanner/version.h" -#include "google/cloud/options.h" - -namespace google { -namespace cloud { -namespace spanner { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/** - * ClientOptions allows the caller to set a variety of options when - * constructing a `Client` instance. - * - * @deprecated Use [`Options`](@ref google::cloud::Options) instead, - * and set (as needed) - * [`QueryOptimizerVersionOption`]( - * @ref google::cloud::spanner::QueryOptimizerVersionOption), - * [`QueryOptimizerStatisticsPackageOption`]( - * @ref google::cloud::spanner::QueryOptimizerStatisticsPackageOption), - * [`RequestPriorityOption`]( - * @ref google::cloud::spanner::RequestPriorityOption), or - * [`RequestTagOption`]( - * @ref google::cloud::spanner::RequestTagOption). - */ -class ClientOptions { - public: - ClientOptions() = default; - ClientOptions(ClientOptions const&) = default; - ClientOptions& operator=(ClientOptions const&) = default; - ClientOptions(ClientOptions&&) = default; - ClientOptions& operator=(ClientOptions&&) = default; - - /** - * Convert the `ClientOptions` to the new, recommended way to represent - * options of all varieties, `google::cloud::Options`. - */ - explicit operator Options() const { return Options(query_options_); } - - /// Returns the `QueryOptions` - QueryOptions const& query_options() const { return query_options_; } - - /// Sets the `QueryOptions` - ClientOptions& set_query_options(QueryOptions qo) { - query_options_ = std::move(qo); - return *this; - } - - friend bool operator==(ClientOptions const& a, ClientOptions const& b) { - return a.query_options_ == b.query_options_; - } - - friend bool operator!=(ClientOptions const& a, ClientOptions const& b) { - return !(a == b); - } - - private: - QueryOptions query_options_; -}; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace spanner -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_CLIENT_OPTIONS_H diff --git a/google/cloud/spanner/client_options_test.cc b/google/cloud/spanner/client_options_test.cc deleted file mode 100644 index 0fb24f2896570..0000000000000 --- a/google/cloud/spanner/client_options_test.cc +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/spanner/client_options.h" -#include "google/cloud/spanner/options.h" -#include "google/cloud/spanner/query_options.h" -#include "google/cloud/spanner/version.h" -#include - -namespace google { -namespace cloud { -namespace spanner { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -TEST(ClientOptionsTest, OptimizerVersion) { - ClientOptions const default_constructed{}; - EXPECT_EQ(QueryOptions{}, default_constructed.query_options()); - - auto copy = default_constructed; - EXPECT_EQ(copy, default_constructed); - - copy.set_query_options(QueryOptions{}.set_optimizer_version("foo")); - EXPECT_NE(copy, default_constructed); - - copy.set_query_options(QueryOptions{}); - EXPECT_EQ(copy, default_constructed); -} - -TEST(ClientOptionsTest, OptionsConversionEmpty) { - ClientOptions const client_options; - auto const options = Options(client_options); - EXPECT_FALSE(options.has()); - EXPECT_FALSE(options.has()); - EXPECT_FALSE(options.has()); - EXPECT_FALSE(options.has()); -} - -TEST(ClientOptionsTest, OptionsConversionFull) { - auto query_options = QueryOptions{} - .set_optimizer_version("1") - .set_optimizer_statistics_package("latest") - .set_request_priority(RequestPriority::kHigh) - .set_request_tag("tag"); - ClientOptions client_options; - client_options.set_query_options(std::move(query_options)); - auto const options = Options(client_options); - EXPECT_TRUE(options.has()); - EXPECT_EQ(options.get(), "1"); - EXPECT_TRUE(options.has()); - EXPECT_EQ(options.get(), "latest"); - EXPECT_TRUE(options.has()); - EXPECT_EQ(options.get(), RequestPriority::kHigh); - EXPECT_TRUE(options.has()); - EXPECT_EQ(options.get(), "tag"); -} - -} // namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace spanner -} // namespace cloud -} // namespace google diff --git a/google/cloud/spanner/client_test.cc b/google/cloud/spanner/client_test.cc index 6f628eb43c9bc..7d642c99dd7f8 100644 --- a/google/cloud/spanner/client_test.cc +++ b/google/cloud/spanner/client_test.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/client.h" #include "google/cloud/mocks/mock_stream_range.h" #include "google/cloud/spanner/connection.h" @@ -1313,26 +1313,6 @@ TEST(ClientTest, UsesConnectionOptions) { EXPECT_STATUS_OK(rollback); } -TEST(ClientTest, UsesClientOptions) { - auto conn = std::make_shared(); - auto txn = MakeReadWriteTransaction(); - - EXPECT_CALL(*conn, options).WillOnce([] { - return Options{}.set("connection"); - }); - EXPECT_CALL(*conn, Rollback) - .WillOnce([txn](Connection::RollbackParams const& params) { - auto const& options = internal::CurrentOptions(); - EXPECT_THAT(options.get(), Eq("client")); - EXPECT_THAT(params.transaction, Eq(txn)); - return Status(); - }); - - Client client(conn, Options{}.set("client")); - auto rollback = client.Rollback(txn, Options{}); - EXPECT_STATUS_OK(rollback); -} - TEST(ClientTest, UsesOperationOptions) { auto conn = std::make_shared(); auto txn = MakeReadWriteTransaction(); @@ -1359,3 +1339,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner } // namespace cloud } // namespace google +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/commit_options.cc b/google/cloud/spanner/commit_options.cc index 804b40908f0bf..0291668647d2a 100644 --- a/google/cloud/spanner/commit_options.cc +++ b/google/cloud/spanner/commit_options.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/commit_options.h" #include "google/cloud/spanner/options.h" @@ -48,3 +48,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner } // namespace cloud } // namespace google +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/connection.cc b/google/cloud/spanner/connection.cc index 9a3352f68901a..8c7309423b4c3 100644 --- a/google/cloud/spanner/connection.cc +++ b/google/cloud/spanner/connection.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/connection.h" #include "google/cloud/spanner/query_partition.h" #include "google/cloud/spanner/read_partition.h" @@ -115,3 +115,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner } // namespace cloud } // namespace google +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/connection_options.cc b/google/cloud/spanner/connection_options.cc index 43e52ac3abe1c..a1c41b0aaae17 100644 --- a/google/cloud/spanner/connection_options.cc +++ b/google/cloud/spanner/connection_options.cc @@ -16,9 +16,9 @@ #include "google/cloud/spanner/internal/defaults.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/internal/user_agent_prefix.h" +#include "absl/strings/str_join.h" namespace google { namespace cloud { diff --git a/google/cloud/spanner/create_instance_request_builder.h b/google/cloud/spanner/create_instance_request_builder.h index 4749192a45bd3..241ada42450d4 100644 --- a/google/cloud/spanner/create_instance_request_builder.h +++ b/google/cloud/spanner/create_instance_request_builder.h @@ -17,8 +17,8 @@ #include "google/cloud/spanner/instance.h" #include "google/cloud/spanner/version.h" +#include "google/spanner/admin/instance/v1/spanner_instance_admin.pb.h" #include -#include #include #include diff --git a/google/cloud/spanner/database_admin_client.cc b/google/cloud/spanner/database_admin_client.cc deleted file mode 100644 index 60a21f2e65faa..0000000000000 --- a/google/cloud/spanner/database_admin_client.cc +++ /dev/null @@ -1,252 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// TODO(#7356): Remove this file after the deprecation period expires -#include "google/cloud/internal/disable_deprecation_warnings.inc" -#include "google/cloud/spanner/database_admin_client.h" -#include "google/cloud/spanner/timestamp.h" -#include "google/cloud/options.h" -#include - -namespace google { -namespace cloud { -namespace spanner { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -namespace gsad = ::google::spanner::admin::database; - -DatabaseAdminClient::DatabaseAdminClient(ConnectionOptions const& options) - : conn_(MakeDatabaseAdminConnection(options)) {} - -future> DatabaseAdminClient::CreateDatabase( - Database db, std::vector extra_statements, - EncryptionConfig encryption_config) { - internal::OptionsSpan span(conn_->options()); - return conn_->CreateDatabase({std::move(db), std::move(extra_statements), - std::move(encryption_config)}); -} - -StatusOr DatabaseAdminClient::GetDatabase(Database db) { - internal::OptionsSpan span(conn_->options()); - return conn_->GetDatabase({std::move(db)}); -} - -StatusOr DatabaseAdminClient::GetDatabaseDdl( - Database db) { - internal::OptionsSpan span(conn_->options()); - return conn_->GetDatabaseDdl({std::move(db)}); -} - -future> -DatabaseAdminClient::UpdateDatabase(Database db, - std::vector statements) { - internal::OptionsSpan span(conn_->options()); - return conn_->UpdateDatabase({std::move(db), std::move(statements)}); -} - -ListDatabaseRange DatabaseAdminClient::ListDatabases(Instance in) { - internal::OptionsSpan span(conn_->options()); - return conn_->ListDatabases({std::move(in)}); -} - -Status DatabaseAdminClient::DropDatabase(Database db) { - internal::OptionsSpan span(conn_->options()); - return conn_->DropDatabase({std::move(db)}); -} - -future> DatabaseAdminClient::RestoreDatabase( - Database db, Backup const& backup, EncryptionConfig encryption_config) { - internal::OptionsSpan span(conn_->options()); - return conn_->RestoreDatabase( - {std::move(db), backup.FullName(), std::move(encryption_config)}); -} - -future> DatabaseAdminClient::RestoreDatabase( - Database db, google::spanner::admin::database::v1::Backup const& backup, - EncryptionConfig encryption_config) { - internal::OptionsSpan span(conn_->options()); - return conn_->RestoreDatabase( - {std::move(db), backup.name(), std::move(encryption_config)}); -} - -StatusOr DatabaseAdminClient::GetIamPolicy( - Database db) { - internal::OptionsSpan span(conn_->options()); - return conn_->GetIamPolicy({std::move(db)}); -} - -StatusOr DatabaseAdminClient::SetIamPolicy( - Database db, google::iam::v1::Policy policy) { - internal::OptionsSpan span(conn_->options()); - return conn_->SetIamPolicy({std::move(db), std::move(policy)}); -} - -StatusOr DatabaseAdminClient::SetIamPolicy( - Database const& db, IamUpdater const& updater) { - auto const rerun_maximum_duration = std::chrono::minutes(15); - auto default_rerun_policy = - LimitedTimeTransactionRerunPolicy(rerun_maximum_duration).clone(); - - auto const backoff_initial_delay = std::chrono::milliseconds(1000); - auto const backoff_maximum_delay = std::chrono::minutes(5); - auto const backoff_scaling = 2.0; - auto default_backoff_policy = - ExponentialBackoffPolicy(backoff_initial_delay, backoff_maximum_delay, - backoff_scaling) - .clone(); - - return SetIamPolicy(db, updater, std::move(default_rerun_policy), - std::move(default_backoff_policy)); -} - -StatusOr DatabaseAdminClient::SetIamPolicy( - Database const& db, IamUpdater const& updater, - std::unique_ptr rerun_policy, - std::unique_ptr backoff_policy) { - internal::OptionsSpan span(conn_->options()); - using RerunnablePolicy = spanner_internal::SafeTransactionRerun; - - Status last_status; - do { - auto current_policy = conn_->GetIamPolicy({db}); - if (!current_policy) { - last_status = std::move(current_policy).status(); - } else { - auto etag = current_policy->etag(); - auto desired = updater(*current_policy); - if (!desired.has_value()) { - return current_policy; - } - desired->set_etag(std::move(etag)); - auto result = conn_->SetIamPolicy({db, *std::move(desired)}); - if (RerunnablePolicy::IsOk(result.status())) { - return result; - } - last_status = std::move(result).status(); - } - if (!rerun_policy->OnFailure(last_status)) break; - std::this_thread::sleep_for(backoff_policy->OnCompletion()); - } while (!rerun_policy->IsExhausted()); - return last_status; -} - -StatusOr -DatabaseAdminClient::TestIamPermissions(Database db, - std::vector permissions) { - internal::OptionsSpan span(conn_->options()); - return conn_->TestIamPermissions({std::move(db), std::move(permissions)}); -} - -future> DatabaseAdminClient::CreateBackup( - Database db, std::string backup_id, Timestamp expire_time, - absl::optional version_time, - EncryptionConfig encryption_config) { - internal::OptionsSpan span(conn_->options()); - auto expire_time_point = - expire_time.get(); - if (!expire_time_point) { - expire_time_point = std::chrono::system_clock::time_point::max(); - } - return conn_->CreateBackup( - {std::move(db), std::move(backup_id), *std::move(expire_time_point), - expire_time, std::move(version_time), std::move(encryption_config)}); -} - -future> DatabaseAdminClient::CreateBackup( - Database db, std::string backup_id, - std::chrono::system_clock::time_point expire_time) { - internal::OptionsSpan span(conn_->options()); - auto ts = MakeTimestamp(expire_time); - if (!ts) return make_ready_future(StatusOr(ts.status())); - return CreateBackup(std::move(db), std::move(backup_id), *ts); -} - -StatusOr DatabaseAdminClient::GetBackup( - Backup const& backup) { - internal::OptionsSpan span(conn_->options()); - return conn_->GetBackup({backup.FullName()}); -} - -Status DatabaseAdminClient::DeleteBackup( - google::spanner::admin::database::v1::Backup const& backup) { - internal::OptionsSpan span(conn_->options()); - return conn_->DeleteBackup({backup.name()}); -} - -Status DatabaseAdminClient::DeleteBackup(Backup const& backup) { - internal::OptionsSpan span(conn_->options()); - return conn_->DeleteBackup({backup.FullName()}); -} - -ListBackupsRange DatabaseAdminClient::ListBackups(Instance in, - std::string filter) { - internal::OptionsSpan span(conn_->options()); - return conn_->ListBackups({std::move(in), std::move(filter)}); -} - -StatusOr DatabaseAdminClient::UpdateBackupExpireTime( - google::spanner::admin::database::v1::Backup const& backup, - Timestamp expire_time) { - internal::OptionsSpan span(conn_->options()); - google::spanner::admin::database::v1::UpdateBackupRequest request; - request.mutable_backup()->set_name(backup.name()); - *request.mutable_backup()->mutable_expire_time() = - expire_time.get().value(); - request.mutable_update_mask()->add_paths("expire_time"); - return conn_->UpdateBackup({request}); -} - -StatusOr DatabaseAdminClient::UpdateBackupExpireTime( - Backup const& backup, Timestamp expire_time) { - internal::OptionsSpan span(conn_->options()); - google::spanner::admin::database::v1::UpdateBackupRequest request; - request.mutable_backup()->set_name(backup.FullName()); - *request.mutable_backup()->mutable_expire_time() = - expire_time.get().value(); - request.mutable_update_mask()->add_paths("expire_time"); - return conn_->UpdateBackup({request}); -} - -StatusOr DatabaseAdminClient::UpdateBackupExpireTime( - google::spanner::admin::database::v1::Backup const& backup, - std::chrono::system_clock::time_point const& expire_time) { - auto ts = MakeTimestamp(expire_time); - if (!ts) return ts.status(); - return UpdateBackupExpireTime(backup, *ts); -} - -StatusOr DatabaseAdminClient::UpdateBackupExpireTime( - Backup const& backup, - std::chrono::system_clock::time_point const& expire_time) { - auto ts = MakeTimestamp(expire_time); - if (!ts) return ts.status(); - return UpdateBackupExpireTime(backup, *ts); -} - -ListBackupOperationsRange DatabaseAdminClient::ListBackupOperations( - Instance in, std::string filter) { - internal::OptionsSpan span(conn_->options()); - return conn_->ListBackupOperations({std::move(in), std::move(filter)}); -} - -ListDatabaseOperationsRange DatabaseAdminClient::ListDatabaseOperations( - Instance in, std::string filter) { - internal::OptionsSpan span(conn_->options()); - return conn_->ListDatabaseOperations({std::move(in), std::move(filter)}); -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace spanner -} // namespace cloud -} // namespace google diff --git a/google/cloud/spanner/database_admin_client.h b/google/cloud/spanner/database_admin_client.h deleted file mode 100644 index 9ee3db0d35493..0000000000000 --- a/google/cloud/spanner/database_admin_client.h +++ /dev/null @@ -1,604 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_DATABASE_ADMIN_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_DATABASE_ADMIN_CLIENT_H - -#include "google/cloud/spanner/backup.h" -#include "google/cloud/spanner/connection_options.h" -#include "google/cloud/spanner/database.h" -#include "google/cloud/spanner/database_admin_connection.h" -#include "google/cloud/spanner/encryption_config.h" -#include "google/cloud/spanner/iam_updater.h" -#include "google/cloud/spanner/instance.h" -#include "google/cloud/spanner/timestamp.h" -#include "google/cloud/spanner/version.h" -#include "google/cloud/future.h" -#include "google/cloud/status_or.h" -#include "absl/types/optional.h" -#include -#include -#include - -namespace google { -namespace cloud { -namespace spanner { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/** - * Performs database administration operations on Spanner. - * - * @deprecated Please use #google::cloud::spanner_admin::InstanceAdminClient - * instead. - * - * Applications use this class to perform administrative operations on spanner - * [Databases][database-doc-link]. - * - * @par Performance - * - * Creating a new `DatabaseAdminClient` is a relatively expensive operation, new - * objects establish new connections to the service. In contrast, copying or - * moving an existing `DatabaseAdminClient` object is a relatively cheap - * operation. Copied clients share the underlying resources. - * - * @par Thread Safety - * - * Instances of this class created via copy-construction or copy-assignment - * share the underlying pool of connections. Access to these copies via multiple - * threads is guaranteed to work. Two threads operating on the same instance of - * this class is not guaranteed to work. - * - * @par Error Handling - * - * This class uses `StatusOr` to report errors. When an operation fails to - * perform its work the returned `StatusOr` contains the error details. If - * the `ok()` member function in the `StatusOr` returns `true` then it - * contains the expected result. For more information, see the - * [Error Handling Guide](#spanner-error-handling). - * - * @code - * namespace spanner = ::google::cloud::spanner; - * using ::google::cloud::StatusOr; - * spanner::DatabaseAdminClient client = ...; - * StatusOr db = - * client.CreateDatabase(...).get(); - * - * if (!db) { - * std::cerr << "Error in CreateDatabase: " << db.status() << "\n"; - * return; - * } - * - * // Use `db` as a smart pointer here, e.g.: - * std::cout << "The database fully qualified name is: " << db->name() << "\n"; - * @endcode - * - * @par Long running operations - * - * Some operations in this class can take minutes to complete. In this case the - * class returns a `google::cloud::future>`, the application can - * then poll the `future` or associate a callback to be invoked when the - * operation completes: - * - * @code - * namespace spanner = ::google::cloud::spanner; - * spanner::DatabaseAdminClient client = ...; - * // Make example less verbose. - * using ::google::cloud::future; - * using ::google::cloud::StatusOr; - * using std::chrono::chrono_literals; // C++14 - * - * auto database = client.CreateDatabase(...); - * if (database.wait_for(5m) == std::future_state::ready) { - * std::cout << "Database created in under 5 minutes, yay!\n"; - * return; - * } - * // Too slow, setup a callback instead: - * database.then([](auto f) { - * StatusOr db = f.get(); - * if (!db) { - * std::cout << "Failed creating a database!\n"; - * return; - * } - * std::cout << "Database created!\n"; - * }); - * @endcode - * - * [database-doc-link]: - * https://cloud.google.com/spanner/docs/schema-and-data-model - */ -class GOOGLE_CLOUD_CPP_SPANNER_ADMIN_API_DEPRECATED("DatabaseAdminClient") - DatabaseAdminClient { - public: - explicit DatabaseAdminClient( - ConnectionOptions const& options = ConnectionOptions()); - - /** - * Creates a new Cloud Spanner database in the given project and instance. - * - * This function creates a database (using the "CREATE DATABASE" DDL - * statement) in the given Google Cloud Project and Cloud Spanner instance. - * The application can provide an optional list of additional DDL statements - * to atomically create tables and indices as well as the new database. - * - * Note that the database id must be between 2 and 30 characters long, it must - * start with a lowercase letter (`[a-z]`), it must end with a lowercase - * letter or a number (`[a-z0-9]`) and any characters between the beginning - * and ending characters must be lower case letters, numbers, underscore (`_`) - * or dashes (`-`), that is, they must belong to the `[a-z0-9_-]` character - * set. - * - * @p encryption_config How to encrypt the database. - * - * @return A `google::cloud::future` that becomes satisfied when the operation - * completes on the service. Note that this can take minutes in some cases. - * - * @par Example - * @snippet samples.cc create-database - * - * @see https://cloud.google.com/spanner/docs/data-definition-language for a - * full list of the DDL operations - * - * @see - * https://cloud.google.com/spanner/docs/data-definition-language#create_database - * for the regular expression that must be satisfied by the database id. - */ - future> - CreateDatabase(Database db, std::vector extra_statements = {}, - EncryptionConfig encryption_config = DefaultEncryption()); - - /** - * Retrieve metadata information about a database. - * - * @par Idempotency - * This is a read-only operation and therefore always idempotent. Transient - * failures are automatically retried. - * - * @par Example - * @snippet samples.cc get-database - */ - StatusOr GetDatabase( - Database db); - - /** - * Retrieve a database schema. - * - * @par Idempotency - * This is a read-only operation and therefore always idempotent. Transient - * failures are automatically retried. - * - * @par Example - * @snippet samples.cc get-database-ddl - */ - StatusOr - GetDatabaseDdl(Database db); - - /** - * Updates the database using a series of DDL statements. - * - * This function schedules a series of updates to the database using a - * sequence of DDL statements. - * - * @return A `google::cloud::future` that becomes satisfied when all the - * statements complete. Note that Cloud Spanner may fail to execute some of - * the statements. - * - * @par Example - * @snippet samples.cc add-column - * - * @see https://cloud.google.com/spanner/docs/data-definition-language for a - * full list of the DDL operations - */ - future< - StatusOr> - UpdateDatabase(Database db, std::vector statements); - - /** - * Drops (deletes) an existing Cloud Spanner database. - * - * @warning Dropping a database deletes all the tables and other data in the - * database. This is an unrecoverable operation. - * - * @par Example - * @snippet samples.cc drop-database - */ - Status DropDatabase(Database db); - - /** - * List all the databases in a give project and instance. - * - * @par Idempotency - * This operation is read-only and therefore always idempotent. - * - * @par Example - * @snippet samples.cc list-databases - */ - ListDatabaseRange ListDatabases(Instance in); - - /** - * Create a new database by restoring from a completed backup. - * - * @par Idempotency - * This is not an idempotent operation. Transient failures are not retried. - * - * The new database must be in the same project and in an instance with the - * same instance configuration as the instance containing the backup. - * - * @p encryption_config How to encrypt the database. - * - * @return A `google::cloud::future` that becomes satisfied when the operation - * completes on the service. Note that this can take minutes in some cases. - * - * @par Example - * @snippet samples.cc restore-database - */ - future> - RestoreDatabase(Database db, Backup const& backup, - EncryptionConfig encryption_config = DefaultEncryption()); - - /** - * Create a new database by restoring from a completed backup. - * - * @par Idempotency - * This is not an idempotent operation. Transient failures are not retried. - * - * The new database must be in the same project and in an instance with the - * same instance configuration as the instance containing the backup. - * - * @p encryption_config How to encrypt the database. - * - * @return A `google::cloud::future` that becomes satisfied when the operation - * completes on the service. Note that this can take minutes in some cases. - */ - future> - RestoreDatabase(Database db, - google::spanner::admin::database::v1::Backup const& backup, - EncryptionConfig encryption_config = DefaultEncryption()); - - /** - * Gets the IAM policy for a database. - * - * @par Idempotency - * This operation is read-only and therefore always idempotent. - * - * @par Example - * @snippet samples.cc database-get-iam-policy - */ - StatusOr GetIamPolicy(Database db); - - /** - * Set the IAM policy for the given database. - * - * This function changes the IAM policy configured in the given database to - * the value of @p policy. - * - * @par Idempotency - * This function is only idempotent if the `etag` field in @p policy is set. - * Therefore, the underlying RPCs are only retried if the field is set, and - * the function returns the first RPC error in any other case. - * - * @see The [Cloud Spanner - * documentation](https://cloud.google.com/spanner/docs/iam) for a - * description of the roles and permissions supported by Cloud Spanner. - * @see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions) - * for an introduction to Identity and Access Management in Google Cloud - * Platform. - */ - StatusOr SetIamPolicy( - Database db, google::iam::v1::Policy policy); - - /** - * Updates the IAM policy for an instance using an optimistic concurrency - * control loop. - * - * This function repeatedly reads the current IAM policy in @p db, and then - * calls the @p updater with the this policy. The @p updater returns an empty - * optional if no changes are required, or it returns the new desired value - * for the IAM policy. This function then updates the policy. - * - * Updating an IAM policy can fail with retryable errors or can be aborted - * because there were simultaneous changes the to IAM policy. In these cases - * this function reruns the loop until it succeeds. - * - * The function returns the final IAM policy, or an error if the rerun policy - * for the underlying connection has expired. - * - * @par Idempotency - * This function always sets the `etag` field on the policy, so the underlying - * RPCs are retried automatically. - * - * @par Example - * @snippet samples.cc add-database-reader-on-database - * - * @param db the identifier for the database where you want to change the IAM - * policy. - * @param updater a callback to modify the policy. Return an unset optional - * to indicate that no changes to the policy are needed. - */ - StatusOr SetIamPolicy(Database const& db, - IamUpdater const& updater); - - /** - * @copydoc SetIamPolicy(Database const&,IamUpdater const&) - * - * @param rerun_policy controls for how long (or how many times) the updater - * will be rerun after the IAM policy update aborts. - * @param backoff_policy controls how long `SetIamPolicy` waits between - * reruns. - */ - StatusOr SetIamPolicy( - Database const& db, IamUpdater const& updater, - std::unique_ptr rerun_policy, - std::unique_ptr backoff_policy); - - /** - * Get the subset of the permissions the caller has on the given database. - * - * This function compares the given list of permissions against those - * permissions granted to the caller, and returns the subset of the list that - * the caller actually holds. - * - * @note Permission wildcards, such as `spanner.*` are not allowed. - * - * @par Idempotency - * This operation is read-only and therefore always idempotent. - * - * @par Example - * @snippet samples.cc database-test-iam-permissions - * - * @see The [Cloud Spanner - * documentation](https://cloud.google.com/spanner/docs/iam) for a description - * of the roles and permissions supported by Cloud Spanner. - * @see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions) - * for an introduction to Identity and Access Management in Google Cloud - * Platform. - */ - StatusOr TestIamPermissions( - Database db, std::vector permissions); - - /** - * Creates a new Cloud Spanner backup for the given database. - * - * @par Idempotency - * This is not an idempotent operation. Transient failures are not retried. - * - * This function creates a database backup for the given Google Cloud Spanner - * database. - * - * Note that the @p backup_id must be unique within the same instance, it must - * be between 2 and 60 characters long, it must start with a lowercase letter - * (`[a-z]`), it must end with a lowercase letter or a number (`[a-z0-9]`) and - * any characters between the beginning and ending characters must be lower - * case letters, numbers, underscore (`_`) or dashes (`-`), that is, they must - * belong to the `[a-z0-9_-]` character set. - * - * The @p expire_time must be at least 6 hours and at most 366 days from the - * time the `CreateBackup()` request is processed. - * - * The backup will contain an externally consistent copy of the database - * at @p version_time, if set. Otherwise, the version_time will be the - * create_time of the backup. - * - * @p encryption_config How to encrypt the backup. - * - * @return A `google::cloud::future` that becomes satisfied when the operation - * completes on the service. Note that this can take minutes in some cases. - * - * @par Example - * @snippet samples.cc create-backup - */ - future> CreateBackup( - Database db, std::string backup_id, Timestamp expire_time, - absl::optional version_time = absl::nullopt, - EncryptionConfig encryption_config = DefaultEncryption()); - - /** - * Creates a new Cloud Spanner backup for the given database. - * - * @deprecated this overload is deprecated; use the `Timestamp` overload - * instead. - * - * @par Idempotency - * This is not an idempotent operation. Transient failures are not retried. - * - * This function creates a database backup for the given Google Cloud Spanner - * database. - * - * Note that the @p backup_id must be unique within the same instance, it must - * be between 2 and 60 characters long, it must start with a lowercase letter - * (`[a-z]`), it must end with a lowercase letter or a number (`[a-z0-9]`) and - * any characters between the beginning and ending characters must be lower - * case letters, numbers, underscore (`_`) or dashes (`-`), that is, they must - * belong to the `[a-z0-9_-]` character set. - * - * The @p expire_time must be at least 6 hours and at most 366 days from the - * time the `CreateBackup()` request is processed. - * - * @return A `google::cloud::future` that becomes satisfied when the operation - * completes on the service. Note that this can take minutes in some cases. - */ - future> CreateBackup( - Database db, std::string backup_id, - std::chrono::system_clock::time_point expire_time); - - /** - * Retrieve metadata information about a Backup. - * - * @par Idempotency - * This is a read-only operation and therefore always idempotent. Transient - * failures are automatically retried. - * - * @par Example - * @snippet samples.cc get-backup - */ - StatusOr GetBackup( - Backup const& backup); - - /** - * Deletes a pending or completed Backup. - * - * @par Idempotency - * We treat this operation as idempotent. Transient failures are automatically - * retried. - */ - Status DeleteBackup( - google::spanner::admin::database::v1::Backup const& backup); - - /** - * Deletes a pending or completed Backup. - * - * @par Idempotency - * We treat this operation as idempotent. Transient failures are automatically - * retried. - * - * @par Example - * @snippet samples.cc delete-backup - */ - Status DeleteBackup(Backup const& backup); - - /** - * List all the backups in a given project and instance that match - * the filter. - * - * @par Idempotency - * This operation is read-only and therefore always idempotent. - * - * @param in An instance where the backup operations belong to. - * @param filter A filter expression that filters backups listed in the - * response. See [this documentation][spanner-api-reference-link] for the - * syntax of the filter expression. - * - * @par Example - * @snippet samples.cc list-backups - * - * [spanner-api-reference-link]: - * https://cloud.google.com/spanner/docs/reference/rpc/google.spanner.admin.database.v1#google.spanner.admin.database.v1.ListBackupsRequest - */ - ListBackupsRange ListBackups(Instance in, std::string filter = {}); - - /** - * Update backup's @p expire_time. - * - * @par Idempotency - * This operation is idempotent as its result does not depend on the previous - * state of the backup. Note that, as is the case with all operations, it is - * subject to race conditions if multiple tasks are attempting to change the - * expire time in the same backup. - */ - StatusOr UpdateBackupExpireTime( - google::spanner::admin::database::v1::Backup const& backup, - Timestamp expire_time); - - /** - * Update backup's @p expire_time. - * - * @par Idempotency - * This operation is idempotent as its result does not depend on the previous - * state of the backup. Note that, as is the case with all operations, it is - * subject to race conditions if multiple tasks are attempting to change the - * expire time in the same backup. - * - * @par Example - * @snippet samples.cc update-backup - */ - StatusOr UpdateBackupExpireTime( - Backup const& backup, Timestamp expire_time); - - /** - * Update backup's @p expire_time. - * - * @deprecated this overload is deprecated; use the `Timestamp` overload - * instead. - * - * @par Idempotency - * This operation is idempotent as its result does not depend on the previous - * state of the backup. Note that, as is the case with all operations, it is - * subject to race conditions if multiple tasks are attempting to change the - * expire time in the same backup. - */ - StatusOr UpdateBackupExpireTime( - google::spanner::admin::database::v1::Backup const& backup, - std::chrono::system_clock::time_point const& expire_time); - - /** - * Update backup's @p expire_time. - * - * @deprecated this overload is deprecated; use the `Timestamp` overload - * instead. - * - * @par Idempotency - * This operation is idempotent as its result does not depend on the previous - * state of the backup. Note that, as is the case with all operations, it is - * subject to race conditions if multiple tasks are attempting to change the - * expire time in the same backup. - */ - StatusOr UpdateBackupExpireTime( - Backup const& backup, - std::chrono::system_clock::time_point const& expire_time); - - /** - * List all the backup operations in a given project and instance that match - * the filter. - * - * @par Idempotency - * This operation is read-only and therefore always idempotent. - * - * @param in An instance where the backup operations belong to. - * @param filter A filter expression that filters what operations are returned - * in the response. See [this documentation][spanner-api-reference-link] for - * the syntax of the filter expression. - * - * @par Example - * @snippet samples.cc list-backup-operations - * - * [spanner-api-reference-link]: - * https://cloud.google.com/spanner/docs/reference/rpc/google.spanner.admin.database.v1#google.spanner.admin.database.v1.ListBackupOperationsRequest - */ - ListBackupOperationsRange ListBackupOperations(Instance in, - std::string filter = {}); - - /** - * List all the database operations in a given project and instance that match - * the filter. - * - * @par Idempotency - * This operation is read-only and therefore always idempotent. - * - * @param in An instance where the database operations belong to. - * @param filter A filter expression that filters what operations are returned - * in the response. See [this documentation][spanner-api-reference-link] for - * the syntax of the filter expression. - * - * @par Example - * @snippet samples.cc list-database-operations - * - * [spanner-api-reference-link]: - * https://cloud.google.com/spanner/docs/reference/rpc/google.spanner.admin.database.v1#google.spanner.admin.database.v1.ListDatabaseOperationsRequest - */ - ListDatabaseOperationsRange ListDatabaseOperations(Instance in, - std::string filter = {}); - - /// Create a new client with the given stub. For testing only. - explicit DatabaseAdminClient(std::shared_ptr c) - : conn_(std::move(c)) {} - - private: - std::shared_ptr conn_; -}; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace spanner -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_DATABASE_ADMIN_CLIENT_H diff --git a/google/cloud/spanner/database_admin_client_test.cc b/google/cloud/spanner/database_admin_client_test.cc deleted file mode 100644 index 0f178d89e355e..0000000000000 --- a/google/cloud/spanner/database_admin_client_test.cc +++ /dev/null @@ -1,725 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// TODO(#7356): Remove this file after the deprecation period expires -#include "google/cloud/internal/disable_deprecation_warnings.inc" -#include "google/cloud/spanner/database_admin_client.h" -#include "google/cloud/spanner/mocks/mock_database_admin_connection.h" -#include "google/cloud/spanner/timestamp.h" -#include "google/cloud/testing_util/status_matchers.h" -#include "absl/time/clock.h" -#include "absl/time/time.h" -#include "absl/types/optional.h" -#include - -namespace google { -namespace cloud { -namespace spanner { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -namespace gsad = ::google::spanner::admin::database; - -using ::google::cloud::spanner_mocks::MockDatabaseAdminConnection; -using ::google::cloud::testing_util::StatusIs; -using ::testing::AtLeast; -using ::testing::ElementsAre; -using ::testing::HasSubstr; - -/// @test Verify DatabaseAdminClient uses CreateDatabase() correctly. -TEST(DatabaseAdminClientTest, CreateDatabase) { - auto mock = std::make_shared(); - - Database dbase("test-project", "test-instance", "test-db"); - - EXPECT_CALL(*mock, CreateDatabase) - .WillOnce( - [&dbase](DatabaseAdminConnection::CreateDatabaseParams const& p) { - EXPECT_EQ(p.database, dbase); - EXPECT_THAT(p.extra_statements, ElementsAre("-- NOT SQL for test")); - gsad::v1::Database database; - database.set_name(dbase.FullName()); - database.set_state(gsad::v1::Database::CREATING); - return make_ready_future(make_status_or(database)); - }); - - DatabaseAdminClient client(std::move(mock)); - auto fut = client.CreateDatabase(dbase, {"-- NOT SQL for test"}); - ASSERT_EQ(std::future_status::ready, fut.wait_for(std::chrono::seconds(0))); - auto db = fut.get(); - ASSERT_STATUS_OK(db); - - EXPECT_EQ(dbase.FullName(), db->name()); - EXPECT_EQ(gsad::v1::Database::CREATING, db->state()); -} - -/// @test Verify DatabaseAdminClient uses GetDatabase() correctly. -TEST(DatabaseAdminClientTest, GetDatabase) { - auto mock = std::make_shared(); - Database dbase("test-project", "test-instance", "test-db"); - - EXPECT_CALL(*mock, GetDatabase) - .WillOnce([&dbase](DatabaseAdminConnection::GetDatabaseParams const& p) { - EXPECT_EQ(dbase, p.database); - gsad::v1::Database response; - response.set_name(p.database.FullName()); - response.set_state(gsad::v1::Database::READY); - return response; - }); - - DatabaseAdminClient client(std::move(mock)); - auto response = client.GetDatabase(dbase); - ASSERT_STATUS_OK(response); - EXPECT_EQ(gsad::v1::Database::READY, response->state()); - EXPECT_EQ(dbase.FullName(), response->name()); -} - -/// @test Verify DatabaseAdminClient uses GetDatabaseDdl() correctly. -TEST(DatabaseAdminClientTest, GetDatabaseDdl) { - auto mock = std::make_shared(); - Database const expected_name("test-project", "test-instance", - "test-database"); - - EXPECT_CALL(*mock, GetDatabaseDdl) - .WillOnce([&expected_name]( - DatabaseAdminConnection::GetDatabaseDdlParams const& p) { - EXPECT_EQ(expected_name, p.database); - gsad::v1::GetDatabaseDdlResponse response; - response.add_statements("CREATE DATABASE test-database"); - return response; - }); - - DatabaseAdminClient client(std::move(mock)); - auto response = client.GetDatabaseDdl(expected_name); - ASSERT_STATUS_OK(response); - ASSERT_EQ(1, response->statements_size()); - EXPECT_EQ("CREATE DATABASE test-database", response->statements(0)); -} - -/// @test Verify DatabaseAdminClient uses UpdateDatabase() correctly. -TEST(DatabaseAdminClientTest, UpdateDatabase) { - auto mock = std::make_shared(); - - Database dbase("test-project", "test-instance", "test-db"); - - EXPECT_CALL(*mock, UpdateDatabase) - .WillOnce( - [&dbase](DatabaseAdminConnection::UpdateDatabaseParams const& p) { - EXPECT_EQ(p.database, dbase); - EXPECT_THAT(p.statements, ElementsAre("-- test only: NOT SQL")); - gsad::v1::UpdateDatabaseDdlMetadata metadata; - metadata.add_statements("-- test only: NOT SQL"); - return make_ready_future(make_status_or(metadata)); - }); - - DatabaseAdminClient client(std::move(mock)); - auto fut = client.UpdateDatabase(dbase, {"-- test only: NOT SQL"}); - ASSERT_EQ(std::future_status::ready, fut.wait_for(std::chrono::seconds(0))); - auto db = fut.get(); - ASSERT_STATUS_OK(db); - - EXPECT_THAT(db->statements(), ElementsAre("-- test only: NOT SQL")); -} - -TEST(DatabaseAdminClientTest, ListDatabases) { - auto mock = std::make_shared(); - Instance const expected_instance("test-project", "test-instance"); - EXPECT_CALL(*mock, ListDatabases) - .WillOnce([&expected_instance]( - DatabaseAdminConnection::ListDatabasesParams const& p) { - EXPECT_EQ(expected_instance, p.instance); - - return google::cloud::internal::MakePaginationRange( - gsad::v1::ListDatabasesRequest{}, - [](gsad::v1::ListDatabasesRequest const&) { - return StatusOr( - Status(StatusCode::kPermissionDenied, "uh-oh")); - }, - [](gsad::v1::ListDatabasesResponse const&) { - return std::vector{}; - }); - }); - - DatabaseAdminClient client(mock); - auto range = client.ListDatabases(expected_instance); - auto begin = range.begin(); - ASSERT_NE(begin, range.end()); - EXPECT_THAT(*begin, StatusIs(StatusCode::kPermissionDenied)); -} - -/// @test Verify DatabaseAdminClient uses GetIamPolicy() correctly. -TEST(DatabaseAdminClientTest, GetIamPolicy) { - auto mock = std::make_shared(); - Database const expected_db("test-project", "test-instance", "test-database"); - std::string const expected_role = "roles/spanner.databaseReader"; - std::string const expected_member = "user:foobar@example.com"; - EXPECT_CALL(*mock, GetIamPolicy) - .WillOnce([&expected_db, &expected_role, &expected_member]( - DatabaseAdminConnection::GetIamPolicyParams const& p) { - EXPECT_EQ(expected_db, p.database); - google::iam::v1::Policy response; - auto& binding = *response.add_bindings(); - binding.set_role(expected_role); - *binding.add_members() = expected_member; - return response; - }); - - DatabaseAdminClient client(std::move(mock)); - auto response = client.GetIamPolicy(expected_db); - ASSERT_STATUS_OK(response); - ASSERT_EQ(1, response->bindings().size()); - EXPECT_EQ(expected_role, response->bindings().Get(0).role()); - ASSERT_EQ(1, response->bindings().Get(0).members().size()); - EXPECT_EQ(expected_member, response->bindings().Get(0).members().Get(0)); -} - -/// @test Verify DatabaseAdminClient uses SetIamPolicy() correctly. -TEST(DatabaseAdminClientTest, SetIamPolicy) { - auto mock = std::make_shared(); - Database const expected_db("test-project", "test-instance", "test-database"); - EXPECT_CALL(*mock, SetIamPolicy) - .WillOnce( - [&expected_db](DatabaseAdminConnection::SetIamPolicyParams const& p) { - EXPECT_EQ(expected_db, p.database); - return p.policy; - }); - DatabaseAdminClient client(std::move(mock)); - auto response = client.SetIamPolicy(expected_db, google::iam::v1::Policy{}); - EXPECT_STATUS_OK(response); -} - -TEST(DatabaseAdminClientTest, SetIamPolicyOccGetFailure) { - Database const db("test-project", "test-instance", "test-database"); - auto mock = std::make_shared(); - EXPECT_CALL(*mock, GetIamPolicy) - .WillOnce([&db](DatabaseAdminConnection::GetIamPolicyParams const& p) { - EXPECT_EQ(db, p.database); - return Status(StatusCode::kPermissionDenied, "uh-oh"); - }); - - DatabaseAdminClient client(mock); - auto actual = client.SetIamPolicy(db, [](google::iam::v1::Policy const&) { - return absl::optional{}; - }); - EXPECT_THAT(actual, StatusIs(StatusCode::kPermissionDenied)); -} - -TEST(DatabaseAdminClientTest, SetIamPolicyOccNoUpdates) { - Database const db("test-project", "test-instance", "test-database"); - auto mock = std::make_shared(); - EXPECT_CALL(*mock, GetIamPolicy) - .WillOnce([&db](DatabaseAdminConnection::GetIamPolicyParams const& p) { - EXPECT_EQ(db, p.database); - google::iam::v1::Policy r; - r.set_etag("test-etag"); - return r; - }); - EXPECT_CALL(*mock, SetIamPolicy).Times(0); - - DatabaseAdminClient client(mock); - auto actual = client.SetIamPolicy(db, [](google::iam::v1::Policy const& p) { - EXPECT_EQ("test-etag", p.etag()); - return absl::optional{}; - }); - ASSERT_STATUS_OK(actual); - EXPECT_EQ("test-etag", actual->etag()); -} - -std::unique_ptr RerunPolicyForTesting() { - return LimitedErrorCountTransactionRerunPolicy(/*maximum_failures=*/3) - .clone(); -} - -std::unique_ptr BackoffPolicyForTesting() { - return ExponentialBackoffPolicy( - /*initial_delay=*/std::chrono::microseconds(1), - /*maximum_delay=*/std::chrono::microseconds(1), /*scaling=*/2.0) - .clone(); -} - -TEST(DatabaseAdminClientTest, SetIamPolicyOccRetryAborted) { - Database const db("test-project", "test-instance", "test-database"); - auto mock = std::make_shared(); - EXPECT_CALL(*mock, GetIamPolicy) - .WillOnce([&db](DatabaseAdminConnection::GetIamPolicyParams const& p) { - EXPECT_EQ(db, p.database); - google::iam::v1::Policy r; - r.set_etag("test-etag-1"); - return r; - }) - .WillOnce([&db](DatabaseAdminConnection::GetIamPolicyParams const& p) { - EXPECT_EQ(db, p.database); - google::iam::v1::Policy r; - r.set_etag("test-etag-2"); - return r; - }); - EXPECT_CALL(*mock, SetIamPolicy) - .WillOnce([&db](DatabaseAdminConnection::SetIamPolicyParams const& p) { - EXPECT_EQ(db, p.database); - EXPECT_EQ("test-etag-1", p.policy.etag()); - return Status(StatusCode::kAborted, "aborted"); - }) - .WillOnce([&db](DatabaseAdminConnection::SetIamPolicyParams const& p) { - EXPECT_EQ(db, p.database); - EXPECT_EQ("test-etag-2", p.policy.etag()); - google::iam::v1::Policy r; - r.set_etag("test-etag-3"); - return r; - }); - - DatabaseAdminClient client(mock); - int counter = 0; - auto actual = client.SetIamPolicy( - db, - [&counter](google::iam::v1::Policy p) { - EXPECT_EQ("test-etag-" + std::to_string(++counter), p.etag()); - return p; - }, - RerunPolicyForTesting(), BackoffPolicyForTesting()); - ASSERT_STATUS_OK(actual); - EXPECT_EQ("test-etag-3", actual->etag()); -} - -TEST(DatabaseAdminClientTest, SetIamPolicyOccRetryAbortedTooManyFailures) { - Database const db("test-project", "test-instance", "test-database"); - auto mock = std::make_shared(); - EXPECT_CALL(*mock, GetIamPolicy) - .WillRepeatedly( - [&db](DatabaseAdminConnection::GetIamPolicyParams const& p) { - EXPECT_EQ(db, p.database); - google::iam::v1::Policy r; - r.set_etag("test-etag-1"); - return r; - }); - EXPECT_CALL(*mock, SetIamPolicy) - .Times(AtLeast(2)) - .WillRepeatedly( - [&db](DatabaseAdminConnection::SetIamPolicyParams const& p) { - EXPECT_EQ(db, p.database); - EXPECT_EQ("test-etag-1", p.policy.etag()); - return Status(StatusCode::kAborted, "test-msg"); - }); - - DatabaseAdminClient client(mock); - auto actual = client.SetIamPolicy( - db, [](google::iam::v1::Policy p) { return p; }, RerunPolicyForTesting(), - BackoffPolicyForTesting()); - EXPECT_THAT(actual, StatusIs(StatusCode::kAborted, HasSubstr("test-msg"))); -} - -/// @test Verify DatabaseAdminClient uses TestIamPermissions() correctly. -TEST(DatabaseAdminClientTest, TestIamPermissions) { - auto mock = std::make_shared(); - Database const expected_db("test-project", "test-instance", "test-database"); - std::string expected_permission = "spanner.databases.read"; - EXPECT_CALL(*mock, TestIamPermissions) - .WillOnce( - [&expected_db, &expected_permission]( - DatabaseAdminConnection::TestIamPermissionsParams const& p) { - EXPECT_EQ(expected_db, p.database); - EXPECT_EQ(1, p.permissions.size()); - EXPECT_EQ(expected_permission, p.permissions.at(0)); - google::iam::v1::TestIamPermissionsResponse response; - response.add_permissions(expected_permission); - return response; - }); - DatabaseAdminClient client(std::move(mock)); - auto response = client.TestIamPermissions(expected_db, {expected_permission}); - ASSERT_STATUS_OK(response); - ASSERT_EQ(1, response->permissions_size()); - EXPECT_EQ(expected_permission, response->permissions(0)); -} - -/// @test Verify DatabaseAdminClient uses CreateBackup() correctly. -TEST(DatabaseAdminClientTest, CreateBackup) { - auto mock = std::make_shared(); - - Database dbase("test-project", "test-instance", "test-db"); - std::string backup_id = "test-backup"; - auto now = absl::Now(); - auto expire_time = MakeTimestamp(now + absl::Hours(7)).value(); - auto version_time = MakeTimestamp(now - absl::Hours(7)).value(); - Backup backup_name(dbase.instance(), backup_id); - EXPECT_CALL(*mock, CreateBackup) - .WillOnce([&dbase, &expire_time, &version_time, &backup_id, &backup_name]( - DatabaseAdminConnection::CreateBackupParams const& p) { - EXPECT_EQ(p.database, dbase); - EXPECT_EQ(MakeTimestamp(p.expire_time).value(), - MakeTimestamp( - expire_time.get() - .value()) - .value()); - EXPECT_EQ(p.expire_timestamp, expire_time); - EXPECT_EQ(p.version_time, version_time); - EXPECT_EQ(p.backup_id, backup_id); - gsad::v1::Backup backup; - backup.set_name(backup_name.FullName()); - backup.set_state(gsad::v1::Backup::CREATING); - return make_ready_future(make_status_or(backup)); - }) - .WillOnce([&dbase, &expire_time, &backup_id, &backup_name]( - DatabaseAdminConnection::CreateBackupParams const& p) { - EXPECT_EQ(p.database, dbase); - EXPECT_EQ(MakeTimestamp(p.expire_time).value(), - MakeTimestamp( - expire_time.get() - .value()) - .value()); - EXPECT_EQ(p.expire_timestamp, - MakeTimestamp( - expire_time.get() - .value()) - .value()); // loss of precision - EXPECT_FALSE(p.version_time.has_value()); - EXPECT_EQ(p.backup_id, backup_id); - gsad::v1::Backup backup; - backup.set_name(backup_name.FullName()); - backup.set_state(gsad::v1::Backup::CREATING); - return make_ready_future(make_status_or(backup)); - }); - - DatabaseAdminClient client(std::move(mock)); - auto fut = client.CreateBackup(dbase, backup_id, expire_time, version_time); - ASSERT_EQ(std::future_status::ready, fut.wait_for(std::chrono::seconds(0))); - auto backup = fut.get(); - ASSERT_STATUS_OK(backup); - EXPECT_EQ(backup_name.FullName(), backup->name()); - EXPECT_EQ(gsad::v1::Backup::CREATING, backup->state()); - - // Exercise the old interface with just a `time_point` expiration parameter. - fut = client.CreateBackup( - dbase, backup_id, - expire_time.get().value()); - ASSERT_EQ(std::future_status::ready, fut.wait_for(std::chrono::seconds(0))); - backup = fut.get(); - ASSERT_STATUS_OK(backup); - EXPECT_EQ(backup_name.FullName(), backup->name()); - EXPECT_EQ(gsad::v1::Backup::CREATING, backup->state()); -} - -/// @test Verify DatabaseAdminClient uses RestoreDatabase() correctly. -TEST(DatabaseAdminClientTest, RestoreDatabase) { - auto mock = std::make_shared(); - - Database dbase("test-project", "test-instance", "test-db"); - Backup backup(dbase.instance(), "test-backup"); - EXPECT_CALL(*mock, RestoreDatabase) - .WillOnce([&dbase, &backup]( - DatabaseAdminConnection::RestoreDatabaseParams const& p) { - EXPECT_EQ(p.database, dbase); - EXPECT_EQ(p.backup_full_name, backup.FullName()); - gsad::v1::Database database; - database.set_name(dbase.FullName()); - database.set_state(gsad::v1::Database::READY_OPTIMIZING); - return make_ready_future(make_status_or(database)); - }); - - DatabaseAdminClient client(std::move(mock)); - auto fut = client.RestoreDatabase(dbase, backup); - ASSERT_EQ(std::future_status::ready, fut.wait_for(std::chrono::seconds(0))); - auto database = fut.get(); - ASSERT_STATUS_OK(database); - - EXPECT_EQ(dbase.FullName(), database->name()); - EXPECT_EQ(gsad::v1::Database::READY_OPTIMIZING, database->state()); -} - -/// @test Verify DatabaseAdminClient uses RestoreDatabase() correctly. -TEST(DatabaseAdminClientTest, RestoreDatabaseOverload) { - auto mock = std::make_shared(); - - Database dbase("test-project", "test-instance", "test-db"); - Backup backup_name(dbase.instance(), "test-backup"); - gsad::v1::Backup backup; - backup.set_name(backup_name.FullName()); - EXPECT_CALL(*mock, RestoreDatabase) - .WillOnce([&dbase, &backup_name]( - DatabaseAdminConnection::RestoreDatabaseParams const& p) { - EXPECT_EQ(p.database, dbase); - EXPECT_EQ(p.backup_full_name, backup_name.FullName()); - gsad::v1::Database database; - database.set_name(dbase.FullName()); - database.set_state(gsad::v1::Database::READY_OPTIMIZING); - return make_ready_future(make_status_or(database)); - }); - - DatabaseAdminClient client(std::move(mock)); - auto fut = client.RestoreDatabase(dbase, backup); - ASSERT_EQ(std::future_status::ready, fut.wait_for(std::chrono::seconds(0))); - auto database = fut.get(); - ASSERT_STATUS_OK(database); - - EXPECT_EQ(dbase.FullName(), database->name()); - EXPECT_EQ(gsad::v1::Database::READY_OPTIMIZING, database->state()); -} - -/// @test Verify DatabaseAdminClient uses GetBackup() correctly. -TEST(DatabaseAdminClientTest, GetBackup) { - auto mock = std::make_shared(); - Backup backup(Instance("test-project", "test-instance"), "test-backup"); - - EXPECT_CALL(*mock, GetBackup) - .WillOnce([&backup](DatabaseAdminConnection::GetBackupParams const& p) { - EXPECT_EQ(backup.FullName(), p.backup_full_name); - gsad::v1::Backup response; - response.set_name(p.backup_full_name); - response.set_state(gsad::v1::Backup::READY); - return response; - }); - - DatabaseAdminClient client(std::move(mock)); - auto response = client.GetBackup(backup); - ASSERT_STATUS_OK(response); - EXPECT_EQ(gsad::v1::Backup::READY, response->state()); - EXPECT_EQ(backup.FullName(), response->name()); -} - -/// @test Verify DatabaseAdminClient uses DeleteBackup() correctly. -TEST(DatabaseAdminClientTest, DeleteBackup) { - auto mock = std::make_shared(); - Backup backup(Instance("test-project", "test-instance"), "test-backup"); - - EXPECT_CALL(*mock, DeleteBackup) - .WillOnce( - [&backup](DatabaseAdminConnection::DeleteBackupParams const& p) { - EXPECT_EQ(backup.FullName(), p.backup_full_name); - return Status(); - }); - - DatabaseAdminClient client(std::move(mock)); - auto response = client.DeleteBackup(backup); - EXPECT_STATUS_OK(response); -} - -/// @test Verify DatabaseAdminClient uses DeleteBackup() correctly. -TEST(DatabaseAdminClientTest, DeleteBackupOverload) { - auto mock = std::make_shared(); - Backup backup_name(Instance("test-project", "test-instance"), "test-backup"); - gsad::v1::Backup backup; - backup.set_name(backup_name.FullName()); - - EXPECT_CALL(*mock, DeleteBackup) - .WillOnce( - [&backup_name](DatabaseAdminConnection::DeleteBackupParams const& p) { - EXPECT_EQ(backup_name.FullName(), p.backup_full_name); - return Status(); - }); - - DatabaseAdminClient client(std::move(mock)); - auto response = client.DeleteBackup(backup); - EXPECT_STATUS_OK(response); -} - -TEST(DatabaseAdminClientTest, ListBackups) { - auto mock = std::make_shared(); - Instance const expected_instance("test-project", "test-instance"); - std::string expected_filter("test-filter"); - EXPECT_CALL(*mock, ListBackups) - .WillOnce([&expected_instance, &expected_filter]( - DatabaseAdminConnection::ListBackupsParams const& p) { - EXPECT_EQ(expected_instance, p.instance); - EXPECT_EQ(expected_filter, p.filter); - - return google::cloud::internal::MakePaginationRange( - gsad::v1::ListBackupsRequest{}, - [](gsad::v1::ListBackupsRequest const&) { - return StatusOr( - Status(StatusCode::kPermissionDenied, "uh-oh")); - }, - [](gsad::v1::ListBackupsResponse const&) { - return std::vector{}; - }); - }); - - DatabaseAdminClient client(mock); - auto range = client.ListBackups(expected_instance, expected_filter); - auto begin = range.begin(); - ASSERT_NE(begin, range.end()); - EXPECT_THAT(*begin, StatusIs(StatusCode::kPermissionDenied)); -} - -/// @test Verify DatabaseAdminClient uses GetBackup() correctly. -TEST(DatabaseAdminClientTest, UpdateBackupExpireTime) { - auto mock = std::make_shared(); - Backup backup(Instance("test-project", "test-instance"), "test-backup"); - auto expire_time = MakeTimestamp(absl::Now() + absl::Hours(7)).value(); - - EXPECT_CALL(*mock, UpdateBackup) - .WillOnce([&backup, &expire_time]( - DatabaseAdminConnection::UpdateBackupParams const& p) { - EXPECT_EQ(backup.FullName(), p.request.backup().name()); - EXPECT_THAT(expire_time, - MakeTimestamp(p.request.backup().expire_time()).value()); - gsad::v1::Backup response; - response.set_name(p.request.backup().name()); - *response.mutable_expire_time() = p.request.backup().expire_time(); - response.set_state(gsad::v1::Backup::READY); - return response; - }) - .WillOnce([&backup, &expire_time]( - DatabaseAdminConnection::UpdateBackupParams const& p) { - EXPECT_EQ(backup.FullName(), p.request.backup().name()); - EXPECT_THAT(MakeTimestamp( - expire_time.get() - .value()) - .value(), // loss of precision - MakeTimestamp(p.request.backup().expire_time()).value()); - gsad::v1::Backup response; - response.set_name(p.request.backup().name()); - *response.mutable_expire_time() = p.request.backup().expire_time(); - response.set_state(gsad::v1::Backup::READY); - return response; - }); - - DatabaseAdminClient client(std::move(mock)); - auto response = client.UpdateBackupExpireTime(backup, expire_time); - ASSERT_STATUS_OK(response); - EXPECT_EQ(gsad::v1::Backup::READY, response->state()); - EXPECT_EQ(backup.FullName(), response->name()); - EXPECT_THAT(expire_time, MakeTimestamp(response->expire_time()).value()); - - // Exercise the old interface with a `time_point` expiration parameter. - response = client.UpdateBackupExpireTime( - backup, expire_time.get().value()); - ASSERT_STATUS_OK(response); - EXPECT_EQ(gsad::v1::Backup::READY, response->state()); - EXPECT_EQ(backup.FullName(), response->name()); - EXPECT_THAT( - MakeTimestamp( - expire_time.get().value()) - .value(), // loss of precision - MakeTimestamp(response->expire_time()).value()); -} - -/// @test Verify DatabaseAdminClient uses GetBackup() correctly. -TEST(DatabaseAdminClientTest, UpdateBackupExpireTimeOverload) { - auto mock = std::make_shared(); - Backup backup_name(Instance("test-project", "test-instance"), "test-backup"); - gsad::v1::Backup backup; - backup.set_name(backup_name.FullName()); - auto expire_time = MakeTimestamp(absl::Now() + absl::Hours(7)).value(); - - EXPECT_CALL(*mock, UpdateBackup) - .WillOnce([&backup_name, &expire_time]( - DatabaseAdminConnection::UpdateBackupParams const& p) { - EXPECT_EQ(backup_name.FullName(), p.request.backup().name()); - EXPECT_THAT(expire_time, - MakeTimestamp(p.request.backup().expire_time()).value()); - gsad::v1::Backup response; - response.set_name(p.request.backup().name()); - *response.mutable_expire_time() = p.request.backup().expire_time(); - response.set_state(gsad::v1::Backup::READY); - return response; - }) - .WillOnce([&backup_name, &expire_time]( - DatabaseAdminConnection::UpdateBackupParams const& p) { - EXPECT_EQ(backup_name.FullName(), p.request.backup().name()); - EXPECT_THAT(MakeTimestamp( - expire_time.get() - .value()) - .value(), // loss of precision - MakeTimestamp(p.request.backup().expire_time()).value()); - gsad::v1::Backup response; - response.set_name(p.request.backup().name()); - *response.mutable_expire_time() = p.request.backup().expire_time(); - response.set_state(gsad::v1::Backup::READY); - return response; - }); - - DatabaseAdminClient client(std::move(mock)); - auto response = client.UpdateBackupExpireTime(backup, expire_time); - ASSERT_STATUS_OK(response); - EXPECT_EQ(gsad::v1::Backup::READY, response->state()); - EXPECT_EQ(backup_name.FullName(), response->name()); - EXPECT_THAT(expire_time, MakeTimestamp(response->expire_time()).value()); - - // Exercise the old interface with a `time_point` expiration parameter. - response = client.UpdateBackupExpireTime( - backup, expire_time.get().value()); - ASSERT_STATUS_OK(response); - EXPECT_EQ(gsad::v1::Backup::READY, response->state()); - EXPECT_EQ(backup_name.FullName(), response->name()); - EXPECT_THAT( - MakeTimestamp( - expire_time.get().value()) - .value(), // loss of precision - MakeTimestamp(response->expire_time()).value()); -} - -TEST(DatabaseAdminClientTest, ListBackupOperations) { - auto mock = std::make_shared(); - Instance const expected_instance("test-project", "test-instance"); - std::string expected_filter("test-filter"); - EXPECT_CALL(*mock, ListBackupOperations) - .WillOnce( - [&expected_instance, &expected_filter]( - DatabaseAdminConnection::ListBackupOperationsParams const& p) { - EXPECT_EQ(expected_instance, p.instance); - EXPECT_EQ(expected_filter, p.filter); - - return google::cloud::internal::MakePaginationRange< - ListBackupOperationsRange>( - gsad::v1::ListBackupOperationsRequest{}, - [](gsad::v1::ListBackupOperationsRequest const&) { - return StatusOr( - Status(StatusCode::kPermissionDenied, "uh-oh")); - }, - [](gsad::v1::ListBackupOperationsResponse const&) { - return std::vector{}; - }); - }); - - DatabaseAdminClient client(mock); - auto range = client.ListBackupOperations(expected_instance, expected_filter); - auto begin = range.begin(); - ASSERT_NE(begin, range.end()); - EXPECT_THAT(*begin, StatusIs(StatusCode::kPermissionDenied)); -} - -TEST(DatabaseAdminClientTest, ListDatabaseOperations) { - auto mock = std::make_shared(); - Instance const expected_instance("test-project", "test-instance"); - std::string expected_filter("test-filter"); - EXPECT_CALL(*mock, ListDatabaseOperations) - .WillOnce( - [&expected_instance, &expected_filter]( - DatabaseAdminConnection::ListDatabaseOperationsParams const& p) { - EXPECT_EQ(expected_instance, p.instance); - EXPECT_EQ(expected_filter, p.filter); - - return google::cloud::internal::MakePaginationRange< - ListDatabaseOperationsRange>( - gsad::v1::ListDatabaseOperationsRequest{}, - [](gsad::v1::ListDatabaseOperationsRequest const&) { - return StatusOr( - Status(StatusCode::kPermissionDenied, "uh-oh")); - }, - [](gsad::v1::ListDatabaseOperationsResponse const&) { - return std::vector{}; - }); - }); - - DatabaseAdminClient client(mock); - auto range = - client.ListDatabaseOperations(expected_instance, expected_filter); - auto begin = range.begin(); - ASSERT_NE(begin, range.end()); - EXPECT_THAT(*begin, StatusIs(StatusCode::kPermissionDenied)); -} - -} // namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace spanner -} // namespace cloud -} // namespace google diff --git a/google/cloud/spanner/database_admin_connection.cc b/google/cloud/spanner/database_admin_connection.cc deleted file mode 100644 index 310585993fd58..0000000000000 --- a/google/cloud/spanner/database_admin_connection.cc +++ /dev/null @@ -1,680 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// TODO(#7356): Remove this file after the deprecation period expires -#include "google/cloud/internal/disable_deprecation_warnings.inc" -#include "google/cloud/spanner/database_admin_connection.h" -#include "google/cloud/spanner/internal/defaults.h" -#include "google/cloud/spanner/options.h" -#include "google/cloud/spanner/timestamp.h" -#include "google/cloud/common_options.h" -#include "google/cloud/grpc_options.h" -#include "google/cloud/internal/async_long_running_operation.h" -#include "google/cloud/internal/retry_loop.h" -#include "google/cloud/options.h" -#include -#include - -namespace google { -namespace cloud { -namespace spanner { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -namespace gsad = ::google::spanner::admin::database; - -using ::google::cloud::Idempotency; -using ::google::cloud::internal::RetryLoop; - -future> -// NOLINTNEXTLINE(performance-unnecessary-value-param) -DatabaseAdminConnection::CreateBackup(CreateBackupParams) { - return google::cloud::make_ready_future(StatusOr( - Status(StatusCode::kUnimplemented, "not implemented"))); -} - -future> -// NOLINTNEXTLINE(performance-unnecessary-value-param) -DatabaseAdminConnection::RestoreDatabase(RestoreDatabaseParams) { - return google::cloud::make_ready_future(StatusOr( - Status(StatusCode::kUnimplemented, "not implemented"))); -} - -StatusOr -// NOLINTNEXTLINE(performance-unnecessary-value-param) -DatabaseAdminConnection::GetBackup(GetBackupParams) { - return Status(StatusCode::kUnimplemented, "not implemented"); -} - -// NOLINTNEXTLINE(performance-unnecessary-value-param) -Status DatabaseAdminConnection::DeleteBackup(DeleteBackupParams) { - return Status(StatusCode::kUnimplemented, "not implemented"); -} - -// NOLINTNEXTLINE(performance-unnecessary-value-param) -ListBackupsRange DatabaseAdminConnection::ListBackups(ListBackupsParams) { - return google::cloud::internal::MakePaginationRange( - gsad::v1::ListBackupsRequest{}, - [](gsad::v1::ListBackupsRequest const&) { - return StatusOr( - Status(StatusCode::kUnimplemented, "not implemented")); - }, - [](gsad::v1::ListBackupsResponse const&) { - return std::vector{}; - }); -} - -StatusOr -// NOLINTNEXTLINE(performance-unnecessary-value-param) -DatabaseAdminConnection::UpdateBackup(UpdateBackupParams) { - return Status(StatusCode::kUnimplemented, "not implemented"); -} - -ListBackupOperationsRange DatabaseAdminConnection::ListBackupOperations( - // NOLINTNEXTLINE(performance-unnecessary-value-param) - ListBackupOperationsParams) { - return google::cloud::internal::MakePaginationRange< - ListBackupOperationsRange>( - gsad::v1::ListBackupOperationsRequest{}, - [](gsad::v1::ListBackupOperationsRequest const&) { - return StatusOr( - Status(StatusCode::kUnimplemented, "not implemented")); - }, - [](gsad::v1::ListBackupOperationsResponse const&) { - return std::vector{}; - }); -} - -ListDatabaseOperationsRange DatabaseAdminConnection::ListDatabaseOperations( - // NOLINTNEXTLINE(performance-unnecessary-value-param) - ListDatabaseOperationsParams) { - return google::cloud::internal::MakePaginationRange< - ListDatabaseOperationsRange>( - gsad::v1::ListDatabaseOperationsRequest{}, - [](gsad::v1::ListDatabaseOperationsRequest const&) { - return StatusOr( - Status(StatusCode::kUnimplemented, "not implemented")); - }, - [](gsad::v1::ListDatabaseOperationsResponse const&) { - return std::vector{}; - }); -} - -namespace { - -class DatabaseAdminConnectionImpl : public DatabaseAdminConnection { - public: - // Note all the policies will be set to their default non-null values in the - // `MakeDatabaseAdminConnection()` function below. - explicit DatabaseAdminConnectionImpl( - std::shared_ptr stub, Options opts) - : stub_(std::move(stub)), - opts_(std::move(opts)), - retry_policy_prototype_(opts_.get()->clone()), - backoff_policy_prototype_( - opts_.get()->clone()), - polling_policy_prototype_( - opts_.get()->clone()), - background_threads_(internal::MakeBackgroundThreadsFactory(opts_)()) {} - - ~DatabaseAdminConnectionImpl() override = default; - - Options options() override { return opts_; } - - future> - CreateDatabase(CreateDatabaseParams p) override { - gsad::v1::CreateDatabaseRequest request; - request.set_parent(p.database.instance().FullName()); - request.set_create_statement("CREATE DATABASE `" + - p.database.database_id() + "`"); - struct EncryptionVisitor { - explicit EncryptionVisitor(gsad::v1::CreateDatabaseRequest& request) - : request_(request) {} - void operator()(DefaultEncryption const&) const { - // No encryption_config => GOOGLE_DEFAULT_ENCRYPTION. - } - void operator()(GoogleEncryption const&) const { - // No encryption_config => GOOGLE_DEFAULT_ENCRYPTION. - } - void operator()(CustomerManagedEncryption const& cme) const { - auto* config = request_.mutable_encryption_config(); - config->set_kms_key_name(cme.encryption_key().FullName()); - } - gsad::v1::CreateDatabaseRequest& request_; - }; - absl::visit(EncryptionVisitor(request), p.encryption_config); - for (auto& s : p.extra_statements) { - *request.add_extra_statements() = std::move(s); - } - return google::cloud::internal::AsyncLongRunningOperation< - gsad::v1::Database>( - background_threads_->cq(), internal::SaveCurrentOptions(), - std::move(request), - [stub = stub_](google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions const&, - gsad::v1::CreateDatabaseRequest const& request) { - return stub->AsyncCreateDatabase(cq, std::move(context), request); - }, - [stub = stub_]( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions const&, - google::longrunning::GetOperationRequest const& request) { - return stub->AsyncGetOperation(cq, std::move(context), request); - }, - [stub = stub_]( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions const&, - google::longrunning::CancelOperationRequest const& request) { - return stub->AsyncCancelOperation(cq, std::move(context), request); - }, - &google::cloud::internal::ExtractLongRunningResultResponse< - gsad::v1::Database>, - retry_policy_prototype_->clone(), backoff_policy_prototype_->clone(), - Idempotency::kNonIdempotent, polling_policy_prototype_->clone(), - __func__); - } - - StatusOr GetDatabase( - GetDatabaseParams p) override { - gsad::v1::GetDatabaseRequest request; - request.set_name(p.database.FullName()); - return RetryLoop( - retry_policy_prototype_->clone(), backoff_policy_prototype_->clone(), - Idempotency::kIdempotent, - [this](grpc::ClientContext& context, - gsad::v1::GetDatabaseRequest const& request) { - return stub_->GetDatabase(context, request); - }, - request, __func__); - } - - StatusOr - GetDatabaseDdl(GetDatabaseDdlParams p) override { - gsad::v1::GetDatabaseDdlRequest request; - request.set_database(p.database.FullName()); - return RetryLoop( - retry_policy_prototype_->clone(), backoff_policy_prototype_->clone(), - Idempotency::kIdempotent, - [this](grpc::ClientContext& context, - gsad::v1::GetDatabaseDdlRequest const& request) { - return stub_->GetDatabaseDdl(context, request); - }, - request, __func__); - } - - future< - StatusOr> - UpdateDatabase(UpdateDatabaseParams p) override { - gsad::v1::UpdateDatabaseDdlRequest request; - request.set_database(p.database.FullName()); - for (auto& s : p.statements) { - *request.add_statements() = std::move(s); - } - return google::cloud::internal::AsyncLongRunningOperation< - gsad::v1::UpdateDatabaseDdlMetadata>( - background_threads_->cq(), internal::SaveCurrentOptions(), - std::move(request), - [stub = stub_](google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions const&, - gsad::v1::UpdateDatabaseDdlRequest const& request) { - return stub->AsyncUpdateDatabaseDdl(cq, std::move(context), request); - }, - [stub = stub_]( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions const&, - google::longrunning::GetOperationRequest const& request) { - return stub->AsyncGetOperation(cq, std::move(context), request); - }, - [stub = stub_]( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions const&, - google::longrunning::CancelOperationRequest const& request) { - return stub->AsyncCancelOperation(cq, std::move(context), request); - }, - &google::cloud::internal::ExtractLongRunningResultMetadata< - gsad::v1::UpdateDatabaseDdlMetadata>, - retry_policy_prototype_->clone(), backoff_policy_prototype_->clone(), - Idempotency::kNonIdempotent, polling_policy_prototype_->clone(), - __func__); - } - - Status DropDatabase(DropDatabaseParams p) override { - google::spanner::admin::database::v1::DropDatabaseRequest request; - request.set_database(p.database.FullName()); - return RetryLoop( - retry_policy_prototype_->clone(), backoff_policy_prototype_->clone(), - Idempotency::kIdempotent, - [this](grpc::ClientContext& context, - gsad::v1::DropDatabaseRequest const& request) { - return stub_->DropDatabase(context, request); - }, - request, __func__); - } - - ListDatabaseRange ListDatabases(ListDatabasesParams p) override { - gsad::v1::ListDatabasesRequest request; - request.set_parent(p.instance.FullName()); - request.clear_page_token(); - auto& stub = stub_; - // Because we do not have C++14 generalized lambda captures we cannot just - // use the unique_ptr<> here, so convert to shared_ptr<> instead. - auto retry = - std::shared_ptr(retry_policy_prototype_->clone()); - auto backoff = std::shared_ptr( - backoff_policy_prototype_->clone()); - - char const* function_name = __func__; - return google::cloud::internal::MakePaginationRange( - std::move(request), - [stub, retry, backoff, - function_name](gsad::v1::ListDatabasesRequest const& r) { - return RetryLoop( - retry->clone(), backoff->clone(), Idempotency::kIdempotent, - [stub](grpc::ClientContext& context, - gsad::v1::ListDatabasesRequest const& request) { - return stub->ListDatabases(context, request); - }, - r, function_name); - }, - [](gsad::v1::ListDatabasesResponse r) { - std::vector result(r.databases().size()); - auto& dbs = *r.mutable_databases(); - std::move(dbs.begin(), dbs.end(), result.begin()); - return result; - }); - } - - future> - RestoreDatabase(RestoreDatabaseParams p) override { - gsad::v1::RestoreDatabaseRequest request; - request.set_parent(p.database.instance().FullName()); - request.set_database_id(p.database.database_id()); - request.set_backup(std::move(p.backup_full_name)); - struct EncryptionVisitor { - explicit EncryptionVisitor(gsad::v1::RestoreDatabaseRequest& request) - : request_(request) {} - void operator()(DefaultEncryption const&) const { - // No encryption_config => USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION. - // That is, use the same encryption configuration as the backup. - } - void operator()(GoogleEncryption const&) const { - auto* config = request_.mutable_encryption_config(); - config->set_encryption_type(gsad::v1::RestoreDatabaseEncryptionConfig:: - GOOGLE_DEFAULT_ENCRYPTION); - } - void operator()(CustomerManagedEncryption const& cme) const { - auto* config = request_.mutable_encryption_config(); - config->set_encryption_type(gsad::v1::RestoreDatabaseEncryptionConfig:: - CUSTOMER_MANAGED_ENCRYPTION); - config->set_kms_key_name(cme.encryption_key().FullName()); - } - gsad::v1::RestoreDatabaseRequest& request_; - }; - absl::visit(EncryptionVisitor(request), p.encryption_config); - return google::cloud::internal::AsyncLongRunningOperation< - gsad::v1::Database>( - background_threads_->cq(), internal::SaveCurrentOptions(), - std::move(request), - [stub = stub_](google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions const&, - gsad::v1::RestoreDatabaseRequest const& request) { - return stub->AsyncRestoreDatabase(cq, std::move(context), request); - }, - [stub = stub_]( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions const&, - google::longrunning::GetOperationRequest const& request) { - return stub->AsyncGetOperation(cq, std::move(context), request); - }, - [stub = stub_]( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions const&, - google::longrunning::CancelOperationRequest const& request) { - return stub->AsyncCancelOperation(cq, std::move(context), request); - }, - &google::cloud::internal::ExtractLongRunningResultResponse< - gsad::v1::Database>, - retry_policy_prototype_->clone(), backoff_policy_prototype_->clone(), - Idempotency::kNonIdempotent, polling_policy_prototype_->clone(), - __func__); - } - - StatusOr GetIamPolicy( - GetIamPolicyParams p) override { - google::iam::v1::GetIamPolicyRequest request; - request.set_resource(p.database.FullName()); - return RetryLoop( - retry_policy_prototype_->clone(), backoff_policy_prototype_->clone(), - Idempotency::kIdempotent, - [this](grpc::ClientContext& context, - google::iam::v1::GetIamPolicyRequest const& request) { - return stub_->GetIamPolicy(context, request); - }, - request, __func__); - } - - StatusOr SetIamPolicy( - SetIamPolicyParams p) override { - google::iam::v1::SetIamPolicyRequest request; - request.set_resource(p.database.FullName()); - *request.mutable_policy() = std::move(p.policy); - auto const idempotency = request.policy().etag().empty() - ? Idempotency::kNonIdempotent - : Idempotency::kIdempotent; - return RetryLoop( - retry_policy_prototype_->clone(), backoff_policy_prototype_->clone(), - idempotency, - [this](grpc::ClientContext& context, - google::iam::v1::SetIamPolicyRequest const& request) { - return stub_->SetIamPolicy(context, request); - }, - request, __func__); - } - - StatusOr TestIamPermissions( - TestIamPermissionsParams p) override { - google::iam::v1::TestIamPermissionsRequest request; - request.set_resource(p.database.FullName()); - for (auto& permission : p.permissions) { - request.add_permissions(std::move(permission)); - } - return RetryLoop( - retry_policy_prototype_->clone(), backoff_policy_prototype_->clone(), - Idempotency::kIdempotent, - [this](grpc::ClientContext& context, - google::iam::v1::TestIamPermissionsRequest const& request) { - return stub_->TestIamPermissions(context, request); - }, - request, __func__); - } - - future> CreateBackup( - CreateBackupParams p) override { - gsad::v1::CreateBackupRequest request; - request.set_parent(p.database.instance().FullName()); - request.set_backup_id(p.backup_id); - auto& backup = *request.mutable_backup(); - backup.set_database(p.database.FullName()); - // `p.expire_time` is deprecated and ignored here. - *backup.mutable_expire_time() = - p.expire_timestamp.get().value(); - if (p.version_time) { - *backup.mutable_version_time() = - p.version_time->get().value(); - } - struct EncryptionVisitor { - explicit EncryptionVisitor(gsad::v1::CreateBackupRequest& request) - : request_(request) {} - void operator()(DefaultEncryption const&) const { - // No encryption_config => USE_DATABASE_ENCRYPTION. - // That is, use the same encryption configuration as the database. - } - void operator()(GoogleEncryption const&) const { - auto* config = request_.mutable_encryption_config(); - config->set_encryption_type( - gsad::v1::CreateBackupEncryptionConfig::GOOGLE_DEFAULT_ENCRYPTION); - } - void operator()(CustomerManagedEncryption const& cme) const { - auto* config = request_.mutable_encryption_config(); - config->set_encryption_type(gsad::v1::CreateBackupEncryptionConfig:: - CUSTOMER_MANAGED_ENCRYPTION); - config->set_kms_key_name(cme.encryption_key().FullName()); - } - gsad::v1::CreateBackupRequest& request_; - }; - absl::visit(EncryptionVisitor(request), p.encryption_config); - return google::cloud::internal::AsyncLongRunningOperation( - background_threads_->cq(), internal::SaveCurrentOptions(), - std::move(request), - [stub = stub_](google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions const&, - gsad::v1::CreateBackupRequest const& request) { - return stub->AsyncCreateBackup(cq, std::move(context), request); - }, - [stub = stub_]( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions const&, - google::longrunning::GetOperationRequest const& request) { - return stub->AsyncGetOperation(cq, std::move(context), request); - }, - [stub = stub_]( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions const&, - google::longrunning::CancelOperationRequest const& request) { - return stub->AsyncCancelOperation(cq, std::move(context), request); - }, - &google::cloud::internal::ExtractLongRunningResultResponse< - gsad::v1::Backup>, - retry_policy_prototype_->clone(), backoff_policy_prototype_->clone(), - Idempotency::kNonIdempotent, polling_policy_prototype_->clone(), - __func__); - } - - StatusOr GetBackup( - GetBackupParams p) override { - gsad::v1::GetBackupRequest request; - request.set_name(p.backup_full_name); - return RetryLoop( - retry_policy_prototype_->clone(), backoff_policy_prototype_->clone(), - Idempotency::kIdempotent, - [this](grpc::ClientContext& context, - gsad::v1::GetBackupRequest const& request) { - return stub_->GetBackup(context, request); - }, - request, __func__); - } - - Status DeleteBackup(DeleteBackupParams p) override { - google::spanner::admin::database::v1::DeleteBackupRequest request; - request.set_name(p.backup_full_name); - return RetryLoop( - retry_policy_prototype_->clone(), backoff_policy_prototype_->clone(), - Idempotency::kIdempotent, - [this](grpc::ClientContext& context, - gsad::v1::DeleteBackupRequest const& request) { - return stub_->DeleteBackup(context, request); - }, - request, __func__); - } - - ListBackupsRange ListBackups(ListBackupsParams p) override { - gsad::v1::ListBackupsRequest request; - request.set_parent(p.instance.FullName()); - request.set_filter(std::move(p.filter)); - auto& stub = stub_; - // Because we do not have C++14 generalized lambda captures we cannot just - // use the unique_ptr<> here, so convert to shared_ptr<> instead. - auto retry = - std::shared_ptr(retry_policy_prototype_->clone()); - auto backoff = std::shared_ptr( - backoff_policy_prototype_->clone()); - - char const* function_name = __func__; - return google::cloud::internal::MakePaginationRange( - std::move(request), - [stub, retry, backoff, - function_name](gsad::v1::ListBackupsRequest const& r) { - return RetryLoop( - retry->clone(), backoff->clone(), Idempotency::kIdempotent, - [stub](grpc::ClientContext& context, - gsad::v1::ListBackupsRequest const& request) { - return stub->ListBackups(context, request); - }, - r, function_name); - }, - [](gsad::v1::ListBackupsResponse r) { - std::vector result(r.backups().size()); - auto& backups = *r.mutable_backups(); - std::move(backups.begin(), backups.end(), result.begin()); - return result; - }); - } - - StatusOr UpdateBackup( - UpdateBackupParams p) override { - return RetryLoop( - retry_policy_prototype_->clone(), backoff_policy_prototype_->clone(), - Idempotency::kIdempotent, - [this](grpc::ClientContext& context, - gsad::v1::UpdateBackupRequest const& request) { - return stub_->UpdateBackup(context, request); - }, - p.request, __func__); - } - - ListBackupOperationsRange ListBackupOperations( - ListBackupOperationsParams p) override { - gsad::v1::ListBackupOperationsRequest request; - request.set_parent(p.instance.FullName()); - request.set_filter(std::move(p.filter)); - auto& stub = stub_; - // Because we do not have C++14 generalized lambda captures we cannot just - // use the unique_ptr<> here, so convert to shared_ptr<> instead. - auto retry = - std::shared_ptr(retry_policy_prototype_->clone()); - auto backoff = std::shared_ptr( - backoff_policy_prototype_->clone()); - - char const* function_name = __func__; - return google::cloud::internal::MakePaginationRange< - ListBackupOperationsRange>( - std::move(request), - [stub, retry, backoff, - function_name](gsad::v1::ListBackupOperationsRequest const& r) { - return RetryLoop( - retry->clone(), backoff->clone(), Idempotency::kIdempotent, - [stub](grpc::ClientContext& context, - gsad::v1::ListBackupOperationsRequest const& request) { - return stub->ListBackupOperations(context, request); - }, - r, function_name); - }, - [](gsad::v1::ListBackupOperationsResponse r) { - std::vector result( - r.operations().size()); - auto& operations = *r.mutable_operations(); - std::move(operations.begin(), operations.end(), result.begin()); - return result; - }); - } - - ListDatabaseOperationsRange ListDatabaseOperations( - ListDatabaseOperationsParams p) override { - gsad::v1::ListDatabaseOperationsRequest request; - request.set_parent(p.instance.FullName()); - request.set_filter(std::move(p.filter)); - auto& stub = stub_; - // Because we do not have C++14 generalized lambda captures we cannot just - // use the unique_ptr<> here, so convert to shared_ptr<> instead. - auto retry = - std::shared_ptr(retry_policy_prototype_->clone()); - auto backoff = std::shared_ptr( - backoff_policy_prototype_->clone()); - - char const* function_name = __func__; - return google::cloud::internal::MakePaginationRange< - ListDatabaseOperationsRange>( - std::move(request), - [stub, retry, backoff, - function_name](gsad::v1::ListDatabaseOperationsRequest const& r) { - return RetryLoop( - retry->clone(), backoff->clone(), Idempotency::kIdempotent, - [stub](grpc::ClientContext& context, - gsad::v1::ListDatabaseOperationsRequest const& request) { - return stub->ListDatabaseOperations(context, request); - }, - r, function_name); - }, - [](gsad::v1::ListDatabaseOperationsResponse r) { - std::vector result( - r.operations().size()); - auto& operations = *r.mutable_operations(); - std::move(operations.begin(), operations.end(), result.begin()); - return result; - }); - } - - private: - std::shared_ptr stub_; - Options opts_; - std::unique_ptr retry_policy_prototype_; - std::unique_ptr backoff_policy_prototype_; - std::unique_ptr polling_policy_prototype_; - - // Implementations of `BackgroundThreads` typically create a pool of - // threads that are joined during destruction, so, to avoid ownership - // cycles, those threads should never assume ownership of this object - // (e.g., via a `std::shared_ptr<>`). - std::unique_ptr background_threads_; -}; - -} // namespace - -DatabaseAdminConnection::~DatabaseAdminConnection() = default; - -std::shared_ptr MakeDatabaseAdminConnection( - Options opts) { - internal::CheckExpectedOptions(opts, __func__); - opts = spanner_internal::DefaultAdminOptions(std::move(opts)); - auto stub = spanner_internal::CreateDefaultDatabaseAdminStub(opts); - return std::make_shared( - std::move(stub), std::move(opts)); -} - -std::shared_ptr MakeDatabaseAdminConnection( - ConnectionOptions const& options) { - return MakeDatabaseAdminConnection(internal::MakeOptions(options)); -} - -std::shared_ptr MakeDatabaseAdminConnection( - ConnectionOptions const& options, std::unique_ptr retry_policy, - std::unique_ptr backoff_policy, - std::unique_ptr polling_policy) { - auto opts = internal::MakeOptions(options); - opts.set(std::move(retry_policy)); - opts.set(std::move(backoff_policy)); - opts.set(std::move(polling_policy)); - return MakeDatabaseAdminConnection(std::move(opts)); -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace spanner - -namespace spanner_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -std::shared_ptr -MakeDatabaseAdminConnectionForTesting(std::shared_ptr stub, - Options opts) { - opts = spanner_internal::DefaultAdminOptions(std::move(opts)); - return std::make_shared( - std::move(stub), std::move(opts)); -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace spanner_internal -} // namespace cloud -} // namespace google diff --git a/google/cloud/spanner/database_admin_connection.h b/google/cloud/spanner/database_admin_connection.h deleted file mode 100644 index 588d5b6305e36..0000000000000 --- a/google/cloud/spanner/database_admin_connection.h +++ /dev/null @@ -1,419 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_DATABASE_ADMIN_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_DATABASE_ADMIN_CONNECTION_H - -#include "google/cloud/spanner/backoff_policy.h" -#include "google/cloud/spanner/backup.h" -#include "google/cloud/spanner/database.h" -#include "google/cloud/spanner/encryption_config.h" -#include "google/cloud/spanner/instance.h" -#include "google/cloud/spanner/internal/database_admin_stub.h" -#include "google/cloud/spanner/polling_policy.h" -#include "google/cloud/spanner/retry_policy.h" -#include "google/cloud/spanner/timestamp.h" -#include "google/cloud/spanner/version.h" -#include "google/cloud/backoff_policy.h" -#include "google/cloud/internal/pagination_range.h" -#include "google/cloud/options.h" -#include "absl/types/optional.h" -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace spanner { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/** - * An input range to stream all the databases in a Cloud Spanner instance. - * - * This type models an [input range][cppref-input-range] of - * `google::spanner::admin::v1::Database` objects. Applications can make a - * single pass through the results. - * - * [cppref-input-range]: https://en.cppreference.com/w/cpp/ranges/input_range - */ -using ListDatabaseRange = ::google::cloud::internal::PaginationRange< - google::spanner::admin::database::v1::Database>; - -/** - * An input range to stream backup operations in Cloud Spanner instance. - * - * This type models an [input range][cppref-input-range] of - * `google::longrunning::Operation` objects. Applications can make a - * single pass through the results. - * - * [cppref-input-range]: https://en.cppreference.com/w/cpp/ranges/input_range - */ -using ListBackupOperationsRange = - google::cloud::internal::PaginationRange; - -/** - * An input range to stream database operations in Cloud Spanner instance. - * - * This type models an [input range][cppref-input-range] of - * `google::longrunning::Operation` objects. Applications can make a - * single pass through the results. - * - * [cppref-input-range]: https://en.cppreference.com/w/cpp/ranges/input_range - */ -using ListDatabaseOperationsRange = - google::cloud::internal::PaginationRange; - -/** - * An input range to stream backups in Cloud Spanner instance. - * - * This type models an [input range][cppref-input-range] of - * `google::longrunning::Operation` objects. Applications can make a - * single pass through the results. - * - * [cppref-input-range]: https://en.cppreference.com/w/cpp/ranges/input_range - */ -using ListBackupsRange = ::google::cloud::internal::PaginationRange< - google::spanner::admin::database::v1::Backup>; - -/** - * A connection to the Cloud Spanner instance administration service. - * - * @deprecated Please use #google::cloud::spanner_admin::DatabaseAdminClient - * and #google::cloud::spanner_admin::DatabaseAdminConnection instead. - * - * This interface defines pure-virtual methods for each of the user-facing - * overload sets in `DatabaseAdminClient`. This allows users to inject custom - * behavior (e.g., with a Google Mock object) in a `DatabaseAdminClient` object - * for use in their own tests. - * - * To create a concrete instance that connects you to a real Cloud Spanner - * instance administration service, see `MakeDatabaseAdminConnection()`. - */ -class GOOGLE_CLOUD_CPP_SPANNER_ADMIN_API_DEPRECATED("DatabaseAdminConnection") - DatabaseAdminConnection { - public: - virtual ~DatabaseAdminConnection() = 0; - - ///@{ - /** - * @name Define the arguments for each member function. - * - * Applications may define classes derived from `DatabaseAdminConnection`, for - * example, because they want to mock the class. To avoid breaking all such - * derived classes when we change the number or type of the arguments to the - * member functions we define light weight structures to pass the arguments. - */ - /// Wrap the arguments for `CreateDatabase()`. - struct CreateDatabaseParams { - /// The name of the database. - Database database; - /// Any additional statements to execute after creating the database. - std::vector extra_statements; - /// How to encrypt the database. - EncryptionConfig encryption_config; - }; - - /// Wrap the arguments for `GetDatabase()`. - struct GetDatabaseParams { - /// The name of the database. - Database database; - }; - - /// Wrap the arguments for `GetDatabaseDdl()`. - struct GetDatabaseDdlParams { - /// The name of the database. - Database database; - }; - - /// Wrap the arguments for `UpdateDatabase()`. - struct UpdateDatabaseParams { - /// The name of the database. - Database database; - /// The DDL statements updating the database schema. - std::vector statements; - }; - - /// Wrap the arguments for `DropDatabase()`. - struct DropDatabaseParams { - /// The name of the database. - Database database; - }; - - /// Wrap the arguments for `ListDatabases()`. - struct ListDatabasesParams { - /// The name of the instance. - Instance instance; - }; - - /// Wrap the arguments for `GetIamPolicy()`. - struct GetIamPolicyParams { - /// The name of the database. - Database database; - }; - - /// Wrap the arguments for `SetIamPolicy()`. - struct SetIamPolicyParams { - /// The name of the database. - Database database; - google::iam::v1::Policy policy; - }; - - /// Wrap the arguments for `TestIamPermissions()`. - struct TestIamPermissionsParams { - /// The name of the database. - Database database; - std::vector permissions; - }; - - /// Wrap the arguments for `CreateBackup()`. - struct CreateBackupParams { - /// The name of the database. - Database database; - std::string backup_id; - /// @deprecated `DatabaseAdminClient::CreateBackup()` initializes - /// `expire_time`, but `DatabaseAdminConnection::CreateBackup()` now - /// ignores it. Use `expire_timestamp` instead. - std::chrono::system_clock::time_point expire_time; - Timestamp expire_timestamp; - /// The backup will contain an externally consistent copy of the database - /// at `version_time`. If `version_time` is not specified, the system will - /// set `version_time` to the `create_time` of the backup. - absl::optional version_time; - /// How to encrypt the backup. - EncryptionConfig encryption_config; - }; - - /// Wrap the arguments for `GetBackup()`. - struct GetBackupParams { - /// The name of the backup. - std::string backup_full_name; - }; - - /// Wrap the arguments for `DeleteBackup()`. - struct DeleteBackupParams { - /// The name of the backup. - std::string backup_full_name; - }; - - /// Wrap the arguments for `ListBackups()`. - struct ListBackupsParams { - /// The name of the instance. - Instance instance; - std::string filter; - }; - - /// Wrap the arguments for `RestoreDatabase()`. - struct RestoreDatabaseParams { - /// The name of the database. - Database database; - /// The source backup for the restore. - std::string backup_full_name; - /// How to encrypt the database. - EncryptionConfig encryption_config; - }; - - /// Wrap the arguments for `UpdateBackup()`. - struct UpdateBackupParams { - google::spanner::admin::database::v1::UpdateBackupRequest request; - }; - - /// Wrap the arguments for `ListBackupOperations()`. - struct ListBackupOperationsParams { - /// The name of the instance. - Instance instance; - std::string filter; - }; - - /// Wrap the arguments for `ListDatabaseOperations()`. - struct ListDatabaseOperationsParams { - /// The name of the instance. - Instance instance; - std::string filter; - }; - ///@} - - virtual Options options() { return Options{}; } - - /// Define the interface for a google.spanner.v1.DatabaseAdmin.CreateDatabase - /// RPC. - virtual future> - CreateDatabase(CreateDatabaseParams) = 0; - - /// Define the interface for a google.spanner.v1.DatabaseAdmin.GetDatabase - /// RPC. - virtual StatusOr GetDatabase( - GetDatabaseParams) = 0; - - /// Define the interface for a google.spanner.v1.DatabaseAdmin.GetDatabaseDdl - /// RPC. - virtual StatusOr - GetDatabaseDdl(GetDatabaseDdlParams) = 0; - - /// Define the interface for a google.spanner.v1.DatabaseAdmin.UpdateDatabase - /// RPC. - virtual future< - StatusOr> - UpdateDatabase(UpdateDatabaseParams) = 0; - - /// Define the interface for a google.spanner.v1.DatabaseAdmin.DropDatabase - /// RPC. - virtual Status DropDatabase(DropDatabaseParams) = 0; - - /// Define the interface for a google.spanner.v1.DatabaseAdmin.DropDatabase - /// RPC. - virtual ListDatabaseRange ListDatabases(ListDatabasesParams) = 0; - - /// Define the interface for a google.spanner.v1.DatabaseAdmin.RestoreDatabase - /// RPC. - virtual future> - RestoreDatabase(RestoreDatabaseParams); - - /// Define the interface for a google.spanner.v1.DatabaseAdmin.GetIamPolicy - /// RPC. - virtual StatusOr GetIamPolicy( - GetIamPolicyParams) = 0; - - /// Define the interface for a google.spanner.v1.DatabaseAdmin.SetIamPolicy - /// RPC. - virtual StatusOr SetIamPolicy( - SetIamPolicyParams) = 0; - - /// Define the interface for a - /// google.spanner.v1.DatabaseAdmin.TestIamPermissions RPC. - virtual StatusOr - TestIamPermissions(TestIamPermissionsParams) = 0; - - /// Define the interface for a google.spanner.v1.DatabaseAdmin.CreateBackup - /// RPC. - virtual future> - CreateBackup(CreateBackupParams); - - /// Define the interface for a google.spanner.v1.DatabaseAdmin.GetBackup RPC. - virtual StatusOr GetBackup( - GetBackupParams); - - /// Define the interface for a google.spanner.v1.DatabaseAdmin.DeleteBackup - /// RPC. - virtual Status DeleteBackup(DeleteBackupParams); - - /// Define the interface for a google.spanner.v1.DatabaseAdmin.ListBackups - /// RPC. - virtual ListBackupsRange ListBackups(ListBackupsParams); - - /// Define the interface for a google.spanner.v1.DatabaseAdmin.UpdateBackup - /// RPC. - virtual StatusOr UpdateBackup( - UpdateBackupParams); - - /// Define the interface for a - /// google.spanner.v1.DatabaseAdmin.ListBackupOperations RPC. - virtual ListBackupOperationsRange ListBackupOperations( - ListBackupOperationsParams); - - /// Define the interface for a - /// google.spanner.v1.DatabaseAdmin.ListDatabaseOperations RPC. - virtual ListDatabaseOperationsRange ListDatabaseOperations( - ListDatabaseOperationsParams); -}; - -/** - * Returns a DatabaseAdminConnection object that can be used for interacting - * with Cloud Spanner's admin APIs. - * - * The returned connection object should not be used directly; instead it - * should be given to a `DatabaseAdminClient` instance. - * - * The optional @p opts argument may be used to configure aspects of the - * returned `DatabaseAdminConnection`. Expected options are any of types in the - * following option lists. - * - * - `google::cloud::CommonOptionList` - * - `google::cloud::GrpcOptionList` - * - `google::cloud::SpannerPolicyOptionList` - * - * @see `DatabaseAdminConnection` - * - * @param opts (optional) configure the `DatabaseAdminConnection` created by - * this function. - */ -GOOGLE_CLOUD_CPP_SPANNER_ADMIN_API_DEPRECATED("MakeDatabaseAdminConnection()") -std::shared_ptr MakeDatabaseAdminConnection( - Options opts = {}); - -/** - * Returns a DatabaseAdminConnection object that can be used for interacting - * with Cloud Spanner's admin APIs. - * - * The returned connection object should not be used directly, rather it should - * be given to a `DatabaseAdminClient` instance. - * - * @note Prefer using the `MakeDatabaseAdminConnection()` overload that accepts - * `google::cloud::Options`. - * - * @see `DatabaseAdminConnection` - * - * @param options configure the `DatabaseAdminConnection` created by this - * function. - */ -GOOGLE_CLOUD_CPP_SPANNER_ADMIN_API_DEPRECATED("MakeDatabaseAdminConnection()") -std::shared_ptr MakeDatabaseAdminConnection( - ConnectionOptions const& options); - -/** - * Returns a DatabaseAdminConnection object that can be used for interacting - * with Cloud Spanner's admin APIs. - * - * The returned connection object should not be used directly, rather it should - * be given to a `DatabaseAdminClient` instance. - * - * @note Prefer using the `MakeDatabaseAdminConnection()` overload that accepts - * `google::cloud::Options`. - * - * @param options configure the `DatabaseAdminConnection` created by this - * function. - * @param retry_policy control for how long (or how many times) are retryable - * RPCs attempted - * @param backoff_policy controls the backoff behavior between retry attempts, - * typically some form of exponential backoff with jitter - * @param polling_policy controls for how often, and how quickly, are long - * running checked for completion - * - * @par Example - * @snippet samples.cc custom-database-admin-policies - */ -GOOGLE_CLOUD_CPP_SPANNER_ADMIN_API_DEPRECATED("MakeDatabaseAdminConnection()") -std::shared_ptr MakeDatabaseAdminConnection( - ConnectionOptions const& options, std::unique_ptr retry_policy, - std::unique_ptr backoff_policy, - std::unique_ptr polling_policy); - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace spanner - -namespace spanner_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// Internal-only factory that allows us to inject mock stubs for testing. -std::shared_ptr -MakeDatabaseAdminConnectionForTesting(std::shared_ptr stub, - Options opts); - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace spanner_internal - -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_DATABASE_ADMIN_CONNECTION_H diff --git a/google/cloud/spanner/database_admin_connection_test.cc b/google/cloud/spanner/database_admin_connection_test.cc deleted file mode 100644 index 4ed83b5ee61cf..0000000000000 --- a/google/cloud/spanner/database_admin_connection_test.cc +++ /dev/null @@ -1,1576 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// TODO(#7356): Remove this file after the deprecation period expires -#include "google/cloud/internal/disable_deprecation_warnings.inc" -#include "google/cloud/spanner/database_admin_connection.h" -#include "google/cloud/spanner/internal/defaults.h" -#include "google/cloud/spanner/options.h" -#include "google/cloud/spanner/testing/mock_database_admin_stub.h" -#include "google/cloud/spanner/timestamp.h" -#include "google/cloud/kms_key_name.h" -#include "google/cloud/options.h" -#include "google/cloud/testing_util/is_proto_equal.h" -#include "google/cloud/testing_util/status_matchers.h" -#include "absl/time/clock.h" -#include "absl/time/time.h" -#include -#include -#include - -namespace google { -namespace cloud { -namespace spanner { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -namespace gsad = ::google::spanner::admin::database; - -using ::google::cloud::spanner_testing::MockDatabaseAdminStub; -using ::google::cloud::testing_util::IsProtoEqual; -using ::google::cloud::testing_util::StatusIs; -using ::google::protobuf::TextFormat; -using ::testing::AnyOf; -using ::testing::AtLeast; -using ::testing::AtMost; -using ::testing::ElementsAre; -using ::testing::IsEmpty; -using ::testing::Return; - -std::shared_ptr CreateTestingConnection( - std::shared_ptr mock) { - LimitedErrorCountRetryPolicy retry(/*maximum_failures=*/2); - ExponentialBackoffPolicy backoff( - /*initial_delay=*/std::chrono::microseconds(1), - /*maximum_delay=*/std::chrono::microseconds(1), - /*scaling=*/2.0); - GenericPollingPolicy polling(retry, backoff); - Options opts; - opts.set(retry.clone()); - opts.set(backoff.clone()); - opts.set(polling.clone()); - return spanner_internal::MakeDatabaseAdminConnectionForTesting( - std::move(mock), std::move(opts)); -} - -/// @test Verify that successful case works. -TEST(DatabaseAdminConnectionTest, CreateDatabaseSuccess) { - auto mock = std::make_shared(); - std::string const database_name = - "projects/test-project/instances/test-instance/databases/test-database"; - - EXPECT_CALL(*mock, AsyncCreateDatabase) - .WillOnce([](CompletionQueue&, auto, - gsad::v1::CreateDatabaseRequest const& request) { - EXPECT_FALSE(request.has_encryption_config()); - google::longrunning::Operation op; - op.set_name("test-operation-name"); - op.set_done(false); - return make_ready_future(make_status_or(std::move(op))); - }); - EXPECT_CALL(*mock, AsyncGetOperation) - .WillOnce( - [&database_name](CompletionQueue&, auto, - google::longrunning::GetOperationRequest const& r) { - EXPECT_EQ("test-operation-name", r.name()); - google::longrunning::Operation op; - op.set_name(r.name()); - op.set_done(true); - gsad::v1::Database response; - response.set_name(database_name); - response.set_state(gsad::v1::Database::READY); - op.mutable_response()->PackFrom(response); - return make_ready_future(make_status_or(std::move(op))); - }); - - auto conn = CreateTestingConnection(std::move(mock)); - Database dbase("test-project", "test-instance", "test-database"); - EXPECT_EQ(dbase.FullName(), database_name); - auto fut = conn->CreateDatabase({dbase, {}, {}}); - auto response = fut.get(); - ASSERT_STATUS_OK(response); - EXPECT_EQ(response->name(), database_name); - EXPECT_EQ(response->state(), gsad::v1::Database::READY); - EXPECT_FALSE(response->has_encryption_config()); -} - -/// @test Verify creating a database with an encryption key. -TEST(DatabaseAdminClientTest, CreateDatabaseWithEncryption) { - auto mock = std::make_shared(); - std::string const database_name = - "projects/test-project/instances/test-instance/databases/test-database"; - - EXPECT_CALL(*mock, AsyncCreateDatabase) - .WillOnce([](CompletionQueue&, auto, - gsad::v1::CreateDatabaseRequest const& request) { - EXPECT_TRUE(request.has_encryption_config()); - if (request.has_encryption_config()) { - EXPECT_EQ(request.encryption_config().kms_key_name(), - "projects/test-project/locations/some-location/keyRings/" - "a-key-ring/cryptoKeys/a-key-name"); - } - google::longrunning::Operation op; - op.set_name("test-operation-name"); - op.set_done(false); - return make_ready_future(make_status_or(std::move(op))); - }); - EXPECT_CALL(*mock, AsyncGetOperation) - .WillOnce( - [&database_name](CompletionQueue&, auto, - google::longrunning::GetOperationRequest const& r) { - EXPECT_EQ("test-operation-name", r.name()); - google::longrunning::Operation op; - op.set_name(r.name()); - op.set_done(true); - gsad::v1::Database response; - response.set_name(database_name); - response.set_state(gsad::v1::Database::READY); - response.mutable_encryption_config()->set_kms_key_name( - "projects/test-project/locations/some-location/keyRings/" - "a-key-ring/cryptoKeys/some-key-name"); - op.mutable_response()->PackFrom(response); - return make_ready_future(make_status_or(std::move(op))); - }); - - auto conn = CreateTestingConnection(std::move(mock)); - Database dbase("test-project", "test-instance", "test-database"); - EXPECT_EQ(dbase.FullName(), database_name); - KmsKeyName encryption_key("test-project", "some-location", "a-key-ring", - "a-key-name"); - auto fut = conn->CreateDatabase( - {dbase, {}, CustomerManagedEncryption(std::move(encryption_key))}); - auto response = fut.get(); - ASSERT_STATUS_OK(response); - EXPECT_EQ(response->name(), database_name); - EXPECT_EQ(response->state(), gsad::v1::Database::READY); - EXPECT_TRUE(response->has_encryption_config()); - if (response->has_encryption_config()) { - EXPECT_EQ( - response->encryption_config().kms_key_name(), - "projects/test-project/locations/some-location/keyRings/a-key-ring/" - "cryptoKeys/some-key-name"); - } -} - -/// @test Verify that a permanent error in CreateDatabase is immediately -/// reported. -TEST(DatabaseAdminConnectionTest, HandleCreateDatabaseError) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, AsyncCreateDatabase) - .WillOnce( - [](CompletionQueue&, auto, gsad::v1::CreateDatabaseRequest const&) { - return make_ready_future(StatusOr( - Status(StatusCode::kPermissionDenied, "uh-oh"))); - }); - - auto conn = CreateTestingConnection(std::move(mock)); - Database dbase("test-project", "test-instance", "test-database"); - auto fut = conn->CreateDatabase({dbase, {}, {}}); - auto response = fut.get(); - EXPECT_THAT(response, StatusIs(StatusCode::kPermissionDenied)); -} - -/// @test Verify that the successful case works. -TEST(DatabaseAdminConnectionTest, GetDatabase) { - auto constexpr kResponseText = R"pb( - name: "projects/project/instances/instance/databases/database" - state: READY - create_time { seconds: 1625696199 nanos: 123456789 } - restore_info { - source_type: BACKUP - backup_info { - backup: "projects/project/instances/instance/backups/backup" - create_time { seconds: 1625696099 nanos: 987564321 } - source_database: "projects/project/instances/instance/databases/database" - version_time { seconds: 1625696099 nanos: 987564321 } - } - } - encryption_config { - kms_key_name: "projects/project/locations/location/keyRings/ring/cryptoKeys/key" - } - version_retention_period: "7d" - earliest_version_time { seconds: 1625696199 nanos: 123456789 } - default_leader: "us-east5" - )pb"; - gsad::v1::Database expected_response; - ASSERT_TRUE(TextFormat::ParseFromString(kResponseText, &expected_response)); - - auto mock = std::make_shared(); - EXPECT_CALL(*mock, GetDatabase) - .WillOnce(Return(Status(StatusCode::kUnavailable, "try-again"))) - .WillOnce([&](grpc::ClientContext&, - gsad::v1::GetDatabaseRequest const& request) { - EXPECT_EQ(request.name(), expected_response.name()); - return expected_response; - }); - - auto conn = CreateTestingConnection(std::move(mock)); - auto response = - conn->GetDatabase({Database("project", "instance", "database")}); - EXPECT_THAT(response, IsOkAndHolds(IsProtoEqual(expected_response))); -} - -/// @test Verify that permanent errors are reported immediately. -TEST(DatabaseAdminConnectionTest, GetDatabasePermanentError) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, GetDatabase) - .WillOnce(Return(Status(StatusCode::kPermissionDenied, "uh-oh"))); - - auto conn = CreateTestingConnection(std::move(mock)); - auto response = conn->GetDatabase( - {Database("test-project", "test-instance", "test-database")}); - EXPECT_THAT(response, StatusIs(StatusCode::kPermissionDenied)); -} - -/// @test Verify that too many transients errors are reported correctly. -TEST(DatabaseAdminConnectionTest, GetDatabaseTooManyTransients) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, GetDatabase) - .Times(AtLeast(2)) - .WillRepeatedly(Return(Status(StatusCode::kUnavailable, "try-again"))); - - auto conn = CreateTestingConnection(std::move(mock)); - auto response = conn->GetDatabase( - {Database("test-project", "test-instance", "test-database")}); - EXPECT_THAT(response, StatusIs(StatusCode::kUnavailable)); -} - -/// @test Verify that the successful case works. -TEST(DatabaseAdminConnectionTest, GetDatabaseDdlSuccess) { - auto mock = std::make_shared(); - std::string const expected_name = - "projects/test-project/instances/test-instance/databases/test-database"; - - EXPECT_CALL(*mock, GetDatabaseDdl) - .WillOnce(Return(Status(StatusCode::kUnavailable, "try-again"))) - .WillOnce( - [&expected_name](grpc::ClientContext&, - gsad::v1::GetDatabaseDdlRequest const& request) { - EXPECT_EQ(expected_name, request.database()); - gsad::v1::GetDatabaseDdlResponse response; - response.add_statements("CREATE DATABASE test-database"); - return response; - }); - - auto conn = CreateTestingConnection(std::move(mock)); - auto response = conn->GetDatabaseDdl( - {Database("test-project", "test-instance", "test-database")}); - ASSERT_STATUS_OK(response); - ASSERT_EQ(1, response->statements_size()); - EXPECT_EQ("CREATE DATABASE test-database", response->statements(0)); -} - -/// @test Verify that permanent errors are reported immediately. -TEST(DatabaseAdminConnectionTest, GetDatabaseDdlPermanentError) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, GetDatabaseDdl) - .WillOnce(Return(Status(StatusCode::kPermissionDenied, "uh-oh"))); - - auto conn = CreateTestingConnection(std::move(mock)); - auto response = conn->GetDatabaseDdl( - {Database("test-project", "test-instance", "test-database")}); - EXPECT_THAT(response, StatusIs(StatusCode::kPermissionDenied)); -} - -/// @test Verify that too many transients errors are reported correctly. -TEST(DatabaseAdminConnectionTest, GetDatabaseDdlTooManyTransients) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, GetDatabaseDdl) - .Times(AtLeast(2)) - .WillRepeatedly(Return(Status(StatusCode::kUnavailable, "try-again"))); - - auto conn = CreateTestingConnection(std::move(mock)); - auto response = conn->GetDatabaseDdl( - {Database("test-project", "test-instance", "test-database")}); - EXPECT_THAT(response, StatusIs(StatusCode::kUnavailable)); -} - -/// @test Verify that successful case works. -TEST(DatabaseAdminConnectionTest, UpdateDatabaseSuccess) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, AsyncUpdateDatabaseDdl) - .WillOnce([](CompletionQueue&, auto, - gsad::v1::UpdateDatabaseDdlRequest const&) { - google::longrunning::Operation op; - op.set_name("test-operation-name"); - op.set_done(false); - return make_ready_future(make_status_or(std::move(op))); - }); - EXPECT_CALL(*mock, AsyncGetOperation) - .WillOnce([](CompletionQueue&, auto, - google::longrunning::GetOperationRequest const& r) { - EXPECT_EQ("test-operation-name", r.name()); - google::longrunning::Operation op; - op.set_name(r.name()); - op.set_done(true); - gsad::v1::UpdateDatabaseDdlMetadata metadata; - metadata.set_database("test-database"); - op.mutable_metadata()->PackFrom(metadata); - return make_ready_future(make_status_or(std::move(op))); - }); - - auto conn = CreateTestingConnection(std::move(mock)); - Database dbase("test-project", "test-instance", "test-database"); - auto fut = conn->UpdateDatabase( - {dbase, {"ALTER TABLE Albums ADD COLUMN MarketingBudget INT64"}}); - auto response = fut.get(); - ASSERT_STATUS_OK(response); - EXPECT_EQ(response->database(), "test-database"); -} - -/// @test Verify that a permanent error in UpdateDatabase is immediately -/// reported. -TEST(DatabaseAdminConnectionTest, UpdateDatabaseErrorInPoll) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, AsyncUpdateDatabaseDdl) - .WillOnce([](CompletionQueue&, auto, - gsad::v1::UpdateDatabaseDdlRequest const&) { - return make_ready_future(StatusOr( - Status(StatusCode::kPermissionDenied, "uh-oh"))); - }); - - auto conn = CreateTestingConnection(std::move(mock)); - Database dbase("test-project", "test-instance", "test-database"); - auto fut = conn->UpdateDatabase( - {dbase, {"ALTER TABLE Albums ADD COLUMN MarketingBudget INT64"}}); - auto response = fut.get(); - EXPECT_THAT(response, StatusIs(StatusCode::kPermissionDenied)); -} - -/// @test Verify that errors in the polling loop are reported. -TEST(DatabaseAdminConnectionTest, CreateDatabaseErrorInPoll) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, AsyncCreateDatabase) - .WillOnce( - [](CompletionQueue&, auto, gsad::v1::CreateDatabaseRequest const&) { - google::longrunning::Operation op; - op.set_name("test-operation-name"); - op.set_done(false); - return make_ready_future(make_status_or(std::move(op))); - }); - EXPECT_CALL(*mock, AsyncGetOperation) - .WillOnce([](CompletionQueue&, auto, - google::longrunning::GetOperationRequest const& r) { - EXPECT_EQ("test-operation-name", r.name()); - google::longrunning::Operation op; - op.set_done(true); - op.mutable_error()->set_code( - static_cast(grpc::StatusCode::PERMISSION_DENIED)); - op.mutable_error()->set_message("uh-oh"); - return make_ready_future(make_status_or(std::move(op))); - }); - - auto conn = CreateTestingConnection(std::move(mock)); - Database dbase("test-project", "test-instance", "test-database"); - auto response = conn->CreateDatabase({dbase, {}, {}}).get(); - EXPECT_THAT(response, StatusIs(StatusCode::kPermissionDenied)); -} - -/// @test Verify that errors in the polling loop are reported. -TEST(DatabaseAdminConnectionTest, UpdateDatabaseGetOperationError) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, AsyncUpdateDatabaseDdl) - .WillOnce([](CompletionQueue&, auto, - gsad::v1::UpdateDatabaseDdlRequest const&) { - google::longrunning::Operation op; - op.set_name("test-operation-name"); - op.set_done(false); - return make_ready_future(make_status_or(std::move(op))); - }); - EXPECT_CALL(*mock, AsyncGetOperation) - .WillOnce([](CompletionQueue&, auto, - google::longrunning::GetOperationRequest const& r) { - EXPECT_EQ("test-operation-name", r.name()); - google::longrunning::Operation op; - op.set_done(true); - op.mutable_error()->set_code( - static_cast(grpc::StatusCode::PERMISSION_DENIED)); - op.mutable_error()->set_message("uh-oh"); - return make_ready_future(make_status_or(std::move(op))); - }); - - auto conn = CreateTestingConnection(std::move(mock)); - Database dbase("test-project", "test-instance", "test-database"); - auto response = - conn->UpdateDatabase( - {dbase, {"ALTER TABLE Albums ADD COLUMN MarketingBudget INT64"}}) - .get(); - EXPECT_THAT(response, StatusIs(StatusCode::kPermissionDenied)); -} - -/// @test Verify that we can list databases in multiple pages. -TEST(DatabaseAdminConnectionTest, ListDatabases) { - constexpr char const* kDatabaseText[5] = { - R"pb( - name: "projects/project/instances/instance/databases/db-1" - state: READY - create_time { seconds: 1625696199 nanos: 111111111 } - restore_info { - source_type: BACKUP - backup_info { - backup: "projects/project/instances/instance/backups/backup" - create_time { seconds: 1625696099 nanos: 111111111 } - source_database: "projects/project/instances/instance/databases/db" - version_time { seconds: 1625696099 nanos: 111111111 } - } - } - encryption_config { - kms_key_name: "projects/project/locations/location/keyRings/ring/cryptoKeys/key" - } - version_retention_period: "1d" - earliest_version_time { seconds: 1625696199 nanos: 111111111 } - default_leader: "us-east1" - )pb", - R"pb( - name: "projects/project/instances/instance/databases/db-2" - state: READY - create_time { seconds: 1625696199 nanos: 222222222 } - restore_info { - source_type: BACKUP - backup_info { - backup: "projects/project/instances/instance/backups/backup" - create_time { seconds: 1625696099 nanos: 222222222 } - source_database: "projects/project/instances/instance/databases/db" - version_time { seconds: 1625696099 nanos: 222222222 } - } - } - encryption_config { - kms_key_name: "projects/project/locations/location/keyRings/ring/cryptoKeys/key" - } - version_retention_period: "2d" - earliest_version_time { seconds: 1625696199 nanos: 222222222 } - default_leader: "us-east2" - )pb", - R"pb( - name: "projects/project/instances/instance/databases/db-3" - state: READY - create_time { seconds: 1625696199 nanos: 333333333 } - restore_info { - source_type: BACKUP - backup_info { - backup: "projects/project/instances/instance/backups/backup" - create_time { seconds: 1625696099 nanos: 333333333 } - source_database: "projects/project/instances/instance/databases/db" - version_time { seconds: 1625696099 nanos: 333333333 } - } - } - encryption_config { - kms_key_name: "projects/project/locations/location/keyRings/ring/cryptoKeys/key" - } - version_retention_period: "3d" - earliest_version_time { seconds: 1625696199 nanos: 333333333 } - default_leader: "us-east3" - )pb", - R"pb( - name: "projects/project/instances/instance/databases/db-4" - state: READY - create_time { seconds: 1625696199 nanos: 444444444 } - restore_info { - source_type: BACKUP - backup_info { - backup: "projects/project/instances/instance/backups/backup" - create_time { seconds: 1625696099 nanos: 444444444 } - source_database: "projects/project/instances/instance/databases/db" - version_time { seconds: 1625696099 nanos: 444444444 } - } - } - encryption_config { - kms_key_name: "projects/project/locations/location/keyRings/ring/cryptoKeys/key" - } - version_retention_period: "4d" - earliest_version_time { seconds: 1625696199 nanos: 444444444 } - default_leader: "us-east4" - )pb", - R"pb( - name: "projects/project/instances/instance/databases/db-5" - state: READY - create_time { seconds: 1625696199 nanos: 555555555 } - restore_info { - source_type: BACKUP - backup_info { - backup: "projects/project/instances/instance/backups/backup" - create_time { seconds: 1625696099 nanos: 555555555 } - source_database: "projects/project/instances/instance/databases/db" - version_time { seconds: 1625696099 nanos: 555555555 } - } - } - encryption_config { - kms_key_name: "projects/project/locations/location/keyRings/ring/cryptoKeys/key" - } - version_retention_period: "5d" - earliest_version_time { seconds: 1625696199 nanos: 555555555 } - default_leader: "us-east5" - )pb", - }; - gsad::v1::Database expected_databases[5]; - ASSERT_TRUE( - TextFormat::ParseFromString(kDatabaseText[0], &expected_databases[0])); - ASSERT_TRUE( - TextFormat::ParseFromString(kDatabaseText[1], &expected_databases[1])); - ASSERT_TRUE( - TextFormat::ParseFromString(kDatabaseText[2], &expected_databases[2])); - ASSERT_TRUE( - TextFormat::ParseFromString(kDatabaseText[3], &expected_databases[3])); - ASSERT_TRUE( - TextFormat::ParseFromString(kDatabaseText[4], &expected_databases[4])); - - Instance in("project", "instance"); - std::string const expected_parent = in.FullName(); - auto mock = std::make_shared(); - EXPECT_CALL(*mock, ListDatabases) - .WillOnce([&](grpc::ClientContext&, - gsad::v1::ListDatabasesRequest const& request) { - EXPECT_EQ(expected_parent, request.parent()); - EXPECT_TRUE(request.page_token().empty()); - - gsad::v1::ListDatabasesResponse page; - page.set_next_page_token("page-1"); - *page.add_databases() = expected_databases[0]; - *page.add_databases() = expected_databases[1]; - return make_status_or(page); - }) - .WillOnce([&](grpc::ClientContext&, - gsad::v1::ListDatabasesRequest const& request) { - EXPECT_EQ(expected_parent, request.parent()); - EXPECT_EQ("page-1", request.page_token()); - - gsad::v1::ListDatabasesResponse page; - page.set_next_page_token("page-2"); - *page.add_databases() = expected_databases[2]; - *page.add_databases() = expected_databases[3]; - return make_status_or(page); - }) - .WillOnce([&](grpc::ClientContext&, - gsad::v1::ListDatabasesRequest const& request) { - EXPECT_EQ(expected_parent, request.parent()); - EXPECT_EQ("page-2", request.page_token()); - - gsad::v1::ListDatabasesResponse page; - page.clear_next_page_token(); - *page.add_databases() = expected_databases[4]; - return make_status_or(page); - }); - - auto conn = CreateTestingConnection(std::move(mock)); - std::vector actual_databases; - for (auto const& database : conn->ListDatabases({in})) { - ASSERT_STATUS_OK(database); - actual_databases.push_back(*database); - } - EXPECT_THAT(actual_databases, - ElementsAre(IsProtoEqual(expected_databases[0]), - IsProtoEqual(expected_databases[1]), - IsProtoEqual(expected_databases[2]), - IsProtoEqual(expected_databases[3]), - IsProtoEqual(expected_databases[4]))); -} - -TEST(DatabaseAdminConnectionTest, ListDatabasesPermanentFailure) { - auto mock = std::make_shared(); - Instance in("test-project", "test-instance"); - - EXPECT_CALL(*mock, ListDatabases) - .WillOnce(Return(Status(StatusCode::kPermissionDenied, "uh-oh"))); - - auto conn = CreateTestingConnection(std::move(mock)); - auto range = conn->ListDatabases({in}); - auto begin = range.begin(); - ASSERT_NE(begin, range.end()); - EXPECT_THAT(*begin, StatusIs(StatusCode::kPermissionDenied)); -} - -TEST(DatabaseAdminConnectionTest, ListDatabasesTooManyFailures) { - auto mock = std::make_shared(); - Instance in("test-project", "test-instance"); - - EXPECT_CALL(*mock, ListDatabases) - .Times(AtLeast(2)) - .WillRepeatedly(Return(Status(StatusCode::kUnavailable, "try-again"))); - - auto conn = CreateTestingConnection(std::move(mock)); - auto range = conn->ListDatabases({in}); - auto begin = range.begin(); - ASSERT_NE(begin, range.end()); - EXPECT_THAT(*begin, StatusIs(StatusCode::kUnavailable)); -} - -/// @test Verify that successful case works. -TEST(DatabaseAdminConnectionTest, RestoreDatabaseSuccess) { - auto mock = std::make_shared(); - std::string const database_name = - "projects/test-project/instances/test-instance/databases/test-database"; - - EXPECT_CALL(*mock, AsyncRestoreDatabase) - .WillOnce([](CompletionQueue&, auto, - gsad::v1::RestoreDatabaseRequest const& request) { - EXPECT_EQ(request.database_id(), "test-database"); - EXPECT_FALSE(request.has_encryption_config()); - google::longrunning::Operation op; - op.set_name("test-operation-name"); - op.set_done(false); - return make_ready_future(make_status_or(std::move(op))); - }); - EXPECT_CALL(*mock, AsyncGetOperation) - .WillOnce( - [&database_name](CompletionQueue&, auto, - google::longrunning::GetOperationRequest const& r) { - EXPECT_EQ("test-operation-name", r.name()); - google::longrunning::Operation op; - op.set_name(r.name()); - op.set_done(true); - gsad::v1::Database response; - response.set_name(database_name); - response.set_state(gsad::v1::Database::READY); - op.mutable_response()->PackFrom(response); - return make_ready_future(make_status_or(std::move(op))); - }); - - auto conn = CreateTestingConnection(std::move(mock)); - Database dbase("test-project", "test-instance", "test-database"); - EXPECT_EQ(dbase.FullName(), database_name); - Backup backup(Instance("test-project", "test-instance"), "test-backup"); - auto fut = conn->RestoreDatabase({dbase, backup.FullName(), {}}); - auto response = fut.get(); - ASSERT_STATUS_OK(response); - EXPECT_EQ(response->name(), database_name); - EXPECT_EQ(response->state(), gsad::v1::Database::READY); - EXPECT_FALSE(response->has_encryption_config()); -} - -/// @test Verify that using an encryption key works. -TEST(DatabaseAdminClientTest, RestoreDatabaseWithEncryption) { - auto mock = std::make_shared(); - std::string const database_name = - "projects/test-project/instances/test-instance/databases/test-database"; - - EXPECT_CALL(*mock, AsyncRestoreDatabase) - .WillOnce([](CompletionQueue&, auto, - gsad::v1::RestoreDatabaseRequest const& request) { - EXPECT_EQ(request.database_id(), "test-database"); - EXPECT_TRUE(request.has_encryption_config()); - if (request.has_encryption_config()) { - EXPECT_EQ(request.encryption_config().encryption_type(), - gsad::v1::RestoreDatabaseEncryptionConfig:: - CUSTOMER_MANAGED_ENCRYPTION); - EXPECT_EQ(request.encryption_config().kms_key_name(), - "projects/test-project/locations/some-location/keyRings/" - "a-key-ring/cryptoKeys/restore-key-name"); - } - google::longrunning::Operation op; - op.set_name("test-operation-name"); - op.set_done(false); - return make_ready_future(make_status_or(std::move(op))); - }); - EXPECT_CALL(*mock, AsyncGetOperation) - .WillOnce( - [&database_name](CompletionQueue&, auto, - google::longrunning::GetOperationRequest const& r) { - EXPECT_EQ("test-operation-name", r.name()); - google::longrunning::Operation op; - op.set_name(r.name()); - op.set_done(true); - gsad::v1::Database response; - response.set_name(database_name); - response.set_state(gsad::v1::Database::READY); - response.mutable_encryption_config()->set_kms_key_name( - "projects/test-project/locations/some-location/keyRings/" - "a-key-ring/cryptoKeys/restore-key-name"); - op.mutable_response()->PackFrom(response); - return make_ready_future(make_status_or(std::move(op))); - }); - - auto conn = CreateTestingConnection(std::move(mock)); - Instance instance("test-project", "test-instance"); - Database dbase(instance, "test-database"); - Backup backup(instance, "test-backup"); - KmsKeyName encryption_key("test-project", "some-location", "a-key-ring", - "restore-key-name"); - auto fut = conn->RestoreDatabase( - {dbase, backup.FullName(), - CustomerManagedEncryption(std::move(encryption_key))}); - auto response = fut.get(); - ASSERT_STATUS_OK(response); - EXPECT_EQ(response->name(), database_name); - EXPECT_EQ(response->state(), gsad::v1::Database::READY); - EXPECT_TRUE(response->has_encryption_config()); - if (response->has_encryption_config()) { - EXPECT_EQ( - response->encryption_config().kms_key_name(), - "projects/test-project/locations/some-location/keyRings/a-key-ring/" - "cryptoKeys/restore-key-name"); - } -} - -/// @test Verify that a permanent error in RestoreDatabase is immediately -/// reported. -TEST(DatabaseAdminConnectionTest, HandleRestoreDatabaseError) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, AsyncRestoreDatabase) - .WillOnce( - [](CompletionQueue&, auto, gsad::v1::RestoreDatabaseRequest const&) { - return make_ready_future(StatusOr( - Status(StatusCode::kPermissionDenied, "uh-oh"))); - }); - - auto conn = CreateTestingConnection(std::move(mock)); - Database dbase("test-project", "test-instance", "test-database"); - Backup backup(Instance("test-project", "test-instance"), "test-backup"); - auto fut = conn->RestoreDatabase({dbase, backup.FullName(), {}}); - auto response = fut.get(); - EXPECT_THAT(response, StatusIs(StatusCode::kPermissionDenied)); -} - -/// @test Verify that the successful case works. -TEST(DatabaseAdminConnectionTest, GetIamPolicySuccess) { - auto mock = std::make_shared(); - std::string const expected_name = - "projects/test-project/instances/test-instance/databases/test-database"; - std::string const expected_role = "roles/spanner.databaseReader"; - std::string const expected_member = "user:foobar@example.com"; - - EXPECT_CALL(*mock, GetIamPolicy) - .WillOnce(Return(Status(StatusCode::kUnavailable, "try-again"))) - .WillOnce([&expected_name, &expected_role, &expected_member]( - grpc::ClientContext&, - google::iam::v1::GetIamPolicyRequest const& request) { - EXPECT_EQ(expected_name, request.resource()); - google::iam::v1::Policy response; - auto& binding = *response.add_bindings(); - binding.set_role(expected_role); - *binding.add_members() = expected_member; - return response; - }); - - auto conn = CreateTestingConnection(std::move(mock)); - auto response = conn->GetIamPolicy( - {Database("test-project", "test-instance", "test-database")}); - EXPECT_STATUS_OK(response); - ASSERT_EQ(1, response->bindings().size()); - EXPECT_EQ(expected_role, response->bindings().Get(0).role()); - ASSERT_EQ(1, response->bindings().Get(0).members().size()); - EXPECT_EQ(expected_member, response->bindings().Get(0).members().Get(0)); -} - -/// @test Verify that permanent errors are reported immediately. -TEST(DatabaseAdminConnectionTest, GetIamPolicyPermanentError) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, GetIamPolicy) - .WillOnce(Return(Status(StatusCode::kPermissionDenied, "uh-oh"))); - - auto conn = CreateTestingConnection(std::move(mock)); - auto response = conn->GetIamPolicy( - {Database("test-project", "test-instance", "test-database")}); - EXPECT_THAT(response, StatusIs(StatusCode::kPermissionDenied)); -} - -/// @test Verify that too many transients errors are reported correctly. -TEST(DatabaseAdminConnectionTest, GetIamPolicyTooManyTransients) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, GetIamPolicy) - .Times(AtLeast(2)) - .WillRepeatedly(Return(Status(StatusCode::kUnavailable, "try-again"))); - - auto conn = CreateTestingConnection(std::move(mock)); - auto response = conn->GetIamPolicy( - {Database("test-project", "test-instance", "test-database")}); - EXPECT_THAT(response, StatusIs(StatusCode::kUnavailable)); -} - -/// @test Verify that the successful case works. -TEST(DatabaseAdminConnectionTest, SetIamPolicySuccess) { - std::string const expected_name = - "projects/test-project/instances/test-instance/databases/test-database"; - auto constexpr kPolicyText = R"pb( - etag: "request-etag" - bindings { - role: "roles/spanner.databaseReader" - members: "user:test-user-1@example.com" - members: "user:test-user-2@example.com" - } - )pb"; - google::iam::v1::Policy expected_policy; - ASSERT_TRUE(TextFormat::ParseFromString(kPolicyText, &expected_policy)); - - auto mock = std::make_shared(); - EXPECT_CALL(*mock, SetIamPolicy) - .WillOnce([&expected_name]( - grpc::ClientContext&, - google::iam::v1::SetIamPolicyRequest const& request) { - EXPECT_EQ(expected_name, request.resource()); - return Status(StatusCode::kUnavailable, "try-again"); - }) - .WillOnce([&expected_name, &expected_policy]( - grpc::ClientContext&, - google::iam::v1::SetIamPolicyRequest const& request) { - EXPECT_EQ(expected_name, request.resource()); - EXPECT_THAT(request.policy(), IsProtoEqual(expected_policy)); - auto response = expected_policy; - response.set_etag("response-etag"); - return response; - }); - - auto conn = CreateTestingConnection(std::move(mock)); - auto response = conn->SetIamPolicy( - {Database("test-project", "test-instance", "test-database"), - expected_policy}); - ASSERT_STATUS_OK(response); - expected_policy.set_etag("response-etag"); - EXPECT_THAT(*response, IsProtoEqual(expected_policy)); -} - -/// @test Verify that permanent errors are reported immediately. -TEST(DatabaseAdminConnectionTest, SetIamPolicyPermanentError) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, SetIamPolicy) - .WillOnce(Return(Status(StatusCode::kPermissionDenied, "uh-oh"))); - - auto conn = CreateTestingConnection(std::move(mock)); - auto response = conn->SetIamPolicy( - {Database("test-project", "test-instance", "test-database"), {}}); - EXPECT_THAT(response, StatusIs(StatusCode::kPermissionDenied)); -} - -/// @test Verify that request without the Etag field should fail with the first -/// transient error. -TEST(DatabaseAdminConnectionTest, SetIamPolicyNonIdempotent) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, SetIamPolicy) - .WillOnce(Return(Status(StatusCode::kUnavailable, "try-again"))); - - auto conn = CreateTestingConnection(std::move(mock)); - google::iam::v1::Policy policy; - auto response = conn->SetIamPolicy( - {Database("test-project", "test-instance", "test-database"), policy}); - EXPECT_THAT(response, StatusIs(StatusCode::kUnavailable)); -} - -/// @test Verify that request with the Etag field is retried for transient -/// errors. -TEST(DatabaseAdminConnectionTest, SetIamPolicyIdempotent) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, SetIamPolicy) - .Times(AtLeast(2)) - .WillRepeatedly(Return(Status(StatusCode::kUnavailable, "try-again"))); - - auto conn = CreateTestingConnection(std::move(mock)); - google::iam::v1::Policy policy; - policy.set_etag("test-etag-value"); - auto response = conn->SetIamPolicy( - {Database("test-project", "test-instance", "test-database"), policy}); - EXPECT_THAT(response, StatusIs(StatusCode::kUnavailable)); -} - -/// @test Verify that the successful case works. -TEST(DatabaseAdminConnectionTest, TestIamPermissionsSuccess) { - auto mock = std::make_shared(); - std::string const expected_name = - "projects/test-project/instances/test-instance/databases/test-database"; - std::string const expected_permission = "spanner.databases.read"; - - EXPECT_CALL(*mock, TestIamPermissions) - .WillOnce(Return(Status(StatusCode::kUnavailable, "try-again"))) - .WillOnce([&expected_name, &expected_permission]( - grpc::ClientContext&, - google::iam::v1::TestIamPermissionsRequest const& request) { - EXPECT_EQ(expected_name, request.resource()); - EXPECT_EQ(1, request.permissions_size()); - EXPECT_EQ(expected_permission, request.permissions(0)); - google::iam::v1::TestIamPermissionsResponse response; - response.add_permissions(expected_permission); - return response; - }); - - auto conn = CreateTestingConnection(std::move(mock)); - auto response = conn->TestIamPermissions( - {Database("test-project", "test-instance", "test-database"), - {expected_permission}}); - ASSERT_STATUS_OK(response); - ASSERT_EQ(1, response->permissions_size()); - EXPECT_EQ(expected_permission, response->permissions(0)); -} - -/// @test Verify that permanent errors are reported immediately. -TEST(DatabaseAdminConnectionTest, TestIamPermissionsPermanentError) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, TestIamPermissions) - .WillOnce(Return(Status(StatusCode::kPermissionDenied, "uh-oh"))); - - auto conn = CreateTestingConnection(std::move(mock)); - auto response = conn->TestIamPermissions( - {Database("test-project", "test-instance", "test-database"), {}}); - EXPECT_THAT(response, StatusIs(StatusCode::kPermissionDenied)); -} - -/// @test Verify that too many transients errors are reported correctly. -TEST(DatabaseAdminConnectionTest, TestIamPermissionsTooManyTransients) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, TestIamPermissions) - .Times(AtLeast(2)) - .WillRepeatedly(Return(Status(StatusCode::kUnavailable, "try-again"))); - - auto conn = CreateTestingConnection(std::move(mock)); - auto response = conn->TestIamPermissions( - {Database("test-project", "test-instance", "test-database"), {}}); - EXPECT_THAT(response, StatusIs(StatusCode::kUnavailable)); -} - -/// @test Verify that successful case works. -TEST(DatabaseAdminConnectionTest, CreateBackupSuccess) { - auto mock = std::make_shared(); - Database dbase("test-project", "test-instance", "test-database"); - auto now = absl::Now(); - auto expire_time = MakeTimestamp(now + absl::Hours(7)).value(); - auto version_time = MakeTimestamp(now - absl::Hours(7)).value(); - - EXPECT_CALL(*mock, AsyncCreateBackup) - .WillOnce([&dbase, &expire_time, &version_time]( - CompletionQueue&, auto, - gsad::v1::CreateBackupRequest const& request) { - EXPECT_EQ(request.parent(), dbase.instance().FullName()); - EXPECT_EQ(request.backup_id(), "test-backup"); - auto const& backup = request.backup(); - EXPECT_EQ(backup.database(), dbase.FullName()); - EXPECT_EQ(MakeTimestamp(backup.expire_time()).value(), expire_time); - EXPECT_EQ(MakeTimestamp(backup.version_time()).value(), version_time); - google::longrunning::Operation op; - op.set_name("test-operation-name"); - op.set_done(false); - return make_ready_future(make_status_or(std::move(op))); - }); - EXPECT_CALL(*mock, AsyncGetOperation) - .WillOnce([&expire_time, &version_time]( - CompletionQueue&, auto, - google::longrunning::GetOperationRequest const& r) { - EXPECT_EQ("test-operation-name", r.name()); - google::longrunning::Operation op; - op.set_name(r.name()); - op.set_done(true); - gsad::v1::Backup response; - response.set_name("test-backup"); - response.set_state(gsad::v1::Backup::READY); - *response.mutable_expire_time() = - expire_time.get().value(); - *response.mutable_version_time() = - version_time.get().value(); - *response.mutable_create_time() = MakeTimestamp(absl::Now()) - .value() - .get() - .value(); - op.mutable_response()->PackFrom(response); - return make_ready_future(make_status_or(std::move(op))); - }); - - auto conn = CreateTestingConnection(std::move(mock)); - auto fut = conn->CreateBackup( - {dbase, "test-backup", {}, expire_time, version_time, {}}); - auto response = fut.get(); - ASSERT_STATUS_OK(response); - EXPECT_EQ(response->name(), "test-backup"); - EXPECT_EQ(response->state(), gsad::v1::Backup::READY); - EXPECT_EQ(MakeTimestamp(response->expire_time()).value(), expire_time); - EXPECT_EQ(MakeTimestamp(response->version_time()).value(), version_time); - EXPECT_GT(MakeTimestamp(response->create_time()).value(), version_time); - EXPECT_FALSE(response->has_encryption_info()); -} - -/// @test Verify that using an encryption key works. -TEST(DatabaseAdminClientTest, CreateBackupWithEncryption) { - auto mock = std::make_shared(); - Database dbase("test-project", "test-instance", "test-database"); - - EXPECT_CALL(*mock, AsyncCreateBackup) - .WillOnce([&dbase](CompletionQueue&, auto, - gsad::v1::CreateBackupRequest const& request) { - EXPECT_EQ(request.parent(), dbase.instance().FullName()); - EXPECT_EQ(request.backup_id(), "test-backup"); - EXPECT_EQ(request.backup().database(), dbase.FullName()); - EXPECT_TRUE(request.has_encryption_config()); - if (request.has_encryption_config()) { - EXPECT_EQ(request.encryption_config().encryption_type(), - gsad::v1::CreateBackupEncryptionConfig:: - GOOGLE_DEFAULT_ENCRYPTION); - EXPECT_THAT(request.encryption_config().kms_key_name(), IsEmpty()); - } - google::longrunning::Operation op; - op.set_name("test-operation-name"); - op.set_done(false); - return make_ready_future(make_status_or(std::move(op))); - }); - EXPECT_CALL(*mock, AsyncGetOperation) - .WillOnce([](CompletionQueue&, auto, - google::longrunning::GetOperationRequest const& r) { - EXPECT_EQ("test-operation-name", r.name()); - google::longrunning::Operation op; - op.set_name(r.name()); - op.set_done(true); - gsad::v1::Backup response; - response.set_name("test-backup"); - response.set_state(gsad::v1::Backup::READY); - response.mutable_encryption_info()->set_encryption_type( - gsad::v1::EncryptionInfo::GOOGLE_DEFAULT_ENCRYPTION); - op.mutable_response()->PackFrom(response); - return make_ready_future(make_status_or(std::move(op))); - }); - - auto conn = CreateTestingConnection(std::move(mock)); - auto fut = conn->CreateBackup( - {dbase, "test-backup", {}, {}, absl::nullopt, GoogleEncryption()}); - auto response = fut.get(); - ASSERT_STATUS_OK(response); - EXPECT_EQ(response->name(), "test-backup"); - EXPECT_EQ(response->state(), gsad::v1::Backup::READY); - EXPECT_TRUE(response->has_encryption_info()); - if (response->has_encryption_info()) { - EXPECT_EQ(response->encryption_info().encryption_type(), - gsad::v1::EncryptionInfo::GOOGLE_DEFAULT_ENCRYPTION); - EXPECT_THAT(response->encryption_info().kms_key_version(), IsEmpty()); - } -} - -/// @test Verify cancellation. -TEST(DatabaseAdminConnectionTest, CreateBackupCancel) { - auto mock = std::make_shared(); - promise p; - - EXPECT_CALL(*mock, AsyncCreateBackup) - .WillOnce( - [](CompletionQueue&, auto, gsad::v1::CreateBackupRequest const&) { - google::longrunning::Operation op; - op.set_name("test-operation-name"); - op.set_done(false); - return make_ready_future(make_status_or(std::move(op))); - }); - EXPECT_CALL(*mock, AsyncCancelOperation) - .Times(AtMost(1)) - .WillRepeatedly( - [](CompletionQueue&, auto, - google::longrunning::CancelOperationRequest const& request) { - EXPECT_EQ("test-operation-name", request.name()); - return make_ready_future(Status()); - }); - EXPECT_CALL(*mock, AsyncGetOperation) - .WillOnce([&p](CompletionQueue&, auto, - google::longrunning::GetOperationRequest const& r) { - EXPECT_EQ("test-operation-name", r.name()); - google::longrunning::Operation op; - op.set_name(r.name()); - op.set_done(false); - p.set_value(); // enable `cancel()` call in the main thread. - return make_ready_future(make_status_or(std::move(op))); - }) - .WillRepeatedly([](CompletionQueue&, auto, - google::longrunning::GetOperationRequest const& r) { - EXPECT_EQ("test-operation-name", r.name()); - google::longrunning::Operation op; - op.set_name(r.name()); - op.set_done(false); - return make_ready_future(make_status_or(std::move(op))); - }); - - auto conn = CreateTestingConnection(std::move(mock)); - Database dbase("test-project", "test-instance", "test-database"); - auto fut = - conn->CreateBackup({dbase, "test-backup", {}, {}, absl::nullopt, {}}); - p.get_future().get(); // await first poll before `cancel()` - fut.cancel(); - auto backup = fut.get(); - EXPECT_THAT(backup, StatusIs(AnyOf(StatusCode::kCancelled, - StatusCode::kDeadlineExceeded))); -} - -/// @test Verify that a permanent error in CreateBackup is immediately -/// reported. -TEST(DatabaseAdminConnectionTest, HandleCreateBackupError) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, AsyncCreateBackup) - .WillOnce( - [](CompletionQueue&, auto, gsad::v1::CreateBackupRequest const&) { - return make_ready_future(StatusOr( - Status(StatusCode::kPermissionDenied, "uh-oh"))); - }); - - auto conn = CreateTestingConnection(std::move(mock)); - Database dbase("test-project", "test-instance", "test-database"); - auto fut = - conn->CreateBackup({dbase, "test-backup", {}, {}, absl::nullopt, {}}); - auto backup = fut.get(); - EXPECT_THAT(backup, StatusIs(StatusCode::kPermissionDenied)); -} - -/// @test Verify that the successful case works. -TEST(DatabaseAdminConnectionTest, GetBackupSuccess) { - auto mock = std::make_shared(); - std::string const expected_name = - "projects/test-project/instances/test-instance/backups/test-backup"; - - EXPECT_CALL(*mock, GetBackup) - .WillOnce(Return(Status(StatusCode::kUnavailable, "try-again"))) - .WillOnce([&expected_name](grpc::ClientContext&, - gsad::v1::GetBackupRequest const& request) { - EXPECT_EQ(expected_name, request.name()); - gsad::v1::Backup response; - response.set_name(request.name()); - response.set_state(gsad::v1::Backup::READY); - return response; - }); - - auto conn = CreateTestingConnection(std::move(mock)); - auto response = conn->GetBackup( - {Backup(Instance("test-project", "test-instance"), "test-backup") - .FullName()}); - ASSERT_STATUS_OK(response); - EXPECT_EQ(gsad::v1::Backup::READY, response->state()); - EXPECT_EQ(expected_name, response->name()); - EXPECT_FALSE(response->has_encryption_info()); -} - -/// @test Verify that GetBackup can return encryption info and key version. -TEST(DatabaseAdminClientTest, GetBackupWithEncryption) { - auto mock = std::make_shared(); - std::string const expected_name = - "projects/test-project/instances/test-instance/backups/test-backup"; - - EXPECT_CALL(*mock, GetBackup) - .WillOnce(Return(Status(StatusCode::kUnavailable, "try-again"))) - .WillOnce([&expected_name](grpc::ClientContext&, - gsad::v1::GetBackupRequest const& request) { - EXPECT_EQ(expected_name, request.name()); - gsad::v1::Backup response; - response.set_name(request.name()); - response.set_state(gsad::v1::Backup::READY); - response.mutable_encryption_info()->set_encryption_type( - gsad::v1::EncryptionInfo::CUSTOMER_MANAGED_ENCRYPTION); - response.mutable_encryption_info()->set_kms_key_version( - "projects/test-project/locations/some-location/keyRings/a-key-ring/" - "cryptoKeys/a-key-name/cryptoKeyVersions/1"); - return response; - }); - - auto conn = CreateTestingConnection(std::move(mock)); - auto response = conn->GetBackup( - {Backup(Instance("test-project", "test-instance"), "test-backup") - .FullName()}); - ASSERT_STATUS_OK(response); - EXPECT_EQ(response->name(), expected_name); - EXPECT_EQ(response->state(), gsad::v1::Backup::READY); - EXPECT_TRUE(response->has_encryption_info()); - if (response->has_encryption_info()) { - EXPECT_EQ(response->encryption_info().encryption_type(), - gsad::v1::EncryptionInfo::CUSTOMER_MANAGED_ENCRYPTION); - EXPECT_EQ( - response->encryption_info().kms_key_version(), - "projects/test-project/locations/some-location/keyRings/a-key-ring/" - "cryptoKeys/a-key-name/cryptoKeyVersions/1"); - } -} - -/// @test Verify that permanent errors are reported immediately. -TEST(DatabaseAdminConnectionTest, GetBackupPermanentError) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, GetBackup) - .WillOnce(Return(Status(StatusCode::kPermissionDenied, "uh-oh"))); - - auto conn = CreateTestingConnection(std::move(mock)); - auto response = conn->GetBackup( - {Backup(Instance("test-project", "test-instance"), "test-backup") - .FullName()}); - EXPECT_THAT(response, StatusIs(StatusCode::kPermissionDenied)); -} - -/// @test Verify that too many transients errors are reported correctly. -TEST(DatabaseAdminConnectionTest, GetBackupTooManyTransients) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, GetBackup) - .Times(AtLeast(2)) - .WillRepeatedly(Return(Status(StatusCode::kUnavailable, "try-again"))); - - auto conn = CreateTestingConnection(std::move(mock)); - auto response = conn->GetBackup( - {Backup(Instance("test-project", "test-instance"), "test-backup") - .FullName()}); - EXPECT_THAT(response, StatusIs(StatusCode::kUnavailable)); -} - -/// @test Verify that the successful case works. -TEST(DatabaseAdminConnectionTest, DeleteBackupSuccess) { - auto mock = std::make_shared(); - std::string const expected_name = - "projects/test-project/instances/test-instance/backups/test-backup"; - - EXPECT_CALL(*mock, DeleteBackup) - .WillOnce(Return(Status(StatusCode::kUnavailable, "try-again"))) - .WillOnce([&expected_name](grpc::ClientContext&, - gsad::v1::DeleteBackupRequest const& request) { - EXPECT_EQ(expected_name, request.name()); - return google::cloud::Status(); - }); - - auto conn = CreateTestingConnection(std::move(mock)); - auto status = conn->DeleteBackup({expected_name}); - EXPECT_STATUS_OK(status); -} - -/// @test Verify that permanent errors are reported immediately. -TEST(DatabaseAdminConnectionTest, DeleteBackupPermanentError) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, DeleteBackup) - .WillOnce(Return(Status(StatusCode::kPermissionDenied, "uh-oh"))); - - auto conn = CreateTestingConnection(std::move(mock)); - auto status = conn->DeleteBackup( - {"projects/test-project/instances/test-instance/backups/test-backup"}); - EXPECT_THAT(status, StatusIs(StatusCode::kPermissionDenied)); -} - -/// @test Verify that too many transients errors are reported correctly. -TEST(DatabaseAdminConnectionTest, DeleteBackupTooManyTransients) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, DeleteBackup) - .Times(AtLeast(2)) - .WillRepeatedly(Return(Status(StatusCode::kUnavailable, "try-again"))); - - auto conn = CreateTestingConnection(std::move(mock)); - auto status = conn->DeleteBackup( - {"projects/test-project/instances/test-instance/backups/test-backup"}); - EXPECT_THAT(status, StatusIs(StatusCode::kUnavailable)); -} - -/// @test Verify that we can list backups in multiple pages. -TEST(DatabaseAdminConnectionTest, ListBackups) { - auto mock = std::make_shared(); - Instance in("test-project", "test-instance"); - std::string const expected_parent = in.FullName(); - - EXPECT_CALL(*mock, ListBackups) - .WillOnce( - [&expected_parent](grpc::ClientContext&, - gsad::v1::ListBackupsRequest const& request) { - EXPECT_EQ(expected_parent, request.parent()); - EXPECT_TRUE(request.page_token().empty()); - - gsad::v1::ListBackupsResponse page; - page.set_next_page_token("page-1"); - page.add_backups()->set_name("backup-1"); - page.add_backups()->set_name("backup-2"); - return make_status_or(page); - }) - .WillOnce( - [&expected_parent](grpc::ClientContext&, - gsad::v1::ListBackupsRequest const& request) { - EXPECT_EQ(expected_parent, request.parent()); - EXPECT_EQ("page-1", request.page_token()); - - gsad::v1::ListBackupsResponse page; - page.set_next_page_token("page-2"); - page.add_backups()->set_name("backup-3"); - page.add_backups()->set_name("backup-4"); - return make_status_or(page); - }) - .WillOnce( - [&expected_parent](grpc::ClientContext&, - gsad::v1::ListBackupsRequest const& request) { - EXPECT_EQ(expected_parent, request.parent()); - EXPECT_EQ("page-2", request.page_token()); - - gsad::v1::ListBackupsResponse page; - page.clear_next_page_token(); - page.add_backups()->set_name("backup-5"); - return make_status_or(page); - }); - - auto conn = CreateTestingConnection(std::move(mock)); - std::vector actual_names; - for (auto const& backup : conn->ListBackups({in, ""})) { - ASSERT_STATUS_OK(backup); - actual_names.push_back(backup->name()); - } - EXPECT_THAT(actual_names, ElementsAre("backup-1", "backup-2", "backup-3", - "backup-4", "backup-5")); -} - -TEST(DatabaseAdminConnectionTest, ListBackupsPermanentFailure) { - auto mock = std::make_shared(); - Instance in("test-project", "test-instance"); - - EXPECT_CALL(*mock, ListBackups) - .WillOnce(Return(Status(StatusCode::kPermissionDenied, "uh-oh"))); - - auto conn = CreateTestingConnection(std::move(mock)); - auto range = conn->ListBackups({in, ""}); - auto begin = range.begin(); - ASSERT_NE(begin, range.end()); - EXPECT_THAT(*begin, StatusIs(StatusCode::kPermissionDenied)); -} - -TEST(DatabaseAdminConnectionTest, ListBackupsTooManyFailures) { - auto mock = std::make_shared(); - Instance in("test-project", "test-instance"); - - EXPECT_CALL(*mock, ListBackups) - .Times(AtLeast(2)) - .WillRepeatedly(Return(Status(StatusCode::kUnavailable, "try-again"))); - - auto conn = CreateTestingConnection(std::move(mock)); - auto range = conn->ListBackups({in, ""}); - auto begin = range.begin(); - ASSERT_NE(begin, range.end()); - EXPECT_THAT(*begin, StatusIs(StatusCode::kUnavailable)); -} - -/// @test Verify that the successful case works. -TEST(DatabaseAdminConnectionTest, UpdateBackupSuccess) { - auto mock = std::make_shared(); - std::string const expected_name = - "projects/test-project/instances/test-instance/backups/test-backup"; - - EXPECT_CALL(*mock, UpdateBackup) - .WillOnce(Return(Status(StatusCode::kUnavailable, "try-again"))) - .WillOnce([&expected_name](grpc::ClientContext&, - gsad::v1::UpdateBackupRequest const& request) { - EXPECT_EQ(expected_name, request.backup().name()); - gsad::v1::Backup response; - response.set_name(request.backup().name()); - response.set_state(gsad::v1::Backup::READY); - return response; - }); - - auto conn = CreateTestingConnection(std::move(mock)); - google::spanner::admin::database::v1::UpdateBackupRequest request; - request.mutable_backup()->set_name( - Backup(Instance("test-project", "test-instance"), "test-backup") - .FullName()); - auto response = conn->UpdateBackup({request}); - ASSERT_STATUS_OK(response); - EXPECT_EQ(gsad::v1::Backup::READY, response->state()); - EXPECT_EQ(expected_name, response->name()); -} - -/// @test Verify that permanent errors are reported immediately. -TEST(DatabaseAdminConnectionTest, UpdateBackupPermanentError) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, UpdateBackup) - .WillOnce(Return(Status(StatusCode::kPermissionDenied, "uh-oh"))); - - auto conn = CreateTestingConnection(std::move(mock)); - google::spanner::admin::database::v1::UpdateBackupRequest request; - auto response = conn->UpdateBackup({request}); - EXPECT_THAT(response, StatusIs(StatusCode::kPermissionDenied)); -} - -/// @test Verify that too many transients errors are reported correctly. -TEST(DatabaseAdminConnectionTest, UpdateBackupTooManyTransients) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, UpdateBackup) - .Times(AtLeast(2)) - .WillRepeatedly(Return(Status(StatusCode::kUnavailable, "try-again"))); - - auto conn = CreateTestingConnection(std::move(mock)); - google::spanner::admin::database::v1::UpdateBackupRequest request; - auto response = conn->UpdateBackup({request}); - EXPECT_THAT(response, StatusIs(StatusCode::kUnavailable)); -} - -/// @test Verify that we can list backup operations in multiple pages. -TEST(DatabaseAdminConnectionTest, ListBackupOperations) { - auto mock = std::make_shared(); - Instance in("test-project", "test-instance"); - std::string const expected_parent = in.FullName(); - - EXPECT_CALL(*mock, ListBackupOperations) - .WillOnce([&expected_parent]( - grpc::ClientContext&, - gsad::v1::ListBackupOperationsRequest const& request) { - EXPECT_EQ(expected_parent, request.parent()); - EXPECT_TRUE(request.page_token().empty()); - - gsad::v1::ListBackupOperationsResponse page; - page.set_next_page_token("page-1"); - page.add_operations()->set_name("op-1"); - page.add_operations()->set_name("op-2"); - return make_status_or(page); - }) - .WillOnce([&expected_parent]( - grpc::ClientContext&, - gsad::v1::ListBackupOperationsRequest const& request) { - EXPECT_EQ(expected_parent, request.parent()); - EXPECT_EQ("page-1", request.page_token()); - - gsad::v1::ListBackupOperationsResponse page; - page.set_next_page_token("page-2"); - page.add_operations()->set_name("op-3"); - page.add_operations()->set_name("op-4"); - return make_status_or(page); - }) - .WillOnce([&expected_parent]( - grpc::ClientContext&, - gsad::v1::ListBackupOperationsRequest const& request) { - EXPECT_EQ(expected_parent, request.parent()); - EXPECT_EQ("page-2", request.page_token()); - - gsad::v1::ListBackupOperationsResponse page; - page.clear_next_page_token(); - page.add_operations()->set_name("op-5"); - return make_status_or(page); - }); - - auto conn = CreateTestingConnection(std::move(mock)); - std::vector actual_names; - for (auto const& operation : conn->ListBackupOperations({in, ""})) { - ASSERT_STATUS_OK(operation); - actual_names.push_back(operation->name()); - } - EXPECT_THAT(actual_names, - ElementsAre("op-1", "op-2", "op-3", "op-4", "op-5")); -} - -TEST(DatabaseAdminConnectionTest, ListBackupOperationsPermanentFailure) { - auto mock = std::make_shared(); - Instance in("test-project", "test-instance"); - - EXPECT_CALL(*mock, ListBackupOperations) - .WillOnce(Return(Status(StatusCode::kPermissionDenied, "uh-oh"))); - - auto conn = CreateTestingConnection(std::move(mock)); - auto range = conn->ListBackupOperations({in, ""}); - auto begin = range.begin(); - ASSERT_NE(begin, range.end()); - EXPECT_THAT(*begin, StatusIs(StatusCode::kPermissionDenied)); -} - -TEST(DatabaseAdminConnectionTest, ListBackupOperationsTooManyFailures) { - auto mock = std::make_shared(); - Instance in("test-project", "test-instance"); - - EXPECT_CALL(*mock, ListBackupOperations) - .Times(AtLeast(2)) - .WillRepeatedly(Return(Status(StatusCode::kUnavailable, "try-again"))); - - auto conn = CreateTestingConnection(std::move(mock)); - auto range = conn->ListBackupOperations({in, ""}); - auto begin = range.begin(); - ASSERT_NE(begin, range.end()); - EXPECT_THAT(*begin, StatusIs(StatusCode::kUnavailable)); -} - -/// @test Verify that we can list database operations in multiple pages. -TEST(DatabaseAdminConnectionTest, ListDatabaseOperations) { - auto mock = std::make_shared(); - Instance in("test-project", "test-instance"); - std::string const expected_parent = in.FullName(); - - EXPECT_CALL(*mock, ListDatabaseOperations) - .WillOnce([&expected_parent]( - grpc::ClientContext&, - gsad::v1::ListDatabaseOperationsRequest const& request) { - EXPECT_EQ(expected_parent, request.parent()); - EXPECT_TRUE(request.page_token().empty()); - - gsad::v1::ListDatabaseOperationsResponse page; - page.set_next_page_token("page-1"); - page.add_operations()->set_name("op-1"); - page.add_operations()->set_name("op-2"); - return make_status_or(page); - }) - .WillOnce([&expected_parent]( - grpc::ClientContext&, - gsad::v1::ListDatabaseOperationsRequest const& request) { - EXPECT_EQ(expected_parent, request.parent()); - EXPECT_EQ("page-1", request.page_token()); - - gsad::v1::ListDatabaseOperationsResponse page; - page.set_next_page_token("page-2"); - page.add_operations()->set_name("op-3"); - page.add_operations()->set_name("op-4"); - return make_status_or(page); - }) - .WillOnce([&expected_parent]( - grpc::ClientContext&, - gsad::v1::ListDatabaseOperationsRequest const& request) { - EXPECT_EQ(expected_parent, request.parent()); - EXPECT_EQ("page-2", request.page_token()); - - gsad::v1::ListDatabaseOperationsResponse page; - page.clear_next_page_token(); - page.add_operations()->set_name("op-5"); - return make_status_or(page); - }); - - auto conn = CreateTestingConnection(std::move(mock)); - std::vector actual_names; - for (auto const& operation : conn->ListDatabaseOperations({in, ""})) { - ASSERT_STATUS_OK(operation); - actual_names.push_back(operation->name()); - } - EXPECT_THAT(actual_names, - ElementsAre("op-1", "op-2", "op-3", "op-4", "op-5")); -} - -TEST(DatabaseAdminConnectionTest, ListDatabaseOperationsPermanentFailure) { - auto mock = std::make_shared(); - Instance in("test-project", "test-instance"); - - EXPECT_CALL(*mock, ListDatabaseOperations) - .WillOnce(Return(Status(StatusCode::kPermissionDenied, "uh-oh"))); - - auto conn = CreateTestingConnection(std::move(mock)); - auto range = conn->ListDatabaseOperations({in, ""}); - auto begin = range.begin(); - ASSERT_NE(begin, range.end()); - EXPECT_THAT(*begin, StatusIs(StatusCode::kPermissionDenied)); -} - -TEST(DatabaseAdminConnectionTest, ListDatabaseOperationsTooManyFailures) { - auto mock = std::make_shared(); - Instance in("test-project", "test-instance"); - - EXPECT_CALL(*mock, ListDatabaseOperations) - .Times(AtLeast(2)) - .WillRepeatedly(Return(Status(StatusCode::kUnavailable, "try-again"))); - - auto conn = CreateTestingConnection(std::move(mock)); - auto range = conn->ListDatabaseOperations({in, ""}); - auto begin = range.begin(); - ASSERT_NE(begin, range.end()); - EXPECT_THAT(*begin, StatusIs(StatusCode::kUnavailable)); -} - -} // namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace spanner -} // namespace cloud -} // namespace google diff --git a/google/cloud/spanner/google_cloud_cpp_spanner.bzl b/google/cloud/spanner/google_cloud_cpp_spanner.bzl index 2225628fa9d8e..4ee5cfe878095 100644 --- a/google/cloud/spanner/google_cloud_cpp_spanner.bzl +++ b/google/cloud/spanner/google_cloud_cpp_spanner.bzl @@ -45,28 +45,22 @@ google_cloud_cpp_spanner_hdrs = [ "admin/internal/instance_admin_stub_factory.h", "admin/internal/instance_admin_tracing_connection.h", "admin/internal/instance_admin_tracing_stub.h", - "admin/retry_traits.h", "backoff_policy.h", "backup.h", "batch_dml_result.h", "bytes.h", "client.h", - "client_options.h", "commit_options.h", "commit_result.h", "connection.h", "connection_options.h", "create_instance_request_builder.h", "database.h", - "database_admin_client.h", - "database_admin_connection.h", "date.h", "directed_read_replicas.h", "encryption_config.h", "iam_updater.h", "instance.h", - "instance_admin_client.h", - "instance_admin_connection.h", "internal/channel.h", "internal/connection_impl.h", "internal/database_admin_logging.h", @@ -159,11 +153,7 @@ google_cloud_cpp_spanner_srcs = [ "connection.cc", "connection_options.cc", "database.cc", - "database_admin_client.cc", - "database_admin_connection.cc", "instance.cc", - "instance_admin_client.cc", - "instance_admin_connection.cc", "internal/connection_impl.cc", "internal/database_admin_logging.cc", "internal/database_admin_metadata.cc", diff --git a/google/cloud/spanner/google_cloud_cpp_spanner_mocks.bzl b/google/cloud/spanner/google_cloud_cpp_spanner_mocks.bzl index c23e21f05027c..8cb589854248d 100644 --- a/google/cloud/spanner/google_cloud_cpp_spanner_mocks.bzl +++ b/google/cloud/spanner/google_cloud_cpp_spanner_mocks.bzl @@ -19,8 +19,6 @@ google_cloud_cpp_spanner_mocks_hdrs = [ "admin/mocks/mock_database_admin_connection.h", "admin/mocks/mock_instance_admin_connection.h", - "mocks/mock_database_admin_connection.h", - "mocks/mock_instance_admin_connection.h", "mocks/mock_spanner_connection.h", "mocks/row.h", ] diff --git a/google/cloud/spanner/instance_admin_client.cc b/google/cloud/spanner/instance_admin_client.cc deleted file mode 100644 index bbb4f3b6969b1..0000000000000 --- a/google/cloud/spanner/instance_admin_client.cc +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// TODO(#7356): Remove this file after the deprecation period expires -#include "google/cloud/internal/disable_deprecation_warnings.inc" -#include "google/cloud/spanner/instance_admin_client.h" -#include "google/cloud/options.h" - -namespace google { -namespace cloud { -namespace spanner { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -StatusOr -InstanceAdminClient::GetInstance(Instance const& in) { - internal::OptionsSpan span(conn_->options()); - return conn_->GetInstance({in.FullName()}); -} - -future> -InstanceAdminClient::CreateInstance( - google::spanner::admin::instance::v1::CreateInstanceRequest const& - request) { - internal::OptionsSpan span(conn_->options()); - return conn_->CreateInstance({request}); -} - -future> -InstanceAdminClient::UpdateInstance( - google::spanner::admin::instance::v1::UpdateInstanceRequest const& - request) { - internal::OptionsSpan span(conn_->options()); - return conn_->UpdateInstance({request}); -} - -Status InstanceAdminClient::DeleteInstance(Instance const& in) { - internal::OptionsSpan span(conn_->options()); - return conn_->DeleteInstance({in.FullName()}); -} - -StatusOr -InstanceAdminClient::GetInstanceConfig(std::string const& name) { - internal::OptionsSpan span(conn_->options()); - return conn_->GetInstanceConfig({name}); -} - -ListInstanceConfigsRange InstanceAdminClient::ListInstanceConfigs( - std::string project_id) { - internal::OptionsSpan span(conn_->options()); - return conn_->ListInstanceConfigs({std::move(project_id)}); -} - -ListInstancesRange InstanceAdminClient::ListInstances(std::string project_id, - std::string filter) { - internal::OptionsSpan span(conn_->options()); - return conn_->ListInstances({std::move(project_id), std::move(filter)}); -} - -StatusOr InstanceAdminClient::GetIamPolicy( - Instance const& in) { - internal::OptionsSpan span(conn_->options()); - return conn_->GetIamPolicy({in.FullName()}); -} - -StatusOr InstanceAdminClient::SetIamPolicy( - Instance const& in, google::iam::v1::Policy policy) { - internal::OptionsSpan span(conn_->options()); - return conn_->SetIamPolicy({in.FullName(), std::move(policy)}); -} - -StatusOr InstanceAdminClient::SetIamPolicy( - Instance const& in, IamUpdater const& updater) { - auto const rerun_maximum_duration = std::chrono::minutes(15); - auto default_rerun_policy = - LimitedTimeTransactionRerunPolicy(rerun_maximum_duration).clone(); - - auto const backoff_initial_delay = std::chrono::milliseconds(1000); - auto const backoff_maximum_delay = std::chrono::minutes(5); - auto const backoff_scaling = 2.0; - auto default_backoff_policy = - ExponentialBackoffPolicy(backoff_initial_delay, backoff_maximum_delay, - backoff_scaling) - .clone(); - - return SetIamPolicy(in, updater, std::move(default_rerun_policy), - std::move(default_backoff_policy)); -} - -StatusOr InstanceAdminClient::SetIamPolicy( - Instance const& in, IamUpdater const& updater, - std::unique_ptr rerun_policy, - std::unique_ptr backoff_policy) { - internal::OptionsSpan span(conn_->options()); - using RerunnablePolicy = spanner_internal::SafeTransactionRerun; - - Status last_status; - do { - auto current_policy = conn_->GetIamPolicy({in.FullName()}); - if (!current_policy) { - last_status = std::move(current_policy).status(); - } else { - auto etag = current_policy->etag(); - auto desired = updater(*current_policy); - if (!desired.has_value()) { - return current_policy; - } - desired->set_etag(std::move(etag)); - auto result = conn_->SetIamPolicy({in.FullName(), *std::move(desired)}); - if (RerunnablePolicy::IsOk(result.status())) { - return result; - } - last_status = std::move(result).status(); - } - if (!rerun_policy->OnFailure(last_status)) break; - std::this_thread::sleep_for(backoff_policy->OnCompletion()); - } while (!rerun_policy->IsExhausted()); - return last_status; -} - -StatusOr -InstanceAdminClient::TestIamPermissions(Instance const& in, - std::vector permissions) { - internal::OptionsSpan span(conn_->options()); - return conn_->TestIamPermissions({in.FullName(), std::move(permissions)}); -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace spanner -} // namespace cloud -} // namespace google diff --git a/google/cloud/spanner/instance_admin_client.h b/google/cloud/spanner/instance_admin_client.h deleted file mode 100644 index 3a00e56a7b08a..0000000000000 --- a/google/cloud/spanner/instance_admin_client.h +++ /dev/null @@ -1,317 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_INSTANCE_ADMIN_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_INSTANCE_ADMIN_CLIENT_H - -#include "google/cloud/spanner/iam_updater.h" -#include "google/cloud/spanner/instance.h" -#include "google/cloud/spanner/instance_admin_connection.h" -#include "google/cloud/spanner/version.h" -#include "google/cloud/status_or.h" -#include -#include - -namespace google { -namespace cloud { -namespace spanner { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/** - * Performs instance administration operations on Cloud Spanner. - * - * @deprecated Please use #google::cloud::spanner_admin::InstanceAdminClient - * instead. - * - * Applications use this class to perform operations on - * [Spanner Databases][spanner-doc-link]. - * - * @par Performance - * - * `InstanceAdminClient` objects are cheap to create, copy, and move. However, - * each `InstanceAdminClient` object must be created with a - * `std::shared_ptr`, which itself is relatively - * expensive to create. Therefore, connection instances should be shared when - * possible. See the `MakeInstanceAdminConnection()` method and the - * `InstanceAdminConnection` interface for more details. - * - * @par Thread Safety - * - * Instances of this class created via copy-construction or copy-assignment - * share the underlying pool of connections. Access to these copies via multiple - * threads is guaranteed to work. Two threads operating on the same instance of - * this class is not guaranteed to work. - * - * @par Error Handling - * - * This class uses `StatusOr` to report errors. When an operation fails to - * perform its work the returned `StatusOr` contains the error details. If - * the `ok()` member function in the `StatusOr` returns `true` then it - * contains the expected result. For more information, see the - * [Error Handling Guide](#spanner-error-handling). - * - * [spanner-doc-link]: - * https://cloud.google.com/spanner/docs/api-libraries-overview - */ -class GOOGLE_CLOUD_CPP_SPANNER_ADMIN_API_DEPRECATED("InstanceAdminClient") - InstanceAdminClient { - public: - explicit InstanceAdminClient(std::shared_ptr conn) - : conn_(std::move(conn)) {} - - /// No default construction. - /// Use `InstanceAdminClient(std::shared_ptr)` - InstanceAdminClient() = delete; - - ///@{ - /// @name Copy and move support - InstanceAdminClient(InstanceAdminClient const&) = default; - InstanceAdminClient& operator=(InstanceAdminClient const&) = default; - InstanceAdminClient(InstanceAdminClient&&) = default; - InstanceAdminClient& operator=(InstanceAdminClient&&) = default; - ///@} - - ///@{ - /// @name Equality - friend bool operator==(InstanceAdminClient const& a, - InstanceAdminClient const& b) { - return a.conn_ == b.conn_; - } - friend bool operator!=(InstanceAdminClient const& a, - InstanceAdminClient const& b) { - return !(a == b); - } - ///@} - - /** - * Retrieve metadata information about a Cloud Spanner Instance. - * - * @par Idempotency - * This is a read-only operation and therefore it is always treated as - * idempotent. - * - * @par Example - * @snippet samples.cc get-instance - */ - StatusOr GetInstance( - Instance const& in); - - /** - * Creates a new Cloud Spanner instance in the given project. - * - * Use CreateInstanceRequestBuilder to build the - * `google::spanner::admin::instance::v1::CreateInstanceRequest` object. - * - * Note that the instance id must be between 2 and 64 characters long, it must - * start with a lowercase letter (`[a-z]`), it must end with a lowercase - * letter or a number (`[a-z0-9]`) and any characters between the beginning - * and ending characters must be lower case letters, numbers, or dashes (`-`), - * that is, they must belong to the `[-a-z0-9]` character set. - * - * @par Example - * @snippet samples.cc create-instance - * - */ - future> - CreateInstance( - google::spanner::admin::instance::v1::CreateInstanceRequest const&); - - /** - * Updates a Cloud Spanner instance. - * - * Use `google::cloud::spanner::UpdateInstanceRequestBuilder` to build the - * `google::spanner::admin::instance::v1::UpdateInstanceRequest` object. - * - * @par Idempotency - * This operation is idempotent as its result does not depend on the previous - * state of the instance. Note that, as is the case with all operations, it is - * subject to race conditions if multiple tasks are attempting to change the - * same fields in the same instance. - * - * @par Example - * @snippet samples.cc update-instance - * - */ - future> - UpdateInstance( - google::spanner::admin::instance::v1::UpdateInstanceRequest const&); - - /** - * Deletes an existing Cloud Spanner instance. - * - * @warning Deleting an instance deletes all the databases in the - * instance. This is an unrecoverable operation. - * - * @par Example - * @snippet samples.cc delete-instance - */ - Status DeleteInstance(Instance const& in); - - /** - * Retrieve information about a Cloud Spanner Instance Config. - * - * @par Idempotency - * This is a read-only operation and therefore it is always treated as - * idempotent. - * - * @par Example - * @snippet samples.cc get-instance-config - */ - StatusOr - GetInstanceConfig(std::string const& name); - - /** - * Retrieve a list of instance configs for a given project. - * - * @par Idempotency - * This is a read-only operation and therefore it is always treated as - * idempotent. - * - * @par Example - * @snippet samples.cc list-instance-configs - */ - ListInstanceConfigsRange ListInstanceConfigs(std::string project_id); - - /** - * Retrieve a list of instances for a given project. - * - * @par Idempotency - * This is a read-only operation and therefore it is always treated as - * idempotent. - * - * @par Example - * @snippet samples.cc list-instances - */ - ListInstancesRange ListInstances(std::string project_id, std::string filter); - - /** - * Get the IAM policy in effect for the given instance. - * - * This function retrieves the IAM policy configured in the given instance, - * that is, which roles are enabled in the instance, and what entities are - * members of each role. - * - * @par Idempotency - * This is a read-only operation and therefore it is always treated as - * idempotent. - * - * @par Example - * @snippet samples.cc instance-get-iam-policy - * - * @see The [Cloud Spanner - * documentation](https://cloud.google.com/spanner/docs/iam) for a - * description of the roles and permissions supported by Cloud Spanner. - * @see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions) - * for an introduction to Identity and Access Management in Google Cloud - * Platform. - */ - StatusOr GetIamPolicy(Instance const& in); - - /** - * Set the IAM policy for the given instance. - * - * This function changes the IAM policy configured in the given instance to - * the value of @p policy. - * - * @par Idempotency - * This function is only idempotent if the `etag` field in @p policy is set. - * Therefore, the underlying RPCs are only retried if the field is set, and - * the function returns the first RPC error in any other case. - * - * @par Example - * @snippet samples.cc add-database-reader - * - * @see The [Cloud Spanner - * documentation](https://cloud.google.com/spanner/docs/iam) for a - * description of the roles and permissions supported by Cloud Spanner. - * @see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions) - * for an introduction to Identity and Access Management in Google Cloud - * Platform. - */ - StatusOr SetIamPolicy( - Instance const& in, google::iam::v1::Policy policy); - - /** - * Updates the IAM policy for an instance using an optimistic concurrency - * control loop. - * - * This function repeatedly reads the current IAM policy in @p in, and then - * calls the @p updater with the this policy. The @p updater returns an empty - * optional if no changes are required, or it returns the new desired value - * for the IAM policy. This function then updates the policy. - * - * Updating an IAM policy can fail with retryable errors or can be aborted - * because there were simultaneous changes the to IAM policy. In these cases - * this function reruns the loop until it succeeds. - * - * The function returns the final IAM policy, or an error if the rerun policy - * for the underlying connection has expired. - * - * @par Idempotency - * This function always sets the `etag` field on the policy, so the underlying - * RPCs are retried automatically. - * - * @param in the identifier for the instance where you want to change the IAM - * policy. - * @param updater a callback to modify the policy. Return an unset optional - * to indicate that no changes to the policy are needed. - */ - StatusOr SetIamPolicy(Instance const& in, - IamUpdater const& updater); - - /** - * @copydoc SetIamPolicy(Instance const&,IamUpdater const&) - * - * @param rerun_policy controls for how long (or how many times) the updater - * will be rerun after the IAM policy update aborts. - * @param backoff_policy controls how long `SetIamPolicy` waits between - * reruns. - */ - StatusOr SetIamPolicy( - Instance const& in, IamUpdater const& updater, - std::unique_ptr rerun_policy, - std::unique_ptr backoff_policy); - - /** - * Get the subset of the permissions the caller has on the given instance. - * - * This function compares the given list of permissions against those - * permissions granted to the caller, and returns the subset of the list that - * the caller actually holds. - * - * @note Permission wildcards, such as `spanner.*` are not allowed. - * - * @par Example - * @snippet samples.cc instance-test-iam-permissions - * - * @see The [Cloud Spanner - * documentation](https://cloud.google.com/spanner/docs/iam) for a description - * of the roles and permissions supported by Cloud Spanner. - * @see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions) - * for an introduction to Identity and Access Management in Google Cloud - * Platform. - */ - StatusOr TestIamPermissions( - Instance const& in, std::vector permissions); - - private: - std::shared_ptr conn_; -}; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace spanner -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_INSTANCE_ADMIN_CLIENT_H diff --git a/google/cloud/spanner/instance_admin_client_test.cc b/google/cloud/spanner/instance_admin_client_test.cc deleted file mode 100644 index 44f838f805fb5..0000000000000 --- a/google/cloud/spanner/instance_admin_client_test.cc +++ /dev/null @@ -1,320 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// TODO(#7356): Remove this file after the deprecation period expires -#include "google/cloud/internal/disable_deprecation_warnings.inc" -#include "google/cloud/spanner/instance_admin_client.h" -#include "google/cloud/spanner/mocks/mock_instance_admin_connection.h" -#include "google/cloud/testing_util/status_matchers.h" -#include "absl/types/optional.h" -#include - -namespace google { -namespace cloud { -namespace spanner { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -namespace gsai = ::google::spanner::admin::instance; - -using ::google::cloud::testing_util::StatusIs; -using spanner_mocks::MockInstanceAdminConnection; -using ::testing::AtLeast; -using ::testing::ElementsAre; -using ::testing::HasSubstr; - -TEST(InstanceAdminClientTest, CopyAndMove) { - auto conn1 = std::make_shared(); - auto conn2 = std::make_shared(); - - InstanceAdminClient c1(conn1); - InstanceAdminClient c2(conn2); - EXPECT_NE(c1, c2); - - // Copy construction - InstanceAdminClient c3 = c1; - EXPECT_EQ(c3, c1); - - // Copy assignment - c3 = c2; - EXPECT_EQ(c3, c2); - - // Move construction - InstanceAdminClient c4 = std::move(c3); - EXPECT_EQ(c4, c2); - - // Move assignment - c1 = std::move(c4); - EXPECT_EQ(c1, c2); -} - -TEST(InstanceAdminClientTest, GetInstance) { - auto mock = std::make_shared(); - EXPECT_CALL(*mock, GetInstance) - .WillOnce([](InstanceAdminConnection::GetInstanceParams const& p) { - EXPECT_EQ("projects/test-project/instances/test-instance", - p.instance_name); - return Status(StatusCode::kPermissionDenied, "uh-oh"); - }); - - InstanceAdminClient client(mock); - auto actual = client.GetInstance(Instance("test-project", "test-instance")); - EXPECT_THAT(actual, StatusIs(StatusCode::kPermissionDenied)); -} - -TEST(InstanceAdminClientTest, GetInstanceConfig) { - auto mock = std::make_shared(); - EXPECT_CALL(*mock, GetInstanceConfig) - .WillOnce([](InstanceAdminConnection::GetInstanceConfigParams const& p) { - EXPECT_EQ("projects/test-project/instanceConfigs/test-config", - p.instance_config_name); - return Status(StatusCode::kPermissionDenied, "uh-oh"); - }); - - InstanceAdminClient client(mock); - auto actual = client.GetInstanceConfig( - "projects/test-project/instanceConfigs/test-config"); - EXPECT_THAT(actual, StatusIs(StatusCode::kPermissionDenied)); -} - -TEST(InstanceAdminClientTest, ListInstanceConfigs) { - auto mock = std::make_shared(); - EXPECT_CALL(*mock, ListInstanceConfigs) - .WillOnce( - [](InstanceAdminConnection::ListInstanceConfigsParams const& p) { - EXPECT_EQ("test-project", p.project_id); - return google::cloud::internal::MakePaginationRange< - ListInstanceConfigsRange>( - gsai::v1::ListInstanceConfigsRequest{}, - [](gsai::v1::ListInstanceConfigsRequest const&) { - return StatusOr( - Status(StatusCode::kPermissionDenied, "uh-oh")); - }, - [](gsai::v1::ListInstanceConfigsResponse const&) { - return std::vector{}; - }); - }); - - InstanceAdminClient client(mock); - auto range = client.ListInstanceConfigs("test-project"); - auto begin = range.begin(); - ASSERT_NE(begin, range.end()); - EXPECT_THAT(*begin, StatusIs(StatusCode::kPermissionDenied)); -} - -TEST(InstanceAdminClientTest, ListInstances) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, ListInstances) - .WillOnce([](InstanceAdminConnection::ListInstancesParams const& p) { - EXPECT_EQ("test-project", p.project_id); - EXPECT_EQ("labels.test-key:test-value", p.filter); - - return google::cloud::internal::MakePaginationRange( - gsai::v1::ListInstancesRequest{}, - [](gsai::v1::ListInstancesRequest const&) { - return StatusOr( - Status(StatusCode::kPermissionDenied, "uh-oh")); - }, - [](gsai::v1::ListInstancesResponse const&) { - return std::vector{}; - }); - }); - - InstanceAdminClient client(mock); - auto range = - client.ListInstances("test-project", "labels.test-key:test-value"); - auto begin = range.begin(); - ASSERT_NE(begin, range.end()); - EXPECT_THAT(*begin, StatusIs(StatusCode::kPermissionDenied)); -} - -TEST(InstanceAdminClientTest, GetIamPolicy) { - auto mock = std::make_shared(); - EXPECT_CALL(*mock, GetIamPolicy) - .WillOnce([](InstanceAdminConnection::GetIamPolicyParams const& p) { - EXPECT_EQ("projects/test-project/instances/test-instance", - p.instance_name); - return Status(StatusCode::kPermissionDenied, "uh-oh"); - }); - - InstanceAdminClient client(mock); - auto actual = client.GetIamPolicy(Instance("test-project", "test-instance")); - EXPECT_THAT(actual, StatusIs(StatusCode::kPermissionDenied)); -} - -TEST(InstanceAdminClientTest, SetIamPolicy) { - auto mock = std::make_shared(); - EXPECT_CALL(*mock, SetIamPolicy) - .WillOnce([](InstanceAdminConnection::SetIamPolicyParams const& p) { - EXPECT_EQ("projects/test-project/instances/test-instance", - p.instance_name); - return Status(StatusCode::kPermissionDenied, "uh-oh"); - }); - - InstanceAdminClient client(mock); - auto actual = client.SetIamPolicy(Instance("test-project", "test-instance"), - google::iam::v1::Policy{}); - EXPECT_THAT(actual, StatusIs(StatusCode::kPermissionDenied)); -} - -TEST(InstanceAdminClientTest, SetIamPolicyOccGetFailure) { - auto mock = std::make_shared(); - EXPECT_CALL(*mock, GetIamPolicy) - .WillOnce([](InstanceAdminConnection::GetIamPolicyParams const& p) { - EXPECT_THAT(p.instance_name, HasSubstr("test-project")); - EXPECT_THAT(p.instance_name, HasSubstr("test-instance")); - return Status(StatusCode::kPermissionDenied, "uh-oh"); - }); - - InstanceAdminClient client(mock); - auto actual = - client.SetIamPolicy(Instance("test-project", "test-instance"), - [](google::iam::v1::Policy const&) { - return absl::optional{}; - }); - EXPECT_THAT(actual, StatusIs(StatusCode::kPermissionDenied)); -} - -TEST(InstanceAdminClientTest, SetIamPolicyOccNoUpdates) { - auto mock = std::make_shared(); - EXPECT_CALL(*mock, GetIamPolicy) - .WillOnce([](InstanceAdminConnection::GetIamPolicyParams const& p) { - EXPECT_THAT(p.instance_name, HasSubstr("test-project")); - EXPECT_THAT(p.instance_name, HasSubstr("test-instance")); - google::iam::v1::Policy r; - r.set_etag("test-etag"); - return r; - }); - EXPECT_CALL(*mock, SetIamPolicy).Times(0); - - InstanceAdminClient client(mock); - auto actual = - client.SetIamPolicy(Instance("test-project", "test-instance"), - [](google::iam::v1::Policy const& p) { - EXPECT_EQ("test-etag", p.etag()); - return absl::optional{}; - }); - ASSERT_STATUS_OK(actual); - EXPECT_EQ("test-etag", actual->etag()); -} - -std::unique_ptr RerunPolicyForTesting() { - return LimitedErrorCountTransactionRerunPolicy(/*maximum_failures=*/3) - .clone(); -} - -std::unique_ptr BackoffPolicyForTesting() { - return ExponentialBackoffPolicy( - /*initial_delay=*/std::chrono::microseconds(1), - /*maximum_delay=*/std::chrono::microseconds(1), /*scaling=*/2.0) - .clone(); -} - -TEST(InstanceAdminClientTest, SetIamPolicyOccRetryAborted) { - auto mock = std::make_shared(); - EXPECT_CALL(*mock, GetIamPolicy) - .WillOnce([](InstanceAdminConnection::GetIamPolicyParams const& p) { - EXPECT_THAT(p.instance_name, HasSubstr("test-project")); - EXPECT_THAT(p.instance_name, HasSubstr("test-instance")); - google::iam::v1::Policy r; - r.set_etag("test-etag-1"); - return r; - }) - .WillOnce([](InstanceAdminConnection::GetIamPolicyParams const& p) { - EXPECT_THAT(p.instance_name, HasSubstr("test-project")); - EXPECT_THAT(p.instance_name, HasSubstr("test-instance")); - google::iam::v1::Policy r; - r.set_etag("test-etag-2"); - return r; - }); - EXPECT_CALL(*mock, SetIamPolicy) - .WillOnce([](InstanceAdminConnection::SetIamPolicyParams const& p) { - EXPECT_THAT(p.instance_name, HasSubstr("test-project")); - EXPECT_THAT(p.instance_name, HasSubstr("test-instance")); - EXPECT_EQ("test-etag-1", p.policy.etag()); - return Status(StatusCode::kAborted, "aborted"); - }) - .WillOnce([](InstanceAdminConnection::SetIamPolicyParams const& p) { - EXPECT_THAT(p.instance_name, HasSubstr("test-project")); - EXPECT_THAT(p.instance_name, HasSubstr("test-instance")); - EXPECT_EQ("test-etag-2", p.policy.etag()); - google::iam::v1::Policy r; - r.set_etag("test-etag-3"); - return r; - }); - - InstanceAdminClient client(mock); - int counter = 0; - auto actual = client.SetIamPolicy( - Instance("test-project", "test-instance"), - [&counter](google::iam::v1::Policy p) { - EXPECT_EQ("test-etag-" + std::to_string(++counter), p.etag()); - return p; - }, - RerunPolicyForTesting(), BackoffPolicyForTesting()); - ASSERT_STATUS_OK(actual); - EXPECT_EQ("test-etag-3", actual->etag()); -} - -TEST(InstanceAdminClientTest, SetIamPolicyOccRetryAbortedTooManyFailures) { - auto mock = std::make_shared(); - EXPECT_CALL(*mock, GetIamPolicy) - .WillRepeatedly([](InstanceAdminConnection::GetIamPolicyParams const& p) { - EXPECT_THAT(p.instance_name, HasSubstr("test-project")); - EXPECT_THAT(p.instance_name, HasSubstr("test-instance")); - google::iam::v1::Policy r; - r.set_etag("test-etag-1"); - return r; - }); - EXPECT_CALL(*mock, SetIamPolicy) - .Times(AtLeast(2)) - .WillRepeatedly([](InstanceAdminConnection::SetIamPolicyParams const& p) { - EXPECT_THAT(p.instance_name, HasSubstr("test-project")); - EXPECT_THAT(p.instance_name, HasSubstr("test-instance")); - EXPECT_EQ("test-etag-1", p.policy.etag()); - return Status(StatusCode::kAborted, "test-msg"); - }); - - InstanceAdminClient client(mock); - auto actual = client.SetIamPolicy( - Instance("test-project", "test-instance"), - [](google::iam::v1::Policy p) { return p; }, RerunPolicyForTesting(), - BackoffPolicyForTesting()); - EXPECT_THAT(actual, StatusIs(StatusCode::kAborted, HasSubstr("test-msg"))); -} - -TEST(InstanceAdminClientTest, TestIamPermissions) { - auto mock = std::make_shared(); - EXPECT_CALL(*mock, TestIamPermissions) - .WillOnce([](InstanceAdminConnection::TestIamPermissionsParams const& p) { - EXPECT_EQ("projects/test-project/instances/test-instance", - p.instance_name); - EXPECT_THAT(p.permissions, - ElementsAre("test.permission1", "test.permission2")); - return Status(StatusCode::kPermissionDenied, "uh-oh"); - }); - - InstanceAdminClient client(mock); - auto actual = - client.TestIamPermissions(Instance("test-project", "test-instance"), - {"test.permission1", "test.permission2"}); - EXPECT_THAT(actual, StatusIs(StatusCode::kPermissionDenied)); -} - -} // namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace spanner -} // namespace cloud -} // namespace google diff --git a/google/cloud/spanner/instance_admin_connection.cc b/google/cloud/spanner/instance_admin_connection.cc deleted file mode 100644 index 90685c40d55ca..0000000000000 --- a/google/cloud/spanner/instance_admin_connection.cc +++ /dev/null @@ -1,337 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// TODO(#7356): Remove this file after the deprecation period expires -#include "google/cloud/internal/disable_deprecation_warnings.inc" -#include "google/cloud/spanner/instance_admin_connection.h" -#include "google/cloud/spanner/instance.h" -#include "google/cloud/spanner/internal/defaults.h" -#include "google/cloud/spanner/options.h" -#include "google/cloud/internal/async_long_running_operation.h" -#include "google/cloud/internal/retry_loop.h" -#include -#include - -namespace google { -namespace cloud { -namespace spanner { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -namespace gsai = ::google::spanner::admin::instance; - -using ::google::cloud::Idempotency; - -namespace { - -class InstanceAdminConnectionImpl : public InstanceAdminConnection { - public: - InstanceAdminConnectionImpl( - std::shared_ptr stub, Options opts) - : stub_(std::move(stub)), - opts_(std::move(opts)), - retry_policy_prototype_(opts_.get()->clone()), - backoff_policy_prototype_( - opts_.get()->clone()), - polling_policy_prototype_( - opts_.get()->clone()), - background_threads_(internal::MakeBackgroundThreadsFactory(opts_)()) {} - - ~InstanceAdminConnectionImpl() override = default; - - Options options() override { return opts_; } - - StatusOr GetInstance(GetInstanceParams gip) override { - gsai::v1::GetInstanceRequest request; - request.set_name(std::move(gip.instance_name)); - return RetryLoop( - retry_policy_prototype_->clone(), backoff_policy_prototype_->clone(), - Idempotency::kIdempotent, - [this](grpc::ClientContext& context, - gsai::v1::GetInstanceRequest const& request) { - return stub_->GetInstance(context, request); - }, - request, __func__); - } - - future> CreateInstance( - CreateInstanceParams p) override { - return google::cloud::internal::AsyncLongRunningOperation< - gsai::v1::Instance>( - background_threads_->cq(), - google::cloud::internal::SaveCurrentOptions(), std::move(p.request), - [stub = stub_](google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions const&, - gsai::v1::CreateInstanceRequest const& request) { - return stub->AsyncCreateInstance(cq, std::move(context), request); - }, - [stub = stub_]( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions const&, - google::longrunning::GetOperationRequest const& request) { - return stub->AsyncGetOperation(cq, std::move(context), request); - }, - [stub = stub_]( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions const&, - google::longrunning::CancelOperationRequest const& request) { - return stub->AsyncCancelOperation(cq, std::move(context), request); - }, - &google::cloud::internal::ExtractLongRunningResultResponse< - gsai::v1::Instance>, - retry_policy_prototype_->clone(), backoff_policy_prototype_->clone(), - Idempotency::kNonIdempotent, polling_policy_prototype_->clone(), - __func__); - } - - future> UpdateInstance( - UpdateInstanceParams p) override { - return google::cloud::internal::AsyncLongRunningOperation< - gsai::v1::Instance>( - background_threads_->cq(), - google::cloud::internal::SaveCurrentOptions(), std::move(p.request), - [stub = stub_](google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions const&, - gsai::v1::UpdateInstanceRequest const& request) { - return stub->AsyncUpdateInstance(cq, std::move(context), request); - }, - [stub = stub_]( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions const&, - google::longrunning::GetOperationRequest const& request) { - return stub->AsyncGetOperation(cq, std::move(context), request); - }, - [stub = stub_]( - google::cloud::CompletionQueue& cq, - std::shared_ptr context, - google::cloud::internal::ImmutableOptions const&, - google::longrunning::CancelOperationRequest const& request) { - return stub->AsyncCancelOperation(cq, std::move(context), request); - }, - &google::cloud::internal::ExtractLongRunningResultResponse< - gsai::v1::Instance>, - retry_policy_prototype_->clone(), backoff_policy_prototype_->clone(), - Idempotency::kIdempotent, polling_policy_prototype_->clone(), __func__); - } - - Status DeleteInstance(DeleteInstanceParams p) override { - gsai::v1::DeleteInstanceRequest request; - request.set_name(std::move(p.instance_name)); - return RetryLoop( - retry_policy_prototype_->clone(), backoff_policy_prototype_->clone(), - Idempotency::kIdempotent, - [this](grpc::ClientContext& context, - gsai::v1::DeleteInstanceRequest const& request) { - return stub_->DeleteInstance(context, request); - }, - request, __func__); - } - - StatusOr GetInstanceConfig( - GetInstanceConfigParams p) override { - gsai::v1::GetInstanceConfigRequest request; - request.set_name(std::move(p.instance_config_name)); - return RetryLoop( - retry_policy_prototype_->clone(), backoff_policy_prototype_->clone(), - Idempotency::kIdempotent, - [this](grpc::ClientContext& context, - gsai::v1::GetInstanceConfigRequest const& request) { - return stub_->GetInstanceConfig(context, request); - }, - request, __func__); - } - - ListInstanceConfigsRange ListInstanceConfigs( - ListInstanceConfigsParams params) override { - gsai::v1::ListInstanceConfigsRequest request; - request.set_parent("projects/" + params.project_id); - request.clear_page_token(); - auto& stub = stub_; - // Because we do not have C++14 generalized lambda captures we cannot just - // use the unique_ptr<> here, so convert to shared_ptr<> instead. - auto retry = std::shared_ptr(retry_policy_prototype_->clone()); - auto backoff = - std::shared_ptr(backoff_policy_prototype_->clone()); - - char const* function_name = __func__; - return google::cloud::internal::MakePaginationRange< - ListInstanceConfigsRange>( - std::move(request), - [stub, retry, backoff, - function_name](gsai::v1::ListInstanceConfigsRequest const& r) { - return RetryLoop( - retry->clone(), backoff->clone(), Idempotency::kIdempotent, - [stub](grpc::ClientContext& context, - gsai::v1::ListInstanceConfigsRequest const& request) { - return stub->ListInstanceConfigs(context, request); - }, - r, function_name); - }, - [](gsai::v1::ListInstanceConfigsResponse r) { - std::vector result( - r.instance_configs().size()); - auto& configs = *r.mutable_instance_configs(); - std::move(configs.begin(), configs.end(), result.begin()); - return result; - }); - } - - ListInstancesRange ListInstances(ListInstancesParams params) override { - gsai::v1::ListInstancesRequest request; - request.set_parent("projects/" + params.project_id); - request.set_filter(std::move(params.filter)); - request.clear_page_token(); - auto& stub = stub_; - // Because we do not have C++14 generalized lambda captures we cannot just - // use the unique_ptr<> here, so convert to shared_ptr<> instead. - auto retry = std::shared_ptr(retry_policy_prototype_->clone()); - auto backoff = - std::shared_ptr(backoff_policy_prototype_->clone()); - - char const* function_name = __func__; - return google::cloud::internal::MakePaginationRange( - std::move(request), - [stub, retry, backoff, - function_name](gsai::v1::ListInstancesRequest const& r) { - return RetryLoop( - retry->clone(), backoff->clone(), Idempotency::kIdempotent, - [stub](grpc::ClientContext& context, - gsai::v1::ListInstancesRequest const& request) { - return stub->ListInstances(context, request); - }, - r, function_name); - }, - [](gsai::v1::ListInstancesResponse r) { - std::vector result(r.instances().size()); - auto& instances = *r.mutable_instances(); - std::move(instances.begin(), instances.end(), result.begin()); - return result; - }); - } - - StatusOr GetIamPolicy( - GetIamPolicyParams p) override { - google::iam::v1::GetIamPolicyRequest request; - request.set_resource(std::move(p.instance_name)); - return RetryLoop( - retry_policy_prototype_->clone(), backoff_policy_prototype_->clone(), - Idempotency::kIdempotent, - [this](grpc::ClientContext& context, - google::iam::v1::GetIamPolicyRequest const& request) { - return stub_->GetIamPolicy(context, request); - }, - request, __func__); - } - - StatusOr SetIamPolicy( - SetIamPolicyParams p) override { - google::iam::v1::SetIamPolicyRequest request; - request.set_resource(std::move(p.instance_name)); - *request.mutable_policy() = std::move(p.policy); - auto const idempotency = request.policy().etag().empty() - ? Idempotency::kNonIdempotent - : Idempotency::kIdempotent; - return RetryLoop( - retry_policy_prototype_->clone(), backoff_policy_prototype_->clone(), - idempotency, - [this](grpc::ClientContext& context, - google::iam::v1::SetIamPolicyRequest const& request) { - return stub_->SetIamPolicy(context, request); - }, - request, __func__); - } - - StatusOr TestIamPermissions( - TestIamPermissionsParams p) override { - google::iam::v1::TestIamPermissionsRequest request; - request.set_resource(std::move(p.instance_name)); - for (auto& permission : p.permissions) { - request.add_permissions(std::move(permission)); - } - return RetryLoop( - retry_policy_prototype_->clone(), backoff_policy_prototype_->clone(), - Idempotency::kIdempotent, - [this](grpc::ClientContext& context, - google::iam::v1::TestIamPermissionsRequest const& request) { - return stub_->TestIamPermissions(context, request); - }, - request, __func__); - } - - private: - std::shared_ptr stub_; - Options opts_; - std::unique_ptr retry_policy_prototype_; - std::unique_ptr backoff_policy_prototype_; - std::unique_ptr polling_policy_prototype_; - - // Implementations of `BackgroundThreads` typically create a pool of - // threads that are joined during destruction, so, to avoid ownership - // cycles, those threads should never assume ownership of this object - // (e.g., via a `std::shared_ptr<>`). - std::unique_ptr background_threads_; -}; - -} // namespace - -InstanceAdminConnection::~InstanceAdminConnection() = default; - -std::shared_ptr MakeInstanceAdminConnection( - Options opts) { - internal::CheckExpectedOptions(opts, __func__); - opts = spanner_internal::DefaultAdminOptions(std::move(opts)); - auto stub = spanner_internal::CreateDefaultInstanceAdminStub(opts); - return std::make_shared( - std::move(stub), std::move(opts)); -} - -std::shared_ptr MakeInstanceAdminConnection( - ConnectionOptions const& options) { - return MakeInstanceAdminConnection(internal::MakeOptions(options)); -} - -std::shared_ptr MakeInstanceAdminConnection( - ConnectionOptions const& options, std::unique_ptr retry_policy, - std::unique_ptr backoff_policy, - std::unique_ptr polling_policy) { - auto opts = internal::MakeOptions(options); - opts.set(std::move(retry_policy)); - opts.set(std::move(backoff_policy)); - opts.set(std::move(polling_policy)); - return MakeInstanceAdminConnection(std::move(opts)); -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace spanner - -namespace spanner_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -std::shared_ptr -MakeInstanceAdminConnectionForTesting(std::shared_ptr stub, - Options opts) { - opts = spanner_internal::DefaultAdminOptions(std::move(opts)); - return std::make_shared( - std::move(stub), std::move(opts)); -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace spanner_internal -} // namespace cloud -} // namespace google diff --git a/google/cloud/spanner/instance_admin_connection.h b/google/cloud/spanner/instance_admin_connection.h deleted file mode 100644 index c725996d6794d..0000000000000 --- a/google/cloud/spanner/instance_admin_connection.h +++ /dev/null @@ -1,297 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_INSTANCE_ADMIN_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_INSTANCE_ADMIN_CONNECTION_H - -#include "google/cloud/spanner/backoff_policy.h" -#include "google/cloud/spanner/internal/instance_admin_stub.h" -#include "google/cloud/spanner/polling_policy.h" -#include "google/cloud/spanner/retry_policy.h" -#include "google/cloud/spanner/version.h" -#include "google/cloud/backoff_policy.h" -#include "google/cloud/internal/pagination_range.h" -#include "google/cloud/options.h" -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace spanner { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/** - * An input range to stream all the instances in a Cloud project. - * - * This type models an [input range][cppref-input-range] of - * `google::spanner::admin::v1::Instance` objects. Applications can make a - * single pass through the results. - * - * [cppref-input-range]: https://en.cppreference.com/w/cpp/ranges/input_range - */ -using ListInstancesRange = ::google::cloud::internal::PaginationRange< - google::spanner::admin::instance::v1::Instance>; - -/** - * An input range to stream all the instance configs in a Cloud project. - * - * This type models an [input range][cppref-input-range] of - * `google::spanner::admin::v1::Instance` objects. Applications can make a - * single pass through the results. - * - * [cppref-input-range]: https://en.cppreference.com/w/cpp/ranges/input_range - */ -using ListInstanceConfigsRange = ::google::cloud::internal::PaginationRange< - google::spanner::admin::instance::v1::InstanceConfig>; - -/** - * A connection to the Cloud Spanner instance administration service. - * - * @deprecated Please use #google::cloud::spanner_admin::InstanceAdminClient - * and #google::cloud::spanner_admin::InstanceAdminConnection instead. - * - * This interface defines pure-virtual methods for each of the user-facing - * overload sets in `InstanceAdminClient`. This allows users to inject custom - * behavior (e.g., with a Google Mock object) in a `InstanceAdminClient` object - * for use in their own tests. - * - * To create a concrete instance that connects you to a real Cloud Spanner - * instance administration service, see `MakeInstanceAdminConnection()`. - */ -class GOOGLE_CLOUD_CPP_SPANNER_ADMIN_API_DEPRECATED("InstanceAdminConnection") - InstanceAdminConnection { - public: - virtual ~InstanceAdminConnection() = 0; - - ///@{ - /** - * @name Define the arguments for each member function. - * - * Applications may define classes derived from `InstanceAdminConnection`, - * for example, because they want to mock the class. To avoid breaking all - * such derived classes when we change the number or type of the arguments - * to the member functions we define light weight structures to pass the - * arguments. - */ - /// Wrap the arguments for `GetInstance()`. - struct GetInstanceParams { - /// The full name of the instance in - /// `projects//instances/` format. - std::string instance_name; - }; - - /// Wrap the arguments for `CreateInstance()`. - struct CreateInstanceParams { - google::spanner::admin::instance::v1::CreateInstanceRequest request; - }; - - /// Wrap the arguments for `UpdateInstance()`. - struct UpdateInstanceParams { - google::spanner::admin::instance::v1::UpdateInstanceRequest request; - }; - - /// Wrap the arguments for `DeleteInstance()`. - struct DeleteInstanceParams { - std::string instance_name; - }; - - /// Wrap the arguments for `GetInstanceConfig()`. - struct GetInstanceConfigParams { - std::string instance_config_name; - }; - - /// Wrap the arguments for `ListInstanceConfigs()`. - struct ListInstanceConfigsParams { - std::string project_id; - }; - - /** - * Wrap the arguments for `ListInstances()`. - */ - struct ListInstancesParams { - /** - * Query the instances in this project. - * - * This is a required value, it must be non-empty. - */ - std::string project_id; - - /** - * A filtering expression to restrict the set of instances included in the - * response. - * - * @see The [RPC reference documentation][1] for the format of the filtering - * expression. - * - * [1]: - * https://cloud.google.com/spanner/docs/reference/rpc/google.spanner.admin.instance.v1#google.spanner.admin.instance.v1.ListInstancesRequest - */ - std::string filter; - }; - - /// Wrap the arguments for `GetIamPolicy()`. - struct GetIamPolicyParams { - std::string instance_name; - }; - - /// Wrap the arguments for `SetIamPolicy()`. - struct SetIamPolicyParams { - std::string instance_name; - google::iam::v1::Policy policy; - }; - - /// Wrap the arguments for `TestIamPermissions()`. - struct TestIamPermissionsParams { - std::string instance_name; - std::vector permissions; - }; - ///@} - - virtual Options options() { return Options{}; } - - /// Return the metadata for the given instance. - virtual StatusOr GetInstance( - GetInstanceParams) = 0; - - virtual future> - CreateInstance(CreateInstanceParams p) = 0; - - virtual future> - UpdateInstance(UpdateInstanceParams p) = 0; - - virtual Status DeleteInstance(DeleteInstanceParams p) = 0; - - /// Return the InstanceConfig with the given name. - virtual StatusOr - GetInstanceConfig(GetInstanceConfigParams) = 0; - - /** - * Returns a one-pass input range with all the instance configs. - */ - virtual ListInstanceConfigsRange ListInstanceConfigs( - ListInstanceConfigsParams) = 0; - - /** - * Returns a one-pass input range with all the instances meeting the - * requirements in @p params - */ - virtual ListInstancesRange ListInstances(ListInstancesParams params) = 0; - - /// Define the interface for a - /// google.spanner.v1.DatabaseAdmin.GetIamPolicy RPC. - virtual StatusOr GetIamPolicy( - GetIamPolicyParams) = 0; - - /// Define the interface for a - /// google.spanner.v1.DatabaseAdmin.SetIamPolicy RPC. - virtual StatusOr SetIamPolicy( - SetIamPolicyParams) = 0; - - /// Define the interface for a - /// google.spanner.v1.DatabaseAdmin.TestIamPermissions RPC. - virtual StatusOr - TestIamPermissions(TestIamPermissionsParams) = 0; -}; - -/** - * Returns an InstanceAdminConnection object that can be used for interacting - * with Cloud Spanner's admin APIs. - * - * The returned connection object should not be used directly; instead it - * should be given to a `InstanceAdminClient` instance. - * - * The optional @p opts argument may be used to configure aspects of the - * returned `InstanceAdminConnection`. Expected options are any of the types in - * the following option lists. - * - * - `google::cloud::CommonOptionList` - * - `google::cloud::GrpcOptionList` - * - `google::cloud::SpannerPolicyOptionList` - * - * @see `InstanceAdminConnection` - * - * @param opts (optional) configure the `InstanceAdminConnection` created by - * this function. - */ -GOOGLE_CLOUD_CPP_SPANNER_ADMIN_API_DEPRECATED("MakeInstanceAdminConnection()") -std::shared_ptr MakeInstanceAdminConnection( - Options opts = {}); - -/** - * Returns an InstanceAdminConnection object that can be used for interacting - * with Cloud Spanner's admin APIs. - * - * The returned connection object should not be used directly, rather it should - * be given to a `InstanceAdminClient` instance. - * - * @note Prefer using the `MakeInstanceAdminConnection()` overload that accepts - * `google::cloud::Options`. - * - * @see `InstanceAdminConnection` - * - * @param options configure the `InstanceAdminConnection` created by this - * function. - */ -GOOGLE_CLOUD_CPP_SPANNER_ADMIN_API_DEPRECATED("MakeInstanceAdminConnection()") -std::shared_ptr MakeInstanceAdminConnection( - ConnectionOptions const& options); - -/** - * Returns an InstanceAdminConnection object that can be used for interacting - * with Cloud Spanner's admin APIs. - * - * The returned connection object should not be used directly, rather it should - * be given to a `InstanceAdminClient` instance. - * - * @note Prefer using the `MakeInstanceAdminConnection()` overload that accepts - * `google::cloud::Options`. - * - * @param options configure the `InstanceAdminConnection` created by this - * function. - * @param retry_policy control for how long (or how many times) are retryable - * RPCs attempted - * @param backoff_policy controls the backoff behavior between retry attempts, - * typically some form of exponential backoff with jitter - * @param polling_policy controls for how often, and how quickly, are long - * running checked for completion - * - * @par Example - * @snippet samples.cc custom-instance-admin-policies - */ -GOOGLE_CLOUD_CPP_SPANNER_ADMIN_API_DEPRECATED("MakeInstanceAdminConnection()") -std::shared_ptr MakeInstanceAdminConnection( - ConnectionOptions const& options, std::unique_ptr retry_policy, - std::unique_ptr backoff_policy, - std::unique_ptr polling_policy); - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace spanner - -namespace spanner_internal { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// Internal-only factory that allows us to inject mock stubs for testing. -std::shared_ptr -MakeInstanceAdminConnectionForTesting( - std::shared_ptr base_stub, Options opts); - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace spanner_internal - -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_INSTANCE_ADMIN_CONNECTION_H diff --git a/google/cloud/spanner/instance_admin_connection_test.cc b/google/cloud/spanner/instance_admin_connection_test.cc deleted file mode 100644 index b347b06734159..0000000000000 --- a/google/cloud/spanner/instance_admin_connection_test.cc +++ /dev/null @@ -1,732 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// TODO(#7356): Remove this file after the deprecation period expires -#include "google/cloud/internal/disable_deprecation_warnings.inc" -#include "google/cloud/spanner/instance_admin_connection.h" -#include "google/cloud/spanner/create_instance_request_builder.h" -#include "google/cloud/spanner/internal/defaults.h" -#include "google/cloud/spanner/options.h" -#include "google/cloud/spanner/testing/mock_instance_admin_stub.h" -#include "google/cloud/testing_util/is_proto_equal.h" -#include "google/cloud/testing_util/status_matchers.h" -#include -#include -#include - -namespace google { -namespace cloud { -namespace spanner { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -namespace gsai = ::google::spanner::admin::instance; - -using ::google::cloud::testing_util::IsProtoEqual; -using ::google::cloud::testing_util::StatusIs; -using ::google::protobuf::TextFormat; -using ::testing::AtLeast; -using ::testing::ElementsAre; -using ::testing::Return; - -// Create a `Connection` suitable for use in tests that continue retrying -// until the retry policy is exhausted - attempting that with the default -// policies would take too long (30 minutes). -// Other tests can use this method or just call `MakeInstanceAdminConnection()` -// directly. -std::shared_ptr MakeLimitedRetryConnection( - std::shared_ptr mock) { - LimitedErrorCountRetryPolicy retry(/*maximum_failures=*/2); - ExponentialBackoffPolicy backoff( - /*initial_delay=*/std::chrono::microseconds(1), - /*maximum_delay=*/std::chrono::microseconds(1), - /*scaling=*/2.0); - GenericPollingPolicy polling(retry, backoff); - Options opts; - opts.set(retry.clone()); - opts.set(backoff.clone()); - opts.set(polling.clone()); - return spanner_internal::MakeInstanceAdminConnectionForTesting( - std::move(mock), std::move(opts)); -} - -TEST(InstanceAdminConnectionTest, GetInstanceSuccess) { - std::string const expected_name = - "projects/test-project/instances/test-instance"; - - auto constexpr kInstanceText = R"pb( - name: "projects/test-project/instances/test-instance" - config: "test-config" - display_name: "test display name" - node_count: 7 - state: CREATING - create_time { seconds: 1657025805 nanos: 967908745 } - update_time { seconds: 1657025805 nanos: 967908745 } - )pb"; - gsai::v1::Instance expected_instance; - ASSERT_TRUE(TextFormat::ParseFromString(kInstanceText, &expected_instance)); - - auto mock = std::make_shared(); - EXPECT_CALL(*mock, GetInstance) - .WillOnce([&expected_name](grpc::ClientContext&, - gsai::v1::GetInstanceRequest const& request) { - EXPECT_EQ(expected_name, request.name()); - return Status(StatusCode::kUnavailable, "try-again"); - }) - .WillOnce([&expected_name, &expected_instance]( - grpc::ClientContext&, - gsai::v1::GetInstanceRequest const& request) { - EXPECT_EQ(expected_name, request.name()); - return expected_instance; - }); - - auto conn = MakeLimitedRetryConnection(mock); - auto actual = conn->GetInstance({expected_name}); - EXPECT_THAT(*actual, IsProtoEqual(expected_instance)); -} - -TEST(InstanceAdminConnectionTest, GetInstancePermanentFailure) { - auto mock = std::make_shared(); - EXPECT_CALL(*mock, GetInstance) - .WillOnce(Return(Status(StatusCode::kPermissionDenied, "uh-oh"))); - - auto conn = MakeLimitedRetryConnection(mock); - auto actual = conn->GetInstance({"test-name"}); - EXPECT_THAT(actual, StatusIs(StatusCode::kPermissionDenied)); -} - -TEST(InstanceAdminConnectionTest, GetInstanceTooManyTransients) { - auto mock = std::make_shared(); - EXPECT_CALL(*mock, GetInstance) - .WillRepeatedly(Return(Status(StatusCode::kUnavailable, "try-again"))); - - auto conn = MakeLimitedRetryConnection(mock); - auto actual = conn->GetInstance({"test-name"}); - EXPECT_THAT(actual, StatusIs(StatusCode::kUnavailable)); -} - -TEST(InstanceAdminClientTest, CreateInstanceSuccess) { - auto mock = std::make_shared(); - std::string const expected_name = - "projects/test-project/instances/test-instance"; - - EXPECT_CALL(*mock, AsyncCreateInstance) - .WillOnce([&expected_name](CompletionQueue&, auto, - gsai::v1::CreateInstanceRequest const& r) { - EXPECT_EQ("test-instance", r.instance_id()); - EXPECT_EQ("projects/test-project", r.parent()); - auto const& instance = r.instance(); - EXPECT_EQ(expected_name, instance.name()); - EXPECT_EQ("test-instance-config", instance.config()); - EXPECT_EQ("test-display-name", instance.display_name()); - auto const& labels = instance.labels(); - EXPECT_EQ(1, labels.count("key")); - EXPECT_EQ("value", labels.at("key")); - google::longrunning::Operation op; - op.set_name("test-operation-name"); - op.set_done(false); - return make_ready_future(make_status_or(op)); - }); - EXPECT_CALL(*mock, AsyncGetOperation) - .WillOnce( - [&expected_name](CompletionQueue&, auto, - google::longrunning::GetOperationRequest const& r) { - EXPECT_EQ("test-operation-name", r.name()); - google::longrunning::Operation op; - op.set_name(r.name()); - op.set_done(true); - gsai::v1::Instance instance; - instance.set_name(expected_name); - op.mutable_response()->PackFrom(instance); - return make_ready_future(make_status_or(op)); - }); - - auto conn = MakeLimitedRetryConnection(std::move(mock)); - Instance in("test-project", "test-instance"); - auto fut = conn->CreateInstance( - {CreateInstanceRequestBuilder(in, "test-instance-config") - .SetDisplayName("test-display-name") - .SetNodeCount(1) - .SetLabels({{"key", "value"}}) - .Build()}); - auto instance = fut.get(); - ASSERT_STATUS_OK(instance); - - EXPECT_EQ(expected_name, instance->name()); -} - -TEST(InstanceAdminClientTest, CreateInstanceError) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, AsyncCreateInstance) - .WillOnce( - [](CompletionQueue&, auto, gsai::v1::CreateInstanceRequest const&) { - return make_ready_future(StatusOr( - Status(StatusCode::kPermissionDenied, "uh-oh"))); - }); - - auto conn = MakeLimitedRetryConnection(std::move(mock)); - Instance in("test-project", "test-instance"); - auto fut = conn->CreateInstance( - {CreateInstanceRequestBuilder(in, "test-instance-config") - .SetDisplayName("test-display-name") - .SetNodeCount(1) - .SetLabels({{"key", "value"}}) - .Build()}); - auto instance = fut.get(); - EXPECT_THAT(instance, StatusIs(StatusCode::kPermissionDenied)); -} - -TEST(InstanceAdminClientTest, UpdateInstanceSuccess) { - auto mock = std::make_shared(); - std::string expected_name = "projects/test-project/instances/test-instance"; - - EXPECT_CALL(*mock, AsyncUpdateInstance) - .WillOnce( - [](CompletionQueue&, auto, gsai::v1::UpdateInstanceRequest const&) { - return make_ready_future(StatusOr( - Status(StatusCode::kUnavailable, "try-again"))); - }) - .WillOnce([&expected_name](CompletionQueue&, auto, - gsai::v1::UpdateInstanceRequest const& r) { - EXPECT_EQ(expected_name, r.instance().name()); - google::longrunning::Operation op; - op.set_name("test-operation-name"); - op.set_done(false); - return make_ready_future(make_status_or(op)); - }); - EXPECT_CALL(*mock, AsyncGetOperation) - .WillOnce( - [&expected_name](CompletionQueue&, auto, - google::longrunning::GetOperationRequest const& r) { - EXPECT_EQ("test-operation-name", r.name()); - google::longrunning::Operation op; - op.set_name(r.name()); - op.set_done(true); - gsai::v1::Instance instance; - instance.set_name(expected_name); - op.mutable_response()->PackFrom(instance); - return make_ready_future(make_status_or(op)); - }); - - auto conn = MakeLimitedRetryConnection(std::move(mock)); - gsai::v1::UpdateInstanceRequest req; - req.mutable_instance()->set_name(expected_name); - auto fut = conn->UpdateInstance({req}); - auto instance = fut.get(); - ASSERT_STATUS_OK(instance); - - EXPECT_EQ(expected_name, instance->name()); -} - -TEST(InstanceAdminClientTest, UpdateInstancePermanentFailure) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, AsyncUpdateInstance) - .WillOnce( - [](CompletionQueue&, auto, gsai::v1::UpdateInstanceRequest const&) { - return make_ready_future(StatusOr( - Status(StatusCode::kPermissionDenied, "uh-oh"))); - }); - - auto conn = MakeLimitedRetryConnection(std::move(mock)); - auto fut = conn->UpdateInstance({gsai::v1::UpdateInstanceRequest()}); - auto instance = fut.get(); - EXPECT_THAT(instance, StatusIs(StatusCode::kPermissionDenied)); -} - -TEST(InstanceAdminClientTest, UpdateInstanceTooManyTransients) { - auto mock = std::make_shared(); - - EXPECT_CALL(*mock, AsyncUpdateInstance) - .Times(AtLeast(2)) - .WillRepeatedly( - [](CompletionQueue&, auto, gsai::v1::UpdateInstanceRequest const&) { - return make_ready_future(StatusOr( - Status(StatusCode::kUnavailable, "try-again"))); - }); - auto conn = MakeLimitedRetryConnection(std::move(mock)); - auto fut = conn->UpdateInstance({gsai::v1::UpdateInstanceRequest()}); - auto instance = fut.get(); - EXPECT_THAT(instance, StatusIs(StatusCode::kUnavailable)); -} - -TEST(InstanceAdminConnectionTest, DeleteInstanceSuccess) { - std::string const expected_name = - "projects/test-project/instances/test-instance"; - - auto mock = std::make_shared(); - EXPECT_CALL(*mock, DeleteInstance) - .WillOnce( - [&expected_name](grpc::ClientContext&, - gsai::v1::DeleteInstanceRequest const& request) { - EXPECT_EQ(expected_name, request.name()); - return Status(StatusCode::kUnavailable, "try-again"); - }) - .WillOnce( - [&expected_name](grpc::ClientContext&, - gsai::v1::DeleteInstanceRequest const& request) { - EXPECT_EQ(expected_name, request.name()); - return Status(); - }); - - auto conn = MakeLimitedRetryConnection(mock); - auto status = conn->DeleteInstance({expected_name}); - EXPECT_STATUS_OK(status); -} - -TEST(InstanceAdminConnectionTest, DeleteInstancePermanentFailure) { - auto mock = std::make_shared(); - EXPECT_CALL(*mock, DeleteInstance) - .WillOnce(Return(Status(StatusCode::kPermissionDenied, "uh-oh"))); - - auto conn = MakeLimitedRetryConnection(mock); - auto status = conn->DeleteInstance({"test-name"}); - EXPECT_THAT(status, StatusIs(StatusCode::kPermissionDenied)); -} - -TEST(InstanceAdminConnectionTest, DeleteInstanceTooManyTransients) { - auto mock = std::make_shared(); - EXPECT_CALL(*mock, DeleteInstance) - .WillRepeatedly(Return(Status(StatusCode::kUnavailable, "try-again"))); - - auto conn = MakeLimitedRetryConnection(mock); - auto status = conn->DeleteInstance({"test-name"}); - EXPECT_THAT(status, StatusIs(StatusCode::kUnavailable)); -} - -TEST(InstanceAdminConnectionTest, GetInstanceConfigSuccess) { - std::string const expected_name = - "projects/test-project/instanceConfigs/test-instance-config"; - auto constexpr kConfigText = R"pb( - name: "projects/test-project/instanceConfigs/test-instance-config" - display_name: "test display name" - replicas { - location: "location" - type: READ_WRITE - default_leader_location: true - } - leader_options: "location" - )pb"; - gsai::v1::InstanceConfig expected_instance_config; - ASSERT_TRUE( - TextFormat::ParseFromString(kConfigText, &expected_instance_config)); - - auto mock = std::make_shared(); - EXPECT_CALL(*mock, GetInstanceConfig) - .WillOnce( - [&expected_name](grpc::ClientContext&, - gsai::v1::GetInstanceConfigRequest const& request) { - EXPECT_EQ(expected_name, request.name()); - return Status(StatusCode::kUnavailable, "try-again"); - }) - .WillOnce([&expected_name, &expected_instance_config]( - grpc::ClientContext&, - gsai::v1::GetInstanceConfigRequest const& request) { - EXPECT_EQ(expected_name, request.name()); - return expected_instance_config; - }); - - auto conn = MakeLimitedRetryConnection(mock); - auto actual = conn->GetInstanceConfig({expected_name}); - EXPECT_THAT(*actual, IsProtoEqual(expected_instance_config)); -} - -TEST(InstanceAdminConnectionTest, GetInstanceConfigPermanentFailure) { - auto mock = std::make_shared(); - EXPECT_CALL(*mock, GetInstanceConfig) - .WillOnce(Return(Status(StatusCode::kPermissionDenied, "uh-oh"))); - - auto conn = MakeLimitedRetryConnection(mock); - auto actual = - conn->GetInstanceConfig({"projects/test/instanceConfig/test-name"}); - EXPECT_THAT(actual, StatusIs(StatusCode::kPermissionDenied)); -} - -TEST(InstanceAdminConnectionTest, GetInstanceConfigTooManyTransients) { - auto mock = std::make_shared(); - EXPECT_CALL(*mock, GetInstanceConfig) - .WillRepeatedly(Return(Status(StatusCode::kUnavailable, "try-again"))); - - auto conn = MakeLimitedRetryConnection(mock); - auto actual = - conn->GetInstanceConfig({"projects/test/instanceConfig/test-name"}); - EXPECT_THAT(actual, StatusIs(StatusCode::kUnavailable)); -} - -TEST(InstanceAdminConnectionTest, ListInstanceConfigsSuccess) { - constexpr char const* kInstanceConfigText[3] = { - R"pb( - name: "projects/test-project/instanceConfigs/test-instance-config-1" - display_name: "test display name 1" - replicas { - location: "location1" - type: READ_WRITE - default_leader_location: true - } - leader_options: "location1" - )pb", - R"pb( - name: "projects/test-project/instanceConfigs/test-instance-config-2" - display_name: "test display name 2" - replicas { - location: "location2" - type: READ_WRITE - default_leader_location: true - } - leader_options: "location2" - )pb", - R"pb( - name: "projects/test-project/instanceConfigs/test-instance-config-3" - display_name: "test display name 3" - replicas { - location: "location3" - type: READ_WRITE - default_leader_location: true - } - leader_options: "location3" - )pb", - }; - gsai::v1::InstanceConfig expected_instance_configs[3]; - ASSERT_TRUE(TextFormat::ParseFromString(kInstanceConfigText[0], - &expected_instance_configs[0])); - ASSERT_TRUE(TextFormat::ParseFromString(kInstanceConfigText[1], - &expected_instance_configs[1])); - ASSERT_TRUE(TextFormat::ParseFromString(kInstanceConfigText[2], - &expected_instance_configs[2])); - - std::string const expected_parent = "projects/test-project"; - auto mock = std::make_shared(); - EXPECT_CALL(*mock, ListInstanceConfigs) - .WillOnce([&](grpc::ClientContext&, - gsai::v1::ListInstanceConfigsRequest const& request) { - EXPECT_EQ(expected_parent, request.parent()); - EXPECT_TRUE(request.page_token().empty()); - return Status(StatusCode::kUnavailable, "try-again"); - }) - .WillOnce([&](grpc::ClientContext&, - gsai::v1::ListInstanceConfigsRequest const& request) { - EXPECT_EQ(expected_parent, request.parent()); - EXPECT_TRUE(request.page_token().empty()); - - gsai::v1::ListInstanceConfigsResponse response; - response.set_next_page_token("p1"); - *response.add_instance_configs() = expected_instance_configs[0]; - *response.add_instance_configs() = expected_instance_configs[1]; - return response; - }) - .WillOnce([&](grpc::ClientContext&, - gsai::v1::ListInstanceConfigsRequest const& request) { - EXPECT_EQ(expected_parent, request.parent()); - EXPECT_EQ("p1", request.page_token()); - - gsai::v1::ListInstanceConfigsResponse response; - response.clear_next_page_token(); - *response.add_instance_configs() = expected_instance_configs[2]; - return response; - }); - - auto conn = MakeLimitedRetryConnection(mock); - std::vector actual_instance_configs; - for (auto const& instance_config : - conn->ListInstanceConfigs({"test-project"})) { - ASSERT_STATUS_OK(instance_config); - actual_instance_configs.push_back(*instance_config); - } - EXPECT_THAT(actual_instance_configs, - ElementsAre(IsProtoEqual(expected_instance_configs[0]), - IsProtoEqual(expected_instance_configs[1]), - IsProtoEqual(expected_instance_configs[2]))); -} - -TEST(InstanceAdminConnectionTest, ListInstanceConfigsPermanentFailure) { - auto mock = std::make_shared(); - EXPECT_CALL(*mock, ListInstanceConfigs) - .WillOnce(Return(Status(StatusCode::kPermissionDenied, "uh-oh"))); - - auto conn = MakeLimitedRetryConnection(mock); - auto range = conn->ListInstanceConfigs({"test-project"}); - auto begin = range.begin(); - ASSERT_NE(begin, range.end()); - EXPECT_THAT(*begin, StatusIs(StatusCode::kPermissionDenied)); -} - -TEST(InstanceAdminConnectionTest, ListInstanceConfigsTooManyTransients) { - auto mock = std::make_shared(); - EXPECT_CALL(*mock, ListInstanceConfigs) - .Times(AtLeast(2)) - .WillRepeatedly(Return(Status(StatusCode::kUnavailable, "try-again"))); - - auto conn = MakeLimitedRetryConnection(mock); - auto range = conn->ListInstanceConfigs({"test-project"}); - auto begin = range.begin(); - ASSERT_NE(begin, range.end()); - EXPECT_THAT(*begin, StatusIs(StatusCode::kUnavailable)); -} - -TEST(InstanceAdminConnectionTest, ListInstancesSuccess) { - std::string const expected_parent = "projects/test-project"; - - auto mock = std::make_shared(); - EXPECT_CALL(*mock, ListInstances) - .WillOnce([&](grpc::ClientContext&, - gsai::v1::ListInstancesRequest const& request) { - EXPECT_EQ(expected_parent, request.parent()); - EXPECT_EQ("labels.test-key:test-value", request.filter()); - EXPECT_TRUE(request.page_token().empty()); - return Status(StatusCode::kUnavailable, "try-again"); - }) - .WillOnce([&](grpc::ClientContext&, - gsai::v1::ListInstancesRequest const& request) { - EXPECT_EQ(expected_parent, request.parent()); - EXPECT_EQ("labels.test-key:test-value", request.filter()); - EXPECT_TRUE(request.page_token().empty()); - - gsai::v1::ListInstancesResponse response; - response.set_next_page_token("p1"); - response.add_instances()->set_name("i1"); - response.add_instances()->set_name("i2"); - return response; - }) - .WillOnce([&](grpc::ClientContext&, - gsai::v1::ListInstancesRequest const& request) { - EXPECT_EQ(expected_parent, request.parent()); - EXPECT_EQ("labels.test-key:test-value", request.filter()); - EXPECT_EQ("p1", request.page_token()); - - gsai::v1::ListInstancesResponse response; - response.clear_next_page_token(); - response.add_instances()->set_name("i3"); - return response; - }); - - auto conn = MakeLimitedRetryConnection(mock); - std::vector actual_names; - for (auto const& instance : - conn->ListInstances({"test-project", "labels.test-key:test-value"})) { - ASSERT_STATUS_OK(instance); - actual_names.push_back(instance->name()); - } - EXPECT_THAT(actual_names, ElementsAre("i1", "i2", "i3")); -} - -TEST(InstanceAdminConnectionTest, ListInstancesPermanentFailure) { - auto mock = std::make_shared(); - EXPECT_CALL(*mock, ListInstances) - .WillOnce(Return(Status(StatusCode::kPermissionDenied, "uh-oh"))); - - auto conn = MakeLimitedRetryConnection(mock); - auto range = conn->ListInstances({"test-project", ""}); - auto begin = range.begin(); - ASSERT_NE(begin, range.end()); - EXPECT_THAT(*begin, StatusIs(StatusCode::kPermissionDenied)); -} - -TEST(InstanceAdminConnectionTest, ListInstancesTooManyTransients) { - auto mock = std::make_shared(); - EXPECT_CALL(*mock, ListInstances) - .WillRepeatedly(Return(Status(StatusCode::kUnavailable, "try-again"))); - - auto conn = MakeLimitedRetryConnection(mock); - auto range = conn->ListInstances({"test-project", ""}); - auto begin = range.begin(); - ASSERT_NE(begin, range.end()); - EXPECT_THAT(*begin, StatusIs(StatusCode::kUnavailable)); -} - -TEST(InstanceAdminConnectionTest, GetIamPolicySuccess) { - std::string const expected_name = - "projects/test-project/instances/test-instance"; - - auto mock = std::make_shared(); - EXPECT_CALL(*mock, GetIamPolicy) - .WillOnce([&expected_name]( - grpc::ClientContext&, - google::iam::v1::GetIamPolicyRequest const& request) { - EXPECT_EQ(expected_name, request.resource()); - return Status(StatusCode::kUnavailable, "try-again"); - }) - .WillOnce([&expected_name]( - grpc::ClientContext&, - google::iam::v1::GetIamPolicyRequest const& request) { - EXPECT_EQ(expected_name, request.resource()); - google::iam::v1::Policy response; - auto& binding = *response.add_bindings(); - binding.set_role("roles/spanner.databaseReader"); - binding.add_members("user:test-account@example.com"); - return response; - }); - - auto conn = MakeLimitedRetryConnection(mock); - auto actual = conn->GetIamPolicy({expected_name}); - ASSERT_STATUS_OK(actual); - ASSERT_EQ(1, actual->bindings_size()); - EXPECT_EQ("roles/spanner.databaseReader", actual->bindings(0).role()); - ASSERT_EQ(1, actual->bindings(0).members_size()); - ASSERT_EQ("user:test-account@example.com", actual->bindings(0).members(0)); -} - -TEST(InstanceAdminConnectionTest, GetIamPolicyPermanentFailure) { - auto mock = std::make_shared(); - EXPECT_CALL(*mock, GetIamPolicy) - .WillOnce(Return(Status(StatusCode::kPermissionDenied, "uh-oh"))); - - auto conn = MakeLimitedRetryConnection(mock); - auto actual = conn->GetIamPolicy({"test-instance-name"}); - EXPECT_THAT(actual, StatusIs(StatusCode::kPermissionDenied)); -} - -TEST(InstanceAdminConnectionTest, GetIamPolicyTooManyTransients) { - auto mock = std::make_shared(); - EXPECT_CALL(*mock, GetIamPolicy) - .WillRepeatedly(Return(Status(StatusCode::kUnavailable, "try-again"))); - - auto conn = MakeLimitedRetryConnection(mock); - auto actual = conn->GetIamPolicy({"test-instance-name"}); - EXPECT_THAT(actual, StatusIs(StatusCode::kUnavailable)); -} - -TEST(InstanceAdminConnectionTest, SetIamPolicySuccess) { - std::string const expected_name = - "projects/test-project/instances/test-instance"; - - auto constexpr kPolicyText = R"pb( - etag: "request-etag" - bindings { - role: "roles/spanner.databaseReader" - members: "user:test-user-1@example.com" - members: "user:test-user-2@example.com" - } - )pb"; - google::iam::v1::Policy expected_policy; - ASSERT_TRUE(TextFormat::ParseFromString(kPolicyText, &expected_policy)); - - auto mock = std::make_shared(); - EXPECT_CALL(*mock, SetIamPolicy) - .WillOnce([&expected_name]( - grpc::ClientContext&, - google::iam::v1::SetIamPolicyRequest const& request) { - EXPECT_EQ(expected_name, request.resource()); - return Status(StatusCode::kUnavailable, "try-again"); - }) - .WillOnce([&expected_name, &expected_policy]( - grpc::ClientContext&, - google::iam::v1::SetIamPolicyRequest const& request) { - EXPECT_EQ(expected_name, request.resource()); - EXPECT_THAT(request.policy(), IsProtoEqual(expected_policy)); - google::iam::v1::Policy response = expected_policy; - response.set_etag("response-etag"); - return response; - }); - - auto conn = MakeLimitedRetryConnection(mock); - auto actual = conn->SetIamPolicy({expected_name, expected_policy}); - ASSERT_STATUS_OK(actual); - expected_policy.set_etag("response-etag"); - EXPECT_THAT(*actual, IsProtoEqual(expected_policy)); -} - -TEST(InstanceAdminConnectionTest, SetIamPolicyPermanentFailure) { - auto mock = std::make_shared(); - EXPECT_CALL(*mock, SetIamPolicy) - .WillOnce(Return(Status(StatusCode::kPermissionDenied, "uh-oh"))); - - auto conn = MakeLimitedRetryConnection(mock); - auto actual = conn->SetIamPolicy({"test-instance-name", {}}); - EXPECT_THAT(actual, StatusIs(StatusCode::kPermissionDenied)); -} - -TEST(InstanceAdminConnectionTest, SetIamPolicyNonIdempotent) { - auto mock = std::make_shared(); - // If the Etag field is not set, then the RPC is not idempotent and should - // fail on the first transient error. - EXPECT_CALL(*mock, SetIamPolicy) - .WillOnce(Return(Status(StatusCode::kUnavailable, "try-again"))); - - auto conn = MakeLimitedRetryConnection(mock); - google::iam::v1::Policy policy; - auto actual = conn->SetIamPolicy({"test-instance-name", policy}); - EXPECT_THAT(actual, StatusIs(StatusCode::kUnavailable)); -} - -TEST(InstanceAdminConnectionTest, SetIamPolicyIdempotent) { - auto mock = std::make_shared(); - EXPECT_CALL(*mock, SetIamPolicy) - .Times(AtLeast(2)) - .WillRepeatedly(Return(Status(StatusCode::kUnavailable, "try-again"))); - - auto conn = MakeLimitedRetryConnection(mock); - google::iam::v1::Policy policy; - policy.set_etag("test-etag-value"); - auto actual = conn->SetIamPolicy({"test-instance-name", policy}); - EXPECT_THAT(actual, StatusIs(StatusCode::kUnavailable)); -} - -TEST(InstanceAdminConnectionTest, TestIamPermissionsSuccess) { - std::string const expected_name = - "projects/test-project/instances/test-instance"; - - auto mock = std::make_shared(); - EXPECT_CALL(*mock, TestIamPermissions) - .WillOnce([&expected_name]( - grpc::ClientContext&, - google::iam::v1::TestIamPermissionsRequest const& request) { - EXPECT_EQ(expected_name, request.resource()); - return Status(StatusCode::kUnavailable, "try-again"); - }) - .WillOnce([&expected_name]( - grpc::ClientContext&, - google::iam::v1::TestIamPermissionsRequest const& request) { - EXPECT_EQ(expected_name, request.resource()); - google::iam::v1::TestIamPermissionsResponse response; - response.add_permissions("test.permission2"); - return response; - }); - - auto conn = MakeLimitedRetryConnection(mock); - auto actual = conn->TestIamPermissions( - {expected_name, {"test.permission1", "test.permission2"}}); - ASSERT_STATUS_OK(actual); - ASSERT_EQ(1, actual->permissions_size()); - ASSERT_EQ("test.permission2", actual->permissions(0)); -} - -TEST(InstanceAdminConnectionTest, TestIamPermissionsPermanentFailure) { - auto mock = std::make_shared(); - EXPECT_CALL(*mock, TestIamPermissions) - .WillOnce(Return(Status(StatusCode::kPermissionDenied, "uh-oh"))); - - auto conn = MakeLimitedRetryConnection(mock); - auto actual = - conn->TestIamPermissions({"test-instance-name", {"test.permission"}}); - EXPECT_THAT(actual, StatusIs(StatusCode::kPermissionDenied)); -} - -TEST(InstanceAdminConnectionTest, TestIamPermissionsTooManyTransients) { - auto mock = std::make_shared(); - EXPECT_CALL(*mock, TestIamPermissions) - .Times(AtLeast(2)) - .WillRepeatedly(Return(Status(StatusCode::kUnavailable, "try-again"))); - - auto conn = MakeLimitedRetryConnection(mock); - auto actual = - conn->TestIamPermissions({"test-instance-name", {"test.permission"}}); - EXPECT_THAT(actual, StatusIs(StatusCode::kUnavailable)); -} - -} // namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace spanner -} // namespace cloud -} // namespace google diff --git a/google/cloud/spanner/integration_tests/BUILD.bazel b/google/cloud/spanner/integration_tests/BUILD.bazel index 08b790694d194..e557dbe258475 100644 --- a/google/cloud/spanner/integration_tests/BUILD.bazel +++ b/google/cloud/spanner/integration_tests/BUILD.bazel @@ -33,9 +33,8 @@ licenses(["notice"]) # Apache 2.0 "//google/cloud/spanner:spanner_client_testing_private", "//google/cloud/testing_util:google_cloud_cpp_testing_grpc_private", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "//protos:system_includes", "//protos/google/cloud/spanner/testing:singer_cc_proto", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) for test in spanner_client_integration_tests] @@ -60,8 +59,7 @@ VARIATIONS = { "//google/cloud/spanner:spanner_client_testing_private", "//google/cloud/testing_util:google_cloud_cpp_testing_grpc_private", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "//protos:system_includes", "//protos/google/cloud/spanner/testing:singer_cc_proto", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) for test in spanner_client_session_mode_sensitive_integration_tests for v_label, v_env in VARIATIONS.items()] diff --git a/google/cloud/spanner/integration_tests/CMakeLists.txt b/google/cloud/spanner/integration_tests/CMakeLists.txt index 04705b73893af..720c157905f02 100644 --- a/google/cloud/spanner/integration_tests/CMakeLists.txt +++ b/google/cloud/spanner/integration_tests/CMakeLists.txt @@ -23,12 +23,7 @@ function (spanner_client_define_integration_tests) set(spanner_client_integration_tests # cmake-format: sort - backup_extra_integration_test.cc - backup_integration_test.cc - client_stress_test.cc - data_types_integration_test.cc - database_admin_integration_test.cc - instance_admin_integration_test.cc + client_stress_test.cc data_types_integration_test.cc session_pool_integration_test.cc) set(spanner_client_session_mode_sensitive_integration_tests diff --git a/google/cloud/spanner/integration_tests/backup_extra_integration_test.cc b/google/cloud/spanner/integration_tests/backup_extra_integration_test.cc deleted file mode 100644 index 260b507641dee..0000000000000 --- a/google/cloud/spanner/integration_tests/backup_extra_integration_test.cc +++ /dev/null @@ -1,445 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// TODO(#7356): Remove this file after the deprecation period expires -#include "google/cloud/internal/disable_deprecation_warnings.inc" -#include "google/cloud/spanner/client.h" -#include "google/cloud/spanner/database_admin_client.h" -#include "google/cloud/spanner/instance_admin_client.h" -#include "google/cloud/spanner/testing/instance_location.h" -#include "google/cloud/spanner/testing/pick_random_instance.h" -#include "google/cloud/spanner/testing/random_database_name.h" -#include "google/cloud/spanner/timestamp.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/getenv.h" -#include "google/cloud/internal/random.h" -#include "google/cloud/testing_util/integration_test.h" -#include "google/cloud/testing_util/status_matchers.h" -#include "absl/strings/match.h" -#include "absl/time/time.h" -#include -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace spanner { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -using ::google::cloud::testing_util::IsOk; -using ::google::cloud::testing_util::StatusIs; -using ::testing::HasSubstr; -using ::testing::IsEmpty; -using ::testing::Not; - -// Constants used to identify the encryption key. -auto constexpr kKeyRing = "spanner-cmek"; -auto constexpr kKeyName = "spanner-cmek-test-key"; - -std::string const& ProjectId() { - static std::string project_id = - google::cloud::internal::GetEnv("GOOGLE_CLOUD_PROJECT").value_or(""); - return project_id; -} - -bool RunSlowBackupTests() { - static bool run_slow_backup_tests = - absl::StrContains(google::cloud::internal::GetEnv( - "GOOGLE_CLOUD_CPP_SPANNER_SLOW_INTEGRATION_TESTS") - .value_or(""), - "backup"); - return run_slow_backup_tests; -} - -bool Emulator() { - static bool emulator = - google::cloud::internal::GetEnv("SPANNER_EMULATOR_HOST").has_value(); - return emulator; -} - -class BackupExtraIntegrationTest - : public ::google::cloud::testing_util::IntegrationTest { - public: - BackupExtraIntegrationTest() - : generator_(google::cloud::internal::MakeDefaultPRNG()), - database_admin_client_(MakeDatabaseAdminConnection( - ConnectionOptions{}, - LimitedTimeRetryPolicy(std::chrono::minutes(60)).clone(), - ExponentialBackoffPolicy(std::chrono::seconds(1), - std::chrono::minutes(1), 2.0) - .clone(), - GenericPollingPolicy<>( - LimitedTimeRetryPolicy(std::chrono::minutes(90)), - ExponentialBackoffPolicy(std::chrono::seconds(1), - std::chrono::minutes(1), 2.0)) - .clone())) {} - - protected: - google::cloud::internal::DefaultPRNG generator_; - DatabaseAdminClient database_admin_client_; -}; - -/// @test Verify creating/restoring a backup with a valid version_time. -TEST_F(BackupExtraIntegrationTest, BackupRestoreWithVersionTime) { - if (!RunSlowBackupTests()) GTEST_SKIP(); - - auto instance_id = spanner_testing::PickRandomInstance( - generator_, ProjectId(), - "(labels.restore-database-partition:legacy-extra OR" - " labels.restore-database-partition:all)"); - ASSERT_THAT(instance_id, IsOk()); - Instance in(ProjectId(), *instance_id); - Database db(in, spanner_testing::RandomDatabaseName(generator_)); - - std::vector extra_statements = { - absl::StrCat("ALTER DATABASE `", db.database_id(), - "` SET OPTIONS (version_retention_period='1h')"), - "CREATE TABLE Counters (" - " Name STRING(64) NOT NULL," - " Value INT64 NOT NULL" - ") PRIMARY KEY (Name)"}; - auto database = - database_admin_client_.CreateDatabase(db, extra_statements).get(); - if (Emulator()) { // version_retention_period - EXPECT_THAT(database, Not(IsOk())); - return; - } - ASSERT_THAT(database, IsOk()); - auto create_time = - MakeTimestamp(database->create_time()).value().get().value(); - - std::string const version_key = "version"; - std::vector version_times; - { - spanner::Client client(spanner::MakeConnection(db)); - auto commit = client.Commit(spanner::Mutations{ - spanner::InsertMutationBuilder("Counters", {"Name", "Value"}) - .EmplaceRow(version_key, 0) // the version we'll backup/restore - .Build()}); - EXPECT_STATUS_OK(commit); - if (commit) { - // version_times[0]: when Counters[version_key] == 0 - version_times.push_back(commit->commit_timestamp); - commit = client.Commit(spanner::Mutations{ - spanner::UpdateMutationBuilder("Counters", {"Name", "Value"}) - .EmplaceRow(version_key, 1) // latest version - .Build()}); - EXPECT_STATUS_OK(commit); - if (commit) { - // version_times[1]: when Counters[version_key] == 1 - version_times.push_back(commit->commit_timestamp); - } - } - } - - if (version_times.size() == 2) { - EXPECT_LT(MakeTimestamp(create_time).value(), version_times[0]); - EXPECT_LT(version_times[0], version_times[1]); - // Create a backup when Counters[version_key] == 0. - auto version_time = version_times[0]; - auto expire_time = MakeTimestamp(create_time + absl::Hours(12)).value(); - auto backup = - database_admin_client_ - .CreateBackup(db, db.database_id(), expire_time, version_time) - .get(); - EXPECT_THAT(backup, IsOk()); - if (backup) { - EXPECT_EQ(MakeTimestamp(backup->expire_time()).value(), expire_time); - EXPECT_EQ(MakeTimestamp(backup->version_time()).value(), version_time); - EXPECT_GT(MakeTimestamp(backup->create_time()).value(), version_time); - - Database rdb(in, spanner_testing::RandomDatabaseName(generator_)); - auto restored = - database_admin_client_.RestoreDatabase(rdb, *backup).get(); - EXPECT_THAT(restored, IsOk()); - if (restored) { - auto const& restore_info = restored->restore_info(); - EXPECT_EQ(restore_info.source_type(), - google::spanner::admin::database::v1::BACKUP); - if (restore_info.source_type() == - google::spanner::admin::database::v1::BACKUP) { - auto const& backup_info = restore_info.backup_info(); - EXPECT_EQ(backup_info.backup(), backup->name()); - EXPECT_EQ(MakeTimestamp(backup_info.version_time()).value(), - version_time); - EXPECT_LT(MakeTimestamp(backup_info.version_time()).value(), - MakeTimestamp(backup_info.create_time()).value()); - EXPECT_EQ(backup_info.source_database(), db.FullName()); - } - auto database = database_admin_client_.GetDatabase(rdb); - EXPECT_THAT(database, IsOk()); - if (database) { - auto const& restore_info = database->restore_info(); - EXPECT_EQ(restore_info.source_type(), - google::spanner::admin::database::v1::BACKUP); - if (restore_info.source_type() == - google::spanner::admin::database::v1::BACKUP) { - auto const& backup_info = restore_info.backup_info(); - EXPECT_EQ(MakeTimestamp(backup_info.version_time()).value(), - version_time); - } - } - bool found_restored = false; - for (auto const& database : database_admin_client_.ListDatabases(in)) { - EXPECT_THAT(database, IsOk()); - if (!database) continue; - if (database->name() == rdb.FullName()) { - EXPECT_FALSE(found_restored); - found_restored = true; - auto const& restore_info = database->restore_info(); - EXPECT_EQ(restore_info.source_type(), - google::spanner::admin::database::v1::BACKUP); - if (restore_info.source_type() == - google::spanner::admin::database::v1::BACKUP) { - auto const& backup_info = restore_info.backup_info(); - EXPECT_EQ(MakeTimestamp(backup_info.version_time()).value(), - version_time); - } - } - } - EXPECT_TRUE(found_restored); - { - spanner::Client client(spanner::MakeConnection(rdb)); - auto keys = spanner::KeySet().AddKey(spanner::MakeKey(version_key)); - auto rows = client.Read("Counters", std::move(keys), {"Value"}); - using RowType = std::tuple; - auto row = spanner::GetSingularRow(spanner::StreamOf(rows)); - EXPECT_THAT(row, IsOk()); - if (row) { - // Expect to see the state of the table at version_time. - EXPECT_EQ(std::get<0>(*std::move(row)), 0); - } - } - EXPECT_STATUS_OK(database_admin_client_.DropDatabase(rdb)); - } - - EXPECT_STATUS_OK(database_admin_client_.DeleteBackup(*backup)); - } - } - - EXPECT_STATUS_OK(database_admin_client_.DropDatabase(db)); -} - -/// @test Verify creating a backup with an expired version_time fails. -TEST_F(BackupExtraIntegrationTest, BackupWithExpiredVersionTime) { - auto instance_id = spanner_testing::PickRandomInstance( - generator_, ProjectId(), "NOT labels.edition:enterprise"); - ASSERT_THAT(instance_id, IsOk()); - Instance in(ProjectId(), *instance_id); - Database db(in, spanner_testing::RandomDatabaseName(generator_)); - - std::vector extra_statements = { - absl::StrCat("ALTER DATABASE `", db.database_id(), - "` SET OPTIONS (version_retention_period='1h')")}; - auto database = - database_admin_client_.CreateDatabase(db, extra_statements).get(); - if (Emulator()) { // version_retention_period - EXPECT_THAT(database, Not(IsOk())); - return; - } - ASSERT_THAT(database, IsOk()); - - auto create_time = - MakeTimestamp(database->create_time()).value().get().value(); - // version_time too far in the past (outside the version_retention_period). - auto version_time = MakeTimestamp(create_time - absl::Hours(2)).value(); - auto expire_time = MakeTimestamp(create_time + absl::Hours(12)).value(); - auto backup = - database_admin_client_ - .CreateBackup(db, db.database_id(), expire_time, version_time) - .get(); - EXPECT_THAT(backup, StatusIs(StatusCode::kInvalidArgument, - HasSubstr("earlier than the creation time"))); - if (backup) { - EXPECT_STATUS_OK(database_admin_client_.DeleteBackup(*backup)); - } - - EXPECT_STATUS_OK(database_admin_client_.DropDatabase(db)); -} - -/// @test Verify creating a backup with a future version_time fails. -TEST_F(BackupExtraIntegrationTest, BackupWithFutureVersionTime) { - auto instance_id = spanner_testing::PickRandomInstance( - generator_, ProjectId(), "NOT labels.edition:enterprise"); - ASSERT_THAT(instance_id, IsOk()); - Instance in(ProjectId(), *instance_id); - Database db(in, spanner_testing::RandomDatabaseName(generator_)); - - std::vector extra_statements = { - absl::StrCat("ALTER DATABASE `", db.database_id(), - "` SET OPTIONS (version_retention_period='1h')")}; - auto database = - database_admin_client_.CreateDatabase(db, extra_statements).get(); - if (Emulator()) { // version_retention_period - EXPECT_THAT(database, Not(IsOk())); - return; - } - ASSERT_THAT(database, IsOk()); - - auto create_time = - MakeTimestamp(database->create_time()).value().get().value(); - // version_time in the future. - auto version_time = MakeTimestamp(create_time + absl::Hours(2)).value(); - auto expire_time = MakeTimestamp(create_time + absl::Hours(12)).value(); - auto backup = - database_admin_client_ - .CreateBackup(db, db.database_id(), expire_time, version_time) - .get(); - EXPECT_THAT(backup, StatusIs(StatusCode::kInvalidArgument, - HasSubstr("with a future version time"))); - if (backup) { - EXPECT_STATUS_OK(database_admin_client_.DeleteBackup(*backup)); - } - - EXPECT_STATUS_OK(database_admin_client_.DropDatabase(db)); -} - -/// @test Tests backup/restore with Customer Managed Encryption Key -TEST_F(BackupExtraIntegrationTest, BackupRestoreWithCMEK) { - if (!RunSlowBackupTests() || Emulator()) GTEST_SKIP(); - - auto instance_id = spanner_testing::PickRandomInstance( - generator_, ProjectId(), - "(labels.restore-database-partition:legacy-extra OR" - " labels.restore-database-partition:all)" - " AND NOT name:/instances/test-instance-mr-"); - ASSERT_STATUS_OK(instance_id); - Instance in(ProjectId(), *instance_id); - - auto location = spanner_testing::InstanceLocation(in); - ASSERT_STATUS_OK(location); - KmsKeyName encryption_key(in.project_id(), *location, kKeyRing, kKeyName); - auto encryption_config = CustomerManagedEncryption(encryption_key); - - Database db(in, spanner_testing::RandomDatabaseName(generator_)); - auto database = - database_admin_client_ - .CreateDatabase(db, /*extra_statements=*/{}, encryption_config) - .get(); - ASSERT_STATUS_OK(database); - EXPECT_TRUE(database->has_encryption_config()); - if (database->has_encryption_config()) { - EXPECT_EQ(database->encryption_config().kms_key_name(), - encryption_key.FullName()); - } - EXPECT_THAT(database->encryption_info(), IsEmpty()); - - auto database_get = database_admin_client_.GetDatabase(db); - ASSERT_STATUS_OK(database_get); - EXPECT_EQ(database_get->name(), database->name()); - EXPECT_TRUE(database_get->has_encryption_config()); - if (database_get->has_encryption_config()) { - EXPECT_EQ(database_get->encryption_config().kms_key_name(), - encryption_key.FullName()); - } - - auto create_time = - MakeTimestamp(database->create_time()).value().get().value(); - auto expire_time = MakeTimestamp(create_time + absl::Hours(12)).value(); - auto backup = database_admin_client_ - .CreateBackup(db, db.database_id(), expire_time, - absl::nullopt, encryption_config) - .get(); - { - // TODO(#8616): Remove this when we know how to deal with the issue. - auto matcher = testing_util::StatusIs( - StatusCode::kDeadlineExceeded, - testing::HasSubstr("terminated by polling policy")); - testing::StringMatchResultListener listener; - if (matcher.impl().MatchAndExplain(backup, &listener)) { - // The backup is still in progress (and may eventually complete), - // and we can't drop the database while it has pending backups, so - // we simply abandon them, to be cleaned up offline. - GTEST_SKIP(); - } - } - ASSERT_STATUS_OK(backup); - EXPECT_TRUE(backup->has_encryption_info()); - if (backup->has_encryption_info()) { - EXPECT_EQ(backup->encryption_info().encryption_type(), - google::spanner::admin::database::v1::EncryptionInfo:: - CUSTOMER_MANAGED_ENCRYPTION); - EXPECT_THAT(backup->encryption_info().kms_key_version(), - HasSubstr(encryption_key.FullName() + "/cryptoKeyVersions/")); - } - - EXPECT_STATUS_OK(database_admin_client_.DropDatabase(db)); - - Backup backup_name(in, db.database_id()); - auto backup_get = database_admin_client_.GetBackup(backup_name); - ASSERT_STATUS_OK(backup_get); - EXPECT_EQ(backup_get->name(), backup->name()); - EXPECT_TRUE(backup_get->has_encryption_info()); - if (backup_get->has_encryption_info()) { - EXPECT_EQ(backup_get->encryption_info().encryption_type(), - google::spanner::admin::database::v1::EncryptionInfo:: - CUSTOMER_MANAGED_ENCRYPTION); - EXPECT_THAT(backup_get->encryption_info().kms_key_version(), - HasSubstr(encryption_key.FullName() + "/cryptoKeyVersions/")); - } - - Database restore_db(in, spanner_testing::RandomDatabaseName(generator_)); - auto restored_database = - database_admin_client_ - .RestoreDatabase(restore_db, backup_name, encryption_config) - .get(); - ASSERT_STATUS_OK(restored_database); - EXPECT_TRUE(restored_database->has_encryption_config()); - if (restored_database->has_encryption_config()) { - EXPECT_EQ(restored_database->encryption_config().kms_key_name(), - encryption_key.FullName()); - } - - auto restored_get = database_admin_client_.GetDatabase(restore_db); - ASSERT_STATUS_OK(restored_get); - EXPECT_EQ(restored_get->name(), restored_database->name()); - EXPECT_TRUE(restored_get->has_encryption_config()); - if (restored_get->has_encryption_config()) { - EXPECT_EQ(restored_get->encryption_config().kms_key_name(), - encryption_key.FullName()); - } - - EXPECT_STATUS_OK(database_admin_client_.DropDatabase(restore_db)); - - std::ostringstream backup_filter; - backup_filter << "expire_time <= \"" << expire_time << "\""; - bool found = false; - for (auto const& b : - database_admin_client_.ListBackups(in, backup_filter.str())) { - if (b->name() == backup->name()) { - found = true; - EXPECT_TRUE(b->has_encryption_info()); - if (b->has_encryption_info()) { - EXPECT_EQ(b->encryption_info().encryption_type(), - google::spanner::admin::database::v1::EncryptionInfo:: - CUSTOMER_MANAGED_ENCRYPTION); - EXPECT_THAT( - b->encryption_info().kms_key_version(), - HasSubstr(encryption_key.FullName() + "/cryptoKeyVersions/")); - } - } - } - EXPECT_TRUE(found); - - EXPECT_STATUS_OK(database_admin_client_.DeleteBackup(*backup)); -} - -} // namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace spanner -} // namespace cloud -} // namespace google diff --git a/google/cloud/spanner/integration_tests/backup_integration_test.cc b/google/cloud/spanner/integration_tests/backup_integration_test.cc deleted file mode 100644 index 36c147417a22b..0000000000000 --- a/google/cloud/spanner/integration_tests/backup_integration_test.cc +++ /dev/null @@ -1,215 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// TODO(#7356): Remove this file after the deprecation period expires -#include "google/cloud/internal/disable_deprecation_warnings.inc" -#include "google/cloud/spanner/client.h" -#include "google/cloud/spanner/database_admin_client.h" -#include "google/cloud/spanner/instance_admin_client.h" -#include "google/cloud/spanner/testing/instance_location.h" -#include "google/cloud/spanner/testing/pick_random_instance.h" -#include "google/cloud/spanner/testing/random_database_name.h" -#include "google/cloud/spanner/timestamp.h" -#include "google/cloud/internal/getenv.h" -#include "google/cloud/internal/random.h" -#include "google/cloud/testing_util/integration_test.h" -#include "google/cloud/testing_util/status_matchers.h" -#include "absl/strings/match.h" -#include "absl/time/time.h" -#include -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace spanner { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -std::string const& ProjectId() { - static std::string project_id = - google::cloud::internal::GetEnv("GOOGLE_CLOUD_PROJECT").value_or(""); - return project_id; -} - -bool RunSlowBackupTests() { - static bool run_slow_backup_tests = - absl::StrContains(google::cloud::internal::GetEnv( - "GOOGLE_CLOUD_CPP_SPANNER_SLOW_INTEGRATION_TESTS") - .value_or(""), - "backup"); - return run_slow_backup_tests; -} - -bool Emulator() { - static bool emulator = - google::cloud::internal::GetEnv("SPANNER_EMULATOR_HOST").has_value(); - return emulator; -} - -class BackupIntegrationTest - : public ::google::cloud::testing_util::IntegrationTest { - public: - BackupIntegrationTest() - : generator_(google::cloud::internal::MakeDefaultPRNG()), - database_admin_client_(MakeDatabaseAdminConnection( - ConnectionOptions{}, - LimitedTimeRetryPolicy(std::chrono::minutes(60)).clone(), - ExponentialBackoffPolicy(std::chrono::seconds(1), - std::chrono::minutes(1), 2.0) - .clone(), - GenericPollingPolicy<>( - LimitedTimeRetryPolicy(std::chrono::minutes(90)), - ExponentialBackoffPolicy(std::chrono::seconds(1), - std::chrono::minutes(1), 2.0)) - .clone())) {} - - protected: - google::cloud::internal::DefaultPRNG generator_; - DatabaseAdminClient database_admin_client_; -}; - -/// @test Backup related integration tests. -TEST_F(BackupIntegrationTest, BackupRestore) { - if (!RunSlowBackupTests() || Emulator()) GTEST_SKIP(); - - auto instance_id = spanner_testing::PickRandomInstance( - generator_, ProjectId(), - "(labels.restore-database-partition:legacy-core OR" - " labels.restore-database-partition:all)"); - ASSERT_STATUS_OK(instance_id); - Instance in(ProjectId(), *instance_id); - Database db(in, spanner_testing::RandomDatabaseName(generator_)); - - auto database = database_admin_client_.CreateDatabase(db).get(); - ASSERT_STATUS_OK(database); - auto create_time = - MakeTimestamp(database->create_time()).value().get().value(); - - auto expire_time = MakeTimestamp(create_time + absl::Hours(12)).value(); - auto backup_future = - database_admin_client_.CreateBackup(db, db.database_id(), expire_time); - - // Cancel the CreateBackup operation. - backup_future.cancel(); - auto cancelled_backup = backup_future.get(); - if (cancelled_backup) { - EXPECT_STATUS_OK(database_admin_client_.DeleteBackup(*cancelled_backup)); - } - - // Then create a Backup without cancelling - backup_future = - database_admin_client_.CreateBackup(db, db.database_id(), expire_time); - - // List the backup operations - std::ostringstream backup_op_filter; - backup_op_filter << "(metadata.@type=type.googleapis.com/" - << "google.spanner.admin.database.v1.CreateBackupMetadata)" - << " AND (metadata.database=" << db.FullName() << ")"; - std::vector db_names; - for (auto const& operation : database_admin_client_.ListBackupOperations( - in, backup_op_filter.str())) { - if (!operation) break; - google::spanner::admin::database::v1::CreateBackupMetadata metadata; - operation->metadata().UnpackTo(&metadata); - db_names.push_back(metadata.database()); - } - EXPECT_LE(1, std::count(db_names.begin(), db_names.end(), database->name())) - << "Database " << database->name() - << " not found in the backup operation list."; - - auto backup = backup_future.get(); - { - // TODO(#8616): Remove this when we know how to deal with the issue. - auto matcher = testing_util::StatusIs( - StatusCode::kDeadlineExceeded, - testing::HasSubstr("terminated by polling policy")); - testing::StringMatchResultListener listener; - if (matcher.impl().MatchAndExplain(backup, &listener)) { - // The backup is still in progress (and may eventually complete), - // and we can't drop the database while it has pending backups, so - // we simply abandon them, to be cleaned up offline. - GTEST_SKIP(); - } - } - ASSERT_STATUS_OK(backup); - EXPECT_EQ(MakeTimestamp(backup->expire_time()).value(), expire_time); - // Verify that the version_time is the same as the creation_time. - EXPECT_EQ(MakeTimestamp(backup->version_time()).value(), - MakeTimestamp(backup->create_time()).value()); - - EXPECT_STATUS_OK(database_admin_client_.DropDatabase(db)); - - Backup backup_name(in, db.database_id()); - auto backup_get = database_admin_client_.GetBackup(backup_name); - EXPECT_STATUS_OK(backup_get); - if (backup_get) { - EXPECT_EQ(backup_get->name(), backup->name()); - } - - Database restore_db(in, spanner_testing::RandomDatabaseName(generator_)); - auto restored_database = - database_admin_client_.RestoreDatabase(restore_db, backup_name).get(); - EXPECT_STATUS_OK(restored_database); - if (restored_database) { - // List the database operations - std::ostringstream db_op_filter; - db_op_filter - << "(metadata.@type:type.googleapis.com/" - << "google.spanner.admin.database.v1.OptimizeRestoredDatabaseMetadata)"; - std::vector restored_db_names; - for (auto const& operation : database_admin_client_.ListDatabaseOperations( - in, db_op_filter.str())) { - if (!operation) break; - google::spanner::admin::database::v1::OptimizeRestoredDatabaseMetadata md; - operation->metadata().UnpackTo(&md); - restored_db_names.push_back(md.name()); - } - EXPECT_LE(1, std::count(restored_db_names.begin(), restored_db_names.end(), - restored_database->name())) - << "Backup " << restored_database->name() - << " not found in the OptimizeRestoredDatabase operation list."; - EXPECT_STATUS_OK(database_admin_client_.DropDatabase(restore_db)); - } - - std::ostringstream backup_filter; - backup_filter << "expire_time <= \"" << expire_time << "\""; - std::vector backup_names; - for (auto const& b : - database_admin_client_.ListBackups(in, backup_filter.str())) { - backup_names.push_back(b->name()); - } - EXPECT_LE( - 1, std::count(backup_names.begin(), backup_names.end(), backup->name())) - << "Backup " << backup->name() << " not found in the backup list."; - - auto new_expire_time = MakeTimestamp(create_time + absl::Hours(16)).value(); - auto updated_backup = - database_admin_client_.UpdateBackupExpireTime(*backup, new_expire_time); - EXPECT_STATUS_OK(updated_backup); - if (updated_backup) { - EXPECT_EQ(MakeTimestamp(updated_backup->expire_time()).value(), - new_expire_time); - } - - EXPECT_STATUS_OK(database_admin_client_.DeleteBackup(*backup)); -} - -} // namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace spanner -} // namespace cloud -} // namespace google diff --git a/google/cloud/spanner/integration_tests/client_integration_test.cc b/google/cloud/spanner/integration_tests/client_integration_test.cc index 2c114ca56f18b..f21bbec7a636a 100644 --- a/google/cloud/spanner/integration_tests/client_integration_test.cc +++ b/google/cloud/spanner/integration_tests/client_integration_test.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/admin/database_admin_client.h" #include "google/cloud/spanner/client.h" #include "google/cloud/spanner/database.h" @@ -1764,15 +1764,9 @@ TEST_F(ClientIntegrationTest, MakeConnectionOverloads) { .clone()); } -/// @test Verify the backwards compatibility `v1` namespace still exists. -TEST_F(ClientIntegrationTest, BackwardsCompatibility) { - auto connection = ::google::cloud::spanner::v1::MakeConnection(GetDatabase()); - EXPECT_THAT(connection, NotNull()); - ASSERT_NO_FATAL_FAILURE(Client(std::move(connection))); -} - } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner } // namespace cloud } // namespace google +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/integration_tests/client_stress_test.cc b/google/cloud/spanner/integration_tests/client_stress_test.cc index 472b71ec3432d..eab83e81d0b6f 100644 --- a/google/cloud/spanner/integration_tests/client_stress_test.cc +++ b/google/cloud/spanner/integration_tests/client_stress_test.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/client.h" #include "google/cloud/spanner/database.h" #include "google/cloud/spanner/testing/database_integration_test.h" @@ -148,6 +148,8 @@ TEST_F(ClientStressTest, ParseArgs) { /// @test Stress test the library using ExecuteQuery calls. TEST_F(ClientStressTest, UpsertAndSelect) { + // TODO(#15939): Update emulator and enable this test. + if (UsingEmulator()) GTEST_SKIP(); int const task_count = TaskCount(); auto select_task = [](Client client) { @@ -216,6 +218,8 @@ TEST_F(ClientStressTest, UpsertAndSelect) { /// @test Stress test the library using Read calls. TEST_F(ClientStressTest, UpsertAndRead) { + // TODO(#15939): Update emulator and enable this test. + if (UsingEmulator()) GTEST_SKIP(); int const task_count = TaskCount(); auto read_task = [](Client client) { @@ -302,3 +306,4 @@ int main(int argc, char* argv[]) { return RUN_ALL_TESTS(); } +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/integration_tests/data_types_integration_test.cc b/google/cloud/spanner/integration_tests/data_types_integration_test.cc index 4df1d1e2bcb51..5847543baf621 100644 --- a/google/cloud/spanner/integration_tests/data_types_integration_test.cc +++ b/google/cloud/spanner/integration_tests/data_types_integration_test.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/admin/database_admin_client.h" #include "google/cloud/spanner/client.h" #include "google/cloud/spanner/database.h" @@ -20,7 +20,7 @@ #include "google/cloud/spanner/timestamp.h" #include "google/cloud/testing_util/status_matchers.h" #include "absl/time/time.h" -#include +#include "protos/google/cloud/spanner/testing/singer.pb.h" #include #include #include @@ -1021,3 +1021,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner } // namespace cloud } // namespace google +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/integration_tests/database_admin_integration_test.cc b/google/cloud/spanner/integration_tests/database_admin_integration_test.cc deleted file mode 100644 index eef1afb441532..0000000000000 --- a/google/cloud/spanner/integration_tests/database_admin_integration_test.cc +++ /dev/null @@ -1,495 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// TODO(#7356): Remove this file after the deprecation period expires -#include "google/cloud/internal/disable_deprecation_warnings.inc" -#include "google/cloud/spanner/database.h" -#include "google/cloud/spanner/database_admin_client.h" -#include "google/cloud/spanner/testing/instance_location.h" -#include "google/cloud/spanner/testing/pick_random_instance.h" -#include "google/cloud/spanner/testing/random_database_name.h" -#include "google/cloud/spanner/timestamp.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/getenv.h" -#include "google/cloud/internal/random.h" -#include "google/cloud/testing_util/integration_test.h" -#include "google/cloud/testing_util/is_proto_equal.h" -#include "google/cloud/testing_util/status_matchers.h" -#include - -namespace google { -namespace cloud { -namespace spanner { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -using ::google::cloud::testing_util::IsOk; -using ::google::cloud::testing_util::IsProtoEqual; -using ::google::cloud::testing_util::StatusIs; -using ::testing::AllOf; -using ::testing::AnyOf; -using ::testing::Contains; -using ::testing::ContainsRegex; -using ::testing::EndsWith; -using ::testing::HasSubstr; -using ::testing::IsEmpty; -using ::testing::Not; -using ::testing::NotNull; - -// Constants used to identify the encryption key. -auto constexpr kKeyRing = "spanner-cmek"; -auto constexpr kKeyName = "spanner-cmek-test-key"; - -class DatabaseAdminClientTest - : public ::google::cloud::testing_util::IntegrationTest { - protected: - // We can't use ASSERT* in the constructor, so defer initializing `instance_` - // and `database_` until `SetUp()`. - DatabaseAdminClientTest() - : instance_("placeholder", "placeholder"), - database_(instance_, "placeholder") {} - - void SetUp() override { - using ::google::cloud::internal::GetEnv; - emulator_ = GetEnv("SPANNER_EMULATOR_HOST").has_value(); - auto project_id = GetEnv("GOOGLE_CLOUD_PROJECT").value_or(""); - ASSERT_FALSE(project_id.empty()); - - auto generator = google::cloud::internal::MakeDefaultPRNG(); - - auto instance_id = spanner_testing::PickRandomInstance( - generator, project_id, "NOT name:/instances/test-instance-mr-"); - ASSERT_STATUS_OK(instance_id); - instance_ = Instance(project_id, *instance_id); - - auto location = spanner_testing::InstanceLocation(instance_); - if (emulator_) { - if (!location) location = "emulator"; - } else { - ASSERT_STATUS_OK(location); - } - location_ = *std::move(location); - - database_ = - Database(instance_, spanner_testing::RandomDatabaseName(generator)); - - test_iam_service_account_ = - GetEnv("GOOGLE_CLOUD_CPP_SPANNER_TEST_SERVICE_ACCOUNT").value_or(""); - ASSERT_TRUE(emulator_ || !test_iam_service_account_.empty()); - } - - // Does `database_` exist in `instance_`? - bool DatabaseExists() { - auto full_name = database_.FullName(); - for (auto const& database : client_.ListDatabases(instance_)) { - EXPECT_STATUS_OK(database); - if (!database) break; - if (database->name() == full_name) return true; - } - return false; - }; - - Instance instance_; - std::string location_; - Database database_; - DatabaseAdminClient client_; - bool emulator_; - std::string test_iam_service_account_; -}; - -/// @test Verify the basic CRUD operations for databases work. -TEST_F(DatabaseAdminClientTest, DatabaseBasicCRUD) { - // We test Client::ListDatabases() by verifying that (a) it does not return - // a randomly generated database name before we create a database with that - // name, (b) it *does* return that database name once created, and (c) it no - // longer returns that name once the database is dropped. Implicitly that - // also tests that Client::DropDatabase() and client::CreateDatabase() do - // something, which is nice. - EXPECT_FALSE(DatabaseExists()) << "Database " << database_ - << " already exists, this is unexpected as " - "the database id is selected at random."; - - auto database = - client_.CreateDatabase(database_, /*extra_statements=*/{}).get(); - ASSERT_STATUS_OK(database); - EXPECT_THAT(database->name(), EndsWith(database_.database_id())); - EXPECT_FALSE(database->has_encryption_config()); - EXPECT_THAT(database->encryption_info(), IsEmpty()); - - auto get_result = client_.GetDatabase(database_); - ASSERT_STATUS_OK(get_result); - EXPECT_EQ(database->name(), get_result->name()); - EXPECT_FALSE(get_result->has_encryption_config()); - if (emulator_) { - EXPECT_THAT(get_result->encryption_info(), IsEmpty()); - } else { - EXPECT_EQ(get_result->encryption_info().size(), 1); - if (!get_result->encryption_info().empty()) { - EXPECT_EQ(get_result->encryption_info()[0].encryption_type(), - google::spanner::admin::database::v1::EncryptionInfo:: - GOOGLE_DEFAULT_ENCRYPTION); - } - } - - if (!emulator_) { - auto current_policy = client_.GetIamPolicy(database_); - ASSERT_STATUS_OK(current_policy); - EXPECT_EQ(0, current_policy->bindings_size()); - - std::string const reader_role = "roles/spanner.databaseReader"; - std::string const writer_role = "roles/spanner.databaseUser"; - std::string const expected_member = - "serviceAccount:" + test_iam_service_account_; - auto& binding = *current_policy->add_bindings(); - binding.set_role(reader_role); - *binding.add_members() = expected_member; - - auto updated_policy = client_.SetIamPolicy(database_, *current_policy); - ASSERT_THAT(updated_policy, AnyOf(IsOk(), StatusIs(StatusCode::kAborted))); - if (updated_policy) { - EXPECT_EQ(1, updated_policy->bindings_size()); - ASSERT_EQ(reader_role, updated_policy->bindings().Get(0).role()); - ASSERT_EQ(1, updated_policy->bindings().Get(0).members().size()); - ASSERT_EQ(expected_member, - updated_policy->bindings().Get(0).members().Get(0)); - } - - // Perform a different update using the OCC loop API: - updated_policy = client_.SetIamPolicy( - database_, [this, &writer_role](google::iam::v1::Policy current) { - std::string const expected_member = - "serviceAccount:" + test_iam_service_account_; - auto& binding = *current.add_bindings(); - binding.set_role(writer_role); - *binding.add_members() = expected_member; - return current; - }); - ASSERT_STATUS_OK(updated_policy); - EXPECT_EQ(2, updated_policy->bindings_size()); - ASSERT_EQ(writer_role, updated_policy->bindings().Get(1).role()); - ASSERT_EQ(1, updated_policy->bindings().Get(1).members().size()); - ASSERT_EQ(expected_member, - updated_policy->bindings().Get(1).members().Get(0)); - - // Fetch the Iam Policy again. - current_policy = client_.GetIamPolicy(database_); - ASSERT_STATUS_OK(current_policy); - EXPECT_THAT(*updated_policy, IsProtoEqual(*current_policy)); - - auto test_iam_permission_result = - client_.TestIamPermissions(database_, {"spanner.databases.read"}); - ASSERT_STATUS_OK(test_iam_permission_result); - ASSERT_EQ(1, test_iam_permission_result->permissions_size()); - ASSERT_EQ("spanner.databases.read", - test_iam_permission_result->permissions(0)); - } - - auto get_ddl_result = client_.GetDatabaseDdl(database_); - ASSERT_STATUS_OK(get_ddl_result); - EXPECT_EQ(0, get_ddl_result->statements_size()); - - std::vector statements; - if (!emulator_) { // version_retention_period - statements.push_back("ALTER DATABASE `" + database_.database_id() + - "` SET OPTIONS (version_retention_period='7d')"); - } - statements.emplace_back(R"""( - CREATE TABLE Singers ( - SingerId INT64 NOT NULL, - FirstName STRING(1024), - LastName STRING(1024), - SingerInfo BYTES(MAX), - SingerDetails JSON - ) PRIMARY KEY (SingerId) - )"""); - auto metadata = client_.UpdateDatabase(database_, statements).get(); - ASSERT_STATUS_OK(metadata); - EXPECT_THAT(metadata->database(), EndsWith(database_.database_id())); - EXPECT_EQ(statements.size(), metadata->statements_size()); - EXPECT_EQ(statements.size(), metadata->commit_timestamps_size()); - if (metadata->statements_size() >= 1) { - EXPECT_THAT(metadata->statements(), Contains(HasSubstr("CREATE TABLE"))); - } - if (metadata->statements_size() >= 2) { - EXPECT_THAT(metadata->statements(), Contains(HasSubstr("ALTER DATABASE"))); - } - EXPECT_FALSE(metadata->throttled()); - - // Verify that a JSON column cannot be used as an index. - statements.clear(); - statements.emplace_back(R"""( - CREATE INDEX SingersByDetail - ON Singers(SingerDetails) - )"""); - metadata = client_.UpdateDatabase(database_, statements).get(); - EXPECT_THAT(metadata, StatusIs(StatusCode::kFailedPrecondition, - HasSubstr("SingersByDetail"))); - - // Verify that a JSON column cannot be used as a primary key. - statements.clear(); - statements.emplace_back(R"""( - CREATE TABLE JsonKey ( - Key JSON NOT NULL - ) PRIMARY KEY (Key) - )"""); - metadata = client_.UpdateDatabase(database_, statements).get(); - EXPECT_THAT(metadata, StatusIs(StatusCode::kInvalidArgument, - AllOf(HasSubstr("Key has type JSON"), - HasSubstr("part of the primary key")))); - - EXPECT_TRUE(DatabaseExists()) << "Database " << database_; - auto drop_status = client_.DropDatabase(database_); - EXPECT_STATUS_OK(drop_status); - EXPECT_FALSE(DatabaseExists()) << "Database " << database_; -} - -/// @test Verify setting version_retention_period via CreateDatabase(). -TEST_F(DatabaseAdminClientTest, VersionRetentionPeriodCreate) { - // Set the version_retention_period via CreateDatabase(). - auto database = - client_ - .CreateDatabase( - database_, - {absl::StrCat("ALTER DATABASE `", database_.database_id(), - "` SET OPTIONS (version_retention_period='7d')")}) - .get(); - if (emulator_) { // version_retention_period - EXPECT_THAT(database, Not(IsOk())); - GTEST_SKIP(); - } - ASSERT_THAT(database, IsOk()); - EXPECT_EQ(database_.FullName(), database->name()); - EXPECT_EQ("7d", database->version_retention_period()); - - // Verify that version_retention_period is returned from GetDatabase(). - auto get = client_.GetDatabase(database_); - ASSERT_THAT(get, IsOk()); - EXPECT_EQ(database->name(), get->name()); - EXPECT_EQ("7d", get->version_retention_period()); - - // Verify that earliest_version_time doesn't go past database create_time. - EXPECT_TRUE(get->has_create_time()); - EXPECT_TRUE(get->has_earliest_version_time()); - EXPECT_LE(MakeTimestamp(get->create_time()).value(), - MakeTimestamp(get->earliest_version_time()).value()); - - auto drop = client_.DropDatabase(database_); - EXPECT_THAT(drop, IsOk()); -} - -/// @test Verify setting bad version_retention_period via CreateDatabase(). -TEST_F(DatabaseAdminClientTest, VersionRetentionPeriodCreateFailure) { - // Set an invalid version_retention_period (zero) via CreateDatabase(), - // and verify that an error is returned. - auto database = - client_ - .CreateDatabase( - database_, - {absl::StrCat("ALTER DATABASE `", database_.database_id(), - "` SET OPTIONS (version_retention_period='0')")}) - .get(); - EXPECT_THAT(database, Not(IsOk())); -} - -/// @test Verify setting version_retention_period via UpdateDatabase(). -TEST_F(DatabaseAdminClientTest, VersionRetentionPeriodUpdate) { - // Create the database. - auto database = - client_.CreateDatabase(database_, /*extra_statements=*/{}).get(); - ASSERT_THAT(database, IsOk()); - EXPECT_EQ(database_.FullName(), database->name()); - if (emulator_) { // version_retention_period - EXPECT_EQ("", database->version_retention_period()); - } else { - EXPECT_NE("", database->version_retention_period()); // default value - } - - // Set the version_retention_period via UpdateDatabase(). - auto update = - client_ - .UpdateDatabase( - database_, - {absl::StrCat("ALTER DATABASE `", database_.database_id(), - "` SET OPTIONS (version_retention_period='7d')")}) - .get(); - if (emulator_) { // version_retention_period - EXPECT_THAT(update, Not(IsOk())); - } else { - ASSERT_THAT(update, IsOk()); - EXPECT_EQ(database->name(), update->database()); - EXPECT_THAT(update->statements(), - Contains(ContainsRegex("version_retention_period *= *'7d'"))); - } - - // Verify that version_retention_period is returned from GetDatabase(). - auto get = client_.GetDatabase(database_); - ASSERT_THAT(get, IsOk()); - EXPECT_EQ(database->name(), get->name()); - if (emulator_) { // version_retention_period - EXPECT_EQ("", get->version_retention_period()); - } else { - EXPECT_EQ("7d", get->version_retention_period()); - } - - // Verify that version_retention_period is returned via ListDatabases(). - auto list_db = [&] { - for (auto const& db : client_.ListDatabases(instance_)) { - if (db && db->name() == database_.FullName()) return db; - } - return StatusOr{ - Status{StatusCode::kNotFound, "disappeared"}}; - }(); - ASSERT_THAT(list_db, IsOk()); - EXPECT_EQ(database->name(), list_db->name()); - if (emulator_) { // version_retention_period - EXPECT_EQ("", list_db->version_retention_period()); - } else { - EXPECT_EQ("7d", list_db->version_retention_period()); - } - - // Verify that version_retention_period is returned from GetDatabaseDdl(). - auto ddl = client_.GetDatabaseDdl(database_); - ASSERT_THAT(ddl, IsOk()); - if (emulator_) { // version_retention_period - } else { - EXPECT_THAT(ddl->statements(), - Contains(ContainsRegex("version_retention_period *= *'7d'"))); - } - - auto drop = client_.DropDatabase(database_); - EXPECT_THAT(drop, IsOk()); -} - -/// @test Verify setting bad version_retention_period via UpdateDatabase(). -TEST_F(DatabaseAdminClientTest, VersionRetentionPeriodUpdateFailure) { - // Create the database. - auto database = - client_.CreateDatabase(database_, /*extra_statements=*/{}).get(); - ASSERT_THAT(database, IsOk()); - EXPECT_EQ(database_.FullName(), database->name()); - if (emulator_) { // version_retention_period - EXPECT_EQ("", database->version_retention_period()); - } else { - EXPECT_NE("", database->version_retention_period()); // default value - } - - auto get0 = client_.GetDatabase(database_); - ASSERT_THAT(get0, IsOk()); - EXPECT_EQ(database->name(), get0->name()); - if (emulator_) { // version_retention_period - EXPECT_EQ("", get0->version_retention_period()); - } else { - EXPECT_NE("", get0->version_retention_period()); // default value - } - - // Set an invalid version_retention_period (zero) via UpdateDatabase(), - // and verify that an error is returned. - auto update = - client_ - .UpdateDatabase( - database_, - {absl::StrCat("ALTER DATABASE `", database_.database_id(), - "` SET OPTIONS (version_retention_period='0')")}) - .get(); - EXPECT_THAT(update, Not(IsOk())); - - // Also verify that version_retention_period was NOT changed. - auto get = client_.GetDatabase(database_); - ASSERT_THAT(get, IsOk()); - EXPECT_EQ(database->name(), get->name()); - EXPECT_EQ(get0->version_retention_period(), get->version_retention_period()); - - auto drop = client_.DropDatabase(database_); - EXPECT_THAT(drop, IsOk()); -} - -// @test Verify we can create a database with an encryption key. -TEST_F(DatabaseAdminClientTest, CreateWithEncryptionKey) { - KmsKeyName encryption_key(instance_.project_id(), location_, kKeyRing, - kKeyName); - auto database = client_ - .CreateDatabase(database_, /*extra_statements=*/{}, - CustomerManagedEncryption(encryption_key)) - .get(); - ASSERT_STATUS_OK(database); - EXPECT_EQ(database->name(), database_.FullName()); - if (emulator_) { - EXPECT_FALSE(database->has_encryption_config()); - } else { - EXPECT_TRUE(database->has_encryption_config()); - if (database->has_encryption_config()) { - EXPECT_EQ(database->encryption_config().kms_key_name(), - encryption_key.FullName()); - } - - auto get_result = client_.GetDatabase(database_); - ASSERT_STATUS_OK(get_result); - EXPECT_EQ(database->name(), get_result->name()); - EXPECT_TRUE(get_result->has_encryption_config()); - if (get_result->has_encryption_config()) { - EXPECT_EQ(get_result->encryption_config().kms_key_name(), - encryption_key.FullName()); - } - - // Verify that encryption config is returned via ListDatabases(). - auto list_db = [&] { - for (auto const& db : client_.ListDatabases(database_.instance())) { - if (db && db->name() == database_.FullName()) return db; - } - return StatusOr{ - Status{StatusCode::kNotFound, "disappeared"}}; - }(); - ASSERT_THAT(list_db, IsOk()); - EXPECT_TRUE(list_db->has_encryption_config()); - if (list_db->has_encryption_config()) { - EXPECT_EQ(list_db->encryption_config().kms_key_name(), - encryption_key.FullName()); - } - } - - EXPECT_STATUS_OK(client_.DropDatabase(database_)); -} - -// @test Verify creating a database fails if a nonexistent encryption key is -// supplied. -TEST_F(DatabaseAdminClientTest, CreateWithNonexistentEncryptionKey) { - KmsKeyName nonexistent_encryption_key(instance_.project_id(), location_, - kKeyRing, "ceci-n-est-pas-une-cle"); - auto database = - client_ - .CreateDatabase(database_, /*extra_statements=*/{}, - CustomerManagedEncryption(nonexistent_encryption_key)) - .get(); - if (emulator_) { - EXPECT_THAT(database, IsOk()); - EXPECT_STATUS_OK(client_.DropDatabase(database_)); - } else { - EXPECT_THAT(database, - StatusIs(StatusCode::kFailedPrecondition, - HasSubstr("KMS Key provided is not usable"))); - } -} - -/// @test Verify the backwards compatibility `v1` namespace still exists. -TEST_F(DatabaseAdminClientTest, BackwardsCompatibility) { - auto connection = ::google::cloud::spanner::v1::MakeDatabaseAdminConnection(); - EXPECT_THAT(connection, NotNull()); - ASSERT_NO_FATAL_FAILURE(DatabaseAdminClient(std::move(connection))); -} - -} // namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace spanner -} // namespace cloud -} // namespace google diff --git a/google/cloud/spanner/integration_tests/instance_admin_integration_test.cc b/google/cloud/spanner/integration_tests/instance_admin_integration_test.cc deleted file mode 100644 index 5d09bc1eb1f6e..0000000000000 --- a/google/cloud/spanner/integration_tests/instance_admin_integration_test.cc +++ /dev/null @@ -1,275 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// TODO(#7356): Remove this file after the deprecation period expires -#include "google/cloud/internal/disable_deprecation_warnings.inc" -#include "google/cloud/spanner/create_instance_request_builder.h" -#include "google/cloud/spanner/instance_admin_client.h" -#include "google/cloud/spanner/testing/cleanup_stale_instances.h" -#include "google/cloud/spanner/testing/pick_instance_config.h" -#include "google/cloud/spanner/testing/random_instance_name.h" -#include "google/cloud/spanner/update_instance_request_builder.h" -#include "google/cloud/internal/getenv.h" -#include "google/cloud/internal/random.h" -#include "google/cloud/testing_util/integration_test.h" -#include "google/cloud/testing_util/status_matchers.h" -#include "absl/strings/match.h" -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace spanner { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -using ::google::cloud::testing_util::IsOk; -using ::google::cloud::testing_util::StatusIs; -using ::testing::AnyOf; -using ::testing::HasSubstr; -using ::testing::IsEmpty; -using ::testing::Not; -using ::testing::NotNull; -using ::testing::UnorderedElementsAre; - -std::string const& ProjectId() { - static std::string project_id = - internal::GetEnv("GOOGLE_CLOUD_PROJECT").value_or(""); - return project_id; -} - -std::string const& InstanceId() { - static std::string instance_id = - internal::GetEnv("GOOGLE_CLOUD_CPP_SPANNER_TEST_INSTANCE_ID") - .value_or(""); - return instance_id; -} - -bool RunSlowInstanceTests() { - static bool run_slow_instance_tests = absl::StrContains( - internal::GetEnv("GOOGLE_CLOUD_CPP_SPANNER_SLOW_INTEGRATION_TESTS") - .value_or(""), - "instance"); - return run_slow_instance_tests; -} - -bool Emulator() { - static bool emulator = internal::GetEnv("SPANNER_EMULATOR_HOST").has_value(); - return emulator; -} - -class CleanupStaleInstances : public ::testing::Environment { - public: - void SetUp() override { - spanner_admin::InstanceAdminClient instance_admin_client( - spanner_admin::MakeInstanceAdminConnection()); - spanner_admin::DatabaseAdminClient database_admin_client( - spanner_admin::MakeDatabaseAdminConnection()); - EXPECT_STATUS_OK(spanner_testing::CleanupStaleInstances( - Project(ProjectId()), std::move(instance_admin_client), - std::move(database_admin_client))); - } -}; - -::testing::Environment* const kCleanupEnv = - ::testing::AddGlobalTestEnvironment(new CleanupStaleInstances); - -class InstanceAdminClientTest - : public ::google::cloud::testing_util::IntegrationTest { - public: - InstanceAdminClientTest() - : generator_(internal::MakeDefaultPRNG()), - client_(MakeInstanceAdminConnection()) { - static_cast(kCleanupEnv); - } - - protected: - void SetUp() override { - if (Emulator()) { - // We expect test instances to exist when running against real services, - // but if we are running against the emulator we're happy to create one. - Instance in(ProjectId(), InstanceId()); - auto create_instance_request = - CreateInstanceRequestBuilder(in, - "projects/" + in.project_id() + - "/instanceConfigs/emulator-config") - .Build(); - auto instance = client_.CreateInstance(create_instance_request).get(); - if (!instance) { - ASSERT_THAT(instance, StatusIs(StatusCode::kAlreadyExists)); - } - } - } - - internal::DefaultPRNG generator_; - InstanceAdminClient client_; -}; - -/// @test Verify the basic read operations for instances work. -TEST_F(InstanceAdminClientTest, InstanceReadOperations) { - Instance in(ProjectId(), InstanceId()); - ASSERT_FALSE(in.project_id().empty()); - ASSERT_FALSE(in.instance_id().empty()); - - auto instance = client_.GetInstance(in); - ASSERT_STATUS_OK(instance); - EXPECT_EQ(instance->name(), in.FullName()); - EXPECT_NE(instance->node_count(), 0); - - auto instance_names = [&in, this]() mutable { - std::vector names; - for (auto const& instance : client_.ListInstances(in.project_id(), "")) { - EXPECT_STATUS_OK(instance); - if (!instance) break; - names.push_back(instance->name()); - } - return names; - }(); - EXPECT_EQ(1, std::count(instance_names.begin(), instance_names.end(), - instance->name())); -} - -/// @test Verify the basic CRUD operations for instances work. -TEST_F(InstanceAdminClientTest, InstanceCRUDOperations) { - if (!RunSlowInstanceTests()) { - GTEST_SKIP() << "skipping slow instance tests; set " - << "GOOGLE_CLOUD_CPP_SPANNER_SLOW_INTEGRATION_TESTS=instance" - << " to override"; - } - - std::string instance_id = spanner_testing::RandomInstanceName(generator_); - Instance in(ProjectId(), instance_id); - ASSERT_FALSE(in.project_id().empty()); - ASSERT_FALSE(in.instance_id().empty()); - - auto config_name = spanner_testing::PickInstanceConfig( - in.project(), generator_, - [](google::spanner::admin::instance::v1::InstanceConfig const& config) { - return absl::StrContains(config.name(), "/regional-us-west"); - }); - ASSERT_FALSE(config_name.empty()) << "could not get an instance config"; - - auto instance = - client_ - .CreateInstance(CreateInstanceRequestBuilder(in, config_name) - .SetDisplayName("test-display-name") - .SetNodeCount(1) - .SetLabels({{"label-key", "label-value"}}) - .Build()) - .get(); - - ASSERT_STATUS_OK(instance); - EXPECT_EQ(instance->name(), in.FullName()); - EXPECT_EQ(instance->display_name(), "test-display-name"); - EXPECT_NE(instance->node_count(), 0); - EXPECT_EQ(instance->config(), config_name); - EXPECT_EQ(instance->labels().at("label-key"), "label-value"); - - // Then update the instance - instance = client_ - .UpdateInstance(UpdateInstanceRequestBuilder(*instance) - .SetDisplayName("New display name") - .AddLabels({{"new-key", "new-value"}}) - .SetNodeCount(2) - .Build()) - .get(); - if (Emulator()) { - EXPECT_THAT(instance, StatusIs(StatusCode::kUnimplemented)); - } else { - EXPECT_STATUS_OK(instance); - if (instance) { - EXPECT_EQ(instance->display_name(), "New display name"); - EXPECT_EQ(instance->labels_size(), 2); - EXPECT_EQ(instance->labels().at("new-key"), "new-value"); - EXPECT_EQ(instance->node_count(), 2); - } - } - - EXPECT_STATUS_OK(client_.DeleteInstance(in)); -} - -TEST_F(InstanceAdminClientTest, InstanceConfig) { - auto project_id = ProjectId(); - ASSERT_FALSE(project_id.empty()); - - auto config_names = [&project_id, this]() mutable { - std::vector names; - for (auto const& config : client_.ListInstanceConfigs(project_id)) { - EXPECT_STATUS_OK(config); - if (!config) break; - names.push_back(config->name()); - } - return names; - }(); - ASSERT_FALSE(config_names.empty()); - - // Use the name of the first element from the list of instance configs. - auto config = client_.GetInstanceConfig(config_names[0]); - ASSERT_STATUS_OK(config); - EXPECT_THAT(config->name(), HasSubstr(project_id)); - EXPECT_EQ( - 1, std::count(config_names.begin(), config_names.end(), config->name())); -} - -TEST_F(InstanceAdminClientTest, InstanceIam) { - Instance in(ProjectId(), InstanceId()); - ASSERT_FALSE(in.project_id().empty()); - ASSERT_FALSE(in.instance_id().empty()); - - auto actual_policy = client_.GetIamPolicy(in); - if (Emulator()) { - EXPECT_THAT(actual_policy, StatusIs(StatusCode::kUnimplemented)); - GTEST_SKIP() << "emulator does not support IAM policies"; - } - ASSERT_STATUS_OK(actual_policy); - EXPECT_FALSE(actual_policy->etag().empty()); - - if (RunSlowInstanceTests()) { - // Set the policy to the existing value of the policy. While this - // changes nothing, it tests all the code in the client library. - auto updated_policy = client_.SetIamPolicy(in, *actual_policy); - ASSERT_THAT(updated_policy, AnyOf(IsOk(), StatusIs(StatusCode::kAborted))); - if (updated_policy) { - EXPECT_THAT(updated_policy->etag(), Not(IsEmpty())); - } - - // Repeat the test using the OCC API. - updated_policy = - client_.SetIamPolicy(in, [](google::iam::v1::Policy p) { return p; }); - ASSERT_STATUS_OK(updated_policy); - EXPECT_THAT(updated_policy->etag(), Not(IsEmpty())); - } - - auto actual = client_.TestIamPermissions( - in, {"spanner.databases.list", "spanner.databases.get"}); - ASSERT_STATUS_OK(actual); - EXPECT_THAT( - actual->permissions(), - UnorderedElementsAre("spanner.databases.list", "spanner.databases.get")); -} - -/// @test Verify the backwards compatibility `v1` namespace still exists. -TEST_F(InstanceAdminClientTest, BackwardsCompatibility) { - auto connection = ::google::cloud::spanner::v1::MakeInstanceAdminConnection(); - EXPECT_THAT(connection, NotNull()); - ASSERT_NO_FATAL_FAILURE(InstanceAdminClient(std::move(connection))); -} - -} // namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace spanner -} // namespace cloud -} // namespace google diff --git a/google/cloud/spanner/integration_tests/session_pool_integration_test.cc b/google/cloud/spanner/integration_tests/session_pool_integration_test.cc index 08e6ba6274d2f..ef3036e083e77 100644 --- a/google/cloud/spanner/integration_tests/session_pool_integration_test.cc +++ b/google/cloud/spanner/integration_tests/session_pool_integration_test.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/internal/defaults.h" #include "google/cloud/spanner/internal/session_pool.h" #include "google/cloud/spanner/internal/spanner_stub_factory.h" @@ -124,3 +124,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner_internal } // namespace cloud } // namespace google +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/integration_tests/spanner_client_integration_tests.bzl b/google/cloud/spanner/integration_tests/spanner_client_integration_tests.bzl index f101d8f668d23..f1e518714142e 100644 --- a/google/cloud/spanner/integration_tests/spanner_client_integration_tests.bzl +++ b/google/cloud/spanner/integration_tests/spanner_client_integration_tests.bzl @@ -17,11 +17,7 @@ """Automatically generated unit tests list - DO NOT EDIT.""" spanner_client_integration_tests = [ - "backup_extra_integration_test.cc", - "backup_integration_test.cc", "client_stress_test.cc", "data_types_integration_test.cc", - "database_admin_integration_test.cc", - "instance_admin_integration_test.cc", "session_pool_integration_test.cc", ] diff --git a/google/cloud/spanner/internal/connection_impl.cc b/google/cloud/spanner/internal/connection_impl.cc index f137fcd2ca1ef..e7da01b3d48b2 100644 --- a/google/cloud/spanner/internal/connection_impl.cc +++ b/google/cloud/spanner/internal/connection_impl.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/internal/connection_impl.h" #include "google/cloud/spanner/internal/defaults.h" #include "google/cloud/spanner/internal/logging_result_set_reader.h" @@ -1446,3 +1446,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner_internal } // namespace cloud } // namespace google +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/internal/connection_impl.h b/google/cloud/spanner/internal/connection_impl.h index 6bed1878e81e1..20d87e75b7aae 100644 --- a/google/cloud/spanner/internal/connection_impl.h +++ b/google/cloud/spanner/internal/connection_impl.h @@ -26,7 +26,7 @@ #include "google/cloud/background_threads.h" #include "google/cloud/status.h" #include "google/cloud/status_or.h" -#include +#include "google/spanner/v1/spanner.pb.h" #include #include #include diff --git a/google/cloud/spanner/internal/connection_impl_test.cc b/google/cloud/spanner/internal/connection_impl_test.cc index e01ae824baea3..becf5a35ff6db 100644 --- a/google/cloud/spanner/internal/connection_impl_test.cc +++ b/google/cloud/spanner/internal/connection_impl_test.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/internal/connection_impl.h" #include "google/cloud/spanner/client.h" #include "google/cloud/spanner/internal/defaults.h" @@ -90,8 +90,6 @@ using ::testing::Property; using ::testing::Return; using ::testing::Sequence; using ::testing::SetArgPointee; -using ::testing::StartsWith; -using ::testing::StrictMock; using ::testing::UnorderedElementsAre; using ::testing::UnorderedPointwise; using ::testing::Unused; @@ -287,16 +285,6 @@ google::spanner::v1::Transaction MakeTestTransaction( return txn; } -// Create a `BatchCreateSessionsResponse` with the given `sessions`. -google::spanner::v1::BatchCreateSessionsResponse MakeSessionsResponse( - std::vector sessions) { - google::spanner::v1::BatchCreateSessionsResponse response; - for (auto& session : sessions) { - response.add_session()->set_name(std::move(session)); - } - return response; -} - // Create a `CommitResponse` with the given `commit_timestamp` and // `commit_stats`. google::spanner::v1::CommitResponse MakeCommitResponse( @@ -409,14 +397,9 @@ TEST(ConnectionImplTest, ReadCreateSessionFailure) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, CreateSession(_, _, HasDatabase(db))) + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) .WillRepeatedly(Return( Status(StatusCode::kPermissionDenied, "uh-oh in CreateSession"))); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .Times(AtLeast(2)) - .WillRepeatedly(Return(Status(StatusCode::kPermissionDenied, - "uh-oh in BatchCreateSessions"))); - EXPECT_CALL(*mock, AsyncDeleteSession).Times(0); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -427,7 +410,7 @@ TEST(ConnectionImplTest, ReadCreateSessionFailure) { {"column1"}}); for (auto& row : rows) { EXPECT_THAT(row, StatusIs(StatusCode::kPermissionDenied, - HasSubstr("uh-oh in BatchCreateSessions"))); + HasSubstr("uh-oh in CreateSession"))); } } @@ -435,16 +418,13 @@ TEST(ConnectionImplTest, ReadStreamingReadFailure) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); auto finish_status = internal::PermissionDeniedError("uh-oh in GrpcReader::Finish"); EXPECT_CALL(*mock, StreamingRead) .WillOnce( Return(ByMove(MakeReader({}, finish_status)))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -463,8 +443,8 @@ TEST(ConnectionImplTest, ReadSuccess) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); auto retry_status = internal::UnavailableError("try-again"); std::vector responses = { R"pb( @@ -527,9 +507,6 @@ TEST(ConnectionImplTest, ReadSuccess) { EXPECT_THAT(request.resume_token(), Eq("restart-row-2")); return MakeReader({responses[1], responses[2]}); }); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -553,13 +530,13 @@ TEST(ConnectionImplTest, ReadDirectedRead) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, BeginTransaction).Times(0); EXPECT_CALL(*mock, StreamingRead) .WillOnce([](std::shared_ptr const&, Options const&, google::spanner::v1::ReadRequest const& request) { - EXPECT_EQ("test-session-name", request.session()); + EXPECT_EQ("multiplexed", request.session()); EXPECT_TRUE(request.has_directed_read_options()); auto const& directed_read_options = request.directed_read_options(); EXPECT_TRUE(directed_read_options.has_include_replicas()); @@ -572,9 +549,6 @@ TEST(ConnectionImplTest, ReadDirectedRead) { return MakeReader( {R"pb(metadata: { transaction: { id: "ABCDEF00" } })pb"}); }); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -593,22 +567,19 @@ TEST(ConnectionImplTest, ReadDirectedRead) { spanner::ReplicaSelection(spanner::ReplicaType::kReadOnly)}, true)}); EXPECT_TRUE(ContainsNoRows(rows)); - EXPECT_THAT(txn, HasSessionAndTransaction("test-session-name", "ABCDEF00", - false, "")); + EXPECT_THAT(txn, + HasSessionAndTransaction("multiplexed", "ABCDEF00", false, "")); } TEST(ConnectionImplTest, ReadPermanentFailure) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, StreamingRead) .WillOnce(Return(ByMove(MakeReader( {}, internal::PermissionDeniedError("uh-oh"))))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedRetryOptions()); @@ -627,8 +598,8 @@ TEST(ConnectionImplTest, ReadTooManyTransientFailures) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, StreamingRead) .Times(AtLeast(2)) // This won't compile without `Unused` despite what the gMock docs say. @@ -636,9 +607,6 @@ TEST(ConnectionImplTest, ReadTooManyTransientFailures) { return MakeReader( {}, internal::UnavailableError("try-again")); }); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedRetryOptions()); @@ -658,17 +626,14 @@ TEST(ConnectionImplTest, ReadImplicitBeginTransaction) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, BeginTransaction).Times(0); auto constexpr kText = R"pb( metadata: { transaction: { id: "ABCDEF00" } } )pb"; EXPECT_CALL(*mock, StreamingRead) .WillOnce(Return(ByMove(MakeReader({kText})))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -677,8 +642,8 @@ TEST(ConnectionImplTest, ReadImplicitBeginTransaction) { auto rows = conn->Read( {txn, "table", spanner::KeySet::All(), {"UserId", "UserName"}}); EXPECT_TRUE(ContainsNoRows(rows)); - EXPECT_THAT(txn, HasSessionAndTransaction("test-session-name", "ABCDEF00", - false, "")); + EXPECT_THAT(txn, + HasSessionAndTransaction("multiplexed", "ABCDEF00", false, "")); } TEST(ConnectionImplTest, ReadImplicitBeginTransactionOneTransientFailure) { @@ -711,23 +676,19 @@ TEST(ConnectionImplTest, ReadImplicitBeginTransactionOneTransientFailure) { // n.b. these calls are explicitly sequenced because using the scoped // `InSequence` object causes gMock to get confused by the reader calls. Sequence s; - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) .InSequence(s) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); - EXPECT_CALL(*mock, StreamingRead(_, _, - AllOf(HasSession("test-session-name"), - HasBeginTransaction()))) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); + EXPECT_CALL( + *mock, StreamingRead( + _, _, AllOf(HasSession("multiplexed"), HasBeginTransaction()))) .InSequence(s) .WillOnce(Return(ByMove(std::move(failing_reader)))); - EXPECT_CALL(*mock, StreamingRead(_, _, - AllOf(HasSession("test-session-name"), - HasBeginTransaction()))) + EXPECT_CALL( + *mock, StreamingRead( + _, _, AllOf(HasSession("multiplexed"), HasBeginTransaction()))) .InSequence(s) .WillOnce(Return(ByMove(std::move(ok_reader)))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .InSequence(s) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -741,8 +702,8 @@ TEST(ConnectionImplTest, ReadImplicitBeginTransactionOneTransientFailure) { auto actual = std::vector>{stream.begin(), stream.end()}; EXPECT_THAT(actual, ElementsAre(IsOkAndHolds(RowType(12, "Steve")), IsOkAndHolds(RowType(42, "Ann")))); - EXPECT_THAT(txn, HasSessionAndTransaction("test-session-name", "ABCDEF00", - false, "")); + EXPECT_THAT(txn, + HasSessionAndTransaction("multiplexed", "ABCDEF00", false, "")); } TEST(ConnectionImplTest, ReadImplicitBeginTransactionOnePermanentFailure) { @@ -774,26 +735,22 @@ TEST(ConnectionImplTest, ReadImplicitBeginTransactionOnePermanentFailure) { // n.b. these calls are explicitly sequenced because using the scoped // `InSequence` object causes gMock to get confused by the reader calls. Sequence s; - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) .InSequence(s) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); - EXPECT_CALL(*mock, StreamingRead(_, _, - AllOf(HasSession("test-session-name"), - HasBeginTransaction()))) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); + EXPECT_CALL( + *mock, StreamingRead( + _, _, AllOf(HasSession("multiplexed"), HasBeginTransaction()))) .InSequence(s) .WillOnce(Return(ByMove(std::move(failing_reader)))); EXPECT_CALL(*mock, BeginTransaction) .InSequence(s) .WillOnce(Return(MakeTestTransaction("FEDCBA98"))); EXPECT_CALL(*mock, StreamingRead(_, _, - AllOf(HasSession("test-session-name"), + AllOf(HasSession("multiplexed"), HasTransactionId("FEDCBA98")))) .InSequence(s) .WillOnce(Return(ByMove(std::move(ok_reader)))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .InSequence(s) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -807,8 +764,8 @@ TEST(ConnectionImplTest, ReadImplicitBeginTransactionOnePermanentFailure) { auto actual = std::vector>{stream.begin(), stream.end()}; EXPECT_THAT(actual, ElementsAre(IsOkAndHolds(RowType(12, "Steve")), IsOkAndHolds(RowType(42, "Ann")))); - EXPECT_THAT(txn, HasSessionAndTransaction("test-session-name", "FEDCBA98", - false, "")); + EXPECT_THAT(txn, + HasSessionAndTransaction("multiplexed", "FEDCBA98", false, "")); } TEST(ConnectionImplTest, ReadImplicitBeginTransactionPermanentFailure) { @@ -822,26 +779,22 @@ TEST(ConnectionImplTest, ReadImplicitBeginTransactionPermanentFailure) { // n.b. these calls are explicitly sequenced because using the scoped // `InSequence` object causes gMock to get confused by the reader calls. Sequence s; - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) .InSequence(s) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); - EXPECT_CALL(*mock, StreamingRead(_, _, - AllOf(HasSession("test-session-name"), - HasBeginTransaction()))) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); + EXPECT_CALL( + *mock, StreamingRead( + _, _, AllOf(HasSession("multiplexed"), HasBeginTransaction()))) .InSequence(s) .WillOnce(Return(ByMove(std::move(reader1)))); EXPECT_CALL(*mock, BeginTransaction) .InSequence(s) .WillOnce(Return(MakeTestTransaction("FEDCBA98"))); EXPECT_CALL(*mock, StreamingRead(_, _, - AllOf(HasSession("test-session-name"), + AllOf(HasSession("multiplexed"), HasTransactionId("FEDCBA98")))) .InSequence(s) .WillOnce(Return(ByMove(std::move(reader2)))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .InSequence(s) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedRetryOptions()); @@ -859,13 +812,10 @@ TEST(ConnectionImplTest, ExecuteQueryCreateSessionFailure) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .Times(AtLeast(2)) - .WillRepeatedly(Return(Status(StatusCode::kPermissionDenied, - "uh-oh in BatchCreateSessions"))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, Not(HasSessionName("multiplexed")))) - .Times(0); + + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillRepeatedly(Return( + Status(StatusCode::kPermissionDenied, "uh-oh in CreateSession"))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -874,7 +824,7 @@ TEST(ConnectionImplTest, ExecuteQueryCreateSessionFailure) { spanner::SqlStatement("SELECT * FROM Table")}); for (auto& row : rows) { EXPECT_THAT(row, StatusIs(StatusCode::kPermissionDenied, - HasSubstr("uh-oh in BatchCreateSessions"))); + HasSubstr("uh-oh in CreateSession"))); } } @@ -882,15 +832,12 @@ TEST(ConnectionImplTest, ExecuteQueryStreamingReadFailure) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, ExecuteStreamingSql) .WillOnce(Return(ByMove(MakeReader( {}, internal::PermissionDeniedError("uh-oh in GrpcReader::Finish"))))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -907,8 +854,8 @@ TEST(ConnectionImplTest, ExecuteQueryReadSuccess) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); auto constexpr kText = R"pb( metadata: { row_type: { @@ -935,9 +882,6 @@ TEST(ConnectionImplTest, ExecuteQueryReadSuccess) { )pb"; EXPECT_CALL(*mock, ExecuteStreamingSql) .WillOnce(Return(ByMove(MakeReader({kText})))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -960,13 +904,13 @@ TEST(ConnectionImplTest, ExecuteQueryDirectedRead) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, BeginTransaction).Times(0); EXPECT_CALL(*mock, ExecuteStreamingSql) .WillOnce([](std::shared_ptr const&, Options const&, google::spanner::v1::ExecuteSqlRequest const& request) { - EXPECT_EQ("test-session-name", request.session()); + EXPECT_EQ("multiplexed", request.session()); EXPECT_TRUE(request.has_directed_read_options()); auto const& directed_read_options = request.directed_read_options(); EXPECT_TRUE(directed_read_options.has_exclude_replicas()); @@ -979,9 +923,6 @@ TEST(ConnectionImplTest, ExecuteQueryDirectedRead) { return MakeReader( {R"pb(metadata: { transaction: { id: "00FEDCBA" } })pb"}); }); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -996,16 +937,16 @@ TEST(ConnectionImplTest, ExecuteQueryDirectedRead) { {spanner::ReplicaSelection(spanner::ReplicaType::kReadWrite), spanner::ReplicaSelection("us-east4")})}); EXPECT_TRUE(ContainsNoRows(rows)); - EXPECT_THAT(txn, HasSessionAndTransaction("test-session-name", "00FEDCBA", - false, "")); + EXPECT_THAT(txn, + HasSessionAndTransaction("multiplexed", "00FEDCBA", false, "")); } TEST(ConnectionImplTest, ExecuteQueryPgNumericResult) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); auto constexpr kText = R"pb( metadata: { row_type: { @@ -1026,9 +967,6 @@ TEST(ConnectionImplTest, ExecuteQueryPgNumericResult) { )pb"; EXPECT_CALL(*mock, ExecuteStreamingSql) .WillOnce(Return(ByMove(MakeReader({kText})))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -1053,8 +991,8 @@ TEST(ConnectionImplTest, ExecuteQueryJsonBResult) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); auto constexpr kText = R"pb( metadata: { row_type: { @@ -1075,9 +1013,6 @@ TEST(ConnectionImplTest, ExecuteQueryJsonBResult) { )pb"; EXPECT_CALL(*mock, ExecuteStreamingSql) .WillOnce(Return(ByMove(MakeReader({kText})))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -1100,8 +1035,8 @@ TEST(ConnectionImplTest, ExecuteQueryNumericParameter) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); auto constexpr kResponseNumeric = R"pb( metadata: { row_type: { @@ -1153,9 +1088,6 @@ TEST(ConnectionImplTest, ExecuteQueryNumericParameter) { google::spanner::v1::TypeAnnotationCode::PG_NUMERIC); return MakeReader({kResponsePgNumeric}); }); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -1186,8 +1118,8 @@ TEST(ConnectionImplTest, ExecuteQueryPgOidResult) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); auto constexpr kText = R"pb( metadata: { row_type: { @@ -1208,9 +1140,6 @@ TEST(ConnectionImplTest, ExecuteQueryPgOidResult) { )pb"; EXPECT_CALL(*mock, ExecuteStreamingSql) .WillOnce(Return(ByMove(MakeReader({kText})))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -1233,17 +1162,14 @@ TEST(ConnectionImplTest, ExecuteQueryImplicitBeginTransaction) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, BeginTransaction).Times(0); auto constexpr kText = R"pb( metadata: { transaction: { id: "00FEDCBA" } } )pb"; EXPECT_CALL(*mock, ExecuteStreamingSql) .WillOnce(Return(ByMove(MakeReader({kText})))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -1252,8 +1178,8 @@ TEST(ConnectionImplTest, ExecuteQueryImplicitBeginTransaction) { auto rows = conn->ExecuteQuery({txn, spanner::SqlStatement("SELECT * FROM Table")}); EXPECT_TRUE(ContainsNoRows(rows)); - EXPECT_THAT(txn, HasSessionAndTransaction("test-session-name", "00FEDCBA", - false, "")); + EXPECT_THAT(txn, + HasSessionAndTransaction("multiplexed", "00FEDCBA", false, "")); } /** @@ -1261,6 +1187,9 @@ TEST(ConnectionImplTest, ExecuteQueryImplicitBeginTransaction) { * by QueryOptions contain the expected fields. */ TEST(ConnectionImplTest, QueryOptions) { + // TODO(#15927): Update the instrumentation of this test for multiplexed + // sessions. + GTEST_SKIP(); struct { // Given these QueryOptions ... spanner::QueryOptions options; @@ -1452,8 +1381,8 @@ TEST(ConnectionImplTest, QueryOptions) { .Build())); // ExecuteQuery(). - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"session-name"}))) + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))) .RetiresOnSaturation(); EXPECT_CALL(*mock, ExecuteStreamingSql(_, _, execute_sql_request_matcher)) .WillOnce(Return(ByMove(std::move(stream)))) @@ -1467,8 +1396,8 @@ TEST(ConnectionImplTest, QueryOptions) { .RetiresOnSaturation(); // ExecutePartitionedDml(). - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"session-name"}))) + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))) .RetiresOnSaturation(); EXPECT_CALL(*mock, BeginTransaction(_, _, begin_transaction_request_matcher)) @@ -1503,11 +1432,6 @@ TEST(ConnectionImplTest, QueryOptions) { EXPECT_CALL(*mock, Commit(_, _, commit_request_matcher)) .Times(1) .RetiresOnSaturation(); - - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("session-name"))) - .WillOnce(Return(make_ready_future(Status{}))) - .RetiresOnSaturation(); } auto conn = MakeConnectionImpl(db, mock); @@ -1531,11 +1455,6 @@ TEST(ConnectionImplTest, ExecuteDmlCreateSessionFailure) { EXPECT_CALL(*mock, CreateSession(_, _, HasDatabase(db))) .WillRepeatedly(Return( Status(StatusCode::kPermissionDenied, "uh-oh in CreateSession"))); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .Times(AtLeast(2)) - .WillRepeatedly(Return(Status(StatusCode::kPermissionDenied, - "uh-oh in BatchCreateSessions"))); - EXPECT_CALL(*mock, AsyncDeleteSession).Times(0); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -1545,15 +1464,15 @@ TEST(ConnectionImplTest, ExecuteDmlCreateSessionFailure) { conn->ExecuteDml({txn, spanner::SqlStatement("DELETE * FROM Table")}); EXPECT_THAT(result, StatusIs(StatusCode::kPermissionDenied, - HasSubstr("uh-oh in BatchCreateSessions"))); + HasSubstr("uh-oh in CreateSession"))); } TEST(ConnectionImplTest, ExecuteDmlDeleteSuccess) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); auto constexpr kText = R"pb( metadata: { transaction: { id: "1234567890" } } stats: { row_count_exact: 42 } @@ -1563,9 +1482,6 @@ TEST(ConnectionImplTest, ExecuteDmlDeleteSuccess) { EXPECT_CALL(*mock, ExecuteSql) .WillOnce(Return(Status(StatusCode::kUnavailable, "try-again"))) .WillOnce(Return(response)); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -1584,16 +1500,13 @@ TEST(ConnectionImplTest, ExecuteDmlDeletePermanentFailure) { "placeholder_database_id"); { InSequence seq; - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); Status status(StatusCode::kPermissionDenied, "uh-oh in ExecuteDml"); EXPECT_CALL(*mock, ExecuteSql).WillOnce(Return(status)); EXPECT_CALL(*mock, BeginTransaction) .WillOnce(Return(MakeTestTransaction())); EXPECT_CALL(*mock, ExecuteSql).WillOnce(Return(status)); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); } auto conn = MakeConnectionImpl(db, mock); @@ -1612,8 +1525,8 @@ TEST(ConnectionImplTest, ExecuteDmlDeleteTooManyTransientFailures) { "placeholder_database_id"); { InSequence seq; - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); Status status(StatusCode::kUnavailable, "try-again in ExecuteDml"); EXPECT_CALL(*mock, ExecuteSql) .Times(AtLeast(2)) @@ -1623,9 +1536,6 @@ TEST(ConnectionImplTest, ExecuteDmlDeleteTooManyTransientFailures) { EXPECT_CALL(*mock, ExecuteSql) .Times(AtLeast(2)) .WillRepeatedly(Return(status)); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); } auto conn = MakeConnectionImpl(db, mock); @@ -1648,8 +1558,8 @@ TEST(ConnectionImplTest, ExecuteDmlTransactionAtomicity) { Status begin_status(StatusCode::kInvalidArgument, "BeginTransaction status"); { InSequence seq; - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); // The first `ExecuteDml` call tries to implicitly begin the transaction // via `ExecuteSql`, and then explicitly via `BeginTransaction`. Both fail, @@ -1657,10 +1567,6 @@ TEST(ConnectionImplTest, ExecuteDmlTransactionAtomicity) { // not valid the client fails any subsequent operations itself. EXPECT_CALL(*mock, ExecuteSql).WillOnce(Return(op_status)); EXPECT_CALL(*mock, BeginTransaction).WillOnce(Return(begin_status)); - - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); } auto conn = MakeConnectionImpl(db, mock); @@ -1683,18 +1589,14 @@ TEST(ConnectionImplTest, ExecuteDmlTransactionMissing) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); // Return an otherwise valid response that does not contain a transaction. google::spanner::v1::ResultSet response; ASSERT_TRUE(TextFormat::ParseFromString("metadata: {}", &response)); EXPECT_CALL(*mock, ExecuteSql).WillOnce(Return(response)); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); - auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); spanner::Transaction txn = @@ -1710,8 +1612,8 @@ TEST(ConnectionImplTest, ProfileQuerySuccess) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); auto constexpr kText = R"pb( metadata: { row_type: { @@ -1741,9 +1643,6 @@ TEST(ConnectionImplTest, ProfileQuerySuccess) { )pb"; EXPECT_CALL(*mock, ExecuteStreamingSql) .WillOnce(Return(ByMove(MakeReader({kText})))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -1780,11 +1679,6 @@ TEST(ConnectionImplTest, ProfileQueryCreateSessionFailure) { EXPECT_CALL(*mock, CreateSession(_, _, HasDatabase(db))) .WillRepeatedly(Return( Status(StatusCode::kPermissionDenied, "uh-oh in CreateSession"))); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .Times(AtLeast(2)) - .WillRepeatedly(Return(Status(StatusCode::kPermissionDenied, - "uh-oh in BatchCreateSessions"))); - EXPECT_CALL(*mock, AsyncDeleteSession).Times(0); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -1793,7 +1687,7 @@ TEST(ConnectionImplTest, ProfileQueryCreateSessionFailure) { spanner::SqlStatement("SELECT * FROM Table")}); for (auto& row : result) { EXPECT_THAT(row, StatusIs(StatusCode::kPermissionDenied, - HasSubstr("uh-oh in BatchCreateSessions"))); + HasSubstr("uh-oh in CreateSession"))); } } @@ -1801,16 +1695,13 @@ TEST(ConnectionImplTest, ProfileQueryStreamingReadFailure) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); auto finish_status = internal::PermissionDeniedError("uh-oh in GrpcReader::Finish"); EXPECT_CALL(*mock, ExecuteStreamingSql) .WillOnce( Return(ByMove(MakeReader({}, finish_status)))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -1830,10 +1721,6 @@ TEST(ConnectionImplTest, ProfileDmlCreateSessionFailure) { EXPECT_CALL(*mock, CreateSession(_, _, HasDatabase(db))) .WillRepeatedly(Return( Status(StatusCode::kPermissionDenied, "uh-oh in CreateSession"))); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .Times(AtLeast(2)) - .WillRepeatedly(Return(Status(StatusCode::kPermissionDenied, - "uh-oh in BatchCreateSessions"))); EXPECT_CALL(*mock, AsyncDeleteSession).Times(0); auto conn = MakeConnectionImpl(db, mock); @@ -1843,15 +1730,15 @@ TEST(ConnectionImplTest, ProfileDmlCreateSessionFailure) { auto result = conn->ProfileDml({txn, spanner::SqlStatement("DELETE * FROM Table")}); EXPECT_THAT(result, StatusIs(StatusCode::kPermissionDenied, - HasSubstr("uh-oh in BatchCreateSessions"))); + HasSubstr("uh-oh in CreateSession"))); } TEST(ConnectionImplTest, ProfileDmlDeleteSuccess) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); auto constexpr kText = R"pb( metadata: { transaction: { id: "1234567890" } } stats: { @@ -1870,9 +1757,6 @@ TEST(ConnectionImplTest, ProfileDmlDeleteSuccess) { EXPECT_CALL(*mock, ExecuteSql) .WillOnce(Return(Status(StatusCode::kUnavailable, "try-again"))) .WillOnce(Return(response)); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -1906,16 +1790,13 @@ TEST(ConnectionImplTest, ProfileDmlDeletePermanentFailure) { "placeholder_database_id"); { InSequence seq; - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); Status status(StatusCode::kPermissionDenied, "uh-oh in ExecuteDml"); EXPECT_CALL(*mock, ExecuteSql).WillOnce(Return(status)); EXPECT_CALL(*mock, BeginTransaction) .WillOnce(Return(MakeTestTransaction())); EXPECT_CALL(*mock, ExecuteSql).WillOnce(Return(status)); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); } auto conn = MakeConnectionImpl(db, mock); @@ -1934,8 +1815,8 @@ TEST(ConnectionImplTest, ProfileDmlDeleteTooManyTransientFailures) { "placeholder_database_id"); { InSequence seq; - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); Status status(StatusCode::kUnavailable, "try-again in ExecuteDml"); EXPECT_CALL(*mock, ExecuteSql) .Times(AtLeast(2)) @@ -1945,9 +1826,6 @@ TEST(ConnectionImplTest, ProfileDmlDeleteTooManyTransientFailures) { EXPECT_CALL(*mock, ExecuteSql) .Times(AtLeast(2)) .WillRepeatedly(Return(status)); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); } auto conn = MakeConnectionImpl(db, mock); @@ -1965,8 +1843,8 @@ TEST(ConnectionImplTest, AnalyzeSqlSuccess) { auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); auto constexpr kText = R"pb( metadata: {} stats: { query_plan { plan_nodes: { index: 42 } } } @@ -1976,9 +1854,6 @@ TEST(ConnectionImplTest, AnalyzeSqlSuccess) { EXPECT_CALL(*mock, ExecuteSql) .WillOnce(Return(Status(StatusCode::kUnavailable, "try-again"))) .WillOnce(Return(ByMove(std::move(response)))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -2002,11 +1877,6 @@ TEST(ConnectionImplTest, AnalyzeSqlCreateSessionFailure) { EXPECT_CALL(*mock, CreateSession(_, _, HasDatabase(db))) .WillRepeatedly(Return( Status(StatusCode::kPermissionDenied, "uh-oh in CreateSession"))); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .Times(AtLeast(2)) - .WillRepeatedly(Return(Status(StatusCode::kPermissionDenied, - "uh-oh in BatchCreateSessions"))); - EXPECT_CALL(*mock, AsyncDeleteSession).Times(0); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -2015,7 +1885,7 @@ TEST(ConnectionImplTest, AnalyzeSqlCreateSessionFailure) { auto result = conn->AnalyzeSql({txn, spanner::SqlStatement("DELETE * FROM Table")}); EXPECT_THAT(result, StatusIs(StatusCode::kPermissionDenied, - HasSubstr("uh-oh in BatchCreateSessions"))); + HasSubstr("uh-oh in CreateSession"))); } TEST(ConnectionImplTest, AnalyzeSqlDeletePermanentFailure) { @@ -2024,16 +1894,13 @@ TEST(ConnectionImplTest, AnalyzeSqlDeletePermanentFailure) { "placeholder_database_id"); { InSequence seq; - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); Status status(StatusCode::kPermissionDenied, "uh-oh in ExecuteDml"); EXPECT_CALL(*mock, ExecuteSql).WillOnce(Return(status)); EXPECT_CALL(*mock, BeginTransaction) .WillOnce(Return(MakeTestTransaction())); EXPECT_CALL(*mock, ExecuteSql).WillOnce(Return(status)); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); } auto conn = MakeConnectionImpl(db, mock); @@ -2052,8 +1919,8 @@ TEST(ConnectionImplTest, AnalyzeSqlDeleteTooManyTransientFailures) { "placeholder_database_id"); { InSequence seq; - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); Status status(StatusCode::kUnavailable, "try-again in ExecuteDml"); EXPECT_CALL(*mock, ExecuteSql) .Times(AtLeast(2)) @@ -2063,9 +1930,6 @@ TEST(ConnectionImplTest, AnalyzeSqlDeleteTooManyTransientFailures) { EXPECT_CALL(*mock, ExecuteSql) .Times(AtLeast(2)) .WillRepeatedly(Return(status)); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); } auto conn = MakeConnectionImpl(db, mock); @@ -2082,8 +1946,8 @@ TEST(ConnectionImplTest, ExecuteBatchDmlSuccess) { auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); auto mock = std::make_shared(); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); auto constexpr kText = R"pb( result_sets: { metadata: { transaction: { id: "1234567890" } } @@ -2101,9 +1965,6 @@ TEST(ConnectionImplTest, ExecuteBatchDmlSuccess) { HasPriority(google::spanner::v1::RequestOptions::PRIORITY_MEDIUM))) .WillOnce(Return(Status(StatusCode::kUnavailable, "try-again"))) .WillOnce(Return(response)); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto request = { spanner::SqlStatement("UPDATE ..."), @@ -2127,7 +1988,7 @@ TEST(ConnectionImplTest, ExecuteBatchDmlSuccess) { EXPECT_EQ(result->stats[1].row_count, 1); EXPECT_EQ(result->stats[2].row_count, 2); EXPECT_THAT( - txn, HasSessionAndTransaction("session-name", "1234567890", true, "tag")); + txn, HasSessionAndTransaction("multiplexed", "1234567890", true, "tag")); } TEST(ConnectionImplTest, MultiplexedExecuteBatchDmlSuccess) { @@ -2173,8 +2034,7 @@ TEST(ConnectionImplTest, MultiplexedExecuteBatchDmlSuccess) { spanner::SqlStatement("UPDATE ..."), }; - auto options = Options{}.set({}); - auto conn = MakeConnectionImpl(db, mock, options); + auto conn = MakeConnectionImpl(db, mock, Options{}); internal::OptionsSpan span(MakeLimitedTimeOptions()); auto txn = spanner::MakeReadWriteTransaction( spanner::Transaction::ReadWriteOptions().WithTag("tag")); @@ -2199,8 +2059,8 @@ TEST(ConnectionImplTest, ExecuteBatchDmlPartialFailure) { auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); auto mock = std::make_shared(); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); auto constexpr kText = R"pb( result_sets: { metadata: { transaction: { id: "1234567890" } } @@ -2212,9 +2072,6 @@ TEST(ConnectionImplTest, ExecuteBatchDmlPartialFailure) { google::spanner::v1::ExecuteBatchDmlResponse response; ASSERT_TRUE(TextFormat::ParseFromString(kText, &response)); EXPECT_CALL(*mock, ExecuteBatchDml).WillOnce(Return(response)); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto request = { spanner::SqlStatement("UPDATE ..."), @@ -2234,7 +2091,7 @@ TEST(ConnectionImplTest, ExecuteBatchDmlPartialFailure) { EXPECT_EQ(result->stats[0].row_count, 42); EXPECT_EQ(result->stats[1].row_count, 43); EXPECT_THAT( - txn, HasSessionAndTransaction("session-name", "1234567890", true, "tag")); + txn, HasSessionAndTransaction("multiplexed", "1234567890", true, "tag")); } TEST(ConnectionImplTest, ExecuteBatchDmlPermanentFailure) { @@ -2243,17 +2100,14 @@ TEST(ConnectionImplTest, ExecuteBatchDmlPermanentFailure) { auto mock = std::make_shared(); { InSequence seq; - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); Status status(StatusCode::kPermissionDenied, "uh-oh in ExecuteBatchDml"); EXPECT_CALL(*mock, ExecuteBatchDml).WillOnce(Return(status)); EXPECT_CALL(*mock, BeginTransaction) .WillOnce(Return(MakeTestTransaction())); EXPECT_CALL(*mock, ExecuteBatchDml).WillOnce(Return(status)); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); } auto request = { @@ -2276,8 +2130,8 @@ TEST(ConnectionImplTest, ExecuteBatchDmlTooManyTransientFailures) { auto mock = std::make_shared(); { InSequence seq; - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); Status status(StatusCode::kUnavailable, "try-again in ExecuteBatchDml"); EXPECT_CALL(*mock, ExecuteBatchDml) @@ -2288,10 +2142,6 @@ TEST(ConnectionImplTest, ExecuteBatchDmlTooManyTransientFailures) { EXPECT_CALL(*mock, ExecuteBatchDml) .Times(AtLeast(2)) .WillRepeatedly(Return(status)); - - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); } auto request = { @@ -2314,8 +2164,8 @@ TEST(ConnectionImplTest, ExecuteBatchDmlNoResultSets) { auto mock = std::make_shared(); { InSequence seq; - EXPECT_CALL(*mock, BatchCreateSessions) - .WillOnce(Return(MakeSessionsResponse({"session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); // The `ExecuteBatchDml` call can succeed, but with no `ResultSet`s and an // error status in the response. auto constexpr kText = R"pb( @@ -2324,18 +2174,15 @@ TEST(ConnectionImplTest, ExecuteBatchDmlNoResultSets) { google::spanner::v1::ExecuteBatchDmlResponse response; ASSERT_TRUE(TextFormat::ParseFromString(kText, &response)); EXPECT_CALL(*mock, ExecuteBatchDml(_, _, - AllOf(HasSession("session-name"), + AllOf(HasSession("multiplexed"), HasBeginTransaction()))) .WillOnce(Return(response)); EXPECT_CALL(*mock, BeginTransaction) .WillOnce(Return(MakeTestTransaction("BD000001"))); EXPECT_CALL(*mock, ExecuteBatchDml(_, _, - AllOf(HasSession("session-name"), + AllOf(HasSession("multiplexed"), HasTransactionId("BD000001")))) .WillOnce(Return(response)); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); } auto request = {spanner::SqlStatement("UPDATE ...")}; @@ -2353,8 +2200,8 @@ TEST(ConnectionImplTest, ExecutePartitionedDmlDeleteSuccess) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, BeginTransaction) .WillOnce(Return(Status(StatusCode::kUnavailable, "try-again"))) .WillOnce( @@ -2375,9 +2222,6 @@ TEST(ConnectionImplTest, ExecutePartitionedDmlDeleteSuccess) { {}, internal::UnavailableError("try-again in ExecutePartitionedDml"))))) .WillOnce(Return(ByMove(MakeReader({kTextResponse})))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -2392,8 +2236,8 @@ TEST(ConnectionImplTest, ExecutePartitionedDmlExcludeFromChangeStreams) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, BeginTransaction) .WillOnce( [](grpc::ClientContext&, Options const&, @@ -2410,9 +2254,6 @@ TEST(ConnectionImplTest, ExecutePartitionedDmlExcludeFromChangeStreams) { ExecuteStreamingSql( _, _, AllOf(HasRequestTag("tag"), HasTransactionTag("")))) .WillOnce(Return(ByMove(MakeReader({kTextResponse})))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span( @@ -2432,26 +2273,21 @@ TEST(ConnectionImplTest, ExecutePartitionedDmlCreateSessionFailure) { EXPECT_CALL(*mock, CreateSession(_, _, HasDatabase(db))) .WillRepeatedly(Return( Status(StatusCode::kPermissionDenied, "uh-oh in CreateSession"))); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .Times(AtLeast(2)) - .WillRepeatedly(Return(Status(StatusCode::kPermissionDenied, - "uh-oh in BatchCreateSessions"))); - EXPECT_CALL(*mock, AsyncDeleteSession).Times(0); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); auto result = conn->ExecutePartitionedDml( {spanner::SqlStatement("DELETE * FROM Table")}); EXPECT_THAT(result, StatusIs(StatusCode::kPermissionDenied, - HasSubstr("uh-oh in BatchCreateSessions"))); + HasSubstr("uh-oh in CreateSession"))); } TEST(ConnectionImplTest, ExecutePartitionedDmlDeletePermanentFailure) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, BeginTransaction) .WillOnce(Return(Status(StatusCode::kUnavailable, "try-again"))) .WillOnce(Return(MakeTestTransaction())); @@ -2462,10 +2298,6 @@ TEST(ConnectionImplTest, ExecutePartitionedDmlDeletePermanentFailure) { .WillOnce(Return(ByMove(MakeReader( {}, internal::InternalError("permanent failure"))))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); - auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); auto result = conn->ExecutePartitionedDml( @@ -2478,8 +2310,8 @@ TEST(ConnectionImplTest, ExecutePartitionedDmlDeleteTooManyTransientFailures) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, BeginTransaction) .WillOnce(Return(Status(StatusCode::kUnavailable, "try-again"))) .WillOnce(Return(MakeTestTransaction())); @@ -2491,9 +2323,6 @@ TEST(ConnectionImplTest, ExecutePartitionedDmlDeleteTooManyTransientFailures) { {}, internal::UnavailableError("try-again in ExecutePartitionedDml")); }); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedRetryOptions()); @@ -2508,8 +2337,8 @@ TEST(ConnectionImplTest, ExecutePartitionedDmlRetryableInternalErrors) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions) - .WillOnce(Return(MakeSessionsResponse({"session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, BeginTransaction) .WillOnce(Return(MakeTestTransaction("2345678901"))); @@ -2529,10 +2358,6 @@ TEST(ConnectionImplTest, ExecutePartitionedDmlRetryableInternalErrors) { "HTTP/2 error code: INTERNAL_ERROR\nReceived Rst Stream"))))) .WillOnce(Return(ByMove(MakeReader({kTextResponse})))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); - auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedRetryOptions()); auto result = conn->ExecutePartitionedDml( @@ -2546,14 +2371,11 @@ TEST(ConnectionImplTest, auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, BeginTransaction) .WillOnce(Return(Status(StatusCode::kPermissionDenied, "uh-oh in ExecutePartitionedDml"))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -2568,15 +2390,12 @@ TEST(ConnectionImplTest, auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, BeginTransaction) .Times(AtLeast(2)) .WillRepeatedly(Return(Status(StatusCode::kUnavailable, "try-again in ExecutePartitionedDml"))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedRetryOptions()); @@ -2594,56 +2413,47 @@ TEST(ConnectionImplTest, CommitCreateSessionPermanentFailure) { EXPECT_CALL(*mock, CreateSession(_, _, HasDatabase(db))) .WillRepeatedly(Return( Status(StatusCode::kPermissionDenied, "uh-oh in CreateSession"))); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .Times(AtLeast(2)) - .WillRepeatedly(Return(Status(StatusCode::kPermissionDenied, - "uh-oh in BatchCreateSessions"))); EXPECT_CALL(*mock, AsyncDeleteSession).Times(0); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedRetryOptions()); auto commit = conn->Commit({spanner::MakeReadWriteTransaction()}); EXPECT_THAT(commit, StatusIs(StatusCode::kPermissionDenied, - HasSubstr("uh-oh in BatchCreateSessions"))); + HasSubstr("uh-oh in CreateSession"))); } TEST(ConnectionImplTest, CommitCreateSessionTooManyTransientFailures) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) .Times(AtLeast(2)) - .WillRepeatedly(Return(Status(StatusCode::kUnavailable, - "try-again in BatchCreateSessions"))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, Not(HasSessionName("multiplexed")))) - .Times(0); + .WillRepeatedly(Return( + Status(StatusCode::kUnavailable, "try-again in CreateSession"))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedRetryOptions()); auto commit = conn->Commit({spanner::MakeReadWriteTransaction()}); EXPECT_THAT(commit, StatusIs(StatusCode::kUnavailable, - HasSubstr("try-again in BatchCreateSessions"))); + HasSubstr("try-again in CreateSession"))); } TEST(ConnectionImplTest, CommitCreateSessionRetry) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) .WillOnce(Return( - Status(StatusCode::kUnavailable, "try-again in BatchCreateSessions"))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + Status(StatusCode::kUnavailable, "try-again in CreateSession"))) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); + google::spanner::v1::Transaction txn = MakeTestTransaction(); EXPECT_CALL(*mock, BeginTransaction).WillOnce(Return(txn)); EXPECT_CALL(*mock, Commit(_, _, - AllOf(HasSession("test-session-name"), + AllOf(HasSession("multiplexed"), HasNakedTransactionId(txn.id())))) .WillOnce( Return(Status(StatusCode::kPermissionDenied, "uh-oh in Commit"))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedRetryOptions()); @@ -2656,8 +2466,8 @@ TEST(ConnectionImplTest, CommitBeginTransactionRetry) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); google::spanner::v1::Transaction txn = MakeTestTransaction(); EXPECT_CALL(*mock, BeginTransaction) .WillOnce(Return(Status(StatusCode::kUnavailable, "try-again"))) @@ -2666,12 +2476,9 @@ TEST(ConnectionImplTest, CommitBeginTransactionRetry) { spanner::MakeTimestamp(std::chrono::system_clock::from_time_t(123)) .value(); EXPECT_CALL(*mock, Commit(_, _, - AllOf(HasSession("test-session-name"), + AllOf(HasSession("multiplexed"), HasNakedTransactionId(txn.id())))) .WillOnce(Return(MakeCommitResponse(commit_timestamp))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedRetryOptions()); @@ -2684,13 +2491,10 @@ TEST(ConnectionImplTest, CommitBeginTransactionSessionNotFound) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, BeginTransaction) - .WillOnce(Return(SessionNotFoundError("test-session-name"))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, Not(HasSessionName("multiplexed")))) - .Times(0); + .WillOnce(Return(SessionNotFoundError("multiplexed"))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedRetryOptions()); @@ -2706,14 +2510,11 @@ TEST(ConnectionImplTest, CommitBeginTransactionPermanentFailure) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, BeginTransaction) .WillOnce(Return( Status(StatusCode::kInvalidArgument, "BeginTransaction failed"))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedRetryOptions()); @@ -2733,18 +2534,15 @@ TEST(ConnectionImplTest, CommitCommitPermanentFailure) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); google::spanner::v1::Transaction txn = MakeTestTransaction(); EXPECT_CALL(*mock, BeginTransaction).WillOnce(Return(txn)); EXPECT_CALL(*mock, Commit(_, _, - AllOf(HasSession("test-session-name"), + AllOf(HasSession("multiplexed"), HasNakedTransactionId(txn.id())))) .WillOnce( Return(Status(StatusCode::kPermissionDenied, "uh-oh in Commit"))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedRetryOptions()); @@ -2757,18 +2555,15 @@ TEST(ConnectionImplTest, CommitCommitTooManyTransientFailures) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); google::spanner::v1::Transaction txn = MakeTestTransaction(); EXPECT_CALL(*mock, BeginTransaction).WillOnce(Return(txn)); EXPECT_CALL(*mock, Commit(_, _, - AllOf(HasSession("test-session-name"), + AllOf(HasSession("multiplexed"), HasNakedTransactionId(txn.id())))) .WillOnce( Return(Status(StatusCode::kPermissionDenied, "uh-oh in Commit"))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedRetryOptions()); @@ -2781,13 +2576,10 @@ TEST(ConnectionImplTest, CommitCommitInvalidatedTransaction) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, BeginTransaction).Times(0); EXPECT_CALL(*mock, Commit).Times(0); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -2806,19 +2598,16 @@ TEST(ConnectionImplTest, CommitCommitIdempotentTransientSuccess) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); auto const commit_timestamp = spanner::MakeTimestamp(std::chrono::system_clock::from_time_t(123)) .value(); EXPECT_CALL(*mock, Commit(_, _, - AllOf(HasSession("test-session-name"), + AllOf(HasSession("multiplexed"), HasNakedTransactionId("test-txn-id")))) .WillOnce(Return(Status(StatusCode::kUnavailable, "try-again"))) .WillOnce(Return(MakeCommitResponse(commit_timestamp))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -2836,21 +2625,18 @@ TEST(ConnectionImplTest, CommitSuccessWithTransactionId) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL( *mock, - Commit(_, _, - AllOf(HasSession("test-session-name"), - HasNakedTransactionId("test-txn-id"), - HasPriority( - google::spanner::v1::RequestOptions::PRIORITY_HIGH)))) + Commit( + _, _, + AllOf( + HasSession("multiplexed"), HasNakedTransactionId("test-txn-id"), + HasPriority(google::spanner::v1::RequestOptions::PRIORITY_HIGH)))) .WillOnce(Return(MakeCommitResponse( spanner::MakeTimestamp(std::chrono::system_clock::from_time_t(123)) .value()))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -2870,8 +2656,8 @@ TEST(ConnectionImplTest, CommitSuccessWithStats) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, BeginTransaction) .WillOnce( [](grpc::ClientContext&, Options const&, @@ -2881,16 +2667,13 @@ TEST(ConnectionImplTest, CommitSuccessWithStats) { EXPECT_FALSE(request.has_mutation_key()); return MakeTestTransaction(); }); - EXPECT_CALL(*mock, Commit(_, _, - AllOf(HasSession("test-session-name"), - HasReturnStats(true)))) + EXPECT_CALL( + *mock, + Commit(_, _, AllOf(HasSession("multiplexed"), HasReturnStats(true)))) .WillOnce(Return(MakeCommitResponse( spanner::MakeTimestamp(std::chrono::system_clock::from_time_t(123)) .value(), spanner::CommitStats{42}))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -2948,8 +2731,7 @@ TEST(ConnectionImplTest, MutationCommitSuccess) { commit_timestamp, spanner::CommitStats{request.mutations_size()}); }); - auto options = Options{}.set({}); - auto conn = MakeConnectionImpl(db, mock, options); + auto conn = MakeConnectionImpl(db, mock, Options{}); internal::OptionsSpan span(MakeLimitedTimeOptions()); auto commit = conn->Commit({spanner::MakeReadWriteTransaction(), mutations, spanner::CommitOptions{}.set_return_stats(true)}); @@ -3019,8 +2801,7 @@ TEST(ConnectionImplTest, MutationCommitRetryOnceSuccess) { commit_timestamp, spanner::CommitStats{original_mutations_size}); }); - auto options = Options{}.set({}); - auto conn = MakeConnectionImpl(db, mock, options); + auto conn = MakeConnectionImpl(db, mock, Options{}); internal::OptionsSpan span(MakeLimitedTimeOptions()); auto commit = conn->Commit({spanner::MakeReadWriteTransaction(), mutations, spanner::CommitOptions{}.set_return_stats(true)}); @@ -3104,8 +2885,7 @@ TEST(ConnectionImplTest, MutationCommitRetryMoreThanOnceSuccess) { commit_timestamp, spanner::CommitStats{original_mutations_size}); }); - auto options = Options{}.set({}); - auto conn = MakeConnectionImpl(db, mock, options); + auto conn = MakeConnectionImpl(db, mock, Options{}); internal::OptionsSpan span(MakeLimitedTimeOptions()); auto commit = conn->Commit({spanner::MakeReadWriteTransaction(), mutations, spanner::CommitOptions{}.set_return_stats(true)}); @@ -3188,8 +2968,7 @@ TEST(ConnectionImplTest, MultiplexedPrecommitUpdated) { }); } - auto options = Options{}.set({}); - auto conn = MakeConnectionImpl(db, mock, options); + auto conn = MakeConnectionImpl(db, mock, Options{}); internal::OptionsSpan span(MakeLimitedTimeOptions()); spanner::Transaction txn = MakeReadWriteTransaction(spanner::Transaction::ReadWriteOptions()); @@ -3207,8 +2986,8 @@ TEST(ConnectionImplTest, CommitSuccessExcludeFromChangeStreams) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, BeginTransaction) .WillOnce( [](grpc::ClientContext&, Options const&, @@ -3217,13 +2996,10 @@ TEST(ConnectionImplTest, CommitSuccessExcludeFromChangeStreams) { EXPECT_TRUE(request.options().exclude_txn_from_change_streams()); return MakeTestTransaction(); }); - EXPECT_CALL(*mock, Commit(_, _, HasSession("test-session-name"))) + EXPECT_CALL(*mock, Commit(_, _, HasSession("multiplexed"))) .WillOnce(Return(MakeCommitResponse( spanner::MakeTimestamp(std::chrono::system_clock::from_time_t(123)) .value()))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span( @@ -3241,20 +3017,17 @@ TEST(ConnectionImplTest, CommitSuccessWithMaxCommitDelay) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); google::spanner::v1::Transaction txn = MakeTestTransaction(); EXPECT_CALL(*mock, BeginTransaction).WillOnce(Return(txn)); EXPECT_CALL(*mock, Commit(_, _, - AllOf(HasSession("test-session-name"), + AllOf(HasSession("multiplexed"), HasMaxCommitDelay(std::chrono::milliseconds(100))))) .WillOnce(Return(MakeCommitResponse( spanner::MakeTimestamp(std::chrono::system_clock::from_time_t(123)) .value()))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -3269,21 +3042,18 @@ TEST(ConnectionImplTest, CommitSuccessWithCompression) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); google::spanner::v1::Transaction txn = MakeTestTransaction(); EXPECT_CALL(*mock, BeginTransaction).WillOnce(Return(txn)); EXPECT_CALL(*mock, Commit(HasCompressionAlgorithm(GRPC_COMPRESS_GZIP), _, - HasSession("test-session-name"))) + HasSession("multiplexed"))) .WillOnce([](grpc::ClientContext&, Options const&, google::spanner::v1::CommitRequest const&) { return MakeCommitResponse( spanner::MakeTimestamp(std::chrono::system_clock::from_time_t(123)) .value()); }); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span( @@ -3301,8 +3071,8 @@ TEST(ConnectionImplTest, CommitAtLeastOnce) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, BeginTransaction).Times(0); // The whole point! auto const commit_timestamp = spanner::MakeTimestamp(std::chrono::system_clock::from_time_t(123)) @@ -3311,7 +3081,7 @@ TEST(ConnectionImplTest, CommitAtLeastOnce) { .WillOnce([commit_timestamp]( grpc::ClientContext&, Options const&, google::spanner::v1::CommitRequest const& request) { - EXPECT_EQ("test-session-name", request.session()); + EXPECT_EQ("multiplexed", request.session()); EXPECT_TRUE(request.has_single_use_transaction()); EXPECT_EQ(0, request.mutations_size()); EXPECT_FALSE(request.return_commit_stats()); @@ -3321,9 +3091,6 @@ TEST(ConnectionImplTest, CommitAtLeastOnce) { EXPECT_THAT(request.request_options().transaction_tag(), IsEmpty()); return MakeCommitResponse(commit_timestamp); }); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -3338,13 +3105,13 @@ TEST(ConnectionImplTest, CommitAtLeastOnceBatched) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); using BatchWriteRequest = google::spanner::v1::BatchWriteRequest; EXPECT_CALL(*mock, BatchWrite) .WillOnce([](std::shared_ptr const&, Options const&, BatchWriteRequest const& request) { - EXPECT_EQ("test-session-name", request.session()); + EXPECT_EQ("multiplexed", request.session()); EXPECT_EQ(google::spanner::v1::RequestOptions::PRIORITY_UNSPECIFIED, request.request_options().priority()); EXPECT_THAT(request.request_options().request_tag(), IsEmpty()); @@ -3359,7 +3126,7 @@ TEST(ConnectionImplTest, CommitAtLeastOnceBatched) { }) .WillOnce([&](std::shared_ptr const&, Options const&, BatchWriteRequest const& request) { - EXPECT_EQ("test-session-name", request.session()); + EXPECT_EQ("multiplexed", request.session()); EXPECT_EQ(google::spanner::v1::RequestOptions::PRIORITY_UNSPECIFIED, request.request_options().priority()); EXPECT_THAT(request.request_options().request_tag(), IsEmpty()); @@ -3378,9 +3145,6 @@ TEST(ConnectionImplTest, CommitAtLeastOnceBatched) { commit_timestamp { seconds: 123 } )pb"}); }); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -3396,75 +3160,17 @@ TEST(ConnectionImplTest, CommitAtLeastOnceBatched) { EXPECT_EQ(++it, commit_results.end()); } -TEST(ConnectionImplTest, CommitAtLeastOnceBatchedSessionNotFound) { - auto mock = std::make_shared>(); - auto db = spanner::Database("placeholder_project", "placeholder_instance", - "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name-1"}))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name-2"}))); - using BatchWriteRequest = google::spanner::v1::BatchWriteRequest; - EXPECT_CALL(*mock, BatchWrite) - .WillOnce([](std::shared_ptr const&, Options const&, - BatchWriteRequest const& request) { - EXPECT_EQ("test-session-name-1", request.session()); - EXPECT_THAT(request.mutation_groups(), IsEmpty()); - EXPECT_FALSE(request.exclude_txn_from_change_streams()); - return MakeReader( - {}, SessionNotFoundError(request.session())); - }) - .WillOnce([&](std::shared_ptr const&, Options const&, - BatchWriteRequest const& request) { - EXPECT_EQ("test-session-name-2", request.session()); - EXPECT_THAT(request.mutation_groups(), IsEmpty()); - EXPECT_FALSE(request.exclude_txn_from_change_streams()); - return MakeReader( - {R"pb(status {} - commit_timestamp { seconds: 123 })pb"}); - }); - EXPECT_CALL( - *mock, AsyncDeleteSession(_, _, _, HasSessionName("test-session-name-2"))) - .WillOnce(Return(make_ready_future(Status{}))); - - auto conn = MakeConnectionImpl(db, mock); - internal::OptionsSpan span(MakeLimitedTimeOptions()); - { - auto commit_results = conn->BatchWrite({{}, Options{}}); - auto it = commit_results.begin(); - ASSERT_NE(it, commit_results.end()); - EXPECT_THAT(*it, Not(IsOk())); - EXPECT_TRUE(IsSessionNotFound(it->status())) << it->status(); - EXPECT_EQ(++it, commit_results.end()); - } - - // "test-session-name-1" should not have been returned to the pool. - // The best (only?) way to verify this is to make another write and - // check that another session was allocated (hence the strict mock). - { - auto commit_results = conn->BatchWrite({{}, Options{}}); - auto it = commit_results.begin(); - ASSERT_NE(it, commit_results.end()); - EXPECT_THAT( - *it, - IsOkAndHolds(AllOf( - Field(&spanner::BatchedCommitResult::indexes, IsEmpty()), - Field(&spanner::BatchedCommitResult::commit_timestamp, - Eq(spanner::MakeTimestamp(absl::FromUnixSeconds(123))))))); - EXPECT_EQ(++it, commit_results.end()); - } -} - TEST(ConnectionImplTest, CommitAtLeastOnceBatchedExcludeFromChangeStreams) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); using BatchWriteRequest = google::spanner::v1::BatchWriteRequest; EXPECT_CALL(*mock, BatchWrite) .WillOnce([&](std::shared_ptr const&, Options const&, BatchWriteRequest const& request) { - EXPECT_EQ("test-session-name", request.session()); + EXPECT_EQ("multiplexed", request.session()); EXPECT_EQ(google::spanner::v1::RequestOptions::PRIORITY_UNSPECIFIED, request.request_options().priority()); EXPECT_THAT(request.request_options().request_tag(), IsEmpty()); @@ -3483,9 +3189,6 @@ TEST(ConnectionImplTest, CommitAtLeastOnceBatchedExcludeFromChangeStreams) { commit_timestamp { seconds: 123 } )pb"}); }); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span( @@ -3506,13 +3209,9 @@ TEST(ConnectionImplTest, CommitAtLeastOnceBatchedExcludeFromChangeStreams) { TEST(ConnectionImplTest, RollbackCreateSessionFailure) { auto mock = std::make_shared(); auto db = spanner::Database("project", "instance", "database"); - EXPECT_CALL(*mock, CreateSession(_, _, HasDatabase(db))) + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) .WillRepeatedly(Return( Status(StatusCode::kPermissionDenied, "uh-oh in CreateSession"))); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .Times(AtLeast(2)) - .WillRepeatedly(Return(Status(StatusCode::kPermissionDenied, - "uh-oh in BatchCreateSessions"))); EXPECT_CALL(*mock, Rollback).Times(0); EXPECT_CALL(*mock, AsyncDeleteSession).Times(0); @@ -3522,15 +3221,15 @@ TEST(ConnectionImplTest, RollbackCreateSessionFailure) { SetTransactionId(txn, "test-txn-id"); auto rollback = conn->Rollback({txn}); EXPECT_THAT(rollback, StatusIs(StatusCode::kPermissionDenied, - HasSubstr("uh-oh in BatchCreateSessions"))); + HasSubstr("uh-oh in CreateSession"))); } TEST(ConnectionImplTest, RollbackBeginTransaction) { auto mock = std::make_shared(); auto db = spanner::Database("project", "instance", "database"); - std::string const session_name = "test-session-name"; - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({session_name}))); + std::string const session_name = "multiplexed"; + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); std::string const transaction_id = "RollbackBeginTransaction"; EXPECT_CALL(*mock, BeginTransaction) .WillOnce(Return(MakeTestTransaction(transaction_id))); @@ -3538,9 +3237,6 @@ TEST(ConnectionImplTest, RollbackBeginTransaction) { AllOf(HasSession(session_name), HasNakedTransactionId(transaction_id)))) .WillOnce(Return(Status())); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -3552,12 +3248,9 @@ TEST(ConnectionImplTest, RollbackBeginTransaction) { TEST(ConnectionImplTest, RollbackSingleUseTransaction) { auto mock = std::make_shared(); auto db = spanner::Database("project", "instance", "database"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, Rollback).Times(0); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -3572,18 +3265,15 @@ TEST(ConnectionImplTest, RollbackSingleUseTransaction) { TEST(ConnectionImplTest, RollbackPermanentFailure) { auto mock = std::make_shared(); auto db = spanner::Database("project", "instance", "database"); - std::string const session_name = "test-session-name"; - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({session_name}))); + std::string const session_name = "multiplexed"; + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); std::string const transaction_id = "test-txn-id"; EXPECT_CALL(*mock, Rollback(_, _, - AllOf(HasSession(session_name), + AllOf(HasSession("multiplexed"), HasNakedTransactionId(transaction_id)))) .WillOnce( Return(Status(StatusCode::kPermissionDenied, "uh-oh in Rollback"))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedRetryOptions()); @@ -3597,9 +3287,9 @@ TEST(ConnectionImplTest, RollbackPermanentFailure) { TEST(ConnectionImplTest, RollbackTooManyTransientFailures) { auto mock = std::make_shared(); auto db = spanner::Database("project", "instance", "database"); - std::string const session_name = "test-session-name"; - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({session_name}))); + std::string const session_name = "multiplexed"; + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); std::string const transaction_id = "test-txn-id"; EXPECT_CALL(*mock, Rollback(_, _, AllOf(HasSession(session_name), @@ -3607,9 +3297,6 @@ TEST(ConnectionImplTest, RollbackTooManyTransientFailures) { .Times(AtLeast(2)) .WillRepeatedly( Return(Status(StatusCode::kUnavailable, "try-again in Rollback"))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedRetryOptions()); @@ -3623,18 +3310,15 @@ TEST(ConnectionImplTest, RollbackTooManyTransientFailures) { TEST(ConnectionImplTest, RollbackSuccess) { auto mock = std::make_shared(); auto db = spanner::Database("project", "instance", "database"); - std::string const session_name = "test-session-name"; - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({session_name}))); + std::string const session_name = "multiplexed"; + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); std::string const transaction_id = "test-txn-id"; EXPECT_CALL(*mock, Rollback(_, _, - AllOf(HasSession(session_name), + AllOf(HasSession("multiplexed"), HasNakedTransactionId(transaction_id)))) .WillOnce(Return(Status(StatusCode::kUnavailable, "try-again"))) .WillOnce(Return(Status())); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -3648,12 +3332,9 @@ TEST(ConnectionImplTest, RollbackInvalidatedTransaction) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, Rollback).Times(0); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -3673,22 +3354,19 @@ TEST(ConnectionImplTest, ReadPartition) { auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, BeginTransaction).Times(0); EXPECT_CALL(*mock, StreamingRead) .WillOnce([](std::shared_ptr const&, Options const&, google::spanner::v1::ReadRequest const& request) { - EXPECT_EQ("test-session-name", request.session()); + EXPECT_EQ("multiplexed", request.session()); EXPECT_EQ("Table", request.table()); EXPECT_EQ("DEADBEEF", request.partition_token()); EXPECT_TRUE(request.data_boost_enabled()); return MakeReader( {R"pb(metadata: { transaction: { id: "ABCDEF00" } })pb"}); }); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -3706,8 +3384,8 @@ TEST(ConnectionImplTest, PartitionReadSuccess) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); auto constexpr kTextPartitionResponse = R"pb( partitions: { partition_token: "BADDECAF" } partitions: { partition_token: "DEADBEEF" } @@ -3718,7 +3396,7 @@ TEST(ConnectionImplTest, PartitionReadSuccess) { TextFormat::ParseFromString(kTextPartitionResponse, &partition_response)); auto constexpr kTextPartitionRequest = R"pb( - session: "test-session-name" + session: "multiplexed" transaction: { begin { read_only { strong: true return_read_timestamp: true } } } @@ -3737,10 +3415,6 @@ TEST(ConnectionImplTest, PartitionReadSuccess) { .WillOnce(Return(Status(StatusCode::kUnavailable, "try-again"))) .WillOnce(Return(partition_response)); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, Not(HasSessionName("multiplexed")))) - .Times(0); - auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); spanner::Transaction txn = @@ -3758,16 +3432,16 @@ TEST(ConnectionImplTest, PartitionReadSuccess) { read_options}, {absl::nullopt, absl::nullopt, data_boost}}); ASSERT_STATUS_OK(result); - EXPECT_THAT(txn, HasSessionAndTransaction("test-session-name", "CAFEDEAD", - false, "")); + EXPECT_THAT(txn, + HasSessionAndTransaction("multiplexed", "CAFEDEAD", false, "")); std::vector expected_read_partitions = { spanner_internal::MakeReadPartition( - "CAFEDEAD", false, "", "test-session-name", "BADDECAF", "table", + "CAFEDEAD", false, "", "multiplexed", "BADDECAF", "table", spanner::KeySet::All(), {"UserId", "UserName"}, data_boost, read_options), spanner_internal::MakeReadPartition( - "CAFEDEAD", false, "", "test-session-name", "DEADBEEF", "table", + "CAFEDEAD", false, "", "multiplexed", "DEADBEEF", "table", spanner::KeySet::All(), {"UserId", "UserName"}, data_boost, read_options)}; @@ -3780,16 +3454,13 @@ TEST(ConnectionImplTest, PartitionReadPermanentFailure) { "placeholder_database_id"); { InSequence seq; - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); Status status(StatusCode::kPermissionDenied, "uh-oh"); EXPECT_CALL(*mock, PartitionRead).WillOnce(Return(status)); EXPECT_CALL(*mock, BeginTransaction) .WillOnce(Return(MakeTestTransaction())); EXPECT_CALL(*mock, PartitionRead).WillOnce(Return(status)); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, Not(HasSessionName("multiplexed")))) - .Times(0); } auto conn = MakeConnectionImpl(db, mock); @@ -3809,8 +3480,8 @@ TEST(ConnectionImplTest, PartitionReadTooManyTransientFailures) { "placeholder_database_id"); { InSequence seq; - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); Status status(StatusCode::kUnavailable, "try-again"); EXPECT_CALL(*mock, PartitionRead) .Times(AtLeast(2)) @@ -3820,9 +3491,6 @@ TEST(ConnectionImplTest, PartitionReadTooManyTransientFailures) { EXPECT_CALL(*mock, PartitionRead) .Times(AtLeast(2)) .WillRepeatedly(Return(status)); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, Not(HasSessionName("multiplexed")))) - .Times(0); } auto conn = MakeConnectionImpl(db, mock); @@ -3841,22 +3509,19 @@ TEST(ConnectionImplTest, QueryPartition) { auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, BeginTransaction).Times(0); EXPECT_CALL(*mock, ExecuteStreamingSql) .WillOnce([](std::shared_ptr const&, Options const&, google::spanner::v1::ExecuteSqlRequest const& request) { - EXPECT_EQ("test-session-name", request.session()); + EXPECT_EQ("multiplexed", request.session()); EXPECT_EQ("SELECT * FROM Table", request.sql()); EXPECT_EQ("DEADBEEF", request.partition_token()); EXPECT_TRUE(request.data_boost_enabled()); return MakeReader( {R"pb(metadata: { transaction: { id: "ABCDEF00" } })pb"}); }); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -3872,8 +3537,8 @@ TEST(ConnectionImplTest, PartitionQuerySuccess) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); auto constexpr kTextPartitionResponse = R"pb( partitions: { partition_token: "BADDECAF" } partitions: { partition_token: "DEADBEEF" } @@ -3884,7 +3549,7 @@ TEST(ConnectionImplTest, PartitionQuerySuccess) { TextFormat::ParseFromString(kTextPartitionResponse, &partition_response)); auto constexpr kTextPartitionRequest = R"pb( - session: "test-session-name" + session: "multiplexed" transaction: { begin { read_only { strong: true return_read_timestamp: true } } } @@ -3899,10 +3564,6 @@ TEST(ConnectionImplTest, PartitionQuerySuccess) { .WillOnce(Return(Status(StatusCode::kUnavailable, "try-again"))) .WillOnce(Return(partition_response)); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, Not(HasSessionName("multiplexed")))) - .Times(0); - auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); spanner::SqlStatement sql_statement("SELECT * FROM Table"); @@ -3914,12 +3575,12 @@ TEST(ConnectionImplTest, PartitionQuerySuccess) { ASSERT_STATUS_OK(result); std::vector expected_query_partitions = { - spanner_internal::MakeQueryPartition("CAFEDEAD", false, "", - "test-session-name", "BADDECAF", - data_boost, sql_statement), - spanner_internal::MakeQueryPartition("CAFEDEAD", false, "", - "test-session-name", "DEADBEEF", - data_boost, sql_statement)}; + spanner_internal::MakeQueryPartition("CAFEDEAD", false, "", "multiplexed", + "BADDECAF", data_boost, + sql_statement), + spanner_internal::MakeQueryPartition("CAFEDEAD", false, "", "multiplexed", + "DEADBEEF", data_boost, + sql_statement)}; EXPECT_THAT(*result, UnorderedPointwise(Eq(), expected_query_partitions)); } @@ -3931,15 +3592,12 @@ TEST(ConnectionImplTest, PartitionQueryPermanentFailure) { Status failed_status = Status(StatusCode::kPermissionDenied, "End of line."); { InSequence seq; - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, PartitionQuery).WillOnce(Return(failed_status)); EXPECT_CALL(*mock, BeginTransaction) .WillOnce(Return(MakeTestTransaction())); EXPECT_CALL(*mock, PartitionQuery).WillOnce(Return(failed_status)); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, Not(HasSessionName("multiplexed")))) - .Times(0); } auto conn = MakeConnectionImpl(db, mock); @@ -3960,8 +3618,8 @@ TEST(ConnectionImplTest, PartitionQueryTooManyTransientFailures) { Status(StatusCode::kUnavailable, "try-again in PartitionQuery"); { InSequence seq; - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, PartitionQuery) .Times(AtLeast(2)) .WillRepeatedly(Return(failed_status)); @@ -3970,9 +3628,6 @@ TEST(ConnectionImplTest, PartitionQueryTooManyTransientFailures) { EXPECT_CALL(*mock, PartitionQuery) .Times(AtLeast(2)) .WillRepeatedly(Return(failed_status)); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, Not(HasSessionName("multiplexed")))) - .Times(0); } auto conn = MakeConnectionImpl(db, mock); @@ -3990,36 +3645,15 @@ TEST(ConnectionImplTest, MultipleThreads) { auto db = spanner::Database("project", "instance", "database"); std::string const session_prefix = "test-session-prefix-"; std::string const role = "TestRole"; - std::atomic session_counter(0); - EXPECT_CALL(*mock, BatchCreateSessions( - _, _, AllOf(HasDatabase(db), HasCreatorRole(role)))) - .WillRepeatedly( - [&session_prefix, &session_counter]( - grpc::ClientContext&, Options const&, - google::spanner::v1::BatchCreateSessionsRequest const& request) { - google::spanner::v1::BatchCreateSessionsResponse response; - for (int i = 0; i < request.session_count(); ++i) { - response.add_session()->set_name( - session_prefix + std::to_string(++session_counter)); - } - return response; - }); + EXPECT_CALL(*mock, CreateSession(_, _, AllOf(IsMultiplexed()))) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, Rollback) .WillRepeatedly([session_prefix]( grpc::ClientContext&, Options const&, google::spanner::v1::RollbackRequest const& request) { - EXPECT_THAT(request.session(), StartsWith(session_prefix)); + EXPECT_THAT(request.session(), Eq("multiplexed")); return Status(); }); - EXPECT_CALL(*mock, AsyncDeleteSession) - .WillRepeatedly( - [session_prefix]( - CompletionQueue&, std::shared_ptr const&, - internal::ImmutableOptions const&, - google::spanner::v1::DeleteSessionRequest const& request) { - EXPECT_THAT(request.name(), StartsWith(session_prefix)); - return make_ready_future(Status{}); - }); int const per_thread_iterations = 1000; auto const thread_count = []() -> unsigned { @@ -4052,118 +3686,6 @@ TEST(ConnectionImplTest, MultipleThreads) { } } -/** - * @test Verify Transactions remain bound to a single Session. - * - * This test makes interleaved Read() calls using two separate Transactions, - * and ensures each Transaction uses the same session consistently. - */ -TEST(ConnectionImplTest, TransactionSessionBinding) { - auto mock = std::make_shared(); - auto db = spanner::Database("placeholder_project", "placeholder_instance", - "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"session-1"}))) - .WillOnce(Return(MakeSessionsResponse({"session-2"}))); - - constexpr int kNumResponses = 4; - std::array>, - kNumResponses> - readers; - for (int i = 0; i < kNumResponses; ++i) { - auto constexpr kText = R"pb( - metadata: { - row_type: { - fields: { - name: "Number", - type: { code: INT64 } - } - } - } - )pb"; - PartialResultSet response; - ASSERT_TRUE(TextFormat::ParseFromString(kText, &response)); - // The first two responses are reads from two different "begin" - // transactions. - if (i == 0) { - *response.mutable_metadata()->mutable_transaction() = - MakeTestTransaction("ABCDEF01"); - } else if (i == 1) { - *response.mutable_metadata()->mutable_transaction() = - MakeTestTransaction("ABCDEF02"); - } - response.add_values()->set_string_value(std::to_string(i)); - readers[i] = MakeReader({std::move(response)}); - } - - // Ensure the StreamingRead calls have the expected session and transaction - // IDs or "begin" set as appropriate. - { - InSequence s; - EXPECT_CALL( - *mock, StreamingRead( - _, _, AllOf(HasSession("session-1"), HasBeginTransaction()))) - .WillOnce(Return(ByMove(std::move(readers[0])))); - EXPECT_CALL( - *mock, StreamingRead( - _, _, AllOf(HasSession("session-2"), HasBeginTransaction()))) - .WillOnce(Return(ByMove(std::move(readers[1])))); - EXPECT_CALL(*mock, StreamingRead(_, _, - AllOf(HasSession("session-1"), - HasTransactionId("ABCDEF01")))) - .WillOnce(Return(ByMove(std::move(readers[2])))); - EXPECT_CALL(*mock, StreamingRead(_, _, - AllOf(HasSession("session-2"), - HasTransactionId("ABCDEF02")))) - .WillOnce(Return(ByMove(std::move(readers[3])))); - } - - EXPECT_CALL(*mock, AsyncDeleteSession(_, _, _, HasSessionName("session-1"))) - .WillOnce(Return(make_ready_future(Status{}))); - EXPECT_CALL(*mock, AsyncDeleteSession(_, _, _, HasSessionName("session-2"))) - .WillOnce(Return(make_ready_future(Status{}))); - - // Now do the actual reads and verify the results. - auto conn = MakeConnectionImpl(db, mock); - internal::OptionsSpan span(MakeLimitedTimeOptions()); - - spanner::Transaction txn1 = - MakeReadOnlyTransaction(spanner::Transaction::ReadOnlyOptions()); - auto rows = conn->Read({txn1, "table", spanner::KeySet::All(), {"Number"}}); - EXPECT_THAT(txn1, - HasSessionAndTransaction("session-1", "ABCDEF01", false, "")); - for (auto& row : spanner::StreamOf>(rows)) { - ASSERT_STATUS_OK(row); - EXPECT_EQ(std::get<0>(*row), 0); - } - - spanner::Transaction txn2 = - MakeReadOnlyTransaction(spanner::Transaction::ReadOnlyOptions()); - rows = conn->Read({txn2, "table", spanner::KeySet::All(), {"Number"}}); - EXPECT_THAT(txn2, - HasSessionAndTransaction("session-2", "ABCDEF02", false, "")); - for (auto& row : spanner::StreamOf>(rows)) { - ASSERT_STATUS_OK(row); - EXPECT_EQ(std::get<0>(*row), 1); - } - - rows = conn->Read({txn1, "table", spanner::KeySet::All(), {"Number"}}); - EXPECT_THAT(txn1, - HasSessionAndTransaction("session-1", "ABCDEF01", false, "")); - for (auto& row : spanner::StreamOf>(rows)) { - ASSERT_STATUS_OK(row); - EXPECT_EQ(std::get<0>(*row), 2); - } - - rows = conn->Read({txn2, "table", spanner::KeySet::All(), {"Number"}}); - EXPECT_THAT(txn2, - HasSessionAndTransaction("session-2", "ABCDEF02", false, "")); - for (auto& row : spanner::StreamOf>(rows)) { - ASSERT_STATUS_OK(row); - EXPECT_EQ(std::get<0>(*row), 3); - } -} - /** * @test Verify if a `Transaction` outlives the `ConnectionImpl` it was used * with, it does not call back into the deleted `ConnectionImpl` to release @@ -4173,8 +3695,8 @@ TEST(ConnectionImplTest, TransactionOutlivesConnection) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, BeginTransaction).Times(0); auto constexpr kText = R"pb( @@ -4183,13 +3705,6 @@ TEST(ConnectionImplTest, TransactionOutlivesConnection) { EXPECT_CALL(*mock, StreamingRead) .WillOnce(Return(ByMove(MakeReader({kText})))); - // Because the transaction outlives the connection, the session is not in - // the pool when the connection is destroyed, so the session is leaked. - // Only the multiplexed session is deleted. - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, Not(HasSessionName("multiplexed")))) - .Times(0); - auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); spanner::Transaction txn = @@ -4197,8 +3712,8 @@ TEST(ConnectionImplTest, TransactionOutlivesConnection) { auto rows = conn->Read( {txn, "table", spanner::KeySet::All(), {"UserId", "UserName"}}); EXPECT_TRUE(ContainsNoRows(rows)); - EXPECT_THAT(txn, HasSessionAndTransaction("test-session-name", "ABCDEF00", - false, "")); + EXPECT_THAT(txn, + HasSessionAndTransaction("multiplexed", "ABCDEF00", false, "")); // `conn` is the only reference to the `ConnectionImpl`, so dropping it will // cause the `ConnectionImpl` object to be deleted, while `txn` and its @@ -4206,85 +3721,13 @@ TEST(ConnectionImplTest, TransactionOutlivesConnection) { conn.reset(); } -TEST(ConnectionImplTest, ReadSessionNotFound) { - auto mock = std::make_shared>(); - auto db = spanner::Database("project", "instance", "database"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name-1"}))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name-2"}))); - EXPECT_CALL(*mock, StreamingRead) - .WillOnce([](std::shared_ptr const&, Options const&, - google::spanner::v1::ReadRequest const& request) { - EXPECT_THAT(request.session(), Eq("test-session-name-1")); - EXPECT_THAT(request.transaction().id(), Eq("test-txn-id-1")); - return MakeReader( - {}, SessionNotFoundError(request.session())); - }) - .WillOnce([](std::shared_ptr const&, Options const&, - google::spanner::v1::ReadRequest const& request) { - EXPECT_THAT(request.session(), Eq("test-session-name-2")); - EXPECT_THAT(request.transaction().id(), Eq("test-txn-id-2")); - return MakeReader({ - R"pb( - metadata: { - row_type: { - fields: { - name: "UserId", - type: { code: INT64 } - } - fields: { - name: "UserName", - type: { code: STRING } - } - } - } - )pb"}); - }); - EXPECT_CALL( - *mock, AsyncDeleteSession(_, _, _, HasSessionName("test-session-name-1"))) - .Times(0); - EXPECT_CALL( - *mock, AsyncDeleteSession(_, _, _, HasSessionName("test-session-name-2"))) - .WillOnce(Return(make_ready_future(Status{}))); - - auto conn = MakeConnectionImpl(db, mock); - internal::OptionsSpan span(MakeLimitedRetryOptions()); - { - auto txn = spanner::MakeReadWriteTransaction(); - SetTransactionId(txn, "test-txn-id-1"); - auto params = spanner::Connection::ReadParams{txn}; - auto response = GetSingularRow(conn->Read(std::move(params))); - EXPECT_THAT(response, Not(IsOk())); - auto const& status = response.status(); - EXPECT_TRUE(IsSessionNotFound(status)) << status; - EXPECT_THAT(txn, HasBadSession()); - } - - // "test-session-name-1" should not have been returned to the pool. - // The best (only?) way to verify this is to make another read and - // check that another session was allocated (hence the strict mock). - { - auto txn = spanner::MakeReadWriteTransaction(); - SetTransactionId(txn, "test-txn-id-2"); - auto params = spanner::Connection::ReadParams{txn}; - auto rows = conn->Read(std::move(params)); - using RowType = std::tuple; - auto stream = spanner::StreamOf(rows); - auto actual = std::vector>{stream.begin(), stream.end()}; - EXPECT_THAT(actual, IsEmpty()); - } -} - TEST(ConnectionImplTest, PartitionReadSessionNotFound) { auto mock = std::make_shared(); auto db = spanner::Database("project", "instance", "database"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, PartitionRead) - .WillOnce(Return(SessionNotFoundError("test-session-name"))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, Not(HasSessionName("multiplexed")))) - .Times(0); + .WillOnce(Return(SessionNotFoundError("multiplexed"))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedRetryOptions()); @@ -4301,15 +3744,12 @@ TEST(ConnectionImplTest, PartitionReadSessionNotFound) { TEST(ConnectionImplTest, ExecuteQuerySessionNotFound) { auto mock = std::make_shared(); auto db = spanner::Database("project", "instance", "database"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); - auto finish_status = SessionNotFoundError("test-session-name"); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); + auto finish_status = SessionNotFoundError("multiplexed"); EXPECT_CALL(*mock, ExecuteStreamingSql) .WillOnce( Return(ByMove(MakeReader({}, finish_status)))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, Not(HasSessionName("multiplexed")))) - .Times(0); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedRetryOptions()); @@ -4325,15 +3765,12 @@ TEST(ConnectionImplTest, ExecuteQuerySessionNotFound) { TEST(ConnectionImplTest, ProfileQuerySessionNotFound) { auto mock = std::make_shared(); auto db = spanner::Database("project", "instance", "database"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); - auto finish_status = SessionNotFoundError("test-session-name"); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); + auto finish_status = SessionNotFoundError("multiplexed"); EXPECT_CALL(*mock, ExecuteStreamingSql) .WillOnce( Return(ByMove(MakeReader({}, finish_status)))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, Not(HasSessionName("multiplexed")))) - .Times(0); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedRetryOptions()); @@ -4349,13 +3786,10 @@ TEST(ConnectionImplTest, ProfileQuerySessionNotFound) { TEST(ConnectionImplTest, ExecuteDmlSessionNotFound) { auto mock = std::make_shared(); auto db = spanner::Database("project", "instance", "database"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, ExecuteSql) - .WillOnce(Return(SessionNotFoundError("test-session-name"))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, Not(HasSessionName("multiplexed")))) - .Times(0); + .WillOnce(Return(SessionNotFoundError("multiplexed"))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedRetryOptions()); @@ -4371,13 +3805,10 @@ TEST(ConnectionImplTest, ExecuteDmlSessionNotFound) { TEST(ConnectionImplTest, ProfileDmlSessionNotFound) { auto mock = std::make_shared(); auto db = spanner::Database("project", "instance", "database"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, ExecuteSql) - .WillOnce(Return(SessionNotFoundError("test-session-name"))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, Not(HasSessionName("multiplexed")))) - .Times(0); + .WillOnce(Return(SessionNotFoundError("multiplexed"))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedRetryOptions()); @@ -4393,13 +3824,10 @@ TEST(ConnectionImplTest, ProfileDmlSessionNotFound) { TEST(ConnectionImplTest, AnalyzeSqlSessionNotFound) { auto mock = std::make_shared(); auto db = spanner::Database("project", "instance", "database"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, ExecuteSql) - .WillOnce(Return(SessionNotFoundError("test-session-name"))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, Not(HasSessionName("multiplexed")))) - .Times(0); + .WillOnce(Return(SessionNotFoundError("multiplexed"))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedRetryOptions()); @@ -4415,13 +3843,10 @@ TEST(ConnectionImplTest, AnalyzeSqlSessionNotFound) { TEST(ConnectionImplTest, PartitionQuerySessionNotFound) { auto mock = std::make_shared(); auto db = spanner::Database("project", "instance", "database"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, PartitionQuery) - .WillOnce(Return(SessionNotFoundError("test-session-name"))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, Not(HasSessionName("multiplexed")))) - .Times(0); + .WillOnce(Return(SessionNotFoundError("multiplexed"))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedRetryOptions()); @@ -4437,13 +3862,10 @@ TEST(ConnectionImplTest, PartitionQuerySessionNotFound) { TEST(ConnectionImplTest, ExecuteBatchDmlSessionNotFound) { auto mock = std::make_shared(); auto db = spanner::Database("project", "instance", "database"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, ExecuteBatchDml) - .WillOnce(Return(SessionNotFoundError("test-session-name"))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, Not(HasSessionName("multiplexed")))) - .Times(0); + .WillOnce(Return(SessionNotFoundError("multiplexed"))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedRetryOptions()); @@ -4466,13 +3888,10 @@ TEST(ConnectionImplTest, ExecutePartitionedDmlSessionNotFound) { TEST(ConnectionImplTest, CommitSessionNotFound) { auto mock = std::make_shared(); auto db = spanner::Database("project", "instance", "database"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, Commit) - .WillOnce(Return(SessionNotFoundError("test-session-name"))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, Not(HasSessionName("multiplexed")))) - .Times(0); + .WillOnce(Return(SessionNotFoundError("multiplexed"))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedRetryOptions()); @@ -4488,13 +3907,10 @@ TEST(ConnectionImplTest, CommitSessionNotFound) { TEST(ConnectionImplTest, RollbackSessionNotFound) { auto mock = std::make_shared(); auto db = spanner::Database("project", "instance", "database"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, Rollback) - .WillOnce(Return(SessionNotFoundError("test-session-name"))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, Not(HasSessionName("multiplexed")))) - .Times(0); + .WillOnce(Return(SessionNotFoundError("multiplexed"))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedRetryOptions()); @@ -4508,17 +3924,14 @@ TEST(ConnectionImplTest, RollbackSessionNotFound) { TEST(ConnectionImplTest, ReadRequestOrderByParameterUnspecified) { auto mock = std::make_shared(); auto db = spanner::Database("project", "instance", "database"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); Sequence s; EXPECT_CALL( *mock, StreamingRead( _, _, - AllOf(HasSession("test-session-name"), + AllOf(HasSession("multiplexed"), HasOrderBy( google::spanner::v1::ReadRequest::ORDER_BY_UNSPECIFIED)))) .InSequence(s) @@ -4537,25 +3950,21 @@ TEST(ConnectionImplTest, ReadRequestOrderByParameterUnspecified) { for (auto const& row : rows1) { (void)row; } - EXPECT_THAT(txn1, - HasSessionAndTransaction("test-session-name", "txn1", false, "")); + EXPECT_THAT(txn1, HasSessionAndTransaction("multiplexed", "txn1", false, "")); } TEST(ConnectionImplTest, ReadRequestOrderByParameterNoOrder) { auto mock = std::make_shared(); auto db = spanner::Database("project", "instance", "database"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); Sequence s; EXPECT_CALL( *mock, StreamingRead( _, _, AllOf( - HasSession("test-session-name"), + HasSession("multiplexed"), HasOrderBy(google::spanner::v1::ReadRequest::ORDER_BY_NO_ORDER)))) .InSequence(s) .WillOnce(Return(ByMove(MakeReader( @@ -4580,24 +3989,20 @@ TEST(ConnectionImplTest, ReadRequestOrderByParameterNoOrder) { for (auto const& row : rows1) { (void)row; } - EXPECT_THAT(txn1, - HasSessionAndTransaction("test-session-name", "txn1", false, "")); + EXPECT_THAT(txn1, HasSessionAndTransaction("multiplexed", "txn1", false, "")); } TEST(ConnectionImplTest, ReadRequestLockHintParameterUnspecified) { auto mock = std::make_shared(); auto db = spanner::Database("project", "instance", "database"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); Sequence s; EXPECT_CALL( *mock, StreamingRead( _, _, - AllOf(HasSession("test-session-name"), + AllOf(HasSession("multiplexed"), HasLockHint( google::spanner::v1::ReadRequest::LOCK_HINT_UNSPECIFIED)))) .InSequence(s) @@ -4616,25 +4021,21 @@ TEST(ConnectionImplTest, ReadRequestLockHintParameterUnspecified) { for (auto const& row : rows1) { (void)row; } - EXPECT_THAT(txn1, - HasSessionAndTransaction("test-session-name", "txn1", false, "")); + EXPECT_THAT(txn1, HasSessionAndTransaction("multiplexed", "txn1", false, "")); } TEST(ConnectionImplTest, ReadRequestLockHintShared) { auto mock = std::make_shared(); auto db = spanner::Database("project", "instance", "database"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); Sequence s; EXPECT_CALL( *mock, StreamingRead( _, _, AllOf( - HasSession("test-session-name"), + HasSession("multiplexed"), HasLockHint(google::spanner::v1::ReadRequest::LOCK_HINT_SHARED)))) .InSequence(s) .WillOnce(Return(ByMove(MakeReader( @@ -4660,19 +4061,15 @@ TEST(ConnectionImplTest, ReadRequestLockHintShared) { for (auto const& row : rows1) { (void)row; } - EXPECT_THAT(txn1, - HasSessionAndTransaction("test-session-name", "txn1", false, "")); + EXPECT_THAT(txn1, HasSessionAndTransaction("multiplexed", "txn1", false, "")); } TEST(ConnectionImplTest, OperationsFailOnInvalidatedTransaction) { auto mock = std::make_shared(); auto db = spanner::Database("placeholder_project", "placeholder_instance", "placeholder_database_id"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, HasDatabase(db))) - .WillOnce(Return(MakeSessionsResponse({"test-session-name"}))); - EXPECT_CALL(*mock, - AsyncDeleteSession(_, _, _, HasSessionName("test-session-name"))) - .WillOnce(Return(make_ready_future(Status{}))); + EXPECT_CALL(*mock, CreateSession(_, _, IsMultiplexed())) + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); auto conn = MakeConnectionImpl(db, mock); internal::OptionsSpan span(MakeLimitedTimeOptions()); @@ -4752,3 +4149,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner_internal } // namespace cloud } // namespace google +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/internal/database_admin_stub.cc b/google/cloud/spanner/internal/database_admin_stub.cc index b30ff25be4b4a..3092d53f23a18 100644 --- a/google/cloud/spanner/internal/database_admin_stub.cc +++ b/google/cloud/spanner/internal/database_admin_stub.cc @@ -17,8 +17,8 @@ #include "google/cloud/spanner/internal/database_admin_metadata.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/log.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/spanner/admin/database/v1/spanner_database_admin.grpc.pb.h" #include namespace google { diff --git a/google/cloud/spanner/internal/database_admin_stub.h b/google/cloud/spanner/internal/database_admin_stub.h index 7ffdc4a0614b1..3cde124566d2f 100644 --- a/google/cloud/spanner/internal/database_admin_stub.h +++ b/google/cloud/spanner/internal/database_admin_stub.h @@ -21,7 +21,7 @@ #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" -#include +#include "google/spanner/admin/database/v1/spanner_database_admin.pb.h" #include namespace google { diff --git a/google/cloud/spanner/internal/defaults.cc b/google/cloud/spanner/internal/defaults.cc index 863dc944c7e7f..fdfd785c366c8 100644 --- a/google/cloud/spanner/internal/defaults.cc +++ b/google/cloud/spanner/internal/defaults.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/internal/defaults.h" #include "google/cloud/spanner/internal/session_pool.h" #include "google/cloud/spanner/options.h" @@ -72,6 +72,8 @@ Options DefaultOptions(Options opts) { } } + opts.set({}); + // Sets Spanner-specific session-pool options. auto& num_channels = opts.lookup(); num_channels = (std::max)(num_channels, 1); @@ -164,3 +166,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner_internal } // namespace cloud } // namespace google +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/internal/defaults_test.cc b/google/cloud/spanner/internal/defaults_test.cc index f07d76d5d0a10..d3c2a498f65dd 100644 --- a/google/cloud/spanner/internal/defaults_test.cc +++ b/google/cloud/spanner/internal/defaults_test.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/internal/defaults.h" #include "google/cloud/spanner/internal/session_pool.h" #include "google/cloud/spanner/options.h" @@ -304,3 +304,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner } // namespace cloud } // namespace google +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/internal/instance_admin_stub.cc b/google/cloud/spanner/internal/instance_admin_stub.cc index d5f452f12e1c2..71a241459ba21 100644 --- a/google/cloud/spanner/internal/instance_admin_stub.cc +++ b/google/cloud/spanner/internal/instance_admin_stub.cc @@ -20,8 +20,8 @@ #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/log.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/spanner/admin/instance/v1/spanner_instance_admin.grpc.pb.h" #include namespace google { diff --git a/google/cloud/spanner/internal/instance_admin_stub.h b/google/cloud/spanner/internal/instance_admin_stub.h index 54b26e95f69e8..a500b207db054 100644 --- a/google/cloud/spanner/internal/instance_admin_stub.h +++ b/google/cloud/spanner/internal/instance_admin_stub.h @@ -21,7 +21,7 @@ #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" -#include +#include "google/spanner/admin/instance/v1/spanner_instance_admin.pb.h" #include namespace google { diff --git a/google/cloud/spanner/internal/merge_chunk.h b/google/cloud/spanner/internal/merge_chunk.h index 77fd6ecf447d2..92834a33dc36e 100644 --- a/google/cloud/spanner/internal/merge_chunk.h +++ b/google/cloud/spanner/internal/merge_chunk.h @@ -17,7 +17,7 @@ #include "google/cloud/spanner/version.h" #include "google/cloud/status.h" -#include +#include "google/protobuf/struct.pb.h" namespace google { namespace cloud { diff --git a/google/cloud/spanner/internal/merge_chunk_test.cc b/google/cloud/spanner/internal/merge_chunk_test.cc index c1fde868bc95e..be8ef9b6ab2b3 100644 --- a/google/cloud/spanner/internal/merge_chunk_test.cc +++ b/google/cloud/spanner/internal/merge_chunk_test.cc @@ -16,7 +16,7 @@ #include "google/cloud/spanner/value.h" #include "google/cloud/testing_util/is_proto_equal.h" #include "google/cloud/testing_util/status_matchers.h" -#include +#include "google/protobuf/struct.pb.h" #include #include #include diff --git a/google/cloud/spanner/internal/partial_result_set_reader.h b/google/cloud/spanner/internal/partial_result_set_reader.h index 8d71f8588aff7..db80d1f27e00c 100644 --- a/google/cloud/spanner/internal/partial_result_set_reader.h +++ b/google/cloud/spanner/internal/partial_result_set_reader.h @@ -19,7 +19,7 @@ #include "google/cloud/status.h" #include "google/cloud/status_or.h" #include "absl/types/optional.h" -#include +#include "google/spanner/v1/spanner.pb.h" #include #include #include diff --git a/google/cloud/spanner/internal/partial_result_set_resume_test.cc b/google/cloud/spanner/internal/partial_result_set_resume_test.cc index 844e9ceb14442..7fef58f76f520 100644 --- a/google/cloud/spanner/internal/partial_result_set_resume_test.cc +++ b/google/cloud/spanner/internal/partial_result_set_resume_test.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/internal/partial_result_set_resume.h" #include "google/cloud/spanner/internal/partial_result_set_source.h" #include "google/cloud/spanner/mocks/row.h" @@ -610,3 +610,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner_internal } // namespace cloud } // namespace google +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/internal/partial_result_set_source.cc b/google/cloud/spanner/internal/partial_result_set_source.cc index 937aa714df83d..bf763ff48082a 100644 --- a/google/cloud/spanner/internal/partial_result_set_source.cc +++ b/google/cloud/spanner/internal/partial_result_set_source.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/internal/partial_result_set_source.h" #include "google/cloud/spanner/internal/merge_chunk.h" #include "google/cloud/spanner/options.h" @@ -299,3 +299,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner_internal } // namespace cloud } // namespace google +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/internal/partial_result_set_source.h b/google/cloud/spanner/internal/partial_result_set_source.h index 16c74db827410..9e2bfc4f20cdc 100644 --- a/google/cloud/spanner/internal/partial_result_set_source.h +++ b/google/cloud/spanner/internal/partial_result_set_source.h @@ -23,10 +23,10 @@ #include "google/cloud/status.h" #include "google/cloud/status_or.h" #include "absl/types/optional.h" +#include "google/protobuf/struct.pb.h" +#include "google/spanner/v1/spanner.pb.h" #include #include -#include -#include #include #include #include diff --git a/google/cloud/spanner/internal/partial_result_set_source_test.cc b/google/cloud/spanner/internal/partial_result_set_source_test.cc index 1238436be66a9..bc3a408c41cff 100644 --- a/google/cloud/spanner/internal/partial_result_set_source_test.cc +++ b/google/cloud/spanner/internal/partial_result_set_source_test.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/internal/partial_result_set_source.h" #include "google/cloud/spanner/mocks/row.h" #include "google/cloud/spanner/options.h" @@ -938,3 +938,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner_internal } // namespace cloud } // namespace google +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/internal/route_to_leader.cc b/google/cloud/spanner/internal/route_to_leader.cc index f53a3615bd668..b404321fca9ec 100644 --- a/google/cloud/spanner/internal/route_to_leader.cc +++ b/google/cloud/spanner/internal/route_to_leader.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/internal/route_to_leader.h" #include "google/cloud/spanner/options.h" #include "google/cloud/options.h" @@ -33,3 +33,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner_internal } // namespace cloud } // namespace google +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/internal/route_to_leader_test.cc b/google/cloud/spanner/internal/route_to_leader_test.cc index df4bef1e6b1b9..58785f7136f56 100644 --- a/google/cloud/spanner/internal/route_to_leader_test.cc +++ b/google/cloud/spanner/internal/route_to_leader_test.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/internal/route_to_leader.h" #include "google/cloud/spanner/options.h" #include "google/cloud/options.h" @@ -82,3 +82,4 @@ TEST_F(RouteToLeader, OptionFalse) { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/internal/session_pool.cc b/google/cloud/spanner/internal/session_pool.cc index e1a9d6f03342f..ca064dad712c0 100644 --- a/google/cloud/spanner/internal/session_pool.cc +++ b/google/cloud/spanner/internal/session_pool.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/internal/session_pool.h" #include "google/cloud/spanner/internal/route_to_leader.h" #include "google/cloud/spanner/internal/session.h" @@ -734,3 +734,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner_internal } // namespace cloud } // namespace google +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/internal/session_pool.h b/google/cloud/spanner/internal/session_pool.h index ab108ae92af25..82ce975b059f4 100644 --- a/google/cloud/spanner/internal/session_pool.h +++ b/google/cloud/spanner/internal/session_pool.h @@ -28,7 +28,7 @@ #include "google/cloud/future.h" #include "google/cloud/status_or.h" #include "absl/container/fixed_array.h" -#include +#include "google/spanner/v1/spanner.pb.h" #include #include #include diff --git a/google/cloud/spanner/internal/session_pool_test.cc b/google/cloud/spanner/internal/session_pool_test.cc index 8f95b27a556e4..9f5cc8e619f6a 100644 --- a/google/cloud/spanner/internal/session_pool_test.cc +++ b/google/cloud/spanner/internal/session_pool_test.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/internal/session_pool.h" #include "google/cloud/spanner/internal/defaults.h" #include "google/cloud/spanner/internal/session.h" @@ -47,7 +47,6 @@ namespace { using ::google::cloud::testing_util::FakeCompletionQueueImpl; using ::google::cloud::testing_util::FakeSteadyClock; using ::google::cloud::testing_util::StatusIs; -using ::google::protobuf::TextFormat; using ::testing::_; using ::testing::AllOf; using ::testing::AnyOf; @@ -57,8 +56,6 @@ using ::testing::HasSubstr; using ::testing::Not; using ::testing::Pair; using ::testing::Return; -using ::testing::StrictMock; -using ::testing::UnorderedElementsAre; auto constexpr kRouteToLeader = "x-goog-spanner-route-to-leader"; @@ -125,20 +122,6 @@ google::spanner::v1::Session MakeMultiplexedSession(std::string name, return session; } -// Create a response with the given `sessions`. -google::spanner::v1::BatchCreateSessionsResponse MakeSessionsResponse( - std::vector sessions, std::string role = "") { - google::spanner::v1::BatchCreateSessionsResponse response; - for (auto& session : sessions) { - auto* s = response.add_session(); - s->set_name(std::move(session)); - *s->mutable_create_time() = Now(); - *s->mutable_approximate_last_use_time() = Now(); - if (!role.empty()) s->set_creator_role(role); - } - return response; -} - std::shared_ptr MakeTestSessionPool( spanner::Database db, std::vector> stubs, CompletionQueue cq, Options opts = {}) { @@ -162,9 +145,7 @@ TEST_F(SessionPoolTest, Multiplexed) { .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); google::cloud::internal::AutomaticallyCreatedBackgroundThreads threads; - auto pool = MakeTestSessionPool( - db, {mock}, threads.cq(), - Options{}.set({})); + auto pool = MakeTestSessionPool(db, {mock}, threads.cq(), {}); auto session = pool->Multiplexed(); ASSERT_STATUS_OK(session); EXPECT_EQ((*session)->session_name(), "multiplexed"); @@ -184,11 +165,10 @@ TEST_F(SessionPoolTest, MultiplexedAllocateRouteToLeader) { }); google::cloud::internal::AutomaticallyCreatedBackgroundThreads threads; - auto pool = MakeTestSessionPool( - db, {mock}, threads.cq(), - Options{} - .set(true) - .set({})); + auto pool = + MakeTestSessionPool(db, {mock}, threads.cq(), + Options{}.set(true)); + auto session = pool->Multiplexed(); ASSERT_STATUS_OK(session); EXPECT_EQ((*session)->session_name(), "multiplexed"); @@ -198,17 +178,16 @@ TEST_F(SessionPoolTest, MultiplexedAllocateRouteToLeader) { TEST_F(SessionPoolTest, AllocateRouteToLeader) { auto mock = std::make_shared(); auto db = spanner::Database("project", "instance", "database"); - EXPECT_CALL(*mock, - BatchCreateSessions( - _, _, AllOf(DatabaseIs(db.FullName()), SessionCountIs(42)))) + + EXPECT_CALL( + *mock, + CreateSession(_, _, AllOf(DatabaseIs(db.FullName()), IsMultiplexed()))) .WillOnce([this](grpc::ClientContext& context, Options const&, - google::spanner::v1::BatchCreateSessionsRequest const&) { + google::spanner::v1::CreateSessionRequest const&) { EXPECT_THAT(GetMetadata(context), Contains(Pair(kRouteToLeader, "true"))); - return MakeSessionsResponse({"session1"}); + return MakeMultiplexedSession("multiplexed"); }); - EXPECT_CALL(*mock, AsyncDeleteSession(_, _, _, SessionNameIs("session1"))) - .WillOnce(Return(make_ready_future(Status{}))); google::cloud::internal::AutomaticallyCreatedBackgroundThreads threads; auto pool = @@ -216,15 +195,16 @@ TEST_F(SessionPoolTest, AllocateRouteToLeader) { Options{} .set(true) .set(42)); - auto session = pool->Allocate(); + auto session = pool->Multiplexed(); ASSERT_STATUS_OK(session); - EXPECT_EQ((*session)->session_name(), "session1"); + EXPECT_EQ((*session)->session_name(), "multiplexed"); EXPECT_EQ(pool->GetStub(**session), mock); } TEST_F(SessionPoolTest, MultiplexedAllocateNoRouteToLeader) { auto mock = std::make_shared(); auto db = spanner::Database("project", "instance", "database"); + EXPECT_CALL( *mock, CreateSession(_, _, AllOf(DatabaseIs(db.FullName()), IsMultiplexed()))) @@ -237,11 +217,10 @@ TEST_F(SessionPoolTest, MultiplexedAllocateNoRouteToLeader) { }); google::cloud::internal::AutomaticallyCreatedBackgroundThreads threads; - auto pool = MakeTestSessionPool( - db, {mock}, threads.cq(), - Options{} - .set(false) - .set({})); + auto pool = + MakeTestSessionPool(db, {mock}, threads.cq(), + Options{}.set(false)); + auto session = pool->Multiplexed(); ASSERT_STATUS_OK(session); EXPECT_EQ((*session)->session_name(), "multiplexed"); @@ -251,18 +230,17 @@ TEST_F(SessionPoolTest, MultiplexedAllocateNoRouteToLeader) { TEST_F(SessionPoolTest, AllocateNoRouteToLeader) { auto mock = std::make_shared(); auto db = spanner::Database("project", "instance", "database"); - EXPECT_CALL(*mock, - BatchCreateSessions( - _, _, AllOf(DatabaseIs(db.FullName()), SessionCountIs(42)))) + + EXPECT_CALL( + *mock, + CreateSession(_, _, AllOf(DatabaseIs(db.FullName()), IsMultiplexed()))) .WillOnce([this](grpc::ClientContext& context, Options const&, - google::spanner::v1::BatchCreateSessionsRequest const&) { + google::spanner::v1::CreateSessionRequest const&) { EXPECT_THAT(GetMetadata(context), AnyOf(Contains(Pair(kRouteToLeader, "false")), Not(Contains(Pair(kRouteToLeader, _))))); - return MakeSessionsResponse({"session1"}); + return MakeMultiplexedSession("multiplexed"); }); - EXPECT_CALL(*mock, AsyncDeleteSession(_, _, _, SessionNameIs("session1"))) - .WillOnce(Return(make_ready_future(Status{}))); google::cloud::internal::AutomaticallyCreatedBackgroundThreads threads; auto pool = @@ -270,50 +248,12 @@ TEST_F(SessionPoolTest, AllocateNoRouteToLeader) { Options{} .set(false) .set(42)); - auto session = pool->Allocate(); + auto session = pool->Multiplexed(); ASSERT_STATUS_OK(session); - EXPECT_EQ((*session)->session_name(), "session1"); + EXPECT_EQ((*session)->session_name(), "multiplexed"); EXPECT_EQ(pool->GetStub(**session), mock); } -TEST_F(SessionPoolTest, ReleaseBadSession) { - auto mock = std::make_shared(); - auto db = spanner::Database("project", "instance", "database"); - EXPECT_CALL(*mock, - BatchCreateSessions( - _, _, AllOf(DatabaseIs(db.FullName()), SessionCountIs(1)))) - .WillOnce(Return(ByMove(MakeSessionsResponse({"session1"})))); - EXPECT_CALL(*mock, - BatchCreateSessions( - _, _, AllOf(DatabaseIs(db.FullName()), SessionCountIs(2)))) - .WillOnce(Return(ByMove(MakeSessionsResponse({"session2"})))); - EXPECT_CALL(*mock, AsyncDeleteSession(_, _, _, SessionNameIs("session1"))) - .Times(0); - EXPECT_CALL(*mock, AsyncDeleteSession(_, _, _, SessionNameIs("session2"))) - .WillOnce(Return(make_ready_future(Status{}))); - - google::cloud::internal::AutomaticallyCreatedBackgroundThreads threads; - auto pool = MakeTestSessionPool( - db, {mock}, threads.cq(), - Options{}.set(1)); - { - auto session = pool->Allocate(); - ASSERT_STATUS_OK(session); - EXPECT_EQ((*session)->session_name(), "session1"); - } - { - auto session = pool->Allocate(); - ASSERT_STATUS_OK(session); - EXPECT_EQ((*session)->session_name(), "session1"); - (*session)->set_bad(); // Marking session1 as bad - } - { - auto session = pool->Allocate(); - ASSERT_STATUS_OK(session); - EXPECT_EQ((*session)->session_name(), "session2"); // Got a new session - } -} - TEST_F(SessionPoolTest, MultiplexedCreateError) { auto mock = std::make_shared(); auto db = spanner::Database("project", "instance", "database"); @@ -322,213 +262,34 @@ TEST_F(SessionPoolTest, MultiplexedCreateError) { Return(ByMove(Status(StatusCode::kInternal, "init failure")))); google::cloud::internal::AutomaticallyCreatedBackgroundThreads threads; - auto pool = MakeTestSessionPool( - db, {mock}, threads.cq(), - Options{}.set({})); + auto pool = MakeTestSessionPool(db, {mock}, threads.cq(), {}); + auto session = pool->Multiplexed(); EXPECT_THAT(session, StatusIs(StatusCode::kInternal, HasSubstr("init failure"))); } -TEST_F(SessionPoolTest, CreateError) { - auto mock = std::make_shared(); - auto db = spanner::Database("project", "instance", "database"); - EXPECT_CALL(*mock, BatchCreateSessions) - .WillOnce(Return(ByMove(Status(StatusCode::kInternal, "init failure")))) - .WillOnce(Return(ByMove(Status(StatusCode::kInternal, "some failure")))); - EXPECT_CALL(*mock, AsyncDeleteSession).Times(0); - - google::cloud::internal::AutomaticallyCreatedBackgroundThreads threads; - auto pool = MakeTestSessionPool(db, {mock}, threads.cq()); - auto session = pool->Allocate(); - EXPECT_THAT(session, - StatusIs(StatusCode::kInternal, HasSubstr("some failure"))); -} - TEST_F(SessionPoolTest, ReuseSession) { auto mock = std::make_shared(); auto db = spanner::Database("project", "instance", "database"); - EXPECT_CALL(*mock, BatchCreateSessions) - .WillOnce(Return(ByMove(MakeSessionsResponse({"session1"})))); - EXPECT_CALL(*mock, AsyncDeleteSession(_, _, _, SessionNameIs("session1"))) - .WillOnce(Return(make_ready_future(Status{}))); + EXPECT_CALL( + *mock, + CreateSession(_, _, AllOf(DatabaseIs(db.FullName()), IsMultiplexed()))) + .WillOnce([](grpc::ClientContext&, Options const&, + google::spanner::v1::CreateSessionRequest const&) { + return MakeMultiplexedSession("multiplexed"); + }); google::cloud::internal::AutomaticallyCreatedBackgroundThreads threads; auto pool = MakeTestSessionPool(db, {mock}, threads.cq()); - auto session = pool->Allocate(); + auto session = pool->Multiplexed(); ASSERT_STATUS_OK(session); - EXPECT_EQ((*session)->session_name(), "session1"); + EXPECT_EQ((*session)->session_name(), "multiplexed"); session->reset(); - auto session2 = pool->Allocate(); - ASSERT_STATUS_OK(session2); - EXPECT_EQ((*session2)->session_name(), "session1"); -} - -TEST_F(SessionPoolTest, Lifo) { - auto mock = std::make_shared(); - auto db = spanner::Database("project", "instance", "database"); - EXPECT_CALL(*mock, BatchCreateSessions) - .WillOnce(Return(ByMove(MakeSessionsResponse({"session1"})))) - .WillOnce(Return(ByMove(MakeSessionsResponse({"session2"})))); - EXPECT_CALL(*mock, AsyncDeleteSession(_, _, _, SessionNameIs("session1"))) - .WillOnce(Return(make_ready_future(Status{}))); - EXPECT_CALL(*mock, AsyncDeleteSession(_, _, _, SessionNameIs("session2"))) - .WillOnce(Return(make_ready_future(Status{}))); - - google::cloud::internal::AutomaticallyCreatedBackgroundThreads threads; - auto pool = MakeTestSessionPool(db, {mock}, threads.cq()); - auto session = pool->Allocate(); - ASSERT_STATUS_OK(session); - EXPECT_EQ((*session)->session_name(), "session1"); - - auto session2 = pool->Allocate(); + auto session2 = pool->Multiplexed(); ASSERT_STATUS_OK(session2); - EXPECT_EQ((*session2)->session_name(), "session2"); - - session->reset(); - session2->reset(); - - // The pool is Last-In-First-Out (LIFO), so we expect to get the sessions - // back in the reverse order they were released. - auto session3 = pool->Allocate(); - ASSERT_STATUS_OK(session3); - EXPECT_EQ((*session3)->session_name(), "session2"); - - auto session4 = pool->Allocate(); - ASSERT_STATUS_OK(session4); - EXPECT_EQ((*session4)->session_name(), "session1"); -} - -TEST_F(SessionPoolTest, MinSessionsEagerAllocation) { - int const min_sessions = 3; - auto mock = std::make_shared(); - auto db = spanner::Database("project", "instance", "database"); - EXPECT_CALL(*mock, BatchCreateSessions(_, _, SessionCountIs(min_sessions))) - .WillOnce(Return(ByMove(MakeSessionsResponse({"s3", "s2", "s1"})))); - EXPECT_CALL(*mock, AsyncDeleteSession(_, _, _, SessionNameIs("s1"))) - .WillOnce(Return(make_ready_future(Status{}))); - EXPECT_CALL(*mock, AsyncDeleteSession(_, _, _, SessionNameIs("s2"))) - .WillOnce(Return(make_ready_future(Status{}))); - EXPECT_CALL(*mock, AsyncDeleteSession(_, _, _, SessionNameIs("s3"))) - .WillOnce(Return(make_ready_future(Status{}))); - - google::cloud::internal::AutomaticallyCreatedBackgroundThreads threads; - auto pool = MakeTestSessionPool( - db, {mock}, threads.cq(), - Options{}.set(min_sessions)); - auto session = pool->Allocate(); -} - -TEST_F(SessionPoolTest, MinSessionsMultipleAllocations) { - int const min_sessions = 3; - auto mock = std::make_shared(); - auto db = spanner::Database("project", "instance", "database"); - // The constructor will make this call. - EXPECT_CALL(*mock, BatchCreateSessions(_, _, SessionCountIs(min_sessions))) - .WillOnce(Return(ByMove(MakeSessionsResponse({"s3", "s2", "s1"})))); - // When we run out of sessions it will make this call. - EXPECT_CALL(*mock, - BatchCreateSessions(_, _, SessionCountIs(min_sessions + 1))) - .WillOnce(Return(ByMove(MakeSessionsResponse({"s7", "s6", "s5", "s4"})))); - EXPECT_CALL(*mock, AsyncDeleteSession(_, _, _, SessionNameIs("s1"))) - .WillOnce(Return(make_ready_future(Status{}))); - EXPECT_CALL(*mock, AsyncDeleteSession(_, _, _, SessionNameIs("s2"))) - .WillOnce(Return(make_ready_future(Status{}))); - EXPECT_CALL(*mock, AsyncDeleteSession(_, _, _, SessionNameIs("s3"))) - .WillOnce(Return(make_ready_future(Status{}))); - EXPECT_CALL(*mock, AsyncDeleteSession(_, _, _, SessionNameIs("s4"))) - .WillOnce(Return(make_ready_future(Status{}))); - EXPECT_CALL(*mock, AsyncDeleteSession(_, _, _, SessionNameIs("s5"))) - .WillOnce(Return(make_ready_future(Status{}))); - EXPECT_CALL(*mock, AsyncDeleteSession(_, _, _, SessionNameIs("s6"))) - .WillOnce(Return(make_ready_future(Status{}))); - EXPECT_CALL(*mock, AsyncDeleteSession(_, _, _, SessionNameIs("s7"))) - .WillOnce(Return(make_ready_future(Status{}))); - - google::cloud::internal::AutomaticallyCreatedBackgroundThreads threads; - auto pool = MakeTestSessionPool( - db, {mock}, threads.cq(), - Options{}.set(min_sessions)); - std::vector sessions; - std::vector session_names; - for (int i = 1; i <= 7; ++i) { - auto session = pool->Allocate(); - ASSERT_STATUS_OK(session); - session_names.push_back((*session)->session_name()); - sessions.push_back(*std::move(session)); - } - EXPECT_THAT(session_names, - UnorderedElementsAre("s1", "s2", "s3", "s4", "s5", "s6", "s7")); -} - -TEST_F(SessionPoolTest, MaxSessionsFailOnExhaustion) { - int const max_sessions_per_channel = 3; - auto mock = std::make_shared(); - auto db = spanner::Database("project", "instance", "database"); - EXPECT_CALL(*mock, BatchCreateSessions) - .WillOnce(Return(ByMove(MakeSessionsResponse({"s1"})))) - .WillOnce(Return(ByMove(MakeSessionsResponse({"s2"})))) - .WillOnce(Return(ByMove(MakeSessionsResponse({"s3"})))); - EXPECT_CALL(*mock, AsyncDeleteSession(_, _, _, SessionNameIs("s1"))) - .WillOnce(Return(make_ready_future(Status{}))); - EXPECT_CALL(*mock, AsyncDeleteSession(_, _, _, SessionNameIs("s2"))) - .WillOnce(Return(make_ready_future(Status{}))); - EXPECT_CALL(*mock, AsyncDeleteSession(_, _, _, SessionNameIs("s3"))) - .WillOnce(Return(make_ready_future(Status{}))); - - google::cloud::internal::AutomaticallyCreatedBackgroundThreads threads; - auto pool = MakeTestSessionPool( - db, {mock}, threads.cq(), - Options{} - .set( - max_sessions_per_channel) - .set( - spanner::ActionOnExhaustion::kFail)); - std::vector sessions; - std::vector session_names; - for (int i = 1; i <= 3; ++i) { - auto session = pool->Allocate(); - ASSERT_STATUS_OK(session); - session_names.push_back((*session)->session_name()); - sessions.push_back(*std::move(session)); - } - EXPECT_THAT(session_names, UnorderedElementsAre("s1", "s2", "s3")); - auto session = pool->Allocate(); - EXPECT_THAT(session, StatusIs(StatusCode::kResourceExhausted, - "session pool exhausted")); -} - -TEST_F(SessionPoolTest, MaxSessionsBlockUntilRelease) { - int const max_sessions_per_channel = 1; - auto mock = std::make_shared(); - auto db = spanner::Database("project", "instance", "database"); - EXPECT_CALL(*mock, BatchCreateSessions) - .WillOnce(Return(ByMove(MakeSessionsResponse({"s1"})))); - EXPECT_CALL(*mock, AsyncDeleteSession(_, _, _, SessionNameIs("s1"))) - .WillOnce(Return(make_ready_future(Status{}))); - - google::cloud::internal::AutomaticallyCreatedBackgroundThreads threads; - auto pool = MakeTestSessionPool( - db, {mock}, threads.cq(), - Options{} - .set( - max_sessions_per_channel) - .set( - spanner::ActionOnExhaustion::kBlock)); - auto session = pool->Allocate(); - ASSERT_STATUS_OK(session); - EXPECT_EQ((*session)->session_name(), "s1"); - - // This thread will block in Allocate() until the main thread releases s1. - std::thread t([&pool]() { - auto session = pool->Allocate(); - ASSERT_STATUS_OK(session); - EXPECT_EQ((*session)->session_name(), "s1"); - }); - - session->reset(); - t.join(); + EXPECT_EQ((*session2)->session_name(), "multiplexed"); } TEST_F(SessionPoolTest, MultiplexedLabels) { @@ -552,33 +313,12 @@ TEST_F(SessionPoolTest, MultiplexedLabels) { google::cloud::internal::AutomaticallyCreatedBackgroundThreads threads; auto pool = MakeTestSessionPool( db, {mock}, threads.cq(), - Options{} - .set(std::move(labels)) - .set({})); + Options{}.set(std::move(labels))); auto session = pool->Multiplexed(); ASSERT_STATUS_OK(session); EXPECT_EQ((*session)->session_name(), "multiplexed"); } -TEST_F(SessionPoolTest, Labels) { - auto mock = std::make_shared(); - auto db = spanner::Database("project", "instance", "database"); - std::map labels = { - {"k1", "v1"}, {"k2", "v2"}, {"k3", "v3"}}; - EXPECT_CALL(*mock, BatchCreateSessions(_, _, LabelsAre(labels))) - .WillOnce(Return(ByMove(MakeSessionsResponse({"session1"})))); - EXPECT_CALL(*mock, AsyncDeleteSession(_, _, _, SessionNameIs("session1"))) - .WillOnce(Return(make_ready_future(Status{}))); - - google::cloud::internal::AutomaticallyCreatedBackgroundThreads threads; - auto pool = MakeTestSessionPool( - db, {mock}, threads.cq(), - Options{}.set(std::move(labels))); - auto session = pool->Allocate(); - ASSERT_STATUS_OK(session); - EXPECT_EQ((*session)->session_name(), "session1"); -} - TEST_F(SessionPoolTest, MultiplexedCreatorRole) { auto mock = std::make_shared(); auto db = spanner::Database("project", "instance", "database"); @@ -596,143 +336,13 @@ TEST_F(SessionPoolTest, MultiplexedCreatorRole) { google::cloud::internal::AutomaticallyCreatedBackgroundThreads threads; auto pool = MakeTestSessionPool( db, {mock}, threads.cq(), - Options{} - .set(role) - .set({})); + Options{}.set(role)); + auto session = pool->Multiplexed(); ASSERT_STATUS_OK(session); EXPECT_EQ((*session)->session_name(), "multiplexed"); } -TEST_F(SessionPoolTest, CreatorRole) { - auto mock = std::make_shared(); - auto db = spanner::Database("project", "instance", "database"); - std::string const role = "public"; - EXPECT_CALL(*mock, - BatchCreateSessions( - _, _, AllOf(DatabaseIs(db.FullName()), CreatorRoleIs(role)))) - .WillOnce(Return(ByMove(MakeSessionsResponse({"session1"}, role)))); - EXPECT_CALL(*mock, AsyncDeleteSession(_, _, _, SessionNameIs("session1"))) - .WillOnce(Return(make_ready_future(Status{}))); - - google::cloud::internal::AutomaticallyCreatedBackgroundThreads threads; - auto pool = MakeTestSessionPool( - db, {mock}, threads.cq(), - Options{}.set(role)); - auto session = pool->Allocate(); - ASSERT_STATUS_OK(session); - EXPECT_EQ((*session)->session_name(), "session1"); -} - -TEST_F(SessionPoolTest, MultipleChannels) { - auto mock1 = std::make_shared(); - auto mock2 = std::make_shared(); - auto db = spanner::Database("project", "instance", "database"); - EXPECT_CALL(*mock1, CreateSession) - .WillRepeatedly( - Return(ByMove(Status(StatusCode::kInternal, "init failure")))); - EXPECT_CALL(*mock1, BatchCreateSessions) - .WillOnce(Return(ByMove(MakeSessionsResponse({"c1s1"})))) - .WillOnce(Return(ByMove(MakeSessionsResponse({"c1s2"})))) - .WillOnce(Return(ByMove(MakeSessionsResponse({"c1s3"})))); - EXPECT_CALL(*mock1, AsyncDeleteSession(_, _, _, SessionNameIs("c1s1"))) - .WillOnce(Return(make_ready_future(Status{}))); - EXPECT_CALL(*mock1, AsyncDeleteSession(_, _, _, SessionNameIs("c1s2"))) - .WillOnce(Return(make_ready_future(Status{}))); - EXPECT_CALL(*mock1, AsyncDeleteSession(_, _, _, SessionNameIs("c1s3"))) - .WillOnce(Return(make_ready_future(Status{}))); - EXPECT_CALL(*mock2, CreateSession) - .WillRepeatedly( - Return(ByMove(Status(StatusCode::kInternal, "init failure")))); - EXPECT_CALL(*mock2, BatchCreateSessions) - .WillOnce(Return(ByMove(MakeSessionsResponse({"c2s1"})))) - .WillOnce(Return(ByMove(MakeSessionsResponse({"c2s2"})))) - .WillOnce(Return(ByMove(MakeSessionsResponse({"c2s3"})))); - EXPECT_CALL(*mock2, AsyncDeleteSession(_, _, _, SessionNameIs("c2s1"))) - .WillOnce(Return(make_ready_future(Status{}))); - EXPECT_CALL(*mock2, AsyncDeleteSession(_, _, _, SessionNameIs("c2s2"))) - .WillOnce(Return(make_ready_future(Status{}))); - EXPECT_CALL(*mock2, AsyncDeleteSession(_, _, _, SessionNameIs("c2s3"))) - .WillOnce(Return(make_ready_future(Status{}))); - - google::cloud::internal::AutomaticallyCreatedBackgroundThreads threads; - auto pool = MakeTestSessionPool(db, {mock1, mock2}, threads.cq()); - std::vector sessions; - std::vector session_names; - for (int i = 1; i <= 6; ++i) { - auto session = pool->Allocate(); - ASSERT_STATUS_OK(session); - session_names.push_back((*session)->session_name()); - sessions.push_back(*std::move(session)); - } - EXPECT_THAT(session_names, UnorderedElementsAre("c1s1", "c1s2", "c1s3", - "c2s1", "c2s2", "c2s3")); -} - -TEST_F(SessionPoolTest, MultipleChannelsPreAllocation) { - auto mock1 = std::make_shared(); - auto mock2 = std::make_shared(); - auto mock3 = std::make_shared(); - auto db = spanner::Database("project", "instance", "database"); - EXPECT_CALL(*mock1, CreateSession) - .WillRepeatedly( - Return(ByMove(Status(StatusCode::kInternal, "init failure")))); - EXPECT_CALL(*mock1, BatchCreateSessions) - .WillOnce(Return(ByMove(MakeSessionsResponse({"c1s1", "c1s2", "c1s3"})))); - EXPECT_CALL(*mock1, AsyncDeleteSession(_, _, _, SessionNameIs("c1s1"))) - .WillOnce(Return(make_ready_future(Status{}))); - EXPECT_CALL(*mock1, AsyncDeleteSession(_, _, _, SessionNameIs("c1s2"))) - .WillOnce(Return(make_ready_future(Status{}))); - EXPECT_CALL(*mock1, AsyncDeleteSession(_, _, _, SessionNameIs("c1s3"))) - .WillOnce(Return(make_ready_future(Status{}))); - EXPECT_CALL(*mock2, CreateSession) - .WillRepeatedly( - Return(ByMove(Status(StatusCode::kInternal, "init failure")))); - EXPECT_CALL(*mock2, BatchCreateSessions) - .WillOnce(Return(ByMove(MakeSessionsResponse({"c2s1", "c2s2", "c2s3"})))); - EXPECT_CALL(*mock2, AsyncDeleteSession(_, _, _, SessionNameIs("c2s1"))) - .WillOnce(Return(make_ready_future(Status{}))); - EXPECT_CALL(*mock2, AsyncDeleteSession(_, _, _, SessionNameIs("c2s2"))) - .WillOnce(Return(make_ready_future(Status{}))); - EXPECT_CALL(*mock2, AsyncDeleteSession(_, _, _, SessionNameIs("c2s3"))) - .WillOnce(Return(make_ready_future(Status{}))); - EXPECT_CALL(*mock3, CreateSession) - .WillRepeatedly( - Return(ByMove(Status(StatusCode::kInternal, "init failure")))); - EXPECT_CALL(*mock3, BatchCreateSessions) - .WillOnce(Return(ByMove(MakeSessionsResponse({"c3s1", "c3s2", "c3s3"})))); - EXPECT_CALL(*mock3, AsyncDeleteSession(_, _, _, SessionNameIs("c3s1"))) - .WillOnce(Return(make_ready_future(Status{}))); - EXPECT_CALL(*mock3, AsyncDeleteSession(_, _, _, SessionNameIs("c3s2"))) - .WillOnce(Return(make_ready_future(Status{}))); - EXPECT_CALL(*mock3, AsyncDeleteSession(_, _, _, SessionNameIs("c3s3"))) - .WillOnce(Return(make_ready_future(Status{}))); - - google::cloud::internal::AutomaticallyCreatedBackgroundThreads threads; - // note that min_sessions will effectively be reduced to 9 - // (max_sessions_per_channel * num_channels). - auto pool = MakeTestSessionPool( - db, {mock1, mock2, mock3}, threads.cq(), - Options{} - .set(3) - .set( - spanner::ActionOnExhaustion::kFail)); - std::vector sessions; - std::vector session_names; - for (int i = 1; i <= 9; ++i) { - auto session = pool->Allocate(); - ASSERT_STATUS_OK(session); - session_names.push_back((*session)->session_name()); - sessions.push_back(*std::move(session)); - } - EXPECT_THAT(session_names, - UnorderedElementsAre("c1s1", "c1s2", "c1s3", "c2s1", "c2s2", - "c2s3", "c3s1", "c3s2", "c3s3")); - auto session = pool->Allocate(); - EXPECT_THAT(session, StatusIs(StatusCode::kResourceExhausted, - "session pool exhausted")); -} - TEST_F(SessionPoolTest, GetStubForStublessSession) { auto mock = std::make_shared(); auto db = spanner::Database("project", "instance", "database"); @@ -772,8 +382,7 @@ TEST_F(SessionPoolTest, MultilpexedSessionReplacementSuccess) { .set( background_interval) .set( - replacement_interval) - .set({})); + replacement_interval)); auto s1 = pool->Multiplexed(); ASSERT_STATUS_OK(s1); @@ -796,7 +405,7 @@ TEST_F(SessionPoolTest, MultilpexedSessionReplacementRpcPermanentFailure) { EXPECT_CALL( *mock, CreateSession(_, _, AllOf(DatabaseIs(db.FullName()), IsMultiplexed()))) - .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed1"})))); + .WillOnce(Return(ByMove(MakeMultiplexedSession({"multiplexed"})))); EXPECT_CALL(*mock, AsyncCreateSession(_, _, _, _)) .WillOnce(Return(make_ready_future(StatusOr( Status(StatusCode::kResourceExhausted, "retry policy exhausted"))))); @@ -814,172 +423,26 @@ TEST_F(SessionPoolTest, MultilpexedSessionReplacementRpcPermanentFailure) { .set( background_interval) .set( - replacement_interval) - .set({})); + replacement_interval)); auto s1 = pool->Multiplexed(); ASSERT_STATUS_OK(s1); - EXPECT_EQ((*s1)->session_name(), "multiplexed1"); + EXPECT_EQ((*s1)->session_name(), "multiplexed"); clock->AdvanceTime(background_interval); impl->SimulateCompletion(true); auto s2 = pool->Multiplexed(); ASSERT_STATUS_OK(s2); - EXPECT_EQ((*s2)->session_name(), "multiplexed1"); + EXPECT_EQ((*s2)->session_name(), "multiplexed"); // Cancel all pending operations, satisfying any remaining futures. impl->SimulateCompletion(false); } -TEST_F(SessionPoolTest, SessionRefresh) { - auto mock = std::make_shared>(); - EXPECT_CALL(*mock, BatchCreateSessions) - .WillOnce(Return(ByMove(MakeSessionsResponse({"s1"})))) - .WillOnce(Return(ByMove(MakeSessionsResponse({"s2"})))); - EXPECT_CALL(*mock, AsyncDeleteSession(_, _, _, SessionNameIs("s1"))) - .WillOnce(Return(make_ready_future(Status{}))); - EXPECT_CALL(*mock, AsyncDeleteSession(_, _, _, SessionNameIs("s2"))) - .WillOnce(Return(make_ready_future(Status{}))); - - google::spanner::v1::ResultSet result; - auto constexpr kResultSetText = R"pb( - metadata: { - row_type: { fields: { type: { code: INT64 } } } - transaction: {} - } - rows: { values: { string_value: "1" } } - )pb"; - ASSERT_TRUE(TextFormat::ParseFromString(kResultSetText, &result)); - - EXPECT_CALL(*mock, AsyncExecuteSql) - .WillOnce( - [&result](CompletionQueue&, auto, auto, - google::spanner::v1::ExecuteSqlRequest const& request) { - EXPECT_EQ("s2", request.session()); - return make_ready_future(make_status_or(std::move(result))); - }); - - auto db = spanner::Database("project", "instance", "database"); - auto impl = std::make_shared(); - auto keep_alive_interval = std::chrono::seconds(1); - auto clock = std::make_shared(); - auto pool = MakeTestSessionPool( - db, {mock}, CompletionQueue(impl), - Options{} - .set(keep_alive_interval) - .set(clock)); - - // Allocate and release two session, "s1" and "s2". This will satisfy the - // BatchCreateSessions() expectations. - { - auto s1 = pool->Allocate(); - ASSERT_STATUS_OK(s1); - EXPECT_EQ("s1", (*s1)->session_name()); - { - auto s2 = pool->Allocate(); - ASSERT_STATUS_OK(s2); - EXPECT_EQ("s2", (*s2)->session_name()); - } - // Wait for "s2" to need refreshing before releasing "s1". - clock->AdvanceTime(keep_alive_interval * 2); - } - - // Simulate completion of pending operations, which will result in - // a call to RefreshExpiringSessions(). This should refresh "s2" and - // satisfy the AsyncExecuteSql() expectation. - impl->SimulateCompletion(true); - - // We should still be able to allocate sessions "s1" and "s2". - auto s1 = pool->Allocate(); - ASSERT_STATUS_OK(s1); - EXPECT_EQ("s1", (*s1)->session_name()); - auto s2 = pool->Allocate(); - ASSERT_STATUS_OK(s2); - EXPECT_EQ("s2", (*s2)->session_name()); - - // Cancel all pending operations, satisfying any remaining futures. When - // compiling with exceptions disabled the destructors eventually invoke - // `std::abort()`. On real programs, shutting down the completion queue - // will have the same effect. - impl->SimulateCompletion(false); -} - -TEST_F(SessionPoolTest, SessionRefreshNotFound) { - auto mock = std::make_shared>(); - EXPECT_CALL(*mock, BatchCreateSessions) - .WillOnce(Return(ByMove(MakeSessionsResponse({"s1"})))) - .WillOnce(Return(ByMove(MakeSessionsResponse({"s2"})))) - .WillOnce(Return(ByMove(MakeSessionsResponse({"s3"})))); - EXPECT_CALL(*mock, AsyncDeleteSession(_, _, _, SessionNameIs("s1"))) - .WillOnce(Return(make_ready_future(Status{}))); - EXPECT_CALL(*mock, AsyncDeleteSession(_, _, _, SessionNameIs("s2"))).Times(0); - EXPECT_CALL(*mock, AsyncDeleteSession(_, _, _, SessionNameIs("s3"))) - .WillOnce(Return(make_ready_future(Status{}))); - - EXPECT_CALL(*mock, AsyncExecuteSql) - .WillOnce([](CompletionQueue&, auto, auto, - google::spanner::v1::ExecuteSqlRequest const& request) { - EXPECT_EQ("s2", request.session()); - // The "SELECT 1" refresh returns "Session not found". - return make_ready_future(StatusOr( - spanner_testing::SessionNotFoundError(request.session()))); - }); - - auto db = spanner::Database("project", "instance", "database"); - auto impl = std::make_shared(); - auto keep_alive_interval = std::chrono::seconds(1); - auto clock = std::make_shared(); - auto pool = MakeTestSessionPool( - db, {mock}, CompletionQueue(impl), - Options{} - .set(keep_alive_interval) - .set(clock)); - - // Allocate and release two session, "s1" and "s2". This will satisfy the - // the first two BatchCreateSessions() expectations. - { - auto s1 = pool->Allocate(); - ASSERT_STATUS_OK(s1); - EXPECT_EQ("s1", (*s1)->session_name()); - { - auto s2 = pool->Allocate(); - ASSERT_STATUS_OK(s2); - EXPECT_EQ("s2", (*s2)->session_name()); - } - // Wait for "s2" to need refreshing before releasing "s1". - clock->AdvanceTime(keep_alive_interval * 2); - } - EXPECT_EQ(pool->total_sessions(), 2); - - // Simulate completion of pending operations, which will result in - // a call to RefreshExpiringSessions(). This should refresh "s2" and - // satisfy the AsyncExecuteSql() expectation, which fails the call. - impl->SimulateCompletion(true); - EXPECT_EQ(pool->total_sessions(), 1); - - // We should still be able to allocate session "s1". - auto s1 = pool->Allocate(); - ASSERT_STATUS_OK(s1); - EXPECT_EQ("s1", (*s1)->session_name()); - EXPECT_EQ(pool->total_sessions(), 1); - - // However "s2" will be gone now, so a new allocation will produce - // "s3", satisfying the final BatchCreateSessions() expectation. - auto s3 = pool->Allocate(); - ASSERT_STATUS_OK(s3); - EXPECT_EQ("s3", (*s3)->session_name()); - EXPECT_EQ(pool->total_sessions(), 2); - - // Cancel all pending operations, satisfying any remaining futures. When - // compiling with exceptions disabled the destructors eventually invoke - // `std::abort()`. In non-test programs, the completion queue does this - // automatically as part of its shutdown. - impl->SimulateCompletion(false); -} - } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner_internal } // namespace cloud } // namespace google +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/internal/spanner_auth_decorator.cc b/google/cloud/spanner/internal/spanner_auth_decorator.cc index b70a5b2d1a737..26eaf0a09a652 100644 --- a/google/cloud/spanner/internal/spanner_auth_decorator.cc +++ b/google/cloud/spanner/internal/spanner_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/spanner/v1/spanner.proto #include "google/cloud/spanner/internal/spanner_auth_decorator.h" -#include +#include "google/spanner/v1/spanner.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_internal { @@ -228,3 +231,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/spanner/internal/spanner_auth_decorator.h b/google/cloud/spanner/internal/spanner_auth_decorator.h index ddf602a85ec0c..1c62ae46ba48b 100644 --- a/google/cloud/spanner/internal/spanner_auth_decorator.h +++ b/google/cloud/spanner/internal/spanner_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_internal { @@ -131,4 +134,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_INTERNAL_SPANNER_AUTH_DECORATOR_H diff --git a/google/cloud/spanner/internal/spanner_logging_decorator.cc b/google/cloud/spanner/internal/spanner_logging_decorator.cc index a41ac38d302ca..8da01f2f71e37 100644 --- a/google/cloud/spanner/internal/spanner_logging_decorator.cc +++ b/google/cloud/spanner/internal/spanner_logging_decorator.cc @@ -20,12 +20,15 @@ #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/internal/streaming_read_rpc_logging.h" #include "google/cloud/status_or.h" -#include +#include "google/spanner/v1/spanner.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_internal { @@ -299,3 +302,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/spanner/internal/spanner_logging_decorator.h b/google/cloud/spanner/internal/spanner_logging_decorator.h index d6349d1f86e8b..23c64796f981e 100644 --- a/google/cloud/spanner/internal/spanner_logging_decorator.h +++ b/google/cloud/spanner/internal/spanner_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_internal { @@ -132,4 +135,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_INTERNAL_SPANNER_LOGGING_DECORATOR_H diff --git a/google/cloud/spanner/internal/spanner_metadata_decorator.cc b/google/cloud/spanner/internal/spanner_metadata_decorator.cc index 94e93d46b9896..6bc4aa9bba599 100644 --- a/google/cloud/spanner/internal/spanner_metadata_decorator.cc +++ b/google/cloud/spanner/internal/spanner_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/spanner/internal/spanner_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/spanner/v1/spanner.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_internal { @@ -225,3 +229,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/spanner/internal/spanner_metadata_decorator.h b/google/cloud/spanner/internal/spanner_metadata_decorator.h index 559a16eea7828..21c5e6a310cfd 100644 --- a/google/cloud/spanner/internal/spanner_metadata_decorator.h +++ b/google/cloud/spanner/internal/spanner_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_internal { @@ -136,4 +139,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_INTERNAL_SPANNER_METADATA_DECORATOR_H diff --git a/google/cloud/spanner/internal/spanner_stub.cc b/google/cloud/spanner/internal/spanner_stub.cc index 5fe853065e92f..4b4be22900fbc 100644 --- a/google/cloud/spanner/internal/spanner_stub.cc +++ b/google/cloud/spanner/internal/spanner_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/spanner/internal/spanner_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "google/spanner/v1/spanner.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_internal { @@ -256,3 +259,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/spanner/internal/spanner_stub.h b/google/cloud/spanner/internal/spanner_stub.h index a494d2e088241..54037402ed126 100644 --- a/google/cloud/spanner/internal/spanner_stub.h +++ b/google/cloud/spanner/internal/spanner_stub.h @@ -25,10 +25,13 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/spanner/v1/spanner.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_internal { @@ -222,4 +225,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_INTERNAL_SPANNER_STUB_H diff --git a/google/cloud/spanner/internal/spanner_stub_factory_test.cc b/google/cloud/spanner/internal/spanner_stub_factory_test.cc index 65b1c3c45514c..b6315d1de8c26 100644 --- a/google/cloud/spanner/internal/spanner_stub_factory_test.cc +++ b/google/cloud/spanner/internal/spanner_stub_factory_test.cc @@ -112,7 +112,6 @@ TEST(DecorateSpannerStub, Logging) { Contains(AllOf(HasSubstr("CreateSession"), HasSubstr("fail")))); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::DisableTracing; using ::google::cloud::testing_util::EnableTracing; using ::google::cloud::testing_util::SpanNamed; @@ -168,7 +167,6 @@ TEST(DecorateSpannerStub, TracingDisabled) { EXPECT_THAT(span_catcher->GetSpans(), IsEmpty()); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END diff --git a/google/cloud/spanner/internal/spanner_tracing_stub.cc b/google/cloud/spanner/internal/spanner_tracing_stub.cc index 4e40897a4a5ba..b927b9b9a5783 100644 --- a/google/cloud/spanner/internal/spanner_tracing_stub.cc +++ b/google/cloud/spanner/internal/spanner_tracing_stub.cc @@ -22,13 +22,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SpannerTracingStub::SpannerTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -242,18 +243,14 @@ SpannerTracingStub::AsyncExecuteSql( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSpannerTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/spanner/internal/spanner_tracing_stub.h b/google/cloud/spanner/internal/spanner_tracing_stub.h index e2ca3b3d1b58b..9abf3bc8dc530 100644 --- a/google/cloud/spanner/internal/spanner_tracing_stub.h +++ b/google/cloud/spanner/internal/spanner_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace spanner_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SpannerTracingStub : public SpannerStub { public: ~SpannerTracingStub() override = default; @@ -127,8 +128,6 @@ class SpannerTracingStub : public SpannerStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -143,4 +142,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_INTERNAL_SPANNER_TRACING_STUB_H diff --git a/google/cloud/spanner/internal/status_utils.cc b/google/cloud/spanner/internal/status_utils.cc index cf01d5da5d108..e2c69451d7e16 100644 --- a/google/cloud/spanner/internal/status_utils.cc +++ b/google/cloud/spanner/internal/status_utils.cc @@ -14,12 +14,12 @@ #include "google/cloud/spanner/internal/status_utils.h" #include "google/cloud/grpc_error_delegate.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/status_payload_keys.h" #include "absl/strings/match.h" -#include -#include -#include +#include "absl/strings/str_cat.h" +#include "google/rpc/error_details.pb.h" +#include "google/rpc/status.pb.h" +#include "google/spanner/v1/spanner.pb.h" namespace google { namespace cloud { diff --git a/google/cloud/spanner/internal/transaction_impl.h b/google/cloud/spanner/internal/transaction_impl.h index a289abe039e64..abcb33a07ca98 100644 --- a/google/cloud/spanner/internal/transaction_impl.h +++ b/google/cloud/spanner/internal/transaction_impl.h @@ -20,7 +20,7 @@ #include "google/cloud/internal/invoke_result.h" #include "google/cloud/internal/port_platform.h" #include "google/cloud/status_or.h" -#include +#include "google/spanner/v1/transaction.pb.h" #include #include #include diff --git a/google/cloud/spanner/interval.cc b/google/cloud/spanner/interval.cc index b8baaf131ae39..8fcb122471d41 100644 --- a/google/cloud/spanner/interval.cc +++ b/google/cloud/spanner/interval.cc @@ -13,13 +13,13 @@ // limitations under the License. #include "google/cloud/spanner/interval.h" -#include "google/cloud/internal/absl_str_replace_quiet.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/internal/time_utils.h" #include "absl/strings/ascii.h" #include "absl/strings/match.h" #include "absl/strings/numbers.h" #include "absl/strings/str_format.h" +#include "absl/strings/str_replace.h" #include "absl/strings/string_view.h" #include "absl/strings/strip.h" #include "absl/time/time.h" diff --git a/google/cloud/spanner/keys.cc b/google/cloud/spanner/keys.cc index 333a3877e0cbe..2e54ce36142b4 100644 --- a/google/cloud/spanner/keys.cc +++ b/google/cloud/spanner/keys.cc @@ -14,8 +14,8 @@ #include "google/cloud/spanner/keys.h" #include "google/cloud/spanner/value.h" +#include "google/spanner/v1/keys.pb.h" #include -#include namespace google { namespace cloud { diff --git a/google/cloud/spanner/keys.h b/google/cloud/spanner/keys.h index d674baf040ddd..3f61463fc828e 100644 --- a/google/cloud/spanner/keys.h +++ b/google/cloud/spanner/keys.h @@ -17,7 +17,7 @@ #include "google/cloud/spanner/value.h" #include "google/cloud/spanner/version.h" -#include +#include "google/spanner/v1/keys.pb.h" #include #include diff --git a/google/cloud/spanner/keys_test.cc b/google/cloud/spanner/keys_test.cc index 139de6f11db7d..dfda69ac6b0ea 100644 --- a/google/cloud/spanner/keys_test.cc +++ b/google/cloud/spanner/keys_test.cc @@ -14,8 +14,8 @@ #include "google/cloud/spanner/keys.h" #include "google/cloud/testing_util/is_proto_equal.h" +#include "google/spanner/v1/keys.pb.h" #include -#include #include #include #include diff --git a/google/cloud/spanner/mocks/mock_database_admin_connection.h b/google/cloud/spanner/mocks/mock_database_admin_connection.h deleted file mode 100644 index 0ce3c7188d016..0000000000000 --- a/google/cloud/spanner/mocks/mock_database_admin_connection.h +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_MOCKS_MOCK_DATABASE_ADMIN_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_MOCKS_MOCK_DATABASE_ADMIN_CONNECTION_H - -#include "google/cloud/spanner/database_admin_connection.h" -#include "google/cloud/spanner/version.h" -#include - -namespace google { -namespace cloud { -namespace spanner_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/** - * A class to mock `google::cloud::spanner::DatabaseAdminConnection`. - * - * Application developers may want to test their code with simulated responses, - * including errors from a `spanner::DatabaseAdminClient`. To do so, construct a - * `spanner::DatabaseAdminClient` with an instance of this class. Then use the - * Google Test framework functions to program the behavior of this mock. - */ -class MockDatabaseAdminConnection - : public google::cloud::spanner::DatabaseAdminConnection { - public: - MOCK_METHOD(future>, - CreateDatabase, (CreateDatabaseParams), (override)); - MOCK_METHOD(StatusOr, - GetDatabase, (GetDatabaseParams), (override)); - MOCK_METHOD( - StatusOr, - GetDatabaseDdl, (GetDatabaseDdlParams), (override)); - MOCK_METHOD( - future>, - UpdateDatabase, (UpdateDatabaseParams), (override)); - MOCK_METHOD(Status, DropDatabase, (DropDatabaseParams), (override)); - MOCK_METHOD(spanner::ListDatabaseRange, ListDatabases, (ListDatabasesParams), - (override)); - MOCK_METHOD(future>, - RestoreDatabase, (RestoreDatabaseParams), (override)); - MOCK_METHOD(StatusOr, GetIamPolicy, - (GetIamPolicyParams), (override)); - MOCK_METHOD(StatusOr, SetIamPolicy, - (SetIamPolicyParams), (override)); - MOCK_METHOD(StatusOr, - TestIamPermissions, (TestIamPermissionsParams), (override)); - MOCK_METHOD(future>, - CreateBackup, (CreateBackupParams), (override)); - MOCK_METHOD(StatusOr, GetBackup, - (GetBackupParams), (override)); - MOCK_METHOD(Status, DeleteBackup, (DeleteBackupParams), (override)); - MOCK_METHOD(spanner::ListBackupsRange, ListBackups, (ListBackupsParams), - (override)); - MOCK_METHOD(StatusOr, - UpdateBackup, (UpdateBackupParams), (override)); - MOCK_METHOD(spanner::ListBackupOperationsRange, ListBackupOperations, - (ListBackupOperationsParams), (override)); - MOCK_METHOD(spanner::ListDatabaseOperationsRange, ListDatabaseOperations, - (ListDatabaseOperationsParams), (override)); -}; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace spanner_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_MOCKS_MOCK_DATABASE_ADMIN_CONNECTION_H diff --git a/google/cloud/spanner/mocks/mock_instance_admin_connection.h b/google/cloud/spanner/mocks/mock_instance_admin_connection.h deleted file mode 100644 index 6afdcb472dea2..0000000000000 --- a/google/cloud/spanner/mocks/mock_instance_admin_connection.h +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_MOCKS_MOCK_INSTANCE_ADMIN_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_MOCKS_MOCK_INSTANCE_ADMIN_CONNECTION_H - -#include "google/cloud/spanner/instance_admin_connection.h" -#include "google/cloud/spanner/version.h" -#include - -namespace google { -namespace cloud { -namespace spanner_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -/** - * A class to mock `google::cloud::spanner::InstanceAdminConnection`. - * - * Application developers may want to test their code with simulated responses, - * including errors from a `spanner::InstanceAdminClient`. To do so, construct a - * `spanner::InstanceAdminClient` with an instance of this class. Then use the - * Google Test framework functions to program the behavior of this mock. - */ -class MockInstanceAdminConnection - : public google::cloud::spanner::InstanceAdminConnection { - public: - MOCK_METHOD(StatusOr, - GetInstance, (GetInstanceParams), (override)); - MOCK_METHOD(future>, - CreateInstance, (CreateInstanceParams), (override)); - MOCK_METHOD(future>, - UpdateInstance, (UpdateInstanceParams), (override)); - MOCK_METHOD(Status, DeleteInstance, (DeleteInstanceParams), (override)); - MOCK_METHOD(StatusOr, - GetInstanceConfig, (GetInstanceConfigParams), (override)); - MOCK_METHOD(spanner::ListInstanceConfigsRange, ListInstanceConfigs, - (ListInstanceConfigsParams), (override)); - MOCK_METHOD(spanner::ListInstancesRange, ListInstances, (ListInstancesParams), - (override)); - MOCK_METHOD(StatusOr, GetIamPolicy, - (GetIamPolicyParams), (override)); - MOCK_METHOD(StatusOr, SetIamPolicy, - (SetIamPolicyParams), (override)); - MOCK_METHOD(StatusOr, - TestIamPermissions, (TestIamPermissionsParams), (override)); -}; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace spanner_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_MOCKS_MOCK_INSTANCE_ADMIN_CONNECTION_H diff --git a/google/cloud/spanner/mocks/row.h b/google/cloud/spanner/mocks/row.h index 1ff5b5102377d..62782965ba76f 100644 --- a/google/cloud/spanner/mocks/row.h +++ b/google/cloud/spanner/mocks/row.h @@ -18,6 +18,7 @@ #include "google/cloud/spanner/row.h" #include "google/cloud/spanner/value.h" #include "google/cloud/version.h" +#include #include #include #include @@ -27,9 +28,6 @@ namespace cloud { namespace spanner_mocks { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -// TODO(#9086): Delete this when the MakeRow() implementation is moved here. -#include "google/cloud/internal/disable_deprecation_warnings.inc" - /** * Creates a `spanner::Row` with the specified column names and values. * @@ -41,7 +39,14 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN */ inline spanner::Row MakeRow( std::vector> pairs) { - return spanner::MakeTestRow(std::move(pairs)); + auto values = std::vector{}; + auto columns = std::make_shared>(); + for (auto& p : pairs) { + values.emplace_back(std::move(p.second)); + columns->emplace_back(std::move(p.first)); + } + return spanner_internal::RowFriend::MakeRow(std::move(values), + std::move(columns)); } /** @@ -58,12 +63,14 @@ inline spanner::Row MakeRow( */ template spanner::Row MakeRow(Ts&&... ts) { - return spanner::MakeTestRow(std::forward(ts)...); + auto columns = std::make_shared>(); + for (std::size_t i = 0; i < sizeof...(ts); ++i) { + columns->emplace_back(std::to_string(i)); + } + std::vector v{spanner::Value(std::forward(ts))...}; + return spanner_internal::RowFriend::MakeRow(std::move(v), std::move(columns)); } -// TODO(#9086): Delete this when the MakeRow() implementation is moved here. -#include "google/cloud/internal/diagnostics_pop.inc" - GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner_mocks } // namespace cloud diff --git a/google/cloud/spanner/mutations.h b/google/cloud/spanner/mutations.h index d28a5161b4dfa..e342406680926 100644 --- a/google/cloud/spanner/mutations.h +++ b/google/cloud/spanner/mutations.h @@ -18,7 +18,7 @@ #include "google/cloud/spanner/keys.h" #include "google/cloud/spanner/value.h" #include "google/cloud/spanner/version.h" -#include +#include "google/spanner/v1/mutation.pb.h" #include #include diff --git a/google/cloud/spanner/options.h b/google/cloud/spanner/options.h index 663b605ae17ce..71ff33fcc68b0 100644 --- a/google/cloud/spanner/options.h +++ b/google/cloud/spanner/options.h @@ -77,7 +77,8 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN * * @ingroup google-cloud-spanner-options */ -struct EnableMultiplexedSessionOption { +struct GOOGLE_CLOUD_CPP_DEPRECATED("Multiplex Sessions are always enabled") + EnableMultiplexedSessionOption { using Type = absl::monostate; }; @@ -156,7 +157,8 @@ struct SessionCreatorRoleOption { * * @ingroup google-cloud-spanner-options */ -struct SessionPoolMinSessionsOption { +struct GOOGLE_CLOUD_CPP_DEPRECATED("Option not used with Multiplex Sessions") + SessionPoolMinSessionsOption { using Type = int; }; @@ -168,7 +170,8 @@ struct SessionPoolMinSessionsOption { * * @ingroup google-cloud-spanner-options */ -struct SessionPoolMaxSessionsPerChannelOption { +struct GOOGLE_CLOUD_CPP_DEPRECATED("Option not used with Multiplex Sessions") + SessionPoolMaxSessionsPerChannelOption { using Type = int; }; @@ -180,12 +183,14 @@ struct SessionPoolMaxSessionsPerChannelOption { * * @ingroup google-cloud-spanner-options */ -struct SessionPoolMaxIdleSessionsOption { +struct GOOGLE_CLOUD_CPP_DEPRECATED("Option not used with Multiplex Sessions") + SessionPoolMaxIdleSessionsOption { using Type = int; }; /// Action to take when the session pool is exhausted. -enum class ActionOnExhaustion { +enum class GOOGLE_CLOUD_CPP_DEPRECATED( + "Option not used with Multiplex Sessions") ActionOnExhaustion { /// Wait until a session is returned to the pool. kBlock, /// Fail the operation immediately. @@ -198,7 +203,8 @@ enum class ActionOnExhaustion { * * @ingroup google-cloud-spanner-options */ -struct SessionPoolActionOnExhaustionOption { +struct GOOGLE_CLOUD_CPP_DEPRECATED("Option not used with Multiplex Sessions") + SessionPoolActionOnExhaustionOption { using Type = spanner::ActionOnExhaustion; }; @@ -232,7 +238,8 @@ struct LockHintOption { * * @ingroup google-cloud-spanner-options */ -struct SessionPoolKeepAliveIntervalOption { +struct GOOGLE_CLOUD_CPP_DEPRECATED("Option not used with Multiplex Sessions") + SessionPoolKeepAliveIntervalOption { using Type = std::chrono::seconds; }; @@ -253,11 +260,9 @@ struct SessionPoolLabelsOption { /** * List of all SessionPool options. Pass to `spanner::MakeConnection()`. */ -using SessionPoolOptionList = OptionList< - RouteToLeaderOption, SessionCreatorRoleOption, SessionPoolMinSessionsOption, - SessionPoolMaxSessionsPerChannelOption, SessionPoolMaxIdleSessionsOption, - SessionPoolActionOnExhaustionOption, SessionPoolKeepAliveIntervalOption, - SessionPoolLabelsOption, EnableMultiplexedSessionOption>; +using SessionPoolOptionList = + OptionList; /** * Option for `google::cloud::Options` to set the optimizer version used in an diff --git a/google/cloud/spanner/partition_options.cc b/google/cloud/spanner/partition_options.cc index b96c3f0ad648c..3e8195c51e699 100644 --- a/google/cloud/spanner/partition_options.cc +++ b/google/cloud/spanner/partition_options.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/partition_options.h" #include "google/cloud/spanner/options.h" @@ -72,3 +72,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner_internal } // namespace cloud } // namespace google +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/partition_options.h b/google/cloud/spanner/partition_options.h index 3e71aa00531a3..f22f9b9512e29 100644 --- a/google/cloud/spanner/partition_options.h +++ b/google/cloud/spanner/partition_options.h @@ -19,7 +19,7 @@ #include "google/cloud/optional.h" #include "google/cloud/options.h" #include "absl/types/optional.h" -#include +#include "google/spanner/v1/spanner.pb.h" #include namespace google { diff --git a/google/cloud/spanner/proto_enum_test.cc b/google/cloud/spanner/proto_enum_test.cc index 5b40fcd2a3165..ec6f7755d003f 100644 --- a/google/cloud/spanner/proto_enum_test.cc +++ b/google/cloud/spanner/proto_enum_test.cc @@ -13,7 +13,7 @@ // limitations under the License. #include "google/cloud/spanner/proto_enum.h" -#include +#include "protos/google/cloud/spanner/testing/singer.pb.h" #include #include #include diff --git a/google/cloud/spanner/proto_message_test.cc b/google/cloud/spanner/proto_message_test.cc index 64221ee6291f0..dba85c9774272 100644 --- a/google/cloud/spanner/proto_message_test.cc +++ b/google/cloud/spanner/proto_message_test.cc @@ -14,7 +14,7 @@ #include "google/cloud/spanner/proto_message.h" #include "google/cloud/testing_util/is_proto_equal.h" -#include +#include "protos/google/cloud/spanner/testing/singer.pb.h" #include #include diff --git a/google/cloud/spanner/query_options.cc b/google/cloud/spanner/query_options.cc index ce682dabfea1a..2d04751078508 100644 --- a/google/cloud/spanner/query_options.cc +++ b/google/cloud/spanner/query_options.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/query_options.h" #include "google/cloud/spanner/options.h" @@ -54,3 +54,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner } // namespace cloud } // namespace google +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/query_options_test.cc b/google/cloud/spanner/query_options_test.cc index d5389a76220b0..3a60d897656d6 100644 --- a/google/cloud/spanner/query_options_test.cc +++ b/google/cloud/spanner/query_options_test.cc @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/query_options.h" #include "google/cloud/spanner/options.h" #include "google/cloud/spanner/version.h" @@ -132,3 +133,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner } // namespace cloud } // namespace google +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/query_partition.cc b/google/cloud/spanner/query_partition.cc index 1449f21aa42dd..289ba4c2fd0f0 100644 --- a/google/cloud/spanner/query_partition.cc +++ b/google/cloud/spanner/query_partition.cc @@ -11,10 +11,10 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/query_partition.h" #include "google/cloud/internal/make_status.h" -#include +#include "google/spanner/v1/spanner.pb.h" namespace google { namespace cloud { @@ -133,3 +133,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner } // namespace cloud } // namespace google +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/query_partition_test.cc b/google/cloud/spanner/query_partition_test.cc index 3e6cc8a87936b..cd34b2deda4a2 100644 --- a/google/cloud/spanner/query_partition_test.cc +++ b/google/cloud/spanner/query_partition_test.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/query_partition.h" #include "google/cloud/spanner/connection.h" #include "google/cloud/spanner/testing/matchers.h" @@ -176,3 +176,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner } // namespace cloud } // namespace google +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/quickstart/.bazelrc b/google/cloud/spanner/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/spanner/quickstart/.bazelrc +++ b/google/cloud/spanner/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/spanner/quickstart/CMakeLists.txt b/google/cloud/spanner/quickstart/CMakeLists.txt index 21bacf3deae92..b4df11cba8859 100644 --- a/google/cloud/spanner/quickstart/CMakeLists.txt +++ b/google/cloud/spanner/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This CMake file shows how to use the Cloud Spanner C++ client from a larger # CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-spanner-quickstart CXX) find_package(google_cloud_cpp_spanner REQUIRED) diff --git a/google/cloud/spanner/quickstart/quickstart.cc b/google/cloud/spanner/quickstart/quickstart.cc index 20637df503486..e4b6a644a4924 100644 --- a/google/cloud/spanner/quickstart/quickstart.cc +++ b/google/cloud/spanner/quickstart/quickstart.cc @@ -11,6 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +#include "google/cloud/internal/disable_deprecation_warnings.inc" //! [all] #include "google/cloud/spanner/client.h" @@ -41,3 +42,4 @@ int main(int argc, char* argv[]) { return 0; } //! [all] +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/read_options.cc b/google/cloud/spanner/read_options.cc index 82ce337c63f4b..75cb195f4959e 100644 --- a/google/cloud/spanner/read_options.cc +++ b/google/cloud/spanner/read_options.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/read_options.h" #include "google/cloud/spanner/options.h" @@ -58,3 +58,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner } // namespace cloud } // namespace google +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/read_partition.cc b/google/cloud/spanner/read_partition.cc index 6c2a7c18cf31c..dab03a30d97f6 100644 --- a/google/cloud/spanner/read_partition.cc +++ b/google/cloud/spanner/read_partition.cc @@ -11,10 +11,10 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/read_partition.h" #include "google/cloud/internal/make_status.h" -#include +#include "google/spanner/v1/spanner.pb.h" namespace google { namespace cloud { @@ -148,3 +148,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner } // namespace cloud } // namespace google +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/read_partition.h b/google/cloud/spanner/read_partition.h index bb90e84b4e0a0..9709e18524ec0 100644 --- a/google/cloud/spanner/read_partition.h +++ b/google/cloud/spanner/read_partition.h @@ -19,7 +19,7 @@ #include "google/cloud/spanner/keys.h" #include "google/cloud/spanner/version.h" #include "google/cloud/status_or.h" -#include +#include "google/spanner/v1/spanner.pb.h" #include #include diff --git a/google/cloud/spanner/read_partition_test.cc b/google/cloud/spanner/read_partition_test.cc index 14866aa7e5f9f..0e5481ae944b9 100644 --- a/google/cloud/spanner/read_partition_test.cc +++ b/google/cloud/spanner/read_partition_test.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/read_partition.h" #include "google/cloud/spanner/testing/matchers.h" #include "google/cloud/testing_util/is_proto_equal.h" @@ -234,3 +234,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner } // namespace cloud } // namespace google +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/results.cc b/google/cloud/spanner/results.cc index 93ecd924dcd79..b81ce553dfb23 100644 --- a/google/cloud/spanner/results.cc +++ b/google/cloud/spanner/results.cc @@ -14,7 +14,7 @@ #include "google/cloud/spanner/results.h" #include "absl/types/optional.h" -#include +#include "google/spanner/v1/result_set.pb.h" #include #include #include diff --git a/google/cloud/spanner/results.h b/google/cloud/spanner/results.h index b46f92e79b67d..9600792af5378 100644 --- a/google/cloud/spanner/results.h +++ b/google/cloud/spanner/results.h @@ -20,7 +20,7 @@ #include "google/cloud/spanner/version.h" #include "google/cloud/optional.h" #include "absl/types/optional.h" -#include +#include "google/spanner/v1/spanner.pb.h" #include #include #include diff --git a/google/cloud/spanner/results_test.cc b/google/cloud/spanner/results_test.cc index f182c799f9e74..a9d53bcb68c29 100644 --- a/google/cloud/spanner/results_test.cc +++ b/google/cloud/spanner/results_test.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/results.h" #include "google/cloud/spanner/mocks/mock_spanner_connection.h" #include "google/cloud/spanner/mocks/row.h" @@ -261,3 +261,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner } // namespace cloud } // namespace google +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/row.cc b/google/cloud/spanner/row.cc index 9db2726b5f477..4b02d98823f9e 100644 --- a/google/cloud/spanner/row.cc +++ b/google/cloud/spanner/row.cc @@ -35,16 +35,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END namespace spanner { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -Row MakeTestRow(std::vector> pairs) { - auto values = std::vector{}; - auto columns = std::make_shared>(); - for (auto& p : pairs) { - values.emplace_back(std::move(p.second)); - columns->emplace_back(std::move(p.first)); - } - return spanner_internal::RowFriend::MakeRow(std::move(values), - std::move(columns)); -} Row::Row() : Row({}, std::make_shared>()) {} diff --git a/google/cloud/spanner/row.h b/google/cloud/spanner/row.h index d73624551d1b6..3a288ab6b6b43 100644 --- a/google/cloud/spanner/row.h +++ b/google/cloud/spanner/row.h @@ -200,41 +200,6 @@ class Row { std::shared_ptr const> columns_; }; -/** - * Creates a `Row` with the specified column names and values. - * - * This overload accepts a vector of pairs, allowing the caller to specify both - * the column names and the `Value` that goes in each column. - * - * This function is intended for application developers who are mocking the - * results of a `Client::ExecuteQuery` call. - */ -GOOGLE_CLOUD_CPP_SPANNER_MAKE_TEST_ROW_DEPRECATED() -Row MakeTestRow(std::vector> pairs); - -/** - * Creates a `Row` with `Value`s created from the given arguments and with - * auto-generated column names. - * - * This overload accepts a variadic list of arguments that will be used to - * create the `Value`s in the row. The column names will be implicitly - * generated, the first column being "0", the second "1", and so on, - * corresponding to the argument's position. - * - * This function is intended for application developers who are mocking the - * results of a `Client::ExecuteQuery` call. - */ -template -GOOGLE_CLOUD_CPP_SPANNER_MAKE_TEST_ROW_DEPRECATED() -Row MakeTestRow(Ts&&... ts) { - auto columns = std::make_shared>(); - for (std::size_t i = 0; i < sizeof...(ts); ++i) { - columns->emplace_back(std::to_string(i)); - } - std::vector v{Value(std::forward(ts))...}; - return spanner_internal::RowFriend::MakeRow(std::move(v), std::move(columns)); -} - /** * A `RowStreamIterator` is an _Input Iterator_ (see below) that returns a * sequence of `StatusOr` objects. diff --git a/google/cloud/spanner/samples/BUILD.bazel b/google/cloud/spanner/samples/BUILD.bazel index fb52fefabf98e..ee79fbbc03e95 100644 --- a/google/cloud/spanner/samples/BUILD.bazel +++ b/google/cloud/spanner/samples/BUILD.bazel @@ -34,7 +34,7 @@ licenses(["notice"]) # Apache 2.0 "//:universe_domain", "//google/cloud/spanner:spanner_client_testing_private", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "//protos:system_includes", + # "//protos:system_includes", "//protos/google/cloud/spanner/testing:singer_cc_proto", ], ) for test in spanner_client_integration_samples] @@ -47,6 +47,6 @@ licenses(["notice"]) # Apache 2.0 "//:spanner", "//google/cloud/spanner:spanner_client_testing_private", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) for test in spanner_client_unit_samples] diff --git a/google/cloud/spanner/samples/client_samples.cc b/google/cloud/spanner/samples/client_samples.cc index d38b404221777..468bd1096fd32 100644 --- a/google/cloud/spanner/samples/client_samples.cc +++ b/google/cloud/spanner/samples/client_samples.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/admin/database_admin_client.h" #include "google/cloud/spanner/admin/instance_admin_client.h" #include "google/cloud/spanner/client.h" @@ -140,3 +140,4 @@ int main(int argc, char* argv[]) { // NOLINT(bugprone-exception-escape) }); return example.Run(argc, argv); } +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/samples/graph_samples.cc b/google/cloud/spanner/samples/graph_samples.cc index f01d2ac9009b5..547751b31df14 100644 --- a/google/cloud/spanner/samples/graph_samples.cc +++ b/google/cloud/spanner/samples/graph_samples.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/admin/database_admin_client.h" #include "google/cloud/spanner/admin/database_admin_options.h" #include "google/cloud/spanner/client.h" @@ -21,6 +21,7 @@ #include "google/cloud/spanner/timestamp.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/log.h" +#include "absl/time/clock.h" #include #include #include @@ -606,3 +607,4 @@ int main(int ac, char* av[]) try { std::cerr << ex.what() << "\n"; return 1; } +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/samples/mock_execute_query.cc b/google/cloud/spanner/samples/mock_execute_query.cc index 3927168aaa68a..0086a05858645 100644 --- a/google/cloud/spanner/samples/mock_execute_query.cc +++ b/google/cloud/spanner/samples/mock_execute_query.cc @@ -11,6 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +#include "google/cloud/internal/disable_deprecation_warnings.inc" //! [all] @@ -108,3 +109,4 @@ TEST(MockSpannerClient, SuccessfulExecuteQuery) { } // namespace //! [all] +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/samples/postgresql_samples.cc b/google/cloud/spanner/samples/postgresql_samples.cc index 6f8e8f83bcf8a..073fcbe11a9e7 100644 --- a/google/cloud/spanner/samples/postgresql_samples.cc +++ b/google/cloud/spanner/samples/postgresql_samples.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/admin/database_admin_client.h" #include "google/cloud/spanner/bytes.h" #include "google/cloud/spanner/client.h" @@ -1321,3 +1321,4 @@ int main(int ac, char* av[]) try { std::cerr << "\n" << ex.what() << "\n"; return 1; } +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/samples/samples.cc b/google/cloud/spanner/samples/samples.cc index 0d73109fae0c2..50fedd8ec1f0c 100644 --- a/google/cloud/spanner/samples/samples.cc +++ b/google/cloud/spanner/samples/samples.cc @@ -11,6 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +#include "google/cloud/internal/disable_deprecation_warnings.inc" //! [START spanner_quickstart] #include "google/cloud/spanner/client.h" @@ -42,7 +43,7 @@ #include "absl/time/clock.h" #include "absl/time/time.h" #include "absl/types/optional.h" -#include +#include "protos/google/cloud/spanner/testing/singer.pb.h" #include #include #include @@ -6280,3 +6281,4 @@ int main(int ac, char* av[]) try { std::cerr << ex.what() << "\n"; return 1; } +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/session_pool_options_test.cc b/google/cloud/spanner/session_pool_options_test.cc index 2fc944f4237ff..3ed25147a965f 100644 --- a/google/cloud/spanner/session_pool_options_test.cc +++ b/google/cloud/spanner/session_pool_options_test.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/session_pool_options.h" #include "google/cloud/spanner/version.h" #include @@ -82,3 +82,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner } // namespace cloud } // namespace google +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/spanner_client_unit_tests.bzl b/google/cloud/spanner/spanner_client_unit_tests.bzl index ad40b1f607946..6a501b33fdeb2 100644 --- a/google/cloud/spanner/spanner_client_unit_tests.bzl +++ b/google/cloud/spanner/spanner_client_unit_tests.bzl @@ -19,16 +19,11 @@ spanner_client_unit_tests = [ "backup_test.cc", "bytes_test.cc", - "client_options_test.cc", "client_test.cc", "commit_options_test.cc", "connection_options_test.cc", "create_instance_request_builder_test.cc", - "database_admin_client_test.cc", - "database_admin_connection_test.cc", "database_test.cc", - "instance_admin_client_test.cc", - "instance_admin_connection_test.cc", "instance_test.cc", "internal/connection_impl_test.cc", "internal/database_admin_logging_test.cc", diff --git a/google/cloud/spanner/sql_statement.h b/google/cloud/spanner/sql_statement.h index 4c3d80dd60cf7..ae33854a22ac3 100644 --- a/google/cloud/spanner/sql_statement.h +++ b/google/cloud/spanner/sql_statement.h @@ -18,7 +18,7 @@ #include "google/cloud/spanner/value.h" #include "google/cloud/spanner/version.h" #include "google/cloud/status_or.h" -#include +#include "google/spanner/v1/spanner.pb.h" #include #include #include diff --git a/google/cloud/spanner/testing/database_integration_test.cc b/google/cloud/spanner/testing/database_integration_test.cc index 5586420ec952b..c2f1184ce0bad 100644 --- a/google/cloud/spanner/testing/database_integration_test.cc +++ b/google/cloud/spanner/testing/database_integration_test.cc @@ -17,10 +17,10 @@ #include "google/cloud/spanner/testing/cleanup_stale_databases.h" #include "google/cloud/spanner/testing/pick_random_instance.h" #include "google/cloud/spanner/testing/random_database_name.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/testing_util/status_matchers.h" -#include +#include "absl/strings/str_cat.h" +#include "protos/google/cloud/spanner/testing/singer.pb.h" #include #include diff --git a/google/cloud/spanner/testing/pick_instance_config.h b/google/cloud/spanner/testing/pick_instance_config.h index 26b7cd0875af2..b5d5959677a1e 100644 --- a/google/cloud/spanner/testing/pick_instance_config.h +++ b/google/cloud/spanner/testing/pick_instance_config.h @@ -18,7 +18,7 @@ #include "google/cloud/spanner/version.h" #include "google/cloud/internal/random.h" #include "google/cloud/project.h" -#include +#include "google/spanner/admin/instance/v1/spanner_instance_admin.pb.h" #include #include diff --git a/google/cloud/spanner/testing/status_utils.cc b/google/cloud/spanner/testing/status_utils.cc index 1629f3110bd60..4ee7904e9caed 100644 --- a/google/cloud/spanner/testing/status_utils.cc +++ b/google/cloud/spanner/testing/status_utils.cc @@ -14,10 +14,10 @@ #include "google/cloud/spanner/testing/status_utils.h" #include "google/cloud/grpc_error_delegate.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include -#include -#include +#include "absl/strings/str_cat.h" +#include "google/rpc/error_details.pb.h" +#include "google/rpc/status.pb.h" +#include "google/spanner/v1/spanner.pb.h" namespace google { namespace cloud { diff --git a/google/cloud/spanner/timestamp.h b/google/cloud/spanner/timestamp.h index 11d05023f7277..27ec07416fafe 100644 --- a/google/cloud/spanner/timestamp.h +++ b/google/cloud/spanner/timestamp.h @@ -18,7 +18,7 @@ #include "google/cloud/spanner/version.h" #include "google/cloud/status_or.h" #include "absl/time/time.h" -#include +#include "google/protobuf/timestamp.pb.h" #include #include #include diff --git a/google/cloud/spanner/timestamp_test.cc b/google/cloud/spanner/timestamp_test.cc index 09262ec45c741..31dad46016ce4 100644 --- a/google/cloud/spanner/timestamp_test.cc +++ b/google/cloud/spanner/timestamp_test.cc @@ -14,7 +14,7 @@ #include "google/cloud/spanner/timestamp.h" #include "google/cloud/testing_util/status_matchers.h" -#include +#include "google/protobuf/timestamp.pb.h" #include #include #include diff --git a/google/cloud/spanner/transaction.cc b/google/cloud/spanner/transaction.cc index 31771427fddda..e4d76227fa45c 100644 --- a/google/cloud/spanner/transaction.cc +++ b/google/cloud/spanner/transaction.cc @@ -11,12 +11,12 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#include "google/cloud/internal/disable_deprecation_warnings.inc" #include "google/cloud/spanner/transaction.h" #include "google/cloud/spanner/internal/session.h" #include "google/cloud/spanner/internal/transaction_impl.h" #include "google/cloud/spanner/options.h" -#include +#include "google/protobuf/duration.pb.h" namespace google { namespace cloud { @@ -225,3 +225,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace spanner_internal } // namespace cloud } // namespace google +#include "google/cloud/internal/diagnostics_pop.inc" diff --git a/google/cloud/spanner/transaction.h b/google/cloud/spanner/transaction.h index 6bb76fe700ddc..f709eb6c88341 100644 --- a/google/cloud/spanner/transaction.h +++ b/google/cloud/spanner/transaction.h @@ -19,7 +19,7 @@ #include "google/cloud/spanner/timestamp.h" #include "google/cloud/spanner/version.h" #include "absl/types/optional.h" -#include +#include "google/spanner/v1/transaction.pb.h" #include #include #include diff --git a/google/cloud/spanner/update_instance_request_builder.h b/google/cloud/spanner/update_instance_request_builder.h index 46ee9ba4654ac..3b7b126ae6756 100644 --- a/google/cloud/spanner/update_instance_request_builder.h +++ b/google/cloud/spanner/update_instance_request_builder.h @@ -17,9 +17,9 @@ #include "google/cloud/spanner/instance.h" #include "google/cloud/spanner/version.h" +#include "google/spanner/admin/instance/v1/spanner_instance_admin.pb.h" #include #include -#include #include #include diff --git a/google/cloud/spanner/value.h b/google/cloud/spanner/value.h index 261af303fc21f..b6db62634de18 100644 --- a/google/cloud/spanner/value.h +++ b/google/cloud/spanner/value.h @@ -34,9 +34,9 @@ #include "google/cloud/status_or.h" #include "absl/time/civil_time.h" #include "absl/types/optional.h" -#include +#include "google/protobuf/struct.pb.h" +#include "google/spanner/v1/type.pb.h" #include -#include #include #include #include diff --git a/google/cloud/spanner/value_test.cc b/google/cloud/spanner/value_test.cc index 7d68ff7a46923..073d38a7800b0 100644 --- a/google/cloud/spanner/value_test.cc +++ b/google/cloud/spanner/value_test.cc @@ -18,7 +18,7 @@ #include "google/cloud/testing_util/status_matchers.h" #include "absl/time/time.h" #include "absl/types/optional.h" -#include +#include "protos/google/cloud/spanner/testing/singer.pb.h" #include #include #include diff --git a/google/cloud/spanner/version.h b/google/cloud/spanner/version.h index c1ceabf71de99..f297cdfa8b6ff 100644 --- a/google/cloud/spanner/version.h +++ b/google/cloud/spanner/version.h @@ -76,8 +76,6 @@ int constexpr Version() { return google::cloud::version(); } std::string VersionString(); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -// TODO(#7463) - remove backwards compatibility namespaces -namespace v1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace spanner } // namespace cloud } // namespace google diff --git a/google/cloud/speech/BUILD.bazel b/google/cloud/speech/BUILD.bazel index 7f211c3fcf76e..5b1fc246d16d4 100644 --- a/google/cloud/speech/BUILD.bazel +++ b/google/cloud/speech/BUILD.bazel @@ -19,14 +19,13 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", "v2/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/speech/v1:speech_cc_grpc", - "@com_google_googleapis//google/cloud/speech/v2:speech_cc_grpc", + "@googleapis//google/cloud/speech/v1:speech_cc_grpc", + "@googleapis//google/cloud/speech/v2:speech_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/speech/CMakeLists.txt b/google/cloud/speech/CMakeLists.txt index 91b886f41f8ad..65a95f2c110e0 100644 --- a/google/cloud/speech/CMakeLists.txt +++ b/google/cloud/speech/CMakeLists.txt @@ -18,7 +18,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library( speech "Cloud Speech-to-Text API" - SERVICE_DIRS "__EMPTY__" "v1/" "v2/" + SERVICE_DIRS "v1/" "v2/" BACKWARDS_COMPAT_PROTO_TARGETS "cloud_speech_protos") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) diff --git a/google/cloud/speech/mocks/mock_speech_connection.h b/google/cloud/speech/mocks/mock_speech_connection.h deleted file mode 100644 index 1b150b6eca38c..0000000000000 --- a/google/cloud/speech/mocks/mock_speech_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/speech/v1/cloud_speech.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_MOCKS_MOCK_SPEECH_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_MOCKS_MOCK_SPEECH_CONNECTION_H - -#include "google/cloud/speech/speech_connection.h" -#include "google/cloud/speech/v1/mocks/mock_speech_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in speech_v1_mocks instead of the aliases -/// defined in this namespace. -namespace speech_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use speech_v1_mocks::MockSpeechConnection directly. -using ::google::cloud::speech_v1_mocks::MockSpeechConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace speech_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_MOCKS_MOCK_SPEECH_CONNECTION_H diff --git a/google/cloud/speech/quickstart/.bazelrc b/google/cloud/speech/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/speech/quickstart/.bazelrc +++ b/google/cloud/speech/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/speech/quickstart/CMakeLists.txt b/google/cloud/speech/quickstart/CMakeLists.txt index f00678d80604a..e6d304bf1a678 100644 --- a/google/cloud/speech/quickstart/CMakeLists.txt +++ b/google/cloud/speech/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Speech-to-Text API C++ client library # from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-speech-quickstart CXX) find_package(google_cloud_cpp_speech REQUIRED) diff --git a/google/cloud/speech/speech_client.h b/google/cloud/speech/speech_client.h deleted file mode 100644 index dfa416c22b2cd..0000000000000 --- a/google/cloud/speech/speech_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/speech/v1/cloud_speech.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_SPEECH_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_SPEECH_CLIENT_H - -#include "google/cloud/speech/speech_connection.h" -#include "google/cloud/speech/v1/speech_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in speech_v1 instead of the aliases defined in -/// this namespace. -namespace speech { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use speech_v1::SpeechClient directly. -using ::google::cloud::speech_v1::SpeechClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace speech -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_SPEECH_CLIENT_H diff --git a/google/cloud/speech/speech_connection.h b/google/cloud/speech/speech_connection.h deleted file mode 100644 index 31f37b4489bc3..0000000000000 --- a/google/cloud/speech/speech_connection.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/speech/v1/cloud_speech.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_SPEECH_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_SPEECH_CONNECTION_H - -#include "google/cloud/speech/speech_connection_idempotency_policy.h" -#include "google/cloud/speech/v1/speech_connection.h" - -namespace google { -namespace cloud { -namespace speech { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use speech_v1::MakeSpeechConnection directly. -using ::google::cloud::speech_v1::MakeSpeechConnection; - -/// @deprecated Use speech_v1::SpeechConnection directly. -using ::google::cloud::speech_v1::SpeechConnection; - -/// @deprecated Use speech_v1::SpeechLimitedErrorCountRetryPolicy directly. -using ::google::cloud::speech_v1::SpeechLimitedErrorCountRetryPolicy; - -/// @deprecated Use speech_v1::SpeechLimitedTimeRetryPolicy directly. -using ::google::cloud::speech_v1::SpeechLimitedTimeRetryPolicy; - -/// @deprecated Use speech_v1::SpeechRetryPolicy directly. -using ::google::cloud::speech_v1::SpeechRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace speech -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_SPEECH_CONNECTION_H diff --git a/google/cloud/speech/speech_connection_idempotency_policy.h b/google/cloud/speech/speech_connection_idempotency_policy.h deleted file mode 100644 index eebf1175cd0af..0000000000000 --- a/google/cloud/speech/speech_connection_idempotency_policy.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/speech/v1/cloud_speech.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_SPEECH_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_SPEECH_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/speech/v1/speech_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace speech { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use speech_v1::MakeDefaultSpeechConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::speech_v1::MakeDefaultSpeechConnectionIdempotencyPolicy; - -/// @deprecated Use speech_v1::SpeechConnectionIdempotencyPolicy directly. -using ::google::cloud::speech_v1::SpeechConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace speech -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_SPEECH_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/speech/speech_options.h b/google/cloud/speech/speech_options.h deleted file mode 100644 index 4e7ac87acf863..0000000000000 --- a/google/cloud/speech/speech_options.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/speech/v1/cloud_speech.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_SPEECH_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_SPEECH_OPTIONS_H - -#include "google/cloud/speech/speech_connection.h" -#include "google/cloud/speech/speech_connection_idempotency_policy.h" -#include "google/cloud/speech/v1/speech_options.h" - -namespace google { -namespace cloud { -namespace speech { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use speech_v1::SpeechPollingPolicyOption directly. -using ::google::cloud::speech_v1::SpeechPollingPolicyOption; - -/// @deprecated Use speech_v1::SpeechBackoffPolicyOption directly. -using ::google::cloud::speech_v1::SpeechBackoffPolicyOption; - -/// @deprecated Use speech_v1::SpeechConnectionIdempotencyPolicyOption directly. -using ::google::cloud::speech_v1::SpeechConnectionIdempotencyPolicyOption; - -/// @deprecated Use speech_v1::SpeechPolicyOptionList directly. -using ::google::cloud::speech_v1::SpeechPolicyOptionList; - -/// @deprecated Use speech_v1::SpeechRetryPolicyOption directly. -using ::google::cloud::speech_v1::SpeechRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace speech -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_SPEECH_OPTIONS_H diff --git a/google/cloud/speech/v1/adaptation_connection.h b/google/cloud/speech/v1/adaptation_connection.h index 8a05fec6aaa07..9364d15c5dd69 100644 --- a/google/cloud/speech/v1/adaptation_connection.h +++ b/google/cloud/speech/v1/adaptation_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V1_ADAPTATION_CONNECTION_H #include "google/cloud/speech/v1/adaptation_connection_idempotency_policy.h" +#include "google/cloud/speech/v1/cloud_speech_adaptation.pb.h" #include "google/cloud/speech/v1/internal/adaptation_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/speech/v1/adaptation_connection_idempotency_policy.h b/google/cloud/speech/v1/adaptation_connection_idempotency_policy.h index d9eb54dd36a7e..d419b05a43ae6 100644 --- a/google/cloud/speech/v1/adaptation_connection_idempotency_policy.h +++ b/google/cloud/speech/v1/adaptation_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V1_ADAPTATION_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V1_ADAPTATION_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/speech/v1/cloud_speech_adaptation.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/speech/v1/internal/adaptation_auth_decorator.cc b/google/cloud/speech/v1/internal/adaptation_auth_decorator.cc index 200f07d57167b..31a7d75fb0547 100644 --- a/google/cloud/speech/v1/internal/adaptation_auth_decorator.cc +++ b/google/cloud/speech/v1/internal/adaptation_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/speech/v1/cloud_speech_adaptation.proto #include "google/cloud/speech/v1/internal/adaptation_auth_decorator.h" -#include +#include "google/cloud/speech/v1/cloud_speech_adaptation.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v1_internal { @@ -136,3 +139,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace speech_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/speech/v1/internal/adaptation_auth_decorator.h b/google/cloud/speech/v1/internal/adaptation_auth_decorator.h index 325d4dfef53c8..15df0ab82544d 100644 --- a/google/cloud/speech/v1/internal/adaptation_auth_decorator.h +++ b/google/cloud/speech/v1/internal/adaptation_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v1_internal { @@ -103,4 +106,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V1_INTERNAL_ADAPTATION_AUTH_DECORATOR_H diff --git a/google/cloud/speech/v1/internal/adaptation_logging_decorator.cc b/google/cloud/speech/v1/internal/adaptation_logging_decorator.cc index a84b5d529af17..c97d92bfc1ad0 100644 --- a/google/cloud/speech/v1/internal/adaptation_logging_decorator.cc +++ b/google/cloud/speech/v1/internal/adaptation_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/speech/v1/cloud_speech_adaptation.proto #include "google/cloud/speech/v1/internal/adaptation_logging_decorator.h" +#include "google/cloud/speech/v1/cloud_speech_adaptation.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v1_internal { @@ -183,3 +186,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace speech_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/speech/v1/internal/adaptation_logging_decorator.h b/google/cloud/speech/v1/internal/adaptation_logging_decorator.h index 872ee8a445b1a..252c152a2b0fc 100644 --- a/google/cloud/speech/v1/internal/adaptation_logging_decorator.h +++ b/google/cloud/speech/v1/internal/adaptation_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v1_internal { @@ -103,4 +106,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V1_INTERNAL_ADAPTATION_LOGGING_DECORATOR_H diff --git a/google/cloud/speech/v1/internal/adaptation_metadata_decorator.cc b/google/cloud/speech/v1/internal/adaptation_metadata_decorator.cc index 312dd4892dd78..474dcffadf686 100644 --- a/google/cloud/speech/v1/internal/adaptation_metadata_decorator.cc +++ b/google/cloud/speech/v1/internal/adaptation_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/speech/v1/cloud_speech_adaptation.proto #include "google/cloud/speech/v1/internal/adaptation_metadata_decorator.h" +#include "google/cloud/speech/v1/cloud_speech_adaptation.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v1_internal { @@ -166,3 +170,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace speech_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/speech/v1/internal/adaptation_metadata_decorator.h b/google/cloud/speech/v1/internal/adaptation_metadata_decorator.h index b4fd52ac1e2a4..4ec0761665659 100644 --- a/google/cloud/speech/v1/internal/adaptation_metadata_decorator.h +++ b/google/cloud/speech/v1/internal/adaptation_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v1_internal { @@ -108,4 +111,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V1_INTERNAL_ADAPTATION_METADATA_DECORATOR_H diff --git a/google/cloud/speech/v1/internal/adaptation_option_defaults.cc b/google/cloud/speech/v1/internal/adaptation_option_defaults.cc index 8194a2517a33f..8a7e8f1d4e073 100644 --- a/google/cloud/speech/v1/internal/adaptation_option_defaults.cc +++ b/google/cloud/speech/v1/internal/adaptation_option_defaults.cc @@ -40,7 +40,7 @@ Options AdaptationDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - speech_v1::AdaptationLimitedTimeRetryPolicy(std::chrono::minutes(30)) + speech_v1::AdaptationLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/speech/v1/internal/adaptation_stub.cc b/google/cloud/speech/v1/internal/adaptation_stub.cc index d344e21695ea1..d1db9b09d88eb 100644 --- a/google/cloud/speech/v1/internal/adaptation_stub.cc +++ b/google/cloud/speech/v1/internal/adaptation_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/speech/v1/cloud_speech_adaptation.proto #include "google/cloud/speech/v1/internal/adaptation_stub.h" +#include "google/cloud/speech/v1/cloud_speech_adaptation.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v1_internal { @@ -175,3 +178,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace speech_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/speech/v1/internal/adaptation_stub.h b/google/cloud/speech/v1/internal/adaptation_stub.h index d3958e3be9163..b1f233581b4c8 100644 --- a/google/cloud/speech/v1/internal/adaptation_stub.h +++ b/google/cloud/speech/v1/internal/adaptation_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V1_INTERNAL_ADAPTATION_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V1_INTERNAL_ADAPTATION_STUB_H +#include "google/cloud/speech/v1/cloud_speech_adaptation.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v1_internal { @@ -164,4 +167,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V1_INTERNAL_ADAPTATION_STUB_H diff --git a/google/cloud/speech/v1/internal/adaptation_stub_factory.cc b/google/cloud/speech/v1/internal/adaptation_stub_factory.cc index 79612b3e89d64..023ba00dbd0ea 100644 --- a/google/cloud/speech/v1/internal/adaptation_stub_factory.cc +++ b/google/cloud/speech/v1/internal/adaptation_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/speech/v1/cloud_speech_adaptation.proto #include "google/cloud/speech/v1/internal/adaptation_stub_factory.h" +#include "google/cloud/speech/v1/cloud_speech_adaptation.grpc.pb.h" #include "google/cloud/speech/v1/internal/adaptation_auth_decorator.h" #include "google/cloud/speech/v1/internal/adaptation_logging_decorator.h" #include "google/cloud/speech/v1/internal/adaptation_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v1_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace speech_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/speech/v1/internal/adaptation_stub_factory.h b/google/cloud/speech/v1/internal/adaptation_stub_factory.h index 1ab092324deb0..1bd643a5e59fd 100644 --- a/google/cloud/speech/v1/internal/adaptation_stub_factory.h +++ b/google/cloud/speech/v1/internal/adaptation_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V1_INTERNAL_ADAPTATION_STUB_FACTORY_H diff --git a/google/cloud/speech/v1/internal/adaptation_tracing_connection.cc b/google/cloud/speech/v1/internal/adaptation_tracing_connection.cc index c257af21efe52..3fe8e44619f92 100644 --- a/google/cloud/speech/v1/internal/adaptation_tracing_connection.cc +++ b/google/cloud/speech/v1/internal/adaptation_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace speech_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AdaptationTracingConnection::AdaptationTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -145,16 +143,12 @@ AdaptationTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAdaptationTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/speech/v1/internal/adaptation_tracing_connection.h b/google/cloud/speech/v1/internal/adaptation_tracing_connection.h index 8a9fe20d67bc5..9e67ac2fac0a0 100644 --- a/google/cloud/speech/v1/internal/adaptation_tracing_connection.h +++ b/google/cloud/speech/v1/internal/adaptation_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace speech_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AdaptationTracingConnection : public speech_v1::AdaptationConnection { public: ~AdaptationTracingConnection() override = default; @@ -85,8 +83,6 @@ class AdaptationTracingConnection : public speech_v1::AdaptationConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/speech/v1/internal/adaptation_tracing_stub.cc b/google/cloud/speech/v1/internal/adaptation_tracing_stub.cc index b215d4dfa5ba4..8201a7c92abf4 100644 --- a/google/cloud/speech/v1/internal/adaptation_tracing_stub.cc +++ b/google/cloud/speech/v1/internal/adaptation_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - AdaptationTracingStub::AdaptationTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -173,18 +174,14 @@ StatusOr AdaptationTracingStub::GetOperation( child_->GetOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeAdaptationTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace speech_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/speech/v1/internal/adaptation_tracing_stub.h b/google/cloud/speech/v1/internal/adaptation_tracing_stub.h index c90f7b696b072..1e7aef731bea7 100644 --- a/google/cloud/speech/v1/internal/adaptation_tracing_stub.h +++ b/google/cloud/speech/v1/internal/adaptation_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class AdaptationTracingStub : public AdaptationStub { public: ~AdaptationTracingStub() override = default; @@ -99,8 +100,6 @@ class AdaptationTracingStub : public AdaptationStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -115,4 +114,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V1_INTERNAL_ADAPTATION_TRACING_STUB_H diff --git a/google/cloud/speech/v1/internal/speech_auth_decorator.cc b/google/cloud/speech/v1/internal/speech_auth_decorator.cc index 757ce0eefb590..afc692bd6b766 100644 --- a/google/cloud/speech/v1/internal/speech_auth_decorator.cc +++ b/google/cloud/speech/v1/internal/speech_auth_decorator.cc @@ -17,11 +17,14 @@ // source: google/cloud/speech/v1/cloud_speech.proto #include "google/cloud/speech/v1/internal/speech_auth_decorator.h" +#include "google/cloud/speech/v1/cloud_speech.grpc.pb.h" #include "google/cloud/internal/async_read_write_stream_auth.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v1_internal { @@ -143,3 +146,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace speech_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/speech/v1/internal/speech_auth_decorator.h b/google/cloud/speech/v1/internal/speech_auth_decorator.h index 6cbdf1ee3f2ce..13902c8966063 100644 --- a/google/cloud/speech/v1/internal/speech_auth_decorator.h +++ b/google/cloud/speech/v1/internal/speech_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/speech/v1/internal/speech_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v1_internal { @@ -93,4 +96,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V1_INTERNAL_SPEECH_AUTH_DECORATOR_H diff --git a/google/cloud/speech/v1/internal/speech_connection_impl.h b/google/cloud/speech/v1/internal/speech_connection_impl.h index 471dc894e89eb..940fa78ef6bef 100644 --- a/google/cloud/speech/v1/internal/speech_connection_impl.h +++ b/google/cloud/speech/v1/internal/speech_connection_impl.h @@ -33,7 +33,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/speech/v1/internal/speech_logging_decorator.cc b/google/cloud/speech/v1/internal/speech_logging_decorator.cc index 98066d2c2aa89..186cbacb0f8a5 100644 --- a/google/cloud/speech/v1/internal/speech_logging_decorator.cc +++ b/google/cloud/speech/v1/internal/speech_logging_decorator.cc @@ -17,15 +17,18 @@ // source: google/cloud/speech/v1/cloud_speech.proto #include "google/cloud/speech/v1/internal/speech_logging_decorator.h" +#include "google/cloud/speech/v1/cloud_speech.grpc.pb.h" #include "google/cloud/internal/async_read_write_stream_logging.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v1_internal { @@ -165,3 +168,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace speech_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/speech/v1/internal/speech_logging_decorator.h b/google/cloud/speech/v1/internal/speech_logging_decorator.h index 5bcb5e9c441ae..d274faf2d89c7 100644 --- a/google/cloud/speech/v1/internal/speech_logging_decorator.h +++ b/google/cloud/speech/v1/internal/speech_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/speech/v1/internal/speech_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v1_internal { @@ -94,4 +97,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V1_INTERNAL_SPEECH_LOGGING_DECORATOR_H diff --git a/google/cloud/speech/v1/internal/speech_metadata_decorator.cc b/google/cloud/speech/v1/internal/speech_metadata_decorator.cc index 2663bc75c9c76..082bc87274325 100644 --- a/google/cloud/speech/v1/internal/speech_metadata_decorator.cc +++ b/google/cloud/speech/v1/internal/speech_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/speech/v1/cloud_speech.proto #include "google/cloud/speech/v1/internal/speech_metadata_decorator.h" +#include "google/cloud/speech/v1/cloud_speech.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v1_internal { @@ -138,3 +142,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace speech_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/speech/v1/internal/speech_metadata_decorator.h b/google/cloud/speech/v1/internal/speech_metadata_decorator.h index 4d0e90d1fded6..399384b36c717 100644 --- a/google/cloud/speech/v1/internal/speech_metadata_decorator.h +++ b/google/cloud/speech/v1/internal/speech_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/speech/v1/internal/speech_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v1_internal { @@ -98,4 +101,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V1_INTERNAL_SPEECH_METADATA_DECORATOR_H diff --git a/google/cloud/speech/v1/internal/speech_option_defaults.cc b/google/cloud/speech/v1/internal/speech_option_defaults.cc index bc018547e1850..b83e2f78d4da1 100644 --- a/google/cloud/speech/v1/internal/speech_option_defaults.cc +++ b/google/cloud/speech/v1/internal/speech_option_defaults.cc @@ -40,7 +40,7 @@ Options SpeechDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - speech_v1::SpeechLimitedTimeRetryPolicy(std::chrono::minutes(30)) + speech_v1::SpeechLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/speech/v1/internal/speech_stub.cc b/google/cloud/speech/v1/internal/speech_stub.cc index f1d635cb54942..fbafb523c9320 100644 --- a/google/cloud/speech/v1/internal/speech_stub.cc +++ b/google/cloud/speech/v1/internal/speech_stub.cc @@ -17,14 +17,17 @@ // source: google/cloud/speech/v1/cloud_speech.proto #include "google/cloud/speech/v1/internal/speech_stub.h" +#include "google/cloud/speech/v1/cloud_speech.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/internal/async_read_write_stream_impl.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v1_internal { @@ -157,3 +160,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace speech_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/speech/v1/internal/speech_stub.h b/google/cloud/speech/v1/internal/speech_stub.h index 404d8dab06263..e8abaf2cfa925 100644 --- a/google/cloud/speech/v1/internal/speech_stub.h +++ b/google/cloud/speech/v1/internal/speech_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V1_INTERNAL_SPEECH_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V1_INTERNAL_SPEECH_STUB_H +#include "google/cloud/speech/v1/cloud_speech.grpc.pb.h" #include "google/cloud/async_streaming_read_write_rpc.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v1_internal { @@ -150,4 +153,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V1_INTERNAL_SPEECH_STUB_H diff --git a/google/cloud/speech/v1/internal/speech_stub_factory.cc b/google/cloud/speech/v1/internal/speech_stub_factory.cc index 3005e1eb4be59..df06268764f24 100644 --- a/google/cloud/speech/v1/internal/speech_stub_factory.cc +++ b/google/cloud/speech/v1/internal/speech_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/speech/v1/cloud_speech.proto #include "google/cloud/speech/v1/internal/speech_stub_factory.h" +#include "google/cloud/speech/v1/cloud_speech.grpc.pb.h" #include "google/cloud/speech/v1/internal/speech_auth_decorator.h" #include "google/cloud/speech/v1/internal/speech_logging_decorator.h" #include "google/cloud/speech/v1/internal/speech_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v1_internal { @@ -69,3 +72,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace speech_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/speech/v1/internal/speech_stub_factory.h b/google/cloud/speech/v1/internal/speech_stub_factory.h index 124fe32c9efef..faa61fff7d15c 100644 --- a/google/cloud/speech/v1/internal/speech_stub_factory.h +++ b/google/cloud/speech/v1/internal/speech_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V1_INTERNAL_SPEECH_STUB_FACTORY_H diff --git a/google/cloud/speech/v1/internal/speech_tracing_connection.cc b/google/cloud/speech/v1/internal/speech_tracing_connection.cc index 4d680eadd758c..8cc000ee16af2 100644 --- a/google/cloud/speech/v1/internal/speech_tracing_connection.cc +++ b/google/cloud/speech/v1/internal/speech_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace speech_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SpeechTracingConnection::SpeechTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -96,15 +94,11 @@ StatusOr SpeechTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSpeechTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/speech/v1/internal/speech_tracing_connection.h b/google/cloud/speech/v1/internal/speech_tracing_connection.h index 705d74ddccfac..a48357f0652e9 100644 --- a/google/cloud/speech/v1/internal/speech_tracing_connection.h +++ b/google/cloud/speech/v1/internal/speech_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace speech_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SpeechTracingConnection : public speech_v1::SpeechConnection { public: ~SpeechTracingConnection() override = default; @@ -71,8 +69,6 @@ class SpeechTracingConnection : public speech_v1::SpeechConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/speech/v1/internal/speech_tracing_stub.cc b/google/cloud/speech/v1/internal/speech_tracing_stub.cc index a204626591229..2a510e3ae37bb 100644 --- a/google/cloud/speech/v1/internal/speech_tracing_stub.cc +++ b/google/cloud/speech/v1/internal/speech_tracing_stub.cc @@ -22,13 +22,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SpeechTracingStub::SpeechTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -140,18 +141,14 @@ future SpeechTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSpeechTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace speech_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/speech/v1/internal/speech_tracing_stub.h b/google/cloud/speech/v1/internal/speech_tracing_stub.h index 32ebbf32b9335..a17e67f184d2b 100644 --- a/google/cloud/speech/v1/internal/speech_tracing_stub.h +++ b/google/cloud/speech/v1/internal/speech_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SpeechTracingStub : public SpeechStub { public: ~SpeechTracingStub() override = default; @@ -88,8 +89,6 @@ class SpeechTracingStub : public SpeechStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -104,4 +103,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V1_INTERNAL_SPEECH_TRACING_STUB_H diff --git a/google/cloud/speech/v1/speech_client.h b/google/cloud/speech/v1/speech_client.h index 321d1ffc0b8a5..b7cf192cefcc9 100644 --- a/google/cloud/speech/v1/speech_client.h +++ b/google/cloud/speech/v1/speech_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/speech/v1/speech_connection.h b/google/cloud/speech/v1/speech_connection.h index 706e288c0bf9c..1924d14d2df94 100644 --- a/google/cloud/speech/v1/speech_connection.h +++ b/google/cloud/speech/v1/speech_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V1_SPEECH_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V1_SPEECH_CONNECTION_H +#include "google/cloud/speech/v1/cloud_speech.pb.h" #include "google/cloud/speech/v1/internal/speech_retry_traits.h" #include "google/cloud/speech/v1/speech_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -31,8 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/speech/v1/speech_connection_idempotency_policy.h b/google/cloud/speech/v1/speech_connection_idempotency_policy.h index 470090a8926c9..bf3cd2dc53d7c 100644 --- a/google/cloud/speech/v1/speech_connection_idempotency_policy.h +++ b/google/cloud/speech/v1/speech_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V1_SPEECH_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V1_SPEECH_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/speech/v1/cloud_speech.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/speech/v2/internal/speech_auth_decorator.cc b/google/cloud/speech/v2/internal/speech_auth_decorator.cc index 2548d0a5fa3f6..111590625104a 100644 --- a/google/cloud/speech/v2/internal/speech_auth_decorator.cc +++ b/google/cloud/speech/v2/internal/speech_auth_decorator.cc @@ -17,11 +17,14 @@ // source: google/cloud/speech/v2/cloud_speech.proto #include "google/cloud/speech/v2/internal/speech_auth_decorator.h" +#include "google/cloud/speech/v2/cloud_speech.grpc.pb.h" #include "google/cloud/internal/async_read_write_stream_auth.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v2_internal { @@ -579,3 +582,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace speech_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/speech/v2/internal/speech_auth_decorator.h b/google/cloud/speech/v2/internal/speech_auth_decorator.h index b097cbdba1322..443be8e939467 100644 --- a/google/cloud/speech/v2/internal/speech_auth_decorator.h +++ b/google/cloud/speech/v2/internal/speech_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/speech/v2/internal/speech_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v2_internal { @@ -285,4 +288,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V2_INTERNAL_SPEECH_AUTH_DECORATOR_H diff --git a/google/cloud/speech/v2/internal/speech_connection_impl.h b/google/cloud/speech/v2/internal/speech_connection_impl.h index c25fde9d80893..85e09d6232ac6 100644 --- a/google/cloud/speech/v2/internal/speech_connection_impl.h +++ b/google/cloud/speech/v2/internal/speech_connection_impl.h @@ -33,7 +33,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/speech/v2/internal/speech_logging_decorator.cc b/google/cloud/speech/v2/internal/speech_logging_decorator.cc index 0ef00f263e678..a0bc0150288f8 100644 --- a/google/cloud/speech/v2/internal/speech_logging_decorator.cc +++ b/google/cloud/speech/v2/internal/speech_logging_decorator.cc @@ -17,15 +17,18 @@ // source: google/cloud/speech/v2/cloud_speech.proto #include "google/cloud/speech/v2/internal/speech_logging_decorator.h" +#include "google/cloud/speech/v2/cloud_speech.grpc.pb.h" #include "google/cloud/internal/async_read_write_stream_logging.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v2_internal { @@ -666,3 +669,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace speech_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/speech/v2/internal/speech_logging_decorator.h b/google/cloud/speech/v2/internal/speech_logging_decorator.h index b5e97c3951d00..d8d3d919c15f3 100644 --- a/google/cloud/speech/v2/internal/speech_logging_decorator.h +++ b/google/cloud/speech/v2/internal/speech_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/speech/v2/internal/speech_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v2_internal { @@ -286,4 +289,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V2_INTERNAL_SPEECH_LOGGING_DECORATOR_H diff --git a/google/cloud/speech/v2/internal/speech_metadata_decorator.cc b/google/cloud/speech/v2/internal/speech_metadata_decorator.cc index 4c0b2cbd76e80..50a8983cd1c8a 100644 --- a/google/cloud/speech/v2/internal/speech_metadata_decorator.cc +++ b/google/cloud/speech/v2/internal/speech_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/speech/v2/cloud_speech.proto #include "google/cloud/speech/v2/internal/speech_metadata_decorator.h" +#include "google/cloud/speech/v2/cloud_speech.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v2_internal { @@ -492,3 +496,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace speech_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/speech/v2/internal/speech_metadata_decorator.h b/google/cloud/speech/v2/internal/speech_metadata_decorator.h index a30d439aa5954..5e6bc06721d56 100644 --- a/google/cloud/speech/v2/internal/speech_metadata_decorator.h +++ b/google/cloud/speech/v2/internal/speech_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/speech/v2/internal/speech_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v2_internal { @@ -290,4 +293,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V2_INTERNAL_SPEECH_METADATA_DECORATOR_H diff --git a/google/cloud/speech/v2/internal/speech_option_defaults.cc b/google/cloud/speech/v2/internal/speech_option_defaults.cc index 3bcf9bcc30ca1..672a549abd692 100644 --- a/google/cloud/speech/v2/internal/speech_option_defaults.cc +++ b/google/cloud/speech/v2/internal/speech_option_defaults.cc @@ -19,9 +19,9 @@ #include "google/cloud/speech/v2/internal/speech_option_defaults.h" #include "google/cloud/speech/v2/speech_connection.h" #include "google/cloud/speech/v2/speech_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/populate_common_options.h" #include "google/cloud/internal/populate_grpc_options.h" +#include "absl/strings/str_cat.h" #include #include @@ -43,7 +43,7 @@ Options SpeechDefaultOptions(std::string const& location, Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - speech_v2::SpeechLimitedTimeRetryPolicy(std::chrono::minutes(30)) + speech_v2::SpeechLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/speech/v2/internal/speech_stub.cc b/google/cloud/speech/v2/internal/speech_stub.cc index 03e60e63c6850..f769f92aca4cd 100644 --- a/google/cloud/speech/v2/internal/speech_stub.cc +++ b/google/cloud/speech/v2/internal/speech_stub.cc @@ -17,14 +17,17 @@ // source: google/cloud/speech/v2/cloud_speech.proto #include "google/cloud/speech/v2/internal/speech_stub.h" +#include "google/cloud/speech/v2/cloud_speech.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/internal/async_read_write_stream_impl.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v2_internal { @@ -643,3 +646,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace speech_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/speech/v2/internal/speech_stub.h b/google/cloud/speech/v2/internal/speech_stub.h index 8b3da0a839668..f9207ec3193c7 100644 --- a/google/cloud/speech/v2/internal/speech_stub.h +++ b/google/cloud/speech/v2/internal/speech_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V2_INTERNAL_SPEECH_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V2_INTERNAL_SPEECH_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/speech/v2/cloud_speech.grpc.pb.h" #include "google/cloud/async_streaming_read_write_rpc.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v2_internal { @@ -526,4 +529,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V2_INTERNAL_SPEECH_STUB_H diff --git a/google/cloud/speech/v2/internal/speech_stub_factory.cc b/google/cloud/speech/v2/internal/speech_stub_factory.cc index 234472c27e88b..0ce95c3458ae4 100644 --- a/google/cloud/speech/v2/internal/speech_stub_factory.cc +++ b/google/cloud/speech/v2/internal/speech_stub_factory.cc @@ -17,6 +17,8 @@ // source: google/cloud/speech/v2/cloud_speech.proto #include "google/cloud/speech/v2/internal/speech_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/speech/v2/cloud_speech.grpc.pb.h" #include "google/cloud/speech/v2/internal/speech_auth_decorator.h" #include "google/cloud/speech/v2/internal/speech_logging_decorator.h" #include "google/cloud/speech/v2/internal/speech_metadata_decorator.h" @@ -28,12 +30,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v2_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace speech_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/speech/v2/internal/speech_stub_factory.h b/google/cloud/speech/v2/internal/speech_stub_factory.h index 7e90e4b73e13d..e75b664abcb7a 100644 --- a/google/cloud/speech/v2/internal/speech_stub_factory.h +++ b/google/cloud/speech/v2/internal/speech_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V2_INTERNAL_SPEECH_STUB_FACTORY_H diff --git a/google/cloud/speech/v2/internal/speech_tracing_connection.cc b/google/cloud/speech/v2/internal/speech_tracing_connection.cc index 0efaeaa2e73f1..71d3b79454ff0 100644 --- a/google/cloud/speech/v2/internal/speech_tracing_connection.cc +++ b/google/cloud/speech/v2/internal/speech_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace speech_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SpeechTracingConnection::SpeechTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -555,15 +553,11 @@ Status SpeechTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSpeechTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/speech/v2/internal/speech_tracing_connection.h b/google/cloud/speech/v2/internal/speech_tracing_connection.h index 1c2fc7be4f0ed..43e16138e1995 100644 --- a/google/cloud/speech/v2/internal/speech_tracing_connection.h +++ b/google/cloud/speech/v2/internal/speech_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace speech_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SpeechTracingConnection : public speech_v2::SpeechConnection { public: ~SpeechTracingConnection() override = default; @@ -248,8 +246,6 @@ class SpeechTracingConnection : public speech_v2::SpeechConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/speech/v2/internal/speech_tracing_stub.cc b/google/cloud/speech/v2/internal/speech_tracing_stub.cc index 24199bfe37cba..ab756f7c455dd 100644 --- a/google/cloud/speech/v2/internal/speech_tracing_stub.cc +++ b/google/cloud/speech/v2/internal/speech_tracing_stub.cc @@ -22,13 +22,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SpeechTracingStub::SpeechTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -589,18 +590,14 @@ future SpeechTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSpeechTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace speech_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/speech/v2/internal/speech_tracing_stub.h b/google/cloud/speech/v2/internal/speech_tracing_stub.h index 61b985aa8c805..0d454e98a4cf7 100644 --- a/google/cloud/speech/v2/internal/speech_tracing_stub.h +++ b/google/cloud/speech/v2/internal/speech_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace speech_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SpeechTracingStub : public SpeechStub { public: ~SpeechTracingStub() override = default; @@ -280,8 +281,6 @@ class SpeechTracingStub : public SpeechStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -296,4 +295,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V2_INTERNAL_SPEECH_TRACING_STUB_H diff --git a/google/cloud/speech/v2/speech_client.h b/google/cloud/speech/v2/speech_client.h index 85a907350c3af..937efccd1046b 100644 --- a/google/cloud/speech/v2/speech_client.h +++ b/google/cloud/speech/v2/speech_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/speech/v2/speech_connection.h b/google/cloud/speech/v2/speech_connection.h index 99c252621fec5..d9c73527c6020 100644 --- a/google/cloud/speech/v2/speech_connection.h +++ b/google/cloud/speech/v2/speech_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V2_SPEECH_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V2_SPEECH_CONNECTION_H +#include "google/cloud/speech/v2/cloud_speech.pb.h" #include "google/cloud/speech/v2/internal/speech_retry_traits.h" #include "google/cloud/speech/v2/speech_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -31,8 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/speech/v2/speech_connection_idempotency_policy.h b/google/cloud/speech/v2/speech_connection_idempotency_policy.h index 61453cf20b41b..0289eae86aeed 100644 --- a/google/cloud/speech/v2/speech_connection_idempotency_policy.h +++ b/google/cloud/speech/v2/speech_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V2_SPEECH_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPEECH_V2_SPEECH_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/speech/v2/cloud_speech.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/sql/BUILD.bazel b/google/cloud/sql/BUILD.bazel index 8bcbb6aa9c84f..6eaf7edb26433 100644 --- a/google/cloud/sql/BUILD.bazel +++ b/google/cloud/sql/BUILD.bazel @@ -23,7 +23,7 @@ service_dirs = ["v1/"] src_dirs = service_dirs + [d + "internal/" for d in service_dirs] googleapis_deps = [ - "@com_google_googleapis//google/cloud/sql/v1:sql_cc_proto", + "@googleapis//google/cloud/sql/v1:sql_cc_proto", ] cc_gapic_library( diff --git a/google/cloud/sql/quickstart/.bazelrc b/google/cloud/sql/quickstart/.bazelrc index 6777c6b4c95de..ec27511a60add 100644 --- a/google/cloud/sql/quickstart/.bazelrc +++ b/google/cloud/sql/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/sql/quickstart/CMakeLists.txt b/google/cloud/sql/quickstart/CMakeLists.txt index c27926332622d..9ce7962b349f1 100644 --- a/google/cloud/sql/quickstart/CMakeLists.txt +++ b/google/cloud/sql/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud SQL Admin API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-sql-quickstart CXX) find_package(google_cloud_cpp_sql REQUIRED) diff --git a/google/cloud/sql/v1/internal/sql_available_database_versions_option_defaults.cc b/google/cloud/sql/v1/internal/sql_available_database_versions_option_defaults.cc index 9e5dcc8a1c67d..52bf2d9042a25 100644 --- a/google/cloud/sql/v1/internal/sql_available_database_versions_option_defaults.cc +++ b/google/cloud/sql/v1/internal/sql_available_database_versions_option_defaults.cc @@ -44,7 +44,7 @@ Options SqlAvailableDatabaseVersionsServiceDefaultOptions(Options options) { sql_v1::SqlAvailableDatabaseVersionsServiceRetryPolicyOption>()) { options.set( sql_v1::SqlAvailableDatabaseVersionsServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/sql/v1/internal/sql_available_database_versions_rest_logging_decorator.h b/google/cloud/sql/v1/internal/sql_available_database_versions_rest_logging_decorator.h index cdc4d80649199..962f53d41c0b1 100644 --- a/google/cloud/sql/v1/internal/sql_available_database_versions_rest_logging_decorator.h +++ b/google/cloud/sql/v1/internal/sql_available_database_versions_rest_logging_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_AVAILABLE_DATABASE_VERSIONS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_AVAILABLE_DATABASE_VERSIONS_REST_LOGGING_DECORATOR_H +#include "google/cloud/sql/v1/cloud_sql_available_database_versions.pb.h" #include "google/cloud/sql/v1/internal/sql_available_database_versions_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include #include #include #include diff --git a/google/cloud/sql/v1/internal/sql_available_database_versions_rest_metadata_decorator.cc b/google/cloud/sql/v1/internal/sql_available_database_versions_rest_metadata_decorator.cc index 53af0e504388f..1568d3b4963e7 100644 --- a/google/cloud/sql/v1/internal/sql_available_database_versions_rest_metadata_decorator.cc +++ b/google/cloud/sql/v1/internal/sql_available_database_versions_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/sql/v1/cloud_sql_available_database_versions.proto #include "google/cloud/sql/v1/internal/sql_available_database_versions_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/sql/v1/internal/sql_available_database_versions_rest_metadata_decorator.h b/google/cloud/sql/v1/internal/sql_available_database_versions_rest_metadata_decorator.h index e32f703b03a83..5906de1755ead 100644 --- a/google/cloud/sql/v1/internal/sql_available_database_versions_rest_metadata_decorator.h +++ b/google/cloud/sql/v1/internal/sql_available_database_versions_rest_metadata_decorator.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_AVAILABLE_DATABASE_VERSIONS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_AVAILABLE_DATABASE_VERSIONS_REST_METADATA_DECORATOR_H +#include "google/cloud/sql/v1/cloud_sql_available_database_versions.pb.h" #include "google/cloud/sql/v1/internal/sql_available_database_versions_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/sql/v1/internal/sql_available_database_versions_rest_stub.cc b/google/cloud/sql/v1/internal/sql_available_database_versions_rest_stub.cc index 54415b5e70e71..5f81d3ddbdb2e 100644 --- a/google/cloud/sql/v1/internal/sql_available_database_versions_rest_stub.cc +++ b/google/cloud/sql/v1/internal/sql_available_database_versions_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/sql/v1/cloud_sql_available_database_versions.proto #include "google/cloud/sql/v1/internal/sql_available_database_versions_rest_stub.h" +#include "google/cloud/sql/v1/cloud_sql_available_database_versions.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/sql/v1/internal/sql_available_database_versions_rest_stub.h b/google/cloud/sql/v1/internal/sql_available_database_versions_rest_stub.h index d18301da99b19..5b44f114126e3 100644 --- a/google/cloud/sql/v1/internal/sql_available_database_versions_rest_stub.h +++ b/google/cloud/sql/v1/internal/sql_available_database_versions_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_AVAILABLE_DATABASE_VERSIONS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_AVAILABLE_DATABASE_VERSIONS_REST_STUB_H +#include "google/cloud/sql/v1/cloud_sql_available_database_versions.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/internal/sql_available_database_versions_tracing_connection.cc b/google/cloud/sql/v1/internal/sql_available_database_versions_tracing_connection.cc index caa0950bdf60b..5560c644aebfe 100644 --- a/google/cloud/sql/v1/internal/sql_available_database_versions_tracing_connection.cc +++ b/google/cloud/sql/v1/internal/sql_available_database_versions_tracing_connection.cc @@ -26,27 +26,21 @@ namespace cloud { namespace sql_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SqlAvailableDatabaseVersionsServiceTracingConnection:: SqlAvailableDatabaseVersionsServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSqlAvailableDatabaseVersionsServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/sql/v1/internal/sql_available_database_versions_tracing_connection.h b/google/cloud/sql/v1/internal/sql_available_database_versions_tracing_connection.h index 7ac30e663ccc3..d546178573e71 100644 --- a/google/cloud/sql/v1/internal/sql_available_database_versions_tracing_connection.h +++ b/google/cloud/sql/v1/internal/sql_available_database_versions_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace sql_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SqlAvailableDatabaseVersionsServiceTracingConnection : public sql_v1::SqlAvailableDatabaseVersionsServiceConnection { public: @@ -45,8 +43,6 @@ class SqlAvailableDatabaseVersionsServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/sql/v1/internal/sql_backup_runs_option_defaults.cc b/google/cloud/sql/v1/internal/sql_backup_runs_option_defaults.cc index aee929f3fc4bb..f8222b7acb38b 100644 --- a/google/cloud/sql/v1/internal/sql_backup_runs_option_defaults.cc +++ b/google/cloud/sql/v1/internal/sql_backup_runs_option_defaults.cc @@ -42,7 +42,7 @@ Options SqlBackupRunsServiceDefaultOptions(Options options) { if (!options.has()) { options.set( sql_v1::SqlBackupRunsServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/sql/v1/internal/sql_backup_runs_rest_logging_decorator.h b/google/cloud/sql/v1/internal/sql_backup_runs_rest_logging_decorator.h index 7a134627be870..6faf492076f30 100644 --- a/google/cloud/sql/v1/internal/sql_backup_runs_rest_logging_decorator.h +++ b/google/cloud/sql/v1/internal/sql_backup_runs_rest_logging_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_BACKUP_RUNS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_BACKUP_RUNS_REST_LOGGING_DECORATOR_H +#include "google/cloud/sql/v1/cloud_sql_backup_runs.pb.h" #include "google/cloud/sql/v1/internal/sql_backup_runs_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include #include #include #include diff --git a/google/cloud/sql/v1/internal/sql_backup_runs_rest_metadata_decorator.cc b/google/cloud/sql/v1/internal/sql_backup_runs_rest_metadata_decorator.cc index 97a588504abe4..4cd0df3fdfaab 100644 --- a/google/cloud/sql/v1/internal/sql_backup_runs_rest_metadata_decorator.cc +++ b/google/cloud/sql/v1/internal/sql_backup_runs_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/sql/v1/cloud_sql_backup_runs.proto #include "google/cloud/sql/v1/internal/sql_backup_runs_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/sql/v1/internal/sql_backup_runs_rest_metadata_decorator.h b/google/cloud/sql/v1/internal/sql_backup_runs_rest_metadata_decorator.h index 747e6214eab5d..b01f120c0f952 100644 --- a/google/cloud/sql/v1/internal/sql_backup_runs_rest_metadata_decorator.h +++ b/google/cloud/sql/v1/internal/sql_backup_runs_rest_metadata_decorator.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_BACKUP_RUNS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_BACKUP_RUNS_REST_METADATA_DECORATOR_H +#include "google/cloud/sql/v1/cloud_sql_backup_runs.pb.h" #include "google/cloud/sql/v1/internal/sql_backup_runs_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/sql/v1/internal/sql_backup_runs_rest_stub.cc b/google/cloud/sql/v1/internal/sql_backup_runs_rest_stub.cc index 2ff96a76cb088..3dabd743f0345 100644 --- a/google/cloud/sql/v1/internal/sql_backup_runs_rest_stub.cc +++ b/google/cloud/sql/v1/internal/sql_backup_runs_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/sql/v1/cloud_sql_backup_runs.proto #include "google/cloud/sql/v1/internal/sql_backup_runs_rest_stub.h" +#include "google/cloud/sql/v1/cloud_sql_backup_runs.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/sql/v1/internal/sql_backup_runs_rest_stub.h b/google/cloud/sql/v1/internal/sql_backup_runs_rest_stub.h index 2a247f5705d13..de42ffd8cf2b3 100644 --- a/google/cloud/sql/v1/internal/sql_backup_runs_rest_stub.h +++ b/google/cloud/sql/v1/internal/sql_backup_runs_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_BACKUP_RUNS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_BACKUP_RUNS_REST_STUB_H +#include "google/cloud/sql/v1/cloud_sql_backup_runs.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/internal/sql_backup_runs_tracing_connection.cc b/google/cloud/sql/v1/internal/sql_backup_runs_tracing_connection.cc index 95d34e3ff9c19..cb3d04404ffb7 100644 --- a/google/cloud/sql/v1/internal/sql_backup_runs_tracing_connection.cc +++ b/google/cloud/sql/v1/internal/sql_backup_runs_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace sql_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SqlBackupRunsServiceTracingConnection::SqlBackupRunsServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -67,17 +65,13 @@ SqlBackupRunsServiceTracingConnection::List( return internal::EndSpan(*span, child_->List(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSqlBackupRunsServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/sql/v1/internal/sql_backup_runs_tracing_connection.h b/google/cloud/sql/v1/internal/sql_backup_runs_tracing_connection.h index e45b55897f792..f393055761297 100644 --- a/google/cloud/sql/v1/internal/sql_backup_runs_tracing_connection.h +++ b/google/cloud/sql/v1/internal/sql_backup_runs_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace sql_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SqlBackupRunsServiceTracingConnection : public sql_v1::SqlBackupRunsServiceConnection { public: @@ -58,8 +56,6 @@ class SqlBackupRunsServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/sql/v1/internal/sql_connect_option_defaults.cc b/google/cloud/sql/v1/internal/sql_connect_option_defaults.cc index 248774b4a4113..48e563cde40af 100644 --- a/google/cloud/sql/v1/internal/sql_connect_option_defaults.cc +++ b/google/cloud/sql/v1/internal/sql_connect_option_defaults.cc @@ -42,7 +42,7 @@ Options SqlConnectServiceDefaultOptions(Options options) { if (!options.has()) { options.set( sql_v1::SqlConnectServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/sql/v1/internal/sql_connect_rest_logging_decorator.h b/google/cloud/sql/v1/internal/sql_connect_rest_logging_decorator.h index b291b925d1419..4d9557868f50b 100644 --- a/google/cloud/sql/v1/internal/sql_connect_rest_logging_decorator.h +++ b/google/cloud/sql/v1/internal/sql_connect_rest_logging_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_CONNECT_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_CONNECT_REST_LOGGING_DECORATOR_H +#include "google/cloud/sql/v1/cloud_sql_connect.pb.h" #include "google/cloud/sql/v1/internal/sql_connect_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include #include #include #include diff --git a/google/cloud/sql/v1/internal/sql_connect_rest_metadata_decorator.cc b/google/cloud/sql/v1/internal/sql_connect_rest_metadata_decorator.cc index ebb2cfe2e056b..e8c0b4e176c3a 100644 --- a/google/cloud/sql/v1/internal/sql_connect_rest_metadata_decorator.cc +++ b/google/cloud/sql/v1/internal/sql_connect_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/sql/v1/cloud_sql_connect.proto #include "google/cloud/sql/v1/internal/sql_connect_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/sql/v1/internal/sql_connect_rest_metadata_decorator.h b/google/cloud/sql/v1/internal/sql_connect_rest_metadata_decorator.h index 970422179e6b6..fa01129459f5f 100644 --- a/google/cloud/sql/v1/internal/sql_connect_rest_metadata_decorator.h +++ b/google/cloud/sql/v1/internal/sql_connect_rest_metadata_decorator.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_CONNECT_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_CONNECT_REST_METADATA_DECORATOR_H +#include "google/cloud/sql/v1/cloud_sql_connect.pb.h" #include "google/cloud/sql/v1/internal/sql_connect_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/sql/v1/internal/sql_connect_rest_stub.cc b/google/cloud/sql/v1/internal/sql_connect_rest_stub.cc index fa81b309f37fb..8f206944e2ccc 100644 --- a/google/cloud/sql/v1/internal/sql_connect_rest_stub.cc +++ b/google/cloud/sql/v1/internal/sql_connect_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/sql/v1/cloud_sql_connect.proto #include "google/cloud/sql/v1/internal/sql_connect_rest_stub.h" +#include "google/cloud/sql/v1/cloud_sql_connect.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/sql/v1/internal/sql_connect_rest_stub.h b/google/cloud/sql/v1/internal/sql_connect_rest_stub.h index f5be5b26a5f34..15d04feb6cbaf 100644 --- a/google/cloud/sql/v1/internal/sql_connect_rest_stub.h +++ b/google/cloud/sql/v1/internal/sql_connect_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_CONNECT_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_CONNECT_REST_STUB_H +#include "google/cloud/sql/v1/cloud_sql_connect.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/internal/sql_connect_tracing_connection.cc b/google/cloud/sql/v1/internal/sql_connect_tracing_connection.cc index cd935da020181..1f7b9070b19ea 100644 --- a/google/cloud/sql/v1/internal/sql_connect_tracing_connection.cc +++ b/google/cloud/sql/v1/internal/sql_connect_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace sql_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SqlConnectServiceTracingConnection::SqlConnectServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -50,17 +48,13 @@ SqlConnectServiceTracingConnection::GenerateEphemeralCert( return internal::EndSpan(*span, child_->GenerateEphemeralCert(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSqlConnectServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/sql/v1/internal/sql_connect_tracing_connection.h b/google/cloud/sql/v1/internal/sql_connect_tracing_connection.h index f9b359514d326..4bfe28e4455d2 100644 --- a/google/cloud/sql/v1/internal/sql_connect_tracing_connection.h +++ b/google/cloud/sql/v1/internal/sql_connect_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace sql_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SqlConnectServiceTracingConnection : public sql_v1::SqlConnectServiceConnection { public: @@ -53,8 +51,6 @@ class SqlConnectServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/sql/v1/internal/sql_databases_option_defaults.cc b/google/cloud/sql/v1/internal/sql_databases_option_defaults.cc index d6fdd20337d2a..5c078977cf13f 100644 --- a/google/cloud/sql/v1/internal/sql_databases_option_defaults.cc +++ b/google/cloud/sql/v1/internal/sql_databases_option_defaults.cc @@ -42,7 +42,7 @@ Options SqlDatabasesServiceDefaultOptions(Options options) { if (!options.has()) { options.set( sql_v1::SqlDatabasesServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/sql/v1/internal/sql_databases_rest_logging_decorator.h b/google/cloud/sql/v1/internal/sql_databases_rest_logging_decorator.h index c01240829fcca..58138b68584cd 100644 --- a/google/cloud/sql/v1/internal/sql_databases_rest_logging_decorator.h +++ b/google/cloud/sql/v1/internal/sql_databases_rest_logging_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_DATABASES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_DATABASES_REST_LOGGING_DECORATOR_H +#include "google/cloud/sql/v1/cloud_sql_databases.pb.h" #include "google/cloud/sql/v1/internal/sql_databases_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include #include #include #include diff --git a/google/cloud/sql/v1/internal/sql_databases_rest_metadata_decorator.cc b/google/cloud/sql/v1/internal/sql_databases_rest_metadata_decorator.cc index 6e2ecfbc44b90..acece75b3f125 100644 --- a/google/cloud/sql/v1/internal/sql_databases_rest_metadata_decorator.cc +++ b/google/cloud/sql/v1/internal/sql_databases_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/sql/v1/cloud_sql_databases.proto #include "google/cloud/sql/v1/internal/sql_databases_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/sql/v1/internal/sql_databases_rest_metadata_decorator.h b/google/cloud/sql/v1/internal/sql_databases_rest_metadata_decorator.h index dc3b740bb3356..d7a283a68064f 100644 --- a/google/cloud/sql/v1/internal/sql_databases_rest_metadata_decorator.h +++ b/google/cloud/sql/v1/internal/sql_databases_rest_metadata_decorator.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_DATABASES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_DATABASES_REST_METADATA_DECORATOR_H +#include "google/cloud/sql/v1/cloud_sql_databases.pb.h" #include "google/cloud/sql/v1/internal/sql_databases_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/sql/v1/internal/sql_databases_rest_stub.cc b/google/cloud/sql/v1/internal/sql_databases_rest_stub.cc index 75c1bb1a1a041..9e70ce9c3873c 100644 --- a/google/cloud/sql/v1/internal/sql_databases_rest_stub.cc +++ b/google/cloud/sql/v1/internal/sql_databases_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/sql/v1/cloud_sql_databases.proto #include "google/cloud/sql/v1/internal/sql_databases_rest_stub.h" +#include "google/cloud/sql/v1/cloud_sql_databases.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/sql/v1/internal/sql_databases_rest_stub.h b/google/cloud/sql/v1/internal/sql_databases_rest_stub.h index da73cf3ac4ef3..4c837af5c02ac 100644 --- a/google/cloud/sql/v1/internal/sql_databases_rest_stub.h +++ b/google/cloud/sql/v1/internal/sql_databases_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_DATABASES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_DATABASES_REST_STUB_H +#include "google/cloud/sql/v1/cloud_sql_databases.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/internal/sql_databases_tracing_connection.cc b/google/cloud/sql/v1/internal/sql_databases_tracing_connection.cc index a3caf03a8dd12..d261e927ad333 100644 --- a/google/cloud/sql/v1/internal/sql_databases_tracing_connection.cc +++ b/google/cloud/sql/v1/internal/sql_databases_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace sql_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SqlDatabasesServiceTracingConnection::SqlDatabasesServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -84,17 +82,13 @@ SqlDatabasesServiceTracingConnection::Update( return internal::EndSpan(*span, child_->Update(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSqlDatabasesServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/sql/v1/internal/sql_databases_tracing_connection.h b/google/cloud/sql/v1/internal/sql_databases_tracing_connection.h index b0e04431aef22..d0879cc12401a 100644 --- a/google/cloud/sql/v1/internal/sql_databases_tracing_connection.h +++ b/google/cloud/sql/v1/internal/sql_databases_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace sql_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SqlDatabasesServiceTracingConnection : public sql_v1::SqlDatabasesServiceConnection { public: @@ -66,8 +64,6 @@ class SqlDatabasesServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/sql/v1/internal/sql_events_option_defaults.cc b/google/cloud/sql/v1/internal/sql_events_option_defaults.cc index b4c8b5dfe0054..61514203c850c 100644 --- a/google/cloud/sql/v1/internal/sql_events_option_defaults.cc +++ b/google/cloud/sql/v1/internal/sql_events_option_defaults.cc @@ -41,7 +41,7 @@ Options SqlEventsServiceDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - sql_v1::SqlEventsServiceLimitedTimeRetryPolicy(std::chrono::minutes(30)) + sql_v1::SqlEventsServiceLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/sql/v1/internal/sql_events_rest_logging_decorator.h b/google/cloud/sql/v1/internal/sql_events_rest_logging_decorator.h index 609a0402219b2..991bf4910b386 100644 --- a/google/cloud/sql/v1/internal/sql_events_rest_logging_decorator.h +++ b/google/cloud/sql/v1/internal/sql_events_rest_logging_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_EVENTS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_EVENTS_REST_LOGGING_DECORATOR_H +#include "google/cloud/sql/v1/cloud_sql_events.pb.h" #include "google/cloud/sql/v1/internal/sql_events_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include #include #include #include diff --git a/google/cloud/sql/v1/internal/sql_events_rest_metadata_decorator.cc b/google/cloud/sql/v1/internal/sql_events_rest_metadata_decorator.cc index 45c6ce1387fc0..e740f0b90929e 100644 --- a/google/cloud/sql/v1/internal/sql_events_rest_metadata_decorator.cc +++ b/google/cloud/sql/v1/internal/sql_events_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/sql/v1/cloud_sql_events.proto #include "google/cloud/sql/v1/internal/sql_events_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/sql/v1/internal/sql_events_rest_metadata_decorator.h b/google/cloud/sql/v1/internal/sql_events_rest_metadata_decorator.h index 5df73f2e64aca..5116d2f3fdb4c 100644 --- a/google/cloud/sql/v1/internal/sql_events_rest_metadata_decorator.h +++ b/google/cloud/sql/v1/internal/sql_events_rest_metadata_decorator.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_EVENTS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_EVENTS_REST_METADATA_DECORATOR_H +#include "google/cloud/sql/v1/cloud_sql_events.pb.h" #include "google/cloud/sql/v1/internal/sql_events_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/sql/v1/internal/sql_events_rest_stub.cc b/google/cloud/sql/v1/internal/sql_events_rest_stub.cc index 4b52fc09bab4c..1358a4e22c2d2 100644 --- a/google/cloud/sql/v1/internal/sql_events_rest_stub.cc +++ b/google/cloud/sql/v1/internal/sql_events_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/sql/v1/cloud_sql_events.proto #include "google/cloud/sql/v1/internal/sql_events_rest_stub.h" +#include "google/cloud/sql/v1/cloud_sql_events.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/sql/v1/internal/sql_events_rest_stub.h b/google/cloud/sql/v1/internal/sql_events_rest_stub.h index 9b248e611c6a6..1e3d1887b38cc 100644 --- a/google/cloud/sql/v1/internal/sql_events_rest_stub.h +++ b/google/cloud/sql/v1/internal/sql_events_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_EVENTS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_EVENTS_REST_STUB_H +#include "google/cloud/sql/v1/cloud_sql_events.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/internal/sql_events_tracing_connection.cc b/google/cloud/sql/v1/internal/sql_events_tracing_connection.cc index 7cfc14f5f7448..0a7a53178359e 100644 --- a/google/cloud/sql/v1/internal/sql_events_tracing_connection.cc +++ b/google/cloud/sql/v1/internal/sql_events_tracing_connection.cc @@ -26,22 +26,16 @@ namespace cloud { namespace sql_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SqlEventsServiceTracingConnection::SqlEventsServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSqlEventsServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/sql/v1/internal/sql_events_tracing_connection.h b/google/cloud/sql/v1/internal/sql_events_tracing_connection.h index edea58e81f587..cb471bf58ccd8 100644 --- a/google/cloud/sql/v1/internal/sql_events_tracing_connection.h +++ b/google/cloud/sql/v1/internal/sql_events_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace sql_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SqlEventsServiceTracingConnection : public sql_v1::SqlEventsServiceConnection { public: @@ -44,8 +42,6 @@ class SqlEventsServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/sql/v1/internal/sql_flags_option_defaults.cc b/google/cloud/sql/v1/internal/sql_flags_option_defaults.cc index 4d6448358a78a..dfd2d9b3d1ca6 100644 --- a/google/cloud/sql/v1/internal/sql_flags_option_defaults.cc +++ b/google/cloud/sql/v1/internal/sql_flags_option_defaults.cc @@ -41,7 +41,7 @@ Options SqlFlagsServiceDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - sql_v1::SqlFlagsServiceLimitedTimeRetryPolicy(std::chrono::minutes(30)) + sql_v1::SqlFlagsServiceLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/sql/v1/internal/sql_flags_rest_logging_decorator.h b/google/cloud/sql/v1/internal/sql_flags_rest_logging_decorator.h index 354bf3d088553..8bda83927e7c7 100644 --- a/google/cloud/sql/v1/internal/sql_flags_rest_logging_decorator.h +++ b/google/cloud/sql/v1/internal/sql_flags_rest_logging_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_FLAGS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_FLAGS_REST_LOGGING_DECORATOR_H +#include "google/cloud/sql/v1/cloud_sql_flags.pb.h" #include "google/cloud/sql/v1/internal/sql_flags_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include #include #include #include diff --git a/google/cloud/sql/v1/internal/sql_flags_rest_metadata_decorator.cc b/google/cloud/sql/v1/internal/sql_flags_rest_metadata_decorator.cc index 7cc660120b025..be3607d037a30 100644 --- a/google/cloud/sql/v1/internal/sql_flags_rest_metadata_decorator.cc +++ b/google/cloud/sql/v1/internal/sql_flags_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/sql/v1/cloud_sql_flags.proto #include "google/cloud/sql/v1/internal/sql_flags_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/sql/v1/internal/sql_flags_rest_metadata_decorator.h b/google/cloud/sql/v1/internal/sql_flags_rest_metadata_decorator.h index 5852f9b97705b..e14b341432247 100644 --- a/google/cloud/sql/v1/internal/sql_flags_rest_metadata_decorator.h +++ b/google/cloud/sql/v1/internal/sql_flags_rest_metadata_decorator.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_FLAGS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_FLAGS_REST_METADATA_DECORATOR_H +#include "google/cloud/sql/v1/cloud_sql_flags.pb.h" #include "google/cloud/sql/v1/internal/sql_flags_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/sql/v1/internal/sql_flags_rest_stub.cc b/google/cloud/sql/v1/internal/sql_flags_rest_stub.cc index 9bb52a9b8883f..9c0f9ab4b8f85 100644 --- a/google/cloud/sql/v1/internal/sql_flags_rest_stub.cc +++ b/google/cloud/sql/v1/internal/sql_flags_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/sql/v1/cloud_sql_flags.proto #include "google/cloud/sql/v1/internal/sql_flags_rest_stub.h" +#include "google/cloud/sql/v1/cloud_sql_flags.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/sql/v1/internal/sql_flags_rest_stub.h b/google/cloud/sql/v1/internal/sql_flags_rest_stub.h index ea7834f9150fb..c86a19c9f9654 100644 --- a/google/cloud/sql/v1/internal/sql_flags_rest_stub.h +++ b/google/cloud/sql/v1/internal/sql_flags_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_FLAGS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_FLAGS_REST_STUB_H +#include "google/cloud/sql/v1/cloud_sql_flags.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/internal/sql_flags_tracing_connection.cc b/google/cloud/sql/v1/internal/sql_flags_tracing_connection.cc index 87ce6fc57f711..91527018b0c5b 100644 --- a/google/cloud/sql/v1/internal/sql_flags_tracing_connection.cc +++ b/google/cloud/sql/v1/internal/sql_flags_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace sql_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SqlFlagsServiceTracingConnection::SqlFlagsServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -40,16 +38,12 @@ SqlFlagsServiceTracingConnection::List( return internal::EndSpan(*span, child_->List(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSqlFlagsServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/sql/v1/internal/sql_flags_tracing_connection.h b/google/cloud/sql/v1/internal/sql_flags_tracing_connection.h index bf6f282ab7897..f6f851fd3d87d 100644 --- a/google/cloud/sql/v1/internal/sql_flags_tracing_connection.h +++ b/google/cloud/sql/v1/internal/sql_flags_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace sql_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SqlFlagsServiceTracingConnection : public sql_v1::SqlFlagsServiceConnection { public: @@ -47,8 +45,6 @@ class SqlFlagsServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/sql/v1/internal/sql_iam_policies_option_defaults.cc b/google/cloud/sql/v1/internal/sql_iam_policies_option_defaults.cc index e9671da0e84f0..b20213bee1f8e 100644 --- a/google/cloud/sql/v1/internal/sql_iam_policies_option_defaults.cc +++ b/google/cloud/sql/v1/internal/sql_iam_policies_option_defaults.cc @@ -42,7 +42,7 @@ Options SqlIamPoliciesServiceDefaultOptions(Options options) { if (!options.has()) { options.set( sql_v1::SqlIamPoliciesServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/sql/v1/internal/sql_iam_policies_rest_logging_decorator.h b/google/cloud/sql/v1/internal/sql_iam_policies_rest_logging_decorator.h index 3716c338235b5..5577600e7693c 100644 --- a/google/cloud/sql/v1/internal/sql_iam_policies_rest_logging_decorator.h +++ b/google/cloud/sql/v1/internal/sql_iam_policies_rest_logging_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_IAM_POLICIES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_IAM_POLICIES_REST_LOGGING_DECORATOR_H +#include "google/cloud/sql/v1/cloud_sql_iam_policies.pb.h" #include "google/cloud/sql/v1/internal/sql_iam_policies_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include #include #include #include diff --git a/google/cloud/sql/v1/internal/sql_iam_policies_rest_metadata_decorator.cc b/google/cloud/sql/v1/internal/sql_iam_policies_rest_metadata_decorator.cc index 68d53aca0f311..a63d4f30ac717 100644 --- a/google/cloud/sql/v1/internal/sql_iam_policies_rest_metadata_decorator.cc +++ b/google/cloud/sql/v1/internal/sql_iam_policies_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/sql/v1/cloud_sql_iam_policies.proto #include "google/cloud/sql/v1/internal/sql_iam_policies_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/sql/v1/internal/sql_iam_policies_rest_metadata_decorator.h b/google/cloud/sql/v1/internal/sql_iam_policies_rest_metadata_decorator.h index 151f7d279fbd2..87788e00ea2ca 100644 --- a/google/cloud/sql/v1/internal/sql_iam_policies_rest_metadata_decorator.h +++ b/google/cloud/sql/v1/internal/sql_iam_policies_rest_metadata_decorator.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_IAM_POLICIES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_IAM_POLICIES_REST_METADATA_DECORATOR_H +#include "google/cloud/sql/v1/cloud_sql_iam_policies.pb.h" #include "google/cloud/sql/v1/internal/sql_iam_policies_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/sql/v1/internal/sql_iam_policies_rest_stub.cc b/google/cloud/sql/v1/internal/sql_iam_policies_rest_stub.cc index c5a5438d81799..c7cafb063cd39 100644 --- a/google/cloud/sql/v1/internal/sql_iam_policies_rest_stub.cc +++ b/google/cloud/sql/v1/internal/sql_iam_policies_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/sql/v1/cloud_sql_iam_policies.proto #include "google/cloud/sql/v1/internal/sql_iam_policies_rest_stub.h" +#include "google/cloud/sql/v1/cloud_sql_iam_policies.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/sql/v1/internal/sql_iam_policies_rest_stub.h b/google/cloud/sql/v1/internal/sql_iam_policies_rest_stub.h index 6f040aa856fa2..9f4c74c66890a 100644 --- a/google/cloud/sql/v1/internal/sql_iam_policies_rest_stub.h +++ b/google/cloud/sql/v1/internal/sql_iam_policies_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_IAM_POLICIES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_IAM_POLICIES_REST_STUB_H +#include "google/cloud/sql/v1/cloud_sql_iam_policies.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/internal/sql_iam_policies_tracing_connection.cc b/google/cloud/sql/v1/internal/sql_iam_policies_tracing_connection.cc index 305b20b6fc3ce..a8f04198de3ee 100644 --- a/google/cloud/sql/v1/internal/sql_iam_policies_tracing_connection.cc +++ b/google/cloud/sql/v1/internal/sql_iam_policies_tracing_connection.cc @@ -26,23 +26,17 @@ namespace cloud { namespace sql_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SqlIamPoliciesServiceTracingConnection::SqlIamPoliciesServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSqlIamPoliciesServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/sql/v1/internal/sql_iam_policies_tracing_connection.h b/google/cloud/sql/v1/internal/sql_iam_policies_tracing_connection.h index 060bf25807edb..6ba486e1beb56 100644 --- a/google/cloud/sql/v1/internal/sql_iam_policies_tracing_connection.h +++ b/google/cloud/sql/v1/internal/sql_iam_policies_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace sql_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SqlIamPoliciesServiceTracingConnection : public sql_v1::SqlIamPoliciesServiceConnection { public: @@ -44,8 +42,6 @@ class SqlIamPoliciesServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/sql/v1/internal/sql_instance_names_option_defaults.cc b/google/cloud/sql/v1/internal/sql_instance_names_option_defaults.cc index 37c402c17736f..4518ae23dda0f 100644 --- a/google/cloud/sql/v1/internal/sql_instance_names_option_defaults.cc +++ b/google/cloud/sql/v1/internal/sql_instance_names_option_defaults.cc @@ -43,7 +43,7 @@ Options SqlInstanceNamesServiceDefaultOptions(Options options) { if (!options.has()) { options.set( sql_v1::SqlInstanceNamesServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/sql/v1/internal/sql_instance_names_rest_logging_decorator.h b/google/cloud/sql/v1/internal/sql_instance_names_rest_logging_decorator.h index 593927258df81..42803a94abbb0 100644 --- a/google/cloud/sql/v1/internal/sql_instance_names_rest_logging_decorator.h +++ b/google/cloud/sql/v1/internal/sql_instance_names_rest_logging_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_INSTANCE_NAMES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_INSTANCE_NAMES_REST_LOGGING_DECORATOR_H +#include "google/cloud/sql/v1/cloud_sql_instance_names.pb.h" #include "google/cloud/sql/v1/internal/sql_instance_names_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include #include #include #include diff --git a/google/cloud/sql/v1/internal/sql_instance_names_rest_metadata_decorator.cc b/google/cloud/sql/v1/internal/sql_instance_names_rest_metadata_decorator.cc index 221f5e2f91aaf..c449c5d8cf95f 100644 --- a/google/cloud/sql/v1/internal/sql_instance_names_rest_metadata_decorator.cc +++ b/google/cloud/sql/v1/internal/sql_instance_names_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/sql/v1/cloud_sql_instance_names.proto #include "google/cloud/sql/v1/internal/sql_instance_names_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/sql/v1/internal/sql_instance_names_rest_metadata_decorator.h b/google/cloud/sql/v1/internal/sql_instance_names_rest_metadata_decorator.h index d2deae2874291..fcdebf5302e3b 100644 --- a/google/cloud/sql/v1/internal/sql_instance_names_rest_metadata_decorator.h +++ b/google/cloud/sql/v1/internal/sql_instance_names_rest_metadata_decorator.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_INSTANCE_NAMES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_INSTANCE_NAMES_REST_METADATA_DECORATOR_H +#include "google/cloud/sql/v1/cloud_sql_instance_names.pb.h" #include "google/cloud/sql/v1/internal/sql_instance_names_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/sql/v1/internal/sql_instance_names_rest_stub.cc b/google/cloud/sql/v1/internal/sql_instance_names_rest_stub.cc index 58771a0a1bbc5..747cb7eadf27d 100644 --- a/google/cloud/sql/v1/internal/sql_instance_names_rest_stub.cc +++ b/google/cloud/sql/v1/internal/sql_instance_names_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/sql/v1/cloud_sql_instance_names.proto #include "google/cloud/sql/v1/internal/sql_instance_names_rest_stub.h" +#include "google/cloud/sql/v1/cloud_sql_instance_names.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/sql/v1/internal/sql_instance_names_rest_stub.h b/google/cloud/sql/v1/internal/sql_instance_names_rest_stub.h index 51ab64014eaea..0a6cdab4ad2af 100644 --- a/google/cloud/sql/v1/internal/sql_instance_names_rest_stub.h +++ b/google/cloud/sql/v1/internal/sql_instance_names_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_INSTANCE_NAMES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_INSTANCE_NAMES_REST_STUB_H +#include "google/cloud/sql/v1/cloud_sql_instance_names.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/internal/sql_instance_names_tracing_connection.cc b/google/cloud/sql/v1/internal/sql_instance_names_tracing_connection.cc index d21bd6ea46716..6afbb25e1d1c5 100644 --- a/google/cloud/sql/v1/internal/sql_instance_names_tracing_connection.cc +++ b/google/cloud/sql/v1/internal/sql_instance_names_tracing_connection.cc @@ -26,24 +26,18 @@ namespace cloud { namespace sql_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SqlInstanceNamesServiceTracingConnection:: SqlInstanceNamesServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSqlInstanceNamesServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/sql/v1/internal/sql_instance_names_tracing_connection.h b/google/cloud/sql/v1/internal/sql_instance_names_tracing_connection.h index 3ff2df4f55abd..be83fa65807ff 100644 --- a/google/cloud/sql/v1/internal/sql_instance_names_tracing_connection.h +++ b/google/cloud/sql/v1/internal/sql_instance_names_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace sql_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SqlInstanceNamesServiceTracingConnection : public sql_v1::SqlInstanceNamesServiceConnection { public: @@ -44,8 +42,6 @@ class SqlInstanceNamesServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/sql/v1/internal/sql_instances_option_defaults.cc b/google/cloud/sql/v1/internal/sql_instances_option_defaults.cc index 4708e78c75462..ab3b0925d07db 100644 --- a/google/cloud/sql/v1/internal/sql_instances_option_defaults.cc +++ b/google/cloud/sql/v1/internal/sql_instances_option_defaults.cc @@ -42,7 +42,7 @@ Options SqlInstancesServiceDefaultOptions(Options options) { if (!options.has()) { options.set( sql_v1::SqlInstancesServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/sql/v1/internal/sql_instances_rest_logging_decorator.h b/google/cloud/sql/v1/internal/sql_instances_rest_logging_decorator.h index 174197bdb44b5..f6da2356aeb84 100644 --- a/google/cloud/sql/v1/internal/sql_instances_rest_logging_decorator.h +++ b/google/cloud/sql/v1/internal/sql_instances_rest_logging_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_INSTANCES_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_INSTANCES_REST_LOGGING_DECORATOR_H +#include "google/cloud/sql/v1/cloud_sql_instances.pb.h" #include "google/cloud/sql/v1/internal/sql_instances_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include #include #include #include diff --git a/google/cloud/sql/v1/internal/sql_instances_rest_metadata_decorator.cc b/google/cloud/sql/v1/internal/sql_instances_rest_metadata_decorator.cc index 3ce2128854671..dc4973bf3ab97 100644 --- a/google/cloud/sql/v1/internal/sql_instances_rest_metadata_decorator.cc +++ b/google/cloud/sql/v1/internal/sql_instances_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/sql/v1/cloud_sql_instances.proto #include "google/cloud/sql/v1/internal/sql_instances_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/sql/v1/internal/sql_instances_rest_metadata_decorator.h b/google/cloud/sql/v1/internal/sql_instances_rest_metadata_decorator.h index 56f59f4c79496..2d46a8f5f9340 100644 --- a/google/cloud/sql/v1/internal/sql_instances_rest_metadata_decorator.h +++ b/google/cloud/sql/v1/internal/sql_instances_rest_metadata_decorator.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_INSTANCES_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_INSTANCES_REST_METADATA_DECORATOR_H +#include "google/cloud/sql/v1/cloud_sql_instances.pb.h" #include "google/cloud/sql/v1/internal/sql_instances_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/sql/v1/internal/sql_instances_rest_stub.cc b/google/cloud/sql/v1/internal/sql_instances_rest_stub.cc index f6fd88423d232..d4fa524c099e5 100644 --- a/google/cloud/sql/v1/internal/sql_instances_rest_stub.cc +++ b/google/cloud/sql/v1/internal/sql_instances_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/sql/v1/cloud_sql_instances.proto #include "google/cloud/sql/v1/internal/sql_instances_rest_stub.h" +#include "google/cloud/sql/v1/cloud_sql_instances.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/sql/v1/internal/sql_instances_rest_stub.h b/google/cloud/sql/v1/internal/sql_instances_rest_stub.h index 97d145a056c3f..705324f560cf7 100644 --- a/google/cloud/sql/v1/internal/sql_instances_rest_stub.h +++ b/google/cloud/sql/v1/internal/sql_instances_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_INSTANCES_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_INSTANCES_REST_STUB_H +#include "google/cloud/sql/v1/cloud_sql_instances.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/internal/sql_instances_tracing_connection.cc b/google/cloud/sql/v1/internal/sql_instances_tracing_connection.cc index cd0ed26791327..58e4c29f1fa28 100644 --- a/google/cloud/sql/v1/internal/sql_instances_tracing_connection.cc +++ b/google/cloud/sql/v1/internal/sql_instances_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace sql_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SqlInstancesServiceTracingConnection::SqlInstancesServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -438,17 +436,13 @@ SqlInstancesServiceTracingConnection::PointInTimeRestore( return internal::EndSpan(*span, child_->PointInTimeRestore(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSqlInstancesServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/sql/v1/internal/sql_instances_tracing_connection.h b/google/cloud/sql/v1/internal/sql_instances_tracing_connection.h index a74518de801c4..35f56bb2dd4f2 100644 --- a/google/cloud/sql/v1/internal/sql_instances_tracing_connection.h +++ b/google/cloud/sql/v1/internal/sql_instances_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace sql_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SqlInstancesServiceTracingConnection : public sql_v1::SqlInstancesServiceConnection { public: @@ -222,8 +220,6 @@ class SqlInstancesServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/sql/v1/internal/sql_operations_option_defaults.cc b/google/cloud/sql/v1/internal/sql_operations_option_defaults.cc index a19e0f5d35032..530674832e9ef 100644 --- a/google/cloud/sql/v1/internal/sql_operations_option_defaults.cc +++ b/google/cloud/sql/v1/internal/sql_operations_option_defaults.cc @@ -42,7 +42,7 @@ Options SqlOperationsServiceDefaultOptions(Options options) { if (!options.has()) { options.set( sql_v1::SqlOperationsServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/sql/v1/internal/sql_operations_rest_logging_decorator.h b/google/cloud/sql/v1/internal/sql_operations_rest_logging_decorator.h index faaad29aaabf0..fa5e8290deda4 100644 --- a/google/cloud/sql/v1/internal/sql_operations_rest_logging_decorator.h +++ b/google/cloud/sql/v1/internal/sql_operations_rest_logging_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_OPERATIONS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_OPERATIONS_REST_LOGGING_DECORATOR_H +#include "google/cloud/sql/v1/cloud_sql_operations.pb.h" #include "google/cloud/sql/v1/internal/sql_operations_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include #include #include #include diff --git a/google/cloud/sql/v1/internal/sql_operations_rest_metadata_decorator.cc b/google/cloud/sql/v1/internal/sql_operations_rest_metadata_decorator.cc index 1d9d6996c2635..c02ac7123d1e0 100644 --- a/google/cloud/sql/v1/internal/sql_operations_rest_metadata_decorator.cc +++ b/google/cloud/sql/v1/internal/sql_operations_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/sql/v1/cloud_sql_operations.proto #include "google/cloud/sql/v1/internal/sql_operations_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/sql/v1/internal/sql_operations_rest_metadata_decorator.h b/google/cloud/sql/v1/internal/sql_operations_rest_metadata_decorator.h index 51b49068d598d..626f9f64fd724 100644 --- a/google/cloud/sql/v1/internal/sql_operations_rest_metadata_decorator.h +++ b/google/cloud/sql/v1/internal/sql_operations_rest_metadata_decorator.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_OPERATIONS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_OPERATIONS_REST_METADATA_DECORATOR_H +#include "google/cloud/sql/v1/cloud_sql_operations.pb.h" #include "google/cloud/sql/v1/internal/sql_operations_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/sql/v1/internal/sql_operations_rest_stub.cc b/google/cloud/sql/v1/internal/sql_operations_rest_stub.cc index c3133516e26ce..a899674c5a19d 100644 --- a/google/cloud/sql/v1/internal/sql_operations_rest_stub.cc +++ b/google/cloud/sql/v1/internal/sql_operations_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/sql/v1/cloud_sql_operations.proto #include "google/cloud/sql/v1/internal/sql_operations_rest_stub.h" +#include "google/cloud/sql/v1/cloud_sql_operations.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/sql/v1/internal/sql_operations_rest_stub.h b/google/cloud/sql/v1/internal/sql_operations_rest_stub.h index 1db82f215bc3b..d164fc76bed10 100644 --- a/google/cloud/sql/v1/internal/sql_operations_rest_stub.h +++ b/google/cloud/sql/v1/internal/sql_operations_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_OPERATIONS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_OPERATIONS_REST_STUB_H +#include "google/cloud/sql/v1/cloud_sql_operations.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/internal/sql_operations_tracing_connection.cc b/google/cloud/sql/v1/internal/sql_operations_tracing_connection.cc index 5b4d66327dec7..0d33bc34fc4ee 100644 --- a/google/cloud/sql/v1/internal/sql_operations_tracing_connection.cc +++ b/google/cloud/sql/v1/internal/sql_operations_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace sql_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SqlOperationsServiceTracingConnection::SqlOperationsServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -60,17 +58,13 @@ Status SqlOperationsServiceTracingConnection::Cancel( return internal::EndSpan(*span, child_->Cancel(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSqlOperationsServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/sql/v1/internal/sql_operations_tracing_connection.h b/google/cloud/sql/v1/internal/sql_operations_tracing_connection.h index 80efb7ff87fe3..66e4980dbb862 100644 --- a/google/cloud/sql/v1/internal/sql_operations_tracing_connection.h +++ b/google/cloud/sql/v1/internal/sql_operations_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace sql_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SqlOperationsServiceTracingConnection : public sql_v1::SqlOperationsServiceConnection { public: @@ -53,8 +51,6 @@ class SqlOperationsServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/sql/v1/internal/sql_regions_option_defaults.cc b/google/cloud/sql/v1/internal/sql_regions_option_defaults.cc index 4821c45eaf932..6c672ed117913 100644 --- a/google/cloud/sql/v1/internal/sql_regions_option_defaults.cc +++ b/google/cloud/sql/v1/internal/sql_regions_option_defaults.cc @@ -42,7 +42,7 @@ Options SqlRegionsServiceDefaultOptions(Options options) { if (!options.has()) { options.set( sql_v1::SqlRegionsServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/sql/v1/internal/sql_regions_rest_logging_decorator.h b/google/cloud/sql/v1/internal/sql_regions_rest_logging_decorator.h index d15fd9176a26e..be7d8b160b348 100644 --- a/google/cloud/sql/v1/internal/sql_regions_rest_logging_decorator.h +++ b/google/cloud/sql/v1/internal/sql_regions_rest_logging_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_REGIONS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_REGIONS_REST_LOGGING_DECORATOR_H +#include "google/cloud/sql/v1/cloud_sql_regions.pb.h" #include "google/cloud/sql/v1/internal/sql_regions_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include #include #include #include diff --git a/google/cloud/sql/v1/internal/sql_regions_rest_metadata_decorator.cc b/google/cloud/sql/v1/internal/sql_regions_rest_metadata_decorator.cc index a37c8fea19a29..7f0af87a043a4 100644 --- a/google/cloud/sql/v1/internal/sql_regions_rest_metadata_decorator.cc +++ b/google/cloud/sql/v1/internal/sql_regions_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/sql/v1/cloud_sql_regions.proto #include "google/cloud/sql/v1/internal/sql_regions_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/sql/v1/internal/sql_regions_rest_metadata_decorator.h b/google/cloud/sql/v1/internal/sql_regions_rest_metadata_decorator.h index f95266c5f73f7..8f4b6d6ac9888 100644 --- a/google/cloud/sql/v1/internal/sql_regions_rest_metadata_decorator.h +++ b/google/cloud/sql/v1/internal/sql_regions_rest_metadata_decorator.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_REGIONS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_REGIONS_REST_METADATA_DECORATOR_H +#include "google/cloud/sql/v1/cloud_sql_regions.pb.h" #include "google/cloud/sql/v1/internal/sql_regions_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/sql/v1/internal/sql_regions_rest_stub.cc b/google/cloud/sql/v1/internal/sql_regions_rest_stub.cc index c93045f697e34..447a4e1385156 100644 --- a/google/cloud/sql/v1/internal/sql_regions_rest_stub.cc +++ b/google/cloud/sql/v1/internal/sql_regions_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/sql/v1/cloud_sql_regions.proto #include "google/cloud/sql/v1/internal/sql_regions_rest_stub.h" +#include "google/cloud/sql/v1/cloud_sql_regions.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/sql/v1/internal/sql_regions_rest_stub.h b/google/cloud/sql/v1/internal/sql_regions_rest_stub.h index 40f0e34688fb5..5ec87b50c9c19 100644 --- a/google/cloud/sql/v1/internal/sql_regions_rest_stub.h +++ b/google/cloud/sql/v1/internal/sql_regions_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_REGIONS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_REGIONS_REST_STUB_H +#include "google/cloud/sql/v1/cloud_sql_regions.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/internal/sql_regions_tracing_connection.cc b/google/cloud/sql/v1/internal/sql_regions_tracing_connection.cc index 4351588fd3e82..d37c03bff745c 100644 --- a/google/cloud/sql/v1/internal/sql_regions_tracing_connection.cc +++ b/google/cloud/sql/v1/internal/sql_regions_tracing_connection.cc @@ -26,23 +26,17 @@ namespace cloud { namespace sql_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SqlRegionsServiceTracingConnection::SqlRegionsServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSqlRegionsServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/sql/v1/internal/sql_regions_tracing_connection.h b/google/cloud/sql/v1/internal/sql_regions_tracing_connection.h index e570ff4ccfbe3..e3b3d62783872 100644 --- a/google/cloud/sql/v1/internal/sql_regions_tracing_connection.h +++ b/google/cloud/sql/v1/internal/sql_regions_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace sql_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SqlRegionsServiceTracingConnection : public sql_v1::SqlRegionsServiceConnection { public: @@ -44,8 +42,6 @@ class SqlRegionsServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/sql/v1/internal/sql_ssl_certs_option_defaults.cc b/google/cloud/sql/v1/internal/sql_ssl_certs_option_defaults.cc index b2f087972698a..367ca77faf6ed 100644 --- a/google/cloud/sql/v1/internal/sql_ssl_certs_option_defaults.cc +++ b/google/cloud/sql/v1/internal/sql_ssl_certs_option_defaults.cc @@ -42,7 +42,7 @@ Options SqlSslCertsServiceDefaultOptions(Options options) { if (!options.has()) { options.set( sql_v1::SqlSslCertsServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/sql/v1/internal/sql_ssl_certs_rest_logging_decorator.h b/google/cloud/sql/v1/internal/sql_ssl_certs_rest_logging_decorator.h index 6765595ee6ff5..43c3ab9db8946 100644 --- a/google/cloud/sql/v1/internal/sql_ssl_certs_rest_logging_decorator.h +++ b/google/cloud/sql/v1/internal/sql_ssl_certs_rest_logging_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_SSL_CERTS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_SSL_CERTS_REST_LOGGING_DECORATOR_H +#include "google/cloud/sql/v1/cloud_sql_ssl_certs.pb.h" #include "google/cloud/sql/v1/internal/sql_ssl_certs_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include #include #include #include diff --git a/google/cloud/sql/v1/internal/sql_ssl_certs_rest_metadata_decorator.cc b/google/cloud/sql/v1/internal/sql_ssl_certs_rest_metadata_decorator.cc index d1f38c496bb84..5025d899243c9 100644 --- a/google/cloud/sql/v1/internal/sql_ssl_certs_rest_metadata_decorator.cc +++ b/google/cloud/sql/v1/internal/sql_ssl_certs_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/sql/v1/cloud_sql_ssl_certs.proto #include "google/cloud/sql/v1/internal/sql_ssl_certs_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/sql/v1/internal/sql_ssl_certs_rest_metadata_decorator.h b/google/cloud/sql/v1/internal/sql_ssl_certs_rest_metadata_decorator.h index aca7d957b51dc..e5e0b0723ec19 100644 --- a/google/cloud/sql/v1/internal/sql_ssl_certs_rest_metadata_decorator.h +++ b/google/cloud/sql/v1/internal/sql_ssl_certs_rest_metadata_decorator.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_SSL_CERTS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_SSL_CERTS_REST_METADATA_DECORATOR_H +#include "google/cloud/sql/v1/cloud_sql_ssl_certs.pb.h" #include "google/cloud/sql/v1/internal/sql_ssl_certs_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/sql/v1/internal/sql_ssl_certs_rest_stub.cc b/google/cloud/sql/v1/internal/sql_ssl_certs_rest_stub.cc index 35e7275be1be4..e5909f99c7ef2 100644 --- a/google/cloud/sql/v1/internal/sql_ssl_certs_rest_stub.cc +++ b/google/cloud/sql/v1/internal/sql_ssl_certs_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/sql/v1/cloud_sql_ssl_certs.proto #include "google/cloud/sql/v1/internal/sql_ssl_certs_rest_stub.h" +#include "google/cloud/sql/v1/cloud_sql_ssl_certs.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/sql/v1/internal/sql_ssl_certs_rest_stub.h b/google/cloud/sql/v1/internal/sql_ssl_certs_rest_stub.h index dfa852015f200..d6e6c2b1b3fd8 100644 --- a/google/cloud/sql/v1/internal/sql_ssl_certs_rest_stub.h +++ b/google/cloud/sql/v1/internal/sql_ssl_certs_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_SSL_CERTS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_SSL_CERTS_REST_STUB_H +#include "google/cloud/sql/v1/cloud_sql_ssl_certs.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/internal/sql_ssl_certs_tracing_connection.cc b/google/cloud/sql/v1/internal/sql_ssl_certs_tracing_connection.cc index 14fa961160d1c..73390d7e33146 100644 --- a/google/cloud/sql/v1/internal/sql_ssl_certs_tracing_connection.cc +++ b/google/cloud/sql/v1/internal/sql_ssl_certs_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace sql_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SqlSslCertsServiceTracingConnection::SqlSslCertsServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -66,17 +64,13 @@ SqlSslCertsServiceTracingConnection::List( return internal::EndSpan(*span, child_->List(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSqlSslCertsServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/sql/v1/internal/sql_ssl_certs_tracing_connection.h b/google/cloud/sql/v1/internal/sql_ssl_certs_tracing_connection.h index 8beaf09d096f5..fa3567a7bdf20 100644 --- a/google/cloud/sql/v1/internal/sql_ssl_certs_tracing_connection.h +++ b/google/cloud/sql/v1/internal/sql_ssl_certs_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace sql_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SqlSslCertsServiceTracingConnection : public sql_v1::SqlSslCertsServiceConnection { public: @@ -56,8 +54,6 @@ class SqlSslCertsServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/sql/v1/internal/sql_tiers_option_defaults.cc b/google/cloud/sql/v1/internal/sql_tiers_option_defaults.cc index e04b64b31199e..85975fe0546af 100644 --- a/google/cloud/sql/v1/internal/sql_tiers_option_defaults.cc +++ b/google/cloud/sql/v1/internal/sql_tiers_option_defaults.cc @@ -41,7 +41,7 @@ Options SqlTiersServiceDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - sql_v1::SqlTiersServiceLimitedTimeRetryPolicy(std::chrono::minutes(30)) + sql_v1::SqlTiersServiceLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/sql/v1/internal/sql_tiers_rest_logging_decorator.h b/google/cloud/sql/v1/internal/sql_tiers_rest_logging_decorator.h index e96676d11be40..941c14f48dedc 100644 --- a/google/cloud/sql/v1/internal/sql_tiers_rest_logging_decorator.h +++ b/google/cloud/sql/v1/internal/sql_tiers_rest_logging_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_TIERS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_TIERS_REST_LOGGING_DECORATOR_H +#include "google/cloud/sql/v1/cloud_sql_tiers.pb.h" #include "google/cloud/sql/v1/internal/sql_tiers_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include #include #include #include diff --git a/google/cloud/sql/v1/internal/sql_tiers_rest_metadata_decorator.cc b/google/cloud/sql/v1/internal/sql_tiers_rest_metadata_decorator.cc index 2ca7ee8e153ee..1f5335c937368 100644 --- a/google/cloud/sql/v1/internal/sql_tiers_rest_metadata_decorator.cc +++ b/google/cloud/sql/v1/internal/sql_tiers_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/sql/v1/cloud_sql_tiers.proto #include "google/cloud/sql/v1/internal/sql_tiers_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/sql/v1/internal/sql_tiers_rest_metadata_decorator.h b/google/cloud/sql/v1/internal/sql_tiers_rest_metadata_decorator.h index ba373041d26d2..471c398f577ca 100644 --- a/google/cloud/sql/v1/internal/sql_tiers_rest_metadata_decorator.h +++ b/google/cloud/sql/v1/internal/sql_tiers_rest_metadata_decorator.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_TIERS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_TIERS_REST_METADATA_DECORATOR_H +#include "google/cloud/sql/v1/cloud_sql_tiers.pb.h" #include "google/cloud/sql/v1/internal/sql_tiers_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/sql/v1/internal/sql_tiers_rest_stub.cc b/google/cloud/sql/v1/internal/sql_tiers_rest_stub.cc index 4df4e634f7dcd..8b878729a22c0 100644 --- a/google/cloud/sql/v1/internal/sql_tiers_rest_stub.cc +++ b/google/cloud/sql/v1/internal/sql_tiers_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/sql/v1/cloud_sql_tiers.proto #include "google/cloud/sql/v1/internal/sql_tiers_rest_stub.h" +#include "google/cloud/sql/v1/cloud_sql_tiers.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/sql/v1/internal/sql_tiers_rest_stub.h b/google/cloud/sql/v1/internal/sql_tiers_rest_stub.h index 58960bd4a13a6..61c44390e4d62 100644 --- a/google/cloud/sql/v1/internal/sql_tiers_rest_stub.h +++ b/google/cloud/sql/v1/internal/sql_tiers_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_TIERS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_TIERS_REST_STUB_H +#include "google/cloud/sql/v1/cloud_sql_tiers.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/internal/sql_tiers_tracing_connection.cc b/google/cloud/sql/v1/internal/sql_tiers_tracing_connection.cc index bf4e4f21c015f..ca0227189bd3f 100644 --- a/google/cloud/sql/v1/internal/sql_tiers_tracing_connection.cc +++ b/google/cloud/sql/v1/internal/sql_tiers_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace sql_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SqlTiersServiceTracingConnection::SqlTiersServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -40,16 +38,12 @@ SqlTiersServiceTracingConnection::List( return internal::EndSpan(*span, child_->List(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSqlTiersServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/sql/v1/internal/sql_tiers_tracing_connection.h b/google/cloud/sql/v1/internal/sql_tiers_tracing_connection.h index 7b3693d58268b..3c046c3516636 100644 --- a/google/cloud/sql/v1/internal/sql_tiers_tracing_connection.h +++ b/google/cloud/sql/v1/internal/sql_tiers_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace sql_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SqlTiersServiceTracingConnection : public sql_v1::SqlTiersServiceConnection { public: @@ -47,8 +45,6 @@ class SqlTiersServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/sql/v1/internal/sql_users_option_defaults.cc b/google/cloud/sql/v1/internal/sql_users_option_defaults.cc index d474e709e16b8..74494ecb38892 100644 --- a/google/cloud/sql/v1/internal/sql_users_option_defaults.cc +++ b/google/cloud/sql/v1/internal/sql_users_option_defaults.cc @@ -41,7 +41,7 @@ Options SqlUsersServiceDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - sql_v1::SqlUsersServiceLimitedTimeRetryPolicy(std::chrono::minutes(30)) + sql_v1::SqlUsersServiceLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/sql/v1/internal/sql_users_rest_logging_decorator.h b/google/cloud/sql/v1/internal/sql_users_rest_logging_decorator.h index 20838a8ba2c50..b9f708edf5319 100644 --- a/google/cloud/sql/v1/internal/sql_users_rest_logging_decorator.h +++ b/google/cloud/sql/v1/internal/sql_users_rest_logging_decorator.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_USERS_REST_LOGGING_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_USERS_REST_LOGGING_DECORATOR_H +#include "google/cloud/sql/v1/cloud_sql_users.pb.h" #include "google/cloud/sql/v1/internal/sql_users_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include #include #include #include diff --git a/google/cloud/sql/v1/internal/sql_users_rest_metadata_decorator.cc b/google/cloud/sql/v1/internal/sql_users_rest_metadata_decorator.cc index 84173a86b1f2c..6ff348b8439d8 100644 --- a/google/cloud/sql/v1/internal/sql_users_rest_metadata_decorator.cc +++ b/google/cloud/sql/v1/internal/sql_users_rest_metadata_decorator.cc @@ -17,10 +17,10 @@ // source: google/cloud/sql/v1/cloud_sql_users.proto #include "google/cloud/sql/v1/internal/sql_users_rest_metadata_decorator.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/rest_set_metadata.h" #include "google/cloud/status_or.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/sql/v1/internal/sql_users_rest_metadata_decorator.h b/google/cloud/sql/v1/internal/sql_users_rest_metadata_decorator.h index a9d2107b576d2..bffe9429b5367 100644 --- a/google/cloud/sql/v1/internal/sql_users_rest_metadata_decorator.h +++ b/google/cloud/sql/v1/internal/sql_users_rest_metadata_decorator.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_USERS_REST_METADATA_DECORATOR_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_USERS_REST_METADATA_DECORATOR_H +#include "google/cloud/sql/v1/cloud_sql_users.pb.h" #include "google/cloud/sql/v1/internal/sql_users_rest_stub.h" #include "google/cloud/future.h" #include "google/cloud/rest_options.h" #include "google/cloud/version.h" -#include #include #include diff --git a/google/cloud/sql/v1/internal/sql_users_rest_stub.cc b/google/cloud/sql/v1/internal/sql_users_rest_stub.cc index 9ca7a082c3ecc..36da9570bb46b 100644 --- a/google/cloud/sql/v1/internal/sql_users_rest_stub.cc +++ b/google/cloud/sql/v1/internal/sql_users_rest_stub.cc @@ -17,11 +17,11 @@ // source: google/cloud/sql/v1/cloud_sql_users.proto #include "google/cloud/sql/v1/internal/sql_users_rest_stub.h" +#include "google/cloud/sql/v1/cloud_sql_users.pb.h" #include "google/cloud/common_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/rest_stub_helpers.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/sql/v1/internal/sql_users_rest_stub.h b/google/cloud/sql/v1/internal/sql_users_rest_stub.h index 965a9cd3454f4..a182422afbb74 100644 --- a/google/cloud/sql/v1/internal/sql_users_rest_stub.h +++ b/google/cloud/sql/v1/internal/sql_users_rest_stub.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_USERS_REST_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_INTERNAL_SQL_USERS_REST_STUB_H +#include "google/cloud/sql/v1/cloud_sql_users.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/rest_context.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/internal/sql_users_tracing_connection.cc b/google/cloud/sql/v1/internal/sql_users_tracing_connection.cc index b70df674acf51..501fdb6dfa053 100644 --- a/google/cloud/sql/v1/internal/sql_users_tracing_connection.cc +++ b/google/cloud/sql/v1/internal/sql_users_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace sql_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - SqlUsersServiceTracingConnection::SqlUsersServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -71,16 +69,12 @@ SqlUsersServiceTracingConnection::Update( return internal::EndSpan(*span, child_->Update(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeSqlUsersServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/sql/v1/internal/sql_users_tracing_connection.h b/google/cloud/sql/v1/internal/sql_users_tracing_connection.h index 1fafd3f5c369c..c2562a14ff5e3 100644 --- a/google/cloud/sql/v1/internal/sql_users_tracing_connection.h +++ b/google/cloud/sql/v1/internal/sql_users_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace sql_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class SqlUsersServiceTracingConnection : public sql_v1::SqlUsersServiceConnection { public: @@ -59,8 +57,6 @@ class SqlUsersServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/sql/v1/sql_available_database_versions_connection.h b/google/cloud/sql/v1/sql_available_database_versions_connection.h index 6576fac464dec..c1ac92c8bdff5 100644 --- a/google/cloud/sql/v1/sql_available_database_versions_connection.h +++ b/google/cloud/sql/v1/sql_available_database_versions_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_AVAILABLE_DATABASE_VERSIONS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_AVAILABLE_DATABASE_VERSIONS_CONNECTION_H +#include "google/cloud/sql/v1/cloud_sql_available_database_versions.pb.h" #include "google/cloud/sql/v1/internal/sql_available_database_versions_retry_traits.h" #include "google/cloud/sql/v1/sql_available_database_versions_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -26,7 +27,6 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/sql_available_database_versions_connection_idempotency_policy.h b/google/cloud/sql/v1/sql_available_database_versions_connection_idempotency_policy.h index 71b053a532c76..5a229730aac93 100644 --- a/google/cloud/sql/v1/sql_available_database_versions_connection_idempotency_policy.h +++ b/google/cloud/sql/v1/sql_available_database_versions_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_AVAILABLE_DATABASE_VERSIONS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_AVAILABLE_DATABASE_VERSIONS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/sql/v1/cloud_sql_available_database_versions.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/sql_backup_runs_connection.h b/google/cloud/sql/v1/sql_backup_runs_connection.h index efcd57cd843fd..b49ff1b14c0c0 100644 --- a/google/cloud/sql/v1/sql_backup_runs_connection.h +++ b/google/cloud/sql/v1/sql_backup_runs_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_BACKUP_RUNS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_BACKUP_RUNS_CONNECTION_H +#include "google/cloud/sql/v1/cloud_sql_backup_runs.pb.h" #include "google/cloud/sql/v1/internal/sql_backup_runs_retry_traits.h" #include "google/cloud/sql/v1/sql_backup_runs_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -26,7 +27,6 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/sql_backup_runs_connection_idempotency_policy.h b/google/cloud/sql/v1/sql_backup_runs_connection_idempotency_policy.h index d3dbfcaf720a7..15b8f43254edc 100644 --- a/google/cloud/sql/v1/sql_backup_runs_connection_idempotency_policy.h +++ b/google/cloud/sql/v1/sql_backup_runs_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_BACKUP_RUNS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_BACKUP_RUNS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/sql/v1/cloud_sql_backup_runs.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/sql_connect_connection.h b/google/cloud/sql/v1/sql_connect_connection.h index 774ae47a898d4..e249291440721 100644 --- a/google/cloud/sql/v1/sql_connect_connection.h +++ b/google/cloud/sql/v1/sql_connect_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_CONNECT_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_CONNECT_CONNECTION_H +#include "google/cloud/sql/v1/cloud_sql_connect.pb.h" #include "google/cloud/sql/v1/internal/sql_connect_retry_traits.h" #include "google/cloud/sql/v1/sql_connect_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -26,7 +27,6 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/sql_connect_connection_idempotency_policy.h b/google/cloud/sql/v1/sql_connect_connection_idempotency_policy.h index 5f77f2ffb0672..7ddc6041e03a3 100644 --- a/google/cloud/sql/v1/sql_connect_connection_idempotency_policy.h +++ b/google/cloud/sql/v1/sql_connect_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_CONNECT_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_CONNECT_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/sql/v1/cloud_sql_connect.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/sql_databases_connection.h b/google/cloud/sql/v1/sql_databases_connection.h index 504b9dca07ae0..315b22d3ffe0b 100644 --- a/google/cloud/sql/v1/sql_databases_connection.h +++ b/google/cloud/sql/v1/sql_databases_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_DATABASES_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_DATABASES_CONNECTION_H +#include "google/cloud/sql/v1/cloud_sql_databases.pb.h" #include "google/cloud/sql/v1/internal/sql_databases_retry_traits.h" #include "google/cloud/sql/v1/sql_databases_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -26,7 +27,6 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/sql_databases_connection_idempotency_policy.h b/google/cloud/sql/v1/sql_databases_connection_idempotency_policy.h index 471cb463e24f1..4e7388c6f3974 100644 --- a/google/cloud/sql/v1/sql_databases_connection_idempotency_policy.h +++ b/google/cloud/sql/v1/sql_databases_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_DATABASES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_DATABASES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/sql/v1/cloud_sql_databases.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/sql_events_connection.h b/google/cloud/sql/v1/sql_events_connection.h index 722f9fa85596f..b29ca87c41505 100644 --- a/google/cloud/sql/v1/sql_events_connection.h +++ b/google/cloud/sql/v1/sql_events_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_EVENTS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_EVENTS_CONNECTION_H +#include "google/cloud/sql/v1/cloud_sql_events.pb.h" #include "google/cloud/sql/v1/internal/sql_events_retry_traits.h" #include "google/cloud/sql/v1/sql_events_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -26,7 +27,6 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/sql_events_connection_idempotency_policy.h b/google/cloud/sql/v1/sql_events_connection_idempotency_policy.h index 11588d194dcee..8cb120e6df3ff 100644 --- a/google/cloud/sql/v1/sql_events_connection_idempotency_policy.h +++ b/google/cloud/sql/v1/sql_events_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_EVENTS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_EVENTS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/sql/v1/cloud_sql_events.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/sql_flags_connection.h b/google/cloud/sql/v1/sql_flags_connection.h index 1f43563e386af..16adedc1bde06 100644 --- a/google/cloud/sql/v1/sql_flags_connection.h +++ b/google/cloud/sql/v1/sql_flags_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_FLAGS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_FLAGS_CONNECTION_H +#include "google/cloud/sql/v1/cloud_sql_flags.pb.h" #include "google/cloud/sql/v1/internal/sql_flags_retry_traits.h" #include "google/cloud/sql/v1/sql_flags_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -26,7 +27,6 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/sql_flags_connection_idempotency_policy.h b/google/cloud/sql/v1/sql_flags_connection_idempotency_policy.h index da1bd0c468cc7..2110b9936e0a8 100644 --- a/google/cloud/sql/v1/sql_flags_connection_idempotency_policy.h +++ b/google/cloud/sql/v1/sql_flags_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_FLAGS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_FLAGS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/sql/v1/cloud_sql_flags.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/sql_iam_policies_connection.h b/google/cloud/sql/v1/sql_iam_policies_connection.h index 4e3bb2d488d49..74d8ed9d14f5e 100644 --- a/google/cloud/sql/v1/sql_iam_policies_connection.h +++ b/google/cloud/sql/v1/sql_iam_policies_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_IAM_POLICIES_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_IAM_POLICIES_CONNECTION_H +#include "google/cloud/sql/v1/cloud_sql_iam_policies.pb.h" #include "google/cloud/sql/v1/internal/sql_iam_policies_retry_traits.h" #include "google/cloud/sql/v1/sql_iam_policies_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -26,7 +27,6 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/sql_iam_policies_connection_idempotency_policy.h b/google/cloud/sql/v1/sql_iam_policies_connection_idempotency_policy.h index 4f2c4d89bdae8..2c277c8c17583 100644 --- a/google/cloud/sql/v1/sql_iam_policies_connection_idempotency_policy.h +++ b/google/cloud/sql/v1/sql_iam_policies_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_IAM_POLICIES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_IAM_POLICIES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/sql/v1/cloud_sql_iam_policies.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/sql_instance_names_connection.h b/google/cloud/sql/v1/sql_instance_names_connection.h index c9886606e6633..80433568f1240 100644 --- a/google/cloud/sql/v1/sql_instance_names_connection.h +++ b/google/cloud/sql/v1/sql_instance_names_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_INSTANCE_NAMES_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_INSTANCE_NAMES_CONNECTION_H +#include "google/cloud/sql/v1/cloud_sql_instance_names.pb.h" #include "google/cloud/sql/v1/internal/sql_instance_names_retry_traits.h" #include "google/cloud/sql/v1/sql_instance_names_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -26,7 +27,6 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/sql_instance_names_connection_idempotency_policy.h b/google/cloud/sql/v1/sql_instance_names_connection_idempotency_policy.h index 1e6af25ba1333..bbffe7af88a9d 100644 --- a/google/cloud/sql/v1/sql_instance_names_connection_idempotency_policy.h +++ b/google/cloud/sql/v1/sql_instance_names_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_INSTANCE_NAMES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_INSTANCE_NAMES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/sql/v1/cloud_sql_instance_names.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/sql_instances_connection.h b/google/cloud/sql/v1/sql_instances_connection.h index 9db1a32aeed0a..783a6c043ca7c 100644 --- a/google/cloud/sql/v1/sql_instances_connection.h +++ b/google/cloud/sql/v1/sql_instances_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_INSTANCES_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_INSTANCES_CONNECTION_H +#include "google/cloud/sql/v1/cloud_sql_instances.pb.h" #include "google/cloud/sql/v1/internal/sql_instances_retry_traits.h" #include "google/cloud/sql/v1/sql_instances_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/sql_instances_connection_idempotency_policy.h b/google/cloud/sql/v1/sql_instances_connection_idempotency_policy.h index 00cb4ac6fab45..22ab46d50cc25 100644 --- a/google/cloud/sql/v1/sql_instances_connection_idempotency_policy.h +++ b/google/cloud/sql/v1/sql_instances_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_INSTANCES_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_INSTANCES_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/sql/v1/cloud_sql_instances.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/sql_operations_connection.h b/google/cloud/sql/v1/sql_operations_connection.h index 308c5c0d0a6dc..7368c322b551b 100644 --- a/google/cloud/sql/v1/sql_operations_connection.h +++ b/google/cloud/sql/v1/sql_operations_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_OPERATIONS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_OPERATIONS_CONNECTION_H +#include "google/cloud/sql/v1/cloud_sql_operations.pb.h" #include "google/cloud/sql/v1/internal/sql_operations_retry_traits.h" #include "google/cloud/sql/v1/sql_operations_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/sql_operations_connection_idempotency_policy.h b/google/cloud/sql/v1/sql_operations_connection_idempotency_policy.h index cda1f2473f33b..c063ca7632ba7 100644 --- a/google/cloud/sql/v1/sql_operations_connection_idempotency_policy.h +++ b/google/cloud/sql/v1/sql_operations_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_OPERATIONS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_OPERATIONS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/sql/v1/cloud_sql_operations.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/sql_regions_connection.h b/google/cloud/sql/v1/sql_regions_connection.h index 49a891c1ba1d6..39566ba63c571 100644 --- a/google/cloud/sql/v1/sql_regions_connection.h +++ b/google/cloud/sql/v1/sql_regions_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_REGIONS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_REGIONS_CONNECTION_H +#include "google/cloud/sql/v1/cloud_sql_regions.pb.h" #include "google/cloud/sql/v1/internal/sql_regions_retry_traits.h" #include "google/cloud/sql/v1/sql_regions_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -26,7 +27,6 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/sql_regions_connection_idempotency_policy.h b/google/cloud/sql/v1/sql_regions_connection_idempotency_policy.h index b3ad5ca636762..82ad0242667b2 100644 --- a/google/cloud/sql/v1/sql_regions_connection_idempotency_policy.h +++ b/google/cloud/sql/v1/sql_regions_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_REGIONS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_REGIONS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/sql/v1/cloud_sql_regions.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/sql_ssl_certs_connection.h b/google/cloud/sql/v1/sql_ssl_certs_connection.h index 72c02c2404fdc..7bd5c49a1a7f5 100644 --- a/google/cloud/sql/v1/sql_ssl_certs_connection.h +++ b/google/cloud/sql/v1/sql_ssl_certs_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_SSL_CERTS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_SSL_CERTS_CONNECTION_H +#include "google/cloud/sql/v1/cloud_sql_ssl_certs.pb.h" #include "google/cloud/sql/v1/internal/sql_ssl_certs_retry_traits.h" #include "google/cloud/sql/v1/sql_ssl_certs_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -26,7 +27,6 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/sql_ssl_certs_connection_idempotency_policy.h b/google/cloud/sql/v1/sql_ssl_certs_connection_idempotency_policy.h index 2974b4dcc66ff..9205243966459 100644 --- a/google/cloud/sql/v1/sql_ssl_certs_connection_idempotency_policy.h +++ b/google/cloud/sql/v1/sql_ssl_certs_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_SSL_CERTS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_SSL_CERTS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/sql/v1/cloud_sql_ssl_certs.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/sql_tiers_connection.h b/google/cloud/sql/v1/sql_tiers_connection.h index 2f911d7176dd2..e4f4ff31d629e 100644 --- a/google/cloud/sql/v1/sql_tiers_connection.h +++ b/google/cloud/sql/v1/sql_tiers_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_TIERS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_TIERS_CONNECTION_H +#include "google/cloud/sql/v1/cloud_sql_tiers.pb.h" #include "google/cloud/sql/v1/internal/sql_tiers_retry_traits.h" #include "google/cloud/sql/v1/sql_tiers_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -26,7 +27,6 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/sql_tiers_connection_idempotency_policy.h b/google/cloud/sql/v1/sql_tiers_connection_idempotency_policy.h index 378384f1da51c..b88c2a5a7fad7 100644 --- a/google/cloud/sql/v1/sql_tiers_connection_idempotency_policy.h +++ b/google/cloud/sql/v1/sql_tiers_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_TIERS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_TIERS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/sql/v1/cloud_sql_tiers.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/sql_users_connection.h b/google/cloud/sql/v1/sql_users_connection.h index c46c470fe8d31..239a01ba00b2f 100644 --- a/google/cloud/sql/v1/sql_users_connection.h +++ b/google/cloud/sql/v1/sql_users_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_USERS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_USERS_CONNECTION_H +#include "google/cloud/sql/v1/cloud_sql_users.pb.h" #include "google/cloud/sql/v1/internal/sql_users_retry_traits.h" #include "google/cloud/sql/v1/sql_users_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -26,7 +27,6 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/sql/v1/sql_users_connection_idempotency_policy.h b/google/cloud/sql/v1/sql_users_connection_idempotency_policy.h index 20eff7405ac42..dfbe34ba72df5 100644 --- a/google/cloud/sql/v1/sql_users_connection_idempotency_policy.h +++ b/google/cloud/sql/v1/sql_users_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_USERS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SQL_V1_SQL_USERS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/sql/v1/cloud_sql_users.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/storage/BUILD.bazel b/google/cloud/storage/BUILD.bazel index 2926a5ba7f503..0055ee1662500 100644 --- a/google/cloud/storage/BUILD.bazel +++ b/google/cloud/storage/BUILD.bazel @@ -74,20 +74,19 @@ cc_library( deps = [ ":google_cloud_cpp_storage", "//:grpc_utils", - "@com_github_curl_curl//:curl", - "@com_github_google_crc32c//:crc32c", - "@com_github_grpc_grpc//:grpc++", - "@com_github_nlohmann_json//:json", - "@com_google_absl//absl/algorithm:container", - "@com_google_absl//absl/strings", - "@com_google_absl//absl/time", - "@com_google_googleapis//google/storage/v2:storage_cc_grpc", - "@com_google_googleapis//google/storage/v2:storage_cc_proto", + "@abseil-cpp//absl/algorithm:container", + "@abseil-cpp//absl/strings", + "@abseil-cpp//absl/time", + "@curl", + "@googleapis//google/storage/v2:storage_cc_grpc", + "@googleapis//google/storage/v2:storage_cc_proto", + "@grpc//:grpc++", + "@nlohmann_json//:json", ] + select({ ":grpc_metrics_enabled": [ "//:opentelemetry", - "@com_github_grpc_grpc//:grpcpp_otel_plugin", - "@io_opentelemetry_cpp//sdk/src/metrics", + "@grpc//:grpcpp_otel_plugin", + "@opentelemetry-cpp//sdk/src/metrics", ], "//conditions:default": [], }), @@ -110,7 +109,7 @@ cc_library( deps = [ ":google_cloud_cpp_storage", ":google_cloud_cpp_storage_grpc", - "@com_google_googletest//:gtest", + "@googletest//:gtest", ], ) @@ -141,14 +140,14 @@ cc_library( deps = [ "//:common", "//google/cloud:google_cloud_cpp_rest_internal", - "@com_github_curl_curl//:curl", - "@com_github_google_crc32c//:crc32c", - "@com_github_nlohmann_json//:json", - "@com_google_absl//absl/strings:cord", - "@com_google_absl//absl/strings:str_format", - "@com_google_absl//absl/time", - "@com_google_absl//absl/types:span", - "@com_google_absl//absl/types:variant", + "@abseil-cpp//absl/crc:crc32c", + "@abseil-cpp//absl/strings:cord", + "@abseil-cpp//absl/strings:str_format", + "@abseil-cpp//absl/time", + "@abseil-cpp//absl/types:span", + "@abseil-cpp//absl/types:variant", + "@curl", + "@nlohmann_json//:json", ] + select({ "@platforms//os:windows": [], "//conditions:default": [ @@ -177,7 +176,7 @@ cc_library( deps = [ ":google_cloud_cpp_storage", "//:common", - "@com_google_googletest//:gtest", + "@googletest//:gtest", ], ) @@ -186,7 +185,10 @@ cc_library( testonly = True, srcs = storage_client_testing_srcs, hdrs = storage_client_testing_hdrs, - visibility = ["//visibility:public"], + visibility = [ + ":__subpackages__", + "//:__pkg__", + ], deps = [ ":google_cloud_cpp_storage", ":google_cloud_cpp_storage_grpc", @@ -194,8 +196,8 @@ cc_library( "//google/cloud:google_cloud_cpp_mocks", "//google/cloud/testing_util:google_cloud_cpp_testing_private", "//google/cloud/testing_util:google_cloud_cpp_testing_rest_private", - "@com_github_curl_curl//:curl", - "@com_google_googletest//:gtest_main", + "@curl", + "@googletest//:gtest_main", ], ) @@ -211,8 +213,8 @@ cc_library( ":storage_client_testing", "//:common", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_github_curl_curl//:curl", - "@com_google_googletest//:gtest_main", + "@curl", + "@googletest//:gtest_main", ] + select({ "@platforms//os:windows": [], "//conditions:default": [ @@ -246,9 +248,9 @@ cc_library( "//:mocks", "//google/cloud/testing_util:google_cloud_cpp_testing_grpc_private", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_github_curl_curl//:curl", - "@com_google_googletest//:gtest", - "@com_google_googletest//:gtest_main", + "@curl", + "@googletest//:gtest", + "@googletest//:gtest_main", ], ) for test in storage_client_grpc_unit_tests] diff --git a/google/cloud/storage/CMakeLists.txt b/google/cloud/storage/CMakeLists.txt index b3c2eaa890eb0..32f4e6ccf2094 100644 --- a/google/cloud/storage/CMakeLists.txt +++ b/google/cloud/storage/CMakeLists.txt @@ -30,8 +30,7 @@ google_cloud_cpp_doxygen_targets("storage" DEPENDS cloud-docs include(GoogleCloudCppCommon) -include(IncludeNlohmannJson) -find_package(Crc32c) +find_package(nlohmann_json CONFIG REQUIRED) # Export the version information for Bazel. include(CreateBazelConfig) diff --git a/google/cloud/storage/async/bucket_name.cc b/google/cloud/storage/async/bucket_name.cc index dada26fdcf320..d1ef10326e178 100644 --- a/google/cloud/storage/async/bucket_name.cc +++ b/google/cloud/storage/async/bucket_name.cc @@ -13,9 +13,9 @@ // limitations under the License. #include "google/cloud/storage/async/bucket_name.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/make_status.h" #include "absl/strings/match.h" +#include "absl/strings/str_cat.h" #include "absl/strings/strip.h" #include #include diff --git a/google/cloud/storage/async/client.h b/google/cloud/storage/async/client.h index 49903eb12ac86..93009005af3c5 100644 --- a/google/cloud/storage/async/client.h +++ b/google/cloud/storage/async/client.h @@ -28,7 +28,7 @@ #include "google/cloud/background_threads.h" #include "google/cloud/internal/group_options.h" #include "google/cloud/status_or.h" -#include +#include "google/storage/v2/storage.pb.h" #include #include #include diff --git a/google/cloud/storage/async/connection.h b/google/cloud/storage/async/connection.h index 5d554a07144b4..8e9df06d9f9e9 100644 --- a/google/cloud/storage/async/connection.h +++ b/google/cloud/storage/async/connection.h @@ -23,7 +23,7 @@ #include "google/cloud/future.h" #include "google/cloud/status.h" #include "google/cloud/version.h" -#include +#include "google/storage/v2/storage.pb.h" #include #include diff --git a/google/cloud/storage/async/idempotency_policy.h b/google/cloud/storage/async/idempotency_policy.h index eeeebaa53d4e5..6f4b721ae1296 100644 --- a/google/cloud/storage/async/idempotency_policy.h +++ b/google/cloud/storage/async/idempotency_policy.h @@ -17,7 +17,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/storage/v2/storage.pb.h" #include #include diff --git a/google/cloud/storage/async/object_descriptor_connection.h b/google/cloud/storage/async/object_descriptor_connection.h index 5c03ac39f44a1..f7ea1898a12bf 100644 --- a/google/cloud/storage/async/object_descriptor_connection.h +++ b/google/cloud/storage/async/object_descriptor_connection.h @@ -19,7 +19,7 @@ #include "google/cloud/options.h" #include "google/cloud/version.h" #include "absl/types/optional.h" -#include +#include "google/storage/v2/storage.pb.h" #include #include diff --git a/google/cloud/storage/async/object_responses.h b/google/cloud/storage/async/object_responses.h index bd0421056504b..064b31ac2485f 100644 --- a/google/cloud/storage/async/object_responses.h +++ b/google/cloud/storage/async/object_responses.h @@ -22,7 +22,7 @@ #include "absl/strings/cord.h" #include "absl/strings/string_view.h" #include "absl/types/optional.h" -#include +#include "google/storage/v2/storage.pb.h" #include #include #include diff --git a/google/cloud/storage/async/rewriter.h b/google/cloud/storage/async/rewriter.h index 55c90a700a83c..a5f5eb82829de 100644 --- a/google/cloud/storage/async/rewriter.h +++ b/google/cloud/storage/async/rewriter.h @@ -23,7 +23,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/version.h" #include "absl/types/optional.h" -#include +#include "google/storage/v2/storage.pb.h" #include #include #include diff --git a/google/cloud/storage/async/rewriter_connection.h b/google/cloud/storage/async/rewriter_connection.h index 08ee405707caf..ded7ef32225c3 100644 --- a/google/cloud/storage/async/rewriter_connection.h +++ b/google/cloud/storage/async/rewriter_connection.h @@ -18,7 +18,7 @@ #include "google/cloud/future.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/storage/v2/storage.pb.h" namespace google { namespace cloud { diff --git a/google/cloud/storage/async/writer.h b/google/cloud/storage/async/writer.h index 53d8a42fd54bc..f39f8f5bee3db 100644 --- a/google/cloud/storage/async/writer.h +++ b/google/cloud/storage/async/writer.h @@ -22,7 +22,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/version.h" #include "absl/types/variant.h" -#include +#include "google/storage/v2/storage.pb.h" #include #include #include diff --git a/google/cloud/storage/async/writer_connection.h b/google/cloud/storage/async/writer_connection.h index 7c7048dda28f8..43d6348f055ae 100644 --- a/google/cloud/storage/async/writer_connection.h +++ b/google/cloud/storage/async/writer_connection.h @@ -23,7 +23,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/version.h" #include "absl/types/variant.h" -#include +#include "google/storage/v2/storage.pb.h" #include #include diff --git a/google/cloud/storage/benchmarks/BUILD.bazel b/google/cloud/storage/benchmarks/BUILD.bazel index ff365a9bda208..30fb66ad7fa05 100644 --- a/google/cloud/storage/benchmarks/BUILD.bazel +++ b/google/cloud/storage/benchmarks/BUILD.bazel @@ -35,9 +35,9 @@ cc_library( "//:storage", "//google/cloud/storage:storage_client_testing", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_github_curl_curl//:curl", - "@com_google_googleapis//google/storage/v2:storage_cc_grpc", - "@com_google_googleapis//google/storage/v2:storage_cc_proto", + "@curl", + "@googleapis//google/storage/v2:storage_cc_grpc", + "@googleapis//google/storage/v2:storage_cc_proto", ], ) @@ -55,8 +55,8 @@ cc_library( "//:storage", "//google/cloud/storage:storage_client_testing", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_github_curl_curl//:curl", - "@com_google_absl//absl/strings", + "@abseil-cpp//absl/strings", + "@curl", ], ) for program in storage_benchmark_programs] @@ -73,8 +73,8 @@ cc_library( "//:storage", "//google/cloud/storage:storage_client_testing", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_github_curl_curl//:curl", - "@com_google_googletest//:gtest_main", + "@curl", + "@googletest//:gtest_main", ], ) for test in storage_benchmarks_unit_tests] diff --git a/google/cloud/storage/benchmarks/aggregate_download_throughput_options.cc b/google/cloud/storage/benchmarks/aggregate_download_throughput_options.cc index 35e18922ba994..8892603258851 100644 --- a/google/cloud/storage/benchmarks/aggregate_download_throughput_options.cc +++ b/google/cloud/storage/benchmarks/aggregate_download_throughput_options.cc @@ -14,8 +14,8 @@ #include "google/cloud/storage/benchmarks/aggregate_download_throughput_options.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/make_status.h" +#include "absl/strings/str_join.h" #include #include #include diff --git a/google/cloud/storage/benchmarks/aggregate_upload_throughput_options.cc b/google/cloud/storage/benchmarks/aggregate_upload_throughput_options.cc index 9868a928bd26c..267eda0f35316 100644 --- a/google/cloud/storage/benchmarks/aggregate_upload_throughput_options.cc +++ b/google/cloud/storage/benchmarks/aggregate_upload_throughput_options.cc @@ -14,7 +14,7 @@ #include "google/cloud/storage/benchmarks/aggregate_upload_throughput_options.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_join_quiet.h" +#include "absl/strings/str_join.h" #include #include #include diff --git a/google/cloud/storage/benchmarks/async_throughput_benchmark.cc b/google/cloud/storage/benchmarks/async_throughput_benchmark.cc index bf2ac557b287c..a298f26551ec4 100644 --- a/google/cloud/storage/benchmarks/async_throughput_benchmark.cc +++ b/google/cloud/storage/benchmarks/async_throughput_benchmark.cc @@ -24,11 +24,11 @@ #include "google/cloud/storage/client.h" #include "google/cloud/storage/grpc_plugin.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/build_info.h" #include "google/cloud/options.h" #include "google/cloud/status.h" #include "google/cloud/testing_util/command_line_parsing.h" +#include "absl/strings/str_join.h" #include "absl/strings/str_split.h" #include #include diff --git a/google/cloud/storage/benchmarks/benchmark_utils.cc b/google/cloud/storage/benchmarks/benchmark_utils.cc index 0ede910e40c77..a95352dd8c161 100644 --- a/google/cloud/storage/benchmarks/benchmark_utils.cc +++ b/google/cloud/storage/benchmarks/benchmark_utils.cc @@ -16,14 +16,14 @@ #include "google/cloud/storage/benchmarks/bounded_queue.h" #include "google/cloud/storage/options.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/compute_engine_util.h" #include "google/cloud/internal/curl_options.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/internal/rest_client.h" #include "google/cloud/internal/throw_delegate.h" #include "google/cloud/options.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include "absl/strings/str_split.h" #include "absl/strings/strip.h" #include "absl/time/time.h" diff --git a/google/cloud/storage/benchmarks/storage_throughput_vs_cpu_benchmark.cc b/google/cloud/storage/benchmarks/storage_throughput_vs_cpu_benchmark.cc index dda095d1f1c05..39cd64855fc6c 100644 --- a/google/cloud/storage/benchmarks/storage_throughput_vs_cpu_benchmark.cc +++ b/google/cloud/storage/benchmarks/storage_throughput_vs_cpu_benchmark.cc @@ -18,12 +18,12 @@ #include "google/cloud/storage/benchmarks/throughput_result.h" #include "google/cloud/storage/client.h" #include "google/cloud/storage/grpc_plugin.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/build_info.h" #include "google/cloud/internal/format_time_point.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/internal/random.h" #include "google/cloud/log.h" +#include "absl/strings/str_join.h" #include "absl/time/time.h" #include #include diff --git a/google/cloud/storage/benchmarks/throughput_experiment.cc b/google/cloud/storage/benchmarks/throughput_experiment.cc index 7639d692b26e3..2611a280b43eb 100644 --- a/google/cloud/storage/benchmarks/throughput_experiment.cc +++ b/google/cloud/storage/benchmarks/throughput_experiment.cc @@ -16,10 +16,11 @@ #include "google/cloud/storage/benchmarks/benchmark_utils.h" #include "google/cloud/storage/client.h" #include "google/cloud/internal/make_status.h" +#include "google/cloud/internal/unified_rest_credentials.h" #if GOOGLE_CLOUD_CPP_STORAGE_HAVE_GRPC #include "google/cloud/storage/internal/grpc/ctype_cord_workaround.h" #include "google/cloud/grpc_error_delegate.h" -#include +#include "google/storage/v2/storage.grpc.pb.h" #include #include #include @@ -260,8 +261,7 @@ class DownloadObjectLibcurl : public ThroughputExperiment { : endpoint_(options.rest_options.get()), target_api_version_path_( options.rest_options.get()), - creds_(google::cloud::storage::oauth2::GoogleDefaultCredentials() - .value()) { + creds_(rest_internal::MapCredentials(*MakeGoogleDefaultCredentials())) { if (target_api_version_path_.empty()) { target_api_version_path_ = "v1"; } @@ -271,13 +271,14 @@ class DownloadObjectLibcurl : public ThroughputExperiment { ThroughputResult Run(std::string const& bucket_name, std::string const& object_name, ThroughputExperimentConfig const& config) override { - auto header = creds_->AuthorizationHeader(); - if (!header) return {}; + auto token = creds_->GetToken(std::chrono::system_clock::now()); + if (!token) return {}; + auto header = std::string{"Authorization: "} + token->token; auto const start = std::chrono::system_clock::now(); auto timer = Timer::PerThread(); struct curl_slist* slist1 = nullptr; - slist1 = curl_slist_append(slist1, header->c_str()); + slist1 = curl_slist_append(slist1, header.c_str()); auto* hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_BUFFERSIZE, 102400L); @@ -339,7 +340,7 @@ class DownloadObjectLibcurl : public ThroughputExperiment { private: std::string endpoint_; std::string target_api_version_path_; - std::shared_ptr creds_; + std::shared_ptr creds_; }; #if GOOGLE_CLOUD_CPP_STORAGE_HAVE_GRPC diff --git a/google/cloud/storage/bucket_cors_entry.cc b/google/cloud/storage/bucket_cors_entry.cc index a6db2cbdcfc56..f7e68069377d8 100644 --- a/google/cloud/storage/bucket_cors_entry.cc +++ b/google/cloud/storage/bucket_cors_entry.cc @@ -13,7 +13,7 @@ // limitations under the License. #include "google/cloud/storage/bucket_cors_entry.h" -#include "google/cloud/internal/absl_str_join_quiet.h" +#include "absl/strings/str_join.h" #include namespace google { diff --git a/google/cloud/storage/bucket_custom_placement_config.cc b/google/cloud/storage/bucket_custom_placement_config.cc index 3402b69659d24..bc2fcb8b8fdb0 100644 --- a/google/cloud/storage/bucket_custom_placement_config.cc +++ b/google/cloud/storage/bucket_custom_placement_config.cc @@ -13,7 +13,7 @@ // limitations under the License. #include "google/cloud/storage/bucket_custom_placement_config.h" -#include "google/cloud/internal/absl_str_join_quiet.h" +#include "absl/strings/str_join.h" #include namespace google { diff --git a/google/cloud/storage/bucket_metadata.cc b/google/cloud/storage/bucket_metadata.cc index 0d4a3ea42d4fa..eb3fd410b9d65 100644 --- a/google/cloud/storage/bucket_metadata.cc +++ b/google/cloud/storage/bucket_metadata.cc @@ -14,11 +14,11 @@ #include "google/cloud/storage/bucket_metadata.h" #include "google/cloud/storage/internal/bucket_metadata_parser.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/format_time_point.h" #include "google/cloud/internal/ios_flags_saver.h" #include "google/cloud/status.h" #include "absl/strings/str_format.h" +#include "absl/strings/str_join.h" #include #include #include diff --git a/google/cloud/storage/bucket_object_retention_test.cc b/google/cloud/storage/bucket_object_retention_test.cc index 162ef6800b857..19175cad39dbf 100644 --- a/google/cloud/storage/bucket_object_retention_test.cc +++ b/google/cloud/storage/bucket_object_retention_test.cc @@ -13,7 +13,7 @@ // limitations under the License. #include "google/cloud/storage/bucket_object_retention.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" +#include "absl/strings/str_cat.h" #include #include diff --git a/google/cloud/storage/bucket_soft_delete_policy_test.cc b/google/cloud/storage/bucket_soft_delete_policy_test.cc index 8e15a53e8d271..03eefd5f73259 100644 --- a/google/cloud/storage/bucket_soft_delete_policy_test.cc +++ b/google/cloud/storage/bucket_soft_delete_policy_test.cc @@ -13,7 +13,7 @@ // limitations under the License. #include "google/cloud/storage/bucket_soft_delete_policy.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" +#include "absl/strings/str_cat.h" #include "absl/time/time.h" #include #include diff --git a/google/cloud/storage/client.cc b/google/cloud/storage/client.cc index 8d67b1fb0e6c0..22db63e9346b6 100644 --- a/google/cloud/storage/client.cc +++ b/google/cloud/storage/client.cc @@ -13,19 +13,34 @@ // limitations under the License. #include "google/cloud/storage/client.h" +#include "google/cloud/storage/idempotency_policy.h" #include "google/cloud/storage/internal/base64.h" #include "google/cloud/storage/internal/connection_factory.h" -#include "google/cloud/storage/oauth2/service_account_credentials.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" +#include "google/cloud/storage/options.h" #include "google/cloud/internal/curl_handle.h" #include "google/cloud/internal/curl_options.h" #include "google/cloud/internal/filesystem.h" +#include "google/cloud/internal/getenv.h" #include "google/cloud/internal/make_status.h" +#include "google/cloud/internal/oauth2_service_account_credentials.h" #include "google/cloud/internal/opentelemetry.h" +#include "google/cloud/internal/populate_common_options.h" +#include "google/cloud/internal/rest_options.h" +#include "google/cloud/internal/rest_response.h" +#include "google/cloud/internal/service_endpoint.h" +#include "google/cloud/internal/sha256_hash.h" +#include "google/cloud/internal/unified_rest_credentials.h" #include "google/cloud/log.h" +#include "google/cloud/opentelemetry_options.h" +#include "google/cloud/universe_domain_options.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include "absl/strings/str_split.h" +#include #include #include +#include +#include #include #include #include @@ -36,6 +51,32 @@ namespace cloud { namespace storage { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN +namespace { +class WrapRestCredentials { + public: + explicit WrapRestCredentials( + std::shared_ptr impl) + : impl_(std::move(impl)) {} + + StatusOr AuthorizationHeader() { + return oauth2_internal::AuthenticationHeaderJoined(*impl_); + } + + StatusOr> SignBlob( + SigningAccount const& signing_account, std::string const& blob) const { + return impl_->SignBlob(signing_account.value_or(impl_->AccountEmail()), + blob); + } + + std::string AccountEmail() const { return impl_->AccountEmail(); } + std::string KeyId() const { return impl_->KeyId(); } + + private: + std::shared_ptr impl_; +}; + +} // namespace + using ::google::cloud::rest_internal::CurlHandle; static_assert(std::is_copy_constructible::value, @@ -60,8 +101,6 @@ Client::Client(InternalOnly, Options const& opts) : Client(InternalOnlyNoDecorations{}, storage_internal::MakeStorageConnection(opts)) {} -StatusOr Client::CreateDefaultClient() { return Client(Options{}); } - ObjectReadStream Client::ReadObjectImpl( internal::ReadObjectRangeRequest const& request) { auto source = connection_->ReadObject(request); @@ -235,17 +274,21 @@ std::string Client::SigningEmail(SigningAccount const& signing_account) const { if (signing_account.has_value()) { return signing_account.value(); } - return connection_->client_options().credentials()->AccountEmail(); + + auto credentials = WrapRestCredentials(rest_internal::MapCredentials( + *connection_->options().get())); + return credentials.AccountEmail(); } StatusOr Client::SignBlobImpl( SigningAccount const& signing_account, std::string const& string_to_sign) { - auto credentials = connection_->client_options().credentials(); + auto credentials = WrapRestCredentials(rest_internal::MapCredentials( + *connection_->options().get())); // First try to sign locally. - auto signed_blob = credentials->SignBlob(signing_account, string_to_sign); + auto signed_blob = credentials.SignBlob(signing_account, string_to_sign); if (signed_blob) { - return SignBlobResponseRaw{credentials->KeyId(), *std::move(signed_blob)}; + return SignBlobResponseRaw{credentials.KeyId(), *std::move(signed_blob)}; } // If signing locally fails that may be because the credentials do not @@ -389,8 +432,224 @@ std::string Client::EndpointAuthority() const { return std::string(endpoint_authority); } +// This magic number was obtained by experimentation summarized in #2657 +#ifndef GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_UPLOAD_BUFFER_SIZE +#define GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_UPLOAD_BUFFER_SIZE (8 * 1024 * 1024) +#endif // GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_UPLOAD_BUFFER_SIZE + +// This magic number was obtained by experimentation summarized in #2657 +#ifndef GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_DOWNLOAD_BUFFER_SIZE +#define GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_DOWNLOAD_BUFFER_SIZE \ + (3 * 1024 * 1024 / 2) +#endif // GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_DOWNLOAD_BUFFER_SIZE + +// This is a result of experiments performed in #2657. +#ifndef GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_MAXIMUM_SIMPLE_UPLOAD_SIZE +#define GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_MAXIMUM_SIMPLE_UPLOAD_SIZE \ + (20 * 1024 * 1024L) +#endif // GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_MAXIMUM_SIMPLE_UPLOAD_SIZE + +#ifndef GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_DOWNLOAD_STALL_TIMEOUT +#define GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_DOWNLOAD_STALL_TIMEOUT 120 +#endif // GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_DOWNLOAD_STALL_TIMEOUT + +// Define the defaults using a pre-processor macro, this allows the application +// developers to change the defaults for their application by compiling with +// different values. +#ifndef STORAGE_CLIENT_DEFAULT_MAXIMUM_RETRY_PERIOD +#define STORAGE_CLIENT_DEFAULT_MAXIMUM_RETRY_PERIOD std::chrono::minutes(15) +#endif // STORAGE_CLIENT_DEFAULT_MAXIMUM_RETRY_PERIOD + +#ifndef STORAGE_CLIENT_DEFAULT_INITIAL_BACKOFF_DELAY +#define STORAGE_CLIENT_DEFAULT_INITIAL_BACKOFF_DELAY std::chrono::seconds(1) +#endif // STORAGE_CLIENT_DEFAULT_INITIAL_BACKOFF_DELAY + +#ifndef STORAGE_CLIENT_DEFAULT_MAXIMUM_BACKOFF_DELAY +#define STORAGE_CLIENT_DEFAULT_MAXIMUM_BACKOFF_DELAY std::chrono::minutes(5) +#endif // STORAGE_CLIENT_DEFAULT_MAXIMUM_BACKOFF_DELAY + +#ifndef STORAGE_CLIENT_DEFAULT_BACKOFF_SCALING +#define STORAGE_CLIENT_DEFAULT_BACKOFF_SCALING 2.0 +#endif // STORAGE_CLIENT_DEFAULT_BACKOFF_SCALING + +namespace { + +using ::google::cloud::internal::GetEnv; + +absl::optional GetEmulator() { + auto emulator = GetEnv("CLOUD_STORAGE_EMULATOR_ENDPOINT"); + if (emulator) return emulator; + return GetEnv("CLOUD_STORAGE_TESTBENCH_ENDPOINT"); +} + +std::size_t DefaultConnectionPoolSize() { + std::size_t nthreads = std::thread::hardware_concurrency(); + if (nthreads == 0) { + return 4; + } + return 4 * nthreads; +} + +} // namespace + namespace internal { +Options ApplyPolicy(Options opts, RetryPolicy const& p) { + opts.set(p.clone()); + return opts; +} + +Options ApplyPolicy(Options opts, BackoffPolicy const& p) { + opts.set(p.clone()); + return opts; +} + +Options ApplyPolicy(Options opts, IdempotencyPolicy const& p) { + opts.set(p.clone()); + return opts; +} + +Options DefaultOptions(std::shared_ptr const&, + Options opts) { + return DefaultOptions(std::move(opts)); +} + +Options DefaultOptions(Options opts) { + auto ud = GetEnv("GOOGLE_CLOUD_UNIVERSE_DOMAIN"); + if (ud && !ud->empty()) { + opts.set(*std::move(ud)); + } + auto gcs_ep = google::cloud::internal::UniverseDomainEndpoint( + "https://storage.googleapis.com", opts); + auto iam_ep = absl::StrCat(google::cloud::internal::UniverseDomainEndpoint( + "https://iamcredentials.googleapis.com", opts), + "/v1"); + Options o; + if (!opts.has()) { + o.set(MakeGoogleDefaultCredentials()); + } + // Storage has more stringent requirements w.r.t. self-signed JWTs + // than most services. Any scope makes the self-signed JWTs unusable with + // storage, but they remain usable with other services. We need to disable + // self-signed JWTs. + o.set({}) + .set(std::move(gcs_ep)) + .set(std::move(iam_ep)) + .set("v1") + .set(DefaultConnectionPoolSize()) + .set( + GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_DOWNLOAD_BUFFER_SIZE) + .set( + GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_UPLOAD_BUFFER_SIZE) + .set( + GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_MAXIMUM_SIMPLE_UPLOAD_SIZE) + .set(true) + .set(true) + .set(0) + .set(0) + .set(std::chrono::seconds( + GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_DOWNLOAD_STALL_TIMEOUT)) + .set(1) + .set(1) + .set( + LimitedTimeRetryPolicy(STORAGE_CLIENT_DEFAULT_MAXIMUM_RETRY_PERIOD) + .clone()) + .set( + ExponentialBackoffPolicy(STORAGE_CLIENT_DEFAULT_INITIAL_BACKOFF_DELAY, + STORAGE_CLIENT_DEFAULT_MAXIMUM_BACKOFF_DELAY, + STORAGE_CLIENT_DEFAULT_BACKOFF_SCALING) + .clone()) + .set(AlwaysRetryIdempotencyPolicy().clone()); + + o = google::cloud::internal::MergeOptions(std::move(opts), std::move(o)); + // If the application did not set `DownloadStallTimeoutOption` then use the + // same value as `TransferStallTimeoutOption` (which could be the default + // value). Some applications need tighter timeouts for downloads, but longer + // timeouts for other transfers. + if (!o.has()) { + o.set(o.get()); + } + + auto emulator = GetEmulator(); + if (emulator.has_value()) { + o.set(*emulator).set(*emulator + + "/iamapi"); + } + + auto logging = GetEnv("CLOUD_STORAGE_ENABLE_TRACING"); + if (logging) { + for (auto c : absl::StrSplit(*logging, ',')) { + GCP_LOG(INFO) << "Enabling logging for " << c; + o.lookup().insert(std::string(c)); + } + } + + auto tracing = GetEnv("GOOGLE_CLOUD_CPP_OPENTELEMETRY_TRACING"); + if (tracing && !tracing->empty()) { + o.set(true); + } + + auto project_id = GetEnv("GOOGLE_CLOUD_PROJECT"); + if (project_id.has_value()) { + o.set(std::move(*project_id)); + } + + // Always apply the RestClient defaults, even if it is not in use. Now that we + // use the low-level initialization code in + // google/cloud/internal/curl_wrappers.cc, these are always needed. + namespace rest = ::google::cloud::rest_internal; + auto rest_defaults = Options{} + .set( + o.get()) + .set( + o.get()) + .set( + o.get()) + .set( + o.get()) + .set( + o.get()) + .set( + o.get()) + .set( + o.get()) + .set( + o.get()) + .set( + o.get()); + + // These two are not always present, but if they are, and only if they are, we + // need to map their value to the corresponding option in `rest_internal::`. + if (o.has()) { + rest_defaults.set( + o.get()); + } + if (o.has()) { + rest_defaults.set(o.get()); + } + + return google::cloud::internal::MergeOptions(std::move(o), + std::move(rest_defaults)); +} + +Options DefaultOptionsWithCredentials(Options opts) { + if (opts.has()) { + auto credentials = + rest_internal::MapCredentials(*opts.get()); + return internal::DefaultOptions(std::move(credentials), std::move(opts)); + } + if (GetEmulator().has_value()) { + return internal::DefaultOptions( + rest_internal::MapCredentials( + *google::cloud::MakeInsecureCredentials()), + std::move(opts)); + } + auto credentials = rest_internal::MapCredentials( + *google::cloud::MakeGoogleDefaultCredentials( + google::cloud::internal::MakeAuthOptions(opts))); + return internal::DefaultOptions(std::move(credentials), std::move(opts)); +} + Client ClientImplDetails::CreateWithDecorations( Options const& opts, std::shared_ptr connection) { return Client( diff --git a/google/cloud/storage/client.h b/google/cloud/storage/client.h index 1b279dfeaa7f1..9b62a8be5d088 100644 --- a/google/cloud/storage/client.h +++ b/google/cloud/storage/client.h @@ -28,13 +28,13 @@ #include "google/cloud/storage/list_objects_reader.h" #include "google/cloud/storage/notification_event_type.h" #include "google/cloud/storage/notification_payload_format.h" -#include "google/cloud/storage/oauth2/google_credentials.h" #include "google/cloud/storage/object_rewriter.h" #include "google/cloud/storage/object_stream.h" #include "google/cloud/storage/retry_policy.h" #include "google/cloud/storage/upload_options.h" #include "google/cloud/storage/version.h" #include "google/cloud/internal/group_options.h" +#include "google/cloud/internal/oauth2_credentials.h" #include "google/cloud/internal/throw_delegate.h" #include "google/cloud/options.h" #include "google/cloud/status.h" @@ -54,6 +54,25 @@ namespace internal { class NonResumableParallelUploadState; class ResumableParallelUploadState; struct ClientImplDetails; + +Options ApplyPolicy(Options opts, RetryPolicy const& p); +Options ApplyPolicy(Options opts, BackoffPolicy const& p); +Options ApplyPolicy(Options opts, IdempotencyPolicy const& p); + +inline Options ApplyPolicies(Options opts) { return opts; } + +template +Options ApplyPolicies(Options opts, P&& head, Policies&&... tail) { + opts = ApplyPolicy(std::move(opts), std::forward

(head)); + return ApplyPolicies(std::move(opts), std::forward(tail)...); +} + +Options DefaultOptions( + std::shared_ptr const& credentials, + Options opts); +Options DefaultOptions(Options opts = {}); +Options DefaultOptionsWithCredentials(Options opts); + } // namespace internal /** * The Google Cloud Storage (GCS) Client. @@ -3421,103 +3440,9 @@ class Client { } ///@} - /** - * Creates the default client type given the options. - * - * @param options the client options, these are used to control credentials, - * buffer sizes, etc. - * @param policies the client policies, these control the behavior of the - * client, for example, how to backoff when an operation needs to be - * retried, or what operations cannot be retried because they are not - * idempotent. - * - * @deprecated use the constructor from `google::cloud::Options` instead. - */ - template - explicit Client(ClientOptions options, Policies&&... policies) - : Client(InternalOnly{}, internal::ApplyPolicies( - internal::MakeOptions(std::move(options)), - std::forward(policies)...)) {} - - /** - * Creates the default client type given the credentials and policies. - * - * @param credentials a set of credentials to initialize the `ClientOptions`. - * @param policies the client policies, these control the behavior of the - * client, for example, how to backoff when an operation needs to be - * retried, or what operations cannot be retried because they are not - * idempotent. - * - * @deprecated use the constructor from `google::cloud::Options` instead. - */ - template - explicit Client(std::shared_ptr credentials, - Policies&&... policies) - : Client(InternalOnly{}, - internal::ApplyPolicies( - internal::DefaultOptions(std::move(credentials), {}), - std::forward(policies)...)) {} - - /** - * Create a Client using ClientOptions::CreateDefaultClientOptions(). - * - * @deprecated use the constructor from `google::cloud::Options` instead. - */ - static StatusOr CreateDefaultClient(); - - /// Builds a client and maybe override the retry, idempotency, and/or backoff - /// policies. - /// @deprecated This was intended only for test code, applications should not - /// use it. - template -#if !defined(_MSC_VER) || _MSC_VER >= 1920 - GOOGLE_CLOUD_CPP_DEPRECATED( - "applications should not need this." - " Please use the constructors from ClientOptions instead." - " For mocking, please use testing::ClientFromMock() instead." - " Please file a bug at https://github.com/googleapis/google-cloud-cpp" - " if you have a use-case not covered by these.") -#endif // _MSC_VER - // We cannot `std::move(connection)` because it is used twice in the delegated - // constructor parameters. And we cannot just use `StorageConnection const&` - // because we do hold on to the `std::shared_ptr<>`. - explicit Client( - std::shared_ptr const& connection, - Policies&&... policies) - : Client(InternalOnly{}, - internal::ApplyPolicies( - internal::DefaultOptions( - connection->client_options().credentials(), {}), - std::forward(policies)...), - // We cannot std::move() because it is also used in the previous - // parameter. - connection) { - } - /// Define a tag to disable automatic decorations of the StorageConnection. struct NoDecorations {}; - /// Builds a client with a specific StorageConnection, without decorations. - /// @deprecated This was intended only for test code, applications should not - /// use it. - GOOGLE_CLOUD_CPP_DEPRECATED( - "applications should not need this." - " Please file a bug at https://github.com/googleapis/google-cloud-cpp" - " if you do.") - explicit Client(std::shared_ptr connection, - NoDecorations) - : Client(InternalOnlyNoDecorations{}, std::move(connection)) {} - - /// Access the underlying `StorageConnection`. - /// @deprecated Only intended for implementors, do not use. - GOOGLE_CLOUD_CPP_DEPRECATED( - "applications should not need this." - " Please file a bug at https://github.com/googleapis/google-cloud-cpp" - " if you do.") - std::shared_ptr raw_client() const { - return connection_; - } - private: friend class internal::NonResumableParallelUploadState; friend class internal::ResumableParallelUploadState; diff --git a/google/cloud/storage/client_bucket_acl_test.cc b/google/cloud/storage/client_bucket_acl_test.cc index 09828ed385151..0c481bd50622b 100644 --- a/google/cloud/storage/client_bucket_acl_test.cc +++ b/google/cloud/storage/client_bucket_acl_test.cc @@ -14,7 +14,6 @@ #include "google/cloud/storage/client.h" #include "google/cloud/storage/internal/bucket_access_control_parser.h" -#include "google/cloud/storage/oauth2/google_credentials.h" #include "google/cloud/storage/retry_policy.h" #include "google/cloud/storage/testing/canonical_errors.h" #include "google/cloud/storage/testing/client_unit_test.h" diff --git a/google/cloud/storage/client_bucket_test.cc b/google/cloud/storage/client_bucket_test.cc index fe7962ab7d8fb..9bc25ec988781 100644 --- a/google/cloud/storage/client_bucket_test.cc +++ b/google/cloud/storage/client_bucket_test.cc @@ -14,7 +14,6 @@ #include "google/cloud/storage/client.h" #include "google/cloud/storage/internal/bucket_metadata_parser.h" -#include "google/cloud/storage/oauth2/google_credentials.h" #include "google/cloud/storage/retry_policy.h" #include "google/cloud/storage/testing/canonical_errors.h" #include "google/cloud/storage/testing/client_unit_test.h" @@ -197,7 +196,6 @@ TEST_F(BucketTest, CreateBucket) { })"""; auto expected = internal::BucketMetadataParser::FromString(text).value(); - EXPECT_CALL(*mock_, client_options()).Times(0); EXPECT_CALL(*mock_, CreateBucket) .WillOnce(Return(StatusOr(TransientError()))) .WillOnce([&expected](internal::CreateBucketRequest const& r) { diff --git a/google/cloud/storage/client_default_object_acl_test.cc b/google/cloud/storage/client_default_object_acl_test.cc index 7505e6a0ba26a..fb9ff8400a0c9 100644 --- a/google/cloud/storage/client_default_object_acl_test.cc +++ b/google/cloud/storage/client_default_object_acl_test.cc @@ -14,7 +14,6 @@ #include "google/cloud/storage/client.h" #include "google/cloud/storage/internal/object_access_control_parser.h" -#include "google/cloud/storage/oauth2/google_credentials.h" #include "google/cloud/storage/retry_policy.h" #include "google/cloud/storage/testing/canonical_errors.h" #include "google/cloud/storage/testing/client_unit_test.h" diff --git a/google/cloud/storage/client_notifications_test.cc b/google/cloud/storage/client_notifications_test.cc index dae426e0f7a38..e1d827bbdc990 100644 --- a/google/cloud/storage/client_notifications_test.cc +++ b/google/cloud/storage/client_notifications_test.cc @@ -16,7 +16,6 @@ #include "google/cloud/storage/internal/notification_metadata_parser.h" #include "google/cloud/storage/notification_event_type.h" #include "google/cloud/storage/notification_payload_format.h" -#include "google/cloud/storage/oauth2/google_credentials.h" #include "google/cloud/storage/retry_policy.h" #include "google/cloud/storage/testing/canonical_errors.h" #include "google/cloud/storage/testing/client_unit_test.h" diff --git a/google/cloud/storage/client_object_acl_test.cc b/google/cloud/storage/client_object_acl_test.cc index fcec747c12599..3ef51a51ec21f 100644 --- a/google/cloud/storage/client_object_acl_test.cc +++ b/google/cloud/storage/client_object_acl_test.cc @@ -14,7 +14,6 @@ #include "google/cloud/storage/client.h" #include "google/cloud/storage/internal/object_access_control_parser.h" -#include "google/cloud/storage/oauth2/google_credentials.h" #include "google/cloud/storage/retry_policy.h" #include "google/cloud/storage/testing/canonical_errors.h" #include "google/cloud/storage/testing/client_unit_test.h" diff --git a/google/cloud/storage/client_object_copy_test.cc b/google/cloud/storage/client_object_copy_test.cc index e3ccfe6060877..873721aaa5b60 100644 --- a/google/cloud/storage/client_object_copy_test.cc +++ b/google/cloud/storage/client_object_copy_test.cc @@ -14,7 +14,6 @@ #include "google/cloud/storage/client.h" #include "google/cloud/storage/internal/object_metadata_parser.h" -#include "google/cloud/storage/oauth2/google_credentials.h" #include "google/cloud/storage/retry_policy.h" #include "google/cloud/storage/testing/canonical_errors.h" #include "google/cloud/storage/testing/client_unit_test.h" diff --git a/google/cloud/storage/client_object_test.cc b/google/cloud/storage/client_object_test.cc index ab743c2aafda4..06b0cb060a6bd 100644 --- a/google/cloud/storage/client_object_test.cc +++ b/google/cloud/storage/client_object_test.cc @@ -14,7 +14,6 @@ #include "google/cloud/storage/client.h" #include "google/cloud/storage/internal/object_metadata_parser.h" -#include "google/cloud/storage/oauth2/google_credentials.h" #include "google/cloud/storage/retry_policy.h" #include "google/cloud/storage/testing/canonical_errors.h" #include "google/cloud/storage/testing/client_unit_test.h" diff --git a/google/cloud/storage/client_options.cc b/google/cloud/storage/client_options.cc deleted file mode 100644 index 686ed1a74d173..0000000000000 --- a/google/cloud/storage/client_options.cc +++ /dev/null @@ -1,378 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/storage/client_options.h" -#include "google/cloud/storage/internal/unified_rest_credentials.h" -#include "google/cloud/storage/oauth2/credentials.h" -#include "google/cloud/storage/oauth2/google_credentials.h" -#include "google/cloud/internal/absl_str_join_quiet.h" -#include "google/cloud/internal/curl_options.h" -#include "google/cloud/internal/getenv.h" -#include "google/cloud/internal/populate_common_options.h" -#include "google/cloud/internal/rest_options.h" -#include "google/cloud/internal/rest_response.h" -#include "google/cloud/internal/service_endpoint.h" -#include "google/cloud/log.h" -#include "google/cloud/opentelemetry_options.h" -#include "google/cloud/universe_domain_options.h" -#include "absl/strings/str_split.h" -#include -#include -#include -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -using ::google::cloud::internal::GetEnv; - -namespace { - -absl::optional GetEmulator() { - auto emulator = GetEnv("CLOUD_STORAGE_EMULATOR_ENDPOINT"); - if (emulator) return emulator; - return GetEnv("CLOUD_STORAGE_TESTBENCH_ENDPOINT"); -} - -StatusOr> StorageDefaultCredentials( - ChannelOptions const& channel_options) { - auto emulator = GetEmulator(); - if (emulator.has_value()) { - return StatusOr>( - oauth2::CreateAnonymousCredentials()); - } - return oauth2::GoogleDefaultCredentials(channel_options); -} - -std::size_t DefaultConnectionPoolSize() { - std::size_t nthreads = std::thread::hardware_concurrency(); - if (nthreads == 0) { - return 4; - } - return 4 * nthreads; -} - -// This magic number was obtained by experimentation summarized in #2657 -#ifndef GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_UPLOAD_BUFFER_SIZE -#define GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_UPLOAD_BUFFER_SIZE (8 * 1024 * 1024) -#endif // GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_BUFFER_SIZE - -// This magic number was obtained by experimentation summarized in #2657 -#ifndef GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_DOWNLOAD_BUFFER_SIZE -#define GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_DOWNLOAD_BUFFER_SIZE \ - (3 * 1024 * 1024 / 2) -#endif // GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_BUFFER_SIZE - -// This is a result of experiments performed in #2657. -#ifndef GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_MAXIMUM_SIMPLE_UPLOAD_SIZE -#define GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_MAXIMUM_SIMPLE_UPLOAD_SIZE \ - (20 * 1024 * 1024L) -#endif // GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_MAXIMUM_SIMPLE_UPLOAD_SIZE - -#ifndef GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_DOWNLOAD_STALL_TIMEOUT -#define GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_DOWNLOAD_STALL_TIMEOUT 120 -#endif // GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_DOWNLOAD_STALL_TIMEOUT - -// Define the defaults using a pre-processor macro, this allows the application -// developers to change the defaults for their application by compiling with -// different values. -#ifndef STORAGE_CLIENT_DEFAULT_MAXIMUM_RETRY_PERIOD -#define STORAGE_CLIENT_DEFAULT_MAXIMUM_RETRY_PERIOD std::chrono::minutes(15) -#endif // STORAGE_CLIENT_DEFAULT_MAXIMUM_RETRY_PERIOD - -#ifndef STORAGE_CLIENT_DEFAULT_INITIAL_BACKOFF_DELAY -#define STORAGE_CLIENT_DEFAULT_INITIAL_BACKOFF_DELAY std::chrono::seconds(1) -#endif // STORAGE_CLIENT_DEFAULT_INITIAL_BACKOFF_DELAY - -#ifndef STORAGE_CLIENT_DEFAULT_MAXIMUM_BACKOFF_DELAY -#define STORAGE_CLIENT_DEFAULT_MAXIMUM_BACKOFF_DELAY std::chrono::minutes(5) -#endif // STORAGE_CLIENT_DEFAULT_MAXIMUM_BACKOFF_DELAY - -#ifndef STORAGE_CLIENT_DEFAULT_BACKOFF_SCALING -#define STORAGE_CLIENT_DEFAULT_BACKOFF_SCALING 2.0 -#endif // STORAGE_CLIENT_DEFAULT_BACKOFF_SCALING - -} // namespace - -namespace internal { - -std::string RestEndpoint(Options const& options) { - return GetEmulator().value_or(options.get()); -} - -std::string IamRestEndpoint(Options const& options) { - return GetEmulator().value_or(options.get()); -} - -std::string IamRestPath() { - auto emulator = GetEmulator(); - if (emulator) return "/iamapi"; - return {}; -} - -std::string JsonEndpoint(Options const& options) { - return GetEmulator().value_or(options.get()) + - "/storage/" + options.get(); -} - -std::string JsonUploadEndpoint(Options const& options) { - return GetEmulator().value_or(options.get()) + - "/upload/storage/" + options.get(); -} - -std::string XmlEndpoint(Options const& options) { - return GetEmulator().value_or(options.get()); -} - -std::string IamEndpoint(Options const& options) { - auto emulator = GetEmulator(); - if (emulator) return *emulator + "/iamapi"; - return options.get(); -} - -Options MakeOptions(ClientOptions o) { - auto opts = std::move(o.opts_); - if (!o.channel_options().ssl_root_path().empty()) { - opts.set(o.channel_options().ssl_root_path()); - } - return opts; -} - -ClientOptions MakeBackwardsCompatibleClientOptions(Options opts) { - return ClientOptions(std::move(opts)); -} - -Options ApplyPolicy(Options opts, RetryPolicy const& p) { - opts.set(p.clone()); - return opts; -} - -Options ApplyPolicy(Options opts, BackoffPolicy const& p) { - opts.set(p.clone()); - return opts; -} - -Options ApplyPolicy(Options opts, IdempotencyPolicy const& p) { - opts.set(p.clone()); - return opts; -} - -Options DefaultOptions(std::shared_ptr credentials, - Options opts) { - auto ud = GetEnv("GOOGLE_CLOUD_UNIVERSE_DOMAIN"); - if (ud && !ud->empty()) { - opts.set(*std::move(ud)); - } - auto gcs_ep = google::cloud::internal::UniverseDomainEndpoint( - "https://storage.googleapis.com", opts); - auto iam_ep = absl::StrCat(google::cloud::internal::UniverseDomainEndpoint( - "https://iamcredentials.googleapis.com", opts), - "/v1"); - auto o = - Options{} - .set(std::move(credentials)) - .set(std::move(gcs_ep)) - .set(std::move(iam_ep)) - .set("v1") - .set(DefaultConnectionPoolSize()) - .set( - GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_DOWNLOAD_BUFFER_SIZE) - .set( - GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_UPLOAD_BUFFER_SIZE) - .set( - GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_MAXIMUM_SIMPLE_UPLOAD_SIZE) - .set(true) - .set(true) - .set(0) - .set(0) - .set(std::chrono::seconds( - GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_DOWNLOAD_STALL_TIMEOUT)) - .set(1) - .set(1) - .set( - LimitedTimeRetryPolicy( - STORAGE_CLIENT_DEFAULT_MAXIMUM_RETRY_PERIOD) - .clone()) - .set( - ExponentialBackoffPolicy( - STORAGE_CLIENT_DEFAULT_INITIAL_BACKOFF_DELAY, - STORAGE_CLIENT_DEFAULT_MAXIMUM_BACKOFF_DELAY, - STORAGE_CLIENT_DEFAULT_BACKOFF_SCALING) - .clone()) - .set(AlwaysRetryIdempotencyPolicy().clone()); - - o = google::cloud::internal::MergeOptions(std::move(opts), std::move(o)); - // If the application did not set `DownloadStallTimeoutOption` then use the - // same value as `TransferStallTimeoutOption` (which could be the default - // value). Some applications need tighter timeouts for downloads, but longer - // timeouts for other transfers. - if (!o.has()) { - o.set(o.get()); - } - - auto emulator = GetEmulator(); - if (emulator.has_value()) { - o.set(*emulator).set(*emulator + - "/iamapi"); - } - - auto logging = GetEnv("CLOUD_STORAGE_ENABLE_TRACING"); - if (logging) { - for (auto c : absl::StrSplit(*logging, ',')) { - GCP_LOG(INFO) << "Enabling logging for " << c; - o.lookup().insert(std::string(c)); - } - } - - auto tracing = GetEnv("GOOGLE_CLOUD_CPP_OPENTELEMETRY_TRACING"); - if (tracing && !tracing->empty()) { - o.set(true); - } - - auto project_id = GetEnv("GOOGLE_CLOUD_PROJECT"); - if (project_id.has_value()) { - o.set(std::move(*project_id)); - } - - // Always apply the RestClient defaults, even if it is not in use. Now that we - // use the low-level initialization code in - // google/cloud/internal/curl_wrappers.cc, these are always needed. - namespace rest = ::google::cloud::rest_internal; - auto rest_defaults = Options{} - .set( - o.get()) - .set( - o.get()) - .set( - o.get()) - .set( - o.get()) - .set( - o.get()) - .set( - o.get()) - .set( - o.get()) - .set( - o.get()) - .set( - o.get()); - - // These two are not always present, but if they are, and only if they are, we - // need to map their value to the corresponding option in `rest_internal::`. - if (o.has()) { - rest_defaults.set( - o.get()); - } - if (o.has()) { - rest_defaults.set(o.get()); - } - - return google::cloud::internal::MergeOptions(std::move(o), - std::move(rest_defaults)); -} - -Options DefaultOptionsWithCredentials(Options opts) { - if (opts.has()) { - auto credentials = opts.get(); - return internal::DefaultOptions(std::move(credentials), std::move(opts)); - } - if (opts.has()) { - auto credentials = - internal::MapCredentials(*opts.get()); - return internal::DefaultOptions(std::move(credentials), std::move(opts)); - } - if (GetEmulator().has_value()) { - return internal::DefaultOptions( - internal::MapCredentials(*google::cloud::MakeInsecureCredentials()), - std::move(opts)); - } - auto credentials = - internal::MapCredentials(*google::cloud::MakeGoogleDefaultCredentials( - google::cloud::internal::MakeAuthOptions(opts))); - return internal::DefaultOptions(std::move(credentials), std::move(opts)); -} - -} // namespace internal - -StatusOr ClientOptions::CreateDefaultClientOptions() { - return CreateDefaultClientOptions(ChannelOptions{}); -} - -StatusOr ClientOptions::CreateDefaultClientOptions( - ChannelOptions const& channel_options) { - auto creds = StorageDefaultCredentials(channel_options); - if (!creds) return creds.status(); - return ClientOptions(*creds, channel_options); -} - -ClientOptions::ClientOptions(std::shared_ptr credentials, - ChannelOptions channel_options) - : opts_(internal::DefaultOptions(std::move(credentials), {})), - channel_options_(std::move(channel_options)) {} - -ClientOptions::ClientOptions(Options o) - : opts_(std::move(o)), - user_agent_prefix_( - absl::StrJoin(opts_.get(), " ")) { - channel_options_.set_ssl_root_path(opts_.get()); -} - -bool ClientOptions::enable_http_tracing() const { - return opts_.get().count("http") != 0; -} - -ClientOptions& ClientOptions::set_enable_http_tracing(bool enable) { - if (enable) { - opts_.lookup().insert("http"); - } else { - opts_.lookup().erase("http"); - } - return *this; -} - -bool ClientOptions::enable_raw_client_tracing() const { - return opts_.get().count("raw-client") != 0; -} - -ClientOptions& ClientOptions::set_enable_raw_client_tracing(bool enable) { - if (enable) { - opts_.lookup().insert("raw-client"); - } else { - opts_.lookup().erase("raw-client"); - } - return *this; -} - -ClientOptions& ClientOptions::SetDownloadBufferSize(std::size_t size) { - opts_.set( - size == 0 ? GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_DOWNLOAD_BUFFER_SIZE : size); - return *this; -} - -ClientOptions& ClientOptions::SetUploadBufferSize(std::size_t size) { - opts_.set( - size == 0 ? GOOGLE_CLOUD_CPP_STORAGE_DEFAULT_UPLOAD_BUFFER_SIZE : size); - return *this; -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google diff --git a/google/cloud/storage/client_options.h b/google/cloud/storage/client_options.h deleted file mode 100644 index 09f5e968aff7c..0000000000000 --- a/google/cloud/storage/client_options.h +++ /dev/null @@ -1,461 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_CLIENT_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_CLIENT_OPTIONS_H - -#include "google/cloud/storage/oauth2/credentials.h" -#include "google/cloud/storage/options.h" -#include "google/cloud/storage/version.h" -#include "google/cloud/common_options.h" -#include "google/cloud/options.h" -#include -#include -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -class ClientOptions; -namespace internal { -std::string RestEndpoint(Options const&); -std::string IamRestEndpoint(Options const&); -std::string IamRestPath(); -std::string JsonEndpoint(Options const&); -std::string JsonUploadEndpoint(Options const&); -std::string XmlEndpoint(Options const&); -std::string IamEndpoint(Options const&); - -Options MakeOptions(ClientOptions); - -ClientOptions MakeBackwardsCompatibleClientOptions(Options); - -Options ApplyPolicy(Options opts, RetryPolicy const& p); -Options ApplyPolicy(Options opts, BackoffPolicy const& p); -Options ApplyPolicy(Options opts, IdempotencyPolicy const& p); - -inline Options ApplyPolicies(Options opts) { return opts; } - -template -Options ApplyPolicies(Options opts, P&& head, Policies&&... tail) { - opts = ApplyPolicy(std::move(opts), std::forward

(head)); - return ApplyPolicies(std::move(opts), std::forward(tail)...); -} - -Options DefaultOptions(std::shared_ptr credentials, - Options opts); -Options DefaultOptionsWithCredentials(Options opts); - -} // namespace internal - -/** - * Describes the configuration for low-level connection features. - * - * Some applications may want to use a different SSL root of trust for their - * connections, for example, containerized applications might store the - * certificate authority certificates in a hard-coded location. - * - * This is a separate class, as it is used to configure both the normal - * connections to GCS and the connections used to obtain OAuth2 access - * tokens. - */ -class ChannelOptions { - public: - /// @deprecated Use google::cloud::Options and - /// google::cloud::CARootsFilePathOption instead. - std::string ssl_root_path() const { return ssl_root_path_; } - - /// @deprecated Use google::cloud::Options and - /// google::cloud::CARootsFilePathOption instead. - ChannelOptions& set_ssl_root_path(std::string ssl_root_path) { - ssl_root_path_ = std::move(ssl_root_path); - return *this; - } - - private: - std::string ssl_root_path_; -}; - -/** - * Describes the configuration for a `storage::Client` object. - * - * By default, several environment variables are read to configure the client: - * - * - `CLOUD_STORAGE_EMULATOR_ENDPOINT`: if set, use this http endpoint to - * make all http requests instead of the production GCS service. Also, - * if set, the `CreateDefaultClientOptions()` function will use an - * `AnonymousCredentials` object instead of loading Application Default - * %Credentials. - * - `CLOUD_STORAGE_ENABLE_CLOG`: if set, enable std::clog as a backend for - * `google::cloud::LogSink`. - * - `CLOUD_STORAGE_ENABLE_TRACING`: if set, this is the list of components that - * will have logging enabled, the component this is: - * - `http`: trace all http request / responses. - * - * @deprecated Please use google::cloud::Options instead. - */ -class ClientOptions { - public: - /** - * Constructor with channel options. - * - * @deprecated use google::cloud::Options instead. - * - * @param credentials how to authenticate to the client. Using a `nullptr` for - * @p credentials results in undefined behavior. - */ - explicit ClientOptions(std::shared_ptr credentials) - : ClientOptions(std::move(credentials), {}) {} - - /** - * Constructor with channel options. - * - * @deprecated use google::cloud::Options instead. - * - * @param credentials how to authenticate to the client. Using a `nullptr` for - * @p credentials results in undefined behavior. - * @param channel_options the configuration for SSL certificate validation. - */ - ClientOptions(std::shared_ptr credentials, - ChannelOptions channel_options); - - /** - * Creates a `ClientOptions` with Google Application Default %Credentials. - * - * If Application Default %Credentials could not be loaded, this returns a - * `Status` with failure details. If the `CLOUD_STORAGE_EMULATOR_ENDPOINT` - * environment variable is set, this function instead uses an - * `AnonymousCredentials` to configure the client. - * - * @deprecated Please use google::cloud::Options instead. - */ - static StatusOr CreateDefaultClientOptions(); - /// @deprecated Please use google::cloud::Options instead. - static StatusOr CreateDefaultClientOptions( - ChannelOptions const& channel_options); - - /** - * @deprecated Use google::cloud::Options and Oauth2CredentialsOption instead. - */ - std::shared_ptr credentials() const { - return opts_.get(); - } - - /** - * @deprecated Use google::cloud::Options and Oauth2CredentialsOption instead. - */ - ClientOptions& set_credentials(std::shared_ptr c) { - opts_.set(std::move(c)); - return *this; - } - - /** - * @deprecated Use google::cloud::Options and RestEndpointOption instead. - */ - std::string const& endpoint() const { - return opts_.get(); - } - - /** - * @deprecated Use google::cloud::Options and RestEndpointOption instead. - */ - ClientOptions& set_endpoint(std::string endpoint) { - opts_.set(std::move(endpoint)); - return *this; - } - - /** - * @deprecated Use google::cloud::Options and IamEndpointOption instead. - */ - std::string const& iam_endpoint() const { - return opts_.get(); - } - - /** - * @deprecated Use google::cloud::Options and IamEndpointOption instead. - */ - ClientOptions& set_iam_endpoint(std::string endpoint) { - opts_.set(std::move(endpoint)); - return *this; - } - - /** - * @deprecated This was intended for development and not a public API. - */ - std::string const& version() const { - return opts_.get(); - } - - /** - * @deprecated This was intended for development and not a public API. - */ - ClientOptions& set_version(std::string version) { - opts_.set(std::move(version)); - return *this; - } - - /** - * @deprecated Use google::cloud::Options and - * google::cloud::LoggingComponentsOption instead. - */ - bool enable_http_tracing() const; - - /** - * @deprecated Use google::cloud::Options and - * google::cloud::LoggingComponentsOption instead. - */ - ClientOptions& set_enable_http_tracing(bool enable); - - /** - * @deprecated Use google::cloud::Options and - * google::cloud::LoggingComponentsOption instead. - */ - bool enable_raw_client_tracing() const; - - /** - * @deprecated Use google::cloud::Options and - * google::cloud::LoggingComponentsOption instead. - */ - ClientOptions& set_enable_raw_client_tracing(bool enable); - - /** - * @deprecated Use google::cloud::Options and ProjectIdOption instead. - */ - std::string const& project_id() const { return opts_.get(); } - - /** - * @deprecated Use google::cloud::Options and ProjectIdOption instead. - */ - ClientOptions& set_project_id(std::string v) { - opts_.set(std::move(v)); - return *this; - } - - /** - * @deprecated Use google::cloud::Options and ConnectionPoolSizeOption - * instead. - */ - std::size_t connection_pool_size() const { - return opts_.get(); - } - - /** - * @deprecated Use google::cloud::Options and ConnectionPoolSizeOption - * instead. - */ - ClientOptions& set_connection_pool_size(std::size_t size) { - opts_.set(size); - return *this; - } - - /** - * @deprecated Use google::cloud::Options and DownloadBufferSizeOption - * instead. - */ - std::size_t download_buffer_size() const { - return opts_.get(); - } - - /** - * @deprecated Use google::cloud::Options and DownloadBufferSizeOption - * instead. - */ - ClientOptions& SetDownloadBufferSize(std::size_t size); - - /** - * @deprecated Use google::cloud::Options and UploadBufferSizeOption instead. - */ - std::size_t upload_buffer_size() const { - return opts_.get(); - } - - /** - * @deprecated Use google::cloud::Options and UploadBufferSizeOption instead. - */ - ClientOptions& SetUploadBufferSize(std::size_t size); - - /** - * @deprecated Use google::cloud::Options and - * google::cloud::UserAgentProductsOption instead. - */ - std::string const& user_agent_prefix() const { return user_agent_prefix_; } - - /** - * @deprecated Use google::cloud::Options and - * google::cloud::UserAgentProductsOption instead. - */ - ClientOptions& add_user_agent_prefix(std::string prefix) { - opts_.lookup().push_back(prefix); - if (!user_agent_prefix_.empty()) { - prefix += ' '; - prefix += user_agent_prefix_; - } - user_agent_prefix_ = std::move(prefix); - return *this; - } - - /// @deprecated use `add_user_agent_prefix()` instead. - ClientOptions& add_user_agent_prefx(std::string const& v) { - return add_user_agent_prefix(v); - } - - /** - * @deprecated Use google::cloud::Options and MaximumSimpleUploadSizeOption - * instead. - */ - std::size_t maximum_simple_upload_size() const { - return opts_.get(); - } - - /** - * @deprecated Use google::cloud::Options and MaximumSimpleUploadSizeOption - * instead. - */ - ClientOptions& set_maximum_simple_upload_size(std::size_t v) { - opts_.set(v); - return *this; - } - - /** - * If true and using OpenSSL 1.0.2 the library configures the OpenSSL - * callbacks for locking. - * - * @deprecated Use google::cloud::options and EnableCurlSslLockingOption - * instead. - */ - bool enable_ssl_locking_callbacks() const { - return opts_.get(); - } - - /** - * If true and using OpenSSL 1.0.2 the library configures the OpenSSL - * callbacks for locking. - * - * @deprecated Use google::cloud::options and EnableCurlSslLockingOption - * instead. - */ - ClientOptions& set_enable_ssl_locking_callbacks(bool v) { - opts_.set(v); - return *this; - } - - /** - * @deprecated Use google::cloud::Options and EnableCurlSigpipeOption - * instead. - */ - bool enable_sigpipe_handler() const { - return opts_.get(); - } - - /** - * @deprecated Use google::cloud::Options and EnableCurlSigpipeOption - * instead. - */ - ClientOptions& set_enable_sigpipe_handler(bool v) { - opts_.set(v); - return *this; - } - - /** - * @deprecated Use google::cloud::Options and MaximumCurlSocketRecvSizeOption - * instead. - */ - std::size_t maximum_socket_recv_size() const { - return opts_.get(); - } - - /** - * @deprecated Use google::cloud::Options and MaximumCurlSocketRecvSizeOption - * instead. - */ - ClientOptions& set_maximum_socket_recv_size(std::size_t v) { - opts_.set(v); - return *this; - } - - /** - * @deprecated Use google::cloud::Options and MaximumCurlSocketSendSizeOption - * instead. - */ - std::size_t maximum_socket_send_size() const { - return opts_.get(); - } - - /** - * @deprecated Use google::cloud::Options and MaximumCurlSocketSendSizeOption - * instead. - */ - ClientOptions& set_maximum_socket_send_size(std::size_t v) { - opts_.set(v); - return *this; - } - - /// @deprecated Use google::cloud::Options and - /// google::cloud::CARootsFilePathOption instead. - ChannelOptions& channel_options() { return channel_options_; } - - /// @deprecated Use google::cloud::Options and - /// google::cloud::CARootsFilePathOption instead. - ChannelOptions const& channel_options() const { return channel_options_; } - - ///@{ - /** - * Control the maximum amount of time allowed for "stalls" during a download. - * - * A download that receives no data is considered "stalled". If the download - * remains stalled for more than the time set in this option then the download - * is aborted. - * - * The default value is 2 minutes. Can be disabled by setting the value to 0. - * - * @deprecated Use google::cloud::Options and DownloadStallTimeoutOption - * instead. - */ - std::chrono::seconds download_stall_timeout() const { - return opts_.get(); - } - - /** - * @deprecated Use google::cloud::Options and DownloadStallTimeoutOption - * instead. - */ - ClientOptions& set_download_stall_timeout(std::chrono::seconds v) { - opts_.set(std::move(v)); - return *this; - } - ///@} - - private: - friend Options internal::MakeOptions(ClientOptions); - friend ClientOptions internal::MakeBackwardsCompatibleClientOptions(Options); - - explicit ClientOptions(Options o); - - Options opts_; - - // Used for backwards compatibility. The value here is merged with the values - // in `opts_` by internal::MakeOptions(ClientOptions const&); - ChannelOptions channel_options_; - - // Only used for backwards compatibility, the value in `opts_. - std::string user_agent_prefix_; -}; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_CLIENT_OPTIONS_H diff --git a/google/cloud/storage/client_options_test.cc b/google/cloud/storage/client_options_test.cc deleted file mode 100644 index 722e5e82c1369..0000000000000 --- a/google/cloud/storage/client_options_test.cc +++ /dev/null @@ -1,546 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/storage/client_options.h" -#include "google/cloud/storage/oauth2/google_credentials.h" -#include "google/cloud/internal/curl_options.h" -#include "google/cloud/internal/filesystem.h" -#include "google/cloud/internal/random.h" -#include "google/cloud/internal/rest_options.h" -#include "google/cloud/internal/rest_response.h" -#include "google/cloud/opentelemetry_options.h" -#include "google/cloud/testing_util/scoped_environment.h" -#include "google/cloud/testing_util/setenv.h" -#include "google/cloud/testing_util/status_matchers.h" -#include "google/cloud/universe_domain_options.h" -#include -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -using ::google::cloud::testing_util::IsOk; -using ::google::cloud::testing_util::ScopedEnvironment; -using ::testing::IsEmpty; -using ::testing::Not; -using ::testing::UnorderedElementsAre; - -namespace { -class ClientOptionsTest : public ::testing::Test { - public: - ClientOptionsTest() - : enable_tracing_("CLOUD_STORAGE_ENABLE_TRACING", {}), - endpoint_("CLOUD_STORAGE_EMULATOR_ENDPOINT", {}), - old_endpoint_("CLOUD_STORAGE_TESTBENCH_ENDPOINT", {}), - generator_(std::random_device{}()) {} - - std::string CreateRandomFileName() { - // When running on the internal Google CI systems we cannot write to the - // local directory. GTest has a good temporary directory in that case. - return google::cloud::internal::PathAppend( - ::testing::TempDir(), - google::cloud::internal::Sample( - generator_, 8, "abcdefghijklmnopqrstuvwxyz0123456789") + - ".json"); - } - - protected: - ScopedEnvironment enable_tracing_; - ScopedEnvironment endpoint_; - ScopedEnvironment old_endpoint_; - google::cloud::internal::DefaultPRNG generator_; -}; - -// This is a syntactically valid JSON key file, but the key has been invalidated -// and therefore present no security risks. -constexpr char kJsonKeyfileContents[] = R"""({ - "type": "service_account", - "project_id": "foo-project", - "private_key_id": "a1a111aa1111a11a11a11aa111a111a1a1111111", - "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCltiF2oP3KJJ+S\ntTc1McylY+TuAi3AdohX7mmqIjd8a3eBYDHs7FlnUrFC4CRijCr0rUqYfg2pmk4a\n6TaKbQRAhWDJ7XD931g7EBvCtd8+JQBNWVKnP9ByJUaO0hWVniM50KTsWtyX3up/\nfS0W2R8Cyx4yvasE8QHH8gnNGtr94iiORDC7De2BwHi/iU8FxMVJAIyDLNfyk0hN\neheYKfIDBgJV2v6VaCOGWaZyEuD0FJ6wFeLybFBwibrLIBE5Y/StCrZoVZ5LocFP\nT4o8kT7bU6yonudSCyNMedYmqHj/iF8B2UN1WrYx8zvoDqZk0nxIglmEYKn/6U7U\ngyETGcW9AgMBAAECggEAC231vmkpwA7JG9UYbviVmSW79UecsLzsOAZnbtbn1VLT\nPg7sup7tprD/LXHoyIxK7S/jqINvPU65iuUhgCg3Rhz8+UiBhd0pCH/arlIdiPuD\n2xHpX8RIxAq6pGCsoPJ0kwkHSw8UTnxPV8ZCPSRyHV71oQHQgSl/WjNhRi6PQroB\nSqc/pS1m09cTwyKQIopBBVayRzmI2BtBxyhQp9I8t5b7PYkEZDQlbdq0j5Xipoov\n9EW0+Zvkh1FGNig8IJ9Wp+SZi3rd7KLpkyKPY7BK/g0nXBkDxn019cET0SdJOHQG\nDiHiv4yTRsDCHZhtEbAMKZEpku4WxtQ+JjR31l8ueQKBgQDkO2oC8gi6vQDcx/CX\nZ23x2ZUyar6i0BQ8eJFAEN+IiUapEeCVazuxJSt4RjYfwSa/p117jdZGEWD0GxMC\n+iAXlc5LlrrWs4MWUc0AHTgXna28/vii3ltcsI0AjWMqaybhBTTNbMFa2/fV2OX2\nUimuFyBWbzVc3Zb9KAG4Y7OmJQKBgQC5324IjXPq5oH8UWZTdJPuO2cgRsvKmR/r\n9zl4loRjkS7FiOMfzAgUiXfH9XCnvwXMqJpuMw2PEUjUT+OyWjJONEK4qGFJkbN5\n3ykc7p5V7iPPc7Zxj4mFvJ1xjkcj+i5LY8Me+gL5mGIrJ2j8hbuv7f+PWIauyjnp\nNx/0GVFRuQKBgGNT4D1L7LSokPmFIpYh811wHliE0Fa3TDdNGZnSPhaD9/aYyy78\nLkxYKuT7WY7UVvLN+gdNoVV5NsLGDa4cAV+CWPfYr5PFKGXMT/Wewcy1WOmJ5des\nAgMC6zq0TdYmMBN6WpKUpEnQtbmh3eMnuvADLJWxbH3wCkg+4xDGg2bpAoGAYRNk\nMGtQQzqoYNNSkfus1xuHPMA8508Z8O9pwKU795R3zQs1NAInpjI1sOVrNPD7Ymwc\nW7mmNzZbxycCUL/yzg1VW4P1a6sBBYGbw1SMtWxun4ZbnuvMc2CTCh+43/1l+FHe\nMmt46kq/2rH2jwx5feTbOE6P6PINVNRJh/9BDWECgYEAsCWcH9D3cI/QDeLG1ao7\nrE2NcknP8N783edM07Z/zxWsIsXhBPY3gjHVz2LDl+QHgPWhGML62M0ja/6SsJW3\nYvLLIc82V7eqcVJTZtaFkuht68qu/Jn1ezbzJMJ4YXDYo1+KFi+2CAGR06QILb+I\nlUtj+/nH3HDQjM4ltYfTPUg=\n-----END PRIVATE KEY-----\n", - "client_email": "foo-email@foo-project.iam.gserviceaccount.com", - "client_id": "100000000000000000001", - "auth_uri": "https://accounts.google.com/o/oauth2/auth", - "token_uri": "https://oauth2.googleapis.com/token", - "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", - "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/foo-email%40foo-project.iam.gserviceaccount.com" -})"""; - -TEST_F(ClientOptionsTest, Default) { - // Create the options with the anonymous credentials because the default - // credentials try to load the application default credentials, and those do - // not exist in the CI environment, which results in errors or warnings. - auto creds = oauth2::CreateAnonymousCredentials(); - ClientOptions options(creds); - EXPECT_FALSE(options.enable_http_tracing()); - EXPECT_FALSE(options.enable_raw_client_tracing()); - EXPECT_TRUE(creds.get() == options.credentials().get()); - EXPECT_EQ("https://storage.googleapis.com", options.endpoint()); - EXPECT_EQ("v1", options.version()); - EXPECT_EQ("https://iamcredentials.googleapis.com/v1", options.iam_endpoint()); -} - -TEST_F(ClientOptionsTest, CreateDefaultError) { - testing_util::ScopedEnvironment creds("GOOGLE_APPLICATION_CREDENTIALS", - "not-a-file-should-fail"); - auto connection = ClientOptions::CreateDefaultClientOptions(); - EXPECT_THAT(connection, Not(IsOk())); -} - -TEST_F(ClientOptionsTest, CreateDefaultWithChannelOptionsError) { - testing_util::ScopedEnvironment creds("GOOGLE_APPLICATION_CREDENTIALS", - "not-a-file-should-fail"); - auto connection = ClientOptions::CreateDefaultClientOptions({}); - EXPECT_THAT(connection, Not(IsOk())); -} - -TEST_F(ClientOptionsTest, CreateDefault) { - auto file = CreateRandomFileName(); - std::ofstream(file) << kJsonKeyfileContents; - testing_util::ScopedEnvironment creds("GOOGLE_APPLICATION_CREDENTIALS", file); - auto connection = ClientOptions::CreateDefaultClientOptions(); - EXPECT_STATUS_OK(connection); - std::remove(file.c_str()); -} - -TEST_F(ClientOptionsTest, CreateDefaultWithChannelOptions) { - auto file = CreateRandomFileName(); - std::ofstream(file) << kJsonKeyfileContents; - testing_util::ScopedEnvironment creds("GOOGLE_APPLICATION_CREDENTIALS", file); - auto connection = ClientOptions::CreateDefaultClientOptions({}); - EXPECT_STATUS_OK(connection); -} - -TEST_F(ClientOptionsTest, EnableRpc) { - testing_util::ScopedEnvironment enable_tracing("CLOUD_STORAGE_ENABLE_TRACING", - "foo,raw-client,bar"); - ClientOptions options(oauth2::CreateAnonymousCredentials()); - EXPECT_TRUE(options.enable_raw_client_tracing()); -} - -TEST_F(ClientOptionsTest, EnableHttp) { - testing_util::ScopedEnvironment enable_tracing("CLOUD_STORAGE_ENABLE_TRACING", - "foo,http,bar"); - ClientOptions options(oauth2::CreateAnonymousCredentials()); - EXPECT_TRUE(options.enable_http_tracing()); -} - -TEST_F(ClientOptionsTest, EndpointsDefault) { - testing_util::ScopedEnvironment endpoint("CLOUD_STORAGE_EMULATOR_ENDPOINT", - {}); - ClientOptions options(oauth2::CreateAnonymousCredentials()); - EXPECT_EQ("https://storage.googleapis.com", options.endpoint()); - auto o = internal::MakeOptions(std::move(options)); - EXPECT_EQ("https://storage.googleapis.com/storage/v1", - internal::JsonEndpoint(o)); - EXPECT_EQ("https://storage.googleapis.com/upload/storage/v1", - internal::JsonUploadEndpoint(o)); - EXPECT_EQ("https://iamcredentials.googleapis.com/v1", - internal::IamEndpoint(o)); -} - -TEST_F(ClientOptionsTest, EndpointsOverride) { - testing_util::ScopedEnvironment endpoint("CLOUD_STORAGE_EMULATOR_ENDPOINT", - {}); - ClientOptions options(oauth2::CreateAnonymousCredentials()); - options.set_endpoint("http://127.0.0.1.nip.io:1234"); - EXPECT_EQ("http://127.0.0.1.nip.io:1234", options.endpoint()); - auto o = internal::MakeOptions(std::move(options)); - EXPECT_EQ("http://127.0.0.1.nip.io:1234/storage/v1", - internal::JsonEndpoint(o)); - EXPECT_EQ("http://127.0.0.1.nip.io:1234/upload/storage/v1", - internal::JsonUploadEndpoint(o)); - EXPECT_EQ("http://127.0.0.1.nip.io:1234", internal::XmlEndpoint(o)); - EXPECT_EQ("https://iamcredentials.googleapis.com/v1", - internal::IamEndpoint(o)); -} - -TEST_F(ClientOptionsTest, EndpointsEmulator) { - testing_util::ScopedEnvironment endpoint("CLOUD_STORAGE_EMULATOR_ENDPOINT", - "http://localhost:1234"); - ClientOptions options(oauth2::CreateAnonymousCredentials()); - EXPECT_EQ("http://localhost:1234", options.endpoint()); - auto o = internal::MakeOptions(std::move(options)); - EXPECT_EQ("http://localhost:1234/storage/v1", internal::JsonEndpoint(o)); - EXPECT_EQ("http://localhost:1234/upload/storage/v1", - internal::JsonUploadEndpoint(o)); - EXPECT_EQ("http://localhost:1234", internal::XmlEndpoint(o)); - EXPECT_EQ("http://localhost:1234/iamapi", internal::IamEndpoint(o)); -} - -TEST_F(ClientOptionsTest, OldEndpointsEmulator) { - google::cloud::testing_util::UnsetEnv("CLOUD_STORAGE_EMULATOR_ENDPOINT"); - testing_util::ScopedEnvironment endpoint("CLOUD_STORAGE_TESTBENCH_ENDPOINT", - "http://localhost:1234"); - ClientOptions options(oauth2::CreateAnonymousCredentials()); - EXPECT_EQ("http://localhost:1234", options.endpoint()); - auto o = internal::MakeOptions(std::move(options)); - EXPECT_EQ("http://localhost:1234/storage/v1", internal::JsonEndpoint(o)); - EXPECT_EQ("http://localhost:1234/upload/storage/v1", - internal::JsonUploadEndpoint(o)); - EXPECT_EQ("http://localhost:1234", internal::XmlEndpoint(o)); - EXPECT_EQ("http://localhost:1234/iamapi", internal::IamEndpoint(o)); -} - -TEST_F(ClientOptionsTest, SetVersion) { - ClientOptions options(oauth2::CreateAnonymousCredentials()); - options.set_version("vTest"); - EXPECT_EQ("vTest", options.version()); - auto o = internal::MakeOptions(std::move(options)); - EXPECT_EQ("https://storage.googleapis.com/storage/vTest", - internal::JsonEndpoint(o)); - EXPECT_EQ("https://storage.googleapis.com/upload/storage/vTest", - internal::JsonUploadEndpoint(o)); -} - -TEST_F(ClientOptionsTest, SetIamEndpoint) { - ClientOptions options(oauth2::CreateAnonymousCredentials()); - options.set_iam_endpoint("http://localhost:1/v2"); - EXPECT_EQ("http://localhost:1/v2", options.iam_endpoint()); -} - -TEST_F(ClientOptionsTest, SetCredentials) { - auto creds = oauth2::CreateAnonymousCredentials(); - ClientOptions options(creds); - auto other = oauth2::CreateAnonymousCredentials(); - options.set_credentials(other); - EXPECT_TRUE(other.get() == options.credentials().get()); - EXPECT_FALSE(creds.get() == other.get()); -} - -TEST_F(ClientOptionsTest, ProjectIdFromEnvironment) { - google::cloud::testing_util::SetEnv("GOOGLE_CLOUD_PROJECT", - "test-project-id"); - ClientOptions options(oauth2::CreateAnonymousCredentials()); - EXPECT_EQ("test-project-id", options.project_id()); -} - -TEST_F(ClientOptionsTest, ProjectIdFromEnvironmentNotSet) { - google::cloud::testing_util::UnsetEnv("GOOGLE_CLOUD_PROJECT"); - ClientOptions options(oauth2::CreateAnonymousCredentials()); - EXPECT_EQ("", options.project_id()); -} - -TEST_F(ClientOptionsTest, SetProjectId) { - ClientOptions options(oauth2::CreateAnonymousCredentials()); - options.set_project_id("test-project-id"); - EXPECT_EQ("test-project-id", options.project_id()); -} - -TEST_F(ClientOptionsTest, SetDownloadBufferSize) { - ClientOptions client_options(oauth2::CreateAnonymousCredentials()); - auto default_size = client_options.download_buffer_size(); - EXPECT_NE(0U, default_size); - client_options.SetDownloadBufferSize(1024); - EXPECT_EQ(1024, client_options.download_buffer_size()); - client_options.SetDownloadBufferSize(0); - EXPECT_EQ(default_size, client_options.download_buffer_size()); -} - -TEST_F(ClientOptionsTest, SetUploadBufferSize) { - ClientOptions client_options(oauth2::CreateAnonymousCredentials()); - auto default_size = client_options.upload_buffer_size(); - EXPECT_NE(0U, default_size); - client_options.SetUploadBufferSize(1024); - EXPECT_EQ(1024, client_options.upload_buffer_size()); - client_options.SetUploadBufferSize(0); - EXPECT_EQ(default_size, client_options.upload_buffer_size()); -} - -TEST_F(ClientOptionsTest, UserAgentPrefix) { - ClientOptions options(oauth2::CreateAnonymousCredentials()); - EXPECT_EQ("", options.user_agent_prefix()); - options.add_user_agent_prefix("foo-1.0"); - EXPECT_EQ("foo-1.0", options.user_agent_prefix()); - options.add_user_agent_prefix("bar-2.2"); - EXPECT_EQ("bar-2.2 foo-1.0", options.user_agent_prefix()); -} - -TEST_F(ClientOptionsTest, SetMaximumSimpleUploadSize) { - ClientOptions client_options(oauth2::CreateAnonymousCredentials()); - auto default_size = client_options.maximum_simple_upload_size(); - EXPECT_NE(0U, default_size); - client_options.set_maximum_simple_upload_size(1024); - EXPECT_EQ(1024, client_options.maximum_simple_upload_size()); - client_options.set_maximum_simple_upload_size(0); - EXPECT_EQ(0, client_options.maximum_simple_upload_size()); -} - -TEST_F(ClientOptionsTest, SetEnableLockingCallbacks) { - ClientOptions client_options(oauth2::CreateAnonymousCredentials()); - auto default_value = client_options.enable_ssl_locking_callbacks(); - EXPECT_TRUE(default_value); - client_options.set_enable_ssl_locking_callbacks(false); - EXPECT_FALSE(client_options.enable_ssl_locking_callbacks()); - client_options.set_enable_ssl_locking_callbacks(true); - EXPECT_TRUE(client_options.enable_ssl_locking_callbacks()); -} - -TEST_F(ClientOptionsTest, SetMaximumSocketRecvSize) { - ClientOptions client_options(oauth2::CreateAnonymousCredentials()); - auto default_value = client_options.maximum_socket_recv_size(); - EXPECT_EQ(0, default_value); - client_options.set_maximum_socket_recv_size(16 * 1024); - EXPECT_EQ(16 * 1024, client_options.maximum_socket_recv_size()); -} - -TEST_F(ClientOptionsTest, SetMaximumSocketSendSize) { - ClientOptions client_options(oauth2::CreateAnonymousCredentials()); - auto default_value = client_options.maximum_socket_send_size(); - EXPECT_EQ(0, default_value); - client_options.set_maximum_socket_send_size(16 * 1024); - EXPECT_EQ(16 * 1024, client_options.maximum_socket_send_size()); -} - -TEST_F(ClientOptionsTest, SetMaximumDownloadStall) { - ClientOptions client_options(oauth2::CreateAnonymousCredentials()); - auto default_value = client_options.download_stall_timeout(); - EXPECT_NE(0, default_value.count()); - client_options.set_download_stall_timeout(std::chrono::seconds(60)); - EXPECT_EQ(60, client_options.download_stall_timeout().count()); -} - -TEST_F(ClientOptionsTest, MakeOptionsFromDefault) { - google::cloud::testing_util::SetEnv("GOOGLE_CLOUD_PROJECT", - "test-project-id"); - auto const opts = internal::MakeOptions( - ClientOptions(oauth2::CreateAnonymousCredentials())); - EXPECT_EQ("https://storage.googleapis.com", opts.get()); - EXPECT_EQ("https://iamcredentials.googleapis.com/v1", - opts.get()); - EXPECT_TRUE(opts.has()); - EXPECT_EQ("v1", opts.get()); - EXPECT_EQ("test-project-id", opts.get()); - EXPECT_LT(0, opts.get()); - EXPECT_LT(0, opts.get()); - EXPECT_LT(0, opts.get()); - EXPECT_LT(0, opts.get()); - EXPECT_LT(0, opts.get()); - EXPECT_TRUE(opts.has()); - EXPECT_TRUE(opts.has()); - EXPECT_EQ(0, opts.get()); - EXPECT_EQ(0, opts.get()); - EXPECT_LT(0, opts.get().count()); - EXPECT_LT(0, opts.get()); - EXPECT_THAT(opts.get(), IsEmpty()); -} - -TEST_F(ClientOptionsTest, DefaultOptions) { - auto o = internal::DefaultOptions(oauth2::CreateAnonymousCredentials(), {}); - EXPECT_EQ("https://storage.googleapis.com", o.get()); - - // Verify any set values are respected overridden. - o = internal::DefaultOptions( - oauth2::CreateAnonymousCredentials(), - Options{}.set("https://private.googleapis.com")); - EXPECT_EQ("https://private.googleapis.com", o.get()); - - o = internal::DefaultOptions(oauth2::CreateAnonymousCredentials(), {}); - EXPECT_EQ("https://storage.googleapis.com", o.get()); - EXPECT_EQ("https://iamcredentials.googleapis.com/v1", - o.get()); - - EXPECT_EQ("v1", o.get()); - EXPECT_LT(0, o.get()); - EXPECT_LT(0, o.get()); - EXPECT_LT(0, o.get()); - EXPECT_LE(0, o.get()); - EXPECT_TRUE(o.get()); - EXPECT_TRUE(o.get()); - EXPECT_EQ(0, o.get()); - EXPECT_EQ(0, o.get()); - EXPECT_LT(std::chrono::seconds(0), o.get()); - EXPECT_LT(0, o.get()); - EXPECT_LT(std::chrono::seconds(0), o.get()); - EXPECT_LT(0, o.get()); - - namespace rest = ::google::cloud::rest_internal; - EXPECT_EQ(o.get(), - o.get()); - EXPECT_EQ(o.get(), - o.get()); - EXPECT_EQ(o.get(), - o.get()); - EXPECT_EQ(o.get(), - o.get()); - EXPECT_EQ(o.get(), - o.get()); - EXPECT_EQ(o.get(), - o.get()); - EXPECT_EQ(o.get(), - o.get()); - EXPECT_EQ(o.get(), - o.get()); - EXPECT_EQ(o.get(), - o.get()); - - EXPECT_FALSE(o.has()); - EXPECT_FALSE(o.has()); -} - -TEST_F(ClientOptionsTest, IncorporatesUniverseDomain) { - auto o = internal::DefaultOptions( - oauth2::CreateAnonymousCredentials(), - Options{}.set( - "my-ud.net")); - EXPECT_EQ(o.get(), "https://storage.my-ud.net"); - EXPECT_EQ(o.get(), "https://iamcredentials.my-ud.net/v1"); -} - -TEST_F(ClientOptionsTest, IncorporatesUniverseDomainEnvVar) { - ScopedEnvironment ud("GOOGLE_CLOUD_UNIVERSE_DOMAIN", "ud-env-var.net"); - - auto o = internal::DefaultOptions( - oauth2::CreateAnonymousCredentials(), - Options{}.set( - "ud-option.net")); - EXPECT_EQ(o.get(), "https://storage.ud-env-var.net"); - EXPECT_EQ(o.get(), - "https://iamcredentials.ud-env-var.net/v1"); -} - -TEST_F(ClientOptionsTest, CustomEndpointOverridesUniverseDomain) { - ScopedEnvironment ud("GOOGLE_CLOUD_UNIVERSE_DOMAIN", "ud-env-var.net"); - - auto o = internal::DefaultOptions( - oauth2::CreateAnonymousCredentials(), - Options{} - .set("https://custom-storage.googleapis.com") - .set( - "https://custom-iamcredentials.googleapis.com/v1") - .set("ud-option.net")); - EXPECT_EQ(o.get(), - "https://custom-storage.googleapis.com"); - EXPECT_EQ(o.get(), - "https://custom-iamcredentials.googleapis.com/v1"); -} - -TEST_F(ClientOptionsTest, HttpVersion) { - namespace rest = ::google::cloud::rest_internal; - auto const options = internal::DefaultOptions( - oauth2::CreateAnonymousCredentials(), - Options{}.set("2.0")); - EXPECT_EQ("2.0", options.get()); -} - -TEST_F(ClientOptionsTest, CAPathOption) { - namespace rest = ::google::cloud::rest_internal; - auto const options = internal::DefaultOptions( - oauth2::CreateAnonymousCredentials(), - Options{}.set("test-only")); - EXPECT_EQ("test-only", options.get()); -} - -TEST_F(ClientOptionsTest, LoggingWithoutEnv) { - ScopedEnvironment env_common("GOOGLE_CLOUD_CPP_ENABLE_TRACING", - absl::nullopt); - ScopedEnvironment env("CLOUD_STORAGE_ENABLE_TRACING", absl::nullopt); - auto const options = - internal::DefaultOptions(oauth2::CreateAnonymousCredentials(), {}); - EXPECT_FALSE(options.has()); -} - -TEST_F(ClientOptionsTest, LoggingWithEnv) { - ScopedEnvironment env_common("GOOGLE_CLOUD_CPP_ENABLE_TRACING", - absl::nullopt); - ScopedEnvironment env("CLOUD_STORAGE_ENABLE_TRACING", "rpc,http"); - auto const options = - internal::DefaultOptions(oauth2::CreateAnonymousCredentials(), {}); - EXPECT_THAT(options.get(), - UnorderedElementsAre("rpc", "http")); -} - -TEST_F(ClientOptionsTest, TracingWithoutEnv) { - ScopedEnvironment env("GOOGLE_CLOUD_CPP_OPENTELEMETRY_TRACING", - absl::nullopt); - auto options = - internal::DefaultOptions(oauth2::CreateAnonymousCredentials(), {}); - EXPECT_FALSE(options.get()); - - options = - internal::DefaultOptions(oauth2::CreateAnonymousCredentials(), - Options{}.set(true)); - EXPECT_TRUE(options.get()); -} - -TEST_F(ClientOptionsTest, TracingWithEnv) { - ScopedEnvironment env("GOOGLE_CLOUD_CPP_OPENTELEMETRY_TRACING", "ON"); - auto const options = internal::DefaultOptions( - oauth2::CreateAnonymousCredentials(), - Options{}.set(false)); - EXPECT_TRUE(options.get()); -} - -TEST_F(ClientOptionsTest, ProjectIdWithoutEnv) { - ScopedEnvironment env("GOOGLE_CLOUD_PROJECT", absl::nullopt); - auto const options = - internal::DefaultOptions(oauth2::CreateAnonymousCredentials(), {}); - EXPECT_FALSE(options.has()); -} - -TEST_F(ClientOptionsTest, ProjecIdtWithEnv) { - ScopedEnvironment env("GOOGLE_CLOUD_PROJECT", "my-project"); - auto const options = - internal::DefaultOptions(oauth2::CreateAnonymousCredentials(), {}); - EXPECT_EQ("my-project", options.get()); -} - -TEST_F(ClientOptionsTest, OverrideWithRestInternal) { - namespace rest = ::google::cloud::rest_internal; - auto const options = - internal::DefaultOptions(oauth2::CreateAnonymousCredentials(), - Options{} - .set(1234) - .set(2345)); - EXPECT_EQ(1234, options.get()); - EXPECT_EQ(2345, options.get()); -} - -TEST_F(ClientOptionsTest, Timeouts) { - EXPECT_EQ(std::chrono::seconds(42), - internal::DefaultOptions(oauth2::CreateAnonymousCredentials(), - Options{}.set( - std::chrono::seconds(42))) - .get()); - - EXPECT_EQ(std::chrono::seconds(7), - internal::DefaultOptions( - oauth2::CreateAnonymousCredentials(), - Options{} - .set(std::chrono::seconds(42)) - .set(std::chrono::seconds(7))) - .get()); - - EXPECT_EQ(std::chrono::seconds(7), - internal::DefaultOptions(oauth2::CreateAnonymousCredentials(), - Options{}.set( - std::chrono::seconds(7))) - .get()); - - EXPECT_NE( - std::chrono::seconds(0), - internal::DefaultOptions(oauth2::CreateAnonymousCredentials(), Options{}) - .get()); -} - -} // namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google diff --git a/google/cloud/storage/client_service_account_test.cc b/google/cloud/storage/client_service_account_test.cc index 38301786909c9..3be52afdefc07 100644 --- a/google/cloud/storage/client_service_account_test.cc +++ b/google/cloud/storage/client_service_account_test.cc @@ -15,7 +15,6 @@ #include "google/cloud/storage/client.h" #include "google/cloud/storage/internal/hmac_key_metadata_parser.h" #include "google/cloud/storage/internal/service_account_parser.h" -#include "google/cloud/storage/oauth2/google_credentials.h" #include "google/cloud/storage/retry_policy.h" #include "google/cloud/storage/testing/canonical_errors.h" #include "google/cloud/storage/testing/client_unit_test.h" diff --git a/google/cloud/storage/client_sign_policy_document_test.cc b/google/cloud/storage/client_sign_policy_document_test.cc index 860b5792cebb8..0763425b3ac96 100644 --- a/google/cloud/storage/client_sign_policy_document_test.cc +++ b/google/cloud/storage/client_sign_policy_document_test.cc @@ -14,8 +14,6 @@ #include "google/cloud/storage/client.h" #include "google/cloud/storage/internal/base64.h" -#include "google/cloud/storage/oauth2/google_application_default_credentials_file.h" -#include "google/cloud/storage/oauth2/google_credentials.h" #include "google/cloud/storage/testing/canonical_errors.h" #include "google/cloud/storage/testing/client_unit_test.h" #include "google/cloud/storage/testing/mock_client.h" diff --git a/google/cloud/storage/client_sign_url_test.cc b/google/cloud/storage/client_sign_url_test.cc index cd0adb12f5190..a136f226a2323 100644 --- a/google/cloud/storage/client_sign_url_test.cc +++ b/google/cloud/storage/client_sign_url_test.cc @@ -13,8 +13,6 @@ // limitations under the License. #include "google/cloud/storage/client.h" -#include "google/cloud/storage/oauth2/google_application_default_credentials_file.h" -#include "google/cloud/storage/oauth2/google_credentials.h" #include "google/cloud/storage/testing/canonical_errors.h" #include "google/cloud/storage/testing/client_unit_test.h" #include "google/cloud/testing_util/status_matchers.h" diff --git a/google/cloud/storage/client_test.cc b/google/cloud/storage/client_test.cc index 07ebb8a424bbc..8d49ac1d7ea72 100644 --- a/google/cloud/storage/client_test.cc +++ b/google/cloud/storage/client_test.cc @@ -13,19 +13,28 @@ // limitations under the License. #include "google/cloud/storage/client.h" -#include "google/cloud/storage/oauth2/google_credentials.h" #include "google/cloud/storage/retry_policy.h" #include "google/cloud/storage/testing/canonical_errors.h" #include "google/cloud/storage/testing/mock_client.h" +#include "google/cloud/internal/curl_options.h" +#include "google/cloud/internal/filesystem.h" #include "google/cloud/internal/getenv.h" +#include "google/cloud/internal/random.h" +#include "google/cloud/internal/rest_options.h" +#include "google/cloud/internal/rest_response.h" #include "google/cloud/opentelemetry_options.h" #include "google/cloud/testing_util/mock_backoff_policy.h" #include "google/cloud/testing_util/opentelemetry_matchers.h" #include "google/cloud/testing_util/scoped_environment.h" +#include "google/cloud/testing_util/setenv.h" #include "google/cloud/testing_util/status_matchers.h" +#include "google/cloud/universe_domain_options.h" #include #include +#include +#include #include +#include #include #include @@ -37,12 +46,11 @@ namespace { using ::google::cloud::storage::internal::ClientImplDetails; using ::google::cloud::storage::testing::canonical_errors::TransientError; -using ::google::cloud::testing_util::IsOkAndHolds; -using ::google::cloud::testing_util::MockBackoffPolicy; using ::google::cloud::testing_util::ScopedEnvironment; using ::testing::ElementsAre; using ::testing::NotNull; using ::testing::Return; +using ::testing::UnorderedElementsAre; class ObservableRetryPolicy : public LimitedErrorCountRetryPolicy { public: @@ -81,6 +89,13 @@ class ObservableBackoffPolicy : public ExponentialBackoffPolicy { int ObservableBackoffPolicy::on_completion_call_count_; class ClientTest : public ::testing::Test { + public: + ClientTest() + : enable_tracing_("CLOUD_STORAGE_ENABLE_TRACING", {}), + endpoint_("CLOUD_STORAGE_EMULATOR_ENDPOINT", {}), + old_endpoint_("CLOUD_STORAGE_TESTBENCH_ENDPOINT", {}), + generator_(std::random_device{}()) {} + protected: void SetUp() override { mock_ = std::make_shared(); @@ -94,6 +109,10 @@ class ClientTest : public ::testing::Test { } std::shared_ptr mock_; + ScopedEnvironment enable_tracing_; + ScopedEnvironment endpoint_; + ScopedEnvironment old_endpoint_; + google::cloud::internal::DefaultPRNG generator_; }; TEST_F(ClientTest, Equality) { @@ -196,7 +215,6 @@ TEST_F(ClientTest, LoggingDecoratorsRestClient) { ElementsAre("RestStub", "LoggingStub", "StorageConnectionImpl")); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::DisableTracing; using ::google::cloud::testing_util::EnableTracing; @@ -239,63 +257,220 @@ TEST_F(ClientTest, OTelDisableTracing) { ElementsAre("RestStub", "LoggingStub", "StorageConnectionImpl")); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY +TEST_F(ClientTest, EndpointsDefault) { + testing_util::ScopedEnvironment endpoint("CLOUD_STORAGE_EMULATOR_ENDPOINT", + {}); + auto options = internal::DefaultOptions(); + EXPECT_EQ("https://storage.googleapis.com", + options.get()); + EXPECT_EQ("https://iamcredentials.googleapis.com/v1", + options.get()); +} + +TEST_F(ClientTest, EndpointsOverride) { + testing_util::ScopedEnvironment endpoint("CLOUD_STORAGE_EMULATOR_ENDPOINT", + {}); + auto options = internal::DefaultOptions( + Options{}.set("http://127.0.0.1.nip.io:1234")); + EXPECT_EQ("http://127.0.0.1.nip.io:1234", options.get()); + EXPECT_EQ("https://iamcredentials.googleapis.com/v1", + options.get()); +} + +TEST_F(ClientTest, EndpointsEmulator) { + testing_util::ScopedEnvironment endpoint("CLOUD_STORAGE_EMULATOR_ENDPOINT", + "http://localhost:1234"); + auto options = internal::DefaultOptions(); + EXPECT_EQ("http://localhost:1234", options.get()); + EXPECT_EQ("http://localhost:1234/iamapi", options.get()); +} + +TEST_F(ClientTest, OldEndpointsEmulator) { + google::cloud::testing_util::UnsetEnv("CLOUD_STORAGE_EMULATOR_ENDPOINT"); + testing_util::ScopedEnvironment endpoint("CLOUD_STORAGE_TESTBENCH_ENDPOINT", + "http://localhost:1234"); + auto options = internal::DefaultOptions(); + EXPECT_EQ("http://localhost:1234", options.get()); + EXPECT_EQ("http://localhost:1234/iamapi", options.get()); +} + +TEST_F(ClientTest, DefaultOptions) { + auto o = internal::DefaultOptions(); + EXPECT_EQ("https://storage.googleapis.com", o.get()); + + // Verify any set values are respected overridden. + o = internal::DefaultOptions( + Options{}.set("https://private.googleapis.com")); + EXPECT_EQ("https://private.googleapis.com", o.get()); + + o = internal::DefaultOptions(); + EXPECT_EQ("https://storage.googleapis.com", o.get()); + EXPECT_EQ("https://iamcredentials.googleapis.com/v1", + o.get()); + + EXPECT_EQ("v1", o.get()); + EXPECT_LT(0, o.get()); + EXPECT_LT(0, o.get()); + EXPECT_LT(0, o.get()); + EXPECT_LE(0, o.get()); + EXPECT_TRUE(o.get()); + EXPECT_TRUE(o.get()); + EXPECT_EQ(0, o.get()); + EXPECT_EQ(0, o.get()); + EXPECT_LT(std::chrono::seconds(0), o.get()); + EXPECT_LT(0, o.get()); + EXPECT_LT(std::chrono::seconds(0), o.get()); + EXPECT_LT(0, o.get()); + + namespace rest = ::google::cloud::rest_internal; + EXPECT_EQ(o.get(), + o.get()); + EXPECT_EQ(o.get(), + o.get()); + EXPECT_EQ(o.get(), + o.get()); + EXPECT_EQ(o.get(), + o.get()); + EXPECT_EQ(o.get(), + o.get()); + EXPECT_EQ(o.get(), + o.get()); + EXPECT_EQ(o.get(), + o.get()); + EXPECT_EQ(o.get(), + o.get()); + EXPECT_EQ(o.get(), + o.get()); + + EXPECT_FALSE(o.has()); + EXPECT_FALSE(o.has()); +} + +TEST_F(ClientTest, IncorporatesUniverseDomain) { + auto o = internal::DefaultOptions( + Options{}.set( + "my-ud.net")); + EXPECT_EQ(o.get(), "https://storage.my-ud.net"); + EXPECT_EQ(o.get(), "https://iamcredentials.my-ud.net/v1"); +} + +TEST_F(ClientTest, IncorporatesUniverseDomainEnvVar) { + ScopedEnvironment ud("GOOGLE_CLOUD_UNIVERSE_DOMAIN", "ud-env-var.net"); + + auto o = internal::DefaultOptions( + Options{}.set( + "ud-option.net")); + EXPECT_EQ(o.get(), "https://storage.ud-env-var.net"); + EXPECT_EQ(o.get(), + "https://iamcredentials.ud-env-var.net/v1"); +} + +TEST_F(ClientTest, CustomEndpointOverridesUniverseDomain) { + ScopedEnvironment ud("GOOGLE_CLOUD_UNIVERSE_DOMAIN", "ud-env-var.net"); + + auto o = internal::DefaultOptions( + Options{} + .set("https://custom-storage.googleapis.com") + .set( + "https://custom-iamcredentials.googleapis.com/v1") + .set("ud-option.net")); + EXPECT_EQ(o.get(), + "https://custom-storage.googleapis.com"); + EXPECT_EQ(o.get(), + "https://custom-iamcredentials.googleapis.com/v1"); +} + +TEST_F(ClientTest, HttpVersion) { + namespace rest = ::google::cloud::rest_internal; + auto const options = internal::DefaultOptions( + Options{}.set("2.0")); + EXPECT_EQ("2.0", options.get()); +} -#include "google/cloud/internal/disable_deprecation_warnings.inc" +TEST_F(ClientTest, CAPathOption) { + namespace rest = ::google::cloud::rest_internal; + auto const options = internal::DefaultOptions( + Options{}.set("test-only")); + EXPECT_EQ("test-only", options.get()); +} -TEST_F(ClientTest, DeprecatedButNotDecommissioned) { - auto m1 = std::make_shared(); +TEST_F(ClientTest, LoggingWithoutEnv) { + ScopedEnvironment env_common("GOOGLE_CLOUD_CPP_ENABLE_TRACING", + absl::nullopt); + ScopedEnvironment env("CLOUD_STORAGE_ENABLE_TRACING", absl::nullopt); + auto const options = internal::DefaultOptions(); + EXPECT_FALSE(options.has()); +} - auto c1 = storage::Client(m1, Client::NoDecorations{}); - EXPECT_EQ(c1.raw_client().get(), m1.get()); +TEST_F(ClientTest, LoggingWithEnv) { + ScopedEnvironment env_common("GOOGLE_CLOUD_CPP_ENABLE_TRACING", + absl::nullopt); + ScopedEnvironment env("CLOUD_STORAGE_ENABLE_TRACING", "rpc,http"); + auto const options = internal::DefaultOptions(); + EXPECT_THAT(options.get(), + UnorderedElementsAre("rpc", "http")); +} + +TEST_F(ClientTest, TracingWithoutEnv) { + ScopedEnvironment env("GOOGLE_CLOUD_CPP_OPENTELEMETRY_TRACING", + absl::nullopt); + auto options = internal::DefaultOptions(); + EXPECT_FALSE(options.get()); + + options = + internal::DefaultOptions(Options{}.set(true)); + EXPECT_TRUE(options.get()); +} + +TEST_F(ClientTest, TracingWithEnv) { + ScopedEnvironment env("GOOGLE_CLOUD_CPP_OPENTELEMETRY_TRACING", "ON"); + auto const options = internal::DefaultOptions( + Options{}.set(false)); + EXPECT_TRUE(options.get()); +} + +TEST_F(ClientTest, ProjectIdWithoutEnv) { + ScopedEnvironment env("GOOGLE_CLOUD_PROJECT", absl::nullopt); + auto const options = internal::DefaultOptions(); + EXPECT_FALSE(options.has()); +} - auto m2 = std::make_shared(); - auto c2 = storage::Client(m2, LimitedErrorCountRetryPolicy(3)); - EXPECT_NE(c2.raw_client().get(), m2.get()); +TEST_F(ClientTest, ProjectIdtWithEnv) { + ScopedEnvironment env("GOOGLE_CLOUD_PROJECT", "my-project"); + auto const options = internal::DefaultOptions(); + EXPECT_EQ("my-project", options.get()); } -TEST_F(ClientTest, DeprecatedRetryPolicies) { - auto constexpr kNumRetries = 2; - auto mock_b = std::make_unique(); - EXPECT_CALL(*mock_b, clone).WillOnce([=] { - auto clone_1 = std::make_unique(); - EXPECT_CALL(*clone_1, clone).WillOnce([=] { - auto clone_2 = std::make_unique(); - EXPECT_CALL(*clone_2, OnCompletion) - .Times(kNumRetries) - .WillRepeatedly(Return(std::chrono::milliseconds(0))); - return clone_2; - }); - return clone_1; - }); - - auto mock = std::make_shared(); - EXPECT_CALL(*mock, ListBuckets) - .Times(kNumRetries + 1) - .WillRepeatedly(Return(TransientError())); - - auto client = storage::Client(mock, LimitedErrorCountRetryPolicy(kNumRetries), - std::move(*mock_b)); - (void)client.ListBuckets(OverrideDefaultProject("fake-project")); +TEST_F(ClientTest, OverrideWithRestInternal) { + namespace rest = ::google::cloud::rest_internal; + auto const options = + internal::DefaultOptions(Options{} + .set(1234) + .set(2345)); + EXPECT_EQ(1234, options.get()); + EXPECT_EQ(2345, options.get()); } -TEST_F(ClientTest, DeprecatedClientFromMock) { - auto mock = std::make_shared(); - auto client = testing::ClientFromMock(mock); - - internal::ListObjectsResponse response; - response.items.push_back( - ObjectMetadata{}.set_bucket("bucket").set_name("object/1")); - response.items.push_back( - ObjectMetadata{}.set_bucket("bucket").set_name("object/2")); - EXPECT_CALL(*mock, ListObjects) - .WillOnce(Return(TransientError())) - .WillOnce(Return(response)); - - auto stream = client.ListObjects("bucket", Prefix("object/")); - std::vector> objects{stream.begin(), stream.end()}; - EXPECT_THAT(objects, ElementsAre(IsOkAndHolds(response.items[0]), - IsOkAndHolds(response.items[1]))); +TEST_F(ClientTest, Timeouts) { + EXPECT_EQ(std::chrono::seconds(42), + internal::DefaultOptions(Options{}.set( + std::chrono::seconds(42))) + .get()); + + EXPECT_EQ(std::chrono::seconds(7), + internal::DefaultOptions( + Options{} + .set(std::chrono::seconds(42)) + .set(std::chrono::seconds(7))) + .get()); + + EXPECT_EQ(std::chrono::seconds(7), + internal::DefaultOptions(Options{}.set( + std::chrono::seconds(7))) + .get()); + + EXPECT_NE(std::chrono::seconds(0), + internal::DefaultOptions().get()); } } // namespace diff --git a/google/cloud/storage/client_write_object_test.cc b/google/cloud/storage/client_write_object_test.cc index 49e91651bb229..65a04e2f04ae0 100644 --- a/google/cloud/storage/client_write_object_test.cc +++ b/google/cloud/storage/client_write_object_test.cc @@ -14,7 +14,6 @@ #include "google/cloud/storage/client.h" #include "google/cloud/storage/internal/object_metadata_parser.h" -#include "google/cloud/storage/oauth2/google_credentials.h" #include "google/cloud/storage/retry_policy.h" #include "google/cloud/storage/testing/canonical_errors.h" #include "google/cloud/storage/testing/client_unit_test.h" diff --git a/google/cloud/storage/config-grpc.cmake.in b/google/cloud/storage/config-grpc.cmake.in index 4a205b397ec52..ed7cab8090484 100644 --- a/google/cloud/storage/config-grpc.cmake.in +++ b/google/cloud/storage/config-grpc.cmake.in @@ -18,6 +18,5 @@ find_dependency(google_cloud_cpp_googleapis) find_dependency(google_cloud_cpp_grpc_utils) find_dependency(google_cloud_cpp_opentelemetry) find_dependency(absl) -find_dependency(Crc32c) include("${CMAKE_CURRENT_LIST_DIR}/storage_grpc-targets.cmake") diff --git a/google/cloud/storage/config.cmake.in b/google/cloud/storage/config.cmake.in index 9f10f775d01bf..fc0d2a1f3e37d 100644 --- a/google/cloud/storage/config.cmake.in +++ b/google/cloud/storage/config.cmake.in @@ -17,7 +17,6 @@ find_dependency(google_cloud_cpp_rest_internal) find_dependency(google_cloud_cpp_common) find_dependency(absl) find_dependency(CURL) -find_dependency(Crc32c) find_dependency(nlohmann_json) if (NOT WIN32) find_dependency(OpenSSL) diff --git a/google/cloud/storage/examples/BUILD.bazel b/google/cloud/storage/examples/BUILD.bazel index 4cdc4c6d3c531..dce88abeeec74 100644 --- a/google/cloud/storage/examples/BUILD.bazel +++ b/google/cloud/storage/examples/BUILD.bazel @@ -44,7 +44,7 @@ cc_library( "//:storage", "//google/cloud/storage:storage_client_testing", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) for test in storage_examples_unit_tests] @@ -75,7 +75,7 @@ cc_library( "//:storage_grpc_mocks", "//google/cloud/storage:storage_client_testing", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) for test in storage_grpc_unit_tests] diff --git a/google/cloud/storage/google_cloud_cpp_storage.bzl b/google/cloud/storage/google_cloud_cpp_storage.bzl index 41bb9f343edbb..7f244903705ab 100644 --- a/google/cloud/storage/google_cloud_cpp_storage.bzl +++ b/google/cloud/storage/google_cloud_cpp_storage.bzl @@ -36,7 +36,6 @@ google_cloud_cpp_storage_hdrs = [ "bucket_versioning.h", "bucket_website.h", "client.h", - "client_options.h", "download_options.h", "enable_object_retention.h", "hash_mismatch_error.h", @@ -46,17 +45,12 @@ google_cloud_cpp_storage_hdrs = [ "iam_policy.h", "idempotency_policy.h", "include_folders_as_prefixes.h", - "internal/access_control_common.h", - "internal/access_control_common_parser.h", - "internal/access_token_credentials.h", "internal/base64.h", "internal/binary_data_as_debug_string.h", "internal/bucket_access_control_parser.h", "internal/bucket_acl_requests.h", "internal/bucket_metadata_parser.h", "internal/bucket_requests.h", - "internal/common_metadata.h", - "internal/common_metadata_parser.h", "internal/complex_option.h", "internal/compute_engine_util.h", "internal/connection_factory.h", @@ -67,7 +61,6 @@ google_cloud_cpp_storage_hdrs = [ "internal/curl/request_builder.h", "internal/default_object_acl_requests.h", "internal/empty_response.h", - "internal/error_credentials.h", "internal/generate_message_boundary.h", "internal/generic_object_request.h", "internal/generic_request.h", @@ -82,7 +75,6 @@ google_cloud_cpp_storage_hdrs = [ "internal/hmac_key_metadata_parser.h", "internal/hmac_key_requests.h", "internal/http_response.h", - "internal/impersonate_service_account_credentials.h", "internal/lifecycle_rule_parser.h", "internal/logging_stub.h", "internal/make_jwt_assertion.h", @@ -113,7 +105,6 @@ google_cloud_cpp_storage_hdrs = [ "internal/tracing_connection.h", "internal/tracing_object_read_source.h", "internal/tuple_filter.h", - "internal/unified_rest_credentials.h", "internal/well_known_parameters_impl.h", "lifecycle_rule.h", "list_buckets_extended_reader.h", @@ -124,15 +115,6 @@ google_cloud_cpp_storage_hdrs = [ "notification_event_type.h", "notification_metadata.h", "notification_payload_format.h", - "oauth2/anonymous_credentials.h", - "oauth2/authorized_user_credentials.h", - "oauth2/compute_engine_credentials.h", - "oauth2/credential_constants.h", - "oauth2/credentials.h", - "oauth2/google_application_default_credentials_file.h", - "oauth2/google_credentials.h", - "oauth2/refreshing_credentials_wrapper.h", - "oauth2/service_account_credentials.h", "object_access_control.h", "object_metadata.h", "object_read_stream.h", @@ -174,13 +156,10 @@ google_cloud_cpp_storage_srcs = [ "bucket_retention_policy.cc", "bucket_soft_delete_policy.cc", "client.cc", - "client_options.cc", "hashing_options.cc", "hmac_key_metadata.cc", "iam_policy.cc", "idempotency_policy.cc", - "internal/access_control_common_parser.cc", - "internal/access_token_credentials.cc", "internal/base64.cc", "internal/bucket_access_control_parser.cc", "internal/bucket_acl_requests.cc", @@ -193,7 +172,6 @@ google_cloud_cpp_storage_srcs = [ "internal/crc32c.cc", "internal/default_object_acl_requests.cc", "internal/empty_response.cc", - "internal/error_credentials.cc", "internal/generate_message_boundary.cc", "internal/generic_stub_adapter.cc", "internal/generic_stub_factory.cc", @@ -205,7 +183,6 @@ google_cloud_cpp_storage_srcs = [ "internal/hmac_key_metadata_parser.cc", "internal/hmac_key_requests.cc", "internal/http_response.cc", - "internal/impersonate_service_account_credentials.cc", "internal/lifecycle_rule_parser.cc", "internal/logging_stub.cc", "internal/make_jwt_assertion.cc", @@ -235,21 +212,12 @@ google_cloud_cpp_storage_srcs = [ "internal/storage_connection.cc", "internal/tracing_connection.cc", "internal/tracing_object_read_source.cc", - "internal/unified_rest_credentials.cc", "internal/win32/hash_function_impl.cc", "lifecycle_rule.cc", "list_buckets_reader.cc", "list_hmac_keys_reader.cc", "list_objects_reader.cc", "notification_metadata.cc", - "oauth2/anonymous_credentials.cc", - "oauth2/authorized_user_credentials.cc", - "oauth2/compute_engine_credentials.cc", - "oauth2/credentials.cc", - "oauth2/google_application_default_credentials_file.cc", - "oauth2/google_credentials.cc", - "oauth2/refreshing_credentials_wrapper.cc", - "oauth2/service_account_credentials.cc", "object_access_control.cc", "object_metadata.cc", "object_read_stream.cc", diff --git a/google/cloud/storage/google_cloud_cpp_storage.cmake b/google/cloud/storage/google_cloud_cpp_storage.cmake index 6867722eadaf7..f24107bca2cd9 100644 --- a/google/cloud/storage/google_cloud_cpp_storage.cmake +++ b/google/cloud/storage/google_cloud_cpp_storage.cmake @@ -54,8 +54,6 @@ add_library( bucket_website.h client.cc client.h - client_options.cc - client_options.h download_options.h enable_object_retention.h hash_mismatch_error.h @@ -69,11 +67,6 @@ add_library( idempotency_policy.cc idempotency_policy.h include_folders_as_prefixes.h - internal/access_control_common.h - internal/access_control_common_parser.cc - internal/access_control_common_parser.h - internal/access_token_credentials.cc - internal/access_token_credentials.h internal/base64.cc internal/base64.h internal/binary_data_as_debug_string.h @@ -85,8 +78,6 @@ add_library( internal/bucket_metadata_parser.h internal/bucket_requests.cc internal/bucket_requests.h - internal/common_metadata.h - internal/common_metadata_parser.h internal/complex_option.h internal/compute_engine_util.cc internal/compute_engine_util.h @@ -104,8 +95,6 @@ add_library( internal/default_object_acl_requests.h internal/empty_response.cc internal/empty_response.h - internal/error_credentials.cc - internal/error_credentials.h internal/generate_message_boundary.cc internal/generate_message_boundary.h internal/generic_object_request.h @@ -131,8 +120,6 @@ add_library( internal/hmac_key_requests.h internal/http_response.cc internal/http_response.h - internal/impersonate_service_account_credentials.cc - internal/impersonate_service_account_credentials.h internal/lifecycle_rule_parser.cc internal/lifecycle_rule_parser.h internal/logging_stub.cc @@ -192,8 +179,6 @@ add_library( internal/tracing_object_read_source.cc internal/tracing_object_read_source.h internal/tuple_filter.h - internal/unified_rest_credentials.cc - internal/unified_rest_credentials.h internal/well_known_parameters_impl.h internal/win32/hash_function_impl.cc lifecycle_rule.cc @@ -210,23 +195,6 @@ add_library( notification_metadata.cc notification_metadata.h notification_payload_format.h - oauth2/anonymous_credentials.cc - oauth2/anonymous_credentials.h - oauth2/authorized_user_credentials.cc - oauth2/authorized_user_credentials.h - oauth2/compute_engine_credentials.cc - oauth2/compute_engine_credentials.h - oauth2/credential_constants.h - oauth2/credentials.cc - oauth2/credentials.h - oauth2/google_application_default_credentials_file.cc - oauth2/google_application_default_credentials_file.h - oauth2/google_credentials.cc - oauth2/google_credentials.h - oauth2/refreshing_credentials_wrapper.cc - oauth2/refreshing_credentials_wrapper.h - oauth2/service_account_credentials.cc - oauth2/service_account_credentials.h object_access_control.cc object_access_control.h object_metadata.cc @@ -274,7 +242,6 @@ target_link_libraries( google-cloud-cpp::common google-cloud-cpp::rest_internal nlohmann_json::nlohmann_json - Crc32c::crc32c CURL::libcurl Threads::Threads) if (WIN32) @@ -348,8 +315,6 @@ google_cloud_cpp_add_pkgconfig( "absl_variant" NON_WIN32_REQUIRES openssl - LIBS - crc32c WIN32_LIBS ws2_32 bcrypt) @@ -441,7 +406,6 @@ if (BUILD_TESTING) client_object_acl_test.cc client_object_copy_test.cc client_object_test.cc - client_options_test.cc client_service_account_test.cc client_sign_policy_document_test.cc client_sign_url_test.cc @@ -452,9 +416,6 @@ if (BUILD_TESTING) hashing_options_test.cc hmac_key_metadata_test.cc idempotency_policy_test.cc - internal/access_control_common_parser_test.cc - internal/access_control_common_test.cc - internal/access_token_credentials_test.cc internal/base64_test.cc internal/bucket_acl_requests_test.cc internal/bucket_requests_test.cc @@ -481,7 +442,6 @@ if (BUILD_TESTING) internal/hash_values_test.cc internal/hmac_key_requests_test.cc internal/http_response_test.cc - internal/impersonate_service_account_credentials_test.cc internal/logging_stub_test.cc internal/make_jwt_assertion_test.cc internal/md5hash_test.cc @@ -505,7 +465,6 @@ if (BUILD_TESTING) internal/tracing_connection_test.cc internal/tracing_object_read_source_test.cc internal/tuple_filter_test.cc - internal/unified_rest_credentials_test.cc lifecycle_rule_test.cc list_buckets_extended_reader_test.cc list_buckets_reader_test.cc @@ -513,12 +472,6 @@ if (BUILD_TESTING) list_objects_and_prefixes_reader_test.cc list_objects_reader_test.cc notification_metadata_test.cc - oauth2/anonymous_credentials_test.cc - oauth2/authorized_user_credentials_test.cc - oauth2/compute_engine_credentials_test.cc - oauth2/google_application_default_credentials_file_test.cc - oauth2/google_credentials_test.cc - oauth2/service_account_credentials_test.cc object_access_control_test.cc object_metadata_test.cc object_retention_test.cc diff --git a/google/cloud/storage/google_cloud_cpp_storage_grpc.cmake b/google/cloud/storage/google_cloud_cpp_storage_grpc.cmake index 8349ed1889b8f..35f458503ec73 100644 --- a/google/cloud/storage/google_cloud_cpp_storage_grpc.cmake +++ b/google/cloud/storage/google_cloud_cpp_storage_grpc.cmake @@ -272,16 +272,6 @@ create_bazel_config(google_cloud_cpp_storage_grpc) add_library(google-cloud-cpp::storage_grpc ALIAS google_cloud_cpp_storage_grpc) -# TODO(#13857) - remove the backwards compatibility shims -add_library(google_cloud_cpp_experimental_storage_grpc INTERFACE) -set_target_properties( - google_cloud_cpp_experimental_storage_grpc - PROPERTIES EXPORT_NAME "google-cloud-cpp::experimental-storage_grpc") -target_link_libraries(google_cloud_cpp_experimental_storage_grpc - INTERFACE google-cloud-cpp::storage_grpc) -add_library(google-cloud-cpp::experimental-storage_grpc ALIAS - google_cloud_cpp_experimental_storage_grpc) - google_cloud_cpp_add_pkgconfig( storage_grpc "The GCS (Google Cloud Storage) gRPC plugin" @@ -318,8 +308,6 @@ install( install( TARGETS google_cloud_cpp_storage_grpc google_cloud_cpp_storage_protos - # TODO(#13857) - remove the backwards compatibility shims - google_cloud_cpp_experimental_storage_grpc EXPORT storage_grpc-targets RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT google_cloud_cpp_runtime @@ -362,13 +350,6 @@ if (GOOGLE_CLOUD_CPP_WITH_MOCKS) add_library(google-cloud-cpp::storage_grpc_mocks ALIAS google_cloud_cpp_storage_grpc_mocks) - # TODO(#13857) - remove backwards compatibility shims - add_library(google_cloud_cpp_experimental_storage_grpc_mocks INTERFACE) - target_link_libraries(google_cloud_cpp_experimental_storage_grpc_mocks - INTERFACE google-cloud-cpp::storage_grpc_mocks) - add_library(google-cloud-cpp::experimental-storage_grpc_mocks ALIAS - google_cloud_cpp_experimental_storage_grpc_mocks) - install( FILES ${google_cloud_cpp_storage_grpc_mocks_hdrs} DESTINATION "include/google/cloud/storage/mocks" @@ -382,8 +363,6 @@ if (GOOGLE_CLOUD_CPP_WITH_MOCKS) install( TARGETS google_cloud_cpp_storage_grpc_mocks - # TODO(#13857) - remove backwards compatibility shims - google_cloud_cpp_experimental_storage_grpc_mocks EXPORT storage_grpc_mocks-targets COMPONENT google_cloud_cpp_development) diff --git a/google/cloud/storage/grpc_plugin.cc b/google/cloud/storage/grpc_plugin.cc index dafee35e6f06a..61c2d1c92fc3e 100644 --- a/google/cloud/storage/grpc_plugin.cc +++ b/google/cloud/storage/grpc_plugin.cc @@ -26,23 +26,8 @@ namespace google { namespace cloud { namespace storage { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -// TODO(#13857) - stop using storage_experimental::GrpcPluginOption -#include "google/cloud/internal/disable_deprecation_warnings.inc" -bool UseRest(Options const& options) { - using ::google::cloud::internal::GetEnv; - auto const config = - GetEnv("GOOGLE_CLOUD_CPP_STORAGE_GRPC_CONFIG") - .value_or(options.get()); - return config == "none"; -} -#include "google/cloud/internal/diagnostics_pop.inc" - -} // namespace google::cloud::storage::Client MakeGrpcClient(Options opts) { - if (UseRest(opts)) return google::cloud::storage::Client(std::move(opts)); opts = google::cloud::storage_internal::DefaultOptionsGrpc(std::move(opts)); storage_internal::EnableGrpcMetrics(opts); auto stub = std::make_unique(opts); @@ -52,16 +37,5 @@ google::cloud::storage::Client MakeGrpcClient(Options opts) { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storage - -namespace storage_experimental { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -google::cloud::storage::Client DefaultGrpcClient(Options opts) { - return google::cloud::storage::MakeGrpcClient(std::move(opts)); -} - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage_experimental - } // namespace cloud } // namespace google diff --git a/google/cloud/storage/grpc_plugin.h b/google/cloud/storage/grpc_plugin.h index ddc24ae55ab0c..51f25f2fdc73c 100644 --- a/google/cloud/storage/grpc_plugin.h +++ b/google/cloud/storage/grpc_plugin.h @@ -37,33 +37,9 @@ google::cloud::storage::Client MakeGrpcClient(Options opts = {}); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storage -// TODO(#13857) - remove the backwards compatibility shims. namespace storage_experimental { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -/** - * Configure the GCS+gRPC plugin. - * - * @deprecated use `google::cloud::storage::Client()` to create JSON-based - * clients and `google::cloud::storage::DefaultGrpcClient()` to create - * gRPC-based clients. If you need to pick one dynamically a simple - * `if()` statement or ternary expression can do the job. - */ -struct [[deprecated( - "use storage::Client() or storage::MakeGrpcClient()")]] GrpcPluginOption { - using Type = std::string; -}; - -/** - * Create a `google::cloud::storage::Client` object configured to use gRPC. - * - * @deprecated Please use `google::cloud::storage::MakeGrpcClient`. - */ -[[deprecated( - "use ::google::cloud::storage::MakeGrpcClient() instead")]] google::cloud:: - storage::Client - DefaultGrpcClient(Options opts = {}); - /** * Enable gRPC telemetry for GCS RPCs. * diff --git a/google/cloud/storage/grpc_plugin_test.cc b/google/cloud/storage/grpc_plugin_test.cc index 8be88c86aae45..7f66ce4f79ef0 100644 --- a/google/cloud/storage/grpc_plugin_test.cc +++ b/google/cloud/storage/grpc_plugin_test.cc @@ -50,38 +50,6 @@ TEST(GrpcPluginTest, DefaultCreatesGrpc) { ElementsAre("GrpcStub", "StorageConnectionImpl")); } -#include "google/cloud/internal/disable_deprecation_warnings.inc" -TEST(GrpcPluginTest, MostConfigValuesCreatesGrpc) { - // Explicitly disable logging, which may be enabled by our CI builds. - auto logging = - ScopedEnvironment("CLOUD_STORAGE_ENABLE_TRACING", absl::nullopt); - auto config = - ScopedEnvironment("GOOGLE_CLOUD_CPP_STORAGE_GRPC_CONFIG", absl::nullopt); - // Unless the config is set to "none" we want to create the gRPC stub. - for (auto const* config : {"", "metadata", "media", "anything-but-none"}) { - auto client = MakeGrpcClient( - TestOptions().set(config)); - auto impl = ClientImplDetails::GetConnection(client); - ASSERT_THAT(impl, NotNull()); - EXPECT_THAT(impl->InspectStackStructure(), - ElementsAre("GrpcStub", "StorageConnectionImpl")); - } -} - -TEST(GrpcPluginTest, EnvironmentOverrides) { - // Explicitly disable logging, which may be enabled by our CI builds. - auto logging = - ScopedEnvironment("CLOUD_STORAGE_ENABLE_TRACING", absl::nullopt); - auto config = - ScopedEnvironment("GOOGLE_CLOUD_CPP_STORAGE_GRPC_CONFIG", "none"); - auto client = MakeGrpcClient( - TestOptions().set("metadata")); - auto impl = ClientImplDetails::GetConnection(client); - ASSERT_THAT(impl, NotNull()); - EXPECT_THAT(impl->InspectStackStructure(), - ElementsAre("RestStub", "StorageConnectionImpl")); -} - TEST(GrpcPluginTest, UnsetConfigCreatesMetadata) { // Explicitly disable logging, which may be enabled by our CI builds. auto logging = @@ -95,49 +63,6 @@ TEST(GrpcPluginTest, UnsetConfigCreatesMetadata) { ElementsAre("GrpcStub", "StorageConnectionImpl")); } -TEST(GrpcPluginTest, NoneConfigCreatesCurl) { - // Explicitly disable logging, which may be enabled by our CI builds. - auto logging = - ScopedEnvironment("CLOUD_STORAGE_ENABLE_TRACING", absl::nullopt); - auto config = - ScopedEnvironment("GOOGLE_CLOUD_CPP_STORAGE_GRPC_CONFIG", absl::nullopt); - auto client = MakeGrpcClient( - TestOptions().set("none")); - auto impl = ClientImplDetails::GetConnection(client); - ASSERT_THAT(impl, NotNull()); - EXPECT_THAT(impl->InspectStackStructure(), - ElementsAre("RestStub", "StorageConnectionImpl")); -} - -TEST(GrpcPluginTest, HybridUsesGrpcBufferOptions) { - // Explicitly disable logging, which may be enabled by our CI builds. - auto logging = - ScopedEnvironment("CLOUD_STORAGE_ENABLE_TRACING", absl::nullopt); - auto config = - ScopedEnvironment("GOOGLE_CLOUD_CPP_STORAGE_GRPC_CONFIG", absl::nullopt); - auto client = MakeGrpcClient( - TestOptions().set("media")); - EXPECT_GE( - client.raw_client()->options().get(), - 32 * 1024 * 1024L); -} - -TEST(GrpcPluginTest, BackwardsCompatibilityShims) { - // Explicitly disable logging, which may be enabled by our CI builds. - auto logging = - ScopedEnvironment("CLOUD_STORAGE_ENABLE_TRACING", absl::nullopt); - auto config = - ScopedEnvironment("GOOGLE_CLOUD_CPP_STORAGE_GRPC_CONFIG", absl::nullopt); - namespace gcs_ex = ::google::cloud::storage_experimental; - auto client = gcs_ex::DefaultGrpcClient( - TestOptions().set("none")); - auto impl = ClientImplDetails::GetConnection(client); - ASSERT_THAT(impl, NotNull()); - EXPECT_THAT(impl->InspectStackStructure(), - ElementsAre("RestStub", "StorageConnectionImpl")); -} -#include "google/cloud/internal/diagnostics_pop.inc" - TEST(GrpcPluginTest, GrpcMetricsExcludedLabelsOption) { auto const expected = std::set{"service_name", "service_version", "custom_label"}; diff --git a/google/cloud/storage/internal/access_control_common.h b/google/cloud/storage/internal/access_control_common.h deleted file mode 100644 index 2ab66207ac7b0..0000000000000 --- a/google/cloud/storage/internal/access_control_common.h +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_ACCESS_CONTROL_COMMON_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_ACCESS_CONTROL_COMMON_H - -#include "google/cloud/storage/project_team.h" -#include "google/cloud/storage/version.h" -#include "google/cloud/status.h" -#include "absl/types/optional.h" -#include -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace internal { -struct AccessControlCommonParser; - -/** - * Defines common code to both `BucketAccessControl` and `ObjectAccessControl`. - * - * @see - * https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls - * https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls - */ -// TODO(#9897) - remove this class and any references to it -class GOOGLE_CLOUD_CPP_DEPRECATED( - "This class will be removed shortly after 2023-06-01") AccessControlCommon { - public: - AccessControlCommon() = default; - - ///@{ - /** - * @name Well-known values for the role() field.. - * - * The following functions are handy to avoid common typos in the role names. - * We use functions instead of enums because enums are not backwards - * compatible and are brittle to changes in the server-side. - */ - static std::string ROLE_OWNER() { return "OWNER"; } - static std::string ROLE_READER() { return "READER"; } - ///@} - - ///@{ - /** - * @name Well-known values for the project_team().team field.. - * - * The following functions are handy to avoid common typos in the team names. - * We use functions instead of enums because enums are not backwards - * compatible and are brittle to changes in the server-side. - */ - static std::string TEAM_EDITORS() { return storage::TEAM_EDITORS(); } - static std::string TEAM_OWNERS() { return storage::TEAM_OWNERS(); } - static std::string TEAM_VIEWERS() { return storage::TEAM_VIEWERS(); } - ///@} - - std::string const& bucket() const { return bucket_; } - std::string const& domain() const { return domain_; } - std::string const& email() const { return email_; } - - std::string const& entity() const { return entity_; } - void set_entity(std::string e) { entity_ = std::move(e); } - - std::string const& entity_id() const { return entity_id_; } - std::string const& etag() const { return etag_; } - std::string const& id() const { return id_; } - std::string const& kind() const { return kind_; } - - bool has_project_team() const { return project_team_.has_value(); } - ProjectTeam const& project_team() const { return *project_team_; } - absl::optional const& project_team_as_optional() const { - return project_team_; - } - - std::string const& role() const { return role_; } - void set_role(std::string r) { role_ = std::move(r); } - - std::string const& self_link() const { return self_link_; } - - private: - friend struct internal::AccessControlCommonParser; - - std::string bucket_; - std::string domain_; - std::string email_; - std::string entity_; - std::string entity_id_; - std::string etag_; - std::string id_; - std::string kind_; - absl::optional project_team_; - std::string role_; - std::string self_link_; -}; - -#include "google/cloud/internal/disable_deprecation_warnings.inc" - -inline bool operator==(AccessControlCommon const& lhs, - AccessControlCommon const& rhs) { - // Start with id, bucket, etag because they should fail early, then - // alphabetical for readability. - return lhs.id() == rhs.id() && lhs.bucket() == rhs.bucket() && - lhs.etag() == rhs.etag() && lhs.domain() == rhs.domain() && - lhs.email() == rhs.email() && lhs.entity() == rhs.entity() && - lhs.entity_id() == rhs.entity_id() && lhs.kind() == rhs.kind() && - lhs.has_project_team() == rhs.has_project_team() && - (!lhs.has_project_team() || - lhs.project_team() == rhs.project_team()) && - lhs.role() == rhs.role() && lhs.self_link() == rhs.self_link(); -} - -inline bool operator!=(AccessControlCommon const& lhs, - AccessControlCommon const& rhs) { - return std::rel_ops::operator!=(lhs, rhs); -} - -#include "google/cloud/internal/diagnostics_pop.inc" - -} // namespace internal -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_ACCESS_CONTROL_COMMON_H diff --git a/google/cloud/storage/internal/access_control_common_parser.cc b/google/cloud/storage/internal/access_control_common_parser.cc deleted file mode 100644 index 66efe5f967354..0000000000000 --- a/google/cloud/storage/internal/access_control_common_parser.cc +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/storage/internal/access_control_common_parser.h" -#include "google/cloud/storage/internal/metadata_parser.h" -#include -// This file contains the implementation for deprecated functions, we need to -// disable the warnings. -#include "google/cloud/internal/disable_deprecation_warnings.inc" - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace internal { -Status AccessControlCommonParser::FromJson(AccessControlCommon& result, - nlohmann::json const& json) { - if (!json.is_object()) return NotJsonObject(json, GCP_ERROR_INFO()); - result.bucket_ = json.value("bucket", ""); - result.domain_ = json.value("domain", ""); - result.email_ = json.value("email", ""); - result.entity_ = json.value("entity", ""); - result.entity_id_ = json.value("entityId", ""); - result.etag_ = json.value("etag", ""); - result.id_ = json.value("id", ""); - result.kind_ = json.value("kind", ""); - result.role_ = json.value("role", ""); - result.self_link_ = json.value("selfLink", ""); - if (json.count("projectTeam") != 0) { - auto const& tmp = json["projectTeam"]; - if (tmp.is_null()) return Status{}; - ProjectTeam p; - p.project_number = tmp.value("projectNumber", ""); - p.team = tmp.value("team", ""); - result.project_team_ = std::move(p); - } - return Status(); -} - -} // namespace internal -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google diff --git a/google/cloud/storage/internal/access_control_common_parser.h b/google/cloud/storage/internal/access_control_common_parser.h deleted file mode 100644 index 459efdc619ecb..0000000000000 --- a/google/cloud/storage/internal/access_control_common_parser.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_ACCESS_CONTROL_COMMON_PARSER_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_ACCESS_CONTROL_COMMON_PARSER_H - -#include "google/cloud/storage/internal/access_control_common.h" -#include "google/cloud/status.h" -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace internal { - -// TODO(#9897) - remove this class and any references to it -struct GOOGLE_CLOUD_CPP_DEPRECATED( - "This class will be removed shortly after 2023-06-01") - AccessControlCommonParser { -#include "google/cloud/internal/disable_deprecation_warnings.inc" - - static Status FromJson(AccessControlCommon& result, - nlohmann::json const& json); - -#include "google/cloud/internal/diagnostics_pop.inc" -}; - -} // namespace internal -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_ACCESS_CONTROL_COMMON_PARSER_H diff --git a/google/cloud/storage/internal/access_control_common_parser_test.cc b/google/cloud/storage/internal/access_control_common_parser_test.cc deleted file mode 100644 index ceb919627dd7d..0000000000000 --- a/google/cloud/storage/internal/access_control_common_parser_test.cc +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/storage/internal/access_control_common_parser.h" -#include "google/cloud/testing_util/status_matchers.h" -#include -#include -#include -// This file contains tests for deprecated functions, we need to disable the -// warnings -#include "google/cloud/internal/disable_deprecation_warnings.inc" - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace { - -using ::testing::Eq; - -TEST(AccessControlCommonParserTest, FromJson) { - std::string bucket = "bucket-0"; - std::string role = internal::AccessControlCommon::ROLE_OWNER(); - std::string email = "foo@example.com"; - nlohmann::json metadata{{"bucket", bucket}, {"role", role}, {"email", email}}; - internal::AccessControlCommon result{}; - auto status = internal::AccessControlCommonParser::FromJson(result, metadata); - ASSERT_STATUS_OK(status); - - EXPECT_THAT(result.bucket(), Eq(bucket)); - EXPECT_THAT(result.role(), Eq(role)); - EXPECT_THAT(result.email(), Eq(email)); - EXPECT_FALSE(result.has_project_team()); -} - -TEST(AccessControlCommonParserTest, NullProjectTeamIsValid) { - nlohmann::json metadata{{"projectTeam", nullptr}}; - internal::AccessControlCommon result{}; - auto status = internal::AccessControlCommonParser::FromJson(result, metadata); - ASSERT_STATUS_OK(status); - - EXPECT_FALSE(result.has_project_team()); -} - -} // namespace -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google diff --git a/google/cloud/storage/internal/access_control_common_test.cc b/google/cloud/storage/internal/access_control_common_test.cc deleted file mode 100644 index ae8acc14d6c8e..0000000000000 --- a/google/cloud/storage/internal/access_control_common_test.cc +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/storage/internal/access_control_common.h" -#include -// This file contains tests for deprecated functions, we need to disable the -// warnings. -#include "google/cloud/internal/disable_deprecation_warnings.inc" - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace internal { -namespace { -/// @test Verify the well-known values defined in AccessControlCommon. -TEST(AccessControlCommonTest, WellKnownValues) { - EXPECT_EQ("OWNER", AccessControlCommon::ROLE_OWNER()); - EXPECT_EQ("READER", AccessControlCommon::ROLE_READER()); - - EXPECT_EQ("editors", AccessControlCommon::TEAM_EDITORS()); - EXPECT_EQ("owners", AccessControlCommon::TEAM_OWNERS()); - EXPECT_EQ("viewers", AccessControlCommon::TEAM_VIEWERS()); -} - -} // namespace -} // namespace internal -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google diff --git a/google/cloud/storage/internal/access_token_credentials.cc b/google/cloud/storage/internal/access_token_credentials.cc deleted file mode 100644 index f0315c76adb1a..0000000000000 --- a/google/cloud/storage/internal/access_token_credentials.cc +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/storage/internal/access_token_credentials.h" - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace internal { - -AccessTokenCredentials::AccessTokenCredentials( - google::cloud::AccessToken const& access_token) - : header_("Authorization: Bearer " + access_token.token) {} - -StatusOr AccessTokenCredentials::AuthorizationHeader() { - return header_; -} - -} // namespace internal -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google diff --git a/google/cloud/storage/internal/access_token_credentials.h b/google/cloud/storage/internal/access_token_credentials.h deleted file mode 100644 index 5e8920d3b93a0..0000000000000 --- a/google/cloud/storage/internal/access_token_credentials.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_ACCESS_TOKEN_CREDENTIALS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_ACCESS_TOKEN_CREDENTIALS_H - -#include "google/cloud/storage/oauth2/credentials.h" -#include "google/cloud/storage/version.h" -#include "google/cloud/internal/credentials_impl.h" -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace internal { - -class AccessTokenCredentials : public oauth2::Credentials { - public: - explicit AccessTokenCredentials( - google::cloud::AccessToken const& access_token); - - StatusOr AuthorizationHeader() override; - - private: - std::string header_; -}; - -} // namespace internal -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_ACCESS_TOKEN_CREDENTIALS_H diff --git a/google/cloud/storage/internal/access_token_credentials_test.cc b/google/cloud/storage/internal/access_token_credentials_test.cc deleted file mode 100644 index b668d628d758f..0000000000000 --- a/google/cloud/storage/internal/access_token_credentials_test.cc +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/storage/internal/access_token_credentials.h" -#include "google/cloud/testing_util/status_matchers.h" -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace internal { -namespace { - -using ::google::cloud::AccessToken; - -TEST(AccessTokenCredentials, Simple) { - auto const expiration = - std::chrono::system_clock::now() - std::chrono::minutes(10); - - AccessTokenCredentials tested(AccessToken{"token1", expiration}); - EXPECT_EQ("Authorization: Bearer token1", - tested.AuthorizationHeader().value()); - EXPECT_EQ("Authorization: Bearer token1", - tested.AuthorizationHeader().value()); -} - -} // namespace -} // namespace internal -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google diff --git a/google/cloud/storage/internal/async/connection_impl.h b/google/cloud/storage/internal/async/connection_impl.h index ad83d3ce098d9..f52750caa427c 100644 --- a/google/cloud/storage/internal/async/connection_impl.h +++ b/google/cloud/storage/internal/async/connection_impl.h @@ -31,7 +31,7 @@ #include "google/cloud/version.h" #include "absl/strings/cord.h" #include "absl/strings/string_view.h" -#include +#include "google/storage/v2/storage.pb.h" #include #include #include diff --git a/google/cloud/storage/internal/async/connection_tracing.cc b/google/cloud/storage/internal/async/connection_tracing.cc index 284a340b65d71..a3c6c8b1e531e 100644 --- a/google/cloud/storage/internal/async/connection_tracing.cc +++ b/google/cloud/storage/internal/async/connection_tracing.cc @@ -27,8 +27,6 @@ namespace cloud { namespace storage_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - namespace { class AsyncConnectionTracing : public storage::AsyncConnection { @@ -224,15 +222,6 @@ std::shared_ptr MakeTracingAsyncConnection( return std::make_unique(std::move(impl)); } -#else - -std::shared_ptr MakeTracingAsyncConnection( - std::shared_ptr impl) { - return impl; -} - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storage_internal } // namespace cloud diff --git a/google/cloud/storage/internal/async/connection_tracing_test.cc b/google/cloud/storage/internal/async/connection_tracing_test.cc index 0171b22875d17..5673ddf426f90 100644 --- a/google/cloud/storage/internal/async/connection_tracing_test.cc +++ b/google/cloud/storage/internal/async/connection_tracing_test.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/storage/internal/async/connection_tracing.h" #include "google/cloud/storage/async/object_descriptor_connection.h" #include "google/cloud/storage/async/reader_connection.h" @@ -726,5 +724,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storage_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/storage/internal/async/handle_redirect_error.h b/google/cloud/storage/internal/async/handle_redirect_error.h index 2026203fc8b4d..5cdf3b1b3d181 100644 --- a/google/cloud/storage/internal/async/handle_redirect_error.h +++ b/google/cloud/storage/internal/async/handle_redirect_error.h @@ -17,8 +17,8 @@ #include "google/cloud/status.h" #include "google/cloud/version.h" -#include -#include +#include "google/rpc/status.pb.h" +#include "google/storage/v2/storage.pb.h" namespace google { namespace cloud { diff --git a/google/cloud/storage/internal/async/handle_redirect_error_test.cc b/google/cloud/storage/internal/async/handle_redirect_error_test.cc index 0324afd1fb069..d681cdf1e790c 100644 --- a/google/cloud/storage/internal/async/handle_redirect_error_test.cc +++ b/google/cloud/storage/internal/async/handle_redirect_error_test.cc @@ -17,9 +17,9 @@ #include "google/cloud/internal/status_payload_keys.h" #include "google/cloud/status.h" #include "google/cloud/testing_util/status_matchers.h" +#include "google/rpc/error_details.pb.h" +#include "google/rpc/status.pb.h" #include -#include -#include #include namespace google { diff --git a/google/cloud/storage/internal/async/insert_object.h b/google/cloud/storage/internal/async/insert_object.h index 7b2714fdc4ffa..475a8b1f190df 100644 --- a/google/cloud/storage/internal/async/insert_object.h +++ b/google/cloud/storage/internal/async/insert_object.h @@ -23,7 +23,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/version.h" #include "absl/strings/cord.h" -#include +#include "google/storage/v2/storage.pb.h" #include namespace google { diff --git a/google/cloud/storage/internal/async/object_descriptor_connection_tracing.cc b/google/cloud/storage/internal/async/object_descriptor_connection_tracing.cc index e1e7b65f4a8fd..64cf5bde9d4ed 100644 --- a/google/cloud/storage/internal/async/object_descriptor_connection_tracing.cc +++ b/google/cloud/storage/internal/async/object_descriptor_connection_tracing.cc @@ -17,9 +17,7 @@ #include "google/cloud/storage/internal/async/reader_connection_tracing.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/version.h" -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY -#include -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY +#include #include namespace google { @@ -27,11 +25,9 @@ namespace cloud { namespace storage_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - namespace { -namespace sc = ::opentelemetry::trace::SemanticConventions; +namespace sc = ::opentelemetry::semconv; class AsyncObjectDescriptorConnectionTracing : public storage::ObjectDescriptorConnection { @@ -55,7 +51,7 @@ class AsyncObjectDescriptorConnectionTracing internal::OTelScope scope(span_); auto result = impl_->Read(p); span_->AddEvent("gl-cpp.open.read", - {{sc::kThreadId, internal::CurrentThreadId()}, + {{sc::thread::kThreadId, internal::CurrentThreadId()}, {"read-start", p.start}, {"read-length", p.length}}); return MakeTracingReaderConnection(span_, std::move(result)); @@ -80,8 +76,6 @@ MakeTracingObjectDescriptorConnection( std::move(span), std::move(impl)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storage_internal } // namespace cloud diff --git a/google/cloud/storage/internal/async/object_descriptor_connection_tracing.h b/google/cloud/storage/internal/async/object_descriptor_connection_tracing.h index ff0ee34a52389..ffe78427a365a 100644 --- a/google/cloud/storage/internal/async/object_descriptor_connection_tracing.h +++ b/google/cloud/storage/internal/async/object_descriptor_connection_tracing.h @@ -16,24 +16,18 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_ASYNC_OBJECT_DESCRIPTOR_CONNECTION_TRACING_H #include "google/cloud/storage/async/object_descriptor_connection.h" -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/internal/opentelemetry.h" -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY namespace google { namespace cloud { namespace storage_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTracingObjectDescriptorConnection( opentelemetry::nostd::shared_ptr span, std::shared_ptr impl); -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storage_internal } // namespace cloud diff --git a/google/cloud/storage/internal/async/object_descriptor_connection_tracing_test.cc b/google/cloud/storage/internal/async/object_descriptor_connection_tracing_test.cc index 0dbe97d99b68f..5719e76c954a7 100644 --- a/google/cloud/storage/internal/async/object_descriptor_connection_tracing_test.cc +++ b/google/cloud/storage/internal/async/object_descriptor_connection_tracing_test.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/storage/internal/async/object_descriptor_connection_tracing.h" #include "google/cloud/storage/async/object_descriptor_connection.h" #include "google/cloud/storage/mocks/mock_async_object_descriptor_connection.h" @@ -23,7 +21,7 @@ #include "google/cloud/testing_util/opentelemetry_matchers.h" #include #include -#include +#include namespace google { namespace cloud { @@ -70,7 +68,7 @@ auto expect_no_context = [](auto f) { }; TEST(ObjectDescriptorConnectionTracing, Read) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); auto mock = std::make_unique(); @@ -86,21 +84,22 @@ TEST(ObjectDescriptorConnectionTracing, Read) { actual.reset(); auto spans = span_catcher->GetSpans(); - EXPECT_THAT(spans, - ElementsAre(AllOf( - SpanNamed("test-span-name"), - SpanWithStatus(opentelemetry::trace::StatusCode::kOk), - SpanHasInstrumentationScope(), SpanKindIsClient(), - SpanHasEvents(AllOf( - EventNamed("gl-cpp.open.read"), - SpanEventAttributesAre( - OTelAttribute("read-length", 200), - OTelAttribute("read-start", 100), - OTelAttribute(sc::kThreadId, _))))))); + EXPECT_THAT( + spans, + ElementsAre(AllOf( + SpanNamed("test-span-name"), + SpanWithStatus(opentelemetry::trace::StatusCode::kOk), + SpanHasInstrumentationScope(), SpanKindIsClient(), + SpanHasEvents(AllOf( + EventNamed("gl-cpp.open.read"), + SpanEventAttributesAre( + OTelAttribute("read-length", 200), + OTelAttribute("read-start", 100), + OTelAttribute(sc::thread::kThreadId, _))))))); } TEST(ObjectDescriptorConnectionTracing, ReadThenRead) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); auto mock_connection = @@ -126,25 +125,26 @@ TEST(ObjectDescriptorConnectionTracing, ReadThenRead) { auto spans = span_catcher->GetSpans(); EXPECT_THAT( - spans, ElementsAre(AllOf( - SpanNamed("test-span"), - SpanWithStatus(opentelemetry::trace::StatusCode::kOk), - SpanHasInstrumentationScope(), SpanKindIsClient(), - SpanEventsAre( - AllOf(EventNamed("gl-cpp.open.read"), - SpanEventAttributesAre( - OTelAttribute("read-length", 0), - OTelAttribute("read-start", 0), - OTelAttribute(sc::kThreadId, _))), - AllOf(EventNamed("gl-cpp.read"), - SpanEventAttributesAre( - OTelAttribute( - "message.starting_offset", 123), - OTelAttribute(sc::kThreadId, _), - OTelAttribute("rpc.message.id", 1), - // THIS WAS THE MISSING ATTRIBUTE: - OTelAttribute("rpc.message.type", - "RECEIVED"))))))); + spans, + ElementsAre(AllOf( + SpanNamed("test-span"), + SpanWithStatus(opentelemetry::trace::StatusCode::kOk), + SpanHasInstrumentationScope(), SpanKindIsClient(), + SpanEventsAre( + AllOf(EventNamed("gl-cpp.open.read"), + SpanEventAttributesAre( + OTelAttribute("read-length", 0), + OTelAttribute("read-start", 0), + OTelAttribute(sc::thread::kThreadId, _))), + AllOf(EventNamed("gl-cpp.read"), + SpanEventAttributesAre( + OTelAttribute("message.starting_offset", + 123), + OTelAttribute(sc::thread::kThreadId, _), + OTelAttribute("rpc.message.id", 1), + // THIS WAS THE MISSING ATTRIBUTE: + OTelAttribute("rpc.message.type", + "RECEIVED"))))))); } } // namespace @@ -152,5 +152,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storage_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/storage/internal/async/object_descriptor_impl.cc b/google/cloud/storage/internal/async/object_descriptor_impl.cc index 6509bcba1b0aa..c4ab3e28c9a43 100644 --- a/google/cloud/storage/internal/async/object_descriptor_impl.cc +++ b/google/cloud/storage/internal/async/object_descriptor_impl.cc @@ -21,7 +21,7 @@ #include "google/cloud/storage/internal/hash_function_impl.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/internal/opentelemetry.h" -#include +#include "google/rpc/status.pb.h" #include #include diff --git a/google/cloud/storage/internal/async/object_descriptor_impl.h b/google/cloud/storage/internal/async/object_descriptor_impl.h index 6c3a8fad42cdd..f7f8a0d55a285 100644 --- a/google/cloud/storage/internal/async/object_descriptor_impl.h +++ b/google/cloud/storage/internal/async/object_descriptor_impl.h @@ -25,7 +25,7 @@ #include "google/cloud/status.h" #include "google/cloud/version.h" #include "absl/types/optional.h" -#include +#include "google/storage/v2/storage.pb.h" #include #include #include diff --git a/google/cloud/storage/internal/async/object_descriptor_impl_test.cc b/google/cloud/storage/internal/async/object_descriptor_impl_test.cc index ce1a7884aeef8..96c998b51c1eb 100644 --- a/google/cloud/storage/internal/async/object_descriptor_impl_test.cc +++ b/google/cloud/storage/internal/async/object_descriptor_impl_test.cc @@ -24,9 +24,9 @@ #include "google/cloud/testing_util/is_proto_equal.h" #include "google/cloud/testing_util/status_matchers.h" #include "absl/strings/string_view.h" +#include "google/storage/v2/storage.pb.h" #include #include -#include #include #include diff --git a/google/cloud/storage/internal/async/object_descriptor_reader_tracing.cc b/google/cloud/storage/internal/async/object_descriptor_reader_tracing.cc index e1b8eae09e40a..8b95c508c3360 100644 --- a/google/cloud/storage/internal/async/object_descriptor_reader_tracing.cc +++ b/google/cloud/storage/internal/async/object_descriptor_reader_tracing.cc @@ -17,9 +17,7 @@ #include "google/cloud/storage/internal/async/object_descriptor_reader.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/version.h" -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY -#include -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY +#include #include namespace google { @@ -27,11 +25,9 @@ namespace cloud { namespace storage_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - namespace { -namespace sc = ::opentelemetry::trace::SemanticConventions; +namespace sc = ::opentelemetry::semconv; class ObjectDescriptorReaderTracing : public ObjectDescriptorReader { public: @@ -55,13 +51,13 @@ class ObjectDescriptorReaderTracing : public ObjectDescriptorReader { span->AddEvent( "gl-cpp.read-range", {{/*sc::kRpcMessageType=*/"rpc.message.type", "RECEIVED"}, - {sc::kThreadId, internal::CurrentThreadId()}, + {sc::thread::kThreadId, internal::CurrentThreadId()}, {"message.size", static_cast(payload.size())}}); } else { span->AddEvent( "gl-cpp.read-range", {{/*sc::kRpcMessageType=*/"rpc.message.type", "RECEIVED"}, - {sc::kThreadId, internal::CurrentThreadId()}}); + {sc::thread::kThreadId, internal::CurrentThreadId()}}); return internal::EndSpan(*span, absl::get(std::move(result))); } @@ -77,15 +73,6 @@ MakeTracingObjectDescriptorReader(std::shared_ptr impl) { return std::make_unique(std::move(impl)); } -#else // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - -std::unique_ptr -MakeTracingObjectDescriptorReader(std::shared_ptr impl) { - return std::make_unique(std::move(impl)); -} - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storage_internal } // namespace cloud diff --git a/google/cloud/storage/internal/async/object_descriptor_reader_tracing_test.cc b/google/cloud/storage/internal/async/object_descriptor_reader_tracing_test.cc index c82015c8bf8e6..5b759637e3596 100644 --- a/google/cloud/storage/internal/async/object_descriptor_reader_tracing_test.cc +++ b/google/cloud/storage/internal/async/object_descriptor_reader_tracing_test.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/storage/internal/async/object_descriptor_reader_tracing.h" #include "google/cloud/storage/testing/canonical_errors.h" #include "google/cloud/opentelemetry_options.h" @@ -22,7 +20,7 @@ #include #include #include -#include +#include namespace google { namespace cloud { @@ -41,7 +39,7 @@ using ::google::cloud::testing_util::SpanNamed; using ::google::protobuf::TextFormat; using ::testing::_; -namespace sc = ::opentelemetry::trace::SemanticConventions; +namespace sc = ::opentelemetry::semconv; TEST(ObjectDescriptorReaderTracing, Read) { auto span_catcher = InstallSpanCatcher(); @@ -60,16 +58,16 @@ TEST(ObjectDescriptorReaderTracing, Read) { auto actual = reader->Read().get(); auto spans = span_catcher->GetSpans(); - EXPECT_THAT( - spans, ElementsAre( - AllOf(SpanNamed("storage::AsyncConnection::ReadRange"), - SpanHasEvents(AllOf( - EventNamed("gl-cpp.read-range"), - SpanEventAttributesAre( - OTelAttribute("message.size", 10), - OTelAttribute(sc::kThreadId, _), - OTelAttribute("rpc.message.type", - "RECEIVED"))))))); + EXPECT_THAT(spans, + ElementsAre(AllOf( + SpanNamed("storage::AsyncConnection::ReadRange"), + SpanHasEvents(AllOf( + EventNamed("gl-cpp.read-range"), + SpanEventAttributesAre( + OTelAttribute("message.size", 10), + OTelAttribute(sc::thread::kThreadId, _), + OTelAttribute("rpc.message.type", + "RECEIVED"))))))); } TEST(ObjectDescriptorReaderTracing, ReadError) { @@ -81,17 +79,17 @@ TEST(ObjectDescriptorReaderTracing, ReadError) { auto actual = reader->Read().get(); auto spans = span_catcher->GetSpans(); - EXPECT_THAT( - spans, - ElementsAre(AllOf( - SpanNamed("storage::AsyncConnection::ReadRange"), - SpanHasAttributes( - OTelAttribute("gl-cpp.status_code", "NOT_FOUND")), - SpanHasEvents(AllOf(EventNamed("gl-cpp.read-range"), - SpanEventAttributesAre( - OTelAttribute(sc::kThreadId, _), - OTelAttribute("rpc.message.type", - "RECEIVED"))))))); + EXPECT_THAT(spans, + ElementsAre(AllOf( + SpanNamed("storage::AsyncConnection::ReadRange"), + SpanHasAttributes(OTelAttribute( + "gl-cpp.status_code", "NOT_FOUND")), + SpanHasEvents(AllOf( + EventNamed("gl-cpp.read-range"), + SpanEventAttributesAre( + OTelAttribute(sc::thread::kThreadId, _), + OTelAttribute("rpc.message.type", + "RECEIVED"))))))); } } // namespace @@ -99,5 +97,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storage_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/storage/internal/async/open_object.cc b/google/cloud/storage/internal/async/open_object.cc index e112d2376b1ed..f8465b92055a4 100644 --- a/google/cloud/storage/internal/async/open_object.cc +++ b/google/cloud/storage/internal/async/open_object.cc @@ -13,8 +13,8 @@ // limitations under the License. #include "google/cloud/storage/internal/async/open_object.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/make_status.h" +#include "absl/strings/str_cat.h" #include namespace google { diff --git a/google/cloud/storage/internal/async/open_object.h b/google/cloud/storage/internal/async/open_object.h index a3e4c4b6972b6..6398778622da1 100644 --- a/google/cloud/storage/internal/async/open_object.h +++ b/google/cloud/storage/internal/async/open_object.h @@ -23,7 +23,7 @@ #include "google/cloud/status.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/storage/v2/storage.pb.h" #include #include #include diff --git a/google/cloud/storage/internal/async/open_stream.h b/google/cloud/storage/internal/async/open_stream.h index bea42960f1336..c0922781b83a2 100644 --- a/google/cloud/storage/internal/async/open_stream.h +++ b/google/cloud/storage/internal/async/open_stream.h @@ -21,7 +21,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/version.h" #include "absl/types/optional.h" -#include +#include "google/storage/v2/storage.pb.h" #include #include #include diff --git a/google/cloud/storage/internal/async/open_stream_test.cc b/google/cloud/storage/internal/async/open_stream_test.cc index eade037781006..1848992311ef1 100644 --- a/google/cloud/storage/internal/async/open_stream_test.cc +++ b/google/cloud/storage/internal/async/open_stream_test.cc @@ -17,7 +17,7 @@ #include "google/cloud/internal/make_status.h" #include "google/cloud/testing_util/async_sequencer.h" #include "google/cloud/testing_util/status_matchers.h" -#include +#include "google/storage/v2/storage.pb.h" #include namespace google { diff --git a/google/cloud/storage/internal/async/partial_upload.h b/google/cloud/storage/internal/async/partial_upload.h index f15ae1bb83526..bf4a7be3b2bf4 100644 --- a/google/cloud/storage/internal/async/partial_upload.h +++ b/google/cloud/storage/internal/async/partial_upload.h @@ -21,7 +21,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/version.h" #include "absl/strings/cord.h" -#include +#include "google/storage/v2/storage.pb.h" #include namespace google { diff --git a/google/cloud/storage/internal/async/read_payload_impl_test.cc b/google/cloud/storage/internal/async/read_payload_impl_test.cc index 80a29c934de5d..e206e2185abd0 100644 --- a/google/cloud/storage/internal/async/read_payload_impl_test.cc +++ b/google/cloud/storage/internal/async/read_payload_impl_test.cc @@ -15,7 +15,7 @@ #include "google/cloud/storage/internal/async/read_payload_impl.h" #include "google/cloud/testing_util/is_proto_equal.h" #include "absl/strings/string_view.h" -#include +#include "google/storage/v2/storage.pb.h" #include namespace google { diff --git a/google/cloud/storage/internal/async/read_range.h b/google/cloud/storage/internal/async/read_range.h index fd808ef96a29b..79cde0d5add38 100644 --- a/google/cloud/storage/internal/async/read_range.h +++ b/google/cloud/storage/internal/async/read_range.h @@ -21,7 +21,7 @@ #include "google/cloud/status.h" #include "google/cloud/version.h" #include "absl/types/optional.h" -#include +#include "google/storage/v2/storage.pb.h" #include #include #include diff --git a/google/cloud/storage/internal/async/reader_connection_factory.h b/google/cloud/storage/internal/async/reader_connection_factory.h index 2d6b9d69f5e99..eabb03d1afe00 100644 --- a/google/cloud/storage/internal/async/reader_connection_factory.h +++ b/google/cloud/storage/internal/async/reader_connection_factory.h @@ -20,7 +20,7 @@ #include "google/cloud/future.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/storage/v2/storage.pb.h" #include #include #include diff --git a/google/cloud/storage/internal/async/reader_connection_factory_test.cc b/google/cloud/storage/internal/async/reader_connection_factory_test.cc index ca055e0332251..53b0bbabd8fe6 100644 --- a/google/cloud/storage/internal/async/reader_connection_factory_test.cc +++ b/google/cloud/storage/internal/async/reader_connection_factory_test.cc @@ -14,8 +14,8 @@ #include "google/cloud/storage/internal/async/reader_connection_factory.h" #include "google/cloud/testing_util/is_proto_equal.h" +#include "google/storage/v2/storage.pb.h" #include -#include #include namespace google { diff --git a/google/cloud/storage/internal/async/reader_connection_impl.h b/google/cloud/storage/internal/async/reader_connection_impl.h index fc5d7d866e408..522b479fb4d71 100644 --- a/google/cloud/storage/internal/async/reader_connection_impl.h +++ b/google/cloud/storage/internal/async/reader_connection_impl.h @@ -21,7 +21,7 @@ #include "google/cloud/options.h" #include "google/cloud/version.h" #include "absl/types/optional.h" -#include +#include "google/storage/v2/storage.pb.h" #include #include #include diff --git a/google/cloud/storage/internal/async/reader_connection_resume.cc b/google/cloud/storage/internal/async/reader_connection_resume.cc index 6ffb491d4b897..8d7bd62e5c058 100644 --- a/google/cloud/storage/internal/async/reader_connection_resume.cc +++ b/google/cloud/storage/internal/async/reader_connection_resume.cc @@ -14,8 +14,8 @@ #include "google/cloud/storage/internal/async/reader_connection_resume.h" #include "google/cloud/storage/internal/async/read_payload_impl.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/make_status.h" +#include "absl/strings/str_cat.h" namespace google { namespace cloud { diff --git a/google/cloud/storage/internal/async/reader_connection_resume.h b/google/cloud/storage/internal/async/reader_connection_resume.h index 3d70585de5e41..3b91f52362d55 100644 --- a/google/cloud/storage/internal/async/reader_connection_resume.h +++ b/google/cloud/storage/internal/async/reader_connection_resume.h @@ -25,7 +25,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/version.h" #include "absl/types/optional.h" -#include +#include "google/storage/v2/storage.pb.h" #include #include #include diff --git a/google/cloud/storage/internal/async/reader_connection_tracing.cc b/google/cloud/storage/internal/async/reader_connection_tracing.cc index 7fca064d8ead9..eef65f7bb7208 100644 --- a/google/cloud/storage/internal/async/reader_connection_tracing.cc +++ b/google/cloud/storage/internal/async/reader_connection_tracing.cc @@ -13,10 +13,8 @@ // limitations under the License. #include "google/cloud/storage/internal/async/reader_connection_tracing.h" - -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/internal/opentelemetry.h" -#include +#include #include #include #include @@ -27,7 +25,7 @@ namespace storage_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN namespace { -namespace sc = ::opentelemetry::trace::SemanticConventions; +namespace sc = ::opentelemetry::semconv; class AsyncReaderConnectionTracing : public storage::AsyncReaderConnection { public: @@ -40,7 +38,7 @@ class AsyncReaderConnectionTracing : public storage::AsyncReaderConnection { auto scope = opentelemetry::trace::Scope(span_); span_->AddEvent("gl-cpp.cancel", { - {sc::kThreadId, internal::CurrentThreadId()}, + {sc::thread::kThreadId, internal::CurrentThreadId()}, }); return impl_->Cancel(); } @@ -56,7 +54,7 @@ class AsyncReaderConnectionTracing : public storage::AsyncReaderConnection { { {/*sc::kRpcMessageType=*/"rpc.message.type", "RECEIVED"}, {/*sc::kRpcMessageId=*/"rpc.message.id", count}, - {sc::kThreadId, internal::CurrentThreadId()}, + {sc::thread::kThreadId, internal::CurrentThreadId()}, }); return internal::EndSpan(*span, absl::get(std::move(r))); } @@ -66,7 +64,7 @@ class AsyncReaderConnectionTracing : public storage::AsyncReaderConnection { { {/*sc::kRpcMessageType=*/"rpc.message.type", "RECEIVED"}, {/*sc::kRpcMessageId=*/"rpc.message.id", count}, - {sc::kThreadId, internal::CurrentThreadId()}, + {sc::thread::kThreadId, internal::CurrentThreadId()}, {"message.starting_offset", payload.offset()}, }); return r; @@ -102,5 +100,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storage_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/storage/internal/async/reader_connection_tracing.h b/google/cloud/storage/internal/async/reader_connection_tracing.h index ce986bf5feef9..d0f8799dfd83e 100644 --- a/google/cloud/storage/internal/async/reader_connection_tracing.h +++ b/google/cloud/storage/internal/async/reader_connection_tracing.h @@ -15,8 +15,6 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_ASYNC_READER_CONNECTION_TRACING_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_ASYNC_READER_CONNECTION_TRACING_H -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/storage/async/reader_connection.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/options.h" @@ -37,6 +35,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_ASYNC_READER_CONNECTION_TRACING_H diff --git a/google/cloud/storage/internal/async/reader_connection_tracing_test.cc b/google/cloud/storage/internal/async/reader_connection_tracing_test.cc index b8710e8d654e4..9c5abdc4bf703 100644 --- a/google/cloud/storage/internal/async/reader_connection_tracing_test.cc +++ b/google/cloud/storage/internal/async/reader_connection_tracing_test.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/storage/internal/async/reader_connection_tracing.h" #include "google/cloud/storage/mocks/mock_async_reader_connection.h" #include "google/cloud/storage/testing/canonical_errors.h" @@ -21,7 +19,7 @@ #include "google/cloud/opentelemetry_options.h" #include "google/cloud/testing_util/opentelemetry_matchers.h" #include -#include +#include #include namespace google { @@ -71,7 +69,7 @@ auto expect_no_context = [](auto f) { }; TEST(ReaderConnectionTracing, WithError) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); PromiseWithOTelContext p1; PromiseWithOTelContext p2; @@ -112,7 +110,7 @@ TEST(ReaderConnectionTracing, WithError) { /*sc::kRpcMessageType=*/"rpc.message.type", "RECEIVED"), OTelAttribute("message.starting_offset", 0), - OTelAttribute(sc::kThreadId, _))), + OTelAttribute(sc::thread::kThreadId, _))), AllOf(EventNamed("gl-cpp.read"), SpanEventAttributesAre( OTelAttribute( @@ -120,11 +118,12 @@ TEST(ReaderConnectionTracing, WithError) { OTelAttribute( /*sc::kRpcMessageType=*/"rpc.message.type", "RECEIVED"), - OTelAttribute(sc::kThreadId, _))))))); + OTelAttribute(sc::thread::kThreadId, + _))))))); } TEST(ReaderConnectionTracing, WithSuccess) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); PromiseWithOTelContext p1; PromiseWithOTelContext p2; @@ -170,7 +169,7 @@ TEST(ReaderConnectionTracing, WithSuccess) { /*sc::kRpcMessageType=*/"rpc.message.type", "RECEIVED"), OTelAttribute("message.starting_offset", 0), - OTelAttribute(sc::kThreadId, _))), + OTelAttribute(sc::thread::kThreadId, _))), AllOf(EventNamed("gl-cpp.read"), SpanEventAttributesAre( OTelAttribute( @@ -180,7 +179,7 @@ TEST(ReaderConnectionTracing, WithSuccess) { "RECEIVED"), OTelAttribute("message.starting_offset", 1024), - OTelAttribute(sc::kThreadId, _))), + OTelAttribute(sc::thread::kThreadId, _))), AllOf(EventNamed("gl-cpp.read"), SpanEventAttributesAre( OTelAttribute( @@ -188,7 +187,8 @@ TEST(ReaderConnectionTracing, WithSuccess) { OTelAttribute( /*sc::kRpcMessageType=*/"rpc.message.type", "RECEIVED"), - OTelAttribute(sc::kThreadId, _))))))); + OTelAttribute(sc::thread::kThreadId, + _))))))); auto const metadata = actual->GetRequestMetadata(); EXPECT_THAT(metadata.headers, @@ -202,5 +202,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storage_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/storage/internal/async/rewriter_connection_impl.h b/google/cloud/storage/internal/async/rewriter_connection_impl.h index d27f388e6b56a..06c52e85a6d04 100644 --- a/google/cloud/storage/internal/async/rewriter_connection_impl.h +++ b/google/cloud/storage/internal/async/rewriter_connection_impl.h @@ -17,12 +17,12 @@ #include "google/cloud/storage/async/rewriter_connection.h" #include "google/cloud/storage/internal/storage_stub.h" +#include "google/cloud/storage/options.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" -#include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/storage/v2/storage.pb.h" #include namespace google { diff --git a/google/cloud/storage/internal/async/rewriter_connection_tracing.cc b/google/cloud/storage/internal/async/rewriter_connection_tracing.cc index cd84526b33509..be91d0038961d 100644 --- a/google/cloud/storage/internal/async/rewriter_connection_tracing.cc +++ b/google/cloud/storage/internal/async/rewriter_connection_tracing.cc @@ -21,8 +21,6 @@ namespace cloud { namespace storage_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - namespace { using google::cloud::internal::EndSpan; @@ -74,16 +72,6 @@ MakeTracingAsyncRewriterConnection( std::move(span)); } -#else - -std::shared_ptr -MakeTracingAsyncRewriterConnection( - std::shared_ptr impl, bool /*enabled*/) { - return impl; -} - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storage_internal } // namespace cloud diff --git a/google/cloud/storage/internal/async/rewriter_connection_tracing_test.cc b/google/cloud/storage/internal/async/rewriter_connection_tracing_test.cc index 064af5ed4d1fb..417eabf621e71 100644 --- a/google/cloud/storage/internal/async/rewriter_connection_tracing_test.cc +++ b/google/cloud/storage/internal/async/rewriter_connection_tracing_test.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/storage/internal/async/rewriter_connection_tracing.h" #include "google/cloud/storage/mocks/mock_async_rewriter_connection.h" #include "google/cloud/storage/testing/canonical_errors.h" @@ -23,7 +21,6 @@ #include "google/cloud/testing_util/opentelemetry_matchers.h" #include "google/cloud/testing_util/status_matchers.h" #include -#include #include namespace google { @@ -158,5 +155,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storage_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/storage/internal/async/write_object.cc b/google/cloud/storage/internal/async/write_object.cc index 065a4384dcd09..e246425d0871f 100644 --- a/google/cloud/storage/internal/async/write_object.cc +++ b/google/cloud/storage/internal/async/write_object.cc @@ -13,8 +13,8 @@ // limitations under the License. #include "google/cloud/storage/internal/async/write_object.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/make_status.h" +#include "absl/strings/str_cat.h" #include namespace google { diff --git a/google/cloud/storage/internal/async/write_object.h b/google/cloud/storage/internal/async/write_object.h index 4f7d3f51c1870..4131c8d0db1cb 100644 --- a/google/cloud/storage/internal/async/write_object.h +++ b/google/cloud/storage/internal/async/write_object.h @@ -22,7 +22,7 @@ #include "google/cloud/status.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/storage/v2/storage.pb.h" #include #include #include diff --git a/google/cloud/storage/internal/async/write_payload_impl_test.cc b/google/cloud/storage/internal/async/write_payload_impl_test.cc index 6ae255f66787b..5198dc9037eb4 100644 --- a/google/cloud/storage/internal/async/write_payload_impl_test.cc +++ b/google/cloud/storage/internal/async/write_payload_impl_test.cc @@ -13,8 +13,8 @@ // limitations under the License. #include "google/cloud/storage/internal/async/write_payload_impl.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/random.h" +#include "absl/strings/str_join.h" #include namespace google { diff --git a/google/cloud/storage/internal/async/writer_connection_impl.h b/google/cloud/storage/internal/async/writer_connection_impl.h index 7189f0f37df96..46e505c20b827 100644 --- a/google/cloud/storage/internal/async/writer_connection_impl.h +++ b/google/cloud/storage/internal/async/writer_connection_impl.h @@ -20,7 +20,7 @@ #include "google/cloud/async_streaming_read_write_rpc.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/storage/v2/storage.pb.h" #include #include #include diff --git a/google/cloud/storage/internal/async/writer_connection_resumed_test.cc b/google/cloud/storage/internal/async/writer_connection_resumed_test.cc index 68a8b12e0cc14..c274b683c4287 100644 --- a/google/cloud/storage/internal/async/writer_connection_resumed_test.cc +++ b/google/cloud/storage/internal/async/writer_connection_resumed_test.cc @@ -20,7 +20,7 @@ #include "google/cloud/testing_util/async_sequencer.h" #include "google/cloud/testing_util/is_proto_equal.h" #include "google/cloud/testing_util/status_matchers.h" -#include +#include "google/storage/v2/storage.pb.h" #include #include #include diff --git a/google/cloud/storage/internal/async/writer_connection_tracing.cc b/google/cloud/storage/internal/async/writer_connection_tracing.cc index 4c9ecaffeea80..a2cd9f514f1dd 100644 --- a/google/cloud/storage/internal/async/writer_connection_tracing.cc +++ b/google/cloud/storage/internal/async/writer_connection_tracing.cc @@ -12,10 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/storage/internal/async/writer_connection_tracing.h" #include "google/cloud/internal/opentelemetry.h" -#include +#include #include #include #include @@ -26,7 +25,7 @@ namespace storage_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN namespace { -namespace sc = ::opentelemetry::trace::SemanticConventions; +namespace sc = ::opentelemetry::semconv; class AsyncWriterConnectionTracing : public storage::AsyncWriterConnection { public: @@ -39,7 +38,7 @@ class AsyncWriterConnectionTracing : public storage::AsyncWriterConnection { auto scope = opentelemetry::trace::Scope(span_); span_->AddEvent("gl-cpp.cancel", { - {sc::kThreadId, internal::CurrentThreadId()}, + {sc::thread::kThreadId, internal::CurrentThreadId()}, }); return impl_->Cancel(); } @@ -71,7 +70,7 @@ class AsyncWriterConnectionTracing : public storage::AsyncWriterConnection { { {/*sc::kRpcMessageType=*/"rpc.message.type", "SENT"}, {/*sc::kRpcMessageId=*/"rpc.message.id", count}, - {sc::kThreadId, internal::CurrentThreadId()}, + {sc::thread::kThreadId, internal::CurrentThreadId()}, {"gl-cpp.size", size}, }); auto status = f.get(); @@ -91,7 +90,7 @@ class AsyncWriterConnectionTracing : public storage::AsyncWriterConnection { { {/*sc::kRpcMessageType=*/"rpc.message.type", "SENT"}, {/*sc::kRpcMessageId=*/"rpc.message.id", count}, - {sc::kThreadId, internal::CurrentThreadId()}, + {sc::thread::kThreadId, internal::CurrentThreadId()}, {"gl-cpp.size", size}, }); return internal::EndSpan(*span, f.get()); @@ -108,7 +107,7 @@ class AsyncWriterConnectionTracing : public storage::AsyncWriterConnection { { {/*sc::kRpcMessageType=*/"rpc.message.type", "SENT"}, {/*sc::kRpcMessageId=*/"rpc.message.id", count}, - {sc::kThreadId, internal::CurrentThreadId()}, + {sc::thread::kThreadId, internal::CurrentThreadId()}, {"gl-cpp.size", size}, }); auto status = f.get(); @@ -125,7 +124,7 @@ class AsyncWriterConnectionTracing : public storage::AsyncWriterConnection { { {/*sc::kRpcMessageType=*/"rpc.message.type", "RECEIVE"}, {/*sc::kRpcMessageId=*/"rpc.message.id", count}, - {sc::kThreadId, internal::CurrentThreadId()}, + {sc::thread::kThreadId, internal::CurrentThreadId()}, }); auto response = f.get(); if (!response) return internal::EndSpan(*span, std::move(response)); @@ -157,5 +156,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storage_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/storage/internal/async/writer_connection_tracing.h b/google/cloud/storage/internal/async/writer_connection_tracing.h index e8a6ccb8fa993..102bafe3e3274 100644 --- a/google/cloud/storage/internal/async/writer_connection_tracing.h +++ b/google/cloud/storage/internal/async/writer_connection_tracing.h @@ -15,8 +15,6 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_ASYNC_WRITER_CONNECTION_TRACING_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_ASYNC_WRITER_CONNECTION_TRACING_H -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/storage/async/writer_connection.h" #include "google/cloud/version.h" #include @@ -37,6 +35,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_ASYNC_WRITER_CONNECTION_TRACING_H diff --git a/google/cloud/storage/internal/async/writer_connection_tracing_test.cc b/google/cloud/storage/internal/async/writer_connection_tracing_test.cc index 4e46b11a1b86f..46c5dd1caf736 100644 --- a/google/cloud/storage/internal/async/writer_connection_tracing_test.cc +++ b/google/cloud/storage/internal/async/writer_connection_tracing_test.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/storage/internal/async/writer_connection_tracing.h" #include "google/cloud/storage/mocks/mock_async_writer_connection.h" #include "google/cloud/storage/testing/canonical_errors.h" @@ -22,7 +20,7 @@ #include "google/cloud/testing_util/opentelemetry_matchers.h" #include "google/cloud/testing_util/status_matchers.h" #include -#include +#include #include namespace google { @@ -53,12 +51,12 @@ using ::testing::UnorderedElementsAre; using ::testing::VariantWith; auto ExpectSent(std::int64_t id, std::uint64_t size) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; return SpanEventAttributesAre( OTelAttribute(/*sc::kRpcMessageType=*/"rpc.message.type", "SENT"), OTelAttribute(/*sc::kRpcMessageId=*/"rpc.message.id", id), - OTelAttribute(sc::kThreadId, _), + OTelAttribute(sc::thread::kThreadId, _), OTelAttribute("gl-cpp.size", size)); } @@ -71,14 +69,14 @@ auto ExpectFlush(std::int64_t id, std::uint64_t size) { } auto ExpectQuery(std::int64_t id) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; return AllOf(EventNamed("gl-cpp.query"), SpanEventAttributesAre( OTelAttribute( /*sc::kRpcMessageType=*/"rpc.message.type", "RECEIVE"), OTelAttribute( /*sc::kRpcMessageId=*/"rpc.message.id", id), - OTelAttribute(sc::kThreadId, _))); + OTelAttribute(sc::thread::kThreadId, _))); } TEST(WriterConnectionTracing, FullCycle) { @@ -224,7 +222,7 @@ TEST(WriterConnectionTracing, QueryError) { } TEST(WriterConnectionTracing, Cancel) { - namespace sc = ::opentelemetry::trace::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto span_catcher = InstallSpanCatcher(); auto mock = std::make_unique(); @@ -247,7 +245,7 @@ TEST(WriterConnectionTracing, Cancel) { SpanHasInstrumentationScope(), SpanKindIsClient(), SpanHasEvents(AllOf(EventNamed("gl-cpp.cancel"), SpanEventAttributesAre(OTelAttribute( - sc::kThreadId, _))))))); + sc::thread::kThreadId, _))))))); } } // namespace @@ -255,5 +253,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storage_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/storage/internal/bucket_access_control_parser.cc b/google/cloud/storage/internal/bucket_access_control_parser.cc index 5a7d4161880e2..d03fde1f23579 100644 --- a/google/cloud/storage/internal/bucket_access_control_parser.cc +++ b/google/cloud/storage/internal/bucket_access_control_parser.cc @@ -13,7 +13,6 @@ // limitations under the License. #include "google/cloud/storage/internal/bucket_access_control_parser.h" -#include "google/cloud/storage/internal/access_control_common_parser.h" #include "google/cloud/storage/internal/metadata_parser.h" #include #include diff --git a/google/cloud/storage/internal/bucket_acl_requests.cc b/google/cloud/storage/internal/bucket_acl_requests.cc index 64e86b9068f05..c9a30931b956c 100644 --- a/google/cloud/storage/internal/bucket_acl_requests.cc +++ b/google/cloud/storage/internal/bucket_acl_requests.cc @@ -15,7 +15,7 @@ #include "google/cloud/storage/internal/bucket_acl_requests.h" #include "google/cloud/storage/internal/bucket_access_control_parser.h" #include "google/cloud/storage/internal/metadata_parser.h" -#include "google/cloud/internal/absl_str_join_quiet.h" +#include "absl/strings/str_join.h" #include #include #include diff --git a/google/cloud/storage/internal/bucket_requests.cc b/google/cloud/storage/internal/bucket_requests.cc index 9b1bab4c8f843..8c0075d5c15e5 100644 --- a/google/cloud/storage/internal/bucket_requests.cc +++ b/google/cloud/storage/internal/bucket_requests.cc @@ -16,8 +16,8 @@ #include "google/cloud/storage/internal/bucket_acl_requests.h" #include "google/cloud/storage/internal/bucket_metadata_parser.h" #include "google/cloud/storage/internal/metadata_parser.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/format_time_point.h" +#include "absl/strings/str_join.h" #include #include #include diff --git a/google/cloud/storage/internal/common_metadata.h b/google/cloud/storage/internal/common_metadata.h deleted file mode 100644 index d13daef446c7a..0000000000000 --- a/google/cloud/storage/internal/common_metadata.h +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_COMMON_METADATA_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_COMMON_METADATA_H - -#include "google/cloud/storage/owner.h" -#include "google/cloud/storage/version.h" -#include "google/cloud/status_or.h" -#include "absl/types/optional.h" -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace internal { - -/** - * Defines common attributes to both `BucketMetadata` and `ObjectMetadata`. - * - * @tparam Derived a class derived from CommonMetadata. This class uses - * the Curiously recurring template pattern. - * - * @see https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern - */ -// TODO(#9897) - remove this class and any references to it -template -class GOOGLE_CLOUD_CPP_DEPRECATED( - "This class will be removed shortly after 2023-06-01") CommonMetadata { - public: - CommonMetadata() = default; - - std::string const& etag() const { return etag_; } - std::string const& id() const { return id_; } - std::string const& kind() const { return kind_; } - std::int64_t metageneration() const { return metageneration_; } - - std::string const& name() const { return name_; } - void set_name(std::string value) { name_ = std::move(value); } - - bool has_owner() const { return owner_.has_value(); } - Owner const& owner() const { return owner_.value(); } - - std::string const& self_link() const { return self_link_; } - - std::string const& storage_class() const { return storage_class_; } - void set_storage_class(std::string value) { - storage_class_ = std::move(value); - } - - std::chrono::system_clock::time_point time_created() const { - return time_created_; - } - std::chrono::system_clock::time_point updated() const { return updated_; } - - private: - template - friend struct CommonMetadataParser; - - // Keep the fields in alphabetical order. - std::string etag_; - std::string id_; - std::string kind_; - std::int64_t metageneration_{0}; - std::string name_; - absl::optional owner_; - std::string self_link_; - std::string storage_class_; - std::chrono::system_clock::time_point time_created_; - std::chrono::system_clock::time_point updated_; -}; - -template -GOOGLE_CLOUD_CPP_DEPRECATED( - "This function will be removed shortly after 2023-06-01") -inline bool -operator==(CommonMetadata const& lhs, CommonMetadata const& rhs) { - // etag changes each time the metadata changes, so that is the best field - // to short-circuit this comparison. The check the name, project number, - // and metadata generation, which have the next best chance to - // short-circuit. The rest just put in alphabetical order. - return lhs.name() == rhs.name() && - lhs.metageneration() == rhs.metageneration() && lhs.id() == rhs.id() && - lhs.etag() == rhs.etag() && lhs.kind() == rhs.kind() && - lhs.self_link() == rhs.self_link() && - lhs.storage_class() == rhs.storage_class() && - lhs.time_created() == rhs.time_created() && - lhs.updated() == rhs.updated() && lhs.has_owner() == rhs.has_owner() && - (!lhs.has_owner() || lhs.owner() == rhs.owner()); -} - -template -GOOGLE_CLOUD_CPP_DEPRECATED( - "This function will be removed shortly after 2023-06-01") -inline bool -operator!=(CommonMetadata const& lhs, CommonMetadata const& rhs) { - return std::rel_ops::operator!=(lhs, rhs); -} - -} // namespace internal -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_COMMON_METADATA_H diff --git a/google/cloud/storage/internal/common_metadata_parser.h b/google/cloud/storage/internal/common_metadata_parser.h deleted file mode 100644 index 8357ed5c4162f..0000000000000 --- a/google/cloud/storage/internal/common_metadata_parser.h +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_COMMON_METADATA_PARSER_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_COMMON_METADATA_PARSER_H - -#include "google/cloud/storage/internal/common_metadata.h" -#include "google/cloud/storage/internal/metadata_parser.h" -#include "google/cloud/status.h" -#include -#include -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace internal { -// TODO(#9897) - remove this class and any references to it -template -struct GOOGLE_CLOUD_CPP_DEPRECATED( - "This class will be removed shortly after 2023-06-01") - CommonMetadataParser { - static Status FromJson(CommonMetadata& result, - nlohmann::json const& json) { - if (!json.is_object()) return NotJsonObject(json, GCP_ERROR_INFO()); - result.etag_ = json.value("etag", ""); - result.id_ = json.value("id", ""); - result.kind_ = json.value("kind", ""); - auto metageneration = ParseLongField(json, "metageneration"); - if (!metageneration) return std::move(metageneration).status(); - result.metageneration_ = *metageneration; - result.name_ = json.value("name", ""); - if (json.count("owner") != 0) { - Owner o; - o.entity = json["owner"].value("entity", ""); - o.entity_id = json["owner"].value("entityId", ""); - result.owner_ = std::move(o); - } - result.self_link_ = json.value("selfLink", ""); - result.storage_class_ = json.value("storageClass", ""); - auto time_created = ParseTimestampField(json, "timeCreated"); - if (!time_created) return std::move(time_created).status(); - result.time_created_ = *time_created; - auto updated = ParseTimestampField(json, "updated"); - if (!updated) return std::move(updated).status(); - result.updated_ = *updated; - return Status(); - } - static StatusOr> FromString( - std::string const& payload) { - auto json = nlohmann::json::parse(payload); - return FromJson(json); - } -}; - -} // namespace internal -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_COMMON_METADATA_PARSER_H diff --git a/google/cloud/storage/internal/connection_impl.cc b/google/cloud/storage/internal/connection_impl.cc index e86236b7942ab..6078d137b10d8 100644 --- a/google/cloud/storage/internal/connection_impl.cc +++ b/google/cloud/storage/internal/connection_impl.cc @@ -154,12 +154,7 @@ std::shared_ptr StorageConnectionImpl::Create( StorageConnectionImpl::StorageConnectionImpl( std::unique_ptr stub, Options options) : stub_(std::move(stub)), - options_(MergeOptions(std::move(options), stub_->options())), - client_options_(MakeBackwardsCompatibleClientOptions(options_)) {} - -ClientOptions const& StorageConnectionImpl::client_options() const { - return client_options_; -} + options_(MergeOptions(std::move(options), stub_->options())) {} Options StorageConnectionImpl::options() const { return options_; } diff --git a/google/cloud/storage/internal/connection_impl.h b/google/cloud/storage/internal/connection_impl.h index 43bc8795f479d..b487aa6fd6efa 100644 --- a/google/cloud/storage/internal/connection_impl.h +++ b/google/cloud/storage/internal/connection_impl.h @@ -44,7 +44,6 @@ class StorageConnectionImpl ~StorageConnectionImpl() override = default; - ClientOptions const& client_options() const override; Options options() const override; StatusOr ListBuckets( @@ -188,7 +187,6 @@ class StorageConnectionImpl std::unique_ptr stub_; Options options_; - ClientOptions client_options_; // For backwards compatibility google::cloud::internal::InvocationIdGenerator invocation_id_generator_; }; diff --git a/google/cloud/storage/internal/connection_impl_test.cc b/google/cloud/storage/internal/connection_impl_test.cc index 4de482b5ebe87..fd0e59c531c44 100644 --- a/google/cloud/storage/internal/connection_impl_test.cc +++ b/google/cloud/storage/internal/connection_impl_test.cc @@ -637,7 +637,6 @@ TEST(RetryClientTest, UploadFinalChunkQueryTooManyMissingPayloads) { ASSERT_THAT(response, Not(IsOk())); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::EnableTracing; using ::google::cloud::testing_util::InstallSpanCatcher; using ::google::cloud::testing_util::SpanNamed; @@ -695,7 +694,6 @@ TEST(RetryClientTest, BackoffSpansUploadChunk) { SpanNamed("Backoff"), SpanNamed("storage::Client::WriteObject/UploadChunk"))); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } // namespace } // namespace internal diff --git a/google/cloud/storage/internal/crc32c.cc b/google/cloud/storage/internal/crc32c.cc index 57c16dfe38e20..9357d7c03f35d 100644 --- a/google/cloud/storage/internal/crc32c.cc +++ b/google/cloud/storage/internal/crc32c.cc @@ -14,13 +14,7 @@ #include "google/cloud/storage/internal/crc32c.h" #include "absl/base/config.h" -#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION >= 20230125 #include "absl/crc/crc32c.h" -#define GOOGLE_CLOUD_CPP_USE_ABSL_CRC32C 1 -#else -#define GOOGLE_CLOUD_CPP_USE_ABSL_CRC32C 0 -#endif // ABSL_LTS_RELEASE_VERSION -#include namespace google { namespace cloud { @@ -28,8 +22,8 @@ namespace storage_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN std::uint32_t ExtendCrc32c(std::uint32_t crc, absl::string_view data) { - return crc32c::Extend(crc, reinterpret_cast(data.data()), - data.size()); + return static_cast( + absl::ExtendCrc32c(absl::crc32c_t{crc}, data)); } std::uint32_t ExtendCrc32c(std::uint32_t crc, @@ -47,8 +41,6 @@ std::uint32_t ExtendCrc32c(std::uint32_t crc, absl::Cord const& data) { return crc; } -#if GOOGLE_CLOUD_CPP_USE_ABSL_CRC32C - std::uint32_t ExtendCrc32c(std::uint32_t crc, absl::string_view data, std::uint32_t data_crc) { return static_cast(absl::ConcatCrc32c( @@ -69,26 +61,6 @@ std::uint32_t ExtendCrc32c(std::uint32_t crc, absl::Cord const& data, absl::crc32c_t{crc}, absl::crc32c_t{data_crc}, data.size())); } -#else - -std::uint32_t ExtendCrc32c(std::uint32_t crc, absl::string_view data, - std::uint32_t /*data_crc*/) { - return ExtendCrc32c(crc, data); -} - -std::uint32_t ExtendCrc32c(std::uint32_t crc, - storage::internal::ConstBufferSequence const& data, - std::uint32_t /*data_crc*/) { - return ExtendCrc32c(crc, data); -} - -std::uint32_t ExtendCrc32c(std::uint32_t crc, absl::Cord const& data, - std::uint32_t /*data_crc*/) { - return ExtendCrc32c(crc, data); -} - -#endif // GOOGLE_CLOUD_CPP_USE_ABSL_CRC32C - GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storage_internal } // namespace cloud diff --git a/google/cloud/storage/internal/crc32c_benchmark.cc b/google/cloud/storage/internal/crc32c_benchmark.cc index 5dcf8a8450194..5975b713d78c0 100644 --- a/google/cloud/storage/internal/crc32c_benchmark.cc +++ b/google/cloud/storage/internal/crc32c_benchmark.cc @@ -13,8 +13,8 @@ // limitations under the License. #include "google/cloud/storage/internal/crc32c.h" +#include "absl/crc/crc32c.h" #include -#include #include namespace google { @@ -33,7 +33,7 @@ namespace { // ---------------------------------------------------------------------- // Benchmark Time CPU Iterations // ---------------------------------------------------------------------- -// BM_Crc32cDuplicateNonAbseil 25520759 ns 25520833 ns 28 +// BM_Crc32cExtendStringView 25520759 ns 25520833 ns 28 // BM_Crc32cDuplicate 24168074 ns 24168122 ns 28 // BM_Crc32cConcat 12213494 ns 12213077 ns 57 @@ -41,23 +41,21 @@ auto constexpr kMessage = 2 * 1024 * std::size_t{1024}; auto constexpr kWriteSize = 16 * kMessage; auto constexpr kUploadSize = 8 * kWriteSize; -void BM_Crc32cDuplicateNonAbseil(benchmark::State& state) { +void BM_Crc32cExtendStringView(benchmark::State& state) { auto buffer = std::string(kWriteSize, '0'); - auto crc = std::uint32_t{0}; + auto crc = absl::crc32c_t{0}; for (auto _ : state) { for (std::size_t offset = 0; offset < kUploadSize; offset += kWriteSize) { for (std::size_t m = 0; m < kWriteSize; m += kMessage) { auto w = absl::string_view{buffer}.substr(m, kMessage); - benchmark::DoNotOptimize(crc32c::Crc32c(w.data(), w.size())); + benchmark::DoNotOptimize(absl::ComputeCrc32c(w)); } - crc = crc32c::Extend(crc, - reinterpret_cast(buffer.data()), - buffer.size()); + crc = absl::ExtendCrc32c(crc, buffer); } } benchmark::DoNotOptimize(crc); } -BENCHMARK(BM_Crc32cDuplicateNonAbseil); +BENCHMARK(BM_Crc32cExtendStringView); void BM_Crc32cDuplicate(benchmark::State& state) { auto buffer = std::string(kWriteSize, '0'); diff --git a/google/cloud/storage/internal/default_object_acl_requests.cc b/google/cloud/storage/internal/default_object_acl_requests.cc index 7e74e2eb9438f..59b6846876c81 100644 --- a/google/cloud/storage/internal/default_object_acl_requests.cc +++ b/google/cloud/storage/internal/default_object_acl_requests.cc @@ -16,7 +16,7 @@ #include "google/cloud/storage/internal/metadata_parser.h" #include "google/cloud/storage/internal/object_access_control_parser.h" #include "google/cloud/storage/internal/object_acl_requests.h" -#include "google/cloud/internal/absl_str_join_quiet.h" +#include "absl/strings/str_join.h" #include #include #include diff --git a/google/cloud/storage/internal/error_credentials.cc b/google/cloud/storage/internal/error_credentials.cc deleted file mode 100644 index bea0279b63952..0000000000000 --- a/google/cloud/storage/internal/error_credentials.cc +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/storage/internal/error_credentials.h" - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace internal { - -StatusOr ErrorCredentials::AuthorizationHeader() { - return status_; -} - -} // namespace internal -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google diff --git a/google/cloud/storage/internal/error_credentials.h b/google/cloud/storage/internal/error_credentials.h deleted file mode 100644 index 56a394d0be9a2..0000000000000 --- a/google/cloud/storage/internal/error_credentials.h +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_ERROR_CREDENTIALS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_ERROR_CREDENTIALS_H - -#include "google/cloud/storage/oauth2/credentials.h" -#include "google/cloud/storage/version.h" -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace internal { - -/** - * Report errors loading credentials when the RPC is called. - * - * With the "unified authentication client" approach the application just - * declares its *intent*, e.g., "load the default credentials", the actual work - * is delayed and depends on how the client library is implemented. We also want - * the behavior with gRPC and REST to be as similar as possible. - * - * For some credential types (e.g. service account impersonation) there may be - * problems with the credentials that are not manifest until after several RPCs - * succeed. - * - * For gRPC, creating the credentials always succeeds, but using them may fail. - * - * With REST we typically validate the credentials when loaded, and then again - * when we try to use them. - * - * This last approach was problematic, because it made some credentials fail - * early. This class allows us to treat all credentials, including REST - * credentials that failed to load as "evaluated at RPC time". - */ -class ErrorCredentials : public oauth2::Credentials { - public: - explicit ErrorCredentials(Status status) : status_(std::move(status)) {} - - StatusOr AuthorizationHeader() override; - - private: - Status status_; -}; - -} // namespace internal -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_ERROR_CREDENTIALS_H diff --git a/google/cloud/storage/internal/generic_stub.h b/google/cloud/storage/internal/generic_stub.h index ddf35b377488a..7c48c83751548 100644 --- a/google/cloud/storage/internal/generic_stub.h +++ b/google/cloud/storage/internal/generic_stub.h @@ -16,7 +16,6 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_GENERIC_STUB_H #include "google/cloud/storage/bucket_metadata.h" -#include "google/cloud/storage/client_options.h" #include "google/cloud/storage/internal/bucket_acl_requests.h" #include "google/cloud/storage/internal/bucket_requests.h" #include "google/cloud/storage/internal/default_object_acl_requests.h" @@ -29,7 +28,6 @@ #include "google/cloud/storage/internal/object_requests.h" #include "google/cloud/storage/internal/service_account_requests.h" #include "google/cloud/storage/internal/sign_blob_requests.h" -#include "google/cloud/storage/oauth2/credentials.h" #include "google/cloud/storage/object_metadata.h" #include "google/cloud/storage/service_account.h" #include "google/cloud/internal/rest_context.h" diff --git a/google/cloud/storage/internal/grpc/bucket_access_control_parser.cc b/google/cloud/storage/internal/grpc/bucket_access_control_parser.cc index 64c9aa8e7270a..4d864614731e6 100644 --- a/google/cloud/storage/internal/grpc/bucket_access_control_parser.cc +++ b/google/cloud/storage/internal/grpc/bucket_access_control_parser.cc @@ -16,7 +16,7 @@ #include "google/cloud/storage/bucket_access_control.h" #include "google/cloud/storage/internal/patch_builder_details.h" #include "google/cloud/storage/version.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" +#include "absl/strings/str_cat.h" namespace google { namespace cloud { diff --git a/google/cloud/storage/internal/grpc/bucket_access_control_parser.h b/google/cloud/storage/internal/grpc/bucket_access_control_parser.h index ceeac76b5b301..a01c28487de21 100644 --- a/google/cloud/storage/internal/grpc/bucket_access_control_parser.h +++ b/google/cloud/storage/internal/grpc/bucket_access_control_parser.h @@ -17,7 +17,7 @@ #include "google/cloud/storage/internal/storage_connection.h" #include "google/cloud/storage/version.h" -#include +#include "google/storage/v2/storage.pb.h" namespace google { namespace cloud { diff --git a/google/cloud/storage/internal/grpc/bucket_metadata_parser.h b/google/cloud/storage/internal/grpc/bucket_metadata_parser.h index 4efc7631ffabe..3cadf64c7b98e 100644 --- a/google/cloud/storage/internal/grpc/bucket_metadata_parser.h +++ b/google/cloud/storage/internal/grpc/bucket_metadata_parser.h @@ -17,7 +17,7 @@ #include "google/cloud/storage/internal/storage_connection.h" #include "google/cloud/storage/version.h" -#include +#include "google/storage/v2/storage.pb.h" namespace google { namespace cloud { diff --git a/google/cloud/storage/internal/grpc/bucket_name.cc b/google/cloud/storage/internal/grpc/bucket_name.cc index c26ea31d66df2..38154842029dd 100644 --- a/google/cloud/storage/internal/grpc/bucket_name.cc +++ b/google/cloud/storage/internal/grpc/bucket_name.cc @@ -13,7 +13,7 @@ // limitations under the License. #include "google/cloud/storage/internal/grpc/bucket_name.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" +#include "absl/strings/str_cat.h" #include "absl/strings/strip.h" namespace google { diff --git a/google/cloud/storage/internal/grpc/bucket_request_parser.h b/google/cloud/storage/internal/grpc/bucket_request_parser.h index e766f992dac6d..e603285606757 100644 --- a/google/cloud/storage/internal/grpc/bucket_request_parser.h +++ b/google/cloud/storage/internal/grpc/bucket_request_parser.h @@ -17,7 +17,7 @@ #include "google/cloud/storage/internal/bucket_requests.h" #include "google/cloud/storage/version.h" -#include +#include "google/storage/v2/storage.pb.h" namespace google { namespace cloud { diff --git a/google/cloud/storage/internal/grpc/bucket_request_parser_test.cc b/google/cloud/storage/internal/grpc/bucket_request_parser_test.cc index e1fc9ca748ff7..68054410cfc1f 100644 --- a/google/cloud/storage/internal/grpc/bucket_request_parser_test.cc +++ b/google/cloud/storage/internal/grpc/bucket_request_parser_test.cc @@ -13,7 +13,6 @@ // limitations under the License. #include "google/cloud/storage/internal/grpc/bucket_request_parser.h" -#include "google/cloud/storage/oauth2/google_credentials.h" #include "google/cloud/testing_util/is_proto_equal.h" #include "google/cloud/testing_util/status_matchers.h" #include diff --git a/google/cloud/storage/internal/grpc/configure_client_context.h b/google/cloud/storage/internal/grpc/configure_client_context.h index 36b441560f941..7c898fbe9bbd6 100644 --- a/google/cloud/storage/internal/grpc/configure_client_context.h +++ b/google/cloud/storage/internal/grpc/configure_client_context.h @@ -20,7 +20,7 @@ #include "google/cloud/storage/version.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/rest_context.h" -#include +#include "google/storage/v2/storage.pb.h" #include namespace google { diff --git a/google/cloud/storage/internal/grpc/ctype_cord_workaround.h b/google/cloud/storage/internal/grpc/ctype_cord_workaround.h index b265c647d52e8..2273bd03ac474 100644 --- a/google/cloud/storage/internal/grpc/ctype_cord_workaround.h +++ b/google/cloud/storage/internal/grpc/ctype_cord_workaround.h @@ -18,7 +18,7 @@ #include "google/cloud/internal/type_traits.h" #include "google/cloud/version.h" #include "absl/strings/cord.h" -#include +#include "google/storage/v2/storage.pb.h" #include #include diff --git a/google/cloud/storage/internal/grpc/default_options.cc b/google/cloud/storage/internal/grpc/default_options.cc index abd150c40d9ea..27ac0996a369b 100644 --- a/google/cloud/storage/internal/grpc/default_options.cc +++ b/google/cloud/storage/internal/grpc/default_options.cc @@ -13,7 +13,6 @@ // limitations under the License. #include "google/cloud/storage/internal/grpc/default_options.h" -#include "google/cloud/storage/client_options.h" #include "google/cloud/storage/grpc_plugin.h" #include "google/cloud/storage/options.h" #include "google/cloud/common_options.h" @@ -78,13 +77,18 @@ Options DefaultOptionsGrpc( google::cloud::internal::MakeAuthOptions(options))); } + auto const preserve_creds = + GetEnv("GOOGLE_CLOUD_CPP_STORAGE_TESTING_PRESERVE_CREDENTIALS"); auto const testbench = GetEnv("CLOUD_STORAGE_EXPERIMENTAL_GRPC_TESTBENCH_ENDPOINT"); if (testbench.has_value() && !testbench->empty()) { options.set(*testbench); - // The emulator does not support HTTPS or authentication, use insecure - // (sometimes called "anonymous") credentials, which disable SSL. - options.set(MakeInsecureCredentials()); + + if (!preserve_creds.has_value()) { + // The emulator does not support HTTPS or authentication, use insecure + // (sometimes called "anonymous") credentials, which disable SSL. + options.set(MakeInsecureCredentials()); + } } // gRPC <= 1.64 may crash when metrics are enabled, so we don't enable them by diff --git a/google/cloud/storage/internal/grpc/make_cord_test.cc b/google/cloud/storage/internal/grpc/make_cord_test.cc index f15e0a30d4101..064eadc6f77a3 100644 --- a/google/cloud/storage/internal/grpc/make_cord_test.cc +++ b/google/cloud/storage/internal/grpc/make_cord_test.cc @@ -13,8 +13,8 @@ // limitations under the License. #include "google/cloud/storage/internal/async/write_payload_impl.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/random.h" +#include "absl/strings/str_join.h" #include namespace google { diff --git a/google/cloud/storage/internal/grpc/metrics_exporter_impl.cc b/google/cloud/storage/internal/grpc/metrics_exporter_impl.cc index e7b8a36bbc785..0b6824b7750e3 100644 --- a/google/cloud/storage/internal/grpc/metrics_exporter_impl.cc +++ b/google/cloud/storage/internal/grpc/metrics_exporter_impl.cc @@ -24,9 +24,9 @@ #include "google/cloud/storage/options.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/log.h" #include "absl/strings/match.h" +#include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include "absl/strings/strip.h" #include diff --git a/google/cloud/storage/internal/grpc/metrics_exporter_options.cc b/google/cloud/storage/internal/grpc/metrics_exporter_options.cc index f573eb6cc0248..27c50ec1424a0 100644 --- a/google/cloud/storage/internal/grpc/metrics_exporter_options.cc +++ b/google/cloud/storage/internal/grpc/metrics_exporter_options.cc @@ -20,8 +20,9 @@ #include "google/cloud/internal/invocation_id_generator.h" #include "google/cloud/universe_domain_options.h" #include "absl/types/variant.h" -#include -#include +#include "google/api/monitored_resource.pb.h" +#include +#include #include #include @@ -43,18 +44,20 @@ auto ByName(opentelemetry::sdk::resource::ResourceAttributes const& attributes, Options MetricsExporterOptions( Project const& project, opentelemetry::sdk::resource::Resource const& resource) { - namespace sc = ::opentelemetry::sdk::resource::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto const& attributes = resource.GetAttributes(); auto monitored_resource = google::api::MonitoredResource{}; monitored_resource.set_type("storage.googleapis.com/Client"); auto& labels = *monitored_resource.mutable_labels(); labels["project_id"] = project.project_id(); - labels["location"] = ByName(attributes, sc::kCloudAvailabilityZone, - ByName(attributes, sc::kCloudRegion, "global")); - labels["cloud_platform"] = ByName(attributes, sc::kCloudPlatform, "unknown"); - labels["host_id"] = - ByName(attributes, "faas.id", ByName(attributes, sc::kHostId, "unknown")); + labels["location"] = + ByName(attributes, sc::cloud::kCloudAvailabilityZone, + ByName(attributes, sc::cloud::kCloudRegion, "global")); + labels["cloud_platform"] = + ByName(attributes, sc::cloud::kCloudPlatform, "unknown"); + labels["host_id"] = ByName(attributes, "faas.id", + ByName(attributes, sc::host::kHostId, "unknown")); // We need a UUID because there may be multiple monitored resources within the // same process, and we need these monitored resources to be globally unique diff --git a/google/cloud/storage/internal/grpc/metrics_exporter_options_test.cc b/google/cloud/storage/internal/grpc/metrics_exporter_options_test.cc index e3244780d66f9..7fad2c591d4d4 100644 --- a/google/cloud/storage/internal/grpc/metrics_exporter_options_test.cc +++ b/google/cloud/storage/internal/grpc/metrics_exporter_options_test.cc @@ -23,7 +23,7 @@ #include "google/cloud/testing_util/is_proto_equal.h" #include "google/cloud/testing_util/scoped_environment.h" #include "google/cloud/universe_domain_options.h" -#include +#include "google/api/monitored_resource.pb.h" #include #include #include diff --git a/google/cloud/storage/internal/grpc/metrics_meter_provider.cc b/google/cloud/storage/internal/grpc/metrics_meter_provider.cc index e0db509b0d7bb..66fae1750b909 100644 --- a/google/cloud/storage/internal/grpc/metrics_meter_provider.cc +++ b/google/cloud/storage/internal/grpc/metrics_meter_provider.cc @@ -16,7 +16,7 @@ #include "google/cloud/storage/internal/grpc/metrics_meter_provider.h" #include "google/cloud/storage/internal/grpc/metrics_histograms.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" +#include "absl/strings/str_cat.h" #include #include #if OPENTELEMETRY_VERSION_MAJOR > 1 || \ @@ -66,6 +66,18 @@ void AddHistogramView(opentelemetry::sdk::metrics::MeterProvider& provider, // These are useful on Windows with DLLs and mixed CRTs, and we should try to // them if they are available. #if OPENTELEMETRY_VERSION_MAJOR > 1 || \ + (OPENTELEMETRY_VERSION_MAJOR == 1 && OPENTELEMETRY_VERSION_MINOR >= 23) + (void)unit; + provider.AddView( + opentelemetry::sdk::metrics::InstrumentSelectorFactory::Create( + opentelemetry::sdk::metrics::InstrumentType::kHistogram, name, unit), + opentelemetry::sdk::metrics::MeterSelectorFactory::Create( + kGrpcMeterName, grpc::Version(), kGrpcSchema), + opentelemetry::sdk::metrics::ViewFactory::Create( + name, std::move(description), + opentelemetry::sdk::metrics::AggregationType::kHistogram, + std::move(aggregation_config))); +#elif OPENTELEMETRY_VERSION_MAJOR > 1 || \ (OPENTELEMETRY_VERSION_MAJOR == 1 && OPENTELEMETRY_VERSION_MINOR >= 10) provider.AddView( opentelemetry::sdk::metrics::InstrumentSelectorFactory::Create( diff --git a/google/cloud/storage/internal/grpc/monitoring_project.cc b/google/cloud/storage/internal/grpc/monitoring_project.cc index f69f9ce9b6b95..598f41fac210b 100644 --- a/google/cloud/storage/internal/grpc/monitoring_project.cc +++ b/google/cloud/storage/internal/grpc/monitoring_project.cc @@ -17,7 +17,7 @@ #include "google/cloud/storage/internal/grpc/monitoring_project.h" #include "google/cloud/storage/options.h" #include "google/cloud/internal/unified_rest_credentials.h" -#include +#include namespace google { namespace cloud { @@ -46,14 +46,14 @@ absl::optional MonitoringProject(Credentials const& credentials) { absl::optional MonitoringProject( opentelemetry::sdk::resource::Resource const& resource) { - namespace sc = ::opentelemetry::sdk::resource::SemanticConventions; + namespace sc = ::opentelemetry::semconv; auto const& attributes = resource.GetAttributes(); - auto l = attributes.find(sc::kCloudProvider); + auto l = attributes.find(sc::cloud::kCloudProvider); if (l == attributes.end() || opentelemetry::nostd::get(l->second) != "gcp") { return absl::nullopt; } - l = attributes.find(sc::kCloudAccountId); + l = attributes.find(sc::cloud::kCloudAccountId); if (l == attributes.end()) return absl::nullopt; return Project(opentelemetry::nostd::get(l->second)); } diff --git a/google/cloud/storage/internal/grpc/object_access_control_parser.h b/google/cloud/storage/internal/grpc/object_access_control_parser.h index c030944d08b7e..813b033dc2adc 100644 --- a/google/cloud/storage/internal/grpc/object_access_control_parser.h +++ b/google/cloud/storage/internal/grpc/object_access_control_parser.h @@ -17,7 +17,7 @@ #include "google/cloud/storage/internal/storage_connection.h" #include "google/cloud/storage/version.h" -#include +#include "google/storage/v2/storage.pb.h" namespace google { namespace cloud { diff --git a/google/cloud/storage/internal/grpc/object_metadata_parser.h b/google/cloud/storage/internal/grpc/object_metadata_parser.h index 0e7e11a590299..d0459631145f7 100644 --- a/google/cloud/storage/internal/grpc/object_metadata_parser.h +++ b/google/cloud/storage/internal/grpc/object_metadata_parser.h @@ -19,7 +19,7 @@ #include "google/cloud/storage/version.h" #include "google/cloud/options.h" #include "absl/strings/string_view.h" -#include +#include "google/storage/v2/storage.pb.h" namespace google { namespace cloud { diff --git a/google/cloud/storage/internal/grpc/object_read_source.h b/google/cloud/storage/internal/grpc/object_read_source.h index e8acc9c4e9dbd..93e2068f1e2ef 100644 --- a/google/cloud/storage/internal/grpc/object_read_source.h +++ b/google/cloud/storage/internal/grpc/object_read_source.h @@ -21,7 +21,7 @@ #include "google/cloud/future.h" #include "google/cloud/internal/streaming_read_rpc.h" #include "absl/functional/function_ref.h" -#include +#include "google/storage/v2/storage.pb.h" #include #include diff --git a/google/cloud/storage/internal/grpc/object_request_parser.cc b/google/cloud/storage/internal/grpc/object_request_parser.cc index 81a562c4e78c9..934dded5ce5b5 100644 --- a/google/cloud/storage/internal/grpc/object_request_parser.cc +++ b/google/cloud/storage/internal/grpc/object_request_parser.cc @@ -19,10 +19,10 @@ #include "google/cloud/storage/internal/grpc/object_metadata_parser.h" #include "google/cloud/storage/internal/object_access_control_parser.h" #include "google/cloud/storage/internal/patch_builder_details.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/invoke_result.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/internal/time_utils.h" +#include "absl/strings/str_cat.h" #include namespace google { diff --git a/google/cloud/storage/internal/grpc/object_request_parser.h b/google/cloud/storage/internal/grpc/object_request_parser.h index 656414d43a475..771fac2890c0a 100644 --- a/google/cloud/storage/internal/grpc/object_request_parser.h +++ b/google/cloud/storage/internal/grpc/object_request_parser.h @@ -18,7 +18,7 @@ #include "google/cloud/storage/internal/storage_connection.h" #include "google/cloud/storage/version.h" #include "google/cloud/rpc_metadata.h" -#include +#include "google/storage/v2/storage.pb.h" #include namespace google { diff --git a/google/cloud/storage/internal/grpc/object_request_parser_test.cc b/google/cloud/storage/internal/grpc/object_request_parser_test.cc index af33a5a54059f..8b91d9b8018f9 100644 --- a/google/cloud/storage/internal/grpc/object_request_parser_test.cc +++ b/google/cloud/storage/internal/grpc/object_request_parser_test.cc @@ -15,7 +15,6 @@ #include "google/cloud/storage/internal/grpc/object_request_parser.h" #include "google/cloud/storage/internal/grpc/stub.h" #include "google/cloud/storage/internal/hash_function_impl.h" -#include "google/cloud/storage/oauth2/google_credentials.h" #include "google/cloud/grpc_options.h" #include "google/cloud/testing_util/is_proto_equal.h" #include "google/cloud/testing_util/scoped_environment.h" diff --git a/google/cloud/storage/internal/grpc/owner_parser.h b/google/cloud/storage/internal/grpc/owner_parser.h index 28cafcfce2067..0e8ace0ca229a 100644 --- a/google/cloud/storage/internal/grpc/owner_parser.h +++ b/google/cloud/storage/internal/grpc/owner_parser.h @@ -17,7 +17,7 @@ #include "google/cloud/storage/owner.h" #include "google/cloud/storage/version.h" -#include +#include "google/storage/v2/storage.pb.h" namespace google { namespace cloud { diff --git a/google/cloud/storage/internal/grpc/split_write_object_data.cc b/google/cloud/storage/internal/grpc/split_write_object_data.cc index 9a8e1a15422f6..c346ac71ce63e 100644 --- a/google/cloud/storage/internal/grpc/split_write_object_data.cc +++ b/google/cloud/storage/internal/grpc/split_write_object_data.cc @@ -13,7 +13,7 @@ // limitations under the License. #include "google/cloud/storage/internal/grpc/split_write_object_data.h" -#include +#include "google/storage/v2/storage.pb.h" #include namespace google { diff --git a/google/cloud/storage/internal/grpc/stub.cc b/google/cloud/storage/internal/grpc/stub.cc index 733b42bf4f94d..20f853bd71c99 100644 --- a/google/cloud/storage/internal/grpc/stub.cc +++ b/google/cloud/storage/internal/grpc/stub.cc @@ -30,6 +30,7 @@ #include "google/cloud/storage/internal/grpc/split_write_object_data.h" #include "google/cloud/storage/internal/grpc/synthetic_self_link.h" #include "google/cloud/storage/internal/storage_stub_factory.h" +#include "google/cloud/storage/options.h" #include "google/cloud/internal/big_endian.h" #include "google/cloud/internal/invoke_result.h" #include "google/cloud/internal/make_status.h" @@ -40,6 +41,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storage_internal { diff --git a/google/cloud/storage/internal/grpc/stub.h b/google/cloud/storage/internal/grpc/stub.h index d5cfe4db066e4..b3b863c0651e4 100644 --- a/google/cloud/storage/internal/grpc/stub.h +++ b/google/cloud/storage/internal/grpc/stub.h @@ -20,12 +20,15 @@ #include "google/cloud/background_threads.h" #include "google/cloud/internal/minimal_iam_credentials_stub.h" #include "google/cloud/internal/streaming_write_rpc.h" -#include +#include "google/storage/v2/storage.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storage_internal { @@ -297,4 +300,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_GRPC_STUB_H diff --git a/google/cloud/storage/internal/grpc/stub_acl_test.cc b/google/cloud/storage/internal/grpc/stub_acl_test.cc index e82c00a83d6cc..00d53d1a4d8bf 100644 --- a/google/cloud/storage/internal/grpc/stub_acl_test.cc +++ b/google/cloud/storage/internal/grpc/stub_acl_test.cc @@ -23,6 +23,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storage_internal { diff --git a/google/cloud/storage/internal/grpc/stub_insert_object_media_test.cc b/google/cloud/storage/internal/grpc/stub_insert_object_media_test.cc index f3f207b9a1e00..4481b0089a9c9 100644 --- a/google/cloud/storage/internal/grpc/stub_insert_object_media_test.cc +++ b/google/cloud/storage/internal/grpc/stub_insert_object_media_test.cc @@ -13,7 +13,7 @@ // limitations under the License. #include "google/cloud/storage/internal/grpc/stub.h" -#include "google/cloud/storage/oauth2/google_credentials.h" +#include "google/cloud/storage/options.h" #include "google/cloud/storage/testing/mock_storage_stub.h" #include "google/cloud/grpc_options.h" #include "google/cloud/testing_util/is_proto_equal.h" diff --git a/google/cloud/storage/internal/grpc/stub_read_object_test.cc b/google/cloud/storage/internal/grpc/stub_read_object_test.cc index aa191d6733c0a..ea3ddea3cbf2a 100644 --- a/google/cloud/storage/internal/grpc/stub_read_object_test.cc +++ b/google/cloud/storage/internal/grpc/stub_read_object_test.cc @@ -14,14 +14,15 @@ #include "google/cloud/storage/internal/grpc/object_read_source.h" #include "google/cloud/storage/internal/grpc/stub.h" +#include "google/cloud/storage/options.h" #include "google/cloud/storage/testing/mock_storage_stub.h" #include "google/cloud/grpc_options.h" #include "google/cloud/options.h" #include "google/cloud/testing_util/is_proto_equal.h" #include "google/cloud/testing_util/mock_completion_queue_impl.h" #include "google/cloud/testing_util/status_matchers.h" +#include "google/storage/v2/storage.pb.h" #include -#include #include namespace google { diff --git a/google/cloud/storage/internal/grpc/stub_test.cc b/google/cloud/storage/internal/grpc/stub_test.cc index 7a672e3f2592d..dd5a86425a05e 100644 --- a/google/cloud/storage/internal/grpc/stub_test.cc +++ b/google/cloud/storage/internal/grpc/stub_test.cc @@ -23,6 +23,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storage_internal { diff --git a/google/cloud/storage/internal/grpc/stub_upload_chunk_test.cc b/google/cloud/storage/internal/grpc/stub_upload_chunk_test.cc index 2c42cb69d45df..a50a5b6cfefd9 100644 --- a/google/cloud/storage/internal/grpc/stub_upload_chunk_test.cc +++ b/google/cloud/storage/internal/grpc/stub_upload_chunk_test.cc @@ -13,6 +13,7 @@ // limitations under the License. #include "google/cloud/storage/internal/grpc/stub.h" +#include "google/cloud/storage/options.h" #include "google/cloud/storage/testing/mock_storage_stub.h" #include "google/cloud/grpc_options.h" #include "google/cloud/options.h" diff --git a/google/cloud/storage/internal/grpc/synthetic_self_link.cc b/google/cloud/storage/internal/grpc/synthetic_self_link.cc index 9536c4c319a38..b7453765ec12a 100644 --- a/google/cloud/storage/internal/grpc/synthetic_self_link.cc +++ b/google/cloud/storage/internal/grpc/synthetic_self_link.cc @@ -14,8 +14,8 @@ #include "google/cloud/storage/internal/grpc/synthetic_self_link.h" #include "google/cloud/storage/options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/url_encode.h" +#include "absl/strings/str_cat.h" namespace google { namespace cloud { diff --git a/google/cloud/storage/internal/hash_values.cc b/google/cloud/storage/internal/hash_values.cc index 7841a6ab9129e..0567a37f4c8a6 100644 --- a/google/cloud/storage/internal/hash_values.cc +++ b/google/cloud/storage/internal/hash_values.cc @@ -13,7 +13,7 @@ // limitations under the License. #include "google/cloud/storage/internal/hash_values.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" +#include "absl/strings/str_cat.h" #include namespace google { diff --git a/google/cloud/storage/internal/http_response.cc b/google/cloud/storage/internal/http_response.cc index a9b97e824aecd..5952be5552270 100644 --- a/google/cloud/storage/internal/http_response.cc +++ b/google/cloud/storage/internal/http_response.cc @@ -13,9 +13,9 @@ // limitations under the License. #include "google/cloud/storage/internal/http_response.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/rest_parse_json_error.h" #include "google/cloud/internal/rest_response.h" +#include "absl/strings/str_join.h" #include #include diff --git a/google/cloud/storage/internal/impersonate_service_account_credentials.cc b/google/cloud/storage/internal/impersonate_service_account_credentials.cc deleted file mode 100644 index f63f325eedea9..0000000000000 --- a/google/cloud/storage/internal/impersonate_service_account_credentials.cc +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/storage/internal/impersonate_service_account_credentials.h" -#include "google/cloud/internal/rest_client.h" -#include "google/cloud/internal/unified_rest_credentials.h" -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace internal { -namespace { - -oauth2_internal::GenerateAccessTokenRequest MakeRequest( - google::cloud::internal::ImpersonateServiceAccountConfig const& config) { - return oauth2_internal::GenerateAccessTokenRequest{ - /*.service_account=*/config.target_service_account(), - /*.lifetime=*/config.lifetime(), - /*.scopes=*/config.scopes(), - /*.delegates=*/config.delegates(), - }; -} - -auto constexpr kUseSlack = std::chrono::seconds(30); - -} // namespace - -ImpersonateServiceAccountCredentials::ImpersonateServiceAccountCredentials( - google::cloud::internal::ImpersonateServiceAccountConfig const& config) - : ImpersonateServiceAccountCredentials( - config, oauth2_internal::MakeMinimalIamCredentialsRestStub( - rest_internal::MapCredentials(*config.base_credentials()), - config.options(), [](Options const& o) { - return rest_internal::MakeDefaultRestClient("", o); - })) {} - -ImpersonateServiceAccountCredentials::ImpersonateServiceAccountCredentials( - google::cloud::internal::ImpersonateServiceAccountConfig const& config, - std::shared_ptr stub) - : stub_(std::move(stub)), request_(MakeRequest(config)) {} - -StatusOr -ImpersonateServiceAccountCredentials::AuthorizationHeader() { - return AuthorizationHeader(std::chrono::system_clock::now()); -} - -StatusOr ImpersonateServiceAccountCredentials::AuthorizationHeader( - std::chrono::system_clock::time_point now) { - std::unique_lock lk(mu_); - if (now + kUseSlack <= expiration_) return header_; - auto response = stub_->GenerateAccessToken(request_); - if (!response) return std::move(response).status(); - expiration_ = response->expiration; - header_ = "Authorization: Bearer " + response->token; - return header_; -} - -} // namespace internal -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google diff --git a/google/cloud/storage/internal/impersonate_service_account_credentials.h b/google/cloud/storage/internal/impersonate_service_account_credentials.h deleted file mode 100644 index 463868eab93f5..0000000000000 --- a/google/cloud/storage/internal/impersonate_service_account_credentials.h +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_IMPERSONATE_SERVICE_ACCOUNT_CREDENTIALS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_IMPERSONATE_SERVICE_ACCOUNT_CREDENTIALS_H - -#include "google/cloud/storage/oauth2/credentials.h" -#include "google/cloud/storage/version.h" -#include "google/cloud/credentials.h" -#include "google/cloud/internal/oauth2_minimal_iam_credentials_rest.h" -#include -#include -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace internal { - -class ImpersonateServiceAccountCredentials : public oauth2::Credentials { - public: - explicit ImpersonateServiceAccountCredentials( - google::cloud::internal::ImpersonateServiceAccountConfig const& config); - explicit ImpersonateServiceAccountCredentials( - google::cloud::internal::ImpersonateServiceAccountConfig const& config, - std::shared_ptr stub); - - StatusOr AuthorizationHeader() override; - StatusOr AuthorizationHeader( - std::chrono::system_clock::time_point now); - - private: - std::shared_ptr stub_; - oauth2_internal::GenerateAccessTokenRequest request_; - std::mutex mu_; - std::string header_; - std::chrono::system_clock::time_point expiration_; -}; - -} // namespace internal -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_IMPERSONATE_SERVICE_ACCOUNT_CREDENTIALS_H diff --git a/google/cloud/storage/internal/impersonate_service_account_credentials_test.cc b/google/cloud/storage/internal/impersonate_service_account_credentials_test.cc deleted file mode 100644 index e4009eafeea03..0000000000000 --- a/google/cloud/storage/internal/impersonate_service_account_credentials_test.cc +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/storage/internal/impersonate_service_account_credentials.h" -#include "google/cloud/testing_util/status_matchers.h" -#include -#include -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace internal { -namespace { - -using ::google::cloud::AccessToken; -using ::google::cloud::AccessTokenLifetimeOption; -using ::google::cloud::testing_util::IsOk; -using ::std::chrono::minutes; -using ::testing::EndsWith; -using ::testing::Return; -using ::testing::StartsWith; - -class MockMinimalIamCredentialsRest - : public oauth2_internal::MinimalIamCredentialsRest { - public: - MOCK_METHOD(StatusOr, GenerateAccessToken, - (oauth2_internal::GenerateAccessTokenRequest const&), (override)); - MOCK_METHOD(StatusOr, universe_domain, (Options const& options), - (override, const)); -}; - -TEST(ImpersonateServiceAccountCredentialsTest, Basic) { - auto const now = std::chrono::system_clock::now(); - - auto mock = std::make_shared(); - EXPECT_CALL(*mock, GenerateAccessToken) - .WillOnce( - Return(make_status_or(AccessToken{"token1", now + minutes(15)}))) - .WillOnce( - Return(make_status_or(AccessToken{"token2", now + minutes(30)}))); - - auto config = google::cloud::internal::ImpersonateServiceAccountConfig( - google::cloud::MakeGoogleDefaultCredentials(), - "test-only-invalid@test.invalid", - Options{}.set(std::chrono::minutes(15))); - ImpersonateServiceAccountCredentials under_test(config, mock); - - for (auto const i : {1, 5, 9}) { - SCOPED_TRACE("Testing with i = " + std::to_string(i)); - auto header = under_test.AuthorizationHeader(now + minutes(i)); - ASSERT_THAT(header, IsOk()); - EXPECT_THAT(*header, StartsWith("Authorization: Bearer")); - EXPECT_THAT(*header, EndsWith("token1")); - } - - auto header = under_test.AuthorizationHeader(now + minutes(20)); - ASSERT_THAT(header, IsOk()); - EXPECT_THAT(*header, StartsWith("Authorization: Bearer")); - EXPECT_THAT(*header, EndsWith("token2")); -} - -} // namespace -} // namespace internal -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google diff --git a/google/cloud/storage/internal/notification_requests.cc b/google/cloud/storage/internal/notification_requests.cc index 30825a1982e7f..2931cb589eeaa 100644 --- a/google/cloud/storage/internal/notification_requests.cc +++ b/google/cloud/storage/internal/notification_requests.cc @@ -15,8 +15,8 @@ #include "google/cloud/storage/internal/notification_requests.h" #include "google/cloud/storage/internal/metadata_parser.h" #include "google/cloud/storage/internal/notification_metadata_parser.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/make_status.h" +#include "absl/strings/str_join.h" #include #include #include diff --git a/google/cloud/storage/internal/object_access_control_parser.cc b/google/cloud/storage/internal/object_access_control_parser.cc index 2f4ba2fb67e8d..c60472ed9c53f 100644 --- a/google/cloud/storage/internal/object_access_control_parser.cc +++ b/google/cloud/storage/internal/object_access_control_parser.cc @@ -13,7 +13,6 @@ // limitations under the License. #include "google/cloud/storage/internal/object_access_control_parser.h" -#include "google/cloud/storage/internal/access_control_common_parser.h" #include "google/cloud/storage/internal/metadata_parser.h" #include #include diff --git a/google/cloud/storage/internal/object_acl_requests.cc b/google/cloud/storage/internal/object_acl_requests.cc index d1480a0786277..58301fe71af0d 100644 --- a/google/cloud/storage/internal/object_acl_requests.cc +++ b/google/cloud/storage/internal/object_acl_requests.cc @@ -16,8 +16,8 @@ #include "google/cloud/storage/internal/metadata_parser.h" #include "google/cloud/storage/internal/object_access_control_parser.h" #include "google/cloud/storage/internal/patch_builder.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/make_status.h" +#include "absl/strings/str_join.h" #include #include #include diff --git a/google/cloud/storage/internal/object_write_streambuf_test.cc b/google/cloud/storage/internal/object_write_streambuf_test.cc index 077dc83a67e55..baa3c2eb051ce 100644 --- a/google/cloud/storage/internal/object_write_streambuf_test.cc +++ b/google/cloud/storage/internal/object_write_streambuf_test.cc @@ -444,7 +444,7 @@ TEST(ObjectWriteStreambufTest, Regression8868) { auto retry = StorageConnectionImpl::Create(std::move(mock)); google::cloud::internal::OptionsSpan const span( Options{} - .set(oauth2::CreateAnonymousCredentials()) + .set(MakeInsecureCredentials()) .set(LimitedErrorCountRetryPolicy(3).clone()) .set( ExponentialBackoffPolicy(us(1), us(2), 2).clone()) diff --git a/google/cloud/storage/internal/policy_document_request.cc b/google/cloud/storage/internal/policy_document_request.cc index 69c9198edb539..7ab732a487d19 100644 --- a/google/cloud/storage/internal/policy_document_request.cc +++ b/google/cloud/storage/internal/policy_document_request.cc @@ -14,10 +14,10 @@ #include "google/cloud/storage/internal/policy_document_request.h" #include "google/cloud/storage/internal/base64.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/format_time_point.h" #include "google/cloud/internal/make_status.h" #include "absl/functional/function_ref.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include diff --git a/google/cloud/storage/internal/rest/stub.cc b/google/cloud/storage/internal/rest/stub.cc index 4a1e338f64e7c..c26cac0455ef5 100644 --- a/google/cloud/storage/internal/rest/stub.cc +++ b/google/cloud/storage/internal/rest/stub.cc @@ -26,13 +26,14 @@ #include "google/cloud/storage/internal/rest/request_builder.h" #include "google/cloud/storage/internal/service_account_parser.h" #include "google/cloud/storage/version.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/auth_header_error.h" #include "google/cloud/internal/curl_wrappers.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/internal/make_status.h" +#include "google/cloud/internal/rest_options.h" #include "google/cloud/internal/url_encode.h" #include "absl/strings/match.h" +#include "absl/strings/str_cat.h" #include "absl/strings/strip.h" #include @@ -43,7 +44,7 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN namespace internal { namespace rest = google::cloud::rest_internal; -using ::google::cloud::internal::AuthHeaderError; +using ::google::cloud::internal::GetEnv; using ::google::cloud::internal::UrlEncode; namespace { @@ -106,18 +107,6 @@ StatusOr CreateFromJson( return ReturnType::CreateFromJson(*payload); } -Status AddAuthorizationHeader(Options const& options, - RestRequestBuilder& builder) { - // In tests this option may not be set. And over time we want to retire it. - if (!options.has()) return {}; - auto auth_header = - options.get()->AuthorizationHeader(); - if (!auth_header) return AuthHeaderError(std::move(auth_header).status()); - builder.AddHeader("Authorization", std::string(absl::StripPrefix( - *auth_header, "Authorization: "))); - return {}; -} - void AddCustomHeaders(Options const& options, RestRequestBuilder& builder) { if (!options.has()) return; for (auto const& h : options.get()) { @@ -126,12 +115,26 @@ void AddCustomHeaders(Options const& options, RestRequestBuilder& builder) { } Status AddHeaders(Options const& options, RestRequestBuilder& builder) { - auto ah = AddAuthorizationHeader(options, builder); - if (!ah.ok()) return ah; AddCustomHeaders(options, builder); return {}; } +absl::optional GetEmulator() { + auto emulator = GetEnv("CLOUD_STORAGE_EMULATOR_ENDPOINT"); + if (emulator) return emulator; + return GetEnv("CLOUD_STORAGE_TESTBENCH_ENDPOINT"); +} + +std::string RestEndpoint(Options const& options) { + return GetEmulator().value_or(options.get()); +} + +std::string IamEndpoint(Options const& options) { + auto emulator = GetEmulator(); + if (emulator) return *emulator + "/iamapi"; + return options.get(); +} + } // namespace RestStub::RestStub(Options options) diff --git a/google/cloud/storage/internal/rest/stub.h b/google/cloud/storage/internal/rest/stub.h index d6a04a96c2a20..e0d100bc486cb 100644 --- a/google/cloud/storage/internal/rest/stub.h +++ b/google/cloud/storage/internal/rest/stub.h @@ -17,6 +17,7 @@ #include "google/cloud/storage/internal/generic_stub.h" #include "google/cloud/storage/internal/rest/request_builder.h" +#include "google/cloud/storage/options.h" #include "google/cloud/storage/version.h" #include "google/cloud/internal/random.h" #include "google/cloud/internal/rest_client.h" diff --git a/google/cloud/storage/internal/retry_object_read_source_test.cc b/google/cloud/storage/internal/retry_object_read_source_test.cc index dca08aeabfe08..f264e3e743539 100644 --- a/google/cloud/storage/internal/retry_object_read_source_test.cc +++ b/google/cloud/storage/internal/retry_object_read_source_test.cc @@ -489,7 +489,6 @@ TEST(RetryObjectReadSourceTest, DiscardDataForDecompressiveTranscoding) { Contains(Pair("x-test-only", "download 3 r1"))); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::DisableTracing; using ::google::cloud::testing_util::EnableTracing; using ::google::cloud::testing_util::SpanNamed; @@ -600,8 +599,6 @@ TEST(RetryObjectReadSourceTest, TracingDisabled) { EXPECT_THAT(spans, IsEmpty()); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - } // namespace } // namespace internal GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END diff --git a/google/cloud/storage/internal/sign_blob_requests.cc b/google/cloud/storage/internal/sign_blob_requests.cc index 7bfcdaec3a456..57be526663bf6 100644 --- a/google/cloud/storage/internal/sign_blob_requests.cc +++ b/google/cloud/storage/internal/sign_blob_requests.cc @@ -15,8 +15,8 @@ #include "google/cloud/storage/internal/sign_blob_requests.h" #include "google/cloud/storage/internal/http_response.h" #include "google/cloud/storage/internal/metadata_parser.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/make_status.h" +#include "absl/strings/str_join.h" #include #include diff --git a/google/cloud/storage/internal/signed_url_requests.cc b/google/cloud/storage/internal/signed_url_requests.cc index 7fa6aeb6c119f..6505b065b6e7d 100644 --- a/google/cloud/storage/internal/signed_url_requests.cc +++ b/google/cloud/storage/internal/signed_url_requests.cc @@ -13,11 +13,11 @@ // limitations under the License. #include "google/cloud/storage/internal/signed_url_requests.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/curl_handle.h" #include "google/cloud/internal/format_time_point.h" #include "google/cloud/internal/make_status.h" #include "google/cloud/internal/sha256_hash.h" +#include "absl/strings/str_join.h" #include "absl/strings/str_split.h" #include #include diff --git a/google/cloud/storage/internal/storage_auth_decorator.cc b/google/cloud/storage/internal/storage_auth_decorator.cc index da06fadad2694..53da6fc29644e 100644 --- a/google/cloud/storage/internal/storage_auth_decorator.cc +++ b/google/cloud/storage/internal/storage_auth_decorator.cc @@ -21,10 +21,13 @@ #include "google/cloud/internal/async_streaming_read_rpc_auth.h" #include "google/cloud/internal/async_streaming_write_rpc_auth.h" #include "google/cloud/internal/streaming_write_rpc_impl.h" -#include +#include "google/storage/v2/storage.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storage_internal { @@ -402,3 +405,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storage_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/storage/internal/storage_auth_decorator.h b/google/cloud/storage/internal/storage_auth_decorator.h index 952872c796350..c0a8225164980 100644 --- a/google/cloud/storage/internal/storage_auth_decorator.h +++ b/google/cloud/storage/internal/storage_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storage_internal { @@ -206,4 +209,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_STORAGE_AUTH_DECORATOR_H diff --git a/google/cloud/storage/internal/storage_connection.h b/google/cloud/storage/internal/storage_connection.h index 0cc24e6876125..a002570e6283f 100644 --- a/google/cloud/storage/internal/storage_connection.h +++ b/google/cloud/storage/internal/storage_connection.h @@ -16,7 +16,6 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_STORAGE_CONNECTION_H #include "google/cloud/storage/bucket_metadata.h" -#include "google/cloud/storage/client_options.h" #include "google/cloud/storage/internal/bucket_acl_requests.h" #include "google/cloud/storage/internal/bucket_requests.h" #include "google/cloud/storage/internal/default_object_acl_requests.h" @@ -29,7 +28,6 @@ #include "google/cloud/storage/internal/object_requests.h" #include "google/cloud/storage/internal/service_account_requests.h" #include "google/cloud/storage/internal/sign_blob_requests.h" -#include "google/cloud/storage/oauth2/credentials.h" #include "google/cloud/storage/object_metadata.h" #include "google/cloud/storage/object_read_stream.h" #include "google/cloud/storage/service_account.h" @@ -57,8 +55,6 @@ class StorageConnection { public: virtual ~StorageConnection() = default; - virtual ClientOptions const& client_options() const = 0; - virtual google::cloud::Options options() const { return {}; } ///@{ diff --git a/google/cloud/storage/internal/storage_connection_test.cc b/google/cloud/storage/internal/storage_connection_test.cc index 09c0e539bd234..54b23c3172d50 100644 --- a/google/cloud/storage/internal/storage_connection_test.cc +++ b/google/cloud/storage/internal/storage_connection_test.cc @@ -33,7 +33,6 @@ class TestStorageConnection : public StorageConnection { public: ~TestStorageConnection() override = default; // LCOV_EXCL_START - MOCK_METHOD(ClientOptions const&, client_options, (), (const, override)); MOCK_METHOD(StatusOr, ListBuckets, (ListBucketsRequest const&), (override)); MOCK_METHOD(StatusOr, CreateBucket, diff --git a/google/cloud/storage/internal/storage_logging_decorator.cc b/google/cloud/storage/internal/storage_logging_decorator.cc index 4bbb9223f347f..2d522fd8cf244 100644 --- a/google/cloud/storage/internal/storage_logging_decorator.cc +++ b/google/cloud/storage/internal/storage_logging_decorator.cc @@ -24,12 +24,15 @@ #include "google/cloud/internal/streaming_read_rpc_logging.h" #include "google/cloud/internal/streaming_write_rpc_logging.h" #include "google/cloud/status_or.h" -#include +#include "google/storage/v2/storage.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storage_internal { @@ -495,3 +498,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storage_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/storage/internal/storage_logging_decorator.h b/google/cloud/storage/internal/storage_logging_decorator.h index a889b442da7c9..423ca1fcbb141 100644 --- a/google/cloud/storage/internal/storage_logging_decorator.h +++ b/google/cloud/storage/internal/storage_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storage_internal { @@ -207,4 +210,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_STORAGE_LOGGING_DECORATOR_H diff --git a/google/cloud/storage/internal/storage_metadata_decorator.cc b/google/cloud/storage/internal/storage_metadata_decorator.cc index 6d21d4590c994..3d3ccc9d394a2 100644 --- a/google/cloud/storage/internal/storage_metadata_decorator.cc +++ b/google/cloud/storage/internal/storage_metadata_decorator.cc @@ -18,18 +18,21 @@ #include "google/cloud/storage/internal/storage_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/routing_matcher.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/storage/v2/storage.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storage_internal { @@ -727,3 +730,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storage_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/storage/internal/storage_metadata_decorator.h b/google/cloud/storage/internal/storage_metadata_decorator.h index a4667ae73a67e..17d1589fd1f58 100644 --- a/google/cloud/storage/internal/storage_metadata_decorator.h +++ b/google/cloud/storage/internal/storage_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storage_internal { @@ -211,4 +214,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_STORAGE_METADATA_DECORATOR_H diff --git a/google/cloud/storage/internal/storage_round_robin_decorator.cc b/google/cloud/storage/internal/storage_round_robin_decorator.cc index 501460011cd03..97651673f61ae 100644 --- a/google/cloud/storage/internal/storage_round_robin_decorator.cc +++ b/google/cloud/storage/internal/storage_round_robin_decorator.cc @@ -21,6 +21,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storage_internal { @@ -277,3 +280,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storage_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/storage/internal/storage_round_robin_decorator.h b/google/cloud/storage/internal/storage_round_robin_decorator.h index f1af4daea07ee..714622e727e7c 100644 --- a/google/cloud/storage/internal/storage_round_robin_decorator.h +++ b/google/cloud/storage/internal/storage_round_robin_decorator.h @@ -25,6 +25,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storage_internal { @@ -207,4 +210,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_STORAGE_ROUND_ROBIN_DECORATOR_H diff --git a/google/cloud/storage/internal/storage_stub.cc b/google/cloud/storage/internal/storage_stub.cc index 716556f4d2f76..70ceb62cdfba5 100644 --- a/google/cloud/storage/internal/storage_stub.cc +++ b/google/cloud/storage/internal/storage_stub.cc @@ -23,10 +23,13 @@ #include "google/cloud/internal/async_streaming_write_rpc_impl.h" #include "google/cloud/internal/streaming_write_rpc_impl.h" #include "google/cloud/status_or.h" -#include +#include "google/storage/v2/storage.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storage_internal { @@ -453,3 +456,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storage_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/storage/internal/storage_stub.h b/google/cloud/storage/internal/storage_stub.h index ca8dde86c7564..135f474739207 100644 --- a/google/cloud/storage/internal/storage_stub.h +++ b/google/cloud/storage/internal/storage_stub.h @@ -29,10 +29,13 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/storage/v2/storage.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storage_internal { @@ -373,4 +376,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_STORAGE_STUB_H diff --git a/google/cloud/storage/internal/storage_stub_factory_test.cc b/google/cloud/storage/internal/storage_stub_factory_test.cc index e7464a9254e34..4505906939c7e 100644 --- a/google/cloud/storage/internal/storage_stub_factory_test.cc +++ b/google/cloud/storage/internal/storage_stub_factory_test.cc @@ -258,7 +258,6 @@ TEST_F(StorageStubFactory, QueryWriteStatus) { EXPECT_THAT(log.ExtractLines(), Contains(HasSubstr("QueryWriteStatus"))); } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY using ::google::cloud::testing_util::DisableTracing; using ::google::cloud::testing_util::EnableTracing; using ::google::cloud::testing_util::SpanNamed; @@ -315,7 +314,6 @@ TEST_F(StorageStubFactory, TracingDisabled) { EXPECT_THAT(span_catcher->GetSpans(), IsEmpty()); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END diff --git a/google/cloud/storage/internal/storage_tracing_stub.cc b/google/cloud/storage/internal/storage_tracing_stub.cc index f78e0e85ec7d4..09043577736f5 100644 --- a/google/cloud/storage/internal/storage_tracing_stub.cc +++ b/google/cloud/storage/internal/storage_tracing_stub.cc @@ -26,13 +26,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storage_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - StorageTracingStub::StorageTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -432,18 +433,14 @@ StorageTracingStub::AsyncQueryWriteStatus( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeStorageTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storage_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/storage/internal/storage_tracing_stub.h b/google/cloud/storage/internal/storage_tracing_stub.h index 68c2d70b1cda6..74e639e517b75 100644 --- a/google/cloud/storage/internal/storage_tracing_stub.h +++ b/google/cloud/storage/internal/storage_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storage_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class StorageTracingStub : public StorageStub { public: ~StorageTracingStub() override = default; @@ -202,8 +203,6 @@ class StorageTracingStub : public StorageStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -218,4 +217,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_STORAGE_TRACING_STUB_H diff --git a/google/cloud/storage/internal/tracing_connection.cc b/google/cloud/storage/internal/tracing_connection.cc index a282a1133cc08..6d7e20a2d349b 100644 --- a/google/cloud/storage/internal/tracing_connection.cc +++ b/google/cloud/storage/internal/tracing_connection.cc @@ -26,14 +26,9 @@ namespace cloud { namespace storage_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TracingConnection::TracingConnection(std::shared_ptr impl) : impl_(std::move(impl)) {} -storage::ClientOptions const& TracingConnection::client_options() const { - return impl_->client_options(); -} Options TracingConnection::options() const { return impl_->options(); } StatusOr TracingConnection::ListBuckets( @@ -507,15 +502,6 @@ std::shared_ptr MakeTracingClient( return std::make_shared(std::move(impl)); } -#else - -std::shared_ptr MakeTracingClient( - std::shared_ptr impl) { - return impl; -} - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storage_internal } // namespace cloud diff --git a/google/cloud/storage/internal/tracing_connection.h b/google/cloud/storage/internal/tracing_connection.h index c59ec011d91ec..45df6239f956d 100644 --- a/google/cloud/storage/internal/tracing_connection.h +++ b/google/cloud/storage/internal/tracing_connection.h @@ -27,14 +27,11 @@ namespace cloud { namespace storage_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TracingConnection : public storage::internal::StorageConnection { public: explicit TracingConnection(std::shared_ptr impl); ~TracingConnection() override = default; - storage::ClientOptions const& client_options() const override; Options options() const override; StatusOr ListBuckets( @@ -184,8 +181,6 @@ class TracingConnection : public storage::internal::StorageConnection { std::shared_ptr impl_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTracingClient( std::shared_ptr impl); diff --git a/google/cloud/storage/internal/tracing_connection_test.cc b/google/cloud/storage/internal/tracing_connection_test.cc index 9e952293db9eb..bda9bc46d0a2d 100644 --- a/google/cloud/storage/internal/tracing_connection_test.cc +++ b/google/cloud/storage/internal/tracing_connection_test.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/storage/internal/tracing_connection.h" #include "google/cloud/storage/object_read_stream.h" #include "google/cloud/storage/testing/canonical_errors.h" @@ -1491,5 +1489,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storage_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/storage/internal/tracing_object_read_source.cc b/google/cloud/storage/internal/tracing_object_read_source.cc index 4dc148b1937fa..f6f642a9cd132 100644 --- a/google/cloud/storage/internal/tracing_object_read_source.cc +++ b/google/cloud/storage/internal/tracing_object_read_source.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/storage/internal/tracing_object_read_source.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/status.h" @@ -80,5 +78,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storage_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/storage/internal/tracing_object_read_source.h b/google/cloud/storage/internal/tracing_object_read_source.h index 2914d33584627..2c608f6982565 100644 --- a/google/cloud/storage/internal/tracing_object_read_source.h +++ b/google/cloud/storage/internal/tracing_object_read_source.h @@ -15,8 +15,6 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_TRACING_OBJECT_READ_SOURCE_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_TRACING_OBJECT_READ_SOURCE_H -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/storage/internal/object_read_source.h" #include "google/cloud/storage/version.h" #include "google/cloud/internal/opentelemetry.h" @@ -57,6 +55,4 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_TRACING_OBJECT_READ_SOURCE_H diff --git a/google/cloud/storage/internal/tracing_object_read_source_test.cc b/google/cloud/storage/internal/tracing_object_read_source_test.cc index 56edc4e4974b0..43869203758fe 100644 --- a/google/cloud/storage/internal/tracing_object_read_source_test.cc +++ b/google/cloud/storage/internal/tracing_object_read_source_test.cc @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - #include "google/cloud/storage/internal/tracing_object_read_source.h" #include "google/cloud/storage/testing/canonical_errors.h" #include "google/cloud/storage/testing/mock_client.h" @@ -205,5 +203,3 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storage_internal } // namespace cloud } // namespace google - -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/storage/internal/unified_rest_credentials.cc b/google/cloud/storage/internal/unified_rest_credentials.cc deleted file mode 100644 index 88045788f734b..0000000000000 --- a/google/cloud/storage/internal/unified_rest_credentials.cc +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/storage/internal/unified_rest_credentials.h" -#include "google/cloud/storage/internal/access_token_credentials.h" -#include "google/cloud/storage/internal/error_credentials.h" -#include "google/cloud/storage/internal/impersonate_service_account_credentials.h" -#include "google/cloud/storage/oauth2/google_credentials.h" -#include "google/cloud/storage/oauth2/service_account_credentials.h" -#include "google/cloud/internal/getenv.h" -#include "google/cloud/internal/oauth2_access_token_credentials.h" -#include "google/cloud/internal/oauth2_compute_engine_credentials.h" -#include "google/cloud/internal/oauth2_credentials.h" -#include "google/cloud/internal/oauth2_decorate_credentials.h" -#include "google/cloud/internal/oauth2_external_account_credentials.h" -#include "google/cloud/internal/oauth2_google_credentials.h" -#include "google/cloud/internal/oauth2_service_account_credentials.h" -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace internal { -namespace { - -using ::google::cloud::internal::AccessTokenConfig; -using ::google::cloud::internal::ApiKeyConfig; -using ::google::cloud::internal::ComputeEngineCredentialsConfig; -using ::google::cloud::internal::CredentialsVisitor; -using ::google::cloud::internal::ErrorCredentialsConfig; -using ::google::cloud::internal::ExternalAccountConfig; -using ::google::cloud::internal::GoogleDefaultCredentialsConfig; -using ::google::cloud::internal::ImpersonateServiceAccountConfig; -using ::google::cloud::internal::InsecureCredentialsConfig; -using ::google::cloud::internal::ServiceAccountConfig; -using ::google::cloud::oauth2_internal::Decorate; - -std::shared_ptr MakeErrorCredentials(Status status) { - return std::make_shared(std::move(status)); -} - -class WrapRestCredentials : public oauth2::Credentials { - public: - explicit WrapRestCredentials( - std::shared_ptr impl) - : impl_(std::move(impl)) {} - - StatusOr AuthorizationHeader() override { - return oauth2_internal::AuthenticationHeaderJoined(*impl_); - } - - StatusOr> SignBlob( - SigningAccount const& signing_account, - std::string const& blob) const override { - return impl_->SignBlob(signing_account.value_or(impl_->AccountEmail()), - blob); - } - - std::string AccountEmail() const override { return impl_->AccountEmail(); } - std::string KeyId() const override { return impl_->KeyId(); } - - private: - std::shared_ptr impl_; -}; - -} // namespace - -std::shared_ptr MapCredentials( - google::cloud::Credentials const& credentials) { - class RestVisitor : public CredentialsVisitor { - public: - explicit RestVisitor(oauth2_internal::HttpClientFactory client_factory) - : client_factory_(std::move(client_factory)) {} - - std::shared_ptr result; - - void visit(ErrorCredentialsConfig const& cfg) override { - result = MakeErrorCredentials(cfg.status()); - } - - void visit(InsecureCredentialsConfig const&) override { - result = google::cloud::storage::oauth2::CreateAnonymousCredentials(); - } - void visit(GoogleDefaultCredentialsConfig const& cfg) override { - auto credentials = oauth2_internal::GoogleDefaultCredentials( - cfg.options(), std::move(client_factory_)); - if (credentials) { - result = std::make_shared( - Decorate(*std::move(credentials), cfg.options())); - return; - } - result = MakeErrorCredentials(std::move(credentials).status()); - } - void visit(AccessTokenConfig const& cfg) override { - result = std::make_shared(cfg.access_token()); - } - void visit(ImpersonateServiceAccountConfig const& config) override { - result = std::make_shared(config); - } - void visit(ServiceAccountConfig const& cfg) override { - auto info = oauth2::ParseServiceAccountCredentials(cfg.json_object(), {}); - if (!info) { - result = MakeErrorCredentials(std::move(info).status()); - return; - } - auto impl = std::make_shared( - internal::MapServiceAccountCredentialsInfo(*std::move(info)), - cfg.options(), std::move(client_factory_)); - result = - std::make_shared(WithCaching(std::move(impl))); - } - - void visit(ExternalAccountConfig const& cfg) override { - auto const ec = google::cloud::internal::ErrorContext(); - auto info = oauth2_internal::ParseExternalAccountConfiguration( - cfg.json_object(), ec); - if (!info) { - result = std::make_shared(std::move(info).status()); - return; - } - auto impl = std::make_shared( - *info, std::move(client_factory_), cfg.options()); - result = std::make_shared( - Decorate(std::move(impl), cfg.options())); - } - void visit(internal::ApiKeyConfig const&) override { - // Circa 2024, GCS does not support API key authentication. Moreover, we - // would have to grow the deprecated `storage::oauth2::Credentials` class - // to support setting the `x-goog-api-key` header. For these reasons, we - // just return anonymous (no-op) credentials. - result = google::cloud::storage::oauth2::CreateAnonymousCredentials(); - } - void visit(internal::ComputeEngineCredentialsConfig const& cfg) override { - result = std::make_shared( - Decorate(std::make_shared( - cfg.options(), std::move(client_factory_)), - cfg.options())); - } - - private: - oauth2_internal::HttpClientFactory client_factory_; - }; - - RestVisitor visitor([](Options const& o) { - return rest_internal::MakeDefaultRestClient(std::string{}, o); - }); - CredentialsVisitor::dispatch(credentials, visitor); - return std::move(visitor.result); -} - -} // namespace internal -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google diff --git a/google/cloud/storage/internal/unified_rest_credentials.h b/google/cloud/storage/internal/unified_rest_credentials.h deleted file mode 100644 index 480cfaddea161..0000000000000 --- a/google/cloud/storage/internal/unified_rest_credentials.h +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_UNIFIED_REST_CREDENTIALS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_UNIFIED_REST_CREDENTIALS_H - -#include "google/cloud/storage/oauth2/credentials.h" -#include "google/cloud/storage/version.h" -#include "google/cloud/credentials.h" -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace internal { - -std::shared_ptr MapCredentials( - google::cloud::Credentials const& credentials); - -} // namespace internal -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_UNIFIED_REST_CREDENTIALS_H diff --git a/google/cloud/storage/internal/unified_rest_credentials_test.cc b/google/cloud/storage/internal/unified_rest_credentials_test.cc deleted file mode 100644 index 237d7cacdb7d3..0000000000000 --- a/google/cloud/storage/internal/unified_rest_credentials_test.cc +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/storage/internal/unified_rest_credentials.h" -#include "google/cloud/storage/testing/constants.h" -#include "google/cloud/internal/credentials_impl.h" -#include "google/cloud/internal/filesystem.h" -#include "google/cloud/internal/random.h" -#include "google/cloud/testing_util/scoped_environment.h" -#include "google/cloud/testing_util/status_matchers.h" -#include -#include -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace internal { -namespace { - -using ::google::cloud::MakeAccessTokenCredentials; -using ::google::cloud::MakeGoogleDefaultCredentials; -using ::google::cloud::MakeInsecureCredentials; -using ::google::cloud::testing_util::IsOk; -using ::google::cloud::testing_util::ScopedEnvironment; -using ::google::cloud::testing_util::StatusIs; -using ::testing::IsEmpty; - -class UnifiedRestCredentialsTest : public ::testing::Test { - public: - UnifiedRestCredentialsTest() : generator_(std::random_device{}()) {} - - std::string TempKeyFileName() { - return google::cloud::internal::PathAppend( - ::testing::TempDir(), - ::google::cloud::internal::Sample( - generator_, 16, "abcdefghijlkmnopqrstuvwxyz0123456789") + - ".json"); - } - - private: - google::cloud::internal::DefaultPRNG generator_; -}; - -TEST_F(UnifiedRestCredentialsTest, Insecure) { - auto credentials = MapCredentials(*MakeInsecureCredentials()); - auto header = credentials->AuthorizationHeader(); - ASSERT_THAT(header, IsOk()); - EXPECT_THAT(*header, IsEmpty()); -} - -TEST_F(UnifiedRestCredentialsTest, Error) { - Status const error_status{StatusCode::kFailedPrecondition, - "Precondition failed."}; - auto credentials = MapCredentials( - *google::cloud::internal::MakeErrorCredentials(error_status)); - auto header = credentials->AuthorizationHeader(); - EXPECT_THAT(header, StatusIs(error_status.code())); -} - -TEST_F(UnifiedRestCredentialsTest, AccessToken) { - auto credentials = MapCredentials( - *MakeAccessTokenCredentials("token1", std::chrono::system_clock::now())); - for (std::string expected : {"token1", "token1", "token1"}) { - auto header = credentials->AuthorizationHeader(); - ASSERT_THAT(header, IsOk()); - EXPECT_EQ("Authorization: Bearer " + expected, *header); - } -} - -TEST_F(UnifiedRestCredentialsTest, LoadError) { - // Create a name for a non-existing file, try to load it, and verify it - // returns errors. - auto const filename = TempKeyFileName(); - ScopedEnvironment env("GOOGLE_APPLICATION_CREDENTIALS", filename); - - auto credentials = MapCredentials(*MakeGoogleDefaultCredentials()); - EXPECT_THAT(credentials->AuthorizationHeader(), Not(IsOk())); -} - -TEST_F(UnifiedRestCredentialsTest, LoadSuccess) { - // Create a loadable, i.e., syntactically valid, key file, load it, and it - // has the right contents. - auto constexpr kKeyId = "test-only-key-id"; - auto constexpr kClientEmail = - "sa@invalid-test-only-project.iam.gserviceaccount.com"; - auto contents = nlohmann::json{ - {"type", "service_account"}, - {"project_id", "invalid-test-only-project"}, - {"private_key_id", kKeyId}, - {"private_key", google::cloud::storage::testing::kWellFormattedKey}, - {"client_email", kClientEmail}, - {"client_id", "invalid-test-only-client-id"}, - {"auth_uri", "https://accounts.google.com/o/oauth2/auth"}, - {"token_uri", "https://accounts.google.com/o/oauth2/token"}, - {"auth_provider_x509_cert_url", - "https://www.googleapis.com/oauth2/v1/certs"}, - {"client_x509_cert_url", - "https://www.googleapis.com/robot/v1/metadata/x509/" - "foo-email%40foo-project.iam.gserviceaccount.com"}, - }; - auto const filename = TempKeyFileName(); - std::ofstream(filename) << contents.dump(4) << "\n"; - - ScopedEnvironment env("GOOGLE_APPLICATION_CREDENTIALS", filename); - - auto credentials = MapCredentials(*MakeGoogleDefaultCredentials()); - // Calling AuthenticationHeader() makes RPCs which would turn this into an - // integration test, fortunately there are easier ways to verify the file was - // loaded correctly: - EXPECT_EQ(kClientEmail, credentials->AccountEmail()); - EXPECT_EQ(kKeyId, credentials->KeyId()); - - std::remove(filename.c_str()); -} - -} // namespace -} // namespace internal -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google diff --git a/google/cloud/storage/lifecycle_rule.cc b/google/cloud/storage/lifecycle_rule.cc index b8d00ec3ce7f0..837d98e377e3f 100644 --- a/google/cloud/storage/lifecycle_rule.cc +++ b/google/cloud/storage/lifecycle_rule.cc @@ -13,7 +13,7 @@ // limitations under the License. #include "google/cloud/storage/lifecycle_rule.h" -#include "google/cloud/internal/absl_str_join_quiet.h" +#include "absl/strings/str_join.h" #include #include #include diff --git a/google/cloud/storage/notification_metadata.cc b/google/cloud/storage/notification_metadata.cc index a14c4da41f58b..6f763f2a85d92 100644 --- a/google/cloud/storage/notification_metadata.cc +++ b/google/cloud/storage/notification_metadata.cc @@ -14,7 +14,7 @@ #include "google/cloud/storage/notification_metadata.h" #include "google/cloud/storage/internal/notification_requests.h" -#include "google/cloud/internal/absl_str_join_quiet.h" +#include "absl/strings/str_join.h" #include #include diff --git a/google/cloud/storage/oauth2/anonymous_credentials.cc b/google/cloud/storage/oauth2/anonymous_credentials.cc deleted file mode 100644 index faaf664a95e18..0000000000000 --- a/google/cloud/storage/oauth2/anonymous_credentials.cc +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/storage/oauth2/anonymous_credentials.h" - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace oauth2 { - -StatusOr AnonymousCredentials::AuthorizationHeader() { - return std::string{}; -} - -} // namespace oauth2 -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google diff --git a/google/cloud/storage/oauth2/anonymous_credentials.h b/google/cloud/storage/oauth2/anonymous_credentials.h deleted file mode 100644 index d127eb0fcfa09..0000000000000 --- a/google/cloud/storage/oauth2/anonymous_credentials.h +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OAUTH2_ANONYMOUS_CREDENTIALS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OAUTH2_ANONYMOUS_CREDENTIALS_H - -#include "google/cloud/storage/oauth2/credentials.h" -#include "google/cloud/storage/version.h" -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace oauth2 { - -/** - * A `Credentials` type representing "anonymous" Google OAuth2.0 credentials. - * - * This is only useful in two cases: (a) in testing, where you want to access - * a test bench without having to worry about authentication or SSL setup, and - * (b) when accessing publicly readable resources (e.g. a Google Cloud Storage - * object that is readable by the "allUsers" entity), which requires no - * authentication or authorization. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -class AnonymousCredentials : public Credentials { - public: - AnonymousCredentials() = default; - - /** - * While other Credentials subclasses return a string containing an - * Authorization HTTP header from this method, this class always returns an - * empty string as its value. - */ - StatusOr AuthorizationHeader() override; -}; - -} // namespace oauth2 -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OAUTH2_ANONYMOUS_CREDENTIALS_H diff --git a/google/cloud/storage/oauth2/anonymous_credentials_test.cc b/google/cloud/storage/oauth2/anonymous_credentials_test.cc deleted file mode 100644 index 3404352fb6075..0000000000000 --- a/google/cloud/storage/oauth2/anonymous_credentials_test.cc +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/storage/oauth2/anonymous_credentials.h" -#include "google/cloud/testing_util/status_matchers.h" -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace oauth2 { -namespace { - -class AnonymousCredentialsTest : public ::testing::Test {}; - -/// @test Verify `AnonymousCredentials` works as expected. -TEST_F(AnonymousCredentialsTest, AuthorizationHeaderReturnsEmptyString) { - AnonymousCredentials credentials; - auto header = credentials.AuthorizationHeader(); - ASSERT_STATUS_OK(header); - EXPECT_EQ("", header.value()); -} - -} // namespace -} // namespace oauth2 -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google diff --git a/google/cloud/storage/oauth2/authorized_user_credentials.cc b/google/cloud/storage/oauth2/authorized_user_credentials.cc deleted file mode 100644 index d17956c5c7d49..0000000000000 --- a/google/cloud/storage/oauth2/authorized_user_credentials.cc +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/storage/oauth2/authorized_user_credentials.h" -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace oauth2 { - -StatusOr ParseAuthorizedUserCredentials( - std::string const& content, std::string const& source, - std::string const& default_token_uri) { - auto info = google::cloud::oauth2_internal::ParseAuthorizedUserCredentials( - content, source, default_token_uri); - if (!info.ok()) return info.status(); - AuthorizedUserCredentialsInfo i; - i.token_uri = std::move(info->token_uri); - i.refresh_token = std::move(info->refresh_token); - i.client_secret = std::move(info->client_secret); - i.client_id = std::move(info->client_id); - return i; -} - -StatusOr -ParseAuthorizedUserRefreshResponse( - storage::internal::HttpResponse const& response, - std::chrono::system_clock::time_point now) { - auto access_token = nlohmann::json::parse(response.payload, nullptr, false); - if (!access_token.is_object() || access_token.count("access_token") == 0 || - access_token.count("expires_in") == 0 || - access_token.count("id_token") == 0 || - access_token.count("token_type") == 0) { - auto payload = - response.payload + - "Could not find all required fields in response (access_token," - " id_token, expires_in, token_type) while trying to obtain an access" - " token for authorized user credentials."; - return AsStatus(storage::internal::HttpResponse{response.status_code, - payload, response.headers}); - } - std::string header = "Authorization: "; - header += access_token.value("token_type", ""); - header += ' '; - header += access_token.value("access_token", ""); - std::string new_id = access_token.value("id_token", ""); - auto expires_in = std::chrono::seconds(access_token.value("expires_in", 0)); - auto new_expiration = now + expires_in; - return RefreshingCredentialsWrapper::TemporaryToken{std::move(header), - new_expiration}; -} - -AuthorizedUserCredentials:: - AuthorizedUserCredentials(AuthorizedUserCredentialsInfo const& info, - ChannelOptions const& channel_options) - : AuthorizedUserCredentials( - google::cloud::oauth2_internal::AuthorizedUserCredentialsInfo{ - info.client_id, info.client_secret, info.refresh_token, - info.token_uri, info.universe_domain}, - channel_options) {} - -AuthorizedUserCredentials:: - AuthorizedUserCredentials( - google::cloud::oauth2_internal::AuthorizedUserCredentialsInfo info, - ChannelOptions const& channel_options) - : AuthorizedUserCredentials( - std::move(info), - Options{}.set(channel_options.ssl_root_path()), - [](Options const& o) { - return rest_internal::MakeDefaultRestClient(std::string{}, o); - }) {} - -AuthorizedUserCredentials:: - AuthorizedUserCredentials( - google::cloud::oauth2_internal::AuthorizedUserCredentialsInfo info, - Options options, oauth2_internal::HttpClientFactory client_factory) - : impl_(std::make_shared( - std::make_shared( - std::move(info), std::move(options), - std::move(client_factory)))) {} - -} // namespace oauth2 -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google diff --git a/google/cloud/storage/oauth2/authorized_user_credentials.h b/google/cloud/storage/oauth2/authorized_user_credentials.h deleted file mode 100644 index 240698c47da9c..0000000000000 --- a/google/cloud/storage/oauth2/authorized_user_credentials.h +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OAUTH2_AUTHORIZED_USER_CREDENTIALS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OAUTH2_AUTHORIZED_USER_CREDENTIALS_H - -#include "google/cloud/storage/client_options.h" -#include "google/cloud/storage/internal/curl/request_builder.h" -#include "google/cloud/storage/internal/http_response.h" -#include "google/cloud/storage/oauth2/credential_constants.h" -#include "google/cloud/storage/oauth2/credentials.h" -#include "google/cloud/storage/oauth2/refreshing_credentials_wrapper.h" -#include "google/cloud/storage/version.h" -#include "google/cloud/internal/curl_handle_factory.h" -#include "google/cloud/internal/oauth2_authorized_user_credentials.h" -#include "google/cloud/internal/oauth2_cached_credentials.h" -#include "google/cloud/internal/oauth2_credential_constants.h" -#include "google/cloud/status.h" -#include -#include -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace oauth2 { - -/** - * Object to hold information used to instantiate an AuthorizedUserCredentials. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -struct AuthorizedUserCredentialsInfo { - std::string client_id; - std::string client_secret; - std::string refresh_token; - std::string token_uri; - std::string universe_domain; -}; - -/** - * Parses a refresh response JSON string into an authorization header. - * - * The header and the current time (for the expiration) form a TemporaryToken. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -StatusOr -ParseAuthorizedUserRefreshResponse( - storage::internal::HttpResponse const& response, - std::chrono::system_clock::time_point now); - -/** - * Parses a user credentials JSON string into an AuthorizedUserCredentialsInfo. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -StatusOr ParseAuthorizedUserCredentials( - std::string const& content, std::string const& source, - std::string const& default_token_uri = - google::cloud::oauth2_internal::GoogleOAuthRefreshEndpoint()); - -/** - * Wrapper class for Google OAuth 2.0 user account credentials. - * - * Takes a AuthorizedUserCredentialsInfo and obtains access tokens from the - * Google Authorization Service as needed. Instances of this class should - * usually be created via the convenience methods declared in - * google_credentials.h. - * - * An HTTP Authorization header, with an access token as its value, - * can be obtained by calling the AuthorizationHeader() method; if the current - * access token is invalid or nearing expiration, this will class will first - * obtain a new access token before returning the Authorization header string. - * - * @see https://developers.google.com/identity/protocols/OAuth2 for an overview - * of using user credentials with Google's OAuth 2.0 system. - * - * @tparam HttpRequestBuilderType a dependency injection point. It makes it - * possible to mock internal libcurl wrappers. This should generally not be - * overridden except for testing. - * @tparam ClockType a dependency injection point to fetch the current time. - * This should generally not be overridden except for testing. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -template -class AuthorizedUserCredentials; - -/// @copydoc AuthorizedUserCredentials -template <> -class AuthorizedUserCredentials - : public Credentials { - public: - explicit AuthorizedUserCredentials( - AuthorizedUserCredentialsInfo const& info, - ChannelOptions const& channel_options = {}); - - explicit AuthorizedUserCredentials( - google::cloud::oauth2_internal::AuthorizedUserCredentialsInfo info, - ChannelOptions const& channel_options = {}); - - StatusOr AuthorizationHeader() override { - return oauth2_internal::AuthenticationHeaderJoined(*impl_); - } - - private: - friend struct AuthorizedUserCredentialsTester; - AuthorizedUserCredentials( - google::cloud::oauth2_internal::AuthorizedUserCredentialsInfo, - Options options, oauth2_internal::HttpClientFactory client_factory); - - StatusOr AuthorizationHeaderForTesting( - std::chrono::system_clock::time_point tp) { - return oauth2_internal::AuthenticationHeaderJoined(*impl_, tp); - } - - std::shared_ptr impl_; -}; - -/// @copydoc AuthorizedUserCredentials -template -class AuthorizedUserCredentials : public Credentials { - public: - explicit AuthorizedUserCredentials(AuthorizedUserCredentialsInfo info, - ChannelOptions const& channel_options = {}) - : info_(std::move(info)), - options_(Options{}.set( - channel_options.ssl_root_path())), - clock_() {} - - StatusOr AuthorizationHeader() override { - std::unique_lock lock(mu_); - return refreshing_creds_.AuthorizationHeader(clock_.now(), - [this] { return Refresh(); }); - } - - private: - StatusOr Refresh() { - HttpRequestBuilderType builder( - info_.token_uri, rest_internal::GetDefaultCurlHandleFactory(options_)); - std::string payload("grant_type=refresh_token"); - payload += "&client_id="; - payload += builder.MakeEscapedString(info_.client_id).get(); - payload += "&client_secret="; - payload += builder.MakeEscapedString(info_.client_secret).get(); - payload += "&refresh_token="; - payload += builder.MakeEscapedString(info_.refresh_token).get(); - auto response = std::move(builder).BuildRequest().MakeRequest(payload); - if (!response) return std::move(response).status(); - if (response->status_code >= 300) return AsStatus(*response); - return ParseAuthorizedUserRefreshResponse(*response, clock_.now()); - } - - AuthorizedUserCredentialsInfo info_; - Options options_; - ClockType clock_; - mutable std::mutex mu_; - RefreshingCredentialsWrapper refreshing_creds_; -}; - -} // namespace oauth2 -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OAUTH2_AUTHORIZED_USER_CREDENTIALS_H diff --git a/google/cloud/storage/oauth2/authorized_user_credentials_test.cc b/google/cloud/storage/oauth2/authorized_user_credentials_test.cc deleted file mode 100644 index 141872cd2e76c..0000000000000 --- a/google/cloud/storage/oauth2/authorized_user_credentials_test.cc +++ /dev/null @@ -1,504 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/storage/oauth2/authorized_user_credentials.h" -#include "google/cloud/storage/oauth2/credential_constants.h" -#include "google/cloud/storage/testing/mock_http_request.h" -#include "google/cloud/testing_util/mock_fake_clock.h" -#include "google/cloud/testing_util/mock_http_payload.h" -#include "google/cloud/testing_util/mock_rest_client.h" -#include "google/cloud/testing_util/mock_rest_response.h" -#include "google/cloud/testing_util/status_matchers.h" -#include -#include -#include -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace oauth2 { - -// Define a helper to test the specialization. -struct AuthorizedUserCredentialsTester { - static StatusOr Header( - AuthorizedUserCredentials<>& tested, - std::chrono::system_clock::time_point tp) { - return tested.AuthorizationHeaderForTesting(tp); - } - - static AuthorizedUserCredentials<> MakeAuthorizedUserCredentials( - google::cloud::oauth2_internal::AuthorizedUserCredentialsInfo info, - oauth2_internal::HttpClientFactory factory) { - return AuthorizedUserCredentials<>(std::move(info), Options{}, - std::move(factory)); - } -}; - -namespace { - -using ::google::cloud::storage::internal::HttpResponse; -using ::google::cloud::storage::testing::MockHttpRequest; -using ::google::cloud::storage::testing::MockHttpRequestBuilder; -using ::google::cloud::testing_util::FakeClock; -using ::google::cloud::testing_util::IsOk; -using ::google::cloud::testing_util::IsOkAndHolds; -using ::google::cloud::testing_util::MakeMockHttpPayloadSuccess; -using ::google::cloud::testing_util::MockRestClient; -using ::google::cloud::testing_util::MockRestResponse; -using ::google::cloud::testing_util::StatusIs; -using ::testing::_; -using ::testing::AllOf; -using ::testing::An; -using ::testing::AtLeast; -using ::testing::ByMove; -using ::testing::HasSubstr; -using ::testing::Not; -using ::testing::Return; -using ::testing::StrEq; - -class AuthorizedUserCredentialsTest : public ::testing::Test { - protected: - void SetUp() override { - MockHttpRequestBuilder::mock_ = - std::make_shared(); - } - void TearDown() override { MockHttpRequestBuilder::mock_.reset(); } -}; - -/// @test Verify that we can create credentials from a JWT string. -TEST_F(AuthorizedUserCredentialsTest, Simple) { - std::string response = R"""({ - "token_type": "Type", - "access_token": "access-token-value", - "id_token": "id-token-value", - "expires_in": 1234 -})"""; - auto mock_request = std::make_shared(); - EXPECT_CALL(*mock_request, MakeRequest) - .WillOnce([response](std::string const& payload) { - EXPECT_THAT(payload, HasSubstr("grant_type=refresh_token")); - EXPECT_THAT(payload, HasSubstr("client_id=a-client-id.example.com")); - EXPECT_THAT(payload, HasSubstr("client_secret=a-123456ABCDEF")); - EXPECT_THAT(payload, HasSubstr("refresh_token=1/THETOKEN")); - return HttpResponse{200, response, {}}; - }); - - auto mock_builder = MockHttpRequestBuilder::mock_; - EXPECT_CALL(*mock_builder, - Constructor(StrEq("https://oauth2.googleapis.com/token"), _, _)) - .Times(1); - EXPECT_CALL(*mock_builder, BuildRequest()).WillOnce([mock_request]() { - MockHttpRequest result; - result.mock = mock_request; - return result; - }); - EXPECT_CALL(*mock_builder, MakeEscapedString) - .WillRepeatedly([](std::string const& s) { - auto t = std::unique_ptr(new char[s.size() + 1]); - std::copy(s.begin(), s.end(), t.get()); - t[s.size()] = '\0'; - return t; - }); - - std::string config = R"""({ - "client_id": "a-client-id.example.com", - "client_secret": "a-123456ABCDEF", - "refresh_token": "1/THETOKEN", - "type": "magic_type" -})"""; - - auto info = ParseAuthorizedUserCredentials(config, "test"); - ASSERT_STATUS_OK(info); - AuthorizedUserCredentials credentials(*info); - EXPECT_EQ("Authorization: Type access-token-value", - credentials.AuthorizationHeader().value()); -} - -/// @test Verify that we can refresh service account credentials. -TEST_F(AuthorizedUserCredentialsTest, Refresh) { - // Prepare two responses, the first one is used but becomes immediately - // expired, resulting in another refresh next time the caller tries to get - // an authorization header. - std::string r1 = R"""({ - "token_type": "Type", - "access_token": "access-token-r1", - "id_token": "id-token-value", - "expires_in": 0 -})"""; - std::string r2 = R"""({ - "token_type": "Type", - "access_token": "access-token-r2", - "id_token": "id-token-value", - "expires_in": 1000 -})"""; - - // Now setup the builder to return those responses. - auto mock_builder = MockHttpRequestBuilder::mock_; - EXPECT_CALL(*mock_builder, BuildRequest()) - .WillOnce([&] { - MockHttpRequest request; - EXPECT_CALL(*request.mock, MakeRequest) - .WillOnce(Return(HttpResponse{200, r1, {}})); - return request; - }) - .WillOnce([&] { - MockHttpRequest request; - EXPECT_CALL(*request.mock, MakeRequest) - .WillOnce(Return(HttpResponse{200, r2, {}})); - return request; - }); - EXPECT_CALL(*mock_builder, Constructor(GoogleOAuthRefreshEndpoint(), _, _)) - .Times(AtLeast(1)); - EXPECT_CALL(*mock_builder, MakeEscapedString) - .WillRepeatedly([](std::string const& s) { - auto t = std::unique_ptr(new char[s.size() + 1]); - std::copy(s.begin(), s.end(), t.get()); - t[s.size()] = '\0'; - return t; - }); - - std::string config = R"""({ - "client_id": "a-client-id.example.com", - "client_secret": "a-123456ABCDEF", - "refresh_token": "1/THETOKEN", - "type": "magic_type" -})"""; - auto info = ParseAuthorizedUserCredentials(config, "test"); - ASSERT_STATUS_OK(info); - AuthorizedUserCredentials credentials(*info); - EXPECT_EQ("Authorization: Type access-token-r1", - credentials.AuthorizationHeader().value()); - EXPECT_EQ("Authorization: Type access-token-r2", - credentials.AuthorizationHeader().value()); - EXPECT_EQ("Authorization: Type access-token-r2", - credentials.AuthorizationHeader().value()); -} - -/// @test Mock a failed refresh response. -TEST_F(AuthorizedUserCredentialsTest, FailedRefresh) { - // Now setup the builder to return those responses. - auto mock_builder = MockHttpRequestBuilder::mock_; - EXPECT_CALL(*mock_builder, BuildRequest()) - .WillOnce([] { - MockHttpRequest request; - EXPECT_CALL(*request.mock, MakeRequest) - .WillOnce(Return(Status(StatusCode::kAborted, "Fake Curl error"))); - return request; - }) - .WillOnce([] { - MockHttpRequest request; - EXPECT_CALL(*request.mock, MakeRequest) - .WillOnce(Return(HttpResponse{400, "", {}})); - return request; - }); - EXPECT_CALL(*mock_builder, Constructor(GoogleOAuthRefreshEndpoint(), _, _)) - .Times(AtLeast(1)); - EXPECT_CALL(*mock_builder, MakeEscapedString(An())) - .WillRepeatedly([](std::string const& s) { - auto t = std::unique_ptr(new char[s.size() + 1]); - std::copy(s.begin(), s.end(), t.get()); - t[s.size()] = '\0'; - return t; - }); - - std::string config = R"""({ - "client_id": "a-client-id.example.com", - "client_secret": "a-123456ABCDEF", - "refresh_token": "1/THETOKEN", - "type": "magic_type" -})"""; - auto info = ParseAuthorizedUserCredentials(config, "test"); - ASSERT_STATUS_OK(info); - AuthorizedUserCredentials credentials(*info); - // Response 1 - auto status = credentials.AuthorizationHeader(); - EXPECT_THAT(status, StatusIs(StatusCode::kAborted)); - // Response 2 - status = credentials.AuthorizationHeader(); - EXPECT_THAT(status, Not(IsOk())); -} - -/// @test Verify that the options are used in the constructor. -TEST_F(AuthorizedUserCredentialsTest, UsesCARootsInfo) { - // Now setup the builder to return a valid response. - auto mock_builder = MockHttpRequestBuilder::mock_; - EXPECT_CALL(*mock_builder, BuildRequest()).WillOnce([&] { - MockHttpRequest request; - nlohmann::json response{{"token_type", "Mock-Type"}, - {"access_token", "fake-token"}, - {"id_token", "fake-id-token-value"}, - {"expires_in", 3600}}; - EXPECT_CALL(*request.mock, MakeRequest) - .WillOnce(Return(HttpResponse{200, response.dump(), {}})); - return request; - }); - - // This is the key check in this test, verify the constructor is called with - // the right parameters. - auto const cainfo = std::string{"fake-cainfo-path-aka-roots-pem"}; - EXPECT_CALL(*mock_builder, Constructor(GoogleOAuthRefreshEndpoint(), - absl::make_optional(cainfo), _)) - .Times(AtLeast(1)); - EXPECT_CALL(*mock_builder, MakeEscapedString(An())) - .WillRepeatedly([](std::string const& s) { - auto t = std::unique_ptr(new char[s.size() + 1]); - std::copy(s.begin(), s.end(), t.get()); - t[s.size()] = '\0'; - return t; - }); - - std::string config = R"""({ - "client_id": "a-client-id.example.com", - "client_secret": "a-123456ABCDEF", - "refresh_token": "1/THETOKEN", - "type": "magic_type" -})"""; - auto info = ParseAuthorizedUserCredentials(config, "test"); - ASSERT_STATUS_OK(info); - AuthorizedUserCredentials credentials( - *info, ChannelOptions().set_ssl_root_path(cainfo)); - EXPECT_EQ("Authorization: Mock-Type fake-token", - credentials.AuthorizationHeader().value()); -} - -/// @test Verify that parsing an authorized user account JSON string works. -TEST_F(AuthorizedUserCredentialsTest, ParseSimple) { - std::string config = R"""({ - "client_id": "a-client-id.example.com", - "client_secret": "a-123456ABCDEF", - "refresh_token": "1/THETOKEN", - "token_uri": "https://oauth2.googleapis.com/test_endpoint", - "type": "magic_type" -})"""; - - auto actual = - ParseAuthorizedUserCredentials(config, "test-data", "unused-uri"); - ASSERT_STATUS_OK(actual); - EXPECT_EQ("a-client-id.example.com", actual->client_id); - EXPECT_EQ("a-123456ABCDEF", actual->client_secret); - EXPECT_EQ("1/THETOKEN", actual->refresh_token); - EXPECT_EQ("https://oauth2.googleapis.com/test_endpoint", actual->token_uri); -} - -/// @test Verify that parsing an authorized user account JSON string works. -TEST_F(AuthorizedUserCredentialsTest, ParseUsesExplicitDefaultTokenUri) { - // No token_uri attribute here, so the default passed below should be used. - std::string config = R"""({ - "client_id": "a-client-id.example.com", - "client_secret": "a-123456ABCDEF", - "refresh_token": "1/THETOKEN", - "type": "magic_type" -})"""; - - auto actual = ParseAuthorizedUserCredentials( - config, "test-data", "https://oauth2.googleapis.com/test_endpoint"); - ASSERT_STATUS_OK(actual); - EXPECT_EQ("a-client-id.example.com", actual->client_id); - EXPECT_EQ("a-123456ABCDEF", actual->client_secret); - EXPECT_EQ("1/THETOKEN", actual->refresh_token); - EXPECT_EQ("https://oauth2.googleapis.com/test_endpoint", actual->token_uri); -} - -/// @test Verify that parsing an authorized user account JSON string works. -TEST_F(AuthorizedUserCredentialsTest, ParseUsesImplicitDefaultTokenUri) { - // No token_uri attribute here. - std::string config = R"""({ - "client_id": "a-client-id.example.com", - "client_secret": "a-123456ABCDEF", - "refresh_token": "1/THETOKEN", - "type": "magic_type" -})"""; - - // No token_uri passed in here, either. - auto actual = ParseAuthorizedUserCredentials(config, "test-data"); - ASSERT_STATUS_OK(actual); - EXPECT_EQ("a-client-id.example.com", actual->client_id); - EXPECT_EQ("a-123456ABCDEF", actual->client_secret); - EXPECT_EQ("1/THETOKEN", actual->refresh_token); - EXPECT_EQ(std::string(GoogleOAuthRefreshEndpoint()), actual->token_uri); -} - -/// @test Verify that invalid contents result in a readable error. -TEST_F(AuthorizedUserCredentialsTest, ParseInvalidContentsFails) { - EXPECT_THAT(ParseAuthorizedUserCredentials( - R"""( not-a-valid-json-string })""", "test-as-a-source"), - StatusIs(Not(StatusCode::kOk), - AllOf(HasSubstr("Invalid AuthorizedUserCredentials"), - HasSubstr("test-as-a-source")))); - - EXPECT_THAT(ParseAuthorizedUserCredentials( - R"""("valid-json-but-not-an-object")""", "test-as-a-source"), - StatusIs(Not(StatusCode::kOk), - AllOf(HasSubstr("Invalid AuthorizedUserCredentials"), - HasSubstr("test-as-a-source")))); -} - -/// @test Parsing a service account JSON string should detect empty fields. -TEST_F(AuthorizedUserCredentialsTest, ParseEmptyFieldFails) { - std::string contents = R"""({ - "client_id": "a-client-id.example.com", - "client_secret": "a-123456ABCDEF", - "refresh_token": "1/THETOKEN", - "type": "magic_type" -})"""; - - for (auto const& field : {"client_id", "client_secret", "refresh_token"}) { - auto json = nlohmann::json::parse(contents); - json[field] = ""; - auto info = ParseAuthorizedUserCredentials(json.dump(), "test-data"); - EXPECT_THAT(info, - StatusIs(Not(StatusCode::kOk), - AllOf(HasSubstr(field), HasSubstr(" field is empty"), - HasSubstr("test-data")))); - } -} - -/// @test Parsing a service account JSON string should detect missing fields. -TEST_F(AuthorizedUserCredentialsTest, ParseMissingFieldFails) { - std::string contents = R"""({ - "client_id": "a-client-id.example.com", - "client_secret": "a-123456ABCDEF", - "refresh_token": "1/THETOKEN", - "type": "magic_type" -})"""; - - for (auto const& field : {"client_id", "client_secret", "refresh_token"}) { - auto json = nlohmann::json::parse(contents); - json.erase(field); - auto info = ParseAuthorizedUserCredentials(json.dump(), "test-data"); - EXPECT_THAT(info, - StatusIs(Not(StatusCode::kOk), - AllOf(HasSubstr(field), HasSubstr(" field is missing"), - HasSubstr("test-data")))); - } -} - -/// @test Parsing an invalid refresh response results in failure. -TEST_F(AuthorizedUserCredentialsTest, ParseAuthorizedUserRefreshResponseError) { - std::string r1 = R"""({})"""; - // Does not have access_token. - std::string r2 = R"""({ - "token_type": "Type", - "id_token": "id-token-value", - "expires_in": 1000 -})"""; - - FakeClock::reset_clock(1000); - auto status = ParseAuthorizedUserRefreshResponse(HttpResponse{400, r1, {}}, - FakeClock::now()); - EXPECT_THAT(status, - StatusIs(StatusCode::kInvalidArgument, - HasSubstr("Could not find all required fields"))); - - status = ParseAuthorizedUserRefreshResponse(HttpResponse{400, r2, {}}, - FakeClock::now()); - EXPECT_THAT(status, - StatusIs(StatusCode::kInvalidArgument, - HasSubstr("Could not find all required fields"))); - - EXPECT_THAT(ParseAuthorizedUserRefreshResponse( - HttpResponse{400, R"js("valid-json-but-not-an-object)js", {}}, - FakeClock::now()), - StatusIs(StatusCode::kInvalidArgument, - HasSubstr("Could not find all required fields"))); -} - -/// @test Parsing a refresh response yields a TemporaryToken. -TEST_F(AuthorizedUserCredentialsTest, ParseAuthorizedUserRefreshResponse) { - std::string r1 = R"""({ - "token_type": "Type", - "access_token": "access-token-r1", - "id_token": "id-token-value", - "expires_in": 1000 -})"""; - - auto expires_in = 1000; - FakeClock::reset_clock(2000); - auto status = ParseAuthorizedUserRefreshResponse(HttpResponse{200, r1, {}}, - FakeClock::now()); - EXPECT_STATUS_OK(status); - auto token = *status; - EXPECT_EQ( - std::chrono::time_point_cast(token.expiration_time) - .time_since_epoch() - .count(), - FakeClock::now_value_ + expires_in); - EXPECT_EQ(token.token, "Authorization: Type access-token-r1"); -} - -TEST_F(AuthorizedUserCredentialsTest, Caching) { - // We need to mock the Security Token Service or this would be an - // integration test that requires a valid user account. - auto make_mock_client = [](std::string const& payload) { - auto response = std::make_unique(); - EXPECT_CALL(*response, StatusCode) - .WillRepeatedly( - Return(google::cloud::rest_internal::HttpStatusCode::kOk)); - EXPECT_CALL(std::move(*response), ExtractPayload) - .WillOnce(Return(ByMove(MakeMockHttpPayloadSuccess(payload)))); - auto mock = std::make_unique(); - using PostPayloadType = std::vector>; - EXPECT_CALL(*mock, Post(_, _, An())) - .WillOnce(Return(ByMove(std::unique_ptr( - std::move(response))))); - return std::unique_ptr(std::move(mock)); - }; - - auto constexpr kPayload1 = R"js({ - "access_token": "access-token-1", "id_token": "id-token-1", - "token_type": "Bearer", "expires_in": 3600})js"; - auto constexpr kPayload2 = R"js({ - "access_token": "access-token-2", "id_token": "id-token-2", - "token_type": "Bearer", "expires_in": 3600})js"; - - using MockHttpClientFactory = - ::testing::MockFunction( - Options const&)>; - MockHttpClientFactory mock_factory; - EXPECT_CALL(mock_factory, Call) - .WillOnce(Return(ByMove(make_mock_client(kPayload1)))) - .WillOnce(Return(ByMove(make_mock_client(kPayload2)))); - - auto tested = AuthorizedUserCredentialsTester::MakeAuthorizedUserCredentials( - oauth2_internal::AuthorizedUserCredentialsInfo{}, - mock_factory.AsStdFunction()); - auto const tp = std::chrono::system_clock::now(); - auto initial = AuthorizedUserCredentialsTester::Header(tested, tp); - ASSERT_STATUS_OK(initial); - - auto cached = AuthorizedUserCredentialsTester::Header( - tested, tp + std::chrono::seconds(30)); - EXPECT_THAT(cached, IsOkAndHolds(*initial)); - - cached = AuthorizedUserCredentialsTester::Header( - tested, tp + std::chrono::seconds(300)); - EXPECT_THAT(cached, IsOkAndHolds(*initial)); - - auto uncached = AuthorizedUserCredentialsTester::Header( - tested, tp + std::chrono::hours(2)); - ASSERT_STATUS_OK(uncached); - EXPECT_NE(*initial, *uncached); -} - -} // namespace -} // namespace oauth2 -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google diff --git a/google/cloud/storage/oauth2/compute_engine_credentials.cc b/google/cloud/storage/oauth2/compute_engine_credentials.cc deleted file mode 100644 index 088436bf8f074..0000000000000 --- a/google/cloud/storage/oauth2/compute_engine_credentials.cc +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/storage/oauth2/compute_engine_credentials.h" -#include "google/cloud/internal/oauth2_cached_credentials.h" -#include "google/cloud/internal/oauth2_compute_engine_credentials.h" -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace oauth2 { - -StatusOr ParseMetadataServerResponse( - storage::internal::HttpResponse const& response) { - auto meta = google::cloud::oauth2_internal::ParseMetadataServerResponse( - response.payload); - return ServiceAccountMetadata{std::move(meta.scopes), std::move(meta.email)}; -} - -StatusOr -ParseComputeEngineRefreshResponse( - storage::internal::HttpResponse const& response, - std::chrono::system_clock::time_point now) { - // Response should have the attributes "access_token", "expires_in", and - // "token_type". - auto access_token = nlohmann::json::parse(response.payload, nullptr, false); - if (!access_token.is_object() || access_token.count("access_token") == 0 || - access_token.count("expires_in") == 0 || - access_token.count("token_type") == 0) { - auto payload = - response.payload + - "Could not find all required fields in response (access_token," - " expires_in, token_type) while trying to obtain an access token for" - " compute engine credentials."; - return AsStatus(storage::internal::HttpResponse{response.status_code, - payload, response.headers}); - } - std::string header = "Authorization: "; - header += access_token.value("token_type", ""); - header += ' '; - header += access_token.value("access_token", ""); - auto expires_in = std::chrono::seconds(access_token.value("expires_in", 0)); - auto new_expiration = now + expires_in; - - return RefreshingCredentialsWrapper::TemporaryToken{std::move(header), - new_expiration}; -} - -ComputeEngineCredentials:: - ComputeEngineCredentials(std::string service_account_email) - : ComputeEngineCredentials( - std::move(service_account_email), [](Options const& o) { - return rest_internal::MakeDefaultRestClient(std::string{}, o); - }) {} - -ComputeEngineCredentials:: - ComputeEngineCredentials(std::string service_account_email, - oauth2_internal::HttpClientFactory client_factory) - : impl_(std::make_shared( - std::move(service_account_email), Options{}, - std::move(client_factory))), - cached_(std::make_shared(impl_)) {} - -} // namespace oauth2 -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google diff --git a/google/cloud/storage/oauth2/compute_engine_credentials.h b/google/cloud/storage/oauth2/compute_engine_credentials.h deleted file mode 100644 index 7c4772e438754..0000000000000 --- a/google/cloud/storage/oauth2/compute_engine_credentials.h +++ /dev/null @@ -1,283 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OAUTH2_COMPUTE_ENGINE_CREDENTIALS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OAUTH2_COMPUTE_ENGINE_CREDENTIALS_H - -#include "google/cloud/storage/internal/base64.h" -#include "google/cloud/storage/internal/compute_engine_util.h" -#include "google/cloud/storage/internal/curl/request_builder.h" -#include "google/cloud/storage/internal/http_response.h" -#include "google/cloud/storage/oauth2/credential_constants.h" -#include "google/cloud/storage/oauth2/credentials.h" -#include "google/cloud/storage/oauth2/refreshing_credentials_wrapper.h" -#include "google/cloud/storage/version.h" -#include "google/cloud/internal/curl_handle_factory.h" -#include "google/cloud/internal/getenv.h" -#include "google/cloud/internal/oauth2_cached_credentials.h" -#include "google/cloud/internal/oauth2_compute_engine_credentials.h" -#include "google/cloud/status.h" -#include -#include -#include -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace oauth2 { - -/** - * A helper struct that contains service account metadata. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -struct ServiceAccountMetadata { - std::set scopes; - std::string email; -}; - -/** - * Parses a metadata server response JSON string into a ServiceAccountMetadata. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -StatusOr ParseMetadataServerResponse( - storage::internal::HttpResponse const& response); - -/** - * Parses a refresh response JSON string into an authorization header. - * - * The header and the current time (for the expiration) form a TemporaryToken. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -StatusOr -ParseComputeEngineRefreshResponse( - storage::internal::HttpResponse const& response, - std::chrono::system_clock::time_point now); - -/** - * Wrapper class for Google OAuth 2.0 GCE instance service account credentials. - * - * Takes a service account email address or alias (e.g. "default") and uses the - * Google Compute Engine instance's metadata server to obtain service account - * metadata and OAuth 2.0 access tokens as needed. Instances of this class - * should usually be created via the convenience methods declared in - * google_credentials.h. - * - * An HTTP Authorization header, with an access token as its value, can be - * obtained by calling the AuthorizationHeader() method; if the current access - * token is invalid or nearing expiration, this will class will first obtain a - * new access token before returning the Authorization header string. - * - * @see https://cloud.google.com/compute/docs/authentication#using for details - * on how to get started with Compute Engine service account credentials. - * - * @tparam HttpRequestBuilderType a dependency injection point. It makes it - * possible to mock internal libcurl wrappers. This should generally not - * be overridden except for testing. - * @tparam ClockType a dependency injection point to fetch the current time. - * This should generally not be overridden except for testing. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -template -class ComputeEngineCredentials; - -/// @copydoc ComputeEngineCredentials -template <> -class ComputeEngineCredentials : public Credentials { - public: - explicit ComputeEngineCredentials() : ComputeEngineCredentials("default") {} - explicit ComputeEngineCredentials(std::string service_account_email); - - StatusOr AuthorizationHeader() override { - return oauth2_internal::AuthenticationHeaderJoined(*cached_); - } - - std::string AccountEmail() const override { return impl_->AccountEmail(); } - - /** - * Returns the email or alias of this credential's service account. - * - * @note This class must query the Compute Engine instance's metadata server - * to fetch service account metadata. Because of this, if an alias (e.g. - * "default") was supplied in place of an actual email address when - * initializing this credential, that alias is returned as this credential's - * email address if the credential has not been refreshed yet. - */ - std::string service_account_email() { return impl_->service_account_email(); } - - /** - * Returns the set of scopes granted to this credential's service account. - * - * @note Because this class must query the Compute Engine instance's metadata - * server to fetch service account metadata, this method will return an empty - * set if the credential has not been refreshed yet. - */ - std::set scopes() const { return impl_->scopes(); } - - private: - friend struct ComputeEngineCredentialsTester; - ComputeEngineCredentials(std::string service_account_email, - oauth2_internal::HttpClientFactory client_factory); - - StatusOr AuthorizationHeaderForTesting( - std::chrono::system_clock::time_point tp) { - return oauth2_internal::AuthenticationHeaderJoined(*cached_, tp); - } - - std::shared_ptr impl_; - std::shared_ptr cached_; -}; - -/// @copydoc ComputeEngineCredentials -template -class ComputeEngineCredentials : public Credentials { - public: - explicit ComputeEngineCredentials() : ComputeEngineCredentials("default") {} - - explicit ComputeEngineCredentials(std::string service_account_email) - : clock_(), service_account_email_(std::move(service_account_email)) {} - - StatusOr AuthorizationHeader() override { - std::unique_lock lock(mu_); - return refreshing_creds_.AuthorizationHeader(clock_.now(), - [this] { return Refresh(); }); - } - - std::string AccountEmail() const override { - std::unique_lock lock(mu_); - // Force a refresh on the account info. - RetrieveServiceAccountInfo(); - return service_account_email_; - } - - /** - * Returns the email or alias of this credential's service account. - * - * @note This class must query the Compute Engine instance's metadata server - * to fetch service account metadata. Because of this, if an alias (e.g. - * "default") was supplied in place of an actual email address when - * initializing this credential, that alias is returned as this credential's - * email address if the credential has not been refreshed yet. - */ - std::string service_account_email() const { - std::unique_lock lock(mu_); - return service_account_email_; - } - - /** - * Returns the set of scopes granted to this credential's service account. - * - * @note Because this class must query the Compute Engine instance's metadata - * server to fetch service account metadata, this method will return an empty - * set if the credential has not been refreshed yet. - */ - std::set scopes() const { - std::unique_lock lock(mu_); - return scopes_; - } - - private: - /** - * Sends an HTTP GET request to the GCE metadata server. - * - * @see https://cloud.google.com/compute/docs/storing-retrieving-metadata for - * an overview of retrieving information from the GCE metadata server. - */ - StatusOr DoMetadataServerGetRequest( - std::string const& path, bool recursive) const { - // Allows mocking the metadata server hostname for testing. - std::string metadata_server_hostname = - google::cloud::storage::internal::GceMetadataHostname(); - - HttpRequestBuilderType builder( - "http://" + metadata_server_hostname + path, - rest_internal::GetDefaultCurlHandleFactory()); - builder.AddHeader("metadata-flavor: Google"); - if (recursive) builder.AddQueryParameter("recursive", "true"); - return std::move(builder).BuildRequest().MakeRequest(std::string{}); - } - - /** - * Fetches metadata for an instance's service account. - * - * @see - * https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances - * for more details. - */ - Status RetrieveServiceAccountInfo() const { - auto response = DoMetadataServerGetRequest( - "/computeMetadata/v1/instance/service-accounts/" + - service_account_email_ + "/", - true); - if (!response) { - return std::move(response).status(); - } - if (response->status_code >= 300) { - return AsStatus(*response); - } - - auto metadata = ParseMetadataServerResponse(*response); - if (!metadata) { - return metadata.status(); - } - service_account_email_ = std::move(metadata->email); - scopes_ = std::move(metadata->scopes); - return Status(); - } - - StatusOr Refresh() const { - auto status = RetrieveServiceAccountInfo(); - if (!status.ok()) { - return status; - } - - auto response = DoMetadataServerGetRequest( - "/computeMetadata/v1/instance/service-accounts/" + - service_account_email_ + "/token", - false); - if (!response) { - return std::move(response).status(); - } - if (response->status_code >= 300) { - return AsStatus(*response); - } - - return ParseComputeEngineRefreshResponse(*response, clock_.now()); - } - - ClockType clock_; - mutable std::mutex mu_; - RefreshingCredentialsWrapper refreshing_creds_; - mutable std::set scopes_; - mutable std::string service_account_email_; -}; - -} // namespace oauth2 -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OAUTH2_COMPUTE_ENGINE_CREDENTIALS_H diff --git a/google/cloud/storage/oauth2/compute_engine_credentials_test.cc b/google/cloud/storage/oauth2/compute_engine_credentials_test.cc deleted file mode 100644 index c0116adbda333..0000000000000 --- a/google/cloud/storage/oauth2/compute_engine_credentials_test.cc +++ /dev/null @@ -1,506 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/storage/oauth2/compute_engine_credentials.h" -#include "google/cloud/storage/internal/compute_engine_util.h" -#include "google/cloud/storage/oauth2/credential_constants.h" -#include "google/cloud/storage/testing/mock_http_request.h" -#include "google/cloud/testing_util/mock_fake_clock.h" -#include "google/cloud/testing_util/mock_http_payload.h" -#include "google/cloud/testing_util/mock_rest_client.h" -#include "google/cloud/testing_util/mock_rest_response.h" -#include "google/cloud/testing_util/status_matchers.h" -#include -#include -#include -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace oauth2 { - -// Define a helper to test the specialization. -struct ComputeEngineCredentialsTester { - static StatusOr Header( - ComputeEngineCredentials<>& tested, - std::chrono::system_clock::time_point tp) { - return tested.AuthorizationHeaderForTesting(tp); - } - - static ComputeEngineCredentials<> MakeComputeEngineCredentials( - std::string service_account_email, - oauth2_internal::HttpClientFactory factory) { - return ComputeEngineCredentials<>(std::move(service_account_email), - std::move(factory)); - } -}; - -namespace { - -using ::google::cloud::storage::internal::GceMetadataHostname; -using ::google::cloud::storage::internal::HttpResponse; -using ::google::cloud::storage::testing::MockHttpRequest; -using ::google::cloud::storage::testing::MockHttpRequestBuilder; -using ::google::cloud::testing_util::FakeClock; -using ::google::cloud::testing_util::IsOk; -using ::google::cloud::testing_util::IsOkAndHolds; -using ::google::cloud::testing_util::MakeMockHttpPayloadSuccess; -using ::google::cloud::testing_util::MockRestClient; -using ::google::cloud::testing_util::MockRestResponse; -using ::google::cloud::testing_util::StatusIs; -using ::testing::_; -using ::testing::ByMove; -using ::testing::HasSubstr; -using ::testing::IsEmpty; -using ::testing::Not; -using ::testing::Return; -using ::testing::StrEq; -using ::testing::UnorderedElementsAre; - -class ComputeEngineCredentialsTest : public ::testing::Test { - protected: - void SetUp() override { - MockHttpRequestBuilder::mock_ = - std::make_shared(); - } - void TearDown() override { MockHttpRequestBuilder::mock_.reset(); } -}; - -/// @test Verify that we can create and refresh ComputeEngineCredentials. -TEST_F(ComputeEngineCredentialsTest, - RefreshingSendsCorrectRequestBodyAndParsesResponse) { - std::string alias = "default"; - std::string email = "foo@bar.baz"; - std::string hostname = GceMetadataHostname(); - std::string svc_acct_info_resp = R"""({ - "email": ")""" + email + R"""(", - "scopes": ["scope1","scope2"] - })"""; - std::string token_info_resp = R"""({ - "access_token": "mysupersecrettoken", - "expires_in": 3600, - "token_type": "tokentype" - })"""; - - auto first_mock_req_impl = std::make_shared(); - EXPECT_CALL(*first_mock_req_impl, MakeRequest) - .WillOnce(Return(HttpResponse{200, svc_acct_info_resp, {}})); - auto second_mock_req_impl = std::make_shared(); - EXPECT_CALL(*second_mock_req_impl, MakeRequest) - .WillOnce(Return(HttpResponse{200, token_info_resp, {}})); - - auto mock_req_builder = MockHttpRequestBuilder::mock_; - EXPECT_CALL(*mock_req_builder, BuildRequest()) - .WillOnce([first_mock_req_impl] { - MockHttpRequest mock_request; - mock_request.mock = first_mock_req_impl; - return mock_request; - }) - .WillOnce([second_mock_req_impl] { - MockHttpRequest mock_request; - mock_request.mock = second_mock_req_impl; - return mock_request; - }); - - // Both requests add this header. - EXPECT_CALL(*mock_req_builder, AddHeader(StrEq("metadata-flavor: Google"))) - .Times(2); - EXPECT_CALL( - *mock_req_builder, - Constructor(StrEq(std::string("http://") + hostname + - "/computeMetadata/v1/instance/service-accounts/" + - email + "/token"), - _, _)) - .Times(1); - // Only the call to retrieve service account info sends this query param. - EXPECT_CALL(*mock_req_builder, - AddQueryParameter(StrEq("recursive"), StrEq("true"))) - .Times(1); - EXPECT_CALL( - *mock_req_builder, - Constructor( - StrEq(std::string("http://") + hostname + - "/computeMetadata/v1/instance/service-accounts/" + alias + "/"), - _, _)) - .Times(1); - - ComputeEngineCredentials credentials(alias); - // Calls Refresh to obtain the access token for our authorization header. - EXPECT_EQ("Authorization: tokentype mysupersecrettoken", - credentials.AuthorizationHeader().value()); - // Make sure we obtain the scopes and email from the metadata server. - EXPECT_EQ(email, credentials.service_account_email()); - EXPECT_THAT(credentials.scopes(), UnorderedElementsAre("scope1", "scope2")); -} - -/// @test Parsing a refresh response with missing fields results in failure. -TEST_F(ComputeEngineCredentialsTest, ParseComputeEngineRefreshResponseInvalid) { - std::string token_info_resp = R"""({})"""; - // Does not have access_token. - std::string token_info_resp2 = R"""({ - "expires_in": 3600, - "token_type": "tokentype" -)"""; - - FakeClock::reset_clock(1000); - auto status = ParseComputeEngineRefreshResponse( - HttpResponse{400, token_info_resp, {}}, FakeClock::now()); - EXPECT_THAT(status, - StatusIs(StatusCode::kInvalidArgument, - HasSubstr("Could not find all required fields"))); - - status = ParseComputeEngineRefreshResponse( - HttpResponse{400, token_info_resp2, {}}, FakeClock::now()); - EXPECT_THAT(status, - StatusIs(StatusCode::kInvalidArgument, - HasSubstr("Could not find all required fields"))); - - EXPECT_THAT(ParseComputeEngineRefreshResponse( - HttpResponse{400, R"js("valid-json-but-not-object")js", {}}, - FakeClock::now()), - StatusIs(StatusCode::kInvalidArgument, - HasSubstr("Could not find all required fields"))); -} - -/// @test Parsing a refresh response yields a TemporaryToken. -TEST_F(ComputeEngineCredentialsTest, ParseComputeEngineRefreshResponse) { - std::string token_info_resp = R"""({ - "access_token": "mysupersecrettoken", - "expires_in": 3600, - "token_type": "tokentype" -})"""; - - auto expires_in = 3600; - auto clock_value = 2000; - FakeClock::reset_clock(clock_value); - - auto status = ParseComputeEngineRefreshResponse( - HttpResponse{200, token_info_resp, {}}, FakeClock::now()); - EXPECT_STATUS_OK(status); - auto token = *status; - EXPECT_EQ( - std::chrono::time_point_cast(token.expiration_time) - .time_since_epoch() - .count(), - clock_value + expires_in); - EXPECT_EQ(token.token, "Authorization: tokentype mysupersecrettoken"); -} - -/// @test Parsing a metadata server response with missing fields results in -/// failure. -TEST_F(ComputeEngineCredentialsTest, ParseMetadataServerResponseInvalid) { - std::string svc_acct_info_resp1 = R"""({})"""; - std::string svc_acct_info_resp2 = R"""({"scopes": ["scope1","scope2"]})"""; - std::string svc_acct_info_resp3 = R"""({"email": "foo@bar"})"""; - std::string svc_acct_info_resp4 = - R"""({"email": "foo@bar", "scopes": "scope1\nscope2\n"})"""; - - auto status = - ParseMetadataServerResponse(HttpResponse{200, svc_acct_info_resp1, {}}); - EXPECT_THAT(status, IsOk()); - EXPECT_THAT(status->email, IsEmpty()); - EXPECT_THAT(status->scopes, IsEmpty()); - - status = - ParseMetadataServerResponse(HttpResponse{400, svc_acct_info_resp2, {}}); - EXPECT_THAT(status, IsOk()); - EXPECT_THAT(status->email, IsEmpty()); - EXPECT_THAT(status->scopes, UnorderedElementsAre("scope1", "scope2")); - - status = - ParseMetadataServerResponse(HttpResponse{400, svc_acct_info_resp3, {}}); - EXPECT_THAT(status, IsOk()); - EXPECT_THAT(status->email, "foo@bar"); - EXPECT_THAT(status->scopes, IsEmpty()); - - status = - ParseMetadataServerResponse(HttpResponse{400, svc_acct_info_resp4, {}}); - EXPECT_THAT(status, IsOk()); - EXPECT_THAT(status->email, "foo@bar"); - EXPECT_THAT(status->scopes, UnorderedElementsAre("scope1", "scope2")); - - status = ParseMetadataServerResponse( - HttpResponse{400, R"js("valid-json-but-not-an-object")js", {}}); - EXPECT_THAT(status, IsOk()); - EXPECT_THAT(status->email, IsEmpty()); - EXPECT_THAT(status->scopes, IsEmpty()); -} - -/// @test Parsing a metadata server response yields a ServiceAccountMetadata. -TEST_F(ComputeEngineCredentialsTest, ParseMetadataServerResponse) { - std::string email = "foo@bar.baz"; - std::string svc_acct_info_resp = R"""({ - "email": ")""" + email + R"""(", - "scopes": ["scope1","scope2"] - })"""; - - auto status = - ParseMetadataServerResponse(HttpResponse{200, svc_acct_info_resp, {}}); - EXPECT_STATUS_OK(status); - auto metadata = *status; - EXPECT_EQ(metadata.email, email); - EXPECT_TRUE(metadata.scopes.count("scope1")); - EXPECT_TRUE(metadata.scopes.count("scope2")); -} - -/// @test Mock a failed refresh response during RetrieveServiceAccountInfo. -TEST_F(ComputeEngineCredentialsTest, FailedRetrieveServiceAccountInfo) { - std::string alias = "default"; - std::string hostname = GceMetadataHostname(); - - auto first_mock_req_impl = std::make_shared(); - EXPECT_CALL(*first_mock_req_impl, MakeRequest) - // Fail the first call to DoMetadataServerGetRequest immediately. - .WillOnce(Return(Status(StatusCode::kAborted, "Fake Curl error"))) - // Likewise, except with a >= 300 status code. - .WillOnce(Return(HttpResponse{400, "", {}})); - - auto mock_req_builder = MockHttpRequestBuilder::mock_; - EXPECT_CALL(*mock_req_builder, BuildRequest()) - .Times(2) - .WillRepeatedly([first_mock_req_impl] { - MockHttpRequest mock_request; - mock_request.mock = first_mock_req_impl; - return mock_request; - }); - - EXPECT_CALL(*mock_req_builder, AddHeader(StrEq("metadata-flavor: Google"))) - .Times(2); - EXPECT_CALL(*mock_req_builder, - AddQueryParameter(StrEq("recursive"), StrEq("true"))) - .Times(2); - EXPECT_CALL( - *mock_req_builder, - Constructor( - StrEq(std::string("http://") + hostname + - "/computeMetadata/v1/instance/service-accounts/" + alias + "/"), - _, _)) - .Times(2); - - ComputeEngineCredentials credentials(alias); - // Response 1 - auto status = credentials.AuthorizationHeader(); - EXPECT_THAT(status, Not(IsOk())); - // Response 2 - status = credentials.AuthorizationHeader(); - EXPECT_THAT(status, Not(IsOk())); -} - -/// @test Mock a failed refresh response. -TEST_F(ComputeEngineCredentialsTest, FailedRefresh) { - std::string alias = "default"; - std::string email = "foo@bar.baz"; - std::string hostname = GceMetadataHostname(); - std::string svc_acct_info_resp = R"""({ - "email": ")""" + email + R"""(", - "scopes": ["scope1","scope2"] - })"""; - // Missing fields. - std::string token_info_resp = R"""({ - "expires_in": 3600, - "token_type": "tokentype" - })"""; - - auto mock_req = std::make_shared(); - EXPECT_CALL(*mock_req, MakeRequest) - // Fail the first call to RetrieveServiceAccountInfo immediately. - .WillOnce(Return(Status(StatusCode::kAborted, "Fake Curl error"))) - // Make the call to RetrieveServiceAccountInfo return a good response, - // but fail the token request immediately. - .WillOnce(Return(HttpResponse{200, svc_acct_info_resp, {}})) - .WillOnce(Return(Status(StatusCode::kAborted, "Fake Curl error"))) - // Likewise, except test with a >= 300 status code. - .WillOnce(Return(HttpResponse{200, svc_acct_info_resp, {}})) - .WillOnce(Return(HttpResponse{400, "", {}})) - // Parse with an invalid token response. - .WillOnce(Return(HttpResponse{200, svc_acct_info_resp, {}})) - .WillOnce(Return(HttpResponse{1, token_info_resp, {}})); - - auto mock_req_builder = MockHttpRequestBuilder::mock_; - auto mock_matcher = [mock_req] { - MockHttpRequest mock_request; - mock_request.mock = mock_req; - return mock_request; - }; - EXPECT_CALL(*mock_req_builder, BuildRequest()) - .Times(7) - .WillRepeatedly(mock_matcher); - - // This is added for all 7 requests. - EXPECT_CALL(*mock_req_builder, AddHeader(StrEq("metadata-flavor: Google"))) - .Times(7); - // These requests happen after RetrieveServiceAccountInfo, so they only - // occur 3 times. - EXPECT_CALL( - *mock_req_builder, - Constructor(StrEq(std::string("http://") + hostname + - "/computeMetadata/v1/instance/service-accounts/" + - email + "/token"), - _, _)) - .Times(3); - // This is only set when not retrieving the token. - EXPECT_CALL(*mock_req_builder, - AddQueryParameter(StrEq("recursive"), StrEq("true"))) - .Times(4); - // For the first expected failures, the alias is used until the metadata - // request succeeds. Then the email is refreshed. - EXPECT_CALL( - *mock_req_builder, - Constructor( - StrEq(std::string("http://") + hostname + - "/computeMetadata/v1/instance/service-accounts/" + alias + "/"), - _, _)) - .Times(2); - EXPECT_CALL( - *mock_req_builder, - Constructor( - StrEq(std::string("http://") + hostname + - "/computeMetadata/v1/instance/service-accounts/" + email + "/"), - _, _)) - .Times(2); - - ComputeEngineCredentials credentials(alias); - // Response 1 - auto status = credentials.AuthorizationHeader(); - EXPECT_THAT(status, StatusIs(StatusCode::kAborted)); - // Response 2 - status = credentials.AuthorizationHeader(); - EXPECT_THAT(status, Not(IsOk())); - // Response 3 - status = credentials.AuthorizationHeader(); - EXPECT_THAT(status, Not(IsOk())); - // Response 4 - status = credentials.AuthorizationHeader(); - EXPECT_THAT(status, - StatusIs(Not(StatusCode::kOk), - HasSubstr("Could not find all required fields"))); -} - -/// @test Verify that we can force a refresh of the service account email. -TEST_F(ComputeEngineCredentialsTest, AccountEmail) { - std::string alias = "default"; - std::string email = "foo@bar.baz"; - std::string hostname = GceMetadataHostname(); - std::string svc_acct_info_resp = R"""({ - "email": ")""" + email + R"""(", - "scopes": ["scope1","scope2"] - })"""; - - auto first_mock_req_impl = std::make_shared(); - EXPECT_CALL(*first_mock_req_impl, MakeRequest) - .WillOnce(Return(HttpResponse{200, svc_acct_info_resp, {}})); - - auto mock_req_builder = MockHttpRequestBuilder::mock_; - EXPECT_CALL(*mock_req_builder, BuildRequest()) - .WillOnce([first_mock_req_impl] { - MockHttpRequest mock_request; - mock_request.mock = first_mock_req_impl; - return mock_request; - }); - - // Both requests add this header. - EXPECT_CALL(*mock_req_builder, AddHeader(StrEq("metadata-flavor: Google"))) - .Times(1); - // Only the call to retrieve service account info sends this query param. - EXPECT_CALL(*mock_req_builder, - AddQueryParameter(StrEq("recursive"), StrEq("true"))) - .Times(1); - EXPECT_CALL( - *mock_req_builder, - Constructor( - StrEq(std::string("http://") + hostname + - "/computeMetadata/v1/instance/service-accounts/" + alias + "/"), - _, _)) - .Times(1); - - ComputeEngineCredentials credentials(alias); - EXPECT_EQ(credentials.service_account_email(), alias); - auto refreshed_email = credentials.AccountEmail(); - EXPECT_EQ(email, refreshed_email); - EXPECT_EQ(credentials.service_account_email(), refreshed_email); -} - -TEST_F(ComputeEngineCredentialsTest, Caching) { - // We need to mock the Compute Engine Metadata Service or this would be an - // integration test that only runs on GCE. - auto make_mock_client = [](std::string const& payload) { - auto response = std::make_unique(); - EXPECT_CALL(*response, StatusCode) - .WillRepeatedly( - Return(google::cloud::rest_internal::HttpStatusCode::kOk)); - EXPECT_CALL(std::move(*response), ExtractPayload) - .WillOnce(Return(ByMove(MakeMockHttpPayloadSuccess(payload)))); - auto mock = std::make_unique(); - EXPECT_CALL(*mock, Get) - .WillOnce(Return(ByMove(std::unique_ptr( - std::move(response))))); - return std::unique_ptr(std::move(mock)); - }; - - // We expect a call to the metadata service to get the service account - // metadata. Then one call to get the token (which is cached), and finally a - // call the refresh the token. - auto constexpr kPayload0 = - R"""({"email": "test-only-email", "scopes": ["s1", "s2]})"""; - auto constexpr kPayload1 = R"""({ - "access_token": "test-token-1", - "expires_in": 3600, - "token_type": "tokentype" - })"""; - auto constexpr kPayload2 = R"""({ - "access_token": "test-token-2", - "expires_in": 3600, - "token_type": "tokentype" - })"""; - - using MockHttpClientFactory = - ::testing::MockFunction( - Options const&)>; - MockHttpClientFactory mock_factory; - EXPECT_CALL(mock_factory, Call) - .WillOnce(Return(ByMove(make_mock_client(kPayload0)))) - .WillOnce(Return(ByMove(make_mock_client(kPayload1)))) - .WillOnce(Return(ByMove(make_mock_client(kPayload2)))); - - auto tested = ComputeEngineCredentialsTester::MakeComputeEngineCredentials( - "test-only", mock_factory.AsStdFunction()); - auto const tp = std::chrono::system_clock::now(); - auto initial = ComputeEngineCredentialsTester::Header(tested, tp); - ASSERT_STATUS_OK(initial); - - auto cached = ComputeEngineCredentialsTester::Header( - tested, tp + std::chrono::seconds(30)); - EXPECT_THAT(cached, IsOkAndHolds(*initial)); - - cached = ComputeEngineCredentialsTester::Header( - tested, tp + std::chrono::seconds(300)); - EXPECT_THAT(cached, IsOkAndHolds(*initial)); - - auto uncached = ComputeEngineCredentialsTester::Header( - tested, tp + std::chrono::hours(2)); - ASSERT_STATUS_OK(uncached); - EXPECT_NE(*initial, *uncached); -} - -} // namespace -} // namespace oauth2 -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google diff --git a/google/cloud/storage/oauth2/credential_constants.h b/google/cloud/storage/oauth2/credential_constants.h deleted file mode 100644 index a26831ed4cd81..0000000000000 --- a/google/cloud/storage/oauth2/credential_constants.h +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OAUTH2_CREDENTIAL_CONSTANTS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OAUTH2_CREDENTIAL_CONSTANTS_H - -#include "google/cloud/storage/version.h" -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace oauth2 { - -/** - * Supported signing algorithms used in JWT auth flows. - * - * We currently only support RSA with SHA-256, but use this enum for - * readability and easy addition of support for other algorithms. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -// NOLINTNEXTLINE(readability-identifier-naming) -enum class JwtSigningAlgorithms { RS256 }; - -/** - * The max lifetime in seconds of an access token. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -constexpr std::chrono::seconds GoogleOAuthAccessTokenLifetime() { - return std::chrono::seconds(3600); -} - -/** - * Returns the slack to consider when checking if an access token is expired. - * - * This time should be subtracted from a token's expiration time when checking - * if it is expired. This prevents race conditions where, for example, one might - * check expiration time one second before the expiration, see that the token is - * still valid, then attempt to use it two seconds later and receive an - * error. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -constexpr std::chrono::seconds GoogleOAuthAccessTokenExpirationSlack() { - return std::chrono::seconds(300); -} - -/** - * The endpoint to fetch an OAuth 2.0 access token from. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -inline char const* GoogleOAuthRefreshEndpoint() { - static constexpr char kEndpoint[] = "https://oauth2.googleapis.com/token"; - return kEndpoint; -} - -/** - * String representing the "cloud-platform" OAuth 2.0 scope. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -inline char const* GoogleOAuthScopeCloudPlatform() { - static constexpr char kScope[] = - "https://www.googleapis.com/auth/cloud-platform"; - return kScope; -} - -} // namespace oauth2 -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OAUTH2_CREDENTIAL_CONSTANTS_H diff --git a/google/cloud/storage/oauth2/credentials.cc b/google/cloud/storage/oauth2/credentials.cc deleted file mode 100644 index a2ce6d3a0629c..0000000000000 --- a/google/cloud/storage/oauth2/credentials.cc +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/storage/oauth2/credentials.h" -#include "google/cloud/internal/make_status.h" -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace oauth2 { - -StatusOr> Credentials::SignBlob( - SigningAccount const&, std::string const&) const { - return google::cloud::internal::UnimplementedError( - "The current credentials cannot sign blobs locally", GCP_ERROR_INFO()); -} - -} // namespace oauth2 -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google diff --git a/google/cloud/storage/oauth2/credentials.h b/google/cloud/storage/oauth2/credentials.h deleted file mode 100644 index 962dbc0ce8e3e..0000000000000 --- a/google/cloud/storage/oauth2/credentials.h +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OAUTH2_CREDENTIALS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OAUTH2_CREDENTIALS_H - -#include "google/cloud/storage/signed_url_options.h" -#include "google/cloud/storage/version.h" -#include "google/cloud/status.h" -#include "google/cloud/status_or.h" -#include -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -/** - * Authentication components for Google Cloud Storage. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -namespace oauth2 { - -/** - * Interface for OAuth 2.0 credentials used to access Google Cloud services. - * - * Instantiating a specific kind of `Credentials` should usually be done via the - * convenience methods declared in google_credentials.h. - * - * @see https://cloud.google.com/docs/authentication/ for an overview of - * authenticating to Google Cloud Platform APIs. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -class Credentials { - public: - virtual ~Credentials() = default; - - /** - * Attempts to obtain a value for the Authorization HTTP header. - * - * If unable to obtain a value for the Authorization header, which could - * happen for `Credentials` that need to be periodically refreshed, the - * underlying `Status` will indicate failure details from the refresh HTTP - * request. Otherwise, the returned value will contain the Authorization - * header to be used in HTTP requests. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ - virtual StatusOr AuthorizationHeader() = 0; - - /** - * Try to sign @p string_to_sign using @p service_account. - * - * Some %Credentials types can locally sign a blob, most often just on behalf - * of an specific service account. This function returns an error if the - * credentials cannot sign the blob at all, or if the service account is a - * mismatch. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ - virtual StatusOr> SignBlob( - SigningAccount const& service_account, - std::string const& string_to_sign) const; - - /** - * Return the account's email associated with these credentials, if any. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ - virtual std::string AccountEmail() const { return std::string{}; } - - /** - * Return the account's key_id associated with these credentials, if any. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ - virtual std::string KeyId() const { return std::string{}; } -}; - -} // namespace oauth2 -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OAUTH2_CREDENTIALS_H diff --git a/google/cloud/storage/oauth2/google_application_default_credentials_file.cc b/google/cloud/storage/oauth2/google_application_default_credentials_file.cc deleted file mode 100644 index 2cf03f61b76c5..0000000000000 --- a/google/cloud/storage/oauth2/google_application_default_credentials_file.cc +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/storage/oauth2/google_application_default_credentials_file.h" -#include "google/cloud/internal/oauth2_google_application_default_credentials_file.h" - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace oauth2 { - -char const* GoogleAdcEnvVar() { - return google::cloud::oauth2_internal::GoogleAdcEnvVar(); -} - -std::string GoogleAdcFilePathFromEnvVarOrEmpty() { - return oauth2_internal::GoogleAdcFilePathFromEnvVarOrEmpty(); -} - -std::string GoogleAdcFilePathFromWellKnownPathOrEmpty() { - return oauth2_internal::GoogleAdcFilePathFromWellKnownPathOrEmpty(); -} - -char const* GoogleGcloudAdcFileEnvVar() { - return google::cloud::oauth2_internal::GoogleGcloudAdcFileEnvVar(); -} - -char const* GoogleAdcHomeEnvVar() { - return google::cloud::oauth2_internal::GoogleAdcHomeEnvVar(); -} - -} // namespace oauth2 -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google diff --git a/google/cloud/storage/oauth2/google_application_default_credentials_file.h b/google/cloud/storage/oauth2/google_application_default_credentials_file.h deleted file mode 100644 index 0b3f903e01e14..0000000000000 --- a/google/cloud/storage/oauth2/google_application_default_credentials_file.h +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OAUTH2_GOOGLE_APPLICATION_DEFAULT_CREDENTIALS_FILE_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OAUTH2_GOOGLE_APPLICATION_DEFAULT_CREDENTIALS_FILE_H - -#include "google/cloud/storage/version.h" -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace oauth2 { - -/** - * Returns the Application Default %Credentials environment variable name. - * - * This environment variable should be checked for a valid file path when - * attempting to load Google Application Default %Credentials. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -char const* GoogleAdcEnvVar(); - -/** - * Returns the path to the Application Default %Credentials file, if set. - * - * If the Application Default %Credentials environment variable is set, we check - * the path specified by its value for a file containing ADCs. Returns an - * empty string if no such path exists or the environment variable is not set. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -std::string GoogleAdcFilePathFromEnvVarOrEmpty(); - -/** - * Returns the path to the Application Default %Credentials file, if set. - * - * If the gcloud utility has configured an Application Default %Credentials - * file, the path to that file is returned. Returns an empty string if no such - * file exists at the well known path. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -std::string GoogleAdcFilePathFromWellKnownPathOrEmpty(); - -/** - * Returns the environment variable to override the gcloud ADC path. - * - * This environment variable is used for testing to override the path that - * should be searched for the gcloud Application Default %Credentials file. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -char const* GoogleGcloudAdcFileEnvVar(); - -/** - * Returns the environment variable used to construct the well known ADC path. - * - * The directory containing a user's application configuration data, indicated - * by this environment variable, varies across environments. That directory is - * used when constructing the well known path of the Application Default - * Credentials file. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -char const* GoogleAdcHomeEnvVar(); - -} // namespace oauth2 -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OAUTH2_GOOGLE_APPLICATION_DEFAULT_CREDENTIALS_FILE_H diff --git a/google/cloud/storage/oauth2/google_application_default_credentials_file_test.cc b/google/cloud/storage/oauth2/google_application_default_credentials_file_test.cc deleted file mode 100644 index 02f01a7ba2f36..0000000000000 --- a/google/cloud/storage/oauth2/google_application_default_credentials_file_test.cc +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google_application_default_credentials_file.h" -#include "google/cloud/testing_util/scoped_environment.h" -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace oauth2 { -namespace { - -using ::google::cloud::testing_util::ScopedEnvironment; -using ::testing::HasSubstr; - -class DefaultServiceAccountFileTest : public ::testing::Test { - public: - DefaultServiceAccountFileTest() - : home_env_var_(GoogleAdcHomeEnvVar(), {}), - adc_env_var_(GoogleAdcEnvVar(), {}), - gcloud_path_override_env_var_(GoogleGcloudAdcFileEnvVar(), {}) {} - - protected: - ScopedEnvironment home_env_var_; - ScopedEnvironment adc_env_var_; - ScopedEnvironment gcloud_path_override_env_var_; -}; - -/// @test Verify that the specified path is given when the ADC env var is set. -TEST_F(DefaultServiceAccountFileTest, AdcEnvironmentVariableSet) { - ScopedEnvironment adc_env_var(GoogleAdcEnvVar(), "/foo/bar/baz"); - EXPECT_EQ("/foo/bar/baz", GoogleAdcFilePathFromEnvVarOrEmpty()); -} - -/// @test Verify that an empty string is given when the ADC env var is unset. -TEST_F(DefaultServiceAccountFileTest, AdcEnvironmentVariableNotSet) { - EXPECT_EQ(GoogleAdcFilePathFromEnvVarOrEmpty(), ""); -} - -/// @test Verify that the gcloud ADC file path can be overridden for testing. -TEST_F(DefaultServiceAccountFileTest, GcloudAdcPathOverrideViaEnvVar) { - ScopedEnvironment gcloud_path_override_env_var(GoogleGcloudAdcFileEnvVar(), - "/foo/bar/baz"); - EXPECT_EQ(GoogleAdcFilePathFromWellKnownPathOrEmpty(), "/foo/bar/baz"); -} - -/// @test Verify that the gcloud ADC file path is given when HOME is set. -TEST_F(DefaultServiceAccountFileTest, HomeSet) { - ScopedEnvironment home_env_var(GoogleAdcHomeEnvVar(), "/foo/bar/baz"); - - auto actual = GoogleAdcFilePathFromWellKnownPathOrEmpty(); - - EXPECT_THAT(actual, HasSubstr("/foo/bar/baz")); - // The rest of the path differs depending on the OS; just make sure that we - // appended this suffix of the path to the path prefix set above. - EXPECT_THAT(actual, HasSubstr("gcloud/application_default_credentials.json")); -} - -/// @test Verify that the gcloud ADC file path is not given when HOME is unset. -TEST_F(DefaultServiceAccountFileTest, HomeNotSet) { - EXPECT_EQ(GoogleAdcFilePathFromWellKnownPathOrEmpty(), ""); -} - -} // namespace -} // namespace oauth2 -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google diff --git a/google/cloud/storage/oauth2/google_credentials.cc b/google/cloud/storage/oauth2/google_credentials.cc deleted file mode 100644 index 31f384f7543e2..0000000000000 --- a/google/cloud/storage/oauth2/google_credentials.cc +++ /dev/null @@ -1,323 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/storage/oauth2/google_credentials.h" -#include "google/cloud/storage/internal/make_jwt_assertion.h" -#include "google/cloud/storage/oauth2/anonymous_credentials.h" -#include "google/cloud/storage/oauth2/authorized_user_credentials.h" -#include "google/cloud/storage/oauth2/compute_engine_credentials.h" -#include "google/cloud/storage/oauth2/google_application_default_credentials_file.h" -#include "google/cloud/storage/oauth2/service_account_credentials.h" -#include "google/cloud/internal/filesystem.h" -#include "google/cloud/internal/make_status.h" -#include "google/cloud/internal/throw_delegate.h" -#include -#include -#include -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace oauth2 { - -char constexpr kAdcLink[] = - "https://developers.google.com/identity/protocols/" - "application-default-credentials"; - -// Parses the JSON or P12 file at `path` and creates the appropriate -// Credentials type. -// -// If `service_account_scopes` or `service_account_subject` are specified, the -// file at `path` must be a P12 service account or a JSON service account. If -// a different type of credential file is found, this function returns -// nullptr to indicate a service account file wasn't found. -StatusOr> LoadCredsFromPath( - std::string const& path, bool non_service_account_ok, - absl::optional> service_account_scopes, - absl::optional service_account_subject, - ChannelOptions const& options) { - std::ifstream ifs(path); - if (!ifs.is_open()) { - // We use kUnknown here because we don't know if the file does not exist, or - // if we were unable to open it for some other reason. - return google::cloud::internal::UnknownError( - "Cannot open credentials file " + path, GCP_ERROR_INFO()); - } - std::string contents(std::istreambuf_iterator{ifs}, {}); - auto cred_json = nlohmann::json::parse(contents, nullptr, false); - if (!cred_json.is_object()) { - // This is not a JSON file, try to load it as a P12 service account. - auto info = ParseServiceAccountP12File(path); - if (!info) return std::move(info).status(); - info->subject = std::move(service_account_subject); - info->scopes = std::move(service_account_scopes); - auto credentials = std::make_unique>(*info); - return std::unique_ptr(std::move(credentials)); - } - std::string cred_type = cred_json.value("type", "no type given"); - // If non_service_account_ok==false and the cred_type is authorized_user, - // we'll return "Unsupported credential type (authorized_user)". - if (cred_type == "authorized_user" && non_service_account_ok) { - if (service_account_scopes || service_account_subject) { - // No ptr indicates that the file we found was not a service account file. - return StatusOr>(nullptr); - } - auto info = ParseAuthorizedUserCredentials(contents, path); - if (!info) { - return info.status(); - } - std::unique_ptr ptr = - std::make_unique>(*info); - return StatusOr>(std::move(ptr)); - } - if (cred_type == "service_account") { - auto info = ParseServiceAccountCredentials(contents, path); - if (!info) { - return info.status(); - } - info->subject = std::move(service_account_subject); - info->scopes = std::move(service_account_scopes); - std::unique_ptr ptr = - std::make_unique>(*info, options); - return StatusOr>(std::move(ptr)); - } - return google::cloud::internal::InvalidArgumentError( - "Unsupported credential type (" + cred_type + - ") when reading Application Default Credentials file from " + path + - ".", - GCP_ERROR_INFO()); -} - -// Tries to load the file at the path specified by the value of the Application -// Default %Credentials environment variable and to create the appropriate -// Credentials type. -// -// Returns nullptr if the environment variable is not set or the path does not -// exist. -// -// If `service_account_scopes` or `service_account_subject` are specified, the -// found file must be a P12 service account or a JSON service account. If a -// different type of credential file is found, this function returns nullptr -// to indicate a service account file wasn't found. -StatusOr> MaybeLoadCredsFromAdcPaths( - bool non_service_account_ok, - absl::optional> service_account_scopes, - absl::optional service_account_subject, - ChannelOptions const& options = {}) { - // 1) Check if the GOOGLE_APPLICATION_CREDENTIALS environment variable is set. - auto path = GoogleAdcFilePathFromEnvVarOrEmpty(); - if (path.empty()) { - // 2) If no path was specified via environment variable, check if the - // gcloud ADC file exists. - path = GoogleAdcFilePathFromWellKnownPathOrEmpty(); - if (path.empty()) { - return StatusOr>(nullptr); - } - // Just because we had the necessary information to build the path doesn't - // mean that a file exists there. - std::error_code ec; - auto adc_file_status = google::cloud::internal::status(path, ec); - if (!google::cloud::internal::exists(adc_file_status)) { - return StatusOr>(nullptr); - } - } - - // If the path was specified, try to load that file; explicitly fail if it - // doesn't exist or can't be read and parsed. - return LoadCredsFromPath(path, non_service_account_ok, - std::move(service_account_scopes), - std::move(service_account_subject), options); -} - -StatusOr> GoogleDefaultCredentials( - ChannelOptions const& options) { - // 1 and 2) Check if the GOOGLE_APPLICATION_CREDENTIALS environment variable - // is set or if the gcloud ADC file exists. - auto creds = MaybeLoadCredsFromAdcPaths(true, {}, {}, options); - if (!creds) { - return StatusOr>(creds.status()); - } - if (*creds) { - return StatusOr>(std::move(*creds)); - } - - // 3) Use the implicit environment-based credentials (GCE, GAE Flexible, - // Cloud Run or GKE Environment). - return StatusOr>( - std::make_shared>()); -} - -std::shared_ptr CreateAnonymousCredentials() { - return std::make_shared(); -} - -StatusOr> -CreateAuthorizedUserCredentialsFromJsonFilePath(std::string const& path) { - std::ifstream is(path); - std::string contents(std::istreambuf_iterator{is}, {}); - auto info = ParseAuthorizedUserCredentials(contents, path); - if (!info) { - return StatusOr>(info.status()); - } - return StatusOr>( - std::make_shared>(*info)); -} - -StatusOr> -CreateAuthorizedUserCredentialsFromJsonContents(std::string const& contents, - ChannelOptions const& options) { - auto info = ParseAuthorizedUserCredentials(contents, "memory"); - if (!info) { - return StatusOr>(info.status()); - } - return StatusOr>( - std::make_shared>(*info, options)); -} - -StatusOr> -CreateServiceAccountCredentialsFromFilePath(std::string const& path) { - return CreateServiceAccountCredentialsFromFilePath(path, {}, {}); -} - -StatusOr> -CreateServiceAccountCredentialsFromFilePath( - std::string const& path, absl::optional> scopes, - absl::optional subject) { - auto credentials = - CreateServiceAccountCredentialsFromJsonFilePath(path, scopes, subject); - if (credentials) { - return credentials; - } - return CreateServiceAccountCredentialsFromP12FilePath(path, std::move(scopes), - std::move(subject)); -} - -StatusOr> -CreateServiceAccountCredentialsFromJsonFilePath(std::string const& path) { - return CreateServiceAccountCredentialsFromJsonFilePath(path, {}, {}); -} - -StatusOr> -CreateServiceAccountCredentialsFromJsonFilePath( - std::string const& path, absl::optional> scopes, - absl::optional subject, ChannelOptions const& options) { - std::ifstream is(path); - std::string contents(std::istreambuf_iterator{is}, {}); - auto info = ParseServiceAccountCredentials(contents, path); - if (!info) { - return StatusOr>(info.status()); - } - // These are supplied as extra parameters to this method, not in the JSON - // file. - info->subject = std::move(subject); - info->scopes = std::move(scopes); - return StatusOr>( - std::make_shared>(*info, options)); -} - -StatusOr> -CreateServiceAccountCredentialsFromP12FilePath( - std::string const& path, absl::optional> scopes, - absl::optional subject, ChannelOptions const& options) { - auto info = ParseServiceAccountP12File(path); - if (!info) { - return StatusOr>(info.status()); - } - // These are supplied as extra parameters to this method, not in the P12 - // file. - info->subject = std::move(subject); - info->scopes = std::move(scopes); - return StatusOr>( - std::make_shared>(*info, options)); -} - -StatusOr> -CreateServiceAccountCredentialsFromP12FilePath(std::string const& path) { - return CreateServiceAccountCredentialsFromP12FilePath(path, {}, {}); -} - -StatusOr> -CreateServiceAccountCredentialsFromDefaultPaths(ChannelOptions const& options) { - return CreateServiceAccountCredentialsFromDefaultPaths({}, {}, options); -} - -StatusOr> -CreateServiceAccountCredentialsFromDefaultPaths( - absl::optional> scopes, - absl::optional subject, ChannelOptions const& options) { - auto creds = MaybeLoadCredsFromAdcPaths(false, std::move(scopes), - std::move(subject), options); - if (!creds) { - return StatusOr>(creds.status()); - } - if (*creds) { - return StatusOr>(std::move(*creds)); - } - - // We've exhausted all search points, thus credentials cannot be constructed. - return google::cloud::internal::UnknownError( - "Could not create service account credentials using Application" - "Default Credentials paths. For more information, please see " + - std::string(kAdcLink), - GCP_ERROR_INFO()); -} - -StatusOr> -CreateServiceAccountCredentialsFromJsonContents(std::string const& contents, - ChannelOptions const& options) { - return CreateServiceAccountCredentialsFromJsonContents(contents, {}, {}, - options); -} - -StatusOr> -CreateServiceAccountCredentialsFromJsonContents( - std::string const& contents, absl::optional> scopes, - absl::optional subject, ChannelOptions const& options) { - auto info = ParseServiceAccountCredentials(contents, "memory"); - if (!info) { - return StatusOr>(info.status()); - } - std::chrono::system_clock::time_point now; - auto components = AssertionComponentsFromInfo(*info, now); - auto jwt_assertion = internal::MakeJWTAssertionNoThrow( - components.first, components.second, info->private_key); - if (!jwt_assertion) return std::move(jwt_assertion).status(); - - // These are supplied as extra parameters to this method, not in the JSON - // file. - info->subject = std::move(subject); - info->scopes = std::move(scopes); - return StatusOr>( - std::make_shared>(*info, options)); -} - -std::shared_ptr CreateComputeEngineCredentials() { - return std::make_shared>(); -} - -std::shared_ptr CreateComputeEngineCredentials( - std::string const& service_account_email) { - return std::make_shared>(service_account_email); -} - -} // namespace oauth2 -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google diff --git a/google/cloud/storage/oauth2/google_credentials.h b/google/cloud/storage/oauth2/google_credentials.h deleted file mode 100644 index 11c81abdcd717..0000000000000 --- a/google/cloud/storage/oauth2/google_credentials.h +++ /dev/null @@ -1,332 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OAUTH2_GOOGLE_CREDENTIALS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OAUTH2_GOOGLE_CREDENTIALS_H - -#include "google/cloud/storage/client_options.h" -#include "google/cloud/storage/oauth2/credentials.h" -#include "google/cloud/storage/version.h" -#include "google/cloud/optional.h" -#include "absl/types/optional.h" -#include -#include -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace oauth2 { - -/** - * Produces a Credentials type based on the runtime environment. - * - * If the GOOGLE_APPLICATION_CREDENTIALS environment variable is set, the JSON - * file it points to will be loaded and used to create a credential of the - * specified type. Otherwise, if running on a Google-hosted environment (e.g. - * Compute Engine), credentials for the environment's default service - * account will be used. - * - * @see https://cloud.google.com/docs/authentication/production for details - * about Application Default %Credentials. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -StatusOr> GoogleDefaultCredentials( - ChannelOptions const& options = {}); - -///@{ -/** - * @name Functions to manually create specific credential types. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ - -/** - * Creates an AnonymousCredentials. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -std::shared_ptr CreateAnonymousCredentials(); - -/** - * Creates an AuthorizedUserCredentials from a JSON file at the specified path. - * - * @note It is strongly preferred to instead use service account credentials - * with Cloud Storage client libraries. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -StatusOr> -CreateAuthorizedUserCredentialsFromJsonFilePath(std::string const& path); - -/** - * Creates an AuthorizedUserCredentials from a JSON string. - * - * @note It is strongly preferred to instead use service account credentials - * with Cloud Storage client libraries. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -StatusOr> -CreateAuthorizedUserCredentialsFromJsonContents( - std::string const& contents, ChannelOptions const& options = {}); - -///@{ -/** - * @name Load service account key files. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ - -/** - * Creates a ServiceAccountCredentials from a file at the specified path. - * - * @note This function automatically detects if the file is a JSON or P12 (aka - * PFX aka PKCS#12) file and tries to load the file as a service account - * credential. We strongly recommend that applications use JSON files for - * service account key files. - * - * These credentials use the cloud-platform OAuth 2.0 scope, defined by - * `GoogleOAuthScopeCloudPlatform()`. To specify alternate scopes, use the - * overloaded version of this function. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -StatusOr> -CreateServiceAccountCredentialsFromFilePath(std::string const& path); - -/** - * Creates a ServiceAccountCredentials from a file at the specified path. - * - * @note This function automatically detects if the file is a JSON or P12 (aka - * PFX aka PKCS#12) file and tries to load the file as a service account - * credential. We strongly recommend that applications use JSON files for - * service account key files. - * - * @param path the path to the file containing service account JSON credentials. - * @param scopes the scopes to request during the authorization grant. If - * omitted, the cloud-platform scope, defined by - * `GoogleOAuthScopeCloudPlatform()`, is used as a default. - * @param subject for domain-wide delegation; the email address of the user for - * which to request delegated access. If omitted, no "subject" attribute is - * included in the authorization grant. - * - * @see https://developers.google.com/identity/protocols/googlescopes for a list - * of OAuth 2.0 scopes used with Google APIs. - * - * @see https://developers.google.com/identity/protocols/OAuth2ServiceAccount - * for more information about domain-wide delegation. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -StatusOr> -CreateServiceAccountCredentialsFromFilePath( - std::string const& path, absl::optional> scopes, - absl::optional subject); - -/** - * Creates a ServiceAccountCredentials from a JSON file at the specified path. - * - * These credentials use the cloud-platform OAuth 2.0 scope, defined by - * `GoogleOAuthScopeCloudPlatform()`. To specify alternate scopes, use the - * overloaded version of this function. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -StatusOr> -CreateServiceAccountCredentialsFromJsonFilePath(std::string const& path); - -/** - * Creates a ServiceAccountCredentials from a JSON file at the specified path. - * - * @param path the path to the file containing service account JSON credentials. - * @param scopes the scopes to request during the authorization grant. If - * omitted, the cloud-platform scope, defined by - * `GoogleOAuthScopeCloudPlatform()`, is used as a default. - * @param subject for domain-wide delegation; the email address of the user for - * which to request delegated access. If omitted, no "subject" attribute is - * included in the authorization grant. - * @param options any configuration needed for the transport channel to - * Google's authentication servers. - * - * @see https://developers.google.com/identity/protocols/googlescopes for a list - * of OAuth 2.0 scopes used with Google APIs. - * - * @see https://developers.google.com/identity/protocols/OAuth2ServiceAccount - * for more information about domain-wide delegation. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -StatusOr> -CreateServiceAccountCredentialsFromJsonFilePath( - std::string const& path, absl::optional> scopes, - absl::optional subject, ChannelOptions const& options = {}); - -/** - * Creates a ServiceAccountCredentials from a P12 file at the specified path. - * - * These credentials use the cloud-platform OAuth 2.0 scope, defined by - * `GoogleOAuthScopeCloudPlatform()`. To specify alternate scopes, use the - * overloaded version of this function. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -StatusOr> -CreateServiceAccountCredentialsFromP12FilePath(std::string const& path); - -/** - * Creates a ServiceAccountCredentials from a P12 file at the specified path. - * - * @param path the path to the file containing service account JSON credentials. - * @param scopes the scopes to request during the authorization grant. If - * omitted, the cloud-platform scope, defined by - * `GoogleOAuthScopeCloudPlatform()`, is used as a default. - * @param subject for domain-wide delegation; the email address of the user for - * which to request delegated access. If omitted, no "subject" attribute is - * included in the authorization grant. - * @param options any configuration needed for the transport channel to - * Google's authentication servers. - * - * @see https://developers.google.com/identity/protocols/googlescopes for a list - * of OAuth 2.0 scopes used with Google APIs. - * - * @see https://developers.google.com/identity/protocols/OAuth2ServiceAccount - * for more information about domain-wide delegation. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -StatusOr> -CreateServiceAccountCredentialsFromP12FilePath( - std::string const& path, absl::optional> scopes, - absl::optional subject, ChannelOptions const& options = {}); -///@} - -/** - * Produces a ServiceAccountCredentials type by trying to load the standard - * Application Default %Credentials paths. - * - * If the GOOGLE_APPLICATION_CREDENTIALS environment variable is set, the JSON - * or P12 file it points to will be loaded. Otherwise, if the gcloud utility - * has configured an Application Default %Credentials file, that file is - * loaded. The loaded file is used to create a ServiceAccountCredentials. - * - * @param options any configuration needed for the transport channel to - * Google's authentication servers. - * - * @see https://cloud.google.com/docs/authentication/production for details - * about Application Default %Credentials. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -StatusOr> -CreateServiceAccountCredentialsFromDefaultPaths( - ChannelOptions const& options = {}); - -/** - * Produces a ServiceAccountCredentials type by trying to load the standard - * Application Default %Credentials paths. - * - * If the GOOGLE_APPLICATION_CREDENTIALS environment variable is set, the JSON - * or P12 file it points to will be loaded. Otherwise, if the gcloud utility - * has configured an Application Default %Credentials file, that file is - * loaded. The loaded file is used to create a ServiceAccountCredentials. - * - * @param scopes the scopes to request during the authorization grant. If - * omitted, the cloud-platform scope, defined by - * `GoogleOAuthScopeCloudPlatform()`, is used as a default. - * @param subject for domain-wide delegation; the email address of the user for - * which to request delegated access. If omitted, no "subject" attribute is - * included in the authorization grant. - * @param options any configuration needed for the transport channel to - * Google's authentication servers. - * - * @see https://developers.google.com/identity/protocols/googlescopes for a list - * of OAuth 2.0 scopes used with Google APIs. - * - * @see https://cloud.google.com/docs/authentication/production for details - * about Application Default %Credentials. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -StatusOr> -CreateServiceAccountCredentialsFromDefaultPaths( - absl::optional> scopes, - absl::optional subject, ChannelOptions const& options = {}); - -/** - * Creates a ServiceAccountCredentials from a JSON string. - * - * These credentials use the cloud-platform OAuth 2.0 scope, defined by - * `GoogleOAuthScopeCloudPlatform()`. To specify an alternate set of scopes, use - * the overloaded version of this function. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -StatusOr> -CreateServiceAccountCredentialsFromJsonContents( - std::string const& contents, ChannelOptions const& options = {}); - -/** - * Creates a ServiceAccountCredentials from a JSON string. - * - * @param contents the string containing the JSON contents of a service account - * credentials file. - * @param scopes the scopes to request during the authorization grant. If - * omitted, the cloud-platform scope, defined by - * `GoogleOAuthScopeCloudPlatform()`, is used as a default. - * @param subject for domain-wide delegation; the email address of the user for - * which to request delegated access. If omitted, no "subject" attribute is - * included in the authorization grant. - * @param options any configuration needed for the transport channel to - * Google's authentication servers. - * - * @see https://developers.google.com/identity/protocols/googlescopes for a list - * of OAuth 2.0 scopes used with Google APIs. - * - * @see https://developers.google.com/identity/protocols/OAuth2ServiceAccount - * for more information about domain-wide delegation. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -StatusOr> -CreateServiceAccountCredentialsFromJsonContents( - std::string const& contents, absl::optional> scopes, - absl::optional subject, ChannelOptions const& options = {}); - -/** - * Creates a ComputeEngineCredentials for the VM's default service account. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -std::shared_ptr CreateComputeEngineCredentials(); - -/** - * Creates a ComputeEngineCredentials for the VM's specified service account. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -std::shared_ptr CreateComputeEngineCredentials( - std::string const& service_account_email); - -///@} - -} // namespace oauth2 -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OAUTH2_GOOGLE_CREDENTIALS_H diff --git a/google/cloud/storage/oauth2/google_credentials_test.cc b/google/cloud/storage/oauth2/google_credentials_test.cc deleted file mode 100644 index 909fba2e3df7e..0000000000000 --- a/google/cloud/storage/oauth2/google_credentials_test.cc +++ /dev/null @@ -1,562 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/storage/oauth2/google_credentials.h" -#include "google/cloud/storage/internal/compute_engine_util.h" -#include "google/cloud/storage/oauth2/anonymous_credentials.h" -#include "google/cloud/storage/oauth2/authorized_user_credentials.h" -#include "google/cloud/storage/oauth2/compute_engine_credentials.h" -#include "google/cloud/storage/oauth2/google_application_default_credentials_file.h" -#include "google/cloud/storage/oauth2/service_account_credentials.h" -#include "google/cloud/storage/testing/constants.h" -#include "google/cloud/storage/testing/write_base64.h" -#include "google/cloud/internal/filesystem.h" -#include "google/cloud/testing_util/scoped_environment.h" -#include "google/cloud/testing_util/status_matchers.h" -#include "absl/strings/match.h" -#include -#include -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace oauth2 { -namespace { - -using ::google::cloud::storage::internal::GceCheckOverrideEnvVar; -using ::google::cloud::storage::testing::kP12KeyFileContents; -using ::google::cloud::storage::testing::kP12ServiceAccountId; -using ::google::cloud::storage::testing::WriteBase64AsBinary; -using ::google::cloud::testing_util::IsOk; -using ::google::cloud::testing_util::ScopedEnvironment; -using ::google::cloud::testing_util::StatusIs; -using ::testing::AllOf; -using ::testing::HasSubstr; -using ::testing::Not; -using ::testing::NotNull; - -class GoogleCredentialsTest : public ::testing::Test { - public: - // Make sure other higher-precedence credentials (ADC env var, gcloud ADC from - // well-known path) aren't loaded. - GoogleCredentialsTest() - : home_env_var_(GoogleAdcHomeEnvVar(), {}), - adc_env_var_(GoogleAdcEnvVar(), {}), - gcloud_path_override_env_var_(GoogleGcloudAdcFileEnvVar(), {}), - gce_check_override_env_var_(GceCheckOverrideEnvVar(), {}) {} - - protected: - ScopedEnvironment home_env_var_; - ScopedEnvironment adc_env_var_; - ScopedEnvironment gcloud_path_override_env_var_; - ScopedEnvironment gce_check_override_env_var_; -}; - -std::string const kAuthorizedUserCredFilename = "authorized-user.json"; -std::string const kAuthorizedUserCredContents = R"""({ - "client_id": "test-invalid-test-invalid.apps.googleusercontent.com", - "client_secret": "invalid-invalid-invalid", - "refresh_token": "1/test-test-test", - "type": "authorized_user" -})"""; - -void SetupAuthorizedUserCredentialsFileForTest(std::string const& filename) { - std::ofstream os(filename); - os << kAuthorizedUserCredContents; - os.close(); -} - -/** - * @test Verify `GoogleDefaultCredentials()` loads authorized user credentials. - * - * This test only verifies the right type of object is created, the unit tests - * for `AuthorizedUserCredentials` already check that once loaded the class - * works correctly. Testing here would be redundant. Furthermore, calling - * `AuthorizationHeader()` initiates the key verification workflow, that - * requires valid keys and contacting Google's production servers, and would - * make this an integration test. - */ -TEST_F(GoogleCredentialsTest, LoadValidAuthorizedUserCredentialsViaEnvVar) { - std::string filename = google::cloud::internal::PathAppend( - ::testing::TempDir(), kAuthorizedUserCredFilename); - SetupAuthorizedUserCredentialsFileForTest(filename); - - // Test that the authorized user credentials are loaded as the default when - // specified via the well known environment variable. - ScopedEnvironment adc_env_var(GoogleAdcEnvVar(), filename.c_str()); - auto creds = GoogleDefaultCredentials(); - ASSERT_STATUS_OK(creds); - // Need to create a temporary for the pointer because clang-tidy warns about - // using expressions with (potential) side-effects inside typeid(). - auto* ptr = creds->get(); - EXPECT_EQ(typeid(*ptr), typeid(AuthorizedUserCredentials<>)); -} - -TEST_F(GoogleCredentialsTest, LoadValidAuthorizedUserCredentialsViaGcloudFile) { - std::string filename = google::cloud::internal::PathAppend( - ::testing::TempDir(), kAuthorizedUserCredFilename); - SetupAuthorizedUserCredentialsFileForTest(filename); - // Test that the authorized user credentials are loaded as the default when - // stored in the well known gcloud ADC file path. - ScopedEnvironment gcloud_path_override_env_var(GoogleGcloudAdcFileEnvVar(), - filename.c_str()); - auto creds = GoogleDefaultCredentials(); - ASSERT_STATUS_OK(creds); - auto* ptr = creds->get(); - EXPECT_EQ(typeid(*ptr), typeid(AuthorizedUserCredentials<>)); -} - -TEST_F(GoogleCredentialsTest, LoadValidAuthorizedUserCredentialsFromFilename) { - std::string filename = google::cloud::internal::PathAppend( - ::testing::TempDir(), kAuthorizedUserCredFilename); - SetupAuthorizedUserCredentialsFileForTest(filename); - auto creds = CreateAuthorizedUserCredentialsFromJsonFilePath(filename); - ASSERT_STATUS_OK(creds); - auto* ptr = creds->get(); - EXPECT_EQ(typeid(*ptr), typeid(AuthorizedUserCredentials<>)); -} - -TEST_F(GoogleCredentialsTest, LoadValidAuthorizedUserCredentialsFromContents) { - // Test that the authorized user credentials are loaded from a string - // representing JSON contents. - auto creds = CreateAuthorizedUserCredentialsFromJsonContents( - kAuthorizedUserCredContents); - ASSERT_STATUS_OK(creds); - auto* ptr = creds->get(); - EXPECT_EQ(typeid(*ptr), typeid(AuthorizedUserCredentials<>)); -} - -TEST_F(GoogleCredentialsTest, - LoadInvalidAuthorizedUserCredentialsFromFilename) { - std::string filename = google::cloud::internal::PathAppend( - ::testing::TempDir(), "invalid-credentials.json"); - std::ofstream os(filename); - std::string contents_str = R"""( not-a-json-object-string )"""; - os << contents_str; - os.close(); - auto creds = CreateAuthorizedUserCredentialsFromJsonFilePath(filename); - EXPECT_THAT(creds, Not(IsOk())); -} - -TEST_F(GoogleCredentialsTest, - LoadInvalidAuthorizedUserCredentialsFromJsonContents) { - std::string contents_str = R"""( not-a-json-object-string )"""; - auto creds = CreateAuthorizedUserCredentialsFromJsonContents(contents_str); - EXPECT_THAT(creds, Not(IsOk())); -} - -/** - * @test Verify `GoogleDefaultCredentials()` loads service account credentials. - * - * This test only verifies the right type of object is created, the unit tests - * for `ServiceAccountCredentials` already check that once loaded the class - * works correctly. Testing here would be redundant. Furthermore, calling - * `AuthorizationHeader()` initiates the key verification workflow, that - * requires valid keys and contacting Google's production servers, and would - * make this an integration test. - */ - -std::string const kServiceAccountCredFilename = "service-account.json"; -std::string const kServiceAccountCredContents = R"""({ - "type": "service_account", - "project_id": "foo-project", - "private_key_id": "a1a111aa1111a11a11a11aa111a111a1a1111111", - "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCltiF2oP3KJJ+S\ntTc1McylY+TuAi3AdohX7mmqIjd8a3eBYDHs7FlnUrFC4CRijCr0rUqYfg2pmk4a\n6TaKbQRAhWDJ7XD931g7EBvCtd8+JQBNWVKnP9ByJUaO0hWVniM50KTsWtyX3up/\nfS0W2R8Cyx4yvasE8QHH8gnNGtr94iiORDC7De2BwHi/iU8FxMVJAIyDLNfyk0hN\neheYKfIDBgJV2v6VaCOGWaZyEuD0FJ6wFeLybFBwibrLIBE5Y/StCrZoVZ5LocFP\nT4o8kT7bU6yonudSCyNMedYmqHj/iF8B2UN1WrYx8zvoDqZk0nxIglmEYKn/6U7U\ngyETGcW9AgMBAAECggEAC231vmkpwA7JG9UYbviVmSW79UecsLzsOAZnbtbn1VLT\nPg7sup7tprD/LXHoyIxK7S/jqINvPU65iuUhgCg3Rhz8+UiBhd0pCH/arlIdiPuD\n2xHpX8RIxAq6pGCsoPJ0kwkHSw8UTnxPV8ZCPSRyHV71oQHQgSl/WjNhRi6PQroB\nSqc/pS1m09cTwyKQIopBBVayRzmI2BtBxyhQp9I8t5b7PYkEZDQlbdq0j5Xipoov\n9EW0+Zvkh1FGNig8IJ9Wp+SZi3rd7KLpkyKPY7BK/g0nXBkDxn019cET0SdJOHQG\nDiHiv4yTRsDCHZhtEbAMKZEpku4WxtQ+JjR31l8ueQKBgQDkO2oC8gi6vQDcx/CX\nZ23x2ZUyar6i0BQ8eJFAEN+IiUapEeCVazuxJSt4RjYfwSa/p117jdZGEWD0GxMC\n+iAXlc5LlrrWs4MWUc0AHTgXna28/vii3ltcsI0AjWMqaybhBTTNbMFa2/fV2OX2\nUimuFyBWbzVc3Zb9KAG4Y7OmJQKBgQC5324IjXPq5oH8UWZTdJPuO2cgRsvKmR/r\n9zl4loRjkS7FiOMfzAgUiXfH9XCnvwXMqJpuMw2PEUjUT+OyWjJONEK4qGFJkbN5\n3ykc7p5V7iPPc7Zxj4mFvJ1xjkcj+i5LY8Me+gL5mGIrJ2j8hbuv7f+PWIauyjnp\nNx/0GVFRuQKBgGNT4D1L7LSokPmFIpYh811wHliE0Fa3TDdNGZnSPhaD9/aYyy78\nLkxYKuT7WY7UVvLN+gdNoVV5NsLGDa4cAV+CWPfYr5PFKGXMT/Wewcy1WOmJ5des\nAgMC6zq0TdYmMBN6WpKUpEnQtbmh3eMnuvADLJWxbH3wCkg+4xDGg2bpAoGAYRNk\nMGtQQzqoYNNSkfus1xuHPMA8508Z8O9pwKU795R3zQs1NAInpjI1sOVrNPD7Ymwc\nW7mmNzZbxycCUL/yzg1VW4P1a6sBBYGbw1SMtWxun4ZbnuvMc2CTCh+43/1l+FHe\nMmt46kq/2rH2jwx5feTbOE6P6PINVNRJh/9BDWECgYEAsCWcH9D3cI/QDeLG1ao7\nrE2NcknP8N783edM07Z/zxWsIsXhBPY3gjHVz2LDl+QHgPWhGML62M0ja/6SsJW3\nYvLLIc82V7eqcVJTZtaFkuht68qu/Jn1ezbzJMJ4YXDYo1+KFi+2CAGR06QILb+I\nlUtj+/nH3HDQjM4ltYfTPUg=\n-----END PRIVATE KEY-----\n", - "client_email": "foo-email@foo-project.iam.gserviceaccount.com", - "client_id": "100000000000000000001", - "auth_uri": "https://accounts.google.com/o/oauth2/auth", - "token_uri": "https://accounts.google.com/o/oauth2/token", - "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", - "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/foo-email%40foo-project.iam.gserviceaccount.com" -})"""; - -std::string const kServiceAccountCredInvalidPrivateKey = R"""({ - "type": "service_account", - "project_id": "foo-project", - "private_key_id": "a1a111aa1111a11a11a11aa111a111a1a1111111", - "private_key": "an-invalid-private-key", - "client_email": "foo-email@foo-project.iam.gserviceaccount.com", - "client_id": "100000000000000000001", - "auth_uri": "https://accounts.google.com/o/oauth2/auth", - "token_uri": "https://accounts.google.com/o/oauth2/token", - "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", - "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/foo-email%40foo-project.iam.gserviceaccount.com" -})"""; - -void SetupServiceAccountCredentialsFileForTest(std::string const& filename) { - std::ofstream os(filename); - os << kServiceAccountCredContents; - os.close(); -} - -TEST_F(GoogleCredentialsTest, LoadValidServiceAccountCredentialsViaEnvVar) { - std::string filename = google::cloud::internal::PathAppend( - ::testing::TempDir(), kAuthorizedUserCredFilename); - SetupServiceAccountCredentialsFileForTest(filename); - - // Test that the service account credentials are loaded as the default when - // specified via the well known environment variable. - ScopedEnvironment adc_env_var(GoogleAdcEnvVar(), filename.c_str()); - auto creds = GoogleDefaultCredentials(); - ASSERT_STATUS_OK(creds); - // Need to create a temporary for the pointer because clang-tidy warns about - // using expressions with (potential) side-effects inside typeid(). - auto* ptr = creds->get(); - EXPECT_EQ(typeid(*ptr), typeid(ServiceAccountCredentials<>)); -} - -TEST_F(GoogleCredentialsTest, LoadValidServiceAccountCredentialsViaGcloudFile) { - std::string filename = google::cloud::internal::PathAppend( - ::testing::TempDir(), kAuthorizedUserCredFilename); - SetupServiceAccountCredentialsFileForTest(filename); - - // Test that the service account credentials are loaded as the default when - // stored in the well known gcloud ADC file path. - ScopedEnvironment gcloud_path_override_env_var(GoogleGcloudAdcFileEnvVar(), - filename.c_str()); - auto creds = GoogleDefaultCredentials(); - ASSERT_STATUS_OK(creds); - auto* ptr = creds->get(); - EXPECT_EQ(typeid(*ptr), typeid(ServiceAccountCredentials<>)); -} - -TEST_F(GoogleCredentialsTest, LoadValidServiceAccountCredentialsFromFilename) { - std::string filename = google::cloud::internal::PathAppend( - ::testing::TempDir(), kServiceAccountCredFilename); - SetupServiceAccountCredentialsFileForTest(filename); - - // Test that the service account credentials are loaded from a file. - auto creds = CreateServiceAccountCredentialsFromJsonFilePath(filename); - ASSERT_STATUS_OK(creds); - auto* ptr = creds->get(); - EXPECT_EQ(typeid(*ptr), typeid(ServiceAccountCredentials<>)); - - // Test the wrapper function. - creds = CreateServiceAccountCredentialsFromFilePath(filename); - ASSERT_STATUS_OK(creds); - auto* ptr2 = creds->get(); - EXPECT_EQ(typeid(*ptr2), typeid(ServiceAccountCredentials<>)); - - creds = CreateServiceAccountCredentialsFromFilePath( - filename, {{"https://www.googleapis.com/auth/devstorage.full_control"}}, - "user@foo.bar"); - ASSERT_STATUS_OK(creds); - auto* ptr3 = creds->get(); - EXPECT_EQ(typeid(*ptr3), typeid(ServiceAccountCredentials<>)); -} - -TEST_F(GoogleCredentialsTest, - LoadValidServiceAccountCredentialsFromFilenameWithOptionalArgs) { - std::string filename = google::cloud::internal::PathAppend( - ::testing::TempDir(), kServiceAccountCredFilename); - SetupServiceAccountCredentialsFileForTest(filename); - - // Test that the service account credentials are loaded from a file. - auto creds = CreateServiceAccountCredentialsFromJsonFilePath( - filename, {{"https://www.googleapis.com/auth/devstorage.full_control"}}, - "user@foo.bar"); - ASSERT_STATUS_OK(creds); - auto* ptr = creds->get(); - EXPECT_EQ(typeid(*ptr), typeid(ServiceAccountCredentials<>)); -} - -TEST_F(GoogleCredentialsTest, - LoadInvalidServiceAccountCredentialsFromFilename) { - std::string filename = google::cloud::internal::PathAppend( - ::testing::TempDir(), "invalid-credentials.json"); - std::ofstream os(filename); - std::string contents_str = R"""( not-a-json-object-string )"""; - os << contents_str; - os.close(); - - auto creds = CreateServiceAccountCredentialsFromJsonFilePath( - filename, {{"https://www.googleapis.com/auth/devstorage.full_control"}}, - "user@foo.bar"); - EXPECT_THAT(creds, Not(IsOk())); -} - -TEST_F(GoogleCredentialsTest, - LoadValidServiceAccountCredentialsFromDefaultPathsViaEnvVar) { - std::string filename = google::cloud::internal::PathAppend( - ::testing::TempDir(), kAuthorizedUserCredFilename); - SetupServiceAccountCredentialsFileForTest(filename); - - // Test that the service account credentials are loaded as the default when - // specified via the well known environment variable. - ScopedEnvironment adc_env_var(GoogleAdcEnvVar(), filename.c_str()); - auto creds = CreateServiceAccountCredentialsFromDefaultPaths(); - ASSERT_STATUS_OK(creds); - // Need to create a temporary for the pointer because clang-tidy warns about - // using expressions with (potential) side-effects inside typeid(). - auto* ptr = creds->get(); - EXPECT_EQ(typeid(*ptr), typeid(ServiceAccountCredentials<>)); -} - -TEST_F(GoogleCredentialsTest, - LoadValidServiceAccountCredentialsFromDefaultPathsViaGcloudFile) { - std::string filename = google::cloud::internal::PathAppend( - ::testing::TempDir(), kAuthorizedUserCredFilename); - SetupServiceAccountCredentialsFileForTest(filename); - - // Test that the service account credentials are loaded as the default when - // stored in the well known gcloud ADC file path. - ScopedEnvironment gcloud_path_override_env_var(GoogleGcloudAdcFileEnvVar(), - filename.c_str()); - auto creds = CreateServiceAccountCredentialsFromDefaultPaths(); - ASSERT_STATUS_OK(creds); - auto* ptr = creds->get(); - EXPECT_EQ(typeid(*ptr), typeid(ServiceAccountCredentials<>)); -} - -TEST_F(GoogleCredentialsTest, - LoadValidServiceAccountCredentialsFromDefaultPathsWithOptionalArgs) { - std::string filename = google::cloud::internal::PathAppend( - ::testing::TempDir(), kAuthorizedUserCredFilename); - SetupServiceAccountCredentialsFileForTest(filename); - - // Test that the service account credentials are loaded as the default when - // specified via the well known environment variable. - ScopedEnvironment adc_env_var(GoogleAdcEnvVar(), filename.c_str()); - auto creds = CreateServiceAccountCredentialsFromDefaultPaths( - {{"https://www.googleapis.com/auth/devstorage.full_control"}}, - "user@foo.bar"); - ASSERT_STATUS_OK(creds); - auto* ptr = creds->get(); - EXPECT_EQ(typeid(*ptr), typeid(ServiceAccountCredentials<>)); -} - -TEST_F( - GoogleCredentialsTest, - DoNotLoadAuthorizedUserCredentialsFromCreateServiceAccountCredentialsFromDefaultPaths) { - std::string filename = google::cloud::internal::PathAppend( - ::testing::TempDir(), kAuthorizedUserCredFilename); - SetupAuthorizedUserCredentialsFileForTest(filename); - - // Test that the authorized user credentials are loaded as the default when - // specified via the well known environment variable. - ScopedEnvironment adc_env_var(GoogleAdcEnvVar(), filename.c_str()); - auto creds = CreateServiceAccountCredentialsFromDefaultPaths(); - EXPECT_THAT(creds, StatusIs(Not(StatusCode::kOk), - HasSubstr("Unsupported credential type"))); -} - -TEST_F(GoogleCredentialsTest, - MissingCredentialsCreateServiceAccountCredentialsFromDefaultPaths) { - // The developer may have configured something that are not service account - // credentials in the well-known path. Change the search location to a - // directory that should have have developer configuration files. - ScopedEnvironment home_env_var(GoogleAdcHomeEnvVar(), ::testing::TempDir()); - // Test that when CreateServiceAccountCredentialsFromDefaultPaths cannot - // find any credentials, it fails. - auto creds = CreateServiceAccountCredentialsFromDefaultPaths(); - EXPECT_THAT( - creds, - StatusIs(Not(StatusCode::kOk), - HasSubstr("Could not create service account credentials"))); -} - -TEST_F(GoogleCredentialsTest, LoadValidServiceAccountCredentialsFromContents) { - // Test that the service account credentials are loaded from a string - // representing JSON contents. - auto creds = CreateServiceAccountCredentialsFromJsonContents( - kServiceAccountCredContents, - {{"https://www.googleapis.com/auth/devstorage.full_control"}}, - "user@foo.bar"); - ASSERT_STATUS_OK(creds); - auto* ptr = creds->get(); - EXPECT_EQ(typeid(*ptr), typeid(ServiceAccountCredentials<>)); -} - -TEST_F(GoogleCredentialsTest, - LoadInvalidServiceAccountCredentialsFromContents) { - // Test that providing invalid contents returns a failure status. - auto creds = CreateServiceAccountCredentialsFromJsonContents( - "not-a-valid-jason-object", - {{"https://www.googleapis.com/auth/devstorage.full_control"}}, - "user@foo.bar"); - EXPECT_THAT(creds, Not(IsOk())); -} - -TEST_F(GoogleCredentialsTest, - LoadInvalidServiceAccountCredentialsWithInvalidKey) { - // Test that providing invalid private_key returns a failure status. - auto creds = CreateServiceAccountCredentialsFromJsonContents( - kServiceAccountCredInvalidPrivateKey); - EXPECT_THAT(creds, Not(IsOk())); -} - -TEST_F(GoogleCredentialsTest, LoadComputeEngineCredentialsFromADCFlow) { - ScopedEnvironment gcloud_path_override_env_var(GoogleGcloudAdcFileEnvVar(), - ""); - // If the ADC flow thinks we're on a GCE instance, it should return - // ComputeEngineCredentials. - ScopedEnvironment gce_check_override_env_var(GceCheckOverrideEnvVar(), "1"); - - auto creds = GoogleDefaultCredentials(); - ASSERT_STATUS_OK(creds); - auto* ptr = creds->get(); - EXPECT_EQ(typeid(*ptr), typeid(ComputeEngineCredentials<>)); -} - -TEST_F(GoogleCredentialsTest, CreateComputeEngineCredentialsWithDefaultEmail) { - auto credentials = CreateComputeEngineCredentials(); - auto* ptr = credentials.get(); - EXPECT_EQ(typeid(*ptr), typeid(ComputeEngineCredentials<>)); - EXPECT_EQ( - std::string("default"), - dynamic_cast*>(ptr)->service_account_email()); -} - -TEST_F(GoogleCredentialsTest, CreateComputeEngineCredentialsWithExplicitEmail) { - auto credentials = CreateComputeEngineCredentials("foo@bar.baz"); - auto* ptr = credentials.get(); - EXPECT_EQ(typeid(*ptr), typeid(ComputeEngineCredentials<>)); - EXPECT_EQ( - std::string("foo@bar.baz"), - dynamic_cast*>(ptr)->service_account_email()); -} - -TEST_F(GoogleCredentialsTest, LoadUnknownTypeCredentials) { - std::string filename = google::cloud::internal::PathAppend( - ::testing::TempDir(), "unknown-type-credentials.json"); - std::ofstream os(filename); - std::string contents_str = R"""({ - "type": "unknown_type" -})"""; - os << contents_str; - os.close(); - ScopedEnvironment adc_env_var(GoogleAdcEnvVar(), filename.c_str()); - - auto creds = GoogleDefaultCredentials(); - EXPECT_THAT(creds, StatusIs(Not(StatusCode::kOk), - AllOf(HasSubstr("Unsupported credential type"), - HasSubstr(filename)))); -} - -TEST_F(GoogleCredentialsTest, LoadInvalidCredentials) { - char const* const test_cases[] = { - R"""( not-a-json-object-string )""", - R"js("valid-json-but-not-an-object")js", - }; - for (auto const* contents : test_cases) { - SCOPED_TRACE("Testing with: " + std::string{contents}); - std::string filename = google::cloud::internal::PathAppend( - ::testing::TempDir(), "invalid-credentials.json"); - std::ofstream os(filename); - os << contents; - os.close(); - ScopedEnvironment adc_env_var(GoogleAdcEnvVar(), filename.c_str()); - - auto creds = GoogleDefaultCredentials(); - EXPECT_THAT(creds, - StatusIs(StatusCode::kInvalidArgument, HasSubstr(filename))); - } -} - -TEST_F(GoogleCredentialsTest, LoadInvalidAuthorizedUserCredentialsViaADC) { - std::string filename = google::cloud::internal::PathAppend( - ::testing::TempDir(), "invalid-au-credentials.json"); - std::ofstream os(filename); - std::string contents_str = R"""("type": "authorized_user")"""; - os << contents_str; - os.close(); - ScopedEnvironment adc_env_var(GoogleAdcEnvVar(), filename.c_str()); - - auto creds = GoogleDefaultCredentials(); - EXPECT_THAT(creds, StatusIs(StatusCode::kInvalidArgument)); -} - -TEST_F(GoogleCredentialsTest, LoadInvalidServiceAccountCredentialsViaADC) { - std::string filename = google::cloud::internal::PathAppend( - ::testing::TempDir(), "invalid-au-credentials.json"); - std::ofstream os(filename); - std::string contents_str = R"""("type": "service_account")"""; - os << contents_str; - os.close(); - ScopedEnvironment adc_env_var(GoogleAdcEnvVar(), filename.c_str()); - - auto creds = GoogleDefaultCredentials(); - EXPECT_THAT(creds, StatusIs(StatusCode::kInvalidArgument)); -} - -TEST_F(GoogleCredentialsTest, MissingCredentialsViaEnvVar) { - char const filename[] = "missing-credentials.json"; - ScopedEnvironment adc_env_var(GoogleAdcEnvVar(), filename); - - auto creds = GoogleDefaultCredentials(); - EXPECT_THAT(creds, StatusIs(Not(StatusCode::kOk), - AllOf(HasSubstr("Cannot open credentials file"), - HasSubstr(filename)))); -} - -TEST_F(GoogleCredentialsTest, MissingCredentialsViaGcloudFilePath) { - char const filename[] = "missing-credentials.json"; - - // The method to create default credentials should see that no file exists at - // this path, then continue trying to load the other credential types, - // eventually finding no valid credentials and hitting a runtime error. - ScopedEnvironment gcloud_path_override_env_var(GoogleGcloudAdcFileEnvVar(), - filename); - ScopedEnvironment gcloud_metadata_host_override_env_var( - internal::GceMetadataHostnameEnvVar(), "invalid.google.internal"); - - auto creds = GoogleDefaultCredentials(); - ASSERT_STATUS_OK(creds); - ASSERT_THAT(*creds, NotNull()); - auto header = (*creds)->AuthorizationHeader(); - EXPECT_THAT(header, StatusIs(Not(StatusCode::kOk))); -} - -TEST_F(GoogleCredentialsTest, LoadP12Credentials) { - // Ensure that the parser detects that it's not a JSON file and parses it as - // a P12 file. - std::string filename = google::cloud::internal::PathAppend( - ::testing::TempDir(), "credentials.p12"); - WriteBase64AsBinary(filename, kP12KeyFileContents); - ScopedEnvironment adc_env_var(GoogleAdcEnvVar(), filename.c_str()); - - auto creds = GoogleDefaultCredentials(); - EXPECT_EQ(0, std::remove(filename.c_str())); - - if (creds.status().code() == StatusCode::kInvalidArgument) { - if (absl::StrContains(creds.status().message(), "error:0308010C")) { - // With OpenSSL 3.0 the PKCS#12 files may not be supported by default. - GTEST_SKIP() << "PKCS#12 support unavailable, skipping test"; - } -#if _WIN32 - // On Windows, the OS may not have the necessary providers to support - // PKCS#12. Unfortunately the error message is not as unambiguous, so we use - // the function that fails instead. - auto const& metadata = creds.status().error_info().metadata(); - auto const l = metadata.find("gcloud-cpp.source.function"); - if (l != metadata.end() && l->second == "GetCertificatePrivateKey") { - GTEST_SKIP() << "PKCS#12 support unavailable, skipping test"; - } -#endif // _WIN32 - } - ASSERT_STATUS_OK(creds); - auto* ptr = creds->get(); - EXPECT_EQ(typeid(*ptr), typeid(ServiceAccountCredentials<>)); - EXPECT_EQ(kP12ServiceAccountId, ptr->AccountEmail()); - EXPECT_FALSE(ptr->KeyId().empty()); -} - -} // namespace -} // namespace oauth2 -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google diff --git a/google/cloud/storage/oauth2/refreshing_credentials_wrapper.cc b/google/cloud/storage/oauth2/refreshing_credentials_wrapper.cc deleted file mode 100644 index ddb055c3512c5..0000000000000 --- a/google/cloud/storage/oauth2/refreshing_credentials_wrapper.cc +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/storage/oauth2/refreshing_credentials_wrapper.h" -#include "google/cloud/storage/oauth2/credential_constants.h" -#include "google/cloud/internal/oauth2_refreshing_credentials_wrapper.h" -#include "absl/strings/str_split.h" -#include -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace oauth2 { - -RefreshingCredentialsWrapper::RefreshingCredentialsWrapper() - : impl_(std::make_unique()) { -} - -std::pair RefreshingCredentialsWrapper::SplitToken( - std::string const& token) { - std::pair split_token = absl::StrSplit(token, ": "); - return split_token; -} - -bool RefreshingCredentialsWrapper::IsExpired( - std::chrono::system_clock::time_point now) const { - return now > - (impl_->token_.expiration - GoogleOAuthAccessTokenExpirationSlack()); -} - -bool RefreshingCredentialsWrapper::IsValid( - std::chrono::system_clock::time_point now) const { - return !impl_->token_.token.empty() && !IsExpired(now); -} - -} // namespace oauth2 -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google diff --git a/google/cloud/storage/oauth2/refreshing_credentials_wrapper.h b/google/cloud/storage/oauth2/refreshing_credentials_wrapper.h deleted file mode 100644 index 85496c491f7c2..0000000000000 --- a/google/cloud/storage/oauth2/refreshing_credentials_wrapper.h +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OAUTH2_REFRESHING_CREDENTIALS_WRAPPER_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OAUTH2_REFRESHING_CREDENTIALS_WRAPPER_H - -#include "google/cloud/storage/version.h" -#include "google/cloud/internal/oauth2_refreshing_credentials_wrapper.h" -#include "google/cloud/status.h" -#include "google/cloud/status_or.h" -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace oauth2 { - -/** - * Wrapper for refreshable parts of a Credentials object. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -class RefreshingCredentialsWrapper { - public: - RefreshingCredentialsWrapper(); - - struct TemporaryToken { - std::string token; - std::chrono::system_clock::time_point expiration_time; - }; - - template - StatusOr AuthorizationHeader( - std::chrono::system_clock::time_point, RefreshFunctor refresh_fn) const { - auto refresh_fn_wrapper = - [refresh_fn]() -> StatusOr { - auto temp_token = refresh_fn(); - if (!temp_token.ok()) return temp_token.status(); - auto token = SplitToken(temp_token->token); - return google::cloud::AccessToken{std::move(token.second), - temp_token->expiration_time}; - }; - auto header = impl_->AuthorizationHeader(refresh_fn_wrapper); - if (!header.ok()) return std::move(header).status(); - return header->first + ": " + header->second; - } - - /** - * Returns whether the current access token should be considered expired. - * - * When determining if a Credentials object needs to be refreshed, the IsValid - * method should be used instead; there may be cases where a Credentials is - * not expired but should be considered invalid. - * - * If a Credentials is close to expiration but not quite expired, this method - * may still return false. This helps prevent the case where an access token - * expires between when it is obtained and when it is used. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ - bool IsExpired(std::chrono::system_clock::time_point now) const; - - /** - * Returns whether the current access token should be considered valid. - * - * This method should be used to determine whether a Credentials object needs - * to be refreshed. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ - bool IsValid(std::chrono::system_clock::time_point now) const; - - private: - static std::pair SplitToken( - std::string const& token); - - std::unique_ptr impl_; -}; - -} // namespace oauth2 -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OAUTH2_REFRESHING_CREDENTIALS_WRAPPER_H diff --git a/google/cloud/storage/oauth2/service_account_credentials.cc b/google/cloud/storage/oauth2/service_account_credentials.cc deleted file mode 100644 index 248152e8b64ad..0000000000000 --- a/google/cloud/storage/oauth2/service_account_credentials.cc +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/storage/oauth2/service_account_credentials.h" -#include "google/cloud/storage/client_options.h" -#include "google/cloud/storage/internal/base64.h" -#include "google/cloud/storage/internal/make_jwt_assertion.h" -#include "google/cloud/internal/absl_str_join_quiet.h" -#include "google/cloud/internal/oauth2_cached_credentials.h" -#include "google/cloud/internal/oauth2_service_account_credentials.h" -#include "google/cloud/internal/parse_service_account_p12_file.h" -#include "google/cloud/internal/sign_using_sha256.h" -#include -#include -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace oauth2 { - -auto constexpr kP12PrivateKeyIdMarker = "--unknown--"; - -StatusOr ParseServiceAccountCredentials( - std::string const& content, std::string const& source, - std::string const& default_token_uri) { - auto info = oauth2_internal::ParseServiceAccountCredentials( - content, source, default_token_uri); - if (!info.ok()) return info.status(); - return ServiceAccountCredentialsInfo{info->client_email, info->private_key_id, - info->private_key, info->token_uri, - info->scopes, info->subject}; -} - -StatusOr ParseServiceAccountP12File( - std::string const& source, std::string const&) { - auto info = oauth2_internal::ParseServiceAccountP12File(source); - if (!info.ok()) return info.status(); - return ServiceAccountCredentialsInfo{info->client_email, info->private_key_id, - info->private_key, info->token_uri, - info->scopes, info->subject}; -} - -std::pair AssertionComponentsFromInfo( - ServiceAccountCredentialsInfo const& info, - std::chrono::system_clock::time_point now) { - return oauth2_internal::AssertionComponentsFromInfo( - internal::MapServiceAccountCredentialsInfo(info), now); -} - -std::string MakeJWTAssertion(std::string const& header, - std::string const& payload, - std::string const& pem_contents) { - return internal::MakeJWTAssertionNoThrow(header, payload, pem_contents) - .value(); -} - -std::string CreateServiceAccountRefreshPayload( - ServiceAccountCredentialsInfo const& info, std::string const&, - std::chrono::system_clock::time_point now) { - auto params = oauth2_internal::CreateServiceAccountRefreshPayload( - internal::MapServiceAccountCredentialsInfo(info), now); - return absl::StrJoin(params, "&", absl::PairFormatter("=")); -} - -StatusOr -ParseServiceAccountRefreshResponse( - storage::internal::HttpResponse const& response, - std::chrono::system_clock::time_point now) { - auto access_token = nlohmann::json::parse(response.payload, nullptr, false); - if (access_token.is_discarded() || access_token.count("access_token") == 0 || - access_token.count("expires_in") == 0 || - access_token.count("token_type") == 0) { - auto payload = - response.payload + - "Could not find all required fields in response (access_token," - " expires_in, token_type) while trying to obtain an access token for" - " service account credentials."; - return AsStatus(storage::internal::HttpResponse{response.status_code, - payload, response.headers}); - } - // Response should have the attributes "access_token", "expires_in", and - // "token_type". - std::string header = - "Authorization: " + access_token.value("token_type", "") + " " + - access_token.value("access_token", ""); - auto expires_in = std::chrono::seconds(access_token.value("expires_in", 0)); - auto new_expiration = now + expires_in; - - return RefreshingCredentialsWrapper::TemporaryToken{std::move(header), - new_expiration}; -} - -StatusOr MakeSelfSignedJWT( - ServiceAccountCredentialsInfo const& info, - std::chrono::system_clock::time_point tp) { - auto mapped = internal::MapServiceAccountCredentialsInfo(info); - return ::google::cloud::oauth2_internal::MakeSelfSignedJWT(mapped, tp); -} - -bool ServiceAccountUseOAuth(ServiceAccountCredentialsInfo const& info) { - if (info.private_key_id == kP12PrivateKeyIdMarker) return true; - // Self-signed JWTs do not work in GCS if they have scopes. - if (info.scopes.has_value()) return true; - auto disable_jwt = google::cloud::internal::GetEnv( - "GOOGLE_CLOUD_CPP_EXPERIMENTAL_DISABLE_SELF_SIGNED_JWT"); - return disable_jwt.has_value(); -} - -ServiceAccountCredentials:: - ServiceAccountCredentials(ServiceAccountCredentialsInfo info, - ChannelOptions const& options) - : impl_(std::make_unique( - std::make_unique( - internal::MapServiceAccountCredentialsInfo(std::move(info)), - Options{}.set(options.ssl_root_path()), - [](Options const& o) { - return rest_internal::MakeDefaultRestClient(std::string{}, o); - }))) {} - -} // namespace oauth2 - -namespace internal { - -oauth2_internal::ServiceAccountCredentialsInfo MapServiceAccountCredentialsInfo( - oauth2::ServiceAccountCredentialsInfo info) { - // Storage has more stringent requirements w.r.t. self-signed JWTs - // than most services. Any scope makes the self-signed JWTs unusable with - // storage, but they remain usable with other services. We need to disable - // self-signed JWTs in the implementation class as it is unaware of the - // storage service limitations. - auto enable_self_signed_jwt = !ServiceAccountUseOAuth(info); - return {std::move(info.client_email), std::move(info.private_key_id), - std::move(info.private_key), std::move(info.token_uri), - std::move(info.scopes), std::move(info.subject), - enable_self_signed_jwt, /*.universe_domain=*/absl::nullopt, - /*.project_id=*/absl::nullopt}; -} - -} // namespace internal -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google diff --git a/google/cloud/storage/oauth2/service_account_credentials.h b/google/cloud/storage/oauth2/service_account_credentials.h deleted file mode 100644 index 7da214edbea8b..0000000000000 --- a/google/cloud/storage/oauth2/service_account_credentials.h +++ /dev/null @@ -1,365 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OAUTH2_SERVICE_ACCOUNT_CREDENTIALS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OAUTH2_SERVICE_ACCOUNT_CREDENTIALS_H - -#include "google/cloud/storage/client_options.h" -#include "google/cloud/storage/internal/base64.h" -#include "google/cloud/storage/internal/curl/request_builder.h" -#include "google/cloud/storage/internal/http_response.h" -#include "google/cloud/storage/oauth2/credential_constants.h" -#include "google/cloud/storage/oauth2/credentials.h" -#include "google/cloud/storage/oauth2/refreshing_credentials_wrapper.h" -#include "google/cloud/storage/version.h" -#include "google/cloud/internal/curl_handle_factory.h" -#include "google/cloud/internal/getenv.h" -#include "google/cloud/internal/make_status.h" -#include "google/cloud/internal/oauth2_service_account_credentials.h" -#include "google/cloud/internal/sha256_hash.h" -#include "google/cloud/internal/sign_using_sha256.h" -#include "google/cloud/optional.h" -#include "google/cloud/status_or.h" -#include "absl/types/optional.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace oauth2 { - -/** - * Object to hold information used to instantiate an ServiceAccountCredentials. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -struct ServiceAccountCredentialsInfo { - std::string client_email; - std::string private_key_id; - std::string private_key; - std::string token_uri; - // If no set is supplied, a default set of scopes will be used. - absl::optional> scopes; - // See https://developers.google.com/identity/protocols/OAuth2ServiceAccount. - absl::optional subject; -}; - -/** - * Parses the contents of a JSON keyfile into a ServiceAccountCredentialsInfo. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ - -StatusOr ParseServiceAccountCredentials( - std::string const& content, std::string const& source, - std::string const& default_token_uri = GoogleOAuthRefreshEndpoint()); - -/** - * Parses the contents of a P12 keyfile into a ServiceAccountCredentialsInfo. - * - * @warning We strongly recommend that applications use JSON keyfiles instead. - * - * @note Note that P12 keyfiles do not contain the `client_email` for the - * service account, the application must obtain this through some other means - * and provide them to the function. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -StatusOr ParseServiceAccountP12File( - std::string const& source, - std::string const& default_token_uri = GoogleOAuthRefreshEndpoint()); - -/** - * Parses a refresh response JSON string and uses the current time to create a - * TemporaryToken. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -StatusOr -ParseServiceAccountRefreshResponse( - storage::internal::HttpResponse const& response, - std::chrono::system_clock::time_point now); - -/** - * Splits a ServiceAccountCredentialsInfo into header and payload components - * and uses the current time to make a JWT assertion. - * - * @see - * https://cloud.google.com/endpoints/docs/frameworks/java/troubleshoot-jwt - * - * @see https://tools.ietf.org/html/rfc7523 - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -std::pair AssertionComponentsFromInfo( - ServiceAccountCredentialsInfo const& info, - std::chrono::system_clock::time_point now); - -/** - * Given a key and a JSON header and payload, creates a JWT assertion string. - * - * @see https://tools.ietf.org/html/rfc7519 - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -std::string MakeJWTAssertion(std::string const& header, - std::string const& payload, - std::string const& pem_contents); - -/** - * Uses a ServiceAccountCredentialsInfo and the current time to construct a JWT - * assertion. - * - * The assertion combined with the grant type is used to create the refresh - * payload. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -std::string CreateServiceAccountRefreshPayload( - ServiceAccountCredentialsInfo const& info, std::string const& grant_type, - std::chrono::system_clock::time_point now); - -/** - * Make a self-signed JWT from the service account. - * - * [Self-signed JWTs] bypass the intermediate step of exchanging client - * assertions for OAuth tokens. The advantages of self-signed JTWs include: - * - * - They are more efficient, as they require more or less the same amount of - * local work, and save a round-trip to the token endpoint, typically - * https://oauth2.googleapis.com/token. - * - While this service is extremely reliable, removing external dependencies in - * the critical path almost always improves reliability. - * - They work better in VPC-SC environments and other environments with limited - * Internet access. - * - * @warning At this time only scope-based self-signed JWTs are supported. - * - * [Self-signed JWTs]: https://google.aip.dev/auth/4111 - * - * @param info the parsed service account information, see - * `ParseServiceAccountCredentials()` - * @param tp the current time - * @return a bearer token for authentication. Include this value in the - * `Authorization` header with the "Bearer" type. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -StatusOr MakeSelfSignedJWT( - ServiceAccountCredentialsInfo const& info, - std::chrono::system_clock::time_point tp); - -/** - * Return true if we need to use the OAuth path to create tokens - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -bool ServiceAccountUseOAuth(ServiceAccountCredentialsInfo const& info); - -/** - * Wrapper class for Google OAuth 2.0 service account credentials. - * - * Takes a ServiceAccountCredentialsInfo and obtains access tokens from the - * Google Authorization Service as needed. Instances of this class should - * usually be created via the convenience methods declared in - * google_credentials.h. - * - * An HTTP Authorization header, with an access token as its value, - * can be obtained by calling the AuthorizationHeader() method; if the current - * access token is invalid or nearing expiration, this will class will first - * obtain a new access token before returning the Authorization header string. - * - * @see https://developers.google.com/identity/protocols/OAuth2ServiceAccount - * for an overview of using service accounts with Google's OAuth 2.0 system. - * - * @see https://cloud.google.com/storage/docs/reference/libraries for details on - * how to obtain and get started with service account credentials. - * - * @tparam HttpRequestBuilderType a dependency injection point. It makes it - * possible to mock internal libcurl wrappers. This should generally not be - * overridden except for testing. - * @tparam ClockType a dependency injection point to fetch the current time. - * This should generally not be overridden except for testing. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ -template -class ServiceAccountCredentials; - -/// @copydoc ServiceAccountCredentials -template <> -class ServiceAccountCredentials - : public Credentials { - public: - explicit ServiceAccountCredentials(ServiceAccountCredentialsInfo info) - : ServiceAccountCredentials(std::move(info), {}) {} - ServiceAccountCredentials(ServiceAccountCredentialsInfo info, - ChannelOptions const& options); - - StatusOr AuthorizationHeader() override { - return oauth2_internal::AuthenticationHeaderJoined(*impl_); - } - - /** - * Create a RSA SHA256 signature of the blob using the Credential object. - * - * @param signing_account the desired service account which should sign - * @p blob. If not set, uses this object's account. If set, it must match - * this object's service account. - * @param blob the string to sign. Note that sometimes the application must - * Base64-encode the data before signing. - * @return the signed blob as raw bytes. An error if the @p signing_account - * does not match the email for the credential's account. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ - StatusOr> SignBlob( - SigningAccount const& signing_account, - std::string const& blob) const override { - return impl_->SignBlob((signing_account.has_value() - ? signing_account.value() - : absl::optional(absl::nullopt)), - blob); - } - - std::string AccountEmail() const override { return impl_->AccountEmail(); } - std::string KeyId() const override { return impl_->KeyId(); } - - private: - friend struct ServiceAccountCredentialsTester; - StatusOr AuthorizationHeaderForTesting( - std::chrono::system_clock::time_point tp) { - return oauth2_internal::AuthenticationHeaderJoined(*impl_, tp); - } - std::unique_ptr impl_; -}; - -/// @copydoc ServiceAccountCredentials -template -class ServiceAccountCredentials : public Credentials { - public: - explicit ServiceAccountCredentials(ServiceAccountCredentialsInfo info) - : ServiceAccountCredentials(std::move(info), {}) {} - ServiceAccountCredentials(ServiceAccountCredentialsInfo info, - ChannelOptions const& options) - : info_(std::move(info)), - options_(Options{}.set(options.ssl_root_path())), - clock_() {} - - StatusOr AuthorizationHeader() override { - std::unique_lock lock(mu_); - return refreshing_creds_.AuthorizationHeader(clock_.now(), - [this] { return Refresh(); }); - } - - /** - * Create a RSA SHA256 signature of the blob using the Credential object. - * - * @param signing_account the desired service account which should sign - * @p blob. If not set, uses this object's account. If set, it must match - * this object's service account. - * @param blob the string to sign. Note that sometimes the application must - * Base64-encode the data before signing. - * @return the signed blob as raw bytes. An error if the @p signing_account - * does not match the email for the credential's account. - * - * @deprecated Prefer using the unified credentials documented in @ref guac - */ - StatusOr> SignBlob( - SigningAccount const& signing_account, - std::string const& blob) const override { - if (signing_account.has_value() && - signing_account.value() != info_.client_email) { - return google::cloud::internal::InvalidArgumentError( - "The current_credentials cannot sign blobs for " + - signing_account.value(), - GCP_ERROR_INFO()); - } - return google::cloud::internal::SignUsingSha256(blob, info_.private_key); - } - - std::string AccountEmail() const override { return info_.client_email; } - std::string KeyId() const override { return info_.private_key_id; } - - private: - bool UseOAuth() const { return ServiceAccountUseOAuth(info_); } - - StatusOr Refresh() { - if (UseOAuth()) return RefreshOAuth(); - return RefreshSelfSigned(); - } - - StatusOr RefreshOAuth() const { - HttpRequestBuilderType builder( - info_.token_uri, rest_internal::GetDefaultCurlHandleFactory(options_)); - builder.AddHeader("Content-Type: application/x-www-form-urlencoded"); - // This is the value of grant_type for JSON-formatted service account - // keyfiles downloaded from Cloud Console. - std::string grant_type("grant_type="); - grant_type += - builder.MakeEscapedString("urn:ietf:params:oauth:grant-type:jwt-bearer") - .get(); - - auto payload = - CreateServiceAccountRefreshPayload(info_, grant_type, clock_.now()); - auto response = std::move(builder).BuildRequest().MakeRequest(payload); - if (!response) return std::move(response).status(); - if (response->status_code >= 300) return AsStatus(*response); - return ParseServiceAccountRefreshResponse(*response, clock_.now()); - } - - StatusOr RefreshSelfSigned() - const { - auto const tp = clock_.now(); - auto token = MakeSelfSignedJWT(info_, tp); - if (!token) return std::move(token).status(); - return RefreshingCredentialsWrapper::TemporaryToken{ - "Authorization: Bearer " + *token, - tp + GoogleOAuthAccessTokenLifetime()}; - } - - ServiceAccountCredentialsInfo info_; - Options options_; - mutable std::mutex mu_; - RefreshingCredentialsWrapper refreshing_creds_; - ClockType clock_; -}; - -} // namespace oauth2 - -namespace internal { - -oauth2_internal::ServiceAccountCredentialsInfo MapServiceAccountCredentialsInfo( - oauth2::ServiceAccountCredentialsInfo info); - -} // namespace internal -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OAUTH2_SERVICE_ACCOUNT_CREDENTIALS_H diff --git a/google/cloud/storage/oauth2/service_account_credentials_test.cc b/google/cloud/storage/oauth2/service_account_credentials_test.cc deleted file mode 100644 index e0dbfececf785..0000000000000 --- a/google/cloud/storage/oauth2/service_account_credentials_test.cc +++ /dev/null @@ -1,884 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "google/cloud/storage/oauth2/service_account_credentials.h" -#include "google/cloud/storage/oauth2/credential_constants.h" -#include "google/cloud/storage/oauth2/google_credentials.h" -#include "google/cloud/storage/testing/constants.h" -#include "google/cloud/storage/testing/mock_http_request.h" -#include "google/cloud/storage/testing/write_base64.h" -#include "google/cloud/internal/base64_transforms.h" -#include "google/cloud/internal/filesystem.h" -#include "google/cloud/internal/random.h" -#include "google/cloud/internal/sign_using_sha256.h" -#include "google/cloud/testing_util/mock_fake_clock.h" -#include "google/cloud/testing_util/scoped_environment.h" -#include "google/cloud/testing_util/status_matchers.h" -#include "absl/strings/match.h" -#include "absl/strings/str_split.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace google { -namespace cloud { -namespace storage { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -namespace oauth2 { - -// Define a helper to test the specialization. -struct ServiceAccountCredentialsTester { - static StatusOr Header( - ServiceAccountCredentials<>& tested, - std::chrono::system_clock::time_point tp) { - return tested.AuthorizationHeaderForTesting(tp); - } -}; - -namespace { - -using ::google::cloud::internal::SignUsingSha256; -using ::google::cloud::internal::UrlsafeBase64Decode; -using ::google::cloud::internal::UrlsafeBase64Encode; -using ::google::cloud::storage::internal::HttpResponse; -using ::google::cloud::storage::testing::kP12KeyFileContents; -using ::google::cloud::storage::testing::kP12ServiceAccountId; -using ::google::cloud::storage::testing::kWellFormattedKey; -using ::google::cloud::storage::testing::MockHttpRequest; -using ::google::cloud::storage::testing::MockHttpRequestBuilder; -using ::google::cloud::storage::testing::WriteBase64AsBinary; -using ::google::cloud::testing_util::FakeClock; -using ::google::cloud::testing_util::IsOk; -using ::google::cloud::testing_util::IsOkAndHolds; -using ::google::cloud::testing_util::ScopedEnvironment; -using ::google::cloud::testing_util::StatusIs; -using ::testing::_; -using ::testing::An; -using ::testing::AtLeast; -using ::testing::ElementsAre; -using ::testing::ElementsAreArray; -using ::testing::HasSubstr; -using ::testing::Not; -using ::testing::Return; -using ::testing::StrEq; - -constexpr char kScopeForTest0[] = - "https://www.googleapis.com/auth/devstorage.full_control"; -constexpr char kScopeForTest1[] = - "https://www.googleapis.com/auth/cloud-platform"; -constexpr std::time_t kFixedJwtTimestamp = 1530060324; -constexpr char kGrantParamUnescaped[] = - "urn:ietf:params:oauth:grant-type:jwt-bearer"; -constexpr char kGrantParamEscaped[] = - "urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer"; - -auto constexpr kProjectId = "foo-project"; -auto constexpr kPrivateKeyId = "a1a111aa1111a11a11a11aa111a111a1a1111111"; -auto constexpr kClientEmail = "foo-email@foo-project.iam.gserviceaccount.com"; -auto constexpr kClientId = "100000000000000000001"; -auto constexpr kAuthUri = "https://accounts.google.com/o/oauth2/auth"; -auto constexpr kTokenUri = "https://oauth2.googleapis.com/token"; -auto constexpr kAuthProviderX509CerlUrl = - "https://www.googleapis.com/oauth2/v1/certs"; -auto constexpr kClientX509CertUrl = - "https://www.googleapis.com/robot/v1/metadata/x509/" - "foo-email%40foo-project.iam.gserviceaccount.com"; -constexpr char kSubjectForGrant[] = "user@foo.bar"; - -std::string MakeTestContents() { - return nlohmann::json{ - {"type", "service_account"}, - {"project_id", kProjectId}, - {"private_key_id", kPrivateKeyId}, - {"private_key", kWellFormattedKey}, - {"client_email", kClientEmail}, - {"client_id", kClientId}, - {"auth_uri", kAuthUri}, - {"token_uri", kTokenUri}, - {"auth_provider_x509_cert_url", kAuthProviderX509CerlUrl}, - {"client_x509_cert_url", kClientX509CertUrl}, - } - .dump(); -} - -class ServiceAccountCredentialsTest : public ::testing::Test { - protected: - void SetUp() override { - MockHttpRequestBuilder::mock_ = - std::make_shared(); - FakeClock::reset_clock(kFixedJwtTimestamp); - } - void TearDown() override { MockHttpRequestBuilder::mock_.reset(); } - - std::string CreateRandomFileName() { - // When running on the internal Google CI systems we cannot write to the - // local directory, GTest has a good temporary directory in that case. - return google::cloud::internal::PathAppend( - ::testing::TempDir(), - google::cloud::internal::Sample( - generator_, 8, "abcdefghijklmnopqrstuvwxyz0123456789")); - } - - google::cloud::internal::DefaultPRNG generator_ = - google::cloud::internal::MakeDefaultPRNG(); -}; - -TEST_F(ServiceAccountCredentialsTest, MultipleScopes) { - auto info = ParseServiceAccountCredentials(MakeTestContents(), "test"); - ASSERT_STATUS_OK(info); - auto expected_info = *info; - // .scopes is a `std::set` so we need to preserve order. - ASSERT_LT(std::string{kScopeForTest1}, kScopeForTest0); - expected_info.scopes = {std::string{kScopeForTest1} + " " + kScopeForTest0}; - expected_info.subject = std::string(kSubjectForGrant); - auto const now = std::chrono::system_clock::now(); - auto const expected_components = - AssertionComponentsFromInfo(expected_info, now); - - auto actual_info = *info; - actual_info.scopes = {kScopeForTest0, kScopeForTest1}; - actual_info.subject = std::string(kSubjectForGrant); - auto const actual_components = AssertionComponentsFromInfo(actual_info, now); - EXPECT_EQ(actual_components, expected_components); -} - -/// @test Verify that we refresh service account credentials appropriately. -TEST_F(ServiceAccountCredentialsTest, - RefreshCalledOnlyWhenAccessTokenIsMissingOrInvalid) { - ScopedEnvironment disable_self_signed_jwt( - "GOOGLE_CLOUD_CPP_EXPERIMENTAL_DISABLE_SELF_SIGNED_JWT", "1"); - - // Prepare two responses, the first one is used but becomes immediately - // expired, resulting in another refresh next time the caller tries to get - // an authorization header. - std::string r1 = R"""({ - "token_type": "Type", - "access_token": "access-token-r1", - "expires_in": 0 -})"""; - std::string r2 = R"""({ - "token_type": "Type", - "access_token": "access-token-r2", - "expires_in": 1000 -})"""; - - // Now setup the builder to return those responses. - auto mock_builder = MockHttpRequestBuilder::mock_; - EXPECT_CALL(*mock_builder, BuildRequest()) - .WillOnce([&] { - MockHttpRequest request; - EXPECT_CALL(*request.mock, MakeRequest) - .WillOnce(Return(HttpResponse{200, r1, {}})); - return request; - }) - .WillOnce([&] { - MockHttpRequest request; - EXPECT_CALL(*request.mock, MakeRequest) - .WillOnce(Return(HttpResponse{200, r2, {}})); - return request; - }); - EXPECT_CALL(*mock_builder, AddHeader(An())) - .Times(AtLeast(1)); - EXPECT_CALL(*mock_builder, Constructor(GoogleOAuthRefreshEndpoint(), _, _)) - .Times(AtLeast(1)); - EXPECT_CALL(*mock_builder, MakeEscapedString(An())) - .WillRepeatedly([](std::string const& s) -> std::unique_ptr { - EXPECT_EQ(kGrantParamUnescaped, s); - auto t = std::unique_ptr(new char[sizeof(kGrantParamEscaped)]); - std::copy(kGrantParamEscaped, - kGrantParamEscaped + sizeof(kGrantParamEscaped), t.get()); - return t; - }); - - auto info = ParseServiceAccountCredentials(MakeTestContents(), "test"); - ASSERT_STATUS_OK(info); - ServiceAccountCredentials credentials(*info); - // Calls Refresh to obtain the access token for our authorization header. - EXPECT_EQ("Authorization: Type access-token-r1", - credentials.AuthorizationHeader().value()); - // Token is expired, resulting in another call to Refresh. - EXPECT_EQ("Authorization: Type access-token-r2", - credentials.AuthorizationHeader().value()); - // Token still valid; should return cached token instead of calling Refresh. - EXPECT_EQ("Authorization: Type access-token-r2", - credentials.AuthorizationHeader().value()); -} - -/// @test Verify that parsing a service account JSON string works. -TEST_F(ServiceAccountCredentialsTest, ParseSimple) { - std::string contents = R"""({ - "type": "service_account", - "private_key_id": "not-a-key-id-just-for-testing", - "private_key": "not-a-valid-key-just-for-testing", - "client_email": "test-only@test-group.example.com", - "token_uri": "https://oauth2.googleapis.com/test_endpoint" -})"""; - - auto actual = - ParseServiceAccountCredentials(contents, "test-data", "unused-uri"); - ASSERT_STATUS_OK(actual); - EXPECT_EQ("not-a-key-id-just-for-testing", actual->private_key_id); - EXPECT_EQ("not-a-valid-key-just-for-testing", actual->private_key); - EXPECT_EQ("test-only@test-group.example.com", actual->client_email); - EXPECT_EQ("https://oauth2.googleapis.com/test_endpoint", actual->token_uri); -} - -/// @test Verify that parsing a service account JSON string works. -TEST_F(ServiceAccountCredentialsTest, ParseUsesExplicitDefaultTokenUri) { - // No token_uri attribute here, so the default passed below should be used. - std::string contents = R"""({ - "type": "service_account", - "private_key_id": "not-a-key-id-just-for-testing", - "private_key": "not-a-valid-key-just-for-testing", - "client_email": "test-only@test-group.example.com" -})"""; - - auto actual = ParseServiceAccountCredentials( - contents, "test-data", "https://oauth2.googleapis.com/test_endpoint"); - ASSERT_STATUS_OK(actual); - EXPECT_EQ("not-a-key-id-just-for-testing", actual->private_key_id); - EXPECT_EQ("not-a-valid-key-just-for-testing", actual->private_key); - EXPECT_EQ("test-only@test-group.example.com", actual->client_email); - EXPECT_EQ("https://oauth2.googleapis.com/test_endpoint", actual->token_uri); -} - -/// @test Verify that parsing a service account JSON string works. -TEST_F(ServiceAccountCredentialsTest, ParseUsesImplicitDefaultTokenUri) { - // No token_uri attribute here. - std::string contents = R"""({ - "type": "service_account", - "private_key_id": "not-a-key-id-just-for-testing", - "private_key": "not-a-valid-key-just-for-testing", - "client_email": "test-only@test-group.example.com" -})"""; - - // No token_uri passed in here, either. - auto actual = ParseServiceAccountCredentials(contents, "test-data"); - ASSERT_STATUS_OK(actual); - EXPECT_EQ("not-a-key-id-just-for-testing", actual->private_key_id); - EXPECT_EQ("not-a-valid-key-just-for-testing", actual->private_key); - EXPECT_EQ("test-only@test-group.example.com", actual->client_email); - EXPECT_EQ(std::string(GoogleOAuthRefreshEndpoint()), actual->token_uri); -} - -/// @test Verify that invalid contents result in a readable error. -TEST_F(ServiceAccountCredentialsTest, ParseInvalidContentsFails) { - EXPECT_THAT(ParseServiceAccountCredentials(R"""( not-a-valid-json-string )""", - "test-as-a-source"), - StatusIs(Not(StatusCode::kOk), - AllOf(HasSubstr("Invalid ServiceAccountCredentials"), - HasSubstr("test-as-a-source")))); - - EXPECT_THAT(ParseServiceAccountCredentials( - R"""("valid-json-but-not-an-object")""", "test-as-a-source"), - StatusIs(Not(StatusCode::kOk), - AllOf(HasSubstr("Invalid ServiceAccountCredentials"), - HasSubstr("test-as-a-source")))); -} - -/// @test Parsing a service account JSON string should detect empty fields. -TEST_F(ServiceAccountCredentialsTest, ParseEmptyFieldFails) { - std::string contents = R"""({ - "type": "service_account", - "private_key": "not-a-valid-key-just-for-testing", - "client_email": "test-only@test-group.example.com", - "token_uri": "https://oauth2.googleapis.com/token" -})"""; - - for (auto const& field : {"private_key", "client_email", "token_uri"}) { - auto json = nlohmann::json::parse(contents); - json[field] = ""; - auto actual = ParseServiceAccountCredentials(json.dump(), "test-data", ""); - EXPECT_THAT(actual, - StatusIs(Not(StatusCode::kOk), - AllOf(HasSubstr(field), HasSubstr(" field is empty"), - HasSubstr("test-data")))); - } -} - -/// @test Parsing a service account JSON string should detect missing fields. -TEST_F(ServiceAccountCredentialsTest, ParseMissingFieldFails) { - std::string contents = R"""({ - "type": "service_account", - "private_key": "not-a-valid-key-just-for-testing", - "client_email": "test-only@test-group.example.com", - "token_uri": "https://oauth2.googleapis.com/token" -})"""; - - for (auto const& field : {"private_key", "client_email"}) { - auto json = nlohmann::json::parse(contents); - json.erase(field); - auto actual = ParseServiceAccountCredentials(json.dump(), "test-data", ""); - EXPECT_THAT(actual, - StatusIs(Not(StatusCode::kOk), - AllOf(HasSubstr(field), HasSubstr(" field is missing"), - HasSubstr("test-data")))); - } -} - -/// @test Parsing a service account JSON string allows an optional field. -TEST_F(ServiceAccountCredentialsTest, ParseOptionalField) { - std::string contents = R"""({ - "type": "service_account", - "private_key_id": "", - "private_key": "not-a-valid-key-just-for-testing", - "client_email": "test-only@test-group.example.com", - "token_uri": "https://oauth2.googleapis.com/token" -})"""; - - auto json = nlohmann::json::parse(contents); - auto actual = ParseServiceAccountCredentials(json.dump(), "test-data", ""); - ASSERT_STATUS_OK(actual.status()); -} - -/// @test Verify that the options are used in the constructor. -TEST_F(ServiceAccountCredentialsTest, UsesCARootsInfo) { - ScopedEnvironment disable_self_signed_jwt( - "GOOGLE_CLOUD_CPP_EXPERIMENTAL_DISABLE_SELF_SIGNED_JWT", "1"); - - auto info = ParseServiceAccountCredentials(MakeTestContents(), "test"); - ASSERT_STATUS_OK(info); - - auto mock_builder = MockHttpRequestBuilder::mock_; - EXPECT_CALL(*mock_builder, BuildRequest()).WillOnce([&] { - MockHttpRequest result; - EXPECT_CALL(*result.mock, MakeRequest).WillOnce([](std::string const&) { - nlohmann::json response{{"token_type", "Mock-Type"}, - {"access_token", "fake-token"}, - {"expires_in", 3600}}; - return HttpResponse{200, response.dump(), {}}; - }); - return result; - }); - - // This is the key check in this test, verify the constructor is called with - // the right parameters. - auto const cainfo = std::string{"fake-cainfo-path-aka-roots-pem"}; - EXPECT_CALL(*mock_builder, Constructor(GoogleOAuthRefreshEndpoint(), - absl::make_optional(cainfo), _)) - .Times(AtLeast(1)); - - auto const expected_header = - std::string{"Content-Type: application/x-www-form-urlencoded"}; - EXPECT_CALL(*mock_builder, AddHeader(StrEq(expected_header))) - .Times(AtLeast(1)); - EXPECT_CALL(*mock_builder, MakeEscapedString(An())) - .WillRepeatedly([](std::string const& s) -> std::unique_ptr { - EXPECT_EQ(kGrantParamUnescaped, s); - auto t = std::unique_ptr(new char[sizeof(kGrantParamEscaped)]); - std::copy(kGrantParamEscaped, - kGrantParamEscaped + sizeof(kGrantParamEscaped), t.get()); - return t; - }); - - ServiceAccountCredentials credentials( - *info, ChannelOptions().set_ssl_root_path(cainfo)); - // Call Refresh to obtain the access token for our authorization header. - auto authorization_header = credentials.AuthorizationHeader(); - ASSERT_STATUS_OK(authorization_header); - EXPECT_EQ("Authorization: Mock-Type fake-token", *authorization_header); -} - -/// @test Verify that we can create sign blobs using a service account. -TEST_F(ServiceAccountCredentialsTest, SignBlob) { - auto info = ParseServiceAccountCredentials(MakeTestContents(), "test"); - ASSERT_STATUS_OK(info); - ServiceAccountCredentials credentials( - *info); - - std::string blob = R"""(GET -rmYdCNHKFXam78uCt7xQLw== -text/plain -1388534400 -x-goog-encryption-algorithm:AES256 -x-goog-meta-foo:bar,baz -/bucket/objectname)"""; - - auto actual = credentials.SignBlob(SigningAccount(), blob); - ASSERT_STATUS_OK(actual); - - // To generate the expected output I used: - // `openssl dgst -sha256 -sign private.pem blob.txt | openssl base64 -A` - // where `blob.txt` contains the `blob` string, and `private.pem` contains - // the private key embedded in `kJsonKeyfileContents`. - std::string expected_signed = - "Zsy8o5ci07DQTvO/" - "SVr47PKsCXvN+" - "FzXga0iYrReAnngdZYewHdcAnMQ8bZvFlTM8HY3msrRw64Jc6hoXVL979An5ugXoZ1ol/" - "DT1KlKp3l9E0JSIbqL88ogpElTxFvgPHOtHOUsy2mzhqOVrNSXSj4EM50gKHhvHKSbFq8Pcj" - "lAkROtq5gqp5t0OFd7EMIaRH+tekVUZjQPfFT/" - "hRW9bSCCV8w1Ex+" - "QxmB5z7P7zZn2pl7JAcL850emTo8f2tfv1xXWQGhACvIJeMdPmyjbc04Ye4M8Ljpkg3YhE6l" - "4GwC2MnI8TkuoHe4Bj2MvA8mM8TVwIvpBs6Etsj6Jdaz4rg=="; - EXPECT_EQ(expected_signed, internal::Base64Encode(*actual)); -} - -/// @test Verify that signing blobs fails with invalid e-mail. -TEST_F(ServiceAccountCredentialsTest, SignBlobFailure) { - auto info = ParseServiceAccountCredentials(MakeTestContents(), "test"); - ASSERT_STATUS_OK(info); - ServiceAccountCredentials credentials( - *info); - - auto actual = - credentials.SignBlob(SigningAccount("fake@fake.com"), "test-blob"); - EXPECT_THAT( - actual, - StatusIs(StatusCode::kInvalidArgument, - HasSubstr("The current_credentials cannot sign blobs for "))); -} - -/// @test Verify that we can get the client id from a service account. -TEST_F(ServiceAccountCredentialsTest, ClientId) { - auto info = ParseServiceAccountCredentials(MakeTestContents(), "test"); - ASSERT_STATUS_OK(info); - ServiceAccountCredentials credentials( - *info); - - EXPECT_EQ("foo-email@foo-project.iam.gserviceaccount.com", - credentials.AccountEmail()); - EXPECT_EQ("a1a111aa1111a11a11a11aa111a111a1a1111111", credentials.KeyId()); -} - -char const kP12KeyFileMissingCerts[] = - "MIIDzAIBAzCCA5IGCSqGSIb3DQEHAaCCA4MEggN/MIIDezCCA3cGCSqGSIb3DQEH" - "BqCCA2gwggNkAgEAMIIDXQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQILaGB" - "fWhJ2V0CAggAgIIDMM5EI/ck4VQD4JyGchVPbgd5HQjFbn+HThIoxBYpMPEK+iT7" - "t32idiirDi0qH+6nZancp69nnKhjpAOnMLSjCvba7HDFzi/op7fgf9hnwupEOahv" - "4b8Wv0S9ePTqsLfJy8tJzOAPYKOJO7HGSeZanWh2HpyCd2g1K1dBXsqsabTtJBsF" - "TSGsfUg08/SMT5o12BlMk/wjzUrcSNQxntyPXLfjO1uZ0gFjFO6xsFyclVWr8Zax" - "7fTA6SLdgeE1Iu2+mS1ohwNNzeBrCU6kXVzgw1GSn0UV0ZGbANRWDZZThWzQs9UW" - "sn8l1fr70OZ4JhUwPZe9g0Tu7EeGNPkM5dW1Lr3izKNtYdInBD/1J7wGxsmomsU3" - "khIH2FMqqYX7NFkI0TZiHpLYk2bQmMnfFbBDlXluzO2iLvBY5FPUCn5W4ZPAJlFs" - "Ryo/OytciwJUIRoz76CIg3TmzM1b+RLBMEr6lAsD1za3fcTMwbsBeYY0FEFfb/I6" - "ddmJTxjbCLPLekgkV7MIFSWPiL4t2eXR3rlu1Vnoys0aTWmFtJhEOI16Q1bkJ9L1" - "c/KXHm/Srccm8hTazNYQewHRXWiAvigg6slRnx1I36Z0TMbnikDVCRH8cjFsMKO5" - "/qNMKSsZ6EAePHYAu4N5CpqaTl0hjHI8sW+CDzzmGOn8Acb00gJ+DOu+wiTZtJYS" - "GIZogs7PluMJ7cU1Ju38OixWbQDvfDdloQ/7kZrM6DoEKhvC2bwMwlfxin9jUwjJ" - "98dtdAwQVgckvnYYVpqKnn/dlkiStaiZFKx27kw6o2oobcDrkg0wtOZFeX8k0SXZ" - "ekcmMc5Xfl+5HyJxH5ni8UmHyOHAM8dNjpnzCD9J2K0U7z8kdzslZ95X5MAxYIUa" - "r50tIaWHxeLLYYZUi+nyjNbMZ+yvAqOjQqI1mIcYZurHRPRIHVi2x4nfcKKQIkxn" - "UTF9d3VWbkWoJ1qfe0OSpWg4RrdgDCSB1BlF0gQHEsDTT5/xoZIEoUV8t6TYTVCe" - "axreBYxLhvROONz94v6GD6Eb4kakbSObn8NuBiWnaPevFyEF5YluKR87MbZRQY0Z" - "yJ/4PuEhDIioRdY7ujAxMCEwCQYFKw4DAhoFAAQU4/UMFJQGUvgPuTXRKp0gVU4B" - "GbkECPTYJIica3DWAgIIAA=="; - -char const kP12KeyFileMissingKey[] = - "MIIDzAIBAzCCA5IGCSqGSIb3DQEHAaCCA4MEggN/MIIDezCCA3cGCSqGSIb3DQEH" - "BqCCA2gwggNkAgEAMIIDXQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQILaGB" - "fWhJ2V0CAggAgIIDMM5EI/ck4VQD4JyGchVPbgd5HQjFbn+HThIoxBYpMPEK+iT7" - "t32idiirDi0qH+6nZancp69nnKhjpAOnMLSjCvba7HDFzi/op7fgf9hnwupEOahv" - "4b8Wv0S9ePTqsLfJy8tJzOAPYKOJO7HGSeZanWh2HpyCd2g1K1dBXsqsabTtJBsF" - "TSGsfUg08/SMT5o12BlMk/wjzUrcSNQxntyPXLfjO1uZ0gFjFO6xsFyclVWr8Zax" - "7fTA6SLdgeE1Iu2+mS1ohwNNzeBrCU6kXVzgw1GSn0UV0ZGbANRWDZZThWzQs9UW" - "sn8l1fr70OZ4JhUwPZe9g0Tu7EeGNPkM5dW1Lr3izKNtYdInBD/1J7wGxsmomsU3" - "khIH2FMqqYX7NFkI0TZiHpLYk2bQmMnfFbBDlXluzO2iLvBY5FPUCn5W4ZPAJlFs" - "Ryo/OytciwJUIRoz76CIg3TmzM1b+RLBMEr6lAsD1za3fcTMwbsBeYY0FEFfb/I6" - "ddmJTxjbCLPLekgkV7MIFSWPiL4t2eXR3rlu1Vnoys0aTWmFtJhEOI16Q1bkJ9L1" - "c/KXHm/Srccm8hTazNYQewHRXWiAvigg6slRnx1I36Z0TMbnikDVCRH8cjFsMKO5" - "/qNMKSsZ6EAePHYAu4N5CpqaTl0hjHI8sW+CDzzmGOn8Acb00gJ+DOu+wiTZtJYS" - "GIZogs7PluMJ7cU1Ju38OixWbQDvfDdloQ/7kZrM6DoEKhvC2bwMwlfxin9jUwjJ" - "98dtdAwQVgckvnYYVpqKnn/dlkiStaiZFKx27kw6o2oobcDrkg0wtOZFeX8k0SXZ" - "ekcmMc5Xfl+5HyJxH5ni8UmHyOHAM8dNjpnzCD9J2K0U7z8kdzslZ95X5MAxYIUa" - "r50tIaWHxeLLYYZUi+nyjNbMZ+yvAqOjQqI1mIcYZurHRPRIHVi2x4nfcKKQIkxn" - "UTF9d3VWbkWoJ1qfe0OSpWg4RrdgDCSB1BlF0gQHEsDTT5/xoZIEoUV8t6TYTVCe" - "axreBYxLhvROONz94v6GD6Eb4kakbSObn8NuBiWnaPevFyEF5YluKR87MbZRQY0Z" - "yJ/4PuEhDIioRdY7ujAxMCEwCQYFKw4DAhoFAAQU4/UMFJQGUvgPuTXRKp0gVU4B" - "GbkECPTYJIica3DWAgIIAA=="; - -/// @test Verify that parsing a service account JSON string works. -TEST_F(ServiceAccountCredentialsTest, ParseSimpleP12) { - auto filename = CreateRandomFileName() + ".p12"; - WriteBase64AsBinary(filename, kP12KeyFileContents); - - auto info = ParseServiceAccountP12File(filename); - EXPECT_EQ(0, std::remove(filename.c_str())); - - if (info.status().code() == StatusCode::kInvalidArgument) { - if (absl::StrContains(info.status().message(), "error:0308010C")) { - // With OpenSSL 3.0 the PKCS#12 files may not be supported by default. - GTEST_SKIP() << "PKCS#12 support unavailable, skipping test"; - } -#if _WIN32 - // On Windows, the OS may not have the necessary providers to support - // PKCS#12. Unfortunately the error message is not as unambiguous, so we use - // the function that fails instead. - auto const& metadata = info.status().error_info().metadata(); - auto const l = metadata.find("gcloud-cpp.source.function"); - if (l != metadata.end() && l->second == "GetCertificatePrivateKey") { - GTEST_SKIP() << "PKCS#12 support unavailable, skipping test"; - } -#endif // _WIN32 - } - ASSERT_STATUS_OK(info); - - EXPECT_EQ(kP12ServiceAccountId, info->client_email); - EXPECT_FALSE(info->private_key.empty()); - - ServiceAccountCredentials<> credentials(*info); - - auto signed_blob = credentials.SignBlob(SigningAccount(), "test-blob"); - EXPECT_STATUS_OK(signed_blob); -} - -TEST_F(ServiceAccountCredentialsTest, ParseP12MissingKey) { - std::string filename = CreateRandomFileName() + ".p12"; - WriteBase64AsBinary(filename, kP12KeyFileMissingKey); - auto info = ParseServiceAccountP12File(filename); - EXPECT_THAT(info, Not(IsOk())); -} - -TEST_F(ServiceAccountCredentialsTest, ParseP12MissingCerts) { - std::string filename = google::cloud::internal::PathAppend( - ::testing::TempDir(), CreateRandomFileName() + ".p12"); - WriteBase64AsBinary(filename, kP12KeyFileMissingCerts); - auto info = ParseServiceAccountP12File(filename); - EXPECT_THAT(info, Not(IsOk())); -} - -TEST_F(ServiceAccountCredentialsTest, CreateFromP12MissingFile) { - std::string filename = CreateRandomFileName(); - // Loading a non-existent file should fail. - auto actual = CreateServiceAccountCredentialsFromP12FilePath(filename); - EXPECT_THAT(actual, Not(IsOk())); -} - -TEST_F(ServiceAccountCredentialsTest, CreateFromP12EmptyFile) { - std::string filename = CreateRandomFileName(); - std::ofstream(filename).close(); - - // Loading an empty file should fail. - auto actual = CreateServiceAccountCredentialsFromP12FilePath(filename); - EXPECT_THAT(actual, Not(IsOk())); - - EXPECT_EQ(0, std::remove(filename.c_str())); -} - -TEST_F(ServiceAccountCredentialsTest, CreateFromP12ValidFile) { - std::string filename = CreateRandomFileName() + ".p12"; - WriteBase64AsBinary(filename, kP12KeyFileContents); - - auto actual = CreateServiceAccountCredentialsFromP12FilePath(filename); - EXPECT_EQ(0, std::remove(filename.c_str())); - - if (actual.status().code() == StatusCode::kInvalidArgument) { - if (absl::StrContains(actual.status().message(), "error:0308010C")) { - // With OpenSSL 3.0 the PKCS#12 files may not be supported by default. - GTEST_SKIP() << "PKCS#12 support unavailable, skipping test"; - } -#if _WIN32 - // On Windows, the OS may not have the necessary providers to support - // PKCS#12. Unfortunately the error message is not as unambiguous, so we use - // the function that fails instead. - auto const& metadata = actual.status().error_info().metadata(); - auto const l = metadata.find("gcloud-cpp.source.function"); - if (l != metadata.end() && l->second == "GetCertificatePrivateKey") { - GTEST_SKIP() << "PKCS#12 support unavailable, skipping test"; - } -#endif // _WIN32 - } - EXPECT_STATUS_OK(actual); -} - -/// @test Verify we can obtain JWT assertion components given the info parsed -/// from a keyfile. -TEST_F(ServiceAccountCredentialsTest, AssertionComponentsFromInfo) { - auto info = ParseServiceAccountCredentials(MakeTestContents(), "test"); - ASSERT_STATUS_OK(info); - auto const clock_value_1 = 10000; - FakeClock::now_value_ = clock_value_1; - auto components = AssertionComponentsFromInfo(*info, FakeClock::now()); - - auto header = nlohmann::json::parse(components.first); - EXPECT_EQ("RS256", header.value("alg", "")); - EXPECT_EQ("JWT", header.value("typ", "")); - EXPECT_EQ(info->private_key_id, header.value("kid", "")); - - auto payload = nlohmann::json::parse(components.second); - EXPECT_EQ(clock_value_1, payload.value("iat", 0)); - EXPECT_EQ(clock_value_1 + 3600, payload.value("exp", 0)); - EXPECT_EQ(info->client_email, payload.value("iss", "")); - EXPECT_EQ(info->token_uri, payload.value("aud", "")); -} - -/// @test Verify we can construct a JWT assertion given the info parsed from a -/// keyfile. -TEST_F(ServiceAccountCredentialsTest, MakeJWTAssertion) { - auto info = ParseServiceAccountCredentials(MakeTestContents(), "test"); - ASSERT_STATUS_OK(info); - FakeClock::reset_clock(kFixedJwtTimestamp); - auto components = AssertionComponentsFromInfo(*info, FakeClock::now()); - auto assertion = - MakeJWTAssertion(components.first, components.second, info->private_key); - - auto const body = UrlsafeBase64Encode(components.first) + "." + - UrlsafeBase64Encode(components.second); - auto signed_body = - google::cloud::internal::SignUsingSha256(body, info->private_key); - ASSERT_STATUS_OK(signed_body); - - std::vector actual_tokens = absl::StrSplit(assertion, '.'); - EXPECT_THAT(actual_tokens, ElementsAre(UrlsafeBase64Encode(components.first), - UrlsafeBase64Encode(components.second), - UrlsafeBase64Encode(*signed_body))); -} - -/// @test Verify we can construct a service account refresh payload given the -/// info parsed from a keyfile. -TEST_F(ServiceAccountCredentialsTest, CreateServiceAccountRefreshPayload) { - auto info = ParseServiceAccountCredentials(MakeTestContents(), "test"); - ASSERT_STATUS_OK(info); - FakeClock::reset_clock(kFixedJwtTimestamp); - auto components = AssertionComponentsFromInfo(*info, FakeClock::now()); - auto assertion = - MakeJWTAssertion(components.first, components.second, info->private_key); - auto actual_payload = CreateServiceAccountRefreshPayload( - *info, kGrantParamEscaped, FakeClock::now()); - - EXPECT_THAT(actual_payload, HasSubstr(std::string("assertion=") + assertion)); - EXPECT_THAT(actual_payload, HasSubstr(kGrantParamUnescaped)); -} - -/// @test Parsing a refresh response with missing fields results in failure. -TEST_F(ServiceAccountCredentialsTest, - ParseServiceAccountRefreshResponseInvalid) { - ScopedEnvironment disable_self_signed_jwt( - "GOOGLE_CLOUD_CPP_EXPERIMENTAL_DISABLE_SELF_SIGNED_JWT", "1"); - - std::string r1 = R"""({})"""; - // Does not have access_token. - std::string r2 = R"""({ - "token_type": "Type", - "id_token": "id-token-value", - "expires_in": 1000 -})"""; - - FakeClock::reset_clock(1000); - auto status = ParseServiceAccountRefreshResponse(HttpResponse{400, r1, {}}, - FakeClock::now()); - EXPECT_THAT(status, - StatusIs(StatusCode::kInvalidArgument, - HasSubstr("Could not find all required fields"))); - - status = ParseServiceAccountRefreshResponse(HttpResponse{400, r2, {}}, - FakeClock::now()); - EXPECT_THAT(status, - StatusIs(StatusCode::kInvalidArgument, - HasSubstr("Could not find all required fields"))); - - EXPECT_THAT( - ParseServiceAccountRefreshResponse( - HttpResponse{400, R"js("valid-json-but-not-an-object")js", {}}, - FakeClock::now()), - StatusIs(StatusCode::kInvalidArgument, - HasSubstr("Could not find all required fields"))); -} - -/// @test Parsing a refresh response yields a TemporaryToken. -TEST_F(ServiceAccountCredentialsTest, ParseServiceAccountRefreshResponse) { - ScopedEnvironment disable_self_signed_jwt( - "GOOGLE_CLOUD_CPP_EXPERIMENTAL_DISABLE_SELF_SIGNED_JWT", "1"); - - std::string r1 = R"""({ - "token_type": "Type", - "access_token": "access-token-r1", - "expires_in": 1000 -})"""; - - auto expires_in = 1000; - FakeClock::reset_clock(2000); - auto status = ParseServiceAccountRefreshResponse(HttpResponse{200, r1, {}}, - FakeClock::now()); - EXPECT_STATUS_OK(status); - auto token = *status; - EXPECT_EQ( - std::chrono::time_point_cast(token.expiration_time) - .time_since_epoch() - .count(), - FakeClock::now_value_ + expires_in); - EXPECT_EQ(token.token, "Authorization: Type access-token-r1"); -} - -TEST_F(ServiceAccountCredentialsTest, MakeSelfSignedJWT) { - auto info = ParseServiceAccountCredentials(MakeTestContents(), "test"); - ASSERT_STATUS_OK(info); - auto const now = std::chrono::system_clock::now(); - auto actual = MakeSelfSignedJWT(*info, now); - ASSERT_STATUS_OK(actual); - - std::vector components = absl::StrSplit(*actual, '.'); - std::vector decoded(components.size()); - std::transform(components.begin(), components.end(), decoded.begin(), - [](std::string const& e) { - auto v = UrlsafeBase64Decode(e).value(); - return std::string{v.begin(), v.end()}; - }); - ASSERT_THAT(3, decoded.size()); - auto const header = nlohmann::json::parse(decoded[0], nullptr); - ASSERT_FALSE(header.is_null()) << "header=" << decoded[0]; - auto const payload = nlohmann::json::parse(decoded[1], nullptr); - ASSERT_FALSE(payload.is_null()) << "payload=" << decoded[1]; - - auto const expected_header = nlohmann::json{ - {"alg", "RS256"}, {"typ", "JWT"}, {"kid", info->private_key_id}}; - - auto const iat = - std::chrono::duration_cast(now.time_since_epoch()); - auto const exp = iat + std::chrono::hours(1); - auto const expected_payload = nlohmann::json{ - {"iss", info->client_email}, - {"sub", info->client_email}, - {"iat", iat.count()}, - {"exp", exp.count()}, - {"scope", "https://www.googleapis.com/auth/cloud-platform"}, - }; - - ASSERT_EQ(expected_header, header) << "header=" << header; - ASSERT_EQ(expected_payload, payload) << "payload=" << payload; - - auto signature = - SignUsingSha256(components[0] + '.' + components[1], info->private_key); - ASSERT_STATUS_OK(signature); - EXPECT_THAT(*signature, - ElementsAreArray(decoded[2].begin(), decoded[2].end())); -} - -TEST_F(ServiceAccountCredentialsTest, MakeSelfSignedJWTWithScopes) { - auto info = ParseServiceAccountCredentials(MakeTestContents(), "test"); - ASSERT_STATUS_OK(info); - info->scopes = std::set{"test-only-s1", "test-only-s2"}; - - auto const now = std::chrono::system_clock::now(); - auto actual = MakeSelfSignedJWT(*info, now); - ASSERT_STATUS_OK(actual); - - std::vector components = absl::StrSplit(*actual, '.'); - std::vector decoded(components.size()); - std::transform(components.begin(), components.end(), decoded.begin(), - [](std::string const& e) { - auto v = UrlsafeBase64Decode(e).value(); - return std::string{v.begin(), v.end()}; - }); - ASSERT_THAT(3, decoded.size()); - auto const header = nlohmann::json::parse(decoded[0], nullptr); - ASSERT_FALSE(header.is_null()) << "header=" << decoded[0]; - auto const payload = nlohmann::json::parse(decoded[1], nullptr); - ASSERT_FALSE(payload.is_null()) << "payload=" << decoded[1]; - - auto const expected_header = nlohmann::json{ - {"alg", "RS256"}, {"typ", "JWT"}, {"kid", info->private_key_id}}; - - auto const iat = - std::chrono::duration_cast(now.time_since_epoch()); - auto const exp = iat + std::chrono::hours(1); - auto const expected_payload = nlohmann::json{ - {"iss", info->client_email}, - {"sub", info->client_email}, - {"iat", iat.count()}, - {"exp", exp.count()}, - {"scope", "test-only-s1 test-only-s2"}, - }; - - ASSERT_EQ(expected_header, header) << "header=" << header; - ASSERT_EQ(expected_payload, payload) << "payload=" << payload; - - auto signature = - SignUsingSha256(components[0] + '.' + components[1], info->private_key); - ASSERT_STATUS_OK(signature); - EXPECT_THAT(*signature, - ElementsAreArray(decoded[2].begin(), decoded[2].end())); -} - -TEST_F(ServiceAccountCredentialsTest, UseOauth) { - std::string filename = CreateRandomFileName() + ".p12"; - WriteBase64AsBinary(filename, kP12KeyFileContents); - - auto p12_info = ParseServiceAccountP12File(filename); - EXPECT_EQ(0, std::remove(filename.c_str())); - - auto json_info_without_scopes = - ParseServiceAccountCredentials(MakeTestContents(), "test"); - ASSERT_STATUS_OK(json_info_without_scopes); - ASSERT_FALSE(json_info_without_scopes->scopes.has_value()); - auto json_info_with_scopes = *json_info_without_scopes; - json_info_with_scopes.scopes = - std::set{{GoogleOAuthScopeCloudPlatform()}}; - - struct TestCase { - std::string name; - ServiceAccountCredentialsInfo info; - absl::optional environment; - bool expected; - }; - - std::vector cases = { - {"JSON/with-scopes/no-env", json_info_with_scopes, absl::nullopt, true}, - {"JSON/with-scopes/env", json_info_with_scopes, "1", true}, - {"JSON/no-scopes/no-env", *json_info_without_scopes, absl::nullopt, - false}, - {"JSON/no-scopes/env", *json_info_without_scopes, "1", true}, - }; - if (p12_info) { - // Some environments do not support PKCS$12, we need to test the other - // cases. - cases.push_back({"P12/no-env", *p12_info, absl::nullopt, true}); - cases.push_back({"P12/env", *p12_info, "1", true}); - } - - for (auto const& test : cases) { - SCOPED_TRACE("Testing for " + test.name); - ScopedEnvironment env( - "GOOGLE_CLOUD_CPP_EXPERIMENTAL_DISABLE_SELF_SIGNED_JWT", - test.environment); - EXPECT_EQ(test.expected, ServiceAccountUseOAuth(test.info)); - } -} - -TEST_F(ServiceAccountCredentialsTest, CachingWithSelfSignedJwt) { - auto clear = ScopedEnvironment( - "GOOGLE_CLOUD_CPP_EXPERIMENTAL_DISABLE_SELF_SIGNED_JWT", absl::nullopt); - auto info = ParseServiceAccountCredentials(MakeTestContents(), "test"); - ASSERT_STATUS_OK(info); - - ServiceAccountCredentials<> tested(*info); - auto tp = std::chrono::system_clock::now(); - auto initial = ServiceAccountCredentialsTester::Header(tested, tp); - ASSERT_STATUS_OK(initial); - - auto cached = ServiceAccountCredentialsTester::Header( - tested, tp + std::chrono::seconds(30)); - EXPECT_THAT(cached, IsOkAndHolds(*initial)); - - cached = ServiceAccountCredentialsTester::Header( - tested, tp + std::chrono::seconds(300)); - EXPECT_THAT(cached, IsOkAndHolds(*initial)); - - auto uncached = ServiceAccountCredentialsTester::Header( - tested, tp + std::chrono::hours(2)); - ASSERT_STATUS_OK(uncached); - EXPECT_NE(*initial, *uncached); -} - -} // namespace -} // namespace oauth2 -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storage -} // namespace cloud -} // namespace google diff --git a/google/cloud/storage/object_metadata.cc b/google/cloud/storage/object_metadata.cc index 08af74427b10b..68e18262ce9d9 100644 --- a/google/cloud/storage/object_metadata.cc +++ b/google/cloud/storage/object_metadata.cc @@ -15,8 +15,8 @@ #include "google/cloud/storage/object_metadata.h" #include "google/cloud/storage/internal/metadata_parser.h" #include "google/cloud/storage/internal/object_acl_requests.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/format_time_point.h" +#include "absl/strings/str_join.h" #include #include #include diff --git a/google/cloud/storage/options.h b/google/cloud/storage/options.h index 4a5204e58dfb1..f64f5d1f28e51 100644 --- a/google/cloud/storage/options.h +++ b/google/cloud/storage/options.h @@ -16,7 +16,6 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_OPTIONS_H #include "google/cloud/storage/idempotency_policy.h" -#include "google/cloud/storage/oauth2/credentials.h" #include "google/cloud/storage/retry_policy.h" #include "google/cloud/storage/version.h" #include "google/cloud/backoff_policy.h" @@ -89,18 +88,6 @@ struct IamEndpointOption { using Type = std::string; }; -/** - * Configure oauth2::Credentials for the GCS client library. - * - * @ingroup storage-options - * - * @deprecated prefer using `google::cloud::UnifiedCredentialsOption` and the - * unified credentials documented in @ref guac - */ -struct Oauth2CredentialsOption { - using Type = std::shared_ptr; -}; - /** * Set the Google Cloud Platform project id. * @@ -332,9 +319,8 @@ struct IdempotencyPolicyOption { /// The complete list of options accepted by `storage::Client`. using ClientOptionList = ::google::cloud::OptionList< - RestEndpointOption, IamEndpointOption, Oauth2CredentialsOption, - ProjectIdOption, ProjectIdOption, ConnectionPoolSizeOption, - DownloadBufferSizeOption, UploadBufferSizeOption, + RestEndpointOption, IamEndpointOption, ProjectIdOption, ProjectIdOption, + ConnectionPoolSizeOption, DownloadBufferSizeOption, UploadBufferSizeOption, EnableCurlSslLockingOption, EnableCurlSigpipeHandlerOption, MaximumCurlSocketRecvSizeOption, MaximumCurlSocketSendSizeOption, TransferStallTimeoutOption, RetryPolicyOption, BackoffPolicyOption, diff --git a/google/cloud/storage/parallel_uploads_test.cc b/google/cloud/storage/parallel_uploads_test.cc index 5542b31641a57..68a0f40f27834 100644 --- a/google/cloud/storage/parallel_uploads_test.cc +++ b/google/cloud/storage/parallel_uploads_test.cc @@ -14,7 +14,6 @@ #include "google/cloud/storage/internal/bucket_metadata_parser.h" #include "google/cloud/storage/internal/object_metadata_parser.h" -#include "google/cloud/storage/oauth2/google_credentials.h" #include "google/cloud/storage/parallel_upload.h" #include "google/cloud/storage/retry_policy.h" #include "google/cloud/storage/testing/canonical_errors.h" diff --git a/google/cloud/storage/policy_document.cc b/google/cloud/storage/policy_document.cc index cbab4dff96367..26ea2f7ab5642 100644 --- a/google/cloud/storage/policy_document.cc +++ b/google/cloud/storage/policy_document.cc @@ -13,8 +13,8 @@ // limitations under the License. #include "google/cloud/storage/policy_document.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/format_time_point.h" +#include "absl/strings/str_join.h" #include #include #include diff --git a/google/cloud/storage/quickstart/.bazelrc b/google/cloud/storage/quickstart/.bazelrc index f8f4bb3e07a87..5dddf1f14d7ef 100644 --- a/google/cloud/storage/quickstart/.bazelrc +++ b/google/cloud/storage/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -30,4 +30,4 @@ build:macos --host_cxxopt=-std=c++14 build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod -build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/storage/quickstart/BUILD.bazel b/google/cloud/storage/quickstart/BUILD.bazel index 8d7ef136e9d0f..d7b53ab25f46a 100644 --- a/google/cloud/storage/quickstart/BUILD.bazel +++ b/google/cloud/storage/quickstart/BUILD.bazel @@ -32,8 +32,7 @@ cc_binary( "quickstart_grpc.cc", ], deps = [ - # TODO(#13857) - remove backwards compatibility shims - "@google_cloud_cpp//:experimental-storage_grpc", + "@google_cloud_cpp//:storage_grpc", ], ) @@ -43,7 +42,6 @@ cc_binary( "quickstart_async.cc", ], deps = [ - # TODO(#13857) - remove backwards compatibility shims - "@google_cloud_cpp//:experimental-storage_grpc", + "@google_cloud_cpp//:storage_grpc", ], ) diff --git a/google/cloud/storage/quickstart/CMakeLists.txt b/google/cloud/storage/quickstart/CMakeLists.txt index 5ec92439433b6..9eaac7221d702 100644 --- a/google/cloud/storage/quickstart/CMakeLists.txt +++ b/google/cloud/storage/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # A minimal CMakeList.txt showing how to use the Google Cloud Storage C++ client # library in CMake-based projects. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-storage-quickstart CXX) find_package(google_cloud_cpp_storage REQUIRED) @@ -38,9 +38,7 @@ if (NOT google_cloud_cpp_storage_grpc_FOUND) endif () add_executable(quickstart_grpc EXCLUDE_FROM_ALL quickstart_grpc.cc) -target_link_libraries(quickstart_grpc - google-cloud-cpp::experimental-storage_grpc) +target_link_libraries(quickstart_grpc google-cloud-cpp::storage_grpc) add_executable(quickstart_async EXCLUDE_FROM_ALL quickstart_async.cc) -target_link_libraries(quickstart_async - google-cloud-cpp::experimental-storage_grpc) +target_link_libraries(quickstart_async google-cloud-cpp::storage_grpc) diff --git a/google/cloud/storage/quickstart/MODULE.bazel b/google/cloud/storage/quickstart/MODULE.bazel new file mode 100644 index 0000000000000..697b80b4bedbf --- /dev/null +++ b/google/cloud/storage/quickstart/MODULE.bazel @@ -0,0 +1,3 @@ +module(name = "storage-quickstart") + +bazel_dep(name = "google_cloud_cpp", version = "3.0.0-rc0") diff --git a/google/cloud/storage/storage_client_unit_tests.bzl b/google/cloud/storage/storage_client_unit_tests.bzl index b1a8a1bdb56e3..54c1c64a555b6 100644 --- a/google/cloud/storage/storage_client_unit_tests.bzl +++ b/google/cloud/storage/storage_client_unit_tests.bzl @@ -31,7 +31,6 @@ storage_client_unit_tests = [ "client_object_acl_test.cc", "client_object_copy_test.cc", "client_object_test.cc", - "client_options_test.cc", "client_service_account_test.cc", "client_sign_policy_document_test.cc", "client_sign_url_test.cc", @@ -42,9 +41,6 @@ storage_client_unit_tests = [ "hashing_options_test.cc", "hmac_key_metadata_test.cc", "idempotency_policy_test.cc", - "internal/access_control_common_parser_test.cc", - "internal/access_control_common_test.cc", - "internal/access_token_credentials_test.cc", "internal/base64_test.cc", "internal/bucket_acl_requests_test.cc", "internal/bucket_requests_test.cc", @@ -71,7 +67,6 @@ storage_client_unit_tests = [ "internal/hash_values_test.cc", "internal/hmac_key_requests_test.cc", "internal/http_response_test.cc", - "internal/impersonate_service_account_credentials_test.cc", "internal/logging_stub_test.cc", "internal/make_jwt_assertion_test.cc", "internal/md5hash_test.cc", @@ -95,7 +90,6 @@ storage_client_unit_tests = [ "internal/tracing_connection_test.cc", "internal/tracing_object_read_source_test.cc", "internal/tuple_filter_test.cc", - "internal/unified_rest_credentials_test.cc", "lifecycle_rule_test.cc", "list_buckets_extended_reader_test.cc", "list_buckets_reader_test.cc", @@ -103,12 +97,6 @@ storage_client_unit_tests = [ "list_objects_and_prefixes_reader_test.cc", "list_objects_reader_test.cc", "notification_metadata_test.cc", - "oauth2/anonymous_credentials_test.cc", - "oauth2/authorized_user_credentials_test.cc", - "oauth2/compute_engine_credentials_test.cc", - "oauth2/google_application_default_credentials_file_test.cc", - "oauth2/google_credentials_test.cc", - "oauth2/service_account_credentials_test.cc", "object_access_control_test.cc", "object_metadata_test.cc", "object_retention_test.cc", diff --git a/google/cloud/storage/testing/client_unit_test.cc b/google/cloud/storage/testing/client_unit_test.cc index 66a2cb45f389a..b7c828a523d22 100644 --- a/google/cloud/storage/testing/client_unit_test.cc +++ b/google/cloud/storage/testing/client_unit_test.cc @@ -21,13 +21,9 @@ namespace storage { namespace testing { using ::testing::Return; -using ::testing::ReturnRef; ClientUnitTest::ClientUnitTest() - : mock_(std::make_shared()), - client_options_(ClientOptions(oauth2::CreateAnonymousCredentials())) { - EXPECT_CALL(*mock_, client_options()) - .WillRepeatedly(ReturnRef(client_options_)); + : mock_(std::make_shared()) { EXPECT_CALL(*mock_, options) .WillRepeatedly(Return(storage::internal::DefaultOptionsWithCredentials( Options{} diff --git a/google/cloud/storage/testing/client_unit_test.h b/google/cloud/storage/testing/client_unit_test.h index 5cb34074af098..17734caf5b2e1 100644 --- a/google/cloud/storage/testing/client_unit_test.h +++ b/google/cloud/storage/testing/client_unit_test.h @@ -34,7 +34,6 @@ class ClientUnitTest : public ::testing::Test { google::cloud::storage::Client ClientForMock(); std::shared_ptr mock_; - ClientOptions client_options_; }; } // namespace testing diff --git a/google/cloud/storage/testing/mock_client.h b/google/cloud/storage/testing/mock_client.h index 0c4161f9d3343..1faa1d99b4f27 100644 --- a/google/cloud/storage/testing/mock_client.h +++ b/google/cloud/storage/testing/mock_client.h @@ -31,11 +31,7 @@ namespace testing { class MockClient : public google::cloud::storage::internal::StorageConnection { public: - MockClient() - : client_options_( - google::cloud::storage::oauth2::CreateAnonymousCredentials()) { - EXPECT_CALL(*this, client_options()) - .WillRepeatedly(::testing::ReturnRef(client_options_)); + MockClient() { EXPECT_CALL(*this, options) .WillRepeatedly( ::testing::Return(storage::internal::DefaultOptionsWithCredentials( @@ -43,7 +39,6 @@ class MockClient : public google::cloud::storage::internal::StorageConnection { MakeInsecureCredentials())))); } - MOCK_METHOD(ClientOptions const&, client_options, (), (const, override)); MOCK_METHOD(Options, options, (), (const, override)); MOCK_METHOD(StatusOr, ListBuckets, (internal::ListBucketsRequest const&), (override)); @@ -181,15 +176,9 @@ class MockClient : public google::cloud::storage::internal::StorageConnection { (internal::GetNotificationRequest const&), (override)); MOCK_METHOD(StatusOr, DeleteNotification, (internal::DeleteNotificationRequest const&), (override)); - MOCK_METHOD( - StatusOr, AuthorizationHeader, - (std::shared_ptr const&)); MOCK_METHOD(std::vector, InspectStackStructure, (), (const, override)); - - private: - ClientOptions client_options_; }; class MockObjectReadSource : public internal::ObjectReadSource { diff --git a/google/cloud/storage/testing/mock_storage_stub.h b/google/cloud/storage/testing/mock_storage_stub.h index af6208a703080..d5cff4ad6695c 100644 --- a/google/cloud/storage/testing/mock_storage_stub.h +++ b/google/cloud/storage/testing/mock_storage_stub.h @@ -21,6 +21,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storage { @@ -257,4 +260,6 @@ using MockAsyncBidiWriteObjectStream = } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_TESTING_MOCK_STORAGE_STUB_H diff --git a/google/cloud/storage/tests/BUILD.bazel b/google/cloud/storage/tests/BUILD.bazel index 177246db5be7a..675cdb0664eb7 100644 --- a/google/cloud/storage/tests/BUILD.bazel +++ b/google/cloud/storage/tests/BUILD.bazel @@ -48,10 +48,9 @@ VARIATIONS = { "//google/cloud/storage:storage_client_testing", "//google/cloud/testing_util:google_cloud_cpp_testing_grpc_private", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "//protos:system_includes", "//protos/google/cloud/storage/tests:storage_conformance_tests_cc_proto", - "@com_google_absl//absl/strings", - "@com_google_googletest//:gtest_main", + "@abseil-cpp//absl/strings", + "@googletest//:gtest_main", ], ) for test in storage_client_integration_tests for v_label, v_env in VARIATIONS.items()] @@ -76,9 +75,8 @@ VARIATIONS = { "//google/cloud/storage:storage_client_testing", "//google/cloud/testing_util:google_cloud_cpp_testing_grpc_private", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "//protos:system_includes", "//protos/google/cloud/storage/tests:storage_conformance_tests_cc_proto", - "@com_google_absl//absl/strings", - "@com_google_googletest//:gtest_main", + "@abseil-cpp//absl/strings", + "@googletest//:gtest_main", ], ) for test in ["universe_domain_integration_test.cc"]] diff --git a/google/cloud/storage/tests/create_client_integration_test.cc b/google/cloud/storage/tests/create_client_integration_test.cc index 1af30e631c788..6d385b36ea6b3 100644 --- a/google/cloud/storage/tests/create_client_integration_test.cc +++ b/google/cloud/storage/tests/create_client_integration_test.cc @@ -13,7 +13,6 @@ // limitations under the License. #include "google/cloud/storage/client.h" -#include "google/cloud/storage/internal/unified_rest_credentials.h" #include "google/cloud/storage/testing/storage_integration_test.h" #include "google/cloud/storage/testing/temp_file.h" #include "google/cloud/credentials.h" @@ -66,37 +65,26 @@ class CreateClientIntegrationTest #include "google/cloud/internal/disable_deprecation_warnings.inc" TEST_F(CreateClientIntegrationTest, DefaultWorks) { - auto client = Client::CreateDefaultClient(); - ASSERT_THAT(client, IsOk()); + auto client = Client(Options{}); ASSERT_NO_FATAL_FAILURE( - UseClient(*client, bucket_name(), MakeRandomObjectName(), LoremIpsum())); + UseClient(client, bucket_name(), MakeRandomObjectName(), LoremIpsum())); } TEST_F(CreateClientIntegrationTest, SettingPolicies) { - auto credentials = oauth2::CreateAnonymousCredentials(); - if (!UsingEmulator()) { - auto c = oauth2::GoogleDefaultCredentials(); - ASSERT_THAT(c, IsOk()); - credentials = *std::move(c); - } - auto client = - Client(ClientOptions(std::move(credentials)), - LimitedErrorCountRetryPolicy(/*maximum_failures=*/5), - ExponentialBackoffPolicy(/*initial_delay=*/std::chrono::seconds(1), - /*maximum_delay=*/std::chrono::minutes(5), - /*scaling=*/1.5)); + auto client = Client( + Options{} + .set( + LimitedErrorCountRetryPolicy(/*maximum_failures=*/5).clone()) + .set( + ExponentialBackoffPolicy( + /*initial_delay=*/std::chrono::seconds(1), + /*maximum_delay=*/std::chrono::minutes(5), + /*scaling=*/1.5) + .clone())); ASSERT_NO_FATAL_FAILURE( UseClient(client, bucket_name(), MakeRandomObjectName(), LoremIpsum())); } -/// @test Verify the backwards compatibility `v1` namespace still exists. -TEST_F(CreateClientIntegrationTest, BackwardsCompatibility) { - auto client = ::google::cloud::storage::v1::Client::CreateDefaultClient(); - ASSERT_THAT(client, IsOk()); - ASSERT_NO_FATAL_FAILURE( - UseClient(*client, bucket_name(), MakeRandomObjectName(), LoremIpsum())); -} - } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storage diff --git a/google/cloud/storage/tests/key_file_integration_test.cc b/google/cloud/storage/tests/key_file_integration_test.cc index fe7f8ee98f0b8..b74eb23baaafd 100644 --- a/google/cloud/storage/tests/key_file_integration_test.cc +++ b/google/cloud/storage/tests/key_file_integration_test.cc @@ -70,12 +70,9 @@ class KeyFileIntegrationTest TEST_P(KeyFileIntegrationTest, ObjectWriteSignAndReadDefaultAccount) { if (UsingGrpc()) GTEST_SKIP(); - auto credentials = - oauth2::CreateServiceAccountCredentialsFromFilePath(key_filename_); - ASSERT_STATUS_OK(credentials); - + auto credentials = MakeServiceAccountCredentialsFromFile(key_filename_); auto client = MakeIntegrationTestClient( - Options{}.set(*credentials)); + Options{}.set(credentials)); auto object_name = MakeRandomObjectName(); std::string expected = LoremIpsum(); @@ -98,12 +95,9 @@ TEST_P(KeyFileIntegrationTest, ObjectWriteSignAndReadDefaultAccount) { TEST_P(KeyFileIntegrationTest, ObjectWriteSignAndReadExplicitAccount) { if (UsingGrpc()) GTEST_SKIP(); - auto credentials = - oauth2::CreateServiceAccountCredentialsFromFilePath(key_filename_); - ASSERT_STATUS_OK(credentials); - + auto credentials = MakeServiceAccountCredentialsFromFile(key_filename_); auto client = MakeIntegrationTestClient( - Options{}.set(*credentials)); + Options{}.set(credentials)); auto object_name = MakeRandomObjectName(); std::string expected = LoremIpsum(); diff --git a/google/cloud/storage/tests/object_media_integration_test.cc b/google/cloud/storage/tests/object_media_integration_test.cc index 604bffe1364d6..5250461ee1d24 100644 --- a/google/cloud/storage/tests/object_media_integration_test.cc +++ b/google/cloud/storage/tests/object_media_integration_test.cc @@ -515,9 +515,6 @@ TEST_F(ObjectMediaIntegrationTest, ConnectionFailureUploadFile) { TEST_F(ObjectMediaIntegrationTest, StreamingReadTimeout) { // The emulator does not support this type of fault injection for gRPC. if (!UsingEmulator() || UsingGrpc()) GTEST_SKIP(); - auto options = ClientOptions::CreateDefaultClientOptions(); - ASSERT_STATUS_OK(options); - auto client = MakeIntegrationTestClient( Options{} .set(std::chrono::seconds(3)) diff --git a/google/cloud/storage/tests/service_account_credentials_integration_test.cc b/google/cloud/storage/tests/service_account_credentials_integration_test.cc index 5959030c32f29..08fc4c0d3670b 100644 --- a/google/cloud/storage/tests/service_account_credentials_integration_test.cc +++ b/google/cloud/storage/tests/service_account_credentials_integration_test.cc @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "google/cloud/storage/oauth2/google_credentials.h" #include "google/cloud/storage/testing/retry_http_request.h" #include "google/cloud/storage/testing/storage_integration_test.h" #include "google/cloud/internal/getenv.h" +#include "google/cloud/internal/oauth2_service_account_credentials.h" #include "google/cloud/internal/rest_request.h" +#include "google/cloud/internal/unified_rest_credentials.h" #include "google/cloud/testing_util/status_matchers.h" #include "absl/strings/str_split.h" #include #include #include -#include #include #include @@ -43,20 +43,21 @@ TEST_F(ServiceAccountCredentialsTest, UserInfoOAuth2) { "GOOGLE_CLOUD_CPP_STORAGE_TEST_KEY_FILE_JSON"); if (UsingEmulator() || !filename) GTEST_SKIP(); - auto credentials = oauth2::CreateServiceAccountCredentialsFromFilePath( - *filename, /*scopes=*/ - std::set({"https://www.googleapis.com/auth/userinfo.email", - "https://www.googleapis.com/auth/cloud-platform"}), - /*subject=*/absl::nullopt); - ASSERT_STATUS_OK(credentials); + auto options = Options{} + .set({}) + .set(std::vector( + {"https://www.googleapis.com/auth/userinfo.email", + "https://www.googleapis.com/auth/cloud-platform"})); + + auto credentials = MakeServiceAccountCredentialsFromFile(*filename, options); + auto sa_creds = rest_internal::MapCredentials(*credentials); auto constexpr kUrl = "https://www.googleapis.com/userinfo/v2/me"; - auto factory = [c = *credentials]() { - auto authorization = c->AuthorizationHeader(); + auto factory = [c = sa_creds]() { + auto authorization = c->GetToken(std::chrono::system_clock::now()); if (!authorization) return rest_internal::RestRequest(); - std::pair p = - absl::StrSplit(*authorization, absl::MaxSplits(": ", 1)); - return rest_internal::RestRequest().AddHeader(std::move(p)); + return rest_internal::RestRequest().AddHeader( + std::make_pair("Authorization", "Bearer " + authorization->token)); }; auto response = RetryHttpGet(kUrl, factory); diff --git a/google/cloud/storage/tests/signed_url_conformance_test.cc b/google/cloud/storage/tests/signed_url_conformance_test.cc index 7f14085984059..002d0ccaecaf8 100644 --- a/google/cloud/storage/tests/signed_url_conformance_test.cc +++ b/google/cloud/storage/tests/signed_url_conformance_test.cc @@ -21,10 +21,11 @@ #include "google/cloud/internal/format_time_point.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/internal/time_utils.h" +#include "google/cloud/internal/unified_rest_credentials.h" #include "google/cloud/terminate_handler.h" #include "google/cloud/testing_util/scoped_environment.h" #include "google/cloud/testing_util/status_matchers.h" -#include +#include "protos/google/cloud/storage/tests/conformance_tests.pb.h" #include #include #include @@ -87,13 +88,16 @@ class V4PostPolicyConformanceTest : public V4SignedUrlConformanceTest {}; TEST_P(V4SignedUrlConformanceTest, V4SignJson) { testing_util::ScopedEnvironment endpoint("CLOUD_STORAGE_EMULATOR_ENDPOINT", absl::nullopt); - auto creds = oauth2::CreateServiceAccountCredentialsFromJsonFilePath( - service_account_key_filename_); - ASSERT_STATUS_OK(creds); + testing_util::ScopedEnvironment preserve_creds( + "GOOGLE_CLOUD_CPP_STORAGE_TESTING_PRESERVE_CREDENTIALS", "yes"); + auto credentials = + MakeServiceAccountCredentialsFromFile(service_account_key_filename_); + auto sa_creds = rest_internal::MapCredentials(*credentials); + std::string account_email = sa_creds->AccountEmail(); + + auto client = MakeIntegrationTestClient( + Options{}.set(credentials)); - std::string account_email = (*creds)->AccountEmail(); - auto client = - MakeIntegrationTestClient(Options{}.set(*creds)); std::string actual_canonical_request; std::string actual_string_to_sign; @@ -191,13 +195,15 @@ INSTANTIATE_TEST_SUITE_P( TEST_P(V4PostPolicyConformanceTest, V4PostPolicy) { testing_util::ScopedEnvironment endpoint("CLOUD_STORAGE_EMULATOR_ENDPOINT", absl::nullopt); - auto creds = oauth2::CreateServiceAccountCredentialsFromJsonFilePath( - service_account_key_filename_); - ASSERT_STATUS_OK(creds); - - std::string account_email = (*creds)->AccountEmail(); - auto client = - MakeIntegrationTestClient(Options{}.set(*creds)); + testing_util::ScopedEnvironment preserve_creds( + "GOOGLE_CLOUD_CPP_STORAGE_TESTING_PRESERVE_CREDENTIALS", "yes"); + auto credentials = + MakeServiceAccountCredentialsFromFile(service_account_key_filename_); + auto sa_creds = rest_internal::MapCredentials(*credentials); + std::string account_email = sa_creds->AccountEmail(); + + auto client = MakeIntegrationTestClient( + Options{}.set(credentials)); auto const& test_params = (*post_policy_tests)[GetParam()]; auto const& input = test_params.policyinput(); diff --git a/google/cloud/storage/tests/storage_include_test.cc b/google/cloud/storage/tests/storage_include_test.cc index 5f0c341e37b12..abc4b3d15f478 100644 --- a/google/cloud/storage/tests/storage_include_test.cc +++ b/google/cloud/storage/tests/storage_include_test.cc @@ -13,7 +13,6 @@ // limitations under the License. #include "google/cloud/storage/client.h" -#include "google/cloud/storage/oauth2/google_credentials.h" #include int main() { diff --git a/google/cloud/storage/tests/unified_credentials_integration_test.cc b/google/cloud/storage/tests/unified_credentials_integration_test.cc index 68e6edf086954..58ad784cc953f 100644 --- a/google/cloud/storage/tests/unified_credentials_integration_test.cc +++ b/google/cloud/storage/tests/unified_credentials_integration_test.cc @@ -13,11 +13,12 @@ // limitations under the License. #include "google/cloud/storage/client.h" -#include "google/cloud/storage/internal/unified_rest_credentials.h" #include "google/cloud/storage/testing/storage_integration_test.h" #include "google/cloud/storage/testing/temp_file.h" #include "google/cloud/credentials.h" #include "google/cloud/internal/getenv.h" +#include "google/cloud/internal/oauth2_google_credentials.h" +#include "google/cloud/internal/unified_rest_credentials.h" #include "google/cloud/testing_util/scoped_environment.h" #include "google/cloud/testing_util/status_matchers.h" #include @@ -371,10 +372,11 @@ TEST_F(UnifiedCredentialsIntegrationTest, AccessToken) { // application one would fetch access tokens from something more interesting, // like the IAM credentials service. This is just a reasonably easy way to get // a working access token for the test. - auto default_credentials = oauth2::GoogleDefaultCredentials(); - ASSERT_THAT(default_credentials, IsOk()); + auto default_credentials = + rest_internal::MapCredentials((*MakeGoogleDefaultCredentials())); auto expiration = std::chrono::system_clock::now() + std::chrono::hours(1); - auto header = default_credentials.value()->AuthorizationHeader(); + auto header = + oauth2_internal::AuthenticationHeaderJoined(*default_credentials); ASSERT_THAT(header, IsOk()); auto constexpr kPrefix = "Authorization: Bearer "; @@ -396,10 +398,11 @@ TEST_F(UnifiedCredentialsIntegrationTest, AccessTokenCustomTrustStore) { // application one would fetch access tokens from something more interesting, // like the IAM credentials service. This is just a reasonably easy way to get // a working access token for the test. - auto default_credentials = oauth2::GoogleDefaultCredentials(); - ASSERT_THAT(default_credentials, IsOk()); + auto default_credentials = + rest_internal::MapCredentials((*MakeGoogleDefaultCredentials())); auto expiration = std::chrono::system_clock::now() + std::chrono::hours(1); - auto header = default_credentials.value()->AuthorizationHeader(); + auto header = + oauth2_internal::AuthenticationHeaderJoined(*default_credentials); ASSERT_THAT(header, IsOk()); auto constexpr kPrefix = "Authorization: Bearer "; @@ -424,10 +427,11 @@ TEST_F(UnifiedCredentialsIntegrationTest, AccessTokenEmptyTrustStore) { // application one would fetch access tokens from something more interesting, // like the IAM credentials service. This is just a reasonably easy way to get // a working access token for the test. - auto default_credentials = oauth2::GoogleDefaultCredentials(); - ASSERT_THAT(default_credentials, IsOk()); + auto default_credentials = + rest_internal::MapCredentials((*MakeGoogleDefaultCredentials())); auto expiration = std::chrono::system_clock::now() + std::chrono::hours(1); - auto header = default_credentials.value()->AuthorizationHeader(); + auto header = + oauth2_internal::AuthenticationHeaderJoined(*default_credentials); ASSERT_THAT(header, IsOk()); auto constexpr kPrefix = "Authorization: Bearer "; diff --git a/google/cloud/storage/version.h b/google/cloud/storage/version.h index 82862d2c6168f..ffce8b3ea2462 100644 --- a/google/cloud/storage/version.h +++ b/google/cloud/storage/version.h @@ -84,8 +84,6 @@ std::string version_string(); std::string x_goog_api_client(); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -// TODO(#7463) - remove backwards compatibility namespaces -namespace v1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace storage } // namespace cloud } // namespace google diff --git a/google/cloud/storagebatchoperations/BUILD.bazel b/google/cloud/storagebatchoperations/BUILD.bazel index f05f2910d2c2c..a26e644ab257f 100644 --- a/google/cloud/storagebatchoperations/BUILD.bazel +++ b/google/cloud/storagebatchoperations/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/storagebatchoperations/v1:storagebatchoperations_cc_grpc", + "@googleapis//google/cloud/storagebatchoperations/v1:storagebatchoperations_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/storagebatchoperations/quickstart/CMakeLists.txt b/google/cloud/storagebatchoperations/quickstart/CMakeLists.txt index f9f3df4f47990..0b897b94620ca 100644 --- a/google/cloud/storagebatchoperations/quickstart/CMakeLists.txt +++ b/google/cloud/storagebatchoperations/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Storage Batch Operations API C++ client library # from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-storagebatchoperations-quickstart CXX) find_package(google_cloud_cpp_storagebatchoperations REQUIRED) diff --git a/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_auth_decorator.cc b/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_auth_decorator.cc index df5fb995355da..9cccd790607d0 100644 --- a/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_auth_decorator.cc +++ b/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/storagebatchoperations/v1/storage_batch_operations.proto #include "google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_auth_decorator.h" -#include +#include "google/cloud/storagebatchoperations/v1/storage_batch_operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagebatchoperations_v1_internal { @@ -190,3 +193,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storagebatchoperations_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_auth_decorator.h b/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_auth_decorator.h index 17eb28183145e..758e46e133335 100644 --- a/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_auth_decorator.h +++ b/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagebatchoperations_v1_internal { @@ -117,4 +120,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGEBATCHOPERATIONS_V1_INTERNAL_STORAGE_BATCH_OPERATIONS_AUTH_DECORATOR_H diff --git a/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_connection_impl.h b/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_connection_impl.h index e29375c992691..ed06e6eb84fdc 100644 --- a/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_connection_impl.h +++ b/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_logging_decorator.cc b/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_logging_decorator.cc index 82c46b1a5b246..12c8bd8f0e495 100644 --- a/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_logging_decorator.cc +++ b/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/storagebatchoperations/v1/storage_batch_operations.proto #include "google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_logging_decorator.h" +#include "google/cloud/storagebatchoperations/v1/storage_batch_operations.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagebatchoperations_v1_internal { @@ -229,3 +232,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storagebatchoperations_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_logging_decorator.h b/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_logging_decorator.h index b91f4cbe7f599..091c8d8449015 100644 --- a/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_logging_decorator.h +++ b/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagebatchoperations_v1_internal { @@ -117,4 +120,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGEBATCHOPERATIONS_V1_INTERNAL_STORAGE_BATCH_OPERATIONS_LOGGING_DECORATOR_H diff --git a/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_metadata_decorator.cc b/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_metadata_decorator.cc index 8d91b559ab837..2a7b53d61a83f 100644 --- a/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_metadata_decorator.cc +++ b/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/storagebatchoperations/v1/storage_batch_operations.proto #include "google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_metadata_decorator.h" +#include "google/cloud/storagebatchoperations/v1/storage_batch_operations.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagebatchoperations_v1_internal { @@ -196,3 +200,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storagebatchoperations_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_metadata_decorator.h b/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_metadata_decorator.h index 3eff602c4a1cc..3889bf5f668d8 100644 --- a/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_metadata_decorator.h +++ b/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagebatchoperations_v1_internal { @@ -123,4 +126,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGEBATCHOPERATIONS_V1_INTERNAL_STORAGE_BATCH_OPERATIONS_METADATA_DECORATOR_H diff --git a/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_option_defaults.cc b/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_option_defaults.cc index da23207ba3bf9..0f8e0fab09ef6 100644 --- a/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_option_defaults.cc +++ b/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_option_defaults.cc @@ -44,7 +44,7 @@ Options StorageBatchOperationsDefaultOptions(Options options) { options.set< storagebatchoperations_v1::StorageBatchOperationsRetryPolicyOption>( storagebatchoperations_v1::StorageBatchOperationsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagebatchoperations_v1_internal { @@ -226,3 +229,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storagebatchoperations_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_stub.h b/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_stub.h index 8ff52e50d0fc8..f786eb2e0f860 100644 --- a/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_stub.h +++ b/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGEBATCHOPERATIONS_V1_INTERNAL_STORAGE_BATCH_OPERATIONS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGEBATCHOPERATIONS_V1_INTERNAL_STORAGE_BATCH_OPERATIONS_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/storagebatchoperations/v1/storage_batch_operations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagebatchoperations_v1_internal { @@ -206,4 +209,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGEBATCHOPERATIONS_V1_INTERNAL_STORAGE_BATCH_OPERATIONS_STUB_H diff --git a/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_stub_factory.cc b/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_stub_factory.cc index f1d2c22489e82..649c1c5b8cca2 100644 --- a/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_stub_factory.cc +++ b/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/storagebatchoperations/v1/storage_batch_operations.proto #include "google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_auth_decorator.h" #include "google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_logging_decorator.h" #include "google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_metadata_decorator.h" #include "google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_stub.h" #include "google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_tracing_stub.h" +#include "google/cloud/storagebatchoperations/v1/storage_batch_operations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagebatchoperations_v1_internal { @@ -76,3 +79,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storagebatchoperations_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_stub_factory.h b/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_stub_factory.h index fd93de9b13d0f..b0562900a948f 100644 --- a/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_stub_factory.h +++ b/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagebatchoperations_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGEBATCHOPERATIONS_V1_INTERNAL_STORAGE_BATCH_OPERATIONS_STUB_FACTORY_H diff --git a/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_tracing_connection.cc b/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_tracing_connection.cc index ed4ce4f9fa179..4507ae057f7bf 100644 --- a/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_tracing_connection.cc +++ b/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace storagebatchoperations_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - StorageBatchOperationsTracingConnection:: StorageBatchOperationsTracingConnection( std::shared_ptr< @@ -168,18 +166,14 @@ Status StorageBatchOperationsTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeStorageBatchOperationsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_tracing_connection.h b/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_tracing_connection.h index cdf667b1f1a27..94c5884629f83 100644 --- a/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_tracing_connection.h +++ b/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace storagebatchoperations_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class StorageBatchOperationsTracingConnection : public storagebatchoperations_v1::StorageBatchOperationsConnection { public: @@ -93,8 +91,6 @@ class StorageBatchOperationsTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_tracing_stub.cc b/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_tracing_stub.cc index d2ddee9545e92..ba6ef1dcc7dae 100644 --- a/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_tracing_stub.cc +++ b/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagebatchoperations_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - StorageBatchOperationsTracingStub::StorageBatchOperationsTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -219,19 +220,15 @@ future StorageBatchOperationsTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeStorageBatchOperationsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storagebatchoperations_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_tracing_stub.h b/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_tracing_stub.h index 583693a77258c..8c62b655426ca 100644 --- a/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_tracing_stub.h +++ b/google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagebatchoperations_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class StorageBatchOperationsTracingStub : public StorageBatchOperationsStub { public: ~StorageBatchOperationsTracingStub() override = default; @@ -113,8 +114,6 @@ class StorageBatchOperationsTracingStub : public StorageBatchOperationsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -130,4 +129,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGEBATCHOPERATIONS_V1_INTERNAL_STORAGE_BATCH_OPERATIONS_TRACING_STUB_H diff --git a/google/cloud/storagebatchoperations/v1/storage_batch_operations_client.h b/google/cloud/storagebatchoperations/v1/storage_batch_operations_client.h index 26483cea07ba4..ff10969a62423 100644 --- a/google/cloud/storagebatchoperations/v1/storage_batch_operations_client.h +++ b/google/cloud/storagebatchoperations/v1/storage_batch_operations_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/storagebatchoperations/v1/storage_batch_operations_connection.h b/google/cloud/storagebatchoperations/v1/storage_batch_operations_connection.h index d77bbd7c9db39..c736f8f7913e5 100644 --- a/google/cloud/storagebatchoperations/v1/storage_batch_operations_connection.h +++ b/google/cloud/storagebatchoperations/v1/storage_batch_operations_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGEBATCHOPERATIONS_V1_STORAGE_BATCH_OPERATIONS_CONNECTION_H #include "google/cloud/storagebatchoperations/v1/internal/storage_batch_operations_retry_traits.h" +#include "google/cloud/storagebatchoperations/v1/storage_batch_operations.pb.h" #include "google/cloud/storagebatchoperations/v1/storage_batch_operations_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/storagebatchoperations/v1/storage_batch_operations_connection_idempotency_policy.h b/google/cloud/storagebatchoperations/v1/storage_batch_operations_connection_idempotency_policy.h index 94841473fe811..49521d6d8c1ce 100644 --- a/google/cloud/storagebatchoperations/v1/storage_batch_operations_connection_idempotency_policy.h +++ b/google/cloud/storagebatchoperations/v1/storage_batch_operations_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGEBATCHOPERATIONS_V1_STORAGE_BATCH_OPERATIONS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGEBATCHOPERATIONS_V1_STORAGE_BATCH_OPERATIONS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/storagebatchoperations/v1/storage_batch_operations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/storagecontrol/BUILD.bazel b/google/cloud/storagecontrol/BUILD.bazel index 473c01a78fab9..826731d87d018 100644 --- a/google/cloud/storagecontrol/BUILD.bazel +++ b/google/cloud/storagecontrol/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v2/"] googleapis_deps = [ - "@com_google_googleapis//google/storage/control/v2:control_cc_grpc", + "@googleapis//google/storage/control/v2:control_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/storagecontrol/quickstart/.bazelrc b/google/cloud/storagecontrol/quickstart/.bazelrc index 15d5c055db074..343e7f623d628 100644 --- a/google/cloud/storagecontrol/quickstart/.bazelrc +++ b/google/cloud/storagecontrol/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/storagecontrol/quickstart/CMakeLists.txt b/google/cloud/storagecontrol/quickstart/CMakeLists.txt index 0f7beaf7b1e77..f8e1c29b8b56c 100644 --- a/google/cloud/storagecontrol/quickstart/CMakeLists.txt +++ b/google/cloud/storagecontrol/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Storage API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-storagecontrol-quickstart CXX) find_package(google_cloud_cpp_storagecontrol REQUIRED) diff --git a/google/cloud/storagecontrol/v2/internal/storage_control_auth_decorator.cc b/google/cloud/storagecontrol/v2/internal/storage_control_auth_decorator.cc index e573a58905b17..5fc3a7a6045c7 100644 --- a/google/cloud/storagecontrol/v2/internal/storage_control_auth_decorator.cc +++ b/google/cloud/storagecontrol/v2/internal/storage_control_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/storage/control/v2/storage_control.proto #include "google/cloud/storagecontrol/v2/internal/storage_control_auth_decorator.h" -#include +#include "google/storage/control/v2/storage_control.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagecontrol_v2_internal { @@ -365,3 +368,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storagecontrol_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/storagecontrol/v2/internal/storage_control_auth_decorator.h b/google/cloud/storagecontrol/v2/internal/storage_control_auth_decorator.h index 662ab207b57ac..63ecdac76c75f 100644 --- a/google/cloud/storagecontrol/v2/internal/storage_control_auth_decorator.h +++ b/google/cloud/storagecontrol/v2/internal/storage_control_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/storagecontrol/v2/internal/storage_control_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagecontrol_v2_internal { @@ -214,4 +217,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGECONTROL_V2_INTERNAL_STORAGE_CONTROL_AUTH_DECORATOR_H diff --git a/google/cloud/storagecontrol/v2/internal/storage_control_connection_impl.h b/google/cloud/storagecontrol/v2/internal/storage_control_connection_impl.h index 0bbf88e1762df..beefbfabcb8cc 100644 --- a/google/cloud/storagecontrol/v2/internal/storage_control_connection_impl.h +++ b/google/cloud/storagecontrol/v2/internal/storage_control_connection_impl.h @@ -33,7 +33,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/storagecontrol/v2/internal/storage_control_logging_decorator.cc b/google/cloud/storagecontrol/v2/internal/storage_control_logging_decorator.cc index 964f753fe8741..fc9ad23d2d3a4 100644 --- a/google/cloud/storagecontrol/v2/internal/storage_control_logging_decorator.cc +++ b/google/cloud/storagecontrol/v2/internal/storage_control_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/storagecontrol/v2/internal/storage_control_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/storage/control/v2/storage_control.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagecontrol_v2_internal { @@ -464,3 +467,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storagecontrol_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/storagecontrol/v2/internal/storage_control_logging_decorator.h b/google/cloud/storagecontrol/v2/internal/storage_control_logging_decorator.h index d29b1f0df8425..75e2fb6630140 100644 --- a/google/cloud/storagecontrol/v2/internal/storage_control_logging_decorator.h +++ b/google/cloud/storagecontrol/v2/internal/storage_control_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/storagecontrol/v2/internal/storage_control_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagecontrol_v2_internal { @@ -214,4 +217,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGECONTROL_V2_INTERNAL_STORAGE_CONTROL_LOGGING_DECORATOR_H diff --git a/google/cloud/storagecontrol/v2/internal/storage_control_metadata_decorator.cc b/google/cloud/storagecontrol/v2/internal/storage_control_metadata_decorator.cc index 0d0824faf241a..04eb892a27524 100644 --- a/google/cloud/storagecontrol/v2/internal/storage_control_metadata_decorator.cc +++ b/google/cloud/storagecontrol/v2/internal/storage_control_metadata_decorator.cc @@ -18,18 +18,21 @@ #include "google/cloud/storagecontrol/v2/internal/storage_control_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/routing_matcher.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/storage/control/v2/storage_control.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagecontrol_v2_internal { @@ -762,3 +765,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storagecontrol_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/storagecontrol/v2/internal/storage_control_metadata_decorator.h b/google/cloud/storagecontrol/v2/internal/storage_control_metadata_decorator.h index b3d927f886f4a..eccac4a78cfb8 100644 --- a/google/cloud/storagecontrol/v2/internal/storage_control_metadata_decorator.h +++ b/google/cloud/storagecontrol/v2/internal/storage_control_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/storagecontrol/v2/internal/storage_control_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagecontrol_v2_internal { @@ -219,4 +222,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGECONTROL_V2_INTERNAL_STORAGE_CONTROL_METADATA_DECORATOR_H diff --git a/google/cloud/storagecontrol/v2/internal/storage_control_option_defaults.cc b/google/cloud/storagecontrol/v2/internal/storage_control_option_defaults.cc index 48d2a337d28df..de843d95df00d 100644 --- a/google/cloud/storagecontrol/v2/internal/storage_control_option_defaults.cc +++ b/google/cloud/storagecontrol/v2/internal/storage_control_option_defaults.cc @@ -41,7 +41,7 @@ Options StorageControlDefaultOptions(Options options) { if (!options.has()) { options.set( storagecontrol_v2::StorageControlLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/storagecontrol/v2/internal/storage_control_stub.cc b/google/cloud/storagecontrol/v2/internal/storage_control_stub.cc index b789db663948c..f57ca2c8e3ec6 100644 --- a/google/cloud/storagecontrol/v2/internal/storage_control_stub.cc +++ b/google/cloud/storagecontrol/v2/internal/storage_control_stub.cc @@ -19,11 +19,14 @@ #include "google/cloud/storagecontrol/v2/internal/storage_control_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/storage/control/v2/storage_control.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagecontrol_v2_internal { @@ -450,3 +453,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storagecontrol_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/storagecontrol/v2/internal/storage_control_stub.h b/google/cloud/storagecontrol/v2/internal/storage_control_stub.h index b1e58a8d61101..4c7f901842d28 100644 --- a/google/cloud/storagecontrol/v2/internal/storage_control_stub.h +++ b/google/cloud/storagecontrol/v2/internal/storage_control_stub.h @@ -24,11 +24,14 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/storage/control/v2/storage_control.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagecontrol_v2_internal { @@ -397,4 +400,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGECONTROL_V2_INTERNAL_STORAGE_CONTROL_STUB_H diff --git a/google/cloud/storagecontrol/v2/internal/storage_control_stub_factory.cc b/google/cloud/storagecontrol/v2/internal/storage_control_stub_factory.cc index f9810544ecd3b..495bcfc58233a 100644 --- a/google/cloud/storagecontrol/v2/internal/storage_control_stub_factory.cc +++ b/google/cloud/storagecontrol/v2/internal/storage_control_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/storage/control/v2/storage_control.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagecontrol_v2_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storagecontrol_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/storagecontrol/v2/internal/storage_control_stub_factory.h b/google/cloud/storagecontrol/v2/internal/storage_control_stub_factory.h index 6fc150400ea7b..f720c342a4523 100644 --- a/google/cloud/storagecontrol/v2/internal/storage_control_stub_factory.h +++ b/google/cloud/storagecontrol/v2/internal/storage_control_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagecontrol_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGECONTROL_V2_INTERNAL_STORAGE_CONTROL_STUB_FACTORY_H diff --git a/google/cloud/storagecontrol/v2/internal/storage_control_tracing_connection.cc b/google/cloud/storagecontrol/v2/internal/storage_control_tracing_connection.cc index 95f48a9550c31..8fd60f44baf75 100644 --- a/google/cloud/storagecontrol/v2/internal/storage_control_tracing_connection.cc +++ b/google/cloud/storagecontrol/v2/internal/storage_control_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace storagecontrol_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - StorageControlTracingConnection::StorageControlTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -351,16 +349,12 @@ StorageControlTracingConnection::TestIamPermissions( return internal::EndSpan(*span, child_->TestIamPermissions(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeStorageControlTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/storagecontrol/v2/internal/storage_control_tracing_connection.h b/google/cloud/storagecontrol/v2/internal/storage_control_tracing_connection.h index 7d4b28dad8296..15685ce770850 100644 --- a/google/cloud/storagecontrol/v2/internal/storage_control_tracing_connection.h +++ b/google/cloud/storagecontrol/v2/internal/storage_control_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace storagecontrol_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class StorageControlTracingConnection : public storagecontrol_v2::StorageControlConnection { public: @@ -172,8 +170,6 @@ class StorageControlTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/storagecontrol/v2/internal/storage_control_tracing_stub.cc b/google/cloud/storagecontrol/v2/internal/storage_control_tracing_stub.cc index e093f09c70db2..493974026a94f 100644 --- a/google/cloud/storagecontrol/v2/internal/storage_control_tracing_stub.cc +++ b/google/cloud/storagecontrol/v2/internal/storage_control_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagecontrol_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - StorageControlTracingStub::StorageControlTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -443,18 +444,14 @@ future StorageControlTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeStorageControlTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storagecontrol_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/storagecontrol/v2/internal/storage_control_tracing_stub.h b/google/cloud/storagecontrol/v2/internal/storage_control_tracing_stub.h index 1dcdb7d9ccbfe..507109c8b5629 100644 --- a/google/cloud/storagecontrol/v2/internal/storage_control_tracing_stub.h +++ b/google/cloud/storagecontrol/v2/internal/storage_control_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagecontrol_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class StorageControlTracingStub : public StorageControlStub { public: ~StorageControlTracingStub() override = default; @@ -209,8 +210,6 @@ class StorageControlTracingStub : public StorageControlStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -225,4 +224,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGECONTROL_V2_INTERNAL_STORAGE_CONTROL_TRACING_STUB_H diff --git a/google/cloud/storagecontrol/v2/samples/storage_control_anywhere_cache_samples.cc b/google/cloud/storagecontrol/v2/samples/storage_control_anywhere_cache_samples.cc index e8ca0dabca6af..62f2f8b52ec08 100644 --- a/google/cloud/storagecontrol/v2/samples/storage_control_anywhere_cache_samples.cc +++ b/google/cloud/storagecontrol/v2/samples/storage_control_anywhere_cache_samples.cc @@ -15,7 +15,7 @@ #include "google/cloud/storagecontrol/v2/storage_control_client.h" #include "google/cloud/internal/getenv.h" #include "google/cloud/testing_util/example_driver.h" -#include +#include "google/storage/control/v2/storage_control.pb.h" #include #include #include diff --git a/google/cloud/storagecontrol/v2/samples/storage_control_folder_samples.cc b/google/cloud/storagecontrol/v2/samples/storage_control_folder_samples.cc index 12bedbae3d64d..43e8050f65f4c 100644 --- a/google/cloud/storagecontrol/v2/samples/storage_control_folder_samples.cc +++ b/google/cloud/storagecontrol/v2/samples/storage_control_folder_samples.cc @@ -16,7 +16,7 @@ #include "google/cloud/internal/getenv.h" #include "google/cloud/internal/time_utils.h" #include "google/cloud/testing_util/example_driver.h" -#include +#include "google/storage/control/v2/storage_control.pb.h" #include #include #include diff --git a/google/cloud/storagecontrol/v2/samples/storage_control_managed_folder_samples.cc b/google/cloud/storagecontrol/v2/samples/storage_control_managed_folder_samples.cc index bbc9a80c2d3b9..ae3a33b808a12 100644 --- a/google/cloud/storagecontrol/v2/samples/storage_control_managed_folder_samples.cc +++ b/google/cloud/storagecontrol/v2/samples/storage_control_managed_folder_samples.cc @@ -16,7 +16,7 @@ #include "google/cloud/internal/getenv.h" #include "google/cloud/internal/time_utils.h" #include "google/cloud/testing_util/example_driver.h" -#include +#include "google/storage/control/v2/storage_control.pb.h" #include #include #include diff --git a/google/cloud/storagecontrol/v2/storage_control_client.h b/google/cloud/storagecontrol/v2/storage_control_client.h index b0077caac9c01..546564b5f3a08 100644 --- a/google/cloud/storagecontrol/v2/storage_control_client.h +++ b/google/cloud/storagecontrol/v2/storage_control_client.h @@ -28,7 +28,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/storagecontrol/v2/storage_control_connection.h b/google/cloud/storagecontrol/v2/storage_control_connection.h index 1c15f550a459a..6c50e4ebfea53 100644 --- a/google/cloud/storagecontrol/v2/storage_control_connection.h +++ b/google/cloud/storagecontrol/v2/storage_control_connection.h @@ -30,8 +30,8 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/storage/control/v2/storage_control.pb.h" #include namespace google { diff --git a/google/cloud/storagecontrol/v2/storage_control_connection_idempotency_policy.h b/google/cloud/storagecontrol/v2/storage_control_connection_idempotency_policy.h index 0db0358f25d5a..4b7a54245a65c 100644 --- a/google/cloud/storagecontrol/v2/storage_control_connection_idempotency_policy.h +++ b/google/cloud/storagecontrol/v2/storage_control_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/storage/control/v2/storage_control.grpc.pb.h" #include namespace google { diff --git a/google/cloud/storageinsights/BUILD.bazel b/google/cloud/storageinsights/BUILD.bazel index eef854b92b79e..82cb84f3d7753 100644 --- a/google/cloud/storageinsights/BUILD.bazel +++ b/google/cloud/storageinsights/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/storageinsights/v1:storageinsights_cc_grpc", + "@googleapis//google/cloud/storageinsights/v1:storageinsights_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/storageinsights/quickstart/.bazelrc b/google/cloud/storageinsights/quickstart/.bazelrc index 6777c6b4c95de..ec27511a60add 100644 --- a/google/cloud/storageinsights/quickstart/.bazelrc +++ b/google/cloud/storageinsights/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/storageinsights/quickstart/CMakeLists.txt b/google/cloud/storageinsights/quickstart/CMakeLists.txt index 668558114fa9c..c3b1ff61380bd 100644 --- a/google/cloud/storageinsights/quickstart/CMakeLists.txt +++ b/google/cloud/storageinsights/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Storage Insights API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-storageinsights-quickstart CXX) find_package(google_cloud_cpp_storageinsights REQUIRED) diff --git a/google/cloud/storageinsights/v1/internal/storage_insights_auth_decorator.cc b/google/cloud/storageinsights/v1/internal/storage_insights_auth_decorator.cc index a3f9254900594..3916520f0cd27 100644 --- a/google/cloud/storageinsights/v1/internal/storage_insights_auth_decorator.cc +++ b/google/cloud/storageinsights/v1/internal/storage_insights_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/storageinsights/v1/storageinsights.proto #include "google/cloud/storageinsights/v1/internal/storage_insights_auth_decorator.h" -#include +#include "google/cloud/storageinsights/v1/storageinsights.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storageinsights_v1_internal { @@ -357,3 +360,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storageinsights_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/storageinsights/v1/internal/storage_insights_auth_decorator.h b/google/cloud/storageinsights/v1/internal/storage_insights_auth_decorator.h index c464091c9705f..726cd5f55cd60 100644 --- a/google/cloud/storageinsights/v1/internal/storage_insights_auth_decorator.h +++ b/google/cloud/storageinsights/v1/internal/storage_insights_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/storageinsights/v1/internal/storage_insights_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storageinsights_v1_internal { @@ -193,4 +196,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGEINSIGHTS_V1_INTERNAL_STORAGE_INSIGHTS_AUTH_DECORATOR_H diff --git a/google/cloud/storageinsights/v1/internal/storage_insights_connection_impl.h b/google/cloud/storageinsights/v1/internal/storage_insights_connection_impl.h index 278dd32ab1078..0a17475b9c82a 100644 --- a/google/cloud/storageinsights/v1/internal/storage_insights_connection_impl.h +++ b/google/cloud/storageinsights/v1/internal/storage_insights_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/storageinsights/v1/internal/storage_insights_logging_decorator.cc b/google/cloud/storageinsights/v1/internal/storage_insights_logging_decorator.cc index 002e71d0d495c..f016e9676e1d1 100644 --- a/google/cloud/storageinsights/v1/internal/storage_insights_logging_decorator.cc +++ b/google/cloud/storageinsights/v1/internal/storage_insights_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/storageinsights/v1/storageinsights.proto #include "google/cloud/storageinsights/v1/internal/storage_insights_logging_decorator.h" +#include "google/cloud/storageinsights/v1/storageinsights.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storageinsights_v1_internal { @@ -439,3 +442,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storageinsights_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/storageinsights/v1/internal/storage_insights_logging_decorator.h b/google/cloud/storageinsights/v1/internal/storage_insights_logging_decorator.h index dad507f7bf240..8bbeb6ce746eb 100644 --- a/google/cloud/storageinsights/v1/internal/storage_insights_logging_decorator.h +++ b/google/cloud/storageinsights/v1/internal/storage_insights_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/storageinsights/v1/internal/storage_insights_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storageinsights_v1_internal { @@ -193,4 +196,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGEINSIGHTS_V1_INTERNAL_STORAGE_INSIGHTS_LOGGING_DECORATOR_H diff --git a/google/cloud/storageinsights/v1/internal/storage_insights_metadata_decorator.cc b/google/cloud/storageinsights/v1/internal/storage_insights_metadata_decorator.cc index da97c85ee551e..f5bd43da9f141 100644 --- a/google/cloud/storageinsights/v1/internal/storage_insights_metadata_decorator.cc +++ b/google/cloud/storageinsights/v1/internal/storage_insights_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/storageinsights/v1/storageinsights.proto #include "google/cloud/storageinsights/v1/internal/storage_insights_metadata_decorator.h" +#include "google/cloud/storageinsights/v1/storageinsights.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storageinsights_v1_internal { @@ -337,3 +341,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storageinsights_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/storageinsights/v1/internal/storage_insights_metadata_decorator.h b/google/cloud/storageinsights/v1/internal/storage_insights_metadata_decorator.h index b8c76ee37b707..68533b33c7141 100644 --- a/google/cloud/storageinsights/v1/internal/storage_insights_metadata_decorator.h +++ b/google/cloud/storageinsights/v1/internal/storage_insights_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/storageinsights/v1/internal/storage_insights_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storageinsights_v1_internal { @@ -199,4 +202,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGEINSIGHTS_V1_INTERNAL_STORAGE_INSIGHTS_METADATA_DECORATOR_H diff --git a/google/cloud/storageinsights/v1/internal/storage_insights_option_defaults.cc b/google/cloud/storageinsights/v1/internal/storage_insights_option_defaults.cc index 71b216ca66943..1f5f4cb8c2357 100644 --- a/google/cloud/storageinsights/v1/internal/storage_insights_option_defaults.cc +++ b/google/cloud/storageinsights/v1/internal/storage_insights_option_defaults.cc @@ -42,7 +42,7 @@ Options StorageInsightsDefaultOptions(Options options) { if (!options.has()) { options.set( storageinsights_v1::StorageInsightsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/storageinsights/v1/internal/storage_insights_stub.cc b/google/cloud/storageinsights/v1/internal/storage_insights_stub.cc index 564791c3f98fd..8b79c8795516f 100644 --- a/google/cloud/storageinsights/v1/internal/storage_insights_stub.cc +++ b/google/cloud/storageinsights/v1/internal/storage_insights_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/storageinsights/v1/storageinsights.proto #include "google/cloud/storageinsights/v1/internal/storage_insights_stub.h" +#include "google/cloud/storageinsights/v1/storageinsights.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storageinsights_v1_internal { @@ -422,3 +425,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storageinsights_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/storageinsights/v1/internal/storage_insights_stub.h b/google/cloud/storageinsights/v1/internal/storage_insights_stub.h index 7f293f2ba6674..2ad6239b3db66 100644 --- a/google/cloud/storageinsights/v1/internal/storage_insights_stub.h +++ b/google/cloud/storageinsights/v1/internal/storage_insights_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGEINSIGHTS_V1_INTERNAL_STORAGE_INSIGHTS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGEINSIGHTS_V1_INTERNAL_STORAGE_INSIGHTS_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/storageinsights/v1/storageinsights.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storageinsights_v1_internal { @@ -369,4 +372,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGEINSIGHTS_V1_INTERNAL_STORAGE_INSIGHTS_STUB_H diff --git a/google/cloud/storageinsights/v1/internal/storage_insights_stub_factory.cc b/google/cloud/storageinsights/v1/internal/storage_insights_stub_factory.cc index 5b81f003e9711..f62175fe92ff4 100644 --- a/google/cloud/storageinsights/v1/internal/storage_insights_stub_factory.cc +++ b/google/cloud/storageinsights/v1/internal/storage_insights_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/storageinsights/v1/storageinsights.proto #include "google/cloud/storageinsights/v1/internal/storage_insights_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/storageinsights/v1/internal/storage_insights_auth_decorator.h" #include "google/cloud/storageinsights/v1/internal/storage_insights_logging_decorator.h" #include "google/cloud/storageinsights/v1/internal/storage_insights_metadata_decorator.h" #include "google/cloud/storageinsights/v1/internal/storage_insights_stub.h" #include "google/cloud/storageinsights/v1/internal/storage_insights_tracing_stub.h" +#include "google/cloud/storageinsights/v1/storageinsights.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storageinsights_v1_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storageinsights_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/storageinsights/v1/internal/storage_insights_stub_factory.h b/google/cloud/storageinsights/v1/internal/storage_insights_stub_factory.h index 62bcbaa84814d..781f6ea530120 100644 --- a/google/cloud/storageinsights/v1/internal/storage_insights_stub_factory.h +++ b/google/cloud/storageinsights/v1/internal/storage_insights_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storageinsights_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGEINSIGHTS_V1_INTERNAL_STORAGE_INSIGHTS_STUB_FACTORY_H diff --git a/google/cloud/storageinsights/v1/internal/storage_insights_tracing_connection.cc b/google/cloud/storageinsights/v1/internal/storage_insights_tracing_connection.cc index 1b87e43c05c7c..5d5a6b4240d63 100644 --- a/google/cloud/storageinsights/v1/internal/storage_insights_tracing_connection.cc +++ b/google/cloud/storageinsights/v1/internal/storage_insights_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace storageinsights_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - StorageInsightsTracingConnection::StorageInsightsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -337,16 +335,12 @@ Status StorageInsightsTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeStorageInsightsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/storageinsights/v1/internal/storage_insights_tracing_connection.h b/google/cloud/storageinsights/v1/internal/storage_insights_tracing_connection.h index 2261babdcd84b..2df1f5409e5e7 100644 --- a/google/cloud/storageinsights/v1/internal/storage_insights_tracing_connection.h +++ b/google/cloud/storageinsights/v1/internal/storage_insights_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace storageinsights_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class StorageInsightsTracingConnection : public storageinsights_v1::StorageInsightsConnection { public: @@ -162,8 +160,6 @@ class StorageInsightsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/storageinsights/v1/internal/storage_insights_tracing_stub.cc b/google/cloud/storageinsights/v1/internal/storage_insights_tracing_stub.cc index 7a635c1d500fe..5851f32beb7a7 100644 --- a/google/cloud/storageinsights/v1/internal/storage_insights_tracing_stub.cc +++ b/google/cloud/storageinsights/v1/internal/storage_insights_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storageinsights_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - StorageInsightsTracingStub::StorageInsightsTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -383,18 +384,14 @@ future StorageInsightsTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeStorageInsightsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storageinsights_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/storageinsights/v1/internal/storage_insights_tracing_stub.h b/google/cloud/storageinsights/v1/internal/storage_insights_tracing_stub.h index 067cfdef2bfa0..8fd110ff1888b 100644 --- a/google/cloud/storageinsights/v1/internal/storage_insights_tracing_stub.h +++ b/google/cloud/storageinsights/v1/internal/storage_insights_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storageinsights_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class StorageInsightsTracingStub : public StorageInsightsStub { public: ~StorageInsightsTracingStub() override = default; @@ -189,8 +190,6 @@ class StorageInsightsTracingStub : public StorageInsightsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -205,4 +204,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGEINSIGHTS_V1_INTERNAL_STORAGE_INSIGHTS_TRACING_STUB_H diff --git a/google/cloud/storageinsights/v1/storage_insights_client.h b/google/cloud/storageinsights/v1/storage_insights_client.h index 63b8b2c4cd67d..272b5abb1485e 100644 --- a/google/cloud/storageinsights/v1/storage_insights_client.h +++ b/google/cloud/storageinsights/v1/storage_insights_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/storageinsights/v1/storage_insights_connection.h b/google/cloud/storageinsights/v1/storage_insights_connection.h index 4d8359507e362..acdaed0c5d193 100644 --- a/google/cloud/storageinsights/v1/storage_insights_connection.h +++ b/google/cloud/storageinsights/v1/storage_insights_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/storageinsights/v1/internal/storage_insights_retry_traits.h" #include "google/cloud/storageinsights/v1/storage_insights_connection_idempotency_policy.h" +#include "google/cloud/storageinsights/v1/storageinsights.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/storageinsights/v1/storage_insights_connection_idempotency_policy.h b/google/cloud/storageinsights/v1/storage_insights_connection_idempotency_policy.h index b5f810cb8045a..c504ce1d2791d 100644 --- a/google/cloud/storageinsights/v1/storage_insights_connection_idempotency_policy.h +++ b/google/cloud/storageinsights/v1/storage_insights_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGEINSIGHTS_V1_STORAGE_INSIGHTS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGEINSIGHTS_V1_STORAGE_INSIGHTS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/storageinsights/v1/storageinsights.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/storagetransfer/BUILD.bazel b/google/cloud/storagetransfer/BUILD.bazel index 3fdcf167e0153..1dfe331c452b2 100644 --- a/google/cloud/storagetransfer/BUILD.bazel +++ b/google/cloud/storagetransfer/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/storagetransfer/v1:storagetransfer_cc_grpc", + "@googleapis//google/storagetransfer/v1:storagetransfer_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/storagetransfer/CMakeLists.txt b/google/cloud/storagetransfer/CMakeLists.txt index 79b1ad38d6038..713edb09a209c 100644 --- a/google/cloud/storagetransfer/CMakeLists.txt +++ b/google/cloud/storagetransfer/CMakeLists.txt @@ -27,7 +27,7 @@ endif () include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(storagetransfer "Storage Transfer API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(storagetransfer_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/storagetransfer/mocks/mock_storage_transfer_connection.h b/google/cloud/storagetransfer/mocks/mock_storage_transfer_connection.h deleted file mode 100644 index c66f70ecca6f8..0000000000000 --- a/google/cloud/storagetransfer/mocks/mock_storage_transfer_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/storagetransfer/v1/transfer.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGETRANSFER_MOCKS_MOCK_STORAGE_TRANSFER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGETRANSFER_MOCKS_MOCK_STORAGE_TRANSFER_CONNECTION_H - -#include "google/cloud/storagetransfer/storage_transfer_connection.h" -#include "google/cloud/storagetransfer/v1/mocks/mock_storage_transfer_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in storagetransfer_v1_mocks instead of the aliases -/// defined in this namespace. -namespace storagetransfer_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// storagetransfer_v1_mocks::MockStorageTransferServiceConnection directly. -using ::google::cloud::storagetransfer_v1_mocks:: - MockStorageTransferServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storagetransfer_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGETRANSFER_MOCKS_MOCK_STORAGE_TRANSFER_CONNECTION_H diff --git a/google/cloud/storagetransfer/quickstart/.bazelrc b/google/cloud/storagetransfer/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/storagetransfer/quickstart/.bazelrc +++ b/google/cloud/storagetransfer/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/storagetransfer/quickstart/CMakeLists.txt b/google/cloud/storagetransfer/quickstart/CMakeLists.txt index 680fb0ee7ff00..09fce9fb82085 100644 --- a/google/cloud/storagetransfer/quickstart/CMakeLists.txt +++ b/google/cloud/storagetransfer/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Storage Transfer API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-storagetransfer-quickstart CXX) find_package(google_cloud_cpp_storagetransfer REQUIRED) diff --git a/google/cloud/storagetransfer/storage_transfer_client.h b/google/cloud/storagetransfer/storage_transfer_client.h deleted file mode 100644 index 5c18782710b6c..0000000000000 --- a/google/cloud/storagetransfer/storage_transfer_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/storagetransfer/v1/transfer.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGETRANSFER_STORAGE_TRANSFER_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGETRANSFER_STORAGE_TRANSFER_CLIENT_H - -#include "google/cloud/storagetransfer/storage_transfer_connection.h" -#include "google/cloud/storagetransfer/v1/storage_transfer_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in storagetransfer_v1 instead of the aliases defined in -/// this namespace. -namespace storagetransfer { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use storagetransfer_v1::StorageTransferServiceClient directly. -using ::google::cloud::storagetransfer_v1::StorageTransferServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storagetransfer -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGETRANSFER_STORAGE_TRANSFER_CLIENT_H diff --git a/google/cloud/storagetransfer/storage_transfer_connection.h b/google/cloud/storagetransfer/storage_transfer_connection.h deleted file mode 100644 index 689c7b2d3a887..0000000000000 --- a/google/cloud/storagetransfer/storage_transfer_connection.h +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/storagetransfer/v1/transfer.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGETRANSFER_STORAGE_TRANSFER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGETRANSFER_STORAGE_TRANSFER_CONNECTION_H - -#include "google/cloud/storagetransfer/storage_transfer_connection_idempotency_policy.h" -#include "google/cloud/storagetransfer/v1/storage_transfer_connection.h" - -namespace google { -namespace cloud { -namespace storagetransfer { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use storagetransfer_v1::MakeStorageTransferServiceConnection -/// directly. -using ::google::cloud::storagetransfer_v1::MakeStorageTransferServiceConnection; - -/// @deprecated Use storagetransfer_v1::StorageTransferServiceConnection -/// directly. -using ::google::cloud::storagetransfer_v1::StorageTransferServiceConnection; - -/// @deprecated Use -/// storagetransfer_v1::StorageTransferServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::storagetransfer_v1:: - StorageTransferServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use -/// storagetransfer_v1::StorageTransferServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::storagetransfer_v1:: - StorageTransferServiceLimitedTimeRetryPolicy; - -/// @deprecated Use storagetransfer_v1::StorageTransferServiceRetryPolicy -/// directly. -using ::google::cloud::storagetransfer_v1::StorageTransferServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storagetransfer -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGETRANSFER_STORAGE_TRANSFER_CONNECTION_H diff --git a/google/cloud/storagetransfer/storage_transfer_connection_idempotency_policy.h b/google/cloud/storagetransfer/storage_transfer_connection_idempotency_policy.h deleted file mode 100644 index 1186f9731902c..0000000000000 --- a/google/cloud/storagetransfer/storage_transfer_connection_idempotency_policy.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/storagetransfer/v1/transfer.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGETRANSFER_STORAGE_TRANSFER_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGETRANSFER_STORAGE_TRANSFER_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/storagetransfer/v1/storage_transfer_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace storagetransfer { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// storagetransfer_v1::MakeDefaultStorageTransferServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::storagetransfer_v1:: - MakeDefaultStorageTransferServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// storagetransfer_v1::StorageTransferServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::storagetransfer_v1:: - StorageTransferServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storagetransfer -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGETRANSFER_STORAGE_TRANSFER_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/storagetransfer/storage_transfer_options.h b/google/cloud/storagetransfer/storage_transfer_options.h deleted file mode 100644 index d2f51361bbf9c..0000000000000 --- a/google/cloud/storagetransfer/storage_transfer_options.h +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/storagetransfer/v1/transfer.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGETRANSFER_STORAGE_TRANSFER_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGETRANSFER_STORAGE_TRANSFER_OPTIONS_H - -#include "google/cloud/storagetransfer/storage_transfer_connection.h" -#include "google/cloud/storagetransfer/storage_transfer_connection_idempotency_policy.h" -#include "google/cloud/storagetransfer/v1/storage_transfer_options.h" - -namespace google { -namespace cloud { -namespace storagetransfer { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// storagetransfer_v1::StorageTransferServicePollingPolicyOption directly. -using ::google::cloud::storagetransfer_v1:: - StorageTransferServicePollingPolicyOption; - -/// @deprecated Use -/// storagetransfer_v1::StorageTransferServiceBackoffPolicyOption directly. -using ::google::cloud::storagetransfer_v1:: - StorageTransferServiceBackoffPolicyOption; - -/// @deprecated Use -/// storagetransfer_v1::StorageTransferServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::storagetransfer_v1:: - StorageTransferServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use storagetransfer_v1::StorageTransferServicePolicyOptionList -/// directly. -using ::google::cloud::storagetransfer_v1:: - StorageTransferServicePolicyOptionList; - -/// @deprecated Use storagetransfer_v1::StorageTransferServiceRetryPolicyOption -/// directly. -using ::google::cloud::storagetransfer_v1:: - StorageTransferServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace storagetransfer -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGETRANSFER_STORAGE_TRANSFER_OPTIONS_H diff --git a/google/cloud/storagetransfer/v1/internal/storage_transfer_auth_decorator.cc b/google/cloud/storagetransfer/v1/internal/storage_transfer_auth_decorator.cc index d597f1587909f..b1a5b6c4b02cd 100644 --- a/google/cloud/storagetransfer/v1/internal/storage_transfer_auth_decorator.cc +++ b/google/cloud/storagetransfer/v1/internal/storage_transfer_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/storagetransfer/v1/transfer.proto #include "google/cloud/storagetransfer/v1/internal/storage_transfer_auth_decorator.h" -#include +#include "google/storagetransfer/v1/transfer.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagetransfer_v1_internal { @@ -241,3 +244,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storagetransfer_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/storagetransfer/v1/internal/storage_transfer_auth_decorator.h b/google/cloud/storagetransfer/v1/internal/storage_transfer_auth_decorator.h index d6535c655ac91..7500c1dad56a4 100644 --- a/google/cloud/storagetransfer/v1/internal/storage_transfer_auth_decorator.h +++ b/google/cloud/storagetransfer/v1/internal/storage_transfer_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/storagetransfer/v1/internal/storage_transfer_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagetransfer_v1_internal { @@ -150,4 +153,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGETRANSFER_V1_INTERNAL_STORAGE_TRANSFER_AUTH_DECORATOR_H diff --git a/google/cloud/storagetransfer/v1/internal/storage_transfer_connection_impl.h b/google/cloud/storagetransfer/v1/internal/storage_transfer_connection_impl.h index 914c3f3771f09..f052b8b13ccc6 100644 --- a/google/cloud/storagetransfer/v1/internal/storage_transfer_connection_impl.h +++ b/google/cloud/storagetransfer/v1/internal/storage_transfer_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/storagetransfer/v1/internal/storage_transfer_logging_decorator.cc b/google/cloud/storagetransfer/v1/internal/storage_transfer_logging_decorator.cc index 99e198e759bcc..db43de1e88ceb 100644 --- a/google/cloud/storagetransfer/v1/internal/storage_transfer_logging_decorator.cc +++ b/google/cloud/storagetransfer/v1/internal/storage_transfer_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/storagetransfer/v1/internal/storage_transfer_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/storagetransfer/v1/transfer.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagetransfer_v1_internal { @@ -307,3 +310,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storagetransfer_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/storagetransfer/v1/internal/storage_transfer_logging_decorator.h b/google/cloud/storagetransfer/v1/internal/storage_transfer_logging_decorator.h index 1b4621d32c0c2..626127f3ccd4b 100644 --- a/google/cloud/storagetransfer/v1/internal/storage_transfer_logging_decorator.h +++ b/google/cloud/storagetransfer/v1/internal/storage_transfer_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/storagetransfer/v1/internal/storage_transfer_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagetransfer_v1_internal { @@ -150,4 +153,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGETRANSFER_V1_INTERNAL_STORAGE_TRANSFER_LOGGING_DECORATOR_H diff --git a/google/cloud/storagetransfer/v1/internal/storage_transfer_metadata_decorator.cc b/google/cloud/storagetransfer/v1/internal/storage_transfer_metadata_decorator.cc index be30ce8d9c5f9..2955528540c53 100644 --- a/google/cloud/storagetransfer/v1/internal/storage_transfer_metadata_decorator.cc +++ b/google/cloud/storagetransfer/v1/internal/storage_transfer_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/storagetransfer/v1/internal/storage_transfer_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/storagetransfer/v1/transfer.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagetransfer_v1_internal { @@ -253,3 +257,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storagetransfer_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/storagetransfer/v1/internal/storage_transfer_metadata_decorator.h b/google/cloud/storagetransfer/v1/internal/storage_transfer_metadata_decorator.h index ba81033ee6565..1eb95f58c1a2c 100644 --- a/google/cloud/storagetransfer/v1/internal/storage_transfer_metadata_decorator.h +++ b/google/cloud/storagetransfer/v1/internal/storage_transfer_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/storagetransfer/v1/internal/storage_transfer_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagetransfer_v1_internal { @@ -156,4 +159,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGETRANSFER_V1_INTERNAL_STORAGE_TRANSFER_METADATA_DECORATOR_H diff --git a/google/cloud/storagetransfer/v1/internal/storage_transfer_option_defaults.cc b/google/cloud/storagetransfer/v1/internal/storage_transfer_option_defaults.cc index 9af6735f07413..a8f0dd188b31f 100644 --- a/google/cloud/storagetransfer/v1/internal/storage_transfer_option_defaults.cc +++ b/google/cloud/storagetransfer/v1/internal/storage_transfer_option_defaults.cc @@ -43,7 +43,7 @@ Options StorageTransferServiceDefaultOptions(Options options) { storagetransfer_v1::StorageTransferServiceRetryPolicyOption>()) { options.set( storagetransfer_v1::StorageTransferServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/storagetransfer/v1/internal/storage_transfer_stub.cc b/google/cloud/storagetransfer/v1/internal/storage_transfer_stub.cc index 3b6d2bef540ce..188e38c1f18bf 100644 --- a/google/cloud/storagetransfer/v1/internal/storage_transfer_stub.cc +++ b/google/cloud/storagetransfer/v1/internal/storage_transfer_stub.cc @@ -19,11 +19,14 @@ #include "google/cloud/storagetransfer/v1/internal/storage_transfer_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/storagetransfer/v1/transfer.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagetransfer_v1_internal { @@ -296,3 +299,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storagetransfer_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/storagetransfer/v1/internal/storage_transfer_stub.h b/google/cloud/storagetransfer/v1/internal/storage_transfer_stub.h index f7a283590b6af..3ae7220b01e15 100644 --- a/google/cloud/storagetransfer/v1/internal/storage_transfer_stub.h +++ b/google/cloud/storagetransfer/v1/internal/storage_transfer_stub.h @@ -24,11 +24,14 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/storagetransfer/v1/transfer.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagetransfer_v1_internal { @@ -256,4 +259,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGETRANSFER_V1_INTERNAL_STORAGE_TRANSFER_STUB_H diff --git a/google/cloud/storagetransfer/v1/internal/storage_transfer_stub_factory.cc b/google/cloud/storagetransfer/v1/internal/storage_transfer_stub_factory.cc index 020c9993b656c..3d83fda13e25e 100644 --- a/google/cloud/storagetransfer/v1/internal/storage_transfer_stub_factory.cc +++ b/google/cloud/storagetransfer/v1/internal/storage_transfer_stub_factory.cc @@ -28,11 +28,14 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/storagetransfer/v1/transfer.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagetransfer_v1_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storagetransfer_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/storagetransfer/v1/internal/storage_transfer_stub_factory.h b/google/cloud/storagetransfer/v1/internal/storage_transfer_stub_factory.h index 1808e6e832103..dedaba012cde0 100644 --- a/google/cloud/storagetransfer/v1/internal/storage_transfer_stub_factory.h +++ b/google/cloud/storagetransfer/v1/internal/storage_transfer_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagetransfer_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGETRANSFER_V1_INTERNAL_STORAGE_TRANSFER_STUB_FACTORY_H diff --git a/google/cloud/storagetransfer/v1/internal/storage_transfer_tracing_connection.cc b/google/cloud/storagetransfer/v1/internal/storage_transfer_tracing_connection.cc index c8ce2fb649203..841c021f005e6 100644 --- a/google/cloud/storagetransfer/v1/internal/storage_transfer_tracing_connection.cc +++ b/google/cloud/storagetransfer/v1/internal/storage_transfer_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace storagetransfer_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - StorageTransferServiceTracingConnection:: StorageTransferServiceTracingConnection( std::shared_ptr @@ -217,18 +215,14 @@ Status StorageTransferServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeStorageTransferServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/storagetransfer/v1/internal/storage_transfer_tracing_connection.h b/google/cloud/storagetransfer/v1/internal/storage_transfer_tracing_connection.h index 068ec7892dcf3..5db8d91dda768 100644 --- a/google/cloud/storagetransfer/v1/internal/storage_transfer_tracing_connection.h +++ b/google/cloud/storagetransfer/v1/internal/storage_transfer_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace storagetransfer_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class StorageTransferServiceTracingConnection : public storagetransfer_v1::StorageTransferServiceConnection { public: @@ -116,8 +114,6 @@ class StorageTransferServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/storagetransfer/v1/internal/storage_transfer_tracing_stub.cc b/google/cloud/storagetransfer/v1/internal/storage_transfer_tracing_stub.cc index 7b9b79cda40eb..df5d126ededbc 100644 --- a/google/cloud/storagetransfer/v1/internal/storage_transfer_tracing_stub.cc +++ b/google/cloud/storagetransfer/v1/internal/storage_transfer_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagetransfer_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - StorageTransferServiceTracingStub::StorageTransferServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -282,19 +283,15 @@ future StorageTransferServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeStorageTransferServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace storagetransfer_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/storagetransfer/v1/internal/storage_transfer_tracing_stub.h b/google/cloud/storagetransfer/v1/internal/storage_transfer_tracing_stub.h index e46afb82b3bde..51907a441db8c 100644 --- a/google/cloud/storagetransfer/v1/internal/storage_transfer_tracing_stub.h +++ b/google/cloud/storagetransfer/v1/internal/storage_transfer_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace storagetransfer_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class StorageTransferServiceTracingStub : public StorageTransferServiceStub { public: ~StorageTransferServiceTracingStub() override = default; @@ -146,8 +147,6 @@ class StorageTransferServiceTracingStub : public StorageTransferServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -163,4 +162,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGETRANSFER_V1_INTERNAL_STORAGE_TRANSFER_TRACING_STUB_H diff --git a/google/cloud/storagetransfer/v1/storage_transfer_client.h b/google/cloud/storagetransfer/v1/storage_transfer_client.h index a257d9cd2131d..6a24cdc15d670 100644 --- a/google/cloud/storagetransfer/v1/storage_transfer_client.h +++ b/google/cloud/storagetransfer/v1/storage_transfer_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/storagetransfer/v1/storage_transfer_connection.h b/google/cloud/storagetransfer/v1/storage_transfer_connection.h index a4fdbef45873b..92b125959eb82 100644 --- a/google/cloud/storagetransfer/v1/storage_transfer_connection.h +++ b/google/cloud/storagetransfer/v1/storage_transfer_connection.h @@ -30,8 +30,8 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/storagetransfer/v1/transfer.pb.h" #include namespace google { diff --git a/google/cloud/storagetransfer/v1/storage_transfer_connection_idempotency_policy.h b/google/cloud/storagetransfer/v1/storage_transfer_connection_idempotency_policy.h index 82ae504adfb24..8f9ee0fd3e0ad 100644 --- a/google/cloud/storagetransfer/v1/storage_transfer_connection_idempotency_policy.h +++ b/google/cloud/storagetransfer/v1/storage_transfer_connection_idempotency_policy.h @@ -21,8 +21,8 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" +#include "google/storagetransfer/v1/transfer.grpc.pb.h" #include namespace google { diff --git a/google/cloud/stream_range_test.cc b/google/cloud/stream_range_test.cc index 885688127a18c..bced62056bc11 100644 --- a/google/cloud/stream_range_test.cc +++ b/google/cloud/stream_range_test.cc @@ -273,8 +273,6 @@ TEST(StreamRange, ReaderDestructorOptionsSpan) { // happen with `CurrentOptions()` matching those at `StreamRange` ctor time. } -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - using ::google::cloud::testing_util::IsActive; class FakeReader { @@ -318,8 +316,6 @@ TEST(StreamRange, CallSpanActiveThroughout) { // the active span matching that at `StreamRange` ctor time. } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - } // namespace GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud diff --git a/google/cloud/support/BUILD.bazel b/google/cloud/support/BUILD.bazel index a6eadc8d21f07..7d9ea7e37fde7 100644 --- a/google/cloud/support/BUILD.bazel +++ b/google/cloud/support/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v2/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/support/v2:support_cc_grpc", + "@googleapis//google/cloud/support/v2:support_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/support/quickstart/.bazelrc b/google/cloud/support/quickstart/.bazelrc index 6777c6b4c95de..ec27511a60add 100644 --- a/google/cloud/support/quickstart/.bazelrc +++ b/google/cloud/support/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/support/quickstart/CMakeLists.txt b/google/cloud/support/quickstart/CMakeLists.txt index 9057fc7ca898d..1a63c684b1c49 100644 --- a/google/cloud/support/quickstart/CMakeLists.txt +++ b/google/cloud/support/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Google Cloud Support API C++ client library # from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-support-quickstart CXX) find_package(google_cloud_cpp_support REQUIRED) diff --git a/google/cloud/support/v2/case_attachment_connection.h b/google/cloud/support/v2/case_attachment_connection.h index cbb912a173e51..eaac02afff88c 100644 --- a/google/cloud/support/v2/case_attachment_connection.h +++ b/google/cloud/support/v2/case_attachment_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_CASE_ATTACHMENT_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_CASE_ATTACHMENT_CONNECTION_H +#include "google/cloud/support/v2/attachment_service.pb.h" #include "google/cloud/support/v2/case_attachment_connection_idempotency_policy.h" #include "google/cloud/support/v2/internal/case_attachment_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/support/v2/case_attachment_connection_idempotency_policy.h b/google/cloud/support/v2/case_attachment_connection_idempotency_policy.h index 6c40b027ab08d..0309d9c1264ee 100644 --- a/google/cloud/support/v2/case_attachment_connection_idempotency_policy.h +++ b/google/cloud/support/v2/case_attachment_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_CASE_ATTACHMENT_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_CASE_ATTACHMENT_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/support/v2/attachment_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/support/v2/case_connection.h b/google/cloud/support/v2/case_connection.h index d3f8a93246066..8e2530c72bbbf 100644 --- a/google/cloud/support/v2/case_connection.h +++ b/google/cloud/support/v2/case_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_CASE_CONNECTION_H #include "google/cloud/support/v2/case_connection_idempotency_policy.h" +#include "google/cloud/support/v2/case_service.pb.h" #include "google/cloud/support/v2/internal/case_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/support/v2/case_connection_idempotency_policy.h b/google/cloud/support/v2/case_connection_idempotency_policy.h index 09b2d72707695..6b92765e2ed51 100644 --- a/google/cloud/support/v2/case_connection_idempotency_policy.h +++ b/google/cloud/support/v2/case_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_CASE_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_CASE_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/support/v2/case_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/support/v2/comment_connection.h b/google/cloud/support/v2/comment_connection.h index 05673b43ea1aa..48baea34fa581 100644 --- a/google/cloud/support/v2/comment_connection.h +++ b/google/cloud/support/v2/comment_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_COMMENT_CONNECTION_H #include "google/cloud/support/v2/comment_connection_idempotency_policy.h" +#include "google/cloud/support/v2/comment_service.pb.h" #include "google/cloud/support/v2/internal/comment_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/support/v2/comment_connection_idempotency_policy.h b/google/cloud/support/v2/comment_connection_idempotency_policy.h index 45ded57020ca4..c0f89cd65255d 100644 --- a/google/cloud/support/v2/comment_connection_idempotency_policy.h +++ b/google/cloud/support/v2/comment_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_COMMENT_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_COMMENT_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/support/v2/comment_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/support/v2/internal/case_attachment_auth_decorator.cc b/google/cloud/support/v2/internal/case_attachment_auth_decorator.cc index 2a5e94ef97ec4..de7660f25e8be 100644 --- a/google/cloud/support/v2/internal/case_attachment_auth_decorator.cc +++ b/google/cloud/support/v2/internal/case_attachment_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/support/v2/attachment_service.proto #include "google/cloud/support/v2/internal/case_attachment_auth_decorator.h" -#include +#include "google/cloud/support/v2/attachment_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { @@ -44,3 +47,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace support_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/support/v2/internal/case_attachment_auth_decorator.h b/google/cloud/support/v2/internal/case_attachment_auth_decorator.h index e8b1a49914018..b847b481716fc 100644 --- a/google/cloud/support/v2/internal/case_attachment_auth_decorator.h +++ b/google/cloud/support/v2/internal/case_attachment_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { @@ -53,4 +56,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_INTERNAL_CASE_ATTACHMENT_AUTH_DECORATOR_H diff --git a/google/cloud/support/v2/internal/case_attachment_logging_decorator.cc b/google/cloud/support/v2/internal/case_attachment_logging_decorator.cc index 91c0e4e4fae7c..745a16e826abe 100644 --- a/google/cloud/support/v2/internal/case_attachment_logging_decorator.cc +++ b/google/cloud/support/v2/internal/case_attachment_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/support/v2/attachment_service.proto #include "google/cloud/support/v2/internal/case_attachment_logging_decorator.h" +#include "google/cloud/support/v2/attachment_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { @@ -52,3 +55,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace support_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/support/v2/internal/case_attachment_logging_decorator.h b/google/cloud/support/v2/internal/case_attachment_logging_decorator.h index 2d12b1528ecc9..742d87730f5c3 100644 --- a/google/cloud/support/v2/internal/case_attachment_logging_decorator.h +++ b/google/cloud/support/v2/internal/case_attachment_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { @@ -53,4 +56,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_INTERNAL_CASE_ATTACHMENT_LOGGING_DECORATOR_H diff --git a/google/cloud/support/v2/internal/case_attachment_metadata_decorator.cc b/google/cloud/support/v2/internal/case_attachment_metadata_decorator.cc index c280791deef12..e6d97338e4524 100644 --- a/google/cloud/support/v2/internal/case_attachment_metadata_decorator.cc +++ b/google/cloud/support/v2/internal/case_attachment_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/support/v2/attachment_service.proto #include "google/cloud/support/v2/internal/case_attachment_metadata_decorator.h" +#include "google/cloud/support/v2/attachment_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { @@ -70,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace support_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/support/v2/internal/case_attachment_metadata_decorator.h b/google/cloud/support/v2/internal/case_attachment_metadata_decorator.h index 493a912ff9097..a910d79668993 100644 --- a/google/cloud/support/v2/internal/case_attachment_metadata_decorator.h +++ b/google/cloud/support/v2/internal/case_attachment_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { @@ -59,4 +62,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_INTERNAL_CASE_ATTACHMENT_METADATA_DECORATOR_H diff --git a/google/cloud/support/v2/internal/case_attachment_option_defaults.cc b/google/cloud/support/v2/internal/case_attachment_option_defaults.cc index 9e1e7e67b62f5..4bf11313f5231 100644 --- a/google/cloud/support/v2/internal/case_attachment_option_defaults.cc +++ b/google/cloud/support/v2/internal/case_attachment_option_defaults.cc @@ -42,7 +42,7 @@ Options CaseAttachmentServiceDefaultOptions(Options options) { if (!options.has()) { options.set( support_v2::CaseAttachmentServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/support/v2/internal/case_attachment_stub.cc b/google/cloud/support/v2/internal/case_attachment_stub.cc index a8403b967ebdd..04bfccc74b487 100644 --- a/google/cloud/support/v2/internal/case_attachment_stub.cc +++ b/google/cloud/support/v2/internal/case_attachment_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/support/v2/attachment_service.proto #include "google/cloud/support/v2/internal/case_attachment_stub.h" +#include "google/cloud/support/v2/attachment_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { @@ -46,3 +49,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace support_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/support/v2/internal/case_attachment_stub.h b/google/cloud/support/v2/internal/case_attachment_stub.h index e29d42baf1e84..86d4fc689ad6b 100644 --- a/google/cloud/support/v2/internal/case_attachment_stub.h +++ b/google/cloud/support/v2/internal/case_attachment_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_INTERNAL_CASE_ATTACHMENT_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_INTERNAL_CASE_ATTACHMENT_STUB_H +#include "google/cloud/support/v2/attachment_service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { @@ -65,4 +68,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_INTERNAL_CASE_ATTACHMENT_STUB_H diff --git a/google/cloud/support/v2/internal/case_attachment_stub_factory.cc b/google/cloud/support/v2/internal/case_attachment_stub_factory.cc index f0a2d54f27fd4..854f327d69433 100644 --- a/google/cloud/support/v2/internal/case_attachment_stub_factory.cc +++ b/google/cloud/support/v2/internal/case_attachment_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/support/v2/attachment_service.proto #include "google/cloud/support/v2/internal/case_attachment_stub_factory.h" +#include "google/cloud/support/v2/attachment_service.grpc.pb.h" #include "google/cloud/support/v2/internal/case_attachment_auth_decorator.h" #include "google/cloud/support/v2/internal/case_attachment_logging_decorator.h" #include "google/cloud/support/v2/internal/case_attachment_metadata_decorator.h" @@ -28,10 +29,12 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace support_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/support/v2/internal/case_attachment_stub_factory.h b/google/cloud/support/v2/internal/case_attachment_stub_factory.h index bff249e0dfd7c..25f67506662a0 100644 --- a/google/cloud/support/v2/internal/case_attachment_stub_factory.h +++ b/google/cloud/support/v2/internal/case_attachment_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_INTERNAL_CASE_ATTACHMENT_STUB_FACTORY_H diff --git a/google/cloud/support/v2/internal/case_attachment_tracing_connection.cc b/google/cloud/support/v2/internal/case_attachment_tracing_connection.cc index c8daa9be34cd4..a26373915f20e 100644 --- a/google/cloud/support/v2/internal/case_attachment_tracing_connection.cc +++ b/google/cloud/support/v2/internal/case_attachment_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace support_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CaseAttachmentServiceTracingConnection::CaseAttachmentServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -44,17 +42,13 @@ CaseAttachmentServiceTracingConnection::ListAttachments( google::cloud::support::v2::Attachment>(std::move(span), std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCaseAttachmentServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/support/v2/internal/case_attachment_tracing_connection.h b/google/cloud/support/v2/internal/case_attachment_tracing_connection.h index ec5c5389a770d..ac4a31b526106 100644 --- a/google/cloud/support/v2/internal/case_attachment_tracing_connection.h +++ b/google/cloud/support/v2/internal/case_attachment_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace support_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CaseAttachmentServiceTracingConnection : public support_v2::CaseAttachmentServiceConnection { public: @@ -47,8 +45,6 @@ class CaseAttachmentServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/support/v2/internal/case_attachment_tracing_stub.cc b/google/cloud/support/v2/internal/case_attachment_tracing_stub.cc index a5786c601f26f..9923e69c17f3b 100644 --- a/google/cloud/support/v2/internal/case_attachment_tracing_stub.cc +++ b/google/cloud/support/v2/internal/case_attachment_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CaseAttachmentServiceTracingStub::CaseAttachmentServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -44,18 +45,14 @@ CaseAttachmentServiceTracingStub::ListAttachments( child_->ListAttachments(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCaseAttachmentServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace support_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/support/v2/internal/case_attachment_tracing_stub.h b/google/cloud/support/v2/internal/case_attachment_tracing_stub.h index 086799d21108d..3822fcd220425 100644 --- a/google/cloud/support/v2/internal/case_attachment_tracing_stub.h +++ b/google/cloud/support/v2/internal/case_attachment_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CaseAttachmentServiceTracingStub : public CaseAttachmentServiceStub { public: ~CaseAttachmentServiceTracingStub() override = default; @@ -50,8 +51,6 @@ class CaseAttachmentServiceTracingStub : public CaseAttachmentServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -66,4 +65,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_INTERNAL_CASE_ATTACHMENT_TRACING_STUB_H diff --git a/google/cloud/support/v2/internal/case_auth_decorator.cc b/google/cloud/support/v2/internal/case_auth_decorator.cc index dfb54754f52d2..fc6af861e96a4 100644 --- a/google/cloud/support/v2/internal/case_auth_decorator.cc +++ b/google/cloud/support/v2/internal/case_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/support/v2/case_service.proto #include "google/cloud/support/v2/internal/case_auth_decorator.h" -#include +#include "google/cloud/support/v2/case_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { @@ -103,3 +106,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace support_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/support/v2/internal/case_auth_decorator.h b/google/cloud/support/v2/internal/case_auth_decorator.h index c863aedc027ca..ab29a07526f43 100644 --- a/google/cloud/support/v2/internal/case_auth_decorator.h +++ b/google/cloud/support/v2/internal/case_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { @@ -82,4 +85,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_INTERNAL_CASE_AUTH_DECORATOR_H diff --git a/google/cloud/support/v2/internal/case_logging_decorator.cc b/google/cloud/support/v2/internal/case_logging_decorator.cc index a051362d61428..e055d615c45a5 100644 --- a/google/cloud/support/v2/internal/case_logging_decorator.cc +++ b/google/cloud/support/v2/internal/case_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/support/v2/case_service.proto #include "google/cloud/support/v2/internal/case_logging_decorator.h" +#include "google/cloud/support/v2/case_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { @@ -132,3 +135,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace support_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/support/v2/internal/case_logging_decorator.h b/google/cloud/support/v2/internal/case_logging_decorator.h index 2686659bb1a1f..70a1cbd31cf6d 100644 --- a/google/cloud/support/v2/internal/case_logging_decorator.h +++ b/google/cloud/support/v2/internal/case_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { @@ -82,4 +85,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_INTERNAL_CASE_LOGGING_DECORATOR_H diff --git a/google/cloud/support/v2/internal/case_metadata_decorator.cc b/google/cloud/support/v2/internal/case_metadata_decorator.cc index a268251575c02..9d7b0a5a2ce3a 100644 --- a/google/cloud/support/v2/internal/case_metadata_decorator.cc +++ b/google/cloud/support/v2/internal/case_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/support/v2/case_service.proto #include "google/cloud/support/v2/internal/case_metadata_decorator.h" +#include "google/cloud/support/v2/case_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { @@ -129,3 +133,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace support_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/support/v2/internal/case_metadata_decorator.h b/google/cloud/support/v2/internal/case_metadata_decorator.h index b8477373a4292..08ba6117143d3 100644 --- a/google/cloud/support/v2/internal/case_metadata_decorator.h +++ b/google/cloud/support/v2/internal/case_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { @@ -87,4 +90,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_INTERNAL_CASE_METADATA_DECORATOR_H diff --git a/google/cloud/support/v2/internal/case_option_defaults.cc b/google/cloud/support/v2/internal/case_option_defaults.cc index 8149fb4c2b468..1d1091c84d96f 100644 --- a/google/cloud/support/v2/internal/case_option_defaults.cc +++ b/google/cloud/support/v2/internal/case_option_defaults.cc @@ -40,7 +40,7 @@ Options CaseServiceDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - support_v2::CaseServiceLimitedTimeRetryPolicy(std::chrono::minutes(30)) + support_v2::CaseServiceLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/support/v2/internal/case_stub.cc b/google/cloud/support/v2/internal/case_stub.cc index e7745b6c8d65b..2b8b878522404 100644 --- a/google/cloud/support/v2/internal/case_stub.cc +++ b/google/cloud/support/v2/internal/case_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/support/v2/case_service.proto #include "google/cloud/support/v2/internal/case_stub.h" +#include "google/cloud/support/v2/case_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { @@ -127,3 +130,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace support_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/support/v2/internal/case_stub.h b/google/cloud/support/v2/internal/case_stub.h index 06e234e7c3acf..100959b0a0ce2 100644 --- a/google/cloud/support/v2/internal/case_stub.h +++ b/google/cloud/support/v2/internal/case_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_INTERNAL_CASE_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_INTERNAL_CASE_STUB_H +#include "google/cloud/support/v2/case_service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { @@ -122,4 +125,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_INTERNAL_CASE_STUB_H diff --git a/google/cloud/support/v2/internal/case_stub_factory.cc b/google/cloud/support/v2/internal/case_stub_factory.cc index e76395456dab8..7295d8d473456 100644 --- a/google/cloud/support/v2/internal/case_stub_factory.cc +++ b/google/cloud/support/v2/internal/case_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/support/v2/case_service.proto #include "google/cloud/support/v2/internal/case_stub_factory.h" +#include "google/cloud/support/v2/case_service.grpc.pb.h" #include "google/cloud/support/v2/internal/case_auth_decorator.h" #include "google/cloud/support/v2/internal/case_logging_decorator.h" #include "google/cloud/support/v2/internal/case_metadata_decorator.h" @@ -28,10 +29,12 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { @@ -68,3 +71,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace support_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/support/v2/internal/case_stub_factory.h b/google/cloud/support/v2/internal/case_stub_factory.h index d92807974684c..4809348a604ff 100644 --- a/google/cloud/support/v2/internal/case_stub_factory.h +++ b/google/cloud/support/v2/internal/case_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_INTERNAL_CASE_STUB_FACTORY_H diff --git a/google/cloud/support/v2/internal/case_tracing_connection.cc b/google/cloud/support/v2/internal/case_tracing_connection.cc index 3ed90fe3b1948..f0b12682c5834 100644 --- a/google/cloud/support/v2/internal/case_tracing_connection.cc +++ b/google/cloud/support/v2/internal/case_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace support_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CaseServiceTracingConnection::CaseServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -111,16 +109,12 @@ CaseServiceTracingConnection::SearchCaseClassifications( std::move(sr)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCaseServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/support/v2/internal/case_tracing_connection.h b/google/cloud/support/v2/internal/case_tracing_connection.h index c641c5376a092..37f7056bfee2e 100644 --- a/google/cloud/support/v2/internal/case_tracing_connection.h +++ b/google/cloud/support/v2/internal/case_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace support_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CaseServiceTracingConnection : public support_v2::CaseServiceConnection { public: ~CaseServiceTracingConnection() override = default; @@ -69,8 +67,6 @@ class CaseServiceTracingConnection : public support_v2::CaseServiceConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/support/v2/internal/case_tracing_stub.cc b/google/cloud/support/v2/internal/case_tracing_stub.cc index 5663cc757eeea..2bdada7eb3a64 100644 --- a/google/cloud/support/v2/internal/case_tracing_stub.cc +++ b/google/cloud/support/v2/internal/case_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CaseServiceTracingStub::CaseServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -125,18 +126,14 @@ CaseServiceTracingStub::SearchCaseClassifications( child_->SearchCaseClassifications(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCaseServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace support_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/support/v2/internal/case_tracing_stub.h b/google/cloud/support/v2/internal/case_tracing_stub.h index 53099ff0c259b..eb0f3a1266ebb 100644 --- a/google/cloud/support/v2/internal/case_tracing_stub.h +++ b/google/cloud/support/v2/internal/case_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CaseServiceTracingStub : public CaseServiceStub { public: ~CaseServiceTracingStub() override = default; @@ -78,8 +79,6 @@ class CaseServiceTracingStub : public CaseServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -94,4 +93,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_INTERNAL_CASE_TRACING_STUB_H diff --git a/google/cloud/support/v2/internal/comment_auth_decorator.cc b/google/cloud/support/v2/internal/comment_auth_decorator.cc index 8ae5509ec8cb2..fbbd5c5bb9fd4 100644 --- a/google/cloud/support/v2/internal/comment_auth_decorator.cc +++ b/google/cloud/support/v2/internal/comment_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/support/v2/comment_service.proto #include "google/cloud/support/v2/internal/comment_auth_decorator.h" -#include +#include "google/cloud/support/v2/comment_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { @@ -52,3 +55,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace support_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/support/v2/internal/comment_auth_decorator.h b/google/cloud/support/v2/internal/comment_auth_decorator.h index 0b3a098bd6872..1d3df0977f5b5 100644 --- a/google/cloud/support/v2/internal/comment_auth_decorator.h +++ b/google/cloud/support/v2/internal/comment_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { @@ -56,4 +59,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_INTERNAL_COMMENT_AUTH_DECORATOR_H diff --git a/google/cloud/support/v2/internal/comment_logging_decorator.cc b/google/cloud/support/v2/internal/comment_logging_decorator.cc index 57b7ac066ba6e..8332f0e07c32d 100644 --- a/google/cloud/support/v2/internal/comment_logging_decorator.cc +++ b/google/cloud/support/v2/internal/comment_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/support/v2/comment_service.proto #include "google/cloud/support/v2/internal/comment_logging_decorator.h" +#include "google/cloud/support/v2/comment_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { @@ -63,3 +66,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace support_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/support/v2/internal/comment_logging_decorator.h b/google/cloud/support/v2/internal/comment_logging_decorator.h index e065123b084a1..64f583a169822 100644 --- a/google/cloud/support/v2/internal/comment_logging_decorator.h +++ b/google/cloud/support/v2/internal/comment_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { @@ -56,4 +59,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_INTERNAL_COMMENT_LOGGING_DECORATOR_H diff --git a/google/cloud/support/v2/internal/comment_metadata_decorator.cc b/google/cloud/support/v2/internal/comment_metadata_decorator.cc index 9cee31eb86362..8bbdf7875a161 100644 --- a/google/cloud/support/v2/internal/comment_metadata_decorator.cc +++ b/google/cloud/support/v2/internal/comment_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/support/v2/comment_service.proto #include "google/cloud/support/v2/internal/comment_metadata_decorator.h" +#include "google/cloud/support/v2/comment_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { @@ -79,3 +83,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace support_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/support/v2/internal/comment_metadata_decorator.h b/google/cloud/support/v2/internal/comment_metadata_decorator.h index 185ca3b6dcca6..b5fa7871ecbfc 100644 --- a/google/cloud/support/v2/internal/comment_metadata_decorator.h +++ b/google/cloud/support/v2/internal/comment_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { @@ -61,4 +64,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_INTERNAL_COMMENT_METADATA_DECORATOR_H diff --git a/google/cloud/support/v2/internal/comment_option_defaults.cc b/google/cloud/support/v2/internal/comment_option_defaults.cc index 6b32ff216a876..a730c71e7a654 100644 --- a/google/cloud/support/v2/internal/comment_option_defaults.cc +++ b/google/cloud/support/v2/internal/comment_option_defaults.cc @@ -42,7 +42,7 @@ Options CommentServiceDefaultOptions(Options options) { if (!options.has()) { options.set( support_v2::CommentServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/support/v2/internal/comment_stub.cc b/google/cloud/support/v2/internal/comment_stub.cc index c77ef6c4b7a14..f2ce34d6c77b9 100644 --- a/google/cloud/support/v2/internal/comment_stub.cc +++ b/google/cloud/support/v2/internal/comment_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/support/v2/comment_service.proto #include "google/cloud/support/v2/internal/comment_stub.h" +#include "google/cloud/support/v2/comment_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { @@ -58,3 +61,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace support_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/support/v2/internal/comment_stub.h b/google/cloud/support/v2/internal/comment_stub.h index 74944963c8c20..c951ab8334670 100644 --- a/google/cloud/support/v2/internal/comment_stub.h +++ b/google/cloud/support/v2/internal/comment_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_INTERNAL_COMMENT_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_INTERNAL_COMMENT_STUB_H +#include "google/cloud/support/v2/comment_service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { @@ -70,4 +73,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_INTERNAL_COMMENT_STUB_H diff --git a/google/cloud/support/v2/internal/comment_stub_factory.cc b/google/cloud/support/v2/internal/comment_stub_factory.cc index 75e3245d8e938..25b216a0f5bbc 100644 --- a/google/cloud/support/v2/internal/comment_stub_factory.cc +++ b/google/cloud/support/v2/internal/comment_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/support/v2/comment_service.proto #include "google/cloud/support/v2/internal/comment_stub_factory.h" +#include "google/cloud/support/v2/comment_service.grpc.pb.h" #include "google/cloud/support/v2/internal/comment_auth_decorator.h" #include "google/cloud/support/v2/internal/comment_logging_decorator.h" #include "google/cloud/support/v2/internal/comment_metadata_decorator.h" @@ -28,10 +29,12 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { @@ -69,3 +72,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace support_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/support/v2/internal/comment_stub_factory.h b/google/cloud/support/v2/internal/comment_stub_factory.h index d299a8eb9e90b..7a48de24232d8 100644 --- a/google/cloud/support/v2/internal/comment_stub_factory.h +++ b/google/cloud/support/v2/internal/comment_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_INTERNAL_COMMENT_STUB_FACTORY_H diff --git a/google/cloud/support/v2/internal/comment_tracing_connection.cc b/google/cloud/support/v2/internal/comment_tracing_connection.cc index 4c84fc8734fae..573b55c56fe4e 100644 --- a/google/cloud/support/v2/internal/comment_tracing_connection.cc +++ b/google/cloud/support/v2/internal/comment_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace support_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CommentServiceTracingConnection::CommentServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -53,16 +51,12 @@ CommentServiceTracingConnection::CreateComment( return internal::EndSpan(*span, child_->CreateComment(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCommentServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/support/v2/internal/comment_tracing_connection.h b/google/cloud/support/v2/internal/comment_tracing_connection.h index ad13c56aee711..90ac323493bc6 100644 --- a/google/cloud/support/v2/internal/comment_tracing_connection.h +++ b/google/cloud/support/v2/internal/comment_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace support_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CommentServiceTracingConnection : public support_v2::CommentServiceConnection { public: @@ -50,8 +48,6 @@ class CommentServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/support/v2/internal/comment_tracing_stub.cc b/google/cloud/support/v2/internal/comment_tracing_stub.cc index 21200130f5bf9..d48b8da12ff70 100644 --- a/google/cloud/support/v2/internal/comment_tracing_stub.cc +++ b/google/cloud/support/v2/internal/comment_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CommentServiceTracingStub::CommentServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -56,18 +57,14 @@ CommentServiceTracingStub::CreateComment( child_->CreateComment(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCommentServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace support_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/support/v2/internal/comment_tracing_stub.h b/google/cloud/support/v2/internal/comment_tracing_stub.h index 7aa0806799502..48dcab8a44db9 100644 --- a/google/cloud/support/v2/internal/comment_tracing_stub.h +++ b/google/cloud/support/v2/internal/comment_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace support_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CommentServiceTracingStub : public CommentServiceStub { public: ~CommentServiceTracingStub() override = default; @@ -52,8 +53,6 @@ class CommentServiceTracingStub : public CommentServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -68,4 +67,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SUPPORT_V2_INTERNAL_COMMENT_TRACING_STUB_H diff --git a/google/cloud/talent/BUILD.bazel b/google/cloud/talent/BUILD.bazel index 926814bd78583..a0db9a6177e7f 100644 --- a/google/cloud/talent/BUILD.bazel +++ b/google/cloud/talent/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v4/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/talent/v4:talent_cc_grpc", + "@googleapis//google/cloud/talent/v4:talent_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/talent/CMakeLists.txt b/google/cloud/talent/CMakeLists.txt index 5fb5275296a46..a00059d0de5d7 100644 --- a/google/cloud/talent/CMakeLists.txt +++ b/google/cloud/talent/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(talent "Cloud Talent Solution API" - SERVICE_DIRS "__EMPTY__" "v4/") + SERVICE_DIRS "v4/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(talent_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/talent/company_client.h b/google/cloud/talent/company_client.h deleted file mode 100644 index 47e6193bb2bcd..0000000000000 --- a/google/cloud/talent/company_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/talent/v4/company_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_COMPANY_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_COMPANY_CLIENT_H - -#include "google/cloud/talent/company_connection.h" -#include "google/cloud/talent/v4/company_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in talent_v4 instead of the aliases defined in -/// this namespace. -namespace talent { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use talent_v4::CompanyServiceClient directly. -using ::google::cloud::talent_v4::CompanyServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace talent -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_COMPANY_CLIENT_H diff --git a/google/cloud/talent/company_connection.h b/google/cloud/talent/company_connection.h deleted file mode 100644 index 016f566677330..0000000000000 --- a/google/cloud/talent/company_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/talent/v4/company_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_COMPANY_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_COMPANY_CONNECTION_H - -#include "google/cloud/talent/company_connection_idempotency_policy.h" -#include "google/cloud/talent/v4/company_connection.h" - -namespace google { -namespace cloud { -namespace talent { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use talent_v4::MakeCompanyServiceConnection directly. -using ::google::cloud::talent_v4::MakeCompanyServiceConnection; - -/// @deprecated Use talent_v4::CompanyServiceConnection directly. -using ::google::cloud::talent_v4::CompanyServiceConnection; - -/// @deprecated Use talent_v4::CompanyServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::talent_v4::CompanyServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use talent_v4::CompanyServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::talent_v4::CompanyServiceLimitedTimeRetryPolicy; - -/// @deprecated Use talent_v4::CompanyServiceRetryPolicy directly. -using ::google::cloud::talent_v4::CompanyServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace talent -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_COMPANY_CONNECTION_H diff --git a/google/cloud/talent/company_connection_idempotency_policy.h b/google/cloud/talent/company_connection_idempotency_policy.h deleted file mode 100644 index 25daf925d6465..0000000000000 --- a/google/cloud/talent/company_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/talent/v4/company_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_COMPANY_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_COMPANY_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/talent/v4/company_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace talent { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// talent_v4::MakeDefaultCompanyServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::talent_v4:: - MakeDefaultCompanyServiceConnectionIdempotencyPolicy; - -/// @deprecated Use talent_v4::CompanyServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::talent_v4::CompanyServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace talent -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_COMPANY_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/talent/company_options.h b/google/cloud/talent/company_options.h deleted file mode 100644 index a815083579757..0000000000000 --- a/google/cloud/talent/company_options.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/talent/v4/company_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_COMPANY_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_COMPANY_OPTIONS_H - -#include "google/cloud/talent/company_connection.h" -#include "google/cloud/talent/company_connection_idempotency_policy.h" -#include "google/cloud/talent/v4/company_options.h" - -namespace google { -namespace cloud { -namespace talent { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use talent_v4::CompanyServiceBackoffPolicyOption directly. -using ::google::cloud::talent_v4::CompanyServiceBackoffPolicyOption; - -/// @deprecated Use talent_v4::CompanyServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::talent_v4:: - CompanyServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use talent_v4::CompanyServicePolicyOptionList directly. -using ::google::cloud::talent_v4::CompanyServicePolicyOptionList; - -/// @deprecated Use talent_v4::CompanyServiceRetryPolicyOption directly. -using ::google::cloud::talent_v4::CompanyServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace talent -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_COMPANY_OPTIONS_H diff --git a/google/cloud/talent/completion_client.h b/google/cloud/talent/completion_client.h deleted file mode 100644 index 1b26ca817af09..0000000000000 --- a/google/cloud/talent/completion_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/talent/v4/completion_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_COMPLETION_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_COMPLETION_CLIENT_H - -#include "google/cloud/talent/completion_connection.h" -#include "google/cloud/talent/v4/completion_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in talent_v4 instead of the aliases defined in -/// this namespace. -namespace talent { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use talent_v4::CompletionClient directly. -using ::google::cloud::talent_v4::CompletionClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace talent -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_COMPLETION_CLIENT_H diff --git a/google/cloud/talent/completion_connection.h b/google/cloud/talent/completion_connection.h deleted file mode 100644 index 4dc55c0501ab8..0000000000000 --- a/google/cloud/talent/completion_connection.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/talent/v4/completion_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_COMPLETION_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_COMPLETION_CONNECTION_H - -#include "google/cloud/talent/completion_connection_idempotency_policy.h" -#include "google/cloud/talent/v4/completion_connection.h" - -namespace google { -namespace cloud { -namespace talent { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use talent_v4::MakeCompletionConnection directly. -using ::google::cloud::talent_v4::MakeCompletionConnection; - -/// @deprecated Use talent_v4::CompletionConnection directly. -using ::google::cloud::talent_v4::CompletionConnection; - -/// @deprecated Use talent_v4::CompletionLimitedErrorCountRetryPolicy directly. -using ::google::cloud::talent_v4::CompletionLimitedErrorCountRetryPolicy; - -/// @deprecated Use talent_v4::CompletionLimitedTimeRetryPolicy directly. -using ::google::cloud::talent_v4::CompletionLimitedTimeRetryPolicy; - -/// @deprecated Use talent_v4::CompletionRetryPolicy directly. -using ::google::cloud::talent_v4::CompletionRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace talent -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_COMPLETION_CONNECTION_H diff --git a/google/cloud/talent/completion_connection_idempotency_policy.h b/google/cloud/talent/completion_connection_idempotency_policy.h deleted file mode 100644 index 1a0957cbdb53c..0000000000000 --- a/google/cloud/talent/completion_connection_idempotency_policy.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/talent/v4/completion_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_COMPLETION_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_COMPLETION_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/talent/v4/completion_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace talent { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use talent_v4::MakeDefaultCompletionConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::talent_v4:: - MakeDefaultCompletionConnectionIdempotencyPolicy; - -/// @deprecated Use talent_v4::CompletionConnectionIdempotencyPolicy directly. -using ::google::cloud::talent_v4::CompletionConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace talent -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_COMPLETION_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/talent/completion_options.h b/google/cloud/talent/completion_options.h deleted file mode 100644 index c2f54162cc38b..0000000000000 --- a/google/cloud/talent/completion_options.h +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/talent/v4/completion_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_COMPLETION_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_COMPLETION_OPTIONS_H - -#include "google/cloud/talent/completion_connection.h" -#include "google/cloud/talent/completion_connection_idempotency_policy.h" -#include "google/cloud/talent/v4/completion_options.h" - -namespace google { -namespace cloud { -namespace talent { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use talent_v4::CompletionBackoffPolicyOption directly. -using ::google::cloud::talent_v4::CompletionBackoffPolicyOption; - -/// @deprecated Use talent_v4::CompletionConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::talent_v4::CompletionConnectionIdempotencyPolicyOption; - -/// @deprecated Use talent_v4::CompletionPolicyOptionList directly. -using ::google::cloud::talent_v4::CompletionPolicyOptionList; - -/// @deprecated Use talent_v4::CompletionRetryPolicyOption directly. -using ::google::cloud::talent_v4::CompletionRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace talent -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_COMPLETION_OPTIONS_H diff --git a/google/cloud/talent/event_client.h b/google/cloud/talent/event_client.h deleted file mode 100644 index 5967011f513bf..0000000000000 --- a/google/cloud/talent/event_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/talent/v4/event_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_EVENT_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_EVENT_CLIENT_H - -#include "google/cloud/talent/event_connection.h" -#include "google/cloud/talent/v4/event_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in talent_v4 instead of the aliases defined in -/// this namespace. -namespace talent { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use talent_v4::EventServiceClient directly. -using ::google::cloud::talent_v4::EventServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace talent -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_EVENT_CLIENT_H diff --git a/google/cloud/talent/event_connection.h b/google/cloud/talent/event_connection.h deleted file mode 100644 index 0d9b8958276b8..0000000000000 --- a/google/cloud/talent/event_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/talent/v4/event_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_EVENT_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_EVENT_CONNECTION_H - -#include "google/cloud/talent/event_connection_idempotency_policy.h" -#include "google/cloud/talent/v4/event_connection.h" - -namespace google { -namespace cloud { -namespace talent { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use talent_v4::MakeEventServiceConnection directly. -using ::google::cloud::talent_v4::MakeEventServiceConnection; - -/// @deprecated Use talent_v4::EventServiceConnection directly. -using ::google::cloud::talent_v4::EventServiceConnection; - -/// @deprecated Use talent_v4::EventServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::talent_v4::EventServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use talent_v4::EventServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::talent_v4::EventServiceLimitedTimeRetryPolicy; - -/// @deprecated Use talent_v4::EventServiceRetryPolicy directly. -using ::google::cloud::talent_v4::EventServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace talent -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_EVENT_CONNECTION_H diff --git a/google/cloud/talent/event_connection_idempotency_policy.h b/google/cloud/talent/event_connection_idempotency_policy.h deleted file mode 100644 index f7cd0030453a3..0000000000000 --- a/google/cloud/talent/event_connection_idempotency_policy.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/talent/v4/event_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_EVENT_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_EVENT_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/talent/v4/event_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace talent { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// talent_v4::MakeDefaultEventServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::talent_v4:: - MakeDefaultEventServiceConnectionIdempotencyPolicy; - -/// @deprecated Use talent_v4::EventServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::talent_v4::EventServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace talent -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_EVENT_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/talent/event_options.h b/google/cloud/talent/event_options.h deleted file mode 100644 index 59c465f6e5e1f..0000000000000 --- a/google/cloud/talent/event_options.h +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/talent/v4/event_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_EVENT_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_EVENT_OPTIONS_H - -#include "google/cloud/talent/event_connection.h" -#include "google/cloud/talent/event_connection_idempotency_policy.h" -#include "google/cloud/talent/v4/event_options.h" - -namespace google { -namespace cloud { -namespace talent { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use talent_v4::EventServiceBackoffPolicyOption directly. -using ::google::cloud::talent_v4::EventServiceBackoffPolicyOption; - -/// @deprecated Use talent_v4::EventServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::talent_v4::EventServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use talent_v4::EventServicePolicyOptionList directly. -using ::google::cloud::talent_v4::EventServicePolicyOptionList; - -/// @deprecated Use talent_v4::EventServiceRetryPolicyOption directly. -using ::google::cloud::talent_v4::EventServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace talent -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_EVENT_OPTIONS_H diff --git a/google/cloud/talent/job_client.h b/google/cloud/talent/job_client.h deleted file mode 100644 index 5fe7e3bcb3b4b..0000000000000 --- a/google/cloud/talent/job_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/talent/v4/job_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_JOB_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_JOB_CLIENT_H - -#include "google/cloud/talent/job_connection.h" -#include "google/cloud/talent/v4/job_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in talent_v4 instead of the aliases defined in -/// this namespace. -namespace talent { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use talent_v4::JobServiceClient directly. -using ::google::cloud::talent_v4::JobServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace talent -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_JOB_CLIENT_H diff --git a/google/cloud/talent/job_connection.h b/google/cloud/talent/job_connection.h deleted file mode 100644 index 2adf8e45b8346..0000000000000 --- a/google/cloud/talent/job_connection.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/talent/v4/job_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_JOB_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_JOB_CONNECTION_H - -#include "google/cloud/talent/job_connection_idempotency_policy.h" -#include "google/cloud/talent/v4/job_connection.h" - -namespace google { -namespace cloud { -namespace talent { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use talent_v4::MakeJobServiceConnection directly. -using ::google::cloud::talent_v4::MakeJobServiceConnection; - -/// @deprecated Use talent_v4::JobServiceConnection directly. -using ::google::cloud::talent_v4::JobServiceConnection; - -/// @deprecated Use talent_v4::JobServiceLimitedErrorCountRetryPolicy directly. -using ::google::cloud::talent_v4::JobServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use talent_v4::JobServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::talent_v4::JobServiceLimitedTimeRetryPolicy; - -/// @deprecated Use talent_v4::JobServiceRetryPolicy directly. -using ::google::cloud::talent_v4::JobServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace talent -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_JOB_CONNECTION_H diff --git a/google/cloud/talent/job_connection_idempotency_policy.h b/google/cloud/talent/job_connection_idempotency_policy.h deleted file mode 100644 index a25f4138df361..0000000000000 --- a/google/cloud/talent/job_connection_idempotency_policy.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/talent/v4/job_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_JOB_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_JOB_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/talent/v4/job_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace talent { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use talent_v4::MakeDefaultJobServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::talent_v4:: - MakeDefaultJobServiceConnectionIdempotencyPolicy; - -/// @deprecated Use talent_v4::JobServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::talent_v4::JobServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace talent -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_JOB_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/talent/job_options.h b/google/cloud/talent/job_options.h deleted file mode 100644 index 1dcd0b3f4c381..0000000000000 --- a/google/cloud/talent/job_options.h +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/talent/v4/job_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_JOB_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_JOB_OPTIONS_H - -#include "google/cloud/talent/job_connection.h" -#include "google/cloud/talent/job_connection_idempotency_policy.h" -#include "google/cloud/talent/v4/job_options.h" - -namespace google { -namespace cloud { -namespace talent { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use talent_v4::JobServicePollingPolicyOption directly. -using ::google::cloud::talent_v4::JobServicePollingPolicyOption; - -/// @deprecated Use talent_v4::JobServiceBackoffPolicyOption directly. -using ::google::cloud::talent_v4::JobServiceBackoffPolicyOption; - -/// @deprecated Use talent_v4::JobServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::talent_v4::JobServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use talent_v4::JobServicePolicyOptionList directly. -using ::google::cloud::talent_v4::JobServicePolicyOptionList; - -/// @deprecated Use talent_v4::JobServiceRetryPolicyOption directly. -using ::google::cloud::talent_v4::JobServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace talent -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_JOB_OPTIONS_H diff --git a/google/cloud/talent/mocks/mock_company_connection.h b/google/cloud/talent/mocks/mock_company_connection.h deleted file mode 100644 index e7e9c4f31f442..0000000000000 --- a/google/cloud/talent/mocks/mock_company_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/talent/v4/company_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_MOCKS_MOCK_COMPANY_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_MOCKS_MOCK_COMPANY_CONNECTION_H - -#include "google/cloud/talent/company_connection.h" -#include "google/cloud/talent/v4/mocks/mock_company_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in talent_v4_mocks instead of the aliases -/// defined in this namespace. -namespace talent_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use talent_v4_mocks::MockCompanyServiceConnection directly. -using ::google::cloud::talent_v4_mocks::MockCompanyServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace talent_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_MOCKS_MOCK_COMPANY_CONNECTION_H diff --git a/google/cloud/talent/mocks/mock_completion_connection.h b/google/cloud/talent/mocks/mock_completion_connection.h deleted file mode 100644 index c59f8b782cf54..0000000000000 --- a/google/cloud/talent/mocks/mock_completion_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/talent/v4/completion_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_MOCKS_MOCK_COMPLETION_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_MOCKS_MOCK_COMPLETION_CONNECTION_H - -#include "google/cloud/talent/completion_connection.h" -#include "google/cloud/talent/v4/mocks/mock_completion_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in talent_v4_mocks instead of the aliases -/// defined in this namespace. -namespace talent_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use talent_v4_mocks::MockCompletionConnection directly. -using ::google::cloud::talent_v4_mocks::MockCompletionConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace talent_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_MOCKS_MOCK_COMPLETION_CONNECTION_H diff --git a/google/cloud/talent/mocks/mock_event_connection.h b/google/cloud/talent/mocks/mock_event_connection.h deleted file mode 100644 index f0a8402145936..0000000000000 --- a/google/cloud/talent/mocks/mock_event_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/talent/v4/event_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_MOCKS_MOCK_EVENT_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_MOCKS_MOCK_EVENT_CONNECTION_H - -#include "google/cloud/talent/event_connection.h" -#include "google/cloud/talent/v4/mocks/mock_event_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in talent_v4_mocks instead of the aliases -/// defined in this namespace. -namespace talent_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use talent_v4_mocks::MockEventServiceConnection directly. -using ::google::cloud::talent_v4_mocks::MockEventServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace talent_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_MOCKS_MOCK_EVENT_CONNECTION_H diff --git a/google/cloud/talent/mocks/mock_job_connection.h b/google/cloud/talent/mocks/mock_job_connection.h deleted file mode 100644 index 59d973836ab17..0000000000000 --- a/google/cloud/talent/mocks/mock_job_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/talent/v4/job_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_MOCKS_MOCK_JOB_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_MOCKS_MOCK_JOB_CONNECTION_H - -#include "google/cloud/talent/job_connection.h" -#include "google/cloud/talent/v4/mocks/mock_job_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in talent_v4_mocks instead of the aliases -/// defined in this namespace. -namespace talent_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use talent_v4_mocks::MockJobServiceConnection directly. -using ::google::cloud::talent_v4_mocks::MockJobServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace talent_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_MOCKS_MOCK_JOB_CONNECTION_H diff --git a/google/cloud/talent/mocks/mock_tenant_connection.h b/google/cloud/talent/mocks/mock_tenant_connection.h deleted file mode 100644 index 494bbaa99174d..0000000000000 --- a/google/cloud/talent/mocks/mock_tenant_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/talent/v4/tenant_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_MOCKS_MOCK_TENANT_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_MOCKS_MOCK_TENANT_CONNECTION_H - -#include "google/cloud/talent/tenant_connection.h" -#include "google/cloud/talent/v4/mocks/mock_tenant_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in talent_v4_mocks instead of the aliases -/// defined in this namespace. -namespace talent_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use talent_v4_mocks::MockTenantServiceConnection directly. -using ::google::cloud::talent_v4_mocks::MockTenantServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace talent_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_MOCKS_MOCK_TENANT_CONNECTION_H diff --git a/google/cloud/talent/quickstart/.bazelrc b/google/cloud/talent/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/talent/quickstart/.bazelrc +++ b/google/cloud/talent/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/talent/quickstart/CMakeLists.txt b/google/cloud/talent/quickstart/CMakeLists.txt index d26ed5c6b247c..d476189daaad2 100644 --- a/google/cloud/talent/quickstart/CMakeLists.txt +++ b/google/cloud/talent/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Talent Solution API C++ client library # from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-talent-quickstart CXX) find_package(google_cloud_cpp_talent REQUIRED) diff --git a/google/cloud/talent/tenant_client.h b/google/cloud/talent/tenant_client.h deleted file mode 100644 index 45855c5033fb4..0000000000000 --- a/google/cloud/talent/tenant_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/talent/v4/tenant_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_TENANT_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_TENANT_CLIENT_H - -#include "google/cloud/talent/tenant_connection.h" -#include "google/cloud/talent/v4/tenant_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in talent_v4 instead of the aliases defined in -/// this namespace. -namespace talent { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use talent_v4::TenantServiceClient directly. -using ::google::cloud::talent_v4::TenantServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace talent -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_TENANT_CLIENT_H diff --git a/google/cloud/talent/tenant_connection.h b/google/cloud/talent/tenant_connection.h deleted file mode 100644 index 0b4114a588f58..0000000000000 --- a/google/cloud/talent/tenant_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/talent/v4/tenant_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_TENANT_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_TENANT_CONNECTION_H - -#include "google/cloud/talent/tenant_connection_idempotency_policy.h" -#include "google/cloud/talent/v4/tenant_connection.h" - -namespace google { -namespace cloud { -namespace talent { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use talent_v4::MakeTenantServiceConnection directly. -using ::google::cloud::talent_v4::MakeTenantServiceConnection; - -/// @deprecated Use talent_v4::TenantServiceConnection directly. -using ::google::cloud::talent_v4::TenantServiceConnection; - -/// @deprecated Use talent_v4::TenantServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::talent_v4::TenantServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use talent_v4::TenantServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::talent_v4::TenantServiceLimitedTimeRetryPolicy; - -/// @deprecated Use talent_v4::TenantServiceRetryPolicy directly. -using ::google::cloud::talent_v4::TenantServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace talent -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_TENANT_CONNECTION_H diff --git a/google/cloud/talent/tenant_connection_idempotency_policy.h b/google/cloud/talent/tenant_connection_idempotency_policy.h deleted file mode 100644 index aa756c1177aa0..0000000000000 --- a/google/cloud/talent/tenant_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/talent/v4/tenant_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_TENANT_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_TENANT_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/talent/v4/tenant_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace talent { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// talent_v4::MakeDefaultTenantServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::talent_v4:: - MakeDefaultTenantServiceConnectionIdempotencyPolicy; - -/// @deprecated Use talent_v4::TenantServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::talent_v4::TenantServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace talent -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_TENANT_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/talent/tenant_options.h b/google/cloud/talent/tenant_options.h deleted file mode 100644 index 1bc3638f25cff..0000000000000 --- a/google/cloud/talent/tenant_options.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/talent/v4/tenant_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_TENANT_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_TENANT_OPTIONS_H - -#include "google/cloud/talent/tenant_connection.h" -#include "google/cloud/talent/tenant_connection_idempotency_policy.h" -#include "google/cloud/talent/v4/tenant_options.h" - -namespace google { -namespace cloud { -namespace talent { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use talent_v4::TenantServiceBackoffPolicyOption directly. -using ::google::cloud::talent_v4::TenantServiceBackoffPolicyOption; - -/// @deprecated Use talent_v4::TenantServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::talent_v4:: - TenantServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use talent_v4::TenantServicePolicyOptionList directly. -using ::google::cloud::talent_v4::TenantServicePolicyOptionList; - -/// @deprecated Use talent_v4::TenantServiceRetryPolicyOption directly. -using ::google::cloud::talent_v4::TenantServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace talent -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_TENANT_OPTIONS_H diff --git a/google/cloud/talent/v4/company_connection.h b/google/cloud/talent/v4/company_connection.h index 326e5a5b31bba..dcdd5f9637d6e 100644 --- a/google/cloud/talent/v4/company_connection.h +++ b/google/cloud/talent/v4/company_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_COMPANY_CONNECTION_H #include "google/cloud/talent/v4/company_connection_idempotency_policy.h" +#include "google/cloud/talent/v4/company_service.pb.h" #include "google/cloud/talent/v4/internal/company_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/talent/v4/company_connection_idempotency_policy.h b/google/cloud/talent/v4/company_connection_idempotency_policy.h index 3217d473b0618..3aea3bf5532dc 100644 --- a/google/cloud/talent/v4/company_connection_idempotency_policy.h +++ b/google/cloud/talent/v4/company_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_COMPANY_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_COMPANY_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/talent/v4/company_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/talent/v4/completion_connection.h b/google/cloud/talent/v4/completion_connection.h index 0bf758dbf936d..a3ed7eee34890 100644 --- a/google/cloud/talent/v4/completion_connection.h +++ b/google/cloud/talent/v4/completion_connection.h @@ -20,13 +20,13 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_COMPLETION_CONNECTION_H #include "google/cloud/talent/v4/completion_connection_idempotency_policy.h" +#include "google/cloud/talent/v4/completion_service.pb.h" #include "google/cloud/talent/v4/internal/completion_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/talent/v4/completion_connection_idempotency_policy.h b/google/cloud/talent/v4/completion_connection_idempotency_policy.h index e5b5e9ffe0054..fcd45741957e2 100644 --- a/google/cloud/talent/v4/completion_connection_idempotency_policy.h +++ b/google/cloud/talent/v4/completion_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_COMPLETION_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_COMPLETION_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/talent/v4/completion_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/talent/v4/event_connection.h b/google/cloud/talent/v4/event_connection.h index 934da4f37ca64..5ef06242f6fe0 100644 --- a/google/cloud/talent/v4/event_connection.h +++ b/google/cloud/talent/v4/event_connection.h @@ -20,13 +20,13 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_EVENT_CONNECTION_H #include "google/cloud/talent/v4/event_connection_idempotency_policy.h" +#include "google/cloud/talent/v4/event_service.pb.h" #include "google/cloud/talent/v4/internal/event_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/talent/v4/event_connection_idempotency_policy.h b/google/cloud/talent/v4/event_connection_idempotency_policy.h index 72e1210d03591..dd33fc78967a9 100644 --- a/google/cloud/talent/v4/event_connection_idempotency_policy.h +++ b/google/cloud/talent/v4/event_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_EVENT_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_EVENT_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/talent/v4/event_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/talent/v4/internal/company_auth_decorator.cc b/google/cloud/talent/v4/internal/company_auth_decorator.cc index d69fb0b517c63..060a1595e730a 100644 --- a/google/cloud/talent/v4/internal/company_auth_decorator.cc +++ b/google/cloud/talent/v4/internal/company_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/talent/v4/company_service.proto #include "google/cloud/talent/v4/internal/company_auth_decorator.h" -#include +#include "google/cloud/talent/v4/company_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -84,3 +87,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace talent_v4_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/talent/v4/internal/company_auth_decorator.h b/google/cloud/talent/v4/internal/company_auth_decorator.h index 891093c788a02..bf47753961958 100644 --- a/google/cloud/talent/v4/internal/company_auth_decorator.h +++ b/google/cloud/talent/v4/internal/company_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -72,4 +75,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_COMPANY_AUTH_DECORATOR_H diff --git a/google/cloud/talent/v4/internal/company_logging_decorator.cc b/google/cloud/talent/v4/internal/company_logging_decorator.cc index ad8e0c83a1854..6dac36fa203af 100644 --- a/google/cloud/talent/v4/internal/company_logging_decorator.cc +++ b/google/cloud/talent/v4/internal/company_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/talent/v4/company_service.proto #include "google/cloud/talent/v4/internal/company_logging_decorator.h" +#include "google/cloud/talent/v4/company_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -108,3 +111,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace talent_v4_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/talent/v4/internal/company_logging_decorator.h b/google/cloud/talent/v4/internal/company_logging_decorator.h index 469c6e537e4db..2ce20a0889524 100644 --- a/google/cloud/talent/v4/internal/company_logging_decorator.h +++ b/google/cloud/talent/v4/internal/company_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -72,4 +75,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_COMPANY_LOGGING_DECORATOR_H diff --git a/google/cloud/talent/v4/internal/company_metadata_decorator.cc b/google/cloud/talent/v4/internal/company_metadata_decorator.cc index 16e73d3e9e241..2ced833fce5d4 100644 --- a/google/cloud/talent/v4/internal/company_metadata_decorator.cc +++ b/google/cloud/talent/v4/internal/company_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/talent/v4/company_service.proto #include "google/cloud/talent/v4/internal/company_metadata_decorator.h" +#include "google/cloud/talent/v4/company_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -113,3 +117,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace talent_v4_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/talent/v4/internal/company_metadata_decorator.h b/google/cloud/talent/v4/internal/company_metadata_decorator.h index 64f9fd32eefb5..fc6f457e66a49 100644 --- a/google/cloud/talent/v4/internal/company_metadata_decorator.h +++ b/google/cloud/talent/v4/internal/company_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -77,4 +80,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_COMPANY_METADATA_DECORATOR_H diff --git a/google/cloud/talent/v4/internal/company_option_defaults.cc b/google/cloud/talent/v4/internal/company_option_defaults.cc index c4be6d2d44ea1..6d06ebb5781b4 100644 --- a/google/cloud/talent/v4/internal/company_option_defaults.cc +++ b/google/cloud/talent/v4/internal/company_option_defaults.cc @@ -41,7 +41,7 @@ Options CompanyServiceDefaultOptions(Options options) { if (!options.has()) { options.set( talent_v4::CompanyServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/talent/v4/internal/company_stub.cc b/google/cloud/talent/v4/internal/company_stub.cc index 6554d558b48ea..7382d9ff790d9 100644 --- a/google/cloud/talent/v4/internal/company_stub.cc +++ b/google/cloud/talent/v4/internal/company_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/talent/v4/company_service.proto #include "google/cloud/talent/v4/internal/company_stub.h" +#include "google/cloud/talent/v4/company_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -105,3 +108,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace talent_v4_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/talent/v4/internal/company_stub.h b/google/cloud/talent/v4/internal/company_stub.h index 4b8f909978a87..abb5cac66fa45 100644 --- a/google/cloud/talent/v4/internal/company_stub.h +++ b/google/cloud/talent/v4/internal/company_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_COMPANY_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_COMPANY_STUB_H +#include "google/cloud/talent/v4/company_service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -108,4 +111,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_COMPANY_STUB_H diff --git a/google/cloud/talent/v4/internal/company_stub_factory.cc b/google/cloud/talent/v4/internal/company_stub_factory.cc index e68f2c8d0d6dd..c69ff3106fcd5 100644 --- a/google/cloud/talent/v4/internal/company_stub_factory.cc +++ b/google/cloud/talent/v4/internal/company_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/talent/v4/company_service.proto #include "google/cloud/talent/v4/internal/company_stub_factory.h" +#include "google/cloud/talent/v4/company_service.grpc.pb.h" #include "google/cloud/talent/v4/internal/company_auth_decorator.h" #include "google/cloud/talent/v4/internal/company_logging_decorator.h" #include "google/cloud/talent/v4/internal/company_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace talent_v4_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/talent/v4/internal/company_stub_factory.h b/google/cloud/talent/v4/internal/company_stub_factory.h index 4fb682b06d682..15da7b9bf61ec 100644 --- a/google/cloud/talent/v4/internal/company_stub_factory.h +++ b/google/cloud/talent/v4/internal/company_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_COMPANY_STUB_FACTORY_H diff --git a/google/cloud/talent/v4/internal/company_tracing_connection.cc b/google/cloud/talent/v4/internal/company_tracing_connection.cc index 7e1906e83ec85..75a5ce7cb5510 100644 --- a/google/cloud/talent/v4/internal/company_tracing_connection.cc +++ b/google/cloud/talent/v4/internal/company_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace talent_v4_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CompanyServiceTracingConnection::CompanyServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -88,16 +86,12 @@ CompanyServiceTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCompanyServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/talent/v4/internal/company_tracing_connection.h b/google/cloud/talent/v4/internal/company_tracing_connection.h index 63f3776f02ae3..de6c1f39a8aac 100644 --- a/google/cloud/talent/v4/internal/company_tracing_connection.h +++ b/google/cloud/talent/v4/internal/company_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace talent_v4_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CompanyServiceTracingConnection : public talent_v4::CompanyServiceConnection { public: @@ -62,8 +60,6 @@ class CompanyServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/talent/v4/internal/company_tracing_stub.cc b/google/cloud/talent/v4/internal/company_tracing_stub.cc index c45671a015d1f..5f23f96488a05 100644 --- a/google/cloud/talent/v4/internal/company_tracing_stub.cc +++ b/google/cloud/talent/v4/internal/company_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CompanyServiceTracingStub::CompanyServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -103,18 +104,14 @@ CompanyServiceTracingStub::GetOperation( child_->GetOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCompanyServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace talent_v4_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/talent/v4/internal/company_tracing_stub.h b/google/cloud/talent/v4/internal/company_tracing_stub.h index 4c272fcea5e7e..b2ffc758ce61e 100644 --- a/google/cloud/talent/v4/internal/company_tracing_stub.h +++ b/google/cloud/talent/v4/internal/company_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CompanyServiceTracingStub : public CompanyServiceStub { public: ~CompanyServiceTracingStub() override = default; @@ -68,8 +69,6 @@ class CompanyServiceTracingStub : public CompanyServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -84,4 +83,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_COMPANY_TRACING_STUB_H diff --git a/google/cloud/talent/v4/internal/completion_auth_decorator.cc b/google/cloud/talent/v4/internal/completion_auth_decorator.cc index b53ab9651272a..fd9d37e15dc5d 100644 --- a/google/cloud/talent/v4/internal/completion_auth_decorator.cc +++ b/google/cloud/talent/v4/internal/completion_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/talent/v4/completion_service.proto #include "google/cloud/talent/v4/internal/completion_auth_decorator.h" -#include +#include "google/cloud/talent/v4/completion_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -52,3 +55,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace talent_v4_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/talent/v4/internal/completion_auth_decorator.h b/google/cloud/talent/v4/internal/completion_auth_decorator.h index 49c4042e20737..1ab17667c2769 100644 --- a/google/cloud/talent/v4/internal/completion_auth_decorator.h +++ b/google/cloud/talent/v4/internal/completion_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -56,4 +59,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_COMPLETION_AUTH_DECORATOR_H diff --git a/google/cloud/talent/v4/internal/completion_logging_decorator.cc b/google/cloud/talent/v4/internal/completion_logging_decorator.cc index f9ea46b49d42c..1f0e30311df30 100644 --- a/google/cloud/talent/v4/internal/completion_logging_decorator.cc +++ b/google/cloud/talent/v4/internal/completion_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/talent/v4/completion_service.proto #include "google/cloud/talent/v4/internal/completion_logging_decorator.h" +#include "google/cloud/talent/v4/completion_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -62,3 +65,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace talent_v4_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/talent/v4/internal/completion_logging_decorator.h b/google/cloud/talent/v4/internal/completion_logging_decorator.h index b08957903e1d0..fe6e060aca58b 100644 --- a/google/cloud/talent/v4/internal/completion_logging_decorator.h +++ b/google/cloud/talent/v4/internal/completion_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -56,4 +59,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_COMPLETION_LOGGING_DECORATOR_H diff --git a/google/cloud/talent/v4/internal/completion_metadata_decorator.cc b/google/cloud/talent/v4/internal/completion_metadata_decorator.cc index 901b314f30d73..c73b8b705d039 100644 --- a/google/cloud/talent/v4/internal/completion_metadata_decorator.cc +++ b/google/cloud/talent/v4/internal/completion_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/talent/v4/completion_service.proto #include "google/cloud/talent/v4/internal/completion_metadata_decorator.h" +#include "google/cloud/talent/v4/completion_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -78,3 +82,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace talent_v4_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/talent/v4/internal/completion_metadata_decorator.h b/google/cloud/talent/v4/internal/completion_metadata_decorator.h index 8cdf183cde244..99ff4ca695342 100644 --- a/google/cloud/talent/v4/internal/completion_metadata_decorator.h +++ b/google/cloud/talent/v4/internal/completion_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -61,4 +64,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_COMPLETION_METADATA_DECORATOR_H diff --git a/google/cloud/talent/v4/internal/completion_option_defaults.cc b/google/cloud/talent/v4/internal/completion_option_defaults.cc index 678b8c1871344..b9b2703347581 100644 --- a/google/cloud/talent/v4/internal/completion_option_defaults.cc +++ b/google/cloud/talent/v4/internal/completion_option_defaults.cc @@ -40,7 +40,7 @@ Options CompletionDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - talent_v4::CompletionLimitedTimeRetryPolicy(std::chrono::minutes(30)) + talent_v4::CompletionLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/talent/v4/internal/completion_stub.cc b/google/cloud/talent/v4/internal/completion_stub.cc index c065b83bec82a..07aac6e290a3e 100644 --- a/google/cloud/talent/v4/internal/completion_stub.cc +++ b/google/cloud/talent/v4/internal/completion_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/talent/v4/completion_service.proto #include "google/cloud/talent/v4/internal/completion_stub.h" +#include "google/cloud/talent/v4/completion_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -57,3 +60,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace talent_v4_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/talent/v4/internal/completion_stub.h b/google/cloud/talent/v4/internal/completion_stub.h index 518fecf31f2c0..b3fd853b871b5 100644 --- a/google/cloud/talent/v4/internal/completion_stub.h +++ b/google/cloud/talent/v4/internal/completion_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_COMPLETION_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_COMPLETION_STUB_H +#include "google/cloud/talent/v4/completion_service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -76,4 +79,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_COMPLETION_STUB_H diff --git a/google/cloud/talent/v4/internal/completion_stub_factory.cc b/google/cloud/talent/v4/internal/completion_stub_factory.cc index 828dce1b79fc3..cf11f96d3d7de 100644 --- a/google/cloud/talent/v4/internal/completion_stub_factory.cc +++ b/google/cloud/talent/v4/internal/completion_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/talent/v4/completion_service.proto #include "google/cloud/talent/v4/internal/completion_stub_factory.h" +#include "google/cloud/talent/v4/completion_service.grpc.pb.h" #include "google/cloud/talent/v4/internal/completion_auth_decorator.h" #include "google/cloud/talent/v4/internal/completion_logging_decorator.h" #include "google/cloud/talent/v4/internal/completion_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace talent_v4_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/talent/v4/internal/completion_stub_factory.h b/google/cloud/talent/v4/internal/completion_stub_factory.h index 1668fc62d4c39..51b8f30210e5a 100644 --- a/google/cloud/talent/v4/internal/completion_stub_factory.h +++ b/google/cloud/talent/v4/internal/completion_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_COMPLETION_STUB_FACTORY_H diff --git a/google/cloud/talent/v4/internal/completion_tracing_connection.cc b/google/cloud/talent/v4/internal/completion_tracing_connection.cc index 851a30e6d18fa..9718f8bcaee73 100644 --- a/google/cloud/talent/v4/internal/completion_tracing_connection.cc +++ b/google/cloud/talent/v4/internal/completion_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace talent_v4_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CompletionTracingConnection::CompletionTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -50,16 +48,12 @@ CompletionTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCompletionTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/talent/v4/internal/completion_tracing_connection.h b/google/cloud/talent/v4/internal/completion_tracing_connection.h index 9aeca23c96644..c46d2c1632a39 100644 --- a/google/cloud/talent/v4/internal/completion_tracing_connection.h +++ b/google/cloud/talent/v4/internal/completion_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace talent_v4_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CompletionTracingConnection : public talent_v4::CompletionConnection { public: ~CompletionTracingConnection() override = default; @@ -49,8 +47,6 @@ class CompletionTracingConnection : public talent_v4::CompletionConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/talent/v4/internal/completion_tracing_stub.cc b/google/cloud/talent/v4/internal/completion_tracing_stub.cc index c642881a0e2d2..9cd3eeba67cf3 100644 --- a/google/cloud/talent/v4/internal/completion_tracing_stub.cc +++ b/google/cloud/talent/v4/internal/completion_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CompletionTracingStub::CompletionTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -55,18 +56,14 @@ StatusOr CompletionTracingStub::GetOperation( child_->GetOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCompletionTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace talent_v4_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/talent/v4/internal/completion_tracing_stub.h b/google/cloud/talent/v4/internal/completion_tracing_stub.h index 04d87fde0f925..da1a15c83727d 100644 --- a/google/cloud/talent/v4/internal/completion_tracing_stub.h +++ b/google/cloud/talent/v4/internal/completion_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CompletionTracingStub : public CompletionStub { public: ~CompletionTracingStub() override = default; @@ -52,8 +53,6 @@ class CompletionTracingStub : public CompletionStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -68,4 +67,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_COMPLETION_TRACING_STUB_H diff --git a/google/cloud/talent/v4/internal/event_auth_decorator.cc b/google/cloud/talent/v4/internal/event_auth_decorator.cc index 43c16287f515f..053c9566a8c67 100644 --- a/google/cloud/talent/v4/internal/event_auth_decorator.cc +++ b/google/cloud/talent/v4/internal/event_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/talent/v4/event_service.proto #include "google/cloud/talent/v4/internal/event_auth_decorator.h" -#include +#include "google/cloud/talent/v4/event_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -52,3 +55,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace talent_v4_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/talent/v4/internal/event_auth_decorator.h b/google/cloud/talent/v4/internal/event_auth_decorator.h index 122b63876d37c..04dfa7e1df627 100644 --- a/google/cloud/talent/v4/internal/event_auth_decorator.h +++ b/google/cloud/talent/v4/internal/event_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -57,4 +60,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_EVENT_AUTH_DECORATOR_H diff --git a/google/cloud/talent/v4/internal/event_logging_decorator.cc b/google/cloud/talent/v4/internal/event_logging_decorator.cc index e0b06943bd7bb..0597dfe5eeeb7 100644 --- a/google/cloud/talent/v4/internal/event_logging_decorator.cc +++ b/google/cloud/talent/v4/internal/event_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/talent/v4/event_service.proto #include "google/cloud/talent/v4/internal/event_logging_decorator.h" +#include "google/cloud/talent/v4/event_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -63,3 +66,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace talent_v4_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/talent/v4/internal/event_logging_decorator.h b/google/cloud/talent/v4/internal/event_logging_decorator.h index a5bf635de0233..129c66d97ce0a 100644 --- a/google/cloud/talent/v4/internal/event_logging_decorator.h +++ b/google/cloud/talent/v4/internal/event_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -57,4 +60,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_EVENT_LOGGING_DECORATOR_H diff --git a/google/cloud/talent/v4/internal/event_metadata_decorator.cc b/google/cloud/talent/v4/internal/event_metadata_decorator.cc index 9aad598193003..a05e6b54191f7 100644 --- a/google/cloud/talent/v4/internal/event_metadata_decorator.cc +++ b/google/cloud/talent/v4/internal/event_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/talent/v4/event_service.proto #include "google/cloud/talent/v4/internal/event_metadata_decorator.h" +#include "google/cloud/talent/v4/event_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -78,3 +82,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace talent_v4_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/talent/v4/internal/event_metadata_decorator.h b/google/cloud/talent/v4/internal/event_metadata_decorator.h index 254f89c38446a..2ce1af04f309a 100644 --- a/google/cloud/talent/v4/internal/event_metadata_decorator.h +++ b/google/cloud/talent/v4/internal/event_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -62,4 +65,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_EVENT_METADATA_DECORATOR_H diff --git a/google/cloud/talent/v4/internal/event_option_defaults.cc b/google/cloud/talent/v4/internal/event_option_defaults.cc index ba05a5c255689..b32dec1f721e9 100644 --- a/google/cloud/talent/v4/internal/event_option_defaults.cc +++ b/google/cloud/talent/v4/internal/event_option_defaults.cc @@ -40,7 +40,7 @@ Options EventServiceDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - talent_v4::EventServiceLimitedTimeRetryPolicy(std::chrono::minutes(30)) + talent_v4::EventServiceLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/talent/v4/internal/event_stub.cc b/google/cloud/talent/v4/internal/event_stub.cc index 43954946e5ecc..2d1b24a299b55 100644 --- a/google/cloud/talent/v4/internal/event_stub.cc +++ b/google/cloud/talent/v4/internal/event_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/talent/v4/event_service.proto #include "google/cloud/talent/v4/internal/event_stub.h" +#include "google/cloud/talent/v4/event_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -57,3 +60,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace talent_v4_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/talent/v4/internal/event_stub.h b/google/cloud/talent/v4/internal/event_stub.h index 7ca65480661f9..1deae862cd870 100644 --- a/google/cloud/talent/v4/internal/event_stub.h +++ b/google/cloud/talent/v4/internal/event_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_EVENT_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_EVENT_STUB_H +#include "google/cloud/talent/v4/event_service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -76,4 +79,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_EVENT_STUB_H diff --git a/google/cloud/talent/v4/internal/event_stub_factory.cc b/google/cloud/talent/v4/internal/event_stub_factory.cc index a20eeedb68e17..b7baf573601ad 100644 --- a/google/cloud/talent/v4/internal/event_stub_factory.cc +++ b/google/cloud/talent/v4/internal/event_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/talent/v4/event_service.proto #include "google/cloud/talent/v4/internal/event_stub_factory.h" +#include "google/cloud/talent/v4/event_service.grpc.pb.h" #include "google/cloud/talent/v4/internal/event_auth_decorator.h" #include "google/cloud/talent/v4/internal/event_logging_decorator.h" #include "google/cloud/talent/v4/internal/event_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace talent_v4_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/talent/v4/internal/event_stub_factory.h b/google/cloud/talent/v4/internal/event_stub_factory.h index 82ea81220ae00..013df4a0783da 100644 --- a/google/cloud/talent/v4/internal/event_stub_factory.h +++ b/google/cloud/talent/v4/internal/event_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_EVENT_STUB_FACTORY_H diff --git a/google/cloud/talent/v4/internal/event_tracing_connection.cc b/google/cloud/talent/v4/internal/event_tracing_connection.cc index 864acea8d2c4c..3e8cae600e80d 100644 --- a/google/cloud/talent/v4/internal/event_tracing_connection.cc +++ b/google/cloud/talent/v4/internal/event_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace talent_v4_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - EventServiceTracingConnection::EventServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -50,16 +48,12 @@ EventServiceTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeEventServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/talent/v4/internal/event_tracing_connection.h b/google/cloud/talent/v4/internal/event_tracing_connection.h index 2f3f420b83c0c..17a20fea81fc9 100644 --- a/google/cloud/talent/v4/internal/event_tracing_connection.h +++ b/google/cloud/talent/v4/internal/event_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace talent_v4_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class EventServiceTracingConnection : public talent_v4::EventServiceConnection { public: ~EventServiceTracingConnection() override = default; @@ -50,8 +48,6 @@ class EventServiceTracingConnection : public talent_v4::EventServiceConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/talent/v4/internal/event_tracing_stub.cc b/google/cloud/talent/v4/internal/event_tracing_stub.cc index 6a15ffdb2b88f..bcd7e4b67b119 100644 --- a/google/cloud/talent/v4/internal/event_tracing_stub.cc +++ b/google/cloud/talent/v4/internal/event_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - EventServiceTracingStub::EventServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -55,18 +56,14 @@ StatusOr EventServiceTracingStub::GetOperation( child_->GetOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeEventServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace talent_v4_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/talent/v4/internal/event_tracing_stub.h b/google/cloud/talent/v4/internal/event_tracing_stub.h index 5acbdf9c69bb5..47659d25cf05d 100644 --- a/google/cloud/talent/v4/internal/event_tracing_stub.h +++ b/google/cloud/talent/v4/internal/event_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class EventServiceTracingStub : public EventServiceStub { public: ~EventServiceTracingStub() override = default; @@ -53,8 +54,6 @@ class EventServiceTracingStub : public EventServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -69,4 +68,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_EVENT_TRACING_STUB_H diff --git a/google/cloud/talent/v4/internal/job_auth_decorator.cc b/google/cloud/talent/v4/internal/job_auth_decorator.cc index fc45e1a6cebb3..77ae3138741cf 100644 --- a/google/cloud/talent/v4/internal/job_auth_decorator.cc +++ b/google/cloud/talent/v4/internal/job_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/talent/v4/job_service.proto #include "google/cloud/talent/v4/internal/job_auth_decorator.h" -#include +#include "google/cloud/talent/v4/job_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -221,3 +224,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace talent_v4_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/talent/v4/internal/job_auth_decorator.h b/google/cloud/talent/v4/internal/job_auth_decorator.h index e8286beaea661..6f14cdac878de 100644 --- a/google/cloud/talent/v4/internal/job_auth_decorator.h +++ b/google/cloud/talent/v4/internal/job_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/talent/v4/internal/job_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -129,4 +132,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_JOB_AUTH_DECORATOR_H diff --git a/google/cloud/talent/v4/internal/job_connection_impl.h b/google/cloud/talent/v4/internal/job_connection_impl.h index 55de5cf56ee85..ead1f4cb82fe8 100644 --- a/google/cloud/talent/v4/internal/job_connection_impl.h +++ b/google/cloud/talent/v4/internal/job_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/talent/v4/internal/job_logging_decorator.cc b/google/cloud/talent/v4/internal/job_logging_decorator.cc index 8e2579ac8f998..d33f8604cf7d5 100644 --- a/google/cloud/talent/v4/internal/job_logging_decorator.cc +++ b/google/cloud/talent/v4/internal/job_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/talent/v4/job_service.proto #include "google/cloud/talent/v4/internal/job_logging_decorator.h" +#include "google/cloud/talent/v4/job_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -252,3 +255,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace talent_v4_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/talent/v4/internal/job_logging_decorator.h b/google/cloud/talent/v4/internal/job_logging_decorator.h index 0094ef4c5f488..fe01e16b7b3c0 100644 --- a/google/cloud/talent/v4/internal/job_logging_decorator.h +++ b/google/cloud/talent/v4/internal/job_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/talent/v4/internal/job_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -129,4 +132,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_JOB_LOGGING_DECORATOR_H diff --git a/google/cloud/talent/v4/internal/job_metadata_decorator.cc b/google/cloud/talent/v4/internal/job_metadata_decorator.cc index 54f9f5a2a8a63..7f4fc1ad081f8 100644 --- a/google/cloud/talent/v4/internal/job_metadata_decorator.cc +++ b/google/cloud/talent/v4/internal/job_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/talent/v4/job_service.proto #include "google/cloud/talent/v4/internal/job_metadata_decorator.h" +#include "google/cloud/talent/v4/job_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -212,3 +216,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace talent_v4_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/talent/v4/internal/job_metadata_decorator.h b/google/cloud/talent/v4/internal/job_metadata_decorator.h index 2e39a03d6a0bb..3de54d55f7a06 100644 --- a/google/cloud/talent/v4/internal/job_metadata_decorator.h +++ b/google/cloud/talent/v4/internal/job_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/talent/v4/internal/job_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -134,4 +137,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_JOB_METADATA_DECORATOR_H diff --git a/google/cloud/talent/v4/internal/job_option_defaults.cc b/google/cloud/talent/v4/internal/job_option_defaults.cc index a2ed58fd6d6bc..99b33269f7118 100644 --- a/google/cloud/talent/v4/internal/job_option_defaults.cc +++ b/google/cloud/talent/v4/internal/job_option_defaults.cc @@ -40,7 +40,7 @@ Options JobServiceDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - talent_v4::JobServiceLimitedTimeRetryPolicy(std::chrono::minutes(30)) + talent_v4::JobServiceLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/talent/v4/internal/job_stub.cc b/google/cloud/talent/v4/internal/job_stub.cc index db2a59614d6d6..0b0da63f6b8d6 100644 --- a/google/cloud/talent/v4/internal/job_stub.cc +++ b/google/cloud/talent/v4/internal/job_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/talent/v4/job_service.proto #include "google/cloud/talent/v4/internal/job_stub.h" +#include "google/cloud/talent/v4/job_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -252,3 +255,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace talent_v4_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/talent/v4/internal/job_stub.h b/google/cloud/talent/v4/internal/job_stub.h index 9dec0dcff0010..87796a270e42d 100644 --- a/google/cloud/talent/v4/internal/job_stub.h +++ b/google/cloud/talent/v4/internal/job_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_JOB_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_JOB_STUB_H +#include "google/cloud/talent/v4/job_service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -216,4 +219,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_JOB_STUB_H diff --git a/google/cloud/talent/v4/internal/job_stub_factory.cc b/google/cloud/talent/v4/internal/job_stub_factory.cc index 63820f2e284a9..45eb61d4ca127 100644 --- a/google/cloud/talent/v4/internal/job_stub_factory.cc +++ b/google/cloud/talent/v4/internal/job_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/talent/v4/internal/job_metadata_decorator.h" #include "google/cloud/talent/v4/internal/job_stub.h" #include "google/cloud/talent/v4/internal/job_tracing_stub.h" +#include "google/cloud/talent/v4/job_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace talent_v4_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/talent/v4/internal/job_stub_factory.h b/google/cloud/talent/v4/internal/job_stub_factory.h index 3ef59b5917a2e..33065f55fc5cc 100644 --- a/google/cloud/talent/v4/internal/job_stub_factory.h +++ b/google/cloud/talent/v4/internal/job_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_JOB_STUB_FACTORY_H diff --git a/google/cloud/talent/v4/internal/job_tracing_connection.cc b/google/cloud/talent/v4/internal/job_tracing_connection.cc index aa68e00edf4eb..6125ca1d9b851 100644 --- a/google/cloud/talent/v4/internal/job_tracing_connection.cc +++ b/google/cloud/talent/v4/internal/job_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace talent_v4_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - JobServiceTracingConnection::JobServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -184,16 +182,12 @@ JobServiceTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeJobServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/talent/v4/internal/job_tracing_connection.h b/google/cloud/talent/v4/internal/job_tracing_connection.h index 520394d0137a1..f348ef5c58e91 100644 --- a/google/cloud/talent/v4/internal/job_tracing_connection.h +++ b/google/cloud/talent/v4/internal/job_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace talent_v4_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class JobServiceTracingConnection : public talent_v4::JobServiceConnection { public: ~JobServiceTracingConnection() override = default; @@ -103,8 +101,6 @@ class JobServiceTracingConnection : public talent_v4::JobServiceConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/talent/v4/internal/job_tracing_stub.cc b/google/cloud/talent/v4/internal/job_tracing_stub.cc index c9d5cef94253d..e42908a4c95fa 100644 --- a/google/cloud/talent/v4/internal/job_tracing_stub.cc +++ b/google/cloud/talent/v4/internal/job_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - JobServiceTracingStub::JobServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -229,18 +230,14 @@ future JobServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeJobServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace talent_v4_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/talent/v4/internal/job_tracing_stub.h b/google/cloud/talent/v4/internal/job_tracing_stub.h index b98605f59fcfc..dc6ca9a01faad 100644 --- a/google/cloud/talent/v4/internal/job_tracing_stub.h +++ b/google/cloud/talent/v4/internal/job_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class JobServiceTracingStub : public JobServiceStub { public: ~JobServiceTracingStub() override = default; @@ -124,8 +125,6 @@ class JobServiceTracingStub : public JobServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -140,4 +139,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_JOB_TRACING_STUB_H diff --git a/google/cloud/talent/v4/internal/tenant_auth_decorator.cc b/google/cloud/talent/v4/internal/tenant_auth_decorator.cc index f7e85a83ff224..3549a6a219b5c 100644 --- a/google/cloud/talent/v4/internal/tenant_auth_decorator.cc +++ b/google/cloud/talent/v4/internal/tenant_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/talent/v4/tenant_service.proto #include "google/cloud/talent/v4/internal/tenant_auth_decorator.h" -#include +#include "google/cloud/talent/v4/tenant_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -84,3 +87,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace talent_v4_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/talent/v4/internal/tenant_auth_decorator.h b/google/cloud/talent/v4/internal/tenant_auth_decorator.h index 401e9ba828117..2050866074efa 100644 --- a/google/cloud/talent/v4/internal/tenant_auth_decorator.h +++ b/google/cloud/talent/v4/internal/tenant_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -72,4 +75,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_TENANT_AUTH_DECORATOR_H diff --git a/google/cloud/talent/v4/internal/tenant_logging_decorator.cc b/google/cloud/talent/v4/internal/tenant_logging_decorator.cc index 7113836e2836e..192771ccffca4 100644 --- a/google/cloud/talent/v4/internal/tenant_logging_decorator.cc +++ b/google/cloud/talent/v4/internal/tenant_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/talent/v4/tenant_service.proto #include "google/cloud/talent/v4/internal/tenant_logging_decorator.h" +#include "google/cloud/talent/v4/tenant_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -106,3 +109,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace talent_v4_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/talent/v4/internal/tenant_logging_decorator.h b/google/cloud/talent/v4/internal/tenant_logging_decorator.h index 93256403110e3..ffcf5b5b18fe5 100644 --- a/google/cloud/talent/v4/internal/tenant_logging_decorator.h +++ b/google/cloud/talent/v4/internal/tenant_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -72,4 +75,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_TENANT_LOGGING_DECORATOR_H diff --git a/google/cloud/talent/v4/internal/tenant_metadata_decorator.cc b/google/cloud/talent/v4/internal/tenant_metadata_decorator.cc index 04337cc4922d0..c4ace33f43861 100644 --- a/google/cloud/talent/v4/internal/tenant_metadata_decorator.cc +++ b/google/cloud/talent/v4/internal/tenant_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/talent/v4/tenant_service.proto #include "google/cloud/talent/v4/internal/tenant_metadata_decorator.h" +#include "google/cloud/talent/v4/tenant_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -111,3 +115,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace talent_v4_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/talent/v4/internal/tenant_metadata_decorator.h b/google/cloud/talent/v4/internal/tenant_metadata_decorator.h index 179f040b87f87..593be426a29fa 100644 --- a/google/cloud/talent/v4/internal/tenant_metadata_decorator.h +++ b/google/cloud/talent/v4/internal/tenant_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -77,4 +80,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_TENANT_METADATA_DECORATOR_H diff --git a/google/cloud/talent/v4/internal/tenant_option_defaults.cc b/google/cloud/talent/v4/internal/tenant_option_defaults.cc index 05f854920a66b..e4cb516fbf091 100644 --- a/google/cloud/talent/v4/internal/tenant_option_defaults.cc +++ b/google/cloud/talent/v4/internal/tenant_option_defaults.cc @@ -40,7 +40,7 @@ Options TenantServiceDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - talent_v4::TenantServiceLimitedTimeRetryPolicy(std::chrono::minutes(30)) + talent_v4::TenantServiceLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/talent/v4/internal/tenant_stub.cc b/google/cloud/talent/v4/internal/tenant_stub.cc index bb392ddeaee15..f07fe0b360ad0 100644 --- a/google/cloud/talent/v4/internal/tenant_stub.cc +++ b/google/cloud/talent/v4/internal/tenant_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/talent/v4/tenant_service.proto #include "google/cloud/talent/v4/internal/tenant_stub.h" +#include "google/cloud/talent/v4/tenant_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -103,3 +106,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace talent_v4_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/talent/v4/internal/tenant_stub.h b/google/cloud/talent/v4/internal/tenant_stub.h index 90c187f796217..971d6905f9aee 100644 --- a/google/cloud/talent/v4/internal/tenant_stub.h +++ b/google/cloud/talent/v4/internal/tenant_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_TENANT_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_TENANT_STUB_H +#include "google/cloud/talent/v4/tenant_service.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -107,4 +110,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_TENANT_STUB_H diff --git a/google/cloud/talent/v4/internal/tenant_stub_factory.cc b/google/cloud/talent/v4/internal/tenant_stub_factory.cc index 94edb8bcb0ebf..bae9a3608beaa 100644 --- a/google/cloud/talent/v4/internal/tenant_stub_factory.cc +++ b/google/cloud/talent/v4/internal/tenant_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/talent/v4/internal/tenant_metadata_decorator.h" #include "google/cloud/talent/v4/internal/tenant_stub.h" #include "google/cloud/talent/v4/internal/tenant_tracing_stub.h" +#include "google/cloud/talent/v4/tenant_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace talent_v4_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/talent/v4/internal/tenant_stub_factory.h b/google/cloud/talent/v4/internal/tenant_stub_factory.h index c2ef80ba492f6..6d63923a6ba9e 100644 --- a/google/cloud/talent/v4/internal/tenant_stub_factory.h +++ b/google/cloud/talent/v4/internal/tenant_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_TENANT_STUB_FACTORY_H diff --git a/google/cloud/talent/v4/internal/tenant_tracing_connection.cc b/google/cloud/talent/v4/internal/tenant_tracing_connection.cc index de0a53aa88e86..cb775e29aa5c1 100644 --- a/google/cloud/talent/v4/internal/tenant_tracing_connection.cc +++ b/google/cloud/talent/v4/internal/tenant_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace talent_v4_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TenantServiceTracingConnection::TenantServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -88,16 +86,12 @@ TenantServiceTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTenantServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/talent/v4/internal/tenant_tracing_connection.h b/google/cloud/talent/v4/internal/tenant_tracing_connection.h index 4000309233b53..933dc3b122529 100644 --- a/google/cloud/talent/v4/internal/tenant_tracing_connection.h +++ b/google/cloud/talent/v4/internal/tenant_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace talent_v4_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TenantServiceTracingConnection : public talent_v4::TenantServiceConnection { public: @@ -62,8 +60,6 @@ class TenantServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/talent/v4/internal/tenant_tracing_stub.cc b/google/cloud/talent/v4/internal/tenant_tracing_stub.cc index 45c91e61c5536..6c4b14cde3a14 100644 --- a/google/cloud/talent/v4/internal/tenant_tracing_stub.cc +++ b/google/cloud/talent/v4/internal/tenant_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TenantServiceTracingStub::TenantServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -101,18 +102,14 @@ StatusOr TenantServiceTracingStub::GetOperation( child_->GetOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTenantServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace talent_v4_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/talent/v4/internal/tenant_tracing_stub.h b/google/cloud/talent/v4/internal/tenant_tracing_stub.h index a70d4cc8f36f1..c04abbc1a9796 100644 --- a/google/cloud/talent/v4/internal/tenant_tracing_stub.h +++ b/google/cloud/talent/v4/internal/tenant_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace talent_v4_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TenantServiceTracingStub : public TenantServiceStub { public: ~TenantServiceTracingStub() override = default; @@ -68,8 +69,6 @@ class TenantServiceTracingStub : public TenantServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -84,4 +83,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_INTERNAL_TENANT_TRACING_STUB_H diff --git a/google/cloud/talent/v4/job_client.h b/google/cloud/talent/v4/job_client.h index 7c1e051fed6f7..a7ec48dd23521 100644 --- a/google/cloud/talent/v4/job_client.h +++ b/google/cloud/talent/v4/job_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/talent/v4/job_connection.h b/google/cloud/talent/v4/job_connection.h index 54ad54d7c1bec..f15daa4ac9175 100644 --- a/google/cloud/talent/v4/job_connection.h +++ b/google/cloud/talent/v4/job_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/talent/v4/internal/job_retry_traits.h" #include "google/cloud/talent/v4/job_connection_idempotency_policy.h" +#include "google/cloud/talent/v4/job_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/talent/v4/job_connection_idempotency_policy.h b/google/cloud/talent/v4/job_connection_idempotency_policy.h index 2498f8ee006f8..c928a31637707 100644 --- a/google/cloud/talent/v4/job_connection_idempotency_policy.h +++ b/google/cloud/talent/v4/job_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_JOB_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_JOB_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/talent/v4/job_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/talent/v4/tenant_connection.h b/google/cloud/talent/v4/tenant_connection.h index 2c9a01c787db5..a6f2e4ba51eda 100644 --- a/google/cloud/talent/v4/tenant_connection.h +++ b/google/cloud/talent/v4/tenant_connection.h @@ -21,13 +21,13 @@ #include "google/cloud/talent/v4/internal/tenant_retry_traits.h" #include "google/cloud/talent/v4/tenant_connection_idempotency_policy.h" +#include "google/cloud/talent/v4/tenant_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/talent/v4/tenant_connection_idempotency_policy.h b/google/cloud/talent/v4/tenant_connection_idempotency_policy.h index 2b319ab3c0a2e..66784a7dc0222 100644 --- a/google/cloud/talent/v4/tenant_connection_idempotency_policy.h +++ b/google/cloud/talent/v4/tenant_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_TENANT_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TALENT_V4_TENANT_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/talent/v4/tenant_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/tasks/BUILD.bazel b/google/cloud/tasks/BUILD.bazel index 2d17e94b56491..8b524d5564914 100644 --- a/google/cloud/tasks/BUILD.bazel +++ b/google/cloud/tasks/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v2/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/tasks/v2:tasks_cc_grpc", + "@googleapis//google/cloud/tasks/v2:tasks_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/tasks/CMakeLists.txt b/google/cloud/tasks/CMakeLists.txt index 7e49f40b647ea..9f98e60accea6 100644 --- a/google/cloud/tasks/CMakeLists.txt +++ b/google/cloud/tasks/CMakeLists.txt @@ -16,8 +16,7 @@ include(GoogleCloudCppLibrary) -google_cloud_cpp_add_gapic_library(tasks "Cloud Tasks API" - SERVICE_DIRS "__EMPTY__" "v2/") +google_cloud_cpp_add_gapic_library(tasks "Cloud Tasks API" SERVICE_DIRS "v2/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(tasks_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/tasks/cloud_tasks_client.h b/google/cloud/tasks/cloud_tasks_client.h deleted file mode 100644 index 5b310a62fb0da..0000000000000 --- a/google/cloud/tasks/cloud_tasks_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/tasks/v2/cloudtasks.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TASKS_CLOUD_TASKS_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TASKS_CLOUD_TASKS_CLIENT_H - -#include "google/cloud/tasks/cloud_tasks_connection.h" -#include "google/cloud/tasks/v2/cloud_tasks_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in tasks_v2 instead of the aliases defined in -/// this namespace. -namespace tasks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use tasks_v2::CloudTasksClient directly. -using ::google::cloud::tasks_v2::CloudTasksClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace tasks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TASKS_CLOUD_TASKS_CLIENT_H diff --git a/google/cloud/tasks/cloud_tasks_connection.h b/google/cloud/tasks/cloud_tasks_connection.h deleted file mode 100644 index 90e05ec75e158..0000000000000 --- a/google/cloud/tasks/cloud_tasks_connection.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/tasks/v2/cloudtasks.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TASKS_CLOUD_TASKS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TASKS_CLOUD_TASKS_CONNECTION_H - -#include "google/cloud/tasks/cloud_tasks_connection_idempotency_policy.h" -#include "google/cloud/tasks/v2/cloud_tasks_connection.h" - -namespace google { -namespace cloud { -namespace tasks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use tasks_v2::MakeCloudTasksConnection directly. -using ::google::cloud::tasks_v2::MakeCloudTasksConnection; - -/// @deprecated Use tasks_v2::CloudTasksConnection directly. -using ::google::cloud::tasks_v2::CloudTasksConnection; - -/// @deprecated Use tasks_v2::CloudTasksLimitedErrorCountRetryPolicy directly. -using ::google::cloud::tasks_v2::CloudTasksLimitedErrorCountRetryPolicy; - -/// @deprecated Use tasks_v2::CloudTasksLimitedTimeRetryPolicy directly. -using ::google::cloud::tasks_v2::CloudTasksLimitedTimeRetryPolicy; - -/// @deprecated Use tasks_v2::CloudTasksRetryPolicy directly. -using ::google::cloud::tasks_v2::CloudTasksRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace tasks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TASKS_CLOUD_TASKS_CONNECTION_H diff --git a/google/cloud/tasks/cloud_tasks_connection_idempotency_policy.h b/google/cloud/tasks/cloud_tasks_connection_idempotency_policy.h deleted file mode 100644 index 87799940d1c42..0000000000000 --- a/google/cloud/tasks/cloud_tasks_connection_idempotency_policy.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/tasks/v2/cloudtasks.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TASKS_CLOUD_TASKS_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TASKS_CLOUD_TASKS_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/tasks/v2/cloud_tasks_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace tasks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use tasks_v2::MakeDefaultCloudTasksConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::tasks_v2:: - MakeDefaultCloudTasksConnectionIdempotencyPolicy; - -/// @deprecated Use tasks_v2::CloudTasksConnectionIdempotencyPolicy directly. -using ::google::cloud::tasks_v2::CloudTasksConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace tasks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TASKS_CLOUD_TASKS_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/tasks/cloud_tasks_options.h b/google/cloud/tasks/cloud_tasks_options.h deleted file mode 100644 index 6632e2d6b3ecf..0000000000000 --- a/google/cloud/tasks/cloud_tasks_options.h +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/tasks/v2/cloudtasks.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TASKS_CLOUD_TASKS_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TASKS_CLOUD_TASKS_OPTIONS_H - -#include "google/cloud/tasks/cloud_tasks_connection.h" -#include "google/cloud/tasks/cloud_tasks_connection_idempotency_policy.h" -#include "google/cloud/tasks/v2/cloud_tasks_options.h" - -namespace google { -namespace cloud { -namespace tasks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use tasks_v2::CloudTasksBackoffPolicyOption directly. -using ::google::cloud::tasks_v2::CloudTasksBackoffPolicyOption; - -/// @deprecated Use tasks_v2::CloudTasksConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::tasks_v2::CloudTasksConnectionIdempotencyPolicyOption; - -/// @deprecated Use tasks_v2::CloudTasksPolicyOptionList directly. -using ::google::cloud::tasks_v2::CloudTasksPolicyOptionList; - -/// @deprecated Use tasks_v2::CloudTasksRetryPolicyOption directly. -using ::google::cloud::tasks_v2::CloudTasksRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace tasks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TASKS_CLOUD_TASKS_OPTIONS_H diff --git a/google/cloud/tasks/mocks/mock_cloud_tasks_connection.h b/google/cloud/tasks/mocks/mock_cloud_tasks_connection.h deleted file mode 100644 index d93c33b7b2733..0000000000000 --- a/google/cloud/tasks/mocks/mock_cloud_tasks_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2021 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/tasks/v2/cloudtasks.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TASKS_MOCKS_MOCK_CLOUD_TASKS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TASKS_MOCKS_MOCK_CLOUD_TASKS_CONNECTION_H - -#include "google/cloud/tasks/cloud_tasks_connection.h" -#include "google/cloud/tasks/v2/mocks/mock_cloud_tasks_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in tasks_v2_mocks instead of the aliases -/// defined in this namespace. -namespace tasks_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use tasks_v2_mocks::MockCloudTasksConnection directly. -using ::google::cloud::tasks_v2_mocks::MockCloudTasksConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace tasks_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TASKS_MOCKS_MOCK_CLOUD_TASKS_CONNECTION_H diff --git a/google/cloud/tasks/quickstart/.bazelrc b/google/cloud/tasks/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/tasks/quickstart/.bazelrc +++ b/google/cloud/tasks/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/tasks/quickstart/CMakeLists.txt b/google/cloud/tasks/quickstart/CMakeLists.txt index 7449f23e6889e..4ea48a47580b2 100644 --- a/google/cloud/tasks/quickstart/CMakeLists.txt +++ b/google/cloud/tasks/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Tasks API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-tasks-quickstart CXX) find_package(google_cloud_cpp_tasks REQUIRED) diff --git a/google/cloud/tasks/v2/cloud_tasks_connection.h b/google/cloud/tasks/v2/cloud_tasks_connection.h index 60b797d977751..ccc2ad9ebf11d 100644 --- a/google/cloud/tasks/v2/cloud_tasks_connection.h +++ b/google/cloud/tasks/v2/cloud_tasks_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TASKS_V2_CLOUD_TASKS_CONNECTION_H #include "google/cloud/tasks/v2/cloud_tasks_connection_idempotency_policy.h" +#include "google/cloud/tasks/v2/cloudtasks.pb.h" #include "google/cloud/tasks/v2/internal/cloud_tasks_retry_traits.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/tasks/v2/cloud_tasks_connection_idempotency_policy.h b/google/cloud/tasks/v2/cloud_tasks_connection_idempotency_policy.h index 4ce4d88c19b6a..80b498c80c75b 100644 --- a/google/cloud/tasks/v2/cloud_tasks_connection_idempotency_policy.h +++ b/google/cloud/tasks/v2/cloud_tasks_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TASKS_V2_CLOUD_TASKS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TASKS_V2_CLOUD_TASKS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/tasks/v2/cloudtasks.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include #include namespace google { diff --git a/google/cloud/tasks/v2/internal/cloud_tasks_auth_decorator.cc b/google/cloud/tasks/v2/internal/cloud_tasks_auth_decorator.cc index 77f731171dd11..2454f3a95655d 100644 --- a/google/cloud/tasks/v2/internal/cloud_tasks_auth_decorator.cc +++ b/google/cloud/tasks/v2/internal/cloud_tasks_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/tasks/v2/cloudtasks.proto #include "google/cloud/tasks/v2/internal/cloud_tasks_auth_decorator.h" -#include +#include "google/cloud/tasks/v2/cloudtasks.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tasks_v2_internal { @@ -182,3 +185,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace tasks_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/tasks/v2/internal/cloud_tasks_auth_decorator.h b/google/cloud/tasks/v2/internal/cloud_tasks_auth_decorator.h index 017294421db79..f8b8b26f9d97c 100644 --- a/google/cloud/tasks/v2/internal/cloud_tasks_auth_decorator.h +++ b/google/cloud/tasks/v2/internal/cloud_tasks_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tasks_v2_internal { @@ -120,4 +123,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TASKS_V2_INTERNAL_CLOUD_TASKS_AUTH_DECORATOR_H diff --git a/google/cloud/tasks/v2/internal/cloud_tasks_logging_decorator.cc b/google/cloud/tasks/v2/internal/cloud_tasks_logging_decorator.cc index a55ee017dc797..f7789b3b21967 100644 --- a/google/cloud/tasks/v2/internal/cloud_tasks_logging_decorator.cc +++ b/google/cloud/tasks/v2/internal/cloud_tasks_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/tasks/v2/cloudtasks.proto #include "google/cloud/tasks/v2/internal/cloud_tasks_logging_decorator.h" +#include "google/cloud/tasks/v2/cloudtasks.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tasks_v2_internal { @@ -241,3 +244,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace tasks_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/tasks/v2/internal/cloud_tasks_logging_decorator.h b/google/cloud/tasks/v2/internal/cloud_tasks_logging_decorator.h index 788e19752d643..a674d45152fc5 100644 --- a/google/cloud/tasks/v2/internal/cloud_tasks_logging_decorator.h +++ b/google/cloud/tasks/v2/internal/cloud_tasks_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tasks_v2_internal { @@ -120,4 +123,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TASKS_V2_INTERNAL_CLOUD_TASKS_LOGGING_DECORATOR_H diff --git a/google/cloud/tasks/v2/internal/cloud_tasks_metadata_decorator.cc b/google/cloud/tasks/v2/internal/cloud_tasks_metadata_decorator.cc index 1a3cfdd3397cd..4d8ab7e5a8a40 100644 --- a/google/cloud/tasks/v2/internal/cloud_tasks_metadata_decorator.cc +++ b/google/cloud/tasks/v2/internal/cloud_tasks_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/tasks/v2/cloudtasks.proto #include "google/cloud/tasks/v2/internal/cloud_tasks_metadata_decorator.h" +#include "google/cloud/tasks/v2/cloudtasks.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tasks_v2_internal { @@ -213,3 +217,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace tasks_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/tasks/v2/internal/cloud_tasks_metadata_decorator.h b/google/cloud/tasks/v2/internal/cloud_tasks_metadata_decorator.h index 626a35bdeec57..f36779911c60d 100644 --- a/google/cloud/tasks/v2/internal/cloud_tasks_metadata_decorator.h +++ b/google/cloud/tasks/v2/internal/cloud_tasks_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tasks_v2_internal { @@ -125,4 +128,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TASKS_V2_INTERNAL_CLOUD_TASKS_METADATA_DECORATOR_H diff --git a/google/cloud/tasks/v2/internal/cloud_tasks_option_defaults.cc b/google/cloud/tasks/v2/internal/cloud_tasks_option_defaults.cc index 58573f51fb7eb..588e31d09a430 100644 --- a/google/cloud/tasks/v2/internal/cloud_tasks_option_defaults.cc +++ b/google/cloud/tasks/v2/internal/cloud_tasks_option_defaults.cc @@ -40,7 +40,7 @@ Options CloudTasksDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - tasks_v2::CloudTasksLimitedTimeRetryPolicy(std::chrono::minutes(30)) + tasks_v2::CloudTasksLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/tasks/v2/internal/cloud_tasks_stub.cc b/google/cloud/tasks/v2/internal/cloud_tasks_stub.cc index c7a73208b91c4..bf375bd55f212 100644 --- a/google/cloud/tasks/v2/internal/cloud_tasks_stub.cc +++ b/google/cloud/tasks/v2/internal/cloud_tasks_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/tasks/v2/cloudtasks.proto #include "google/cloud/tasks/v2/internal/cloud_tasks_stub.h" +#include "google/cloud/tasks/v2/cloudtasks.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tasks_v2_internal { @@ -236,3 +239,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace tasks_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/tasks/v2/internal/cloud_tasks_stub.h b/google/cloud/tasks/v2/internal/cloud_tasks_stub.h index d7e1e127ad115..a26bff9a31832 100644 --- a/google/cloud/tasks/v2/internal/cloud_tasks_stub.h +++ b/google/cloud/tasks/v2/internal/cloud_tasks_stub.h @@ -19,14 +19,17 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TASKS_V2_INTERNAL_CLOUD_TASKS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TASKS_V2_INTERNAL_CLOUD_TASKS_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/tasks/v2/cloudtasks.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tasks_v2_internal { @@ -205,4 +208,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TASKS_V2_INTERNAL_CLOUD_TASKS_STUB_H diff --git a/google/cloud/tasks/v2/internal/cloud_tasks_stub_factory.cc b/google/cloud/tasks/v2/internal/cloud_tasks_stub_factory.cc index dbbd6afdf312a..e5611ec90466c 100644 --- a/google/cloud/tasks/v2/internal/cloud_tasks_stub_factory.cc +++ b/google/cloud/tasks/v2/internal/cloud_tasks_stub_factory.cc @@ -17,6 +17,8 @@ // source: google/cloud/tasks/v2/cloudtasks.proto #include "google/cloud/tasks/v2/internal/cloud_tasks_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/tasks/v2/cloudtasks.grpc.pb.h" #include "google/cloud/tasks/v2/internal/cloud_tasks_auth_decorator.h" #include "google/cloud/tasks/v2/internal/cloud_tasks_logging_decorator.h" #include "google/cloud/tasks/v2/internal/cloud_tasks_metadata_decorator.h" @@ -28,11 +30,12 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tasks_v2_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace tasks_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/tasks/v2/internal/cloud_tasks_stub_factory.h b/google/cloud/tasks/v2/internal/cloud_tasks_stub_factory.h index 81b405d1d66d6..c0ae439409c63 100644 --- a/google/cloud/tasks/v2/internal/cloud_tasks_stub_factory.h +++ b/google/cloud/tasks/v2/internal/cloud_tasks_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tasks_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TASKS_V2_INTERNAL_CLOUD_TASKS_STUB_FACTORY_H diff --git a/google/cloud/tasks/v2/internal/cloud_tasks_tracing_connection.cc b/google/cloud/tasks/v2/internal/cloud_tasks_tracing_connection.cc index b6883c748253e..579d01272fe95 100644 --- a/google/cloud/tasks/v2/internal/cloud_tasks_tracing_connection.cc +++ b/google/cloud/tasks/v2/internal/cloud_tasks_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace tasks_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudTasksTracingConnection::CloudTasksTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -180,15 +178,11 @@ CloudTasksTracingConnection::GetLocation( return internal::EndSpan(*span, child_->GetLocation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCloudTasksTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/tasks/v2/internal/cloud_tasks_tracing_connection.h b/google/cloud/tasks/v2/internal/cloud_tasks_tracing_connection.h index 2fa5dd5501dee..a15e9424d61ba 100644 --- a/google/cloud/tasks/v2/internal/cloud_tasks_tracing_connection.h +++ b/google/cloud/tasks/v2/internal/cloud_tasks_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace tasks_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudTasksTracingConnection : public tasks_v2::CloudTasksConnection { public: ~CloudTasksTracingConnection() override = default; @@ -97,8 +95,6 @@ class CloudTasksTracingConnection : public tasks_v2::CloudTasksConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/tasks/v2/internal/cloud_tasks_tracing_stub.cc b/google/cloud/tasks/v2/internal/cloud_tasks_tracing_stub.cc index 89dd0cab8d078..f7dc9b087f2db 100644 --- a/google/cloud/tasks/v2/internal/cloud_tasks_tracing_stub.cc +++ b/google/cloud/tasks/v2/internal/cloud_tasks_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tasks_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - CloudTasksTracingStub::CloudTasksTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -234,18 +235,14 @@ StatusOr CloudTasksTracingStub::GetLocation( child_->GetLocation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeCloudTasksTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace tasks_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/tasks/v2/internal/cloud_tasks_tracing_stub.h b/google/cloud/tasks/v2/internal/cloud_tasks_tracing_stub.h index a66d4c13de48a..97d9885a5e865 100644 --- a/google/cloud/tasks/v2/internal/cloud_tasks_tracing_stub.h +++ b/google/cloud/tasks/v2/internal/cloud_tasks_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tasks_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class CloudTasksTracingStub : public CloudTasksStub { public: ~CloudTasksTracingStub() override = default; @@ -116,8 +117,6 @@ class CloudTasksTracingStub : public CloudTasksStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -132,4 +131,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TASKS_V2_INTERNAL_CLOUD_TASKS_TRACING_STUB_H diff --git a/google/cloud/telcoautomation/BUILD.bazel b/google/cloud/telcoautomation/BUILD.bazel index 4cdc3d8937fb6..bf9d33b2305f1 100644 --- a/google/cloud/telcoautomation/BUILD.bazel +++ b/google/cloud/telcoautomation/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/telcoautomation/v1:telcoautomation_cc_grpc", + "@googleapis//google/cloud/telcoautomation/v1:telcoautomation_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/telcoautomation/quickstart/.bazelrc b/google/cloud/telcoautomation/quickstart/.bazelrc index 6777c6b4c95de..ec27511a60add 100644 --- a/google/cloud/telcoautomation/quickstart/.bazelrc +++ b/google/cloud/telcoautomation/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/telcoautomation/quickstart/CMakeLists.txt b/google/cloud/telcoautomation/quickstart/CMakeLists.txt index 9b5e8f711b9a4..abbfbc549d9eb 100644 --- a/google/cloud/telcoautomation/quickstart/CMakeLists.txt +++ b/google/cloud/telcoautomation/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Telco Automation API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-telcoautomation-quickstart CXX) find_package(google_cloud_cpp_telcoautomation REQUIRED) diff --git a/google/cloud/telcoautomation/v1/internal/telco_automation_auth_decorator.cc b/google/cloud/telcoautomation/v1/internal/telco_automation_auth_decorator.cc index bd1e54a18243d..cdae585011640 100644 --- a/google/cloud/telcoautomation/v1/internal/telco_automation_auth_decorator.cc +++ b/google/cloud/telcoautomation/v1/internal/telco_automation_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/telcoautomation/v1/telcoautomation.proto #include "google/cloud/telcoautomation/v1/internal/telco_automation_auth_decorator.h" -#include +#include "google/cloud/telcoautomation/v1/telcoautomation.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace telcoautomation_v1_internal { @@ -546,3 +549,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace telcoautomation_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/telcoautomation/v1/internal/telco_automation_auth_decorator.h b/google/cloud/telcoautomation/v1/internal/telco_automation_auth_decorator.h index 460628f125fb3..618b19551a22b 100644 --- a/google/cloud/telcoautomation/v1/internal/telco_automation_auth_decorator.h +++ b/google/cloud/telcoautomation/v1/internal/telco_automation_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/telcoautomation/v1/internal/telco_automation_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace telcoautomation_v1_internal { @@ -314,4 +317,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TELCOAUTOMATION_V1_INTERNAL_TELCO_AUTOMATION_AUTH_DECORATOR_H diff --git a/google/cloud/telcoautomation/v1/internal/telco_automation_connection_impl.h b/google/cloud/telcoautomation/v1/internal/telco_automation_connection_impl.h index aa1d2809d2774..8f83c7bff1391 100644 --- a/google/cloud/telcoautomation/v1/internal/telco_automation_connection_impl.h +++ b/google/cloud/telcoautomation/v1/internal/telco_automation_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/telcoautomation/v1/internal/telco_automation_logging_decorator.cc b/google/cloud/telcoautomation/v1/internal/telco_automation_logging_decorator.cc index d1cbf6290a4ea..f22e1f062f620 100644 --- a/google/cloud/telcoautomation/v1/internal/telco_automation_logging_decorator.cc +++ b/google/cloud/telcoautomation/v1/internal/telco_automation_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/telcoautomation/v1/telcoautomation.proto #include "google/cloud/telcoautomation/v1/internal/telco_automation_logging_decorator.h" +#include "google/cloud/telcoautomation/v1/telcoautomation.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace telcoautomation_v1_internal { @@ -710,3 +713,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace telcoautomation_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/telcoautomation/v1/internal/telco_automation_logging_decorator.h b/google/cloud/telcoautomation/v1/internal/telco_automation_logging_decorator.h index 0892b0f4adb30..5bed8a96871eb 100644 --- a/google/cloud/telcoautomation/v1/internal/telco_automation_logging_decorator.h +++ b/google/cloud/telcoautomation/v1/internal/telco_automation_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/telcoautomation/v1/internal/telco_automation_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace telcoautomation_v1_internal { @@ -314,4 +317,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TELCOAUTOMATION_V1_INTERNAL_TELCO_AUTOMATION_LOGGING_DECORATOR_H diff --git a/google/cloud/telcoautomation/v1/internal/telco_automation_metadata_decorator.cc b/google/cloud/telcoautomation/v1/internal/telco_automation_metadata_decorator.cc index 353454701f5f8..5d832cb3664de 100644 --- a/google/cloud/telcoautomation/v1/internal/telco_automation_metadata_decorator.cc +++ b/google/cloud/telcoautomation/v1/internal/telco_automation_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/telcoautomation/v1/telcoautomation.proto #include "google/cloud/telcoautomation/v1/internal/telco_automation_metadata_decorator.h" +#include "google/cloud/telcoautomation/v1/telcoautomation.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace telcoautomation_v1_internal { @@ -532,3 +536,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace telcoautomation_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/telcoautomation/v1/internal/telco_automation_metadata_decorator.h b/google/cloud/telcoautomation/v1/internal/telco_automation_metadata_decorator.h index f7bd774a06192..cb9aac026a8e3 100644 --- a/google/cloud/telcoautomation/v1/internal/telco_automation_metadata_decorator.h +++ b/google/cloud/telcoautomation/v1/internal/telco_automation_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/telcoautomation/v1/internal/telco_automation_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace telcoautomation_v1_internal { @@ -320,4 +323,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TELCOAUTOMATION_V1_INTERNAL_TELCO_AUTOMATION_METADATA_DECORATOR_H diff --git a/google/cloud/telcoautomation/v1/internal/telco_automation_option_defaults.cc b/google/cloud/telcoautomation/v1/internal/telco_automation_option_defaults.cc index a50d6cd9f0be7..cdfb9a2050ed9 100644 --- a/google/cloud/telcoautomation/v1/internal/telco_automation_option_defaults.cc +++ b/google/cloud/telcoautomation/v1/internal/telco_automation_option_defaults.cc @@ -42,7 +42,7 @@ Options TelcoAutomationDefaultOptions(Options options) { if (!options.has()) { options.set( telcoautomation_v1::TelcoAutomationLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/telcoautomation/v1/internal/telco_automation_stub.cc b/google/cloud/telcoautomation/v1/internal/telco_automation_stub.cc index 82497e9d4c9a9..1d7573a0f437e 100644 --- a/google/cloud/telcoautomation/v1/internal/telco_automation_stub.cc +++ b/google/cloud/telcoautomation/v1/internal/telco_automation_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/telcoautomation/v1/telcoautomation.proto #include "google/cloud/telcoautomation/v1/internal/telco_automation_stub.h" +#include "google/cloud/telcoautomation/v1/telcoautomation.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace telcoautomation_v1_internal { @@ -693,3 +696,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace telcoautomation_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/telcoautomation/v1/internal/telco_automation_stub.h b/google/cloud/telcoautomation/v1/internal/telco_automation_stub.h index 6c64e010d42e4..2b06119149bfb 100644 --- a/google/cloud/telcoautomation/v1/internal/telco_automation_stub.h +++ b/google/cloud/telcoautomation/v1/internal/telco_automation_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TELCOAUTOMATION_V1_INTERNAL_TELCO_AUTOMATION_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TELCOAUTOMATION_V1_INTERNAL_TELCO_AUTOMATION_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/telcoautomation/v1/telcoautomation.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace telcoautomation_v1_internal { @@ -616,4 +619,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TELCOAUTOMATION_V1_INTERNAL_TELCO_AUTOMATION_STUB_H diff --git a/google/cloud/telcoautomation/v1/internal/telco_automation_stub_factory.cc b/google/cloud/telcoautomation/v1/internal/telco_automation_stub_factory.cc index 4a4d3f044b29a..4408db23af279 100644 --- a/google/cloud/telcoautomation/v1/internal/telco_automation_stub_factory.cc +++ b/google/cloud/telcoautomation/v1/internal/telco_automation_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/telcoautomation/v1/telcoautomation.proto #include "google/cloud/telcoautomation/v1/internal/telco_automation_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/telcoautomation/v1/internal/telco_automation_auth_decorator.h" #include "google/cloud/telcoautomation/v1/internal/telco_automation_logging_decorator.h" #include "google/cloud/telcoautomation/v1/internal/telco_automation_metadata_decorator.h" #include "google/cloud/telcoautomation/v1/internal/telco_automation_stub.h" #include "google/cloud/telcoautomation/v1/internal/telco_automation_tracing_stub.h" +#include "google/cloud/telcoautomation/v1/telcoautomation.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace telcoautomation_v1_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace telcoautomation_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/telcoautomation/v1/internal/telco_automation_stub_factory.h b/google/cloud/telcoautomation/v1/internal/telco_automation_stub_factory.h index 21319bbdfff1c..8e3e7e117fff6 100644 --- a/google/cloud/telcoautomation/v1/internal/telco_automation_stub_factory.h +++ b/google/cloud/telcoautomation/v1/internal/telco_automation_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace telcoautomation_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TELCOAUTOMATION_V1_INTERNAL_TELCO_AUTOMATION_STUB_FACTORY_H diff --git a/google/cloud/telcoautomation/v1/internal/telco_automation_tracing_connection.cc b/google/cloud/telcoautomation/v1/internal/telco_automation_tracing_connection.cc index e24692f02b9c7..7bcde18a0528e 100644 --- a/google/cloud/telcoautomation/v1/internal/telco_automation_tracing_connection.cc +++ b/google/cloud/telcoautomation/v1/internal/telco_automation_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace telcoautomation_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TelcoAutomationTracingConnection::TelcoAutomationTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -557,16 +555,12 @@ Status TelcoAutomationTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTelcoAutomationTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/telcoautomation/v1/internal/telco_automation_tracing_connection.h b/google/cloud/telcoautomation/v1/internal/telco_automation_tracing_connection.h index 21247b09f36bc..f854a89f21abb 100644 --- a/google/cloud/telcoautomation/v1/internal/telco_automation_tracing_connection.h +++ b/google/cloud/telcoautomation/v1/internal/telco_automation_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace telcoautomation_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TelcoAutomationTracingConnection : public telcoautomation_v1::TelcoAutomationConnection { public: @@ -256,8 +254,6 @@ class TelcoAutomationTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/telcoautomation/v1/internal/telco_automation_tracing_stub.cc b/google/cloud/telcoautomation/v1/internal/telco_automation_tracing_stub.cc index dc70da756a8d2..4bdccd6f113e2 100644 --- a/google/cloud/telcoautomation/v1/internal/telco_automation_tracing_stub.cc +++ b/google/cloud/telcoautomation/v1/internal/telco_automation_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace telcoautomation_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TelcoAutomationTracingStub::TelcoAutomationTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -675,18 +676,14 @@ future TelcoAutomationTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTelcoAutomationTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace telcoautomation_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/telcoautomation/v1/internal/telco_automation_tracing_stub.h b/google/cloud/telcoautomation/v1/internal/telco_automation_tracing_stub.h index 3c61f49821850..61d63dea273e2 100644 --- a/google/cloud/telcoautomation/v1/internal/telco_automation_tracing_stub.h +++ b/google/cloud/telcoautomation/v1/internal/telco_automation_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace telcoautomation_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TelcoAutomationTracingStub : public TelcoAutomationStub { public: ~TelcoAutomationTracingStub() override = default; @@ -310,8 +311,6 @@ class TelcoAutomationTracingStub : public TelcoAutomationStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -326,4 +325,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TELCOAUTOMATION_V1_INTERNAL_TELCO_AUTOMATION_TRACING_STUB_H diff --git a/google/cloud/telcoautomation/v1/telco_automation_client.h b/google/cloud/telcoautomation/v1/telco_automation_client.h index 89558d25a5931..25ef61dcc34fe 100644 --- a/google/cloud/telcoautomation/v1/telco_automation_client.h +++ b/google/cloud/telcoautomation/v1/telco_automation_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/telcoautomation/v1/telco_automation_connection.h b/google/cloud/telcoautomation/v1/telco_automation_connection.h index 5760f41a94e74..ba4b84d74e49a 100644 --- a/google/cloud/telcoautomation/v1/telco_automation_connection.h +++ b/google/cloud/telcoautomation/v1/telco_automation_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/telcoautomation/v1/internal/telco_automation_retry_traits.h" #include "google/cloud/telcoautomation/v1/telco_automation_connection_idempotency_policy.h" +#include "google/cloud/telcoautomation/v1/telcoautomation.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/telcoautomation/v1/telco_automation_connection_idempotency_policy.h b/google/cloud/telcoautomation/v1/telco_automation_connection_idempotency_policy.h index 712c176f3915d..05c0d7f629d93 100644 --- a/google/cloud/telcoautomation/v1/telco_automation_connection_idempotency_policy.h +++ b/google/cloud/telcoautomation/v1/telco_automation_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TELCOAUTOMATION_V1_TELCO_AUTOMATION_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TELCOAUTOMATION_V1_TELCO_AUTOMATION_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/telcoautomation/v1/telcoautomation.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/testing_util/BUILD.bazel b/google/cloud/testing_util/BUILD.bazel index 5178fec5676e4..2deae82a3675b 100644 --- a/google/cloud/testing_util/BUILD.bazel +++ b/google/cloud/testing_util/BUILD.bazel @@ -41,27 +41,22 @@ cc_library( }), deps = [ "//:common", - "@com_google_absl//absl/debugging:failure_signal_handler", - "@com_google_absl//absl/debugging:symbolize", - "@com_google_googletest//:gtest_main", - ] + select({ - "//google/cloud:enable_opentelemetry": [ - "@io_opentelemetry_cpp//exporters/memory:in_memory_span_exporter", - "@io_opentelemetry_cpp//sdk/src/trace", - ], - "//conditions:default": [], - }), + "@abseil-cpp//absl/debugging:failure_signal_handler", + "@abseil-cpp//absl/debugging:symbolize", + "@googletest//:gtest_main", + "@opentelemetry-cpp//exporters/memory:in_memory_span_exporter", + "@opentelemetry-cpp//sdk/src/trace", + ], ) cc_library( name = "google_cloud_cpp_testing", testonly = True, - deprecation = """ - This target is deprecated and will be removed on or after 2023-04-01. More - info: https://github.com/googleapis/google-cloud-cpp/issues/3701 - """, tags = ["manual"], - visibility = ["//visibility:public"], + visibility = [ + ":__subpackages__", + "//:__pkg__", + ], deps = [":google_cloud_cpp_testing_private"], ) @@ -71,7 +66,7 @@ cc_library( deps = [ ":google_cloud_cpp_testing", "//:common", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) for test in google_cloud_cpp_testing_unit_tests] @@ -83,11 +78,11 @@ cc_library( deps = [ "//:common", "//:grpc_utils", - "@com_github_grpc_grpc//:grpc++", - "@com_google_googleapis//:googleapis_system_includes", - "@com_google_googleapis//google/api:annotations_cc_proto", - "@com_google_googleapis//google/api:routing_cc_proto", - "@com_google_googletest//:gtest_main", + "@grpc//:grpc++", + # "@googleapis//:googleapis_system_includes", + "@googleapis//google/api:annotations_cc_proto", + "@googleapis//google/api:routing_cc_proto", + "@googletest//:gtest_main", "@com_google_protobuf//:protobuf", ], ) @@ -95,12 +90,11 @@ cc_library( cc_library( name = "google_cloud_cpp_testing_grpc", testonly = True, - deprecation = """ - This target is deprecated and will be removed on or after 2023-04-01. More - info: https://github.com/googleapis/google-cloud-cpp/issues/3701 - """, tags = ["manual"], - visibility = ["//visibility:public"], + visibility = [ + ":__subpackages__", + "//:__pkg__", + ], deps = [":google_cloud_cpp_testing_grpc_private"], ) @@ -110,8 +104,8 @@ cc_library( deps = [ ":google_cloud_cpp_testing_grpc", "//:common", - "@com_google_googletest//:gtest_main", "@com_google_protobuf//:protobuf", + "@googletest//:gtest_main", ], ) for test in google_cloud_cpp_testing_grpc_unit_tests] @@ -122,18 +116,17 @@ cc_library( hdrs = google_cloud_cpp_testing_rest_hdrs, deps = [ "//google/cloud:google_cloud_cpp_rest_internal", - "@com_google_googletest//:gtest_main", + "@googletest//:gtest_main", ], ) cc_library( name = "google_cloud_cpp_testing_rest", testonly = True, - deprecation = """ - This target is deprecated and will be removed on or after 2023-04-01. More - info: https://github.com/googleapis/google-cloud-cpp/issues/3701 - """, tags = ["manual"], - visibility = ["//visibility:public"], + visibility = [ + ":__subpackages__", + "//:__pkg__", + ], deps = [":google_cloud_cpp_testing_rest_private"], ) diff --git a/google/cloud/testing_util/CMakeLists.txt b/google/cloud/testing_util/CMakeLists.txt index 79f02b6249e55..8028f70d70284 100644 --- a/google/cloud/testing_util/CMakeLists.txt +++ b/google/cloud/testing_util/CMakeLists.txt @@ -57,14 +57,10 @@ add_library( timer.h) target_link_libraries( google_cloud_cpp_testing - PUBLIC absl::symbolize absl::failure_signal_handler - google-cloud-cpp::common GTest::gmock) -if (opentelemetry-cpp_FOUND) - target_link_libraries( - google_cloud_cpp_testing - PRIVATE opentelemetry-cpp::in_memory_span_exporter - opentelemetry-cpp::trace) -endif () + PUBLIC absl::symbolize absl::failure_signal_handler google-cloud-cpp::common + GTest::gmock + PRIVATE opentelemetry-cpp::in_memory_span_exporter opentelemetry-cpp::trace) + google_cloud_cpp_add_common_options(google_cloud_cpp_testing) include(CheckCXXSymbolExists) diff --git a/google/cloud/testing_util/credentials.h b/google/cloud/testing_util/credentials.h index 593d568d9fde5..1aca048ccb02f 100644 --- a/google/cloud/testing_util/credentials.h +++ b/google/cloud/testing_util/credentials.h @@ -53,7 +53,11 @@ struct TestCredentialsVisitor : public internal::CredentialsVisitor { } void visit(internal::ServiceAccountConfig const& cfg) override { name = "ServiceAccountConfig"; - json_object = cfg.json_object(); + if (cfg.json_object()) { + json_object = *cfg.json_object(); + } else { + json_object = "cfg.file_path testing not implemented"; + } } void visit(internal::ExternalAccountConfig const& cfg) override { name = "ExternalAccountConfig"; diff --git a/google/cloud/testing_util/is_proto_equal_test.cc b/google/cloud/testing_util/is_proto_equal_test.cc index b13524b65589b..05f78ad4f9f2a 100644 --- a/google/cloud/testing_util/is_proto_equal_test.cc +++ b/google/cloud/testing_util/is_proto_equal_test.cc @@ -13,7 +13,7 @@ // limitations under the License. #include "google/cloud/testing_util/is_proto_equal.h" -#include +#include "google/protobuf/wrappers.pb.h" #include namespace google { diff --git a/google/cloud/testing_util/opentelemetry_matchers.cc b/google/cloud/testing_util/opentelemetry_matchers.cc index 86bcdaa2afa82..175e8b1a11b54 100644 --- a/google/cloud/testing_util/opentelemetry_matchers.cc +++ b/google/cloud/testing_util/opentelemetry_matchers.cc @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/testing_util/opentelemetry_matchers.h" -#include "google/cloud/internal/absl_str_join_quiet.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/internal/opentelemetry_context.h" #include "google/cloud/opentelemetry_options.h" +#include "absl/strings/str_join.h" #include #include #include #include #include +#include namespace { @@ -38,7 +38,6 @@ void AttributeFormatter( *out += "bool:"; *out += v ? "true" : "false"; } - void operator()(double v) const { *out += "double:" + std::to_string(v); } void operator()(std::int32_t v) const { *out += "std::int32_t:" + std::to_string(v); } @@ -48,9 +47,7 @@ void AttributeFormatter( void operator()(std::int64_t v) const { *out += "std::int64_t:" + std::to_string(v); } - void operator()(std::uint64_t v) const { - *out += "std::uint64_t:" + std::to_string(v); - } + void operator()(double v) const { *out += "double:" + std::to_string(v); } void operator()(std::string const& v) const { *out += "std::string:" + v; } void operator()(std::vector const& v) const { auto format = [](std::string* out, bool b) { @@ -58,16 +55,6 @@ void AttributeFormatter( }; *out += "std::vector:[" + absl::StrJoin(v, ", ", format) + "]"; } - void operator()(std::vector const& v) const { - *out += "std::vector:[" + absl::StrJoin(v, ", ") + "]"; - } - void operator()(std::vector const& v) const { - *out += "std::vector:[" + absl::StrJoin(v, ", ") + "]"; - } - void operator()(std::vector const& v) const { - *out += "std::vector:[" + absl::StrJoin(v, ", ") + "]"; - ; - } void operator()(std::vector const& v) const { *out += "std::vector:[" + absl::StrJoin(v, ", ") + "]"; } @@ -77,11 +64,23 @@ void AttributeFormatter( void operator()(std::vector const& v) const { *out += "std::vector:[" + absl::StrJoin(v, ", ") + "]"; } + void operator()(std::vector const& v) const { + *out += "std::vector:[" + absl::StrJoin(v, ", ") + "]"; + } + void operator()(std::vector const& v) const { + *out += "std::vector:[" + absl::StrJoin(v, ", ") + "]"; + } + void operator()(std::uint64_t v) const { + *out += "std::uint64_t:" + std::to_string(v); + } void operator()(std::vector const& v) const { *out += "std::vector:[" + absl::StrJoin(v, ", ") + "]"; } + void operator()(std::vector const& v) const { + *out += "std::vector:[" + absl::StrJoin(v, ", ") + "]"; + } }; - absl::visit(Visitor{out}, kv.second); + std::visit(Visitor{out}, kv.second); } } // namespace @@ -223,4 +222,3 @@ Options DisableTracing(Options options) { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY diff --git a/google/cloud/testing_util/opentelemetry_matchers.h b/google/cloud/testing_util/opentelemetry_matchers.h index 95fe7aeba92b3..885eb5fdcafa7 100644 --- a/google/cloud/testing_util/opentelemetry_matchers.h +++ b/google/cloud/testing_util/opentelemetry_matchers.h @@ -15,7 +15,6 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TESTING_UTIL_OPENTELEMETRY_MATCHERS_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TESTING_UTIL_OPENTELEMETRY_MATCHERS_H -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #include "google/cloud/future.h" #include "google/cloud/internal/opentelemetry_context.h" #include "google/cloud/options.h" @@ -403,6 +402,5 @@ class PromiseWithOTelContext { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TESTING_UTIL_OPENTELEMETRY_MATCHERS_H diff --git a/google/cloud/testing_util/validate_metadata.cc b/google/cloud/testing_util/validate_metadata.cc index 2744da532f331..229089b752535 100644 --- a/google/cloud/testing_util/validate_metadata.cc +++ b/google/cloud/testing_util/validate_metadata.cc @@ -13,15 +13,15 @@ // limitations under the License. #include "google/cloud/testing_util/validate_metadata.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" -#include "google/cloud/internal/absl_str_replace_quiet.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/log.h" #include "google/cloud/status_or.h" #include "absl/meta/type_traits.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_replace.h" #include "absl/strings/str_split.h" -#include -#include +#include "google/api/annotations.pb.h" +#include "google/api/routing.pb.h" #include #include #include diff --git a/google/cloud/texttospeech/BUILD.bazel b/google/cloud/texttospeech/BUILD.bazel index 912007a22e151..6454144ad675a 100644 --- a/google/cloud/texttospeech/BUILD.bazel +++ b/google/cloud/texttospeech/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/texttospeech/v1:texttospeech_cc_grpc", + "@googleapis//google/cloud/texttospeech/v1:texttospeech_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/texttospeech/CMakeLists.txt b/google/cloud/texttospeech/CMakeLists.txt index 080dcedb32e4d..5535b0583c3d6 100644 --- a/google/cloud/texttospeech/CMakeLists.txt +++ b/google/cloud/texttospeech/CMakeLists.txt @@ -18,7 +18,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library( texttospeech "Cloud Text-to-Speech API" - SERVICE_DIRS "__EMPTY__" "v1/" + SERVICE_DIRS "v1/" BACKWARDS_COMPAT_PROTO_TARGETS "cloud_texttospeech_protos") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) diff --git a/google/cloud/texttospeech/mocks/mock_text_to_speech_connection.h b/google/cloud/texttospeech/mocks/mock_text_to_speech_connection.h deleted file mode 100644 index 394b1166049ff..0000000000000 --- a/google/cloud/texttospeech/mocks/mock_text_to_speech_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/texttospeech/v1/cloud_tts.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TEXTTOSPEECH_MOCKS_MOCK_TEXT_TO_SPEECH_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TEXTTOSPEECH_MOCKS_MOCK_TEXT_TO_SPEECH_CONNECTION_H - -#include "google/cloud/texttospeech/text_to_speech_connection.h" -#include "google/cloud/texttospeech/v1/mocks/mock_text_to_speech_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in texttospeech_v1_mocks instead of the aliases -/// defined in this namespace. -namespace texttospeech_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use texttospeech_v1_mocks::MockTextToSpeechConnection directly. -using ::google::cloud::texttospeech_v1_mocks::MockTextToSpeechConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace texttospeech_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TEXTTOSPEECH_MOCKS_MOCK_TEXT_TO_SPEECH_CONNECTION_H diff --git a/google/cloud/texttospeech/quickstart/.bazelrc b/google/cloud/texttospeech/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/texttospeech/quickstart/.bazelrc +++ b/google/cloud/texttospeech/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/texttospeech/quickstart/CMakeLists.txt b/google/cloud/texttospeech/quickstart/CMakeLists.txt index 9ad5abd9c5bce..fac3d39b81942 100644 --- a/google/cloud/texttospeech/quickstart/CMakeLists.txt +++ b/google/cloud/texttospeech/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Text-to-Speech API C++ client library # from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-texttospeech-quickstart CXX) find_package(google_cloud_cpp_texttospeech REQUIRED) diff --git a/google/cloud/texttospeech/text_to_speech_client.h b/google/cloud/texttospeech/text_to_speech_client.h deleted file mode 100644 index c05b03d8a3b6c..0000000000000 --- a/google/cloud/texttospeech/text_to_speech_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/texttospeech/v1/cloud_tts.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TEXTTOSPEECH_TEXT_TO_SPEECH_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TEXTTOSPEECH_TEXT_TO_SPEECH_CLIENT_H - -#include "google/cloud/texttospeech/text_to_speech_connection.h" -#include "google/cloud/texttospeech/v1/text_to_speech_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in texttospeech_v1 instead of the aliases defined in -/// this namespace. -namespace texttospeech { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use texttospeech_v1::TextToSpeechClient directly. -using ::google::cloud::texttospeech_v1::TextToSpeechClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace texttospeech -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TEXTTOSPEECH_TEXT_TO_SPEECH_CLIENT_H diff --git a/google/cloud/texttospeech/text_to_speech_connection.h b/google/cloud/texttospeech/text_to_speech_connection.h deleted file mode 100644 index f05a635007bc9..0000000000000 --- a/google/cloud/texttospeech/text_to_speech_connection.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/texttospeech/v1/cloud_tts.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TEXTTOSPEECH_TEXT_TO_SPEECH_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TEXTTOSPEECH_TEXT_TO_SPEECH_CONNECTION_H - -#include "google/cloud/texttospeech/text_to_speech_connection_idempotency_policy.h" -#include "google/cloud/texttospeech/v1/text_to_speech_connection.h" - -namespace google { -namespace cloud { -namespace texttospeech { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use texttospeech_v1::MakeTextToSpeechConnection directly. -using ::google::cloud::texttospeech_v1::MakeTextToSpeechConnection; - -/// @deprecated Use texttospeech_v1::TextToSpeechConnection directly. -using ::google::cloud::texttospeech_v1::TextToSpeechConnection; - -/// @deprecated Use texttospeech_v1::TextToSpeechLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::texttospeech_v1:: - TextToSpeechLimitedErrorCountRetryPolicy; - -/// @deprecated Use texttospeech_v1::TextToSpeechLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::texttospeech_v1::TextToSpeechLimitedTimeRetryPolicy; - -/// @deprecated Use texttospeech_v1::TextToSpeechRetryPolicy directly. -using ::google::cloud::texttospeech_v1::TextToSpeechRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace texttospeech -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TEXTTOSPEECH_TEXT_TO_SPEECH_CONNECTION_H diff --git a/google/cloud/texttospeech/text_to_speech_connection_idempotency_policy.h b/google/cloud/texttospeech/text_to_speech_connection_idempotency_policy.h deleted file mode 100644 index 84263e946f763..0000000000000 --- a/google/cloud/texttospeech/text_to_speech_connection_idempotency_policy.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/texttospeech/v1/cloud_tts.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TEXTTOSPEECH_TEXT_TO_SPEECH_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TEXTTOSPEECH_TEXT_TO_SPEECH_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/texttospeech/v1/text_to_speech_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace texttospeech { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// texttospeech_v1::MakeDefaultTextToSpeechConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::texttospeech_v1:: - MakeDefaultTextToSpeechConnectionIdempotencyPolicy; - -/// @deprecated Use texttospeech_v1::TextToSpeechConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::texttospeech_v1::TextToSpeechConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace texttospeech -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TEXTTOSPEECH_TEXT_TO_SPEECH_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/texttospeech/text_to_speech_options.h b/google/cloud/texttospeech/text_to_speech_options.h deleted file mode 100644 index 64753be7e04db..0000000000000 --- a/google/cloud/texttospeech/text_to_speech_options.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/texttospeech/v1/cloud_tts.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TEXTTOSPEECH_TEXT_TO_SPEECH_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TEXTTOSPEECH_TEXT_TO_SPEECH_OPTIONS_H - -#include "google/cloud/texttospeech/text_to_speech_connection.h" -#include "google/cloud/texttospeech/text_to_speech_connection_idempotency_policy.h" -#include "google/cloud/texttospeech/v1/text_to_speech_options.h" - -namespace google { -namespace cloud { -namespace texttospeech { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use texttospeech_v1::TextToSpeechBackoffPolicyOption directly. -using ::google::cloud::texttospeech_v1::TextToSpeechBackoffPolicyOption; - -/// @deprecated Use -/// texttospeech_v1::TextToSpeechConnectionIdempotencyPolicyOption directly. -using ::google::cloud::texttospeech_v1:: - TextToSpeechConnectionIdempotencyPolicyOption; - -/// @deprecated Use texttospeech_v1::TextToSpeechPolicyOptionList directly. -using ::google::cloud::texttospeech_v1::TextToSpeechPolicyOptionList; - -/// @deprecated Use texttospeech_v1::TextToSpeechRetryPolicyOption directly. -using ::google::cloud::texttospeech_v1::TextToSpeechRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace texttospeech -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TEXTTOSPEECH_TEXT_TO_SPEECH_OPTIONS_H diff --git a/google/cloud/texttospeech/v1/internal/text_to_speech_auth_decorator.cc b/google/cloud/texttospeech/v1/internal/text_to_speech_auth_decorator.cc index c2b88730af878..7be6d2e622279 100644 --- a/google/cloud/texttospeech/v1/internal/text_to_speech_auth_decorator.cc +++ b/google/cloud/texttospeech/v1/internal/text_to_speech_auth_decorator.cc @@ -17,11 +17,14 @@ // source: google/cloud/texttospeech/v1/cloud_tts.proto #include "google/cloud/texttospeech/v1/internal/text_to_speech_auth_decorator.h" +#include "google/cloud/texttospeech/v1/cloud_tts.grpc.pb.h" #include "google/cloud/internal/async_read_write_stream_auth.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace texttospeech_v1_internal { @@ -90,3 +93,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace texttospeech_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/texttospeech/v1/internal/text_to_speech_auth_decorator.h b/google/cloud/texttospeech/v1/internal/text_to_speech_auth_decorator.h index 4c6923c587ba6..7ab1dacee8347 100644 --- a/google/cloud/texttospeech/v1/internal/text_to_speech_auth_decorator.h +++ b/google/cloud/texttospeech/v1/internal/text_to_speech_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace texttospeech_v1_internal { @@ -75,4 +78,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TEXTTOSPEECH_V1_INTERNAL_TEXT_TO_SPEECH_AUTH_DECORATOR_H diff --git a/google/cloud/texttospeech/v1/internal/text_to_speech_logging_decorator.cc b/google/cloud/texttospeech/v1/internal/text_to_speech_logging_decorator.cc index 589b6f78db9c5..2f87b44a411c0 100644 --- a/google/cloud/texttospeech/v1/internal/text_to_speech_logging_decorator.cc +++ b/google/cloud/texttospeech/v1/internal/text_to_speech_logging_decorator.cc @@ -17,15 +17,18 @@ // source: google/cloud/texttospeech/v1/cloud_tts.proto #include "google/cloud/texttospeech/v1/internal/text_to_speech_logging_decorator.h" +#include "google/cloud/texttospeech/v1/cloud_tts.grpc.pb.h" #include "google/cloud/internal/async_read_write_stream_logging.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace texttospeech_v1_internal { @@ -114,3 +117,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace texttospeech_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/texttospeech/v1/internal/text_to_speech_logging_decorator.h b/google/cloud/texttospeech/v1/internal/text_to_speech_logging_decorator.h index 88c8d7960540d..93d44b62f36bf 100644 --- a/google/cloud/texttospeech/v1/internal/text_to_speech_logging_decorator.h +++ b/google/cloud/texttospeech/v1/internal/text_to_speech_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace texttospeech_v1_internal { @@ -76,4 +79,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TEXTTOSPEECH_V1_INTERNAL_TEXT_TO_SPEECH_LOGGING_DECORATOR_H diff --git a/google/cloud/texttospeech/v1/internal/text_to_speech_metadata_decorator.cc b/google/cloud/texttospeech/v1/internal/text_to_speech_metadata_decorator.cc index 6207b7735cd2b..fe5c66af7117f 100644 --- a/google/cloud/texttospeech/v1/internal/text_to_speech_metadata_decorator.cc +++ b/google/cloud/texttospeech/v1/internal/text_to_speech_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/texttospeech/v1/cloud_tts.proto #include "google/cloud/texttospeech/v1/internal/text_to_speech_metadata_decorator.h" +#include "google/cloud/texttospeech/v1/cloud_tts.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace texttospeech_v1_internal { @@ -106,3 +110,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace texttospeech_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/texttospeech/v1/internal/text_to_speech_metadata_decorator.h b/google/cloud/texttospeech/v1/internal/text_to_speech_metadata_decorator.h index 383518e041099..242d531bb96ef 100644 --- a/google/cloud/texttospeech/v1/internal/text_to_speech_metadata_decorator.h +++ b/google/cloud/texttospeech/v1/internal/text_to_speech_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace texttospeech_v1_internal { @@ -80,4 +83,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TEXTTOSPEECH_V1_INTERNAL_TEXT_TO_SPEECH_METADATA_DECORATOR_H diff --git a/google/cloud/texttospeech/v1/internal/text_to_speech_option_defaults.cc b/google/cloud/texttospeech/v1/internal/text_to_speech_option_defaults.cc index d94afbfea8236..13408f2d12a49 100644 --- a/google/cloud/texttospeech/v1/internal/text_to_speech_option_defaults.cc +++ b/google/cloud/texttospeech/v1/internal/text_to_speech_option_defaults.cc @@ -42,7 +42,7 @@ Options TextToSpeechDefaultOptions(Options options) { if (!options.has()) { options.set( texttospeech_v1::TextToSpeechLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/texttospeech/v1/internal/text_to_speech_stub.cc b/google/cloud/texttospeech/v1/internal/text_to_speech_stub.cc index 3cb7412ef4be2..676fdcd1d9660 100644 --- a/google/cloud/texttospeech/v1/internal/text_to_speech_stub.cc +++ b/google/cloud/texttospeech/v1/internal/text_to_speech_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/texttospeech/v1/cloud_tts.proto #include "google/cloud/texttospeech/v1/internal/text_to_speech_stub.h" +#include "google/cloud/texttospeech/v1/cloud_tts.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/internal/async_read_write_stream_impl.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace texttospeech_v1_internal { @@ -98,3 +101,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace texttospeech_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/texttospeech/v1/internal/text_to_speech_stub.h b/google/cloud/texttospeech/v1/internal/text_to_speech_stub.h index d18599cfc12a9..bc66d83d3555d 100644 --- a/google/cloud/texttospeech/v1/internal/text_to_speech_stub.h +++ b/google/cloud/texttospeech/v1/internal/text_to_speech_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TEXTTOSPEECH_V1_INTERNAL_TEXT_TO_SPEECH_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TEXTTOSPEECH_V1_INTERNAL_TEXT_TO_SPEECH_STUB_H +#include "google/cloud/texttospeech/v1/cloud_tts.grpc.pb.h" #include "google/cloud/async_streaming_read_write_rpc.h" #include "google/cloud/completion_queue.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace texttospeech_v1_internal { @@ -116,4 +119,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TEXTTOSPEECH_V1_INTERNAL_TEXT_TO_SPEECH_STUB_H diff --git a/google/cloud/texttospeech/v1/internal/text_to_speech_stub_factory.cc b/google/cloud/texttospeech/v1/internal/text_to_speech_stub_factory.cc index 3317a73025a3f..d121f448792dc 100644 --- a/google/cloud/texttospeech/v1/internal/text_to_speech_stub_factory.cc +++ b/google/cloud/texttospeech/v1/internal/text_to_speech_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/texttospeech/v1/cloud_tts.proto #include "google/cloud/texttospeech/v1/internal/text_to_speech_stub_factory.h" +#include "google/cloud/texttospeech/v1/cloud_tts.grpc.pb.h" #include "google/cloud/texttospeech/v1/internal/text_to_speech_auth_decorator.h" #include "google/cloud/texttospeech/v1/internal/text_to_speech_logging_decorator.h" #include "google/cloud/texttospeech/v1/internal/text_to_speech_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace texttospeech_v1_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace texttospeech_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/texttospeech/v1/internal/text_to_speech_stub_factory.h b/google/cloud/texttospeech/v1/internal/text_to_speech_stub_factory.h index ee730e65bf883..60387d74473f6 100644 --- a/google/cloud/texttospeech/v1/internal/text_to_speech_stub_factory.h +++ b/google/cloud/texttospeech/v1/internal/text_to_speech_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace texttospeech_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TEXTTOSPEECH_V1_INTERNAL_TEXT_TO_SPEECH_STUB_FACTORY_H diff --git a/google/cloud/texttospeech/v1/internal/text_to_speech_tracing_connection.cc b/google/cloud/texttospeech/v1/internal/text_to_speech_tracing_connection.cc index a56f96b2c7a09..f3a6db8f32503 100644 --- a/google/cloud/texttospeech/v1/internal/text_to_speech_tracing_connection.cc +++ b/google/cloud/texttospeech/v1/internal/text_to_speech_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace texttospeech_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TextToSpeechTracingConnection::TextToSpeechTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -78,16 +76,12 @@ TextToSpeechTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTextToSpeechTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/texttospeech/v1/internal/text_to_speech_tracing_connection.h b/google/cloud/texttospeech/v1/internal/text_to_speech_tracing_connection.h index 4ce81470d193d..14faf220546ad 100644 --- a/google/cloud/texttospeech/v1/internal/text_to_speech_tracing_connection.h +++ b/google/cloud/texttospeech/v1/internal/text_to_speech_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace texttospeech_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TextToSpeechTracingConnection : public texttospeech_v1::TextToSpeechConnection { public: @@ -64,8 +62,6 @@ class TextToSpeechTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/texttospeech/v1/internal/text_to_speech_tracing_stub.cc b/google/cloud/texttospeech/v1/internal/text_to_speech_tracing_stub.cc index 7eb555f5f322f..9b711cac57af6 100644 --- a/google/cloud/texttospeech/v1/internal/text_to_speech_tracing_stub.cc +++ b/google/cloud/texttospeech/v1/internal/text_to_speech_tracing_stub.cc @@ -22,13 +22,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace texttospeech_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TextToSpeechTracingStub::TextToSpeechTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -98,18 +99,14 @@ StatusOr TextToSpeechTracingStub::GetOperation( child_->GetOperation(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTextToSpeechTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace texttospeech_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/texttospeech/v1/internal/text_to_speech_tracing_stub.h b/google/cloud/texttospeech/v1/internal/text_to_speech_tracing_stub.h index 9990f8fd8e390..76ba7f6d2cf94 100644 --- a/google/cloud/texttospeech/v1/internal/text_to_speech_tracing_stub.h +++ b/google/cloud/texttospeech/v1/internal/text_to_speech_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace texttospeech_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TextToSpeechTracingStub : public TextToSpeechStub { public: ~TextToSpeechTracingStub() override = default; @@ -71,8 +72,6 @@ class TextToSpeechTracingStub : public TextToSpeechStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -87,4 +86,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TEXTTOSPEECH_V1_INTERNAL_TEXT_TO_SPEECH_TRACING_STUB_H diff --git a/google/cloud/texttospeech/v1/text_to_speech_connection.h b/google/cloud/texttospeech/v1/text_to_speech_connection.h index f99e459840639..a6f5e14218de8 100644 --- a/google/cloud/texttospeech/v1/text_to_speech_connection.h +++ b/google/cloud/texttospeech/v1/text_to_speech_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TEXTTOSPEECH_V1_TEXT_TO_SPEECH_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TEXTTOSPEECH_V1_TEXT_TO_SPEECH_CONNECTION_H +#include "google/cloud/texttospeech/v1/cloud_tts.pb.h" #include "google/cloud/texttospeech/v1/internal/text_to_speech_retry_traits.h" #include "google/cloud/texttospeech/v1/text_to_speech_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -28,7 +29,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/texttospeech/v1/text_to_speech_connection_idempotency_policy.h b/google/cloud/texttospeech/v1/text_to_speech_connection_idempotency_policy.h index f644468547c1d..415882d4d0968 100644 --- a/google/cloud/texttospeech/v1/text_to_speech_connection_idempotency_policy.h +++ b/google/cloud/texttospeech/v1/text_to_speech_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TEXTTOSPEECH_V1_TEXT_TO_SPEECH_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TEXTTOSPEECH_V1_TEXT_TO_SPEECH_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/texttospeech/v1/cloud_tts.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/timeseriesinsights/BUILD.bazel b/google/cloud/timeseriesinsights/BUILD.bazel index dc294a941059d..bc0dfb0561e09 100644 --- a/google/cloud/timeseriesinsights/BUILD.bazel +++ b/google/cloud/timeseriesinsights/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/timeseriesinsights/v1:timeseriesinsights_cc_grpc", + "@googleapis//google/cloud/timeseriesinsights/v1:timeseriesinsights_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/timeseriesinsights/quickstart/.bazelrc b/google/cloud/timeseriesinsights/quickstart/.bazelrc index 6777c6b4c95de..ec27511a60add 100644 --- a/google/cloud/timeseriesinsights/quickstart/.bazelrc +++ b/google/cloud/timeseriesinsights/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/timeseriesinsights/quickstart/CMakeLists.txt b/google/cloud/timeseriesinsights/quickstart/CMakeLists.txt index 7479a66b9305b..4a60c6fdd0bce 100644 --- a/google/cloud/timeseriesinsights/quickstart/CMakeLists.txt +++ b/google/cloud/timeseriesinsights/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Timeseries Insights API C++ client library from # a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-timeseriesinsights-quickstart CXX) find_package(google_cloud_cpp_timeseriesinsights REQUIRED) diff --git a/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_auth_decorator.cc b/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_auth_decorator.cc index ff70ac4de70be..f6f4ad3a12d9d 100644 --- a/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_auth_decorator.cc +++ b/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/timeseriesinsights/v1/timeseries_insights.proto #include "google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_auth_decorator.h" -#include +#include "google/cloud/timeseriesinsights/v1/timeseries_insights.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace timeseriesinsights_v1_internal { @@ -101,3 +104,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace timeseriesinsights_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_auth_decorator.h b/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_auth_decorator.h index c848e3d606a28..64e44ef207560 100644 --- a/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_auth_decorator.h +++ b/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace timeseriesinsights_v1_internal { @@ -85,4 +88,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TIMESERIESINSIGHTS_V1_INTERNAL_TIMESERIES_INSIGHTS_CONTROLLER_AUTH_DECORATOR_H diff --git a/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_logging_decorator.cc b/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_logging_decorator.cc index d87ea7a2b7fed..7b4030a474ec6 100644 --- a/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_logging_decorator.cc +++ b/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/timeseriesinsights/v1/timeseries_insights.proto #include "google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_logging_decorator.h" +#include "google/cloud/timeseriesinsights/v1/timeseries_insights.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace timeseriesinsights_v1_internal { @@ -133,3 +136,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace timeseriesinsights_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_logging_decorator.h b/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_logging_decorator.h index 496b39d656940..33a660a08ee28 100644 --- a/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_logging_decorator.h +++ b/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace timeseriesinsights_v1_internal { @@ -85,4 +88,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TIMESERIESINSIGHTS_V1_INTERNAL_TIMESERIES_INSIGHTS_CONTROLLER_LOGGING_DECORATOR_H diff --git a/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_metadata_decorator.cc b/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_metadata_decorator.cc index dbd6e867da7d1..d9d6f1ae6b974 100644 --- a/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_metadata_decorator.cc +++ b/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/timeseriesinsights/v1/timeseries_insights.proto #include "google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_metadata_decorator.h" +#include "google/cloud/timeseriesinsights/v1/timeseries_insights.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace timeseriesinsights_v1_internal { @@ -127,3 +131,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace timeseriesinsights_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_metadata_decorator.h b/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_metadata_decorator.h index d445bcda73d7b..60bff78ea7d99 100644 --- a/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_metadata_decorator.h +++ b/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace timeseriesinsights_v1_internal { @@ -91,4 +94,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TIMESERIESINSIGHTS_V1_INTERNAL_TIMESERIES_INSIGHTS_CONTROLLER_METADATA_DECORATOR_H diff --git a/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_option_defaults.cc b/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_option_defaults.cc index c090d9764c0ad..40a9dfbfe6428 100644 --- a/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_option_defaults.cc +++ b/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_option_defaults.cc @@ -46,7 +46,7 @@ Options TimeseriesInsightsControllerDefaultOptions(Options options) { timeseriesinsights_v1::TimeseriesInsightsControllerRetryPolicyOption>( timeseriesinsights_v1:: TimeseriesInsightsControllerLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace timeseriesinsights_v1_internal { @@ -121,3 +124,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace timeseriesinsights_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_stub.h b/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_stub.h index 888df3a1ee540..2d9b1afd28bf6 100644 --- a/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_stub.h +++ b/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TIMESERIESINSIGHTS_V1_INTERNAL_TIMESERIES_INSIGHTS_CONTROLLER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TIMESERIESINSIGHTS_V1_INTERNAL_TIMESERIES_INSIGHTS_CONTROLLER_STUB_H +#include "google/cloud/timeseriesinsights/v1/timeseries_insights.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace timeseriesinsights_v1_internal { @@ -130,4 +133,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TIMESERIESINSIGHTS_V1_INTERNAL_TIMESERIES_INSIGHTS_CONTROLLER_STUB_H diff --git a/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_stub_factory.cc b/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_stub_factory.cc index 2305b3e61e340..6851acefec779 100644 --- a/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_stub_factory.cc +++ b/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_metadata_decorator.h" #include "google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_stub.h" #include "google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_tracing_stub.h" +#include "google/cloud/timeseriesinsights/v1/timeseries_insights.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace timeseriesinsights_v1_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace timeseriesinsights_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_stub_factory.h b/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_stub_factory.h index 502858b0d904a..3613c6496dd00 100644 --- a/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_stub_factory.h +++ b/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace timeseriesinsights_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TIMESERIESINSIGHTS_V1_INTERNAL_TIMESERIES_INSIGHTS_CONTROLLER_STUB_FACTORY_H diff --git a/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_tracing_connection.cc b/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_tracing_connection.cc index e873f7d0b5d38..4b7471916883e 100644 --- a/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_tracing_connection.cc +++ b/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace timeseriesinsights_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TimeseriesInsightsControllerTracingConnection:: TimeseriesInsightsControllerTracingConnection( std::shared_ptr< @@ -112,19 +110,15 @@ TimeseriesInsightsControllerTracingConnection::EvaluateTimeseries( return internal::EndSpan(*span, child_->EvaluateTimeseries(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTimeseriesInsightsControllerTracingConnection( std::shared_ptr< timeseriesinsights_v1::TimeseriesInsightsControllerConnection> conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_tracing_connection.h b/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_tracing_connection.h index f0637f15e1967..0d767760e3c42 100644 --- a/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_tracing_connection.h +++ b/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace timeseriesinsights_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TimeseriesInsightsControllerTracingConnection : public timeseriesinsights_v1::TimeseriesInsightsControllerConnection { public: @@ -76,8 +74,6 @@ class TimeseriesInsightsControllerTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_tracing_stub.cc b/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_tracing_stub.cc index c610487c4cfdd..4785e182c5b73 100644 --- a/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_tracing_stub.cc +++ b/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace timeseriesinsights_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TimeseriesInsightsControllerTracingStub:: TimeseriesInsightsControllerTracingStub( std::shared_ptr child) @@ -127,20 +128,16 @@ TimeseriesInsightsControllerTracingStub::EvaluateTimeseries( context, *span, child_->EvaluateTimeseries(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTimeseriesInsightsControllerTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared( std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace timeseriesinsights_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_tracing_stub.h b/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_tracing_stub.h index e2fb882ed1e8d..1f78c42f5edb5 100644 --- a/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_tracing_stub.h +++ b/google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace timeseriesinsights_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TimeseriesInsightsControllerTracingStub : public TimeseriesInsightsControllerStub { public: @@ -82,8 +83,6 @@ class TimeseriesInsightsControllerTracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -99,4 +98,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TIMESERIESINSIGHTS_V1_INTERNAL_TIMESERIES_INSIGHTS_CONTROLLER_TRACING_STUB_H diff --git a/google/cloud/timeseriesinsights/v1/timeseries_insights_controller_connection.h b/google/cloud/timeseriesinsights/v1/timeseries_insights_controller_connection.h index 69fd5b335f1b0..2db73e03c4c6a 100644 --- a/google/cloud/timeseriesinsights/v1/timeseries_insights_controller_connection.h +++ b/google/cloud/timeseriesinsights/v1/timeseries_insights_controller_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TIMESERIESINSIGHTS_V1_TIMESERIES_INSIGHTS_CONTROLLER_CONNECTION_H #include "google/cloud/timeseriesinsights/v1/internal/timeseries_insights_controller_retry_traits.h" +#include "google/cloud/timeseriesinsights/v1/timeseries_insights.pb.h" #include "google/cloud/timeseriesinsights/v1/timeseries_insights_controller_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/timeseriesinsights/v1/timeseries_insights_controller_connection_idempotency_policy.h b/google/cloud/timeseriesinsights/v1/timeseries_insights_controller_connection_idempotency_policy.h index 7ae9671c09848..72dff89bd7666 100644 --- a/google/cloud/timeseriesinsights/v1/timeseries_insights_controller_connection_idempotency_policy.h +++ b/google/cloud/timeseriesinsights/v1/timeseries_insights_controller_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TIMESERIESINSIGHTS_V1_TIMESERIES_INSIGHTS_CONTROLLER_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TIMESERIESINSIGHTS_V1_TIMESERIES_INSIGHTS_CONTROLLER_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/timeseriesinsights/v1/timeseries_insights.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/tpu/BUILD.bazel b/google/cloud/tpu/BUILD.bazel index 2c84443519e07..b50bd2439cc46 100644 --- a/google/cloud/tpu/BUILD.bazel +++ b/google/cloud/tpu/BUILD.bazel @@ -19,14 +19,13 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", "v2/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/tpu/v1:tpu_cc_grpc", - "@com_google_googleapis//google/cloud/tpu/v2:tpu_cc_grpc", + "@googleapis//google/cloud/tpu/v1:tpu_cc_grpc", + "@googleapis//google/cloud/tpu/v2:tpu_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/tpu/CMakeLists.txt b/google/cloud/tpu/CMakeLists.txt index 38fde08179d22..1df1bad6d6ef5 100644 --- a/google/cloud/tpu/CMakeLists.txt +++ b/google/cloud/tpu/CMakeLists.txt @@ -16,8 +16,7 @@ include(GoogleCloudCppLibrary) -google_cloud_cpp_add_gapic_library(tpu "Cloud TPU API" SERVICE_DIRS "__EMPTY__" - "v1/" "v2/") +google_cloud_cpp_add_gapic_library(tpu "Cloud TPU API" SERVICE_DIRS "v1/" "v2/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(tpu_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/tpu/mocks/mock_tpu_connection.h b/google/cloud/tpu/mocks/mock_tpu_connection.h deleted file mode 100644 index 8409ecff3c730..0000000000000 --- a/google/cloud/tpu/mocks/mock_tpu_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/tpu/v1/cloud_tpu.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_MOCKS_MOCK_TPU_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_MOCKS_MOCK_TPU_CONNECTION_H - -#include "google/cloud/tpu/tpu_connection.h" -#include "google/cloud/tpu/v1/mocks/mock_tpu_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in tpu_v1_mocks instead of the aliases -/// defined in this namespace. -namespace tpu_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use tpu_v1_mocks::MockTpuConnection directly. -using ::google::cloud::tpu_v1_mocks::MockTpuConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace tpu_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_MOCKS_MOCK_TPU_CONNECTION_H diff --git a/google/cloud/tpu/quickstart/.bazelrc b/google/cloud/tpu/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/tpu/quickstart/.bazelrc +++ b/google/cloud/tpu/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/tpu/quickstart/CMakeLists.txt b/google/cloud/tpu/quickstart/CMakeLists.txt index b69308ca9f259..0234ec0214f2f 100644 --- a/google/cloud/tpu/quickstart/CMakeLists.txt +++ b/google/cloud/tpu/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud TPU API C++ client library from a larger # CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-tpu-quickstart CXX) find_package(google_cloud_cpp_tpu REQUIRED) diff --git a/google/cloud/tpu/tpu_client.h b/google/cloud/tpu/tpu_client.h deleted file mode 100644 index a222c4a6c950e..0000000000000 --- a/google/cloud/tpu/tpu_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/tpu/v1/cloud_tpu.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_TPU_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_TPU_CLIENT_H - -#include "google/cloud/tpu/tpu_connection.h" -#include "google/cloud/tpu/v1/tpu_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in tpu_v1 instead of the aliases defined in -/// this namespace. -namespace tpu { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use tpu_v1::TpuClient directly. -using ::google::cloud::tpu_v1::TpuClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace tpu -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_TPU_CLIENT_H diff --git a/google/cloud/tpu/tpu_connection.h b/google/cloud/tpu/tpu_connection.h deleted file mode 100644 index 120cd44a2f55e..0000000000000 --- a/google/cloud/tpu/tpu_connection.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/tpu/v1/cloud_tpu.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_TPU_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_TPU_CONNECTION_H - -#include "google/cloud/tpu/tpu_connection_idempotency_policy.h" -#include "google/cloud/tpu/v1/tpu_connection.h" - -namespace google { -namespace cloud { -namespace tpu { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use tpu_v1::MakeTpuConnection directly. -using ::google::cloud::tpu_v1::MakeTpuConnection; - -/// @deprecated Use tpu_v1::TpuConnection directly. -using ::google::cloud::tpu_v1::TpuConnection; - -/// @deprecated Use tpu_v1::TpuLimitedErrorCountRetryPolicy directly. -using ::google::cloud::tpu_v1::TpuLimitedErrorCountRetryPolicy; - -/// @deprecated Use tpu_v1::TpuLimitedTimeRetryPolicy directly. -using ::google::cloud::tpu_v1::TpuLimitedTimeRetryPolicy; - -/// @deprecated Use tpu_v1::TpuRetryPolicy directly. -using ::google::cloud::tpu_v1::TpuRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace tpu -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_TPU_CONNECTION_H diff --git a/google/cloud/tpu/tpu_connection_idempotency_policy.h b/google/cloud/tpu/tpu_connection_idempotency_policy.h deleted file mode 100644 index 9b65c54d63a01..0000000000000 --- a/google/cloud/tpu/tpu_connection_idempotency_policy.h +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/tpu/v1/cloud_tpu.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_TPU_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_TPU_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/tpu/v1/tpu_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace tpu { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use tpu_v1::MakeDefaultTpuConnectionIdempotencyPolicy directly. -using ::google::cloud::tpu_v1::MakeDefaultTpuConnectionIdempotencyPolicy; - -/// @deprecated Use tpu_v1::TpuConnectionIdempotencyPolicy directly. -using ::google::cloud::tpu_v1::TpuConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace tpu -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_TPU_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/tpu/tpu_options.h b/google/cloud/tpu/tpu_options.h deleted file mode 100644 index 3f25bc93de56d..0000000000000 --- a/google/cloud/tpu/tpu_options.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/tpu/v1/cloud_tpu.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_TPU_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_TPU_OPTIONS_H - -#include "google/cloud/tpu/tpu_connection.h" -#include "google/cloud/tpu/tpu_connection_idempotency_policy.h" -#include "google/cloud/tpu/v1/tpu_options.h" - -namespace google { -namespace cloud { -namespace tpu { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use tpu_v1::TpuPollingPolicyOption directly. -using ::google::cloud::tpu_v1::TpuPollingPolicyOption; - -/// @deprecated Use tpu_v1::TpuBackoffPolicyOption directly. -using ::google::cloud::tpu_v1::TpuBackoffPolicyOption; - -/// @deprecated Use tpu_v1::TpuConnectionIdempotencyPolicyOption directly. -using ::google::cloud::tpu_v1::TpuConnectionIdempotencyPolicyOption; - -/// @deprecated Use tpu_v1::TpuPolicyOptionList directly. -using ::google::cloud::tpu_v1::TpuPolicyOptionList; - -/// @deprecated Use tpu_v1::TpuRetryPolicyOption directly. -using ::google::cloud::tpu_v1::TpuRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace tpu -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_TPU_OPTIONS_H diff --git a/google/cloud/tpu/v1/internal/tpu_auth_decorator.cc b/google/cloud/tpu/v1/internal/tpu_auth_decorator.cc index 050a10b55c232..e256d385679b3 100644 --- a/google/cloud/tpu/v1/internal/tpu_auth_decorator.cc +++ b/google/cloud/tpu/v1/internal/tpu_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/tpu/v1/cloud_tpu.proto #include "google/cloud/tpu/v1/internal/tpu_auth_decorator.h" -#include +#include "google/cloud/tpu/v1/cloud_tpu.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tpu_v1_internal { @@ -304,3 +307,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace tpu_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/tpu/v1/internal/tpu_auth_decorator.h b/google/cloud/tpu/v1/internal/tpu_auth_decorator.h index 0ea687762ea28..c9835650aded2 100644 --- a/google/cloud/tpu/v1/internal/tpu_auth_decorator.h +++ b/google/cloud/tpu/v1/internal/tpu_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/tpu/v1/internal/tpu_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tpu_v1_internal { @@ -165,4 +168,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_V1_INTERNAL_TPU_AUTH_DECORATOR_H diff --git a/google/cloud/tpu/v1/internal/tpu_connection_impl.h b/google/cloud/tpu/v1/internal/tpu_connection_impl.h index 55e228bdbf300..5da01cfedda88 100644 --- a/google/cloud/tpu/v1/internal/tpu_connection_impl.h +++ b/google/cloud/tpu/v1/internal/tpu_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/tpu/v1/internal/tpu_logging_decorator.cc b/google/cloud/tpu/v1/internal/tpu_logging_decorator.cc index aa0db4525fec9..b54737de8d991 100644 --- a/google/cloud/tpu/v1/internal/tpu_logging_decorator.cc +++ b/google/cloud/tpu/v1/internal/tpu_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/tpu/v1/cloud_tpu.proto #include "google/cloud/tpu/v1/internal/tpu_logging_decorator.h" +#include "google/cloud/tpu/v1/cloud_tpu.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tpu_v1_internal { @@ -354,3 +357,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace tpu_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/tpu/v1/internal/tpu_logging_decorator.h b/google/cloud/tpu/v1/internal/tpu_logging_decorator.h index 63423196a070f..3242463cf7767 100644 --- a/google/cloud/tpu/v1/internal/tpu_logging_decorator.h +++ b/google/cloud/tpu/v1/internal/tpu_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/tpu/v1/internal/tpu_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tpu_v1_internal { @@ -164,4 +167,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_V1_INTERNAL_TPU_LOGGING_DECORATOR_H diff --git a/google/cloud/tpu/v1/internal/tpu_metadata_decorator.cc b/google/cloud/tpu/v1/internal/tpu_metadata_decorator.cc index 766b049e865ae..5f28c1f2a3168 100644 --- a/google/cloud/tpu/v1/internal/tpu_metadata_decorator.cc +++ b/google/cloud/tpu/v1/internal/tpu_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/tpu/v1/cloud_tpu.proto #include "google/cloud/tpu/v1/internal/tpu_metadata_decorator.h" +#include "google/cloud/tpu/v1/cloud_tpu.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tpu_v1_internal { @@ -279,3 +283,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace tpu_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/tpu/v1/internal/tpu_metadata_decorator.h b/google/cloud/tpu/v1/internal/tpu_metadata_decorator.h index d965b3af2d954..be057f8200674 100644 --- a/google/cloud/tpu/v1/internal/tpu_metadata_decorator.h +++ b/google/cloud/tpu/v1/internal/tpu_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/tpu/v1/internal/tpu_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tpu_v1_internal { @@ -170,4 +173,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_V1_INTERNAL_TPU_METADATA_DECORATOR_H diff --git a/google/cloud/tpu/v1/internal/tpu_option_defaults.cc b/google/cloud/tpu/v1/internal/tpu_option_defaults.cc index f8b005b69db33..944c1b3a474ec 100644 --- a/google/cloud/tpu/v1/internal/tpu_option_defaults.cc +++ b/google/cloud/tpu/v1/internal/tpu_option_defaults.cc @@ -40,7 +40,7 @@ Options TpuDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - tpu_v1::TpuLimitedTimeRetryPolicy(std::chrono::minutes(30)).clone()); + tpu_v1::TpuLimitedTimeRetryPolicy(std::chrono::minutes(10)).clone()); } if (!options.has()) { options.set( diff --git a/google/cloud/tpu/v1/internal/tpu_stub.cc b/google/cloud/tpu/v1/internal/tpu_stub.cc index cb240fab5a686..ade9c96dc446e 100644 --- a/google/cloud/tpu/v1/internal/tpu_stub.cc +++ b/google/cloud/tpu/v1/internal/tpu_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/tpu/v1/cloud_tpu.proto #include "google/cloud/tpu/v1/internal/tpu_stub.h" +#include "google/cloud/tpu/v1/cloud_tpu.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tpu_v1_internal { @@ -351,3 +354,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace tpu_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/tpu/v1/internal/tpu_stub.h b/google/cloud/tpu/v1/internal/tpu_stub.h index 82d3fd23bc2dc..273d0360bb360 100644 --- a/google/cloud/tpu/v1/internal/tpu_stub.h +++ b/google/cloud/tpu/v1/internal/tpu_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_V1_INTERNAL_TPU_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_V1_INTERNAL_TPU_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/tpu/v1/cloud_tpu.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tpu_v1_internal { @@ -295,4 +298,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_V1_INTERNAL_TPU_STUB_H diff --git a/google/cloud/tpu/v1/internal/tpu_stub_factory.cc b/google/cloud/tpu/v1/internal/tpu_stub_factory.cc index e4138c3cf40bc..bc1f2be64c051 100644 --- a/google/cloud/tpu/v1/internal/tpu_stub_factory.cc +++ b/google/cloud/tpu/v1/internal/tpu_stub_factory.cc @@ -17,6 +17,8 @@ // source: google/cloud/tpu/v1/cloud_tpu.proto #include "google/cloud/tpu/v1/internal/tpu_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/tpu/v1/cloud_tpu.grpc.pb.h" #include "google/cloud/tpu/v1/internal/tpu_auth_decorator.h" #include "google/cloud/tpu/v1/internal/tpu_logging_decorator.h" #include "google/cloud/tpu/v1/internal/tpu_metadata_decorator.h" @@ -28,12 +30,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tpu_v1_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace tpu_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/tpu/v1/internal/tpu_stub_factory.h b/google/cloud/tpu/v1/internal/tpu_stub_factory.h index 93ca8392499d6..a4b53a5484b35 100644 --- a/google/cloud/tpu/v1/internal/tpu_stub_factory.h +++ b/google/cloud/tpu/v1/internal/tpu_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tpu_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_V1_INTERNAL_TPU_STUB_FACTORY_H diff --git a/google/cloud/tpu/v1/internal/tpu_tracing_connection.cc b/google/cloud/tpu/v1/internal/tpu_tracing_connection.cc index 2f1e3b7018090..f2863b16557fc 100644 --- a/google/cloud/tpu/v1/internal/tpu_tracing_connection.cc +++ b/google/cloud/tpu/v1/internal/tpu_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace tpu_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TpuTracingConnection::TpuTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -242,15 +240,11 @@ Status TpuTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTpuTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/tpu/v1/internal/tpu_tracing_connection.h b/google/cloud/tpu/v1/internal/tpu_tracing_connection.h index 050f0e07af44a..e0a1c94eae4b2 100644 --- a/google/cloud/tpu/v1/internal/tpu_tracing_connection.h +++ b/google/cloud/tpu/v1/internal/tpu_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace tpu_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TpuTracingConnection : public tpu_v1::TpuConnection { public: ~TpuTracingConnection() override = default; @@ -130,8 +128,6 @@ class TpuTracingConnection : public tpu_v1::TpuConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/tpu/v1/internal/tpu_tracing_stub.cc b/google/cloud/tpu/v1/internal/tpu_tracing_stub.cc index 87ee004d132b9..ac998df202dee 100644 --- a/google/cloud/tpu/v1/internal/tpu_tracing_stub.cc +++ b/google/cloud/tpu/v1/internal/tpu_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tpu_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TpuTracingStub::TpuTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -307,17 +308,13 @@ future TpuTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTpuTracingStub(std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace tpu_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/tpu/v1/internal/tpu_tracing_stub.h b/google/cloud/tpu/v1/internal/tpu_tracing_stub.h index a5d4978e1ccd2..39bd781841c5c 100644 --- a/google/cloud/tpu/v1/internal/tpu_tracing_stub.h +++ b/google/cloud/tpu/v1/internal/tpu_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tpu_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TpuTracingStub : public TpuStub { public: ~TpuTracingStub() override = default; @@ -160,8 +161,6 @@ class TpuTracingStub : public TpuStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -175,4 +174,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_V1_INTERNAL_TPU_TRACING_STUB_H diff --git a/google/cloud/tpu/v1/tpu_client.h b/google/cloud/tpu/v1/tpu_client.h index 9a762e7be5dc5..54793b5c94794 100644 --- a/google/cloud/tpu/v1/tpu_client.h +++ b/google/cloud/tpu/v1/tpu_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/tpu/v1/tpu_connection.h b/google/cloud/tpu/v1/tpu_connection.h index d5ba39ae90bf1..384a9b19bbf19 100644 --- a/google/cloud/tpu/v1/tpu_connection.h +++ b/google/cloud/tpu/v1/tpu_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_V1_TPU_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_V1_TPU_CONNECTION_H +#include "google/cloud/tpu/v1/cloud_tpu.pb.h" #include "google/cloud/tpu/v1/internal/tpu_retry_traits.h" #include "google/cloud/tpu/v1/tpu_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/tpu/v1/tpu_connection_idempotency_policy.h b/google/cloud/tpu/v1/tpu_connection_idempotency_policy.h index ca1c169c0c5f3..d006294357bf7 100644 --- a/google/cloud/tpu/v1/tpu_connection_idempotency_policy.h +++ b/google/cloud/tpu/v1/tpu_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_V1_TPU_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_V1_TPU_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/tpu/v1/cloud_tpu.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/tpu/v2/internal/tpu_auth_decorator.cc b/google/cloud/tpu/v2/internal/tpu_auth_decorator.cc index 39acfc56e44e9..ddb11cc175d48 100644 --- a/google/cloud/tpu/v2/internal/tpu_auth_decorator.cc +++ b/google/cloud/tpu/v2/internal/tpu_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/tpu/v2/cloud_tpu.proto #include "google/cloud/tpu/v2/internal/tpu_auth_decorator.h" -#include +#include "google/cloud/tpu/v2/cloud_tpu.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tpu_v2_internal { @@ -422,3 +425,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace tpu_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/tpu/v2/internal/tpu_auth_decorator.h b/google/cloud/tpu/v2/internal/tpu_auth_decorator.h index c98b7250bf07c..bfce9550a653a 100644 --- a/google/cloud/tpu/v2/internal/tpu_auth_decorator.h +++ b/google/cloud/tpu/v2/internal/tpu_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/tpu/v2/internal/tpu_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tpu_v2_internal { @@ -219,4 +222,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_V2_INTERNAL_TPU_AUTH_DECORATOR_H diff --git a/google/cloud/tpu/v2/internal/tpu_connection_impl.h b/google/cloud/tpu/v2/internal/tpu_connection_impl.h index 38868d09191d1..a149b84677f94 100644 --- a/google/cloud/tpu/v2/internal/tpu_connection_impl.h +++ b/google/cloud/tpu/v2/internal/tpu_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/tpu/v2/internal/tpu_logging_decorator.cc b/google/cloud/tpu/v2/internal/tpu_logging_decorator.cc index dc58b27d62eb0..e7660cdfe2f8c 100644 --- a/google/cloud/tpu/v2/internal/tpu_logging_decorator.cc +++ b/google/cloud/tpu/v2/internal/tpu_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/tpu/v2/cloud_tpu.proto #include "google/cloud/tpu/v2/internal/tpu_logging_decorator.h" +#include "google/cloud/tpu/v2/cloud_tpu.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tpu_v2_internal { @@ -494,3 +497,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace tpu_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/tpu/v2/internal/tpu_logging_decorator.h b/google/cloud/tpu/v2/internal/tpu_logging_decorator.h index d27bfedf51d4c..4a6dfc28bba36 100644 --- a/google/cloud/tpu/v2/internal/tpu_logging_decorator.h +++ b/google/cloud/tpu/v2/internal/tpu_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/tpu/v2/internal/tpu_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tpu_v2_internal { @@ -218,4 +221,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_V2_INTERNAL_TPU_LOGGING_DECORATOR_H diff --git a/google/cloud/tpu/v2/internal/tpu_metadata_decorator.cc b/google/cloud/tpu/v2/internal/tpu_metadata_decorator.cc index 40b3482954298..1b868e61bda42 100644 --- a/google/cloud/tpu/v2/internal/tpu_metadata_decorator.cc +++ b/google/cloud/tpu/v2/internal/tpu_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/tpu/v2/cloud_tpu.proto #include "google/cloud/tpu/v2/internal/tpu_metadata_decorator.h" +#include "google/cloud/tpu/v2/cloud_tpu.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tpu_v2_internal { @@ -375,3 +379,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace tpu_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/tpu/v2/internal/tpu_metadata_decorator.h b/google/cloud/tpu/v2/internal/tpu_metadata_decorator.h index 39daaac944955..16bd5a2d0c9c4 100644 --- a/google/cloud/tpu/v2/internal/tpu_metadata_decorator.h +++ b/google/cloud/tpu/v2/internal/tpu_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/tpu/v2/internal/tpu_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tpu_v2_internal { @@ -224,4 +227,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_V2_INTERNAL_TPU_METADATA_DECORATOR_H diff --git a/google/cloud/tpu/v2/internal/tpu_option_defaults.cc b/google/cloud/tpu/v2/internal/tpu_option_defaults.cc index e6f43024e1f8b..f6d5e92027f72 100644 --- a/google/cloud/tpu/v2/internal/tpu_option_defaults.cc +++ b/google/cloud/tpu/v2/internal/tpu_option_defaults.cc @@ -40,7 +40,7 @@ Options TpuDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - tpu_v2::TpuLimitedTimeRetryPolicy(std::chrono::minutes(30)).clone()); + tpu_v2::TpuLimitedTimeRetryPolicy(std::chrono::minutes(10)).clone()); } if (!options.has()) { options.set( diff --git a/google/cloud/tpu/v2/internal/tpu_stub.cc b/google/cloud/tpu/v2/internal/tpu_stub.cc index 2e996ca628fbb..091258e6d1b1b 100644 --- a/google/cloud/tpu/v2/internal/tpu_stub.cc +++ b/google/cloud/tpu/v2/internal/tpu_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/tpu/v2/cloud_tpu.proto #include "google/cloud/tpu/v2/internal/tpu_stub.h" +#include "google/cloud/tpu/v2/cloud_tpu.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tpu_v2_internal { @@ -486,3 +489,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace tpu_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/tpu/v2/internal/tpu_stub.h b/google/cloud/tpu/v2/internal/tpu_stub.h index 945714b91138b..7e56c17ae0eb8 100644 --- a/google/cloud/tpu/v2/internal/tpu_stub.h +++ b/google/cloud/tpu/v2/internal/tpu_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_V2_INTERNAL_TPU_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_V2_INTERNAL_TPU_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/tpu/v2/cloud_tpu.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tpu_v2_internal { @@ -401,4 +404,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_V2_INTERNAL_TPU_STUB_H diff --git a/google/cloud/tpu/v2/internal/tpu_stub_factory.cc b/google/cloud/tpu/v2/internal/tpu_stub_factory.cc index aab369ea8f042..218e8c77a9ddc 100644 --- a/google/cloud/tpu/v2/internal/tpu_stub_factory.cc +++ b/google/cloud/tpu/v2/internal/tpu_stub_factory.cc @@ -17,6 +17,8 @@ // source: google/cloud/tpu/v2/cloud_tpu.proto #include "google/cloud/tpu/v2/internal/tpu_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/tpu/v2/cloud_tpu.grpc.pb.h" #include "google/cloud/tpu/v2/internal/tpu_auth_decorator.h" #include "google/cloud/tpu/v2/internal/tpu_logging_decorator.h" #include "google/cloud/tpu/v2/internal/tpu_metadata_decorator.h" @@ -28,12 +30,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tpu_v2_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace tpu_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/tpu/v2/internal/tpu_stub_factory.h b/google/cloud/tpu/v2/internal/tpu_stub_factory.h index 0fe95c6be4dca..d289ca188b474 100644 --- a/google/cloud/tpu/v2/internal/tpu_stub_factory.h +++ b/google/cloud/tpu/v2/internal/tpu_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tpu_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_V2_INTERNAL_TPU_STUB_FACTORY_H diff --git a/google/cloud/tpu/v2/internal/tpu_tracing_connection.cc b/google/cloud/tpu/v2/internal/tpu_tracing_connection.cc index d7e6d573600a7..73a89d19e7ad9 100644 --- a/google/cloud/tpu/v2/internal/tpu_tracing_connection.cc +++ b/google/cloud/tpu/v2/internal/tpu_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace tpu_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TpuTracingConnection::TpuTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -359,15 +357,11 @@ Status TpuTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTpuTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/tpu/v2/internal/tpu_tracing_connection.h b/google/cloud/tpu/v2/internal/tpu_tracing_connection.h index 9fa4799a8d2d4..7cf41ebe8ac09 100644 --- a/google/cloud/tpu/v2/internal/tpu_tracing_connection.h +++ b/google/cloud/tpu/v2/internal/tpu_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace tpu_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TpuTracingConnection : public tpu_v2::TpuConnection { public: ~TpuTracingConnection() override = default; @@ -182,8 +180,6 @@ class TpuTracingConnection : public tpu_v2::TpuConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/tpu/v2/internal/tpu_tracing_stub.cc b/google/cloud/tpu/v2/internal/tpu_tracing_stub.cc index 591cd56baee98..87a59b09ead27 100644 --- a/google/cloud/tpu/v2/internal/tpu_tracing_stub.cc +++ b/google/cloud/tpu/v2/internal/tpu_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tpu_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TpuTracingStub::TpuTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -433,17 +434,13 @@ future TpuTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTpuTracingStub(std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace tpu_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/tpu/v2/internal/tpu_tracing_stub.h b/google/cloud/tpu/v2/internal/tpu_tracing_stub.h index 5cb73f9e6d0c3..6fdbb83ab17cb 100644 --- a/google/cloud/tpu/v2/internal/tpu_tracing_stub.h +++ b/google/cloud/tpu/v2/internal/tpu_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace tpu_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TpuTracingStub : public TpuStub { public: ~TpuTracingStub() override = default; @@ -214,8 +215,6 @@ class TpuTracingStub : public TpuStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -229,4 +228,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_V2_INTERNAL_TPU_TRACING_STUB_H diff --git a/google/cloud/tpu/v2/tpu_client.h b/google/cloud/tpu/v2/tpu_client.h index b58d40e75e301..0dbbb4ac68a5a 100644 --- a/google/cloud/tpu/v2/tpu_client.h +++ b/google/cloud/tpu/v2/tpu_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/tpu/v2/tpu_connection.h b/google/cloud/tpu/v2/tpu_connection.h index 0ff19e205da23..53b799b554ae4 100644 --- a/google/cloud/tpu/v2/tpu_connection.h +++ b/google/cloud/tpu/v2/tpu_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_V2_TPU_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_V2_TPU_CONNECTION_H +#include "google/cloud/tpu/v2/cloud_tpu.pb.h" #include "google/cloud/tpu/v2/internal/tpu_retry_traits.h" #include "google/cloud/tpu/v2/tpu_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/tpu/v2/tpu_connection_idempotency_policy.h b/google/cloud/tpu/v2/tpu_connection_idempotency_policy.h index 1db7778fb6374..5c5fb739af1c3 100644 --- a/google/cloud/tpu/v2/tpu_connection_idempotency_policy.h +++ b/google/cloud/tpu/v2/tpu_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_V2_TPU_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TPU_V2_TPU_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/tpu/v2/cloud_tpu.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/trace/BUILD.bazel b/google/cloud/trace/BUILD.bazel index 71c11f17a601e..f387f9b8a6418 100644 --- a/google/cloud/trace/BUILD.bazel +++ b/google/cloud/trace/BUILD.bazel @@ -19,14 +19,13 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", "v2/", ] googleapis_deps = [ - "@com_google_googleapis//google/devtools/cloudtrace/v1:cloudtrace_cc_grpc", - "@com_google_googleapis//google/devtools/cloudtrace/v2:cloudtrace_cc_grpc", + "@googleapis//google/devtools/cloudtrace/v1:cloudtrace_cc_grpc", + "@googleapis//google/devtools/cloudtrace/v2:cloudtrace_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/trace/CMakeLists.txt b/google/cloud/trace/CMakeLists.txt index a3af837c0c8e2..91294152c4f4d 100644 --- a/google/cloud/trace/CMakeLists.txt +++ b/google/cloud/trace/CMakeLists.txt @@ -18,7 +18,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library( trace "Cloud Trace API" - SERVICE_DIRS "__EMPTY__" "v1/" "v2/" + SERVICE_DIRS "v1/" "v2/" BACKWARDS_COMPAT_PROTO_TARGETS "devtools_cloudtrace_v2_trace_protos" "devtools_cloudtrace_v2_tracing_protos") diff --git a/google/cloud/trace/mocks/mock_trace_connection.h b/google/cloud/trace/mocks/mock_trace_connection.h deleted file mode 100644 index 576ca31de3c6b..0000000000000 --- a/google/cloud/trace/mocks/mock_trace_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/devtools/cloudtrace/v2/tracing.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRACE_MOCKS_MOCK_TRACE_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRACE_MOCKS_MOCK_TRACE_CONNECTION_H - -#include "google/cloud/trace/trace_connection.h" -#include "google/cloud/trace/v2/mocks/mock_trace_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in trace_v2_mocks instead of the aliases -/// defined in this namespace. -namespace trace_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use trace_v2_mocks::MockTraceServiceConnection directly. -using ::google::cloud::trace_v2_mocks::MockTraceServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace trace_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRACE_MOCKS_MOCK_TRACE_CONNECTION_H diff --git a/google/cloud/trace/quickstart/.bazelrc b/google/cloud/trace/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/trace/quickstart/.bazelrc +++ b/google/cloud/trace/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/trace/quickstart/CMakeLists.txt b/google/cloud/trace/quickstart/CMakeLists.txt index 4f9d338aa09d8..74001c0668741 100644 --- a/google/cloud/trace/quickstart/CMakeLists.txt +++ b/google/cloud/trace/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Trace API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-trace-quickstart CXX) find_package(google_cloud_cpp_trace REQUIRED) diff --git a/google/cloud/trace/trace_client.h b/google/cloud/trace/trace_client.h deleted file mode 100644 index af171379db9ba..0000000000000 --- a/google/cloud/trace/trace_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/devtools/cloudtrace/v2/tracing.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRACE_TRACE_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRACE_TRACE_CLIENT_H - -#include "google/cloud/trace/trace_connection.h" -#include "google/cloud/trace/v2/trace_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in trace_v2 instead of the aliases defined in -/// this namespace. -namespace trace { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use trace_v2::TraceServiceClient directly. -using ::google::cloud::trace_v2::TraceServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace trace -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRACE_TRACE_CLIENT_H diff --git a/google/cloud/trace/trace_connection.h b/google/cloud/trace/trace_connection.h deleted file mode 100644 index 2e35663928263..0000000000000 --- a/google/cloud/trace/trace_connection.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/devtools/cloudtrace/v2/tracing.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRACE_TRACE_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRACE_TRACE_CONNECTION_H - -#include "google/cloud/trace/trace_connection_idempotency_policy.h" -#include "google/cloud/trace/v2/trace_connection.h" - -namespace google { -namespace cloud { -namespace trace { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use trace_v2::MakeTraceServiceConnection directly. -using ::google::cloud::trace_v2::MakeTraceServiceConnection; - -/// @deprecated Use trace_v2::TraceServiceConnection directly. -using ::google::cloud::trace_v2::TraceServiceConnection; - -/// @deprecated Use trace_v2::TraceServiceLimitedErrorCountRetryPolicy directly. -using ::google::cloud::trace_v2::TraceServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use trace_v2::TraceServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::trace_v2::TraceServiceLimitedTimeRetryPolicy; - -/// @deprecated Use trace_v2::TraceServiceRetryPolicy directly. -using ::google::cloud::trace_v2::TraceServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace trace -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRACE_TRACE_CONNECTION_H diff --git a/google/cloud/trace/trace_connection_idempotency_policy.h b/google/cloud/trace/trace_connection_idempotency_policy.h deleted file mode 100644 index 657ec8b7c6fe7..0000000000000 --- a/google/cloud/trace/trace_connection_idempotency_policy.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/devtools/cloudtrace/v2/tracing.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRACE_TRACE_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRACE_TRACE_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/trace/v2/trace_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace trace { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use trace_v2::MakeDefaultTraceServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::trace_v2:: - MakeDefaultTraceServiceConnectionIdempotencyPolicy; - -/// @deprecated Use trace_v2::TraceServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::trace_v2::TraceServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace trace -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRACE_TRACE_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/trace/trace_options.h b/google/cloud/trace/trace_options.h deleted file mode 100644 index b37c628b8ef50..0000000000000 --- a/google/cloud/trace/trace_options.h +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/devtools/cloudtrace/v2/tracing.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRACE_TRACE_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRACE_TRACE_OPTIONS_H - -#include "google/cloud/trace/trace_connection.h" -#include "google/cloud/trace/trace_connection_idempotency_policy.h" -#include "google/cloud/trace/v2/trace_options.h" - -namespace google { -namespace cloud { -namespace trace { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use trace_v2::TraceServiceBackoffPolicyOption directly. -using ::google::cloud::trace_v2::TraceServiceBackoffPolicyOption; - -/// @deprecated Use trace_v2::TraceServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::trace_v2::TraceServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use trace_v2::TraceServicePolicyOptionList directly. -using ::google::cloud::trace_v2::TraceServicePolicyOptionList; - -/// @deprecated Use trace_v2::TraceServiceRetryPolicyOption directly. -using ::google::cloud::trace_v2::TraceServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace trace -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRACE_TRACE_OPTIONS_H diff --git a/google/cloud/trace/v1/internal/trace_auth_decorator.cc b/google/cloud/trace/v1/internal/trace_auth_decorator.cc index c0b2ad7aad41e..461ea20fe0a48 100644 --- a/google/cloud/trace/v1/internal/trace_auth_decorator.cc +++ b/google/cloud/trace/v1/internal/trace_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/devtools/cloudtrace/v1/trace.proto #include "google/cloud/trace/v1/internal/trace_auth_decorator.h" -#include +#include "google/devtools/cloudtrace/v1/trace.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace trace_v1_internal { @@ -60,3 +63,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace trace_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/trace/v1/internal/trace_auth_decorator.h b/google/cloud/trace/v1/internal/trace_auth_decorator.h index 8b8faa9fbb402..0e0d369864264 100644 --- a/google/cloud/trace/v1/internal/trace_auth_decorator.h +++ b/google/cloud/trace/v1/internal/trace_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace trace_v1_internal { @@ -62,4 +65,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRACE_V1_INTERNAL_TRACE_AUTH_DECORATOR_H diff --git a/google/cloud/trace/v1/internal/trace_logging_decorator.cc b/google/cloud/trace/v1/internal/trace_logging_decorator.cc index 52ff1821f2e63..79b5d16c5836c 100644 --- a/google/cloud/trace/v1/internal/trace_logging_decorator.cc +++ b/google/cloud/trace/v1/internal/trace_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/trace/v1/internal/trace_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/devtools/cloudtrace/v1/trace.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace trace_v1_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace trace_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/trace/v1/internal/trace_logging_decorator.h b/google/cloud/trace/v1/internal/trace_logging_decorator.h index a4fc4aca7a86e..cafbecd177fe9 100644 --- a/google/cloud/trace/v1/internal/trace_logging_decorator.h +++ b/google/cloud/trace/v1/internal/trace_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace trace_v1_internal { @@ -62,4 +65,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRACE_V1_INTERNAL_TRACE_LOGGING_DECORATOR_H diff --git a/google/cloud/trace/v1/internal/trace_metadata_decorator.cc b/google/cloud/trace/v1/internal/trace_metadata_decorator.cc index d56f80292115a..2194fff5123f7 100644 --- a/google/cloud/trace/v1/internal/trace_metadata_decorator.cc +++ b/google/cloud/trace/v1/internal/trace_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/trace/v1/internal/trace_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/devtools/cloudtrace/v1/trace.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace trace_v1_internal { @@ -91,3 +95,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace trace_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/trace/v1/internal/trace_metadata_decorator.h b/google/cloud/trace/v1/internal/trace_metadata_decorator.h index 09522ce44b5a4..70fc781b2662d 100644 --- a/google/cloud/trace/v1/internal/trace_metadata_decorator.h +++ b/google/cloud/trace/v1/internal/trace_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace trace_v1_internal { @@ -67,4 +70,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRACE_V1_INTERNAL_TRACE_METADATA_DECORATOR_H diff --git a/google/cloud/trace/v1/internal/trace_option_defaults.cc b/google/cloud/trace/v1/internal/trace_option_defaults.cc index 9020f0cd96fbd..0ff913ff77074 100644 --- a/google/cloud/trace/v1/internal/trace_option_defaults.cc +++ b/google/cloud/trace/v1/internal/trace_option_defaults.cc @@ -40,7 +40,7 @@ Options TraceServiceDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - trace_v1::TraceServiceLimitedTimeRetryPolicy(std::chrono::minutes(30)) + trace_v1::TraceServiceLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/trace/v1/internal/trace_stub.cc b/google/cloud/trace/v1/internal/trace_stub.cc index 34815d6559c79..31ded81cf1370 100644 --- a/google/cloud/trace/v1/internal/trace_stub.cc +++ b/google/cloud/trace/v1/internal/trace_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/trace/v1/internal/trace_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "google/devtools/cloudtrace/v1/trace.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace trace_v1_internal { @@ -69,3 +72,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace trace_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/trace/v1/internal/trace_stub.h b/google/cloud/trace/v1/internal/trace_stub.h index 085ba3aea7c46..5ff3802615623 100644 --- a/google/cloud/trace/v1/internal/trace_stub.h +++ b/google/cloud/trace/v1/internal/trace_stub.h @@ -22,10 +22,13 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/devtools/cloudtrace/v1/trace.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace trace_v1_internal { @@ -81,4 +84,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRACE_V1_INTERNAL_TRACE_STUB_H diff --git a/google/cloud/trace/v1/internal/trace_stub_factory.cc b/google/cloud/trace/v1/internal/trace_stub_factory.cc index 3b088e79e93e9..a692c74c9e09a 100644 --- a/google/cloud/trace/v1/internal/trace_stub_factory.cc +++ b/google/cloud/trace/v1/internal/trace_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/devtools/cloudtrace/v1/trace.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace trace_v1_internal { @@ -68,3 +71,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace trace_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/trace/v1/internal/trace_stub_factory.h b/google/cloud/trace/v1/internal/trace_stub_factory.h index 67beab7dbfe08..ee555653be5c2 100644 --- a/google/cloud/trace/v1/internal/trace_stub_factory.h +++ b/google/cloud/trace/v1/internal/trace_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace trace_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRACE_V1_INTERNAL_TRACE_STUB_FACTORY_H diff --git a/google/cloud/trace/v1/internal/trace_tracing_connection.cc b/google/cloud/trace/v1/internal/trace_tracing_connection.cc index 59edf46864267..64d74f703dd89 100644 --- a/google/cloud/trace/v1/internal/trace_tracing_connection.cc +++ b/google/cloud/trace/v1/internal/trace_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace trace_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TraceServiceTracingConnection::TraceServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -60,16 +58,12 @@ Status TraceServiceTracingConnection::PatchTraces( return internal::EndSpan(*span, child_->PatchTraces(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTraceServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/trace/v1/internal/trace_tracing_connection.h b/google/cloud/trace/v1/internal/trace_tracing_connection.h index f479484bc1b46..c969efb07e7a7 100644 --- a/google/cloud/trace/v1/internal/trace_tracing_connection.h +++ b/google/cloud/trace/v1/internal/trace_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace trace_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TraceServiceTracingConnection : public trace_v1::TraceServiceConnection { public: ~TraceServiceTracingConnection() override = default; @@ -53,8 +51,6 @@ class TraceServiceTracingConnection : public trace_v1::TraceServiceConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/trace/v1/internal/trace_tracing_stub.cc b/google/cloud/trace/v1/internal/trace_tracing_stub.cc index 3272c510c8436..3439dd77b3cc3 100644 --- a/google/cloud/trace/v1/internal/trace_tracing_stub.cc +++ b/google/cloud/trace/v1/internal/trace_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace trace_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TraceServiceTracingStub::TraceServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -67,18 +68,14 @@ Status TraceServiceTracingStub::PatchTraces( child_->PatchTraces(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTraceServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace trace_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/trace/v1/internal/trace_tracing_stub.h b/google/cloud/trace/v1/internal/trace_tracing_stub.h index 34bb2f65bad4b..c834d3af1fc3d 100644 --- a/google/cloud/trace/v1/internal/trace_tracing_stub.h +++ b/google/cloud/trace/v1/internal/trace_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace trace_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TraceServiceTracingStub : public TraceServiceStub { public: ~TraceServiceTracingStub() override = default; @@ -58,8 +59,6 @@ class TraceServiceTracingStub : public TraceServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -74,4 +73,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRACE_V1_INTERNAL_TRACE_TRACING_STUB_H diff --git a/google/cloud/trace/v1/trace_connection.h b/google/cloud/trace/v1/trace_connection.h index e46e6f34a9f06..babf575740f9e 100644 --- a/google/cloud/trace/v1/trace_connection.h +++ b/google/cloud/trace/v1/trace_connection.h @@ -27,7 +27,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/devtools/cloudtrace/v1/trace.pb.h" #include namespace google { diff --git a/google/cloud/trace/v1/trace_connection_idempotency_policy.h b/google/cloud/trace/v1/trace_connection_idempotency_policy.h index 0a66ada7a1108..e356d6475057b 100644 --- a/google/cloud/trace/v1/trace_connection_idempotency_policy.h +++ b/google/cloud/trace/v1/trace_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/devtools/cloudtrace/v1/trace.grpc.pb.h" #include namespace google { diff --git a/google/cloud/trace/v2/internal/trace_auth_decorator.cc b/google/cloud/trace/v2/internal/trace_auth_decorator.cc index 1b7a104f984b7..abe7daef3659f 100644 --- a/google/cloud/trace/v2/internal/trace_auth_decorator.cc +++ b/google/cloud/trace/v2/internal/trace_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/devtools/cloudtrace/v2/tracing.proto #include "google/cloud/trace/v2/internal/trace_auth_decorator.h" -#include +#include "google/devtools/cloudtrace/v2/tracing.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace trace_v2_internal { @@ -51,3 +54,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace trace_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/trace/v2/internal/trace_auth_decorator.h b/google/cloud/trace/v2/internal/trace_auth_decorator.h index 9091b468ea5bf..0c848285a758c 100644 --- a/google/cloud/trace/v2/internal/trace_auth_decorator.h +++ b/google/cloud/trace/v2/internal/trace_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace trace_v2_internal { @@ -57,4 +60,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRACE_V2_INTERNAL_TRACE_AUTH_DECORATOR_H diff --git a/google/cloud/trace/v2/internal/trace_logging_decorator.cc b/google/cloud/trace/v2/internal/trace_logging_decorator.cc index 68566bea1fa6a..abad971c9041b 100644 --- a/google/cloud/trace/v2/internal/trace_logging_decorator.cc +++ b/google/cloud/trace/v2/internal/trace_logging_decorator.cc @@ -19,12 +19,15 @@ #include "google/cloud/trace/v2/internal/trace_logging_decorator.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include +#include "google/devtools/cloudtrace/v2/tracing.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace trace_v2_internal { @@ -63,3 +66,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace trace_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/trace/v2/internal/trace_logging_decorator.h b/google/cloud/trace/v2/internal/trace_logging_decorator.h index a2d1e6a93fca5..87d720f14bd3e 100644 --- a/google/cloud/trace/v2/internal/trace_logging_decorator.h +++ b/google/cloud/trace/v2/internal/trace_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace trace_v2_internal { @@ -57,4 +60,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRACE_V2_INTERNAL_TRACE_LOGGING_DECORATOR_H diff --git a/google/cloud/trace/v2/internal/trace_metadata_decorator.cc b/google/cloud/trace/v2/internal/trace_metadata_decorator.cc index 76102c0ab2a16..c9179a9a34369 100644 --- a/google/cloud/trace/v2/internal/trace_metadata_decorator.cc +++ b/google/cloud/trace/v2/internal/trace_metadata_decorator.cc @@ -18,16 +18,20 @@ #include "google/cloud/trace/v2/internal/trace_metadata_decorator.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" +#include "google/devtools/cloudtrace/v2/tracing.grpc.pb.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace trace_v2_internal { @@ -78,3 +82,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace trace_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/trace/v2/internal/trace_metadata_decorator.h b/google/cloud/trace/v2/internal/trace_metadata_decorator.h index a9b74a18376da..02c460a101b1e 100644 --- a/google/cloud/trace/v2/internal/trace_metadata_decorator.h +++ b/google/cloud/trace/v2/internal/trace_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace trace_v2_internal { @@ -62,4 +65,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRACE_V2_INTERNAL_TRACE_METADATA_DECORATOR_H diff --git a/google/cloud/trace/v2/internal/trace_option_defaults.cc b/google/cloud/trace/v2/internal/trace_option_defaults.cc index 71c7bca653806..3eb84cd038e09 100644 --- a/google/cloud/trace/v2/internal/trace_option_defaults.cc +++ b/google/cloud/trace/v2/internal/trace_option_defaults.cc @@ -41,7 +41,7 @@ Options TraceServiceDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - trace_v2::TraceServiceLimitedTimeRetryPolicy(std::chrono::minutes(30)) + trace_v2::TraceServiceLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/trace/v2/internal/trace_stub.cc b/google/cloud/trace/v2/internal/trace_stub.cc index 250abbf296bfe..f5fbf506ce8c2 100644 --- a/google/cloud/trace/v2/internal/trace_stub.cc +++ b/google/cloud/trace/v2/internal/trace_stub.cc @@ -19,10 +19,13 @@ #include "google/cloud/trace/v2/internal/trace_stub.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include +#include "google/devtools/cloudtrace/v2/tracing.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace trace_v2_internal { @@ -57,3 +60,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace trace_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/trace/v2/internal/trace_stub.h b/google/cloud/trace/v2/internal/trace_stub.h index fb8a91bd8f261..e4ea6709a9ecc 100644 --- a/google/cloud/trace/v2/internal/trace_stub.h +++ b/google/cloud/trace/v2/internal/trace_stub.h @@ -22,10 +22,13 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/devtools/cloudtrace/v2/tracing.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace trace_v2_internal { @@ -72,4 +75,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRACE_V2_INTERNAL_TRACE_STUB_H diff --git a/google/cloud/trace/v2/internal/trace_stub_factory.cc b/google/cloud/trace/v2/internal/trace_stub_factory.cc index 08d2af62e6166..299c0b37ffe13 100644 --- a/google/cloud/trace/v2/internal/trace_stub_factory.cc +++ b/google/cloud/trace/v2/internal/trace_stub_factory.cc @@ -28,10 +28,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include +#include "google/devtools/cloudtrace/v2/tracing.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace trace_v2_internal { @@ -68,3 +71,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace trace_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/trace/v2/internal/trace_stub_factory.h b/google/cloud/trace/v2/internal/trace_stub_factory.h index ac62c08cbecfa..b3b68e32c89c9 100644 --- a/google/cloud/trace/v2/internal/trace_stub_factory.h +++ b/google/cloud/trace/v2/internal/trace_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace trace_v2_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRACE_V2_INTERNAL_TRACE_STUB_FACTORY_H diff --git a/google/cloud/trace/v2/internal/trace_tracing_connection.cc b/google/cloud/trace/v2/internal/trace_tracing_connection.cc index 2a2dc9a4d7534..78caf5c32e7f2 100644 --- a/google/cloud/trace/v2/internal/trace_tracing_connection.cc +++ b/google/cloud/trace/v2/internal/trace_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace trace_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TraceServiceTracingConnection::TraceServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -49,16 +47,12 @@ TraceServiceTracingConnection::CreateSpan( return internal::EndSpan(*span, child_->CreateSpan(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTraceServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/trace/v2/internal/trace_tracing_connection.h b/google/cloud/trace/v2/internal/trace_tracing_connection.h index 4fd336fd36ec2..994aeec34f253 100644 --- a/google/cloud/trace/v2/internal/trace_tracing_connection.h +++ b/google/cloud/trace/v2/internal/trace_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace trace_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TraceServiceTracingConnection : public trace_v2::TraceServiceConnection { public: ~TraceServiceTracingConnection() override = default; @@ -50,8 +48,6 @@ class TraceServiceTracingConnection : public trace_v2::TraceServiceConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/trace/v2/internal/trace_tracing_stub.cc b/google/cloud/trace/v2/internal/trace_tracing_stub.cc index 78a3e41f3ac8b..0b24ff4ee2a6f 100644 --- a/google/cloud/trace/v2/internal/trace_tracing_stub.cc +++ b/google/cloud/trace/v2/internal/trace_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace trace_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TraceServiceTracingStub::TraceServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -55,18 +56,14 @@ TraceServiceTracingStub::CreateSpan( child_->CreateSpan(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTraceServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace trace_v2_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/trace/v2/internal/trace_tracing_stub.h b/google/cloud/trace/v2/internal/trace_tracing_stub.h index 1313e93d6aaa7..e222e3cbf9a70 100644 --- a/google/cloud/trace/v2/internal/trace_tracing_stub.h +++ b/google/cloud/trace/v2/internal/trace_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace trace_v2_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TraceServiceTracingStub : public TraceServiceStub { public: ~TraceServiceTracingStub() override = default; @@ -53,8 +54,6 @@ class TraceServiceTracingStub : public TraceServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -69,4 +68,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRACE_V2_INTERNAL_TRACE_TRACING_STUB_H diff --git a/google/cloud/trace/v2/trace_connection.h b/google/cloud/trace/v2/trace_connection.h index cdf9dbad28684..db91d718417a3 100644 --- a/google/cloud/trace/v2/trace_connection.h +++ b/google/cloud/trace/v2/trace_connection.h @@ -26,7 +26,7 @@ #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/devtools/cloudtrace/v2/tracing.pb.h" #include namespace google { diff --git a/google/cloud/trace/v2/trace_connection_idempotency_policy.h b/google/cloud/trace/v2/trace_connection_idempotency_policy.h index e48cbb1f7498b..2fb81f611cf57 100644 --- a/google/cloud/trace/v2/trace_connection_idempotency_policy.h +++ b/google/cloud/trace/v2/trace_connection_idempotency_policy.h @@ -21,7 +21,7 @@ #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include +#include "google/devtools/cloudtrace/v2/tracing.grpc.pb.h" #include namespace google { diff --git a/google/cloud/translate/BUILD.bazel b/google/cloud/translate/BUILD.bazel index 26658ea670c41..5724a52753401 100644 --- a/google/cloud/translate/BUILD.bazel +++ b/google/cloud/translate/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v3/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/translate/v3:translation_cc_grpc", + "@googleapis//google/cloud/translate/v3:translation_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/translate/CMakeLists.txt b/google/cloud/translate/CMakeLists.txt index 1c85c4b71aad6..794e4452062b2 100644 --- a/google/cloud/translate/CMakeLists.txt +++ b/google/cloud/translate/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(translate "Cloud Translation API" - SERVICE_DIRS "__EMPTY__" "v3/") + SERVICE_DIRS "v3/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(translate_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/translate/mocks/mock_translation_connection.h b/google/cloud/translate/mocks/mock_translation_connection.h deleted file mode 100644 index df8a8775fb284..0000000000000 --- a/google/cloud/translate/mocks/mock_translation_connection.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/translate/v3/translation_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRANSLATE_MOCKS_MOCK_TRANSLATION_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRANSLATE_MOCKS_MOCK_TRANSLATION_CONNECTION_H - -#include "google/cloud/translate/translation_connection.h" -#include "google/cloud/translate/v3/mocks/mock_translation_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in translate_v3_mocks instead of the aliases -/// defined in this namespace. -namespace translate_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use translate_v3_mocks::MockTranslationServiceConnection -/// directly. -using ::google::cloud::translate_v3_mocks::MockTranslationServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace translate_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRANSLATE_MOCKS_MOCK_TRANSLATION_CONNECTION_H diff --git a/google/cloud/translate/quickstart/.bazelrc b/google/cloud/translate/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/translate/quickstart/.bazelrc +++ b/google/cloud/translate/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/translate/quickstart/CMakeLists.txt b/google/cloud/translate/quickstart/CMakeLists.txt index 027265b01e344..75bdd8ed7dd8a 100644 --- a/google/cloud/translate/quickstart/CMakeLists.txt +++ b/google/cloud/translate/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Translation API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-translate-quickstart CXX) find_package(google_cloud_cpp_translate REQUIRED) diff --git a/google/cloud/translate/translation_client.h b/google/cloud/translate/translation_client.h deleted file mode 100644 index d130c5ee2e641..0000000000000 --- a/google/cloud/translate/translation_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/translate/v3/translation_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRANSLATE_TRANSLATION_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRANSLATE_TRANSLATION_CLIENT_H - -#include "google/cloud/translate/translation_connection.h" -#include "google/cloud/translate/v3/translation_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in translate_v3 instead of the aliases defined in -/// this namespace. -namespace translate { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use translate_v3::TranslationServiceClient directly. -using ::google::cloud::translate_v3::TranslationServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace translate -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRANSLATE_TRANSLATION_CLIENT_H diff --git a/google/cloud/translate/translation_connection.h b/google/cloud/translate/translation_connection.h deleted file mode 100644 index 0558e1e4dd7b5..0000000000000 --- a/google/cloud/translate/translation_connection.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/translate/v3/translation_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRANSLATE_TRANSLATION_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRANSLATE_TRANSLATION_CONNECTION_H - -#include "google/cloud/translate/translation_connection_idempotency_policy.h" -#include "google/cloud/translate/v3/translation_connection.h" - -namespace google { -namespace cloud { -namespace translate { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use translate_v3::MakeTranslationServiceConnection directly. -using ::google::cloud::translate_v3::MakeTranslationServiceConnection; - -/// @deprecated Use translate_v3::TranslationServiceConnection directly. -using ::google::cloud::translate_v3::TranslationServiceConnection; - -/// @deprecated Use translate_v3::TranslationServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::translate_v3:: - TranslationServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use translate_v3::TranslationServiceLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::translate_v3::TranslationServiceLimitedTimeRetryPolicy; - -/// @deprecated Use translate_v3::TranslationServiceRetryPolicy directly. -using ::google::cloud::translate_v3::TranslationServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace translate -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRANSLATE_TRANSLATION_CONNECTION_H diff --git a/google/cloud/translate/translation_connection_idempotency_policy.h b/google/cloud/translate/translation_connection_idempotency_policy.h deleted file mode 100644 index 442252b2e6af6..0000000000000 --- a/google/cloud/translate/translation_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/translate/v3/translation_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRANSLATE_TRANSLATION_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRANSLATE_TRANSLATION_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/translate/v3/translation_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace translate { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// translate_v3::MakeDefaultTranslationServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::translate_v3:: - MakeDefaultTranslationServiceConnectionIdempotencyPolicy; - -/// @deprecated Use translate_v3::TranslationServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::translate_v3:: - TranslationServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace translate -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRANSLATE_TRANSLATION_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/translate/translation_options.h b/google/cloud/translate/translation_options.h deleted file mode 100644 index 35051f89a85b9..0000000000000 --- a/google/cloud/translate/translation_options.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/translate/v3/translation_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRANSLATE_TRANSLATION_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRANSLATE_TRANSLATION_OPTIONS_H - -#include "google/cloud/translate/translation_connection.h" -#include "google/cloud/translate/translation_connection_idempotency_policy.h" -#include "google/cloud/translate/v3/translation_options.h" - -namespace google { -namespace cloud { -namespace translate { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use translate_v3::TranslationServicePollingPolicyOption -/// directly. -using ::google::cloud::translate_v3::TranslationServicePollingPolicyOption; - -/// @deprecated Use translate_v3::TranslationServiceBackoffPolicyOption -/// directly. -using ::google::cloud::translate_v3::TranslationServiceBackoffPolicyOption; - -/// @deprecated Use -/// translate_v3::TranslationServiceConnectionIdempotencyPolicyOption directly. -using ::google::cloud::translate_v3:: - TranslationServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use translate_v3::TranslationServicePolicyOptionList directly. -using ::google::cloud::translate_v3::TranslationServicePolicyOptionList; - -/// @deprecated Use translate_v3::TranslationServiceRetryPolicyOption directly. -using ::google::cloud::translate_v3::TranslationServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace translate -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRANSLATE_TRANSLATION_OPTIONS_H diff --git a/google/cloud/translate/v3/internal/translation_auth_decorator.cc b/google/cloud/translate/v3/internal/translation_auth_decorator.cc index df2ac7447f32e..6fbc6a15cb9d5 100644 --- a/google/cloud/translate/v3/internal/translation_auth_decorator.cc +++ b/google/cloud/translate/v3/internal/translation_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/translate/v3/translation_service.proto #include "google/cloud/translate/v3/internal/translation_auth_decorator.h" -#include +#include "google/cloud/translate/v3/translation_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace translate_v3_internal { @@ -689,3 +692,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace translate_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/translate/v3/internal/translation_auth_decorator.h b/google/cloud/translate/v3/internal/translation_auth_decorator.h index 9504511aa2aab..162a32190981d 100644 --- a/google/cloud/translate/v3/internal/translation_auth_decorator.h +++ b/google/cloud/translate/v3/internal/translation_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/translate/v3/internal/translation_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace translate_v3_internal { @@ -365,4 +368,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRANSLATE_V3_INTERNAL_TRANSLATION_AUTH_DECORATOR_H diff --git a/google/cloud/translate/v3/internal/translation_connection_impl.h b/google/cloud/translate/v3/internal/translation_connection_impl.h index b359ee0d56d5d..7c175d7926c67 100644 --- a/google/cloud/translate/v3/internal/translation_connection_impl.h +++ b/google/cloud/translate/v3/internal/translation_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/translate/v3/internal/translation_logging_decorator.cc b/google/cloud/translate/v3/internal/translation_logging_decorator.cc index 06145cc6a7394..eff0fffb72adf 100644 --- a/google/cloud/translate/v3/internal/translation_logging_decorator.cc +++ b/google/cloud/translate/v3/internal/translation_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/translate/v3/translation_service.proto #include "google/cloud/translate/v3/internal/translation_logging_decorator.h" +#include "google/cloud/translate/v3/translation_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace translate_v3_internal { @@ -861,3 +864,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace translate_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/translate/v3/internal/translation_logging_decorator.h b/google/cloud/translate/v3/internal/translation_logging_decorator.h index af943aea25d7d..933890a4470c3 100644 --- a/google/cloud/translate/v3/internal/translation_logging_decorator.h +++ b/google/cloud/translate/v3/internal/translation_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/translate/v3/internal/translation_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace translate_v3_internal { @@ -365,4 +368,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRANSLATE_V3_INTERNAL_TRANSLATION_LOGGING_DECORATOR_H diff --git a/google/cloud/translate/v3/internal/translation_metadata_decorator.cc b/google/cloud/translate/v3/internal/translation_metadata_decorator.cc index 6c63c29b22e32..b35562d3fbadf 100644 --- a/google/cloud/translate/v3/internal/translation_metadata_decorator.cc +++ b/google/cloud/translate/v3/internal/translation_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/translate/v3/translation_service.proto #include "google/cloud/translate/v3/internal/translation_metadata_decorator.h" +#include "google/cloud/translate/v3/translation_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace translate_v3_internal { @@ -627,3 +631,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace translate_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/translate/v3/internal/translation_metadata_decorator.h b/google/cloud/translate/v3/internal/translation_metadata_decorator.h index bb6765e84e444..07c35fca396be 100644 --- a/google/cloud/translate/v3/internal/translation_metadata_decorator.h +++ b/google/cloud/translate/v3/internal/translation_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/translate/v3/internal/translation_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace translate_v3_internal { @@ -371,4 +374,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRANSLATE_V3_INTERNAL_TRANSLATION_METADATA_DECORATOR_H diff --git a/google/cloud/translate/v3/internal/translation_option_defaults.cc b/google/cloud/translate/v3/internal/translation_option_defaults.cc index 0e1e4d2120325..860317ca13c34 100644 --- a/google/cloud/translate/v3/internal/translation_option_defaults.cc +++ b/google/cloud/translate/v3/internal/translation_option_defaults.cc @@ -42,7 +42,7 @@ Options TranslationServiceDefaultOptions(Options options) { if (!options.has()) { options.set( translate_v3::TranslationServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/translate/v3/internal/translation_stub.cc b/google/cloud/translate/v3/internal/translation_stub.cc index aed06074902e4..51178be403408 100644 --- a/google/cloud/translate/v3/internal/translation_stub.cc +++ b/google/cloud/translate/v3/internal/translation_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/translate/v3/translation_service.proto #include "google/cloud/translate/v3/internal/translation_stub.h" +#include "google/cloud/translate/v3/translation_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace translate_v3_internal { @@ -830,3 +833,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace translate_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/translate/v3/internal/translation_stub.h b/google/cloud/translate/v3/internal/translation_stub.h index 31c1f3307eeb1..c8d2f445c6186 100644 --- a/google/cloud/translate/v3/internal/translation_stub.h +++ b/google/cloud/translate/v3/internal/translation_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRANSLATE_V3_INTERNAL_TRANSLATION_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRANSLATE_V3_INTERNAL_TRANSLATION_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/translate/v3/translation_service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace translate_v3_internal { @@ -690,4 +693,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRANSLATE_V3_INTERNAL_TRANSLATION_STUB_H diff --git a/google/cloud/translate/v3/internal/translation_stub_factory.cc b/google/cloud/translate/v3/internal/translation_stub_factory.cc index a714758e81371..91e0bd5c06da3 100644 --- a/google/cloud/translate/v3/internal/translation_stub_factory.cc +++ b/google/cloud/translate/v3/internal/translation_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/translate/v3/translation_service.proto #include "google/cloud/translate/v3/internal/translation_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/translate/v3/internal/translation_auth_decorator.h" #include "google/cloud/translate/v3/internal/translation_logging_decorator.h" #include "google/cloud/translate/v3/internal/translation_metadata_decorator.h" #include "google/cloud/translate/v3/internal/translation_stub.h" #include "google/cloud/translate/v3/internal/translation_tracing_stub.h" +#include "google/cloud/translate/v3/translation_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace translate_v3_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace translate_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/translate/v3/internal/translation_stub_factory.h b/google/cloud/translate/v3/internal/translation_stub_factory.h index 02c1b0b44276c..1ff6c85d98dd8 100644 --- a/google/cloud/translate/v3/internal/translation_stub_factory.h +++ b/google/cloud/translate/v3/internal/translation_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace translate_v3_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRANSLATE_V3_INTERNAL_TRANSLATION_STUB_FACTORY_H diff --git a/google/cloud/translate/v3/internal/translation_tracing_connection.cc b/google/cloud/translate/v3/internal/translation_tracing_connection.cc index 60b2bc026667c..c6406c2d12f86 100644 --- a/google/cloud/translate/v3/internal/translation_tracing_connection.cc +++ b/google/cloud/translate/v3/internal/translation_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace translate_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TranslationServiceTracingConnection::TranslationServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -683,17 +681,13 @@ TranslationServiceTracingConnection::WaitOperation( return internal::EndSpan(*span, child_->WaitOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTranslationServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/translate/v3/internal/translation_tracing_connection.h b/google/cloud/translate/v3/internal/translation_tracing_connection.h index dd0d1fff38fa0..45a656593961e 100644 --- a/google/cloud/translate/v3/internal/translation_tracing_connection.h +++ b/google/cloud/translate/v3/internal/translation_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace translate_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TranslationServiceTracingConnection : public translate_v3::TranslationServiceConnection { public: @@ -313,8 +311,6 @@ class TranslationServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/translate/v3/internal/translation_tracing_stub.cc b/google/cloud/translate/v3/internal/translation_tracing_stub.cc index 15a512b2d569d..b3a3c9ac07e93 100644 --- a/google/cloud/translate/v3/internal/translation_tracing_stub.cc +++ b/google/cloud/translate/v3/internal/translation_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace translate_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TranslationServiceTracingStub::TranslationServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -776,18 +777,14 @@ future TranslationServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTranslationServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace translate_v3_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/translate/v3/internal/translation_tracing_stub.h b/google/cloud/translate/v3/internal/translation_tracing_stub.h index 0d42aa22cb63e..66308e2f677b5 100644 --- a/google/cloud/translate/v3/internal/translation_tracing_stub.h +++ b/google/cloud/translate/v3/internal/translation_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace translate_v3_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TranslationServiceTracingStub : public TranslationServiceStub { public: ~TranslationServiceTracingStub() override = default; @@ -361,8 +362,6 @@ class TranslationServiceTracingStub : public TranslationServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -377,4 +376,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRANSLATE_V3_INTERNAL_TRANSLATION_TRACING_STUB_H diff --git a/google/cloud/translate/v3/translation_client.h b/google/cloud/translate/v3/translation_client.h index 4749c8726b551..d210d93696be1 100644 --- a/google/cloud/translate/v3/translation_client.h +++ b/google/cloud/translate/v3/translation_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/translate/v3/translation_connection.h b/google/cloud/translate/v3/translation_connection.h index c5f5552c29c61..b6bc8efa3ddfb 100644 --- a/google/cloud/translate/v3/translation_connection.h +++ b/google/cloud/translate/v3/translation_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/translate/v3/internal/translation_retry_traits.h" #include "google/cloud/translate/v3/translation_connection_idempotency_policy.h" +#include "google/cloud/translate/v3/translation_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/translate/v3/translation_connection_idempotency_policy.h b/google/cloud/translate/v3/translation_connection_idempotency_policy.h index 0b0c3d499fe1d..6d534dfb12915 100644 --- a/google/cloud/translate/v3/translation_connection_idempotency_policy.h +++ b/google/cloud/translate/v3/translation_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRANSLATE_V3_TRANSLATION_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_TRANSLATE_V3_TRANSLATION_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/translate/v3/translation_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/universe_domain/demo/CMakeLists.txt b/google/cloud/universe_domain/demo/CMakeLists.txt index 06b8058d4291c..099913bd08e1e 100644 --- a/google/cloud/universe_domain/demo/CMakeLists.txt +++ b/google/cloud/universe_domain/demo/CMakeLists.txt @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations under # the License. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-universe-domain-demo CXX) find_package(google_cloud_cpp_bigquery REQUIRED) diff --git a/google/cloud/universe_domain/integration_tests/BUILD.bazel b/google/cloud/universe_domain/integration_tests/BUILD.bazel index d566417998d08..91466c1b3169a 100644 --- a/google/cloud/universe_domain/integration_tests/BUILD.bazel +++ b/google/cloud/universe_domain/integration_tests/BUILD.bazel @@ -30,8 +30,8 @@ cc_test( "//:common", "//:universe_domain", "//google/cloud/testing_util:google_cloud_cpp_testing_private", - "@com_google_googletest//:gtest_main", "@google_cloud_cpp//:compute", "@google_cloud_cpp//:kms", + "@googletest//:gtest_main", ], ) diff --git a/google/cloud/version.h b/google/cloud/version.h index 223e4ecb212e9..b440893708fce 100644 --- a/google/cloud/version.h +++ b/google/cloud/version.h @@ -107,9 +107,6 @@ int constexpr version() { std::string version_string(); GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -// TODO(#7463) - remove backwards compatibility namespaces -namespace v1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) -namespace gcpcxxV1 = GOOGLE_CLOUD_CPP_NS; // NOLINT(misc-unused-alias-decls) } // namespace cloud } // namespace google diff --git a/google/cloud/video/BUILD.bazel b/google/cloud/video/BUILD.bazel index 0645dff9ae20b..410a732725fc2 100644 --- a/google/cloud/video/BUILD.bazel +++ b/google/cloud/video/BUILD.bazel @@ -19,16 +19,15 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "livestream/v1/", "stitcher/v1/", "transcoder/v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/video/livestream/v1:livestream_cc_grpc", - "@com_google_googleapis//google/cloud/video/stitcher/v1:stitcher_cc_grpc", - "@com_google_googleapis//google/cloud/video/transcoder/v1:transcoder_cc_grpc", + "@googleapis//google/cloud/video/livestream/v1:livestream_cc_grpc", + "@googleapis//google/cloud/video/stitcher/v1:stitcher_cc_grpc", + "@googleapis//google/cloud/video/transcoder/v1:transcoder_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/video/CMakeLists.txt b/google/cloud/video/CMakeLists.txt index 133bebb28ce9e..3ee56bdf414b1 100644 --- a/google/cloud/video/CMakeLists.txt +++ b/google/cloud/video/CMakeLists.txt @@ -18,7 +18,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library( video "A C++ Client Library for several Video Services" - SERVICE_DIRS "__EMPTY__" "livestream/v1/" "stitcher/v1/" "transcoder/v1/") + SERVICE_DIRS "livestream/v1/" "stitcher/v1/" "transcoder/v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(video_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/video/livestream/v1/internal/livestream_auth_decorator.cc b/google/cloud/video/livestream/v1/internal/livestream_auth_decorator.cc index 99b31020a71ac..8928f750b69e5 100644 --- a/google/cloud/video/livestream/v1/internal/livestream_auth_decorator.cc +++ b/google/cloud/video/livestream/v1/internal/livestream_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/video/livestream/v1/service.proto #include "google/cloud/video/livestream/v1/internal/livestream_auth_decorator.h" -#include +#include "google/cloud/video/livestream/v1/service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_livestream_v1_internal { @@ -784,3 +787,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace video_livestream_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/video/livestream/v1/internal/livestream_auth_decorator.h b/google/cloud/video/livestream/v1/internal/livestream_auth_decorator.h index 31c73b783ffc1..b6b931b353165 100644 --- a/google/cloud/video/livestream/v1/internal/livestream_auth_decorator.h +++ b/google/cloud/video/livestream/v1/internal/livestream_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/video/livestream/v1/internal/livestream_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_livestream_v1_internal { @@ -382,4 +385,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_LIVESTREAM_V1_INTERNAL_LIVESTREAM_AUTH_DECORATOR_H diff --git a/google/cloud/video/livestream/v1/internal/livestream_connection_impl.h b/google/cloud/video/livestream/v1/internal/livestream_connection_impl.h index 219b038ce8499..2feafc3bb1d35 100644 --- a/google/cloud/video/livestream/v1/internal/livestream_connection_impl.h +++ b/google/cloud/video/livestream/v1/internal/livestream_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/video/livestream/v1/internal/livestream_logging_decorator.cc b/google/cloud/video/livestream/v1/internal/livestream_logging_decorator.cc index c75665e1c2ac6..85d5af1d29dd9 100644 --- a/google/cloud/video/livestream/v1/internal/livestream_logging_decorator.cc +++ b/google/cloud/video/livestream/v1/internal/livestream_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/video/livestream/v1/service.proto #include "google/cloud/video/livestream/v1/internal/livestream_logging_decorator.h" +#include "google/cloud/video/livestream/v1/service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_livestream_v1_internal { @@ -937,3 +940,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace video_livestream_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/video/livestream/v1/internal/livestream_logging_decorator.h b/google/cloud/video/livestream/v1/internal/livestream_logging_decorator.h index 3513c6ce0901d..ab226a4b3990c 100644 --- a/google/cloud/video/livestream/v1/internal/livestream_logging_decorator.h +++ b/google/cloud/video/livestream/v1/internal/livestream_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/video/livestream/v1/internal/livestream_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_livestream_v1_internal { @@ -382,4 +385,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_LIVESTREAM_V1_INTERNAL_LIVESTREAM_LOGGING_DECORATOR_H diff --git a/google/cloud/video/livestream/v1/internal/livestream_metadata_decorator.cc b/google/cloud/video/livestream/v1/internal/livestream_metadata_decorator.cc index ee103d3434eeb..35589e3e69491 100644 --- a/google/cloud/video/livestream/v1/internal/livestream_metadata_decorator.cc +++ b/google/cloud/video/livestream/v1/internal/livestream_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/video/livestream/v1/service.proto #include "google/cloud/video/livestream/v1/internal/livestream_metadata_decorator.h" +#include "google/cloud/video/livestream/v1/service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_livestream_v1_internal { @@ -667,3 +671,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace video_livestream_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/video/livestream/v1/internal/livestream_metadata_decorator.h b/google/cloud/video/livestream/v1/internal/livestream_metadata_decorator.h index 5368cc30590b3..9a06b10a11dd4 100644 --- a/google/cloud/video/livestream/v1/internal/livestream_metadata_decorator.h +++ b/google/cloud/video/livestream/v1/internal/livestream_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/video/livestream/v1/internal/livestream_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_livestream_v1_internal { @@ -388,4 +391,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_LIVESTREAM_V1_INTERNAL_LIVESTREAM_METADATA_DECORATOR_H diff --git a/google/cloud/video/livestream/v1/internal/livestream_option_defaults.cc b/google/cloud/video/livestream/v1/internal/livestream_option_defaults.cc index 1a3e0b2bd90d9..94b5c822dd112 100644 --- a/google/cloud/video/livestream/v1/internal/livestream_option_defaults.cc +++ b/google/cloud/video/livestream/v1/internal/livestream_option_defaults.cc @@ -42,7 +42,7 @@ Options LivestreamServiceDefaultOptions(Options options) { if (!options.has()) { options.set( video_livestream_v1::LivestreamServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/video/livestream/v1/internal/livestream_stub.cc b/google/cloud/video/livestream/v1/internal/livestream_stub.cc index cd4636a760dda..027d6b9cfaf7d 100644 --- a/google/cloud/video/livestream/v1/internal/livestream_stub.cc +++ b/google/cloud/video/livestream/v1/internal/livestream_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/video/livestream/v1/service.proto #include "google/cloud/video/livestream/v1/internal/livestream_stub.h" +#include "google/cloud/video/livestream/v1/service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_livestream_v1_internal { @@ -909,3 +912,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace video_livestream_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/video/livestream/v1/internal/livestream_stub.h b/google/cloud/video/livestream/v1/internal/livestream_stub.h index 3de9dddf1ba30..9cf24ec6eb3cb 100644 --- a/google/cloud/video/livestream/v1/internal/livestream_stub.h +++ b/google/cloud/video/livestream/v1/internal/livestream_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_LIVESTREAM_V1_INTERNAL_LIVESTREAM_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_LIVESTREAM_V1_INTERNAL_LIVESTREAM_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/video/livestream/v1/service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_livestream_v1_internal { @@ -738,4 +741,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_LIVESTREAM_V1_INTERNAL_LIVESTREAM_STUB_H diff --git a/google/cloud/video/livestream/v1/internal/livestream_stub_factory.cc b/google/cloud/video/livestream/v1/internal/livestream_stub_factory.cc index d26b5c68daf9d..dc81b404b15d9 100644 --- a/google/cloud/video/livestream/v1/internal/livestream_stub_factory.cc +++ b/google/cloud/video/livestream/v1/internal/livestream_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/video/livestream/v1/service.proto #include "google/cloud/video/livestream/v1/internal/livestream_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/video/livestream/v1/internal/livestream_auth_decorator.h" #include "google/cloud/video/livestream/v1/internal/livestream_logging_decorator.h" #include "google/cloud/video/livestream/v1/internal/livestream_metadata_decorator.h" #include "google/cloud/video/livestream/v1/internal/livestream_stub.h" #include "google/cloud/video/livestream/v1/internal/livestream_tracing_stub.h" +#include "google/cloud/video/livestream/v1/service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_livestream_v1_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace video_livestream_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/video/livestream/v1/internal/livestream_stub_factory.h b/google/cloud/video/livestream/v1/internal/livestream_stub_factory.h index 845a3af2fa150..96ac060016987 100644 --- a/google/cloud/video/livestream/v1/internal/livestream_stub_factory.h +++ b/google/cloud/video/livestream/v1/internal/livestream_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_livestream_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_LIVESTREAM_V1_INTERNAL_LIVESTREAM_STUB_FACTORY_H diff --git a/google/cloud/video/livestream/v1/internal/livestream_tracing_connection.cc b/google/cloud/video/livestream/v1/internal/livestream_tracing_connection.cc index dd220ca4e5464..27297cf88a5f5 100644 --- a/google/cloud/video/livestream/v1/internal/livestream_tracing_connection.cc +++ b/google/cloud/video/livestream/v1/internal/livestream_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace video_livestream_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - LivestreamServiceTracingConnection::LivestreamServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -774,17 +772,13 @@ Status LivestreamServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeLivestreamServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/video/livestream/v1/internal/livestream_tracing_connection.h b/google/cloud/video/livestream/v1/internal/livestream_tracing_connection.h index 93cb208ecbe05..850315a6dc2dd 100644 --- a/google/cloud/video/livestream/v1/internal/livestream_tracing_connection.h +++ b/google/cloud/video/livestream/v1/internal/livestream_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace video_livestream_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class LivestreamServiceTracingConnection : public video_livestream_v1::LivestreamServiceConnection { public: @@ -352,8 +350,6 @@ class LivestreamServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/video/livestream/v1/internal/livestream_tracing_stub.cc b/google/cloud/video/livestream/v1/internal/livestream_tracing_stub.cc index f793776ad0bc7..0344a2378ec43 100644 --- a/google/cloud/video/livestream/v1/internal/livestream_tracing_stub.cc +++ b/google/cloud/video/livestream/v1/internal/livestream_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_livestream_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - LivestreamServiceTracingStub::LivestreamServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -807,18 +808,14 @@ future LivestreamServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeLivestreamServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace video_livestream_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/video/livestream/v1/internal/livestream_tracing_stub.h b/google/cloud/video/livestream/v1/internal/livestream_tracing_stub.h index 5d039688baefe..00d8f412895d9 100644 --- a/google/cloud/video/livestream/v1/internal/livestream_tracing_stub.h +++ b/google/cloud/video/livestream/v1/internal/livestream_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_livestream_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class LivestreamServiceTracingStub : public LivestreamServiceStub { public: ~LivestreamServiceTracingStub() override = default; @@ -378,8 +379,6 @@ class LivestreamServiceTracingStub : public LivestreamServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -394,4 +393,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_LIVESTREAM_V1_INTERNAL_LIVESTREAM_TRACING_STUB_H diff --git a/google/cloud/video/livestream/v1/livestream_client.h b/google/cloud/video/livestream/v1/livestream_client.h index ecd259feade87..734068a383b42 100644 --- a/google/cloud/video/livestream/v1/livestream_client.h +++ b/google/cloud/video/livestream/v1/livestream_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/video/livestream/v1/livestream_connection.h b/google/cloud/video/livestream/v1/livestream_connection.h index a683cc15903ff..8bd63ac7c412f 100644 --- a/google/cloud/video/livestream/v1/livestream_connection.h +++ b/google/cloud/video/livestream/v1/livestream_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/video/livestream/v1/internal/livestream_retry_traits.h" #include "google/cloud/video/livestream/v1/livestream_connection_idempotency_policy.h" +#include "google/cloud/video/livestream/v1/service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/video/livestream/v1/livestream_connection_idempotency_policy.h b/google/cloud/video/livestream/v1/livestream_connection_idempotency_policy.h index ffb13a32e5ddb..f4518c052d3ff 100644 --- a/google/cloud/video/livestream/v1/livestream_connection_idempotency_policy.h +++ b/google/cloud/video/livestream/v1/livestream_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_LIVESTREAM_V1_LIVESTREAM_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_LIVESTREAM_V1_LIVESTREAM_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/video/livestream/v1/service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/video/livestream_client.h b/google/cloud/video/livestream_client.h deleted file mode 100644 index b14706665cf6d..0000000000000 --- a/google/cloud/video/livestream_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/video/livestream/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_LIVESTREAM_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_LIVESTREAM_CLIENT_H - -#include "google/cloud/video/livestream/v1/livestream_client.h" -#include "google/cloud/video/livestream_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in video_livestream_v1 instead of the aliases defined in -/// this namespace. -namespace video { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use video_livestream_v1::LivestreamServiceClient directly. -using ::google::cloud::video_livestream_v1::LivestreamServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace video -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_LIVESTREAM_CLIENT_H diff --git a/google/cloud/video/livestream_connection.h b/google/cloud/video/livestream_connection.h deleted file mode 100644 index e83060959d68b..0000000000000 --- a/google/cloud/video/livestream_connection.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/video/livestream/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_LIVESTREAM_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_LIVESTREAM_CONNECTION_H - -#include "google/cloud/video/livestream/v1/livestream_connection.h" -#include "google/cloud/video/livestream_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace video { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use video_livestream_v1::MakeLivestreamServiceConnection -/// directly. -using ::google::cloud::video_livestream_v1::MakeLivestreamServiceConnection; - -/// @deprecated Use video_livestream_v1::LivestreamServiceConnection directly. -using ::google::cloud::video_livestream_v1::LivestreamServiceConnection; - -/// @deprecated Use -/// video_livestream_v1::LivestreamServiceLimitedErrorCountRetryPolicy directly. -using ::google::cloud::video_livestream_v1:: - LivestreamServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use video_livestream_v1::LivestreamServiceLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::video_livestream_v1:: - LivestreamServiceLimitedTimeRetryPolicy; - -/// @deprecated Use video_livestream_v1::LivestreamServiceRetryPolicy directly. -using ::google::cloud::video_livestream_v1::LivestreamServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace video -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_LIVESTREAM_CONNECTION_H diff --git a/google/cloud/video/livestream_connection_idempotency_policy.h b/google/cloud/video/livestream_connection_idempotency_policy.h deleted file mode 100644 index beb1880a11dfd..0000000000000 --- a/google/cloud/video/livestream_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/video/livestream/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_LIVESTREAM_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_LIVESTREAM_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/video/livestream/v1/livestream_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace video { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// video_livestream_v1::MakeDefaultLivestreamServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::video_livestream_v1:: - MakeDefaultLivestreamServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// video_livestream_v1::LivestreamServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::video_livestream_v1:: - LivestreamServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace video -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_LIVESTREAM_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/video/livestream_options.h b/google/cloud/video/livestream_options.h deleted file mode 100644 index 4c4d8577e9236..0000000000000 --- a/google/cloud/video/livestream_options.h +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/video/livestream/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_LIVESTREAM_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_LIVESTREAM_OPTIONS_H - -#include "google/cloud/video/livestream/v1/livestream_options.h" -#include "google/cloud/video/livestream_connection.h" -#include "google/cloud/video/livestream_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace video { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use video_livestream_v1::LivestreamServicePollingPolicyOption -/// directly. -using ::google::cloud::video_livestream_v1:: - LivestreamServicePollingPolicyOption; - -/// @deprecated Use video_livestream_v1::LivestreamServiceBackoffPolicyOption -/// directly. -using ::google::cloud::video_livestream_v1:: - LivestreamServiceBackoffPolicyOption; - -/// @deprecated Use -/// video_livestream_v1::LivestreamServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::video_livestream_v1:: - LivestreamServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use video_livestream_v1::LivestreamServicePolicyOptionList -/// directly. -using ::google::cloud::video_livestream_v1::LivestreamServicePolicyOptionList; - -/// @deprecated Use video_livestream_v1::LivestreamServiceRetryPolicyOption -/// directly. -using ::google::cloud::video_livestream_v1::LivestreamServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace video -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_LIVESTREAM_OPTIONS_H diff --git a/google/cloud/video/mocks/mock_livestream_connection.h b/google/cloud/video/mocks/mock_livestream_connection.h deleted file mode 100644 index cb1936dadbae3..0000000000000 --- a/google/cloud/video/mocks/mock_livestream_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/video/livestream/v1/service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_MOCKS_MOCK_LIVESTREAM_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_MOCKS_MOCK_LIVESTREAM_CONNECTION_H - -#include "google/cloud/video/livestream/v1/mocks/mock_livestream_connection.h" -#include "google/cloud/video/livestream_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in video_livestream_v1_mocks instead of the aliases -/// defined in this namespace. -namespace video_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use video_livestream_v1_mocks::MockLivestreamServiceConnection -/// directly. -using ::google::cloud::video_livestream_v1_mocks:: - MockLivestreamServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace video_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_MOCKS_MOCK_LIVESTREAM_CONNECTION_H diff --git a/google/cloud/video/mocks/mock_transcoder_connection.h b/google/cloud/video/mocks/mock_transcoder_connection.h deleted file mode 100644 index 89ef017dc4dc3..0000000000000 --- a/google/cloud/video/mocks/mock_transcoder_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/video/transcoder/v1/services.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_MOCKS_MOCK_TRANSCODER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_MOCKS_MOCK_TRANSCODER_CONNECTION_H - -#include "google/cloud/video/transcoder/v1/mocks/mock_transcoder_connection.h" -#include "google/cloud/video/transcoder_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in video_transcoder_v1_mocks instead of the aliases -/// defined in this namespace. -namespace video_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use video_transcoder_v1_mocks::MockTranscoderServiceConnection -/// directly. -using ::google::cloud::video_transcoder_v1_mocks:: - MockTranscoderServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace video_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_MOCKS_MOCK_TRANSCODER_CONNECTION_H diff --git a/google/cloud/video/mocks/mock_video_stitcher_connection.h b/google/cloud/video/mocks/mock_video_stitcher_connection.h deleted file mode 100644 index 2cff109b83ab4..0000000000000 --- a/google/cloud/video/mocks/mock_video_stitcher_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/video/stitcher/v1/video_stitcher_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_MOCKS_MOCK_VIDEO_STITCHER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_MOCKS_MOCK_VIDEO_STITCHER_CONNECTION_H - -#include "google/cloud/video/stitcher/v1/mocks/mock_video_stitcher_connection.h" -#include "google/cloud/video/video_stitcher_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in video_stitcher_v1_mocks instead of the aliases -/// defined in this namespace. -namespace video_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use video_stitcher_v1_mocks::MockVideoStitcherServiceConnection -/// directly. -using ::google::cloud::video_stitcher_v1_mocks:: - MockVideoStitcherServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace video_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_MOCKS_MOCK_VIDEO_STITCHER_CONNECTION_H diff --git a/google/cloud/video/quickstart/.bazelrc b/google/cloud/video/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/video/quickstart/.bazelrc +++ b/google/cloud/video/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/video/quickstart/CMakeLists.txt b/google/cloud/video/quickstart/CMakeLists.txt index 0d73957973a6e..6fcf838ea1c12 100644 --- a/google/cloud/video/quickstart/CMakeLists.txt +++ b/google/cloud/video/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the video services C++ client library from a larger # CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-video-quickstart CXX) find_package(google_cloud_cpp_video REQUIRED) diff --git a/google/cloud/video/stitcher/v1/internal/video_stitcher_auth_decorator.cc b/google/cloud/video/stitcher/v1/internal/video_stitcher_auth_decorator.cc index 5cc315f8e23f6..c9d117ff61ca5 100644 --- a/google/cloud/video/stitcher/v1/internal/video_stitcher_auth_decorator.cc +++ b/google/cloud/video/stitcher/v1/internal/video_stitcher_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/video/stitcher/v1/video_stitcher_service.proto #include "google/cloud/video/stitcher/v1/internal/video_stitcher_auth_decorator.h" -#include +#include "google/cloud/video/stitcher/v1/video_stitcher_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_stitcher_v1_internal { @@ -622,3 +625,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace video_stitcher_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/video/stitcher/v1/internal/video_stitcher_auth_decorator.h b/google/cloud/video/stitcher/v1/internal/video_stitcher_auth_decorator.h index 563f464d358a2..39831f3537762 100644 --- a/google/cloud/video/stitcher/v1/internal/video_stitcher_auth_decorator.h +++ b/google/cloud/video/stitcher/v1/internal/video_stitcher_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/video/stitcher/v1/internal/video_stitcher_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_stitcher_v1_internal { @@ -319,4 +322,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_STITCHER_V1_INTERNAL_VIDEO_STITCHER_AUTH_DECORATOR_H diff --git a/google/cloud/video/stitcher/v1/internal/video_stitcher_connection_impl.h b/google/cloud/video/stitcher/v1/internal/video_stitcher_connection_impl.h index 3523612f19fe4..b472b8fbd174f 100644 --- a/google/cloud/video/stitcher/v1/internal/video_stitcher_connection_impl.h +++ b/google/cloud/video/stitcher/v1/internal/video_stitcher_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/video/stitcher/v1/internal/video_stitcher_logging_decorator.cc b/google/cloud/video/stitcher/v1/internal/video_stitcher_logging_decorator.cc index 11f059eee2f68..3b64e6cd4bb0d 100644 --- a/google/cloud/video/stitcher/v1/internal/video_stitcher_logging_decorator.cc +++ b/google/cloud/video/stitcher/v1/internal/video_stitcher_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/video/stitcher/v1/video_stitcher_service.proto #include "google/cloud/video/stitcher/v1/internal/video_stitcher_logging_decorator.h" +#include "google/cloud/video/stitcher/v1/video_stitcher_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_stitcher_v1_internal { @@ -757,3 +760,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace video_stitcher_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/video/stitcher/v1/internal/video_stitcher_logging_decorator.h b/google/cloud/video/stitcher/v1/internal/video_stitcher_logging_decorator.h index c632efaaca40d..eaa97d5d35498 100644 --- a/google/cloud/video/stitcher/v1/internal/video_stitcher_logging_decorator.h +++ b/google/cloud/video/stitcher/v1/internal/video_stitcher_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/video/stitcher/v1/internal/video_stitcher_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_stitcher_v1_internal { @@ -319,4 +322,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_STITCHER_V1_INTERNAL_VIDEO_STITCHER_LOGGING_DECORATOR_H diff --git a/google/cloud/video/stitcher/v1/internal/video_stitcher_metadata_decorator.cc b/google/cloud/video/stitcher/v1/internal/video_stitcher_metadata_decorator.cc index 37a7ef5e45bc4..d9f75cf51dcf6 100644 --- a/google/cloud/video/stitcher/v1/internal/video_stitcher_metadata_decorator.cc +++ b/google/cloud/video/stitcher/v1/internal/video_stitcher_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/video/stitcher/v1/video_stitcher_service.proto #include "google/cloud/video/stitcher/v1/internal/video_stitcher_metadata_decorator.h" +#include "google/cloud/video/stitcher/v1/video_stitcher_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_stitcher_v1_internal { @@ -554,3 +558,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace video_stitcher_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/video/stitcher/v1/internal/video_stitcher_metadata_decorator.h b/google/cloud/video/stitcher/v1/internal/video_stitcher_metadata_decorator.h index 80834c1bc2074..9290f7b9ab3b8 100644 --- a/google/cloud/video/stitcher/v1/internal/video_stitcher_metadata_decorator.h +++ b/google/cloud/video/stitcher/v1/internal/video_stitcher_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/video/stitcher/v1/internal/video_stitcher_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_stitcher_v1_internal { @@ -325,4 +328,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_STITCHER_V1_INTERNAL_VIDEO_STITCHER_METADATA_DECORATOR_H diff --git a/google/cloud/video/stitcher/v1/internal/video_stitcher_option_defaults.cc b/google/cloud/video/stitcher/v1/internal/video_stitcher_option_defaults.cc index 23137f9678138..67d47d09d5adc 100644 --- a/google/cloud/video/stitcher/v1/internal/video_stitcher_option_defaults.cc +++ b/google/cloud/video/stitcher/v1/internal/video_stitcher_option_defaults.cc @@ -43,7 +43,7 @@ Options VideoStitcherServiceDefaultOptions(Options options) { .has()) { options.set( video_stitcher_v1::VideoStitcherServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/video/stitcher/v1/internal/video_stitcher_stub.cc b/google/cloud/video/stitcher/v1/internal/video_stitcher_stub.cc index ff6895c41746d..881f8e4273a30 100644 --- a/google/cloud/video/stitcher/v1/internal/video_stitcher_stub.cc +++ b/google/cloud/video/stitcher/v1/internal/video_stitcher_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/video/stitcher/v1/video_stitcher_service.proto #include "google/cloud/video/stitcher/v1/internal/video_stitcher_stub.h" +#include "google/cloud/video/stitcher/v1/video_stitcher_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_stitcher_v1_internal { @@ -722,3 +725,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace video_stitcher_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/video/stitcher/v1/internal/video_stitcher_stub.h b/google/cloud/video/stitcher/v1/internal/video_stitcher_stub.h index a51a4f06b96d8..c1210febda842 100644 --- a/google/cloud/video/stitcher/v1/internal/video_stitcher_stub.h +++ b/google/cloud/video/stitcher/v1/internal/video_stitcher_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_STITCHER_V1_INTERNAL_VIDEO_STITCHER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_STITCHER_V1_INTERNAL_VIDEO_STITCHER_STUB_H +#include "google/cloud/video/stitcher/v1/video_stitcher_service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_stitcher_v1_internal { @@ -610,4 +613,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_STITCHER_V1_INTERNAL_VIDEO_STITCHER_STUB_H diff --git a/google/cloud/video/stitcher/v1/internal/video_stitcher_stub_factory.cc b/google/cloud/video/stitcher/v1/internal/video_stitcher_stub_factory.cc index f465cb88f44ba..cb674ef266a5f 100644 --- a/google/cloud/video/stitcher/v1/internal/video_stitcher_stub_factory.cc +++ b/google/cloud/video/stitcher/v1/internal/video_stitcher_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/video/stitcher/v1/internal/video_stitcher_metadata_decorator.h" #include "google/cloud/video/stitcher/v1/internal/video_stitcher_stub.h" #include "google/cloud/video/stitcher/v1/internal/video_stitcher_tracing_stub.h" +#include "google/cloud/video/stitcher/v1/video_stitcher_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_stitcher_v1_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace video_stitcher_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/video/stitcher/v1/internal/video_stitcher_stub_factory.h b/google/cloud/video/stitcher/v1/internal/video_stitcher_stub_factory.h index ee57f7f720962..527fa513bb4eb 100644 --- a/google/cloud/video/stitcher/v1/internal/video_stitcher_stub_factory.h +++ b/google/cloud/video/stitcher/v1/internal/video_stitcher_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_stitcher_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_STITCHER_V1_INTERNAL_VIDEO_STITCHER_STUB_FACTORY_H diff --git a/google/cloud/video/stitcher/v1/internal/video_stitcher_tracing_connection.cc b/google/cloud/video/stitcher/v1/internal/video_stitcher_tracing_connection.cc index 1a75d9648dd1d..8673801e2456a 100644 --- a/google/cloud/video/stitcher/v1/internal/video_stitcher_tracing_connection.cc +++ b/google/cloud/video/stitcher/v1/internal/video_stitcher_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace video_stitcher_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - VideoStitcherServiceTracingConnection::VideoStitcherServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -610,17 +608,13 @@ Status VideoStitcherServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeVideoStitcherServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/video/stitcher/v1/internal/video_stitcher_tracing_connection.h b/google/cloud/video/stitcher/v1/internal/video_stitcher_tracing_connection.h index b6bafe487ed7d..c248ae784c991 100644 --- a/google/cloud/video/stitcher/v1/internal/video_stitcher_tracing_connection.h +++ b/google/cloud/video/stitcher/v1/internal/video_stitcher_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace video_stitcher_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class VideoStitcherServiceTracingConnection : public video_stitcher_v1::VideoStitcherServiceConnection { public: @@ -282,8 +280,6 @@ class VideoStitcherServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/video/stitcher/v1/internal/video_stitcher_tracing_stub.cc b/google/cloud/video/stitcher/v1/internal/video_stitcher_tracing_stub.cc index e11682c414695..62995631801f5 100644 --- a/google/cloud/video/stitcher/v1/internal/video_stitcher_tracing_stub.cc +++ b/google/cloud/video/stitcher/v1/internal/video_stitcher_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_stitcher_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - VideoStitcherServiceTracingStub::VideoStitcherServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -668,18 +669,14 @@ future VideoStitcherServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeVideoStitcherServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace video_stitcher_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/video/stitcher/v1/internal/video_stitcher_tracing_stub.h b/google/cloud/video/stitcher/v1/internal/video_stitcher_tracing_stub.h index 72173df39ce7c..802e331ac6111 100644 --- a/google/cloud/video/stitcher/v1/internal/video_stitcher_tracing_stub.h +++ b/google/cloud/video/stitcher/v1/internal/video_stitcher_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_stitcher_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class VideoStitcherServiceTracingStub : public VideoStitcherServiceStub { public: ~VideoStitcherServiceTracingStub() override = default; @@ -315,8 +316,6 @@ class VideoStitcherServiceTracingStub : public VideoStitcherServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -331,4 +330,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_STITCHER_V1_INTERNAL_VIDEO_STITCHER_TRACING_STUB_H diff --git a/google/cloud/video/stitcher/v1/video_stitcher_client.h b/google/cloud/video/stitcher/v1/video_stitcher_client.h index 9ad7b1c43e54c..2169c23fe71e6 100644 --- a/google/cloud/video/stitcher/v1/video_stitcher_client.h +++ b/google/cloud/video/stitcher/v1/video_stitcher_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/video/stitcher/v1/video_stitcher_connection.h b/google/cloud/video/stitcher/v1/video_stitcher_connection.h index def48d7fce5f9..946a3d9b7ce7b 100644 --- a/google/cloud/video/stitcher/v1/video_stitcher_connection.h +++ b/google/cloud/video/stitcher/v1/video_stitcher_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/video/stitcher/v1/internal/video_stitcher_retry_traits.h" #include "google/cloud/video/stitcher/v1/video_stitcher_connection_idempotency_policy.h" +#include "google/cloud/video/stitcher/v1/video_stitcher_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/video/stitcher/v1/video_stitcher_connection_idempotency_policy.h b/google/cloud/video/stitcher/v1/video_stitcher_connection_idempotency_policy.h index 65211da76256a..2f2342f9e98ed 100644 --- a/google/cloud/video/stitcher/v1/video_stitcher_connection_idempotency_policy.h +++ b/google/cloud/video/stitcher/v1/video_stitcher_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_STITCHER_V1_VIDEO_STITCHER_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_STITCHER_V1_VIDEO_STITCHER_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/video/stitcher/v1/video_stitcher_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/video/transcoder/v1/internal/transcoder_auth_decorator.cc b/google/cloud/video/transcoder/v1/internal/transcoder_auth_decorator.cc index bf6646a11f16d..97e023ca3eb66 100644 --- a/google/cloud/video/transcoder/v1/internal/transcoder_auth_decorator.cc +++ b/google/cloud/video/transcoder/v1/internal/transcoder_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/video/transcoder/v1/services.proto #include "google/cloud/video/transcoder/v1/internal/transcoder_auth_decorator.h" -#include +#include "google/cloud/video/transcoder/v1/services.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_transcoder_v1_internal { @@ -109,3 +112,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace video_transcoder_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/video/transcoder/v1/internal/transcoder_auth_decorator.h b/google/cloud/video/transcoder/v1/internal/transcoder_auth_decorator.h index fab56d5de46c9..7b93c29d52ccd 100644 --- a/google/cloud/video/transcoder/v1/internal/transcoder_auth_decorator.h +++ b/google/cloud/video/transcoder/v1/internal/transcoder_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_transcoder_v1_internal { @@ -88,4 +91,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_TRANSCODER_V1_INTERNAL_TRANSCODER_AUTH_DECORATOR_H diff --git a/google/cloud/video/transcoder/v1/internal/transcoder_logging_decorator.cc b/google/cloud/video/transcoder/v1/internal/transcoder_logging_decorator.cc index dc35330916f64..e46ab40e395d3 100644 --- a/google/cloud/video/transcoder/v1/internal/transcoder_logging_decorator.cc +++ b/google/cloud/video/transcoder/v1/internal/transcoder_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/video/transcoder/v1/services.proto #include "google/cloud/video/transcoder/v1/internal/transcoder_logging_decorator.h" +#include "google/cloud/video/transcoder/v1/services.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_transcoder_v1_internal { @@ -148,3 +151,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace video_transcoder_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/video/transcoder/v1/internal/transcoder_logging_decorator.h b/google/cloud/video/transcoder/v1/internal/transcoder_logging_decorator.h index 76f1646de6576..d079faaa71a4a 100644 --- a/google/cloud/video/transcoder/v1/internal/transcoder_logging_decorator.h +++ b/google/cloud/video/transcoder/v1/internal/transcoder_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_transcoder_v1_internal { @@ -88,4 +91,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_TRANSCODER_V1_INTERNAL_TRANSCODER_LOGGING_DECORATOR_H diff --git a/google/cloud/video/transcoder/v1/internal/transcoder_metadata_decorator.cc b/google/cloud/video/transcoder/v1/internal/transcoder_metadata_decorator.cc index b8f417b7c23fb..2d0eb913d8393 100644 --- a/google/cloud/video/transcoder/v1/internal/transcoder_metadata_decorator.cc +++ b/google/cloud/video/transcoder/v1/internal/transcoder_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/video/transcoder/v1/services.proto #include "google/cloud/video/transcoder/v1/internal/transcoder_metadata_decorator.h" +#include "google/cloud/video/transcoder/v1/services.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_transcoder_v1_internal { @@ -135,3 +139,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace video_transcoder_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/video/transcoder/v1/internal/transcoder_metadata_decorator.h b/google/cloud/video/transcoder/v1/internal/transcoder_metadata_decorator.h index 966772e222e41..556a8c4416af9 100644 --- a/google/cloud/video/transcoder/v1/internal/transcoder_metadata_decorator.h +++ b/google/cloud/video/transcoder/v1/internal/transcoder_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_transcoder_v1_internal { @@ -94,4 +97,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_TRANSCODER_V1_INTERNAL_TRANSCODER_METADATA_DECORATOR_H diff --git a/google/cloud/video/transcoder/v1/internal/transcoder_option_defaults.cc b/google/cloud/video/transcoder/v1/internal/transcoder_option_defaults.cc index afbc76b80fff6..d243d3a064f0d 100644 --- a/google/cloud/video/transcoder/v1/internal/transcoder_option_defaults.cc +++ b/google/cloud/video/transcoder/v1/internal/transcoder_option_defaults.cc @@ -42,7 +42,7 @@ Options TranscoderServiceDefaultOptions(Options options) { if (!options.has()) { options.set( video_transcoder_v1::TranscoderServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options diff --git a/google/cloud/video/transcoder/v1/internal/transcoder_stub.cc b/google/cloud/video/transcoder/v1/internal/transcoder_stub.cc index e2358f9d0d25f..553085f1e6f91 100644 --- a/google/cloud/video/transcoder/v1/internal/transcoder_stub.cc +++ b/google/cloud/video/transcoder/v1/internal/transcoder_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/video/transcoder/v1/services.proto #include "google/cloud/video/transcoder/v1/internal/transcoder_stub.h" +#include "google/cloud/video/transcoder/v1/services.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_transcoder_v1_internal { @@ -132,3 +135,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace video_transcoder_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/video/transcoder/v1/internal/transcoder_stub.h b/google/cloud/video/transcoder/v1/internal/transcoder_stub.h index a98fc22290da1..c14ce5d15f103 100644 --- a/google/cloud/video/transcoder/v1/internal/transcoder_stub.h +++ b/google/cloud/video/transcoder/v1/internal/transcoder_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_TRANSCODER_V1_INTERNAL_TRANSCODER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_TRANSCODER_V1_INTERNAL_TRANSCODER_STUB_H +#include "google/cloud/video/transcoder/v1/services.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_transcoder_v1_internal { @@ -138,4 +141,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_TRANSCODER_V1_INTERNAL_TRANSCODER_STUB_H diff --git a/google/cloud/video/transcoder/v1/internal/transcoder_stub_factory.cc b/google/cloud/video/transcoder/v1/internal/transcoder_stub_factory.cc index 419f4e1c2e967..d50c078914819 100644 --- a/google/cloud/video/transcoder/v1/internal/transcoder_stub_factory.cc +++ b/google/cloud/video/transcoder/v1/internal/transcoder_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/video/transcoder/v1/internal/transcoder_metadata_decorator.h" #include "google/cloud/video/transcoder/v1/internal/transcoder_stub.h" #include "google/cloud/video/transcoder/v1/internal/transcoder_tracing_stub.h" +#include "google/cloud/video/transcoder/v1/services.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_transcoder_v1_internal { @@ -70,3 +73,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace video_transcoder_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/video/transcoder/v1/internal/transcoder_stub_factory.h b/google/cloud/video/transcoder/v1/internal/transcoder_stub_factory.h index 35b5c2c47e8c7..1d9eeca784644 100644 --- a/google/cloud/video/transcoder/v1/internal/transcoder_stub_factory.h +++ b/google/cloud/video/transcoder/v1/internal/transcoder_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_transcoder_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_TRANSCODER_V1_INTERNAL_TRANSCODER_STUB_FACTORY_H diff --git a/google/cloud/video/transcoder/v1/internal/transcoder_tracing_connection.cc b/google/cloud/video/transcoder/v1/internal/transcoder_tracing_connection.cc index 7a6a467f0dcd3..7bf10a3d50718 100644 --- a/google/cloud/video/transcoder/v1/internal/transcoder_tracing_connection.cc +++ b/google/cloud/video/transcoder/v1/internal/transcoder_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace video_transcoder_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TranscoderServiceTracingConnection::TranscoderServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -112,17 +110,13 @@ Status TranscoderServiceTracingConnection::DeleteJobTemplate( return internal::EndSpan(*span, child_->DeleteJobTemplate(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTranscoderServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/video/transcoder/v1/internal/transcoder_tracing_connection.h b/google/cloud/video/transcoder/v1/internal/transcoder_tracing_connection.h index f8b8dcf80591d..51cd6a30f27c9 100644 --- a/google/cloud/video/transcoder/v1/internal/transcoder_tracing_connection.h +++ b/google/cloud/video/transcoder/v1/internal/transcoder_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace video_transcoder_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TranscoderServiceTracingConnection : public video_transcoder_v1::TranscoderServiceConnection { public: @@ -74,8 +72,6 @@ class TranscoderServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/video/transcoder/v1/internal/transcoder_tracing_stub.cc b/google/cloud/video/transcoder/v1/internal/transcoder_tracing_stub.cc index 645ebcc29d2d6..e8f27c16912e3 100644 --- a/google/cloud/video/transcoder/v1/internal/transcoder_tracing_stub.cc +++ b/google/cloud/video/transcoder/v1/internal/transcoder_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_transcoder_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - TranscoderServiceTracingStub::TranscoderServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -132,18 +133,14 @@ Status TranscoderServiceTracingStub::DeleteJobTemplate( context, *span, child_->DeleteJobTemplate(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeTranscoderServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace video_transcoder_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/video/transcoder/v1/internal/transcoder_tracing_stub.h b/google/cloud/video/transcoder/v1/internal/transcoder_tracing_stub.h index ac475ea2c60ff..f7d5bcbe48e89 100644 --- a/google/cloud/video/transcoder/v1/internal/transcoder_tracing_stub.h +++ b/google/cloud/video/transcoder/v1/internal/transcoder_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace video_transcoder_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class TranscoderServiceTracingStub : public TranscoderServiceStub { public: ~TranscoderServiceTracingStub() override = default; @@ -85,8 +86,6 @@ class TranscoderServiceTracingStub : public TranscoderServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -101,4 +100,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_TRANSCODER_V1_INTERNAL_TRANSCODER_TRACING_STUB_H diff --git a/google/cloud/video/transcoder/v1/transcoder_connection.h b/google/cloud/video/transcoder/v1/transcoder_connection.h index ba26962f261d0..c059eebaea2d5 100644 --- a/google/cloud/video/transcoder/v1/transcoder_connection.h +++ b/google/cloud/video/transcoder/v1/transcoder_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_TRANSCODER_V1_TRANSCODER_CONNECTION_H #include "google/cloud/video/transcoder/v1/internal/transcoder_retry_traits.h" +#include "google/cloud/video/transcoder/v1/services.pb.h" #include "google/cloud/video/transcoder/v1/transcoder_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/video/transcoder/v1/transcoder_connection_idempotency_policy.h b/google/cloud/video/transcoder/v1/transcoder_connection_idempotency_policy.h index c5bfcacf14e75..8d888abe32ff5 100644 --- a/google/cloud/video/transcoder/v1/transcoder_connection_idempotency_policy.h +++ b/google/cloud/video/transcoder/v1/transcoder_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_TRANSCODER_V1_TRANSCODER_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_TRANSCODER_V1_TRANSCODER_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/video/transcoder/v1/services.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/video/transcoder_client.h b/google/cloud/video/transcoder_client.h deleted file mode 100644 index bc92b7666ad53..0000000000000 --- a/google/cloud/video/transcoder_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/video/transcoder/v1/services.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_TRANSCODER_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_TRANSCODER_CLIENT_H - -#include "google/cloud/video/transcoder/v1/transcoder_client.h" -#include "google/cloud/video/transcoder_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in video_transcoder_v1 instead of the aliases defined in -/// this namespace. -namespace video { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use video_transcoder_v1::TranscoderServiceClient directly. -using ::google::cloud::video_transcoder_v1::TranscoderServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace video -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_TRANSCODER_CLIENT_H diff --git a/google/cloud/video/transcoder_connection.h b/google/cloud/video/transcoder_connection.h deleted file mode 100644 index 5cbe3ff2dff96..0000000000000 --- a/google/cloud/video/transcoder_connection.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/video/transcoder/v1/services.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_TRANSCODER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_TRANSCODER_CONNECTION_H - -#include "google/cloud/video/transcoder/v1/transcoder_connection.h" -#include "google/cloud/video/transcoder_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace video { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use video_transcoder_v1::MakeTranscoderServiceConnection -/// directly. -using ::google::cloud::video_transcoder_v1::MakeTranscoderServiceConnection; - -/// @deprecated Use video_transcoder_v1::TranscoderServiceConnection directly. -using ::google::cloud::video_transcoder_v1::TranscoderServiceConnection; - -/// @deprecated Use -/// video_transcoder_v1::TranscoderServiceLimitedErrorCountRetryPolicy directly. -using ::google::cloud::video_transcoder_v1:: - TranscoderServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use video_transcoder_v1::TranscoderServiceLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::video_transcoder_v1:: - TranscoderServiceLimitedTimeRetryPolicy; - -/// @deprecated Use video_transcoder_v1::TranscoderServiceRetryPolicy directly. -using ::google::cloud::video_transcoder_v1::TranscoderServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace video -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_TRANSCODER_CONNECTION_H diff --git a/google/cloud/video/transcoder_connection_idempotency_policy.h b/google/cloud/video/transcoder_connection_idempotency_policy.h deleted file mode 100644 index 3a2f147d15a22..0000000000000 --- a/google/cloud/video/transcoder_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/video/transcoder/v1/services.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_TRANSCODER_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_TRANSCODER_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/video/transcoder/v1/transcoder_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace video { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// video_transcoder_v1::MakeDefaultTranscoderServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::video_transcoder_v1:: - MakeDefaultTranscoderServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// video_transcoder_v1::TranscoderServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::video_transcoder_v1:: - TranscoderServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace video -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_TRANSCODER_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/video/transcoder_options.h b/google/cloud/video/transcoder_options.h deleted file mode 100644 index a23161a033a0d..0000000000000 --- a/google/cloud/video/transcoder_options.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/video/transcoder/v1/services.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_TRANSCODER_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_TRANSCODER_OPTIONS_H - -#include "google/cloud/video/transcoder/v1/transcoder_options.h" -#include "google/cloud/video/transcoder_connection.h" -#include "google/cloud/video/transcoder_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace video { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use video_transcoder_v1::TranscoderServiceBackoffPolicyOption -/// directly. -using ::google::cloud::video_transcoder_v1:: - TranscoderServiceBackoffPolicyOption; - -/// @deprecated Use -/// video_transcoder_v1::TranscoderServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::video_transcoder_v1:: - TranscoderServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use video_transcoder_v1::TranscoderServicePolicyOptionList -/// directly. -using ::google::cloud::video_transcoder_v1::TranscoderServicePolicyOptionList; - -/// @deprecated Use video_transcoder_v1::TranscoderServiceRetryPolicyOption -/// directly. -using ::google::cloud::video_transcoder_v1::TranscoderServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace video -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_TRANSCODER_OPTIONS_H diff --git a/google/cloud/video/video_stitcher_client.h b/google/cloud/video/video_stitcher_client.h deleted file mode 100644 index 116e866ec9cfe..0000000000000 --- a/google/cloud/video/video_stitcher_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/video/stitcher/v1/video_stitcher_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_VIDEO_STITCHER_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_VIDEO_STITCHER_CLIENT_H - -#include "google/cloud/video/stitcher/v1/video_stitcher_client.h" -#include "google/cloud/video/video_stitcher_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in video_stitcher_v1 instead of the aliases defined in -/// this namespace. -namespace video { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use video_stitcher_v1::VideoStitcherServiceClient directly. -using ::google::cloud::video_stitcher_v1::VideoStitcherServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace video -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_VIDEO_STITCHER_CLIENT_H diff --git a/google/cloud/video/video_stitcher_connection.h b/google/cloud/video/video_stitcher_connection.h deleted file mode 100644 index d6f5869731038..0000000000000 --- a/google/cloud/video/video_stitcher_connection.h +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/video/stitcher/v1/video_stitcher_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_VIDEO_STITCHER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_VIDEO_STITCHER_CONNECTION_H - -#include "google/cloud/video/stitcher/v1/video_stitcher_connection.h" -#include "google/cloud/video/video_stitcher_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace video { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use video_stitcher_v1::MakeVideoStitcherServiceConnection -/// directly. -using ::google::cloud::video_stitcher_v1::MakeVideoStitcherServiceConnection; - -/// @deprecated Use video_stitcher_v1::VideoStitcherServiceConnection directly. -using ::google::cloud::video_stitcher_v1::VideoStitcherServiceConnection; - -/// @deprecated Use -/// video_stitcher_v1::VideoStitcherServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::video_stitcher_v1:: - VideoStitcherServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use -/// video_stitcher_v1::VideoStitcherServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::video_stitcher_v1:: - VideoStitcherServiceLimitedTimeRetryPolicy; - -/// @deprecated Use video_stitcher_v1::VideoStitcherServiceRetryPolicy directly. -using ::google::cloud::video_stitcher_v1::VideoStitcherServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace video -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_VIDEO_STITCHER_CONNECTION_H diff --git a/google/cloud/video/video_stitcher_connection_idempotency_policy.h b/google/cloud/video/video_stitcher_connection_idempotency_policy.h deleted file mode 100644 index 03f79a180c4c1..0000000000000 --- a/google/cloud/video/video_stitcher_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/video/stitcher/v1/video_stitcher_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_VIDEO_STITCHER_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_VIDEO_STITCHER_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/video/stitcher/v1/video_stitcher_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace video { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// video_stitcher_v1::MakeDefaultVideoStitcherServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::video_stitcher_v1:: - MakeDefaultVideoStitcherServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// video_stitcher_v1::VideoStitcherServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::video_stitcher_v1:: - VideoStitcherServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace video -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_VIDEO_STITCHER_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/video/video_stitcher_options.h b/google/cloud/video/video_stitcher_options.h deleted file mode 100644 index d8c185ce006e4..0000000000000 --- a/google/cloud/video/video_stitcher_options.h +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/video/stitcher/v1/video_stitcher_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_VIDEO_STITCHER_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_VIDEO_STITCHER_OPTIONS_H - -#include "google/cloud/video/stitcher/v1/video_stitcher_options.h" -#include "google/cloud/video/video_stitcher_connection.h" -#include "google/cloud/video/video_stitcher_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace video { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use video_stitcher_v1::VideoStitcherServicePollingPolicyOption -/// directly. -using ::google::cloud::video_stitcher_v1:: - VideoStitcherServicePollingPolicyOption; - -/// @deprecated Use video_stitcher_v1::VideoStitcherServiceBackoffPolicyOption -/// directly. -using ::google::cloud::video_stitcher_v1:: - VideoStitcherServiceBackoffPolicyOption; - -/// @deprecated Use -/// video_stitcher_v1::VideoStitcherServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::video_stitcher_v1:: - VideoStitcherServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use video_stitcher_v1::VideoStitcherServicePolicyOptionList -/// directly. -using ::google::cloud::video_stitcher_v1::VideoStitcherServicePolicyOptionList; - -/// @deprecated Use video_stitcher_v1::VideoStitcherServiceRetryPolicyOption -/// directly. -using ::google::cloud::video_stitcher_v1::VideoStitcherServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace video -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEO_VIDEO_STITCHER_OPTIONS_H diff --git a/google/cloud/videointelligence/BUILD.bazel b/google/cloud/videointelligence/BUILD.bazel index 9bb8d201de31e..4d2ea13e9fc55 100644 --- a/google/cloud/videointelligence/BUILD.bazel +++ b/google/cloud/videointelligence/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/videointelligence/v1:videointelligence_cc_grpc", + "@googleapis//google/cloud/videointelligence/v1:videointelligence_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/videointelligence/CMakeLists.txt b/google/cloud/videointelligence/CMakeLists.txt index 1091b26fa5939..d901774374835 100644 --- a/google/cloud/videointelligence/CMakeLists.txt +++ b/google/cloud/videointelligence/CMakeLists.txt @@ -17,8 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library( - videointelligence "Cloud Video Intelligence API" SERVICE_DIRS "__EMPTY__" - "v1/") + videointelligence "Cloud Video Intelligence API" SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(videointelligence_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/videointelligence/mocks/mock_video_intelligence_connection.h b/google/cloud/videointelligence/mocks/mock_video_intelligence_connection.h deleted file mode 100644 index fc79bbb2e43f9..0000000000000 --- a/google/cloud/videointelligence/mocks/mock_video_intelligence_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/videointelligence/v1/video_intelligence.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEOINTELLIGENCE_MOCKS_MOCK_VIDEO_INTELLIGENCE_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEOINTELLIGENCE_MOCKS_MOCK_VIDEO_INTELLIGENCE_CONNECTION_H - -#include "google/cloud/videointelligence/v1/mocks/mock_video_intelligence_connection.h" -#include "google/cloud/videointelligence/video_intelligence_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in videointelligence_v1_mocks instead of the aliases -/// defined in this namespace. -namespace videointelligence_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// videointelligence_v1_mocks::MockVideoIntelligenceServiceConnection directly. -using ::google::cloud::videointelligence_v1_mocks:: - MockVideoIntelligenceServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace videointelligence_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEOINTELLIGENCE_MOCKS_MOCK_VIDEO_INTELLIGENCE_CONNECTION_H diff --git a/google/cloud/videointelligence/quickstart/.bazelrc b/google/cloud/videointelligence/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/videointelligence/quickstart/.bazelrc +++ b/google/cloud/videointelligence/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/videointelligence/quickstart/CMakeLists.txt b/google/cloud/videointelligence/quickstart/CMakeLists.txt index 82a83db6e1221..ce3a133671b63 100644 --- a/google/cloud/videointelligence/quickstart/CMakeLists.txt +++ b/google/cloud/videointelligence/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Video Intelligence API C++ client library # from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-videointelligence-quickstart CXX) find_package(google_cloud_cpp_videointelligence REQUIRED) diff --git a/google/cloud/videointelligence/v1/internal/video_intelligence_auth_decorator.cc b/google/cloud/videointelligence/v1/internal/video_intelligence_auth_decorator.cc index a9c74676ecc98..1a60ec25b1255 100644 --- a/google/cloud/videointelligence/v1/internal/video_intelligence_auth_decorator.cc +++ b/google/cloud/videointelligence/v1/internal/video_intelligence_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/videointelligence/v1/video_intelligence.proto #include "google/cloud/videointelligence/v1/internal/video_intelligence_auth_decorator.h" -#include +#include "google/cloud/videointelligence/v1/video_intelligence.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace videointelligence_v1_internal { @@ -100,3 +103,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace videointelligence_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/videointelligence/v1/internal/video_intelligence_auth_decorator.h b/google/cloud/videointelligence/v1/internal/video_intelligence_auth_decorator.h index 883050768733c..3a0a2f67dc352 100644 --- a/google/cloud/videointelligence/v1/internal/video_intelligence_auth_decorator.h +++ b/google/cloud/videointelligence/v1/internal/video_intelligence_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/videointelligence/v1/internal/video_intelligence_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace videointelligence_v1_internal { @@ -73,4 +76,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEOINTELLIGENCE_V1_INTERNAL_VIDEO_INTELLIGENCE_AUTH_DECORATOR_H diff --git a/google/cloud/videointelligence/v1/internal/video_intelligence_connection_impl.h b/google/cloud/videointelligence/v1/internal/video_intelligence_connection_impl.h index 5f14e13459663..ad42f7b778d06 100644 --- a/google/cloud/videointelligence/v1/internal/video_intelligence_connection_impl.h +++ b/google/cloud/videointelligence/v1/internal/video_intelligence_connection_impl.h @@ -31,7 +31,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/videointelligence/v1/internal/video_intelligence_logging_decorator.cc b/google/cloud/videointelligence/v1/internal/video_intelligence_logging_decorator.cc index 733a631dde268..a845ae9bcb1f4 100644 --- a/google/cloud/videointelligence/v1/internal/video_intelligence_logging_decorator.cc +++ b/google/cloud/videointelligence/v1/internal/video_intelligence_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/videointelligence/v1/video_intelligence.proto #include "google/cloud/videointelligence/v1/internal/video_intelligence_logging_decorator.h" +#include "google/cloud/videointelligence/v1/video_intelligence.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace videointelligence_v1_internal { @@ -106,3 +109,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace videointelligence_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/videointelligence/v1/internal/video_intelligence_logging_decorator.h b/google/cloud/videointelligence/v1/internal/video_intelligence_logging_decorator.h index 2283912e9888b..e4a342413ccc2 100644 --- a/google/cloud/videointelligence/v1/internal/video_intelligence_logging_decorator.h +++ b/google/cloud/videointelligence/v1/internal/video_intelligence_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/videointelligence/v1/internal/video_intelligence_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace videointelligence_v1_internal { @@ -73,4 +76,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEOINTELLIGENCE_V1_INTERNAL_VIDEO_INTELLIGENCE_LOGGING_DECORATOR_H diff --git a/google/cloud/videointelligence/v1/internal/video_intelligence_metadata_decorator.cc b/google/cloud/videointelligence/v1/internal/video_intelligence_metadata_decorator.cc index f8cef953e940e..78bb748da30df 100644 --- a/google/cloud/videointelligence/v1/internal/video_intelligence_metadata_decorator.cc +++ b/google/cloud/videointelligence/v1/internal/video_intelligence_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/videointelligence/v1/video_intelligence.proto #include "google/cloud/videointelligence/v1/internal/video_intelligence_metadata_decorator.h" +#include "google/cloud/videointelligence/v1/video_intelligence.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace videointelligence_v1_internal { @@ -103,3 +107,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace videointelligence_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/videointelligence/v1/internal/video_intelligence_metadata_decorator.h b/google/cloud/videointelligence/v1/internal/video_intelligence_metadata_decorator.h index f809250c095ee..52d14d21464d9 100644 --- a/google/cloud/videointelligence/v1/internal/video_intelligence_metadata_decorator.h +++ b/google/cloud/videointelligence/v1/internal/video_intelligence_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/videointelligence/v1/internal/video_intelligence_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace videointelligence_v1_internal { @@ -79,4 +82,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEOINTELLIGENCE_V1_INTERNAL_VIDEO_INTELLIGENCE_METADATA_DECORATOR_H diff --git a/google/cloud/videointelligence/v1/internal/video_intelligence_option_defaults.cc b/google/cloud/videointelligence/v1/internal/video_intelligence_option_defaults.cc index 54b4db02886af..51ebd120f48bf 100644 --- a/google/cloud/videointelligence/v1/internal/video_intelligence_option_defaults.cc +++ b/google/cloud/videointelligence/v1/internal/video_intelligence_option_defaults.cc @@ -45,7 +45,7 @@ Options VideoIntelligenceServiceDefaultOptions(Options options) { options.set< videointelligence_v1::VideoIntelligenceServiceRetryPolicyOption>( videointelligence_v1::VideoIntelligenceServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace videointelligence_v1_internal { @@ -105,3 +108,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace videointelligence_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/videointelligence/v1/internal/video_intelligence_stub.h b/google/cloud/videointelligence/v1/internal/video_intelligence_stub.h index 06ba3bd07bae1..5d3ba4c49168f 100644 --- a/google/cloud/videointelligence/v1/internal/video_intelligence_stub.h +++ b/google/cloud/videointelligence/v1/internal/video_intelligence_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEOINTELLIGENCE_V1_INTERNAL_VIDEO_INTELLIGENCE_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEOINTELLIGENCE_V1_INTERNAL_VIDEO_INTELLIGENCE_STUB_H +#include "google/cloud/videointelligence/v1/video_intelligence.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace videointelligence_v1_internal { @@ -112,4 +115,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEOINTELLIGENCE_V1_INTERNAL_VIDEO_INTELLIGENCE_STUB_H diff --git a/google/cloud/videointelligence/v1/internal/video_intelligence_stub_factory.cc b/google/cloud/videointelligence/v1/internal/video_intelligence_stub_factory.cc index 3e6e76b339ce5..182dbd23b4c29 100644 --- a/google/cloud/videointelligence/v1/internal/video_intelligence_stub_factory.cc +++ b/google/cloud/videointelligence/v1/internal/video_intelligence_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/videointelligence/v1/internal/video_intelligence_metadata_decorator.h" #include "google/cloud/videointelligence/v1/internal/video_intelligence_stub.h" #include "google/cloud/videointelligence/v1/internal/video_intelligence_tracing_stub.h" +#include "google/cloud/videointelligence/v1/video_intelligence.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace videointelligence_v1_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace videointelligence_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/videointelligence/v1/internal/video_intelligence_stub_factory.h b/google/cloud/videointelligence/v1/internal/video_intelligence_stub_factory.h index 0cf714027edf6..4e19c54ef57e5 100644 --- a/google/cloud/videointelligence/v1/internal/video_intelligence_stub_factory.h +++ b/google/cloud/videointelligence/v1/internal/video_intelligence_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace videointelligence_v1_internal { @@ -40,4 +43,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEOINTELLIGENCE_V1_INTERNAL_VIDEO_INTELLIGENCE_STUB_FACTORY_H diff --git a/google/cloud/videointelligence/v1/internal/video_intelligence_tracing_connection.cc b/google/cloud/videointelligence/v1/internal/video_intelligence_tracing_connection.cc index cba4c192b43cb..aa0fe0a9aef0c 100644 --- a/google/cloud/videointelligence/v1/internal/video_intelligence_tracing_connection.cc +++ b/google/cloud/videointelligence/v1/internal/video_intelligence_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace videointelligence_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - VideoIntelligenceServiceTracingConnection:: VideoIntelligenceServiceTracingConnection( std::shared_ptr< @@ -66,18 +64,14 @@ VideoIntelligenceServiceTracingConnection::AnnotateVideo( return internal::EndSpan(std::move(span), child_->AnnotateVideo(operation)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeVideoIntelligenceServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared( std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/videointelligence/v1/internal/video_intelligence_tracing_connection.h b/google/cloud/videointelligence/v1/internal/video_intelligence_tracing_connection.h index a92ac5a2d9c5b..190c52c189d2c 100644 --- a/google/cloud/videointelligence/v1/internal/video_intelligence_tracing_connection.h +++ b/google/cloud/videointelligence/v1/internal/video_intelligence_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace videointelligence_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class VideoIntelligenceServiceTracingConnection : public videointelligence_v1::VideoIntelligenceServiceConnection { public: @@ -59,8 +57,6 @@ class VideoIntelligenceServiceTracingConnection child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/videointelligence/v1/internal/video_intelligence_tracing_stub.cc b/google/cloud/videointelligence/v1/internal/video_intelligence_tracing_stub.cc index fc3414910785e..23ec6fc4ba8f5 100644 --- a/google/cloud/videointelligence/v1/internal/video_intelligence_tracing_stub.cc +++ b/google/cloud/videointelligence/v1/internal/video_intelligence_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace videointelligence_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - VideoIntelligenceServiceTracingStub::VideoIntelligenceServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -88,19 +89,15 @@ future VideoIntelligenceServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeVideoIntelligenceServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace videointelligence_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/videointelligence/v1/internal/video_intelligence_tracing_stub.h b/google/cloud/videointelligence/v1/internal/video_intelligence_tracing_stub.h index 267255854bf01..db4b2fc714691 100644 --- a/google/cloud/videointelligence/v1/internal/video_intelligence_tracing_stub.h +++ b/google/cloud/videointelligence/v1/internal/video_intelligence_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace videointelligence_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class VideoIntelligenceServiceTracingStub : public VideoIntelligenceServiceStub { public: @@ -70,8 +71,6 @@ class VideoIntelligenceServiceTracingStub propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -87,4 +86,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEOINTELLIGENCE_V1_INTERNAL_VIDEO_INTELLIGENCE_TRACING_STUB_H diff --git a/google/cloud/videointelligence/v1/video_intelligence_client.h b/google/cloud/videointelligence/v1/video_intelligence_client.h index 6bef98cbf7120..f299e55ba7e4f 100644 --- a/google/cloud/videointelligence/v1/video_intelligence_client.h +++ b/google/cloud/videointelligence/v1/video_intelligence_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/videointelligence/v1/video_intelligence_connection.h b/google/cloud/videointelligence/v1/video_intelligence_connection.h index 792e3dec94a51..fd087e791b1e3 100644 --- a/google/cloud/videointelligence/v1/video_intelligence_connection.h +++ b/google/cloud/videointelligence/v1/video_intelligence_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEOINTELLIGENCE_V1_VIDEO_INTELLIGENCE_CONNECTION_H #include "google/cloud/videointelligence/v1/internal/video_intelligence_retry_traits.h" +#include "google/cloud/videointelligence/v1/video_intelligence.pb.h" #include "google/cloud/videointelligence/v1/video_intelligence_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -29,8 +30,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/videointelligence/v1/video_intelligence_connection_idempotency_policy.h b/google/cloud/videointelligence/v1/video_intelligence_connection_idempotency_policy.h index e3ae79f75c687..2f0fadb12f2b8 100644 --- a/google/cloud/videointelligence/v1/video_intelligence_connection_idempotency_policy.h +++ b/google/cloud/videointelligence/v1/video_intelligence_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEOINTELLIGENCE_V1_VIDEO_INTELLIGENCE_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEOINTELLIGENCE_V1_VIDEO_INTELLIGENCE_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/videointelligence/v1/video_intelligence.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/videointelligence/video_intelligence_client.h b/google/cloud/videointelligence/video_intelligence_client.h deleted file mode 100644 index 0b0415239afb1..0000000000000 --- a/google/cloud/videointelligence/video_intelligence_client.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/videointelligence/v1/video_intelligence.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEOINTELLIGENCE_VIDEO_INTELLIGENCE_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEOINTELLIGENCE_VIDEO_INTELLIGENCE_CLIENT_H - -#include "google/cloud/videointelligence/v1/video_intelligence_client.h" -#include "google/cloud/videointelligence/video_intelligence_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in videointelligence_v1 instead of the aliases defined in -/// this namespace. -namespace videointelligence { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use videointelligence_v1::VideoIntelligenceServiceClient -/// directly. -using ::google::cloud::videointelligence_v1::VideoIntelligenceServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace videointelligence -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEOINTELLIGENCE_VIDEO_INTELLIGENCE_CLIENT_H diff --git a/google/cloud/videointelligence/video_intelligence_connection.h b/google/cloud/videointelligence/video_intelligence_connection.h deleted file mode 100644 index 5e99873838daf..0000000000000 --- a/google/cloud/videointelligence/video_intelligence_connection.h +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/videointelligence/v1/video_intelligence.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEOINTELLIGENCE_VIDEO_INTELLIGENCE_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEOINTELLIGENCE_VIDEO_INTELLIGENCE_CONNECTION_H - -#include "google/cloud/videointelligence/v1/video_intelligence_connection.h" -#include "google/cloud/videointelligence/video_intelligence_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace videointelligence { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use videointelligence_v1::MakeVideoIntelligenceServiceConnection -/// directly. -using ::google::cloud::videointelligence_v1:: - MakeVideoIntelligenceServiceConnection; - -/// @deprecated Use videointelligence_v1::VideoIntelligenceServiceConnection -/// directly. -using ::google::cloud::videointelligence_v1::VideoIntelligenceServiceConnection; - -/// @deprecated Use -/// videointelligence_v1::VideoIntelligenceServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::videointelligence_v1:: - VideoIntelligenceServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use -/// videointelligence_v1::VideoIntelligenceServiceLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::videointelligence_v1:: - VideoIntelligenceServiceLimitedTimeRetryPolicy; - -/// @deprecated Use videointelligence_v1::VideoIntelligenceServiceRetryPolicy -/// directly. -using ::google::cloud::videointelligence_v1:: - VideoIntelligenceServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace videointelligence -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEOINTELLIGENCE_VIDEO_INTELLIGENCE_CONNECTION_H diff --git a/google/cloud/videointelligence/video_intelligence_connection_idempotency_policy.h b/google/cloud/videointelligence/video_intelligence_connection_idempotency_policy.h deleted file mode 100644 index 509e6085d0edd..0000000000000 --- a/google/cloud/videointelligence/video_intelligence_connection_idempotency_policy.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/videointelligence/v1/video_intelligence.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEOINTELLIGENCE_VIDEO_INTELLIGENCE_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEOINTELLIGENCE_VIDEO_INTELLIGENCE_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/videointelligence/v1/video_intelligence_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace videointelligence { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// videointelligence_v1::MakeDefaultVideoIntelligenceServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::videointelligence_v1:: - MakeDefaultVideoIntelligenceServiceConnectionIdempotencyPolicy; - -/// @deprecated Use -/// videointelligence_v1::VideoIntelligenceServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::videointelligence_v1:: - VideoIntelligenceServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace videointelligence -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEOINTELLIGENCE_VIDEO_INTELLIGENCE_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/videointelligence/video_intelligence_options.h b/google/cloud/videointelligence/video_intelligence_options.h deleted file mode 100644 index cb6d266b6656a..0000000000000 --- a/google/cloud/videointelligence/video_intelligence_options.h +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/videointelligence/v1/video_intelligence.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEOINTELLIGENCE_VIDEO_INTELLIGENCE_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEOINTELLIGENCE_VIDEO_INTELLIGENCE_OPTIONS_H - -#include "google/cloud/videointelligence/v1/video_intelligence_options.h" -#include "google/cloud/videointelligence/video_intelligence_connection.h" -#include "google/cloud/videointelligence/video_intelligence_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace videointelligence { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// videointelligence_v1::VideoIntelligenceServicePollingPolicyOption directly. -using ::google::cloud::videointelligence_v1:: - VideoIntelligenceServicePollingPolicyOption; - -/// @deprecated Use -/// videointelligence_v1::VideoIntelligenceServiceBackoffPolicyOption directly. -using ::google::cloud::videointelligence_v1:: - VideoIntelligenceServiceBackoffPolicyOption; - -/// @deprecated Use -/// videointelligence_v1::VideoIntelligenceServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::videointelligence_v1:: - VideoIntelligenceServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use -/// videointelligence_v1::VideoIntelligenceServicePolicyOptionList directly. -using ::google::cloud::videointelligence_v1:: - VideoIntelligenceServicePolicyOptionList; - -/// @deprecated Use -/// videointelligence_v1::VideoIntelligenceServiceRetryPolicyOption directly. -using ::google::cloud::videointelligence_v1:: - VideoIntelligenceServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace videointelligence -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VIDEOINTELLIGENCE_VIDEO_INTELLIGENCE_OPTIONS_H diff --git a/google/cloud/vision/BUILD.bazel b/google/cloud/vision/BUILD.bazel index fcd3c20a2f22d..ffd4215983416 100644 --- a/google/cloud/vision/BUILD.bazel +++ b/google/cloud/vision/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/vision/v1:vision_cc_grpc", + "@googleapis//google/cloud/vision/v1:vision_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/vision/CMakeLists.txt b/google/cloud/vision/CMakeLists.txt index a12765b63e933..6358d65d43a68 100644 --- a/google/cloud/vision/CMakeLists.txt +++ b/google/cloud/vision/CMakeLists.txt @@ -16,8 +16,7 @@ include(GoogleCloudCppLibrary) -google_cloud_cpp_add_gapic_library(vision "Cloud Vision API" - SERVICE_DIRS "__EMPTY__" "v1/") +google_cloud_cpp_add_gapic_library(vision "Cloud Vision API" SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(vision_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/vision/image_annotator_client.h b/google/cloud/vision/image_annotator_client.h deleted file mode 100644 index f4bb8f0f64ed8..0000000000000 --- a/google/cloud/vision/image_annotator_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/vision/v1/image_annotator.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_IMAGE_ANNOTATOR_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_IMAGE_ANNOTATOR_CLIENT_H - -#include "google/cloud/vision/image_annotator_connection.h" -#include "google/cloud/vision/v1/image_annotator_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in vision_v1 instead of the aliases defined in -/// this namespace. -namespace vision { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use vision_v1::ImageAnnotatorClient directly. -using ::google::cloud::vision_v1::ImageAnnotatorClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace vision -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_IMAGE_ANNOTATOR_CLIENT_H diff --git a/google/cloud/vision/image_annotator_connection.h b/google/cloud/vision/image_annotator_connection.h deleted file mode 100644 index 431146d49a096..0000000000000 --- a/google/cloud/vision/image_annotator_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/vision/v1/image_annotator.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_IMAGE_ANNOTATOR_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_IMAGE_ANNOTATOR_CONNECTION_H - -#include "google/cloud/vision/image_annotator_connection_idempotency_policy.h" -#include "google/cloud/vision/v1/image_annotator_connection.h" - -namespace google { -namespace cloud { -namespace vision { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use vision_v1::MakeImageAnnotatorConnection directly. -using ::google::cloud::vision_v1::MakeImageAnnotatorConnection; - -/// @deprecated Use vision_v1::ImageAnnotatorConnection directly. -using ::google::cloud::vision_v1::ImageAnnotatorConnection; - -/// @deprecated Use vision_v1::ImageAnnotatorLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::vision_v1::ImageAnnotatorLimitedErrorCountRetryPolicy; - -/// @deprecated Use vision_v1::ImageAnnotatorLimitedTimeRetryPolicy directly. -using ::google::cloud::vision_v1::ImageAnnotatorLimitedTimeRetryPolicy; - -/// @deprecated Use vision_v1::ImageAnnotatorRetryPolicy directly. -using ::google::cloud::vision_v1::ImageAnnotatorRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace vision -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_IMAGE_ANNOTATOR_CONNECTION_H diff --git a/google/cloud/vision/image_annotator_connection_idempotency_policy.h b/google/cloud/vision/image_annotator_connection_idempotency_policy.h deleted file mode 100644 index 5c34cdbc50da5..0000000000000 --- a/google/cloud/vision/image_annotator_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/vision/v1/image_annotator.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_IMAGE_ANNOTATOR_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_IMAGE_ANNOTATOR_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/vision/v1/image_annotator_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace vision { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// vision_v1::MakeDefaultImageAnnotatorConnectionIdempotencyPolicy directly. -using ::google::cloud::vision_v1:: - MakeDefaultImageAnnotatorConnectionIdempotencyPolicy; - -/// @deprecated Use vision_v1::ImageAnnotatorConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::vision_v1::ImageAnnotatorConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace vision -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_IMAGE_ANNOTATOR_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/vision/image_annotator_options.h b/google/cloud/vision/image_annotator_options.h deleted file mode 100644 index 48dffc0294b59..0000000000000 --- a/google/cloud/vision/image_annotator_options.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/vision/v1/image_annotator.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_IMAGE_ANNOTATOR_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_IMAGE_ANNOTATOR_OPTIONS_H - -#include "google/cloud/vision/image_annotator_connection.h" -#include "google/cloud/vision/image_annotator_connection_idempotency_policy.h" -#include "google/cloud/vision/v1/image_annotator_options.h" - -namespace google { -namespace cloud { -namespace vision { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use vision_v1::ImageAnnotatorPollingPolicyOption directly. -using ::google::cloud::vision_v1::ImageAnnotatorPollingPolicyOption; - -/// @deprecated Use vision_v1::ImageAnnotatorBackoffPolicyOption directly. -using ::google::cloud::vision_v1::ImageAnnotatorBackoffPolicyOption; - -/// @deprecated Use vision_v1::ImageAnnotatorConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::vision_v1:: - ImageAnnotatorConnectionIdempotencyPolicyOption; - -/// @deprecated Use vision_v1::ImageAnnotatorPolicyOptionList directly. -using ::google::cloud::vision_v1::ImageAnnotatorPolicyOptionList; - -/// @deprecated Use vision_v1::ImageAnnotatorRetryPolicyOption directly. -using ::google::cloud::vision_v1::ImageAnnotatorRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace vision -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_IMAGE_ANNOTATOR_OPTIONS_H diff --git a/google/cloud/vision/mocks/mock_image_annotator_connection.h b/google/cloud/vision/mocks/mock_image_annotator_connection.h deleted file mode 100644 index af746fab270a2..0000000000000 --- a/google/cloud/vision/mocks/mock_image_annotator_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/vision/v1/image_annotator.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_MOCKS_MOCK_IMAGE_ANNOTATOR_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_MOCKS_MOCK_IMAGE_ANNOTATOR_CONNECTION_H - -#include "google/cloud/vision/image_annotator_connection.h" -#include "google/cloud/vision/v1/mocks/mock_image_annotator_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in vision_v1_mocks instead of the aliases -/// defined in this namespace. -namespace vision_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use vision_v1_mocks::MockImageAnnotatorConnection directly. -using ::google::cloud::vision_v1_mocks::MockImageAnnotatorConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace vision_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_MOCKS_MOCK_IMAGE_ANNOTATOR_CONNECTION_H diff --git a/google/cloud/vision/mocks/mock_product_search_connection.h b/google/cloud/vision/mocks/mock_product_search_connection.h deleted file mode 100644 index ed203a62156f0..0000000000000 --- a/google/cloud/vision/mocks/mock_product_search_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/vision/v1/product_search_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_MOCKS_MOCK_PRODUCT_SEARCH_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_MOCKS_MOCK_PRODUCT_SEARCH_CONNECTION_H - -#include "google/cloud/vision/product_search_connection.h" -#include "google/cloud/vision/v1/mocks/mock_product_search_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in vision_v1_mocks instead of the aliases -/// defined in this namespace. -namespace vision_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use vision_v1_mocks::MockProductSearchConnection directly. -using ::google::cloud::vision_v1_mocks::MockProductSearchConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace vision_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_MOCKS_MOCK_PRODUCT_SEARCH_CONNECTION_H diff --git a/google/cloud/vision/product_search_client.h b/google/cloud/vision/product_search_client.h deleted file mode 100644 index baa463ca621f7..0000000000000 --- a/google/cloud/vision/product_search_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/vision/v1/product_search_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_PRODUCT_SEARCH_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_PRODUCT_SEARCH_CLIENT_H - -#include "google/cloud/vision/product_search_connection.h" -#include "google/cloud/vision/v1/product_search_client.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in vision_v1 instead of the aliases defined in -/// this namespace. -namespace vision { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use vision_v1::ProductSearchClient directly. -using ::google::cloud::vision_v1::ProductSearchClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace vision -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_PRODUCT_SEARCH_CLIENT_H diff --git a/google/cloud/vision/product_search_connection.h b/google/cloud/vision/product_search_connection.h deleted file mode 100644 index eb4368d25c71d..0000000000000 --- a/google/cloud/vision/product_search_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/vision/v1/product_search_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_PRODUCT_SEARCH_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_PRODUCT_SEARCH_CONNECTION_H - -#include "google/cloud/vision/product_search_connection_idempotency_policy.h" -#include "google/cloud/vision/v1/product_search_connection.h" - -namespace google { -namespace cloud { -namespace vision { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use vision_v1::MakeProductSearchConnection directly. -using ::google::cloud::vision_v1::MakeProductSearchConnection; - -/// @deprecated Use vision_v1::ProductSearchConnection directly. -using ::google::cloud::vision_v1::ProductSearchConnection; - -/// @deprecated Use vision_v1::ProductSearchLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::vision_v1::ProductSearchLimitedErrorCountRetryPolicy; - -/// @deprecated Use vision_v1::ProductSearchLimitedTimeRetryPolicy directly. -using ::google::cloud::vision_v1::ProductSearchLimitedTimeRetryPolicy; - -/// @deprecated Use vision_v1::ProductSearchRetryPolicy directly. -using ::google::cloud::vision_v1::ProductSearchRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace vision -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_PRODUCT_SEARCH_CONNECTION_H diff --git a/google/cloud/vision/product_search_connection_idempotency_policy.h b/google/cloud/vision/product_search_connection_idempotency_policy.h deleted file mode 100644 index 03407539fac98..0000000000000 --- a/google/cloud/vision/product_search_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/vision/v1/product_search_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_PRODUCT_SEARCH_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_PRODUCT_SEARCH_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/vision/v1/product_search_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace vision { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// vision_v1::MakeDefaultProductSearchConnectionIdempotencyPolicy directly. -using ::google::cloud::vision_v1:: - MakeDefaultProductSearchConnectionIdempotencyPolicy; - -/// @deprecated Use vision_v1::ProductSearchConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::vision_v1::ProductSearchConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace vision -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_PRODUCT_SEARCH_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/vision/product_search_options.h b/google/cloud/vision/product_search_options.h deleted file mode 100644 index b1554eff263c7..0000000000000 --- a/google/cloud/vision/product_search_options.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/vision/v1/product_search_service.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_PRODUCT_SEARCH_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_PRODUCT_SEARCH_OPTIONS_H - -#include "google/cloud/vision/product_search_connection.h" -#include "google/cloud/vision/product_search_connection_idempotency_policy.h" -#include "google/cloud/vision/v1/product_search_options.h" - -namespace google { -namespace cloud { -namespace vision { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use vision_v1::ProductSearchPollingPolicyOption directly. -using ::google::cloud::vision_v1::ProductSearchPollingPolicyOption; - -/// @deprecated Use vision_v1::ProductSearchBackoffPolicyOption directly. -using ::google::cloud::vision_v1::ProductSearchBackoffPolicyOption; - -/// @deprecated Use vision_v1::ProductSearchConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::vision_v1:: - ProductSearchConnectionIdempotencyPolicyOption; - -/// @deprecated Use vision_v1::ProductSearchPolicyOptionList directly. -using ::google::cloud::vision_v1::ProductSearchPolicyOptionList; - -/// @deprecated Use vision_v1::ProductSearchRetryPolicyOption directly. -using ::google::cloud::vision_v1::ProductSearchRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace vision -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_PRODUCT_SEARCH_OPTIONS_H diff --git a/google/cloud/vision/quickstart/.bazelrc b/google/cloud/vision/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/vision/quickstart/.bazelrc +++ b/google/cloud/vision/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/vision/quickstart/CMakeLists.txt b/google/cloud/vision/quickstart/CMakeLists.txt index 0bb3adde04082..e547a8cc6e7ed 100644 --- a/google/cloud/vision/quickstart/CMakeLists.txt +++ b/google/cloud/vision/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Vision API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-vision-quickstart CXX) find_package(google_cloud_cpp_vision REQUIRED) diff --git a/google/cloud/vision/v1/image_annotator_client.h b/google/cloud/vision/v1/image_annotator_client.h index be7279ae998b9..71dc19ada0f05 100644 --- a/google/cloud/vision/v1/image_annotator_client.h +++ b/google/cloud/vision/v1/image_annotator_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/vision/v1/image_annotator_connection.h b/google/cloud/vision/v1/image_annotator_connection.h index f0609a64ae56e..5cddd72a13844 100644 --- a/google/cloud/vision/v1/image_annotator_connection.h +++ b/google/cloud/vision/v1/image_annotator_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_V1_IMAGE_ANNOTATOR_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_V1_IMAGE_ANNOTATOR_CONNECTION_H +#include "google/cloud/vision/v1/image_annotator.pb.h" #include "google/cloud/vision/v1/image_annotator_connection_idempotency_policy.h" #include "google/cloud/vision/v1/internal/image_annotator_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -29,8 +30,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/vision/v1/image_annotator_connection_idempotency_policy.h b/google/cloud/vision/v1/image_annotator_connection_idempotency_policy.h index 2b7be1118f605..659d9f0fb0fd1 100644 --- a/google/cloud/vision/v1/image_annotator_connection_idempotency_policy.h +++ b/google/cloud/vision/v1/image_annotator_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_V1_IMAGE_ANNOTATOR_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_V1_IMAGE_ANNOTATOR_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/vision/v1/image_annotator.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/vision/v1/internal/image_annotator_auth_decorator.cc b/google/cloud/vision/v1/internal/image_annotator_auth_decorator.cc index 8ed299230a91f..ca003f42cc5c5 100644 --- a/google/cloud/vision/v1/internal/image_annotator_auth_decorator.cc +++ b/google/cloud/vision/v1/internal/image_annotator_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/vision/v1/image_annotator.proto #include "google/cloud/vision/v1/internal/image_annotator_auth_decorator.h" -#include +#include "google/cloud/vision/v1/image_annotator.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vision_v1_internal { @@ -155,3 +158,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace vision_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/vision/v1/internal/image_annotator_auth_decorator.h b/google/cloud/vision/v1/internal/image_annotator_auth_decorator.h index 3f62ed6da4643..dc955393edc88 100644 --- a/google/cloud/vision/v1/internal/image_annotator_auth_decorator.h +++ b/google/cloud/vision/v1/internal/image_annotator_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/vision/v1/internal/image_annotator_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vision_v1_internal { @@ -101,4 +104,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_V1_INTERNAL_IMAGE_ANNOTATOR_AUTH_DECORATOR_H diff --git a/google/cloud/vision/v1/internal/image_annotator_connection_impl.h b/google/cloud/vision/v1/internal/image_annotator_connection_impl.h index be26c56021a96..e6a940d5c86e5 100644 --- a/google/cloud/vision/v1/internal/image_annotator_connection_impl.h +++ b/google/cloud/vision/v1/internal/image_annotator_connection_impl.h @@ -31,7 +31,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/vision/v1/internal/image_annotator_logging_decorator.cc b/google/cloud/vision/v1/internal/image_annotator_logging_decorator.cc index b3ae2a4f84ff2..c2ef5657e1661 100644 --- a/google/cloud/vision/v1/internal/image_annotator_logging_decorator.cc +++ b/google/cloud/vision/v1/internal/image_annotator_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/vision/v1/image_annotator.proto #include "google/cloud/vision/v1/internal/image_annotator_logging_decorator.h" +#include "google/cloud/vision/v1/image_annotator.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vision_v1_internal { @@ -175,3 +178,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace vision_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/vision/v1/internal/image_annotator_logging_decorator.h b/google/cloud/vision/v1/internal/image_annotator_logging_decorator.h index aaea856d8ed7c..b35bdb0e90a1b 100644 --- a/google/cloud/vision/v1/internal/image_annotator_logging_decorator.h +++ b/google/cloud/vision/v1/internal/image_annotator_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/vision/v1/internal/image_annotator_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vision_v1_internal { @@ -101,4 +104,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_V1_INTERNAL_IMAGE_ANNOTATOR_LOGGING_DECORATOR_H diff --git a/google/cloud/vision/v1/internal/image_annotator_metadata_decorator.cc b/google/cloud/vision/v1/internal/image_annotator_metadata_decorator.cc index 6bab26c074210..4aec5085f3477 100644 --- a/google/cloud/vision/v1/internal/image_annotator_metadata_decorator.cc +++ b/google/cloud/vision/v1/internal/image_annotator_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/vision/v1/image_annotator.proto #include "google/cloud/vision/v1/internal/image_annotator_metadata_decorator.h" +#include "google/cloud/vision/v1/image_annotator.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vision_v1_internal { @@ -146,3 +150,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace vision_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/vision/v1/internal/image_annotator_metadata_decorator.h b/google/cloud/vision/v1/internal/image_annotator_metadata_decorator.h index ede69394b2e08..64bb057e93dc7 100644 --- a/google/cloud/vision/v1/internal/image_annotator_metadata_decorator.h +++ b/google/cloud/vision/v1/internal/image_annotator_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/vision/v1/internal/image_annotator_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vision_v1_internal { @@ -106,4 +109,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_V1_INTERNAL_IMAGE_ANNOTATOR_METADATA_DECORATOR_H diff --git a/google/cloud/vision/v1/internal/image_annotator_option_defaults.cc b/google/cloud/vision/v1/internal/image_annotator_option_defaults.cc index 2eb55937a3114..d1e4f83e8cc1d 100644 --- a/google/cloud/vision/v1/internal/image_annotator_option_defaults.cc +++ b/google/cloud/vision/v1/internal/image_annotator_option_defaults.cc @@ -41,7 +41,7 @@ Options ImageAnnotatorDefaultOptions(Options options) { if (!options.has()) { options.set( vision_v1::ImageAnnotatorLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/vision/v1/internal/image_annotator_stub.cc b/google/cloud/vision/v1/internal/image_annotator_stub.cc index f4525e14b5789..4b1b458d0106c 100644 --- a/google/cloud/vision/v1/internal/image_annotator_stub.cc +++ b/google/cloud/vision/v1/internal/image_annotator_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/vision/v1/image_annotator.proto #include "google/cloud/vision/v1/internal/image_annotator_stub.h" +#include "google/cloud/vision/v1/image_annotator.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vision_v1_internal { @@ -174,3 +177,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace vision_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/vision/v1/internal/image_annotator_stub.h b/google/cloud/vision/v1/internal/image_annotator_stub.h index 17660ea21af4f..1c30f26be974d 100644 --- a/google/cloud/vision/v1/internal/image_annotator_stub.h +++ b/google/cloud/vision/v1/internal/image_annotator_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_V1_INTERNAL_IMAGE_ANNOTATOR_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_V1_INTERNAL_IMAGE_ANNOTATOR_STUB_H +#include "google/cloud/vision/v1/image_annotator.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vision_v1_internal { @@ -165,4 +168,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_V1_INTERNAL_IMAGE_ANNOTATOR_STUB_H diff --git a/google/cloud/vision/v1/internal/image_annotator_stub_factory.cc b/google/cloud/vision/v1/internal/image_annotator_stub_factory.cc index eb09e92277032..d5449633ccd4d 100644 --- a/google/cloud/vision/v1/internal/image_annotator_stub_factory.cc +++ b/google/cloud/vision/v1/internal/image_annotator_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/vision/v1/image_annotator.proto #include "google/cloud/vision/v1/internal/image_annotator_stub_factory.h" +#include "google/cloud/vision/v1/image_annotator.grpc.pb.h" #include "google/cloud/vision/v1/internal/image_annotator_auth_decorator.h" #include "google/cloud/vision/v1/internal/image_annotator_logging_decorator.h" #include "google/cloud/vision/v1/internal/image_annotator_metadata_decorator.h" @@ -28,11 +29,13 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vision_v1_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace vision_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/vision/v1/internal/image_annotator_stub_factory.h b/google/cloud/vision/v1/internal/image_annotator_stub_factory.h index ee267fe5c3cb7..2bf42a406fed6 100644 --- a/google/cloud/vision/v1/internal/image_annotator_stub_factory.h +++ b/google/cloud/vision/v1/internal/image_annotator_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vision_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_V1_INTERNAL_IMAGE_ANNOTATOR_STUB_FACTORY_H diff --git a/google/cloud/vision/v1/internal/image_annotator_tracing_connection.cc b/google/cloud/vision/v1/internal/image_annotator_tracing_connection.cc index d3f9a586c1eed..cdff7f11eb2d1 100644 --- a/google/cloud/vision/v1/internal/image_annotator_tracing_connection.cc +++ b/google/cloud/vision/v1/internal/image_annotator_tracing_connection.cc @@ -26,8 +26,6 @@ namespace cloud { namespace vision_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ImageAnnotatorTracingConnection::ImageAnnotatorTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -121,16 +119,12 @@ ImageAnnotatorTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeImageAnnotatorTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/vision/v1/internal/image_annotator_tracing_connection.h b/google/cloud/vision/v1/internal/image_annotator_tracing_connection.h index f6909c98911e7..ad23b784bd53e 100644 --- a/google/cloud/vision/v1/internal/image_annotator_tracing_connection.h +++ b/google/cloud/vision/v1/internal/image_annotator_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace vision_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ImageAnnotatorTracingConnection : public vision_v1::ImageAnnotatorConnection { public: @@ -84,8 +82,6 @@ class ImageAnnotatorTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/vision/v1/internal/image_annotator_tracing_stub.cc b/google/cloud/vision/v1/internal/image_annotator_tracing_stub.cc index cefdb9eff1555..19bc446abeb81 100644 --- a/google/cloud/vision/v1/internal/image_annotator_tracing_stub.cc +++ b/google/cloud/vision/v1/internal/image_annotator_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vision_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ImageAnnotatorTracingStub::ImageAnnotatorTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -152,18 +153,14 @@ future ImageAnnotatorTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeImageAnnotatorTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace vision_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/vision/v1/internal/image_annotator_tracing_stub.h b/google/cloud/vision/v1/internal/image_annotator_tracing_stub.h index f3d469ae3b9aa..a9cfb7cdd9b35 100644 --- a/google/cloud/vision/v1/internal/image_annotator_tracing_stub.h +++ b/google/cloud/vision/v1/internal/image_annotator_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vision_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ImageAnnotatorTracingStub : public ImageAnnotatorStub { public: ~ImageAnnotatorTracingStub() override = default; @@ -96,8 +97,6 @@ class ImageAnnotatorTracingStub : public ImageAnnotatorStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -112,4 +111,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_V1_INTERNAL_IMAGE_ANNOTATOR_TRACING_STUB_H diff --git a/google/cloud/vision/v1/internal/product_search_auth_decorator.cc b/google/cloud/vision/v1/internal/product_search_auth_decorator.cc index f791395f3068d..9d2d4ec7cd472 100644 --- a/google/cloud/vision/v1/internal/product_search_auth_decorator.cc +++ b/google/cloud/vision/v1/internal/product_search_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/vision/v1/product_search_service.proto #include "google/cloud/vision/v1/internal/product_search_auth_decorator.h" -#include +#include "google/cloud/vision/v1/product_search_service.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vision_v1_internal { @@ -281,3 +284,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace vision_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/vision/v1/internal/product_search_auth_decorator.h b/google/cloud/vision/v1/internal/product_search_auth_decorator.h index f6d889454d4bd..2b0017af5299d 100644 --- a/google/cloud/vision/v1/internal/product_search_auth_decorator.h +++ b/google/cloud/vision/v1/internal/product_search_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/vision/v1/internal/product_search_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vision_v1_internal { @@ -168,4 +171,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_V1_INTERNAL_PRODUCT_SEARCH_AUTH_DECORATOR_H diff --git a/google/cloud/vision/v1/internal/product_search_connection_impl.h b/google/cloud/vision/v1/internal/product_search_connection_impl.h index d524a138d580f..42e3d79ab2598 100644 --- a/google/cloud/vision/v1/internal/product_search_connection_impl.h +++ b/google/cloud/vision/v1/internal/product_search_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/vision/v1/internal/product_search_logging_decorator.cc b/google/cloud/vision/v1/internal/product_search_logging_decorator.cc index 538196e0d2dd6..814ba43031767 100644 --- a/google/cloud/vision/v1/internal/product_search_logging_decorator.cc +++ b/google/cloud/vision/v1/internal/product_search_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/vision/v1/product_search_service.proto #include "google/cloud/vision/v1/internal/product_search_logging_decorator.h" +#include "google/cloud/vision/v1/product_search_service.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vision_v1_internal { @@ -356,3 +359,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace vision_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/vision/v1/internal/product_search_logging_decorator.h b/google/cloud/vision/v1/internal/product_search_logging_decorator.h index 0769e972b87f2..4e2d3a83ab5fd 100644 --- a/google/cloud/vision/v1/internal/product_search_logging_decorator.h +++ b/google/cloud/vision/v1/internal/product_search_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/vision/v1/internal/product_search_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vision_v1_internal { @@ -168,4 +171,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_V1_INTERNAL_PRODUCT_SEARCH_LOGGING_DECORATOR_H diff --git a/google/cloud/vision/v1/internal/product_search_metadata_decorator.cc b/google/cloud/vision/v1/internal/product_search_metadata_decorator.cc index 49775ca14c4c7..bb4e288d0987c 100644 --- a/google/cloud/vision/v1/internal/product_search_metadata_decorator.cc +++ b/google/cloud/vision/v1/internal/product_search_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/vision/v1/product_search_service.proto #include "google/cloud/vision/v1/internal/product_search_metadata_decorator.h" +#include "google/cloud/vision/v1/product_search_service.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vision_v1_internal { @@ -283,3 +287,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace vision_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/vision/v1/internal/product_search_metadata_decorator.h b/google/cloud/vision/v1/internal/product_search_metadata_decorator.h index 3ec33019079d5..8368d444470e0 100644 --- a/google/cloud/vision/v1/internal/product_search_metadata_decorator.h +++ b/google/cloud/vision/v1/internal/product_search_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/vision/v1/internal/product_search_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vision_v1_internal { @@ -173,4 +176,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_V1_INTERNAL_PRODUCT_SEARCH_METADATA_DECORATOR_H diff --git a/google/cloud/vision/v1/internal/product_search_option_defaults.cc b/google/cloud/vision/v1/internal/product_search_option_defaults.cc index 36a21ee94e123..98daf7e0e936f 100644 --- a/google/cloud/vision/v1/internal/product_search_option_defaults.cc +++ b/google/cloud/vision/v1/internal/product_search_option_defaults.cc @@ -40,7 +40,7 @@ Options ProductSearchDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - vision_v1::ProductSearchLimitedTimeRetryPolicy(std::chrono::minutes(30)) + vision_v1::ProductSearchLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/vision/v1/internal/product_search_stub.cc b/google/cloud/vision/v1/internal/product_search_stub.cc index f316ab7c9bcac..3a90b3d205e06 100644 --- a/google/cloud/vision/v1/internal/product_search_stub.cc +++ b/google/cloud/vision/v1/internal/product_search_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/vision/v1/product_search_service.proto #include "google/cloud/vision/v1/internal/product_search_stub.h" +#include "google/cloud/vision/v1/product_search_service.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vision_v1_internal { @@ -348,3 +351,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace vision_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/vision/v1/internal/product_search_stub.h b/google/cloud/vision/v1/internal/product_search_stub.h index 9c8ca490ef6bf..59b35311acbff 100644 --- a/google/cloud/vision/v1/internal/product_search_stub.h +++ b/google/cloud/vision/v1/internal/product_search_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_V1_INTERNAL_PRODUCT_SEARCH_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_V1_INTERNAL_PRODUCT_SEARCH_STUB_H +#include "google/cloud/vision/v1/product_search_service.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vision_v1_internal { @@ -295,4 +298,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_V1_INTERNAL_PRODUCT_SEARCH_STUB_H diff --git a/google/cloud/vision/v1/internal/product_search_stub_factory.cc b/google/cloud/vision/v1/internal/product_search_stub_factory.cc index 6694d6918548f..d96b1001d5631 100644 --- a/google/cloud/vision/v1/internal/product_search_stub_factory.cc +++ b/google/cloud/vision/v1/internal/product_search_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/vision/v1/internal/product_search_metadata_decorator.h" #include "google/cloud/vision/v1/internal/product_search_stub.h" #include "google/cloud/vision/v1/internal/product_search_tracing_stub.h" +#include "google/cloud/vision/v1/product_search_service.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vision_v1_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace vision_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/vision/v1/internal/product_search_stub_factory.h b/google/cloud/vision/v1/internal/product_search_stub_factory.h index 7e55d423f6ae5..79d29b4878c76 100644 --- a/google/cloud/vision/v1/internal/product_search_stub_factory.h +++ b/google/cloud/vision/v1/internal/product_search_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vision_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_V1_INTERNAL_PRODUCT_SEARCH_STUB_FACTORY_H diff --git a/google/cloud/vision/v1/internal/product_search_tracing_connection.cc b/google/cloud/vision/v1/internal/product_search_tracing_connection.cc index cc9bc0c7bf52f..a6aa6117847fa 100644 --- a/google/cloud/vision/v1/internal/product_search_tracing_connection.cc +++ b/google/cloud/vision/v1/internal/product_search_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace vision_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ProductSearchTracingConnection::ProductSearchTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -258,16 +256,12 @@ ProductSearchTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeProductSearchTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/vision/v1/internal/product_search_tracing_connection.h b/google/cloud/vision/v1/internal/product_search_tracing_connection.h index 4e085a40c25f2..1903a85c9214c 100644 --- a/google/cloud/vision/v1/internal/product_search_tracing_connection.h +++ b/google/cloud/vision/v1/internal/product_search_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace vision_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ProductSearchTracingConnection : public vision_v1::ProductSearchConnection { public: @@ -130,8 +128,6 @@ class ProductSearchTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/vision/v1/internal/product_search_tracing_stub.cc b/google/cloud/vision/v1/internal/product_search_tracing_stub.cc index 13de798f13617..324c418dc975a 100644 --- a/google/cloud/vision/v1/internal/product_search_tracing_stub.cc +++ b/google/cloud/vision/v1/internal/product_search_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vision_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ProductSearchTracingStub::ProductSearchTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -327,18 +328,14 @@ future ProductSearchTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeProductSearchTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace vision_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/vision/v1/internal/product_search_tracing_stub.h b/google/cloud/vision/v1/internal/product_search_tracing_stub.h index eb17784b4cecd..4e32eccd364dd 100644 --- a/google/cloud/vision/v1/internal/product_search_tracing_stub.h +++ b/google/cloud/vision/v1/internal/product_search_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vision_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ProductSearchTracingStub : public ProductSearchStub { public: ~ProductSearchTracingStub() override = default; @@ -163,8 +164,6 @@ class ProductSearchTracingStub : public ProductSearchStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -179,4 +178,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_V1_INTERNAL_PRODUCT_SEARCH_TRACING_STUB_H diff --git a/google/cloud/vision/v1/product_search_client.h b/google/cloud/vision/v1/product_search_client.h index f77cfe1e14c42..cecefd20ef321 100644 --- a/google/cloud/vision/v1/product_search_client.h +++ b/google/cloud/vision/v1/product_search_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/vision/v1/product_search_connection.h b/google/cloud/vision/v1/product_search_connection.h index 5560cfd38983a..74d0a98975ada 100644 --- a/google/cloud/vision/v1/product_search_connection.h +++ b/google/cloud/vision/v1/product_search_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/vision/v1/internal/product_search_retry_traits.h" #include "google/cloud/vision/v1/product_search_connection_idempotency_policy.h" +#include "google/cloud/vision/v1/product_search_service.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/vision/v1/product_search_connection_idempotency_policy.h b/google/cloud/vision/v1/product_search_connection_idempotency_policy.h index 332faacd18c66..ec8919300a0cc 100644 --- a/google/cloud/vision/v1/product_search_connection_idempotency_policy.h +++ b/google/cloud/vision/v1/product_search_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_V1_PRODUCT_SEARCH_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VISION_V1_PRODUCT_SEARCH_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/vision/v1/product_search_service.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/vmmigration/BUILD.bazel b/google/cloud/vmmigration/BUILD.bazel index 1ab07a796fff6..826ebd0e26375 100644 --- a/google/cloud/vmmigration/BUILD.bazel +++ b/google/cloud/vmmigration/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/vmmigration/v1:vmmigration_cc_grpc", + "@googleapis//google/cloud/vmmigration/v1:vmmigration_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/vmmigration/CMakeLists.txt b/google/cloud/vmmigration/CMakeLists.txt index 25580e32d6f59..cbdaf43a66527 100644 --- a/google/cloud/vmmigration/CMakeLists.txt +++ b/google/cloud/vmmigration/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(vmmigration "VM Migration API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(vmmigration_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/vmmigration/mocks/mock_vm_migration_connection.h b/google/cloud/vmmigration/mocks/mock_vm_migration_connection.h deleted file mode 100644 index d71987c34d2ff..0000000000000 --- a/google/cloud/vmmigration/mocks/mock_vm_migration_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/vmmigration/v1/vmmigration.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMMIGRATION_MOCKS_MOCK_VM_MIGRATION_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMMIGRATION_MOCKS_MOCK_VM_MIGRATION_CONNECTION_H - -#include "google/cloud/vmmigration/v1/mocks/mock_vm_migration_connection.h" -#include "google/cloud/vmmigration/vm_migration_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in vmmigration_v1_mocks instead of the aliases -/// defined in this namespace. -namespace vmmigration_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use vmmigration_v1_mocks::MockVmMigrationConnection directly. -using ::google::cloud::vmmigration_v1_mocks::MockVmMigrationConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace vmmigration_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMMIGRATION_MOCKS_MOCK_VM_MIGRATION_CONNECTION_H diff --git a/google/cloud/vmmigration/quickstart/.bazelrc b/google/cloud/vmmigration/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/vmmigration/quickstart/.bazelrc +++ b/google/cloud/vmmigration/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/vmmigration/quickstart/CMakeLists.txt b/google/cloud/vmmigration/quickstart/CMakeLists.txt index b07cc74e1f3fc..6fec4a868285a 100644 --- a/google/cloud/vmmigration/quickstart/CMakeLists.txt +++ b/google/cloud/vmmigration/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the VM Migration API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-vmmigration-quickstart CXX) find_package(google_cloud_cpp_vmmigration REQUIRED) diff --git a/google/cloud/vmmigration/v1/internal/vm_migration_auth_decorator.cc b/google/cloud/vmmigration/v1/internal/vm_migration_auth_decorator.cc index 4ac661e114f13..2282cff388fc0 100644 --- a/google/cloud/vmmigration/v1/internal/vm_migration_auth_decorator.cc +++ b/google/cloud/vmmigration/v1/internal/vm_migration_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/vmmigration/v1/vmmigration.proto #include "google/cloud/vmmigration/v1/internal/vm_migration_auth_decorator.h" -#include +#include "google/cloud/vmmigration/v1/vmmigration.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vmmigration_v1_internal { @@ -1395,3 +1398,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace vmmigration_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/vmmigration/v1/internal/vm_migration_auth_decorator.h b/google/cloud/vmmigration/v1/internal/vm_migration_auth_decorator.h index b3eec715d8141..a4bf5b94677c1 100644 --- a/google/cloud/vmmigration/v1/internal/vm_migration_auth_decorator.h +++ b/google/cloud/vmmigration/v1/internal/vm_migration_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/vmmigration/v1/internal/vm_migration_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vmmigration_v1_internal { @@ -660,4 +663,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMMIGRATION_V1_INTERNAL_VM_MIGRATION_AUTH_DECORATOR_H diff --git a/google/cloud/vmmigration/v1/internal/vm_migration_connection_impl.h b/google/cloud/vmmigration/v1/internal/vm_migration_connection_impl.h index 14b1484eefc82..fd1ff0736187e 100644 --- a/google/cloud/vmmigration/v1/internal/vm_migration_connection_impl.h +++ b/google/cloud/vmmigration/v1/internal/vm_migration_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/vmmigration/v1/internal/vm_migration_logging_decorator.cc b/google/cloud/vmmigration/v1/internal/vm_migration_logging_decorator.cc index d7e52f8858bd1..a3e5bebe7e68b 100644 --- a/google/cloud/vmmigration/v1/internal/vm_migration_logging_decorator.cc +++ b/google/cloud/vmmigration/v1/internal/vm_migration_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/vmmigration/v1/vmmigration.proto #include "google/cloud/vmmigration/v1/internal/vm_migration_logging_decorator.h" +#include "google/cloud/vmmigration/v1/vmmigration.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vmmigration_v1_internal { @@ -1647,3 +1650,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace vmmigration_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/vmmigration/v1/internal/vm_migration_logging_decorator.h b/google/cloud/vmmigration/v1/internal/vm_migration_logging_decorator.h index 0b6925251b926..064d26a7b07ea 100644 --- a/google/cloud/vmmigration/v1/internal/vm_migration_logging_decorator.h +++ b/google/cloud/vmmigration/v1/internal/vm_migration_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/vmmigration/v1/internal/vm_migration_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vmmigration_v1_internal { @@ -660,4 +663,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMMIGRATION_V1_INTERNAL_VM_MIGRATION_LOGGING_DECORATOR_H diff --git a/google/cloud/vmmigration/v1/internal/vm_migration_metadata_decorator.cc b/google/cloud/vmmigration/v1/internal/vm_migration_metadata_decorator.cc index 929672335e4e5..3779632b28a07 100644 --- a/google/cloud/vmmigration/v1/internal/vm_migration_metadata_decorator.cc +++ b/google/cloud/vmmigration/v1/internal/vm_migration_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/vmmigration/v1/vmmigration.proto #include "google/cloud/vmmigration/v1/internal/vm_migration_metadata_decorator.h" +#include "google/cloud/vmmigration/v1/vmmigration.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vmmigration_v1_internal { @@ -1155,3 +1159,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace vmmigration_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/vmmigration/v1/internal/vm_migration_metadata_decorator.h b/google/cloud/vmmigration/v1/internal/vm_migration_metadata_decorator.h index 0665707bf79f3..ab2132a51747f 100644 --- a/google/cloud/vmmigration/v1/internal/vm_migration_metadata_decorator.h +++ b/google/cloud/vmmigration/v1/internal/vm_migration_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/vmmigration/v1/internal/vm_migration_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vmmigration_v1_internal { @@ -665,4 +668,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMMIGRATION_V1_INTERNAL_VM_MIGRATION_METADATA_DECORATOR_H diff --git a/google/cloud/vmmigration/v1/internal/vm_migration_option_defaults.cc b/google/cloud/vmmigration/v1/internal/vm_migration_option_defaults.cc index d3917c7568d46..79ddc920db09f 100644 --- a/google/cloud/vmmigration/v1/internal/vm_migration_option_defaults.cc +++ b/google/cloud/vmmigration/v1/internal/vm_migration_option_defaults.cc @@ -41,7 +41,7 @@ Options VmMigrationDefaultOptions(Options options) { if (!options.has()) { options.set( vmmigration_v1::VmMigrationLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/vmmigration/v1/internal/vm_migration_stub.cc b/google/cloud/vmmigration/v1/internal/vm_migration_stub.cc index ce4e3dcded3fe..84b13b5e1d5dc 100644 --- a/google/cloud/vmmigration/v1/internal/vm_migration_stub.cc +++ b/google/cloud/vmmigration/v1/internal/vm_migration_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/vmmigration/v1/vmmigration.proto #include "google/cloud/vmmigration/v1/internal/vm_migration_stub.h" +#include "google/cloud/vmmigration/v1/vmmigration.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vmmigration_v1_internal { @@ -1598,3 +1601,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace vmmigration_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/vmmigration/v1/internal/vm_migration_stub.h b/google/cloud/vmmigration/v1/internal/vm_migration_stub.h index b0604125d58cc..16550f69f11e5 100644 --- a/google/cloud/vmmigration/v1/internal/vm_migration_stub.h +++ b/google/cloud/vmmigration/v1/internal/vm_migration_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMMIGRATION_V1_INTERNAL_VM_MIGRATION_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMMIGRATION_V1_INTERNAL_VM_MIGRATION_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/vmmigration/v1/vmmigration.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vmmigration_v1_internal { @@ -1296,4 +1299,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMMIGRATION_V1_INTERNAL_VM_MIGRATION_STUB_H diff --git a/google/cloud/vmmigration/v1/internal/vm_migration_stub_factory.cc b/google/cloud/vmmigration/v1/internal/vm_migration_stub_factory.cc index 3e11e0d9eb3fc..c3127c2a4ea13 100644 --- a/google/cloud/vmmigration/v1/internal/vm_migration_stub_factory.cc +++ b/google/cloud/vmmigration/v1/internal/vm_migration_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/vmmigration/v1/vmmigration.proto #include "google/cloud/vmmigration/v1/internal/vm_migration_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/vmmigration/v1/internal/vm_migration_auth_decorator.h" #include "google/cloud/vmmigration/v1/internal/vm_migration_logging_decorator.h" #include "google/cloud/vmmigration/v1/internal/vm_migration_metadata_decorator.h" #include "google/cloud/vmmigration/v1/internal/vm_migration_stub.h" #include "google/cloud/vmmigration/v1/internal/vm_migration_tracing_stub.h" +#include "google/cloud/vmmigration/v1/vmmigration.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vmmigration_v1_internal { @@ -74,3 +77,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace vmmigration_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/vmmigration/v1/internal/vm_migration_stub_factory.h b/google/cloud/vmmigration/v1/internal/vm_migration_stub_factory.h index 785cf52cb523b..4db7ad7251c85 100644 --- a/google/cloud/vmmigration/v1/internal/vm_migration_stub_factory.h +++ b/google/cloud/vmmigration/v1/internal/vm_migration_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vmmigration_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMMIGRATION_V1_INTERNAL_VM_MIGRATION_STUB_FACTORY_H diff --git a/google/cloud/vmmigration/v1/internal/vm_migration_tracing_connection.cc b/google/cloud/vmmigration/v1/internal/vm_migration_tracing_connection.cc index 976a40b058070..170738e80de9d 100644 --- a/google/cloud/vmmigration/v1/internal/vm_migration_tracing_connection.cc +++ b/google/cloud/vmmigration/v1/internal/vm_migration_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace vmmigration_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - VmMigrationTracingConnection::VmMigrationTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -1457,16 +1455,12 @@ Status VmMigrationTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeVmMigrationTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/vmmigration/v1/internal/vm_migration_tracing_connection.h b/google/cloud/vmmigration/v1/internal/vm_migration_tracing_connection.h index e9d76afbc1398..e5bfe71df16b6 100644 --- a/google/cloud/vmmigration/v1/internal/vm_migration_tracing_connection.h +++ b/google/cloud/vmmigration/v1/internal/vm_migration_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace vmmigration_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class VmMigrationTracingConnection : public vmmigration_v1::VmMigrationConnection { public: @@ -634,8 +632,6 @@ class VmMigrationTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/vmmigration/v1/internal/vm_migration_tracing_stub.cc b/google/cloud/vmmigration/v1/internal/vm_migration_tracing_stub.cc index 188f23c766bf8..47bc5adf06dc5 100644 --- a/google/cloud/vmmigration/v1/internal/vm_migration_tracing_stub.cc +++ b/google/cloud/vmmigration/v1/internal/vm_migration_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vmmigration_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - VmMigrationTracingStub::VmMigrationTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -1434,18 +1435,14 @@ future VmMigrationTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeVmMigrationTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace vmmigration_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/vmmigration/v1/internal/vm_migration_tracing_stub.h b/google/cloud/vmmigration/v1/internal/vm_migration_tracing_stub.h index 6245c5d7e0d51..9469a18394230 100644 --- a/google/cloud/vmmigration/v1/internal/vm_migration_tracing_stub.h +++ b/google/cloud/vmmigration/v1/internal/vm_migration_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vmmigration_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class VmMigrationTracingStub : public VmMigrationStub { public: ~VmMigrationTracingStub() override = default; @@ -655,8 +656,6 @@ class VmMigrationTracingStub : public VmMigrationStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -671,4 +670,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMMIGRATION_V1_INTERNAL_VM_MIGRATION_TRACING_STUB_H diff --git a/google/cloud/vmmigration/v1/vm_migration_client.h b/google/cloud/vmmigration/v1/vm_migration_client.h index 6de755e2e32a8..6c8b161584af4 100644 --- a/google/cloud/vmmigration/v1/vm_migration_client.h +++ b/google/cloud/vmmigration/v1/vm_migration_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/vmmigration/v1/vm_migration_connection.h b/google/cloud/vmmigration/v1/vm_migration_connection.h index 833b1b78c296c..bdc7f4360ac55 100644 --- a/google/cloud/vmmigration/v1/vm_migration_connection.h +++ b/google/cloud/vmmigration/v1/vm_migration_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/vmmigration/v1/internal/vm_migration_retry_traits.h" #include "google/cloud/vmmigration/v1/vm_migration_connection_idempotency_policy.h" +#include "google/cloud/vmmigration/v1/vmmigration.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/vmmigration/v1/vm_migration_connection_idempotency_policy.h b/google/cloud/vmmigration/v1/vm_migration_connection_idempotency_policy.h index 96731d249b257..55c032a1eb807 100644 --- a/google/cloud/vmmigration/v1/vm_migration_connection_idempotency_policy.h +++ b/google/cloud/vmmigration/v1/vm_migration_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMMIGRATION_V1_VM_MIGRATION_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMMIGRATION_V1_VM_MIGRATION_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/vmmigration/v1/vmmigration.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/vmmigration/vm_migration_client.h b/google/cloud/vmmigration/vm_migration_client.h deleted file mode 100644 index 169558228c250..0000000000000 --- a/google/cloud/vmmigration/vm_migration_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/vmmigration/v1/vmmigration.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMMIGRATION_VM_MIGRATION_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMMIGRATION_VM_MIGRATION_CLIENT_H - -#include "google/cloud/vmmigration/v1/vm_migration_client.h" -#include "google/cloud/vmmigration/vm_migration_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in vmmigration_v1 instead of the aliases defined in -/// this namespace. -namespace vmmigration { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use vmmigration_v1::VmMigrationClient directly. -using ::google::cloud::vmmigration_v1::VmMigrationClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace vmmigration -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMMIGRATION_VM_MIGRATION_CLIENT_H diff --git a/google/cloud/vmmigration/vm_migration_connection.h b/google/cloud/vmmigration/vm_migration_connection.h deleted file mode 100644 index 17cbe7173345b..0000000000000 --- a/google/cloud/vmmigration/vm_migration_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/vmmigration/v1/vmmigration.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMMIGRATION_VM_MIGRATION_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMMIGRATION_VM_MIGRATION_CONNECTION_H - -#include "google/cloud/vmmigration/v1/vm_migration_connection.h" -#include "google/cloud/vmmigration/vm_migration_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace vmmigration { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use vmmigration_v1::MakeVmMigrationConnection directly. -using ::google::cloud::vmmigration_v1::MakeVmMigrationConnection; - -/// @deprecated Use vmmigration_v1::VmMigrationConnection directly. -using ::google::cloud::vmmigration_v1::VmMigrationConnection; - -/// @deprecated Use vmmigration_v1::VmMigrationLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::vmmigration_v1::VmMigrationLimitedErrorCountRetryPolicy; - -/// @deprecated Use vmmigration_v1::VmMigrationLimitedTimeRetryPolicy directly. -using ::google::cloud::vmmigration_v1::VmMigrationLimitedTimeRetryPolicy; - -/// @deprecated Use vmmigration_v1::VmMigrationRetryPolicy directly. -using ::google::cloud::vmmigration_v1::VmMigrationRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace vmmigration -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMMIGRATION_VM_MIGRATION_CONNECTION_H diff --git a/google/cloud/vmmigration/vm_migration_connection_idempotency_policy.h b/google/cloud/vmmigration/vm_migration_connection_idempotency_policy.h deleted file mode 100644 index 9cc1abda08f67..0000000000000 --- a/google/cloud/vmmigration/vm_migration_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/vmmigration/v1/vmmigration.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMMIGRATION_VM_MIGRATION_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMMIGRATION_VM_MIGRATION_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/vmmigration/v1/vm_migration_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace vmmigration { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// vmmigration_v1::MakeDefaultVmMigrationConnectionIdempotencyPolicy directly. -using ::google::cloud::vmmigration_v1:: - MakeDefaultVmMigrationConnectionIdempotencyPolicy; - -/// @deprecated Use vmmigration_v1::VmMigrationConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::vmmigration_v1::VmMigrationConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace vmmigration -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMMIGRATION_VM_MIGRATION_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/vmmigration/vm_migration_options.h b/google/cloud/vmmigration/vm_migration_options.h deleted file mode 100644 index 4e8682d508a61..0000000000000 --- a/google/cloud/vmmigration/vm_migration_options.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/vmmigration/v1/vmmigration.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMMIGRATION_VM_MIGRATION_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMMIGRATION_VM_MIGRATION_OPTIONS_H - -#include "google/cloud/vmmigration/v1/vm_migration_options.h" -#include "google/cloud/vmmigration/vm_migration_connection.h" -#include "google/cloud/vmmigration/vm_migration_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace vmmigration { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use vmmigration_v1::VmMigrationPollingPolicyOption directly. -using ::google::cloud::vmmigration_v1::VmMigrationPollingPolicyOption; - -/// @deprecated Use vmmigration_v1::VmMigrationBackoffPolicyOption directly. -using ::google::cloud::vmmigration_v1::VmMigrationBackoffPolicyOption; - -/// @deprecated Use vmmigration_v1::VmMigrationConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::vmmigration_v1:: - VmMigrationConnectionIdempotencyPolicyOption; - -/// @deprecated Use vmmigration_v1::VmMigrationPolicyOptionList directly. -using ::google::cloud::vmmigration_v1::VmMigrationPolicyOptionList; - -/// @deprecated Use vmmigration_v1::VmMigrationRetryPolicyOption directly. -using ::google::cloud::vmmigration_v1::VmMigrationRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace vmmigration -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMMIGRATION_VM_MIGRATION_OPTIONS_H diff --git a/google/cloud/vmwareengine/BUILD.bazel b/google/cloud/vmwareengine/BUILD.bazel index afeffa991623b..c04055c1a23f4 100644 --- a/google/cloud/vmwareengine/BUILD.bazel +++ b/google/cloud/vmwareengine/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/vmwareengine/v1:vmwareengine_cc_grpc", + "@googleapis//google/cloud/vmwareengine/v1:vmwareengine_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/vmwareengine/quickstart/.bazelrc b/google/cloud/vmwareengine/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/vmwareengine/quickstart/.bazelrc +++ b/google/cloud/vmwareengine/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/vmwareengine/quickstart/CMakeLists.txt b/google/cloud/vmwareengine/quickstart/CMakeLists.txt index 480344dc2b588..61e7ea230222c 100644 --- a/google/cloud/vmwareengine/quickstart/CMakeLists.txt +++ b/google/cloud/vmwareengine/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the VMware Engine API C++ client library from a # larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-vmwareengine-quickstart CXX) find_package(google_cloud_cpp_vmwareengine REQUIRED) diff --git a/google/cloud/vmwareengine/v1/internal/vmware_engine_auth_decorator.cc b/google/cloud/vmwareengine/v1/internal/vmware_engine_auth_decorator.cc index b4bf3f5e4f434..5ebec3de2cc4d 100644 --- a/google/cloud/vmwareengine/v1/internal/vmware_engine_auth_decorator.cc +++ b/google/cloud/vmwareengine/v1/internal/vmware_engine_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/vmwareengine/v1/vmwareengine.proto #include "google/cloud/vmwareengine/v1/internal/vmware_engine_auth_decorator.h" -#include +#include "google/cloud/vmwareengine/v1/vmwareengine.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vmwareengine_v1_internal { @@ -1645,3 +1648,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace vmwareengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/vmwareengine/v1/internal/vmware_engine_auth_decorator.h b/google/cloud/vmwareengine/v1/internal/vmware_engine_auth_decorator.h index a24eeed8567ca..8b400ab20b565 100644 --- a/google/cloud/vmwareengine/v1/internal/vmware_engine_auth_decorator.h +++ b/google/cloud/vmwareengine/v1/internal/vmware_engine_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/vmwareengine/v1/internal/vmware_engine_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vmwareengine_v1_internal { @@ -767,4 +770,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMWAREENGINE_V1_INTERNAL_VMWARE_ENGINE_AUTH_DECORATOR_H diff --git a/google/cloud/vmwareengine/v1/internal/vmware_engine_connection_impl.h b/google/cloud/vmwareengine/v1/internal/vmware_engine_connection_impl.h index e9ac82bb16df4..39b54e8c60b66 100644 --- a/google/cloud/vmwareengine/v1/internal/vmware_engine_connection_impl.h +++ b/google/cloud/vmwareengine/v1/internal/vmware_engine_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/vmwareengine/v1/internal/vmware_engine_logging_decorator.cc b/google/cloud/vmwareengine/v1/internal/vmware_engine_logging_decorator.cc index aca7cfcb95fde..a2fe7cd977d4c 100644 --- a/google/cloud/vmwareengine/v1/internal/vmware_engine_logging_decorator.cc +++ b/google/cloud/vmwareengine/v1/internal/vmware_engine_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/vmwareengine/v1/vmwareengine.proto #include "google/cloud/vmwareengine/v1/internal/vmware_engine_logging_decorator.h" +#include "google/cloud/vmwareengine/v1/vmwareengine.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vmwareengine_v1_internal { @@ -1976,3 +1979,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace vmwareengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/vmwareengine/v1/internal/vmware_engine_logging_decorator.h b/google/cloud/vmwareengine/v1/internal/vmware_engine_logging_decorator.h index bdf169955bcd3..97fc79f14a97a 100644 --- a/google/cloud/vmwareengine/v1/internal/vmware_engine_logging_decorator.h +++ b/google/cloud/vmwareengine/v1/internal/vmware_engine_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/vmwareengine/v1/internal/vmware_engine_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vmwareengine_v1_internal { @@ -767,4 +770,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMWAREENGINE_V1_INTERNAL_VMWARE_ENGINE_LOGGING_DECORATOR_H diff --git a/google/cloud/vmwareengine/v1/internal/vmware_engine_metadata_decorator.cc b/google/cloud/vmwareengine/v1/internal/vmware_engine_metadata_decorator.cc index 4ab5aabe0576b..4db40a20958ef 100644 --- a/google/cloud/vmwareengine/v1/internal/vmware_engine_metadata_decorator.cc +++ b/google/cloud/vmwareengine/v1/internal/vmware_engine_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/vmwareengine/v1/vmwareengine.proto #include "google/cloud/vmwareengine/v1/internal/vmware_engine_metadata_decorator.h" +#include "google/cloud/vmwareengine/v1/vmwareengine.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vmwareengine_v1_internal { @@ -1417,3 +1421,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace vmwareengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/vmwareengine/v1/internal/vmware_engine_metadata_decorator.h b/google/cloud/vmwareengine/v1/internal/vmware_engine_metadata_decorator.h index 0b37015f6ac95..abe328d05b682 100644 --- a/google/cloud/vmwareengine/v1/internal/vmware_engine_metadata_decorator.h +++ b/google/cloud/vmwareengine/v1/internal/vmware_engine_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/vmwareengine/v1/internal/vmware_engine_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vmwareengine_v1_internal { @@ -772,4 +775,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMWAREENGINE_V1_INTERNAL_VMWARE_ENGINE_METADATA_DECORATOR_H diff --git a/google/cloud/vmwareengine/v1/internal/vmware_engine_option_defaults.cc b/google/cloud/vmwareengine/v1/internal/vmware_engine_option_defaults.cc index db16f3b6d186c..4e59b95229a74 100644 --- a/google/cloud/vmwareengine/v1/internal/vmware_engine_option_defaults.cc +++ b/google/cloud/vmwareengine/v1/internal/vmware_engine_option_defaults.cc @@ -42,7 +42,7 @@ Options VmwareEngineDefaultOptions(Options options) { if (!options.has()) { options.set( vmwareengine_v1::VmwareEngineLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/vmwareengine/v1/internal/vmware_engine_stub.cc b/google/cloud/vmwareengine/v1/internal/vmware_engine_stub.cc index 136a97b13a8c4..52e65ccff1f9c 100644 --- a/google/cloud/vmwareengine/v1/internal/vmware_engine_stub.cc +++ b/google/cloud/vmwareengine/v1/internal/vmware_engine_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/vmwareengine/v1/vmwareengine.proto #include "google/cloud/vmwareengine/v1/internal/vmware_engine_stub.h" +#include "google/cloud/vmwareengine/v1/vmwareengine.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vmwareengine_v1_internal { @@ -1918,3 +1921,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace vmwareengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/vmwareengine/v1/internal/vmware_engine_stub.h b/google/cloud/vmwareengine/v1/internal/vmware_engine_stub.h index a801623cc8905..b6339be36c837 100644 --- a/google/cloud/vmwareengine/v1/internal/vmware_engine_stub.h +++ b/google/cloud/vmwareengine/v1/internal/vmware_engine_stub.h @@ -19,18 +19,21 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMWAREENGINE_V1_INTERNAL_VMWARE_ENGINE_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMWAREENGINE_V1_INTERNAL_VMWARE_ENGINE_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/vmwareengine/v1/vmwareengine.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vmwareengine_v1_internal { @@ -1540,4 +1543,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMWAREENGINE_V1_INTERNAL_VMWARE_ENGINE_STUB_H diff --git a/google/cloud/vmwareengine/v1/internal/vmware_engine_stub_factory.cc b/google/cloud/vmwareengine/v1/internal/vmware_engine_stub_factory.cc index 9637bff0e0ad1..e21c2648922ec 100644 --- a/google/cloud/vmwareengine/v1/internal/vmware_engine_stub_factory.cc +++ b/google/cloud/vmwareengine/v1/internal/vmware_engine_stub_factory.cc @@ -17,24 +17,27 @@ // source: google/cloud/vmwareengine/v1/vmwareengine.proto #include "google/cloud/vmwareengine/v1/internal/vmware_engine_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/vmwareengine/v1/internal/vmware_engine_auth_decorator.h" #include "google/cloud/vmwareengine/v1/internal/vmware_engine_logging_decorator.h" #include "google/cloud/vmwareengine/v1/internal/vmware_engine_metadata_decorator.h" #include "google/cloud/vmwareengine/v1/internal/vmware_engine_stub.h" #include "google/cloud/vmwareengine/v1/internal/vmware_engine_tracing_stub.h" +#include "google/cloud/vmwareengine/v1/vmwareengine.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vmwareengine_v1_internal { @@ -77,3 +80,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace vmwareengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/vmwareengine/v1/internal/vmware_engine_stub_factory.h b/google/cloud/vmwareengine/v1/internal/vmware_engine_stub_factory.h index 74c6a67270f6e..f0099f5fd9ac1 100644 --- a/google/cloud/vmwareengine/v1/internal/vmware_engine_stub_factory.h +++ b/google/cloud/vmwareengine/v1/internal/vmware_engine_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vmwareengine_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMWAREENGINE_V1_INTERNAL_VMWARE_ENGINE_STUB_FACTORY_H diff --git a/google/cloud/vmwareengine/v1/internal/vmware_engine_tracing_connection.cc b/google/cloud/vmwareengine/v1/internal/vmware_engine_tracing_connection.cc index be0860616dbcb..f9e6fa602d493 100644 --- a/google/cloud/vmwareengine/v1/internal/vmware_engine_tracing_connection.cc +++ b/google/cloud/vmwareengine/v1/internal/vmware_engine_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace vmwareengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - VmwareEngineTracingConnection::VmwareEngineTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -1750,16 +1748,12 @@ Status VmwareEngineTracingConnection::DeleteOperation( return internal::EndSpan(*span, child_->DeleteOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeVmwareEngineTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/vmwareengine/v1/internal/vmware_engine_tracing_connection.h b/google/cloud/vmwareengine/v1/internal/vmware_engine_tracing_connection.h index c46ca23a1a96e..0a3256348e7be 100644 --- a/google/cloud/vmwareengine/v1/internal/vmware_engine_tracing_connection.h +++ b/google/cloud/vmwareengine/v1/internal/vmware_engine_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace vmwareengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class VmwareEngineTracingConnection : public vmwareengine_v1::VmwareEngineConnection { public: @@ -746,8 +744,6 @@ class VmwareEngineTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/vmwareengine/v1/internal/vmware_engine_tracing_stub.cc b/google/cloud/vmwareengine/v1/internal/vmware_engine_tracing_stub.cc index f767e2079290e..b0c05165ece66 100644 --- a/google/cloud/vmwareengine/v1/internal/vmware_engine_tracing_stub.cc +++ b/google/cloud/vmwareengine/v1/internal/vmware_engine_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vmwareengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - VmwareEngineTracingStub::VmwareEngineTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -1738,18 +1739,14 @@ future VmwareEngineTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeVmwareEngineTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace vmwareengine_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/vmwareengine/v1/internal/vmware_engine_tracing_stub.h b/google/cloud/vmwareengine/v1/internal/vmware_engine_tracing_stub.h index f6c3474e30e73..0512abe5c3651 100644 --- a/google/cloud/vmwareengine/v1/internal/vmware_engine_tracing_stub.h +++ b/google/cloud/vmwareengine/v1/internal/vmware_engine_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vmwareengine_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class VmwareEngineTracingStub : public VmwareEngineStub { public: ~VmwareEngineTracingStub() override = default; @@ -762,8 +763,6 @@ class VmwareEngineTracingStub : public VmwareEngineStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -778,4 +777,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMWAREENGINE_V1_INTERNAL_VMWARE_ENGINE_TRACING_STUB_H diff --git a/google/cloud/vmwareengine/v1/vmware_engine_client.h b/google/cloud/vmwareengine/v1/vmware_engine_client.h index a5259be6ba63e..c5273d7c77b46 100644 --- a/google/cloud/vmwareengine/v1/vmware_engine_client.h +++ b/google/cloud/vmwareengine/v1/vmware_engine_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/vmwareengine/v1/vmware_engine_connection.h b/google/cloud/vmwareengine/v1/vmware_engine_connection.h index e17a41d5faf18..119a2fdbb7101 100644 --- a/google/cloud/vmwareengine/v1/vmware_engine_connection.h +++ b/google/cloud/vmwareengine/v1/vmware_engine_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/vmwareengine/v1/internal/vmware_engine_retry_traits.h" #include "google/cloud/vmwareengine/v1/vmware_engine_connection_idempotency_policy.h" +#include "google/cloud/vmwareengine/v1/vmwareengine.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/vmwareengine/v1/vmware_engine_connection_idempotency_policy.h b/google/cloud/vmwareengine/v1/vmware_engine_connection_idempotency_policy.h index e213aeceab6f2..58186f6ff4da7 100644 --- a/google/cloud/vmwareengine/v1/vmware_engine_connection_idempotency_policy.h +++ b/google/cloud/vmwareengine/v1/vmware_engine_connection_idempotency_policy.h @@ -19,12 +19,12 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMWAREENGINE_V1_VMWARE_ENGINE_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VMWAREENGINE_V1_VMWARE_ENGINE_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/vmwareengine/v1/vmwareengine.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/vpcaccess/BUILD.bazel b/google/cloud/vpcaccess/BUILD.bazel index 9cd861c7e9d8e..bac4db252fb71 100644 --- a/google/cloud/vpcaccess/BUILD.bazel +++ b/google/cloud/vpcaccess/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/vpcaccess/v1:vpcaccess_cc_grpc", + "@googleapis//google/cloud/vpcaccess/v1:vpcaccess_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/vpcaccess/CMakeLists.txt b/google/cloud/vpcaccess/CMakeLists.txt index af6b2c3febfb1..6b8bd903dcf34 100644 --- a/google/cloud/vpcaccess/CMakeLists.txt +++ b/google/cloud/vpcaccess/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(vpcaccess "Serverless VPC Access API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(vpcaccess_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/vpcaccess/mocks/mock_vpc_access_connection.h b/google/cloud/vpcaccess/mocks/mock_vpc_access_connection.h deleted file mode 100644 index 102de2a938155..0000000000000 --- a/google/cloud/vpcaccess/mocks/mock_vpc_access_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/vpcaccess/v1/vpc_access.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VPCACCESS_MOCKS_MOCK_VPC_ACCESS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VPCACCESS_MOCKS_MOCK_VPC_ACCESS_CONNECTION_H - -#include "google/cloud/vpcaccess/v1/mocks/mock_vpc_access_connection.h" -#include "google/cloud/vpcaccess/vpc_access_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in vpcaccess_v1_mocks instead of the aliases -/// defined in this namespace. -namespace vpcaccess_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use vpcaccess_v1_mocks::MockVpcAccessServiceConnection directly. -using ::google::cloud::vpcaccess_v1_mocks::MockVpcAccessServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace vpcaccess_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VPCACCESS_MOCKS_MOCK_VPC_ACCESS_CONNECTION_H diff --git a/google/cloud/vpcaccess/quickstart/.bazelrc b/google/cloud/vpcaccess/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/vpcaccess/quickstart/.bazelrc +++ b/google/cloud/vpcaccess/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/vpcaccess/quickstart/CMakeLists.txt b/google/cloud/vpcaccess/quickstart/CMakeLists.txt index 7882e7fe9ab0a..6cce885f86538 100644 --- a/google/cloud/vpcaccess/quickstart/CMakeLists.txt +++ b/google/cloud/vpcaccess/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Serverless VPC Access API C++ client library # from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-vpcaccess-quickstart CXX) find_package(google_cloud_cpp_vpcaccess REQUIRED) diff --git a/google/cloud/vpcaccess/v1/internal/vpc_access_auth_decorator.cc b/google/cloud/vpcaccess/v1/internal/vpc_access_auth_decorator.cc index 878ec816ef207..e77ea552b9d7a 100644 --- a/google/cloud/vpcaccess/v1/internal/vpc_access_auth_decorator.cc +++ b/google/cloud/vpcaccess/v1/internal/vpc_access_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/vpcaccess/v1/vpc_access.proto #include "google/cloud/vpcaccess/v1/internal/vpc_access_auth_decorator.h" -#include +#include "google/cloud/vpcaccess/v1/vpc_access.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vpcaccess_v1_internal { @@ -171,3 +174,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace vpcaccess_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/vpcaccess/v1/internal/vpc_access_auth_decorator.h b/google/cloud/vpcaccess/v1/internal/vpc_access_auth_decorator.h index 0b5d993bf960f..5448a7dfc2096 100644 --- a/google/cloud/vpcaccess/v1/internal/vpc_access_auth_decorator.h +++ b/google/cloud/vpcaccess/v1/internal/vpc_access_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/vpcaccess/v1/internal/vpc_access_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vpcaccess_v1_internal { @@ -107,4 +110,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VPCACCESS_V1_INTERNAL_VPC_ACCESS_AUTH_DECORATOR_H diff --git a/google/cloud/vpcaccess/v1/internal/vpc_access_connection_impl.h b/google/cloud/vpcaccess/v1/internal/vpc_access_connection_impl.h index 7e109814590b2..f62944dbfaa4a 100644 --- a/google/cloud/vpcaccess/v1/internal/vpc_access_connection_impl.h +++ b/google/cloud/vpcaccess/v1/internal/vpc_access_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/vpcaccess/v1/internal/vpc_access_logging_decorator.cc b/google/cloud/vpcaccess/v1/internal/vpc_access_logging_decorator.cc index 29ff75e9351ff..d5a2b58c5ba3b 100644 --- a/google/cloud/vpcaccess/v1/internal/vpc_access_logging_decorator.cc +++ b/google/cloud/vpcaccess/v1/internal/vpc_access_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/vpcaccess/v1/vpc_access.proto #include "google/cloud/vpcaccess/v1/internal/vpc_access_logging_decorator.h" +#include "google/cloud/vpcaccess/v1/vpc_access.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vpcaccess_v1_internal { @@ -198,3 +201,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace vpcaccess_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/vpcaccess/v1/internal/vpc_access_logging_decorator.h b/google/cloud/vpcaccess/v1/internal/vpc_access_logging_decorator.h index a1d083eac1cb7..a9eea068cb06f 100644 --- a/google/cloud/vpcaccess/v1/internal/vpc_access_logging_decorator.h +++ b/google/cloud/vpcaccess/v1/internal/vpc_access_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/vpcaccess/v1/internal/vpc_access_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vpcaccess_v1_internal { @@ -107,4 +110,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VPCACCESS_V1_INTERNAL_VPC_ACCESS_LOGGING_DECORATOR_H diff --git a/google/cloud/vpcaccess/v1/internal/vpc_access_metadata_decorator.cc b/google/cloud/vpcaccess/v1/internal/vpc_access_metadata_decorator.cc index 624e7468b77e7..2b2eb77fa854a 100644 --- a/google/cloud/vpcaccess/v1/internal/vpc_access_metadata_decorator.cc +++ b/google/cloud/vpcaccess/v1/internal/vpc_access_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/vpcaccess/v1/vpc_access.proto #include "google/cloud/vpcaccess/v1/internal/vpc_access_metadata_decorator.h" +#include "google/cloud/vpcaccess/v1/vpc_access.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vpcaccess_v1_internal { @@ -170,3 +174,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace vpcaccess_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/vpcaccess/v1/internal/vpc_access_metadata_decorator.h b/google/cloud/vpcaccess/v1/internal/vpc_access_metadata_decorator.h index 5366cff472cfc..cc90597902e76 100644 --- a/google/cloud/vpcaccess/v1/internal/vpc_access_metadata_decorator.h +++ b/google/cloud/vpcaccess/v1/internal/vpc_access_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/vpcaccess/v1/internal/vpc_access_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vpcaccess_v1_internal { @@ -113,4 +116,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VPCACCESS_V1_INTERNAL_VPC_ACCESS_METADATA_DECORATOR_H diff --git a/google/cloud/vpcaccess/v1/internal/vpc_access_option_defaults.cc b/google/cloud/vpcaccess/v1/internal/vpc_access_option_defaults.cc index 2883cc39eb511..e4c8a55fc451d 100644 --- a/google/cloud/vpcaccess/v1/internal/vpc_access_option_defaults.cc +++ b/google/cloud/vpcaccess/v1/internal/vpc_access_option_defaults.cc @@ -42,7 +42,7 @@ Options VpcAccessServiceDefaultOptions(Options options) { if (!options.has()) { options.set( vpcaccess_v1::VpcAccessServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/vpcaccess/v1/internal/vpc_access_stub.cc b/google/cloud/vpcaccess/v1/internal/vpc_access_stub.cc index 9e4b31f91edbc..a31cc8ce5ddb3 100644 --- a/google/cloud/vpcaccess/v1/internal/vpc_access_stub.cc +++ b/google/cloud/vpcaccess/v1/internal/vpc_access_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/vpcaccess/v1/vpc_access.proto #include "google/cloud/vpcaccess/v1/internal/vpc_access_stub.h" +#include "google/cloud/vpcaccess/v1/vpc_access.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vpcaccess_v1_internal { @@ -196,3 +199,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace vpcaccess_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/vpcaccess/v1/internal/vpc_access_stub.h b/google/cloud/vpcaccess/v1/internal/vpc_access_stub.h index fde54cbd23b14..fea3f7d033c02 100644 --- a/google/cloud/vpcaccess/v1/internal/vpc_access_stub.h +++ b/google/cloud/vpcaccess/v1/internal/vpc_access_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VPCACCESS_V1_INTERNAL_VPC_ACCESS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VPCACCESS_V1_INTERNAL_VPC_ACCESS_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/vpcaccess/v1/vpc_access.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vpcaccess_v1_internal { @@ -180,4 +183,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VPCACCESS_V1_INTERNAL_VPC_ACCESS_STUB_H diff --git a/google/cloud/vpcaccess/v1/internal/vpc_access_stub_factory.cc b/google/cloud/vpcaccess/v1/internal/vpc_access_stub_factory.cc index 0e960ed240076..272d5d3bcaaaa 100644 --- a/google/cloud/vpcaccess/v1/internal/vpc_access_stub_factory.cc +++ b/google/cloud/vpcaccess/v1/internal/vpc_access_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/vpcaccess/v1/vpc_access.proto #include "google/cloud/vpcaccess/v1/internal/vpc_access_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/vpcaccess/v1/internal/vpc_access_auth_decorator.h" #include "google/cloud/vpcaccess/v1/internal/vpc_access_logging_decorator.h" #include "google/cloud/vpcaccess/v1/internal/vpc_access_metadata_decorator.h" #include "google/cloud/vpcaccess/v1/internal/vpc_access_stub.h" #include "google/cloud/vpcaccess/v1/internal/vpc_access_tracing_stub.h" +#include "google/cloud/vpcaccess/v1/vpc_access.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vpcaccess_v1_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace vpcaccess_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/vpcaccess/v1/internal/vpc_access_stub_factory.h b/google/cloud/vpcaccess/v1/internal/vpc_access_stub_factory.h index 9ff825c6eb785..d1a04cbbf0c2f 100644 --- a/google/cloud/vpcaccess/v1/internal/vpc_access_stub_factory.h +++ b/google/cloud/vpcaccess/v1/internal/vpc_access_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vpcaccess_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VPCACCESS_V1_INTERNAL_VPC_ACCESS_STUB_FACTORY_H diff --git a/google/cloud/vpcaccess/v1/internal/vpc_access_tracing_connection.cc b/google/cloud/vpcaccess/v1/internal/vpc_access_tracing_connection.cc index 356e2bd0d7fa7..e79979a7da7d9 100644 --- a/google/cloud/vpcaccess/v1/internal/vpc_access_tracing_connection.cc +++ b/google/cloud/vpcaccess/v1/internal/vpc_access_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace vpcaccess_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - VpcAccessServiceTracingConnection::VpcAccessServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -142,16 +140,12 @@ VpcAccessServiceTracingConnection::GetOperation( return internal::EndSpan(*span, child_->GetOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeVpcAccessServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/vpcaccess/v1/internal/vpc_access_tracing_connection.h b/google/cloud/vpcaccess/v1/internal/vpc_access_tracing_connection.h index 26252d14071df..45d8b68439877 100644 --- a/google/cloud/vpcaccess/v1/internal/vpc_access_tracing_connection.h +++ b/google/cloud/vpcaccess/v1/internal/vpc_access_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace vpcaccess_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class VpcAccessServiceTracingConnection : public vpcaccess_v1::VpcAccessServiceConnection { public: @@ -84,8 +82,6 @@ class VpcAccessServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/vpcaccess/v1/internal/vpc_access_tracing_stub.cc b/google/cloud/vpcaccess/v1/internal/vpc_access_tracing_stub.cc index cc8fffc1da06a..ba446a477b44e 100644 --- a/google/cloud/vpcaccess/v1/internal/vpc_access_tracing_stub.cc +++ b/google/cloud/vpcaccess/v1/internal/vpc_access_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vpcaccess_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - VpcAccessServiceTracingStub::VpcAccessServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -174,18 +175,14 @@ future VpcAccessServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeVpcAccessServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace vpcaccess_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/vpcaccess/v1/internal/vpc_access_tracing_stub.h b/google/cloud/vpcaccess/v1/internal/vpc_access_tracing_stub.h index 55d2e07d1aa01..253a557e96b13 100644 --- a/google/cloud/vpcaccess/v1/internal/vpc_access_tracing_stub.h +++ b/google/cloud/vpcaccess/v1/internal/vpc_access_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace vpcaccess_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class VpcAccessServiceTracingStub : public VpcAccessServiceStub { public: ~VpcAccessServiceTracingStub() override = default; @@ -103,8 +104,6 @@ class VpcAccessServiceTracingStub : public VpcAccessServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -119,4 +118,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VPCACCESS_V1_INTERNAL_VPC_ACCESS_TRACING_STUB_H diff --git a/google/cloud/vpcaccess/v1/vpc_access_client.h b/google/cloud/vpcaccess/v1/vpc_access_client.h index 57a9e89442281..b4ddfa6d67e18 100644 --- a/google/cloud/vpcaccess/v1/vpc_access_client.h +++ b/google/cloud/vpcaccess/v1/vpc_access_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/vpcaccess/v1/vpc_access_connection.h b/google/cloud/vpcaccess/v1/vpc_access_connection.h index 712c44eb09054..28f0019d475d4 100644 --- a/google/cloud/vpcaccess/v1/vpc_access_connection.h +++ b/google/cloud/vpcaccess/v1/vpc_access_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VPCACCESS_V1_VPC_ACCESS_CONNECTION_H #include "google/cloud/vpcaccess/v1/internal/vpc_access_retry_traits.h" +#include "google/cloud/vpcaccess/v1/vpc_access.pb.h" #include "google/cloud/vpcaccess/v1/vpc_access_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/vpcaccess/v1/vpc_access_connection_idempotency_policy.h b/google/cloud/vpcaccess/v1/vpc_access_connection_idempotency_policy.h index ea579985b8d5a..8c2685cd48c8d 100644 --- a/google/cloud/vpcaccess/v1/vpc_access_connection_idempotency_policy.h +++ b/google/cloud/vpcaccess/v1/vpc_access_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VPCACCESS_V1_VPC_ACCESS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VPCACCESS_V1_VPC_ACCESS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/vpcaccess/v1/vpc_access.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/vpcaccess/vpc_access_client.h b/google/cloud/vpcaccess/vpc_access_client.h deleted file mode 100644 index 5b38a9f5e67f6..0000000000000 --- a/google/cloud/vpcaccess/vpc_access_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/vpcaccess/v1/vpc_access.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VPCACCESS_VPC_ACCESS_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VPCACCESS_VPC_ACCESS_CLIENT_H - -#include "google/cloud/vpcaccess/v1/vpc_access_client.h" -#include "google/cloud/vpcaccess/vpc_access_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in vpcaccess_v1 instead of the aliases defined in -/// this namespace. -namespace vpcaccess { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use vpcaccess_v1::VpcAccessServiceClient directly. -using ::google::cloud::vpcaccess_v1::VpcAccessServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace vpcaccess -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VPCACCESS_VPC_ACCESS_CLIENT_H diff --git a/google/cloud/vpcaccess/vpc_access_connection.h b/google/cloud/vpcaccess/vpc_access_connection.h deleted file mode 100644 index 24a61273068ea..0000000000000 --- a/google/cloud/vpcaccess/vpc_access_connection.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/vpcaccess/v1/vpc_access.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VPCACCESS_VPC_ACCESS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VPCACCESS_VPC_ACCESS_CONNECTION_H - -#include "google/cloud/vpcaccess/v1/vpc_access_connection.h" -#include "google/cloud/vpcaccess/vpc_access_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace vpcaccess { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use vpcaccess_v1::MakeVpcAccessServiceConnection directly. -using ::google::cloud::vpcaccess_v1::MakeVpcAccessServiceConnection; - -/// @deprecated Use vpcaccess_v1::VpcAccessServiceConnection directly. -using ::google::cloud::vpcaccess_v1::VpcAccessServiceConnection; - -/// @deprecated Use vpcaccess_v1::VpcAccessServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::vpcaccess_v1:: - VpcAccessServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use vpcaccess_v1::VpcAccessServiceLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::vpcaccess_v1::VpcAccessServiceLimitedTimeRetryPolicy; - -/// @deprecated Use vpcaccess_v1::VpcAccessServiceRetryPolicy directly. -using ::google::cloud::vpcaccess_v1::VpcAccessServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace vpcaccess -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VPCACCESS_VPC_ACCESS_CONNECTION_H diff --git a/google/cloud/vpcaccess/vpc_access_connection_idempotency_policy.h b/google/cloud/vpcaccess/vpc_access_connection_idempotency_policy.h deleted file mode 100644 index b54d42c9e60df..0000000000000 --- a/google/cloud/vpcaccess/vpc_access_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/vpcaccess/v1/vpc_access.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VPCACCESS_VPC_ACCESS_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VPCACCESS_VPC_ACCESS_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/vpcaccess/v1/vpc_access_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace vpcaccess { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// vpcaccess_v1::MakeDefaultVpcAccessServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::vpcaccess_v1:: - MakeDefaultVpcAccessServiceConnectionIdempotencyPolicy; - -/// @deprecated Use vpcaccess_v1::VpcAccessServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::vpcaccess_v1:: - VpcAccessServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace vpcaccess -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VPCACCESS_VPC_ACCESS_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/vpcaccess/vpc_access_options.h b/google/cloud/vpcaccess/vpc_access_options.h deleted file mode 100644 index 41a692c5fe56b..0000000000000 --- a/google/cloud/vpcaccess/vpc_access_options.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/vpcaccess/v1/vpc_access.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VPCACCESS_VPC_ACCESS_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VPCACCESS_VPC_ACCESS_OPTIONS_H - -#include "google/cloud/vpcaccess/v1/vpc_access_options.h" -#include "google/cloud/vpcaccess/vpc_access_connection.h" -#include "google/cloud/vpcaccess/vpc_access_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace vpcaccess { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use vpcaccess_v1::VpcAccessServicePollingPolicyOption directly. -using ::google::cloud::vpcaccess_v1::VpcAccessServicePollingPolicyOption; - -/// @deprecated Use vpcaccess_v1::VpcAccessServiceBackoffPolicyOption directly. -using ::google::cloud::vpcaccess_v1::VpcAccessServiceBackoffPolicyOption; - -/// @deprecated Use -/// vpcaccess_v1::VpcAccessServiceConnectionIdempotencyPolicyOption directly. -using ::google::cloud::vpcaccess_v1:: - VpcAccessServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use vpcaccess_v1::VpcAccessServicePolicyOptionList directly. -using ::google::cloud::vpcaccess_v1::VpcAccessServicePolicyOptionList; - -/// @deprecated Use vpcaccess_v1::VpcAccessServiceRetryPolicyOption directly. -using ::google::cloud::vpcaccess_v1::VpcAccessServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace vpcaccess -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_VPCACCESS_VPC_ACCESS_OPTIONS_H diff --git a/google/cloud/webrisk/BUILD.bazel b/google/cloud/webrisk/BUILD.bazel index 282bf5a26d552..9a0b29a58ef65 100644 --- a/google/cloud/webrisk/BUILD.bazel +++ b/google/cloud/webrisk/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/webrisk/v1:webrisk_cc_grpc", + "@googleapis//google/cloud/webrisk/v1:webrisk_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/webrisk/CMakeLists.txt b/google/cloud/webrisk/CMakeLists.txt index a5b3a7c457940..d55b6cd19d2a1 100644 --- a/google/cloud/webrisk/CMakeLists.txt +++ b/google/cloud/webrisk/CMakeLists.txt @@ -28,8 +28,7 @@ endif () include(GoogleCloudCppLibrary) -google_cloud_cpp_add_gapic_library(webrisk "Web Risk API" - SERVICE_DIRS "__EMPTY__" "v1/") +google_cloud_cpp_add_gapic_library(webrisk "Web Risk API" SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(webrisk_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/webrisk/mocks/mock_web_risk_connection.h b/google/cloud/webrisk/mocks/mock_web_risk_connection.h deleted file mode 100644 index d7e8f1d072537..0000000000000 --- a/google/cloud/webrisk/mocks/mock_web_risk_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/webrisk/v1/webrisk.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBRISK_MOCKS_MOCK_WEB_RISK_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBRISK_MOCKS_MOCK_WEB_RISK_CONNECTION_H - -#include "google/cloud/webrisk/v1/mocks/mock_web_risk_connection.h" -#include "google/cloud/webrisk/web_risk_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in webrisk_v1_mocks instead of the aliases -/// defined in this namespace. -namespace webrisk_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use webrisk_v1_mocks::MockWebRiskServiceConnection directly. -using ::google::cloud::webrisk_v1_mocks::MockWebRiskServiceConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace webrisk_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBRISK_MOCKS_MOCK_WEB_RISK_CONNECTION_H diff --git a/google/cloud/webrisk/quickstart/.bazelrc b/google/cloud/webrisk/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/webrisk/quickstart/.bazelrc +++ b/google/cloud/webrisk/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/webrisk/quickstart/CMakeLists.txt b/google/cloud/webrisk/quickstart/CMakeLists.txt index feeceb9f43484..865f9b95a550b 100644 --- a/google/cloud/webrisk/quickstart/CMakeLists.txt +++ b/google/cloud/webrisk/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Web Risk API C++ client library from a larger # CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-webrisk-quickstart CXX) find_package(google_cloud_cpp_webrisk REQUIRED) diff --git a/google/cloud/webrisk/v1/internal/web_risk_auth_decorator.cc b/google/cloud/webrisk/v1/internal/web_risk_auth_decorator.cc index eeb716159222c..fc19b16eb4aaf 100644 --- a/google/cloud/webrisk/v1/internal/web_risk_auth_decorator.cc +++ b/google/cloud/webrisk/v1/internal/web_risk_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/webrisk/v1/webrisk.proto #include "google/cloud/webrisk/v1/internal/web_risk_auth_decorator.h" -#include +#include "google/cloud/webrisk/v1/webrisk.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace webrisk_v1_internal { @@ -168,3 +171,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace webrisk_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/webrisk/v1/internal/web_risk_auth_decorator.h b/google/cloud/webrisk/v1/internal/web_risk_auth_decorator.h index ab80057426186..94c4dde1693c6 100644 --- a/google/cloud/webrisk/v1/internal/web_risk_auth_decorator.h +++ b/google/cloud/webrisk/v1/internal/web_risk_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/webrisk/v1/internal/web_risk_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace webrisk_v1_internal { @@ -106,4 +109,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBRISK_V1_INTERNAL_WEB_RISK_AUTH_DECORATOR_H diff --git a/google/cloud/webrisk/v1/internal/web_risk_connection_impl.h b/google/cloud/webrisk/v1/internal/web_risk_connection_impl.h index 3c74b3104d50e..7307e2d17d2d4 100644 --- a/google/cloud/webrisk/v1/internal/web_risk_connection_impl.h +++ b/google/cloud/webrisk/v1/internal/web_risk_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/webrisk/v1/internal/web_risk_logging_decorator.cc b/google/cloud/webrisk/v1/internal/web_risk_logging_decorator.cc index 5c1696053de22..90a7eea6051b1 100644 --- a/google/cloud/webrisk/v1/internal/web_risk_logging_decorator.cc +++ b/google/cloud/webrisk/v1/internal/web_risk_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/webrisk/v1/webrisk.proto #include "google/cloud/webrisk/v1/internal/web_risk_logging_decorator.h" +#include "google/cloud/webrisk/v1/webrisk.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace webrisk_v1_internal { @@ -198,3 +201,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace webrisk_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/webrisk/v1/internal/web_risk_logging_decorator.h b/google/cloud/webrisk/v1/internal/web_risk_logging_decorator.h index 44c11d4d79f1f..8bbc4defb6fbb 100644 --- a/google/cloud/webrisk/v1/internal/web_risk_logging_decorator.h +++ b/google/cloud/webrisk/v1/internal/web_risk_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/webrisk/v1/internal/web_risk_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace webrisk_v1_internal { @@ -106,4 +109,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBRISK_V1_INTERNAL_WEB_RISK_LOGGING_DECORATOR_H diff --git a/google/cloud/webrisk/v1/internal/web_risk_metadata_decorator.cc b/google/cloud/webrisk/v1/internal/web_risk_metadata_decorator.cc index ccb2bb0076888..2498e7452a1cd 100644 --- a/google/cloud/webrisk/v1/internal/web_risk_metadata_decorator.cc +++ b/google/cloud/webrisk/v1/internal/web_risk_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/webrisk/v1/webrisk.proto #include "google/cloud/webrisk/v1/internal/web_risk_metadata_decorator.h" +#include "google/cloud/webrisk/v1/webrisk.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace webrisk_v1_internal { @@ -170,3 +174,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace webrisk_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/webrisk/v1/internal/web_risk_metadata_decorator.h b/google/cloud/webrisk/v1/internal/web_risk_metadata_decorator.h index b30df10fe4740..4378be2c2ac02 100644 --- a/google/cloud/webrisk/v1/internal/web_risk_metadata_decorator.h +++ b/google/cloud/webrisk/v1/internal/web_risk_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/webrisk/v1/internal/web_risk_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace webrisk_v1_internal { @@ -111,4 +114,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBRISK_V1_INTERNAL_WEB_RISK_METADATA_DECORATOR_H diff --git a/google/cloud/webrisk/v1/internal/web_risk_option_defaults.cc b/google/cloud/webrisk/v1/internal/web_risk_option_defaults.cc index d7e3bb4abf274..50ed16d6d2237 100644 --- a/google/cloud/webrisk/v1/internal/web_risk_option_defaults.cc +++ b/google/cloud/webrisk/v1/internal/web_risk_option_defaults.cc @@ -41,7 +41,7 @@ Options WebRiskServiceDefaultOptions(Options options) { if (!options.has()) { options.set( webrisk_v1::WebRiskServiceLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/webrisk/v1/internal/web_risk_stub.cc b/google/cloud/webrisk/v1/internal/web_risk_stub.cc index 42fb29e7e62da..ac6208f27f59b 100644 --- a/google/cloud/webrisk/v1/internal/web_risk_stub.cc +++ b/google/cloud/webrisk/v1/internal/web_risk_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/webrisk/v1/webrisk.proto #include "google/cloud/webrisk/v1/internal/web_risk_stub.h" +#include "google/cloud/webrisk/v1/webrisk.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace webrisk_v1_internal { @@ -197,3 +200,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace webrisk_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/webrisk/v1/internal/web_risk_stub.h b/google/cloud/webrisk/v1/internal/web_risk_stub.h index 85719feb2d220..4facb42cd557f 100644 --- a/google/cloud/webrisk/v1/internal/web_risk_stub.h +++ b/google/cloud/webrisk/v1/internal/web_risk_stub.h @@ -19,16 +19,19 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBRISK_V1_INTERNAL_WEB_RISK_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBRISK_V1_INTERNAL_WEB_RISK_STUB_H +#include "google/cloud/webrisk/v1/webrisk.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace webrisk_v1_internal { @@ -175,4 +178,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBRISK_V1_INTERNAL_WEB_RISK_STUB_H diff --git a/google/cloud/webrisk/v1/internal/web_risk_stub_factory.cc b/google/cloud/webrisk/v1/internal/web_risk_stub_factory.cc index 4bfcc94696a70..58c678ca87f35 100644 --- a/google/cloud/webrisk/v1/internal/web_risk_stub_factory.cc +++ b/google/cloud/webrisk/v1/internal/web_risk_stub_factory.cc @@ -22,17 +22,20 @@ #include "google/cloud/webrisk/v1/internal/web_risk_metadata_decorator.h" #include "google/cloud/webrisk/v1/internal/web_risk_stub.h" #include "google/cloud/webrisk/v1/internal/web_risk_tracing_stub.h" +#include "google/cloud/webrisk/v1/webrisk.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace webrisk_v1_internal { @@ -72,3 +75,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace webrisk_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/webrisk/v1/internal/web_risk_stub_factory.h b/google/cloud/webrisk/v1/internal/web_risk_stub_factory.h index 528d150ed11dd..4f6b2334fb438 100644 --- a/google/cloud/webrisk/v1/internal/web_risk_stub_factory.h +++ b/google/cloud/webrisk/v1/internal/web_risk_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace webrisk_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBRISK_V1_INTERNAL_WEB_RISK_STUB_FACTORY_H diff --git a/google/cloud/webrisk/v1/internal/web_risk_tracing_connection.cc b/google/cloud/webrisk/v1/internal/web_risk_tracing_connection.cc index f2ad07212958c..c49bd84040fba 100644 --- a/google/cloud/webrisk/v1/internal/web_risk_tracing_connection.cc +++ b/google/cloud/webrisk/v1/internal/web_risk_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace webrisk_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - WebRiskServiceTracingConnection::WebRiskServiceTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -132,16 +130,12 @@ Status WebRiskServiceTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeWebRiskServiceTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/webrisk/v1/internal/web_risk_tracing_connection.h b/google/cloud/webrisk/v1/internal/web_risk_tracing_connection.h index 301a747f933ce..b3863818639bc 100644 --- a/google/cloud/webrisk/v1/internal/web_risk_tracing_connection.h +++ b/google/cloud/webrisk/v1/internal/web_risk_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace webrisk_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class WebRiskServiceTracingConnection : public webrisk_v1::WebRiskServiceConnection { public: @@ -81,8 +79,6 @@ class WebRiskServiceTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/webrisk/v1/internal/web_risk_tracing_stub.cc b/google/cloud/webrisk/v1/internal/web_risk_tracing_stub.cc index d42d4be687407..ff3d1647ece10 100644 --- a/google/cloud/webrisk/v1/internal/web_risk_tracing_stub.cc +++ b/google/cloud/webrisk/v1/internal/web_risk_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace webrisk_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - WebRiskServiceTracingStub::WebRiskServiceTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -179,18 +180,14 @@ future WebRiskServiceTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeWebRiskServiceTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace webrisk_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/webrisk/v1/internal/web_risk_tracing_stub.h b/google/cloud/webrisk/v1/internal/web_risk_tracing_stub.h index 8b127a6d10738..aad3d185f5977 100644 --- a/google/cloud/webrisk/v1/internal/web_risk_tracing_stub.h +++ b/google/cloud/webrisk/v1/internal/web_risk_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace webrisk_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class WebRiskServiceTracingStub : public WebRiskServiceStub { public: ~WebRiskServiceTracingStub() override = default; @@ -101,8 +102,6 @@ class WebRiskServiceTracingStub : public WebRiskServiceStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -117,4 +116,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBRISK_V1_INTERNAL_WEB_RISK_TRACING_STUB_H diff --git a/google/cloud/webrisk/v1/web_risk_client.h b/google/cloud/webrisk/v1/web_risk_client.h index 1787ec92c0d41..f88bbc9d5ded4 100644 --- a/google/cloud/webrisk/v1/web_risk_client.h +++ b/google/cloud/webrisk/v1/web_risk_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include diff --git a/google/cloud/webrisk/v1/web_risk_connection.h b/google/cloud/webrisk/v1/web_risk_connection.h index 9ae99d9803249..b02c17a97e6a9 100644 --- a/google/cloud/webrisk/v1/web_risk_connection.h +++ b/google/cloud/webrisk/v1/web_risk_connection.h @@ -21,6 +21,7 @@ #include "google/cloud/webrisk/v1/internal/web_risk_retry_traits.h" #include "google/cloud/webrisk/v1/web_risk_connection_idempotency_policy.h" +#include "google/cloud/webrisk/v1/webrisk.pb.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/webrisk/v1/web_risk_connection_idempotency_policy.h b/google/cloud/webrisk/v1/web_risk_connection_idempotency_policy.h index b203b4cb5ee50..ffbdeec0a4622 100644 --- a/google/cloud/webrisk/v1/web_risk_connection_idempotency_policy.h +++ b/google/cloud/webrisk/v1/web_risk_connection_idempotency_policy.h @@ -19,10 +19,10 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBRISK_V1_WEB_RISK_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBRISK_V1_WEB_RISK_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/webrisk/v1/webrisk.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/webrisk/web_risk_client.h b/google/cloud/webrisk/web_risk_client.h deleted file mode 100644 index 93834d5a4f726..0000000000000 --- a/google/cloud/webrisk/web_risk_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/webrisk/v1/webrisk.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBRISK_WEB_RISK_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBRISK_WEB_RISK_CLIENT_H - -#include "google/cloud/webrisk/v1/web_risk_client.h" -#include "google/cloud/webrisk/web_risk_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in webrisk_v1 instead of the aliases defined in -/// this namespace. -namespace webrisk { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use webrisk_v1::WebRiskServiceClient directly. -using ::google::cloud::webrisk_v1::WebRiskServiceClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace webrisk -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBRISK_WEB_RISK_CLIENT_H diff --git a/google/cloud/webrisk/web_risk_connection.h b/google/cloud/webrisk/web_risk_connection.h deleted file mode 100644 index e7fa8f8096ba3..0000000000000 --- a/google/cloud/webrisk/web_risk_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/webrisk/v1/webrisk.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBRISK_WEB_RISK_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBRISK_WEB_RISK_CONNECTION_H - -#include "google/cloud/webrisk/v1/web_risk_connection.h" -#include "google/cloud/webrisk/web_risk_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace webrisk { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use webrisk_v1::MakeWebRiskServiceConnection directly. -using ::google::cloud::webrisk_v1::MakeWebRiskServiceConnection; - -/// @deprecated Use webrisk_v1::WebRiskServiceConnection directly. -using ::google::cloud::webrisk_v1::WebRiskServiceConnection; - -/// @deprecated Use webrisk_v1::WebRiskServiceLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::webrisk_v1::WebRiskServiceLimitedErrorCountRetryPolicy; - -/// @deprecated Use webrisk_v1::WebRiskServiceLimitedTimeRetryPolicy directly. -using ::google::cloud::webrisk_v1::WebRiskServiceLimitedTimeRetryPolicy; - -/// @deprecated Use webrisk_v1::WebRiskServiceRetryPolicy directly. -using ::google::cloud::webrisk_v1::WebRiskServiceRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace webrisk -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBRISK_WEB_RISK_CONNECTION_H diff --git a/google/cloud/webrisk/web_risk_connection_idempotency_policy.h b/google/cloud/webrisk/web_risk_connection_idempotency_policy.h deleted file mode 100644 index 8332ce46ffb93..0000000000000 --- a/google/cloud/webrisk/web_risk_connection_idempotency_policy.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/webrisk/v1/webrisk.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBRISK_WEB_RISK_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBRISK_WEB_RISK_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/webrisk/v1/web_risk_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace webrisk { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// webrisk_v1::MakeDefaultWebRiskServiceConnectionIdempotencyPolicy directly. -using ::google::cloud::webrisk_v1:: - MakeDefaultWebRiskServiceConnectionIdempotencyPolicy; - -/// @deprecated Use webrisk_v1::WebRiskServiceConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::webrisk_v1::WebRiskServiceConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace webrisk -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBRISK_WEB_RISK_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/webrisk/web_risk_options.h b/google/cloud/webrisk/web_risk_options.h deleted file mode 100644 index 0fb940e89b5d1..0000000000000 --- a/google/cloud/webrisk/web_risk_options.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/webrisk/v1/webrisk.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBRISK_WEB_RISK_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBRISK_WEB_RISK_OPTIONS_H - -#include "google/cloud/webrisk/v1/web_risk_options.h" -#include "google/cloud/webrisk/web_risk_connection.h" -#include "google/cloud/webrisk/web_risk_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace webrisk { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use webrisk_v1::WebRiskServicePollingPolicyOption directly. -using ::google::cloud::webrisk_v1::WebRiskServicePollingPolicyOption; - -/// @deprecated Use webrisk_v1::WebRiskServiceBackoffPolicyOption directly. -using ::google::cloud::webrisk_v1::WebRiskServiceBackoffPolicyOption; - -/// @deprecated Use webrisk_v1::WebRiskServiceConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::webrisk_v1:: - WebRiskServiceConnectionIdempotencyPolicyOption; - -/// @deprecated Use webrisk_v1::WebRiskServicePolicyOptionList directly. -using ::google::cloud::webrisk_v1::WebRiskServicePolicyOptionList; - -/// @deprecated Use webrisk_v1::WebRiskServiceRetryPolicyOption directly. -using ::google::cloud::webrisk_v1::WebRiskServiceRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace webrisk -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBRISK_WEB_RISK_OPTIONS_H diff --git a/google/cloud/websecurityscanner/BUILD.bazel b/google/cloud/websecurityscanner/BUILD.bazel index c71b33972c793..aca53be177c96 100644 --- a/google/cloud/websecurityscanner/BUILD.bazel +++ b/google/cloud/websecurityscanner/BUILD.bazel @@ -19,12 +19,11 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/websecurityscanner/v1:websecurityscanner_cc_grpc", + "@googleapis//google/cloud/websecurityscanner/v1:websecurityscanner_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/websecurityscanner/CMakeLists.txt b/google/cloud/websecurityscanner/CMakeLists.txt index 2fa4745affc52..d77d7360215e5 100644 --- a/google/cloud/websecurityscanner/CMakeLists.txt +++ b/google/cloud/websecurityscanner/CMakeLists.txt @@ -17,7 +17,7 @@ include(GoogleCloudCppLibrary) google_cloud_cpp_add_gapic_library(websecurityscanner "Web Security Scanner API" - SERVICE_DIRS "__EMPTY__" "v1/") + SERVICE_DIRS "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(websecurityscanner_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/websecurityscanner/mocks/mock_web_security_scanner_connection.h b/google/cloud/websecurityscanner/mocks/mock_web_security_scanner_connection.h deleted file mode 100644 index b57aa12ee8bf5..0000000000000 --- a/google/cloud/websecurityscanner/mocks/mock_web_security_scanner_connection.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/websecurityscanner/v1/web_security_scanner.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBSECURITYSCANNER_MOCKS_MOCK_WEB_SECURITY_SCANNER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBSECURITYSCANNER_MOCKS_MOCK_WEB_SECURITY_SCANNER_CONNECTION_H - -#include "google/cloud/websecurityscanner/v1/mocks/mock_web_security_scanner_connection.h" -#include "google/cloud/websecurityscanner/web_security_scanner_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in websecurityscanner_v1_mocks instead of the aliases -/// defined in this namespace. -namespace websecurityscanner_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// websecurityscanner_v1_mocks::MockWebSecurityScannerConnection directly. -using ::google::cloud::websecurityscanner_v1_mocks:: - MockWebSecurityScannerConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace websecurityscanner_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBSECURITYSCANNER_MOCKS_MOCK_WEB_SECURITY_SCANNER_CONNECTION_H diff --git a/google/cloud/websecurityscanner/quickstart/.bazelrc b/google/cloud/websecurityscanner/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/websecurityscanner/quickstart/.bazelrc +++ b/google/cloud/websecurityscanner/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/websecurityscanner/quickstart/CMakeLists.txt b/google/cloud/websecurityscanner/quickstart/CMakeLists.txt index fb17c660f52fb..5b4b20a74797e 100644 --- a/google/cloud/websecurityscanner/quickstart/CMakeLists.txt +++ b/google/cloud/websecurityscanner/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Web Security Scanner API C++ client library # from a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-websecurityscanner-quickstart CXX) find_package(google_cloud_cpp_websecurityscanner REQUIRED) diff --git a/google/cloud/websecurityscanner/v1/internal/web_security_scanner_auth_decorator.cc b/google/cloud/websecurityscanner/v1/internal/web_security_scanner_auth_decorator.cc index 36056c3d7c73b..306ac84845866 100644 --- a/google/cloud/websecurityscanner/v1/internal/web_security_scanner_auth_decorator.cc +++ b/google/cloud/websecurityscanner/v1/internal/web_security_scanner_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/websecurityscanner/v1/web_security_scanner.proto #include "google/cloud/websecurityscanner/v1/internal/web_security_scanner_auth_decorator.h" -#include +#include "google/cloud/websecurityscanner/v1/web_security_scanner.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace websecurityscanner_v1_internal { @@ -158,3 +161,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace websecurityscanner_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/websecurityscanner/v1/internal/web_security_scanner_auth_decorator.h b/google/cloud/websecurityscanner/v1/internal/web_security_scanner_auth_decorator.h index 16ecae26433d8..f7ba6b8bb8f74 100644 --- a/google/cloud/websecurityscanner/v1/internal/web_security_scanner_auth_decorator.h +++ b/google/cloud/websecurityscanner/v1/internal/web_security_scanner_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace websecurityscanner_v1_internal { @@ -116,4 +119,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBSECURITYSCANNER_V1_INTERNAL_WEB_SECURITY_SCANNER_AUTH_DECORATOR_H diff --git a/google/cloud/websecurityscanner/v1/internal/web_security_scanner_logging_decorator.cc b/google/cloud/websecurityscanner/v1/internal/web_security_scanner_logging_decorator.cc index 904fc52f0940d..daa545b75e62b 100644 --- a/google/cloud/websecurityscanner/v1/internal/web_security_scanner_logging_decorator.cc +++ b/google/cloud/websecurityscanner/v1/internal/web_security_scanner_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/websecurityscanner/v1/web_security_scanner.proto #include "google/cloud/websecurityscanner/v1/internal/web_security_scanner_logging_decorator.h" +#include "google/cloud/websecurityscanner/v1/web_security_scanner.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace websecurityscanner_v1_internal { @@ -219,3 +222,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace websecurityscanner_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/websecurityscanner/v1/internal/web_security_scanner_logging_decorator.h b/google/cloud/websecurityscanner/v1/internal/web_security_scanner_logging_decorator.h index eb9af7a0cdc2c..845963e3b5e54 100644 --- a/google/cloud/websecurityscanner/v1/internal/web_security_scanner_logging_decorator.h +++ b/google/cloud/websecurityscanner/v1/internal/web_security_scanner_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace websecurityscanner_v1_internal { @@ -116,4 +119,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBSECURITYSCANNER_V1_INTERNAL_WEB_SECURITY_SCANNER_LOGGING_DECORATOR_H diff --git a/google/cloud/websecurityscanner/v1/internal/web_security_scanner_metadata_decorator.cc b/google/cloud/websecurityscanner/v1/internal/web_security_scanner_metadata_decorator.cc index 0d6cdca147499..8e0ca9becb9aa 100644 --- a/google/cloud/websecurityscanner/v1/internal/web_security_scanner_metadata_decorator.cc +++ b/google/cloud/websecurityscanner/v1/internal/web_security_scanner_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/websecurityscanner/v1/web_security_scanner.proto #include "google/cloud/websecurityscanner/v1/internal/web_security_scanner_metadata_decorator.h" +#include "google/cloud/websecurityscanner/v1/web_security_scanner.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace websecurityscanner_v1_internal { @@ -185,3 +189,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace websecurityscanner_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/websecurityscanner/v1/internal/web_security_scanner_metadata_decorator.h b/google/cloud/websecurityscanner/v1/internal/web_security_scanner_metadata_decorator.h index 48d69c838a22c..2415d173b379d 100644 --- a/google/cloud/websecurityscanner/v1/internal/web_security_scanner_metadata_decorator.h +++ b/google/cloud/websecurityscanner/v1/internal/web_security_scanner_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace websecurityscanner_v1_internal { @@ -122,4 +125,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBSECURITYSCANNER_V1_INTERNAL_WEB_SECURITY_SCANNER_METADATA_DECORATOR_H diff --git a/google/cloud/websecurityscanner/v1/internal/web_security_scanner_option_defaults.cc b/google/cloud/websecurityscanner/v1/internal/web_security_scanner_option_defaults.cc index fa89caa8a88d6..6f9246b5d6f90 100644 --- a/google/cloud/websecurityscanner/v1/internal/web_security_scanner_option_defaults.cc +++ b/google/cloud/websecurityscanner/v1/internal/web_security_scanner_option_defaults.cc @@ -43,7 +43,7 @@ Options WebSecurityScannerDefaultOptions(Options options) { .has()) { options.set( websecurityscanner_v1::WebSecurityScannerLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has< diff --git a/google/cloud/websecurityscanner/v1/internal/web_security_scanner_stub.cc b/google/cloud/websecurityscanner/v1/internal/web_security_scanner_stub.cc index ef1dfffa2eddd..c684e5fbff1ae 100644 --- a/google/cloud/websecurityscanner/v1/internal/web_security_scanner_stub.cc +++ b/google/cloud/websecurityscanner/v1/internal/web_security_scanner_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/websecurityscanner/v1/web_security_scanner.proto #include "google/cloud/websecurityscanner/v1/internal/web_security_scanner_stub.h" +#include "google/cloud/websecurityscanner/v1/web_security_scanner.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace websecurityscanner_v1_internal { @@ -196,3 +199,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace websecurityscanner_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/websecurityscanner/v1/internal/web_security_scanner_stub.h b/google/cloud/websecurityscanner/v1/internal/web_security_scanner_stub.h index 427c0c7bd7563..a9b35a28fab7d 100644 --- a/google/cloud/websecurityscanner/v1/internal/web_security_scanner_stub.h +++ b/google/cloud/websecurityscanner/v1/internal/web_security_scanner_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBSECURITYSCANNER_V1_INTERNAL_WEB_SECURITY_SCANNER_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBSECURITYSCANNER_V1_INTERNAL_WEB_SECURITY_SCANNER_STUB_H +#include "google/cloud/websecurityscanner/v1/web_security_scanner.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace websecurityscanner_v1_internal { @@ -197,4 +200,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBSECURITYSCANNER_V1_INTERNAL_WEB_SECURITY_SCANNER_STUB_H diff --git a/google/cloud/websecurityscanner/v1/internal/web_security_scanner_stub_factory.cc b/google/cloud/websecurityscanner/v1/internal/web_security_scanner_stub_factory.cc index 7d0775ff04f1b..eaf58c663b9f3 100644 --- a/google/cloud/websecurityscanner/v1/internal/web_security_scanner_stub_factory.cc +++ b/google/cloud/websecurityscanner/v1/internal/web_security_scanner_stub_factory.cc @@ -22,16 +22,19 @@ #include "google/cloud/websecurityscanner/v1/internal/web_security_scanner_metadata_decorator.h" #include "google/cloud/websecurityscanner/v1/internal/web_security_scanner_stub.h" #include "google/cloud/websecurityscanner/v1/internal/web_security_scanner_tracing_stub.h" +#include "google/cloud/websecurityscanner/v1/web_security_scanner.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace websecurityscanner_v1_internal { @@ -71,3 +74,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace websecurityscanner_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/websecurityscanner/v1/internal/web_security_scanner_stub_factory.h b/google/cloud/websecurityscanner/v1/internal/web_security_scanner_stub_factory.h index 5412ed707422f..fd1f93b53b096 100644 --- a/google/cloud/websecurityscanner/v1/internal/web_security_scanner_stub_factory.h +++ b/google/cloud/websecurityscanner/v1/internal/web_security_scanner_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace websecurityscanner_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBSECURITYSCANNER_V1_INTERNAL_WEB_SECURITY_SCANNER_STUB_FACTORY_H diff --git a/google/cloud/websecurityscanner/v1/internal/web_security_scanner_tracing_connection.cc b/google/cloud/websecurityscanner/v1/internal/web_security_scanner_tracing_connection.cc index f6082eb475ecf..0585bf550ec49 100644 --- a/google/cloud/websecurityscanner/v1/internal/web_security_scanner_tracing_connection.cc +++ b/google/cloud/websecurityscanner/v1/internal/web_security_scanner_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace websecurityscanner_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - WebSecurityScannerTracingConnection::WebSecurityScannerTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -167,17 +165,13 @@ WebSecurityScannerTracingConnection::ListFindingTypeStats( return internal::EndSpan(*span, child_->ListFindingTypeStats(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeWebSecurityScannerTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/websecurityscanner/v1/internal/web_security_scanner_tracing_connection.h b/google/cloud/websecurityscanner/v1/internal/web_security_scanner_tracing_connection.h index f830a2e6f5f7b..a82070b20c67a 100644 --- a/google/cloud/websecurityscanner/v1/internal/web_security_scanner_tracing_connection.h +++ b/google/cloud/websecurityscanner/v1/internal/web_security_scanner_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace websecurityscanner_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class WebSecurityScannerTracingConnection : public websecurityscanner_v1::WebSecurityScannerConnection { public: @@ -98,8 +96,6 @@ class WebSecurityScannerTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/websecurityscanner/v1/internal/web_security_scanner_tracing_stub.cc b/google/cloud/websecurityscanner/v1/internal/web_security_scanner_tracing_stub.cc index 7b44eac2aabc2..2a8d7c8991312 100644 --- a/google/cloud/websecurityscanner/v1/internal/web_security_scanner_tracing_stub.cc +++ b/google/cloud/websecurityscanner/v1/internal/web_security_scanner_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace websecurityscanner_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - WebSecurityScannerTracingStub::WebSecurityScannerTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -200,18 +201,14 @@ WebSecurityScannerTracingStub::ListFindingTypeStats( context, *span, child_->ListFindingTypeStats(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeWebSecurityScannerTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace websecurityscanner_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/websecurityscanner/v1/internal/web_security_scanner_tracing_stub.h b/google/cloud/websecurityscanner/v1/internal/web_security_scanner_tracing_stub.h index 56535b7ebd94d..2c48f10395735 100644 --- a/google/cloud/websecurityscanner/v1/internal/web_security_scanner_tracing_stub.h +++ b/google/cloud/websecurityscanner/v1/internal/web_security_scanner_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace websecurityscanner_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class WebSecurityScannerTracingStub : public WebSecurityScannerStub { public: ~WebSecurityScannerTracingStub() override = default; @@ -113,8 +114,6 @@ class WebSecurityScannerTracingStub : public WebSecurityScannerStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -129,4 +128,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBSECURITYSCANNER_V1_INTERNAL_WEB_SECURITY_SCANNER_TRACING_STUB_H diff --git a/google/cloud/websecurityscanner/v1/web_security_scanner_connection.h b/google/cloud/websecurityscanner/v1/web_security_scanner_connection.h index 0dbd6ae93ae6e..a5f260cba938d 100644 --- a/google/cloud/websecurityscanner/v1/web_security_scanner_connection.h +++ b/google/cloud/websecurityscanner/v1/web_security_scanner_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBSECURITYSCANNER_V1_WEB_SECURITY_SCANNER_CONNECTION_H #include "google/cloud/websecurityscanner/v1/internal/web_security_scanner_retry_traits.h" +#include "google/cloud/websecurityscanner/v1/web_security_scanner.pb.h" #include "google/cloud/websecurityscanner/v1/web_security_scanner_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/internal/retry_policy_impl.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/websecurityscanner/v1/web_security_scanner_connection_idempotency_policy.h b/google/cloud/websecurityscanner/v1/web_security_scanner_connection_idempotency_policy.h index 97f1630b5e93f..660a9e029b203 100644 --- a/google/cloud/websecurityscanner/v1/web_security_scanner_connection_idempotency_policy.h +++ b/google/cloud/websecurityscanner/v1/web_security_scanner_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBSECURITYSCANNER_V1_WEB_SECURITY_SCANNER_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBSECURITYSCANNER_V1_WEB_SECURITY_SCANNER_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/websecurityscanner/v1/web_security_scanner.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/websecurityscanner/web_security_scanner_client.h b/google/cloud/websecurityscanner/web_security_scanner_client.h deleted file mode 100644 index 0dd470dbec498..0000000000000 --- a/google/cloud/websecurityscanner/web_security_scanner_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/websecurityscanner/v1/web_security_scanner.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBSECURITYSCANNER_WEB_SECURITY_SCANNER_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBSECURITYSCANNER_WEB_SECURITY_SCANNER_CLIENT_H - -#include "google/cloud/websecurityscanner/v1/web_security_scanner_client.h" -#include "google/cloud/websecurityscanner/web_security_scanner_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in websecurityscanner_v1 instead of the aliases defined in -/// this namespace. -namespace websecurityscanner { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use websecurityscanner_v1::WebSecurityScannerClient directly. -using ::google::cloud::websecurityscanner_v1::WebSecurityScannerClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace websecurityscanner -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBSECURITYSCANNER_WEB_SECURITY_SCANNER_CLIENT_H diff --git a/google/cloud/websecurityscanner/web_security_scanner_connection.h b/google/cloud/websecurityscanner/web_security_scanner_connection.h deleted file mode 100644 index 3a8185922028f..0000000000000 --- a/google/cloud/websecurityscanner/web_security_scanner_connection.h +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/websecurityscanner/v1/web_security_scanner.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBSECURITYSCANNER_WEB_SECURITY_SCANNER_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBSECURITYSCANNER_WEB_SECURITY_SCANNER_CONNECTION_H - -#include "google/cloud/websecurityscanner/v1/web_security_scanner_connection.h" -#include "google/cloud/websecurityscanner/web_security_scanner_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace websecurityscanner { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use websecurityscanner_v1::MakeWebSecurityScannerConnection -/// directly. -using ::google::cloud::websecurityscanner_v1::MakeWebSecurityScannerConnection; - -/// @deprecated Use websecurityscanner_v1::WebSecurityScannerConnection -/// directly. -using ::google::cloud::websecurityscanner_v1::WebSecurityScannerConnection; - -/// @deprecated Use -/// websecurityscanner_v1::WebSecurityScannerLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::websecurityscanner_v1:: - WebSecurityScannerLimitedErrorCountRetryPolicy; - -/// @deprecated Use -/// websecurityscanner_v1::WebSecurityScannerLimitedTimeRetryPolicy directly. -using ::google::cloud::websecurityscanner_v1:: - WebSecurityScannerLimitedTimeRetryPolicy; - -/// @deprecated Use websecurityscanner_v1::WebSecurityScannerRetryPolicy -/// directly. -using ::google::cloud::websecurityscanner_v1::WebSecurityScannerRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace websecurityscanner -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBSECURITYSCANNER_WEB_SECURITY_SCANNER_CONNECTION_H diff --git a/google/cloud/websecurityscanner/web_security_scanner_connection_idempotency_policy.h b/google/cloud/websecurityscanner/web_security_scanner_connection_idempotency_policy.h deleted file mode 100644 index af60871e040cf..0000000000000 --- a/google/cloud/websecurityscanner/web_security_scanner_connection_idempotency_policy.h +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/websecurityscanner/v1/web_security_scanner.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBSECURITYSCANNER_WEB_SECURITY_SCANNER_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBSECURITYSCANNER_WEB_SECURITY_SCANNER_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/websecurityscanner/v1/web_security_scanner_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace websecurityscanner { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// websecurityscanner_v1::MakeDefaultWebSecurityScannerConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::websecurityscanner_v1:: - MakeDefaultWebSecurityScannerConnectionIdempotencyPolicy; - -/// @deprecated Use -/// websecurityscanner_v1::WebSecurityScannerConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::websecurityscanner_v1:: - WebSecurityScannerConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace websecurityscanner -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBSECURITYSCANNER_WEB_SECURITY_SCANNER_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/websecurityscanner/web_security_scanner_options.h b/google/cloud/websecurityscanner/web_security_scanner_options.h deleted file mode 100644 index 85aba80e7885e..0000000000000 --- a/google/cloud/websecurityscanner/web_security_scanner_options.h +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/websecurityscanner/v1/web_security_scanner.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBSECURITYSCANNER_WEB_SECURITY_SCANNER_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBSECURITYSCANNER_WEB_SECURITY_SCANNER_OPTIONS_H - -#include "google/cloud/websecurityscanner/v1/web_security_scanner_options.h" -#include "google/cloud/websecurityscanner/web_security_scanner_connection.h" -#include "google/cloud/websecurityscanner/web_security_scanner_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace websecurityscanner { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use websecurityscanner_v1::WebSecurityScannerBackoffPolicyOption -/// directly. -using ::google::cloud::websecurityscanner_v1:: - WebSecurityScannerBackoffPolicyOption; - -/// @deprecated Use -/// websecurityscanner_v1::WebSecurityScannerConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::websecurityscanner_v1:: - WebSecurityScannerConnectionIdempotencyPolicyOption; - -/// @deprecated Use websecurityscanner_v1::WebSecurityScannerPolicyOptionList -/// directly. -using ::google::cloud::websecurityscanner_v1:: - WebSecurityScannerPolicyOptionList; - -/// @deprecated Use websecurityscanner_v1::WebSecurityScannerRetryPolicyOption -/// directly. -using ::google::cloud::websecurityscanner_v1:: - WebSecurityScannerRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace websecurityscanner -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WEBSECURITYSCANNER_WEB_SECURITY_SCANNER_OPTIONS_H diff --git a/google/cloud/workflows/BUILD.bazel b/google/cloud/workflows/BUILD.bazel index 86dd942860f47..3ef8d4c01f5a9 100644 --- a/google/cloud/workflows/BUILD.bazel +++ b/google/cloud/workflows/BUILD.bazel @@ -19,14 +19,13 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 service_dirs = [ - "", "executions/v1/", "v1/", ] googleapis_deps = [ - "@com_google_googleapis//google/cloud/workflows/executions/v1:executions_cc_grpc", - "@com_google_googleapis//google/cloud/workflows/v1:workflows_cc_grpc", + "@googleapis//google/cloud/workflows/executions/v1:executions_cc_grpc", + "@googleapis//google/cloud/workflows/v1:workflows_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/workflows/CMakeLists.txt b/google/cloud/workflows/CMakeLists.txt index 8aa37f4c1c9bb..4bd6a8242ea03 100644 --- a/google/cloud/workflows/CMakeLists.txt +++ b/google/cloud/workflows/CMakeLists.txt @@ -16,9 +16,8 @@ include(GoogleCloudCppLibrary) -google_cloud_cpp_add_gapic_library( - workflows "Workflow Executions API" SERVICE_DIRS "__EMPTY__" - "executions/v1/" "v1/") +google_cloud_cpp_add_gapic_library(workflows "Workflow Executions API" + SERVICE_DIRS "executions/v1/" "v1/") if (BUILD_TESTING AND GOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS) add_executable(workflows_quickstart "quickstart/quickstart.cc") diff --git a/google/cloud/workflows/executions/v1/executions_connection.h b/google/cloud/workflows/executions/v1/executions_connection.h index 634a37b6d14a8..50e78b1c2678e 100644 --- a/google/cloud/workflows/executions/v1/executions_connection.h +++ b/google/cloud/workflows/executions/v1/executions_connection.h @@ -19,6 +19,7 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_EXECUTIONS_V1_EXECUTIONS_CONNECTION_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_EXECUTIONS_V1_EXECUTIONS_CONNECTION_H +#include "google/cloud/workflows/executions/v1/executions.pb.h" #include "google/cloud/workflows/executions/v1/executions_connection_idempotency_policy.h" #include "google/cloud/workflows/executions/v1/internal/executions_retry_traits.h" #include "google/cloud/backoff_policy.h" @@ -27,7 +28,6 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/workflows/executions/v1/executions_connection_idempotency_policy.h b/google/cloud/workflows/executions/v1/executions_connection_idempotency_policy.h index f7f186bd91a3e..43c76edc46a0a 100644 --- a/google/cloud/workflows/executions/v1/executions_connection_idempotency_policy.h +++ b/google/cloud/workflows/executions/v1/executions_connection_idempotency_policy.h @@ -19,9 +19,9 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_EXECUTIONS_V1_EXECUTIONS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_EXECUTIONS_V1_EXECUTIONS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/workflows/executions/v1/executions.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include #include namespace google { diff --git a/google/cloud/workflows/executions/v1/internal/executions_auth_decorator.cc b/google/cloud/workflows/executions/v1/internal/executions_auth_decorator.cc index 6c181364cf4ed..b2876a58ca255 100644 --- a/google/cloud/workflows/executions/v1/internal/executions_auth_decorator.cc +++ b/google/cloud/workflows/executions/v1/internal/executions_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/workflows/executions/v1/executions.proto #include "google/cloud/workflows/executions/v1/internal/executions_auth_decorator.h" -#include +#include "google/cloud/workflows/executions/v1/executions.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workflows_executions_v1_internal { @@ -75,3 +78,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace workflows_executions_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/workflows/executions/v1/internal/executions_auth_decorator.h b/google/cloud/workflows/executions/v1/internal/executions_auth_decorator.h index 50f784b3c5b96..b1a6d55fc8975 100644 --- a/google/cloud/workflows/executions/v1/internal/executions_auth_decorator.h +++ b/google/cloud/workflows/executions/v1/internal/executions_auth_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workflows_executions_v1_internal { @@ -69,4 +72,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_EXECUTIONS_V1_INTERNAL_EXECUTIONS_AUTH_DECORATOR_H diff --git a/google/cloud/workflows/executions/v1/internal/executions_logging_decorator.cc b/google/cloud/workflows/executions/v1/internal/executions_logging_decorator.cc index e4a031d4e58f2..4e5d79df986a7 100644 --- a/google/cloud/workflows/executions/v1/internal/executions_logging_decorator.cc +++ b/google/cloud/workflows/executions/v1/internal/executions_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/workflows/executions/v1/executions.proto #include "google/cloud/workflows/executions/v1/internal/executions_logging_decorator.h" +#include "google/cloud/workflows/executions/v1/executions.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workflows_executions_v1_internal { @@ -97,3 +100,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace workflows_executions_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/workflows/executions/v1/internal/executions_logging_decorator.h b/google/cloud/workflows/executions/v1/internal/executions_logging_decorator.h index f0944af790d1a..4e8404ed4f13c 100644 --- a/google/cloud/workflows/executions/v1/internal/executions_logging_decorator.h +++ b/google/cloud/workflows/executions/v1/internal/executions_logging_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workflows_executions_v1_internal { @@ -69,4 +72,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_EXECUTIONS_V1_INTERNAL_EXECUTIONS_LOGGING_DECORATOR_H diff --git a/google/cloud/workflows/executions/v1/internal/executions_metadata_decorator.cc b/google/cloud/workflows/executions/v1/internal/executions_metadata_decorator.cc index 1cef5fb085891..4e9bb408e298f 100644 --- a/google/cloud/workflows/executions/v1/internal/executions_metadata_decorator.cc +++ b/google/cloud/workflows/executions/v1/internal/executions_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/workflows/executions/v1/executions.proto #include "google/cloud/workflows/executions/v1/internal/executions_metadata_decorator.h" +#include "google/cloud/workflows/executions/v1/executions.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workflows_executions_v1_internal { @@ -101,3 +105,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace workflows_executions_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/workflows/executions/v1/internal/executions_metadata_decorator.h b/google/cloud/workflows/executions/v1/internal/executions_metadata_decorator.h index 609a0929a5895..f650a692f6119 100644 --- a/google/cloud/workflows/executions/v1/internal/executions_metadata_decorator.h +++ b/google/cloud/workflows/executions/v1/internal/executions_metadata_decorator.h @@ -26,6 +26,9 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workflows_executions_v1_internal { @@ -74,4 +77,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_EXECUTIONS_V1_INTERNAL_EXECUTIONS_METADATA_DECORATOR_H diff --git a/google/cloud/workflows/executions/v1/internal/executions_option_defaults.cc b/google/cloud/workflows/executions/v1/internal/executions_option_defaults.cc index 7e02b8bf55e84..56213adabd452 100644 --- a/google/cloud/workflows/executions/v1/internal/executions_option_defaults.cc +++ b/google/cloud/workflows/executions/v1/internal/executions_option_defaults.cc @@ -42,7 +42,7 @@ Options ExecutionsDefaultOptions(Options options) { if (!options.has()) { options.set( workflows_executions_v1::ExecutionsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/workflows/executions/v1/internal/executions_stub.cc b/google/cloud/workflows/executions/v1/internal/executions_stub.cc index 791abcbf9150f..0a28938e7f627 100644 --- a/google/cloud/workflows/executions/v1/internal/executions_stub.cc +++ b/google/cloud/workflows/executions/v1/internal/executions_stub.cc @@ -17,12 +17,15 @@ // source: google/cloud/workflows/executions/v1/executions.proto #include "google/cloud/workflows/executions/v1/internal/executions_stub.h" +#include "google/cloud/workflows/executions/v1/executions.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workflows_executions_v1_internal { @@ -86,3 +89,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace workflows_executions_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/workflows/executions/v1/internal/executions_stub.h b/google/cloud/workflows/executions/v1/internal/executions_stub.h index 7db183607a67a..41d115c8c1476 100644 --- a/google/cloud/workflows/executions/v1/internal/executions_stub.h +++ b/google/cloud/workflows/executions/v1/internal/executions_stub.h @@ -19,13 +19,16 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_EXECUTIONS_V1_INTERNAL_EXECUTIONS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_EXECUTIONS_V1_INTERNAL_EXECUTIONS_STUB_H +#include "google/cloud/workflows/executions/v1/executions.grpc.pb.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workflows_executions_v1_internal { @@ -101,4 +104,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_EXECUTIONS_V1_INTERNAL_EXECUTIONS_STUB_H diff --git a/google/cloud/workflows/executions/v1/internal/executions_stub_factory.cc b/google/cloud/workflows/executions/v1/internal/executions_stub_factory.cc index 23fc0052b9b75..95c4217c362b7 100644 --- a/google/cloud/workflows/executions/v1/internal/executions_stub_factory.cc +++ b/google/cloud/workflows/executions/v1/internal/executions_stub_factory.cc @@ -17,6 +17,7 @@ // source: google/cloud/workflows/executions/v1/executions.proto #include "google/cloud/workflows/executions/v1/internal/executions_stub_factory.h" +#include "google/cloud/workflows/executions/v1/executions.grpc.pb.h" #include "google/cloud/workflows/executions/v1/internal/executions_auth_decorator.h" #include "google/cloud/workflows/executions/v1/internal/executions_logging_decorator.h" #include "google/cloud/workflows/executions/v1/internal/executions_metadata_decorator.h" @@ -28,10 +29,12 @@ #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workflows_executions_v1_internal { @@ -68,3 +71,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace workflows_executions_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/workflows/executions/v1/internal/executions_stub_factory.h b/google/cloud/workflows/executions/v1/internal/executions_stub_factory.h index 33a0d3ad07a20..b08469c1d73b1 100644 --- a/google/cloud/workflows/executions/v1/internal/executions_stub_factory.h +++ b/google/cloud/workflows/executions/v1/internal/executions_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workflows_executions_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_EXECUTIONS_V1_INTERNAL_EXECUTIONS_STUB_FACTORY_H diff --git a/google/cloud/workflows/executions/v1/internal/executions_tracing_connection.cc b/google/cloud/workflows/executions/v1/internal/executions_tracing_connection.cc index cb4d2d10d4ded..bb2353e448c32 100644 --- a/google/cloud/workflows/executions/v1/internal/executions_tracing_connection.cc +++ b/google/cloud/workflows/executions/v1/internal/executions_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace workflows_executions_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ExecutionsTracingConnection::ExecutionsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -75,16 +73,12 @@ ExecutionsTracingConnection::CancelExecution( return internal::EndSpan(*span, child_->CancelExecution(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeExecutionsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/workflows/executions/v1/internal/executions_tracing_connection.h b/google/cloud/workflows/executions/v1/internal/executions_tracing_connection.h index a83504308034c..7b737eeb7d874 100644 --- a/google/cloud/workflows/executions/v1/internal/executions_tracing_connection.h +++ b/google/cloud/workflows/executions/v1/internal/executions_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace workflows_executions_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ExecutionsTracingConnection : public workflows_executions_v1::ExecutionsConnection { public: @@ -60,8 +58,6 @@ class ExecutionsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/workflows/executions/v1/internal/executions_tracing_stub.cc b/google/cloud/workflows/executions/v1/internal/executions_tracing_stub.cc index 93a22cff3b7b3..64c76cf47ace4 100644 --- a/google/cloud/workflows/executions/v1/internal/executions_tracing_stub.cc +++ b/google/cloud/workflows/executions/v1/internal/executions_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workflows_executions_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - ExecutionsTracingStub::ExecutionsTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -84,18 +85,14 @@ ExecutionsTracingStub::CancelExecution( child_->CancelExecution(context, options, request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeExecutionsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace workflows_executions_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/workflows/executions/v1/internal/executions_tracing_stub.h b/google/cloud/workflows/executions/v1/internal/executions_tracing_stub.h index da82747917da8..e9316c390086d 100644 --- a/google/cloud/workflows/executions/v1/internal/executions_tracing_stub.h +++ b/google/cloud/workflows/executions/v1/internal/executions_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workflows_executions_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class ExecutionsTracingStub : public ExecutionsStub { public: ~ExecutionsTracingStub() override = default; @@ -65,8 +66,6 @@ class ExecutionsTracingStub : public ExecutionsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -81,4 +80,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_EXECUTIONS_V1_INTERNAL_EXECUTIONS_TRACING_STUB_H diff --git a/google/cloud/workflows/executions_client.h b/google/cloud/workflows/executions_client.h deleted file mode 100644 index bcb44336918a7..0000000000000 --- a/google/cloud/workflows/executions_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/workflows/executions/v1/executions.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_EXECUTIONS_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_EXECUTIONS_CLIENT_H - -#include "google/cloud/workflows/executions/v1/executions_client.h" -#include "google/cloud/workflows/executions_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in workflows_executions_v1 instead of the aliases defined -/// in this namespace. -namespace workflows { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use workflows_executions_v1::ExecutionsClient directly. -using ::google::cloud::workflows_executions_v1::ExecutionsClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace workflows -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_EXECUTIONS_CLIENT_H diff --git a/google/cloud/workflows/executions_connection.h b/google/cloud/workflows/executions_connection.h deleted file mode 100644 index af08d6515e0a2..0000000000000 --- a/google/cloud/workflows/executions_connection.h +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/workflows/executions/v1/executions.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_EXECUTIONS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_EXECUTIONS_CONNECTION_H - -#include "google/cloud/workflows/executions/v1/executions_connection.h" -#include "google/cloud/workflows/executions_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace workflows { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use workflows_executions_v1::MakeExecutionsConnection directly. -using ::google::cloud::workflows_executions_v1::MakeExecutionsConnection; - -/// @deprecated Use workflows_executions_v1::ExecutionsConnection directly. -using ::google::cloud::workflows_executions_v1::ExecutionsConnection; - -/// @deprecated Use -/// workflows_executions_v1::ExecutionsLimitedErrorCountRetryPolicy directly. -using ::google::cloud::workflows_executions_v1:: - ExecutionsLimitedErrorCountRetryPolicy; - -/// @deprecated Use workflows_executions_v1::ExecutionsLimitedTimeRetryPolicy -/// directly. -using ::google::cloud::workflows_executions_v1:: - ExecutionsLimitedTimeRetryPolicy; - -/// @deprecated Use workflows_executions_v1::ExecutionsRetryPolicy directly. -using ::google::cloud::workflows_executions_v1::ExecutionsRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace workflows -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_EXECUTIONS_CONNECTION_H diff --git a/google/cloud/workflows/executions_connection_idempotency_policy.h b/google/cloud/workflows/executions_connection_idempotency_policy.h deleted file mode 100644 index 038aa751c8e29..0000000000000 --- a/google/cloud/workflows/executions_connection_idempotency_policy.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/workflows/executions/v1/executions.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_EXECUTIONS_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_EXECUTIONS_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/workflows/executions/v1/executions_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace workflows { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// workflows_executions_v1::MakeDefaultExecutionsConnectionIdempotencyPolicy -/// directly. -using ::google::cloud::workflows_executions_v1:: - MakeDefaultExecutionsConnectionIdempotencyPolicy; - -/// @deprecated Use -/// workflows_executions_v1::ExecutionsConnectionIdempotencyPolicy directly. -using ::google::cloud::workflows_executions_v1:: - ExecutionsConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace workflows -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_EXECUTIONS_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/workflows/executions_options.h b/google/cloud/workflows/executions_options.h deleted file mode 100644 index e49ebff4ded05..0000000000000 --- a/google/cloud/workflows/executions_options.h +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/workflows/executions/v1/executions.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_EXECUTIONS_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_EXECUTIONS_OPTIONS_H - -#include "google/cloud/workflows/executions/v1/executions_options.h" -#include "google/cloud/workflows/executions_connection.h" -#include "google/cloud/workflows/executions_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace workflows { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use workflows_executions_v1::ExecutionsBackoffPolicyOption -/// directly. -using ::google::cloud::workflows_executions_v1::ExecutionsBackoffPolicyOption; - -/// @deprecated Use -/// workflows_executions_v1::ExecutionsConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::workflows_executions_v1:: - ExecutionsConnectionIdempotencyPolicyOption; - -/// @deprecated Use workflows_executions_v1::ExecutionsPolicyOptionList -/// directly. -using ::google::cloud::workflows_executions_v1::ExecutionsPolicyOptionList; - -/// @deprecated Use workflows_executions_v1::ExecutionsRetryPolicyOption -/// directly. -using ::google::cloud::workflows_executions_v1::ExecutionsRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace workflows -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_EXECUTIONS_OPTIONS_H diff --git a/google/cloud/workflows/mocks/mock_executions_connection.h b/google/cloud/workflows/mocks/mock_executions_connection.h deleted file mode 100644 index b8f701a60acf8..0000000000000 --- a/google/cloud/workflows/mocks/mock_executions_connection.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/workflows/executions/v1/executions.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_MOCKS_MOCK_EXECUTIONS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_MOCKS_MOCK_EXECUTIONS_CONNECTION_H - -#include "google/cloud/workflows/executions/v1/mocks/mock_executions_connection.h" -#include "google/cloud/workflows/executions_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in workflows_executions_v1_mocks instead of the aliases -/// defined in this namespace. -namespace workflows_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use workflows_executions_v1_mocks::MockExecutionsConnection -/// directly. -using ::google::cloud::workflows_executions_v1_mocks::MockExecutionsConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace workflows_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_MOCKS_MOCK_EXECUTIONS_CONNECTION_H diff --git a/google/cloud/workflows/mocks/mock_workflows_connection.h b/google/cloud/workflows/mocks/mock_workflows_connection.h deleted file mode 100644 index d6a24aeed5642..0000000000000 --- a/google/cloud/workflows/mocks/mock_workflows_connection.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/workflows/v1/workflows.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_MOCKS_MOCK_WORKFLOWS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_MOCKS_MOCK_WORKFLOWS_CONNECTION_H - -#include "google/cloud/workflows/v1/mocks/mock_workflows_connection.h" -#include "google/cloud/workflows/workflows_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in workflows_v1_mocks instead of the aliases -/// defined in this namespace. -namespace workflows_mocks { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use workflows_v1_mocks::MockWorkflowsConnection directly. -using ::google::cloud::workflows_v1_mocks::MockWorkflowsConnection; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace workflows_mocks -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_MOCKS_MOCK_WORKFLOWS_CONNECTION_H diff --git a/google/cloud/workflows/quickstart/.bazelrc b/google/cloud/workflows/quickstart/.bazelrc index f8f4bb3e07a87..a0cd2dae58f1b 100644 --- a/google/cloud/workflows/quickstart/.bazelrc +++ b/google/cloud/workflows/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/workflows/quickstart/CMakeLists.txt b/google/cloud/workflows/quickstart/CMakeLists.txt index ca93a80d3eed1..3fa5b2a9efd1f 100644 --- a/google/cloud/workflows/quickstart/CMakeLists.txt +++ b/google/cloud/workflows/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Workflow Executions API C++ client library from # a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-workflows-quickstart CXX) find_package(google_cloud_cpp_workflows REQUIRED) diff --git a/google/cloud/workflows/v1/internal/workflows_auth_decorator.cc b/google/cloud/workflows/v1/internal/workflows_auth_decorator.cc index 72f872b1989b7..26ecc7946991a 100644 --- a/google/cloud/workflows/v1/internal/workflows_auth_decorator.cc +++ b/google/cloud/workflows/v1/internal/workflows_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/workflows/v1/workflows.proto #include "google/cloud/workflows/v1/internal/workflows_auth_decorator.h" -#include +#include "google/cloud/workflows/v1/workflows.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workflows_v1_internal { @@ -223,3 +226,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace workflows_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/workflows/v1/internal/workflows_auth_decorator.h b/google/cloud/workflows/v1/internal/workflows_auth_decorator.h index 43146227c08bc..5bfd53d24b84a 100644 --- a/google/cloud/workflows/v1/internal/workflows_auth_decorator.h +++ b/google/cloud/workflows/v1/internal/workflows_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/workflows/v1/internal/workflows_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workflows_v1_internal { @@ -132,4 +135,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_V1_INTERNAL_WORKFLOWS_AUTH_DECORATOR_H diff --git a/google/cloud/workflows/v1/internal/workflows_connection_impl.h b/google/cloud/workflows/v1/internal/workflows_connection_impl.h index a60b4d6815dfb..3cb2ab9922531 100644 --- a/google/cloud/workflows/v1/internal/workflows_connection_impl.h +++ b/google/cloud/workflows/v1/internal/workflows_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/workflows/v1/internal/workflows_logging_decorator.cc b/google/cloud/workflows/v1/internal/workflows_logging_decorator.cc index 1af33fa54b11d..149068705c6f0 100644 --- a/google/cloud/workflows/v1/internal/workflows_logging_decorator.cc +++ b/google/cloud/workflows/v1/internal/workflows_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/workflows/v1/workflows.proto #include "google/cloud/workflows/v1/internal/workflows_logging_decorator.h" +#include "google/cloud/workflows/v1/workflows.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workflows_v1_internal { @@ -261,3 +264,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace workflows_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/workflows/v1/internal/workflows_logging_decorator.h b/google/cloud/workflows/v1/internal/workflows_logging_decorator.h index 04ddf2deb502d..1b0c701ff3765 100644 --- a/google/cloud/workflows/v1/internal/workflows_logging_decorator.h +++ b/google/cloud/workflows/v1/internal/workflows_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/workflows/v1/internal/workflows_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workflows_v1_internal { @@ -132,4 +135,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_V1_INTERNAL_WORKFLOWS_LOGGING_DECORATOR_H diff --git a/google/cloud/workflows/v1/internal/workflows_metadata_decorator.cc b/google/cloud/workflows/v1/internal/workflows_metadata_decorator.cc index da9e975dac1e8..1cc4d5fcc0c51 100644 --- a/google/cloud/workflows/v1/internal/workflows_metadata_decorator.cc +++ b/google/cloud/workflows/v1/internal/workflows_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/workflows/v1/workflows.proto #include "google/cloud/workflows/v1/internal/workflows_metadata_decorator.h" +#include "google/cloud/workflows/v1/workflows.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workflows_v1_internal { @@ -214,3 +218,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace workflows_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/workflows/v1/internal/workflows_metadata_decorator.h b/google/cloud/workflows/v1/internal/workflows_metadata_decorator.h index 77f22bd16eef8..7be99e1e810e9 100644 --- a/google/cloud/workflows/v1/internal/workflows_metadata_decorator.h +++ b/google/cloud/workflows/v1/internal/workflows_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/workflows/v1/internal/workflows_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workflows_v1_internal { @@ -137,4 +140,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_V1_INTERNAL_WORKFLOWS_METADATA_DECORATOR_H diff --git a/google/cloud/workflows/v1/internal/workflows_option_defaults.cc b/google/cloud/workflows/v1/internal/workflows_option_defaults.cc index c13280189a676..771c28d15f78a 100644 --- a/google/cloud/workflows/v1/internal/workflows_option_defaults.cc +++ b/google/cloud/workflows/v1/internal/workflows_option_defaults.cc @@ -40,7 +40,7 @@ Options WorkflowsDefaultOptions(Options options) { options = internal::PopulateGrpcOptions(std::move(options)); if (!options.has()) { options.set( - workflows_v1::WorkflowsLimitedTimeRetryPolicy(std::chrono::minutes(30)) + workflows_v1::WorkflowsLimitedTimeRetryPolicy(std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/workflows/v1/internal/workflows_stub.cc b/google/cloud/workflows/v1/internal/workflows_stub.cc index 92188010f5d63..daf0e48f086d1 100644 --- a/google/cloud/workflows/v1/internal/workflows_stub.cc +++ b/google/cloud/workflows/v1/internal/workflows_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/workflows/v1/workflows.proto #include "google/cloud/workflows/v1/internal/workflows_stub.h" +#include "google/cloud/workflows/v1/workflows.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workflows_v1_internal { @@ -254,3 +257,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace workflows_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/workflows/v1/internal/workflows_stub.h b/google/cloud/workflows/v1/internal/workflows_stub.h index 5b52ec5d3cd3d..17e6362bbaa55 100644 --- a/google/cloud/workflows/v1/internal/workflows_stub.h +++ b/google/cloud/workflows/v1/internal/workflows_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_V1_INTERNAL_WORKFLOWS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_V1_INTERNAL_WORKFLOWS_STUB_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/workflows/v1/workflows.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workflows_v1_internal { @@ -228,4 +231,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_V1_INTERNAL_WORKFLOWS_STUB_H diff --git a/google/cloud/workflows/v1/internal/workflows_stub_factory.cc b/google/cloud/workflows/v1/internal/workflows_stub_factory.cc index 18bc1b778b7ed..16d104c7f0c2d 100644 --- a/google/cloud/workflows/v1/internal/workflows_stub_factory.cc +++ b/google/cloud/workflows/v1/internal/workflows_stub_factory.cc @@ -17,23 +17,26 @@ // source: google/cloud/workflows/v1/workflows.proto #include "google/cloud/workflows/v1/internal/workflows_stub_factory.h" +#include "google/cloud/location/locations.grpc.pb.h" #include "google/cloud/workflows/v1/internal/workflows_auth_decorator.h" #include "google/cloud/workflows/v1/internal/workflows_logging_decorator.h" #include "google/cloud/workflows/v1/internal/workflows_metadata_decorator.h" #include "google/cloud/workflows/v1/internal/workflows_stub.h" #include "google/cloud/workflows/v1/internal/workflows_tracing_stub.h" +#include "google/cloud/workflows/v1/workflows.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workflows_v1_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace workflows_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/workflows/v1/internal/workflows_stub_factory.h b/google/cloud/workflows/v1/internal/workflows_stub_factory.h index 15ca8c3024348..7a477819acda2 100644 --- a/google/cloud/workflows/v1/internal/workflows_stub_factory.h +++ b/google/cloud/workflows/v1/internal/workflows_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workflows_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_V1_INTERNAL_WORKFLOWS_STUB_FACTORY_H diff --git a/google/cloud/workflows/v1/internal/workflows_tracing_connection.cc b/google/cloud/workflows/v1/internal/workflows_tracing_connection.cc index 5b3d87458df14..28b733f151710 100644 --- a/google/cloud/workflows/v1/internal/workflows_tracing_connection.cc +++ b/google/cloud/workflows/v1/internal/workflows_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace workflows_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - WorkflowsTracingConnection::WorkflowsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -199,16 +197,12 @@ Status WorkflowsTracingConnection::DeleteOperation( return internal::EndSpan(*span, child_->DeleteOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeWorkflowsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/workflows/v1/internal/workflows_tracing_connection.h b/google/cloud/workflows/v1/internal/workflows_tracing_connection.h index 325b589c97c15..e356559273eb1 100644 --- a/google/cloud/workflows/v1/internal/workflows_tracing_connection.h +++ b/google/cloud/workflows/v1/internal/workflows_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace workflows_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class WorkflowsTracingConnection : public workflows_v1::WorkflowsConnection { public: ~WorkflowsTracingConnection() override = default; @@ -104,8 +102,6 @@ class WorkflowsTracingConnection : public workflows_v1::WorkflowsConnection { std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/workflows/v1/internal/workflows_tracing_stub.cc b/google/cloud/workflows/v1/internal/workflows_tracing_stub.cc index 0965f99fa0dd1..6da8035ccdb88 100644 --- a/google/cloud/workflows/v1/internal/workflows_tracing_stub.cc +++ b/google/cloud/workflows/v1/internal/workflows_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workflows_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - WorkflowsTracingStub::WorkflowsTracingStub(std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -230,18 +231,14 @@ future WorkflowsTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeWorkflowsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace workflows_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/workflows/v1/internal/workflows_tracing_stub.h b/google/cloud/workflows/v1/internal/workflows_tracing_stub.h index 33fd816da5fd1..2d3a0b8cfd1a8 100644 --- a/google/cloud/workflows/v1/internal/workflows_tracing_stub.h +++ b/google/cloud/workflows/v1/internal/workflows_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workflows_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class WorkflowsTracingStub : public WorkflowsStub { public: ~WorkflowsTracingStub() override = default; @@ -127,8 +128,6 @@ class WorkflowsTracingStub : public WorkflowsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -143,4 +142,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_V1_INTERNAL_WORKFLOWS_TRACING_STUB_H diff --git a/google/cloud/workflows/v1/workflows_client.h b/google/cloud/workflows/v1/workflows_client.h index af9b14ba62349..b618bf3e932f9 100644 --- a/google/cloud/workflows/v1/workflows_client.h +++ b/google/cloud/workflows/v1/workflows_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/workflows/v1/workflows_connection.h b/google/cloud/workflows/v1/workflows_connection.h index 5744a4a0a78b9..5bef570d7dd96 100644 --- a/google/cloud/workflows/v1/workflows_connection.h +++ b/google/cloud/workflows/v1/workflows_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_V1_WORKFLOWS_CONNECTION_H #include "google/cloud/workflows/v1/internal/workflows_retry_traits.h" +#include "google/cloud/workflows/v1/workflows.pb.h" #include "google/cloud/workflows/v1/workflows_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/workflows/v1/workflows_connection_idempotency_policy.h b/google/cloud/workflows/v1/workflows_connection_idempotency_policy.h index e9fe229c99f3d..0d1500688a6d5 100644 --- a/google/cloud/workflows/v1/workflows_connection_idempotency_policy.h +++ b/google/cloud/workflows/v1/workflows_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_V1_WORKFLOWS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_V1_WORKFLOWS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/location/locations.grpc.pb.h" +#include "google/cloud/workflows/v1/workflows.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/workflows/workflows_client.h b/google/cloud/workflows/workflows_client.h deleted file mode 100644 index 0abe1d7d1900c..0000000000000 --- a/google/cloud/workflows/workflows_client.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/workflows/v1/workflows.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_WORKFLOWS_CLIENT_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_WORKFLOWS_CLIENT_H - -#include "google/cloud/workflows/v1/workflows_client.h" -#include "google/cloud/workflows/workflows_connection.h" - -namespace google { -namespace cloud { -/// @deprecated This namespace exists for backwards compatibility. Use the -/// types defined in workflows_v1 instead of the aliases defined in -/// this namespace. -namespace workflows { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use workflows_v1::WorkflowsClient directly. -using ::google::cloud::workflows_v1::WorkflowsClient; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace workflows -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_WORKFLOWS_CLIENT_H diff --git a/google/cloud/workflows/workflows_connection.h b/google/cloud/workflows/workflows_connection.h deleted file mode 100644 index a546d50c070fd..0000000000000 --- a/google/cloud/workflows/workflows_connection.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/workflows/v1/workflows.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_WORKFLOWS_CONNECTION_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_WORKFLOWS_CONNECTION_H - -#include "google/cloud/workflows/v1/workflows_connection.h" -#include "google/cloud/workflows/workflows_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace workflows { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use workflows_v1::MakeWorkflowsConnection directly. -using ::google::cloud::workflows_v1::MakeWorkflowsConnection; - -/// @deprecated Use workflows_v1::WorkflowsConnection directly. -using ::google::cloud::workflows_v1::WorkflowsConnection; - -/// @deprecated Use workflows_v1::WorkflowsLimitedErrorCountRetryPolicy -/// directly. -using ::google::cloud::workflows_v1::WorkflowsLimitedErrorCountRetryPolicy; - -/// @deprecated Use workflows_v1::WorkflowsLimitedTimeRetryPolicy directly. -using ::google::cloud::workflows_v1::WorkflowsLimitedTimeRetryPolicy; - -/// @deprecated Use workflows_v1::WorkflowsRetryPolicy directly. -using ::google::cloud::workflows_v1::WorkflowsRetryPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace workflows -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_WORKFLOWS_CONNECTION_H diff --git a/google/cloud/workflows/workflows_connection_idempotency_policy.h b/google/cloud/workflows/workflows_connection_idempotency_policy.h deleted file mode 100644 index f6ad276822c14..0000000000000 --- a/google/cloud/workflows/workflows_connection_idempotency_policy.h +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/workflows/v1/workflows.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_WORKFLOWS_CONNECTION_IDEMPOTENCY_POLICY_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_WORKFLOWS_CONNECTION_IDEMPOTENCY_POLICY_H - -#include "google/cloud/workflows/v1/workflows_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace workflows { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use -/// workflows_v1::MakeDefaultWorkflowsConnectionIdempotencyPolicy directly. -using ::google::cloud::workflows_v1:: - MakeDefaultWorkflowsConnectionIdempotencyPolicy; - -/// @deprecated Use workflows_v1::WorkflowsConnectionIdempotencyPolicy directly. -using ::google::cloud::workflows_v1::WorkflowsConnectionIdempotencyPolicy; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace workflows -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_WORKFLOWS_CONNECTION_IDEMPOTENCY_POLICY_H diff --git a/google/cloud/workflows/workflows_options.h b/google/cloud/workflows/workflows_options.h deleted file mode 100644 index 3e5267b502b97..0000000000000 --- a/google/cloud/workflows/workflows_options.h +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Generated by the Codegen C++ plugin. -// If you make any local changes, they will be lost. -// source: google/cloud/workflows/v1/workflows.proto - -#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_WORKFLOWS_OPTIONS_H -#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_WORKFLOWS_OPTIONS_H - -#include "google/cloud/workflows/v1/workflows_options.h" -#include "google/cloud/workflows/workflows_connection.h" -#include "google/cloud/workflows/workflows_connection_idempotency_policy.h" - -namespace google { -namespace cloud { -namespace workflows { -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN - -/// @deprecated Use workflows_v1::WorkflowsPollingPolicyOption directly. -using ::google::cloud::workflows_v1::WorkflowsPollingPolicyOption; - -/// @deprecated Use workflows_v1::WorkflowsBackoffPolicyOption directly. -using ::google::cloud::workflows_v1::WorkflowsBackoffPolicyOption; - -/// @deprecated Use workflows_v1::WorkflowsConnectionIdempotencyPolicyOption -/// directly. -using ::google::cloud::workflows_v1::WorkflowsConnectionIdempotencyPolicyOption; - -/// @deprecated Use workflows_v1::WorkflowsPolicyOptionList directly. -using ::google::cloud::workflows_v1::WorkflowsPolicyOptionList; - -/// @deprecated Use workflows_v1::WorkflowsRetryPolicyOption directly. -using ::google::cloud::workflows_v1::WorkflowsRetryPolicyOption; - -GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END -} // namespace workflows -} // namespace cloud -} // namespace google - -#endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKFLOWS_WORKFLOWS_OPTIONS_H diff --git a/google/cloud/workstations/BUILD.bazel b/google/cloud/workstations/BUILD.bazel index 92812cdbf3b8d..b7b5a95430f3f 100644 --- a/google/cloud/workstations/BUILD.bazel +++ b/google/cloud/workstations/BUILD.bazel @@ -21,7 +21,7 @@ licenses(["notice"]) # Apache 2.0 service_dirs = ["v1/"] googleapis_deps = [ - "@com_google_googleapis//google/cloud/workstations/v1:workstations_cc_grpc", + "@googleapis//google/cloud/workstations/v1:workstations_cc_grpc", ] cc_gapic_library( diff --git a/google/cloud/workstations/quickstart/.bazelrc b/google/cloud/workstations/quickstart/.bazelrc index 6777c6b4c95de..ec27511a60add 100644 --- a/google/cloud/workstations/quickstart/.bazelrc +++ b/google/cloud/workstations/quickstart/.bazelrc @@ -15,14 +15,14 @@ # Use host-OS-specific config lines from bazelrc files. build --enable_platform_specific_config=true -# The project requires C++ >= 14. By default Bazel adds `-std=c++0x` which -# disables C++14 features, even if the compilers defaults to C++ >= 14 -build:linux --cxxopt=-std=c++14 -build:macos --cxxopt=-std=c++14 -# Protobuf and gRPC require (or soon will require) C++14 to compile the "host" -# targets, such as protoc and the grpc plugin. -build:linux --host_cxxopt=-std=c++14 -build:macos --host_cxxopt=-std=c++14 + + +build:linux --cxxopt=-std=c++17 +build:macos --cxxopt=-std=c++17 + + +build:linux --host_cxxopt=-std=c++17 +build:macos --host_cxxopt=-std=c++17 # Do not create the convenience links. They are inconvenient when the build # runs inside a docker image or if one builds a quickstart and then builds @@ -31,3 +31,4 @@ build --experimental_convenience_symlinks=ignore #Our quickstarts do not yet support bzlmod build --noenable_bzlmod +build --enable_workspace diff --git a/google/cloud/workstations/quickstart/CMakeLists.txt b/google/cloud/workstations/quickstart/CMakeLists.txt index ae56dad9a5c2b..bd41cd34ee7c8 100644 --- a/google/cloud/workstations/quickstart/CMakeLists.txt +++ b/google/cloud/workstations/quickstart/CMakeLists.txt @@ -15,7 +15,7 @@ # This file shows how to use the Cloud Workstations API C++ client library from # a larger CMake project. -cmake_minimum_required(VERSION 3.10...3.24) +cmake_minimum_required(VERSION 3.22...3.31) project(google-cloud-cpp-workstations-quickstart CXX) find_package(google_cloud_cpp_workstations REQUIRED) diff --git a/google/cloud/workstations/v1/internal/workstations_auth_decorator.cc b/google/cloud/workstations/v1/internal/workstations_auth_decorator.cc index 130ae233577a1..0a034a57781bc 100644 --- a/google/cloud/workstations/v1/internal/workstations_auth_decorator.cc +++ b/google/cloud/workstations/v1/internal/workstations_auth_decorator.cc @@ -17,10 +17,13 @@ // source: google/cloud/workstations/v1/workstations.proto #include "google/cloud/workstations/v1/internal/workstations_auth_decorator.h" -#include +#include "google/cloud/workstations/v1/workstations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workstations_v1_internal { @@ -543,3 +546,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace workstations_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/workstations/v1/internal/workstations_auth_decorator.h b/google/cloud/workstations/v1/internal/workstations_auth_decorator.h index d9775402cd1a5..e31deb49ba67e 100644 --- a/google/cloud/workstations/v1/internal/workstations_auth_decorator.h +++ b/google/cloud/workstations/v1/internal/workstations_auth_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/workstations/v1/internal/workstations_stub.h" #include "google/cloud/internal/unified_grpc_credentials.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workstations_v1_internal { @@ -278,4 +281,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKSTATIONS_V1_INTERNAL_WORKSTATIONS_AUTH_DECORATOR_H diff --git a/google/cloud/workstations/v1/internal/workstations_connection_impl.h b/google/cloud/workstations/v1/internal/workstations_connection_impl.h index bcab4455fb5bc..a0eac1286aa15 100644 --- a/google/cloud/workstations/v1/internal/workstations_connection_impl.h +++ b/google/cloud/workstations/v1/internal/workstations_connection_impl.h @@ -32,7 +32,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/workstations/v1/internal/workstations_logging_decorator.cc b/google/cloud/workstations/v1/internal/workstations_logging_decorator.cc index fe7fa3303ee87..70eb8672f5f22 100644 --- a/google/cloud/workstations/v1/internal/workstations_logging_decorator.cc +++ b/google/cloud/workstations/v1/internal/workstations_logging_decorator.cc @@ -17,14 +17,17 @@ // source: google/cloud/workstations/v1/workstations.proto #include "google/cloud/workstations/v1/internal/workstations_logging_decorator.h" +#include "google/cloud/workstations/v1/workstations.grpc.pb.h" #include "google/cloud/internal/log_wrapper.h" #include "google/cloud/status_or.h" -#include #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workstations_v1_internal { @@ -646,3 +649,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace workstations_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/workstations/v1/internal/workstations_logging_decorator.h b/google/cloud/workstations/v1/internal/workstations_logging_decorator.h index d601d33c4d93a..809c7a46e6382 100644 --- a/google/cloud/workstations/v1/internal/workstations_logging_decorator.h +++ b/google/cloud/workstations/v1/internal/workstations_logging_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/workstations/v1/internal/workstations_stub.h" #include "google/cloud/tracing_options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workstations_v1_internal { @@ -278,4 +281,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKSTATIONS_V1_INTERNAL_WORKSTATIONS_LOGGING_DECORATOR_H diff --git a/google/cloud/workstations/v1/internal/workstations_metadata_decorator.cc b/google/cloud/workstations/v1/internal/workstations_metadata_decorator.cc index 577cc13353044..81215faff5045 100644 --- a/google/cloud/workstations/v1/internal/workstations_metadata_decorator.cc +++ b/google/cloud/workstations/v1/internal/workstations_metadata_decorator.cc @@ -17,17 +17,21 @@ // source: google/cloud/workstations/v1/workstations.proto #include "google/cloud/workstations/v1/internal/workstations_metadata_decorator.h" +#include "google/cloud/workstations/v1/workstations.grpc.pb.h" #include "google/cloud/grpc_options.h" -#include "google/cloud/internal/absl_str_cat_quiet.h" #include "google/cloud/internal/api_client_header.h" #include "google/cloud/internal/url_encode.h" #include "google/cloud/status_or.h" -#include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workstations_v1_internal { @@ -485,3 +489,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace workstations_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/workstations/v1/internal/workstations_metadata_decorator.h b/google/cloud/workstations/v1/internal/workstations_metadata_decorator.h index 0bec415e3e417..fe15e41e7bcf8 100644 --- a/google/cloud/workstations/v1/internal/workstations_metadata_decorator.h +++ b/google/cloud/workstations/v1/internal/workstations_metadata_decorator.h @@ -22,11 +22,14 @@ #include "google/cloud/workstations/v1/internal/workstations_stub.h" #include "google/cloud/options.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workstations_v1_internal { @@ -283,4 +286,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKSTATIONS_V1_INTERNAL_WORKSTATIONS_METADATA_DECORATOR_H diff --git a/google/cloud/workstations/v1/internal/workstations_option_defaults.cc b/google/cloud/workstations/v1/internal/workstations_option_defaults.cc index 9ef4fe79cffcc..b0a75dc5ff948 100644 --- a/google/cloud/workstations/v1/internal/workstations_option_defaults.cc +++ b/google/cloud/workstations/v1/internal/workstations_option_defaults.cc @@ -41,7 +41,7 @@ Options WorkstationsDefaultOptions(Options options) { if (!options.has()) { options.set( workstations_v1::WorkstationsLimitedTimeRetryPolicy( - std::chrono::minutes(30)) + std::chrono::minutes(10)) .clone()); } if (!options.has()) { diff --git a/google/cloud/workstations/v1/internal/workstations_stub.cc b/google/cloud/workstations/v1/internal/workstations_stub.cc index c99b1da839ea1..32dcbb7f866bf 100644 --- a/google/cloud/workstations/v1/internal/workstations_stub.cc +++ b/google/cloud/workstations/v1/internal/workstations_stub.cc @@ -17,13 +17,16 @@ // source: google/cloud/workstations/v1/workstations.proto #include "google/cloud/workstations/v1/internal/workstations_stub.h" +#include "google/cloud/workstations/v1/workstations.grpc.pb.h" #include "google/cloud/grpc_error_delegate.h" #include "google/cloud/status_or.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workstations_v1_internal { @@ -636,3 +639,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace workstations_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/workstations/v1/internal/workstations_stub.h b/google/cloud/workstations/v1/internal/workstations_stub.h index eb598f16277f0..93c35ed6b9afa 100644 --- a/google/cloud/workstations/v1/internal/workstations_stub.h +++ b/google/cloud/workstations/v1/internal/workstations_stub.h @@ -19,17 +19,20 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKSTATIONS_V1_INTERNAL_WORKSTATIONS_STUB_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKSTATIONS_V1_INTERNAL_WORKSTATIONS_STUB_H +#include "google/cloud/workstations/v1/workstations.grpc.pb.h" #include "google/cloud/completion_queue.h" #include "google/cloud/future.h" #include "google/cloud/options.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workstations_v1_internal { @@ -535,4 +538,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKSTATIONS_V1_INTERNAL_WORKSTATIONS_STUB_H diff --git a/google/cloud/workstations/v1/internal/workstations_stub_factory.cc b/google/cloud/workstations/v1/internal/workstations_stub_factory.cc index f0ef4131e6dbe..8d2181bede69d 100644 --- a/google/cloud/workstations/v1/internal/workstations_stub_factory.cc +++ b/google/cloud/workstations/v1/internal/workstations_stub_factory.cc @@ -22,18 +22,21 @@ #include "google/cloud/workstations/v1/internal/workstations_metadata_decorator.h" #include "google/cloud/workstations/v1/internal/workstations_stub.h" #include "google/cloud/workstations/v1/internal/workstations_tracing_stub.h" +#include "google/cloud/workstations/v1/workstations.grpc.pb.h" #include "google/cloud/common_options.h" #include "google/cloud/grpc_options.h" #include "google/cloud/internal/algorithm.h" #include "google/cloud/internal/opentelemetry.h" #include "google/cloud/log.h" #include "google/cloud/options.h" -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workstations_v1_internal { @@ -73,3 +76,5 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace workstations_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/workstations/v1/internal/workstations_stub_factory.h b/google/cloud/workstations/v1/internal/workstations_stub_factory.h index 04d4952070a6c..691b83e20a3c3 100644 --- a/google/cloud/workstations/v1/internal/workstations_stub_factory.h +++ b/google/cloud/workstations/v1/internal/workstations_stub_factory.h @@ -25,6 +25,9 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workstations_v1_internal { @@ -39,4 +42,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKSTATIONS_V1_INTERNAL_WORKSTATIONS_STUB_FACTORY_H diff --git a/google/cloud/workstations/v1/internal/workstations_tracing_connection.cc b/google/cloud/workstations/v1/internal/workstations_tracing_connection.cc index 57189684bc4c2..110a501e40933 100644 --- a/google/cloud/workstations/v1/internal/workstations_tracing_connection.cc +++ b/google/cloud/workstations/v1/internal/workstations_tracing_connection.cc @@ -27,8 +27,6 @@ namespace cloud { namespace workstations_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - WorkstationsTracingConnection::WorkstationsTracingConnection( std::shared_ptr child) : child_(std::move(child)) {} @@ -541,16 +539,12 @@ Status WorkstationsTracingConnection::CancelOperation( return internal::EndSpan(*span, child_->CancelOperation(request)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeWorkstationsTracingConnection( std::shared_ptr conn) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY if (internal::TracingEnabled(conn->options())) { conn = std::make_shared(std::move(conn)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return conn; } diff --git a/google/cloud/workstations/v1/internal/workstations_tracing_connection.h b/google/cloud/workstations/v1/internal/workstations_tracing_connection.h index d66c537e5bc53..ad8b4a6be96af 100644 --- a/google/cloud/workstations/v1/internal/workstations_tracing_connection.h +++ b/google/cloud/workstations/v1/internal/workstations_tracing_connection.h @@ -28,8 +28,6 @@ namespace cloud { namespace workstations_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class WorkstationsTracingConnection : public workstations_v1::WorkstationsConnection { public: @@ -256,8 +254,6 @@ class WorkstationsTracingConnection std::shared_ptr child_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Conditionally applies the tracing decorator to the given connection. * diff --git a/google/cloud/workstations/v1/internal/workstations_tracing_stub.cc b/google/cloud/workstations/v1/internal/workstations_tracing_stub.cc index 9af897260429a..226ff2d337481 100644 --- a/google/cloud/workstations/v1/internal/workstations_tracing_stub.cc +++ b/google/cloud/workstations/v1/internal/workstations_tracing_stub.cc @@ -21,13 +21,14 @@ #include #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workstations_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - WorkstationsTracingStub::WorkstationsTracingStub( std::shared_ptr child) : child_(std::move(child)), propagator_(internal::MakePropagator()) {} @@ -574,18 +575,14 @@ future WorkstationsTracingStub::AsyncCancelOperation( return internal::EndSpan(std::move(context), std::move(span), std::move(f)); } -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - std::shared_ptr MakeWorkstationsTracingStub( std::shared_ptr stub) { -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY return std::make_shared(std::move(stub)); -#else - return stub; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY } GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace workstations_v1_internal } // namespace cloud } // namespace google + +#include "google/cloud/ports_undef.inc" diff --git a/google/cloud/workstations/v1/internal/workstations_tracing_stub.h b/google/cloud/workstations/v1/internal/workstations_tracing_stub.h index 40a27f78db463..400e1f2adbe94 100644 --- a/google/cloud/workstations/v1/internal/workstations_tracing_stub.h +++ b/google/cloud/workstations/v1/internal/workstations_tracing_stub.h @@ -25,13 +25,14 @@ #include "google/cloud/version.h" #include +// Must be included last. +#include "google/cloud/ports_def.inc" + namespace google { namespace cloud { namespace workstations_v1_internal { GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN -#ifdef GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - class WorkstationsTracingStub : public WorkstationsStub { public: ~WorkstationsTracingStub() override = default; @@ -273,8 +274,6 @@ class WorkstationsTracingStub : public WorkstationsStub { propagator_; }; -#endif // GOOGLE_CLOUD_CPP_HAVE_OPENTELEMETRY - /** * Applies the tracing decorator to the given stub. * @@ -289,4 +288,6 @@ GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END } // namespace cloud } // namespace google +#include "google/cloud/ports_undef.inc" + #endif // GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKSTATIONS_V1_INTERNAL_WORKSTATIONS_TRACING_STUB_H diff --git a/google/cloud/workstations/v1/workstations_client.h b/google/cloud/workstations/v1/workstations_client.h index fd61e4adcf87d..99b1ead23e8dc 100644 --- a/google/cloud/workstations/v1/workstations_client.h +++ b/google/cloud/workstations/v1/workstations_client.h @@ -26,7 +26,7 @@ #include "google/cloud/polling_policy.h" #include "google/cloud/status_or.h" #include "google/cloud/version.h" -#include +#include "google/longrunning/operations.grpc.pb.h" #include #include #include diff --git a/google/cloud/workstations/v1/workstations_connection.h b/google/cloud/workstations/v1/workstations_connection.h index 13bee4cc6a66d..02cc1d3532a38 100644 --- a/google/cloud/workstations/v1/workstations_connection.h +++ b/google/cloud/workstations/v1/workstations_connection.h @@ -20,6 +20,7 @@ #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKSTATIONS_V1_WORKSTATIONS_CONNECTION_H #include "google/cloud/workstations/v1/internal/workstations_retry_traits.h" +#include "google/cloud/workstations/v1/workstations.pb.h" #include "google/cloud/workstations/v1/workstations_connection_idempotency_policy.h" #include "google/cloud/backoff_policy.h" #include "google/cloud/future.h" @@ -30,8 +31,7 @@ #include "google/cloud/status_or.h" #include "google/cloud/stream_range.h" #include "google/cloud/version.h" -#include -#include +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/google/cloud/workstations/v1/workstations_connection_idempotency_policy.h b/google/cloud/workstations/v1/workstations_connection_idempotency_policy.h index 53effe4e3ee9b..0dcb30455e146 100644 --- a/google/cloud/workstations/v1/workstations_connection_idempotency_policy.h +++ b/google/cloud/workstations/v1/workstations_connection_idempotency_policy.h @@ -19,11 +19,11 @@ #ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKSTATIONS_V1_WORKSTATIONS_CONNECTION_IDEMPOTENCY_POLICY_H #define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_WORKSTATIONS_V1_WORKSTATIONS_CONNECTION_IDEMPOTENCY_POLICY_H +#include "google/cloud/workstations/v1/workstations.grpc.pb.h" #include "google/cloud/idempotency.h" #include "google/cloud/version.h" -#include -#include -#include +#include "google/iam/v1/iam_policy.grpc.pb.h" +#include "google/longrunning/operations.grpc.pb.h" #include namespace google { diff --git a/protos/BUILD.bazel b/protos/BUILD.bazel index a63e71f57ffd6..63e2ffb14e350 100644 --- a/protos/BUILD.bazel +++ b/protos/BUILD.bazel @@ -16,13 +16,13 @@ package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 -cc_library( - name = "system_includes", - includes = ["."], - visibility = [ - "//google/cloud/bigtable/test_proxy:__pkg__", - "//google/cloud/compute:__pkg__", - "//google/cloud/spanner:__subpackages__", - "//google/cloud/storage/tests:__pkg__", - ], -) +#cc_library( +# name = "system_includes", +# includes = ["."], +# visibility = [ +# "//google/cloud/bigtable/test_proxy:__pkg__", +# "//google/cloud/compute:__pkg__", +# "//google/cloud/spanner:__subpackages__", +# "//google/cloud/storage/tests:__pkg__", +# ], +#) diff --git a/protos/google/cloud/bigtable/test_proxy/BUILD.bazel b/protos/google/cloud/bigtable/test_proxy/BUILD.bazel index 4982da5c8a0ad..a046c420483cb 100644 --- a/protos/google/cloud/bigtable/test_proxy/BUILD.bazel +++ b/protos/google/cloud/bigtable/test_proxy/BUILD.bazel @@ -12,12 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -load( - "@com_google_googleapis_imports//:imports.bzl", - "cc_grpc_library", - "cc_proto_library", -) -load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_protobuf//bazel:cc_proto_library.bzl", "cc_proto_library") +load("@com_google_protobuf//bazel:proto_library.bzl", "proto_library") +load("@grpc//bazel:cc_grpc_library.bzl", "cc_grpc_library") package(default_visibility = ["//visibility:private"]) @@ -29,11 +26,11 @@ proto_library( name = "test_proxy_proto", srcs = ["test_proxy.proto"], deps = [ - "@com_google_googleapis//google/api:client_proto", - "@com_google_googleapis//google/bigtable/v2:bigtable_proto", - "@com_google_googleapis//google/rpc:status_proto", "@com_google_protobuf//:descriptor_proto", "@com_google_protobuf//:duration_proto", + "@googleapis//google/api:client_proto", + "@googleapis//google/bigtable/v2:bigtable_proto", + "@googleapis//google/rpc:status_proto", ], ) diff --git a/protos/google/cloud/compute/BUILD.bazel b/protos/google/cloud/compute/BUILD.bazel index 1cc9073df5b2c..04e17e09fb1eb 100644 --- a/protos/google/cloud/compute/BUILD.bazel +++ b/protos/google/cloud/compute/BUILD.bazel @@ -12,11 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -load( - "@com_google_googleapis_imports//:imports.bzl", - "cc_proto_library", -) -load("@rules_proto//proto:defs.bzl", "proto_library") +load("@com_google_protobuf//bazel:cc_proto_library.bzl", "cc_proto_library") +load("@com_google_protobuf//bazel:proto_library.bzl", "proto_library") load("//google/cloud/compute:service_dirs.bzl", "operation_service_dirs", "service_dirs") package(default_visibility = ["//visibility:private"]) @@ -46,15 +43,15 @@ proto_library( "//google/cloud/compute:__pkg__", ], deps = [ - "@com_google_googleapis//google/api:annotations_proto", - "@com_google_googleapis//google/api:client_proto", - "@com_google_googleapis//google/api:field_behavior_proto", - "@com_google_googleapis//google/api:http_proto", - "@com_google_googleapis//google/api:resource_proto", - "@com_google_googleapis//google/api:routing_proto", - "@com_google_googleapis//google/cloud:extended_operations_proto", "@com_google_protobuf//:any_proto", "@com_google_protobuf//:empty_proto", + "@googleapis//google/api:annotations_proto", + "@googleapis//google/api:client_proto", + "@googleapis//google/api:field_behavior_proto", + "@googleapis//google/api:http_proto", + "@googleapis//google/api:resource_proto", + "@googleapis//google/api:routing_proto", + "@googleapis//google/cloud:extended_operations_proto", ], ) diff --git a/protos/google/cloud/spanner/testing/BUILD.bazel b/protos/google/cloud/spanner/testing/BUILD.bazel index 59fd7848c02f9..fe4766481f59f 100644 --- a/protos/google/cloud/spanner/testing/BUILD.bazel +++ b/protos/google/cloud/spanner/testing/BUILD.bazel @@ -12,6 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +load("@com_google_protobuf//bazel:cc_proto_library.bzl", "cc_proto_library") +load("@com_google_protobuf//bazel:proto_library.bzl", "proto_library") + package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 diff --git a/protos/google/cloud/storage/tests/BUILD.bazel b/protos/google/cloud/storage/tests/BUILD.bazel index f3f70add7cbf2..4bb25803c5928 100644 --- a/protos/google/cloud/storage/tests/BUILD.bazel +++ b/protos/google/cloud/storage/tests/BUILD.bazel @@ -12,6 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +load("@com_google_protobuf//bazel:cc_proto_library.bzl", "cc_proto_library") +load("@com_google_protobuf//bazel:proto_library.bzl", "proto_library") + package(default_visibility = ["//visibility:private"]) licenses(["notice"]) # Apache 2.0 diff --git a/vcpkg.json b/vcpkg.json index 9580c28496fcc..3cd53f101d516 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -6,7 +6,6 @@ "supports": "!uwp", "dependencies": [ "abseil", - "crc32c", { "name": "curl", "features": [ @@ -32,10 +31,7 @@ "nlohmann-json", "benchmark", "gtest", - { - "$description": "Only used for the opentelemetry feature.", - "name": "opentelemetry-cpp" - }, + "opentelemetry-cpp", { "$description": "Only used for the docfx feature.", "name": "pugixml"